query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
621eb398e660daedd4c9daef2ef26c38
We need to create additional sessions to go with each new IlmSession
[ { "docid": "e3a96990152d835d48ca7dc34a699fcb", "score": "0.0", "text": "protected function createMany(int $count): array\n {\n $sessionDataLoader = self::getContainer()->get(SessionData::class);\n $sessions = $sessionDataLoader->createMany($count);\n $savedSessions = $this->postMany('sessions', 'sessions', $sessions);\n\n $dataLoader = $this->getDataLoader();\n $data = [];\n\n foreach ($savedSessions as $i => $session) {\n $arr = $dataLoader->create();\n $arr['id'] += $i;\n $arr['session'] = $session['id'];\n\n $data[] = $arr;\n }\n\n return $data;\n }", "title": "" } ]
[ { "docid": "0f7994a21e734a1f95aa2ec49cca7460", "score": "0.6562246", "text": "private function renewSession() {}", "title": "" }, { "docid": "8c4eabd7fa2bdc2741a638838797f7b1", "score": "0.65604913", "text": "protected function newSession()\n {\n $this->defaultServerArray['session_id'] = $_SERVER['session_id'] = md5(uniqid(mt_rand(), true));\n }", "title": "" }, { "docid": "4764c5d5309eec036da6cf8bc0fa909f", "score": "0.6370331", "text": "protected function startSessions() {\n\t\t$sessions = $this->sessions;\n\n\t\tforeach ($sessions as $key => $session) {\n\t\t\tif (!isset($_SESSION[$key])) {\n\t\t\t\t$_SESSION[$key] = $session;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5b963f5e4f683b70064aaba1340856d8", "score": "0.6337763", "text": "protected function init(){\r\n\t\tSessionClass::create();\r\n\r\n\t}", "title": "" }, { "docid": "a377274d7246b475f8c295327f60ee1f", "score": "0.6333825", "text": "abstract public function &sessions();", "title": "" }, { "docid": "c4cb9e7aa13d1e60c37c47166deb0a46", "score": "0.6327179", "text": "public function startSession() {}", "title": "" }, { "docid": "006ae9265a7a7ebf7c64ebff95c3a784", "score": "0.6225011", "text": "private function initializeLegacySessionAccess()\n {\n if (!$this->session->isStarted()) {\n return;\n }\n\n $_SESSION['BE_DATA'] = $this->session->getBag('contao_backend');\n $_SESSION['FE_DATA'] = $this->session->getBag('contao_frontend');\n }", "title": "" }, { "docid": "2b3eb3dc2d05f0ef7506bc622dc9d45d", "score": "0.61965305", "text": "protected function initializeSession() {}", "title": "" }, { "docid": "3b16160ec86edde72165525ab4ea3899", "score": "0.6066427", "text": "private function createSession() {\n\t\t$this->SID = $this->makeSID();\n\t\t$this->content = array();\n\t\t$this->saveSession();\n\t\tsetcookie($this->sessid.\"_SID\", $this->SID);\n\t}", "title": "" }, { "docid": "8d1a824911861e28c5f3306591686c8a", "score": "0.6066043", "text": "protected function initSession() {\r\n $config = Zend_Registry::getInstance()->config;\r\n session_save_path($config->session_save_path);\r\n Zend_Session::start(array('save_path' => $config->session_save_path));\r\n $session = new Zend_Session_Namespace ('Acaxia_Identity_Provider');\r\n $cacheObj = ZendExt_Cache::getInstance();\r\n $cacheData = $cacheObj->load(session_id());\r\n if (!isset($cacheData->initialized)) {\r\n Zend_Session::regenerateId();\r\n $sessionStd = new stdClass();\r\n $sessionStd->initialized = true;\r\n $cacheObj->save($sessionStd, session_id());\r\n }\r\n $register = Zend_Registry::getInstance();\r\n $register->session = $session;\r\n }", "title": "" }, { "docid": "9e1c07dffadecf01836852b4281245b8", "score": "0.6058309", "text": "function startSession() {\n\t\t$mySession = Cgn_ObjectStore::getObject(\"object://defaultSessionLayer\");\n\t\tif ($mySession->get('userId') != 0 ) {\n\t\t\t$this->userId = $mySession->get('userId');\n\t\t\t$this->username = $mySession->get('username');\n\t\t\t$this->email = $mySession->get('email');\n\t\t\t$this->password = $mySession->get('password');\n\t\t\t$this->locale = $mySession->get('locale');\n\t\t\t$this->tzone = $mySession->get('tzone');\n\t\t\t$this->active_on = $mySession->get('active_on');\n\t\t\t$this->enableAgent = $mySession->get('enableAgent');\n\t\t\tif ($this->enableAgent) {\n\t\t\t\t$this->agentKey = $mySession->get('agentKey');\n\t\t\t}\n\n\t\t\t$this->loggedIn = true;\n\t\t\t$this->groups = unserialize($mySession->get('groups'));\n\n\t\t\tif ($this->tzone != '' && function_exists('date_default_timezone_set')) {\n\t\t\t\t@date_default_timezone_set($this->tzone);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0e763f6368f81e3dddea831d7e987a93", "score": "0.597829", "text": "private function oldLogin(){\n\t\t\n\t\tif(\\go\\core\\Environment::get()->isCli()){\n\t\t\treturn;\n\t\t}\n\t\t\n if (session_status() == PHP_SESSION_NONE) {\n\t\t\t\n //without cookie_httponly the cookie can be accessed by malicious scripts \n //injected to the site and its value can be stolen. Any information stored in \n //session tokens may be stolen and used later for identity theft or\n //user impersonation.\n ini_set(\"session.cookie_httponly\",1);\n\n //Avoid session id in url's to prevent session hijacking.\n ini_set('session.use_only_cookies',1);\n\n if(\\go\\core\\http\\Request::get()->isHttps()) {\n ini_set('session.cookie_secure',1);\n }\n\n session_name('groupoffice');\n session_start();\n }\n\t\t\n\t\tif(!isset($_SESSION['GO_SESSION'])) {\n\t\t\t\t$_SESSION['GO_SESSION'] = [];\n\t\t\t}\t\t\t\n\t\t$_SESSION['GO_SESSION']['user_id'] = $this->userId;\n\t\t$_SESSION['GO_SESSION']['accessToken'] = $this->accessToken;\t\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "95b66fa787e555b23c1579659747578d", "score": "0.5977211", "text": "private function addToSession() {\n $_SESSION['username'] = $this->username;\n $_SESSION['uuid'] = $this->uuid;\n }", "title": "" }, { "docid": "1376cc746f18f95947554ecda3a93d04", "score": "0.59541386", "text": "private function createSession()\r\n\t{\r\n\t\t//Delete all old session(s) for this ip address\r\n\t\t$this->deleteSession();\r\n\r\n\t\t//Create unique session id\r\n\t\t$sid = $this->generate_sid();\r\n\r\n\t\t//Create $data array for the sql query\r\n\t\t$data = array(\r\n\t\t\t'sid' => $sid,\r\n\t\t\t'uid' => $this->uid,\r\n\t\t\t'ip_address' => $this->ci->input->ip_address(),\r\n\t\t\t'time' => time()\r\n\t\t);\r\n\r\n\t\t//Insert $data into database\r\n\t\t$this->ci->authenticationModel->insertSession($data);\r\n\r\n\t\t//Create session cookie\r\n\t\t$this->generate_sid_cookie($sid);\r\n\t}", "title": "" }, { "docid": "11c30aac2285c4b137647a0dd6d40096", "score": "0.59065866", "text": "protected function initialiseSession()\n {\n $sessionId = $this->gatewayRequest->getSessionId(true);\n $sessionStoreId = \"ussd_session_{$sessionId}\";\n\n if (! $this->sessionManager->exists($sessionStoreId)) {\n $this->sessionManager->setValueOfSubKey($sessionStoreId, 'initialised', time());\n $this->sessionManager->setValueOfSubKey($sessionStoreId, 'phone', $this->gatewayRequest->getMSISDN());\n $this->sessionManager->setValueOfSubKey($sessionStoreId, 'network', $this->gatewayRequest->getNetwork());\n }\n }", "title": "" }, { "docid": "a0a1beed79e00625212ba274ff195688", "score": "0.58865774", "text": "private function createNewSession() {\n $newSessionId = $this->createNewSessionId();\n $currentTime = time();\n $currentIp = $_SERVER['REMOTE_ADDR'];\n $currentBrowser = $_SERVER['HTTP_USER_AGENT'];\n global $db;\n\t\tif(isset($_SESSION['session_id']))\t{\n\t\t\t//There is an active Session.\n\t\t\t$sql = \"SELECT COUNT(`session_id`) as session_count FROM `{$db->name()}`.`{$db->table('session')}` WHERE `session_id` = '{$_SESSION['session_id']}'\";\n\t\t\t$query = $db->query($sql);\n\t\t\t$result = $db->result($query);\n\t\t\tif($result->session_count == 0)\t{\n\t\t\t\t$sql = \"INSERT INTO `{$db->name()}`.`{$db->table('session')}` VALUES ('{$newSessionId}', NULL, '{$currentTime}', '{$currentTime}', '{$currentIp}', '{$currentBrowser}', '0')\";\n\t\t\t} else {\n\t\t\t\t$sql = \"UPDATE `{$db->name()}`.`{$db->table('session')}` SET `session_create_ip` = '{$currentIp}', `session_browser` = '{$currentBrowser}', `session_login_stat` ='0' , `session_user_id` = NULL, `session_create_time` = '{$currentTime}', `session_last_active` = '{$currentTime}' , `session_id` = '{$newSessionId}' WHERE `session_id` = '{$_SESSION['session_id']}'\";\n\t\t\t}\n\t\t\t$db->query($sql);\n\t\t} else {\n\t\t\t$sql = \"INSERT INTO `{$db->name()}`.`{$db->table('session')}` VALUES ('{$newSessionId}', NULL, '{$currentTime}', '{$currentTime}', '{$currentIp}', '{$currentBrowser}', '0')\";\n\t\t\t$db->query($sql);\n\t\t}\n\t\t$_SESSION['session_id'] = $newSessionId;\n }", "title": "" }, { "docid": "733abd22e1aaeaebe9a32c5e094a2aa2", "score": "0.5872862", "text": "protected function initSession() {\n\t\tif (!defined('NO_IMPORTS')) require_once(WCF_DIR.'lib/system/session/CookieSessionFactory.class.php');\n\t\t$factory = new CookieSessionFactory();\n\t\tself::$sessionObj = $factory->get();\n\t\tself::$userObj = self::getSession()->getUser();\n\t}", "title": "" }, { "docid": "06bd9724d7a83944a8cb2cf8ec4ecc2c", "score": "0.5869295", "text": "abstract protected function getSession();", "title": "" }, { "docid": "06bd9724d7a83944a8cb2cf8ec4ecc2c", "score": "0.5869295", "text": "abstract protected function getSession();", "title": "" }, { "docid": "a1a3a757ba3313f732a74b481ed60ddd", "score": "0.585714", "text": "public function start()\n {\n if ($this->sessionTimeout > 0 && $this->sessionTimeout < $this->lifetime) {\n // If server session timeout is non-zero but less than client session timeout: Copy this value instead.\n $this->sessionTimeout = $this->lifetime;\n }\n $this->sessionDataLifetime = (int)$GLOBALS['TYPO3_CONF_VARS']['FE']['sessionDataLifetime'];\n if ($this->sessionDataLifetime <= 0) {\n $this->sessionDataLifetime = 86400;\n }\n parent::start();\n }", "title": "" }, { "docid": "12539441cc31e875dbb2ffda1d303e31", "score": "0.58403474", "text": "public function sessionStart();", "title": "" }, { "docid": "2cc14dbf273348a2faa01704d978b755", "score": "0.5828392", "text": "public function getSessionPool();", "title": "" }, { "docid": "e5fe57fbe876536442e525d12cd41cb2", "score": "0.5818869", "text": "function create_session() {\n\t // alias the Mambo version object\n\t $mambo_version =& $this->mambo_version;\n\n\t\t// start session\n $this->session_id = $this->generateId();\n $sessioncookie = $this->session_id;\n\n // 4.5.1 and 4.5.2 compatibility\n if ($mambo_version->RELEASE == '4.5' && $mambo_version->DEV_LEVEL != '1.0.9') {\n\t\t $this->session_id .= $_SERVER['REMOTE_ADDR'];\n\t\t}\n\n $sql = 'insert into '.$this->sessionstable.' (session_id, username, guest, time, gid) values ';\n $sql .= '(\"'.md5($this->session_id).'\", \"\", 1, \"'.time().'\",0)';\n\n\t\t// insert the guest session\n cpg_db_query($sql);\n\n\t\t// set the session cookie\n setcookie( \"sessioncookie\", $sessioncookie, time() + 43200, \"/\" );\n\t}", "title": "" }, { "docid": "a94962e8e9c82a466917cc0ca4f8be8e", "score": "0.58130556", "text": "public function getSession() {}", "title": "" }, { "docid": "5ac4f09c21eaf1c68f5060ecb74dfdac", "score": "0.58085525", "text": "private function startSession() {\r\n\t\t// Get id account if exists\r\n\t\t$this->loadModules();\r\n\t\tif(isset($this->mods['account']) && method_exists($this->mods['account'],'accountData')){\r\n\t\t\t$account = $this->mods['account']->accountData();\r\n\t\t\t$this->id_account = $account['id'];\r\n //print $this->id_account;\r\n //print_r($account);\r\n // If id account is set, look for a abandonned cart for this account\r\n if($this->id_account) $account_cart = $this->getItems('account_session',$this->id_account,'one',false);\r\n\t\t}\r\n\r\n // Start cart session\r\n //$this->cart = new Cart('mc_cart');\r\n\t\t$this->cart = Cart::getInstance();\r\n\r\n // Get the key of the cart\r\n $this->session_key_cart = $this->cart->getKey();\r\n\r\n // Check if cart with this key exists in db\r\n $session_cart = $this->getItems('session',['session_key_cart' => $this->session_key_cart],'one',false);\r\n\r\n // Check if there is an account cart\r\n if(isset($account_cart) && !empty($account_cart)) {\r\n \r\n // Check if the current cart is different from the account cart\r\n if($session_cart['session_key_cart'] !== $account_cart['session_key_cart']) {\r\n // Get the content of the current cart\r\n $cart = $this->cartData();\r\n\r\n // - The current cart si empty so we'll replace it with the old one\r\n if(!$cart['nb_items']) {\r\n // - create new cart session with this key and retreive items of the cart\r\n $session_cart = $account_cart;\r\n\t\t\t\t\t$this->cart->newCart($account_cart['session_key_cart'] ?? '');\r\n $this->session_key_cart = $account_cart['session_key_cart'];\r\n\t\t\t\t\t$this->cart->openCart();\r\n $this->retreiveAccountCart();\r\n }\r\n else {\r\n // - There is at least one product in the current cart so we assign it to the account\r\n $this->upd([\r\n\t\t\t\t\t\t'type' => 'session',\r\n\t\t\t\t\t\t'data' => [\r\n\t\t\t\t\t\t\t'id' => $session_cart['id_cart'],\r\n\t\t\t\t\t\t\t'id_account' => $this->id_account\r\n\t\t\t\t\t\t]\r\n\t\t\t\t\t]);\r\n $session_cart['id_account'] = $this->id_account;\r\n }\r\n }\r\n }\r\n else {\r\n // - no account cart was found\r\n // Check if there is a current cart\r\n if(!$session_cart) {\r\n // - no cart was found so we create new cart session\r\n $this->openSession($this->session_key_cart, $this->id_account);\r\n $session_cart = $this->getItems('session',['session_key_cart' => $this->session_key_cart],'one',false);\r\n }\r\n elseif($session_cart['transmission_cart'] === 1){\r\n\t\t\t\t// - cart was found but is closed\r\n\t\t\t\t$this->cart->newCart(null);\r\n\t\t\t\t// Get the new key of the cart\r\n\t\t\t\t$this->session_key_cart = $this->cart->getKey();\r\n\t\t\t\t$this->openSession($this->session_key_cart, $this->id_account);\r\n\t\t\t\t// Get the new cart from the db\r\n\t\t\t\t$session_cart = $this->getItems('session',['session_key_cart' => $this->session_key_cart],'one',false);\r\n\t\t\t}\r\n elseif(empty($session_cart['id_account']) && isset($this->id_account) && !empty($this->id_account)){\r\n // - cart was found but not assign to the current account, update the session to save into account\r\n $this->upd([\r\n\t\t\t\t\t'type' => 'session',\r\n\t\t\t\t\t'data' => [\r\n\t\t\t\t\t\t'id' => $session_cart['id_cart'],\r\n\t\t\t\t\t\t'id_account' => $this->id_account\r\n\t\t\t\t\t]\r\n\t\t\t\t]);\r\n $session_cart['id_account'] = $this->id_account;\r\n }\r\n elseif($session_cart['id_account'] && !$this->id_account) {\r\n // - cart was found but assign to an account, empty the cart and start a new one\r\n $this->cart->newCart(null);\r\n // Get the new key of the cart\r\n $this->session_key_cart = $this->cart->getKey();\r\n\t\t\t\t$this->openSession($this->session_key_cart, $this->id_account);\r\n // Get the new cart from the db\r\n $session_cart = $this->getItems('session',['session_key_cart' => $this->session_key_cart],'one',false);\r\n }\r\n }\r\n\r\n\t\t$this->current_cart = $session_cart ?: [];\r\n\t\t$this->cart->openCart();\r\n\t}", "title": "" }, { "docid": "bfc11b86f12f1d26514b0bedd37d6e8b", "score": "0.5803563", "text": "abstract protected function renewSession() : bool;", "title": "" }, { "docid": "a56d618cebb498323ebf7c1076e32980", "score": "0.5764471", "text": "private function start_session()\n\t{\n\n\t\tself::$gebruikersinfo['sleutel'] = md5(rand(0,99999999999).date(\"dmyhis\"));\n\t\t$info = self::$gebruikersinfo['info'];\n\t\t$SQL = \"INSERT INTO \".$this->logins_table.\" \";\n\t\t$SQL .= \"SET uid\t= '\". $info['id'] .\"' \";\n\t\t$SQL .= \", sid = '\". self::$gebruikersinfo['sleutel'] .\"' \";\n\t\t$SQL .= \", ip\t= '\". $this->get_ip() .\"' \";\n\t\t$SQL .= \", datum = NOW() \";\n\t\t$query = $this->verbinding->query($SQL);\n\t\tif( $query )\n\t\t{\n\t\t\t/*\n\t\t\t| Make cookie\n\t\t\t*/\n\t\t\t$secondes = $this->login_session_time * 3600;\n\t\t\tsetcookie($this->cookiename, self::$gebruikersinfo['sleutel'], time()+$secondes, \"/\");\n\n\t\t\t/*\n\t\t\t| Send to the next page\n\t\t\t*/\n\t\t\t$next = rawurldecode(rawurldecode( $_POST['next'] ));\n\n\t\t\t$the_url = ( $next != '' ) ? $next: $this->landing_page_url;\n\n\t\t\theader(\"Location:\". $the_url);\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprint_r( $query->errorInfo() );\n\t\t}\n\t}", "title": "" }, { "docid": "c49da65f5bb145df5a041bd6c3b20b2e", "score": "0.5760404", "text": "public function enforceNewSessionId() {}", "title": "" }, { "docid": "6d8b01aa986cf267b86a08929e05ea46", "score": "0.5760099", "text": "public function __construct() {\n\t\tif (isset($_SERVER[\"REMOTE_ADDR\"])) { // set ip var\n\t\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t\t} else if(isset($_SERVER[\"HTTP_X_FORWARDED_FOR\"])) {\n\t\t\t$ip = $_SERVER[\"HTTP_X_FORWARDED_FOR\"];\n\t\t} else if(isset($_SERVER[\"HTTP_CLIENT_IP\"])) {\n\t\t\t$ip = $_SERVER[\"HTTP_CLIENT_IP\"] ;\n\t\t} \n\t\t$this->ip = $this->ipToIPV46($ip);\n\t\t\n\t\t$this->db = $this->dbConnect(); // set db connection\n\t\t$this->dropExpiredSessionis();\n\t\t\n\t\t$this->https = $this->isHTTPS();\n\t\t$this->path = realpath(dirname($_SERVER['PHP_SELF']));\n\t\t$this->domain = $_SERVER[\"SERVER_NAME\"];\n\t\t\n\t\t\n\t\t$cookieKey = isset($_COOKIE['sessioniKey']) ? $_COOKIE['sessioniKey'] : ''; // get the client's cookie\n\t\t\n\t\tif(!$this->hasSessioni($this->ip)) {\n\t\t\t$this->createSessioni();\n\t\t}\n\t\tif($cookieKey != $this->getSessioniKey()) { // if the key from the db doesn't match the cookie's key\n\t\t\tif(IPMATCHKEY) { // if ip must match key, create new sessioni\n\t\t\t\t$this->dropSessioni();\n\t\t\t\t$this->createSessioni();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(COOKIEPRIORITY) { // if cookie has priority, create sessioni based on cookie\n\t\t\t\t\t$this->createSessioni(null, $cookieKey);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsetcookie('sessioniKey', $this->getSessioniKey(), time()+60*60*24*365); // always reinitialize the sessioni, to reset the cookie timer\n\t\t\n\t\t$this->dropExpiredVars(); // drop expired vars of any sessioni\n\t\t$this->loadProperties(); // set the sessioni properties (sessioni id, key & datetime)\n\t\t$this->loadVars(); // set the global sessioni[][] var\n\t}", "title": "" }, { "docid": "d427ce9d603dc38377ab290d2139763a", "score": "0.5725573", "text": "private function createSession() {\r\n\t\tsession_start();\r\n\t\t$time = time();\r\n\t\t$_SESSION['user_id'] = $this->data['user_id'];\r\n\t\t$_SESSION['session_start'] = $_SESSION['session_time'] = $time;\r\n\t\tGDS::$DB->exec('DELETE FROM sessions WHERE session_id = \\'' . session_id() . '\\'');\r\n\t\t$query = GDS::$DB->prepare('INSERT INTO sessions (session_id, user_id, session_start, session_time, session_ip)\r\n\t\t\tVALUES (:sid, :uid, :ss, :ss, :sip)');\r\n\t\t$query->execute(array(\r\n\t\t\t':sid'\t=> session_id(),\r\n\t\t\t':uid'\t=> $this->data['user_id'],\r\n\t\t\t':ss'\t=> $time,\r\n\t\t\t':sip'\t=> $_SERVER['REMOTE_ADDR'],\r\n\t\t));\r\n\t\tsetcookie('bis_[user_id]', $this->data['user_id'], time() + 3600, '/', null, false, true);\r\n\t\tsetcookie('bis_[session_start]', $time, time() + 3600, '/', null, false, true);\r\n\t\tsetcookie('bis_[session_time]', $time, time() + 3600, '/', null, false, true);\r\n\t}", "title": "" }, { "docid": "548874373abee3b93fde6120a9756f8d", "score": "0.5702921", "text": "private function InitSession() {\n using('Core.Library.Session');\n if($_SESSION[$this->CarbonApp->Config('session.name')] == '') {\n $this->Session = new SessionManager($this->CarbonApp->Config('session'));\n }\n else {\n $this->Session = new SessionManager($this->CarbonApp->Config('session.name'));\n }\n }", "title": "" }, { "docid": "bd2220b7838ebc9a053d7bd3aea6950f", "score": "0.56960696", "text": "abstract public function getSessionID();", "title": "" }, { "docid": "e7caf6f91d79bd8a94a2bb77b3a986c1", "score": "0.5691028", "text": "public function CreateAssessmentSession();", "title": "" }, { "docid": "57e7f3998f84c6648d32392c090aca19", "score": "0.56859976", "text": "private static function initialiseSession(): void {\n\t\t\tstatic $s_basePath = null;\n\n\t\t\tif(is_null($s_basePath)) {\n\t\t\t\t$s_basePath = [\"app\", constant(\"app.uid\")];\n\t\t\t}\n\n\t\t\tsession_start();\n\t\t\t$session =& $_SESSION;\n\n\t\t\tforeach($s_basePath as $p) {\n\t\t\t\tif(!array_key_exists($p, $session) || !is_array($session[$p])) {\n\t\t\t\t\t$session[$p] = [];\n\t\t\t\t}\n\n\t\t\t\t$session =& $session[$p];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f6d68d635a70affb5924818b7b9a32ea", "score": "0.56796145", "text": "function initSession()\n {\n // initailize session variables\n $session =& $this->_session;\n $session = new mosSession($this->_db);\n\n // purge expired sessions\n $session->purge('core');\n\n // Session Cookie `name`\n $sessionCookieName = mosMainFrame::sessionCookieName();\n // Get Session Cookie `value`\n $sessioncookie = strval(mosGetParam($_COOKIE, $sessionCookieName, null));\n\n // Session ID / `value`\n $sessionValueCheck = mosMainFrame::sessionCookieValue($sessioncookie);\n\n // Check if existing session exists in db corresponding to Session cookie `value`\n // extra check added in 1.0.8 to test sessioncookie value is of correct length\n if ($sessioncookie && strlen($sessioncookie) == 32 && $sessioncookie != '-' && $session->load($sessionValueCheck)) {\n // update time in session table\n $session->time = time();\n $session->update();\n } else {\n // Remember Me Cookie `name`\n $remCookieName = mosMainFrame::remCookieName_User();\n\n // test if cookie found\n $cookie_found = false;\n if (isset($_COOKIE[$sessionCookieName]) || isset($_COOKIE[$remCookieName]) || isset($_POST['force_session'])) {\n $cookie_found = true;\n }\n\n // check if neither remembermecookie or sessioncookie found\n if (!$cookie_found) {\n // create sessioncookie and set it to a test value set to expire on session end\n setcookie($sessionCookieName, '-', false, '/');\n } else {\n // otherwise, sessioncookie was found, but set to test val or the session expired, prepare for session registration and register the session\n $url = strval(mosGetParam($_SERVER, 'REQUEST_URI', null));\n // stop sessions being created for requests to syndicated feeds\n if (strpos($url, 'option=com_rss') === false && strpos($url, 'feed=') === false) {\n $session->guest = 1;\n $session->username = '';\n $session->time = time();\n $session->gid = 0;\n // Generate Session Cookie `value`\n $session->generateId();\n\n if (!$session->insert()) {\n die($session->getError());\n }\n\n // create Session Tracking Cookie set to expire on session end\n setcookie($sessionCookieName, $session->getCookie(), false, '/');\n }\n }\n\n // Cookie used by Remember me functionality\n $remCookieValue = strval(mosGetParam($_COOKIE, $remCookieName, null));\n\n // test if cookie is correct length\n if (strlen($remCookieValue) > 64) {\n // Separate Values from Remember Me Cookie\n $remUser = substr($remCookieValue, 0, 32);\n $remPass = substr($remCookieValue, 32, 32);\n $remID = intval(substr($remCookieValue, 64));\n\n // check if Remember me cookie exists. Login with usercookie info.\n if (strlen($remUser) == 32 && strlen($remPass) == 32) {\n $this->login($remUser, $remPass, 1, $remID);\n }\n }\n }\n }", "title": "" }, { "docid": "126e55d2b8ba7260cc0394f58def56c3", "score": "0.56766075", "text": "public function open()\n {\n if (SESSION_HANDLER === 'db') {\n session_set_save_handler(new SessionHandler($this->db), true);\n }\n\n $this->configure();\n\n if (ini_get('session.auto_start') == 1) {\n session_destroy();\n }\n\n session_name('KB_SID');\n session_start();\n }", "title": "" }, { "docid": "dda9ef8b11cca602b3acba11c4811916", "score": "0.5652328", "text": "public function startup()\n\t{\n\t\tparent::startup();\n\n\t\tif (!$this->user->isInRole(RoleEnum::STUDENT) && !$this->user->isInRole(RoleEnum::ADMIN)) {\n\t\t\t$this->forbidden();\n\t\t}\n\n\t\t$selectedSession = $this->sessionService->getSession($this->id);\n\t\tif (!$selectedSession || $selectedSession->getUser()->getId() != $this->user->getId()->getId()) {\n\t\t\tthrow new BadRequestException('Session is not available.');\n\t\t}\n\n\t\t$this->selectedSession = $this->template->session = $selectedSession;\n\t}", "title": "" }, { "docid": "5e6b3e5d7fe926321988e9940e77c03c", "score": "0.56519485", "text": "public function __construct() {\n $currentTime = time();\n $currentIp = $_SERVER['REMOTE_ADDR'];\n $currentBrowser = $_SERVER['HTTP_USER_AGENT'];\n \n //We also call the global $db object.\n global $db;\n \n if ( isset($_SESSION['session_id'])) {\n //The user has an active session. We have to validate the session.\n $sessionId = $_SESSION['session_id'];\n $sql = \"SELECT `session_last_active`, `session_create_ip`, `session_browser` FROM `{$db->name()}`.`{$db->table('session')}` WHERE `session_id` = '{$sessionId}'\";\n $query = $db->query($sql);\n if ( $db->numRows($query) == 0) {\n //This means that the session does not exist. Unset it an make a new session.\n $db->freeResults($query);\n $this->createNewSession();\n } else {\n //He has a valid session in the Db. Check if it is still within 5 min activity and let him pass.\n $result = $db->result($query);\n if ( $currentTime - intval($result->session_last_active) > 300 /* 5 Mins */) {\n //This means that the current Session is over due. Remove it and recreate it.\n $this->createNewSession();\n } else {\n //We check the final stage ie) the ip and browser.\n if ( $result->session_create_ip != $currentIp || $result->session_browser != $currentBrowser) {\n //The session and IP dont match. Create a new Session.\n $this->createNewSession();\n } else {\n //This means that the session is valid. Update the time and let him pass.\n $db->freeResults($query);\n $sql = \"UPDATE `{$db->name()}`.`{$db->table('session')}` SET `session_last_active` = '{$currentTime}' WHERE `session_id` = '{$sessionId}'\";\n if ( ! $db->query($sql) ) {\n $db->freeResults($query);\n die('Session Update Failed. Contact Admin.');\n }\n }\n }\n $db->freeResults($query);\n }\n } else {\n //This means we create a new session ID.\n if ( isset($_COOKIE['cookie_id'])) {\n //We seem to have a cookie. Validate it.\n } else {\n //Neither a Cookie nor a session. We create a new session.\n $this->createNewSession();\n }\n }\n }", "title": "" }, { "docid": "056858f5ed0c2d6bd7fe00df4ed13440", "score": "0.56445974", "text": "function createSession($sessionId, $token, $users) {\n\t//Generate the new Session object\n\t$session = new $Session($sessionId, $token, $users);\n\t\n\t//Add it to the list of active sessions\n\t$sessionList[] = $session;\n}", "title": "" }, { "docid": "6e251647d4ba1ffec1d13928d5119648", "score": "0.56440264", "text": "private function startSession(): void {\n\t\tsession_name('Automad-' . md5(AM_BASE_DIR));\n\t\tsession_set_cookie_params(0, '/', '', false, true);\n\t\tsession_start();\n\t}", "title": "" }, { "docid": "47eda099f71e0af676574670a97e0d5c", "score": "0.56338805", "text": "function MapSession_RW()\n {\n // call the constructor for the map session base class\n $this->MapSession();\n }", "title": "" }, { "docid": "8eb75d6d8eae8e509573687113ce1284", "score": "0.5632519", "text": "protected function setSession()\n {\n $this->session = $this->getCurrentSession();\n\n // If there was no session found, create a new one instead\n if (!$this->session) {\n $session = MultiFormSession::create();\n $session->write();\n $this->session = $session;\n }\n }", "title": "" }, { "docid": "f4edbe51ceaf3eac9b972e9e980948a0", "score": "0.56320053", "text": "function createUserSession(){\r\n\t\tif($this->user['userid']){\r\n\t\t\t// Remove the defunct sessions\r\n\t\t\t$this->kclass->DB->query(\"\r\n\t\t\t\tDELETE FROM sessions\r\n\t\t\t\tWHERE userid='\".$this->user['userid'].\"'\r\n\t\t\t\");\r\n\t\t\t$this->session['id'] = md5(uniqid(TIMENOW.' '.MICRO_TIME));\r\n\r\n\t\t\t// Insert the new session\r\n\t\t\t$this->kclass->DB->query(\"\r\n\t\t\t\tINSERT INTO `sessions` ( `id` , `username` , `userid` , `ipaddress` , `agent` , `runtime` , `signtype` , `location` , `groupid` , `title` )\r\n\t\t\t\tVALUES (\r\n\t\t\t\t'\".$this->session['id'].\"', '\".$this->user['username'].\"' , '\".$this->user['userid'].\"', '\".IP.\"' , '\".addslashes(AGENT).\"', '\".TIMENOW.\"' , '\".$this->user['username'].\"' , '\".URI.\"' , '\".$this->user['groupid'].\"' , '\".$this->user['title'].\"'\r\n\t\t\t\t)\r\n\t\t\t\");\r\n\t\t}else{\r\n\t\t\t$this->createGuestSession();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "bd09b5c575cf80345fb7176010336b7d", "score": "0.56170505", "text": "function bindSession() {\n\t\t$mySession =& Cgn_Session::getSessionObj();\n\t\t$mySession->setAuthTime();\n\t\t$mySession->set('userId',$this->userId);\n\t\t$mySession->set('lastBindTime',time());\n\t\t$mySession->set('username',$this->username);\n\t\t$mySession->set('email',$this->email);\n\t\t$mySession->set('password',$this->password);\n\t\t$mySession->set('locale',$this->locale);\n\t\t$mySession->set('tzone',$this->tzone);\n\t\t$mySession->set('active_on', $this->active_on);\n\t\t$mySession->set('enableAgent',$this->enableAgent);\n\t\tif ($this->enableAgent) {\n\t\t\t$mySession->set('agentKey',$this->agentKey);\n\t\t}\n\t\t$mySession->set('groups',serialize( $this->groups ));\n\t\t$this->loggedIn = true;\n\n\t\tif ($this->tzone != '' && function_exists('date_default_timezone_set')) {\n\t\t\t@date_default_timezone_set($this->tzone);\n\t\t}\n\t}", "title": "" }, { "docid": "cc062b26edce1e656b15005e1877bba0", "score": "0.5614652", "text": "function newSession(){\n session_start();\n $_SESSION = array();\n session_destroy();\n session_start();\n\n // Initialise the user session\n $_SESSION['userId'] = $_POST['user_id'];\n $_SESSION['email'] = $_POST['lis_person_contact_email_primary'];\n $_SESSION['consumerKey'] = $_POST['oauth_consumer_key'];\n $_SESSION['resourceLinkId'] = $_POST['resource_link_id'];\n}", "title": "" }, { "docid": "13b2398055bc47164f76ac420ede7084", "score": "0.56119066", "text": "public function _initSession() {\n\t\t// TODO figure out sessions\n\t\tZend_Session::start();\n\t}", "title": "" }, { "docid": "4da9edb040709aa856c462c7d6600eef", "score": "0.55956864", "text": "private function create_session(int $userid, int $require_2fa = 0, int $require_2fa_phone = 0)\n{ \n\n // Generate session ID\n do { \n $this->session_id = io::generate_random_string(60);\n $exists = redis::exists('auth:' . hash('sha512', $this->session_id));\n } while ($exists > 0);\n\n // Debug / log\n debug::add(1, tr(\"Authentication successful, session ID generated, area: {1}, username: {2}, session_id: {3}\", app::get_area(), app::_post('username'), $this->session_id));\n\n // Add session to DB\n $remember_me = app::_post('remember_me') ?? 0;\n $vars = array(\n 'type' => (app::get_area() == 'admin' ? 'admin' : 'user'),\n 'userid' => $userid,\n 'enc_pass' => app::has_post('password') ? md5(app::_post('password')) : '',\n '2fa_status' => ($require_2fa == 1 ? 0 : 1),\n '2fa_phone_status' => ($require_2fa_phone == 1 ? 0 : 1),\n 'remember_me' => $remember_me,\n 'ip_address' => app::get_ip(),\n 'user_agent' => app::get_user_agent()\n );\n\n // Add login history\n $msg = new event_message('core.logs.add_auth_login', $vars);\n $vars['history_id'] = msg::dispatch($msg)->get_response('core');\n\n // Set redis variables\n $seconds = $remember_me == 1 ? 2592000 : $this->expire_secs;\n $redis_key = 'auth:' . hash('sha512', $this->session_id);\n $this->recipient = (app::get_area() == 'admin' ? 'admin:' : 'user:') . $userid;\n\n // Add session to redis\n redis::hmset($redis_key, $vars);\n redis::expire($redis_key, $seconds);\n redis::hset('auth:last_seen', $this->recipient, time());\n\n // Set cookie\n $expire = $remember_me == 1 ? (time() + $seconds) : 0;\n if (!app::set_cookie($this->cookie_name, $this->session_id, $expire, '/')) { \n throw new ApexException('alert', \"Unable to set login cookie. Customer support has been notified, and will resolve the issue shortly. Please try again later.\");\n }\n\n // Set user ID\n app::set_userid($userid);\n\n // Change panel, if needed\n if (app::get_area() != 'admin') { \n $area = app::_config('users:login_method') == 'index' ? 'public' : 'members';\n $theme = app::_config('users:login_method') == 'index' ? app::_config('core:theme_public') : app::_config('users:theme_members');\n\n app::set_area($area);\n app::set_theme($theme);\n }\n\n // Initiate 2FA, if needed\n if ($require_2fa_phone == 1) { $this->authenticate_2fa_sms(1); }\n elseif ($require_2fa == 1) { $this->authenticate_2fa_email(1); }\n\n // Debug\n debug::add(1, tr(\"Completed successful login, area: {1}, username: {2}\", app::get_area(), app::_post('username')), 'info');\n\n // Parse template\n app::set_uri('index', true);\n app::set_res_body(view::parse());\n\n // Return\n return true;\n\n}", "title": "" }, { "docid": "39ecfbb55f48dd7ec1c9ff3789df1b70", "score": "0.5580829", "text": "private function __construct()\n {\n include_once(OPENBIZ_BIN.\"SessionContext.php\");\n $this->m_SessionContext = new SessionContext();\n // retrieve object session vars\n $this->m_SessionContext->RetrieveSessionObjects();\n }", "title": "" }, { "docid": "51e8b9d544a3d207c8d8b2eee30b8528", "score": "0.5575448", "text": "public function getSession();", "title": "" }, { "docid": "51e8b9d544a3d207c8d8b2eee30b8528", "score": "0.5575448", "text": "public function getSession();", "title": "" }, { "docid": "51e8b9d544a3d207c8d8b2eee30b8528", "score": "0.5575448", "text": "public function getSession();", "title": "" }, { "docid": "31afb0956b3a94105a56c2056402ef8b", "score": "0.5572703", "text": "function generateSession(){\r\n\t\tif (ini_set('session.use_only_cookies', 1) === FALSE) {\r\n\t\t\theader(\"Location: ../accessDenied.php\");\r\n\t\t\texit();\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$cSettings = session_get_cookie_params();\r\n\t\t\tsession_set_cookie_params($cSettings[\"lifetime\"],$cSettings[\"path\"],$cSettings[\"domain\"],false,true);\r\n\t\t\tsession_name(\"db_proj\");\r\n\t\t\tsession_start();\r\n\t\t\tsession_regenerate_id(true);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "edb0022660ff1ca641cae5b4de7d7ae6", "score": "0.5568467", "text": "public function session();", "title": "" }, { "docid": "edb0022660ff1ca641cae5b4de7d7ae6", "score": "0.5568467", "text": "public function session();", "title": "" }, { "docid": "809a958ba16f95ce0cc3dbf943a83779", "score": "0.5560838", "text": "public function startSession()\n {\n\n if (!IS_CLI) {\n session_start();\n }\n\n }", "title": "" }, { "docid": "941006c1df09652c74f6b0ef71ce4bd2", "score": "0.55506724", "text": "public static function initSession()\n {\n self::$Session = new Zend_Session_Namespace('gapp');\n\n // if user identified, maintain session variables, otherwise initialize session variables\n if (!isset(self::$Session->idPlayer)) {\n // stuff\n self::$Session->idGame = 0;\n self::$Session->idPlayer = 0;\n self::$Session->playerName = '';\n self::$Session->idChallenge = 0;\n self::$Session->roundsPerGame = 3;\n self::$Session->secondsPerRound = 120;\n self::$Session->round = 0;\n// self::$Session->start = null;\n// self::$Session->end = null;\n self::$Session->points = 0;\n self::$Session->roundAvg = 0;\n self::$Session->signInState = 0;\n self::$Session->Rounds = Array();\n self::$Session->Squares = Array();\n self::$Session->gameStart = null;\n self::$Session->gameEnd = null;\n self::$Session->gameState = null;\n self::$Session->scoreBoard = Array();\n }\n\n return self::$Session;\n\n }", "title": "" }, { "docid": "610d76729bf96623fa304082c1944848", "score": "0.5545395", "text": "protected function getSessionBackend() {}", "title": "" }, { "docid": "560bf68351e60ed9f740b5382dc99ae1", "score": "0.55347717", "text": "public function aura_session()\n\t\t{\n\t\t\t$this->session_factory = new \\Aura\\Session\\SessionFactory;\n\t\t\t$this->session = $this->session_factory->newInstance($_COOKIE);\t\t\t\n\t\t\t$this->segment = $this->session->getSegment('public/session/session');\n\t\t}", "title": "" }, { "docid": "650dd0483223aea4702de610a3b95a1c", "score": "0.55317885", "text": "function sessionCRUD_startSession(){\n $lifetime = 60 * 60 * 24 * 5;\n session_set_cookie_params($lifetime, '/');\n session_start();\n }", "title": "" }, { "docid": "b464e350dad186bd5e4252cb8faff6d8", "score": "0.5530524", "text": "function initialiseCustomerSession($instance_name, $server_name, $app_path = \"\" , $timeout = 15)\r\n\t{\r\n\t\t$_SESSION['portalmode']=\"CUSTOMER\";\r\n\r\n\t\t$pos = strpos($server_name,\":\");\r\n\t\tif(is_integer($pos))\r\n\t\t{\r\n\t\t\t$_SESSION[\"server_name\"] = substr($server_name,0,$pos);\r\n\t\t\t$_SESSION[\"server_port\"] = substr($server_name,$pos + 1);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$_SESSION[\"server_name\"] = $server_name;\r\n\t\t\t$_SESSION[\"server_port\"] = 80;\r\n\t\t}\r\n\t\t\r\n\t\t//-- set session vars\r\n\t\tif($app_path == \"\")$app_path = \"/sw/\" . $instance_name .\"/\";\r\n\r\n\t\t//--\r\n\t\t//-- SET WEBSERVER PATH\r\n\t\t$httptype = \"http://\";\r\n\t\tif(isset($_SERVER['HTTPS']))\r\n\t\t{\r\n\t\t\tif($_SERVER['HTTPS']==\"on\")\r\n\t\t\t\t$httptype = \"https://\";\r\n\t\t}\r\n\t\t$_SESSION[\"www_portalroot\"] = $httptype. $_SESSION[\"server_name\"] . \":\" . $_SESSION[\"server_port\"] . $app_path;\r\n\r\n\r\n\t\t$_SESSION[\"app_path\"] = $app_path;\r\n\t\t$_SESSION[\"sessiontimeout\"] = $timeout;\r\n\t\t$_SESSION[\"connector_instance\"] = $instance_name;\r\n\t\t$_SESSION[\"connector_password\"] = base64_encode($instance_name);\r\n\r\n\r\n\t}", "title": "" }, { "docid": "816e66d7ccaf82e2aca07be3eaf04553", "score": "0.5527166", "text": "function setup_session() {\n\tif (!isset($_SESSION)) session_start();\n\t// If a new session is needed\n\tif (isset($_POST['la_name']) && $_POST['la_name'] != \"\") {\n\t\tunset($_SESSION);\n\t\tsession_destroy();\n\t\tsession_start();\n\t}\n\n\tset_default($_SESSION['count'], 0);\n\t$_SESSION['count']++;\n\t$_SESSION['time'] = time();\n\tset_default ( $_SESSION['identity'], array(\n\t\t'ID'\t\t=> '',\n\t\t'name'\t\t=> '',\n\t\t'email'\t\t=> '',\n\t\t'language' \t=> '',\n\t\t'level'\t\t=> ''\n\t));\n}", "title": "" }, { "docid": "15bf5c323f4f3bc8c52325733e51d269", "score": "0.55166656", "text": "private function setSession()\n\t{\n\t\t$_SESSION['token'] = $this->response['token'][0];\n\t\t$_SESSION['data'] = $this->response['data'][0];\n\t}", "title": "" }, { "docid": "5dba095ad351553819b2466d412659d3", "score": "0.5496378", "text": "function session_establish($parms,$remember_me=false)\r\n\t{\r\n\r\n\t\tforeach ( $parms as $k => $v )\r\n\t\t{\r\n\t\t\t$_SESSION['USER'][$k] = $v;\r\n\t\t}\r\n\r\n\t\tif ( $remember_me )\r\n\t\t{\r\n\t\t\tsession_remember_me(myuid());\r\n\t\t}\r\n\r\n\t\t$_SESSION['is_logged_in'] = time();\r\n\r\n\t\tsession_create_new_secret();\r\n\r\n\t}", "title": "" }, { "docid": "9464f831a6572dc5ea2e85ecb128589a", "score": "0.54930955", "text": "public function create()\n {\n if (PHP_SESSION_ACTIVE !== session_status()) {\n session_start();\n }\n }", "title": "" }, { "docid": "145578c304c877ba265eb7d755cf40f3", "score": "0.54929775", "text": "private static function getSessionData()\n\t{\n\t\t//get users time card and store in session data, removing because no task activities are generated on the web so time entries should not be used.\n\t\t// $timeCardResponse = BaseController::executeGetRequest('time-card%2Fget-my-card');\n\t\t// yii::trace('Get Card Response ' . $timeCardResponse);\n\t\t// $userTimeCard = json_decode($timeCardResponse, true);\n\t\t// if(is_array($userTimeCard) && array_key_exists('TimeCardID', $userTimeCard))\n\t\t// {\n\t\t\t// yii::trace('Time Card ID ' . $userTimeCard['TimeCardID']);\n\t\t\t// Yii::$app->session->set('userTimeCard', $userTimeCard['TimeCardID']);\n\t\t// }\n\t\t\n\t\t//get web dropdowns and store in sesssion data\n\t\t$dropdownResponse = BaseController::executeGetRequest('dropdown%2Fget-dropdowns&filter=Web', Constants::API_VERSION_3);\n\t\t$dropdowns = json_decode($dropdownResponse, true);\n\t\tif(is_array($dropdowns) && array_key_exists('Dropdowns', $dropdowns))\n\t\t{\n\t\t\tYii::$app->session->set('webDropDowns', $dropdowns['Dropdowns']);\n\t\t}\n\t}", "title": "" }, { "docid": "84e5268f4f8072c465139f7ae5cb7ec2", "score": "0.5486344", "text": "function Session()\n {\n\n $this->time = time();\n\n $this->startSession();\n\n }", "title": "" }, { "docid": "a0b404a6b703dc9cae676bc2ea48c4dc", "score": "0.5486231", "text": "public function startSession()\n {\n if(session_status() == PHP_SESSION_NONE)\n {\n // Start the session\n session_start();\n\n // Regenerate the identifiers\n $this->setSessionSalt();\n $this->setSessionFingerprint();\n $this->regenerateID();\n\n // Commit the identifiers to the in-memory session object\n $this->superGlobalRepository()->setSession();\n }\n }", "title": "" }, { "docid": "ba2d8d4299f2b13995ceb4a9716f62d6", "score": "0.54855293", "text": "public function session() {\n\t\t\n\t\t$this -> _jsonResponse(array(\n\t\t\t'user_id'=> SessionService::read('user_id'),\n\t\t\t'is_loggedin'=> SessionService::read('is_loggedin'),\n\t\t\t'session_id' => SessionService::getID()\n\t\t));\n\t\t\n\t\texit();\n\t\t\n\t}", "title": "" }, { "docid": "0b0deee236808b9c2df17957bb88b9d0", "score": "0.5482661", "text": "static function initLogin() {\n $session = new CHttpSession;\n $session->open();\n if (!isset($session['UID']) || empty($session['UID'])) {\n return false;\n }\n $session['RandomNumner'] = $rand_number = rand(999, 9999999);\n $session->regenerateID();\n $RID = $session['UID'];\n $token = 22;\n $ua = $_SERVER['HTTP_USER_AGENT'];\n $ip = $_SERVER['REMOTE_ADDR'];\n $date = date(\"D-M-Y\");\n $hash = $token . \"_\" . $date . \"-\" . $ua . \"_\" . $ip . \"-\" . $RID . \"_\" . $rand_number;\n $hash = hash_hmac(\"sha1\", $hash, \"swcs_cms\");\n $expire = time() + 60 * 60 * 3; //Cookie valid for 3 hours\n $cOptions = array(\"secure\" => false, \"httpOnly\" => false, 'expire' => $expire); \n Yii::app()->request->cookies['swcscms_cookie'] = new CHttpCookie(\"swcscms_cookie\", $hash, $cOptions);\n }", "title": "" }, { "docid": "7b6f7449b389e8eb13fcf67fc7ab1823", "score": "0.5481008", "text": "private function doStartSession()\n {\n session_start();\n }", "title": "" }, { "docid": "97c28a184a8e9cb207ccefeb16746b5f", "score": "0.5469134", "text": "public function init()\n {\n \t$this->session = new Zend_Session_Namespace('login');\n\n }", "title": "" }, { "docid": "97c28a184a8e9cb207ccefeb16746b5f", "score": "0.5469134", "text": "public function init()\n {\n \t$this->session = new Zend_Session_Namespace('login');\n\n }", "title": "" }, { "docid": "30b7357ed5f406fc3a4efec35d38802a", "score": "0.5468547", "text": "protected function _init() {\n\t\tsession_write_close();\n\n\t\tif (headers_sent()) {\n\t\t\t$_SESSION = (empty($_SESSION)) ?: array();\n\t\t} elseif (!isset($_SESSION)) {\n\t\t\tsession_cache_limiter(\"nocache\");\n\t\t}\n\t\tsession_start();\n\n\t\tforeach ($this->_defaults as $key => $config) {\n\t\t\tif (isset($this->_config[$key])) {\n\t\t\t\tini_set(\"session.$key\", $this->_config[$key]);\n\t\t\t}\n\t\t}\n\t\t$_SESSION['_timestamp'] = time();\n\t}", "title": "" }, { "docid": "71664a004768737e115971787a6d0886", "score": "0.5459033", "text": "public function openSession() {\n if (!is_dir(pdoMap::$cachePath)) {\n mkdir(pdoMap::$cachePath);\n }\n try {\n $this->hash = self::file_fetch($this->key.'hash'); \n } catch(Exception $ex) {\n $this->hash = array(); \n }\n $this->buffer = array();\n }", "title": "" }, { "docid": "0713adb859652e43ffbdd2e272262c60", "score": "0.5458779", "text": "public function session_game(){\n\n # get the user information\n $userInfo = self::getRemoteUserInfo();\n\n # block cronjobs from being stored in database\n if($userInfo['remote_ip'] == 'localhost')\n return;\n\n # check the session\n $sessionCheck = self::checkSession($userInfo); \n \n }", "title": "" }, { "docid": "2ce614f67130a096536909e91061e37f", "score": "0.5455967", "text": "private function accessSession(){\n if ( !$this->access){\n session_cache_limiter(\"public\");\n session_name('maria');\n session_start();\n $this->setResult(new ArrayObject(\n $_SESSION, ArrayObject::STD_PROP_LIST));\n $this->access =TRUE;\n }\n }", "title": "" }, { "docid": "4183a7d4fea835e297788f92a81ed842", "score": "0.5455717", "text": "public function getActiveSessions();", "title": "" }, { "docid": "9a9a55686a6fce4c94d355368d02698f", "score": "0.54495513", "text": "public function auto_login(int $userid)\n{ \n\n // Create session\n //app::set_area('members');\n return $this->create_session($userid);\n\n}", "title": "" }, { "docid": "30f05ae99b67f98cfac24568f1c20d9b", "score": "0.5449116", "text": "public function getSessionManager();", "title": "" }, { "docid": "3134317501e86c8bc748f8493012b969", "score": "0.5444202", "text": "public function __construct() {\n $this->_lifetime = Config::get('session_lifetime');\n $this->open();\n }", "title": "" }, { "docid": "74d3d561edf197e1161be00e438270eb", "score": "0.54392564", "text": "public function addSession() {\n // Instanciate a new Sessions object, and sets some values\n $newSession = (new Sessions())\n ->title(\"Doctrine et PHP\")\n ->availablePlaces(12);\n \n // Get the instance of my own EntityManager\n $em = \\Core\\ORM\\EntityManager::getEntityManager()->getManager();\n \n // Call persistence\n $em->persist($newSession);\n \n // Commit the result\n $em->flush();\n \n echo \"Session successfully created with the id : \" . $newSession->getId();\n }", "title": "" }, { "docid": "d7a9c9d1e2a1abe9212af55cbcb24ef9", "score": "0.5436344", "text": "public function storeSessionTokenInRegistry() {}", "title": "" }, { "docid": "535194d03a9f50f2f72e338a2c67c243", "score": "0.5435773", "text": "public function init()\n\t{\n\t\t$this->_paymentTypeSession = new Zend_Session_Namespace('paymentType');\n\t\t/* $this->_amountSession = new Zend_Session_Namespace('depositAmount');\n\t\t$this->_paymentTypeSession = new Zend_Session_Namespace('paymentType');\n\t\t//$this->_visitIndexPage = new Zend_Session_Namespace('visitIndexPage');\n\t\t$this->_bankCodeSession = new Zend_Session_Namespace('bankCode');\n\t\t$this->_prevAmountSess = new Zend_Session_Namespace('prevAmount');\n\t\t$this->_prevPaymentTypeSess = new Zend_Session_Namespace('prevPaymentType');\n\t\t\n\t\t$this->_playerAddressSess = new Zend_Session_Namespace('playerAddress');\n\t\t$this->_playerContactSess = new Zend_Session_Namespace('playerContact');\n\t\t$this->_playerPinCodeSess = new Zend_Session_Namespace('playerPinCode');\n\t\t$this->_playerCitySess = new Zend_Session_Namespace('playerCity');\n\n\t\t$this->_nameSess = new Zend_Session_Namespace('name');\n\t\t$this->_contactSess = new Zend_Session_Namespace('contact');\n\t\t$this->_emailSess = new Zend_Session_Namespace('email');\n\t\t$this->_addressSess = new Zend_Session_Namespace('address');\n $this->_citySess = new Zend_Session_Namespace('city');\n $this->_stateSess = new Zend_Session_Namespace('state');\n $this->_pinSess = new Zend_Session_Namespace('pin');\n\n\t\t$this->_firstNameSess = new Zend_Session_Namespace('firstName');\n\t\t$this->_lastNameSess = new Zend_Session_Namespace('lastName');\n\t\t$this->_sexSess = new Zend_Session_Namespace('sex');\n\t\t$this->_dobSess = new Zend_Session_Namespace('dob');\n\t\t\n\t\t$this->_molSess = new Zend_Session_Namespace('mol');\n\t\t$this->_schemeSess = new Zend_Session_Namespace('schemeId'); */\n\t}", "title": "" }, { "docid": "861536800df1f849f876cfc29b4b11c6", "score": "0.5433781", "text": "private function createSession($id) {\n \n /* First, we need to get some info */\n $ip = $_SERVER[\"REMOTE_ADDR\"];\n $time = time();\n $random_num = mt_rand();\n \n /* Insert the data about this session into the database */\n $this->db->query(\"INSERT INTO confy_\" . $this->url . \"_sessions (id, user_id, ip, time, random_num) \n VALUES ('', '\" . $id . \"', '\" . $ip . \"', '\" . $time . \"', '\" . $random_num . \"')\");\n \n session_start();\n\n /* Save the exact same data to the SESSION variable */ \n $_SESSION[$this->url . '_user_logged'] = $id;\n $_SESSION[$this->url . '_user_ip'] = $ip;\n $_SESSION[$this->url . '_user_time'] = $time;\n $_SESSION[$this->url . '_user_random_num'] = $random_num; \n \n /* Set the user_id private variable */\n $this->user_id = $id; \n \n }", "title": "" }, { "docid": "3339486343a7876e0d96d3a77937ca1c", "score": "0.542433", "text": "public function open($session_id);", "title": "" }, { "docid": "f1ccc662d63eb0cdd50b383712ba3aaa", "score": "0.5422307", "text": "private function populateSession()\n {\n session_regenerate_id();\n $_SESSION['auth'] = 1;\n $_SESSION['userid'] = $this->userData['userid'];\n $_SESSION['team_id'] = $this->userData['team'];\n // Used in the menu\n $_SESSION['username'] = $this->userData['username'];\n // load permissions\n $perm_sql = \"SELECT * FROM groups WHERE group_id = :group_id LIMIT 1\";\n $perm_req = $this->pdo->prepare($perm_sql);\n $perm_req->bindParam(':group_id', $this->userData['usergroup']);\n $perm_req->execute();\n $group = $perm_req->fetch(\\PDO::FETCH_ASSOC);\n\n $_SESSION['is_admin'] = $group['is_admin'];\n $_SESSION['is_sysadmin'] = $group['is_sysadmin'];\n\n // PREFS\n $_SESSION['prefs'] = array(\n 'display' => $this->userData['display'],\n 'order' => $this->userData['order_by'],\n 'sort' => $this->userData['sort_by'],\n 'limit' => $this->userData['limit_nb'],\n 'shortcuts' => array('create' => $this->userData['sc_create'], 'edit' => $this->userData['sc_edit'], 'submit' => $this->userData['sc_submit'], 'todo' => $this->userData['sc_todo']),\n 'lang' => $this->userData['lang'],\n 'close_warning' => intval($this->userData['close_warning']),\n 'chem_editor' => intval($this->userData['chem_editor']));\n // Make a unique token and store it in sql AND cookie\n $this->token = md5(uniqid(rand(), true));\n // and SESSION\n $_SESSION['token'] = $this->token;\n session_write_close();\n }", "title": "" }, { "docid": "8804c422628b142363059c81ab33596c", "score": "0.5421074", "text": "public function init(){\n\t\tif(!isset(Yii::app()->session['session'])){\n\t\t\t/*membuat session dengan nama 'cart_code' dan \n\t\t\t *diberi nilai berupa unik kode*/\n\t\t\tYii::app()->session['session'] = $this -> getUniqueCode();\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "3c4da5aed758e90ad9c87546693a0381", "score": "0.5420042", "text": "function getSession();", "title": "" }, { "docid": "39cc8cbccd6cbebac91454de8f8fc1bd", "score": "0.54191273", "text": "public function refreshSession() {}", "title": "" }, { "docid": "794851b50a23c3a5cd555a98e16f931b", "score": "0.54157716", "text": "public function init()\n {\n $this->session = new \\Zend_Session_Namespace(\"Scheduler\");\n }", "title": "" }, { "docid": "c9503df0d7c569bad61f367051a2a7e5", "score": "0.5413487", "text": "public function __construct()\n {\n\n if(isset($_SERVER['HTTP_X_SID']))\n {\n session_id($_SERVER['HTTP_X_SID']);\n }\n\t\telse if(isset($_GET['_sid']))\n {\n session_id($_GET['_sid']);\n }\n\n // Set cookie expiration time to browser's session\n\n session_set_cookie_params(0);\t\t\t\t\t \n // Start session handling\n\n session_start();\n\n // Create the namespace\n\n if(empty($_SESSION[self::SESSION_NAMESPACE]))\n {\n $_SESSION[self::SESSION_NAMESPACE] = array();\n }\n }", "title": "" }, { "docid": "d3ed5b996f9d1baf0ee1f532443a886e", "score": "0.5408142", "text": "public function createSessionId() {}", "title": "" }, { "docid": "dd66760922e9de29136198b2b1a0f149", "score": "0.53982943", "text": "public function OpenSession()\n {\n if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($this->username)) {\n header('WWW-Authenticate: Basic realm=\"f-keeper.ru\"');\n header('HTTP/1.0 401 Unauthorized');\n header('Warning: WSS security in not provided in SOAP header');\n $this->save_action(__FUNCTION__, 0, 0, 'Auth error HTTP/1.0 401 Unauthorized', $this->ip);\n } else {\n if (!$acc = ApiAccess::find()->where('login = :username and now() between fd and td', [':username' => $this->username])->one()) {\n $this->save_action(__FUNCTION__, 0, 0, 'Wrong login', $this->ip);\n return 'Auth error. Login is not found.';\n };\n\n if (Yii::$app->getSecurity()->validatePassword($this->password, $acc->password)) {\n\n $sessionId = Yii::$app->getSecurity()->generateRandomString();\n $oldsess = ApiSession::find()->orderBy('fid DESC')->one();\n $sess = new ApiSession();\n\n if ($oldsess) {\n $sess->fid = $oldsess->fid + 1;\n } else {\n $sess->fid = 1;\n }\n\n $sess->token = $sessionId;\n $sess->acc = $acc->fid;\n $sess->nonce = $this->nonce;\n $sess->fd = gmdate('Y-m-d H:i:s');\n $sess->td = gmdate('Y-m-d H:i:s', strtotime('+1 day'));\n $sess->ver = 1;\n $sess->status = 1;\n $sess->ip = $this->ip;\n $sess->extimefrom = gmdate('Y-m-d H:i:s');\n\n if (!$sess->save()) {\n return $sess->errors;\n } else {\n $this->save_action(__FUNCTION__, $sess->token, 1, 'OK', $this->ip);\n return 'OK_SOPENED:' . $sess->token;\n }\n } else {\n $this->save_action(__FUNCTION__, 0, 0, 'Wrong password', $this->ip);\n return 'Auth error. Password is not correct.';\n }\n }\n }", "title": "" }, { "docid": "c5732176faed5085b109c8a2f6c1e3e0", "score": "0.53972787", "text": "public static function init()\n {\n session_start();\n\n if(isset($_SESSION['tiUserId'])) {\n $id = $_SESSION['tiUserId'];\n if($id !== null) {\n self::user('reload');\n\n if(!self::loggedIn()) {\n self::clearSessionData();\n }\n\n if(self::switched()) {\n self::realUser('reload');\n }\n }\n }\n }", "title": "" }, { "docid": "7f6ce8faf50b7a984cc9123ed44c00fd", "score": "0.5397027", "text": "protected function setupMinkSession()\n {\n $this->minkBaseUrl = getenv('DTT_BASE_URL') ?: 'http://localhost:8000';\n\n $driver = $this->getDriverInstance();\n $session= new Session($driver);\n $this->mink = new Mink([\n 'default' => $session,\n ]);\n $this->mink->setDefaultSessionName('default');\n $session->start();\n\n // Create the artifacts directory if necessary (not functional yet).\n $output_dir = getenv('DTT_OUTPUT_DIR');\n if ($output_dir && !is_dir($output_dir)) {\n mkdir($output_dir, 0777, true);\n }\n\n // According to the W3C WebDriver specification a cookie can only be set if\n // the cookie domain is equal to the domain of the active document. When the\n // browser starts up the active document is not our domain but 'about:blank'\n // or similar. To be able to set our User-Agent and Xdebug cookies at the\n // start of the test we now do a request to the front page so the active\n // document matches the domain.\n // @see https://w3c.github.io/webdriver/webdriver-spec.html#add-cookie\n // @see https://www.w3.org/Bugs/Public/show_bug.cgi?id=20975\n $this->visit($this->minkBaseUrl . '/core/misc/druplicon.png');\n }", "title": "" }, { "docid": "2824466e96572c24e1b4dc1fd13c8d0c", "score": "0.53954", "text": "private function _startSession() {\n\t\tsession_start();\n\t\t\n\t\t// Assign framework variables if needed\n\t\tif (!isset($_SESSION[Config::SESSION_PREFIX.'inited'])) {\n\t\t\t$this->_assignFrameworkVars();\n\t\t}\n\t}", "title": "" }, { "docid": "caf8250d61ff62c1135ac1661d39fb44", "score": "0.5394893", "text": "public function GenerateSessions($sessions)\n\t{\n\t\t\n\t\tforeach ($sessions as $key => $obj)\n\t\t{\n\t\t\t\n\t\t\t$_SESSION[$key] = $obj;\n\t\t\t\n\t\t}\t\t\n\t\t\n\t}", "title": "" }, { "docid": "5739b7f9254b659057e55c44d570e1b0", "score": "0.53847075", "text": "function Session(){\r\n $this->time = time();\r\n $this->startSession();\r\n }", "title": "" }, { "docid": "fed9798dc977fa9c4af987e98f8a6f5a", "score": "0.538278", "text": "public static function start ()\n\t{\n\t\tini_set('session.use_cookies', 1);\n\t\tini_set('session.use_only_cookies', 1);\n\t\tini_set('session.referer_check', '');\n\t\tini_set('session.use_trans_sid', 0);\n\t\tsession_set_save_handler(\n\t\t\tarray('prom_session', 's_open'),\n\t\t\tarray('prom_session', 's_close'),\n\t\t\tarray('prom_session', 's_read'),\n\t\t\tarray('prom_session', 's_write'),\n\t\t\tarray('prom_session', 's_destroy'),\n\t\t\tarray('prom_session', 's_gc')\n\t\t);\n\t\tsession_name(SESSION_COOKIE);\n\t\tsession_set_cookie_params(0, parse_url(URL_BASE, PHP_URL_PATH), '.'. parse_url(URL_BASE, PHP_URL_HOST));\n\t\tsession_start();\n\n\t\t// need this so it happens before $db goes away\n\t\tregister_shutdown_function('session_write_close');\n\t}", "title": "" }, { "docid": "7db6a3f1e90d4b0fd6a34ca1c1c92877", "score": "0.5380587", "text": "public function getDefaultSessionManager();", "title": "" }, { "docid": "be559db4f41bf462fbe29040d3270fd2", "score": "0.53612703", "text": "public function __construct() {\n\t\n\t\t# determine the proper cookie name\n\t\t$cn = element(cache::get('settings','general'), 'cookie_name', '_momentum_session');\n\t\tdefine('EVOLUTION_SESSION_COOKIE', $cn);\n\t\n\t\t# link the cookie\n\t\t$this->cookie = &$_COOKIE[$cn];\n\t\t\n\t\t# check to see if the browser is passing a session key and if not, create a new session\n\t\tif(!($key = $this->_get_key())) {\n\t\t\t$s = $this->_create();\n\t\t} else {\n\t\t\t# we can urlencode the key because it ought to be all alphanumeric characters\n\t\t\t$key = urlencode($key);\n\t\t\t\n\t\t\t# make sure the session key being passed is valid\n\t\t\t$s = e::db()->select('_sessions', \"WHERE `key` = '$key'\")->row();\n\t\t\tif(!$s) {\n\t\t\t\t# otherwise create the session\n\t\t\t\t$s = $this->_create();\n\t\t\t}\n\t\t}\n\t\t\n\t\t# now that we have a valid session, run the environment initialize\n\t\t$this->_init($s);\n\t\t\n\t\t/**\n\t\t * WARNING THIS IS A HACK AND SHOULD NOT BE PERMANENT\n\t\t * @todo make this an event plugin\t\n\t\t * @author David Boskovic\n\t\t */\n\t\t$c = cache::get('settings','general');\n\t\tif($c['wildfire'])\n\t\t\t$this->_init_wildfire();\n\t}", "title": "" } ]
f833cb0e12323c7984bfd943b48cab5d
Create a new Model Finder instance
[ { "docid": "d4899830670b3048d4166f6477d61345", "score": "0.0", "text": "public function __construct(){\n }", "title": "" } ]
[ { "docid": "4b79735dae0d676048cfc2af609036b4", "score": "0.7350132", "text": "private function createFinder()\n {\n return new Finder;\n }", "title": "" }, { "docid": "2054c95f8aa858dbddbec2fe09bf4c95", "score": "0.70842034", "text": "public static function createFinder()\n\t{\n\t\treturn Finder::getInstance();\n\t}", "title": "" }, { "docid": "6f45066ed773b3c2db5e5bbb7a5c8362", "score": "0.67818797", "text": "function find() : Finder\n {\n return new Finder();\n }", "title": "" }, { "docid": "a34445ad8ca871be873a1f4674543654", "score": "0.6528107", "text": "protected function createFinder()\n {\n return new SymfonyFinder();\n }", "title": "" }, { "docid": "3d029a77c69d487a19dc3152712e3bc0", "score": "0.62574023", "text": "public function createModel() {\n\t\t\t$model = \"\\\\models\\\\\".$this->prefix;\n\t\t\tif(class_exists($model)) {\n\t\t\t\treturn new $model;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//error404(); // Model not found.\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8a82ea17145fd20ba38d7c3075f740ae", "score": "0.6194181", "text": "protected function make()\n {\n return new $this->model;\n }", "title": "" }, { "docid": "c490f5833a9d77d38753a62954459880", "score": "0.61533695", "text": "static public function create() {\r\n $model = new static::$modelName;\r\n return $model;\r\n }", "title": "" }, { "docid": "0aab12855616b43c75ec5ffb89644ff7", "score": "0.6143599", "text": "abstract public function modelFactory();", "title": "" }, { "docid": "a88293270f421f6c59fc09be41004a0a", "score": "0.6141115", "text": "public function createFinder()\n {\n return new FileFinder('resource');\n }", "title": "" }, { "docid": "3eda1e2705d6cfa3cad0f36caf9cd8e8", "score": "0.61072487", "text": "public function __construct() \n {\n $this->instance = new MomondoFinder;\n }", "title": "" }, { "docid": "1a77348c7f0a6389f53bcd3f64fc20d9", "score": "0.59394383", "text": "public function __construct($finder) {\n $this->finder= $finder;\n }", "title": "" }, { "docid": "59c77956c4c8a9e55b0411b6c838c3ff", "score": "0.58762103", "text": "protected function constructModel()\n {\n $modelName = static::getModelName();\n return new $modelName($this->container);\n }", "title": "" }, { "docid": "d1b419d8592fb2afa0bac872163c7fa4", "score": "0.58343387", "text": "protected function createFactory()\n {\n $model = Str::studly(class_basename($this->argument('model')));\n\n $this->call('make:api:factory', [\n 'model' => \"{$model}\",\n '--force' => $this->option('force')\n ]);\n }", "title": "" }, { "docid": "69d09f8bdce7efb9b315c857ed35471c", "score": "0.5829164", "text": "public function __construct()\n {\n $model = $this->model;\n $this->instance = new $model();\n }", "title": "" }, { "docid": "36ec2b01329c4b0728e5d849ca3b2acb", "score": "0.58055127", "text": "public function finder() {\n return new OctaFinder();\n }", "title": "" }, { "docid": "7ef6e7dd83b05372f00b7c9493a3ea76", "score": "0.5795603", "text": "public function createModel()\n {\n $class = $this->model;\n\n return new $class;\n }", "title": "" }, { "docid": "983ddb695bc2e4e0b9e90e6fade5c062", "score": "0.5794324", "text": "public function createModel()\n {\n $className = $this->modelClassName;\n return new $className();\n }", "title": "" }, { "docid": "9cdf4c610be32c41ea0521c5f2035927", "score": "0.5787402", "text": "public function createModel()\n\t{\n\t\t$class = '\\\\'.ltrim($this->model, '\\\\');\n\n\t\treturn new $class;\n\t}", "title": "" }, { "docid": "4d9756d2f0addb4a530655b999ab46f8", "score": "0.5787069", "text": "public function createModel()\n {\n $class = '\\\\' . ltrim($this->model, '\\\\');\n\n return new $class;\n }", "title": "" }, { "docid": "ab31d9eae2dc1c321c3581d76aae18d1", "score": "0.5772867", "text": "public function __construct()\r\n {\r\n $this->model = new $this->modelName();\r\n }", "title": "" }, { "docid": "5564cd3fe3daf079c51bcd4d20f6d38d", "score": "0.576304", "text": "public static function factory($model, $data = array())\n\t{\n\t\tif ( ! self::$mongo instanceof Mongo)\n\t\t{\n\t\t\t$config = Kohana::$config->load('Mundo');\n\n\t\t\t// Connect to the database\n\t\t\tself::$mongo = new Mongo($config->servers, $config->connect_options);\n\n\t\t\t// Connect to the default DB\n\t\t\tself::$db = self::$mongo->{$config->database};\n\t\t}\n\n\t\t// String typecast\n\t\t$model = (string) $model;\n\n\t\t// Ensure we can specify model names such as 'account/user' meaning \n\t\t// a user model in the model/account path.\n\t\t$model = str_replace('/', '_', $model);\n\n\t\t// Add the Kohana model prefix\n\t\t$model = 'Model_'.$model;\n\n\t\treturn new $model($data);\n\t}", "title": "" }, { "docid": "dfc5117d93d6de2d98e4ade46d022ffd", "score": "0.5762971", "text": "public function finder();", "title": "" }, { "docid": "2161d385a6a4f179164e3090b604d737", "score": "0.57627875", "text": "private function modelInstance(){\r\n //$class = $this->getModel();\r\n //return new $class();\r\n }", "title": "" }, { "docid": "2882618fa22559182cbcd20ffe0cdbb7", "score": "0.57385886", "text": "public function createModel();", "title": "" }, { "docid": "078274e1dbbae677f81408d081ef5907", "score": "0.57357126", "text": "public static function factory()\n {\n\n $connection = new Connection();\n $session = new Session();\n $fileSystem = new FileSystem();\n $filter = new Filter();\n $selector = new Selector();\n\n return new self($connection , $session , $fileSystem , $filter , $selector);\n }", "title": "" }, { "docid": "72f9359736d17b1d16419cc0000ef25e", "score": "0.5731086", "text": "public function createModel()\n {\n $class = '\\\\'.ltrim($this->model, '\\\\');\n\n return new $class();\n }", "title": "" }, { "docid": "ed447f035e94d1085ed9311ffd66d940", "score": "0.57037324", "text": "public function createModel()\n {\n $class = '\\\\'.ltrim($this->model, '\\\\');\n\n return new $class;\n }", "title": "" }, { "docid": "541c58dff5210c0ff05e9e66903a9550", "score": "0.570359", "text": "public static function fromModel(...$parameters):self{\n return self::make(...$parameters);\n }", "title": "" }, { "docid": "95410b74ed2b4a96591fbe2805a1867b", "score": "0.5702821", "text": "public function setFinder(Finder $finder);", "title": "" }, { "docid": "4cfa0927c6d9116e3f79cb118eeea31d", "score": "0.57014483", "text": "protected function resolver()\n {\n $model = Arr::get($this->config, 'model', $this->name);\n return $this->repository->make($model)->newInstance();\n }", "title": "" }, { "docid": "e6f2cfefd60b7ef24b98572c5c1f0e1d", "score": "0.5690164", "text": "protected function getNewInstance()\n {\n $model = $this->modelName;\n return new $model;\n }", "title": "" }, { "docid": "0737dd5226c02011314dc7c11e2432c0", "score": "0.56753135", "text": "function model($model) {\n require_once('app/models/' . strtolower($model) . '.php');\n return new $model;\n }", "title": "" }, { "docid": "b03c37e4000fab2915601ce27474b5ac", "score": "0.5660723", "text": "public function createModelQuery(): ModelQueryFactory\n {\n return $this->createQueryFactory($this->getConnection())\n ->model($this);\n }", "title": "" }, { "docid": "2171a068df5a82d350d51f81ebc8b3b8", "score": "0.56564444", "text": "abstract public function getFactoryObject(Loader\\FinderInterface $finder);", "title": "" }, { "docid": "b43b9073baf0d5f619cced79ae268973", "score": "0.5614586", "text": "public function create($modelInstance);", "title": "" }, { "docid": "6c6d11eb71b21a254f43e0f9702b5bca", "score": "0.55990916", "text": "public function __construct()\n {\n $this->makeModel();\n }", "title": "" }, { "docid": "b443a476e08a3cb714facb7d6d995c2a", "score": "0.5594181", "text": "public static function model()\r\n {\r\n return new self();\r\n }", "title": "" }, { "docid": "5de7407586c4602de14ca02cfa489e9c", "score": "0.55909985", "text": "private function create()\n {\n $this->entity = $this->model();\n }", "title": "" }, { "docid": "5bab41e6cf67f60f694e30af91890c7a", "score": "0.55824023", "text": "public function factory(array $data = [])\n {\n $model = $this->newQuery()->getModel()->newInstance();\n\n $this->fill($model, $data);\n\n return $model;\n }", "title": "" }, { "docid": "ace286a33109ef56643eaa09bf852c38", "score": "0.5568618", "text": "public function newModel() {\n return $this->container->get('model');\n }", "title": "" }, { "docid": "5608176cd670d7e1c5b8d06877e61a49", "score": "0.5564344", "text": "public static function buildModel($action = 'find', $name, array $args)\n {\n $name = str_replace($action, '', $name);\n preg_match('/By(.+)/', $name, $matches);\n\n if (empty($matches) && $args[0] instanceof \\Modler\\Model) {\n $model = $name;\n $data = $args[0]->toArray();\n } else {\n $property = lcfirst($matches[1]);\n $model = str_replace($matches[0], '', $name);\n $data = array($property => $args[0]);\n }\n\n $modelNs = '\\\\Psecio\\\\Gatekeeper\\\\'.$model.'Model';\n if (!class_exists($modelNs)) {\n throw new Exception\\ModelNotFoundException('Model type '.$model.' could not be found');\n }\n\n $instance = new $modelNs(self::$datasource);\n $instance = self::$datasource->find($instance, $data);\n return $instance;\n }", "title": "" }, { "docid": "b57a739afe7d1d2953a4dc929524336b", "score": "0.5557138", "text": "public function create()\n {\n $form = \\FormBuilder::create(FindForm::class, [\n 'method' => 'POST',\n 'url' => route('find.result')\n ]);\n return view('find.create', compact('form'));\n }", "title": "" }, { "docid": "6091c503f8b9e0a428cb7b2c10dc63dc", "score": "0.55536795", "text": "public function newSearchModel() {\n\t\t$model = parent::newSearchModel();\n\t\t$activeContexts = $this->getActiveContexts();\n\t\tforeach ($activeContexts as $activeContext) {\n\t\t\t$foreignKeyName = $activeContext['foreignKeyName'];\n\t\t\t$model->$foreignKeyName = $activeContext['model']->getPrimaryKey();\n\t\t}\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "82db62fe5599a3e1b7c39976bf0ff414", "score": "0.5534914", "text": "public function __construct()\n {\n $class = $this->model();\n $this->model = new $class;\n }", "title": "" }, { "docid": "606d46b26c9c5dc82561bd5e37bb619b", "score": "0.55142695", "text": "protected function find() {\n return $this->modelClass->find(\n $this->createFilter()\n );\n }", "title": "" }, { "docid": "53ba8ea55b31d99e321f3cbc214a0306", "score": "0.5513154", "text": "public static function model() {\n\t\t$reflection = new ReflectionClass( static::class );\n\t\treturn $reflection->newInstanceArgs( func_get_args() );\n\t}", "title": "" }, { "docid": "35260b0b592cccf2813edf220232c7e3", "score": "0.549505", "text": "public function setFinder($finder) {\n $this->finder = $finder;\n return $this;\n }", "title": "" }, { "docid": "6c94a4260f39be0588ba3b47fb27e5e2", "score": "0.5488329", "text": "protected function factory()\n {\n factory(Position::class, count($this->titles))->create()->each(function($model) {\n $model->save();\n });\n }", "title": "" }, { "docid": "eaaf15e827a3ca49a3604bf630c577ec", "score": "0.5486553", "text": "function create() {\n\t\tglobal $wgDBtype, $wgDBmysql4, $wgSearchType;\n\t\tif( $wgSearchType ) {\n\t\t\t$class = $wgSearchType;\n\t\t} elseif( $wgDBtype == 'mysql' ) {\n\t\t\tif( $wgDBmysql4 ) {\n\t\t\t\t$class = 'SearchMySQL4';\n\t\t\t\trequire_once( 'SearchMySQL4.php' );\n\t\t\t} else {\n\t\t\t\t$class = 'SearchMysql3';\n\t\t\t\trequire_once( 'SearchMySQL3.php' );\n\t\t\t}\n\t\t} else if ( $wgDBtype == 'PostgreSQL' ) {\n\t\t\t$class = 'SearchTsearch2';\n\t\t\trequire_once( 'SearchTsearch2.php' );\n\t\t} else {\n\t\t\t$class = 'SearchEngineDummy';\n\t\t}\n\t\t$search = new $class( wfGetDB( DB_SLAVE ) );\n\t\t$search->setLimitOffset(0,0);\n\t\treturn $search;\n\t}", "title": "" }, { "docid": "62a6a4d31ec08fb31c68a9ad46e1b106", "score": "0.54734296", "text": "public static function newModel(): self\n {\n return new self();\n }", "title": "" }, { "docid": "a9371ee25f63a251d9001cbfeb72a398", "score": "0.54663825", "text": "public function __construct()\n {\n $this->primitive = new Find();\n }", "title": "" }, { "docid": "7873d6c96bf6b5f50bfd0c5a726170c1", "score": "0.54660773", "text": "protected function newModelInstance()\n {\n if (is_null($this->fullModelClassName)) {\n $this->fullModelClassName = $this->model();\n }\n\n return new $this->fullModelClassName;\n }", "title": "" }, { "docid": "afde4a0f9754888993914bf0d2bfed11", "score": "0.54612046", "text": "public static function model()\n {\n $class = get_called_class();\n return new $class(array());\n }", "title": "" }, { "docid": "4fd5eef4074c13eefa8a65879d6cb11a", "score": "0.543811", "text": "public static function for($model)\n {\n return new static($model);\n }", "title": "" }, { "docid": "76b6069cbea9750983c0df368dc38a8a", "score": "0.5409546", "text": "public static function find($id) {\n if(($model = parent::find(__CLASS__, $id))) {\n $model = self::factory($model->type, $model->toArray());\n }\n\n return $model;\n }", "title": "" }, { "docid": "f594b8bfa01a7a8f56884183e33cecb4", "score": "0.54005593", "text": "protected function instanciateModel(array $args = array(), $autoSet = TRUE) {\n if ($this->__isset('model_sys_id')) {\n $instance = model($this->modelSysId);\n if ($autoSet) {\n $this->setModel($instance);\n }\n\n return $instance;\n }\n }", "title": "" }, { "docid": "57c908f06637e9318521d0f11cdbc27b", "score": "0.5400106", "text": "public function newInstance($attributes = [], $exists = false, $requestMethod = null)\n {\n // This method just provides a convenient way for us to generate fresh model\n // instances of this current model. It is particularly useful during the\n // hydration of new objects via the Eloquent query builder instances.\n $model = new static((array) $attributes, $requestMethod);\n\n $model->exists = $exists;\n\n $model->setConnection(\n $this->getConnectionName()\n );\n\n return $model;\n }", "title": "" }, { "docid": "89537e5df33db41570b593891f78f11c", "score": "0.539842", "text": "public function modelFactory()\n {\n return $this->modelFactory;\n }", "title": "" }, { "docid": "37c82abbbe249cfe9cdc97cddfcdda49", "score": "0.5392036", "text": "public static function model() {\n\t\t$class = get_called_class();\n\t\t\n\t\t$inst = new $class(null);\n\t\t\n\t\treturn $inst;\n\t}", "title": "" }, { "docid": "513f388ed68419832827856d8a7bf214", "score": "0.5386941", "text": "protected function createModel()\n {\n $model = $this->argument('model');\n\n $this->call('make:api:model', [\n 'name' => $model,\n '--force' => $this->option('force'),\n '--defaults' => $this->option('defaults'),\n ]);\n }", "title": "" }, { "docid": "ee87eeea2d833889818723753257c5f8", "score": "0.53814244", "text": "public function __construct()\n {\n $this->model = new \\stdClass();\n }", "title": "" }, { "docid": "d39e1fb16300c79fe4eca4281757fe44", "score": "0.537962", "text": "public function make()\n {\n return $this->newDefinitionsModel();\n }", "title": "" }, { "docid": "0bb9cedd793301514cf1aa84e0d21fe4", "score": "0.53776383", "text": "public function __construct()\n {\n $this->model = new Model();\n }", "title": "" }, { "docid": "c9e11f19b3f17a3c37ef20429c2620d2", "score": "0.5367853", "text": "function &create($model_name, $id = null, $path = null)\n\t{\n\t\tif(class_exists($model_name) || model::include_model($model_name, $path))\n\t\t{\n\t\t\tif(class_exists($model_name))\n\t\t\t{\n\t\t\t\t$obj_model = new $model_name($id);\t\n\t\t\t\treturn $obj_model;\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new Exception('Model class \"'.$model_name.'\" does not exist.');\n\t\t}\n\t\telse\n\t\t\tthrow new Exception('Model file ' . $model_name . ' does not exist.');\n\t\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "abeec23174f6de8951763d3853018902", "score": "0.5361938", "text": "public function __construct(){\n $this->filaModel = $this->model('Fila');\n $this->etapaModel = $this->model('Etapa');\n }", "title": "" }, { "docid": "fcfb25b94ac0d28939d07dec6e8802e8", "score": "0.5336309", "text": "public static function factory($name)\n\t{\n\t\t// Add the model prefix\n\t\t$class = 'Model_'.$name;\n\n\t\treturn new $class;\n\t}", "title": "" }, { "docid": "20df59b776d4b4cb58c8fff6660293dc", "score": "0.5334754", "text": "public function createModel(Collection $data): CrudableModel;", "title": "" }, { "docid": "08b6df8e8aab85827e9d95174c0e63ea", "score": "0.53252697", "text": "public function instance( $data = [] )\n {\n return new $this->model( $data );\n }", "title": "" }, { "docid": "2c1e674e86b93cfbaf2f950fffc81b52", "score": "0.53251445", "text": "public function __construct()\n {\n $this->_ENTITIES = Config::get('eloquent_search.search_models');\n }", "title": "" }, { "docid": "ecde32dcc9b9cd10fa1f9060d139c58e", "score": "0.53238595", "text": "public function new()\n {\n $class = get_class($this->model());\n\n return new $class();\n }", "title": "" }, { "docid": "c9509056430b557cafeafd10bf06649e", "score": "0.53114676", "text": "public function newQuery(): ModelQueryFactory\n {\n return $this->createModelQuery()\n ->filters($this->filters)\n ->with(...$this->with);\n }", "title": "" }, { "docid": "3e78721b0e523d8054a3fbbfd95c71a2", "score": "0.5304957", "text": "public function model($model)\n {\n //llamamos y devolvemos el modelo\n require_once '../app/models/' . $model . '.php';\n return new $model();\n }", "title": "" }, { "docid": "09754881e83b05347962f9da2e3cea91", "score": "0.53028387", "text": "public function finder(): Finder\n {\n return new DirectoryFinder($this->searchPath());\n }", "title": "" }, { "docid": "20a025a691edcd27b2aad893b0668e79", "score": "0.5295046", "text": "public function model($name)\n {\n $name = 'App\\Models\\\\'.$name;\n return new $name();\n }", "title": "" }, { "docid": "29421608cfd1165b9744070b43be3773", "score": "0.5294508", "text": "protected function makeModel()\n {\n $modelPath = $this->getModelPath($this->getModelName());\n\n if ($this->option('model') && !$this->files->exists($modelPath)) {\n $this->call('make:model', [\n 'name' => $this->getModelName()\n ]);\n }\n }", "title": "" }, { "docid": "2585e11191ac68906120e1b05c38d04f", "score": "0.5290341", "text": "public static function newFactory()\n {\n return EntryModelFactory::new();\n }", "title": "" }, { "docid": "a212fd24d9a4dd51a97d5ef07558f58e", "score": "0.5288326", "text": "public function model($model){\n $model_file_name = '../app/Models/'.ucwords($model).'.php';\n //require model\n require_once $model_file_name;\n //instance object from model\n return new $model();\n }", "title": "" }, { "docid": "8da98da0b9000e3c2fb0306cf0b93ec6", "score": "0.5280875", "text": "private function _getModel($name)\n {\n if (@class_exists($name)) {\n $obj = new $name;\n } else {\n $namespaces = This_Orm_Config::getInstance()->getModelNamespaces();\n foreach ($namespaces as $namespace) {\n if (@class_exists($namespace . $name)) {\n $class = $namespace . $name;\n $obj = new $class;\n break;\n }\n }\n }\n return $obj;\n }", "title": "" }, { "docid": "bd4537ac0247cea9fa10a8c57cd8d9f5", "score": "0.5275911", "text": "public function testGetFinder()\n {\n $this->assertInstanceOf(\n 'Teknoo\\States\\Loader\\FinderInterface',\n $this->getFactoryObject(new Support\\MockFinder('My\\Stated\\Class', 'path/to/my/class'))->getFinder()\n );\n }", "title": "" }, { "docid": "bece86e61107b86f63a1f90571a20928", "score": "0.526569", "text": "public function __construct()\n\t{\n\t\t$this->model = new Model();\n\t}", "title": "" }, { "docid": "46f51d563d403ec1a1ee97349fa855a8", "score": "0.5258915", "text": "protected function create($attributes = [])\n {\n return $this->model->newInstance($attributes);\n }", "title": "" }, { "docid": "92692f364bc5823fe508275528b5606d", "score": "0.52562654", "text": "private function createModel()\n {\n // Grab Some Config\n $config = $this->getConfig();\n\n $class = '\\\\' . ltrim($config['user_model'], '\\\\');\n\n return new $class;\n }", "title": "" }, { "docid": "b33ce0bc88b25a56a59ce82d37cb85dc", "score": "0.5256091", "text": "public function findModel($dto);", "title": "" }, { "docid": "3d33bcf8fe288b9795bdb749518b0fb2", "score": "0.52536464", "text": "public function model($model){\n require_once \"../app/Models/\".$model.\".php\";\n\n $model = '\\\\App\\\\Models\\\\'.$model;\n\n return new $model();\n\n\n }", "title": "" }, { "docid": "f20bab3f1360f4d506852d9c2e40bc33", "score": "0.5245353", "text": "public function create(): Model\n {\n $class = $this->getModelClass();\n\n return new $class;\n }", "title": "" }, { "docid": "cca7dd0b20f9fd4e627963df1a9f929a", "score": "0.524422", "text": "protected abstract function getModelInstance();", "title": "" }, { "docid": "2ff335c68e2058f517c8a2af93c4cad9", "score": "0.52403384", "text": "public function model($model){\n\t\t\trequire_once \"../app/models/\".$model.\".php\";\n\t\t\treturn new $model();\n\t\t}", "title": "" }, { "docid": "d40aea785539b37aa632eba7d21d6b3a", "score": "0.5237773", "text": "function &_createModel( $name, $prefix = '', $config = array()) \n {\n $result = null;\n // Clean the model name\n $modelName\t = preg_replace( '/[^A-Z0-9_\\\\.]/i', '', $name );\n $classPrefix = preg_replace( '/[^A-Z0-9_]/i', '', $prefix );\n \n $classFile = $modelName.'.php';\n \n if (isset($this->_paths[\"models\"])) {\n $inc = $this->_paths[\"models\"]; \n $file = v()->filesystem()->path()->find($inc,$classFile);\n $modelsPath = dirname($file);\n\n if (!isset($this->_models[$modelsPath])) {\n $this->_models[$modelsPath] = array();\n }\n \n if (isset($this->_models[$modelsPath][$modelName])) {\n return $this->_models[$modelsPath][$modelName];\n } \n \n if (file_exists($modelsPath.DS.$classFile)) {\n require_once($modelsPath.DS.$classFile);\n }\n \n $className = $classPrefix.$modelName;\n \n if (class_exists($className)) {\n $this->_models[$modelsPath][$modelName] = new $className($config);\n }\n \n if (!isset($this->_models[$modelsPath][$modelName])) { \n $this->_models[$modelsPath][$modelName] = VWP::raiseWarning(\"Model ($modelName) not found!\",\"VWidgetParams\",null,false);\n } \n return $this->_models[$modelsPath][$modelName];\n } \n \n return $result;\n }", "title": "" }, { "docid": "9a8036d4c7cd857bbe6651b3c99bacb2", "score": "0.5236456", "text": "public static function model($model)\n {\n return new static($model);\n }", "title": "" }, { "docid": "84def152ed950c36f34e67afd2cd7277", "score": "0.5222675", "text": "public function getModelInstance($modelName);", "title": "" }, { "docid": "483aa55902440eab4346be297641e9a7", "score": "0.52225643", "text": "public function model($model){\n // Zahtjevati model fajl \n require_once '../app/models/'. $model . '.php' ; // spajamo model sa metodom i spajamo ga sa .php-om\n\n // Instanciranje modela \n return new $model();\n}", "title": "" }, { "docid": "bb13cd15ddccfc129116aece4decf7d7", "score": "0.5221825", "text": "public function find(string $finder, mixed ...$args): static;", "title": "" }, { "docid": "a9e97cfae533d936fc7ed9d1642cbb00", "score": "0.5217743", "text": "public function model($model){\n // require model file\n require_once '../app/models/' . $model . '.php';\n\n // Instatiate model\n return new $model();\n }", "title": "" }, { "docid": "34c310abf553ff7d28b20cd35da5c3c6", "score": "0.5214043", "text": "public static function newModel()\n {\n $model = static::$model;\n $relatedResource = static::relatedResource(); \n\n return $model::setFacilitate($relatedResource::$model);\n }", "title": "" }, { "docid": "c6dee2faaf65c150b0091086e57b1339", "score": "0.5209358", "text": "public function create(array $data): Model;", "title": "" }, { "docid": "b1d8a50e4567bbcd902efccd43964582", "score": "0.5209147", "text": "protected function findModel()\n\t{\n\t\t$id=Yii::$app->request->get('id');\n\t\tif (($model = Master::findOne($id)) !== null) {\n\t\t} else {\n\t\t\t$model=new Master();\n\t\t}\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "8e1d8c49f45f40ef83c2db76ec5a5e0b", "score": "0.520852", "text": "function LoadModel(string $fileName): \\raylib\\Model { return new \\raylib\\Model; }", "title": "" }, { "docid": "8f204948f5c43ac3f8b858de73025064", "score": "0.52072954", "text": "public function newInstance($attributes = [], $exists = false)\n {\n\n $model = parent::newInstance($attributes, $exists);\n $model->setTable($this->table);\n\n return $model;\n }", "title": "" }, { "docid": "b02b60738c7294af563c94326b1c747a", "score": "0.5198307", "text": "public function __construct()\n {\n if (isset($this->models)) {\n foreach ($this->models as $model) {\n $this->loadModel($model);\n }\n }\n }", "title": "" }, { "docid": "fdf62a8ad95c4c721c0d67adc986c0fa", "score": "0.5194878", "text": "public function makeModel()\n\t{\n\t\t$model = $this->app->make($this->model());\n\n\t\tif(! $model instanceof \\Illuminate\\Database\\Eloquent\\Model) {\n\t\t\tthrow new RepositoryException(\"Class {$this->model()} must be instance of Illuminate\\\\Database\\\\Eloquent\\\\Model\");\n\t\t}\n\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "7126aacbe59192a7d5b3ca90622eedd1", "score": "0.51903284", "text": "protected function setCreateQueryObject()\n {\n $this->setModelNamespace();\n\n $this->setQueryController($this->model_namespace, 'Create');\n\n $this->setQueryControllerDefaults(\n $process_events = 1,\n $query_object = 'item',\n $get_customfields = 1,\n $use_special_joins = 0,\n $use_pagination = 0,\n $check_view_level_access = 0,\n $get_item_children = 0\n );\n\n return $this;\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "7439e6eeae702dda678de203dd7727d9", "score": "0.0", "text": "public function create()\n {\n $category = Categories::pluck('title','id');\n return view('products.create')->with('menu','products')->with('category',$category);\n }", "title": "" } ]
[ { "docid": "342bff56b62a745961c012a3ac82c12a", "score": "0.78761816", "text": "public function create()\n {\n return view('admin.resource.add');\n }", "title": "" }, { "docid": "0f0380ef896e8b1a4af511fb039fe879", "score": "0.7760756", "text": "public function create()\n\t{\n $config = $this->getFormData();\n $config['submit'] = route('app.resources.create');\n $config['title_name'] = trans('app.adminCreate');\n\n return view('admin.adminForm', $config);\n\t}", "title": "" }, { "docid": "6c38527badbdce8b6b216794aa375cb3", "score": "0.76253194", "text": "public function actionCreate()\n\t{\t\t \n\t\t$this->render('resource_create');\n\t}", "title": "" }, { "docid": "c1a53014b3e8009982c57be36ab41329", "score": "0.75948673", "text": "public function create()\n {\n return $this->showForm('create');\n }", "title": "" }, { "docid": "242a7cb221f0fcd944a681fe88c407cd", "score": "0.758405", "text": "public function create()\n {\n return view('Admin.ourresource.create');\n\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "6b956805f751faa8511a724099e60375", "score": "0.75421274", "text": "public function create()\n {\n return view('manager.resources.create');\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "a5965dde1f081c94296e801e6c603bf5", "score": "0.7453085", "text": "public function create()\n {\n \n $resourceTypes = ResourceTypes::getResourceTypeList();\n return view('admin.resources.create')->with('resourceTypes', $resourceTypes);\n \n }", "title": "" }, { "docid": "242700e7542efa06d08edc5984b0a155", "score": "0.737826", "text": "public function create()\n {\n return view ('form');\n }", "title": "" }, { "docid": "de323787673e065c237bffd0e406bc4a", "score": "0.73594564", "text": "public function create()\n {\n\n return view(\"form\");\n }", "title": "" }, { "docid": "1b16c1f4677bd0ac799e087490d4d05b", "score": "0.73507345", "text": "public function create() {\n return view($this->className . '/form', [\n 'className' => $this->className,\n 'pageTitle' => $this->classNameFormatado . '- Cadastro de registro'\n ]);\n }", "title": "" }, { "docid": "7d107bfef62a964a62e6cab8ee6f69b7", "score": "0.7329499", "text": "public function create() {\n return view('forms::create');\n }", "title": "" }, { "docid": "dd9fd892621ec1d56e7ab98a0de05edb", "score": "0.7309871", "text": "public function create()\n {\n $entity = $this->model;\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::create',\n compact(\n 'entity',\n 'fields',\n 'title',\n 'route',\n 'bladeLayout',\n 'relationshipOptions'\n )\n );\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "42de9969dbd16cbf3f496acd505422d8", "score": "0.7249422", "text": "public function create()\n {\n // shows a view to create a new resource\n return view('dashboard.admin.create');\n \n }", "title": "" }, { "docid": "82fc0d08b2c5c77ba23e8e4650269a74", "score": "0.7246853", "text": "public function create()\n {\n $this->authorize('create', $this->resource->getModel());\n\n $this->data['data'] = [];\n $this->data['routeUrl'] = route($this->module->getName() . '.store');\n $this->data['attributes'] = $this->resource->getAttributes();\n $this->data['module'] = $this->module;\n\n // $this->data['data'] = factory(\\Quill\\Post\\Models\\Post::class)->make();\n // $this->data['data']['id'] = null;\n // $this->data['data']['published_at'] = \\Carbon\\Carbon::now()->toDateTimeString();\n\n return template('form', $this->data, $this->module->getName());\n }", "title": "" }, { "docid": "443ec0ef783ddb885e44582de73c662e", "score": "0.7235326", "text": "public function create()\n\t{\n $mode = \"create\";\n return $this->showForm('create');\n\t}", "title": "" }, { "docid": "43bb6b172a2f963c4f3b6d2948331c7b", "score": "0.7217289", "text": "public function create()\n {\n return view('createForm');\n }", "title": "" }, { "docid": "fbc59fca75b99a403174397ba5d8d285", "score": "0.7216552", "text": "public function create()\n {\n $modelClass = $this->modelClass;\n $model = new $modelClass;\n $model->fill(Input::all());\n $view = View::make(\n $this->getViewName('create'),\n compact('model') + array(\n 'pageTitle' => 'Cadastrar '.$this->resourceTitle,\n 'formView' => $this->getViewName('_form'),\n 'formContentView' => $this->getViewName('_formContent'),\n )\n );\n $view = $this->beforeRender($view, 'create');\n return $this->beforeRenderForm($view, $model);\n\n }", "title": "" }, { "docid": "29282129b8e24a976f037c589580f34b", "score": "0.7208537", "text": "public function create()\n {\n $this->page_title = trans('resource_sub_type.new');\n\n return view('resource_sub_type.new', $this->vdata);\n }", "title": "" }, { "docid": "162ece72aeff2332b943711b91bbb0cd", "score": "0.72039485", "text": "public function create()\n {\n\n $model = $this->repository->getNew();\n $this->document->breadcrumbs([\n trans('ecommerce::default.'.$this->codename.'.index') => admin_route('ecommerce.'.$this->codename.'.index'),\n trans('ecommerce::default.'.$this->codename.'.create') => '',\n ]);\n\n $this->document->page->title(\n trans('ecommerce::default.'.$this->codename.'.index')\n .' > '\n .trans('ecommerce::default.'.$this->codename.'.create')\n );\n\n return view('ecommerce::'.$this->codename.'.form', [\n 'model' => $model,\n 'target' => 'ecommerce.'.$this->codename.'.store',\n 'codename' => $this->codename,\n 'repository' => $this->repository,\n ]);\n }", "title": "" }, { "docid": "ae7f980d6b32481951f3c9b739cad405", "score": "0.7199489", "text": "public function create()\n {\n return view(\"konsumen.form\");\n }", "title": "" }, { "docid": "69bd3270f11ddfa5b575696d29a4add6", "score": "0.71814996", "text": "public function create()\n {\n\n return view('shift.form_create');\n }", "title": "" }, { "docid": "0529bd22c7b669b06d0917bb468bcd97", "score": "0.716538", "text": "public function create() {\n\t\t$this->authorize('create', $this->repo->model());\n\t\treturn view($this->view . 'form', $this->repo->getPreRequisite(), $this->repo->getBasicPreRequisite());\n\n\t}", "title": "" }, { "docid": "d7dfab79c6b07da6e5e0913e8540eeb9", "score": "0.7157242", "text": "public function create()\n {\n return view('dashboard.forms.create');\n }", "title": "" }, { "docid": "cdccf0772168a4c3198ad8229762752f", "score": "0.7155322", "text": "public function create()\n {\n return $this->view('form');\n }", "title": "" }, { "docid": "b53b216bb126e4de0f5a98bea729535e", "score": "0.71506757", "text": "public function newAction()\n {\n $this->view->form = new \\BarangForm(null, ['edit' => true]);\n }", "title": "" }, { "docid": "d6aa2e924016ff1dae18f8f678fe212a", "score": "0.7145264", "text": "public function create()\n\t{\n\t\t$form = new Form;\n\t\t$allow_tabs = array('create');\n\t\t$tab = 'create';\n\t\treturn View::make('backend.forms.create', compact('form', 'allow_tabs', 'tab'));\n\t}", "title": "" }, { "docid": "7e262dd36752e23255d5ea03566e8de7", "score": "0.7122985", "text": "public function create()\n {\n $model = $this->model;\n return view('pages.admin.graha.form', compact('model'));\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "1dcbdf778b346aa6793b44e6dbdc0ed3", "score": "0.71093065", "text": "public function create()\n {\n $title = $this->model->getTitle();\n $form_title = $this->name;\n $forms = $this->model->getFormList();\n return view('layouts.create')->with(compact('forms', 'title', 'form_title'));\n }", "title": "" }, { "docid": "e764b1be55fc315cb37574f6c835bc08", "score": "0.7105658", "text": "public function create()\n {\n $data['url'] = route('admin.'.$this->route . '.store');\n $data['title'] = 'Add ' . $this->viewName;\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n\n return view('admin.general.add_form')->with($data);\n }", "title": "" }, { "docid": "f62dd87066b4faf01871596fb587ea88", "score": "0.7074242", "text": "public function create()\n {\n return view('template.product.form_create');\n }", "title": "" }, { "docid": "ccd8c86bf091e74199a4226d7941ad10", "score": "0.7057411", "text": "public function newAction()\n {\n $entity = new Supplier();\n $form = $this->createCreateForm($entity);\n\n return $this->render('AcmeSetupBundle:Supplier:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70571953", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "d152222964aa1bb46555c71d1b40a042", "score": "0.70524913", "text": "public static function newForm() {\n self::check_admin();\n $abilities = Ability::allAbilities();\n View::make('suunnitelmat/new_species.html', array('abilities' => $abilities));\n }", "title": "" }, { "docid": "a5da52bd87409b9af679915f54a22668", "score": "0.70512646", "text": "public function create()\n {\n if(!Auth::user()->hakAkses($this->hakAkses['add'])){\n $this->authorize('forceFail');\n }\n $class = $this->getResourceModel();\n $kategori = Kategori::get();\n return view($this->filterCreateView('_resources.create'), $this->filterCreateViewData([\n 'kategoriList' => $kategori,\n 'record' => new $class(),\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n ]));\n }", "title": "" }, { "docid": "c69f303d7cafa0864b25b452417d3c13", "score": "0.70510703", "text": "public function create()\n\t{\n\t\treturn view('actions.create');\n\t}", "title": "" }, { "docid": "b20c44fdc751207aaea30b2a981f6a0d", "score": "0.7047574", "text": "public function create()\n\t{\n\t\t//\n\t\treturn \\View::make('concepto/concepto_new');\n\n\t}", "title": "" }, { "docid": "956b2245921b775d19eaa349523daabc", "score": "0.7040791", "text": "public function create()\n {\n return view($this->layout.'form');\n }", "title": "" }, { "docid": "607b994b80e66fe45602a00379ab7779", "score": "0.70308834", "text": "public function create()\n {\n //return the create view (form)\n return view('books.create');\n }", "title": "" }, { "docid": "6039f43b38d3c6d347e4435587e3a07f", "score": "0.7027638", "text": "public function create()\n {\n return $this->cView(\"form\");\n }", "title": "" }, { "docid": "6785b7a8807f193c101c96ffd2379b91", "score": "0.70223033", "text": "public function create()\n\t{\n\t\t//\n\t\treturn View::make('resources.create') ;//转向资源服务器注册页面\n\t}", "title": "" }, { "docid": "f576188dbc8ae5f6631165826f306b3b", "score": "0.70178926", "text": "public function create()\n {\n return view(\"{$this->viewPath}.create\", [\n 'title' => trans('main.add') . ' ' . trans('main.medicalforms'),\n ]);\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.70147324", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "aeb469b25992f994059bfd2f69df4c25", "score": "0.7014434", "text": "public function create()\n {\n return view('admin.service.form');\n }", "title": "" }, { "docid": "55d25b23118347b43838f0584440d7bc", "score": "0.7013096", "text": "public function create()\n {\n return view('resturants::create');\n }", "title": "" }, { "docid": "d466d099f3186e4452b5ebba7c196cf6", "score": "0.70112854", "text": "public function create()\n {\n return view('design/form');\n }", "title": "" }, { "docid": "7c7e2891f4af9318822aa65308553f78", "score": "0.7010465", "text": "public function create()\n {\n return view('pages.superAdmin.minerba.form');\n }", "title": "" }, { "docid": "ca18b8d268ff390165b891429ae27a70", "score": "0.70104074", "text": "public function create()\n\t{\n\t\treturn view('admin.alergenosForm');\n\t}", "title": "" }, { "docid": "248b476c0f07013b389c79c904231f2a", "score": "0.70046955", "text": "public function create()\n {\n return view('admin.car.add');\n }", "title": "" }, { "docid": "8786022d988565af6dda1dead367404f", "score": "0.7004673", "text": "public function create()\n {\n return view('patal.form');\n }", "title": "" }, { "docid": "91dd937891cf552bdb6c058f3730d93b", "score": "0.6998989", "text": "public function newAction()\n {\n $entity = new foo();\n $form = $this->createForm(new fooType(), $entity);\n\n return $this->render('ScrunoBoardBundle:foo:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "ed1d0f0eb0fcdbf172b956b19927920e", "score": "0.6997593", "text": "public function create()\n {\n $class = $this->getModelClassFromRoute();\n if (method_exists($class, 'newDefault')) {\n $object = $class::newDefault(request()->input('parent_id'));\n } else {\n $object = new $class;\n }\n $formConfig = $this->getFormConfig($object);\n $validationRules = $this->getValidationRules();\n return view($this->editPage, compact('object', 'formConfig', 'validationRules'));\n }", "title": "" }, { "docid": "1bfdf35b31b995ec54621f89216a2f60", "score": "0.69961935", "text": "public function create()\n {\n // Hacia el formulario\n return view('Catalogo.registro'); // La del formulario\n }", "title": "" }, { "docid": "68eb563182e9ed0d6524bc0b6aac22af", "score": "0.69939756", "text": "public function create()\n\t{\n\t\t// load the create form (app/views/professor/create.blade.php)\n\t\t$this->layout->content = View::make('professor.create');\n\t}", "title": "" }, { "docid": "875a928015f9ba1940490c7d9dfd8a9c", "score": "0.69916135", "text": "public function create()\n {\n // return view('presensi.form', ['action' => 'create']);\n }", "title": "" }, { "docid": "b544fbb7e499f8abdc514265eaa72c80", "score": "0.6990788", "text": "public function create(){\n return View('salonists.addForm');\n }", "title": "" }, { "docid": "6c77fcad45300d9322c483f2cf6f0bf9", "score": "0.69900626", "text": "public function create()\n\t{\n\t\treturn view('proyek.create');\n\t}", "title": "" }, { "docid": "b383bd109b3b044055bbdeced7efa8e7", "score": "0.6983602", "text": "public function create()\n {\n return view('leite.form');\n }", "title": "" }, { "docid": "67d0fea7e3e0bbada82422aa97f9be53", "score": "0.6977097", "text": "function showCreateForm(){\n return view('admin.Direktori.Koorsek.create');\n }", "title": "" }, { "docid": "432a42bd0e4b7b7dd13b0343e81c9f33", "score": "0.6974407", "text": "public function create()\n {\n //\n return view('libros/libroForm');\n }", "title": "" }, { "docid": "176f4e5ee5bb1d8842d9ba4652636fd5", "score": "0.69725794", "text": "public function create()\n {\n $route = action($this->getActionRoute('store'), $this->action_url_params);\n\n $form = $this->createService->createForm($route);\n\n return view($this->templateAdd, [\n 'form' => $form,\n 'title' => $this->getTitle('create'),\n 'module_title' => $this->getTitle('index'),\n 'controller' => $this->getController(),\n ]);\n }", "title": "" }, { "docid": "2c0ef64bd4ac157d6004a7d4b574de6f", "score": "0.6966141", "text": "public function create()\n {\n // restituisco la view del form\n return view('products.create');\n }", "title": "" }, { "docid": "2643780d203b8c752744e38942ce260d", "score": "0.69652045", "text": "public function create()\n {\n $book = new Book();\n $book->load('authorList.details');\n $book->load('publisher');\n $actionRoute = 'books.saveNew';\n $pageTitle = 'Books - New';\n return view('books._books_form', compact('book', 'actionRoute', 'pageTitle'));\n }", "title": "" }, { "docid": "db317dc07de792187038b7e4a5f863fd", "score": "0.69643784", "text": "public function newAction()\n {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ManuTfeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "cb7c11c08e93409d4584dc81a4310a7e", "score": "0.695854", "text": "public function getCreate()\n {\n return view('pages.form.create');\n }", "title": "" }, { "docid": "ea30089b05638deecfcdcc640118738c", "score": "0.69564354", "text": "public function create()\n {\n return view('student.add');\n }", "title": "" }, { "docid": "faab52446786eb57de6d45ef5c9751a9", "score": "0.6954935", "text": "public function create()\n {\n $countries = Country::all();\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('cities.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('countries', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "0224b799194fa807284fdd74a5365a99", "score": "0.6949657", "text": "public function create()\n {\n return view('anggota.form');\n }", "title": "" }, { "docid": "07b43788dfee25823f1bfa779101007b", "score": "0.69488627", "text": "public function create()\n {\n return view('hrm::create');\n }", "title": "" }, { "docid": "1276876980c60661df1af9ecd3659454", "score": "0.6946296", "text": "public function create()\n\t{\n\t\treturn View::make('nssf.create');\n\t}", "title": "" }, { "docid": "7e9a15ef80239f891446dfc2d6f5483e", "score": "0.69416964", "text": "public function create()\r\n {\r\n $form=[\r\n \"value\" => \"add\",\r\n \"name\" => \"Add Person\",\r\n \"submit\" => \"Save\"\r\n ];\r\n\r\n return view('person/form',compact('form'));\r\n }", "title": "" }, { "docid": "291a5c3487f9cfc359ff3c6584319cba", "score": "0.69416463", "text": "public function backCreateAction()\n {\n $options['domain'] = Constants::BACK;\n $options['type'] = Constants::FORM_CREATE;\n \n // parameter used to filter and show only the resources that belong to the logged organization\n $options['organization'] = $this->get('security.context')->getToken()->getUser()->getId();\n \n $resource = new Resource();\n $form = $this->createForm(new ResourceType(), $resource, $options);\n \n $request = $this->getRequest();\n \n if ($request->getMethod() == 'POST')\n {\n $form->bindRequest($request);\n\n if ($form->isValid())\n {\n $em = $this->getDoctrine()->getEntityManager();\n \n $dateStartLock = $resource->getDateStartLock();\n $dateEndLock = $resource->getDateEndLock();\n \n // it is supposed that a locked period takes full days\n if ($dateStartLock) $dateStartLock->setTime(0, 0, 0);\n if ($dateEndLock) $dateEndLock->setTime(23, 59, 59);\n \n $em->persist($resource);\n $em->flush();\n\n return $this->redirect($this->generateUrl('back_resource_read', array('id' => $resource->getId())));\n }\n } \n\n return $this->render('PFCDTourismBundle:Back/Resource:create.html.twig', array(\n 'resource' => $resource,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "7a30ea5382a9dccea0e45dd1992baee9", "score": "0.6940094", "text": "public function create()\n {\n return view ('riwayat.create');\n }", "title": "" }, { "docid": "247a32ac1bdaf7bc58b7ca130d237b9c", "score": "0.6936969", "text": "public function create()\n {\n //\n return view('admin.concept.create');\n }", "title": "" }, { "docid": "812e658b540562d8e395333553c52241", "score": "0.6934265", "text": "public function create()\n {\n return view('rekening.add');\n }", "title": "" }, { "docid": "680ca688d269a5dc28ed1ec460cb5137", "score": "0.69331574", "text": "public function create()\n {\n return view('harian.create');\n }", "title": "" }, { "docid": "8250d2da73f4073c78bd103641c0eaeb", "score": "0.6925077", "text": "public function create() {\n $title = 'Cadastro Professor';\n return view('professor.create', compact('title'));\n }", "title": "" }, { "docid": "dbe0d9d5c58ac6a21b5fb5512e594696", "score": "0.69249064", "text": "public function create()\n {\n return view('lijst.create');\n }", "title": "" }, { "docid": "a917cc1c921d761746db4cf9f3e12a3a", "score": "0.6924233", "text": "public function create()\n {\n return view($this->options['route-views'].\"save\")\n ->with('options', $this->options)\n ->with('typeForm', 'create');\n }", "title": "" }, { "docid": "35452bee2b2408494a78f76b38ce24ce", "score": "0.6923358", "text": "public function create()\n {\n return view('crud.create', array('title' => $this->title,'title_create' => $this->title_create,\n 'route_path' => $this->route,'form' => $this->form) );\n }", "title": "" }, { "docid": "83ebdde393be7960c0a3149b40b830fa", "score": "0.69206", "text": "public function create()\n {\n //\n return view('guest.sample.submit-property2');\n }", "title": "" }, { "docid": "ce1853ac01959995d112bb4d44014367", "score": "0.6918359", "text": "public function create()\n {\n //\n return view('ijinkeluars.create');\n }", "title": "" }, { "docid": "87632e3ed9e4e251e3f5a4dfa4cc4e5e", "score": "0.69181925", "text": "public function create()\n {\n // Place here the initial data and show\n // Ahh screw it, Show Everything!!!\n\n return view('record.create');\n\n }", "title": "" }, { "docid": "e90d65170f9bc3dd1e2b969826600c53", "score": "0.6914271", "text": "public function create()\n {\n return view('ekskul.create');\n }", "title": "" }, { "docid": "d7102125563abfe0d8b4c4534cc7ed82", "score": "0.6914158", "text": "public function create()\n {\n $this->array['action'] = 'create';\n \n $this->parameters_to_create_edit();\n\n return $this->show_view('create-edit', $this->array);\n }", "title": "" }, { "docid": "d7a4baeb06d3d8108dc3b6b8cf2d22f0", "score": "0.6906848", "text": "public function newAction()\n {\n global $config;\n\n if(empty($this->crumbs->crumbs['new']['label']))\n $this->crumbs->add('New', '/', 'New', false); \n\n $form = new AcademicyearsForm(new Academicyears(), array('new' => true));\n $this->view->setVar(\"form\", $form);\n }", "title": "" }, { "docid": "72d216b75443b4090ac0a1387c18009c", "score": "0.6906656", "text": "public function create()\n {\n //\n return view('crud.add');\n }", "title": "" }, { "docid": "0b940b83fdd9503e0b64330c52106d41", "score": "0.69053364", "text": "public function create()\n {\n return view('inventariss.create');\n }", "title": "" }, { "docid": "08b863cf334fdb6d69bfe339f48ba738", "score": "0.689754", "text": "public function create()\n {\n $outlet = new Outlet;\n $isCreate = true;\n return view('outlet.form', compact('outlet', 'isCreate'));\n }", "title": "" }, { "docid": "f75befff50f97c865afe13ee1e94f3b1", "score": "0.6896097", "text": "public function createAction()\n {\n $action = $this->view->url(['action' => 'save'], 'controllers');\n $this->view->propertyForm = $this->service->getFormForCreating($action);\n }", "title": "" }, { "docid": "27fad6d884340578087d232e3218a94d", "score": "0.68955874", "text": "public function create()\n {\n return view('backpages.formInfo');\n }", "title": "" }, { "docid": "b3b948e870ae293f1e987afea2e063f7", "score": "0.6891714", "text": "public function create()\n {\n return view('panel.warehouse-management.warehouse-rack.form-create');\n }", "title": "" } ]
c5d0327e0d543d83b9050f3c5ceb6ba6
Activate a model instance.
[ { "docid": "3aee5063ff782af9ab9f1a7e046333b3", "score": "0.0", "text": "public function confirm(string $token)\n {\n // If no token was found\n // or the token is invalid then we bail out.\n if (is_null($results = $this->confirmation()->getResults()) || $results->token !== $token)\n {\n return false;\n }\n\n $this->{$this->getConfirmableColumn()} = true;\n\n return $this->save();\n }", "title": "" } ]
[ { "docid": "848e0f01b7f1def0fa89d9abb84200a5", "score": "0.7032893", "text": "public function activateAccount(ActiveRecord $model);", "title": "" }, { "docid": "7b5d2d309f603270d708fdf77166afd9", "score": "0.6807136", "text": "public function activate() {\n $this->active = TRUE;\n $this->redirect();\n }", "title": "" }, { "docid": "8776a0e6a11d43c3593432685e2fdd3d", "score": "0.680596", "text": "public function activate()\n {\n $this->active = 1;\n\n return $this->save();\n }", "title": "" }, { "docid": "53ae2319632f1f92e7ce0b28009365c4", "score": "0.6665944", "text": "public function activate() {\n }", "title": "" }, { "docid": "2011476ba2d71c1d323a0dbbd4006e32", "score": "0.6630755", "text": "public function activateUser()\n {\n\n $this->set(\n array(\n 'activation_token' => null,\n 'active' => '1',\n 'modified' => time()\n )\n );\n\n $this->save();\n }", "title": "" }, { "docid": "eb45ed176e231a875a34add2b6e38187", "score": "0.66162163", "text": "public function activate()\n {\n }", "title": "" }, { "docid": "8c37a6ed9a42f72221468b998f5534f7", "score": "0.6614778", "text": "public function activate() {\n\n }", "title": "" }, { "docid": "6f9fae4471f8361ec33898de2d2bbdfb", "score": "0.6612142", "text": "protected static function single_activate() {\n\t\t}", "title": "" }, { "docid": "1bd151a06c68116f20bfe693ea461016", "score": "0.65956247", "text": "private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}", "title": "" }, { "docid": "cf691413dd693fde056b75c9ed45ca6a", "score": "0.6570094", "text": "public function activate();", "title": "" }, { "docid": "16ce558953f9a4e71587e61ebec5c849", "score": "0.65657663", "text": "public function actionActivate(){\n $model = Yii::$app->user->identity;\n $model->is_activate = (Yii::$app->user->identity->is_activate == 1) ? 0 : 1;\n $model->save(false);\n \n return $this->goHome();\n \n }", "title": "" }, { "docid": "de500a52462c4d933493d26bcea14f0b", "score": "0.65528136", "text": "protected function activate() {}", "title": "" }, { "docid": "4788708bd70d51085fa73e5f20278280", "score": "0.65320015", "text": "public function activate() {\n\n\t}", "title": "" }, { "docid": "b79aee8f1502b0e4b86f8308ad78fc80", "score": "0.6497342", "text": "private static function single_activate() {\n\t\t\n\t\t}", "title": "" }, { "docid": "4152f1906e98c28e261246e481e9eb77", "score": "0.64871573", "text": "public function activate(): void;", "title": "" }, { "docid": "3e7c5b56f84b7efc51b7d38bd8aea920", "score": "0.6447125", "text": "public function activate() {\n\n\t\t\tif ( $this->meets_requirements() ) {\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "3f8fecb4de8db46a5f3660d9c81e5577", "score": "0.64245075", "text": "private static function single_activate() {\n \n }", "title": "" }, { "docid": "86a08f6e705a28c92fa7b50d410e64db", "score": "0.64217067", "text": "public function activate($id);", "title": "" }, { "docid": "231af1f78f3b51b4b482361a1acebc6b", "score": "0.641528", "text": "private function activate(){\n\n\n\t\t}", "title": "" }, { "docid": "8b1907e1ba3510e5a98c964348807270", "score": "0.641441", "text": "public static function activate() {\n\n\t\t\n\t}", "title": "" }, { "docid": "626d07a7452272d50538d8b44db77870", "score": "0.631029", "text": "public function actionActivate($id)\n\t{\n\t\t//Check activation key against user identity database\n\t\t$model= User::model()->findByAttributes(array('activeKey'=>$id));\n\t\tif($model === null)\n\t\t{\n\t\t\t$this->redirect(Yii::app()->homeUrl);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$model->active = 1;\n\t\t\tif ($model->update())\n\t\t\t\t$this->redirect(Yii::app()->createUrl('site/login'));\n\t\t}\n\t}", "title": "" }, { "docid": "9f89f7f4e4ae3e448254f171379ab988", "score": "0.630906", "text": "public function activate()\n\t\t{\n\t\t\t$this->setStatus( true );\n\t\t}", "title": "" }, { "docid": "a93f9b654fa6bd136439e2e5cff4e8a3", "score": "0.6282962", "text": "public static function activate() {}", "title": "" }, { "docid": "a64710f7e8a6f6a2067858ddeb18c3ae", "score": "0.6264282", "text": "public function activate() {\n if (!isset($_GET['id']))\n return false;\n $this->load->auto('store/manufacturer');\n $status = $this->modelManufacturer->getById($_GET['id']);\n if ($status) {\n if ($status['status'] == 0) {\n $this->modelManufacturer->activate($_GET['id']);\n echo 1;\n } else {\n $this->modelManufacturer->desactivate($_GET['id']);\n echo -1;\n }\n } else {\n echo 0;\n }\n }", "title": "" }, { "docid": "2939a26e65f1d85867f8065d4fcb8e7a", "score": "0.6249539", "text": "public static function activate()\n {\n }", "title": "" }, { "docid": "2939a26e65f1d85867f8065d4fcb8e7a", "score": "0.6249539", "text": "public static function activate()\n {\n }", "title": "" }, { "docid": "82cb67f8711f2502b94622879f3a331c", "score": "0.62306607", "text": "public static function activate()\n {\n\n }", "title": "" }, { "docid": "df6cb0d6ae3fad428c1ee75e4b86128e", "score": "0.62217116", "text": "public static function activate() {\n\n\t}", "title": "" }, { "docid": "df6cb0d6ae3fad428c1ee75e4b86128e", "score": "0.62217116", "text": "public static function activate() {\n\n\t}", "title": "" }, { "docid": "9b8352b1cd3e90b7fbbb3d539a255399", "score": "0.6195434", "text": "public static function activate() {\n\t\t\n\t}", "title": "" }, { "docid": "0ececce2c9e441c3f22672c80accf303", "score": "0.6195207", "text": "public function activate()\n {\n // set the state of the is_configured to 0 -> not configured\n $this->is_configured->set(0);\n }", "title": "" }, { "docid": "6df75ee2c874f20d3455a9884e3c7969", "score": "0.61601925", "text": "public function activateAction()\n {\n User::activate($this->route_params['token']);\n\n $this->redirect('/ace-mvc/public/signup/activated');\n }", "title": "" }, { "docid": "84198c59c39a5f494a420237d1af56df", "score": "0.6153113", "text": "public function activate()\n {\n $this->updateStatus(1);\n\n return $this;\n }", "title": "" }, { "docid": "385b95fa442aac7aaf2ac07f13c27562", "score": "0.6141688", "text": "function activate() {}", "title": "" }, { "docid": "5c6198d8113290c9ca21c1b24e033d1c", "score": "0.61379224", "text": "public function actionActivateAccount()\n {\n $user = craft()->users->getUserById(craft()->request->getPost('userId'));\n craft()->users->activateUser($user);\n }", "title": "" }, { "docid": "71b16c9727109939753dba2fe79a95ff", "score": "0.6135002", "text": "public function activateAction()\n {\n User::activate($this->route_params['token']);\n\n $this->redirect('/signup/activated');\n }", "title": "" }, { "docid": "88bcbd43e285a965786583e9bb12bad1", "score": "0.6093676", "text": "public function activate(): bool\n {\n if ($this->status == static::STATUS['ACTIVE']) {\n return true; // already activated\n }\n\n $this->status = static::STATUS['ACTIVE'];\n\n return $this->save();\n }", "title": "" }, { "docid": "34cc69c5fc41dfd9b020288f5e4c8ae2", "score": "0.6092422", "text": "protected function activateSelf() {}", "title": "" }, { "docid": "fd373517a72861d1e09119d196b6147d", "score": "0.6091379", "text": "public function activate($save = true);", "title": "" }, { "docid": "4973b5b562d50ffe351e29726a644e43", "score": "0.6080253", "text": "public function activate() {\n\t\t$installer = new CC\\CRUD\\Installer();\n\t\t$installer->run();\n\t}", "title": "" }, { "docid": "67fc8de92a7e3adc36a4761ca344214f", "score": "0.6069531", "text": "public function activate() {\n\t\treturn;\n\t}", "title": "" }, { "docid": "281916882b448f1aaeabc5603f97c5d1", "score": "0.60552764", "text": "public function activate(Request $request)\n\t{\n \n $userL = Sentinel::check(); \n\t if($userL){\n\t $logged_in_user = Sentinel::getUser();\n\t $response = new \\stdClass();\n\t $response->error = false;\n\t $response->errmens = [];\n\t $user = User::find($request -> input('ci_id'));\n\t $activation = Activation::create($user);\n\t\t\t $getactivationdata = Activation::exists($user);\n\t\t\t Activation::complete($user, $getactivationdata->code);\n\n\t $this->insertActivity( \"/dashboard/users/edit/\".$request -> input('ci_id'),'activated an <a href=\"%a\" target=\"_blank\">User</a>',$logged_in_user->id);\n\n\t $response->mens = Lang::get('User successfully activated.');\n\t return RestResponse::sendResult(200,$response);\n\t } \n\t\t\n\t}", "title": "" }, { "docid": "52da5934c26cfcb5895e6b66f1165228", "score": "0.6042255", "text": "public static function activate() {\n flush_rewrite_rules();\n\n # Database\n $dbUser = new DbUser();\n $dbBadge = new DbBadge();\n $dbUser->createTable();\n $dbBadge->createTable();\n\n # Settings\n SettingsTemp::init();\n\n }", "title": "" }, { "docid": "ce35fe8be1394e071ee439ba95692ab1", "score": "0.6037626", "text": "function activate()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Activate user\n\t\tif ($this->tank_auth->activate_user($user_id, $new_email_key)) {\t\t// success\n\t\t\t$this->tank_auth->logout();\n\t\t\t$this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login', 'Login'));\n\n\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t$this->_show_message($this->lang->line('auth_message_activation_failed'));\n\t\t}\n\t}", "title": "" }, { "docid": "3d7bd53a18eff42eb0a4b12b8618ad0a", "score": "0.6031337", "text": "public function activate(): void\n {\n if (null !== $this->getSession()) {\n $this->getSession()->set(self::KEY, true);\n }\n }", "title": "" }, { "docid": "58a276369260d86209b689edce50ffce", "score": "0.6020608", "text": "protected function activateSession()\n\t{\n\t\t$this->_user->last_active = new CDbExpression('NOW()');\n\t\t$this->_user->login_last_try = new CDbExpression('NOW()');\n\t\t$this->_user->session = $this->_currentSession;\n\t\tif (!$this->_user->save()) {\n\t\t\t$this->logMessage('Could not save activation information. exiting', 'error');\n\t\t\tYii::app()->end(10);\n\t\t}\n\t\t$this->logMessage('Current session: '.$this->_currentSession.', response time:'.$this->_sleepTime.' milliseconds');\t\n\t}", "title": "" }, { "docid": "6f7863ccfe27b0184a9230882427d391", "score": "0.6016026", "text": "public function activate() {\n\t\tset_transient( self::REDIRECT_TRANSIENT, true, 60 );\n\t}", "title": "" }, { "docid": "e0542fded89f07a5b76e44b2895b9d7a", "score": "0.59789443", "text": "public function Inactivate(){\n $this->InsureHasID();\n\n if(is_null($this->Get(LOAN::LOAN_SETUP)) || is_null($this->Get(LOAN::LOAN_SETUP)->Get(BASE_ENTITY::ID)))\n $lsetup = LoanProSDK::GetInstance()->GetLoan($this->Get(BASE_ENTITY::ID), [LOAN::LOAN_SETUP])->Get(LOAN::LOAN_SETUP);\n else\n $lsetup = $this->Get(LOAN::LOAN_SETUP);\n $lsetup = $lsetup->Set(LOAN_SETUP::ACTIVE, false);\n (new LoanEntity($this->Get(LOAN::DISP_ID)))->Set(BASE_ENTITY::ID, $this->Get(BASE_ENTITY::ID), LOAN::LOAN_SETUP, $lsetup)->Save();\n if(!is_null($this->Get(LOAN::LOAN_SETUP)))\n return $this->Set(LOAN::LOAN_SETUP, $this->Get(LOAN::LOAN_SETUP)->Set(LOAN_SETUP::ACTIVE, 0));\n return $this;\n }", "title": "" }, { "docid": "9a3d83fe4626fc22b719b0d614f9f34e", "score": "0.5967212", "text": "public function activate()\n {\n static::$instance = $this;\n return $this;\n }", "title": "" }, { "docid": "4a97e29572cdf4dea8ddc7f85c05b6d8", "score": "0.5952837", "text": "function NEW_USER_APPROVE_MODEL() { //constructor\r\n\t\t\r\n\t\tself::$instance = $this;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "9ff87c0ec3e3999ecadc32075df2b814", "score": "0.59461427", "text": "public function activate() {\n $installer = new Installer;\n $installer->run();\n }", "title": "" }, { "docid": "da2482ea4357bd7c6cbf304538e0bf4a", "score": "0.59326833", "text": "public function Activate(){\n $this->InsureHasID();\n LoanProSDK::GetInstance()->GetApiComm()->ActivateLoan($this->Get(BASE_ENTITY::ID));\n if(!is_null($this->Get(LOAN::LOAN_SETUP)))\n return $this->Set(LOAN::LOAN_SETUP, $this->Get(LOAN::LOAN_SETUP)->Set(LOAN_SETUP::ACTIVE, 1));\n return $this;\n }", "title": "" }, { "docid": "d73c9886c8cf57904e8bdac87b2380a4", "score": "0.5930326", "text": "public function activateUser(){\n\n\t\tglobal $db;\n\n\t\t$db->SQL = \"UPDATE ebb_users SET active='1' WHERE Username='\".$this->user.\"' LIMIT 1\";\n\t\t$db->query();\n\t}", "title": "" }, { "docid": "7a324307a4144bce823aff964801b635", "score": "0.5927804", "text": "public function activate(Request $request)\n {\n $package = Package::find($request->id);\n $package->is_active = !$package->is_active;\n $package->save();\n }", "title": "" }, { "docid": "e7f1ed056e32896547401f3338cd8e22", "score": "0.5920705", "text": "public function activate(): self\n {\n\t\t$currentlyActive = $this->page->getActiveRevision();\n\n\t\tif($this !== $currentlyActive) {\n\n\t\t\tif($currentlyActive) {\n\t\t\t\t$currentlyActive->deActivate();\n\t\t\t}\n\n\t\t\t$this->active = true;\n\t\t\t\n\t\t\tif($this->id) {\n\t\t\t\tApplication::getInstance()->getVxPDO()->updateRecord(\n\t\t\t\t\t'revisions',\n\t\t\t\t\t$this->id,\n\t\t\t\t\t[\n\t\t\t\t\t\t'active' => 1\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "e9ab8f7a537993bb2314955a584f4ccd", "score": "0.5918379", "text": "public function action_activate()\n\t{\n\t\t$this->template->title = 'Myauth &raquo Activate';\n\t\t$this->template->content = View::factory('myauth/activate');\n\t}", "title": "" }, { "docid": "b8b70d0f24ba52aabe897f281af9c951", "score": "0.58626246", "text": "public static function activate()\n\t\t{\n\t\t\t// Do nothing\n\t\t}", "title": "" }, { "docid": "85f0af5abc252fb4eb7016f57707637f", "score": "0.58602494", "text": "public function activate () {\n\t\tif (!$this->is_id($this->id)) {\n\t\t\tadd_error(\"could_not_find_user\");\n\t\t\treturn false;\n\t\t}\n\t\tif ($this->id == $_SESSION['user_id']) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->db_update(\"UPDATE users SET active=1 WHERE id=%d\", array($this->id));\n\t}", "title": "" }, { "docid": "7b4ba95af8eed7b51d591145bccecb22", "score": "0.5852671", "text": "static function activate() {\n\t\t}", "title": "" }, { "docid": "28697f36758a048e8d7ed0f95b192d3b", "score": "0.5851156", "text": "public function activate_email() {\n \t\n\t\t\n \t$this->status = self::STATUS_ACTIVATED;\n\t\t$this->modified_at = time();\n\t\t$this->reset_token = md5(time().\"\".$this->id.\"-\".$this->email);\n\t\t\n\t\ttry {\n\t\t\t$this->save();\n\t\t} catch (ORM_Validation_Exception $e) {\n\t\t\t$errors = $e->errors('models');\n\t\t}\n\t\t$this->send_email(\"Welcome to Qyuki\",'activation');\n\t\t\n }", "title": "" }, { "docid": "661eb7b235044a05cc506aa755b76ec8", "score": "0.58364123", "text": "public function activate() {\n $installer = new Reslab\\ReslabMatchingForm\\Installer();\n $installer->run();\n }", "title": "" }, { "docid": "79082561998038810a7ac2f0c3710453", "score": "0.5817905", "text": "public function actionActivate($id)\n {\n $allocationbackup = AllocationMaster::findOne(['status'=>AllocationMaster::STATUS_ACTIVE]);\n \n\n $model = $this->findModel($id);\n\n //it is a first activation.\n $success = true;\n\n if ($model->load(Yii::$app->request->post()))\n {\n \n if(strlen($model->approvalDate)==0):\n $session=\\Yii::$app->session;\n $session->setFlash('errorActivating','Approval Date is required for activation.');\n return $this->render('update', [\n 'model' => $model,\n ]);\n \n else:\n if(is_null($allocationbackup)):\n $model->status = AllocationMaster::STATUS_ACTIVE;\n else:\n AllocationMaster::updateAll(['status'=>AllocationMaster::STATUS_INACTIVE],['status' =>[AllocationMaster::STATUS_ACTIVE,AllocationMaster::STATUS_INACTIVE]]);\n $model->status = AllocationMaster::STATUS_ACTIVE;\n endif; \n $model->save(); \n if ($model->save()): \n return $this->redirect(['index']);\n else:\n $success=false;\n endif;\n endif;\n\n }\n if($success==false)\n {\n if (!is_null($allocationbackup)):\n $allocationbackup->status = AllocationMaster::STATUS_ACTIVE;\n $allocationbackup->save();\n endif;\n $session=\\Yii::$app->session;\n $session->setFlash('errorActivating','Selected Allocation Master could not be activated. Please contact IT team');\n return $this->redirect(['index']);\n };\n return $this->render('activate',['model'=>$model]);\n }", "title": "" }, { "docid": "6d09eb11d2f68e5655cbf38a41dc214d", "score": "0.58167875", "text": "public static function activate() {\n // Do nothing\n }", "title": "" }, { "docid": "c1c1413da2b3e483e4bd1e297535e066", "score": "0.58149385", "text": "public function putActivateUser()\n\t{\n\t\t$user = Emp::find(Input::get('actEmpId'));\n\t\t$user->active = 1;\n\t\t$user->save();\n\n\t\treturn Redirect::route('user_data')\n\t\t->with('message', 'Bruker '.$user->user_name.' aktivert.');\n\t}", "title": "" }, { "docid": "6fc3e76729c47b717138eae1a8b018e2", "score": "0.57870764", "text": "public static function activate() {\n\t\t// TODO: Define activation functionality here\n\t\tinclude_once('views/public.php');\n\t}", "title": "" }, { "docid": "64f8fd192e294fecbc64e59c8ca0e669", "score": "0.57728064", "text": "public function do_activate()\n {\n\n $request = $this->getRequest();\n $console = $this->getConsole();\n\n $workarea = $console->tpl->getWorkArea( );\n $workarea->addTemplate( 'usermgmt/create' );\n\n }", "title": "" }, { "docid": "e043988bf4341e3cf56dbfd3654246f5", "score": "0.57694495", "text": "public function activate() {\n // Check for request forgeries.\n JRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n // Initialise variables.\n $ids = JRequest::getVar('cid', array(), '', 'array');\n\n if (empty($ids)) {\n JError::raiseWarning(500, JText::_('COM_USERS_USERS_NO_ITEM_SELECTED'));\n } else {\n // Get the model.\n $model = $this->getModel();\n\n // Change the state of the records.\n if (!$model->activate($ids)) {\n JError::raiseWarning(500, $model->getError());\n } else {\n $this->setMessage(JText::plural('COM_USERS_N_USERS_ACTIVATED', count($ids)));\n }\n }\n\n $this->setRedirect('index.php?option=com_aa4j&view=users');\n }", "title": "" }, { "docid": "6c0eeb7a817e83c9c26f9dfddb8c59df", "score": "0.57689154", "text": "public function activate()\n {\n $db = Loader::db();\n self::deactivateAll();\n $db->Execute('update SystemAntispamLibraries set saslIsActive = 1 where saslHandle = ?', array($this->saslHandle));\n }", "title": "" }, { "docid": "9a4c96731db14eaf6758c3641fd7d74c", "score": "0.5759315", "text": "public static function activated() {\n\n\t}", "title": "" }, { "docid": "9885c20b70e93c1d34c61c4b91b03cff", "score": "0.57516986", "text": "public function activar()\n {\n $this->estatus = 1;\n $this->save();\n }", "title": "" }, { "docid": "270f624fc1196408750172678af52fa5", "score": "0.574362", "text": "public function activate_user_model()\n {\n $data=array(\n 'activation'=>1,\n 'activationTime'=>time(),\n );\n $this->db->where('activationKey', $_REQUEST['key']);\n $this->db->update('users', $data);\n $this->session->set_userdata('verify_email_message', \"<div class='alert alert-success alert-dismissible fade in'>\n <a href='#' class='close' data-dismiss='alert' aria-label='close'>&times;</a>\n Your email has been verified.</div>\");\n redirect(base_url(), \"refresh\");\n }", "title": "" }, { "docid": "227dd0837fbea1b7638548fdeee0f3be", "score": "0.5734947", "text": "function activate()\n\t{\n\t\tparent::activate();\n\t\t\n\n\t\tdo_action( $this->WPB_PREFIX.'_activate' );\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "956c1f9deb191599e645c0d72b243cf4", "score": "0.57303655", "text": "public function activate() {\n\t\t// Current plugin version.\n\t\tif ( $this->is_network() ) {\n\t\t\t$version = get_site_option( 'pluginbase_version', '1.0.0' );\n\t\t} else {\n\t\t\t$version = get_option( 'pluginbase_version', '1.0.0' );\n\t\t}\n\n\t\t// Set plugin owner.\n\t\t$this->set_plugin_owner();\n\t\t// Assign capabilities.\n\t\t$this->assign_caps();\n\n\t\t/**\n\t\t * Action hook to execute after activation.\n\t\t *\n\t\t * @param int Old version.\n\t\t * @param int New version.\n\t\t *\n\t\t * @since 1.0.0\n\t\t */\n\t\tdo_action( 'pluginbase/after_activate', $version, SMUSHTOOLKIT_VERSION );\n\t}", "title": "" }, { "docid": "e55b8811aabc1512e9eb0b6a9c2ed684", "score": "0.57206583", "text": "public function activate() : bool\n {\n if ($this->isPendingActivation()) {\n return $this->activation()->update(['is_verified' => true]);\n }\n\n return false;\n }", "title": "" }, { "docid": "be0f99459d09a66f0c6d9721b2f64d93", "score": "0.56974673", "text": "public function activate() {\n\t\t$installer = new TMPlugin\\Installer();\n\t\t$installer->run();\n\t}", "title": "" }, { "docid": "d3e9146fd7bc663ba5e93913a00ed750", "score": "0.5683064", "text": "public function activation() {\n\n\t}", "title": "" }, { "docid": "dbc293d889d84115ac29ae63ce52c2d9", "score": "0.5679262", "text": "public function activate()\n {\n $files = $this->getFiles();\n\n $bladeFiles = array_filter($files, function ($item) {\n return $item['dynamic'] === true;\n });\n\n $staticFiles = array_filter($files, function ($item) {\n return $item['dynamic'] === false;\n });\n\n $this->copyDynamicFilesToViews($bladeFiles);\n\n $this->copyStaticFilesToPublic($staticFiles);\n\n $this->active = 'Y';\n\n $this->save();\n }", "title": "" }, { "docid": "579a9ddd15661e804445a1d2d3c31c06", "score": "0.5678797", "text": "function reactivate() {\n\n // Check for paused status\n if ($this->getStatus() != 'Paused')\n return false;\n\n // Check for active user account\n if ($this->getUser()->getCustomerStatus() != 'Active')\n return false;\n\n $this->setStatus('Active');\n $this->setPausedUntil(NULL);\n $this->save();\n\n }", "title": "" }, { "docid": "29e1028c548534614839684b6be5f499", "score": "0.5677935", "text": "public function activate() {\n\t\t/**\n\t\t * Fires when the plugin is being activated.\n\t\t *\n\t\t * @since 7.0\n\t\t */\n\t\tdo_action( 'tml_activate' );\n\t}", "title": "" }, { "docid": "49613f527c2782591d3288804b43ba2e", "score": "0.56776416", "text": "public static function activate() {\n require_once plugin_dir_path( __FILE__ ) . 'includes/class-activator.php';\n PLUGINNAME_Activator::activate();\n }", "title": "" }, { "docid": "0d936dc40563237e62a33cf40a1bb7d1", "score": "0.56572163", "text": "public function activate() {\n\t\t$installer = new \\Sponsors\\Installer();\n\t\t$installer->run();\n\t}", "title": "" }, { "docid": "ec284316f00bb578c4631de17fed5c25", "score": "0.5656299", "text": "public function activate(Request $request)\n {\n \t$token = $request->token;\n \t$email = $request->email;\n\n \t$user = User::where('email', $email)->first();\n\n $status = 'status';\n $message = '';\n $redirect = $this->guestRedirectPath(); \n\n if (auth()->check()) {\n $redirect = $this->redirectPath(); \n }\n\n \tif (is_null($user)) {\n $message = 'skeleton::activation.user_not_found';\n \t}\n \telseif ($user->active) {\n $message = 'skeleton::activation.already_activated';\n \t}\n \telseif (ActivationToken::exists($token, $email)) {\n\t\t\t$user->active = true;\n $user->save();\n ActivationToken::delete($token);\n $message = 'skeleton::activation.activation_success';\n \t} else { \n $message = 'skeleton::activation.invalid_data';\n $status = 'error';\n }\n\n\t\treturn redirect($redirect)->with($status, trans($message));\n }", "title": "" }, { "docid": "27584a7385c07a639d30c76c1a710941", "score": "0.56517506", "text": "public function activate()\n\t{\n\t\tarray_push($this->_before_activate, $this->env->active_application());\n\t\t$this->env->set_active_application($this);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "04c00bb7d99cc5abd966d6b911776ac0", "score": "0.56485885", "text": "public function activate() {\n\t\t$this\n\t\t->state = 'AwaitingPayment';\n\t\t$response = $this->save();\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "7fa4b5e9bf075b2c82c9b270bfed2494", "score": "0.5638366", "text": "public function userActivate(Request $request)\n {\n User::find($request->input('user_id'))->update(['active' => !$request->input('active')]);\n\n return back()->with('message', 'Benutzer erfolgreich aktualisiert.')->with('mandantChanged', $request->get('mandant_id'));\n }", "title": "" }, { "docid": "6bd0bcae30304e2a93267d058cc9e13a", "score": "0.5635226", "text": "public function activate($id) {\n $job = Job::findOrFail($id);\n if ($job) {\n $job->active = '1';\n $job->save();\n return redirect('job')->with('success', 'Selected job has been activated. ');\n } else {\n return redirect('job')->with('error', 'Selected job could not be activated. ');\n }\n }", "title": "" }, { "docid": "82b893c0d9e8526b69a7bf21a59cf6ad", "score": "0.56207687", "text": "public function activate() {\r\n $install = new ContactForm\\Installer();\r\n $install-> run();\r\n }", "title": "" }, { "docid": "d143457461dc4237759c40309bc1e185", "score": "0.55973184", "text": "public static function single_activate() {\n\t\tupdate_option( PT_CV_OPTION_VERSION, PT_CV_VERSION );\n\t}", "title": "" }, { "docid": "98957890957c438b18c6df24eeb3aa88", "score": "0.55960953", "text": "public function activateAction()\n {\n\t\ttry\n\t\t{\n\t\t\t$this->view->title = \"CMS :: Activate account\";\n\t\t\t\n\t\t\tif ($_GET)\n\t\t\t{\n\t\t\t\trequire_once (\"RegisterModel.php\");\n\t\t\t\t$registerModel = new RegisterModel();\n\t\t\t\t\t\t\n\t\t\t\t$userName = $this->_request->getQuery(\"username\");\n\t\t\t\t$activationKey = $this->_request->getQuery(\"key\");\n\t\t\t\t\n\t\t\t\tif ($registerModel->isValidUserKey($userName,$activationKey))\n\t\t\t\t{\n\t\t\t\t\t$registerModel->activateUser($userName);\n\t\t\t\t\t$this->view->imageIcon = \"ok.png\";\n\t\t\t\t\t$this->view->message = \"Congratulations! Your account has been activated now\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->view->imageIcon = \"error.png\";\n\t\t\t\t\t$this->view->message = \"This is a dead link\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->view->imageIcon = \"error.png\";\n\t\t\t\t$this->view->message = \"This page was loaded incorrectly\";\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\t$this->_redirect('error');\n\t\t}\n\t}", "title": "" }, { "docid": "3df353c19f4b4322af735a6a08033333", "score": "0.5595622", "text": "public function activate($id){\n\t\t$user = User::find($id);\n\t\tif($user->isActive()){\n\t\t\t$user->active = 0;\n\t\t}else{\n\t\t\t$user->active = 1;\n\t\t}\n\t\t$user->save();\n\n\t\tSession::flash('flash_message',\"El estado de la cuenta del usuario \".$user->name.\" ha sido cambiado.\");\n\t\treturn Redirect::back();\n\t}", "title": "" }, { "docid": "97e3a5091e8804329b4921edf8f17a26", "score": "0.5593301", "text": "public function setActive() {}", "title": "" }, { "docid": "90cfca2167474f72f03c4c1d95839ccb", "score": "0.5590186", "text": "public function actionActivate($id)\n {\n $model = $this->findModel($id);\n\n $model->state = 1;\n\n $model->save();\n\n if ($model->save()) {\n Yii::$app->session->setFlash('success', Yii::t('deposit','Deposit activated successfully'));\n } else {\n Yii::$app->session->setFlash('error', Yii::t('deposit','Deposit not activated'));\n }\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "258988e42d0a895ba443d666a5a98cb9", "score": "0.55854034", "text": "public static function activate() {\n\t\t//why i can not access $this->wpdb;\n\t\tglobal $wpdb;\n\t\t$wpdb->hide_errors();\n\t\t$table_name =$wpdb->prefix . 'woo_points_by_prediction';\n\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n\n // it's important that this table be indexed-up as it can grow quite large\n $sql =\n \"CREATE TABLE {$table_name} (\n\t\t predict_id bigint(20) NOT NULL AUTO_INCREMENT,\n\t\t woo_predict_user VARCHAR(20) NOT NULL,\n\t\t woo_predict_question_id longtext DEFAULT NULL,\n\t\t woo_predict_user_ans varchar(255) DEFAULT NULL,\n\t\t woo_predict_date_end DATE DEFAULT NULL,\n\t\t woo_predict_points_added bigint(20) DEFAULT NULL,\n\t\t woo_predict_update BOOLEAN DEFAULT false,\n\t\t PRIMARY KEY (predict_id)\n\t\t) \";\n dbDelta($sql);\n\t\t\n\t}", "title": "" }, { "docid": "622921d30e24850c8c4eb1c56d7e0c40", "score": "0.55527407", "text": "function activateUser(){\n\t\t\n\t\tif(!empty($this->data['Admin']['id'])){\n\t\t\t$existingStatus = $this->User->find('first', array('conditions' => array('User.id' => $this->data['Admin']['id'])));\n\t\t\t$status = $existingStatus['User']['status'];\n\t\t\tif($status == 1){\n\t\t\t\t$finalStatus = 0;\n\t\t\t}else{\n\t\t\t\t$finalStatus = 1;\n\t\t\t}\n\t\t\t$this->User->id = $this->data['Admin']['id'];\n\t\t\t$data['User']['status'] = $finalStatus;\n\t\t\tif($this->User->save($data)){\n\t\t\t\techo $data['User']['status']; \n\t\t\t\tdie;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "83d6cb1596cce11a03eaf1a6584a816c", "score": "0.5541183", "text": "public function actionActivate($id) {\n Group::model()->activate($id); \n\t\t$this->redirect(array('group/'.$id));\n }", "title": "" }, { "docid": "0d11631fda0a8c43b3138c7e5c1d729b", "score": "0.55319226", "text": "public function enable() {\n\t\t$this->activated = true;\n\t}", "title": "" }, { "docid": "329e7d16a0fa1d6aed70252a760c8237", "score": "0.5530951", "text": "public function activate() {\n\t\t$duration = (int)$this->params['duration'];\n\t\t$this->Maintenance->setMaintenanceMode($duration);\n\t\t$this->out('Maintenance mode activated ...');\n\t}", "title": "" }, { "docid": "09ec2819664cabed1e7603de0d1c458e", "score": "0.55306447", "text": "public function actionMakeActive(){\n $post = Yii::$app->request->post();\n\n if(!isset($post['id'])) return $this->createErrorResponse('param id is missing');\n\n $user = $this->findModel($post['id']);\n\n if($user){\n\n $user = $this->findModel($post['id']);\n $user->status = User::STATUS_ACTIVE;\n $user->save();\n return $this->createSuccessResponse('user status changed successfully');\n\n }\n\n return $this->createErrorResponse('user not found');\n }", "title": "" }, { "docid": "9a68b173794570d27c188edc47540370", "score": "0.5529303", "text": "public function activateUser($request) {\n $user = $this->user->find($request->user_id);\n\n if(!$user) {\n return redirect()->back()->withMessage('User record not found')->withAlertClass('alert-danger');\n }\n\n $status = $request->activate ? true : false;\n\n $user->update(['is_active' => $status]);\n\n $message = $status ? \"{$user->name} activated successfully!\" : \"{$user->name} deactivated successfully!\";\n\n return redirect()->back()->withMessage($message)->withAlertClass('alert-success');\n\n }", "title": "" }, { "docid": "f2567d8c5a3ee481bb7f81125e902cd8", "score": "0.55228966", "text": "public function activate($id)\n {\n DB::beginTransaction();\n\n $user = User::findOrFail($id);\n $user->activate();\n\n if($user){\n DB::commit();\n return redirect()->route('usuarios.index')->with('success', 'El usuario ha sido activado correctamente.');\n }else{\n DB::rollBack();\n return back()->with('error', 'Ocurrió un problema al activar el usuario.');\n }\n }", "title": "" }, { "docid": "0ab0ae9f45b52e71b07f0b6583615aa6", "score": "0.5522692", "text": "public static function activate()\n {\n piklist::check_network_propagate('do_action', 'piklist_activate');\n }", "title": "" } ]
0fce7c93ec8be07a3c68949cfa68f694
2.2.1 > PRODUCT Edit information of selected product.
[ { "docid": "a13af73ade21325815be98ea941c1707", "score": "0.70863235", "text": "public function editProduct($id) {\n\t\t$data = array(\n\t\t\t'admin' => $this->Manage_model->getAdminData(),\n\t\t\t'product' => $this->Manage_model->getProduct($id),\n\t\t\t'productLibrary' => $this->Manage_model->getProductLibrary($id)\n\t\t);\n\t\t$data['title'] = $data['product']['name'];\n\n\t\tif ($this->input->post()) {\n\t\t\t$this->Manage_model->editProductInfo($id);\n\t\t}\n\t\t\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('templates/manage/header');\n\t\t$this->load->view('manage/product/edit_product', $data);\n\t\t$this->load->view('templates/manage/footer');\n\t}", "title": "" } ]
[ { "docid": "6e841d72e6100560fff679c932144071", "score": "0.7751692", "text": "public function edit(product $product)\n {\n //\n }", "title": "" }, { "docid": "6e841d72e6100560fff679c932144071", "score": "0.7751692", "text": "public function edit(product $product)\n {\n //\n }", "title": "" }, { "docid": "6e841d72e6100560fff679c932144071", "score": "0.7751692", "text": "public function edit(product $product)\n {\n //\n }", "title": "" }, { "docid": "f39b2f36ce3d34556443a3cea9333ff3", "score": "0.7683568", "text": "public function edit(Product $product)\n {\n \n }", "title": "" }, { "docid": "ed1c66548a1aabf837206406ad624fdf", "score": "0.7667315", "text": "public function edit(Product $product)\n {\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "07e26acf3dcaee6567a8ea73ba16a829", "score": "0.76603156", "text": "public function edit(Product $product)\n {\n //\n }", "title": "" }, { "docid": "04f59a485bb2c65f809ced1c1ba190fd", "score": "0.7635936", "text": "public function testUpdateProduct()\n {\n }", "title": "" }, { "docid": "277b02e5b761980d2628760e2e3a658e", "score": "0.7498836", "text": "public function edit(Original_product $original_product)\n {\n //\n }", "title": "" }, { "docid": "42ecb2737ce2da80beee2317d05e31b8", "score": "0.74479634", "text": "public function edit(nvproduct $nvproduct)\n {\n //\n }", "title": "" }, { "docid": "ed1f648fa6a8cdb64a043c80ee7cc58f", "score": "0.7387833", "text": "public function editProduct(){\n\n $sql =\"UPDATE productos SET nombre ='{$this->getNombre()}', descripcion = '{$this->getDescripcion()}', precio = {$this->getPrecio()}, stock = {$this->getStock()}, categoria_id = {$this->getCategoria_id()},imagen = '{$this->getImagen()}' WHERE id_productos = {$this->getId_productos()}\";\n\n\n $result = $this->database->query($sql);\n\n if ($result) {\n return true;\n\n }else {\n return false;\n }\n\n\n\n }", "title": "" }, { "docid": "2ac287f33a0b22cd658add9d932bfb54", "score": "0.7385589", "text": "public function edit(Product $product)\n {\n // not gonna use it since it need to show edit form\n }", "title": "" }, { "docid": "e5651bd601035b2370bbb19560f8acd1", "score": "0.73679537", "text": "public function editProduct($editProductName, $editProductID, $editPrice, $editCategoryID, $editMediaID) {\n //bind variable to the parameter as strings, and execute SQL statement\n return $this->editStmt->execute(array(\"editProductName\" => $editProductName, \"editProductID\" => $editProductID, \"editPrice\" => $editPrice, \"editCategoryID\" => $editCategoryID, \"editMediaID\" => $editMediaID)); \n }", "title": "" }, { "docid": "19c9a5b5a0cdaed875ad63678586e2f9", "score": "0.7343227", "text": "public function edit(StoredProduct $storedProduct)\n {\n //\n }", "title": "" }, { "docid": "536dc643acb223990637de772211f544", "score": "0.72312945", "text": "public function edit(Product $products)\n {\n //\n }", "title": "" }, { "docid": "a38dce4605acc32f326b8e535eb5e50b", "score": "0.7176207", "text": "public function update_product()\n\t{\n\t\t$this->load->model('product_model');\n\n\t\t$post = $this->input->post();\n\t\t$product = $this->product_model->get_record(['record_id' => $post['pk']]);\n\t\t$product->set_properties([$post['name'] => $post['value']]);\n\t\t\n\t\t($product->price) ? $product->price = str_replace(',', '.', $product->price) : '';\n\n\t\t$product->save();\n\t}", "title": "" }, { "docid": "989c38088582ccce8bc9d3be26282a6f", "score": "0.7139397", "text": "public function edit(ProductItem $productItem)\n {\n //\n }", "title": "" }, { "docid": "f5b7b6464ea18fef8a1e658c89783e5f", "score": "0.7134936", "text": "public function edit(ProductsMeta $productsMeta)\n {\n //\n }", "title": "" }, { "docid": "94f56fb7da1eabf8ae076f7a6d797dbd", "score": "0.7117133", "text": "public function actionEditproduct()\n {\n $model = new AddProductForm();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->refresh();\n }\n\n if (Yii::$app->request->get('id') > 0 && !Yii::$app->request->post() && $model->loadProduct(Yii::$app->request->get('id'))) {\n return $this->render('editproduct', [\n 'model' => $model,\n ]);\n }\n\n Yii::$app->session->setFlash('saveProductFormSubmitted');\n return $this->render('editproduct', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "36cb2d05ee2f8747fe6e0949b415e1d0", "score": "0.70921385", "text": "function editProduct($id, $name, $code, $image, $price, $stock, $description){\r\n\t\t$query = \"UPDATE tbl_product SET name=?, code=?, image=?, price=?, stock=?, description=? WHERE tbl_product.id='$id'\";\r\n\r\n\t\t$params = array(\r\n\t\t\tarray(\r\n\t\t\t\t\"param_type\" => \"s\",\r\n\t\t\t\t\"param_value\" => $name\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t\"param_type\" => \"s\",\r\n\t\t\t\t\"param_value\" => $code\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t\"param_type\" => \"s\",\r\n\t\t\t\t\"param_value\" => $image\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t\"param_type\" => \"d\",\r\n\t\t\t\t\"param_value\" => $price\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t\"param_type\" => \"i\",\r\n\t\t\t\t\"param_value\" => $stock\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t\"param_type\" => \"s\",\r\n\t\t\t\t\"param_value\" => $description\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t$this->updateDB($query, $params);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "8d690dd6f3c0509cb0f61654681d21df", "score": "0.7027283", "text": "public function edit(ProductLicense $license)\n {\n //\n }", "title": "" }, { "docid": "f138f998f4dedf6eb75083506f822e66", "score": "0.70238453", "text": "public function edit(Products $products)\n {\n //\n }", "title": "" }, { "docid": "187fc79a05371a628fb36c67467793bc", "score": "0.69963115", "text": "public function editAction(Product $product) {\n\t\t// Only allow edit if product is not used in unbilled statements or unbilled purchases\n\t\tif($this->productUsedUnbilled($product)) {\n\t\t\t// Redirect to limited editing\n\t\t\t$this->redirect('used', 'Product', NULL, array('product' => $product));\n\t\t}\n\n\t\t// Create a clone which will become the new product\n\t\t// Also provide the original product to set the ancestor and hide it later\n\t\t$clone = $this->cloneProduct($product);\n\t\t$this->view->assign('product', $clone);\n\t\t$this->view->assign('original', $product);\n\n\t\t// Get subproducts if available\n\t\t$this->view->assign('subproducts', $this->productRepository->findAllSubproducts($product));\n\t}", "title": "" }, { "docid": "4d0c9d4b0689e382868dc169c1bbaeaa", "score": "0.69644487", "text": "public function edit(Producto $producto)\n {\n //\n }", "title": "" }, { "docid": "4d0c9d4b0689e382868dc169c1bbaeaa", "score": "0.69644487", "text": "public function edit(Producto $producto)\n {\n //\n }", "title": "" }, { "docid": "4d0c9d4b0689e382868dc169c1bbaeaa", "score": "0.69644487", "text": "public function edit(Producto $producto)\n {\n //\n }", "title": "" }, { "docid": "4d0c9d4b0689e382868dc169c1bbaeaa", "score": "0.69644487", "text": "public function edit(Producto $producto)\n {\n //\n }", "title": "" }, { "docid": "3df93bb518efe3cbaf727ca9ad9328a0", "score": "0.6945144", "text": "public function testUpdateAProduct()\n {\n $prod = $this->generateProducts()->first();\n $this->seeInDatabase('products', ['name' => $prod->name]);\n\n $params = [\n 'name' => 'Google Pixel XL',\n 'description' => 'The best phone on the market',\n 'price' => 699.99,\n ];\n\n $response = $this->json('PUT', \"/products/{$prod->id}\", $params);\n $this->seeInDatabase('products', [\n 'name' => $params['name'],\n 'description' => $params['description'],\n 'price' => $params['price'],\n ]);\n }", "title": "" }, { "docid": "512daf2d1be364f62b06b3ae488b5da0", "score": "0.69086564", "text": "public function edit_product($id)\n {\n // Assign page data\n $data['title'] = 'Edit Product';\n $data['pageTitle'] = 'Edit Product';\n $data['cat'] = $this->ProductModel->GetCategory();\n $data['products'] = $this->ProductModel->GetProductById($id);\n\n // Load Edit Page\n $this->template->load('admin', 'XownCMS/product/edit_product', $data);\n }", "title": "" }, { "docid": "d92bd88ca05cedb415e606f1f8d2efec", "score": "0.68993735", "text": "public function edit() {\n $product = $this->product_m->get($this->input->post('pk'));\n $this->data['co_id_temp'] = $product->pr_co_id;\n // /dla potrzeb metody product_check (callback) uzyskujemy co_id\n \n // z uwagi na używany prefix kolumn w tabeli BD trzeba zrobić nw. obejście aby \n $_POST[$this->input->post('name')] = $this->input->post('value');\n // /z uwagi na używany prefix kolumn w tabeli BD trzeba zrobić nw. obejście\n \n $this->form_validation->set_rules($this->product_m->rules['edit'][$this->input->post('name')]);\n\n if($this->form_validation->run()) {\n $this->product_m->update(array(\n $this->input->post('name') => $this->input->post('value'),\n 'pr_updated_by' => $this->data['us_id']\n ), $this->input->post('pk'));\n $this->session->userdata['update'] = $this->db->last_query();\n echo json_encode(array('status' => 1, 'msg' => 'Zmieniono dane'));\n } else {\n $this->form_validation->set_error_delimiters('', '');\n echo json_encode(array('status' => 0, 'msg' => validation_errors()));\n }\n }", "title": "" }, { "docid": "0c2779454c341d375ab368d42dcf3e5a", "score": "0.6896305", "text": "public function edit(Product $product)\n {\n //\n<<<<<<< HEAD\n // return Product::find($product->id); \n=======\n>>>>>>> db4c825b1e1e9566248a691f77f04eb121a7a1b1\n }", "title": "" }, { "docid": "7d776291a4e5807d25272cf58499736e", "score": "0.6879311", "text": "public function editProductFull(){\n\n if (!$this->isUseAdmin()){\n throw new ExceptionExt(\"User is not admin\");\n }\n\n $productId = (integer)$this->InputFilter->getParameter(\"id\");\n\n if (empty($productId)){\n throw new ExceptionExt(\"Id not set\");\n }\n\n $newData = $this->InputFilter->getParameter(\"json\");\n\n if (!is_array($newData)){\n throw new ExceptionExt(\"New data not set\");\n }\n\n $name = (string) isset( $newData[\"product_name\"] ) ? $newData[\"product_name\"] : '';\n $desc = (string) isset( $newData[\"product_desc\"] ) ? $newData[\"product_desc\"] : '';\n $article = (string) isset( $newData[\"product_article\"] ) ? $newData[\"product_article\"] : '';\n $price = (string) isset( $newData[\"price\"] ) ? $newData[\"price\"] : '';\n\n $brendId = (integer) isset( $newData[\"product_brend\"] ) ? $newData[\"product_brend\"] : 0;\n $active = (integer) isset( $newData[\"active\"] ) ? $newData[\"active\"] : 0;\n $exist = (integer) isset( $newData[\"product_exist\"] ) ? $newData[\"product_exist\"] : 0;\n $priceType = (integer) isset( $newData[\"price_type\"] ) ? $newData[\"price_type\"] : 0;\n\n $typeId = $this->typeId[count($this->typeId) - 1];\n\n $this->MySQL->query(\"UPDATE gal_photos SET `article` = '$article', `active` = $active WHERE `id` = $productId\");\n\n $this->MySQL->query(\"UPDATE gal_photos_languages SET `name` = '$name', `description` = '$desc' WHERE `photo_id` = $productId and `language_id` = {$this->languageId}\");\n\n\n $this->modifiedId = $productId;\n\n $tmpUrlFileName = $this->InputFilter->getParameter(\"file\");\n\n if (!empty($tmpUrlFileName)){\n\n $tmpFileName = GALLERY_MODULE_IMG_FOLDER_TEMP_FILE_SYSTEM . basename($tmpUrlFileName);\n\n if (preg_match('/\\.(\\w+?)$/i', $tmpUrlFileName, $match)){\n $extention = $match[1];\n }\n\n if (empty($extention)){\n throw new ExceptionExt(\"Can not determine extention of uploaded file\");\n }\n\n $newBigFileName = GALLERY_MODULE_IMG_FOLDER_FILE_SYSTEM . \"b-$productId.jpg\";\n $newSmallFileName = GALLERY_MODULE_IMG_FOLDER_FILE_SYSTEM . \"s-$productId.jpg\";\n\n if (!is_file($tmpFileName)){\n throw new ExceptionExt(\"Temp picture file not exists\");\n }\n\n if (false === ImageScale::scalePicture($tmpFileName, $newBigFileName, $extention, GALLERY_MODULE_BIG_PICTURE_SIZE, GALLERY_MODULE_NOT_USE_CROP_PICTURE, GALLERY_MODULE_USE_BLACK_AND_WHITE_PICTURES) ){\n throw new ExceptionExt(\"Can not decrease picture size for big copy\");\n }\n\n if (false === ImageScale::scalePicture($tmpFileName, $newSmallFileName, $extention, GALLERY_MODULE_SMALL_PICTURE_SIZE, GALLERY_MODULE_NOT_USE_CROP_PICTURE, GALLERY_MODULE_USE_BLACK_AND_WHITE_PICTURES) ){\n throw new ExceptionExt(\"Can not decrease picture size for small copy\");\n }\n\n if (false === unlink($tmpFileName)){\n throw new ExceptionExt(\"Can not remove picture temp file ($tmpFileName)\");\n }\n }\n\n return true;\n\n }", "title": "" }, { "docid": "1059b9787d3d30e2a1a266e678149903", "score": "0.6859505", "text": "public function editProductPage($id){\n\t /* Decode produk id */\n\t\t$prdID = base64_decode(urldecode($id));\n\t \n\t /* Proses tampil halaman */\n\t\t$this->pageData = array(\n\t\t\t'title' => 'PoS | Edit Product',\n\t\t\t'assets' => array('sweetalert2', 'page_add_product'),\n\t\t\t'detailPrd' => $this->Product_m->getProductOnID($prdID), // Get data berdasar produk id\n\t\t\t'optCtgr' => $this->Product_m->getCategory(), // Get semua kategori untuk option\n\t\t\t'optUnit' => $this->Product_m->getUnit() // Get semua satuan untuk option\n\t\t);\n\t\t$this->page = 'product/edit_product_v';\n\t\t$this->layout();\n\t}", "title": "" }, { "docid": "6c0d86cb67bf07bafe73d5322dde1c22", "score": "0.6822034", "text": "public function eventBeforeEditProduct() {\n\n\t}", "title": "" }, { "docid": "c9cad77c7f30e73f64baf22fc68f724f", "score": "0.6811987", "text": "public function edit(Productcodition $productcodition)\n {\n //\n }", "title": "" }, { "docid": "e88144a4c2fac338d297bc74e45ed2dc", "score": "0.67709374", "text": "public function edit(Productos $productos)\n {\n //\n }", "title": "" }, { "docid": "76de7f0006ec697fea7b12a4c9166a27", "score": "0.6770398", "text": "public function editarProducto() {\n //Comprueva que $GET este definida y tenga un valor\n if (isset($_GET['id'])) {\n $id = $_GET['id'];\n $editar = true;\n $productos = new Producto();\n $productos->setIdProducto($id);\n \n //Ejecuta la funcion obtenerUnProducto del modelo Producto para obtener el producto que se va a editar\n $producto = $productos->obtenerUnProducto();\n //Carga el formulario con los datos \n require_once 'vistas/producto/nuevoProducto.php';\n } else {\n echo \"<script> window.location=' \"\n . urlBase . \"Producto/gestionarProductos'; </script>\"; \n }\n }", "title": "" }, { "docid": "01b0f5326fff943682a6b2a843fc11b5", "score": "0.6758224", "text": "function update(){\n\t\techo \"update data product\";\n\t}", "title": "" }, { "docid": "e4b50d9f618f6540c40d152504f8b5fb", "score": "0.6754654", "text": "public function edit(inv_cat_productos $inv_cat_productos) {\n //\n }", "title": "" }, { "docid": "79f1f58c792e25e6cfd517abfd3357fe", "score": "0.67473656", "text": "public function edit($id)\n {\n $product = $this->db->get_where('products', array('id' => $id))->row();\n $this->load->view('includes/header');\n $this->load->view('products/edit',array('product'=>$product));\n $this->load->view('includes/footer'); \n }", "title": "" }, { "docid": "6dd20fa16150d858b9a8de4653cd23a0", "score": "0.67247915", "text": "public function product_edit(){\n\t\t\textract($_POST);\n\t\t\n\t\t\t$this->table = 'tbl_food';\n\t\t\t$data = $_POST['post'];\n\t\t\t$menu_code = \"$branch_id\".strtoupper(substr($data[0]['value'], 0, 3));\n\t\t\t\n\t\t\tif($img != '')\n\t\t\t{\n\t\t\t\t$send['food_img'] = $menu_code.\".jpg\";\n\t\t\t\t$this->save_image_to_folder($img);\n\t\t\t}\n\n\t\t\t$send['food_title'] = strtolower($data[0]['value']);\n\t\t\t$send['food_desc'] = $data[1]['value'];\n\t\t\t$send['food_oldprice'] = $data[2]['value'];\n\t\t\t$send['food_newprice'] = $data[3]['value'];\n\t\t\t$send['food_quantity'] = $data[5]['value'];\n\t\t\t$send['menu_id'] = $data[6]['value'];\n\t\t\t$send['class_id'] = $data[7]['value'];\n\t\t\t$send['food_latest'] = $data[8]['value'];\n\t\t\t$send['food_best_seller'] = $data[9]['value'];\n\t\t\t$send['food_promo'] = $data[10]['value'];\n\t\t\t$send['food_status'] = $data[11]['value'];\n\t\t\t\n\t\t\t$cond['food_id'] = $food_id;\n\n\t\t\t$result = $this->update($send,$cond);\n\t\t\techo $result;\n\t\t}", "title": "" }, { "docid": "a34008f92da22bc0cb5e1cdd1347424b", "score": "0.6671834", "text": "public function edit(Product $product)\n {\n $title = 'ویرایش محصول';\n $groupings = Grouping::all();\n $brands = Brand::all();\n $colors = Color::all();\n $sizes = Size::all();\n $types = Type::where('group_id','=',$product->type->grouping->id)->get();\n $values = $product->value()->get();\n $prices = $product->price()->get();\n $properties = $product->type->property()->get();\n\n\n\n return view('panel.product.edit',compact('product','title','groupings','brands','colors',\n 'sizes','types','prices','values','properties'));\n }", "title": "" }, { "docid": "e8e459e529a2449343b96d20c87e14e2", "score": "0.66718096", "text": "function modifyProduct()\r\n{\r\n\t$productId = (int)$_GET['productId'];\t\r\n $catId = $_POST['cboCategory'];\r\n $name = $_POST['txtName'];\r\n $code = $_POST['txtCode'];\r\n\t$description = $_POST['mtxDescription'];\r\n\t\r\n\t$images = uploadProductImage('fleImage', SRV_ROOT . 'images/product/');\r\n\r\n\t$mainImage = $images['image'];\r\n\t$thumbnail = $images['thumbnail'];\r\n\r\n\t// if uploading a new image\r\n\t// remove old image\r\n\tif ($mainImage != '') {\r\n\t\t_deleteImage($productId);\r\n\t\t\r\n\t\t$mainImage = \"'$mainImage'\";\r\n\t\t$thumbnail = \"'$thumbnail'\";\r\n\t} else {\r\n\t\t// if we're not updating the image\r\n\t\t// make sure the old path remain the same\r\n\t\t// in the database\r\n\t\t$mainImage = 'pd_image';\r\n\t\t$thumbnail = 'pd_thumbnail';\r\n\t}\r\n\t\t\t\r\n\t$sql = \"UPDATE tbl_equipment \r\n\t SET cat_id = $catId, pd_name = '$name', pd_code = '$code', pd_description = '$description', pd_image = $mainImage, pd_thumbnail = $thumbnail\r\n\t\t\t WHERE pd_id = $productId\"; \r\n\r\n\t$result = dbQuery($sql);\r\n\t\r\n\theader('Location: index.php');\t\t\t \r\n}", "title": "" }, { "docid": "c479d29e40ace65fa402975e494cdffc", "score": "0.66262543", "text": "public function edit(BillProduct $bill)\n {\n //\n }", "title": "" }, { "docid": "d54c141508cbd67089b5549bbb65ba64", "score": "0.6598571", "text": "public function getUpdateproduct($id_prodotto) {\n\t\t$product = Products::where('id_prodotto', '=', $id_prodotto) -> first();\n\t\t$airports = Airports::where('stato','=','1')->orderBy('city', 'ASC') -> get();\n\t\t$airlines = Airlines::orderBy('name_airline', 'ASC') -> lists('name_airline','idairline');\n\t\t$terms = Terms::orderBy('term_id', 'DESC') ->lists('title','term_id');\n\t\t$this -> layout -> content = View::make('admin.addupdateproduct',array('airports'=>$airports,'airlines'=>$airlines,'terms'=>$terms)) -> with('product', $product);\n\t}", "title": "" }, { "docid": "5af1e619075391b4a1d89b711ffd713c", "score": "0.6595757", "text": "function editproduct($id = 0) {\n $url = current_url();\n if ($this->session->userdata('admin_logged_in')) {\n $data['query'] = $this->dbmodel->findproduct($id);\n $data['meta'] = $this->dbmodel->get_meta_data();\n $data['category'] = $this->dbmodel->get_category();\n //$data['miscSetting'] = $this->dbmodel->get_misc_setting();\n $data['id'] = $id;\n $this->load->view(\"bnw/templates/header\", $data);\n $this->load->view(\"bnw/templates/menu\");\n $this->load->view('product/editProduct', $data);\n } else {\n redirect('login/index/?url=' . $url, 'refresh');\n }\n }", "title": "" }, { "docid": "0362db0ee407785b8d49ce12ec5b7092", "score": "0.6591868", "text": "function editProducto($params = null){\n\n $logueado = $this->controllerUsuario->checkLoggedIn();\n\n if ($logueado) {\n $producto_id = $params[':ID'];\n $producto = $this->model->getProductobyID($producto_id);\n $categoriasSelect = $this->modelCategoria->getCategoria();\n $this->view->mostrarEditarProducto( $categoriasSelect, $producto);\n }\n else {\n $this->view->showHomeLocation();\n }\n \n }", "title": "" }, { "docid": "c9f68e1329e2c18324442a61e8baf9f6", "score": "0.6590969", "text": "public function edit(ProductType $productType)\n {\n //\n }", "title": "" }, { "docid": "e50242247ae7fed81a94776932909a4f", "score": "0.6576327", "text": "public function edit($data){\n\t\t\n\t\t$id = $data['id_producto'];\n\t\tunset($data['id_producto']);\n\t\t\n\t\t//$sql = 'SELECT * FROM web.productos';\n\t\t\t\n\t\t\t//$prod = $this->get($id);\n\t\t\t\n foreach($data as $key => $value){\n if($value != null){\n $columns[]=$key.\" = '\".$value.\"'\"; \n }\n\t\t\t}\n\t\t\t\n $sql = \"UPDATE productos SET \".implode(',',$columns).\" WHERE id_producto = \".$id;\n\t\t\t\n\t\t\t//var_dump($sql);\n\t\t\t//die;\n\n\t\t\t$this->con->exec($sql);\n\t\t\t\n\n\t\t\t\n\t}", "title": "" }, { "docid": "f3fc66fde49ba7d3be863863aa6e8b6e", "score": "0.65715706", "text": "function edit($id=null,$d=null){\n\n\t\techo \" edit product by id \".$id.\" \".$d.\" \".$_GET[\"aa\"];\n\t}", "title": "" }, { "docid": "8a89a182d0d9f7a95ffd5150df87f0b8", "score": "0.65529233", "text": "function dokanCallBackEditProduct(){\r\n if (( isset( $_POST['update_product'] ) && wp_verify_nonce( $_POST['dokan_edit_product_nonce'], 'dokan_edit_product' ) ) || isset($_POST['dokan_product_id']) )\r\n {\r\n if ( isset( $_GET['product_id'] ) ) {\r\n $post_id = intval( $_GET['product_id'] );\r\n save_extra_endereco_fields( $post_id, \"data\" );\r\n } else {\r\n global $post, $product;\r\n\r\n if ( !empty( $post ) ) {\r\n $post_id = $post->ID;\r\n save_extra_endereco_fields( $post_id, \"data\" );\r\n }\r\n }\r\n }\r\n}", "title": "" }, { "docid": "2e6fedfab2312bbe876e6a4fc51a08b6", "score": "0.6535794", "text": "public function edit(Product $product)\n {\n\n $attributes = $product->attributeproduct()->paginate();\n\n// $sizes = $product->sizes->map(function ($size) {\n// return [\n// 'name' => $size->name,\n// 'price' => $size->price,\n// ];\n// });\n\n return view('dashboard.products.edit', compact('product', 'attributes'));\n }", "title": "" }, { "docid": "cc26898f334c5b7dfa9c01f3b9f61223", "score": "0.65323925", "text": "public function edit($id)\r\n {\r\n if(\\Gate::denies('admin')) {\r\n\t\t\tabort(404);\r\n\t\t}\r\n\r\n if(Product::where('id', $id)->exists()) {\r\n $product = Product::where('id', $id)->first();\r\n //dd($product->product_characteristics);\r\n $manufacturers = Manufacturers::all();\r\n $characteristics = Characteristic::all();\r\n $providers = Providers::all();\r\n $brands = Brands::all();\r\n $page = 'products.index';\r\n View::share(['page' => $page]);\r\n return view('admin.products.product_edit', ['product' => $product, 'manufacturers' => $manufacturers,\r\n 'characteristics' => $characteristics, 'providers' => $providers, 'brands' => $brands]);\r\n } else {\r\n abort(404);\r\n }\r\n }", "title": "" }, { "docid": "bc00af791932e7bfa09447b37027a0c6", "score": "0.65258515", "text": "public function\t\tedit($id) {\n\t\t\t$p = $this->Product->findById($id);\n\t\t\tif ($p[\"Product\"][\"userId\"] != AuthComponent::user('id')) {\n\t\t\t\t\t$this->Session->setFlash(\"Pardon ?\", 'default', array(), 'bad');\n\t\t\t\t\t$this->redirect('/Products');\n\t\t\t}\n\t\t\tif ($this->request->is('post')) {\n\t\t\t\t$d = $this->request->data[\"edit\"];\n\t\t\t\t$data = array(\n\t\t\t\t\t\"description\" => $d[\"description\"],\n\t\t\t\t\t\"name\" => $d[\"name\"],\n\t\t\t\t\t\"price\" => $d[\"price\"],\n\t\t\t\t\t\"status\" => 1\n\t\t\t\t);\n\t\t\t\tif ($d[\"img\"][\"name\"] != \"\") {\n\t\t\t\t\t$file = $d[\"img\"];\n\t\t\t\t\t$path = $_SERVER['DOCUMENT_ROOT'] .'/ec/app/webroot/files/'.AuthComponent::user('id');\n\t\t\t\t\tif (is_dir($path) == false)\n\t\t\t\t\t\tmkdir($path);\n\t\t\t\t\tmove_uploaded_file($file['tmp_name'], $path.\"/\".$file[\"name\"]);\n\t\t\t\t\t$data[\"img\"] = json_encode(array(0 => $path.\"/\".$file[\"name\"]));\n\t\t\t\t}\n\t\t\t\tif (isset($d[\"shortDescription\"]))\n\t\t\t\t\t$data[\"shortDescription\"] = $d[\"shortDescription\"];\n\t\t\t\t$this->Product->id = $id;\n\t\t\t\tif ($this->Product->save($data)) {\n\t\t\t\t\t$this->Notification->save(array(\n\t\t\t\t\t\t\"type\" => \"updateProduct\",\n\t\t\t\t\t\t\"userId\" => 0,\n\t\t\t\t\t\t\"isAdmin\" => 1,\n\t\t\t\t\t\t\"additionnalInfo\" => json_encode(array(\n\t\t\t\t\t\t\t\"productId\" => $id\n\t\t\t\t\t\t))\n\t\t\t\t\t));\n\t\t\t\t\t$this->Commentary->deleteAll(array(\"productId\" => $id));\n\t\t\t\t\t$this->Session->setFlash(\"Votre produit a bien été mise à jour.\", 'default', array(), 'good');\n\t\t\t\t\t$this->redirect(\"/Products\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t$c = $this->Commentary->find('all', array(\n\t\t\t\t\"conditions\" => array(\n\t\t\t\t\t\"productId\" => $p[\"Product\"][\"id\"]\n\t\t\t\t)\n\t\t\t));\n\t\t\tif (isset($c[0]))\n\t\t\t\t$this->set(\"comments\", $c);\n\t\t\t$this->set(\"product\", $p);\n\t\t}", "title": "" }, { "docid": "d8309e1322b4919e2d16b4c5e27dc7f6", "score": "0.65229625", "text": "public function go_to_edit() {\n $p_id = $_REQUEST['p_id'];\n $p_name = $_REQUEST['p_name'];\n $credentials = 'F50368501B084C26A480A7F728E4169E:E72E8F14846445248890038867E3FB03';\n $url = 'https://api.eposnowhq.com/api/V2/Product/' . $p_id;\n\n $data = array(\"Name\" => $p_name);\n $options = array(\n 'http' => array(\n 'method' => 'PUT',\n 'content' => json_encode($data),\n 'header' => \"Content-Type: application/json\\r\\n\" .\n \"Accept: application/json\\r\\n\" .\n \"Authorization: Basic \" . base64_encode($credentials)\n )\n );\n\n $context = stream_context_create($options);\n $result = file_get_contents($url, false, $context);\n echo $result;\n }", "title": "" }, { "docid": "fbbed183702406d74603c44632050f38", "score": "0.6521779", "text": "public function edit(Produto $produto)\n {\n //\n }", "title": "" }, { "docid": "fbbed183702406d74603c44632050f38", "score": "0.6521779", "text": "public function edit(Produto $produto)\n {\n //\n }", "title": "" }, { "docid": "6306bfc9de35a64cc102fbd552df2932", "score": "0.6510099", "text": "public function edit( $id ) {\n\t\t$product = Product::find( $id );\n\t\t$options = ProductOption::where( 'product_id', $product->id )->first();\n\t\t$variants = ProductOption::where( 'product_id', $product->id )->get();\n\n\t\t//echo $product;\n\t\treturn view( 'product.edit', array( 'product' => $product, 'options' => $options, 'variants' => $variants ) );\n\t}", "title": "" }, { "docid": "a79603836a23b55c51372a496d344437", "score": "0.65070164", "text": "public function editAction()\n {\n // Create the form.\n\n $categories = $this->entityManager->getRepository(Category::class)->findAll();\n\n\n\n $form = new ProductForm($categories);\n\n // Get product ID.\n $productId = $this->params()->fromRoute('id', -1);\n\n\n\n // Find existing product in the database.\n $product = $this->entityManager->getRepository(Product::class)\n ->findOneById($productId);\n\n\n if ($product == null) {\n $this->getResponse()->setStatusCode(404);\n return;\n }\n\n\n // Check whether this product is a POST request.\n if ($this->getRequest()->isPost()) {\n\n // Get POST data.\n $data = $this->params()->fromPost();\n\n\n\n\n\n // Fill form with data.\n $form->setData($data);\n if ($form->isValid()) {\n\n\n\n // Get validated form data.\n $data = $form->getData();\n\n // Use product manager service to add new product to database.\n\n\n $this->productManager->updateProduct($product, $data);\n\n // Redirect the user to \"admin\" page.\n return $this->redirect()->toRoute('product', ['action'=>'index']);\n }\n } else {\n $data = [\n 'title' => $product->getTitle(),\n 'price' => $product->getPrice(),\n 'category_id' => $product->getCategoryId(),\n ];\n\n\n\n $form->setData($data);\n }\n\n\n\n\n // Render the view template.\n $view = new ViewModel([\n 'form' => $form,\n 'product' => $product\n ]);\n\n // $view->setTemplate('edit');\n return $view ;\n }", "title": "" }, { "docid": "bc63b8940a0c8f34ae2be9f42b0857f4", "score": "0.6501445", "text": "public function edit(Product $product,Request $request)\n {\n $user=User::find($request->session()->get('id'));\n $payment_methods = array('none',\"Bkash\", \"Nagod\", \"roket\",\"Mkash\",\"Ukash\",\"Gkash\");\n $counter=0;\n $counter2=0;\n return View('seller.editproduct',compact('product','payment_methods','counter','counter2','user'));\n }", "title": "" }, { "docid": "a2bd2ca5f51439736acacb1783cdb3f3", "score": "0.6495395", "text": "function edit_product($id, $name, $brand, $categ, $descrip, $img, $price, $link)\n{\n\n\n\t$name = mysqli_real_escape_string($link, $name);\n\t$brand = mysqli_real_escape_string($link, $brand);\n\t$categ = mysqli_real_escape_string( $link, $categ);\n\t$price = mysqli_real_escape_string( $link, $price);\n\t$descrip = mysqli_real_escape_string( $link, $descrip);\n\t$img = mysqli_real_escape_string( $link, $img);\n\t$quer= \"SELECT * FROM products WHERE id = '$id'\";\n\t$result = mysqli_query($link, $quer);\n\t$num_rows = mysqli_num_rows($result);\n\tif ($num_rows)\n\t{\t\n\t\t$insert_query = \"UPDATE products SET name = '$name', brand = '$brand', categ = '$categ', descrip = '$descrip', img = '$img', price = '$price' WHERE id = '$id'\";\n\t\t$result = mysqli_query($link, $insert_query);\n\t\tif ($result)\n\t\t\treturn 'edited';\n\t\telse\n\t\t\treturn 'fail';\n\t}\n\telse\n\t{\n\t\treturn \"!exist\";\n\t}\n}", "title": "" }, { "docid": "dad94f810a624025e978bb79e51420ad", "score": "0.64913064", "text": "public function edit($id)\n {\n $this->admin['p']=$this->product->getProduct($id);\n //dd($this->admin);\n return view('pages.admin.updateProduct', $this->admin);\n }", "title": "" }, { "docid": "13559acafe88bac3f715e0f8acd74da2", "score": "0.64866054", "text": "public function edit($id)\n {\n $product = Product::findOrFail($id);\n $products = DB::table('product')\n ->select('*')\n ->get();\n $types = ProductType::where('isActive',1)->orderBy('name')->get();\n $brands = TypeBrand::where('typeId',$product->typeId)->get();\n $variances = TypeVariance::where('typeId',$product->typeId)->get();\n $autos = DB::table('vehicle_model as vd')\n ->join('vehicle_make as vk','vd.makeId','vk.id')\n ->select('vd.*','vk.name as make')\n ->where('hasAuto',1)\n ->where('vd.isActive',1)\n ->get();\n $manuals = DB::table('vehicle_model as vd')\n ->join('vehicle_make as vk','vd.makeId','vk.id')\n ->select('vd.*','vk.name as make')\n ->where('hasManual',1)\n ->where('vd.isActive',1)\n ->get();\n return View('product.edit',compact('product','products','types','brands','variances','autos','manuals'));\n }", "title": "" }, { "docid": "573ccd9f63e1a710f3856a7a359f780e", "score": "0.6483799", "text": "public function edit(productCatagory $productCatagory)\n {\n //\n }", "title": "" }, { "docid": "6a2b66d663d3b6eea5f62a880564cc44", "score": "0.64820755", "text": "public function edit(Request $request)\n {\n $client = new Client();\n $res = $client->request('GET', Config::get('bmclientconfig.api_endpoint'));\n $res_decoded = json_decode($res->getBody());\n \n foreach($res_decoded as $product) \n {\n if ($product->id == $request->id)\n $product_edited = $product;\n }\n \n return view('bmclient::edit', compact('product_edited'));\n }", "title": "" }, { "docid": "65e6af09e8759dacbb15a8235b6ad384", "score": "0.6480339", "text": "public function eventAfterEditProduct($productId) {\n\t\tif ($this->quickbooks_is_connected) {\n\t\t\t// Post changes to QBO\n\t\t\t$this->edit($productId);\n\t\t} else {\n\t\t\t$errorDetail = array(\n\t\t\t\t'error' => 'QuickBooks is not connected'\n\t\t\t);\n\n\t\t\t$this->session->data['ipp_error']['warning'] = $errorDetail;\n\t\t}\n\t}", "title": "" }, { "docid": "c2629fb83bf15fce83f3115ca3188a4c", "score": "0.6477196", "text": "public function edit(product $product)\n {\n //\n $category_search = $this->category->find($product->category_id);\n $categories = $this->category->get();\n $subcategory_search = $this->subcategory->find($product->subcategory_id);\n $subcategories = $this->subcategory->get();\n $brand_search = $this->brand->find($product->brand_id);\n $brands = $this->brand->get();\n return view('backend.product.edit', compact('product','category_search','categories','subcategory_search','subcategories','brand_search','brands'));\n\n }", "title": "" }, { "docid": "622da860054caf619c47f5875465eed9", "score": "0.64672834", "text": "function edit_products()\n {\n \t$this->_chk_if_login();\n\t $id=$this->uri->segment(3);\t\n\t $where = array('id'=>$id);\n\t \n\t $config['edit_data'] = $this->Home_model->getSingle(PRODUCTS,$where);\n\t $config['category'] = $this->Home_model->get_all(CATEGORY);\n\t $config['subcategory'] = $this->Home_model->get_all(SUBCATEGORY);\t\n $where = array('userType'=> '2');\t \n\t $config['allmerchant'] = $this->Home_model->getwhere(ADMIN,$where);\t \n\t \n $this->load->view('view/edit_products',$config); \n }", "title": "" }, { "docid": "d29936a787a47676113eddcea43a617a", "score": "0.64661074", "text": "public function actionUpdate($id) {\n $model = $this->loadModel($id);\n $users=User::getNames(); \n $fields=Fields::model()->findAllByAttributes(array('modelName'=>'Product'));\n foreach($fields as $field){\n if($field->type=='link'){\n $fieldName=$field->fieldName;\n $type=ucfirst($field->linkType);\n if(is_numeric($model->$fieldName) && $model->$fieldName!=0){\n eval(\"\\$lookupModel=$type::model()->findByPk(\".$model->$fieldName.\");\");\n if(isset($lookupModel))\n $model->$fieldName=$lookupModel->name;\n }\n }\n }\n if(isset($_POST['Product'])) {\n $temp=$model->attributes;\n $model->setX2Fields($_POST['Product']);\n \n // generate history\n $action = new Actions;\n $action->associationType = 'product';\n $action->associationId = $model->id;\n $action->associationName = $model->name;\n $action->assignedTo = Yii::app()->user->getName();\n $action->completedBy=Yii::app()->user->getName();\n $action->dueDate = time();\n $action->completeDate = time();\n $action->visibility = 1;\n $action->complete='Yes';\n \n $action->actionDescription = \"Update: {$model->name}\n Type: {$model->type}\n Price: {$model->price}\n Currency: {$model->currency}\n Inventory: {$model->inventory}\";\n $action->save(); \n parent::update($model,$temp,'0');\n }\n\n $this->render('update',array(\n 'model'=>$model,\n 'users'=>$users,\n ));\n }", "title": "" }, { "docid": "ef364b15d244e9810247ba7e230d0325", "score": "0.6452921", "text": "public function quickedit() {\n\t\t$this->request->allowMethod ( [ \n\t\t\t\t'post' \n\t\t] );\n\t\theader ( 'Content-type: application/json' );\n\t\t$session = $this->request->session ();\n\t\t$cart_id = $session->read ( 'cart_id' );\n\t\t$product_id = $this->request->data ( 'product_id' );\n\t\t\n\t\t$prduct_model = $this->loadModel ( 'Products' );\n\t\t$result = $prduct_model->find ( 'all', [ \n\t\t\t\t'conditions' => [ \n\t\t\t\t\t\t'Products.id' => $product_id \n\t\t\t\t],\n\t\t\t\t'contain' => [ \n\t\t\t\t\t\t'packageType',\n\t\t\t\t\t\t'CartProducts' => [ \n\t\t\t\t\t\t\t\t'conditions' => [ \n\t\t\t\t\t\t\t\t\t\t'cart_id' => $cart_id,\n\t\t\t\t\t\t\t\t\t\t'product_id' => $product_id \n\t\t\t\t\t\t\t\t] \n\t\t\t\t\t\t] \n\t\t\t\t] \n\t\t] )->toArray ();\n\t\techo json_encode ( $result [0] );\n\t\tdie ();\n\t\t// $cart_product=$this->loadModel('CartProducts');\n\t}", "title": "" }, { "docid": "2180f104c9e2e77ce7637e59767ad336", "score": "0.6451452", "text": "public function edit(Product $product)\n {\n\n $categories = Category::orderBy('category_name', 'ASC')->get();\n $subcategories = SubCategory::orderBy('name', 'ASC')->get();\n $brands = Brand::get();\n $attributes = Attribute::orderBy('name', 'asc')->get();\n $attributeValues = AttributeValue::orderBy('name', 'asc')->get();\n $colors = Attribute::with('attributeValues')->where('slug', 'color')->first();\n $imageGalleries = ImageGallery::where('product_id',$product->id)->get();\n $productAttributes = AttributeProduct::where('product_id',$product->id)->get();\n// dd($color);\n return view('backend.products.products.product_edit',compact('categories', 'subcategories','brands', 'attributes', 'attributeValues', 'imageGalleries', 'product', 'productAttributes', 'colors'));\n }", "title": "" }, { "docid": "689069801dad83651d2d394bdac14270", "score": "0.64487875", "text": "public function save_bulk_edit( $product ) {\n if ( !empty( $_REQUEST[ 'yith_wcbm_bulk_badge_id' ] ) ) {\n $badge_id = $_REQUEST[ 'yith_wcbm_bulk_badge_id' ];\n if ( $badge_id == 'none' ) {\n yit_delete_prop( $product, '_yith_wcbm_product_meta' );\n } else {\n $bm_meta = yit_get_prop( $product, '_yith_wcbm_product_meta', true );\n $bm_meta = !empty( $bm_meta ) ? $bm_meta : array();\n $bm_meta[ 'id_badge' ] = $badge_id;\n yit_save_prop( $product, '_yith_wcbm_product_meta', $bm_meta );\n }\n }\n }", "title": "" } ]
82f8521b9c301672dd8d7fb006fa636d
Return current array index
[ { "docid": "9d56a3fcf8ad8d8759015466512cd361", "score": "0.64631873", "text": "public function key()\n {\n return key($this->internalArray);\n }", "title": "" } ]
[ { "docid": "af48d741a322e7f3cce879192c4b0a0b", "score": "0.7164758", "text": "public function getIdx() {\r\n\t\t\treturn self::$idx;\r\n\t\t}", "title": "" }, { "docid": "95cdd77b5d9c245c5fd20ad5aa469872", "score": "0.7139369", "text": "public function current()\n {\n return $this->index;\n }", "title": "" }, { "docid": "5d048fd3a9340edfe7c85eeaa74a8ab1", "score": "0.6947472", "text": "public function getIndex(): int;", "title": "" }, { "docid": "f137292fedfb5441649843056f1ef0bb", "score": "0.69442827", "text": "public function current()\n {\n var_dump(__METHOD__);\n return $this->array[$this->position];\n }", "title": "" }, { "docid": "db3ff2c5fb72ab5a1517c40d012e70f8", "score": "0.6919612", "text": "public function current()\n {\n return $this->array[$this->position];\n }", "title": "" }, { "docid": "02243fb1788c0f5df9b19f83ff4798f9", "score": "0.6818695", "text": "public function current()\n {\n echo \"getting current \\n\";\n // return $this->array[$this->position];\n return current($this->array);\n }", "title": "" }, { "docid": "fbfc9356e87af4f70fcc270a76435fe1", "score": "0.6803114", "text": "public function current()\n {\n return current($this->array);\n }", "title": "" }, { "docid": "855a70b338409207636099a0dd4039f0", "score": "0.6798151", "text": "public function key()\n {\n return $this->currentIndex;\n }", "title": "" }, { "docid": "855a70b338409207636099a0dd4039f0", "score": "0.6798151", "text": "public function key()\n {\n return $this->currentIndex;\n }", "title": "" }, { "docid": "8e9d87353611ce45d10c7059acd63148", "score": "0.67706215", "text": "public function key() {\n\t\treturn $this->_index;\n\t}", "title": "" }, { "docid": "d933da89276b89a8b037a68964367635", "score": "0.67632854", "text": "public function key(){\n\t\treturn $this->idx;\n\t}", "title": "" }, { "docid": "4734ba2cdb47186665d3a99b63fe7fae", "score": "0.6745869", "text": "public function current(){\n\t\treturn $this->data[$this->idx];\n\t}", "title": "" }, { "docid": "754ecc436d649d7a98947308bef324d2", "score": "0.6739669", "text": "public function key()\n {\n\n return $this->_index;\n\n }", "title": "" }, { "docid": "cd33803b83a6933227caad967dabc379", "score": "0.67338806", "text": "public function key()\n\t{\n\t\treturn $this->index;\n\t}", "title": "" }, { "docid": "3898dc53dbaac7f6fdcdbd6d4da94090", "score": "0.66698617", "text": "public function setIdx() {\r\n\t\t\treturn self::$idx++;\r\n\t\t}", "title": "" }, { "docid": "d8b040419f420e388cc0a62f0e55d268", "score": "0.66230184", "text": "public function key()\n {\n return key($this->array);\n }", "title": "" }, { "docid": "9a2db3fd3e98102c83f4c517d417d3f8", "score": "0.65888435", "text": "public function getPosition()\n {\n return (int) $this->getInternalIterator()->key();\n }", "title": "" }, { "docid": "6c2b71d287d48db26ec7297ef1345ad6", "score": "0.6586084", "text": "public function key()\n {\n return $this->array[$this->position]->id;\n }", "title": "" }, { "docid": "5694589836036440b3859116196ba890", "score": "0.65781564", "text": "public function key() {\n\t\t\treturn $this->index;\n\t\t}", "title": "" }, { "docid": "b76115c7884a4ece6bae171f9df4c46d", "score": "0.6578047", "text": "public function key()\n\t{\n\t\treturn $this->offset;\n\t}", "title": "" }, { "docid": "b7802f74e123f7ce2acead6ddada0a65", "score": "0.6542826", "text": "public function key()\n {\n return $this->index;\n }", "title": "" }, { "docid": "b7802f74e123f7ce2acead6ddada0a65", "score": "0.6542826", "text": "public function key()\n {\n return $this->index;\n }", "title": "" }, { "docid": "afb600a1ed6d7087fcc032fdd53514f1", "score": "0.65412253", "text": "public function current()\n\t{\n\t\treturn $this->_data[$this->_idx];\n\t}", "title": "" }, { "docid": "74716f650c785480463303ef82c414ff", "score": "0.6523705", "text": "public function index(): int\n {\n return $this->_index;\n }", "title": "" }, { "docid": "9dd2dac790ddc9edd92723d1aea8b8b1", "score": "0.65220195", "text": "abstract public function current(): array;", "title": "" }, { "docid": "1dae447056c62d0e9ec4b5fcf75b069a", "score": "0.6518466", "text": "public function getIndex()\n\t{\n\t\treturn (int) $this->stat[\"index\"];\n\t}", "title": "" }, { "docid": "dd11abe4bb720932a47817e209e0cfec", "score": "0.65126044", "text": "public function current(){\n return $this->nth($this->index);\n }", "title": "" }, { "docid": "34af2a3b367bb99d9ecd07010ab4f34b", "score": "0.65013516", "text": "public function current()\n {\n /** @psalm-suppress MixedReturnStatement */\n return current($this->internalArray);\n }", "title": "" }, { "docid": "3bb6e52a7eabb0c70a42bc905b34698c", "score": "0.6469895", "text": "public function key()\n {\n echo \"getting key \\n\";\n // return $this->position;\n return key($this->array);\n }", "title": "" }, { "docid": "76b1eb73355b0418eb2096a6e99696f2", "score": "0.64620656", "text": "public function key(){\n\n\t\treturn $this->_keys[$this->_currIndex];\n\t\n\t}", "title": "" }, { "docid": "5218b5607772386744e18d3a718ca8af", "score": "0.645499", "text": "public function get_pointer_index() {\n\t\t$injection_point = $this->get_injection_point();\n\n\t\tif ( null !== $injection_point ) {\n\t\t\treturn $injection_point['index'];\n\t\t}\n\n\t\treturn count( $this->get_stack( false )['controls'] );\n\t}", "title": "" }, { "docid": "45387c9d454569fcb56f0f252f7c0bc6", "score": "0.64358765", "text": "public function current()\n {\n return $this->items[$this->i];\n }", "title": "" }, { "docid": "161f7f7b0eef8a1e5d9bf3f07e62ca65", "score": "0.6410724", "text": "public function key()\n {\n // TODO: Implement key() method.\n return $this->index;\n }", "title": "" }, { "docid": "0c85038d48aa9b80622a67621dfd2488", "score": "0.6406476", "text": "public function getIndex() : int {\n\t\treturn $this->_cursor;\n\t}", "title": "" }, { "docid": "d74e5334163f2ebe780aca7c8c31c5f1", "score": "0.6395907", "text": "public function key(){\n return $this->index;\n }", "title": "" }, { "docid": "d49a7435f9de83d3cb898452a0163273", "score": "0.6395174", "text": "public function key()\n {\n return $this->offset;\n }", "title": "" }, { "docid": "d49a7435f9de83d3cb898452a0163273", "score": "0.6395174", "text": "public function key()\n {\n return $this->offset;\n }", "title": "" }, { "docid": "8229048cbbb97f74251a0b91e69cfb1c", "score": "0.6395055", "text": "public function key()\n {\n return $this->_offset;\n }", "title": "" }, { "docid": "5c53830e4119acdcc2967850bf7b66ff", "score": "0.63856065", "text": "public function current()\n {\n $key = key($this->_arrayContext);\n return $this->getProperty($key);\n }", "title": "" }, { "docid": "fcb33d5d1a9aceb3da60a94ba1ab8dfa", "score": "0.63760835", "text": "public function key()\n {\n return $this->i;\n }", "title": "" }, { "docid": "0b03373f923259982231ff5f6c8cfa4b", "score": "0.6371802", "text": "public function key() {\n\t\treturn (int) $this->_position;\n\t}", "title": "" }, { "docid": "4b036601f907b14bcc9e0f2e7fa93f92", "score": "0.63343215", "text": "public function key()\n {\n \treturn $this->_offset;\n }", "title": "" }, { "docid": "032ceb01f46a34515072439e2e09ef3b", "score": "0.6324998", "text": "public function key() : int\n {\n return $this->lastRowIndexProcessed;\n }", "title": "" }, { "docid": "a7813882fd4d32a2c6cfeb63d34e1300", "score": "0.630374", "text": "public function key()\n {\n return $this->currentRowNumber + 1;\n }", "title": "" }, { "docid": "4a0f09495800d5d1bd293be2fbf16c7e", "score": "0.6299401", "text": "public function current(): array {}", "title": "" }, { "docid": "ff03b1d89e536271e46ead695c0a0cb1", "score": "0.6279179", "text": "public function key() {\n\t\treturn $this->current_row;\n\t}", "title": "" }, { "docid": "11a6d4d9bf03c2ea77e7a6fcecd78e9b", "score": "0.62757295", "text": "public function key()\n {\n return $this->iteratorOffset;\n }", "title": "" }, { "docid": "f7474646272cc73a8834723ed8ff4e40", "score": "0.62622035", "text": "public function key() {\n return $this->iteratorposition;\n }", "title": "" }, { "docid": "5816bede0077a39eb1f6b0a3bb56c72e", "score": "0.6224418", "text": "public function current()\n {\n return $this->_rows[$this->_offset];\n }", "title": "" }, { "docid": "89b97455657765bf0776bc8cf3f17dfd", "score": "0.62221223", "text": "public function current() {\n\t\treturn $this->_objectArray[$this->_position];\n\t}", "title": "" }, { "docid": "db784d14a568662d24feb42ef6be3539", "score": "0.62102586", "text": "public function current() {\n return $this->collection[$this->pos];\n }", "title": "" }, { "docid": "d3c118d03b50c5af19fcd23c37d13740", "score": "0.62060916", "text": "public function current()\n {\n return $this->count;\n }", "title": "" }, { "docid": "e388a115ed5b021d9256bca55247de50", "score": "0.6200846", "text": "public function key(): mixed\n\t{\n\t return $this->_position;\n\t}", "title": "" }, { "docid": "9b7c8644bf1e0946b563f764c932a0d3", "score": "0.61927384", "text": "public function getIndex(): int\n {\n return $this->index;\n }", "title": "" }, { "docid": "c9c833c1b1731828c8ba4628db023c46", "score": "0.6170409", "text": "public function nextIndex() {\n\t\treturn $this->cursor;\n\t}", "title": "" }, { "docid": "0055d5e71a3d743e3078b4442ed9d32b", "score": "0.61323303", "text": "public function number()\n {\n return $this->index + 1;\n }", "title": "" }, { "docid": "edae902813268e2696f741019c272598", "score": "0.6132246", "text": "public function current()\n {\n return $this->offsetGet($this->pos);\n }", "title": "" }, { "docid": "08e93b2bef8b9f0bde58144ee329dad8", "score": "0.6126621", "text": "public function current()\n\t{\n\t\t$current = false;\n\t\t$i = $this->_paginator->key();\n\t\t\n\t\tif($i >= $this->_back && $i <= $this->_forward){\n\t\t\t$current = array(\n\t\t\t\t'item' => 'number',\n\t\t\t\t'number' => $i,\n\t\t\t);\n\t\t\t\n\t\t\tif($i == $this->_paginator->page_float)\n\t\t\t{\n\t\t\t\t$current['item'] = 'current';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $current;\n\t}", "title": "" }, { "docid": "e4021fef5420a3d938cedf8e4868199f", "score": "0.61251926", "text": "public function key() {\n return $this->curItem;\n }", "title": "" }, { "docid": "df75c5e8221f62796cb271c5a75f4eb4", "score": "0.6119005", "text": "protected function currentStepNumber()\n {\n $key = 1;\n if ($this->currentStep) {\n $key = array_search($this->currentStep, $this->steps);\n ++$key;\n }\n\n return $key;\n }", "title": "" }, { "docid": "b1e280c4d17cced0b6959987a93c0e91", "score": "0.6115696", "text": "public function key(): int\n {\n return $this->position;\n }", "title": "" }, { "docid": "a3e3a3ca60398540c385c2f94777ed11", "score": "0.61130476", "text": "public function current()\n {\n return $this->collection[$this->offset];\n }", "title": "" }, { "docid": "be4983019eaca0d174d26f502579e473", "score": "0.6112467", "text": "public function current()\n\t{\n\t\treturn $this->_data[$this->_currentKey];\n\t}", "title": "" }, { "docid": "d18153b1aac313f1153d1e65e148890c", "score": "0.6112163", "text": "public function key()\n {\n return $this->_currentRowNumber;\n }", "title": "" }, { "docid": "55eb630fc5560ae9060eea1c1a09f686", "score": "0.60958683", "text": "abstract public function getIndex();", "title": "" }, { "docid": "55eb630fc5560ae9060eea1c1a09f686", "score": "0.60958683", "text": "abstract public function getIndex();", "title": "" }, { "docid": "8cc31590c66041a212588bf1cac09fbb", "score": "0.6088125", "text": "public function current() {\n return $this->items[$this->curItem];\n }", "title": "" }, { "docid": "780e1bea977de6b425a232e3d05b9d73", "score": "0.6080436", "text": "public function getLastIndex();", "title": "" }, { "docid": "15dbc0da21b4166cc9e0ab104ed95455", "score": "0.60776603", "text": "public function previousIndex() {\n\t\treturn $this->cursor - 1;\n\t}", "title": "" }, { "docid": "19a93f23d31fad158c327a95b54b557d", "score": "0.6071857", "text": "public function getIndIntemp() {\n return $this->indIntemp;\n }", "title": "" }, { "docid": "e014b5c589cf3d94007f9f1f011653d2", "score": "0.60643446", "text": "function key() {\n\t\treturn $this->position;\n\t}", "title": "" }, { "docid": "765cb70424c07d33b997c7f3463a76a1", "score": "0.60570884", "text": "public function current() {\n\t\treturn $this->offsetGet($this->current_row);\n\t}", "title": "" }, { "docid": "ace68b5a8b5b7759fc04552b1f4a34d8", "score": "0.60538113", "text": "public function key(): int\n {\n return $this->getPosition();\n }", "title": "" }, { "docid": "99ac765b489aeb2599fc2b9384ac0e44", "score": "0.60510224", "text": "#[\\ReturnTypeWillChange]\n\tpublic function key()\n\t{\n\t\treturn $this->_current_row;\n\t}", "title": "" }, { "docid": "c2cf13866a41a8453b25aac12dd0302a", "score": "0.60501355", "text": "public function key()\n {\n return $this->currentCell;\n }", "title": "" }, { "docid": "a2cec20dce91e5eb6c1d1edae519355f", "score": "0.60367435", "text": "public function offset()\n {\n return $this->offset;\n }", "title": "" }, { "docid": "40f658a588ed39b15bc4e5d42060a74b", "score": "0.60363305", "text": "public function offset() { return $this->_m_offset; }", "title": "" }, { "docid": "02f15bf7390c7f646f391c3e68daee0f", "score": "0.60326755", "text": "public function current()\n\t{\n\t\treturn $this->items[$this->position];\n\t}", "title": "" }, { "docid": "1b08e180ec79db8e15fbbb08ee522b25", "score": "0.6028159", "text": "function key()\r\n {\r\n return $this->pos;\r\n }", "title": "" }, { "docid": "3fb482fb020f82d1ec4c13c96a9e5eef", "score": "0.6022706", "text": "public function current(): mixed\n {\n return $this->values[$this->position];\n }", "title": "" }, { "docid": "a2750207e19ca6d750c2d082a5b251cc", "score": "0.60210645", "text": "public function lastIndex()\n {\n return end($this->index);\n }", "title": "" }, { "docid": "feb36c85d9b9a815ed3f14d3d5912d5a", "score": "0.6018889", "text": "protected function getCurrent()\n {\n return $this->dataList[$this->index];\n }", "title": "" }, { "docid": "3daba2e5ecb1501f656ee8d246d70fe1", "score": "0.60070753", "text": "public function current() {\n if (isset($this->_arr[$this->_iteratorSection])) {\n return current($this->_arr[$this->_iteratorSection]);\n }\n }", "title": "" }, { "docid": "0473eacd4e2af42e9c79e1d16351ae36", "score": "0.60050076", "text": "public function key(): mixed\n {\n return $this->position;\n }", "title": "" }, { "docid": "4cafd3a5dfa437c110bfd480b09e2dd3", "score": "0.5996581", "text": "public function key()\n {\n return $this->keys[$this->position];\n }", "title": "" }, { "docid": "d315554a8409022037383bdd1c3bf184", "score": "0.599169", "text": "public function key()\n {\n return $this->_position;\n }", "title": "" }, { "docid": "d315554a8409022037383bdd1c3bf184", "score": "0.599169", "text": "public function key()\n {\n return $this->_position;\n }", "title": "" }, { "docid": "f3a9a7ab5151f1e41a5825ab833865d5", "score": "0.5967118", "text": "public function current()\n {\n return $this->criteria[$this->index];\n }", "title": "" }, { "docid": "ddaec70c77a2a43f7b498cfa01b0c51e", "score": "0.59518874", "text": "public function current()\n {\n return $this[$this->internalCursor];\n }", "title": "" }, { "docid": "3f3eb6385cc91a2355e8432a9df476ce", "score": "0.59433186", "text": "public function current(): ArrayAccess\n {\n return parent::current();\n }", "title": "" }, { "docid": "5c7ae89d0ba9b1bb0a860f1723ded978", "score": "0.5940538", "text": "public function current(): mixed\n {\n return static::$storage[$this->_position];\n }", "title": "" }, { "docid": "6deb8107a39fe05ab15a7ed1cae258c7", "score": "0.59311974", "text": "public function key() {\n return $this->_position;\n }", "title": "" }, { "docid": "fd2069febe65778233280e7bdcf278c2", "score": "0.59271616", "text": "function get_next_index()\r\n\r\n {\r\n\t\tif($this->debug>0){error_log('New LP - In learnpath::get_next_index()',0);}\r\n \t//TODO\r\n \t$index = $this->index;\r\n \t$index ++;\r\n \tif($this->debug>2){error_log('New LP - Now looking at ordered_items['.($index).'] - type is '.$this->items[$this->ordered_items[$index]]->type,0);}\r\n \twhile(!empty($this->ordered_items[$index]) AND ($this->items[$this->ordered_items[$index]]->get_type() == 'dir' || $this->items[$this->ordered_items[$index]]->get_type() == 'dokeos_chapter') AND $index < $this->max_ordered_items)\r\n \t{\r\n \t\t$index ++;\r\n \t\tif($index == $this->max_ordered_items)\r\n \t\t{\r\n \t\t\treturn $this->index;\r\n \t\t}\r\n \t}\r\n \tif(empty($this->ordered_items[$index])){\r\n \t\treturn $this->index;\r\n \t}\r\n \tif($this->debug>2){error_log('New LP - index is now '.$index,0);}\r\n \treturn $index;\r\n }", "title": "" }, { "docid": "7c9f131c451585b6dacd598513877838", "score": "0.5915924", "text": "public function current()\n {\n return $this->chunk[$this->pageOffset];\n }", "title": "" }, { "docid": "67fb5d5814e6f2956e63c686cde3f976", "score": "0.5910044", "text": "public function current() {\n\t\treturn $this->valid() ? $this->_result[$this->_current_row] : NULL;\n\t}", "title": "" }, { "docid": "fa5d0b20ee97b1ceea161f8ca533b9d3", "score": "0.5907724", "text": "public function key()\r\n {\r\n return $this->pos;\r\n }", "title": "" }, { "docid": "76d3c1c407324865595b6becb0da9568", "score": "0.5904546", "text": "public function key()\n {\n var_dump(__METHOD__);\n return $this->position;\n }", "title": "" }, { "docid": "76d3c1c407324865595b6becb0da9568", "score": "0.5904546", "text": "public function key()\n {\n var_dump(__METHOD__);\n return $this->position;\n }", "title": "" }, { "docid": "d2efdefa9abf3936c29e7f9986aa0e74", "score": "0.590152", "text": "public function get_offset() : int\n {\n return $this->offset;\n }", "title": "" }, { "docid": "36929f8306c8494ebc76d4e7f0461721", "score": "0.58991086", "text": "function currentPosition()\r\n {\r\n return $this->Position;\r\n }", "title": "" } ]
28594286251107058697caf7e7e06e05
Process the [alive | a] command
[ { "docid": "fce378b52d7819d90eb890227fe1315b", "score": "0.6128201", "text": "private function aliveCommand() {\n $name = $this->getParam(\"name=\", \"([a-zA-Z]+)\");\n\n if ($name != null) {\n $this->farm->alive($name);\n } else {\n echo \"Error!: A name is required to show if a animal is alive\". PHP_EOL;\n $this->aliveCommandHelp();\n }\n }", "title": "" } ]
[ { "docid": "7e845f259af32eec2d6a2d9ec7d70401", "score": "0.55035114", "text": "private function aliveCommandHelp(){\n echo \"The PHP Farm - a simple command line animals app\" . PHP_EOL;\n echo PHP_EOL;\n echo \"Command Usage:\" . PHP_EOL;\n echo \" [alive | a] <name=> checks if an animal is alive by name\" . PHP_EOL;\n echo PHP_EOL;\n echo \"Examples:\" . PHP_EOL;\n echo \" php Main.php [alive | a] name=my_animal_name\" . PHP_EOL;\n }", "title": "" }, { "docid": "a373fc671dffe27f8bcb4acb775f96e8", "score": "0.53005546", "text": "function isAlive();", "title": "" }, { "docid": "04771efbde66e6ea7f8e53ee6321181c", "score": "0.5152276", "text": "function is_alive($id) {\n\t}", "title": "" }, { "docid": "ab3aba01962aa44f6223a6d2cfcac9e0", "score": "0.5069595", "text": "function proc_get_status ($process) {}", "title": "" }, { "docid": "a29124bd42641bff787c004d14449d48", "score": "0.5051006", "text": "public function test_activeverbose() {\n self::setAdminUser();\n $now = time();\n outagedb::save(new outage([\n 'autostart' => false,\n 'warntime' => $now - 10,\n 'starttime' => $now + 1,\n 'stoptime' => $now + 10,\n 'title' => 'Title',\n 'description' => 'Description',\n ]));\n $this->set_parameters(['-v', '--active']);\n $cli = new waitforit();\n $cli->set_referencetime($now);\n $output = $this->execute($cli);\n self::assertStringContainsString('Verbose mode', $output);\n self::assertStringContainsString('starting in 1 sec', $output);\n self::assertStringContainsString('started', $output);\n }", "title": "" }, { "docid": "1e311b49c942c191c9b63acd1d04b11f", "score": "0.49956536", "text": "function nagios_state() {\n\t$status = shell_exec('cat /usr/local/nagios/var/status.dat');\n\t\n\t$results = array();\n\tpreg_match_all('/hoststatus {(.*?)}/s', $status, $results);\n\t\n\t$entries = array();\n\tforeach ($results[1] as $result) {\n\t\t$lines = explode(\"\\n\", $result);\n\t\t$entry = array();\n\t\tforeach ($lines as $line) {\n\t\t\t$line = explode('=', $line);\n\t\t\tif (count($line) > 1) {\n\t\t\t\t$entry[trim($line[0])] = trim($line[1]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$entries[] = $entry;\n\t}\n\t\n\treturn $entries;\n}", "title": "" }, { "docid": "9d4de8926b7a3a8d2fc18958cf015e0f", "score": "0.49709028", "text": "function command($command, $expected_status = 'ok'){\n\t\t$full_cmd = sprintf(\"a%03d %s\\r\\n\", $this->tag_counter++, $command);\n\t\t$this->log($full_cmd);\n\t\tfwrite($this->stream, $full_cmd);\n\t\t\n\t\t$responses = array();\n\t\tdo {\n\t\t\tlist($tag, $rest) = $this->get_response();\n\t\t\t$responses[] = $rest;\n\t\t} while( $tag == '*' );\n\t\t\n\t\t$status_response = array_pop($responses);\n\t\tlist($status, $message) = explode(' ', $status_response, 2);\n\t\t$status = strtolower($status);\n\t\t\n\t\tif ( is_array($expected_status) ) {\n\t\t\tif ( !in_array($status, $expected_status) )\n\t\t\t\tthrow new ImapException(\"Unexpected status code. Expected one of \" . join(', ', $expected_status) . \", got $status: $message\", $status, $message);\n\t\t} else {\n\t\t\tif ($status != $expected_status)\n\t\t\t\tthrow new ImapException(\"Unexpected status code. Expected $expected_status, got $status: $message\", $status, $message);\n\t\t}\n\t\t\n\t\treturn $responses;\n\t}", "title": "" }, { "docid": "7c2ac75d2960d595b68efbdb72e07965", "score": "0.48392427", "text": "function setActiveAndPing($db){\n\t\t$db->query(\"UPDATE victims SET \".\n\t\t\t\t\t\t\t \"status = \".MyDB::STATUS_ACTIVE.\", \".\n\t\t\t\t\t\t\t \"last_ping = \".time().\" \".\n\t\t\t\t\t\t\t \"WHERE id = \".(int)$_SESSION['id']);\n\t\tif ( isset($_GET['c']) && $_GET['c'] != \"\"){\n\t\t\t$code = ereg_replace('/[^a-z0-9]/','',$_GET['c']); // suckurity 101\n\t\t\t$attack_id = $db->querySingle(\"SELECT id FROM attacks WHERE control_code = '\".$code.\"'\", false);\n\t\t\tAddVictimToAttack($db, intval($attack_id));\n\t\t}\n\t}", "title": "" }, { "docid": "19714bb643ae1401bcc5873e99d47bd6", "score": "0.48212427", "text": "function cluster_status(){\n\n $info = shell_exec(EXE_INFO);\n $info = preg_split('/ +/', $info);\n\n if(! (count($info) > 1))\n {\n return \"busy\";\n }\n else\n {\n return \"avaliable\";\n }\n\n return $info;\n}", "title": "" }, { "docid": "280da456ea56d520fa285a2fdf6aa1b1", "score": "0.48131832", "text": "function verify_server_cmd() {\n //d()->service('Process')->process('terra status', '', \"Terra\");\n }", "title": "" }, { "docid": "4aef5bd7694d7034ef26a5551d0797c9", "score": "0.47929373", "text": "public function status() {\n\t\t$args = func_get_args() ;\n\t\treturn $this->__call('status', $args) ;\n\t}", "title": "" }, { "docid": "9e590f2f17558b7ef8b113963b5fb302", "score": "0.47730273", "text": "public function handle()\n {\n $online_id=array();\n //$handle = file(public_path().'/a.log');\n\t $handle = file('/root/openvpn_docker/release_1/deploy_map_related/openvpn/server/openvpn-status.log');\n if($handle[count($handle)-1]==1){//文件内容不变则退出\n exit;\n }\n file_put_contents('/root/openvpn_docker/release_1/deploy_map_related/openvpn/server/openvpn-status.log', '1',FILE_APPEND);\n $start_line=array_search(\"ROUTING TABLE\\r\\n\",$handle)+2;//开始行数\n $end_line=array_search(\"GLOBAL STATS\\r\\n\",$handle);//结束行数\n for($i=$start_line;$i<$end_line;$i++){\n $array=explode(',',$handle[$i]);\n $condition['virtual_address']=$array[0];\n $condition['real_address']=$array[2];\n $condition['hmi_status']=1;\n DB::table('ki_admin_hmi')->where('cert_name',$array[1])->update($condition);//更新在线人机状态\n $id=DB::table('ki_admin_hmi')->where('cert_name',$array[1])->select('id')->get()->toArray();//查找未在线人机\n if($id){\n $online_id[]=$id[0]->id;\n }\n }\n DB::table('ki_admin_hmi')->whereNotIn('id',$online_id)->update(['hmi_status'=>0]);//更新未在线人机状态为0\n }", "title": "" }, { "docid": "5fd6f586a38df050016206248a3273e8", "score": "0.47363392", "text": "public function handle()\n {\n Log::info(__CLASS__);\n $this->matchService->updateStatus();\n }", "title": "" }, { "docid": "121fc430aa8430e79c25b28a205f96c2", "score": "0.4711172", "text": "function ah_get_command_status(){\n\t$result=array(\n\t\t\"command_id\" => -1,\n\t\t\"status_code\" => -1,\n\t\t\"result_code\" => -1,\n\t\t\"submission_time\" => \"\",\n\t\t\"event_time\" => \"\",\n\t\t\"processing_time\" => \"\",\n\t\t\"result\" => \"\",\n\t\t);\n\n\t// get the command id\n\t$opts=grab_request_var(\"opts\",\"\");\n\n\t// get command status from backend\n\t$args=array(\n\t\t\"cmd\" => \"getcommands\",\n\t\t\"command_id\" => $opts,\n\t\t);\n\t$xml=get_backend_xml_data($args);\n\tif($xml){\n\t\t$result[\"command_id\"]=intval($opts);\n\t\tif($xml->command[0]){\n\t\t\t$result[\"submission_time\"]=strval($xml->command[0]->submission_time);\n\t\t\t$result[\"event_time\"]=strval($xml->command[0]->event_time);\n\t\t\t$result[\"processing_time\"]=strval($xml->command[0]->processing_time);\n\t\t\t$result[\"status_code\"]=strval($xml->command[0]->status_code);\n\t\t\t$result[\"result_code\"]=strval($xml->command[0]->result_code);\n\t\t\t$result[\"result\"]=strval($xml->command[0]->result);\n\t\t\t}\n\t\t}\n\t\t\n\t//print_r($xml);\n\t\t\n\t$output=json_encode($result);\n\techo $output;\n\t}", "title": "" }, { "docid": "ce932c82244b1ff4cfe9d6130d54b006", "score": "0.4703533", "text": "static function buscar_pids_linux($match)\r\n\t{\r\n\t\t$match = escapeshellarg($match);\r\n\t\texec(\"ps fx|grep $match|grep -v grep|awk '{print $1}'\", $output, $ret);\r\n\t\tif($ret) return 'you need ps, grep, and awk installed for this to work';\r\n\t\treturn $output;\r\n\t}", "title": "" }, { "docid": "59f2aad72ebea49aee1033acd2009e71", "score": "0.46945596", "text": "public function status(){\n\t$pidForm = sprintf(\"%7s\",$this->pid);\n\t$command = '/var/www/MDWeb/scripts/qstat -u www-data | grep \"^'.$pidForm.'\"';\n exec($command,$op);\n\n if (!isset($op[0]))return false;\n else return true;\n }", "title": "" }, { "docid": "3d45c96c521d253465a6edf23aa80b69", "score": "0.46903583", "text": "public function isAlive(): bool\n {\n return self::isProcessIdLive($this->processId);\n }", "title": "" }, { "docid": "a4c940edeeb17e07f533845d9b723291", "score": "0.46757278", "text": "function process()\n\t{\n\t\t$this->msg(sprintf(\"Old status: %s\", $this->status));\n\n\t\tswitch($this->status)\n\t\t{\n\t\t\tcase 'Supported':\n\t\t\t\t// If not expired, return;\n\t\t\t\tif(strtotime($this->rs['end_date']) > time())\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'No Applecare':\n\t\t\t\tbreak;\n\t\t\tcase 'Unregistered serialnumber':\n\t\t\t\tbreak;\n\t\t\tcase 'Expired':\n\t\t\t\t// Don't check\n\t\t\t\treturn;\n\t\t\tcase 'No information found':\n\t\t\t\tbreak;\n\t\t\tcase 'Virtual Machine':\n\t\t\t\t// Don't check\n\t\t\t\treturn;\n\t\t\tdefault:\n\t\t\t\t// Unknown status\n\t\t\t\t$this->msg('Unknown status: '.$this->status);\n\n\t\t}\n\t\t$this->check_status($force = TRUE);\n\n\t\t$this->msg(sprintf(\"New status: %s\", $this->status));\n\t}", "title": "" }, { "docid": "dc5b2e2e67b72d7a958b44f3a69c7d9c", "score": "0.46662998", "text": "private function statusLinux(){\r\n\t\t/*\r\n\t\t * The grep is used to remove the header and get only the PID line\r\n\t\t */\r\n\t\treturn trim(exec(\"ps -p {$this->pid} -F | grep {$this->pid}\"));\r\n\t}", "title": "" }, { "docid": "36d7e01b143f958cb8f401f3fd913f1e", "score": "0.46445638", "text": "public function ping();", "title": "" }, { "docid": "5bce072e40b311e57c40c8a60e9b60bf", "score": "0.46278572", "text": "function CheckMlCommand($address, & $substate) {\n if(!$bodytest=$this->GetSingleBodyPart($this->decoded[0]['Body'],'text/plain')) {\n $bodytest = $this->decoded[0]['Body'];\n }\n $bodytest = ltrim($bodytest,\"\\r\\n <>\");\n //if(eregi(\"^\".$this->GetText('GET',true),$bodytest)) {\n if(preg_match(\"/^\".$this->GetText('GET',true).\"/i\",$bodytest)) {\n if($this->debug) $this->debugOutput .= \"\\nGot command: GET\\n\";\n $this->GetCommand($address,$bodytest);\n return true;\n //} else if(eregi(\"^\".$this->GetText('NOTIFY OWNER',true),$bodytest)) {\n } else if(preg_match(\"/^\".$this->GetText('NOTIFY OWNER',true).\"/i\",$bodytest)) {\n if($this->debug) $this->debugOutput .= \"\\nGot command: NOTIFY OWNER\\n\";\n $this->NotifyOwner($address);\n return true;\n //} else if(eregi(\"^\".$this->GetText('HELP',true),$bodytest)) {\n } else if(preg_match(\"/^\".$this->GetText('HELP',true).\"/i\",$bodytest)) {\n if($this->debug) $this->debugOutput .= \"\\nGot command: HELP\\n\";\n $this->NotifyUser($address,false,\n $this->GetText('HELP SUBJECT',true),\n str_replace('X-Scheduled',$this->scheduledTime,$this->GetText('HELP MESSAGE',true)));\n return true;\n //} else if(eregi(\"^PASSWORD\",$bodytest)) {\n } else if(preg_match(\"/^PASSWORD/i\",$bodytest)) {\n if($this->debug) $this->debugOutput .= \"\\nGot command: PASSWORD\\n\";\n $this->SetUserPassword($address,$bodytest);\n return true;\n //} else if(eregi(\"^\".$this->GetText('SCHEDLIST',true),$bodytest)) {\n } else if(preg_match(\"/^\".$this->GetText('SCHEDLIST',true).\"/i\",$bodytest)) {\n if($this->debug) $this->debugOutput .= \"\\nGot command: SCHEDLIST\\n\";\n echo \"got command: SCHEDLIST; \";\n if(strcasecmp($substate,'mailer') && strcasecmp($substate,'deny')) {\n $mailsubject = $this->GetText('NOTIFY SUBJECT',true).$this->listAddress;\n $mailbody = $this->GetText('SCHEDULED MAIL LIST',true).$this->GetScheduledMails($address);\n $this->NotifyUser($address,false,$mailsubject,$mailbody);\n return true;\n }\n //} else if(eregi(\"^\".$this->GetText('SCHEDDROP',true),$bodytest)) {\n } else if(preg_match(\"/^\".$this->GetText('SCHEDDROP',true).\"/i\",$bodytest)) {\n if($this->debug) $this->debugOutput .= \"\\nGot command: SCHEDDROP\\n\";\n echo \"got command: SCHEDDROP; \";\n if(strcasecmp($substate,'mailer') && strcasecmp($substate,'deny')) {\n $mailsubject = $this->GetText('NOTIFY SUBJECT',true).$this->listAddress;\n $mailbody = $this->DropScheduledMail($address,$bodytest);\n $this->NotifyUser($address,false,$mailsubject,$mailbody);\n return true;\n }\n }\n $bodytest = preg_replace(\"/\\n|\\r|=/\",'',$bodytest);\n if($this->IsSubscription($bodytest, $address,$substate) == true) {\n return true;\n }\n if($this->IsUnsubscription($bodytest, $address,$substate) == true) {\n return true;\n }\n // no ml command\n $this->bodyTextPlain = & $bodytest;\n return false;\n }", "title": "" }, { "docid": "aec8d0bc8d5365362c4cf7916b4e2ae0", "score": "0.4601717", "text": "public function fullstate() {\n $args = array();\n\n $results = $this->sendCommand('status.xml',$args);\n if (is_null($results)) { return null; }\n return $results;\n\n }", "title": "" }, { "docid": "7faa67a612dfc108003f84c28f7dbf5f", "score": "0.459874", "text": "abstract public function status();", "title": "" }, { "docid": "80dd05d3f1f6b4af8f3b74be2c2f32c1", "score": "0.45949993", "text": "public function processCommand($command);", "title": "" }, { "docid": "85110007a792bec509fc8a08bbf5b2cc", "score": "0.45665282", "text": "function swoole_get_vm_status() {}", "title": "" }, { "docid": "9a53211f87558df21eca5646c3a654a9", "score": "0.4564078", "text": "private function isAlive()\n\t{\n\t\treturn !self::$useForks\n\t\t\t || $this->isForked\n\t\t\t\t && 0 === pcntl_waitpid(\n\t\t\t\t\t\t\t$this->child_pid, $s, WNOHANG\n\t\t\t\t\t\t);\n\t}", "title": "" }, { "docid": "551cc468058a5513886368e5448e46e2", "score": "0.45624214", "text": "public static function parseCommand(){\n // 检查运行命令的参数\n global $argv;\n $command = $argv[1];\n\n switch($command) {\n // 启动 phpspider\n case 'start':\n // TODO\n break;\n// case 'stop':\n// exec(\"ps aux | grep $start_file | grep -v grep | awk '{print $2}'\", $info);\n// if (count($info) <= 1) {\n// echo \"PHPSpider[$start_file] not run\\n\";\n// } else {\n// //echo \"PHPSpider[$start_file] is stoping ...\\n\";\n// echo \"PHPSpider[$start_file] stop success\";\n// exec(\"ps aux | grep $start_file | grep -v grep | awk '{print $2}' |xargs kill -SIGINT\", $info);\n// }\n// exit;\n// break;\n// case 'kill':\n// exec(\"ps aux | grep $start_file | grep -v grep | awk '{print $2}' |xargs kill -SIGKILL\");\n// break;\n// // 显示 phpspider 运行状态\n// case 'status':\n// exit(0);\n// // 未知命令\n// default :\n// exit(\"Usage: php yourfile.php {start|stop|status|kill}\\n\");\n }\n\n }", "title": "" }, { "docid": "56eb22af0314317c41b92ac4c8206c4e", "score": "0.4549515", "text": "abstract public function determineStatus($line);", "title": "" }, { "docid": "b939512662f812711ed5cabe58ee5059", "score": "0.45370355", "text": "public function _is_alive()\n\t{\n\t\t$last_alive = Program_status_Model::last_alive();\n\t\t$stale_data_limit = Kohana::config('config.stale_data_limit');\n\t\t$diff = time() - $last_alive;;\n\t\tif ($diff > $stale_data_limit) {\n\t\t\t$this->stale_data = $diff;\n\t\t\t$this->inline_js .= \"$('#infobar-sml').show();\";\n\t\t\t$this->template->inline_js = \"$('#infobar-sml').show();\";\n\t\t}\n\t}", "title": "" }, { "docid": "59d5993924d31031eae6219519d8bf7d", "score": "0.4531224", "text": "public function process() {\n $command = $this->getCommand();\n if ($command != null) {\n $this->verifyCommand($command);\n } else {\n $this->help();\n }\n }", "title": "" }, { "docid": "caa00cd3e941eca8ee266b773ac01109", "score": "0.4518951", "text": "function pingAddress($ip) {\r\n $ping = exec(\"ping -n 2 $ip\", $output, $status);\r\n if (strpos($output[2], 'unreachable') !== FALSE) {\r\n $res. = '<span style=\"color:#f00;\">OFFLINE</span>';\r\n } else {\r\n $res. = '<span style=\"color:green;\">ONLINE</span>';\r\n }\r\n}", "title": "" }, { "docid": "cc7f83d71288d264a9cdc9f2a8c2d49f", "score": "0.45181072", "text": "function ping_status() {\n\t\treturn pings_open( $this->_post ) ? 'open' : 'closed';\n\t}", "title": "" }, { "docid": "91c154cce1a4cfe07474970d02298df6", "score": "0.45068422", "text": "public function ping() {}", "title": "" }, { "docid": "6441ffe005c8992f8f46de93d9724f83", "score": "0.4484574", "text": "function linuxReadInterfaceStatus ($text)\n{\n\t$result = array();\n\t$iface = '';\n\t$status = 'down';\n\t$speed = '0';\n\t$duplex = '';\n\tforeach (explode (\"\\n\", $text) as $line)\n\t{\n\t\t$m = array();\n\t\tif (preg_match ('/^[^\\s].* (.*):$/', $line, $m))\n\t\t{\n\t\t\tif ($iface !== '')\n\t\t\t\t$result[$iface] = array ('status' => $status, 'speed' => $speed, 'duplex' => $duplex);\n\t\t\t$iface = $m[1];\n\t\t\t$status = 'down';\n\t\t\t$speed = 0;\n\t\t\t$duplex = '';\n\t\t}\n\t\telseif (preg_match ('/^\\s*Speed: (.*)$/', $line, $m))\n\t\t\t$speed = $m[1];\n\t\telseif (preg_match ('/^\\s*Duplex: (.*)$/', $line, $m))\n\t\t\t$duplex = $m[1];\n\t\telseif (preg_match ('/^\\s*Link detected: (.*)$/', $line, $m))\n\t\t\t$status = (($m[1] === 'yes') ? 'up' : 'down');\n\t}\n\tif ($iface !== '')\n\t\t$result[$iface] = array ('status' => $status, 'speed' => $speed, 'duplex' => $duplex);\n\treturn $result;\n}", "title": "" }, { "docid": "5cda2e1bd0b082fc0d8be800bee71ebe", "score": "0.4474583", "text": "function checkStatus($path, $name) {\n\t$time = date(\"h:i:sa\");\n\t$output = exec($path);\n\t$match = preg_match(\"/OKAY/\", $output, $matches);\n\tif($match) {\n\t\techo \"[$time] [OKAY] \" . $name . \"\\n\";\n\t} else {\n\t\techo \"[$time] [FAIL] \" . $name . \"\\n\";\n\t\techo \"Reporting\";\n\t\trunOutput(\"./output/notify_phone\", $output);\n\t}\n}", "title": "" }, { "docid": "9b5804999cb97c3362096a80303e6aa1", "score": "0.44730514", "text": "public function action_status()\n\t{\n\t\t$pid = file_exists($this->_config['pid_file'])\n\t\t\t? file_get_contents($this->_config['pid_file'])\n\t\t\t: FALSE;\n\n\t\techo $pid\n\t\t\t? 'TaskDaemon is running at PID: ' . $pid . PHP_EOL\n\t\t\t: 'TaskDaemon is NOT running' . PHP_EOL;\n\n\t\techo 'TaskDaemon has ' . ORM::factory('tasks')->count_all() . ' tasks in queue'.PHP_EOL;\n\t}", "title": "" }, { "docid": "d5be8acdfcbe943d34b9b05012b753ba", "score": "0.44710258", "text": "function connection_status () {}", "title": "" }, { "docid": "34385f33fedefdbf7509f3e78a8da85d", "score": "0.4460793", "text": "public function alive()\n {\n $data = $this->json();\n return $data->status == 'OK';\n }", "title": "" }, { "docid": "0890977f02a1cc5d7c19dadd088d7de6", "score": "0.44201472", "text": "public function ping()/*# : bool */;", "title": "" }, { "docid": "719827d35ce7b2cac0596eaf82a0b198", "score": "0.44093063", "text": "public function list_program_status()\n\t{\n\t\t$db = Database::instance();\n\t\t$sql = \"SELECT instance_name, last_alive, is_running FROM program_status order by instance_name\";\n\t\t$res = $db->query($sql);\n\t\treturn (!$res || count($res) == 0) ? false : $res;\n\t}", "title": "" }, { "docid": "e3b1fe4c3f37e88a0ead3be6dfe5f068", "score": "0.4393172", "text": "public function status()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$pingRequest = $this->connection->createPing();\n\t\t\t$ping = $this->connection->ping($pingRequest);\n\t\t\t$pong = $ping->getData();\n\t\t\t$alive = false;\n\n\t\t\tif (isset($pong['status']) && $pong['status'] === \"OK\")\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tcatch (\\Solarium\\Exception $e)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "42192994679c884e80b9177c1ee3c635", "score": "0.4387806", "text": "public function handle()\n {\n //获取正在直播的主播房间\n $query = AnchorRoom::query()->where('live_status', AnchorRoom::kLiveStatusLiving);\n $query->whereNotNull('start_at');\n $query->where('start_at', '<=', date('Y-m-d H:i', strtotime('-5 minutes')));\n $rooms = $query->get();\n\n echo \"roomCount = \".count($rooms).\"</br>\";\n\n foreach ($rooms as $room) {\n $stream = $room->live_flv;\n if (empty($stream)) {\n $stream = $room->live_m3u8;\n }\n if (empty($stream)) {\n $stream = $room->live_rtmp;\n }\n if (!empty($stream)) {\n $isLive = $this->rtmpStreamCheck($stream, $room->id);\n } else {\n $isLive = false;\n }\n $this->setUnLive($room, $isLive);\n }\n }", "title": "" }, { "docid": "8169c5cb3eb6223e8056964a382b31dc", "score": "0.43853235", "text": "public function isRunning();", "title": "" }, { "docid": "8169c5cb3eb6223e8056964a382b31dc", "score": "0.43853235", "text": "public function isRunning();", "title": "" }, { "docid": "8169c5cb3eb6223e8056964a382b31dc", "score": "0.43853235", "text": "public function isRunning();", "title": "" }, { "docid": "c938edd1a7bdd755fd6763c8e95a165d", "score": "0.43834898", "text": "function monitorMpdState($sock) {\n\tif (sendMpdIdle($sock)) {\n\t\t$status = _parseStatusResponse(MpdStatus($sock));\n\t\treturn $status;\n\t}\n}", "title": "" }, { "docid": "73e88cf4b1d2582d65430c0d45f38b39", "score": "0.43619555", "text": "public function active();", "title": "" }, { "docid": "8efbafa9fcf023281747d2992f3508a6", "score": "0.4349618", "text": "function checkStatus(){\n\t$db = loadPDO();\n\t\n\t//set status to 2 for the show where all available episode have been seen\n\t$statement = $db->prepare(\"\n\tSELECT \n\t\ts.imdbID AS imdbID, \n\tFROM \n\t\ttvShow s \n\tJOIN \n\t\tepisode e ON e.show_imdbID = s.imdbID \n\tWHERE \n\t\t(e.statusForMe = 0 OR e.statusForMe = 1) \n\t\tAND DATE(e.released) <= CURDATE() \n\t\tAND DATE_FORMAT(e.released, '%Y-%m-%d') != 0000-00-00 \n\t\tAND DATE_FORMAT(e.released, '%Y-%m-%d') != '1970-01-01' \n\t\");\n\t$statement->execute();\n\t$result = $statement->fetch();\n\tprint $result;\n}", "title": "" }, { "docid": "dc64259d19e01d9c0382c76d0c1ab8c8", "score": "0.4349148", "text": "public function process() {\n foreach (array_keys($this->propstatNode) as $status) {\n $this->propstatNode[$status]->addChild(new Node('D:status', 'HTTP/1.0 '.$status));\n }\n\n parent::process();\n }", "title": "" }, { "docid": "a91c1d7029d875c791691c0f24427de7", "score": "0.43472922", "text": "public function isCommandRunning()\n {\n // (new \\EduardoArandaH\\AutoHttpTests\\app\\Http\\Middleware\\AutoHttpTests())->isCommandRunning();\n\n // check processes\n $process = new Process([\"ps\", \"ax\"]);\n $process->run();\n\n // if failed, return\n if (!$process->isSuccessful()) {\n return false;\n }\n\n // check if command is running\n $output = $process->getOutput();\n return str_contains($output, \"autohttptest:create\");\n }", "title": "" }, { "docid": "e55b464107a857a5322e3671bfd05908", "score": "0.43343022", "text": "protected function processCommandLine( $argc, $argv )\n {\n }", "title": "" }, { "docid": "b1ea56edbf2a0bbb402fcaf0075a745f", "score": "0.43301624", "text": "public function isRunning()\n {\n #return ( $Cmd >= 1 ) ? true : false;\n }", "title": "" }, { "docid": "cfdc254bbcb901e47f42831dc4cf5e49", "score": "0.431221", "text": "public function command() {\n\t\t$this->say($this->get_advice());\n\t}", "title": "" }, { "docid": "2d24a623308cf22e768ff1e250bb423b", "score": "0.43087465", "text": "public function state() {\n\n $args = array();\n\n $results = $this->sendCommand('status.xml',$args);\n $currentstat = $results['root']['state']['value'];\n\n if ($currentstat == 'playing') { $state = 'play'; }\n if ($currentstat == 'stop') { $state = 'stop'; }\n if ($currentstat == 'paused') { $state = 'pause'; }\n\n return $state;\n\n }", "title": "" }, { "docid": "b5c49c115344ecfa489fe0f51b23a524", "score": "0.43063906", "text": "public function status();", "title": "" }, { "docid": "b5c49c115344ecfa489fe0f51b23a524", "score": "0.43063906", "text": "public function status();", "title": "" }, { "docid": "b5c49c115344ecfa489fe0f51b23a524", "score": "0.43063906", "text": "public function status();", "title": "" }, { "docid": "b5c49c115344ecfa489fe0f51b23a524", "score": "0.43063906", "text": "public function status();", "title": "" }, { "docid": "0c41fdd103787212c35279286fc8c799", "score": "0.43012413", "text": "abstract public function get_status();", "title": "" }, { "docid": "5a56d8cacb2824609fa53bf69f182fbe", "score": "0.42986333", "text": "private function checkActivity() {\n\t\t$this->log(\"[check_activity] checking sockets\");\n\t\tforeach ($this->_mSockets as $name => $socketData) {\n\t\t\tif (($diff = (time() - $socketData->mLastActivityTime)) > Config::MAX_CLIENT_INACTIVITY_TIME) {\n\t\t\t\t$this->log(\"[check_activity] socket {$name} inactive {$diff} s, closing socket\");\n\t\t\t\tif ($this->isBadSocket($socketData->mSocket)) {\n\t\t\t\t\t$this->log(\"[check_activity] socket is bad, removing from list\");\n\t\t\t\t\tunset($this->_mSockets[$name]);\n\t\t\t\t} else {\n\t\t\t\t\t$this->closeSocket($socketData->mSocket);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->log(\"[check_activity] checking processes\");\n\t\tforeach ($this->_mProcesses as $processData) {\n\t\t\tif (($diff = (time() - $processData->mLastActivityTime)) > Config::MAX_PROCESS_INACTIVITY_TIME) {\n\t\t\t\t$this->log(\"[check_activity] process pid:{$processData->mPid} name:{$processData->mName} inactive {$diff} s, closing process\");\n\t\t\t\t$pid = $processData->mPid;\n\t\t\t\tif ($pid) {\n\t\t\t\t\t$this->destroyProcess($processData->mName);\n\t\t\t\t} else {\n\t\t\t\t\t$this->log(\"[check_activity] pid is empty, ignoring, status: \".proc_get_status($processData->mProcess));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e87caaff6cc13bca54bd327ffbd5f5e7", "score": "0.42929453", "text": "function _voip_asterisk_ping($server_config) {\n\n $ami_host = $server_config['voip_asterisk_host'];\n $ami_port = $server_config['voip_asterisk_port'];\n $ami_host = ($ami_port)? $ami_host.':'.$ami_port : $ami_host;\n $ami_user = $server_config['voip_asterisk_user'];\n $ami_pass = $server_config['voip_asterisk_password'];\n\n voip_error_reset();\n\n $result = _voip_asterisk_manager()->connect($ami_host, $ami_user, $ami_pass);\n if(voip_error()) {\n voip_error(\"Connection to Asterisk manager failed: \" . voip_error_message());\n return FALSE;\n }\n\n $result = _voip_asterisk_manager()->Ping();\n if($result['Response'] != 'Success'){\n voip_error(\"AMI command Ping failed: \" . print_r($result, TRUE));\n return FALSE;\n }\n\n _voip_asterisk_manager()->disconnect();\n return TRUE;\n}", "title": "" }, { "docid": "1de532ea973e69bbca8415a2482201d8", "score": "0.42858225", "text": "function ah_keepalive(){\n\t}", "title": "" }, { "docid": "b5761bacb548f0def0239bb018842d33", "score": "0.42799613", "text": "private function procGetStatus() {\n // before it starts returning garbage. Make sure we don't throw away the\n // last good read.\n if ($this->procStatus) {\n if (!$this->procStatus['running']) {\n return $this->procStatus;\n }\n }\n $this->procStatus = proc_get_status($this->proc);\n return $this->procStatus;\n }", "title": "" }, { "docid": "fd0f171785f996d0b3105a3a78fb7a7b", "score": "0.42743078", "text": "function complete($input,$index,$info) {\n $full_input = substr($info['line_buffer'], 0, $info['end']);\n\n // Initialize an empty array for our return data and then get all the\n // matches based on the entire input buffer.\n $matches = array();\n foreach ($this->commands as $phrase) {\n // Add any matches to the return array\n if (substr($phrase,0,strlen($input)) == $input) {\n $matches[] = $phrase;\n }\n }\n // And return it\n return $matches;\n \n }", "title": "" }, { "docid": "66b57306982fbf30e44d30bd76416b8d", "score": "0.42722726", "text": "public function processCommandPending() {\n $statusCode = $this->updateSoftware();\n if ($statusCode!=200) echo \"ERROR updating files: \".$this->yellow->page->get(\"pageError\").\"\\n\";\n echo \"Your website has \".($statusCode!=200 ? \"not \" : \"\").\"been updated: Please run command again\\n\";\n return $statusCode;\n }", "title": "" }, { "docid": "f3230e08a5700ad94766122c74015311", "score": "0.42652196", "text": "public function isAlive(): bool\n {\n return ($this->health > 0);\n }", "title": "" }, { "docid": "59a9e292e14fddd9afe17421c5a3722e", "score": "0.42502332", "text": "public function handle()\n {\n $viewableArray = $this->argument('viewable');\n\n // Validate arguments\n $this->validate($viewableArray);\n\n $this->iterateViewable(function ($viewable) {\n $stats = $this->getStats($viewable);\n\n $this->updateCount($viewable, (array)$stats);\n\n $this->resetStats($viewable);\n });\n }", "title": "" }, { "docid": "f4334423c78c0f5de1dbf18ecf10c56c", "score": "0.42444983", "text": "public function status(&$output=null){\r\n\t\tif($this->pid){\r\n\t\t\tif($this->getOS() == self::OS_WINDOWS ){\r\n\t\t\t\t$output = $this->statusWindows();\r\n\t\t\t}else{\r\n\t\t\t\t$output = $this->statusLinux();\r\n\t\t\t}\r\n\t\t\tif($output){\r\n\t\t\t\t$result = self::PROCESS_RUNNING;\r\n\t\t\t}else{\r\n\t\t\t\t$result = self::PROCESS_KILLED;\r\n\t\t\t}\r\n\t\t}\r\n\t\techo __METHOD__ . \" Status: $result\\n\";\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "1ed245aab943da8856d5b704caf49fd2", "score": "0.42439452", "text": "function isLongLived();", "title": "" }, { "docid": "11eb2b3e79f8c836074d65065b7eb3ec", "score": "0.42403558", "text": "public function testIsAlive()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "ff203b07205083d427b262cd727b00fa", "score": "0.42402887", "text": "function isRunning()\n{\n $s = shell_exec('ps aux | grep cli.php | grep -v grep');\n return strlen($s) > 0;\n}", "title": "" }, { "docid": "3e612d5209b05d4a7c8c40b624e5c048", "score": "0.423153", "text": "public function ping() {\n\n $args = $this->args;\n $args[ \"method\" ] = __FUNCTION__;\n\n $res = $this->call($args);\n if ($res)\n return $res[ \"result\" ];\n }", "title": "" }, { "docid": "c379f7dcd0024bcc5b947fbbc01d6905", "score": "0.4229958", "text": "abstract protected function handleCommand();", "title": "" }, { "docid": "61c21bd72591d730519a46bbdbdf2215", "score": "0.4228204", "text": "public function isAlive() {\n\n\t\t\tif ($this->health > 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "96ac683ac4fd284be255194d661bd39e", "score": "0.42265862", "text": "function keepaliveAction() {\n \n }", "title": "" }, { "docid": "40a05451c45ed0a7998633c920ec8246", "score": "0.42188773", "text": "function executeViewTagsWithStatus()\n {\n // Get all the tags\n $this->tagStatusArray = $this->artwork->getTags(true, true);\n }", "title": "" }, { "docid": "42737141876abdee64aaac01db9b3f39", "score": "0.42060333", "text": "function ping($PC,$ip){\r\n$cmd=shell_exec(\"ping -c 1 -w 1 $ip\");\r\n\r\n $dati_mount=explode(\",\",$cmd);\r\n if (eregi (\"0\", $dati_mount[1], $out)) {$connesso=\"<img src=\\\"off.gif\\\">\";}\r\n if (eregi (\"1\", $dati_mount[1], $out)) {$connesso=\"<img src=\\\"on.gif\\\">\";}\r\n $esito=\"$connesso [$ip] <b>$PC</b><br>\";\r\nreturn $esito;\r\n}", "title": "" }, { "docid": "42df383ceb7efb39627fc9d7aa542833", "score": "0.4204715", "text": "function getHostStatus()\n {\n $url = $this->getConf('icingaApiUrl').\"host/filter[AND(HOST_CUSTOMVARIABLE_NAME|=|trafficManager)]/columns[HOST_NAME|HOST_CURRENT_STATE|HOST_OUTPUT|HOST_LAST_CHECK|HOST_NEXT_CHECK|HOST_CUSTOMVARIABLE_NAME|HOST_CUSTOMVARIABLE_VALUE]/authkey=\".$this->getConf('icingaAuthKey').\"/json\";\n\n\n //A number that corresponds to the current state of the host: 0=UP, 1=DOWN, 2=UNREACHABLE.\n $response = file_get_contents($url);\n $results = json_decode ($response,true);\n\n return $results['result'];\n\n }", "title": "" }, { "docid": "433a6b40fe948540d209de65cf621a7e", "score": "0.42021117", "text": "function dlinkReadInterfaceStatus ($text)\n{\n\t$result = array();\n\tforeach (preg_split (\"/\\n\\r?/\", $text) as $line)\n\t{\n\t\tif (!preg_match ('/^\\s*\\d+/', $line))\n\t\t\tcontinue;\n\t\t$w = preg_split ('/\\s+/', strtolower($line));\n\t\tif (count($w) != 5)\n\t\t\tcontinue;\n\t\t$portname = $w[0];\n\t\tif ($w[1] != 'enabled')\n\t\t\t$result[$portname] = array ('status'=>'disabled', 'speed'=>0, 'duplex'=>'');\n\t\telseif ($w[3] == 'linkdown')\n\t\t\t$result[$portname] = array ('status'=>'down', 'speed'=>0, 'duplex'=>'');\n\t\telse\n\t\t{\n\t\t\t$s = explode ('/', $w[3]);\n\t\t\t$result[$portname] = array ('status'=>'up', 'speed'=>$s[0], 'duplex'=>$s[1]);\n\t\t}\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "1dbbd578d023caa63c5bf8ad865bbed3", "score": "0.41954494", "text": "public function checkpid() {\n\n if($this->pid()){\n return $this->respond([\"message\" => \"process is running...\"]);\n }\n\n return $this->respond([\"message\" => \"process has stopped...\"]);\n\n }", "title": "" }, { "docid": "9513c5cf85cc43fd4323eef0d6b498aa", "score": "0.41929147", "text": "public static function last_alive()\n\t{\n\t\t$db = Database::instance();\n\t\t$sql = \"SELECT last_alive FROM program_status WHERE instance_id = 0\";\n\t\t$res = false;\n\t\ttry {\n\t\t\t$res = $db->query($sql);\n\t\t} catch (Kohana_Database_Exception $e) {\n\t\t\t/* FIXME: This should be logged to file perhaps? */\n\t\t\topenlog(\"ninja\", LOG_PID, LOG_USER);\n\t\t\tsyslog(LOG_ERR, \"last_alive() failed: $e\");\n\t\t\tcloselog();\n\t\t}\n\t\t$cur = ($res && count($res)) ? $res->current() : false;\n\t\treturn $cur ? $cur->last_alive : false;\n\t}", "title": "" }, { "docid": "64f416afc77176bc9092e6762a8c96d7", "score": "0.41851297", "text": "public function executeCommands(){\n foreach ($this->getCommands() as $command) {\n if(!$this->$command()) {\n $this->outOfBattery = true;\n //logging\n $commandLogMsg = ' Battery is out ';\n $this->writeToConsole($commandLogMsg);\n $this->writeToLog($commandLogMsg);\n\n break;\n }\n\n }\n }", "title": "" }, { "docid": "0f0a497f06054a984ee2ff9ba2be51a9", "score": "0.41645858", "text": "private function processCommands() {\n\n $command = $this->getCommand();\n\n switch ($command) {\n case '/start': {\n $this->processCommandStart();\n break;\n }//E# case statement\n default:\n }//E# switch statement\n\n return true;\n }", "title": "" }, { "docid": "2e7e58255e23394aea47df9199ecd01e", "score": "0.41635612", "text": "function socket_get_status ($fp) {}", "title": "" }, { "docid": "01a673b3af3d378d9f1f41c9e6b4aaeb", "score": "0.41622338", "text": "function push_hangup() {\n $resp = $this->agi->get_variable('AGISTATUS');\n $AGISTATUS = $resp['data'];\n\n // Who hung up the phone ?\n if ($AGISTATUS != 'HANGUP') {\n $this->push_event('HANGUP', \"$this->called_number,$this->called_name\");\n } else {\n $this->push_event('HANGUP', \"$this->caller_number,$this->caller_name\");\n }\n }", "title": "" }, { "docid": "ae47e72dca4ff495bc6df3046a3036ae", "score": "0.41606638", "text": "public function parseCommand(string $command): array;", "title": "" }, { "docid": "b25c92c00b76de863f4ec3b3d7133f25", "score": "0.41538006", "text": "protected function alive()\n {\n // Invalid or non-existent handler\n if (!$this->fp || !is_resource($this->fp)) return false;\n $response = @socket_get_status($this->fp);\n if (!$response || $response['timed_out']) return false;\n return true;\n }", "title": "" }, { "docid": "9b5bab36199c80f577ef3278e5a4b075", "score": "0.41521788", "text": "abstract protected function processRegular();", "title": "" }, { "docid": "c7d65a3e614109c05a5c24edca490cf6", "score": "0.41501194", "text": "public function handle()\n {\n \n\n // $processFind = Process::fromShellCommandline('sudo whoami');\n // $processFind->run();\n // dd($processFind->getOutput());\n \n\n $app_id=$this->argument('id')??0;\n $app=DB::table('apps')->where('id',$app_id)\n ->first();\n $listing_pid=[];\n\n if($app){\n\n for ($i=0; $i <3 ; $i++) { \n $f='sudo ps aux | grep \"nodemon[ ].*.user-'.$app->user_id.'/app-'.$app->id.'/app.js\"';\n\n \n $processFind = Process::fromShellCommandline($f);\n $processFind->run();\n \n if($processFind->getOutput()){\n\n $processFind=explode(\"\\n\",$processFind->getOutput());\n if(count($processFind)){\n $re=null;\n foreach($processFind as $p){\n if(strpos($p,'app/WaBot/Production/user-'.$app->user_id.'/app-'.$app->id.'/app.js')!==false){\n $re=$p;\n $this->info($p);\n }\n }\n if($re){\n $processFind=[];\n $processFind=array_values(array_filter(explode(' ', $re)));\n }\n\n }else{\n $processFind=[];\n }\n\n // $this->info($processFind[1],'pid');\n\n\n if(isset($processFind[1])){\n $listing_pid[]=$processFind[1];\n \n $killProcess = Process::fromShellCommandline('sudo kill -15 '.$processFind[1]);\n $killProcess->run();\n \n }\n }\n }\n sleep(1);\n\n if(($this->options()['kill'])){\n\n return $app->name.\" 15\";\n \n\n }else{\n\n $C='nodemon --watch '.app_path('WaBot/Production/user-'.$app->user_id.'/app-'.$app->id.'/app.js'.' '.app_path('WaBot/Production/user-'.$app->user_id.'/app-'.$app->id.'/app.js'));\n \n $p= shell_exec($C.\" >/dev/null >/dev/null &\");\n \n dd($p);\n\n \n return $app->name. \" new initialized \";\n\n }\n\n \n }\n\n \n \n return 0;\n }", "title": "" }, { "docid": "e837580389f74c2e1c35d11e84116e4e", "score": "0.4144703", "text": "public function handle()\n {\n $this->relay_id = $this->argument('relay_id');\n $relayLive = LiveRelay::where('id', $this->relay_id)->first();\n if(!$relayLive){\n return;\n }\n $this->expired_at = strtotime($relayLive->expired_at);\n if(time() >= $this->expired_at){\n return;\n }\n\n $this->from_room_id = $relayLive->from_room;\n $this->to_room_id = $relayLive->to_room;\n\n $from_room = Room::where('id', $this->from_room_id)->first();\n $to_room = Room::where('id', $this->to_room_id)->first();\n\n if($from_room && $to_room){\n $from_stream_name = $from_room->streams_name;\n $to_stream_name = $to_room->streams_name;\n $from_live_status = liveStatus($from_stream_name);\n $to_live_status = liveStatus($to_stream_name);\n if(!isset($from_live_status['status']) && isset($to_live_status['status'])){\n // 转播的直播正在播放并且to直播没有播放才能转播\n $playUrl = playUrl($from_stream_name);\n $publishUrl = publishUrl($to_stream_name);\n $this->setRelayRoom($this->from_room_id);\n $commandLine = $this->buildCommandLine($playUrl, $publishUrl);\n $this->process = new Process($commandLine);\n $this->process->setTimeout(0);\n try{\n $this->process->run(function ($type, $data){\n $this->info($data);\n if($this->expired_at <= time() || RelayCancel::cancelAble($this->to_room_id)){\n $this->setRelayRoom(null);\n RelayCancel::removeCancel($this->to_room_id);\n $this->process->stop();\n }\n });\n }catch (\\Exception $e){\n $this->error($e->getMessage());\n RelayCancel::removeCancel($this->to_room_id);\n $this->process->stop();\n $this->setRelayRoom(null);\n }\n }\n }\n }", "title": "" }, { "docid": "016718bc157a0dfc51fa9482c775ad36", "score": "0.41330728", "text": "static public function AOpened () {\n\t\tstatic $inst = null;\n\t\tif (!$inst) $inst = new AnonStatus('AOpened', 1, []);\n\t\treturn $inst;\n\t}", "title": "" }, { "docid": "aef44c3db0a0032bf5dfdb3373aec78c", "score": "0.41276926", "text": "public function handle()\n {\n //\n $this->binUid=$this->argument('binUid');\n $this->targetPath=$this->argument('targetPath');\n $this->info('Variable binUid: '.$this->binUid);\n $this->info('Variable targetPath: '.$this->targetPath);\n $this->info('Reaching HookAthon server ...');\n $this->fetchToken();\n $this->info('Instance token: '.$this->token);\n $this->fetchBin();\n foreach ($this->bin->requests as $request) {\n $this->info('request_uid: '.$request->uid);\n $this->dispatchRequest($request);\n }\n //$this->info($this->token);\n }", "title": "" }, { "docid": "9b5071f5882a01398c2b25e1f2a05c9c", "score": "0.41219622", "text": "public function handle()\n {\n $this->info('start');\n $countList = DB::connection('app38')\n ->table('lc_user')\n ->where('level', '>=',2)\n ->get(['id','history_active_value'])\n ;\n $time30 = \"1530288000\";\n\n foreach ($countList as $singleValue){\n $this->info('-------------------------'.$singleValue->id);\n $this->info($singleValue->history_active_value);\n\n $userActive= DB::connection('app38')\n ->table('lc_active_every_days')\n ->where(['time'=>$time30,'uid'=>$singleValue->id])\n ->first(); \n\t\t\t\t\n\t\t\tif($userActive){\n\t\t\t\t$jsonValTemp = $userActive->context;\n\t\t\t}else{\n\t\t\t\t$jsonValTemp = '{}';\n\t\t\t}\n\n $this->info($jsonValTemp);\n $arrVal = json_decode($jsonValTemp,true);\n $newActive = @array_sum($arrVal);\n\n if ($newActive>$singleValue->history_active_value){ \n $this->info('OK'.$newActive.'--'.$singleValue->history_active_value);\n DB::connection('app38')\n ->table('lc_user')\n ->where('id',$singleValue->id)\n ->update(['history_active_value'=>$newActive]);\n\n\n }else{\n $this->info('NO');\n }\n }\n }", "title": "" }, { "docid": "f7ee02993b17461174e3c2dcf9ad302e", "score": "0.4120822", "text": "public function handle(){\n $response = $this->sendStatusRequest();\n if(is_null($response)){\n $this->error('Bad response from status server');\n }\n $info = $this->getInfoForOutputTable($response);\n $this->table(['name', 'status', 'description'], $info);\n }", "title": "" }, { "docid": "850c8f794cd29e6019b56c26ca7b4473", "score": "0.41188917", "text": "abstract protected function __daemon_listen();", "title": "" }, { "docid": "d379faf0473c2ba97cc55934fa148cd4", "score": "0.41170448", "text": "public function processActive(MessageInterface $message)\n {\n\n // set new state\n $this->messageStates[$message->getMessageId()] = StateToProcess::KEY;\n }", "title": "" }, { "docid": "f45a0ba825934df07859a86b7220207c", "score": "0.41105318", "text": "function listen() {\n if ($this->config['kernel_tick']) {\n $this->config['kernel_tick'] = (11 * 1000);\n\t}\n\t\n socket_set_blocking($this->connection, false);\n while (!feof($this->connection)) {\n usleep($this->config['kernel_tick']);\n $this->buffer['raw'] = trim(fgets($this->connection, 4096));\n\n // If all is quiet, proceed once per second. (letting modules do timed events)\n if (strlen($this->buffer['raw']) <= 0) {\n if ($t == time())\n continue;\n }\n \n $t = time();\n\n // respond to PINGs\n if (substr($this->buffer['raw'], 0, 6) == 'PING :') {\n $this->send('PONG :' . substr($this->buffer['raw'], 6));\n continue;\n }\n\n // make sense of the buffer\n $this->parseBuffer();\n\n if ($this->buffer['0'] != '') {\n if (!isset($this->buffer['channel']))\n $this->buffer['channel'] = \"\";\n $c = str_replace(\":\", \"\", $this->buffer['channel']);\n if (strcmp($this->buffer['channel'], $c) == 0 \n && strpos($this->buffer['channel'], ':') !== true \n && isset($this->buffer['text'])) {\n $this->output(date(\"[d/m @ H:i:s]\") . \" [\" . $c . \"] \" \n . $this->buffer['text']);\n } elseif (isset($this->buffer['text'])) {\n $this->output(date(\"[d/m @ H:i:s]\") . \" (\" \n . $this->buffer['channel'] . \") <\" \n . $this->buffer['username'] . \"> \" \n . $this->buffer['text']);\n }\n }\n // now process any commands issued to the bot\n $this->process();\n }\n }", "title": "" }, { "docid": "aca097592dae3de925e057ab0cc88f03", "score": "0.4110351", "text": "public function status(&$messages, &$octets)\r\n {\r\n\t\tif (!$this->authStatus) \r\n throw new Exception('Not Authenticated! Cannot call status until authenticated');\r\n\r\n $messages = 0;\r\n $octets = 0;\r\n $result = $this->request('STAT');\r\n\r\n list($messages, $octets) = explode(' ', $result);\r\n }", "title": "" }, { "docid": "dc6d8efe9510d72d2206b8f539d4ae2c", "score": "0.41037628", "text": "public function process();", "title": "" }, { "docid": "dc6d8efe9510d72d2206b8f539d4ae2c", "score": "0.41037628", "text": "public function process();", "title": "" } ]
e7cf7dd03e75ddf9f4d2fac56fe15a7e
Display the specified visitasiapotek.
[ { "docid": "417ffc32101d7bac94f451a9dcf1fb1a", "score": "0.0", "text": "public function show($id)\n\t{\n\t\t$verifikasi = Pengguna::findOrFail($id);\n\n\t\treturn View::make('visitasilabklinikumums.show', compact('verifikasi'));\n\t}", "title": "" } ]
[ { "docid": "9e56ec85c647d3580ac9ef0967be3c55", "score": "0.7202029", "text": "public function show(Visit $visit)\n {\n //\n }", "title": "" }, { "docid": "b09ed2317e2bfb1e24327de3a641a4d2", "score": "0.69500285", "text": "public function show($acara, $panitia)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "efa06f573f4dcffff3f80ab9e263c0a0", "score": "0.6923909", "text": "public function show(Labarugi $labarugi)\n {\n //\n }", "title": "" }, { "docid": "0b9d9f3e41e193211ef6b889f9f9c051", "score": "0.69158393", "text": "public function show(Kavomati $kavomati)\n {\n //\n }", "title": "" }, { "docid": "9b46cd87065fe2f010f089440ab0cc0e", "score": "0.6778175", "text": "public function show(Asignatura $asignatura)\n {\n //\n }", "title": "" }, { "docid": "e001ab9d526fb145c2654fe8a4357862", "score": "0.67451453", "text": "public function show(Tenaga_Kerja $tenaga_Kerja)\n {\n //\n }", "title": "" }, { "docid": "9d7588568480d15a54fc5d5b420081e5", "score": "0.66985095", "text": "public function show(KerangkaKerja $kerangkaKerja)\n {\n //\n }", "title": "" }, { "docid": "ed48db5fd4879977956818cba57fa89b", "score": "0.66836786", "text": "public function show(pegawai $pegawai)\n {\n //\n }", "title": "" }, { "docid": "2c9090a307b28aaab18080d2d0eb4b3f", "score": "0.6661197", "text": "public function show(Pasien $pasien)\n {\n\n }", "title": "" }, { "docid": "c836b6b9d10df09c01e6375c9a1dbe1b", "score": "0.6640284", "text": "public function show(Teknologi $teknologi)\n {\n //\n }", "title": "" }, { "docid": "42e874d7180b816b0d139bb3341179d5", "score": "0.6620426", "text": "public function show(Infografis $infografis)\n {\n //\n }", "title": "" }, { "docid": "62d03f3b466efb6a7f5bcb9a7d54715c", "score": "0.6610053", "text": "public function show(LabaRugi $labaRugi)\n {\n //\n }", "title": "" }, { "docid": "e72d1983ea977a79dc888207d00a3569", "score": "0.6606321", "text": "public function show(Pajak $pajak)\n {\n //\n }", "title": "" }, { "docid": "9b1f2e52c6593f375ec19fafa522c8df", "score": "0.6602024", "text": "public function show(Vaksin $vaksin)\n {\n //\n }", "title": "" }, { "docid": "45a2b7f47f26be38e7cf9543b4e51af4", "score": "0.65990525", "text": "public function show(MataKuliah $mataKuliah)\n {\n //\n }", "title": "" }, { "docid": "6dea3a5f3ad77d43afd5e05d2a06dc77", "score": "0.6591927", "text": "public function show(Pemeriksa $pemeriksa)\n {\n //\n }", "title": "" }, { "docid": "cfe59680c8a9a02022d8982345896c05", "score": "0.658993", "text": "public function show(Asignacion $asignacion)\n {\n //\n }", "title": "" }, { "docid": "c7f3e7b9707cfc5c422d6b064a20c933", "score": "0.6567335", "text": "public function show(InfoInstancia $infoInstancia)\n {\n //\n }", "title": "" }, { "docid": "c3aedccb4009c9f73a6bfeb33665d840", "score": "0.6555747", "text": "public function show(Teaket $teaket);", "title": "" }, { "docid": "050fc9484fbeb3ba36a28f28b1f4ff55", "score": "0.6548297", "text": "public function show(Soal $soal, PilihanJawaban $pilihanJawaban)\n {\n //\n }", "title": "" }, { "docid": "7ab6a0c37e1e11574dbde7a472684400", "score": "0.6547047", "text": "public function show(Angkatan $angkatan)\n {\n //\n }", "title": "" }, { "docid": "488d32cdbb011cb79af3a857ed97e40a", "score": "0.6546639", "text": "public function show(Jabatan $jabatan)\n {\n //\n }", "title": "" }, { "docid": "557035cffac3ffc569091277664490a0", "score": "0.65430915", "text": "public function show(sewa_PAKET $sewa_PAKET)\n {\n //\n }", "title": "" }, { "docid": "cb1650e6b8ac7b569d96df40369c28dd", "score": "0.65371", "text": "public function show(Jenjang $jenjang)\n {\n //\n }", "title": "" }, { "docid": "3c80a23fe5e0ae9f64b9f9e6b10c466b", "score": "0.6528406", "text": "public function show(Pemilik $pemilik)\n {\n //\n }", "title": "" }, { "docid": "5f501be06072a7488f5e6102a639f9af", "score": "0.6518229", "text": "public function show(peserta $peserta)\n {\n //\n }", "title": "" }, { "docid": "042f35b5ac89dcbde2c63873527b09bc", "score": "0.65124065", "text": "public function show(PaketPekerjaan $paketPekerjaan)\n {\n //\n }", "title": "" }, { "docid": "909d93d82f8d2ca52ffec0d048b47615", "score": "0.6506128", "text": "public function show(CodisGravetat $theobj)\n {\n //\n }", "title": "" }, { "docid": "fd23902c71886766d3eaa60a8bc4475e", "score": "0.65055394", "text": "public function show(Keluarga $keluarga)\n {\n //\n }", "title": "" }, { "docid": "8517c2c3288e9b0effa28d0e91d0a0d0", "score": "0.6500896", "text": "public function show(Pengalaman $pengalaman)\n {\n //\n }", "title": "" }, { "docid": "e95eda456d869b32ad7b3593d3ed8663", "score": "0.6500798", "text": "public function show(kartustok $kartustok)\n {\n //\n }", "title": "" }, { "docid": "f900b2c17769ee0baf08b4c63ceb9b8a", "score": "0.6494676", "text": "public function show(jawaban_soal $jawaban_soal)\n {\n //\n }", "title": "" }, { "docid": "5ef4523207936e03ddfdb7ad06d70a4e", "score": "0.6491236", "text": "public function show(Locatie $locatie)\n {\n //\n }", "title": "" }, { "docid": "ac19ef3aab885d5af649171287a9f861", "score": "0.6483222", "text": "public function show(pelajaran $pelajaran)\n {\n //\n }", "title": "" }, { "docid": "dbe797e2692cfa67f4ce6f60d8662308", "score": "0.64726526", "text": "public function show(Asigxcurso $asigxcurso)\n {\n //\n }", "title": "" }, { "docid": "c1459d70c87ecdca4ad2ef415f790313", "score": "0.64720994", "text": "public function show(Kontak $kontak)\n {\n //\n }", "title": "" }, { "docid": "801c6e850ac0889caa8f0d9862b25c38", "score": "0.64663637", "text": "public function show(Sociallink $sociallink)\n {\n //\n }", "title": "" }, { "docid": "0e154bfd09d2c4c9ca10862106bb574a", "score": "0.646269", "text": "public function show(Hasil_Temuan $hasil_Temuan)\n {\n //\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.6458366", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.6458366", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d31795cd08b4a1b0d9917b89912bd639", "score": "0.6447396", "text": "public function show(KepalaKeluarga $kepalaKeluarga)\n {\n //\n }", "title": "" }, { "docid": "3fc66d0a2438ba4e7245dc3093ab18c6", "score": "0.6446363", "text": "public function show(Semak $semak)\n {\n //\n }", "title": "" }, { "docid": "9d535e83a52ef5826a290dce27e73dac", "score": "0.64422053", "text": "public function show(komentar $komentar)\n {\n //\n }", "title": "" }, { "docid": "1d426b3ad4f059482911cc01ac38ac06", "score": "0.64357555", "text": "public function show(ResultAtividade $resultAtividade)\n {\n //\n }", "title": "" }, { "docid": "c629c038430092f68528295b12cb99a9", "score": "0.6431047", "text": "public function show(Anggota $anggota)\n {\n //\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.6429374", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "a88bfbbc2ff37651bfeae25cbdc9c4db", "score": "0.6426348", "text": "public function show(Puesto $puesto)\n {}", "title": "" }, { "docid": "2264852f48c6f777b72d120dd6f3df68", "score": "0.642158", "text": "public function show(pengampu $pengampu)\n {\n //\n }", "title": "" }, { "docid": "435a7e071bf117083955b2608e44a2a4", "score": "0.6410144", "text": "public function show(Jawaban $jawaban)\n {\n //\n }", "title": "" }, { "docid": "3b0dbec20672219e163037dc4174a798", "score": "0.64060426", "text": "public function show(Pengabdian $pengabdian)\n {\n //\n }", "title": "" }, { "docid": "dcad9eca6606cb1210c6c3da9da00c58", "score": "0.6404615", "text": "public function show(Vat $vat)\n {\n //\n }", "title": "" }, { "docid": "d8b71cb8d170d0a4c493263440d55b23", "score": "0.64032096", "text": "public function show(Patrocinadores $patrocinadores)\n {\n //\n }", "title": "" }, { "docid": "8302a7f8b8be7cc5b8659a099ea6d313", "score": "0.6393946", "text": "public function show(Uang $uang)\n {\n //\n }", "title": "" }, { "docid": "ef04c908ceb1c43e4e8e3daf7e9514ff", "score": "0.6386755", "text": "public function show(Avalia $avalia)\n {\n\n }", "title": "" }, { "docid": "af59a58ed80bfbf32f9c1b8dda46fe0a", "score": "0.63844395", "text": "public function show(Layanan $layanan)\n {\n //\n }", "title": "" }, { "docid": "905d41fe36283ab626c408896baf60b1", "score": "0.6381536", "text": "public function show(Caja $caja)\n {\n //\n }", "title": "" }, { "docid": "1e5178fa75a182683686fd4d9d9b1b82", "score": "0.6377187", "text": "public function show(Parcela $parcela)\n {\n //\n }", "title": "" }, { "docid": "5ec78de647583d845b5bfdf04efd863c", "score": "0.6372188", "text": "public function cambiarVista()\n {\n $vista = $_GET['nombreVista'];\n $this->view->show($vista);\n }", "title": "" }, { "docid": "1eedca4ba72a90a807a2f92511283570", "score": "0.6370399", "text": "public function show()\n\t{\n\n\n\t}", "title": "" }, { "docid": "5982ad849ef33bb05b3f78cc5383b567", "score": "0.6362083", "text": "public function show(Karta $karta)\n {\n //\n }", "title": "" }, { "docid": "6d38b6a36d49f58745c2f38131822170", "score": "0.6359499", "text": "public function show(Prestasi $prestasi)\n {\n //\n }", "title": "" }, { "docid": "8221991fb7d226560627a871ac614936", "score": "0.63519895", "text": "public function show(Festival $festival)\n {\n //\n }", "title": "" }, { "docid": "0984b89298d9e6fd47ef40b8af9def05", "score": "0.635114", "text": "public function show()\n {\n\t\t//$result = $a->selectAll();\n include(\"view/bureau.html\");\n }", "title": "" }, { "docid": "bb3a3172930087aed36e12b482c00400", "score": "0.6339247", "text": "public function show(Chalenge $chalenge)\n {\n //\n }", "title": "" }, { "docid": "0c47c910a5dfc884ce345f2af76da236", "score": "0.6337475", "text": "public function show(Transaksi $transaksi)\n {\n //\n }", "title": "" }, { "docid": "0c47c910a5dfc884ce345f2af76da236", "score": "0.6337475", "text": "public function show(Transaksi $transaksi)\n {\n //\n }", "title": "" }, { "docid": "fef5c57d1d3e09f8842e0a6310c10e75", "score": "0.6329264", "text": "public function show(galeri $galeri)\n {\n //\n }", "title": "" }, { "docid": "aea659b036728c90c7510499a0e715e6", "score": "0.6319934", "text": "public function show(Rekruitasi $rekruitasi)\n {\n //\n }", "title": "" }, { "docid": "d194937e93cd3becdd1f53d753013532", "score": "0.6314924", "text": "public function show(Pelicula $pelicula)\n {\n //\n }", "title": "" }, { "docid": "dca9a45b70cba1bfd54ba2a35acf21b1", "score": "0.6311674", "text": "public function show(Cita $cita)\n {\n //\n }", "title": "" }, { "docid": "dca9a45b70cba1bfd54ba2a35acf21b1", "score": "0.6311674", "text": "public function show(Cita $cita)\n {\n //\n }", "title": "" }, { "docid": "d1fd4bc8e7dac1e0eb105a055a3c2c85", "score": "0.63080734", "text": "public function show(Pemetaan $pemetaan)\n {\n //\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.63058066", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "0a4b81546b2d31fa695f2121e3535391", "score": "0.63051", "text": "public function show(KomentarProduk $komentarProduk)\n {\n //\n }", "title": "" }, { "docid": "cdd8c18cbfd2ddaec2b42433c1daab74", "score": "0.6301867", "text": "public function show(Fiche $fiche)\n {\n //\n }", "title": "" }, { "docid": "17b75e89476dd4ffe3bd84856a7eaf6b", "score": "0.6299055", "text": "public function show(Seat $seat)\n {\n //\n }", "title": "" }, { "docid": "3a8b19d4f976d343b270223270f44b11", "score": "0.6298923", "text": "public function show(Plataforma $plataforma)\n {\n //\n }", "title": "" }, { "docid": "65454a4c24991511838ee5f572e6b4c9", "score": "0.62938356", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "30e2419aaa6d780898be62ac8e96090e", "score": "0.62834436", "text": "public function show() {\n\t\techo $this->toHTML();\n\t}", "title": "" }, { "docid": "1eeac612537a9f36e7835ad7af229324", "score": "0.627482", "text": "public function show(Keputusan $keputusan)\n {\n //\n }", "title": "" }, { "docid": "948dd8b979469ff99972d3c49208dae0", "score": "0.6270181", "text": "public function show(DataPasien $dataPasien)\n {\n //\n }", "title": "" }, { "docid": "a7cc892bae90154627fb71093bd794e4", "score": "0.6268619", "text": "public function show(FamilleProduit $familleProduit)\n {\n //\n }", "title": "" }, { "docid": "c8084ca3688816efc93cc557de41c28d", "score": "0.62651485", "text": "public function show(tokoBaju $tokoBaju)\n {\n //\n }", "title": "" }, { "docid": "e41f5ac842a7d25e1365ebd7068bf1cb", "score": "0.6258586", "text": "public function show(Parametre $parametre)\n {\n //\n }", "title": "" }, { "docid": "315778b08e4b7b3fbba937546fcd9582", "score": "0.62520105", "text": "public function show(Oficina $oficina)\n {\n //\n }", "title": "" }, { "docid": "0a8e8beabe393469aede7761cad1deb7", "score": "0.6247374", "text": "public function show(stok $stok)\n {\n //\n }", "title": "" }, { "docid": "5113e61fe5d55cb89a5a13512c99333a", "score": "0.62461436", "text": "public function show(EvacSite $evacSite)\n {\n //\n }", "title": "" }, { "docid": "574a9d7b138ffba867ae51cd1c1c332c", "score": "0.62453604", "text": "public function showPage()\n {\n echo $this->getPage();\n }", "title": "" }, { "docid": "1cc205fc2eae6b3f4812dbc0f41cb2f3", "score": "0.6245191", "text": "public function show(Jilsah $jilsah)\n {\n //\n }", "title": "" }, { "docid": "20c9e14ab43e188fa2fe545a51e7ab81", "score": "0.62448317", "text": "public function show(Feriado $feriado)\n {\n //\n }", "title": "" }, { "docid": "d13ade4b91fe7650bac2a556f3414beb", "score": "0.62428933", "text": "public function show(institucion_usuario $institucion_usuario) {\n //\n }", "title": "" }, { "docid": "d3fd54c639a17aeb06b872b3a963f39e", "score": "0.6228274", "text": "public function show(Paiement $paiement)\n {\n //\n }", "title": "" }, { "docid": "5d4757f034eb4d79594789a74ba1bba1", "score": "0.6226528", "text": "public function show(Produk $produk)\n {\n }", "title": "" }, { "docid": "8876aa0f8f51e30f6d593fdcfbc8b647", "score": "0.62249124", "text": "function view() {\r\n\t\t$this->display ();\r\n\t}", "title": "" }, { "docid": "a39f9810ad6eeb324541a108506f370f", "score": "0.6224044", "text": "public function show(gasto $gasto)\n {\n //\n }", "title": "" }, { "docid": "74cdc476aed3d44f98fe9c2503d108ec", "score": "0.62154174", "text": "public function show() {\n\t}", "title": "" }, { "docid": "a02b04633e11912df299057318a92ffb", "score": "0.6214567", "text": "public function show(jovenes $jovenes)\n {\n //\n }", "title": "" }, { "docid": "e350aaa81a44c6253fe9a698937d8890", "score": "0.62102216", "text": "public function showPegawai()\n {\n $data = $this->model->getPegawai();\n extract($data);\n require_once(\"View/Pegawai/dataPegawai.php\");\n }", "title": "" }, { "docid": "84455fde153c0488b92667b505c5badc", "score": "0.6205583", "text": "public function show(InfoTerkini $infoTerkini) {\n\t\t//\n\t}", "title": "" }, { "docid": "b453f0bfa6dc736377b3241d6dedf0ae", "score": "0.620339", "text": "public function show(Keputusan $keputusan)\n {\n //\n }", "title": "" }, { "docid": "57cf0ff07faea759ee79635f765678ad", "score": "0.6203258", "text": "public function show()\n {\n \n }", "title": "" } ]
1e206c6204ca57ede3dddbc2204e8472
Logs Save activity to file for debug purpose
[ { "docid": "cb07fc8be925ca3cad86e100d4f53447", "score": "0.0", "text": "function logs($message) {\n\n $myfile = fopen(\"log.txt\", \"a\");\n fwrite($myfile, $message . \"\\n\");\n fclose($myfile);\n\n return true;\n}", "title": "" } ]
[ { "docid": "ef669dc2cef0e074e8f22fb2bc58b5ea", "score": "0.6370037", "text": "protected function save_action_log($game) {\n // into the message so the calling player can see them,\n // then save them to the historical log\n if (count($game->actionLog) > 0) {\n $this->load_message_from_game_actions($game);\n $this->log_game_actions($game);\n }\n }", "title": "" }, { "docid": "054ee912fda5bd8a261946725dd55fca", "score": "0.61605525", "text": "function saveLog($path) {\n\t\treturn file_put_contents($path, $this->log(null));\n\t}", "title": "" }, { "docid": "dc14ab18f967bd9cedf4b83f51e738c0", "score": "0.6133539", "text": "public function save()\t{\n\t\t\t// Save to file.\n\t\t}", "title": "" }, { "docid": "9cfcc50d71b768f873e778aac90c70f6", "score": "0.6061649", "text": "public function SaveAsFile(){\n\t\t$collection = $this->GetCollection();\n\t\t$project_path = explode(\"/\", $this->path);\n\t\t$project_path = $project_path[0];\n\t\t\n\t\t$this->assignment_submitted = $this->GetAssignmentSubmitted($project_path);\n\t\t\n\t\t$new_log = array( \t\n\t\t\t\t\t\t\t\"username\" => $this->username,\n\t\t\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\t\t\"start_timestamp\" => date(\"Y-m-d H:i:s\"),\n\t\t\t\t\t\t\t\"last_update_timestamp\" => date(\"Y-m-d H:i:s\"),\n\t\t\t\t\t\t\t\"is_open\" => 'TRUE',\n\t\t\t\t\t\t\t\"session_id\" => $this->GetCurrentSessionId(),\n\t\t\t\t\t\t\t\"path\" => $this->path,\n\t\t\t\t\t\t\t\"assignment_submitted\" => $this->assignment_submitted\n\t\t\t\t\t\t );\n\t\t\n\t\t// Insert the log in the database:\n\t\treturn $collection->insert($new_log);\n }", "title": "" }, { "docid": "09c05a575c6e721c9f0bea79ac2ba050", "score": "0.60532564", "text": "private function logScreenshot(){\n $time = time();\n $imgName = 'screenshots/screenshot-'.$time.'.png';\n echo \"\\r\\nScreenshot of failure: \".$imgName;\n $imgData = $this->driver->get_screenshot();\n $imgFile = fopen('../'.$imgName, 'w');\n fwrite($imgFile, $imgData);\n fclose($imgFile);\n }", "title": "" }, { "docid": "be8972cc6e5ac4e9dba14c9470b7b7c0", "score": "0.59694594", "text": "public function store()\n {\n \\Log::info('rdgfbuysdjknfgiodsfgjoijdfkm');\n }", "title": "" }, { "docid": "8f5e7938c518d087977d43fc045fac13", "score": "0.5914118", "text": "function log_me($data) {\n if(LIB_DEBUG) {\n if (is_array($data)) {\n $data = json_encode($data);\n } \n $filename = LOG_PATH.DIRECTORY_SEPARATOR.'trace.log';\n if (!file_exists($filename)) {\n $fp = fopen($filename, 'w+');\n } else {\n $fp = fopen($filename, 'a+');\n }\n //fwrite($fp, \"#####################################################################\\n\");\n fwrite($fp, $data.\"\\n\");\n fclose($fp);\n chmod($filename, 0777);\n }\n}", "title": "" }, { "docid": "1b394041963d87569c4126d6dade1b9c", "score": "0.5891639", "text": "public function debugData(){\n var_dump('File name: ' . $this->fileName);\n var_dump('File extension: ' .$this->extension);\n var_dump('Directory to save: ' .$this->dirToSave);\n var_dump('Input name: ' .$this->inputFileName);\n }", "title": "" }, { "docid": "34f13fa15645b6c8021d4574ae938358", "score": "0.58439463", "text": "static public function save($arg_file)\n\t{\n\t\tif (ENABLE_TRACE) {\n\t\t\tfile_put_contents($arg_file,\"\\n--(\".date(DEFAULT_FMTDATETIME).\")---------------------------------------------------\".self::$trace, FILE_APPEND + FILE_USE_INCLUDE_PATH);\n\t\t\tself::$trace = '';\n\t\t}\n\t}", "title": "" }, { "docid": "c3f0ec8a31562cacb923686865fb7e06", "score": "0.581688", "text": "function test()\n {\n /* \n $sSource='income';\n $sTarget=\"\";\n $data='INFO - '.date('d-m-y h:i:s').' --> '.$this->session->userdata('user_name').'['.$this->session->userdata('user_email').'] requested '.$sSource.' report['.$sTarget.']';\n $myfile = file_put_contents('logs.txt', $txt.PHP_EOL , FILE_APPEND | LOCK_EX);\n\n if (!write_file(APPPATH.\"user-activity/user-site-activity.txt\", $data)){ \n echo 'Unable to write the file';\n }else{ \n echo 'File written!';\n }\n */\n }", "title": "" }, { "docid": "b86de69bf368e58c806351d4f5b151bb", "score": "0.58107734", "text": "function toFile() {\n $this->fn = tempnam(\"\", \"MGW\");\n if ($this->fp = fopen($this->fn, \"w\")) {\n $this->output = \"file\";\n } else {\n die(\"Cannot open log output file in \".__FILE__.\" on line \".__LINE__.\".\");\n }\n }", "title": "" }, { "docid": "d7a90fdcafee3e28f8aa8a391ba284be", "score": "0.5806079", "text": "function LogTagActivity($action, $tag_id, $tag_name) {\n\tglobal $user_id, $user_name, $fullname;\n\tfile_put_contents($_SERVER['DOCUMENT_ROOT'].'/deepsid/logs/tags.txt',\n\t\t\tdate('Y-m-d H:i:s', strtotime(TIME_ADJUST)).','.\n\t\t\t$_SERVER['REMOTE_ADDR'].','.\n\t\t\t$user_id.','.\n\t\t\t$user_name.','.\n\t\t\t$_POST['fileID'].','.\n\t\t\t$fullname.','.\n\t\t\t$action.','.\n\t\t\t$tag_id.','.\n\t\t\t$tag_name.\n\t\tPHP_EOL, FILE_APPEND);\n}", "title": "" }, { "docid": "dcc14dabae93b72402bbb3bf57571735", "score": "0.57994574", "text": "protected function beforesaved()\r\n\t{\r\n\t}", "title": "" }, { "docid": "d1de387ccf31645ccdeb4bc6fed0c6a0", "score": "0.5788759", "text": "function saveLog($filename, $append = true)\r\n\t{\r\n\t\techo(str_replace(\"\\n\", \"<br />\", $this->data));\r\n\t}", "title": "" }, { "docid": "01a8d92946577a7c857a6e748cec7eae", "score": "0.57808924", "text": "protected function saveDataToFile()\n\t{\n\t}", "title": "" }, { "docid": "13632ade9675a5ed024d84749619a3a6", "score": "0.5780069", "text": "protected function save()\n {\n\n file_put_contents($this->file_address, $this->data);\n }", "title": "" }, { "docid": "b96d337e4b57914f46c43dab7c61a044", "score": "0.5761817", "text": "function logTestAction($message) {\n $fname = \"test.log\";\n if (file_exists($fname)) { \n $fp = fopen($fname, \"a\");\n }\n else {\n $fp = fopen($fname, \"w\");\n }\n fwrite($fp, $message.\"\\n\");\n fclose($fp);\n}", "title": "" }, { "docid": "335da50d6ed589db027012a06da28421", "score": "0.57178164", "text": "function save() {\n\t\t// TODO\n\t}", "title": "" }, { "docid": "365ef870ad8734ef019f2a58ecdea008", "score": "0.569656", "text": "function Trace($msg)\n{\n $filename = \"debug.txt\";\n if (!$handle = fopen($filename, 'a')) {\n exit;\n }\n if (is_writable($filename)) {\n fwrite($handle, $msg . \"\\n\");\n }\n fclose($handle);\n}", "title": "" }, { "docid": "abd609119375fb5a22df07283534cb06", "score": "0.5693458", "text": "public function saveState()\n {\n file_put_contents($this->getStateFile(), serialize([$this->lastScanned]));\n }", "title": "" }, { "docid": "82995af8231127ebadd7f28201138e9f", "score": "0.56925887", "text": "private function saveLog()\n {\n $total = 0;\n\n // prevent the log inserts to be logged\n $queryLogMap = clone $this->queryLogMap;\n\n foreach ($queryLogMap as $queryLog) {\n $queryLog->time = number_format($queryLog->time, 3, '.', '');\n $queryLog->save();\n $total += $queryLog->called;\n }\n\n if($this->config->isDev()){\n dlog('Query count: ' . $total);\n }\n }", "title": "" }, { "docid": "646bf26095af67199112e613fb892470", "score": "0.5688628", "text": "function logDebug($messagio){\n writeOnFile(\"DEBUG\", $messagio);\n}", "title": "" }, { "docid": "31a2bb62e060fa0f378a4f8186d4a7b8", "score": "0.568674", "text": "public function log(){\n\t\tparent::log();\n\t\t$content = date(\"Y-m-d H:i:s\").':'.$this->getMessage().\"\\r\\n\";\n\t\t//Escribo log.\n\t\tfile_put_contents('log.txt', $content, FILE_APPEND);\n\t}", "title": "" }, { "docid": "aab1ad3174105321a720815dbbf2a95d", "score": "0.5683954", "text": "static function log(){\n\t\t$fp = fopen(PATH_APP.\"log.log\", 'a');\n\t\t$a_var = func_get_args();\n\t\tfwrite($fp, '['.date('d/m/Y h:i:s') . ']');\n\t\tforeach ($a_var as $s_value) {\n\t\t\tfwrite($fp, \"\\t$s_value \\n\");\n\t\t}\n\t\tfclose($fp);\n\t}", "title": "" }, { "docid": "59d3ffbac708a598bc5ac53ef3be2931", "score": "0.56710523", "text": "public function save($filename)\n {\n }", "title": "" }, { "docid": "329af35be9691cb5f7609ed69c98ce0f", "score": "0.56698173", "text": "protected function log_request() {\n $log = '';\n $logPath = '../_bin/debug/api_requests_log.txt';\n if (file_exists($logPath)) {\n $log = file_get_contents($logPath);\n }\n file_put_contents($logPath, '[' . date('Y-m-d H:i:s') . ']: '\n . \"[$this->method]\"\n . \" From $this->origin \"\n . $this->file . \"\\r\\n\"\n . $log);\n }", "title": "" }, { "docid": "c7ae5da857f3cc43eba1cb98756bba2f", "score": "0.5668942", "text": "public static function enableFileOutput()\n {\n self::$fileHandler = fopen('log', 'a');\n }", "title": "" }, { "docid": "9b322f1bf6f21b7476e128b518b8cbad", "score": "0.5664568", "text": "public function actionSaveFile()\n {\n }", "title": "" }, { "docid": "fe03cdc94c8c1fe4e03d8d6234a44b78", "score": "0.56458086", "text": "public function saveToFile() {\n\t\tif (!$this->workingSitemap) {\n\t\t\ttrigger_error('No working sitemap chosen', E_USER_WARNING);\n\t\t\treturn;\n\t\t}\n\t\t$this->workingSitemap['sitemap']->saveToFile();\n\t}", "title": "" }, { "docid": "002beb72074e1b99e92d37ac84a4d5e6", "score": "0.564314", "text": "private function save() {\n\t\t$data = json_encode($this->data, JSON_PRETTY_PRINT);\n\t\t$write = fopen($this->path, 'w') or die(\"can't open file: \" . $this->path);\n\t\tfwrite($write, $data);\n\t\tfclose($write);\n\t}", "title": "" }, { "docid": "afed95e302eefd96dce9f215cf070a63", "score": "0.5633195", "text": "public function log()\n {\n// $this->app['logger']->addRecord(200, $logger->dump());\n }", "title": "" }, { "docid": "f76682f2a1b8c968a3e83c2532b7d864", "score": "0.5629657", "text": "public function actionStoreData(){\r\n\t\tob_start();\r\n\t\tvardump($_REQUEST);\r\n\t\t$out = ob_get_contents();\r\n\t\tob_end_clean();\r\n\t\t$f = fopen(Yii::getPathOfAlias('application'). DIRECTORY_SEPARATOR .'store.txt','a+');\r\n\t\tfwrite($f, date('j.m H:i:s').':<br/>'.PHP_EOL);\r\n\t\tfwrite($f, $out.'<br/>'.PHP_EOL);\r\n\t\tfclose($f);\r\n\t}", "title": "" }, { "docid": "209d5ef82ab3612e2a76ee7c81121486", "score": "0.5629491", "text": "protected function saveInfoFile() {\n $error_file = $this->getFilenameReportTemplate() . '.txt';\n $error_filepath = $this->getReportPath() . '/' . $error_file;\n\n // Generate content.\n $error_report = $this->session->getCurrentUrl() . \"\\n\\n\";\n $error_report .= $this->result->getException();\n\n // Save it.\n file_put_contents($error_filepath, $error_report);\n\n if ($url = $this->getReportUrl()) {\n echo \" - info (exception): \" . $url . '/' . $error_file . \"\\n\";\n }\n }", "title": "" }, { "docid": "3f681bdbd3344f1f1e41c436e3b3441f", "score": "0.56260586", "text": "private function __toLog()\n\t{\n\t}", "title": "" }, { "docid": "25ef9beb4737e03def275f16a7e01905", "score": "0.56159574", "text": "public function save() {\n if (!$this->environmentIsValid()) return;\n\n $rootFolder = Director::baseFolder();\n $command = ['sspak save'];\n\n // Prepare file name and save location\n $folderName = array_reverse(explode(DIRECTORY_SEPARATOR, $rootFolder))[0];\n $projectName = $GLOBALS['project'];\n $snapshotName = implode('_', array(\n $folderName,\n $projectName,\n date('Y-m-d-H-i-s')\n ));\n $saveLocation = implode(DIRECTORY_SEPARATOR, array(\n sys_get_temp_dir(),\n $snapshotName\n ));\n if ($this->hasFlag('db')) {\n $command[] = '--db';\n }\n\n $command[] = \"{$rootFolder} {$saveLocation}.sspak\";\n Util::runCLI(implode(' ', $command));\n\n echo \"The snapshot was saved to \\\"{$saveLocation}.sspak\\\".\";\n }", "title": "" }, { "docid": "8d7cec63a9a5ef873ae9c245e3add037", "score": "0.5612502", "text": "public function saveConfiguration()\n {\n // write the formatted config file to the path\n file_put_contents(MANUFAKTUR_PATH.'/Event/config.event.json', $this->app['utils']->JSONFormat(self::$config));\n $this->app['monolog']->addDebug('Save configuration /Event/config.event.json');\n }", "title": "" }, { "docid": "882f862a1dbee43999179acda7336c56", "score": "0.56001973", "text": "abstract protected function log_file();", "title": "" }, { "docid": "0c5c1d85aefd746e1ddaefd6295ed572", "score": "0.55921376", "text": "public function saveFiles() {\n Mage::getModel('doit_easynfe/nfe')->saveFiles();\n }", "title": "" }, { "docid": "83090334e894fd4c02fffb4aaad01e73", "score": "0.55624324", "text": "function save() {\n }", "title": "" }, { "docid": "56b922efbc05e31b2f6f5cd19799053c", "score": "0.5550237", "text": "function writeToFile () {\n }", "title": "" }, { "docid": "4aa4a9c0e5b3f6afc515608fbccec6c6", "score": "0.5549555", "text": "function logAccess($data) {\n if ($fp_log = fopen(SITE_PATH . \"/ws/log.txt\", \"a+\")) {\n fwrite($fp_log, \"==============================\" . date(\"d.m.Y H:i:s\") . \"==============================\\n\");\n fwrite($fp_log, $data . \"\\n\");\n fwrite($fp_log, \"==============================\" . date(\"d.m.Y H:i:s\") . \"==============================\\n\");\n fclose($fp_log);\n }\n}", "title": "" }, { "docid": "b536c0ccfa9b9723ccaec5535aae7b85", "score": "0.5542069", "text": "function log_action_save($arguments)\n\t{\n\t\tglobal $dbh;\n\t\tglobal $global_name;\n\t\t$this->state = array();\n\n\t\t/** Define the account information */\n\t\t$this->action = $arguments['action'];\n\t\t$this->owner_id = $arguments['owner_id'];\n\t\t$this->owner_user = (!empty($arguments['owner_user'])) ? $arguments['owner_user'] : $global_name;\n\t\t$this->affected_file = (!empty($arguments['affected_file'])) ? $arguments['affected_file'] : '';\n\t\t$this->affected_account = (!empty($arguments['affected_account'])) ? $arguments['affected_account'] : '';\n\t\t$this->affected_file_name = (!empty($arguments['affected_file_name'])) ? $arguments['affected_file_name'] : '';\n\t\t$this->affected_account_name = (!empty($arguments['affected_account_name'])) ? $arguments['affected_account_name'] : '';\n\t\t\n\t\t/** Get the real name of the client or user */\n\t\tif (!empty($arguments['get_user_real_name'])) {\n\t\t\t$this->short_query = $dbh->prepare( \"SELECT name FROM \" . TABLE_USERS . \" WHERE user =:user\" );\n\t\t\t$params = array(\n\t\t\t\t\t\t\t':user'\t\t=> $this->affected_account_name,\n\t\t\t\t\t\t);\n\t\t\t$this->short_query->execute( $params );\n\t\t\t$this->short_query->setFetchMode(PDO::FETCH_ASSOC);\n\t\t\twhile ( $srow = $this->short_query->fetch() ) {\n\t\t\t\t$this->affected_account_name = $srow['name'];\n\t\t\t}\n\t\t}\n\n\t\t/** Get the title of the file on downloads */\n\t\tif (!empty($arguments['get_file_real_name'])) {\n\t\t\t$this->short_query = $dbh->prepare( \"SELECT filename FROM \" . TABLE_FILES . \" WHERE url =:file\" );\n\t\t\t$params = array(\n\t\t\t\t\t\t\t':file'\t\t=> $this->affected_file_name,\n\t\t\t\t\t\t);\n\t\t\t$this->short_query->execute( $params );\n\t\t\t$this->short_query->setFetchMode(PDO::FETCH_ASSOC);\n\t\t\twhile ( $srow = $this->short_query->fetch() ) {\n\t\t\t\t$this->affected_file_name = $srow['filename'];\n\t\t\t}\n\t\t}\n\n\t\t/** Insert the client information into the database */\n\t\t$lq = \"INSERT INTO \" . TABLE_LOG . \" (action,owner_id,owner_user\";\n\t\t\n\t\t\tif (!empty($this->affected_file)) { $lq .= \",affected_file\"; }\n\t\t\tif (!empty($this->affected_account)) { $lq .= \",affected_account\"; }\n\t\t\tif (!empty($this->affected_file_name)) { $lq .= \",affected_file_name\"; }\n\t\t\tif (!empty($this->affected_account_name)) { $lq .= \",affected_account_name\"; }\n\t\t\n\t\t$lq .= \") VALUES (:action, :owner_id, :owner_user\";\n\n\t\t\t$params = array(\n\t\t\t\t\t\t\t':action'\t\t=> $this->action,\n\t\t\t\t\t\t\t':owner_id'\t\t=> $this->owner_id,\n\t\t\t\t\t\t\t':owner_user'\t=> $this->owner_user,\n\t\t\t\t\t\t);\n\t\t\n\t\t\tif (!empty($this->affected_file)) {\t\t\t$lq .= \", :file\";\t\t$params['file'] = $this->affected_file; }\n\t\t\tif (!empty($this->affected_account)) {\t\t$lq .= \", :account\";\t$params['account'] = $this->affected_account; }\n\t\t\tif (!empty($this->affected_file_name)) {\t$lq .= \", :title\";\t\t$params['title'] = $this->affected_file_name; }\n\t\t\tif (!empty($this->affected_account_name)) {\t$lq .= \", :name\";\t\t$params['name'] = $this->affected_account_name; }\n\n\t\t$lq .= \")\";\n\n\t\t$this->sql_query = $dbh->prepare( $lq );\n\t\t$this->sql_query->execute( $params );\n\t}", "title": "" }, { "docid": "2f2ebcc3e007c24c5f9cc468c2c49409", "score": "0.5541553", "text": "function logging($file='', $line='', $message=''){\n $filename = $_SERVER['DOCUMENT_ROOT'].'/TheFoodPitStop/Log/' . date(\"Ymd\") . \".txt\";\n $myfile = fopen($filename, \"a\") or die(\"Unable to open file!\");\n fwrite($myfile, date(\"Ymd_H:i:s [\") . $file . \":\" . $line . \"]\" . $message . \"\\n\");\n}", "title": "" }, { "docid": "4e4a9ae318f9802b20a503c0a648cfe5", "score": "0.5540049", "text": "protected function _write($event)\r\n {\r\n \t$configEngine = new Dragon_Application_Config('dragonx/log/engine');\r\n Zend_Registry::get($configEngine->engine)->save(new DragonX_Log_Record_Log($event));\r\n }", "title": "" }, { "docid": "a3c8963ccb5a59f6ec8a670004501adf", "score": "0.55371946", "text": "public function saveReport() {\n $this->session = $this->getSession();\n\n if ($this->getReportUrl()) {\n echo \"Error generated reports:\\n\";\n }\n\n $this->saveInfoFile();\n $this->saveHtmlFile();\n $this->savePngFile();\n\n }", "title": "" }, { "docid": "87eb28b09d31bafe1f4ddf64210678b4", "score": "0.5535146", "text": "protected function save()\n\t{\n\t\t$this->file->put($this->path.$this->session['id'], serialize($this->session), LOCK_EX);\n\t}", "title": "" }, { "docid": "c1304124b755217090b6a1253cf85ba8", "score": "0.5528022", "text": "public function logSave()\n {\n try {\n if (false == $this->save()) {\n foreach ($this->getMessages() as $msg) {\n QSTBaseLogger::getDefault()->log(\"db error trace ===> \" . $msg);\n }\n QSTBaseLogger::getDefault()->log(\"[\" . $this->getSource() . \"]\" . \" save db failed\", \\Phalcon\\Logger::ALERT);\n return 2004;\n }\n } catch (\\PDOException $exception) {\n QSTBaseLogger::getDefault()->log(\"[\" . $this->getSource() . \"]\" . \" save db failed, err: \" . $exception->getMessage(), \\Phalcon\\Logger::ALERT);\n return 2004;\n }\n return 0;\n }", "title": "" }, { "docid": "71164ff898ab378147febc29fb0087c0", "score": "0.54923815", "text": "function ilog($info)\n{\n $file = debug_backtrace()[0]['file'];\n $line_no = debug_backtrace()[0]['line'];\n $file_name = get_log_file();\n if(is_array($info)){\n $info = var_export($info,true);\n }\n $message = $info.PHP_EOL.$file.' At line '.$line_no.PHP_EOL;\n file_put_contents($file_name,$message,FILE_APPEND);\n}", "title": "" }, { "docid": "b01f62b833759b2b75f3455fc2b53724", "score": "0.54877484", "text": "function dump_to_log($value){\n\t\tfwrite($this->log_file, $value.\"\\n\");\n\t}", "title": "" }, { "docid": "a9b13fb60da7886bf7f4e6542bf3b64f", "score": "0.5483428", "text": "function writeToLog($data, $title = '') {\n $log = \"\\n------------------------\\n\";\n $log .= date(\"Y.m.d G:i:s\") . \"\\n\";\n $log .= (strlen($title) > 0 ? $title : 'DEBUG') . \"\\n\";\n $log .= print_r($data, 1);\n $log .= \"\\n------------------------\\n\";\n file_put_contents(getcwd() . '/hook.log', $log, FILE_APPEND);\n return true;\n}", "title": "" }, { "docid": "64854d276bd65fe36f17bc5e37766602", "score": "0.5464417", "text": "function add_log($action){\n global $login;\n $user = str_replace('_', ' ', $login->getUserData()[0]);\n $ip = $_SERVER['REMOTE_ADDR'];\n $path = \"logs/\";\n $date = date(\"Y-m-d\");\n $time = date(\"H:i:s\");\n $document = fopen($path.$date.\".txt\", \"a+\");\n fwrite($document, \"[\".$time.\"]-[\".$ip.\"]-[\".$user.\"] \".$action.\"\\n\");\n fclose($document);\n}", "title": "" }, { "docid": "80073c9b2d27ccc994bb215c9523d401", "score": "0.5463975", "text": "protected function save_chat_log($game) {\n // then save them to the historical log\n if ($game->chat['chat']) {\n $this->log_game_chat($game);\n }\n }", "title": "" }, { "docid": "6f16565e5816b9bfcdaf2e6318374330", "score": "0.54631287", "text": "public abstract function saveToFile($fileName);", "title": "" }, { "docid": "4be87bcb28cb4937014f4b473474274e", "score": "0.54606", "text": "public static function record($content)\n {\n $content = date(\"Y-m-d H:i:s\") . ' - '. $content;\n self::save('system.log', $content );\n }", "title": "" }, { "docid": "0face61724918741b21d7d1871824731", "score": "0.54594886", "text": "function logData($file, $data) {\r\n $log_msg = $data.\" - \".date('d-M-Y h:i:s').\"\\n\";\r\n file_put_contents($file, $log_msg, FILE_APPEND);\r\n }", "title": "" }, { "docid": "b5657770f2a027ac7c7e3c1845b57488", "score": "0.5457417", "text": "function backup_cron_log()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t$result = $this->_file_cron->backup_cron_log();\n\t\t\n\t\t# log the results from the run if a job ID is provided\n\t\tif(!empty($data['jobid'])) {\n\t\t\t$jobDetails['user_id'] = 'system';\n\t\t\t$jobDetails['job_type'] = 'file_crons';\n\t\t\t$jobDetails['job_code'] = 'backup_cron_log';\n\t\t\t$jobDetails['result'] = $result['bool']? 'success': 'fail';\n\t\t\t$jobDetails['job_details'] = \"archive=\".$result['archive'];\n\t\t\n\t\t\t$this->_cron->update_status($data['jobid'], $jobDetails);\n\t\t}\n\t}", "title": "" }, { "docid": "97eacff37b83912affb99a11d88e4732", "score": "0.5444881", "text": "private static function enable_file()\n {\n if (self::$log_file) return;\n // disable firephp first\n self::disable_firephp();\n// DO NOT OVERRIDE DEFAULT BEHAVIOR FROM INSIDE THE CLASS!\n// Call a method to do this from the outside.\n// self::setup('dbg.log', 'w');\n if (self::setup('dbg.log')) {\n self::$log_file = true;\n }\n }", "title": "" }, { "docid": "94293408a74050ee1eb84c68cd470fe5", "score": "0.54400593", "text": "public function outputFilePath()\n {\n return storage_path('logs/'.$this->id().'.cron.log');\n }", "title": "" }, { "docid": "20f77bd988c076dea459cb896b0769bb", "score": "0.54330844", "text": "function save() {\n $this->log .= \"save() called<br />\";\n if (count($this->data) < 1) {\n $this->log .= \"Nothing to save.<br />\";\n return false;\n }\n //create file pointer\n if (!$fp=@fopen($this->filename,\"w\")) {\n $this->log .= \"Could not create or open \".$this->filename.\"<br />\";\n return false;\n }\n //write to file\n if (!@fwrite($fp,serialize($this->data))) {\n $this->log .= \"Could not write to \".$this->filename.\"<br />\";\n fclose($fp);\n return false;\n }\n //close file pointer\n fclose($fp);\n return true;\n }", "title": "" }, { "docid": "7f2ca263dd384973db4a53d28433a13d", "score": "0.5415771", "text": "function save()\n {\n }", "title": "" }, { "docid": "d0aae18a2264d40cb7dde90cfd371f76", "score": "0.54113746", "text": "private function _log_activity(){\n //Get the uri (eks home/front)\n $log_page = $this->uri->uri_string();\n //Get the user_id, if not it uses 0\n $user_id = ($this->flexi_auth->get_user_id() ? $this->flexi_auth->get_user_id() : '0');\n //Gets the session id\n $session_id = session_id();\n \n //Load the model\n $this->load->model('log_model');\n \n //Check if page exsists, if not FALSE will be returned. If true, asign to page_fk variable\n if($page_fk = $this->log_model->check_if_page_exsists($log_page)){\n //page eksists\n $this->log_model->log_user_activity($user_id, $page_fk, $session_id);\n }else{\n //Page does not exsist, creat page then log data\n $page_fk = $this->log_model->insert_new_page($log_page);\n $this->log_model->log_user_activity($user_id, $page_fk, $session_id);\n }\n }", "title": "" }, { "docid": "ee88f2b8ea3d8e3792620b258e9dd1d3", "score": "0.5410707", "text": "function logIt($pObject) {\n\n $callers = debug_backtrace();\n $mFile0 = $callers[0]['file'];\n $mFunc0 = $callers[0]['function'];\n $mLine0 = $callers[0]['line'];\n $mFile = $callers[1]['file'];\n $mFunc = $callers[1]['function'];\n $mLine = $callers[1]['line'];\n\n $mString = \"------------------------\\r\\n\";\n\n $mString .= sprintf(\"%s\\tOn line #%s of file '%s'\\r\\n\",\n date(\"Y-m-d h:i:s\"),\n $mLine,\n $mFile);\n\n $mString .= sprintf(\"\\t...On line #%s of file '%s'\\r\\n\",\n $mLine0,\n $mFile0);\n\n $mString .= sprintf(\"\\t...%s\\r\\n\",\n var_export($pObject,\n true));\n\n $file = dirname(__FILE__) . \"/log/messages.txt\";\n if (filesize($file) > 512000) {\n file_put_contents($file,\n $mString,\n LOCK_EX);\n } else {\n file_put_contents($file,\n $mString,\n FILE_APPEND | LOCK_EX);\n }\n return true;\n}", "title": "" }, { "docid": "f981b4fc1a88f579e0a221e10d3ffbfb", "score": "0.5408976", "text": "function saveLog($typeID, $objectID, $extra='', $user=NULL)\n{\n\t$data = ['logType' => $typeID,\n\t 'objectID' => $objectID,\n\t 'user' => $user ? $user : getSes('user'),\n\t 'extra' => $extra];\n\n\t$ans = oSQL()->registerLog('logs_history', $data);\n\n\tif (!$ans->error && isAlertActive($typeID))\n\t{\n\t\t$ans = oSQL()->registerLog('logs', $data);\n\t}\n\n\tif (!$ans->error)\n\t{\n\t\treturn true;\n\t}\n\n\t// Error handling, with file logging when DB logging fails\n\t$msg = date('Y-m-d H:i:s').\n\t\t\" - Error logging '{$typeID}' event, for object '{$objectID}': \".\n\t\t\" ({$ans->error}) {$ans->errDesc}\\r\\n\";\n\n\t$fh = @fopen(LOGS_PATH . '/loggingErrors.txt', 'a');\n\t$fh && (@fwrite($fh, $msg) & @fclose($fh));\n}", "title": "" }, { "docid": "fc0941592bafccaabb0256720f0d390f", "score": "0.5396131", "text": "public function savepoint() {}", "title": "" }, { "docid": "cf268ab1618cde7916f4c0df7cc36879", "score": "0.5384224", "text": "function save()\n {\n }", "title": "" }, { "docid": "6f35d01322330991b68b79ffb93ab8a6", "score": "0.53768706", "text": "function log_requests($trans_id) {\n\tglobal $_config;\n\n\tif (!$_config['ec_store_log'] || !$_config['ec_log_file']){\n\t\treturn;\n\t}\n\n\t$fp = fopen($_config['ec_log_file'], 'a+');\n\tif (!$fp) { return; }\n\t$data = date('Y-m-d H:i:s'). ' ' . $trans_id .': '. print_r($_POST, true) . PHP_EOL;\n\tfwrite($fp, $data);\n\tfclose($fp);\n}", "title": "" }, { "docid": "911b7562c9d978f63103447b24524749", "score": "0.53745115", "text": "function _log($form_data = \"\", $log_name = \"\", $url = '')\n {\n $data = date(\"Y-m-d\", time());\n\n $url = LOGDIR;\n\n $log_name = !empty($log_name)\n ?\n $log_name . '_' . $data . '.txt'\n :\n \"common_\" . date(\"Y-m-d\", time()) . '.txt';\n\n $myfile = fopen(\"$url\" . \"$log_name\", \"a+\");\n\n $log = \"[\" . date('Y-m-d h:i:s', time()) . \"]\" . $form_data . \"\\r\\n\";\n\n fwrite($myfile, $log);\n fclose ( $myfile );\n //echo $log;\n }", "title": "" }, { "docid": "1922af30daa78d391d15f124c913ee59", "score": "0.5365857", "text": "protected function beforesaved()\r\n\t{\r\n\t\tif ($this->calcExecByField && $this->getValue('field_name') && $this->getValue('obj_reference'))\r\n\t\t\t$this->setTsExecByField();\r\n\r\n\t\t// Update seen if the execute time changed\r\n\t\tif ($this->fieldValueChanged(\"ts_execute\") && $this->getValue('f_executed') == 't')\r\n\t\t\t$this->setValue('f_executed', 'f');\r\n\t}", "title": "" }, { "docid": "450097df3e1f03913ac600b8ebe5556a", "score": "0.5360756", "text": "public function saveDetails()\n {\n // No details to save by default.\n }", "title": "" }, { "docid": "a7c62eedac3a07858401dfe881da26cb", "score": "0.53582126", "text": "function ReportLog() {\r\n \t}", "title": "" }, { "docid": "33025089b06028bc6151ad43a7ac2718", "score": "0.53568065", "text": "public static function save_action( $user_id, $activity_id) {\n\n\t\t//get activity information\n\t\t$post_type = get_post_type( $activity_id );\n\t\t$activity_title = get_the_title( $activity_id );\n\t\t$activity_points = get_post_meta( $activity_id, '_gamify_item_activity_points', true );\n\n\t\t//create entry for master_log\n\t\t$time = current_time( 'timestamp', 1 );\n\t\t$add_to_array[$time]['userid'] = $user_id;\n\t\t$add_to_array[$time]['activity_id'] = $activity_id;\n\t\t$add_to_array[$time]['activity_type'] = $post_type;\n\t\t$add_to_array[$time]['activity_title'] = $activity_title;\n\t\t$add_to_array[$time]['activity_points'] = $activity_points;\n\n\t\t//Save activity array to two places: master_log, for tracking sitewide stats, and user_meta for focused stats.\n\n\t\t//Save to master log\n\n\t\t$master_log_array = get_option( 'gamify_master_log' );\n\n\t\tif ( is_array( $master_log_array ) ) {\n\t\t\t$new_master_log_array = $master_log_array + $add_to_array;\n\t\t} else {\n\t\t\t$new_master_log_array = $add_to_array;\n\t\t}\n\n\t\t$updated_option = update_option( 'gamify_master_log', $new_master_log_array );\n\n\t\t//Save to user log\n\n\t\t$user_log_array = get_user_meta( $user_id, 'gamify_user_log', 'single' );\n\n\t\tif ( is_array( $user_log_array ) ) {\n\t\t\t$new_user_log_array = $user_log_array + $add_to_array;\n\t\t} else {\n\t\t\t$new_user_log_array = $add_to_array;\n\t\t}\n\n\t\tupdate_user_meta( $user_id, 'gamify_user_log', $new_user_log_array );\n\n\t}", "title": "" }, { "docid": "a024bafae7d91e3a21a7edfcd52dd1ca", "score": "0.5352772", "text": "function write_file_log($file_name, $data)\n{\n //return;\n //$date = date('m/d/Y h:i:s a', time());\n if (is_array($data) || is_object($data))\n $data = json_encode($data);\n $log = t('input')->ip_address() . ': ' . get_date(now(), 'full') . ':' . $data;\n file_put_contents($file_name, $log . PHP_EOL, FILE_APPEND);\n}", "title": "" }, { "docid": "82f160328d435514feda132954190c1a", "score": "0.53490025", "text": "function log($s)\n {\n $handle = fopen(__DIR__ . \"/log.txt\", \"a\");\n fwrite($handle, $s . \"\\r\\n\");\n fclose($handle);\n }", "title": "" }, { "docid": "c7398ca55bd66fb0f450e14d9f6a632d", "score": "0.5348331", "text": "public function logRequest(){\n if (!$this->debug) return;\n $message = '';\n $message .= \"GET:\\n\\t\" . print_r($_GET, true) ;\n $message .= \"POST:\\n\\t\" . print_r($_POST, true) ;\n $message .= \"FILES:\\n\\t\" . print_r($_FILES, true) ;\n $message .= \"\\n===\\n\";\n\n if (!\\Yii::$app->request->isConsoleRequest){\n \\Yii::info($message, $this->category);\n }\n }", "title": "" }, { "docid": "de8f8c72788b88c0d1a306a5a5a1fc73", "score": "0.53427416", "text": "private function _loadLogFile(){\n\t\t\n\t\t// Nombre de la aplicacion\n\t\t$appName = strtolower($this->appConfig->getApplicationName());\n\t\t\n\t\t// Se construye el nombre de archivo y se carga\n\t\t$this->logPath = LOGDIR . $this->logName . '.log';\n\t\t\n\t\tif (false == @$this->file = fopen($this->logPath, 'a')){\n\t\t\tthrow new OwlException('No ha sido posible abrir el archivo de log para la aplicación actual: ' . $appName, 500);\n\t\t}\t\n\t\t\n\t}", "title": "" }, { "docid": "124647a7fa39ea71e6e74718acb79c93", "score": "0.5337479", "text": "function writeFile( $row ,$savefile)\n {\n $fp = fopen( \"./\".$savefile.\".log\" , \"a\" );\n fwrite( $fp , $row );\n fclose( $fp );\n }", "title": "" }, { "docid": "97e74d366b4392a4b586da2ee3ad4466", "score": "0.5330566", "text": "public final function save()\n {\n }", "title": "" }, { "docid": "97e74d366b4392a4b586da2ee3ad4466", "score": "0.5330566", "text": "public final function save()\n {\n }", "title": "" }, { "docid": "97e74d366b4392a4b586da2ee3ad4466", "score": "0.5330566", "text": "public final function save()\n {\n }", "title": "" }, { "docid": "4550a7da2e806c255d1f4938897fd3eb", "score": "0.5314484", "text": "public function afterImportSave()\n {\n }", "title": "" }, { "docid": "7897cea47f9e23740bbd3da854b06da9", "score": "0.53078943", "text": "public function attachLogFile()\n {\n if ($_GET['log_file'])\n {\n $logfile = APP_ROOT . \"/artifacts/logs/\" . $_GET['log_file'];\n $logger = new Log_file($logfile);\n $logger->setMask($this->_loglevel);\n $this->addChild($logger);\n }\n }", "title": "" }, { "docid": "f1586d4a1918cf51a0d442960a82006d", "score": "0.53075176", "text": "function log_event($event) {\n\n $log_name = PATH_LOG . 'log_' . THIS_FILE_NAME . '_' . date(\"Y_m_d\") . '.txt';\n\n file_put_contents($log_name, PHP_EOL . $event, FILE_APPEND);\n \n return $log_name;\n\n}", "title": "" }, { "docid": "068a4a6fb6b8ad502c3e4115f049f9b9", "score": "0.52948856", "text": "public function log($text) {\n /*\n\t\t$file = 'log.txt';\n //packages/hotel/packages/reception/modules/ManagerKey/\n $current = file_get_contents($file);\n $current .= $text.\"\\n\";\n file_put_contents($file, $current);\n */\n\t}", "title": "" }, { "docid": "8f47fc4ed907e60a8c5148828bbe5ca5", "score": "0.52909803", "text": "private function log($msg)\n {\n// Mutex::lock($this->logMutex);\n// echo \" Scrapping THREAD {$this->getThreadId()}:\\t$msg\\n\";\n// $this->file = fopen($file, 'a');\n// fwrite($this->file, \"Scrapping THREAD {$this->getThreadId()}:\\t$msg\\n\");\n// fclose($this->file);\n// Mutex::unlock($this->logMutex);\n }", "title": "" }, { "docid": "5a89a30250e47a3b924a2f077b866763", "score": "0.52905023", "text": "function LOGING($argumento) {\r\n\tglobal $archivodestino;\r\n\t$logfile = $archivodestino.\".txt\";\r\n\tfile_put_contents($logfile,$argumento.PHP_EOL,FILE_APPEND);\r\n}", "title": "" }, { "docid": "fcd48166f0fee471ed77e6b6f882ae7d", "score": "0.5284384", "text": "function write_log_file( $wert ) \n{\r\n\t// logfile schreiben\r\n\t$myFile = \"../admin_srb_export/validate_sg_time.log\";\r\n\t$fh = fopen($myFile, 'w') or die(\"can't open file\");\r\n\t$stringData = $wert.\"\\n\";\r\n\tfwrite($fh, $stringData);\r\n\tfclose($fh);\r\n}", "title": "" }, { "docid": "aa40d7014e67b6faab5cf79c41e0747e", "score": "0.528151", "text": "public function testLogWillLogToFile()\n {\n $msg = \"SOME LOG MSG\";\n $this->assertEquals(\"\", $this->logFile->getContents());\n $this->logFile->log($msg, 1);\n $this->assertContains($msg, $this->logFile->getContents());\n }", "title": "" }, { "docid": "e2f8999b4f5b2918f3899d1c3275a687", "score": "0.52759284", "text": "protected function _debug()\n {\n if ($this->_config && $this->_config->debug) {\n $file = $this->_config->getMethodCode() ? \"payment_{$this->_config->getMethodCode()}.log\"\n : self::DEFAULT_LOG_FILE;\n Mage::getModel('core/log_adapter', $file)->log($this->_debugData);\n }\n }", "title": "" }, { "docid": "12472fb6234324b84efb22b8f944e992", "score": "0.52678806", "text": "public function download()\n\t{\n\t\tPlatform::getInstance()->load_configuration(Platform::getInstance()->get_active_profile());\n\n\t\t$tag = $this->input->get('tag', null, 'cmd');\n\n\t\tif (empty($tag))\n\t\t{\n\t\t\t$tag = null;\n\t\t}\n\n\t\t$asAttachment = $this->input->getBool('attachment', true);\n\n\t\t@ob_end_clean(); // In case some braindead plugin spits its own HTML\n\t\theader(\"Cache-Control: no-cache, must-revalidate\"); // HTTP/1.1\n\t\theader(\"Expires: Sat, 26 Jul 1997 05:00:00 GMT\"); // Date in the past\n\t\theader(\"Content-Description: File Transfer\");\n\t\theader('Content-Type: text/plain');\n\n\t\tif ($asAttachment)\n\t\t{\n\t\t\theader('Content-Disposition: attachment; filename=\"Akeeba Backup Debug Log.txt\"');\n\t\t}\n\n\t\t/** @var LogModel $model */\n\t\t$model = $this->getModel();\n\t\t$model->setState('tag', $tag);\n\t\t$model->echoRawLog();\n\n\t\tflush();\n\t\t$this->container->platform->closeApplication();\n\t}", "title": "" }, { "docid": "e0744572b17f7e26fb699ca9523e4dcf", "score": "0.5259362", "text": "function log_toFile($status, $string) {\n if ($status == \"success\") {\n $filename = \"./success.log\";\n } else if ($status == \"error\") {\n $filename = \"./error.log\";\n }\n file_put_contents($filename, $string, FILE_APPEND);\n }", "title": "" }, { "docid": "a1c16f94cc1241c1f60a89c2a02a9bab", "score": "0.5258637", "text": "public function save($file_name = \"log.txt\")\n {\n $myfile = fopen($file_name, \"a\") or die(\"Unable to open file!\");\n fwrite($myfile, $this->text);\n fclose($myfile);\n return true; \n }", "title": "" }, { "docid": "c1a25a263234a960abf587cf88447617", "score": "0.52568644", "text": "protected function saved()\r\n\t{\r\n\t}", "title": "" }, { "docid": "80617a33fabe9f9c1ee970c89e7aecc9", "score": "0.52521837", "text": "public function log($file, $batch, $details = '')\n {\n $record = [\n 'migration' => $file,\n 'batch' => $batch,\n 'details' => $details,\n 'created_at' => Carbon::now()\n ];\n\n $this->table()->insert($record);\n }", "title": "" }, { "docid": "de4fc5c798ce43e5aa3b99602008779f", "score": "0.52498764", "text": "function save ( $fileName = '' ) {\r\n if ( $fileName === '' ) {\r\n $fileName = $this->name ();\r\n }\r\n if ( strpos ( $fileName , '.' ) === false ) {\r\n $fileName = $fileName . '.' . $this->ext ();\r\n }\r\n file_put_contents ( $fileName , $this->data () );\r\n }", "title": "" }, { "docid": "a281bd92d6e86fea7240a1b9a07b6600", "score": "0.5249588", "text": "public function view_logs()\r\n {\r\n //ini_set('max_execution_time', 0);\r\n //ini_set('memory_limit', '2560M');\r\n $this->Session->delete('file_pos');\r\n }", "title": "" }, { "docid": "49e740d863128867135c11b08820033d", "score": "0.5248115", "text": "public function save($activity);", "title": "" }, { "docid": "1ddda1d1a9332619c749d45008a6373a", "score": "0.5247104", "text": "public static function resetLog()\n {\n if (self::$status) {\n file_put_contents(storage_path('logs/laravel.log'), \"\\n\\n\\n\");\n }\n }", "title": "" }, { "docid": "94ce4defeffce84ec5a6e0cd3685c7f7", "score": "0.52453184", "text": "private function log(){\n\t\t\t$line = \"((( [{$this->time}]| Type->({$this->type}), Title->({$this->title}) Message->({$this->message})\";\n\t\t\tif(strlen($this->filename) > 0){\n\t\t\t\t$line .= \", In File->({$this->filename}) \";\n\t\t\t\tif($this->lineNum > -1){\n\t\t\t\t\t$line .= \", On line->({$this->lineNum})\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(strlen($this->author) > 0){\n\t\t\t\t$line .= \", By->({$this->author})\";\n\t\t\t}\n\t\t\t$line .= \" )))\\r\\n\\r\\n\";\n\t\t\t$this->logMessage = $line;\n\t\t\t$this->messages[] = $line;\n\t\t\t$this->writeToLog(\"log\");\n\t\t}", "title": "" }, { "docid": "26e43f2f38446717967eb710ac99a1f9", "score": "0.5245254", "text": "private static function disable_file()\n {\n if (!self::$log_file) return;\n self::$log_file = false;\n self::$dbg_fh = null;\n restore_error_handler();\n }", "title": "" }, { "docid": "01c413afbaa5d25ace743c5869865e1c", "score": "0.5242193", "text": "public function saveFile() {\t\t\r\n if (!is_array($this->entries)) {\r\n\t\t $this->cacheEntries();\r\n } else {\r\n $this->logEntry(LoggingImpl::LEVEL_DEBUG, 'Loaded entries from cache');\r\n }\t\t\r\n\r\n\t\t$fp = fopen($this->file, \"wb+\") or $fail = true;\r\n\t\tif ($fail) {\r\n\t\t $this->logEntry(LoggingImpl::LEVEL_ERROR, \"Could not open file: \" . $this->file);\r\n\t\t return;\r\n\t\t}\r\n\t\twhile(!flock($fp, LOCK_EX | LOCK_NB)) { $this->logEntry(LoggingImpl::LEVEL_ERROR, \"Could not obtain lock on file: \" . $this->file); sleep(10); }\r\n\t\t$str = '';\r\n\r\n\t\t// write headers\r\n\t\tfwrite($fp, $this->getStructureHeader() . $this->getFKHeader());\r\n\r\n\t\t// separator after the structure header, before entries start\r\n\t\tif (count($this->entries) > 0) {\r\n\t\t\tfwrite($fp, $this->entrySeparator);\r\n\t\t}\r\n\r\n\t\tfor ($i = 0; $i < count($this->entries); $i++) {\r\n\t\t\t$entry = $this->getEntry($this->entries[$i]);\r\n\t\t\t//$str .= \r\n\t\t\tfwrite($fp, $entry . ($i < count($this->entries) - 1 ? $this->entrySeparator : ''));\r\n\t\t}\r\n//\t\t$this->cachedBuffer = $str;\r\n\r\n//\t\tfwrite($fp, $str);\r\n\t\tfclose($fp);\r\n\t}", "title": "" }, { "docid": "6ad5641af07eb8baeed6d4281a6609ec", "score": "0.52392036", "text": "function cleanLog() {\r\n $file = fopen(\"data.log\", \"w\") or print_r(error_get_last());\r\n fclose($file);\r\n}", "title": "" } ]
0a70bbeff76c97da1a3291652dc0484c
/ Connects to a database. Returns true.
[ { "docid": "5c0056df86e697a5730d4afd98e79cc6", "score": "0.70921046", "text": "public function connectToDb($name) {\n\t\t$result = mysql_select_db($name);\n\n\t\tif(mysql_errno()) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" } ]
[ { "docid": "58dfc1fc3ffc27bd9f312ce1d2ba092f", "score": "0.7974778", "text": "public function connect() {\n\t\t\tif (self::$connection){\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Try and connect to the database\n\t\t\t$this->resetConnection();\n\n\t\t\tif (self::$connection == NULL)\n\t\t\t\treturn false;\n\n\t\t\t// If connection was not successful, handle the error\n\t\t\tif (self::$connection === false){\n\t\t\t\t// Handle error - notify administrator, log to a file, show an error screen, etc.\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\techo \"New connection made to database\";\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "f25ff3bca5b6d87658123caf35853214", "score": "0.7852839", "text": "public function connect() {\r\n if($this->isConnected()) return true;\r\n $this->db = mysql_connect($this->host, $this->username, $this->password) or $this->notify();\r\n if($this->db === false) return false;\r\n mysql_select_db($this->name, $this->db) or $this->notify();\r\n return $this->isConnected();\r\n }", "title": "" }, { "docid": "553e4af9f17ec19d027b5662373ccd90", "score": "0.78450423", "text": "protected function db_connect()\n\t{\n\t\t$config = new \\phpbb\\config_php_file($this->board_root_path, $this->php_ext);\n\t\t$db_driver = $config->convert_30_dbms_to_31($config->get('dbms'));\n\n\t\t$db_driver = new $db_driver();\n\t\t$connection = $db_driver->sql_connect(\n\t\t\t$config->get('dbhost'),\n\t\t\t$config->get('dbuser'),\n\t\t\t$config->get('dbpasswd'),\n\t\t\t$config->get('dbname'),\n\t\t\t$config->get('dbport')\n\t\t);\n\n\t\tif (is_string($connection))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->db = new \\phpbb\\db\\driver\\factory($this->container);\n\t\t$this->db->set_driver($db_driver);\n\t\t$this->table_prefix = $config->get('table_prefix');\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "0e7d04f8b58cf41587958d38b321344e", "score": "0.7545999", "text": "private function connect()\n {\n echo \"<p>connected</p>\";\n $this->link = mysql_connect ('localhost', $this->mysql_username, $this->mysql_pass);\n /* returns if the connection was made, not the resource itself */\n if($this->link)\n {\n /* connects to specific database */\n $db_select = mysql_select_db($this->database, $this->link);\n if( $db_select)\n {\n $this->connected = true;\n return true;\n }\n /* failed to connect to database */\n else\n {\n $this->sqlErr = mysql_error();\n return false;\n }\n }\n /* failed to connect to dbms server*/\n else\n {\n $this->sqlErr = mysql_error();\n return false;\n }\n }", "title": "" }, { "docid": "4e53b1e35c604add58391ef6a15e547d", "score": "0.75391513", "text": "public function connect() { \n $connection = mysql_connect($this->db_host, $this->db_user, $this->db_pass); \n mysql_select_db($this->db_name); \n \n return true; \n }", "title": "" }, { "docid": "99a9ca78e05263261c4cde6770bcd338", "score": "0.75149965", "text": "public static function connect(): bool\n {\n return (bool)DB::getInstance();\n }", "title": "" }, { "docid": "e075225f1aee262ffb081f6324a3a664", "score": "0.7509252", "text": "public function connect()\n {\n $this->conn = mysqli_connect(SERVER, USERNAME, PASSWORD, DATABASE);\n if (mysqli_connect_errno()) {\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "94b3822f40aab74c7192508aa21263b4", "score": "0.74739754", "text": "private function _connectDB()\n {\n // Read in the configuration:\n $dsn = $this->getConfig('logging.dsn');\n $user = $this->getConfig('logging.user');\n $pass = $this->getConfig('logging.pass');\n $table = $this->getConfig('logging.table');\n \n // Bail if we don't have dsn & table:\n if (!$dsn || !$table) {\n $this->fail(\"logging.dsn and logging.table must be configured\");\n }\n \n // Connect to database:\n try {\n $this->db = new PDO($dsn, $user, $pass);\n return true;\n } catch (PDOException $pe) {\n return false;\n }\n }", "title": "" }, { "docid": "460d4a198ffa5b811a58b4babe0ce327", "score": "0.7442196", "text": "public function connect() {\n\n try {\n \n // Attempt to connect to the database\n $this->cConnection = new mysqli($this->cServer, $this->cUsername, $this->cPassword, $this->cDatabaseName);\n \n // Check whether database connection was successfull\n } catch (Exception $e) {\n \n // If not able to connect to the server, there is no point in proceeding any further.\n if (!$this->connectServer()) {return false;}\n\n $this->logMessage(\"Database does not exist: \" . $e->getMessage());\n $this->logMessage(\"Attempting to create the database now.\");\n\n if (!$this->createDatabase()) {\n $this->logError(\"Could not create the database: \" . $this->lastError());\n return false;\n }\n \n try {\n\n // Attempt to connect to the database again\n $this->cConnectionn = new mysqli($this->cServer, $this->cUsername, $this->cPassword, $this->cDatabaseName);\n \n } catch (Exception $e) {\n // Check whether database connection was successfull\n $this->logError(\"Database created but could still not connect: \" . $e->getMessage());\n return false;\n \n }\n\n }\n\n // Successfully connected to the database\n return true;\n\n }", "title": "" }, { "docid": "8217fb48d571c52082b3d10bdca4c1a3", "score": "0.7395383", "text": "function connectToDatabase() {\r\n}", "title": "" }, { "docid": "f239e41b85ff397796bd96b061d5fe5a", "score": "0.7393967", "text": "public function connectToDB($databasename){\n if($this->databaseExists($databasename)){\n $this->database = $databasename;\n iDatabase::iDBaseConfig($this->host,$this->database,$this->username,$this->password);\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "3fc66001cf56a071a09fc8d33791c566", "score": "0.73435426", "text": "private function openDatabaseConnection()\n {\n extract($this->config);\n $config = new Connection($dsn, $username, $password, $options);\n $connection = new Connector($config);\n $this->db = $connection->getConnection();\n }", "title": "" }, { "docid": "e5fed599075da7e98638659500d03ada", "score": "0.729902", "text": "function connect()\n\t\t{\n\t\t\tglobal $settings;\n\t\t\ttry {\n\t\t\t\t$this->conn_id = mysql_pconnect($settings[\"datadriver.mysql.host\"],$settings[\"datadriver.mysql.username\"],$settings[\"datadriver.mysql.password\"]);\n\t\t\t\tif (!$this->conn_id || !mysql_select_db($settings[\"datadriver.mysql.database\"],$this->conn_id)) throw new Exception (\"Error\");\n\t\t\t\treturn true;\n\t\t\t} catch (Exception $e) {\n\t\t\t\tthrow new DatabaseException(\"Could not connect to the Database Server: \" .mysql_error());\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "ef5ebabe0b8aff80d0cdb699b21248f1", "score": "0.72244126", "text": "public function connect(){\n\t\t$init = self::isInitialized();\n\t\t$this->log->LogDebug(\"init?(dbConfig) -> $init\");\t\t\n\t\t$this->log->LogDebug(\"connect(\".self::$dbConfig.\")\");\n\t\t$conn = pg_connect(self::$dbConfig);\n\t\t$this->log->LogDebug(\"connect(dbConfig)->$conn\");\n\t\treturn is_resource($conn) ? $conn : false;\n\t}", "title": "" }, { "docid": "51ffeca87e2a7e1110bb1eb2b2fc3994", "score": "0.7219055", "text": "private function connect() {\n\t\t/* Connect to the MySQl Server */\n\t\tif ($this->persistent) {\n\t\t\t$this->link = mysql_pconnect($this->db_host, $this->db_user, $this->db_pass);\n\t\t} else {\n\t\t\t$this->link = mysql_connect($this->db_host, $this->db_user, $this->db_pass);\n\t\t}\n\t\tif (!$this->link) {\n\t\t\t$this->error = 'Could not connect to server: ' . mysql_error($this->link);\n\t\t\treturn false;\n\t\t}\n\n\t\t/* Select the requested DB */\n\t\tif (@!mysql_select_db($this->db_name, $this->link)) {\n\t\t\t$this->error = 'Could not connect to database: ' . mysql_error($this->link);\n\t\t\treturn false;\n\t\t}\n\t\tmysql_query(\"SET character_set_results='utf8'\");\n\t\tmysql_query(\"SET character_set_client='utf8'\");\n\t\tmysql_query(\"SET character_set_connection='utf8'\");\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6e213b88854ac1cf36928f90dda87f35", "score": "0.721873", "text": "public function connect() : bool {\n if( !$this->isConnected() ) { \n @$this->db = new mysqli( $this->db_server_address, \n $this->db_username, \n $this->db_password, \n $this->db_database_name );\n if( $this->db->connect_errno ) {\n $this->lastErrorMessage = $this->db->connect_error;\n $this->lastError = $this->db->connect_errno;\n } else {\n $this->db->set_charset('utf8');\n return true;\n }\n } return false;\n }", "title": "" }, { "docid": "b1d445429e6d22741cb8f6c9c8482880", "score": "0.7209207", "text": "function _connect($argHostname, $argUsername, $argPassword, $argDatabasename)\n\t{\n\t\t$this->_connectionID = fbsql_connect($argHostname,$argUsername,$argPassword);\n\t\tif ($this->_connectionID === false) return false;\n\t\tif ($argDatabasename) return $this->SelectDB($argDatabasename);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a8dc949c3cf80b579879a6bf44927e64", "score": "0.72076535", "text": "public function connect()\n { \n if ($this->conn) { // Lazy loading, If connection is ok not need to again connect.\n return false;\n }\n $this->createConnection();\n return true;\n }", "title": "" }, { "docid": "dbc6b40589360b415598ef84608340ef", "score": "0.7204001", "text": "public function connect()\n {\n if (!empty($this->error)) {\n return false;\n }\n\n try {\n $this->connection = new \\PDO(\"mysql:dbname=$this->dbName;host=$this->dbHost\", $this->dbUser, $this->dbPassw);\n $this->connection->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n $this->connection->exec(\"set names utf8\");\n } catch (PDOException $e) {\n $this->error = $e->getMessage();\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "5116f1d4cebae3a42158a1b881ac7b84", "score": "0.7201034", "text": "public function connect()\n {\n if(!$this->con)\n {\n $this->con = mysqli_connect($this->db_host,$this->db_user,$this->db_pass,$this->db_name);\n if($this->con)\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n else\n {\n return true;\n }\n }", "title": "" }, { "docid": "82c0eb1206ab2a690b9a657ecbb5cafc", "score": "0.71716344", "text": "function db_connect( $allow_bail = true ) {\n\n\t\t$this->is_mysql = true;\n\n\t\t$new_link = defined( 'MYSQL_NEW_LINK' ) ? MYSQL_NEW_LINK : true;\n\t\t$client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;\n\n\t\t$this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );\n\n\t\tif ( !$this->dbh ) {\n\t\t\t$this->bail( sprintf( __( \"\n\t\t\t\t\t\t\t<h1>Error establishing a database connection</h1>\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t<li>Are you sure you have the correct username and password?</li>\n\t\t\t\t\t\t\t\t<li>Are you sure that you have typed the correct hostname?</li>\n\t\t\t\t\t\t\t\t<li>Are you sure that the database server is running?</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\" ), htmlspecialchars( $this->dbhost, ENT_QUOTES ) ), 'db_connect_fail' );\n\n\t\t\treturn;\n\t\t}\n\n\t\t$this->ready = true;\n\n\t\t$this->select( $this->dbname, $this->dbh );\n\t}", "title": "" }, { "docid": "3d4a3687e309be7a61b53f8d462a6ea7", "score": "0.7171231", "text": "public function connect ()\n {\n if ($this->isConnect()) {\n return true;\n }\n\n // vycisteni cache\n $this->flush();\n\n @$this->dbo = pg_connect('host=' . $this->dbhost . '\n dbname=' . $this->dbname . '\n user=' . $this->user . '\n password=' . $this->pass);\n\n if(!$this->dbo) {\n throw new DBI_ConnectException('Spojení s PostgreSQL DB ' . $this->dbname . ' se nezdařilo');\n }\n // odpovidajici nastaveni priznaku spojeni\n $this->isConnect = true;\n }", "title": "" }, { "docid": "60c3fac1ebede964f74c68203d795a66", "score": "0.71634173", "text": "public static function connect()\n\t{\n\t\t/*\n\t\t\tif connection has been instantiated (ie: not null), check if is already connected\n\t\t*/\n\t\tif ( null != DB::instance()->connection ) {\n\t\t\tif ( (func_num_args() == 0) && false != DB::instance()->connection->is_connected() ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tif ( func_num_args() > 0 ) {\n\t\t\t$connect_string = func_get_arg( 0 );\n\t\t\t$db_user = func_get_arg( 1 );\n\t\t\t$db_pass = func_get_arg( 2 );\n\t\t}\n\t\telse {\n\t\t\t/* We use the config.php variables */\n\t\t\t$connect_string = Config::get( 'db_connection' )->connection_string;\n\t\t\t$db_user = Config::get( 'db_connection' )->username;\n\t\t\t$db_pass = Config::get( 'db_connection' )->password;\n\t\t}\n\t\tDB::instance()->connection = DatabaseConnection::ConnectionFactory( $connect_string );\n\t\tif ( null != DB::instance()->connection ) {\n\t\t\treturn DB::instance()->connection->connect( $connect_string, $db_user, $db_pass );\n\t\t}\n\t\telse {\n\t\t\t// do some error handling here. The connect string does not have a corresponding DB connection object\n\t\t\tprint _t( 'Panic! No database connection class appears to be found for the connection string specified. Please check config.php' );\n\t\t}\n\t}", "title": "" }, { "docid": "35996aff52706f8b06d53f576d01b732", "score": "0.71614337", "text": "function cb_connect(){\n if(mysql_connect(CB_HOST, CB_USERNAME, CB_PASSWORD)){\n if (mysql_select_db(CB_NAME)) {\n return true;\n } else {\n throw new Exception(\"Could not select database.\");\n }\n } else {\n throw new Exception(\"Could not connect to database.\");\n }\n}", "title": "" }, { "docid": "2f6f8d5b1b6c88026631e7729aef246c", "score": "0.7116484", "text": "private function databaseConnection()\n {\n // connection already opened\n if ($this->db_connection != null) {\n return true;\n } else {\n // create a database connection, using the constants from config/config.php\n try {\n $this->db_connection = new PDO('mysql:host='. DB_HOST .';dbname='. DB_NAME, DB_USER, DB_PASS);\n return true;\n\n // If an error is catched, database connection failed\n } catch (PDOException $e) {\n return false;\n }\n }\n }", "title": "" }, { "docid": "284dae48d0ad7760ff0b6fef3b30596b", "score": "0.711378", "text": "private function databaseConnection() {\n // connection already opened\n if ($this->db_connection != null) {\n return true;\n } else {\n // create a database connection, using the constants from config/config.php\n try {\n // Generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n // Also important: We include the charset, as leaving it out seems to be a security issue:\n // @see http://wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers#Connecting_to_MySQL says:\n // \"Adding the charset to the DSN is very important for security reasons,\n // most examples you'll see around leave it out. MAKE SURE TO INCLUDE THE CHARSET!\"\n $this->db_connection = new PDO('mysql:host='. DB_HOST .';dbname='. DB_NAME . ';charset=utf8', DB_USER, DB_PASS);\n return true;\n // If an error is catched, database connection failed\n } catch (PDOException $e) {\n $this->errors[] = MESSAGE_DATABASE_ERROR;\n return false;\n }\n }\n }", "title": "" }, { "docid": "827930273df474e96dadc8678be26494", "score": "0.711212", "text": "public function connect() {\n\t\t$this->last_error = null;\n\t\t$config = $this->config;\n\t\ttry {\n\t\t\t$this->connection = new PDO($config['connect'] . ':' . $config['database'], null, null, array(PDO::ATTR_PERSISTENT => $config['persistent']));\n\t\t\t$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t$this->connected = is_object($this->connection);\n\t\t}\n\t\tcatch(PDOException $e) {\n\t\t\t$this->last_error = array('Error connecting to database.', $e->getMessage());\n\t\t}\n\t\treturn $this->connected;\n\t}", "title": "" }, { "docid": "4bc320b11ee94fd3f0149475561e8524", "score": "0.7112119", "text": "private function Connect()\n {\n // Try and connect to the database\n if (!isset(self::$connection)) {\n // Get and Set the environment variables.\n $dbHost = getenv(\"DB_HOST\");\n $dbUsername = getenv(\"DB_USERNAME\");\n $dbPassword = getenv(\"DB_PASSWORD\");\n $database = getenv(\"DB_DATABASE\");\n // Create the new database object.\n self::$connection = new mysqli($dbHost, $dbUsername, $dbPassword, $database);\n }\n\n // If error, return false. You can handle error messages with the\n // Error() method below.\n if (self::$connection === false) {\n return false;\n }\n\n // If all went well, return the connection to be used in the scripts.\n return self::$connection;\n }", "title": "" }, { "docid": "a75468e065762dcedf1d75ad1e8956f5", "score": "0.7107297", "text": "private function connect()\n {\n //Set mysqli error reporting\n mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);\n\n try\n {\n self::$_con = new PDO(\"mysql:host=\" . $this->address . \";port=\" . $this->port . \";dbname=\" . $this->database . ';charset=utf8', $this->username, $this->password);\n\n self::$_con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return true;\n }\n catch(mysqli_sql_exception $ex)\n {\n error_log(\"Unable to connect to database [$this->database] with the error [$ex]\");\n }\n catch(exception $exception)\n {\n error_log(\"Unknown error occurred while trying to connect to DB [$this->database] [$exception]\");\n }\n\n return false;\n }", "title": "" }, { "docid": "9e489d9734637b879e542d1aa9fb124e", "score": "0.7099051", "text": "private function databaseConnection()\n {\n // connection already opened\n if ($this->db_connection != null) {\n return true;\n } else {\n // create a database connection, using the constants from config/config.php\n try {\n $this->db_connection = new PDO('mysql:host='. DB_HOST .';dbname='. DB_NAME, DB_USER, DB_PASS);\n return true;\n // If an error is catched, database connection failed\n } catch (PDOException $e) {\n $this->errors[] = \"Database connection problem.\";\n return false;\n }\n }\n }", "title": "" }, { "docid": "ae04cb9f53cd0ee674269bd2652de6be", "score": "0.7093893", "text": "public function connect()\n\t\t{\t\n\t\t\t// Connect the the database\n\t\t\t$this->m_connection = new mysqli($this->m_sever, $this->m_username, $this->m_password, $this->m_database_name); \n\t\t\t// Check if it has connect successfully\n\t\t\tif($this->m_connection->connect_errno)\n\t\t\t{\n\t\t\t\techo \"Unabled to connect to the MySql Sever: \" . $con->connect_errno;\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "ae04cb9f53cd0ee674269bd2652de6be", "score": "0.7093893", "text": "public function connect()\n\t\t{\t\n\t\t\t// Connect the the database\n\t\t\t$this->m_connection = new mysqli($this->m_sever, $this->m_username, $this->m_password, $this->m_database_name); \n\t\t\t// Check if it has connect successfully\n\t\t\tif($this->m_connection->connect_errno)\n\t\t\t{\n\t\t\t\techo \"Unabled to connect to the MySql Sever: \" . $con->connect_errno;\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "f619c46008a2ebf154e8e51ee52670fc", "score": "0.70795995", "text": "private function databaseConnection()\n {\n // connection already opened\n if ($this->db_connection != null) {\n return true;\n } else {\n // create a database connection, using the constants from config/config.php\n try {\n $this->db_connection = new PDO('mysql:host='. DB_HOST .';dbname='. DB_NAME, DB_USER, DB_PASS);\n return true;\n\n // If an error is catched, database connection failed\n } catch (PDOException $e) {\n $this->errors[] = \"Database connection problem.\";\n return false;\n }\n }\n }", "title": "" }, { "docid": "b3f7f791f586f9bf54fdca9742cff515", "score": "0.70771074", "text": "public function openConnection() {\n\t\t$connectString = \"mysqli://\" . $this->userName . \n\t\t\t\":\" . $this->password . \"@puccini.cs.lth.se/\" .\n\t\t\t$this->database;\n\t\t$this->conn = MDB2::connect($connectString);\n\t\tif (PEAR::isError($this->conn)) {\n\t\t\t$error = \"Connection error: \" . $this->conn->getMessage();\n\t\t\tprint $error . \"<p>\";\n\t\t\tunset($this->conn);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "73b63d4b8d6601e23f4728f54b7b6ae0", "score": "0.70738703", "text": "public function connect()\n\t{\n\t\tif (!$this->_isPersistent)\n\t\t\t$this->_connection = pg_connect($this->_connectionString);\n\t\telse\n\t\t\t$this->_connection = pg_pconnect($this->_connectionString);\n\n\t\tif (!$this->_connection)\n\t\t{\n\t\t\t$this->_lastErrorMessage = 'PgSqlConnection[' . $this->name() . ']: Failed to connect to database server.';\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e7012fa80dde71c16d79745af7e44bf7", "score": "0.7070632", "text": "function dbConnect() {\n $dbconnect = mysqli_connect(dBServerName, dbUserName, dbPassword, dbName);\n dbConnectFailed();\n return $dbconnect;\n}", "title": "" }, { "docid": "846e588c84bb1af801fa0e8a2fdf4d38", "score": "0.70641947", "text": "public function connect(){\n if($this->db !== NULL){ return false; }\n $this->db = new mysqli($this->host, $this->user, $this->pass, $this->name);\n\n if ($this->db->connect_error) {\n $this->db = NULL;\n throw new Exception('Connect Error (' . $this->db->connect_errno . ') ' . $this->db->connect_error);\n }\n return true;\n }", "title": "" }, { "docid": "5ec2e5dc66b1a68fd4f535c2b18f954d", "score": "0.70396864", "text": "private function connect()\n {\n try {\n if (!isset($this->_connected) || !$this->_connected) {\n $this->_connected = $this->_connection->connect();\n $this->_db = $this->_connection->selectDB(\"$this->_db_name\");\n }\n return $this->_connected;\n } catch (MongoConnectionException $e) {\n die('Error connecting to MongoDB server');\n } catch (MongoException $e) {\n die('Error: ' . $e->getMessage());\n } catch (Exception $e) {\n error_log($e->getMessage());\n if (SHOW_ERRORS) {\n echo $e->getMessage();\n }\n }\n }", "title": "" }, { "docid": "6f73289c572d7c4230456516be649287", "score": "0.70147127", "text": "function DBConnect()\n {\n /**\n * Check for existing link, even though mysql_connect does it for us. If \n * one exists, we don't waste the connect op and just use that.\n */\n if($this->db_link == NULL)\n {\n if(version_compare(PHP_VERSION, '5.5.0') >= 0){\n $this->db_link = mysqli_connect($this->db_host, $this->db_user, $this->db_pass, $this->db_name);\n }\n else\n $this->db_link = mysql_connect($this->db_host, $this->db_user, $this->db_pass);\n if($this->db_link == NULL)\n {\n Debug::Debug_er('Could not connect: [' . mysql_errno() . '] PHP version ['.phpversion().']: ' . mysql_error(), DEBUG_LEVEL);\n die;\n }\n }\n if(version_compare(PHP_VERSION, '5.5.0') < 1 ){\n // db_link will exist here if the script hasn't stopped\n if(mysql_select_db($this->db_name))\n {\n return TRUE;\n }\n else\n {\n Debug::Debug_er(\"Could not select db : \" . $this->db_name. '[' . mysql_errno() . '] $this->db_user ['.$this->db_user.'] PHP version ['.PHP_VERSION.']: ' . mysql_error(), DEBUG_LEVEL);\n\n mysql_close($this->db_link);\n $this->db_link = NULL;\n return FALSE;\n }\n }\n\n }", "title": "" }, { "docid": "5db28701c74097ee9adc60d6f0aa1d39", "score": "0.70049155", "text": "public function connect(): bool\n {\n // Early return if the connection is already open and custom setup has been done.\n if (!parent::connect()) {\n return false;\n }\n\n foreach ($this->prepareConnectionCommands as $command) {\n if ($this->executeUpdate($command) === false) {\n GeneralUtility::sysLog(\n 'Could not initialize DB connection with query \"' . $command . '\": ' . $this->errorInfo(),\n 'core',\n GeneralUtility::SYSLOG_SEVERITY_ERROR\n );\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "8ebcbce23b52f4b133dbb53b17609f5c", "score": "0.69946414", "text": "private function databaseConnection()\n {\n // if connection already exists\n if ($this->db_connection != null) {\n return true;\n } else {\n try {\n // Generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n // Also important: We include the charset, as leaving it out seems to be a security issue:\n // @see http://wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers#Connecting_to_MySQL says:\n // \"Adding the charset to the DSN is very important for security reasons,\n // most examples you'll see around leave it out. MAKE SURE TO INCLUDE THE CHARSET!\"\n $this->db_connection = new PDO('mysql:host='. DB_HOST .';dbname='. DB_NAME . ';charset=utf8', DB_USER, DB_PASS);\n return true;\n } catch (PDOException $e) {\n $this->errors[] = \"Database Error: \" . $e->getMessage();\n }\n }\n // default return\n return false;\n }", "title": "" }, { "docid": "f2d56f7ba0d1b0dd3d9ab258b29103e0", "score": "0.69944566", "text": "public function try_connect() {\n\n\t\t// Check the database details.\n\t\tif ( ! defined( 'DB_HOST' ) || ! defined( 'DB_NAME' ) || ! defined( 'DB_USERNAME' ) || ! defined( 'DB_PASSWORD' ) || ! defined( 'DB_PREFIX' ) ) {\n\n\t\t\t// We don't have any details set.\n\t\t\tno_thank_you( 'Invalid or incomplete database details given.' );\n\n\t\t\treturn false;\n\n\t\t}\n\n\t\t// Set database values.\n\t\t$this->host = DB_HOST;\n\t\t$this->port = DB_PORT;\n\t\t$this->name = DB_NAME;\n\t\t$this->username = DB_USERNAME;\n\t\t$this->password = DB_PASSWORD;\n\t\t$this->prefix = DB_PREFIX;\n\n\t\t// Try and connect.\n\t\ttry {\n\n\t\t\t// Try to establish a database connection.\n\t\t\t$this->connection = new PDO( \"mysql:host=\" . $this->host . \";port=\" . $this->port . \";dbname=\" . $this->name, $this->username, $this->password );\n\n\t\t\t// Set default connection attributes.\n\t\t\t$this->connection->setAttribute( PDO::ATTR_CASE, PDO::CASE_LOWER );\n\t\t\t$this->connection->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING );\n\t\t\t$this->connection->setAttribute( PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC );\n\n\t\t\t// Set the connection flag.\n\t\t\t$this->is_connected = true;\n\n\t\t\treturn $this->is_connected;\n\n\t\t} catch ( PDOException $error ) {\n\n\t\t\t// Failed to connect to database.\n\t\t\tno_thank_you( 'Could not connect to the database.' );\n\n\t\t\treturn false;\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "720d837e610a997fab4d2ad056344e5a", "score": "0.69864714", "text": "public function connect($dbname) {\n\n try {\n // data source name\n $dsn = \"mysql:host={$this->host};dbname={$dbname};charset=utf8mb4\";\n \n $this->db = new PDO($dsn, $this->user, $this->pass);\n\n return true;\n }\n catch(PDOException $e) {\n $this->grava_erro($e->getMessage(), \"0\", \"Banco: {$dbname}\");\n return false;\n }\n\n }", "title": "" }, { "docid": "45eb003022c70f9203ef13f04f4c84d7", "score": "0.6977647", "text": "function db_connect()\n {\n global $connection;\n global $db;\n\n // Establish the database connection\n $connection = mysqli_connect(DB_HOST, DB_USERNAME, DB_PASSWORD);\n $db = mysqli_select_db($connection, DB_DATABASE);\n\n // Check connection\n if (mysqli_connect_errno()) {\n $this->log_error(\"Failed to connect to MySQL: \" . mysqli_connect_error());\n }\n if (isset($db)) {\n return $db;\n } else {\n $this->log_error(\"UNABLE to Connect to Mysql\");\n return false;\n }\n }", "title": "" }, { "docid": "b2870324802e71506ef8bc3d72e0222f", "score": "0.6970391", "text": "private static function connectToDatabase()\n {\n $servername = \"127.0.0.1:3306\";\n $username = \"HC_WebPortal\";\n $password = \"6MRHd5EyrEmbDig\";\n $databaseName = \"h_choices_db\";\n\n // Create connection\n $conn = new mysqli($servername, $username, $password, $databaseName);\n // Check connection\n if ($conn->connect_error)\n {\n die(\"Connection attempt failed to \".$databaseConnection->host_info.\": \" . $conn->connect_error);\n }\n else\n {\n //echo \"connected to \".$conn->host_info.\"</br>\";\n return $conn;\n }\n }", "title": "" }, { "docid": "c0a891d06f4b7d7578b81461d68274f9", "score": "0.6967267", "text": "protected function _openDBConnection() {\n\t\t$db = false;\n\t\t\n\t\ttry {\n\t\t\t$db = NewADOConnection ( $this->configOptions ['dbtype'] );\n\t\t\tif (! empty ( $db )) {\n\t\t\t\t$dbConnection = $db->Connect ( $this->configOptions ['dbhost'], $this->configOptions ['dbuser'], $this->configOptions ['dbpass'] );\n\t\t\t\tif ($dbConnection) {\n\t\t\t\t\t$existing_db = $db->SelectDB ( $this->configOptions ['dbname'] );\n\t\t\t\t\tif (! $existing_db) {\n\t\t\t\t\t\t$db->_errorMsg = 'This database user does not have rights to the database.';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception $exc ) {\n\t\t\techo 'Your database credentials do not work.';\n\t\t}\n\t\treturn $db;\n\t}", "title": "" }, { "docid": "ca54f14566eec1f49107a1bbc3173c17", "score": "0.6964905", "text": "function connect() {\r\n\t\t$this->dbLink = mysqli_connect($this->host,$this->acct,$this->password,$this->dbName) or exit(\"failed\");\r\n\t\tif(!$this->dbLink) {\r\n\t\t\techo \"db connection failed\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b7b896318992e9cbcc3cf13ace8872a6", "score": "0.6918428", "text": "public function connect()\n {\n // Include Constants file if not already included\n include_once dirname(__FILE__) . '/constants.php';\n\n // Create connection, and verify connection to DB is established\n $this->db = mysqli_connect(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_NAME);\n if (mysqli_connect_errno()) {\n echo \"Failed to connect to database: \" . mysqli_connect_error();\n return 0;\n }\n\n // Turn off auto commit mode for queries on database connection\n $this->db->autocommit(false);\n\n // Return Connection Link\n return $this->db;\n }", "title": "" }, { "docid": "240f4ee15b8c49536e5562e25cabb80e", "score": "0.691521", "text": "private function connect() {\n // Try and connect to the database\n if (!isset(self::$connection)) {\n // Load configuration as an array. Use the actual location of your configuration file\n // Put the configuration file outside of the document root\n $config = parse_ini_file('config.ini');\n self::$connection = new \\mysqli('localhost', $config['username'], $config['password'], $config['dbname']);\n //If conection error just create the data base\n if (self::$connection->connect_error) {\n self::$connection = new \\mysqli('localhost', $config['username'], $config['password']);\n if (self::$connection->connect_error) {\n die('Connect Error (' . self::$connection->connect_errno . ') ' . self::$connection->connect_error);\n }\n $this->databaseCreated = false;\n }\n }\n // If connection was not successful, handle the error\n if (self::$connection === false) {\n // Handle error - notify administrator, log to a file, show an error screen, etc.\n\n return false;\n }\n return self::$connection;\n }", "title": "" }, { "docid": "35c79be3104f7b01af66496efe690b23", "score": "0.69119155", "text": "public function connect() {\n\t\t$this->con = @mysql_connect(\n\t\t\t$this->server,\n\t\t\t$this->username,\n\t\t\t$this->password\n\t\t);\n\n\t\tif(!$this->con) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f30f2b167109f50e03e0291300fa0f55", "score": "0.6902707", "text": "function connect_portal_db() {\n if($this->dbh_portal == null) {\n $this->dbh_portal = mysqli_connect(DB_SERVER_PORTAL, DB_USER_PORTAL, DB_PASS_PORTAL, DB_NAME_PORTAL, DB_PORT_PORTAL);\n if (mysqli_connect_errno()) {\n $err_params = array();\n $err_params['sql_error'] = mysqli_connect_error($this->dbh_portal);\n $err_params['db_host'] = DB_SERVER_PORTAL;\n $err_params['db_name'] = DB_NAME_PORTAL;\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "d7f2d11bc0aeb223ac4b1177d195dfac", "score": "0.69023263", "text": "function connect()\r\n\t{\r\n\t\t$connect = 'mysql_'.($this->persistent?'p':'').'connect';\r\n\t\tif(!($this->connection = @$connect($this->host, $this->user, $this->passwd, true)))\r\n\t\t\texit('Unable to connect to MySQL server');\r\n\t\tif(!@mysql_select_db($this->name, $this->connection))\r\n\t\t\texit('Unable to select the MySQL database');\r\n\t}", "title": "" }, { "docid": "f5ae087b98c976b91ee7e56c28836a12", "score": "0.68936235", "text": "static function connect(){\n if(empty(MegaDB::$pdo)) {\n try {\n MegaDB::$pdo = new PDO(DB::HOST, DB::USER, DB::PASS);\n } catch (Exception $e){\n //echo \"Error: \".$e->getMessage().\"<br>\";\n die(\"uh oh! it looks like our database is down.\");\n }\n }\n return MegaDB::$pdo ? true : false;\n }", "title": "" }, { "docid": "ff66d80478b7df85dc6d216e9d18fd5d", "score": "0.68919694", "text": "private function connectToDB()\n {\n $this->handler = new DBConnect();\n $this->handler = $this->handler->startConnection();\n }", "title": "" }, { "docid": "257353da20883f16841f7b22d88d2437", "score": "0.68817806", "text": "public function openConnection() {\n\t\ttry {\n\t\t\t$this->conn = new PDO(\"mysql:host=$this->host;dbname=$this->database\", \n\t\t\t\t\t$this->userName, $this->password);\n\t\t\t$this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t} catch (PDOException $e) {\n\t\t\t$error = \"Connection error: \" . $e->getMessage();\n\t\t\tprint $error . \"<p>\";\n\t\t\tunset($this->conn);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "564fd558d43eb8b5eb8b09d6cbf9ec33", "score": "0.6881682", "text": "public function connect() {\r\n\t\tif ( !isset( self::$config ) ) throw new Exception( \"@config not set\" );\r\n\t\t\r\n\t\t$config = &self::$config;\r\n\t\t\r\n\t\tif ( self::$Connection ) return false;\r\n\t\t$connectStr = \r\n\t\t\t\"host=\" .\t\t$config[\"host\"] .\t\t\" \".\r\n\t\t\t\"port=\" .\t\t$config[\"port\"] .\t\t\" \".\r\n\t\t\t\"dbname=\" .\t$config[\"dbname\"] . \t\" \".\r\n\t\t\t\"user=\" .\t\t$config[\"user\"] . \t\t\" \".\r\n\t\t\t\"password=\" .\t$config[\"password\"];\r\n\t\t\r\n\t\ttry {\r\n\t\t\tself::$Connection = pg_connect( $connectStr );\r\n\t\t} catch ( Exception $e ) {\r\n\t\t\tthrow new Exception( pgsql_error() );\r\n\t\t}\r\n\t\t\r\n\t\tif ( !self::$Connection ) throw new Exception( \"Unable to connect to database\" );\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "28c6455df356ca6b86f8fbea698257f2", "score": "0.68658495", "text": "function connectToDatabase (){\n include_once(\"Database.php\");\n $this->Database = new Database();\n $this->Database->openCon();\n }", "title": "" }, { "docid": "596567eeed149181107abc76713f3dcf", "score": "0.6846522", "text": "public function connect() {\n $server = \"localhost\";\n $user = \"root\";\n $password = \"root\";\n $myDB = \"classDB\";\n\n // Try to connect to DB\n if (!isset(self::$connection)) {\n // Creates a DB connection object\n self::$connection = new mysqli ($server, $user, $password, $myDB);\n echo '<script>console.log(\"Successfully Connected to DB\")</script>';\n }\n\n // If connection fails\n if (self::$connection === false) {\n // Handle error\n return false;\n }\n return self::$connection;\n }", "title": "" }, { "docid": "e5d6eefcc79ab3d69e97f64790ec26f0", "score": "0.6842193", "text": "private function isConnected(): bool {\n if ($this->dbConnection) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "1c78178d99744a7d1f83595b9a9165c1", "score": "0.6841845", "text": "function db2_connect(#[\\SensitiveParameter] string $database, ?string $username, #[\\SensitiveParameter] ?string $password, array $options = []) {}", "title": "" }, { "docid": "ddb8b3f432cad0fe12ce56c296c8596c", "score": "0.6841045", "text": "public function connect($db_server, $db_user, $db_passwd, $db_name) {\n $this->db_user = $db_user;\n $this->db_passwd_md5 = md5($db_passwd);\n\n $this->mysqli = new mysqli($db_server, $db_user, $db_passwd, $db_name);\n if ($this->mysqli->connect_errno) {\n $this->connError = array($this->mysqli->connect_errno, $this->mysqli->connect_error);\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "d805fd9dca30e9f258d365b54bbf17b8", "score": "0.6831694", "text": "function db_connect ($host,$user,$password){\n\t\tif (mysql_connect($host,$user,$password)){\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "5b31592cf386d4d882edb031581f8fac", "score": "0.6831674", "text": "public function open_connection_db(){\n $this->connection = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME);\n \n // Validation\n if($this->connection->connect_errno)\n echo \"CONNECTION FAILED! \" . $this->connection->connect_error;\n }", "title": "" }, { "docid": "e19605a3a64710dcf4e0e9ba0fb2c7dc", "score": "0.6822042", "text": "public function db_check () {\n try { $this->Database_pdns->connect(); }\n catch (Exception $e) {\n // error\n $this->error = $e->getMessage();\n return false;\n }\n // ok\n return true;\n }", "title": "" }, { "docid": "51fabc5fe48698c06219c5a3a006db59", "score": "0.6819141", "text": "function connect()\n\t{\n\t\tif (!$this->_backend->connected()) {\n\t\t\treturn $this->_backend->connect();\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "b6ae916f11cf3c97c07da64e5f41f4cc", "score": "0.6818214", "text": "function dbConnect() {\n\t//$dbc = new PDO('mysql:host=dbs.eecs.utk.edu;dbname=ghanas', \n\t//\t\t'ghanas', 'applePie1');\n\t$dbc = new PDO('mysql:host=127.0.0.1;dbname=art_of_hiking', 'root', 'Xblade32');\n\tif ($dbc) {\n\t\treturn $dbc;\n\t}\n\telse {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "54c60b068464fbe46cf65d19ea171aa9", "score": "0.68181384", "text": "public function connect() {\n $this->error = false;\n $this->mysqli = new mysqli();\n $this->mysqli->connect(Settings::$db_host, Settings::$db_user, Settings::$db_password, Settings::$db_name);\n if ($this->mysqli->connect_errno != 0) {\n $header = $this->buildErrorMessageHeader();\n error_log(\"$header errore nella connessione al database - {$this->mysqli->connect_errno} : {$this->mysqli->connect_error}\");\n $this->error = true;\n }\n return !$this->error;\n }", "title": "" }, { "docid": "e79c6455bb4cb23c8751cc8e7a19c8f2", "score": "0.6812945", "text": "function dbconnect(){\r\n\t\t$connections = mysql_connect($this->hostname_logon, $this->username_logon, $this->password_logon) or die ('Unabale to connect to the database');\r\n\t\tmysql_select_db($this->database_logon) or die ('Unable to select database!');\t\r\n\t\treturn;\r\n\t}", "title": "" }, { "docid": "c8ce9c0441c579c0039cf9680afe1e54", "score": "0.68113357", "text": "private function connectToDatabase()\n {\n $this->db = new database();\n }", "title": "" }, { "docid": "dfa6e0e32a69983d01b5528e05c2cb13", "score": "0.6807661", "text": "function connect()\n {\n if ($this->isConnected()) {\n return true;\n }\n //make a connection..\n $this->db = ADONewConnection('mysql');\n if (!$this->use_local_db) {\n $db_host = $this->settings['db_host'];\n $db_user = $this->settings['db_user'];\n $db_pass = $this->settings['db_pass'];\n $db_name = $this->settings['db_name'];\n } else {\n include(GEO_BASE_DIR . 'config.default.php');\n $db_user = $db_username;\n $db_pass = $db_password;\n $db_name = $database;\n }\n $this->db->Connect($db_host, $db_user, $db_pass, $db_name);\n if (!$this->db->isConnected()) {\n $this->log(\"Error connecting to bridge database, check settings for this bridge. DB error returned: \" . $this->db->ErrorMsg(), true);//log it\n return false;\n }\n if ($this->settings['db_strict']) {\n if (!$this->db->Execute('SET SESSION sql_mode=\\'\\'')) {\n $this->log('Error when attempting to turn off strict mode, check your bridge settings. May need to turn off the strict mode setting. Debug info: ' . $this->db->ErrorMsg(), true);\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "56cbeb0605ea6d069ea265c11100bc22", "score": "0.68035513", "text": "function ConnectDataBase()\n{\n\tglobal $DB_CONNECTED;\n\t//Make sure that only 1 connection is created\n\tif($DB_CONNECTED != true) {\n\t\tglobal $DATABASE_SERVER;\n\t\tglobal $DATABASE_PORT;\n\t\tglobal $DATABASE_USER;\n\t\tglobal $DATABASE_NAME;\n\t\tglobal $DATABASE_PASSWORD;\n global $MODE;\n\t\tglobal $DB;\n\t\t//IF port set, use it\n if($MODE=='mysql'){\n if($DATABASE_PORT != \"\") {$DATABASE_SERVER = $DATABASE_SERVER.\":\".$DATABASE_PORT;}\n $DB = @mysql_connect($DATABASE_SERVER, $DATABASE_USER, $DATABASE_PASSWORD);\n if (!$DB) {errorPushTitle(\"Database error\");ErrorPushBody(\"Unable to connect to: \".$DATABASE_SERVER);ErrorCall();}\n $sel = @mysql_select_db($DATABASE_NAME);\n if (!$sel) {errorPushTitle(\"Database error\");ErrorPushBody(\"Unable to select database \".$DATABASE_NAME);ErrorCall();}\n $DB_CONNECTED = true;\n }elseif($MODE=='mysqli'){\n if($DATABASE_PORT != \"\") {$DATABASE_SERVER= $DATABASE_SERVER.\":\".$DATABASE_PORT;}\n $DB = new mysqli($DATABASE_SERVER, $DATABASE_USER, $DATABASE_PASSWORD, $DATABASE_NAME);\n\t\t\tif ($DB->connect_error) {\n\t\t\t print(\"Not connected, error: \" . $DB->connect_error . \"<br>\");\n\t\t\t}\n\n }\n\t\treturn $DB;\n\t}else {return false;}\n}", "title": "" }, { "docid": "c6c67b91768a3dc50817ce3a3582b3f8", "score": "0.67998755", "text": "function connectToDB() {\r\n\t\tif ($GLOBALS['wgAuthDrupal_UseExtDatabase']) {\r\n\t\t\t// Drupal tables are in a separate DB from MW tables, create\r\n\t\t\t// a separate DB connection\r\n\t\t\t$this->my_dbr = & Database :: newFromParams(\r\n\t\t\t\t\t$GLOBALS['wgAuthDrupal_MySQL_Host'],\r\n\t\t\t\t\t$GLOBALS['wgAuthDrupal_MySQL_Username'],\r\n\t\t\t\t\t$GLOBALS['wgAuthDrupal_MySQL_Password'],\r\n\t\t\t\t\t$GLOBALS['wgAuthDrupal_MySQL_Database'],\r\n\t\t\t\t\t'auth_drupal_db_error_callback' );\r\n\t\t} else {\r\n\t\t\t$this->my_dbr = & wfGetDB(DB_SLAVE);\r\n\t\t}\r\n\r\n\t\tif (!$this->my_dbr->isOpen()) {\r\n\t\t\twfDebug(\"AuthDrupal::connectToDB() : DB failed to open\\n\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "49d2a8062ad9410c098ee81a36f26e8c", "score": "0.6799774", "text": "public function connect() {\n\t\t$config = $this->config;\n\t\t$flags = $config['flags'] + array(\n\t\t\tPDO::ATTR_PERSISTENT => $config['persistent'],\n\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n\t\t);\n\t\ttry {\n\t\t\t$this->_connection = new PDO('sqlite:' . $config['database'], null, null, $flags);\n\t\t\t$this->connected = true;\n\t\t} catch(PDOException $e) {\n\t\t\tthrow new MissingConnectionException(array(\n\t\t\t\t'class' => get_class($this),\n\t\t\t\t'message' => $e->getMessage()\n\t\t\t));\n\t\t}\n\t\treturn $this->connected;\n\t}", "title": "" }, { "docid": "68bddafbe33e49705d57543e934139b9", "score": "0.6797021", "text": "public function openConnection() {\n try {\n $this->conn = new PDO(\"mysql:host=$this->host;dbname=$this->database\", \n $this->userName, $this->password);\n $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e) {\n $error = \"Connection error: \" . $e->getMessage();\n print $error . \"<p>\";\n unset($this->conn);\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "349c5260256960b61be63b32dbb8e286", "score": "0.67936146", "text": "private function createDatabaseConnection()\n {\n try {\n $this->db_connection = new PDO($this->db_type . ':' . $this->db_sqlite_path);\n return true;\n } catch (PDOException $e) {\n $this->feedback = \"PDO database connection problem: \" . $e->getMessage();\n } catch (Exception $e) {\n $this->feedback = \"General problem: \" . $e->getMessage();\n }\n return false;\n }", "title": "" }, { "docid": "349c5260256960b61be63b32dbb8e286", "score": "0.67936146", "text": "private function createDatabaseConnection()\n {\n try {\n $this->db_connection = new PDO($this->db_type . ':' . $this->db_sqlite_path);\n return true;\n } catch (PDOException $e) {\n $this->feedback = \"PDO database connection problem: \" . $e->getMessage();\n } catch (Exception $e) {\n $this->feedback = \"General problem: \" . $e->getMessage();\n }\n return false;\n }", "title": "" }, { "docid": "763eddac37c42c146d40138de5cf5ce0", "score": "0.6792881", "text": "function connectDb()\n\t{\n\t\t$db = new mysqli($this->config['database']['server']\n\t\t\t\t\t, $this->config['database']['user']\n\t\t\t\t\t, $this->config['database']['pass']\n\t\t\t\t\t, $this->config['database']['dbname']);\n\n\t\tif ($db->connect_errno > 0) {\n\t\t\tdie('Unable to connect to database ['.$db->connect_error.']');\n\t\t}\n\n\t\t// successful connect db\n\t\t$this->db = $db;\n\t}", "title": "" }, { "docid": "6b1ddde6a6f4b1155bb90862d0330170", "score": "0.67911124", "text": "function connectToDatabase() {\n\t\t// Try to connect\n $conn = mysql_connect($this->host,$this->username,$this->password);\n\n\t\t// Testing the connection\n if(!$conn) die (\"Cannot connect to the database\");\n else $this->myconn = $conn;\n\n return $conn;\n }", "title": "" }, { "docid": "b5142110cc77074a5fe6871352bfce14", "score": "0.67885643", "text": "public function connect()\n {\n /*\n * Connect to the specified database and select the database\n */\n if (!isset ($this->connection) || !mysql_ping($this->connection))\n {\n $this->connection = mysql_pconnect($this->db_host, $this->db_user, $this->db_password);\n $this->connection || $this->send_db_conn_error(\"sql connect failed\");\n }\n\t\n\tif (!mysql_select_db($this->db_name, $this->connection)) {\n\t\t$this->send_db_conn_error(\"unable to select db:\");\n\t}\n\n\tif (!$this->mysqli_conn) {\n\t\t$this->mysqli_conn = new mysqli($this->db_host,\n\t\t\t\t\t\t$this->db_user,\n\t\t\t\t\t\t$this->db_password,\n\t\t\t\t\t\t$this->db_name);\n\t\t# check connection\n\t\tif (mysqli_connect_errno()) {\n\t\t\t$this->send_db_conn_error(\"mysqli connect failed with \" .\n\t\t\t\t\t\t mysqli_connect_error());\n\t\t}\n\t}\n }", "title": "" }, { "docid": "482ab26962b48cbeb57121ce1754ed5c", "score": "0.6776789", "text": "private function connectDB(){\n\t\n\t\tif (!$this->conn = mysql_connect($this->dbhost, $this->dbuser, $this->dbpass)){\t\t\n\t\t\tthrow new DatabaseException(\"Holy that's-what-she-said, Batwoman - the database is on fire!\");\n\t\t}\n\t\t\n\t\tif(!mysql_select_db($this->dbname,$this->conn)){\t\t\n\t\t\tthrow new DatabaseException('Error selecting database');\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "195d45adf642947f1ff762af7992b9af", "score": "0.6773666", "text": "private function connect()\n\t{\n\t\tif(!$this->connection)\n\t\t{\n\t\t\t$this->connection = mysqli_connect($this->params['host'], $this->params['username'], $this->params['password'])\n\t\t\t\tor trigger_error(mysqli_error());\n\t\t\tmysqli_select_db($this->connection, $this->params['database'])\n\t\t\t\tor trigger_error(mysqli_error());\n\t\t}\n\t}", "title": "" }, { "docid": "d42c3c715c9e1af897637bb809d4eb69", "score": "0.67652196", "text": "public function isConnected() : bool {\n if( !isset($this->db) ) { return false; }\n if( $this->db->connect_errno ) { return false; }\n return true; \n }", "title": "" }, { "docid": "f92ca4bdc70c8b95b7abb92aa2954a35", "score": "0.6763606", "text": "function ConnectToDb ($server, $user, $pass, $database) {\n\t\t// true/false depending on whether or\n\t\t// not a connection could be made.\n\t\t$link = mysql_pconnect($server, $user, $pass);\n\t\t$select = mysql_select_db($database, $link);\n\t\tmysql_query('set character set utf-8',$link); \n mysql_query(\"SET NAMES 'utf-8'\",$link);\n\t\tif (!$link || !$select)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn $link;\n\t}", "title": "" }, { "docid": "193abbc190b848654d7973e0f8f973bd", "score": "0.6762329", "text": "static function Connect() \n {\n self::Debug();\n\n if (self::$_CID > 0) return true; // If already connected\n \n self::$_CID = mysql_connect (self::$_host, self::$_user, self::$_pass) or self::Error(\"Can't connect DB.\"); // Connect DB or print error\n \n if (!mysql_query(\"SET NAMES utf8\", self::$_CID)) self::Error(\"Error set collation.\"); // Set UTF8 or print error\n \n if (!mysql_select_db(self::$_DB_name, self::$_CID)) self::Error(\"Can't set DB \".self::$_DB_name.\".\"); // Select DB or print error\n \n return true;\n }", "title": "" }, { "docid": "906d91d0d60a7d2a2721ccb04448bedf", "score": "0.676078", "text": "private function db_connect(){\n //Create MySQL DB Connection\n $this->dbConn = new \\mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n //Check Connection\n if($this->dbConn->connect_error){die(\"Connection Failed: \".$dbConn->connect_error);}\n //else{error_log(\"dbConn Active!\");}\n return;\n }", "title": "" }, { "docid": "b05ed776dea1d8ee423984b6f2299f3c", "score": "0.6745972", "text": "protected function connect()\n\t\t{\n\t\t\t$d = new DBUtil();\n\t\t\t$arr = $d->getDBCreds('shopt');\n\t\t\tmysql_connect($arr['DB_HOST'], $arr['DB_USER'], $arr['DB_PASSWORD']) or die(mysql_error());\n\t\t\tmysql_select_db($arr['DB_NAME']) or die(mysql_error());\n\t\t\treturn \"connection successful\";\n\t\t}", "title": "" }, { "docid": "393de3c4a99b3e4571c419a68936fc17", "score": "0.67456985", "text": "public function isConnected()\n {\n try {\n list($driver, $host, $port, $database, $username, $password) = $this->getConfig();\n new PDO(\"$driver:host=$host;port=$port;dbname=$database\", $username, $password, null);\n return true;\n } catch (PDOException $e) {\n return false;\n }\n }", "title": "" }, { "docid": "8313655245ef78ed76ba5ad730c3bef8", "score": "0.6741377", "text": "public function quick_connect($dbuser='', $dbpassword='', $dbname='', $dbhost='localhost') {\n\t\t$return_val = false;\n\t\tif ( ! $this->connect($dbuser, $dbpassword, $dbhost,true) ) ;\n\t\telseif ( ! $this->select($dbname) ) ;\n\t\telse $return_val = true;\n\t\treturn $return_val;\n\t}", "title": "" }, { "docid": "15c285bb4877a73a9f5f374b9d896ffe", "score": "0.6739687", "text": "private function connect(){\n\t$db_config = $this->config->environment['DB'][$this->db_name];\n\n \t$this->db = new mysqli($db_config['location'], $db_config['user'], $db_config['pass'], $db_config['db']);\n\n\tif ($this->db->connect_error) {\n \t\t$this->logger->error('Connect Error: ' . $this->db->connect_error);\n\t}\n\n\treturn;\n }", "title": "" }, { "docid": "07251a02e5ad7cfcc191aadb90ff7167", "score": "0.67392904", "text": "private function connectTo($_host, $_username, $_password, $_dbName) {\n $result = mysql_connect($_host, $_username, $_password);\n if (@mysql_select_db($_dbName)) {\n $this->status = true;\n mysql_query('SET NAMES utf8');\n $this->dbName = $_dbName;\n $this->dbLink = $result;\n return true;\n } else {\n $this->dbName = '';\n $this->dbLink = false;\n return $this->retError(__LINE__);\n }\n }", "title": "" }, { "docid": "defe1d70192c63e93884c75d2cc27290", "score": "0.67320204", "text": "public function testConnectToDatabase(): void {\n $conn = pg_connect(\"host=ec2-52-71-55-81.compute-1.amazonaws.com\n dbname=d7n9b1n1v1sh20\n port=5432\n user=ujebccinfaqukt\n password=5bc5f1199e72b3a45bcd320fad11fcd5464ac989651150d10681d498fa65ff08\n sslmode=require\");\n $this->assertNotFalse($conn);\n }", "title": "" }, { "docid": "7ae7b3e7a11d420f0e32871a5affef2d", "score": "0.67318285", "text": "private function connect() {\n // i'm assuming we don't want persistent mysql connections, but if we do, we could use:\n // $link = @mysql_pconnect($this->host, $this->username, $this->password);\n $link = @mysql_connect($this->host, $this->username, $this->password);\n if (!$link || !is_resource($link) || !@mysql_select_db($this->database_name, $link)) {\n $error_msg = \"Connect to {$this->database_name}@{$this->host} as {$this->username} failed: \" . mysql_error() . \" \" . mysql_errno();\n Logger::error($error_msg, 'SQLDatabaseService');\n throw new MySQLDatabaseException($error_msg);\n }\n $this->link = $link;\n Logger::info(\"Connect to {$this->database_name}@{$this->host} succeeded\", 'MySQLDatabaseService');\n }", "title": "" }, { "docid": "f021352976c7c175734960f974487fcc", "score": "0.67305386", "text": "function TALI_dbConnect() {\r\n\t$db_handle = mysqli_connect(TALI_DB_SERVER, TALI_DB_USERNAME, TALI_DB_PASSWORD);\r\n\t$db_found = mysqli_select_db($db_handle, TALI_DB_DBNAME);\r\n\tif ($db_found) {\r\n\t\t//Database connection successful\r\n\t\treturn $db_handle;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t//Database connection failed\r\n\t\treturn false;\r\n\t}\r\n}", "title": "" }, { "docid": "2c063bc4ff42dd9af829f17f2fc69c95", "score": "0.6730308", "text": "function connect() {\n $this->db = mysql_db::getConnection();\n\t\tif (isset($this->config['database']['username']) && isset($this->config['database']['password'])) {\n\t\t\tif (!$this->db->connect($this->config['database'])) {\n\t\t\t\t$this->_err_code = 100;\n\t\t\t\t$this->_err_msg = 'Could not connect to database server';\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "9c8cdd3c92b2418e0fff9cf9b6256a6c", "score": "0.6729787", "text": "function dbConnect()\n{\n}", "title": "" }, { "docid": "79e4676cd43cd8eed5cd0b1387eb0a77", "score": "0.6728733", "text": "function connect($dsn) {\n $this->db = DB::connect($dsn);\n\n if(DB::isError($this->db)) {\n $this->error = $this->db->getMessage();\n return false;\n } \n return true;\n }", "title": "" }, { "docid": "675904061d78e45ffbcd468c4d39ce8d", "score": "0.6721075", "text": "public function connect()\n {\n if ($this->_connection) {\n return true;\n }\n $config = $this->_config;\n\n $this->_connect($config);\n\n if (!empty($config['init'])) {\n $connection = $this->connection();\n foreach ((array)$config['init'] as $command) {\n $connection->exec($command);\n }\n }\n return true;\n }", "title": "" }, { "docid": "edb5ba1c156dba79e40d4c752e8f39e0", "score": "0.67186546", "text": "public function connectDB() {\n\t\t$this->conn = mysqli_connect($this->db_hostname, $this->db_username, $this->db_password, $this->db_name);\n\t\tif ($this->conn->connect_error) {\n\t\t\tdie(\"Connection Failed: \".$this->conn->connect_error);\n\t\t}\n\t}", "title": "" }, { "docid": "e868bbad1b4c4ae2fa35447244e8df03", "score": "0.67166215", "text": "private function openConnection() {\n\n // Get access to the configuration object that is in the global name space\n global $configuration;\n\n // Create a new database connection\n $this->database = new mysqli ($configuration->getDatabaseHost(),\n $configuration->getDatabaseUsername(),\n $configuration->getDatabasePwd(),\n $configuration->getDatabaseName());\n\n // Test whether the new database connection was successful or not\n // On failure, write the error message to the log file and die\n if ($this->database->connect_errno) $this->writeLog (__FUNCTION__, \"database error: \" . $this->database->connect_error, true);\n }", "title": "" }, { "docid": "14e28acc46c4298925ae7581ac9d9de7", "score": "0.6714548", "text": "function connect()\n\t{\n\t\t$this -> Link = mysqli_connect($this -> Server, $this -> User, $this -> Pass)\n\t\tor die(\"Could not connect : \");\n\t\tmysqli_select_db($this -> Link, $this -> Db) or die(\"Could not select database\");\n\t}", "title": "" } ]
ad282ad0cb8e499e668ebd1430ed62d0
Turn this item object into a generic array
[ { "docid": "ca8f3c1b3aa4e6c7703b33f0b4dfc05b", "score": "0.0", "text": "public function transform ( DiscoverMessage $discoverMessage )\n\t{\n\t\t// might as well re-use this rather than call upon relationship data\n\t\t$platform = $discoverMessage->message->opheme_backend['social_media_platform'];\n\t\t\n\t\tswitch($platform) {\n\t\t\tcase \"twitter\":\n\t\t\t\t$transform = [\n\t\t\t\t\t'message_id'\t\t\t\t => (string) $discoverMessage->message->id,\n\t\t\t\t\t'backend_message_id'\t\t => (string) $discoverMessage->message->_id,\n\t\t\t\t\t'user'\t\t\t\t => [\n\t\t\t\t\t\t'id'\t\t\t\t => (string) $discoverMessage->message->user['id'],\n\t\t\t\t\t\t'screen_name'\t\t => $discoverMessage->message->user['screen_name'],\n\t\t\t\t\t\t'profile_image_url'\t => $discoverMessage->message->user['profile_image_url'],\n\t\t\t\t\t],\n\t\t\t\t\t'text'\t\t\t\t => $discoverMessage->message->text,\n\t\t\t\t\t'images'\t\t\t => $discoverMessage->message->opheme_backend['images'],\n\t\t\t\t\t'videos'\t\t\t => $discoverMessage->message->opheme_backend['videos'],\n\t\t\t\t\t'timestamp'\t\t\t => $discoverMessage->message_datestamp,\n\t\t\t\t\t'timestamp_server'\t\t\t => $discoverMessage->created_at,\n\t\t\t\t\t'coords'\t\t\t => $discoverMessage->message->opheme_backend['coords'],\n\t\t\t\t\t'sentiment'\t\t\t => $discoverMessage->message->opheme_backend['sentiment'],\n\t\t\t\t\t'klout_score'\t\t => $discoverMessage->message->opheme_backend['klout_score'],\n\t\t\t\t\t'social_media_type'\t => $platform,\n\t\t\t\t\t'source_link'\t=> 'https://twitter.com/' . $discoverMessage->message->user['screen_name'] . '/status/' . ( (string) $discoverMessage->message->id )\n\t\t\t\t];\n\t\t\t\tbreak;\n\t\t\tcase 'instagram':\n\t\t\t\t$transform = [\n\t\t\t\t\t'message_id'\t\t\t\t => (string) $discoverMessage->message->id,\n\t\t\t\t\t'backend_message_id'\t\t => (string) $discoverMessage->message->_id,\n\t\t\t\t\t'user'\t\t\t\t => [\n\t\t\t\t\t\t'id'\t\t\t\t => (string) $discoverMessage->message->user['id'],\n\t\t\t\t\t\t'screen_name'\t\t => $discoverMessage->message->user['username'],\n\t\t\t\t\t\t'profile_image_url'\t => $discoverMessage->message->user['profile_picture'],\n\t\t\t\t\t],\n\t\t\t\t\t'text'\t\t\t\t => isset($discoverMessage->message->caption['text']) ? $discoverMessage->message->caption['text'] : '',\n\t\t\t\t\t'images'\t\t\t => $discoverMessage->message->opheme_backend['images'],\n\t\t\t\t\t'videos'\t\t\t => $discoverMessage->message->opheme_backend['videos'],\n\t\t\t\t\t'timestamp'\t\t\t => $discoverMessage->message_datestamp,\n\t\t\t\t\t'timestamp_server'\t\t\t => $discoverMessage->created_at,\n\t\t\t\t\t'coords'\t\t\t => $discoverMessage->message->opheme_backend['coords'],\n\t\t\t\t\t'sentiment'\t\t\t => $discoverMessage->message->opheme_backend['sentiment'],\n\t\t\t\t\t'klout_score'\t\t => $discoverMessage->message->opheme_backend['klout_score'],\n\t\t\t\t\t'social_media_type'\t => $platform,\n\t\t\t\t\t'source_link' => $discoverMessage->message->link\n\t\t\t\t];\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\n\t\t$transform = $this->removeDisallowedItems($transform);\n\t\t\n\t\treturn $transform;\n\t}", "title": "" } ]
[ { "docid": "59ba1bc641c65ea317ec1bb9281db297", "score": "0.82154685", "text": "public function convertItemArray() {}", "title": "" }, { "docid": "f7444f7bcb29421e145ff57cb577e9ef", "score": "0.73245126", "text": "public abstract function __toArray();", "title": "" }, { "docid": "18338f6f5c042d6b7a059da888153059", "score": "0.7301212", "text": "public function toArray() {\n\t\t$r = array ();\n\t\tforeach ( $this->items as $item ) $r[] = $item->toArray();\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "d13b8ac8ea80853d9ec60cec7809f413", "score": "0.72540426", "text": "public function getItemObjArray(){\n\t\t$array \t\t\t\t\t= $this->getItemArray();\n\t\t$result \t\t\t\t= array();\n\t\tfor ($i=0; $i <sizeof($array) ; $i++) { \n\t\t\t$result[] \t\t\t= new ITEM($array[$i],parent::getSeparator(),parent::getLine());\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "b2e641d4f9ba704b3889aa3ac90c7e3d", "score": "0.7232185", "text": "public function toArray()\r\n {\r\n return array_map(array(__CLASS__, 'toArrayDeep'), $this->_item);\r\n }", "title": "" }, { "docid": "ff1fdcc72839aa7697ebd804788c20f5", "score": "0.7160342", "text": "public function toArray()\n {\n return json_decode( json_encode($this->items), true);\n }", "title": "" }, { "docid": "eb24fa55bfe93e6feee648ddc4b08c25", "score": "0.71438384", "text": "public function toArray(): array\n {\n return $this->items;\n }", "title": "" }, { "docid": "02bd9782c7bfaacd4c61c6192b3d4b96", "score": "0.7132953", "text": "public function __toArray();", "title": "" }, { "docid": "02bd9782c7bfaacd4c61c6192b3d4b96", "score": "0.7132953", "text": "public function __toArray();", "title": "" }, { "docid": "db1aafbeb74f0afeb9de35e1b5db45ed", "score": "0.7122375", "text": "public abstract function as_array();", "title": "" }, { "docid": "afe7044d68ccd2d48888ac0f841ac574", "score": "0.71134275", "text": "public function getItemsAsArray(){\n return $this->items;\n }", "title": "" }, { "docid": "f70a30023998ad50f09d9846ece1117e", "score": "0.7062958", "text": "public function toArray() : array\n {\n return $this->items;\n }", "title": "" }, { "docid": "11e12ed7f2605e6fa500c29c031d19e0", "score": "0.70615476", "text": "public abstract function toArray();", "title": "" }, { "docid": "11e12ed7f2605e6fa500c29c031d19e0", "score": "0.70615476", "text": "public abstract function toArray();", "title": "" }, { "docid": "11e12ed7f2605e6fa500c29c031d19e0", "score": "0.70615476", "text": "public abstract function toArray();", "title": "" }, { "docid": "8f38f14b7850fbdcd5b3740bd5619ab7", "score": "0.7035026", "text": "public function toObject(){\n $data = array();\n\n foreach($this->toArray() as $item){\n array_push($data, (object)$item);\n }\n\n return $data;\n }", "title": "" }, { "docid": "f0d2c5adeadf5f76a355b9badd95cb7e", "score": "0.7028465", "text": "public function asArray()\r\n\t{\r\n\t\t$data = array();\r\n\t\tforeach ($this->_data as $key => $val)\r\n\t\t{\r\n\t\t\tif ($val instanceOf self)\r\n\t\t\t{\r\n\t\t\t\t$data[$key] = $val->asArray();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$data[$key] = $val;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.7002954", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.7002954", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.7002954", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.7002954", "text": "abstract public function toArray();", "title": "" }, { "docid": "55e0d9ec9dac882f643f9ab7cb274ab8", "score": "0.69450074", "text": "public function toArray()\n {\n $arr = parent::toArray();\n $arr['items'] = array();\n foreach ($this->items as $i) {\n $arr['items'][] = array(\n 'value' => $i->getValue(),\n 'label' => $i->getLabel()\n );\n }\n\n return $arr;\n }", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.69449085", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.69449085", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.69449085", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.69449085", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6943691", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6943691", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6943691", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6943691", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6943691", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6943691", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6943691", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6943691", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6943691", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6943691", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6943647", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6943647", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6943647", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6943647", "text": "public function toArray() {}", "title": "" }, { "docid": "adab3211bdfe465cc843feaf51e3905b", "score": "0.694149", "text": "public function toArray()\n\t{\n\t return array_map(function ($value) {\n\t return method_exists($value, 'toArray') ? $value->toArray() : $value;\n\t }, $this->items);\n\t}", "title": "" }, { "docid": "a49866bcbe53b98390c76db3f84ba7ba", "score": "0.6940172", "text": "function asArray(){\n\t\t\t$array = $this->toArray( $this );\n\t\t\treturn $array;\n\t\t}", "title": "" }, { "docid": "a49866bcbe53b98390c76db3f84ba7ba", "score": "0.6940172", "text": "function asArray(){\n\t\t\t$array = $this->toArray( $this );\n\t\t\treturn $array;\n\t\t}", "title": "" }, { "docid": "a49866bcbe53b98390c76db3f84ba7ba", "score": "0.6940172", "text": "function asArray(){\n\t\t\t$array = $this->toArray( $this );\n\t\t\treturn $array;\n\t\t}", "title": "" }, { "docid": "a49866bcbe53b98390c76db3f84ba7ba", "score": "0.6940172", "text": "function asArray(){\n\t\t\t$array = $this->toArray( $this );\n\t\t\treturn $array;\n\t\t}", "title": "" }, { "docid": "37b353b5bd96559e4590f69262407365", "score": "0.69379735", "text": "public function toArray()\n {\n return iterator_to_array($this->items());\n }", "title": "" }, { "docid": "3eaf318719ea2c8893c4b01f39818561", "score": "0.69363236", "text": "public function toCreateArray()\n {\n if (method_exists($this, 'toArray')) {\n return $this->toArray();\n } else {\n return $this->__toArray();\n }\n }", "title": "" }, { "docid": "6fd93fb018fe8966766e54ac56183e8a", "score": "0.69355255", "text": "public function toArray()\n {\n return $this->items;\n }", "title": "" }, { "docid": "6fd93fb018fe8966766e54ac56183e8a", "score": "0.69355255", "text": "public function toArray()\n {\n return $this->items;\n }", "title": "" }, { "docid": "6fd93fb018fe8966766e54ac56183e8a", "score": "0.69355255", "text": "public function toArray()\n {\n return $this->items;\n }", "title": "" }, { "docid": "d7e5ed249361478b6b54284b2ca79b84", "score": "0.693396", "text": "public function itemArray()\n {\n if ($this->config()->cache_lists) {\n $str = $this->CachedItems;\n if (strlen($str) && $items = @unserialize($str)) {\n return $items;\n }\n }\n\n $mapped = $this->Items()->map()->toArray();\n return $mapped;\n }", "title": "" }, { "docid": "c29681f6a60184c6e163c9b7f0d157df", "score": "0.6919259", "text": "public function toArray()\n {\n $arr = parent::toArray();\n $arr['requiredItems'] = $this->requiredItems;\n $arr['totalItems'] = $this->totalItems;\n $arr['items'] = array();\n foreach ($this->items as $i) {\n $arr['items'][] = array(\n 'value' => $i->getValue(),\n 'label' => $i->getLabel()\n );\n }\n\n return $arr;\n }", "title": "" }, { "docid": "d926bb1afd10e7f1751924d2bb2a0a8a", "score": "0.6902608", "text": "protected function getItemData()\n {\n $itemArray = array();\n $items = $this->getItems();\n if ($items) {\n foreach ($items as $item) {\n $data = array();\n $data['identification'] = strval($item->getIdentification());\n $data['name'] = strval($item->getName());\n $data['description'] = strval($item->getDescription());\n $data['quantity'] = strval($item->getQuantity());\n $data['price'] = strval($item->getPrice());\n $data['currency'] = strval($item->getCurrency());\n $data['extraData'] = $item->getExtraData();\n $itemArray[] = $data;\n }\n }\n\n return $itemArray;\n }", "title": "" }, { "docid": "252b378a5f4b7ea4fcffca263e365baf", "score": "0.689684", "text": "public function getResolvedItemArray() : array {}", "title": "" }, { "docid": "8e6cc2f65524a52279231f83eb6a1805", "score": "0.68931603", "text": "public function toArray()\r\r\n {\r\r\n static $checks = array('required', 'description', 'static', 'type', 'format', 'instanceOf', 'location', 'sentAs',\r\r\n 'pattern', 'minimum', 'maximum', 'minItems', 'maxItems', 'minLength', 'maxLength', 'data', 'enum',\r\r\n 'filters');\r\r\n\r\r\n $result = array();\r\r\n\r\r\n // Anything that is in the `Items` attribute of an array *must* include it's name if available\r\r\n if ($this->parent instanceof self && $this->parent->getType() == 'array' && isset($this->name)) {\r\r\n $result['name'] = $this->name;\r\r\n }\r\r\n\r\r\n foreach ($checks as $c) {\r\r\n if ($value = $this->{$c}) {\r\r\n $result[$c] = $value;\r\r\n }\r\r\n }\r\r\n\r\r\n if ($this->default !== null) {\r\r\n $result['default'] = $this->default;\r\r\n }\r\r\n\r\r\n if ($this->items !== null) {\r\r\n $result['items'] = $this->getItems()->toArray();\r\r\n }\r\r\n\r\r\n if ($this->additionalProperties !== null) {\r\r\n $result['additionalProperties'] = $this->getAdditionalProperties();\r\r\n if ($result['additionalProperties'] instanceof self) {\r\r\n $result['additionalProperties'] = $result['additionalProperties']->toArray();\r\r\n }\r\r\n }\r\r\n\r\r\n if ($this->type == 'object' && $this->properties) {\r\r\n $result['properties'] = array();\r\r\n foreach ($this->getProperties() as $name => $property) {\r\r\n $result['properties'][$name] = $property->toArray();\r\r\n }\r\r\n }\r\r\n\r\r\n return $result;\r\r\n }", "title": "" }, { "docid": "67fbb4ba4a304c6587aad01773491e7f", "score": "0.6876149", "text": "public function toArray()\n {\n return array_map(function ($value) {\n return method_exists($value, 'toArray') ? $value->toArray() : $value;\n }, $this->items);\n }", "title": "" }, { "docid": "111daacbd4bbc4c23e4083ae8e839419", "score": "0.6872921", "text": "public function toArray(){\n $array = parent::toArray();\n\n return $array;\n }", "title": "" }, { "docid": "11857d115e4916c7734af4a393f2cfba", "score": "0.68613285", "text": "public function toArray() {\n\t\t$array = array();\n\t\tforeach ($this->storage as $item) {\n\t\t\t$array[] = $item['obj'];\n\t\t}\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "62a6f87bda901cdf2045cde7dcff4ff0", "score": "0.68606687", "text": "public function to_array() {\n\t\treturn get_object_vars( $this->data );\n\t}", "title": "" }, { "docid": "5b0fcae579afcc285ef82835e9315a40", "score": "0.68545496", "text": "public function toArray(): array\n {\n $array = [];\n\n foreach ($this->items as $key => $value) {\n $array[$key] = Value::exportToArray($value);\n }\n\n return $array;\n }", "title": "" }, { "docid": "d5af5d655bddcc753aaa5fe639d70563", "score": "0.6815667", "text": "private function toArray()\n {\n return (array) $this;\n }", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68013495", "text": "public function toArray();", "title": "" } ]
ee8aa04b0af8186e75d4849266905e65
Replaces square brackets with NULL text
[ { "docid": "37b475d246d0554a5b1f2d4fe076f8f8", "score": "0.0", "text": "public function MyReplace($matches) {\n $text = str_replace( array('[',']'), array('', ''), $matches[0]);\n //@eval(\"\\$text = abs(\".$text.\");\");\n return intval($text);\n }", "title": "" } ]
[ { "docid": "98cc310bb2c8b99f1e5a6f6ea1cf6eda", "score": "0.5736752", "text": "function shortcode_empty_paragraph_fix($content){ \n $array = array (\n '<p>[' => '[', \n ']</p>' => ']', \n ']<br />' => ']'\n );\n\n $content = strtr($content, $array);\n return $content;\n}", "title": "" }, { "docid": "755f70b6c97be14fb2501f274b4e8ced", "score": "0.5733563", "text": "function trans_single_square_bracket(&$data) {\n $pattern = '#\\[\\[\\s*(.*?)\\]\\]#';\n $replacement = '===$1===';\n $data = preg_replace($pattern, $replacement, $data);\n $pattern = '#\\[+(.*?)\\]+#';\n $replacement = '[[$1]]';\n $data = preg_replace($pattern, $replacement, $data);\n $pattern = '#===(.*?)===#';\n $replacement = '[[$1]]';\n $data = preg_replace($pattern, $replacement, $data);\n}", "title": "" }, { "docid": "b28c198d826408e103f41c98835f9fcc", "score": "0.5727371", "text": "function stripBBCode($text) {\r\n\r\n $pattern = \"#\\[([^\\]]+?)(=[^\\]]+?)?\\](.*?)\\[/\\1\\]#\"; \r\n $replace = \"$3\"; \r\n return preg_replace($pattern, $replace, $text); \r\n}", "title": "" }, { "docid": "800caf0b38c4e0d2b6df95c6e6d3ea9b", "score": "0.5707767", "text": "private function removeEmptyTags() {\n\t\t$this->_content = preg_replace('~\\%%\\s*(.+?)\\s*\\%%~', '', $this->_content);\n\t}", "title": "" }, { "docid": "76e7caa6725f2d747f8dd754d5fc5370", "score": "0.5703154", "text": "function changeBlanks($array = array()){\n\t\t$array = str_replace(' ','*',$array);\n\t\t$array = str_replace(' ','*',$array);\n\t\t$array = str_replace(' ','*',$array);\n\t\t$array = str_replace(' ','*',$array);\n\t\t$array = str_replace(' ','*',$array);\n\t\t$array = str_replace(' ','*',$array);\n\t\t$array = str_replace(' ','*',$array);\n\t\t$array = str_replace(' ','*',$array);\n\t\t$array = str_replace(' ','*',$array);\n\t\t$array = str_replace('\t','*',$array);\n return $array;\n }", "title": "" }, { "docid": "eb0893ee0a063508f3253ac5e644c46a", "score": "0.56795835", "text": "function replaceEmptyStringsWithNull($a_table)\r\n\t{\r\n\t\tglobal $ilDB;\r\n\t\t\t\t\r\n\t\t$fields = $this->analyzer->getFieldInformation($a_table);\r\n\t\t$upfields = array();\r\n\t\tforeach ($fields as $field => $def)\r\n\t\t{\r\n\t\t\tif ($def[\"type\"] == \"text\" &&\r\n\t\t\t\t($def[\"length\"] >= 1 && $def[\"length\"] <= 4000))\r\n\t\t\t{\r\n\t\t\t\t$upfields[] = $field;\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach ($upfields as $uf)\r\n\t\t{\r\n\t\t\t$ilDB->query(\"UPDATE `\".$a_table.\"` SET `\".$uf.\"` = null WHERE `\".$uf.\"` = ''\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "3d009858eb01a005c5bf8a1359b0e8ed", "score": "0.5655945", "text": "protected function blankReplace($haystack, $repl) {\n return implode($repl, explode('_', $haystack, 2));\n }", "title": "" }, { "docid": "8b20e8a9a636beb8f296ec566baa377b", "score": "0.5641398", "text": "protected function handleNulls( $text, $sourcePos ) {\n\t\tif ( $this->ignoreNulls ) {\n\t\t\treturn $text;\n\t\t}\n\t\tif ( !$this->ignoreErrors ) {\n\t\t\t$offset = 0;\n\t\t\twhile ( true ) {\n\t\t\t\t$nullPos = strpos( $text, \"\\0\", $offset );\n\t\t\t\tif ( $nullPos === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$this->error( \"replaced null character\", $sourcePos + $nullPos );\n\t\t\t\tif ( $nullPos < strlen( $text ) - 1 ) {\n\t\t\t\t\t$offset = $nullPos + 1;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn str_replace( \"\\0\", self::REPLACEMENT_CHAR, $text );\n\t}", "title": "" }, { "docid": "0dd083719f93622c80d905db886d7ee1", "score": "0.56343347", "text": "function media_dei_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": "1f8b8def7a9c72eb683851c52bd43c7b", "score": "0.55811214", "text": "function textNull($texto){\n $texto = ($texto == \"NULL\" || is_null($texto))?\"\":$texto;\n\n return $texto;\n\n }", "title": "" }, { "docid": "6e671a73c60534c55d4e417acbe39722", "score": "0.55491835", "text": "function shortcode_empty_paragraph_fix($content) {\n\t$array = array(\n\t\t'<p>[' => '[',\n\t\t']</p>' => ']',\n\t\t'<br/>[' => '[',\n\t\t']<br/>' => ']',\n\t\t']<br />' => ']',\n\t\t'<br />[' => '['\n\t);\n\t$content = strtr($content, $array);\n\treturn $content;\n}", "title": "" }, { "docid": "ae676b82596639983522d0b5e078b77c", "score": "0.5544016", "text": "private function null_coal( $array , $key ) {\n return empty( $array[$key] ) ? '' : $array[ $key ];\n }", "title": "" }, { "docid": "349645c27361e15cf7238fcd2fe0e3d1", "score": "0.5504347", "text": "function ff_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": "fa751b140864c179f88fcaf8774638fd", "score": "0.5487541", "text": "function lime2node_trim_nulls($content_arr)\n {\n $content_arr = array_values($content_arr);\n\n // strip first NULL bytes if any\n while ( count($content_arr)>0 )\n {\n if ( $content_arr[0] == 0 )\n {\n unset($content_arr[0]); // This removes the element from the array\n\n // Re-index:\n $content_arr = array_values($content_arr);\n }\n else\n break;\n }\n\n // strip final NULL bytes if any\n while ( count($content_arr)>0 )\n {\n $last_chr_idx = count($content_arr) - 1;\n if ( $content_arr[$last_chr_idx] == 0 )\n {\n unset($content_arr[$last_chr_idx]); // This removes the element from the array\n\n // Re-index:\n $content_arr = array_values($content_arr);\n }\n else\n break;\n }\n\n return $content_arr;\n }", "title": "" }, { "docid": "39fdfed6dd3254ab518c5aeefc0dd796", "score": "0.539557", "text": "public function null()\n {\n $this->dataFields[$this->current] .= \" NULL\";\n }", "title": "" }, { "docid": "55a458360f37b3c0af8bebf7e502d095", "score": "0.5395468", "text": "public function nullify()\n {\n $this->assertNull(S::nullify(null));\n $this->assertNull(S::nullify(''));\n $this->assertNull(S::nullify(\"\\n \\t\"));\n $this->assertSame(\" abc\\n\", S::nullify(\" abc\\n\"));\n }", "title": "" }, { "docid": "9b58493839814dea3d52bb79fba9e286", "score": "0.53558207", "text": "private function nullify(&$element, $key) {\n $element = $element=='' ? NULL : trim($element);\n }", "title": "" }, { "docid": "724042c3a76a5a8010735927f2484063", "score": "0.53274786", "text": "function placeholder_replacement_with_empty(&$pagina) {\n // ripristino i dati\n $pagina = replacePlaceholders(\n $pagina,\n [\"<VALUETITOLOCOMMENTO/>\",\"<VALUETESTOCOMMENTO/>\", \"<VALUEVOTOCOMMENTO/>\",],\n [\"\", \"\", \"\"]\n );\n}", "title": "" }, { "docid": "a9ef1dff41c989d15e5349c0ca535f25", "score": "0.5320999", "text": "protected function getContentWithoutBBCode() {\n\t\t$content = $this->getContent();\n\t\t$content = preg_replace('/\\[(.*?)\\]/g','',$content);\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "f2a9d8d6364661ce36348c50ccce42ad", "score": "0.52865916", "text": "function remove_empty_arrays($data)\n {\n foreach ($data as $key=>&$value)\n {\n if (is_array($value))\n {\n if (count($value) == 0)\n $value = '';\n else\n $value = remove_empty_arrays($value);\n }\n }\n return $data;\n }", "title": "" }, { "docid": "807bd75c5faa0e14901c0ddbcc8d46ff", "score": "0.5275768", "text": "function remove_array_vals( $array = array( ) ) {\n\n foreach ( $array as $k => $v ) {\n $array[$k] = '';\n }\n\n return $array;\n }", "title": "" }, { "docid": "ed1cfe8c90a5db163f2342d250350bf4", "score": "0.5268821", "text": "protected function emptyStringsToNull($data)\n {\n if (is_string($data)) {\n $data = '' === $data ? null : $data;\n } elseif (is_array($data)) {\n foreach ($data as $key => $value) {\n $data[$key] = '' === $value ? null : $value;\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "f4ea14481038a519ad01ded7ace5b0f6", "score": "0.5248311", "text": "public function testKeyStringReplace_returnsEmptyArray_ifInputArrayIsEmpty()\n\t{\n\t\t$result = Arr::keyStringReplace('foo', 'bar', array());\n\t\t\n\t\treturn $this->assertTrue(is_array($result) && empty($result));\n\t}", "title": "" }, { "docid": "8dff0715974f65d63056481b2d194159", "score": "0.52445984", "text": "public function testEncodeNull()\n {\n $token = str_repeat(' ', $this->field->width);\n $this->assertSame($token, $this->field->encode(null));\n return;\n }", "title": "" }, { "docid": "8d4a6e0117353372cf39deaab02fe46b", "score": "0.52389205", "text": "function stripBBCode($text_to_search) {\n $pattern = '|[[\\\\/\\\\!]*?[^\\\\[\\\\]]*?]|si';\n $replace = '';\n return preg_replace($pattern, $replace, $text_to_search);\n}", "title": "" }, { "docid": "d6d11c5268c0376900aeec8b943a7582", "score": "0.5225809", "text": "private function sanitizeText($text)\n {\n return str_replace([\n '(', ')',\n '[', ']',\n '〈', '〉',\n '〝', '〞',\n '“', '”',\n ], '', $text);\n }", "title": "" }, { "docid": "d9a2b52c839c210abcd8357052849a64", "score": "0.51632524", "text": "public function clear($value)\n {\n if (!is_array($value)) {\n\n $value = strip_tags($value);\n $value = JString::trim($value);\n\n // force clean input vars\n //$value = str_replace(array('\"', \"'\", ';', '--', '`', '.', ','), ' ', $value);\n\n if (JString::strlen($value)) {\n return $value;\n }\n\n } else {\n\n foreach ($value as $key => $val) {\n $value[$key] = $this->clear($val);\n }\n\n return $value;\n }\n\n return null;\n }", "title": "" }, { "docid": "b7019f96d391c45b35a9b4a65704938b", "score": "0.5158002", "text": "function removesextraspace($str1) {\n $str2 = trim(str_replace(\"]\", \"\", (trim($str1))));\n return $str2;\n }", "title": "" }, { "docid": "4e4f14c80bbba1e8c649961e6793986e", "score": "0.5155935", "text": "function stripTags($text) {\n\n $modRegExArray[] = '~\\[\\[(.*?)\\]\\]~s';\n $modRegExArray[] = '~\\[\\!(.*?)\\!\\]~s';\n $modRegExArray[] = '#\\[\\~(.*?)\\~\\]#s';\n $modRegExArray[] = '~\\[\\((.*?)\\)\\]~s';\n $modRegExArray[] = '~{{(.*?)}}~s';\n $modRegExArray[] = '~\\[\\*(.*?)\\*\\]~s';\n $modRegExArray[] = '~\\[\\+(.*?)\\+\\]~s';\n\n foreach ($modRegExArray as $mReg) $text = preg_replace($mReg, '', $text);\n return $text;\n }", "title": "" }, { "docid": "f13fcb463bd8ad7c5d702e57c567ab11", "score": "0.51553476", "text": "public function testCheckParseOfNullTokensBeforeClosingBracket()\n {\n $query = 'query{\n someField(value:null)\n }';\n\n $parser = new Parser();\n $parser->parse($query);\n\n self::assertEmpty($parser->getErrors());\n }", "title": "" }, { "docid": "1ccac9ff0c2b731c917d444573172b97", "score": "0.51055735", "text": "private function replaceNull($row){\n for($i=0;$i<count($row);$i++){\n if ($row[$i] == \"NULL\"){\n $row[$i] = null;\n }\n }\n return $row;\n }", "title": "" }, { "docid": "18efe0bbb462e1498c7e83e7560bb6a0", "score": "0.5093368", "text": "function clean_title($title) {\n return preg_replace('/^\\[.*\\]\\s*/', '', $title);\n}", "title": "" }, { "docid": "a8413834f27e7680ccefb32f12cfe8f2", "score": "0.50851405", "text": "protected function getBlank() {\n return str_replace($this->toreplace, '_', $this->element);\n }", "title": "" }, { "docid": "8622f3c8ae94e0320752fbcc137ebf16", "score": "0.5047646", "text": "private function __fixXml($data) {\n\t\tforeach ($data as $key => $value) {\n\t\t\tif (is_string($value)) {\n\t\t\t\t$data[$key] = preg_replace('/\\\\\\x1A/', \"\\n\", $value);\n\t\t\t}\n\t\t\tif (is_array($value) && count($value) == 0) {\n\t\t\t\t$data[$key] = '';\n\t\t\t} elseif (is_array($value)) {\n\t\t\t\t$data[$key] = $this->__fixXml($value);\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "c40d4910a17fecd32ae1d06ae4910f9e", "score": "0.5033813", "text": "public function clearInput( array $data ): array{\n\n $clearedData = [];\n foreach ($data as $k => $v) {\n $clearedData[$k] = htmlspecialchars(strip_tags(trim( $v )));\n }\n\n return $clearedData;\n }", "title": "" }, { "docid": "9fc211d53307d3326f990ac213646bd6", "score": "0.5033455", "text": "function stripinput($text) {\r\n\tif (!is_array($text)) {\r\n\t\t$text = stripslash(trim($text));\r\n\t\t$text = preg_replace(\"/(&amp;)+(?=\\#([0-9]{2,3});)/i\", \"&\", $text);\r\n\t\t$search = array(\"&\", \"\\\"\", \"'\", \"\\\\\", '\\\"', \"\\'\", \"<\", \">\", \"&nbsp;\");\r\n\t\t$replace = array(\"&amp;\", \"&quot;\", \"&#39;\", \"&#92;\", \"&quot;\", \"&#39;\", \"&lt;\", \"&gt;\", \" \");\r\n\t\t$text = str_replace($search, $replace, $text);\r\n\t} else {\r\n\t\tforeach ($text as $key => $value) {\r\n\t\t\t$text[$key] = stripinput($value);\r\n\t\t}\r\n\t}\r\n\treturn $text;\r\n}", "title": "" }, { "docid": "54a82d01647e211f69f24319163a3900", "score": "0.5028368", "text": "protected function toNegative(): string\n {\n $replaced = preg_replace('/\\[(.+)\\|(.+)]/i', '$2', $this->description->getPattern());\n\n return ((bool) $replaced) ? $replaced : $this->description->toString();\n }", "title": "" }, { "docid": "aa7d0767b3694922043d95a983eaf508", "score": "0.501602", "text": "public function trimBlank () ;", "title": "" }, { "docid": "d65b3edbb9efa48db24a5a275bfe4668", "score": "0.4998708", "text": "function parseNull($data)\n\t{\n\t\tif (!empty($data))\n\t\t\tif (strtolower(chop($data)) == 'null')\n\t\t\t\treturn 'NULL';\n\t\t\telse\n\t\t\t\treturn '\\'' . $data . '\\'';\n\t\telse\n\t\t\treturn 'NULL';\n\t}", "title": "" }, { "docid": "2b994c8a0bf851c8a76132bb775d03b2", "score": "0.49941692", "text": "private static function removeEmptyStrings(array &$array): void\n\t{\n\t\t$array = array_values(array_filter($array, function (string $value, int $key) use ($array): bool {\n\t\t\treturn $value !== '' || (isset($array[$key - 1]) && $array[$key - 1] === 'string');\n\t\t}, ARRAY_FILTER_USE_BOTH));\n\t}", "title": "" }, { "docid": "649a063df21dc7897ef890b5154129c5", "score": "0.4993678", "text": "function null_scrubber(&$item, $key) {\n $item = NULL;\n}", "title": "" }, { "docid": "6cf8fc3f24eb5d921ac323557c110ba4", "score": "0.49867347", "text": "function quiz_questions_in_quiz($layout) {\n return str_replace(',0', '', $layout);\n}", "title": "" }, { "docid": "43ecaa5c7efb20928a5c8d3469888930", "score": "0.49839106", "text": "function removeXBMCformatting($stringToClean) {\n\tif (strpos($stringToClean, '[') !== FALSE) {\n\t\treturn preg_replace('!\\[/?(COLOR|B|I)[^]]*\\]!is','', $stringToClean);\n\t}\n\treturn $stringToClean;\n}", "title": "" }, { "docid": "f6eea5a14b7bf6f15f94e41d975e156e", "score": "0.49811634", "text": "public function filterEmpty(){\n\t\t$this->removeValue(\"\");\n\t}", "title": "" }, { "docid": "d7232097448327560fb16270a4a9ff04", "score": "0.4976891", "text": "public function testNoTraceOrSpace()\n {\n $filter = new Frontmatter();\n\n $text = <<<EOD\n{{{\n{\n \"title\": \"hi\",\n \"author\": \"mos\"\n}\n}}}\n\nEOD;\n\n $res = $filter->parse($text, [], $this->options);\n\n $this->assertEquals(\n \"\",\n $res[\"text\"]\n );\n\n $text = <<<EOD\n{{{\n{\n \"title\": \"hi\",\n \"author\": \"mos\"\n}\n}}}\nempty\nEOD;\n\n $res = $filter->parse($text, [], $this->options);\n\n $this->assertEquals(\n \"empty\",\n $res[\"text\"]\n );\n }", "title": "" }, { "docid": "744abf7fbdc1cd6d15c2f2be633331be", "score": "0.49716017", "text": "public function clean($array){\r\n foreach($array as $val){\r\n if (is_array($val)) \r\n $this->clean($val); \r\n else \r\n $val = htmlentities($val); \r\n }\r\n }", "title": "" }, { "docid": "2dce9756a4d54a21660438044cc08110", "score": "0.49697262", "text": "function clean($array = array()){\n\t\t$array = str_replace(' ',' ',$array);\n\t\t$array = str_replace(' ',' ',$array);\n\t\t$array = str_replace(' ',' ',$array);\n\t\t$array = str_replace(' ',' ',$array);\n\t\t$array = str_replace(' ',' ',$array);\n\t\t$array = str_replace(' ',' ',$array);\n\t\t$array = str_replace(' ',' ',$array);\n\t\t$array = str_replace(' ',' ',$array);\n\t\t$array = str_replace(' ',' ',$array);\n return $array;\n }", "title": "" }, { "docid": "7bd6d74cc2fc6da1e0818258c101791f", "score": "0.4937978", "text": "public function testTranslateNullWord()\n\t{\n\t\t$obj = new piglatinTX();\n\t\t$result = $obj->translate(' ');\n\t\t$this->assertFalse($result);\n\t}", "title": "" }, { "docid": "13e7cc737a2afc2967c87165ba1554af", "score": "0.49312362", "text": "public function testFormatterCanHandleEmptyString()\n {\n $formatted = $this->formatter->format('en', '', array());\n\n $this->assertInternalType('string', $formatted);\n $this->assertEquals('', $formatted);\n }", "title": "" }, { "docid": "4a4423c594b2c0757c16c9aef5de3726", "score": "0.4920628", "text": "private function alter_null($data): array\r\n {\r\n $d = $data;\r\n $arrOfNulls = array();\r\n foreach ($d as $k => $v) {\r\n if (empty($d[$k])) {\r\n array_push($arrOfNulls, $k);\r\n }\r\n }\r\n for ($i = 0; $i < count($arrOfNulls); $i++) {\r\n foreach ($d as $k => $v) {\r\n if ($k == $arrOfNulls[$i]) {\r\n $d[$k] = NULL;\r\n }\r\n }\r\n }\r\n return $d;\r\n }", "title": "" }, { "docid": "6ed416746ab8ba4ffa2eab2c605f7041", "score": "0.4919461", "text": "Function strip_characters($str_string, $ary_par)\n{\n\n foreach ($ary_par as $value)\n {\n $str_string = str_replace(\"$value\" ,\"\", $str_string);\n }\n return $str_string;\n}", "title": "" }, { "docid": "3cc913b6787784a9a9ae3d47e4e5e089", "score": "0.49148852", "text": "public static function nullValuesToEmptyString(array $a): array\n {\n return array_map(\n function ($value) {\n if (is_array($value)) {\n return static::nullValuesToEmptyString($value);\n } elseif ($value === null) {\n return '';\n }\n return $value;\n },\n $a\n );\n }", "title": "" }, { "docid": "7ce4532a6b3a5ed9ecb4af83c019417e", "score": "0.4905668", "text": "public function set_empty_vals_to_null()\r\n {\r\n foreach($this->data as $key => $val)\r\n {\r\n if(trim($val) === '')\r\n {\r\n $this->data[$key] = NULL;\r\n }\r\n }\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "0de1c748bd05fc1d360f5f71c8cf3b82", "score": "0.49009416", "text": "public static function qwRevert($arr) {\n $result = '';\n foreach ($arr as $key => $value) {\n $result.= str_replace(' ', '&nbsp;', $value).' ';\n }\n return $result;\n }", "title": "" }, { "docid": "08cff2a521a269bf1180647cf006f8c9", "score": "0.48946652", "text": "function remove_blanks($text) {\n // Finds 2 successive spaces (note: \\s does not work with French 'à' character!\n $pattern = \"/ /\";\n while ($w = preg_match($pattern, $text, $matches, PREG_OFFSET_CAPTURE) ) {\n $text = substr($text, 0, $matches[0][1]) .substr($text, $matches[0][1] + 1);\n }\n return $text;\n}", "title": "" }, { "docid": "6df9e6753e3d9480458416f4edd95104", "score": "0.4858888", "text": "function strEmpty($data)\n\t\t\t\t{\n\t\t\t\t\t$data = trim($data);\n\t\t\t\t\t$data = stripslashes($data);\n\t\t\t\t\t$data = htmlspecialchars($data);\n\t\t\t\t\t$data = preg_quote($data);\n\t\t\t\t\t//$data = mysql_real_escape_string($data);\n\t\t\t\t\treturn $data;\n\t\t\t\t}", "title": "" }, { "docid": "b9b967d641dcafd7aff666f95a26d4a4", "score": "0.48451474", "text": "function mts_custom_excerpt( $output ) {\n return preg_replace( '/\\[[^\\]]*]/', '', $output );\n}", "title": "" }, { "docid": "ebe10cfa9e2e93fd04e14c5f3f86b241", "score": "0.48362154", "text": "function rentit_exc( $param ) {\n\t$param = preg_replace( \"/\\[.*?\\].*?\\[\\/.*?\\]/\", \"\", $param );\n\t$param = preg_replace( \"/<.*?>/\", \"\", $param );\n\n\treturn $param;\n}", "title": "" }, { "docid": "531f27037166158ec4c4fce9122694a7", "score": "0.48300588", "text": "public function quicknull($v) {\n \n $v ? (addcslashes($v,'\"') and $v = \"'\" . $v . \"'\") : $v ='null';\n return $v;\n \n }", "title": "" }, { "docid": "c95b158745e24abd3b239608c8d35f12", "score": "0.48267448", "text": "private function filterOutEmpty($array) {\n\t\tforeach ($array as $key => $value) {\n\t\t\tif($value == \"\" || $value == null || !$value) unset($array[$key]);\n\t\t}\n\t\treturn ($array);\n\t}", "title": "" }, { "docid": "3706ebca11701f88f287420967d745f4", "score": "0.4821541", "text": "function clean($elem)\n {\n if(!is_array($elem))\n $elem = htmlentities($elem,ENT_QUOTES,\"UTF-8\");\n else\n foreach ($elem as $key => $value)\n $elem[$key] = clean($value);\n return $elem;\n }", "title": "" }, { "docid": "3706ebca11701f88f287420967d745f4", "score": "0.4821541", "text": "function clean($elem)\n {\n if(!is_array($elem))\n $elem = htmlentities($elem,ENT_QUOTES,\"UTF-8\");\n else\n foreach ($elem as $key => $value)\n $elem[$key] = clean($value);\n return $elem;\n }", "title": "" }, { "docid": "77f8faa866f6a4b2aab3de5ec51eef62", "score": "0.48153198", "text": "function format_post_nulls($fieldnames) {\n\tglobal $_POST;\n\terror_debug(\"<b>format_post_nulls</b> for \" . $fieldnames);\n\t$fields = array_post_fields($fieldnames);\n\tforeach ($fields as $field) {\n\t\tif (!strlen($_POST[$field])) {\n\t\t\terror_debug(\"<b>format_post_nulls</b> nullifying \" . $field);\n\t\t\t$_POST[$field] = \"NULL\";\n\t\t}\n\t}\n}", "title": "" }, { "docid": "3b3fc7fd42860922ad6eb78486c1ff84", "score": "0.47819468", "text": "public function testForEmptyStrings() {\n $ret = $this->resolucao->textWrap(\"\", 2018);\n $this->assertCount(1, $ret);\n $this->assertEmpty($ret[0]);\n }", "title": "" }, { "docid": "9c2ff64e8f94ebfdc4cfe30d25529be6", "score": "0.4764419", "text": "static function empty_tag_hook() {\n\t\treturn '';\n\t}", "title": "" }, { "docid": "a2aea15906fa954e2240ae5243c41e84", "score": "0.47643146", "text": "public function testDecodeNull()\n {\n $this->assertEquals(null, $this->field->decode(' '));\n return;\n }", "title": "" }, { "docid": "99c09bfbd31346320ca347eae31a49b3", "score": "0.47639713", "text": "public static function clearDataArray(array $data){\n\t\t$keys = array_keys($data);\n\t\tfor($i = 0; $i < count($keys); $i++) {\n\t\t\t$key = $data[$keys[$i]];\n\t\t\tif(is_array($data[$keys[$i]])){\n\t\t\t\t$data[$keys[$i]] = self::clearDataArray($data[$keys[$i]]);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$data[$keys[$i]] = strip_tags($key);\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "f7b48a23aeb57d40c83935714b951d25", "score": "0.47555518", "text": "public function notNull()\n {\n $this->dataFields[$this->current] .= \" NOT NULL\";\n }", "title": "" }, { "docid": "ce96964e3fdec249fd5802e8d5bfbfaf", "score": "0.47464728", "text": "function stripSpaceArrayOptions($a){\n\t\tglobal $mainframe;\n\t\tif(count($a) > 0){\n\t\t\tfor($i=0;$i<count($a);$i++){\n\t\t\t\t$a[$i] = trim($a[$i]);\n\t\t\t}\n\t\t}\n\t\treturn $a;\n\t}", "title": "" }, { "docid": "c697b91e42696b7e915c4508ec917d6e", "score": "0.47384226", "text": "function EveStripslashes (&$value)\n{\n if(empty($value))\n return;\n\n if (!is_array($value)) {\n $value = stripslashes($value);\n } else {\n array_walk($value, 'EveStripslashes');\n }\n}", "title": "" }, { "docid": "dbc23e002541f0adb55f46e56fb97a4b", "score": "0.4735553", "text": "function esb_cie_nohtml_kses($data = array()) {\n\n if ( is_array($data) ) {\n\n $data = array_map(array($this,'esb_cie_nohtml_kses'), $data);\n\n } elseif ( is_string( $data ) ) {\n\n $data = wp_filter_nohtml_kses($data);\n }\n\n return $data;\n}", "title": "" }, { "docid": "55ceacbafd4cd5cdabbf3f19484d2eeb", "score": "0.47047123", "text": "public function testForEmptyStrings() {\n $ret = $this->resolucao->textWrap(\"\", 2021);\n $this->assertEmpty($ret[0]);\n $this->assertCount(1, $ret);\n }", "title": "" }, { "docid": "a8a1f57de4de4edb201ae8d653f658a7", "score": "0.4701221", "text": "public function nullify_nonStringValue()\n {\n S::nullify(false);\n }", "title": "" }, { "docid": "41cbd08bd21358a6ad12e875d3514de9", "score": "0.4694428", "text": "private function sanitizeArray(&$array) { \n\t\tfor($i = 0; $i < count($array); $i++) { \n\t\t\t$array[$i] = preg_replace(\"/[^a-zA-Z0-9_]+/\", \"\", $array[$i]); \n\t\t} \n\t}", "title": "" }, { "docid": "25fe7fc9cc2956ab56becd37e10885c1", "score": "0.4680752", "text": "public function blank();", "title": "" }, { "docid": "418dbe5f830000da73782d35367122d0", "score": "0.468066", "text": "function cleanMarkers ($text) {\n\t return preg_replace('/[[:alnum:]]*_figure/', FIGURENAME, $text); \n\t}", "title": "" }, { "docid": "be1ae7993881a631016d678f9ba5dc06", "score": "0.46776807", "text": "function clean_search_vals( $val ) {\n\t# Remove any escaped brackets already.\n\t$val = preg_replace(\"/\\\\\\\\([\\(\\)])/\",\"$1\",$val);\n\n\t# The string might be a proper search filter\n\tif (preg_match(\"/^\\([&\\|]\\(/\",$val))\n\t\treturn $val;\n\n\telse\n\t\treturn preg_replace(\"/([\\(\\)])/\",\"\\\\\\\\$1\",$val);\n}", "title": "" }, { "docid": "ba948275a38e5690e22d8d2304857904", "score": "0.46759287", "text": "function __filterCodeText( $text )\n {\n\t \tif ( $text == \"\" )\n\t \t{\n\t \t\treturn \"\";\n\t \t}\n\t \t\n\t \t$text = str_replace( \"&lt;br&gt;\", \"\\n\", $text );\n\t\t$text = str_replace( \"&lt;br /&gt;\", \"\\n\", $text );\n\t\t$text = str_replace( \"<br>\", \"\\n\", $text );\n\t\t$text = str_replace( \"<br />\", \"\\n\", $text );\n\t\t$text = str_replace( \"<\", \"&lt;\", $text );\n\t\t$text = str_replace( \">\", \"&gt;\", $text );\n\t\t$text = str_replace( \"&#60;\", \"&lt;\", $text );\n\t\t$text = str_replace( \"&#62;\", \"&gt;\", $text );\n\t \t\n\t \treturn $text;\n }", "title": "" }, { "docid": "162d7919dbeca7e2757178c824ffae0f", "score": "0.46400926", "text": "abstract public function replace(Arrayable|Stringable|array|string $search, Arrayable|Stringable|array|string $replace): Text;", "title": "" }, { "docid": "136677909aea50ee01226007486f3b5f", "score": "0.46399108", "text": "function array_disambiguate_empty_values($array){\n\tif(!is_array($array) || $GLOBALS === $array) return $array;\n\tforeach($array as $key => $value)\n\t\tif(is_array($value)) $array[$key] = call_user_func('array_disambiguate_empty_values', $value);\n\t\telse if(is_bool($value) || $value === NULL) $array[$key] = var_export($value, TRUE);\n\treturn $array;\n}", "title": "" }, { "docid": "31e2eaa2756fa71a65b56b426256f6dc", "score": "0.46391544", "text": "function DelXSS(&$text) {\n\t$text = str_replace(\"'\",\"`\",$text);\t$text = str_replace('\"',\"&quot;\",$text);\n\t$text = str_replace(\"<\",\"\",$text);\t$text = str_replace(\">\",\"\",$text);\n\treturn $text;\n}", "title": "" }, { "docid": "c090b19f3ea8dbb89237ed2f7f8f7673", "score": "0.46282613", "text": "public function clean( $data ){\n\t\t\t\n\t\t\tforeach( $data as $key => $val ){\n\t\t\t\tif( !is_array( $data[ $key ] ) ){\n\t\t\t\t\t//unset if empty\t\t\n\t\t\t\t\tif( empty( $val ) )\n\t\t\t\t\t\tunset( $data[ $key ] );\n\t\t\t\t}else{\n\t\t\t\t\t$data[ $key ] = $this->clean( $data[ $key ] );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "1c490c65ee9b0ef49c1a7555b58653ce", "score": "0.46250653", "text": "function empty_to_null($v = '')\n{\n return empty($v) ? null : $v;\n}", "title": "" }, { "docid": "68f03e355cccd224c7ea23852a0c8a33", "score": "0.46161082", "text": "protected function setSimpleQuotes($data)\n\t{\n\t\tif(is_array($data))\n\t\t{\n\t\t\tforeach($data as &$value)\n\t\t\t{\n\t\t\t\tif(!($value instanceof Recipe_Database_Expr))\n\t\t\t\t{\n\t\t\t\t\t$value = (is_null($value)) ? \"NULL\" : \"'\".$value.\"'\";\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $data;\n\t\t}\n\t\treturn (is_null($data)) ? \"NULL\" : \"'\".$data.\"'\";\n\t}", "title": "" }, { "docid": "371ad737516dfa616a37e52608c3699c", "score": "0.46120873", "text": "protected function cleanData( $data ) {\n\t\tforeach ( $data as $k => &$v ) {\n\t\t\tif ( is_array( $v ) ) {\n\t\t\t\t$v = $this->cleanData( $v );\n\t\t\t} else {\n\t\t\t\t$v = trim( wp_strip_all_tags( $v ) );\n\t\t\t}\n\n\t\t\tif ( empty( $v ) && ! in_array( $k, $this->nullableFields, true ) ) {\n\t\t\t\tunset( $data[ $k ] );\n\t\t\t} else {\n\t\t\t\t$data[ $k ] = $v;\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "7483b1a80ab9e56782bc7d87f0565eef", "score": "0.46073246", "text": "function zap_gremlins($str, $replace = '')\n\t{\n\t\t// there is a hidden bullet looking thingy that photoshop likes to include in it's text'\n\t\t// the remove_invisible_characters doesn't seem to remove this\n\t\t$str = preg_replace('/[^\\x0A\\x0D\\x20-\\x7E]/', $replace, $str);\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "ef55057b1ad372446ea16660597ae00a", "score": "0.45993036", "text": "protected function _renderEmptyText()\n\t{\n\t\t$emptyText=$this->emptyText===null ? Yii::t('zii','No results found.') : $this->emptyText;\n\t\t$this->_pdf->Cell(array_sum($this->_columnWidths),$this->config['rowHeight'],$emptyText,0,0,'L');\n\t}", "title": "" }, { "docid": "319551089025a77f33518017a499e9e1", "score": "0.45935917", "text": "public function testCastWhitespaceToNull()\n {\n\n $record = $this->_record();\n\n // String field.\n $record->saveForm(array('fill_color' => ''));\n $this->assertNull($record->body);\n $record->saveForm(array('fill_color' => ' '));\n $this->assertNull($record->body);\n\n // Number field.\n $record->saveForm(array('max_zoom' => ''));\n $this->assertNull($record->max_zoom);\n $record->saveForm(array('max_zoom' => ' '));\n $this->assertNull($record->max_zoom);\n\n }", "title": "" }, { "docid": "700a469169822acc799e6e6c4a658514", "score": "0.45932782", "text": "function ReplaceUnsupportedMarks($text) {\n\n $q = '\\[q]|\\[\\/q]';\n $em = '\\[em]|\\[\\/em]';\n $ins = '\\[ins]|\\[\\/ins]';\n $sup = '\\[sup]|\\[\\/sup]';\n $sub = '\\[sub]|\\[\\/sub]';\n $video = '\\[video]|\\[\\/video]';\n $left = '\\[left]|\\[\\/left]';\n $right = '\\[right]|\\[\\/right]';\n $justify = '\\[justify]|\\[\\/justify]';\n $regex = \"/$q|$em|$ins|$sup|$sub|$video|$left|$right|$justify/\";\n\n $text = preg_replace('#\\[h](.+)\\[\\/h]#i', '[b][size=20]$1[/size][/b]', $text);\n $text = preg_replace('/\\[acronym=.+](.+)\\[\\/acronym]|\\[acronym]|\\[\\/acronym]/', '$1', $text);\n $text = preg_replace($regex, '', $text);\n\n return $text;\n}", "title": "" }, { "docid": "d2129afe9587524102fec68827997ca2", "score": "0.45917198", "text": "public function blank()\n {\n return null;\n }", "title": "" }, { "docid": "6487c3031587a698148172deaeeec408", "score": "0.4576474", "text": "function clear_data($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "6ca72acc1b6196e89321b68864c95c60", "score": "0.45748064", "text": "function placeholder_blank()\n{\n return '';\n}", "title": "" }, { "docid": "9d125bcd7bb86b7c658cc926771d3075", "score": "0.45746118", "text": "function clean_request_val($mixed, $quote_style = ENT_QUOTES )\n{\n//echo \"im in here! $str --\".strtr($str, $trans_table).\"--\".htmlspecialchars($str, ENT_QUOTES).\"<br>\";\n if(is_array($mixed)){\n return array_map('clean_request_val',$mixed, array_fill(0,count($mixed),$quote_style));\n }\n\n\treturn htmlspecialchars($mixed, ENT_QUOTES);\n}", "title": "" }, { "docid": "272b45c42735a077c4bdff06a859014f", "score": "0.45732248", "text": "function NoNull( $string, $Default = \"\" ) {\n $ReplStr = array( '#' => \"#\", urldecode('%EF%B8%8F') => ' ', ' ' => ' ', );\n $rVal = $Default;\n\n // Pre-Process the String\n $string = str_replace(array_keys($ReplStr), array_values($ReplStr), $string);\n\n // Let's do some trimming and, if necessary, return defaults\n if ( is_string($string) ) { $rVal = trim($string); }\n if ( $rVal == \"\" && $Default != \"\" ) { $rVal = $Default; }\n\n // Return the String Value\n return $rVal;\n }", "title": "" }, { "docid": "606dd04971ddd9fe8a1085c96d6df6f2", "score": "0.45666054", "text": "public function removeBrackets( ) {\n $result = 0;\n $this->event->removeBrackets();\n $result = $this->save();\n \n return $result;\n }", "title": "" }, { "docid": "cef7d903fab5b3aa0e64b200f276b29e", "score": "0.45633617", "text": "function clearData($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "84e367102c04aa7aa83a0c7daf60b40a", "score": "0.45623332", "text": "function remove_blank_values($array) {\r\n if (!is_array($array))\r\n return false;\r\n foreach ($array as $key => $value) {\r\n if (!empty($value))\r\n $return[$key] = $value;\r\n }\r\n return $return;\r\n }", "title": "" }, { "docid": "59782171282c82d96bd6b76da01e14c4", "score": "0.45570615", "text": "function format_null($value=\"\") {\tif (empty($value)) return \"NULL\";\n\tif (!is_numeric($value)) return \"'\" . $value . \"'\";\n\treturn $value;\n}", "title": "" }, { "docid": "783a473b9c9f0f95be8de76ea2d64292", "score": "0.45566475", "text": "public function explode_nonStringValue()\n {\n S::explode(true);\n }", "title": "" }, { "docid": "470eb1ce9151d0808e415326a081cc19", "score": "0.4553684", "text": "function demotheme_nohtml_kses($data = array()) {\n\n if ( is_array($data) ) {\n $data = array_map(array($this,'demotheme_nohtml_kses'), $data);\n } elseif ( is_string( $data ) ) {\n $data = wp_filter_nohtml_kses($data);\n }\n return $data;\n}", "title": "" }, { "docid": "dcd27c29b3da5846f3a8c3acd8b4c907", "score": "0.45512456", "text": "public function emptyVocab(){\n unset($this->vocabulary);\n $this->vocabulary = [];\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "ee972acee32d5ca904cc9352ea1f6c38", "score": "0.0", "text": "public function run()\n {\n ExchangeRate::create([\n 'date'=>'2017-06-12',\n 'dollar_rate' => '26.457345',\n 'euro_rate' =>'29.4544',\n ]);\n ExchangeRate::create([\n 'date'=>'2017-06-13',\n 'dollar_rate' => '26.35354',\n 'euro_rate' =>'29.2356',\n ]);\n ExchangeRate::create([\n 'dollar_rate' => '26.156657',\n 'euro_rate' =>'29.143454',\n ]);\n }", "title": "" } ]
[ { "docid": "71c6796615a8344ad02f1c59309a8195", "score": "0.810368", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $roles = ['superadmin', 'admin', 'user'];\n for ($i=0; $i<count($roles); $i++)\n {\n \\App\\Role::create([\n 'name' => $roles[$i]\n ]);\n }\n\n factory(\\App\\User::class, 10)->create();\n factory(\\App\\Category::class, 5)->create();\n factory(\\App\\Product::class, 20)->create();\n\n $prod_id = \\App\\Product::pluck('id');\n $prod_count = count($prod_id);\n\n foreach ($users = \\App\\User::all() as $user)\n {\n for ($i=0; $i<rand(0, $prod_count); $i++)\n {\n $id = $prod_id[$i];\n $user->favorites()->attach($id);\n }\n }\n factory(\\App\\Review::class, 20)->create();\n }", "title": "" }, { "docid": "da4e361a9e2ff83579cb0561d63b82c2", "score": "0.79925495", "text": "public function run()\n {\n\n DB::table('users')->insert([\n [\n 'name' => \"admin\",\n 'email' => \"[email protected]\",\n 'phone' => \"082181189178\",\n 'role' => \"admin\",\n 'password' => bcrypt('admin')\n ],\n ]);\n\n DB::table('categories')->insert([\n [\n 'name' => \"Beach\",\n ],\n [\n 'name' => 'Mountain',\n ]\n ]);\n\n DB::table('articles')->insert([\n [\n 'user_id' => 4,\n 'categories_id' => 1,\n 'title' => 'Pantai Kuta Bali',\n 'description' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Eligendi repellat',\n 'image' => 'b1.jpeg',\n ],\n [\n 'user_id' => 4,\n 'categories_id' => 1,\n 'title' => 'Pantai',\n 'description' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Eligendi repellat',\n 'image' => 'b2.jpeg',\n ]\n ]);\n\n\n // $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "9be7037c6bd7f61f2f9bfe3d1ad6aa33", "score": "0.79589105", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 20)->create();\n factory('App\\Company', 20)->create();\n factory('App\\Property', 20)->create();\n\n $categories = [\n 'Sold',\n 'Under Offer',\n 'Sold STC',\n 'For Sale'\n ];\n foreach ($categories as $category){\n Category::create(['name'=>$category]);\n }\n\n $propertytypes = [\n 'House',\n 'Bungalow',\n 'Flat'\n ];\n foreach ($propertytypes as $proptype){\n PropertyType::create(['name'=>$proptype]);\n }\n }", "title": "" }, { "docid": "643ca4b2b0a3350305279ecc21004f82", "score": "0.7940985", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // 30 tag\n $tags = factory(App\\Tag::class, 30)->create();\n\n // 10 categorie\n $categories = factory(App\\Category::class, 10)->create();\n\n // 10 utenti\n $users = factory(App\\User::class, 10)->create();\n\n foreach ($users as $user) {\n // 15 post per utente\n $posts = factory(App\\Post::class, 15)->create([\n 'user_id' => $user->id,\n // 1 categoria random fra quelle create\n 'category_id' => $categories->random()->id,\n ]);\n // 3 tag random fra quelli create\n\n foreach ($posts as $post) {\n $post->tags()->sync($tags->random(3));\n }\n }\n }", "title": "" }, { "docid": "65835db97635cc435cdea4358f845df1", "score": "0.79386705", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n Role::create([\n 'name' => 'Administrator'\n ]);\n Role::create([\n 'name' => 'Member'\n ]);\n\n Status::create([\n 'name' => 'Active'\n ]);\n Status::create([\n 'name' => 'Inactive'\n ]);\n\n Site::create([\n 'name' => 'T&D Jogja'\n ]);\n\n User::create([\n 'site_id' => 1,\n 'role_id' => 1,\n 'name' => 'Admin',\n 'last_name' => 'Jogja',\n 'email' => '[email protected]',\n 'password' => Hash::make('password')\n ]);\n }", "title": "" }, { "docid": "ea5361a7636055f6a2ac45f40d6f9660", "score": "0.79318875", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(UserTableSeeder::class);\n\n factory(App\\Category::class, 10)->create();\n factory(App\\Publisher::class, 20)->create();\n factory(App\\Author::class, 30)->create();\n factory(App\\Book::class, 100)->create()->each(function ($book) {\n\n $id_a = rand(1,30);\n $book->authors()->attach($id_a);\n });\n factory(App\\User::class, 100)->create()->each(function ($user){\n $rating = rand(1,10);\n $fav = rand(0,1);\n $books = \\App\\Book::inRandomOrder()->first();\n\n\n $user->books()->attach($books->isbn,[\n 'rating' => $rating,\n 'favourite' => $fav]);\n });\n }", "title": "" }, { "docid": "4b00078ab9a8de5ccf3ec46c08be4992", "score": "0.7926926", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'Super Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('tester'),\n ]);\n\n DB::table('tags')->insert([\n 'tag' => 'Romance'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'AniManga'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'Novel'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'Light Novel'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'News'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'Entertainment'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'Celebrity'\n ]);\n }", "title": "" }, { "docid": "a19ba6eedf512446a4ff6a821f942a7f", "score": "0.78977793", "text": "public function run()\n {\n // $this->call(ArticlesTableSeeder::class);\n factory(App\\Article::class, 30)->create();\n // $this->call(UsersTableSeeder::class);\n \n $faker = Faker::create();\n $statuses = ['Waiting for approval', 'Approved', 'In progress'];\n foreach (range(1, 400) as $index) {\n \\DB::table('projects')->insert([\n 'status' => $statuses[shuffle($statuses)],\n 'deadline' => $faker->dateTimeBetween('+1 month', '+2 month'),\n 'budget' => rand(10000, 500000),\n ]);\n }\n }", "title": "" }, { "docid": "9ba09b0cd477f6bcc7e404fb53ae0298", "score": "0.7894564", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Category::insert([\n ['name' => 'Computer'],\n ['name' => 'Cellphone'],\n ['name' => 'Watch'],\n ['name' => 'Headphone']\n ]);\n Subcategory::insert([\n ['name' => 'Laptop', 'category_id' => '1'],\n ['name' => 'Desktop', 'category_id' => '1'],\n ['name' => 'Iphone', 'category_id' => '2'],\n ['name' => 'Wrist', 'category_id' => '3'],\n ['name' => 'Wired', 'category_id' => '4']\n ]);\n }", "title": "" }, { "docid": "7c0e5f0f3d9257d2cc92932318f34df1", "score": "0.7894495", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n App\\User::create([\n 'name' => 'German Middi',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456')\n ]);\n\n\n App\\Models\\Category::create([\n 'title' => 'Agenda',\n ]);\n\n App\\Models\\PostStatu::create([\n 'status_txt' => 'Borrador',\n ]);\n \n App\\Models\\PostStatu::create([\n 'status_txt' => 'Publicado',\n ]);\n\n App\\Models\\PostStatu::create([\n 'status_txt' => 'Oculta',\n ]);\n \n App\\Models\\Post::create([\n 'user_id' => 1,\n 'title' => 'Primer Post',\n 'body' => 'Lorem ipsum dolor sit amet consectetur, adipisicing elit. Reiciendis deserunt quisquam dolore iusto impedit repellendus quam odio porro laborum harum facilis non accusantium ducimus, est dolores amet ab temporibus numquam.',\n 'category_id' => 1,\n 'status_id' => 1\n ]);\n\n\n\n\n //factory(App\\Models\\Category::class, 8)->create();\n // factory(App\\Models\\Post::class, 24)->create();\n \n }", "title": "" }, { "docid": "ca98272f756ed2422862b346c61bd5a3", "score": "0.78912395", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Professional::factory(20)->create();\n \\App\\Models\\MedicalCenter::factory(12)->create();\n \\App\\Models\\Affiliate::factory(200)->create();\n\n $this->SeedSpecializations();\n $this->SeedProfessionalSpecializations();\n $this->SeedAvailability();\n }", "title": "" }, { "docid": "efa9a59b6fcaad178163e02ca6c3670b", "score": "0.78831357", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('books')->truncate();\n // Only seed if not in production environment\n if (!App::environment('production')) {\n $payload = [\n ['Php In Use', 'thanhnt'],\n ['Advance Java', 'tuvd'],\n ['Html5 practical', 'vidm'],\n ];\n foreach ($payload as $book) {\n Book::create([\n 'title' => $book[0],\n 'author' => $book[1],\n ]);\n }\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "b64e1978db418d4451b3ed7886d2c896", "score": "0.78693044", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n // DB::table('advisors')->delete();\n\n $advisors = [\n ['id' => '0001111', 'first_name' => 'Hassan', 'last_name' => 'Reza', 'email' => '[email protected]'],\n ['id' => '0002222', 'first_name' => 'Travis', 'last_name' => 'Desell', 'email' => '[email protected]'],\n ];\n\n // Uncomment the below to run the seeder\n DB::table('advisors')->insert($advisors);\n }", "title": "" }, { "docid": "b4aa656fb085f9b1b9a13c6a767fa97e", "score": "0.786916", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n factory(App\\User::class, 20)->create()->each(function ($users) {\n // Seed the relation with one address\n $songs = factory(App\\Songs::class)->make();\n $users->songs()->save($songs);\n \n }); \n\n }", "title": "" }, { "docid": "83806ba52791ac39317a9e97fdf5a167", "score": "0.78637934", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Post::class, 10)->create();\n factory(User::class, 10)->create();\n factory(Catagory::class, 10)->create();\n }", "title": "" }, { "docid": "ab431e20cc3d00876d3107671e71dfce", "score": "0.7858457", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \n DB::table('rols')->insert([\n 'nombre'=>'Administradores',\n 'estado' =>1\n ]);\n\n\n DB::table('personas')->insert([\n 'nombre'=>'admin',\n 'idRol' => 1,\n 'estado' =>1\n ]);\n\n\n DB::table('usuarios')->insert([\n 'nombre'=>'admin',\n 'password' => 'admin',\n 'idPersona' => 1,\n 'estado' => 1\n ]);\n\n\n\n DB::table('rols')->insert([\n 'nombre'=>'Bodeguero',\n 'estado' =>1\n ]);\n\n\n DB::table('rols')->insert([\n 'nombre'=>'Empleados',\n 'estado' =>1\n ]);\n\n }", "title": "" }, { "docid": "60ca7f756e4476d50cae23404adff94e", "score": "0.7850379", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create();\n factory(App\\User::class, 'admin', 1)->create();\n factory(App\\Event::class, 10)->create();\n factory(App\\Vacation::class, 10)->create();\n factory(App\\UserActivites::class, 10)->create();\n \n\n for ($i = 1; $i <= 10; $i++ ) {\n DB::table('user_vacation')->insert([\n 'user_id' => rand(1, 10),\n 'vacation_id' => rand(1, 10)\n ]);\n }\n DB::table('roles')->insert([\n [\n 'role_name' => \"admin\",\n ],\n [\n 'role_name' => \"manager\",\n ],\n [\n 'role_name' => \"employee\",\n ],\n ]);\n }", "title": "" }, { "docid": "87e9177da05f4ca3502f77df8e5593ef", "score": "0.7845597", "text": "public function run()\n {\n // DB::table('users')->truncate();\n // factory(User::class)->create(\n // [\n // \"email\"=>\"[email protected]\",\n // \"password\"=>Hash::make(App::environment(\"DB_PASSWORD\"))\n // ]\n // );\n $this->call(CategorySeeder::class);\n \n $this->call(DiscountSeeder::class);\n\n }", "title": "" }, { "docid": "9b678da2216c7ad2d5530677c1dba41e", "score": "0.78313947", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \\App\\Sport::truncate();\n \t$sports = [\n \t\t[\n \t\t\t'name' => 'Basquete',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Volei',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Futebol',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Canoagem',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Tênis de mesa',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Bets',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Pipa',\n \t\t],\n \t];\n \t\n \t\n \t\\App\\Sport::insert($sports);\n\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n }", "title": "" }, { "docid": "2d62531f18a91512d0a3f0505f4ef886", "score": "0.7823162", "text": "public function run()\n {\n\n $faker= Faker::create();\n\n foreach (range(1,100) as $index){\n Article::create([\n 'title'=>$faker->sentence(6),\n 'description'=>$faker->paragraph(1),\n ]);\n }\n // \\App\\Models\\User::factory(10)->create();\n }", "title": "" }, { "docid": "08a77e0fbb8703933812bc2c29d383da", "score": "0.7816456", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Langage::class, 5)\n ->create()\n ->each(function($lang) {\n $lang->translations()->saveMany(factory(App\\Translation::class,\n rand(2, 4))->make());\n });\n }", "title": "" }, { "docid": "6dca1a129907a23e6374ee008363cb13", "score": "0.7810774", "text": "public function run()\n {\n // La creación de datos de roles debe ejecutarse primero\n $this->call(RoleTableSeeder::class);\n\n // Los usuarios necesitarán los roles previamente generados\n $this->call(UserTableSeeder::class);\n \n DB::table('places')->insert(['place'=>'Depósito']);\n DB::table('places')->insert(['place'=>'Showroom']);\n \n DB::table('img_categories')->insert(['category'=>'previewA']);\n DB::table('img_categories')->insert(['category'=>'previewB']);\n DB::table('img_categories')->insert(['category'=>'previewLarge']);\n DB::table('img_categories')->insert(['category'=>'imgCatalog']);\n \n DB::table('shoe_categories')->insert(['name'=>'Boots']);\n DB::table('shoe_categories')->insert(['name'=>'Sandals']);\n DB::table('shoe_categories')->insert(['name'=>'Stilettos']);\n DB::table('shoe_categories')->insert(['name'=>'Flats']);\n DB::table('shoe_categories')->insert(['name'=>'Tango']);\n \n /* factory(Shoe::class)->times(6)->create(); */\n\n DB::table('addresses')->insert([\n 'user_id'=> 1,\n 'name'=> 'Showroom',\n 'surname'=>'Laila Frank',\n 'street'=>'3 de Febreo',\n 'number'=>'1390',\n 'floor'=>'floor',\n 'apartment'=>'Planta baja E',\n 'city'=>'Capital Federal',\n 'state'=>'Buenos Aires',\n 'post_code' =>'C1428AHD',\n 'country'=>'Argentina'\n ]);\n }", "title": "" }, { "docid": "a6e889f662490d03076345e00e725d10", "score": "0.7810636", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('events')->insert([\n 'name' => 'sport',\n 'description' => 'football match ',\n 'address' => 'alex gleem '\n ]);\n DB::table('events')->insert([\n 'name' => 'art',\n 'description' => 'draw ',\n 'address' => 'alex sedy gaber '\n ]);\n DB::table('events')->insert([\n 'name' => 'running',\n 'description' => 'running ',\n 'address' => 'alex mandara '\n ]);\n }", "title": "" }, { "docid": "42022b50cf9926c784f4e79e0feacbdb", "score": "0.78020144", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // Event::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 Event::create([\n 'image' => $faker->image(),\n 'name' => $faker->name(),\n 'date_time' => $faker->date(),\n 'venue' => $faker->address,\n 'phone' => $faker->phoneNumber,\n 'u_id' => $faker->numberBetween($min=1,$max=11), \n 'o_id' => $faker->numberBetween($min=1,$max=11)\n ]);\n }\n }", "title": "" }, { "docid": "f875ec63b40623c53ead81b3a234fea0", "score": "0.7795912", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => \"root\",\n 'email' => \"[email protected]\",\n 'password' => Hash::make('password'),\n ]);\n\n DB::table('phones')->insert([\n 'user_id' => 1,\n 'number' => \"593101010\",\n ]);\n\n DB::table('comments')->insert([\n 'user_id' => 1,\n 'text' => \"My first comment\",\n ]);\n\n DB::table('comments')->insert([\n 'user_id' => 1,\n 'text' => \"My second comment\",\n ]);\n\n DB::table('roles')->insert([\n 'name' => \"customer\",\n ]);\n\n DB::table('roles')->insert([\n 'name' => \"admin\",\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1,\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 2,\n 'user_id' => 1,\n ]);\n }", "title": "" }, { "docid": "afa07ed6bd16bbdeb1f41cb52db0a467", "score": "0.77901894", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'Yuri Ramos Canário Campos',\n 'password' => 'root',\n 'email' => '[email protected]'\n ]);\n \n DB::table('languages')->insert(['name' => 'english']);\n DB::table('languages')->insert(['name' => 'portuguese']);\n DB::table('languages')->insert(['name' => 'spanish']);\n DB::table('knowledges')->insert(['title' => 'Javascript']);\n DB::table('knowledges')->insert(['title' => 'Laravel']);\n DB::table('knowledges')->insert(['title' => 'PHP']);\n DB::table('knowledges')->insert(['title' => 'Delphi']);\n DB::table('courses')->insert(['title' => 'Javascript para Idiotas','emissor' => 'Colégio Dona Bimbinha']);\n DB::table('courses')->insert(['title' => 'Laramassa','emissor' => 'Robertinho Cursos']);\n DB::table('formations')->insert([\n 'title' => 'Analista de Sistemas',\n 'level' => 'Superior'\n ]);\n DB::table('curriculums')\n ->insert(['address'=> 'Coronel Elysio Pereira, 71','phone' => '3422-5194', 'cellphone' => '98535-7065', 'id_user' => 1]);\n }", "title": "" }, { "docid": "7784ebb5b249a5db796b6f9983ce71ff", "score": "0.7776518", "text": "public function run()\n {\n $user = App\\User::all()->pluck('id')->toArray();\n $faker = Faker::create();\n\n DB::table('posts')->insert([\n [\n 'user_id' =>Arr::random($user),\n 'title' => 'How to use a lightsaber efficiently',\n 'body' => $faker->text($maxNbChars = 2000),\n ],\n [\n 'user_id' =>Arr::random($user),\n 'title' => 'How to deal with an distant father',\n 'body' => $faker->text($maxNbChars = 2000),\n ],\n [\n 'user_id' =>Arr::random($user),\n 'title' => 'How to lose a holochess game to a Wookie',\n 'body' => $faker->text($maxNbChars = 2000),\n ],\n ]);\n }", "title": "" }, { "docid": "e877ab72f0de79c5f54deb3654d66410", "score": "0.77761537", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //factory(\\App\\Model\\User::class, 5)->create();\n //factory(\\App\\Model\\News::class, 150)->create();\n //factory(\\App\\Model\\BookCategory::class, 10)->create();\n //factory(\\App\\Model\\Books::class, 100)->create();\n // factory(\\App\\Model\\Ticket::class, 20)->create();\n //factory(\\App\\Model\\Forum::class, 10)->create();\n //factory(\\App\\Model\\ForumAnswer::class, 40)->create();\n //factory(\\App\\Model\\Community::class, 30)->create();\n //factory(\\App\\Model\\CommunityPost::class, 90)->create();\n //factory(\\App\\Model\\Elon::class, 90)->create();\n //factory(\\App\\Model\\VideoCourse::class, 50)->create();\n //factory(\\App\\Model\\VideoCourseGallery::class, 150)->create();\n //factory(\\App\\Model\\FaqCategory::class, 10)->create();\n //factory(\\App\\Model\\Faq::class, 100)->create();\n// factory(\\App\\Model\\PoolResult::class, 50)->create();\n// factory(\\App\\Model\\Notice::class, 50)->create();\n\n }", "title": "" }, { "docid": "05d569ef8b55f0987f197ee527ce3d09", "score": "0.77750576", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Models\\User::class, 20)->create();\n factory(App\\Models\\Location::class, 20)->create();\n factory(App\\Models\\Category::class, 10)->create();\n factory(App\\Models\\Course::class, 20)->create();\n factory(App\\Models\\Tutor::class, 20)->create();\n factory(App\\Models\\Role::class, 3)->create();\n \n }", "title": "" }, { "docid": "27fc74dfbd1c11bbbe2e4767b9aef069", "score": "0.7769568", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n\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// \\App\\User::create([\n// 'name' => $faker->sentence,\n// 'email' => $faker->email,\n// 'password' => $faker->password(8, 15),\n// 'api_token' => $faker->name('Jll7q0BSijLOrzaOSm5Dr5hW9cJRZAJKOzvDlxjKCXepwAeZ7JR6YP5zQqnw')\n// ]);\n// }\n for ($i = 0; $i < 50; $i++) {\n \\App\\Job::create([\n 'title' => $faker->sentence,\n 'description' => $faker->sentence,\n 'organization' => $faker->sentence,\n 'type' => $faker->word('U'),\n 'salary' => $faker->numberBetween(10000,50000),\n 'date' => $faker->date('1996-08-26')\n ]);\n }\n }", "title": "" }, { "docid": "e81d2ef647926f3ba5603be994a414ca", "score": "0.77674633", "text": "public function run()\n {\n // users table seeds\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'user_type' => 1,\n 'status' => 1,\n ]);\n\n // users table seeds\n DB::table('roles')->insert([\n 'name' => 'admin',\n 'display_name' => 'Administrator',\n 'description' => 'administrator can access admin panel',\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'instructor',\n 'display_name' => 'Instructor',\n 'description' => 'instructor can not access admin panel',\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'student',\n 'display_name' => 'Student',\n 'description' => 'student can not access admin panel',\n ]);\n\n // permissions table seeds\n DB::table('permissions')->insert([\n 'name' => 'question',\n 'display_name' => 'question',\n 'description' => 'question',\n ]);\n\n DB::table('permissions')->insert([\n 'name' => 'exam',\n 'display_name' => 'exam',\n 'description' => 'exam',\n ]);\n }", "title": "" }, { "docid": "e21ba40d9f1a7c1c807e323e4659bf00", "score": "0.7763201", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \\App\\User::truncate();\n \\App\\Profile::truncate();\n \\App\\Group::truncate();\n \\App\\GroupUser::truncate();\n\n $user = factory('App\\User')->create([\n 'email' => '[email protected]',\n 'password' => bcrypt(123123),\n 'is_confirmed' => true\n ]);\n\n factory('App\\Profile')->create(['user_id' => $user->id]);\n\n $users = factory('App\\User', 100)->create();\n\n $groups = factory('App\\Group', 20)->create();\n\n $users->each(function ($user) {\n factory('App\\Profile')->create(['user_id' => $user->id]);\n });\n\n $groups->each(function ($group) {\n factory('App\\GroupUser', 5)->create(['group_id' => $group->id]);\n });\n\n }", "title": "" }, { "docid": "ddcf0166e4683fc6ddd3a15c1619f33f", "score": "0.7762547", "text": "public function run()\n {\n $categories = ['Bollywood','Hollywood','Sports','Politics','Health','Tips','Local'];\n foreach($categories as $category){\n DB::table('categories')->insert([\n 'title' => $category\n ]);\n }\n // $this->call(UsersTableSeeder::class);\n // factory(App\\Category::class, 10)->create();\n // factory(App\\User::class, 10)->create();\n }", "title": "" }, { "docid": "7ceb2ba0b5921e33483bce90bd4dcff8", "score": "0.7758561", "text": "public function run()\n {\n // Truncate existing records to start from scratch.\n DB::table('items')->delete();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few items in our database:\n for ($i = 0; $i < 50; $i++) {\n $item_create = Item::create([\n 'name' => $faker->name,\n 'qnt' => $faker->numberBetween(1, 200),\n 'value' => $faker->numberBetween(1, 1264),\n 'category' => $faker->word,\n 'subcategory' => $faker->word,\n 'collection_id' => $faker->numberBetween(0, 1264),\n 'tags' => $faker->shuffleArray([\"porsche\", \"design\"]),\n ]);\n $item_create -> orders() -> attach(Order::all()->random());\n }\n }", "title": "" }, { "docid": "2a91b06c48e8a30771182a29303f45e7", "score": "0.77584714", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n $this->call(AuthorSeeder::class);\n $this->call(BookSeeder::class);\n $this->call(GenreSeeder::class);\n $this->call(FollowSeeder::class);\n factory(App\\Shelf::class,4)->create();\n $this->call(reviewSeeder::class);\n //factory(App\\Review::class,1)->create();\n /*factory(App\\User::class, 50)->create();\n factory(App\\Author::class, 20)->create();\n factory(App\\Book::class, 50)->create();\n factory(App\\Review::class,50)->create();\n factory(App\\Genre::class, 20)->create();\n factory(App\\Comment::class,30)->create();\n factory(App\\Likes::class,30)->create();\n factory(App\\Shelf::class,20)->create();\n factory(App\\Following::class,15)->create();*/\n\n }", "title": "" }, { "docid": "9844485296efb745821003e46a8eb05f", "score": "0.77504486", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // Calling Category Table Seeder\n // $this->call(CategoryTableSeeder::class);\n\n factory(Category::class,100)->create();\n factory(Person::class,100)->create();\n factory(Post::class,100)->create();\n }", "title": "" }, { "docid": "57c330d48459442abbc71684fe360201", "score": "0.77483124", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// factory(\\App\\User::class, 4)->create();\n// factory(\\App\\Post::class, 15)->create();\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserRolesTableSeeder::class);\n $this->call(AttributeGroupsSeeder::class);\n $this->call(AttributeProductsSeeder::class);\n $this->call(AttributeValuesSeeder::class);\n $this->call(BrandsSeeder::class);\n $this->call(CategoriesSeeder::class);\n $this->call(CurrenciesSeeder::class);\n $this->call(GalleriesSeeder::class);\n $this->call(ProductsSeeder::class);\n $this->call(RelatedProductsSeeder::class);\n $this->call(OrdersSeeder::class);\n $this->call(AdminOrderProductsSeeder::class);\n }", "title": "" }, { "docid": "6260cdf97e46414c2a70f26808235789", "score": "0.774568", "text": "public function run()\n {\n $this->cleanDatabase();\n \n Model::unguard();\n\n factory('App\\User',10)->create();\n factory('App\\Candidate', 10)->create();\n factory('App\\CandidateReview', 20)->create();\n\n // factory('App\\Candidate',10)->create()->each(function($candidate) use ($faker){\n\n // factory('App\\Review', 2)->create([ \n // 'user_id' => 1,\n // 'candidate_id' => $candidate->id,\n // 'review' => $faker->paragraph\n // ]);\n\n // });\n\n\n Model::reguard();\n }", "title": "" }, { "docid": "8044f6e9d8f8fc34aeb7da3559bef600", "score": "0.77455544", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t//quitar validaciones de llaves foeranas\n \tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n //truncaremos la tablas para eliminar datos existentes\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n //Ejecutamos factoris\n\n $CantidadUsuarios = 200;\n $CantidadCategorias = 70;\n $CantidadProductos = 2500;\n $CantidadTransaciones = 1650;\n\n\n factory(User::class, $CantidadUsuarios)->create();\n\n factory(Category::class, $CantidadCategorias)->create();\n\n factory(Product::class, $CantidadProductos)->create()->each(\n\n \t function ($producto)\n \t{\n \t\t$categorias = Category::all()->random(mt_rand(1, 5))->pluck('id');\n \t\t$producto->categories()->attach($categorias);\n \t}\n );\n\n factory(Transaction::class, $CantidadTransaciones)->create();\n }", "title": "" }, { "docid": "70d62fecb535e08b51a51e4932b4b2b3", "score": "0.77454436", "text": "public function run()\n {\n //\\App\\Models\\User::factory(1)->create();\n\n //Category::factory(3)->create();\n \n Tag::factory(10)->create();\n\n /*$this->call([\n PostsTableSeeder::class\n ]);*/\n }", "title": "" }, { "docid": "c76cc6eac7d476133144a0afc9b69d55", "score": "0.7745308", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class,10)->create();\n factory(Category::class,5)->create();\n factory(Question::class,5)->create();\n factory(Reply::class,50)->create()->each(function($reply){\n return $reply->like()->save(factory(Likes::class)->make());\n });\n User::create([\n 'name' => 'hamdi',\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678')\n ]);\n }", "title": "" }, { "docid": "764c005a9562e9bdd683c2a6a7fbc498", "score": "0.77419525", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // insert Fake data to table\n\n\n DB::table('companies')->insert(['name' => \"Company 1\", 'created_at' => now()]);\n DB::table('companies')->insert(['name' => \"Company 2\", 'created_at' => now()]);\n DB::table('companies')->insert(['name' => \"Company 3\", 'created_at' => now()]);\n DB::table('companies')->insert(['name' => \"Company 4\", 'created_at' => now()]);\n\n\n DB::table('specialties')->insert(['name' => \"IT\", 'created_at' => now()]);\n DB::table('specialties')->insert(['name' => \"DT\", 'created_at' => now()]);\n\n\n DB::table('users')->insert([\n \"name\" => \"abd\",\n \"email\" => \"abd@haboub\",\n \"password\" => '$2y$10$F6qgEnGfdKncSgldWYchRerE4HjeI6lm1Zg7u8QPRFrsJSmk70Ava',\n \"role\" => 0,\n ]);\n }", "title": "" }, { "docid": "c6bb2cf6f8efd0afe02972619083aff6", "score": "0.7739688", "text": "public function run()\n {\n // Seed database with sample data\n $this->call(RolesTableSeeder::class);\n $this->call(OrganizationTypesTableSeeder::class);\n $this->call(MemberTypesTableSeeder::class);\n $this->call(OrganizationsTableSeeder::class);\n $this->call(MembersTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(ShowTypesSeeder::class);\n $this->call(ShowsTableSeeder::class);\n $this->call(PaymentMethodsTableSeeder::class);\n $this->call(EventTypesSeeder::class);\n $this->call(EventsTableSeeder::class);\n $this->call(TicketTypesTableSeeder::class);\n $this->call(SettingsTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductsTypeTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(RolesAccessControlSeeder::class);\n $this->call(GradesSeeder::class);\n $this->call(PositionsTableSeeder::class);\n\n }", "title": "" }, { "docid": "93c52e20cd594fea79bf6e21cba5bf0b", "score": "0.77387965", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Role::truncate();\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Role::flushEventListeners();\n\n\n $this->call([\n RoleSeeder::class\n ]);\n\n $usersQuantity = 100;\n $categoriesQuantity = 30;\n $productsQuantity = 100;\n\n User::factory()\n ->count($usersQuantity)\n ->create();\n\n Category::factory()\n ->count($categoriesQuantity)\n ->create();\n\n Product::factory()\n ->count($productsQuantity)\n ->create()\n ->each(function($product){\n $categories = Category::all()->random(mt_rand(1,5))->pluck('id');\n\n $product->categories()->attach($categories);\n });\n }", "title": "" }, { "docid": "7b3e6bbb4a66db96f151afdc65f1835a", "score": "0.7738142", "text": "public function run()\n {\n $this->call([\n PermissionsTableSeeder::class,\n RolesTableSeeder::class,\n PermissionRoleTableSeeder::class,\n UsersTableSeeder::class,\n RoleUserTableSeeder::class,\n TeamTableSeeder::class,\n TeamUserTableSeeder::class,\n CategorySeeder::class,\n ]);\n\n Blog::factory(5)->create(); // Create 5 blogs\n Tag::factory(2)->create(); // Create 8 tags\n\n foreach(Blog::all() as $blog){ // loop through all posts \n $random_tags = Tag::all()->random(rand(1, 2))->pluck('id')->toArray();\n // Insert random blog tag\n foreach ($random_tags as $tag) {\n DB::table('blog_tag')->insert([\n 'blog_id' => $blog->id,\n 'tag_id' => $tag,\n 'blog_tag_type' => \"blogs\",\n ]);\n }\n }\n }", "title": "" }, { "docid": "bfa9e61d9a3e49e7b926d240b764afaa", "score": "0.77365124", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('superadmin_account')->insert([\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('admin')\n // ]);\n\n DB::table('tm_role')->insert([\n 'name' => 'Administrator',\n 'level' => 'Admin',\n 'description' => 'Role for administrator'\n ]);\n\n DB::table('tm_role')->insert([\n 'name' => 'User',\n 'level' => 'User',\n 'description' => 'Role for user'\n ]);\n\n $this->call([\n UserSeeder::class,\n ]);\n\n $this->call([\n ModuleSeeder::class,\n ]);\n\n $this->call([\n MenuSeeder::class,\n ]);\n\n $this->call([\n AccessSeeder::class,\n ]);\n\n $this->call([\n ProductCategorySeeder::class,\n ]);\n }", "title": "" }, { "docid": "4dcbd25935917c2d381dccc8d7ded3ad", "score": "0.7735933", "text": "public function run()\n {\n City::factory(config('serempre.seeds.cities'))\n ->hasClients(config('serempre.seeds.clients'))\n ->create();\n\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n ]);\n\n User::factory(config('serempre.seeds.users'))\n ->create();\n }", "title": "" }, { "docid": "32ccd27e79a39d71880d591a0a9f0bfc", "score": "0.77337736", "text": "public function run()\n {\n //to insert data into my DB table using seed class and call this seeder class inside DatabseSeeder\n // DB::table('posts')->insert([\n\n // 'title' => 'First Post Title',\n // 'body' => 'First Post Body',\n\n //to insert a second record just change this and run the seed commad.\n\n // 'title' => 'Second Post Title',\n // 'body' => 'Second Post Body',\n // ]);\n //to insert a multiple record at a time use Faker packege and write the below code\n\n $faker = Faker::create();\n foreach (range(1, 100) as $index) {\n DB::table('posts')->insert([\n 'title' => $faker->sentence(5),\n 'body' => $faker->paragraph(4),\n ]);\n }\n }", "title": "" }, { "docid": "d681f120866ba260ce624d8f848b39d2", "score": "0.7731683", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('posts')->insert([\n 'content' => \"Of course, manually specifying the attributes for each model seed is cumbersome. Instead, you can use model factories to conveniently generate large amounts of database records. First, review the model factory documentation to learn how to define your factories. Once you have defined your factories, you may use the factory helper function to insert records into your database.\",\n 'user_id'=>1\n ]);\n DB::table('posts')->insert([\n 'content' => \"Of course, for each model seed is cumbersome. Instead, you can use model factories to conveniently generate large amounts of database records. First, review the model factory documentation to learn how to define your factories. Once you have defined your factories, you may use the factory helper function to insert records into your database.\",\n 'user_id'=>2\n ]);\n DB::table('posts')->insert([\n 'content' => \"Of course, manually specifying the attributes for each model seed is cumbersome. Instead, you can use model factories to conveniently generate large amounts of database records. First, review the model factory documentation to learn how to define your factories. Once you have defined your factories, you may use the factory helper function to insert records into your database.\",\n 'user_id'=>1\n ]);\n DB::table('posts')->insert([\n 'content' =>\"Of course, manually specifying the attributes for each model seed is cumbersome. Instead, you can use model factories to conveniently generate large amounts the model factory documentation to learn how to define your factories. Once you have defined your factories, you may use the factory helper function to insert records into your database.\",\n 'user_id'=>2\n ]);\n }", "title": "" }, { "docid": "5f5815401e74483805353b02311e2841", "score": "0.7729507", "text": "public function run()\n {\n //faker 实例\n $faker=app(Faker\\Generator::class);\n //获取用户ID\n $users=User::all()->pluck(\"id\")->toArray();\n $posts=factory(Post::class)->times(100)->make()->each(function($post,$index) use ($users,$faker){\n $post->user_id=$faker->randomElement($users);\n });\n Post::insert($posts->toArray());\n }", "title": "" }, { "docid": "29b7b2d4d9390099d2c10f37ea147499", "score": "0.77205527", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n $this->call(LocationSeeder::class);\n Library::factory(1)->create();\n Book::factory(20)->create();\n Category::factory(15)->create();\n rating::factory(20)->create();\n Blog::factory(20)->create();\n }", "title": "" }, { "docid": "752c92fd7013ac44464dfe6590becae6", "score": "0.7719097", "text": "public function run()\n {\n \\DB::table('positions')->delete();\n \\DB::table('divisions')->delete();\n \\DB::table('jabatans')->delete();\n \\DB::table('periodes')->delete();\n\n\n Jabatan::create(['name'=>'Founder']);\n Jabatan::create(['name'=>'Director']);\n Jabatan::create(['name'=>'Manager']);\n Jabatan::create(['name'=>'Staff']);\n\n Periode::create(['name'=>'1.0']);\n Periode::create(['name'=>'2.0']);\n Periode::create(['name'=>'3.0']);\n\n Division::factory(10)->create()->each(function($d) {\n $d->positions()\n ->saveMany(\n Position::factory(rand(4, 8))->make());\n }); \n }", "title": "" }, { "docid": "bacac0bd28ab92bcc4f659047ceea4f7", "score": "0.77190965", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'Tobias de Vargas',\n 'email' =>'[email protected]',\n 'password' => bcrypt('12345678'),\n ]);\n\n DB::table('accs')->insert([\n 'nome' => 'Estágios',\n 'limiteHoras' =>'100',\n 'horas' => '180',\n 'user_id' => '1'\n ]);\n\n }", "title": "" }, { "docid": "b8c4b74fe31609e49896f56f36110008", "score": "0.7718512", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n\n DB::table('users')->insert([\n 'first_name' => 'Администратор',\n 'email' => '[email protected]',\n 'password' => bcrypt('adminadmin'),\n ]);\n\n DB::table('post_statuses')->insert([\n [ 'name' => 'Неопубликован' ],\n [ 'name' => 'На модерации' ],\n [ 'name' => 'Опубликован' ],\n ]);\n\n DB::table('menuitem_types')->insert([\n [ 'name' => 'Внутренняя ссылка' ],\n [ 'name' => 'Внешняя ссылка' ],\n [ 'name' => 'Маркер' ],\n [ 'name' => 'Группа маркеров' ],\n ]);\n\n\n DB::table('administrators')->insert([\n\n 'username' => 'admin',\n 'password' => bcrypt('adminadmin'),\n 'name' => 'Администратор'\n ]);\n\n DB::table('marker_groups')->insert([\n\n [ 'name' => 'Кухня' ],\n [ 'name' => 'Блюдо' ],\n [ 'name' => 'Дневной рацион' ],\n ]);\n\n Model::reguard();\n }", "title": "" }, { "docid": "1412b7a500fe55705ba8cc8539e01d88", "score": "0.7714265", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n DB::table('category_product')->truncate();\n\n $productQty = 200;\n $categoryQty = 20;\n $userQty = 10;\n $transactionQty = 100;\n\n factory(User::class, $userQty)->create();\n factory(Category::class, $categoryQty)->create();\n factory(Product::class, $productQty)->create()->each(function($product){\n \t$categories = Category::all()->random(mt_rand(1,5))->pluck('id');\n \t$product->categories()->attach($categories);\n });\n factory(Transaction::class, $transactionQty)->create();\n\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "title": "" }, { "docid": "0f6e15864469f10a25811c4b5ffceae1", "score": "0.7713022", "text": "public function run()\n {\n /*\n $l=12;\n $faker = Faker\\Factory::create();\n for ($i=1; $i <=$l ; $i++) {\n DB::table('posts')->insert([\n 'title' => 'Titulo'.$i,\n 'description' => $faker->text(),\n 'date' => $faker->date(),\n 'image' => \"58b969a711b739.97759974.png\",\n ]);\n DB::table('tags')->insert([\n 'name' => 'tag'.$i\n ]);\n \t}\n\n for ($i=1; $i <=$l ; $i++) {\n DB::table('post_tag')->insert([\n 'tag_id' => random_int(1, $l),\n 'post_id' => random_int(1, $l)\n ]);\n }\n */\n }", "title": "" }, { "docid": "5269eca04d3ed6025e05fdb9504e19a7", "score": "0.7712942", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,50)->create();\n // factory(App\\Category::class,50)->create();\n\n $category=new App\\Category();\n $category->title = \"Features\";\n $category->slug = \"features\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Food\";\n $category->slug = \"food\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Travel\";\n $category->slug = \"travel\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Recipe\";\n $category->slug = \"recipe\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Bread\";\n $category->slug = \"bread\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Breakfast\";\n $category->slug = \"breakfast\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Meat\";\n $category->slug = \"meat\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Fastfood\";\n $category->slug = \"fastfood\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Salad\";\n $category->slug = \"salad\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Soup\";\n $category->slug = \"soup\";\n $category->save();\n }", "title": "" }, { "docid": "8a6f5e3e9c04d0e7d353bd8388559963", "score": "0.77123654", "text": "public function run()\n\t{\n\t\t// Safety measure\n\t\tif(App::environment() == 'production')\n\t\t{\n\t\t\texit('No seeding allowed on production!');\n\t\t}\n\n\t\tEloquent::unguard();\n\n\t $this->insertDefaultUsers();\n\n $this->insertGroups();\n\n $this->addGroupToAdmin();\n\n $this->insertExamplePost();\n \t\t\n\t}", "title": "" }, { "docid": "c201b766accf1049c723381225596164", "score": "0.77116877", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(SettingsTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(TagsTableSeeder::class); \n \n\n // $roles = App\\Role::all();\n // // Populate the pivot table\n // App\\User::all()->each(function ($user) use ($roles) { \n // $user->roles()->attach(\n // $roles->random(rand(1, 3))->pluck('id')->toArray()\n // ); \n // });\n }", "title": "" }, { "docid": "cccf46daff53fc4f07d90d32ee0a1341", "score": "0.771111", "text": "public function run()\n {\n $this->call(AdminsTableSeeder::class);\n\n \\App\\Models\\Teacher::factory(100)->create();\n \\App\\Models\\Student::factory(200)->create();\n\n $classes = \\App\\Models\\ClassModel::factory(300)->create();\n ClassModel::chunk(300, function ($classes) {\n foreach ($classes as $class) {\n $student = Student::whereDoesntHave('classes', function($query) use ($class) {\n $query->where('classes.id', $class->id);\n })->get()->random();\n \n ClassStudent::factory()->create(['class_id' => $class->id, 'student_id' => $student->id]);\n }\n });\n\n \\App\\Models\\Mark::factory(700)->create();\n }", "title": "" }, { "docid": "38f2e7532c266522e1d0527e4e080cd3", "score": "0.7710122", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n App\\User::truncate();\n App\\Article::truncate();\n App\\ArticlePage::truncate();\n App\\Comment::truncate();\n\n factory(App\\User::class)->states('myself')->create();\n factory(App\\ArticlePage::class, 20)->create();\n \n $this->call(AdminSeeder::class);\n }", "title": "" }, { "docid": "6173f7ee7635dd924f5ec4c33ab9966a", "score": "0.77046275", "text": "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'slug'\t\t\t=> $row->slug,\n\t\t\t\t'name'\t\t\t=> $row->name,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "title": "" }, { "docid": "3517e76e1d8f527e81c70605de01d848", "score": "0.7703576", "text": "public function run()\n {\n $this->seed([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt(000000),\n 'group_id' => 1\n ]);\n\n $this->seed([\n 'name' => 'user1',\n 'email' => '[email protected]',\n 'password' => bcrypt(000000),\n 'group_id' => 3,\n 'district_id' => 35\n ]);\n\n }", "title": "" }, { "docid": "f69ae85a098afc8ab68302edd3f0490e", "score": "0.7698901", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('category_models')->insert([\n 'category' => 'cat',\n ]);\n DB::table('category_models')->insert([\n 'category' => 'dog',\n ]);\n }", "title": "" }, { "docid": "09a708b4e0b52ad5f5689964fc70b6d0", "score": "0.76985973", "text": "public function run()\n {\n //\\App\\Models\\User::factory(50)->create();\n //\\App\\Models\\Skupina::factory(10)->create();\n //\\App\\Models\\Vlakno::factory(50)->create();\n //\\App\\Models\\Prispevek::factory(250)->create();\n //\\App\\Models\\Zadost::factory(10)->create();\n //\\App\\Models\\Clen::factory(100)->create();\n //\\App\\Models\\Hodnotil::factory(1000)->create();\n //\\App\\Models\\Moderator::factory(20)->create();\n $this->call(TestUserSeeder::class);\n $this->call(TestGroupSeeder::class);\n }", "title": "" }, { "docid": "f9448f6133c6e8b37b6532dad95839af", "score": "0.76965284", "text": "public function run()\n {\n $faker = Faker::create();\n\n foreach (range(1, 100) as $i) {\n\n \t$year = Year::orderByRaw('RANDOM()')->first();\n \t$school = School::orderByRaw('RANDOM()')->first();\n\n \tClasse::create([\n \t\t'name' => $faker->words(3, true),\n\t\t\t\t'number' => $faker->randomNumber(2,false),\n\t\t\t\t'year_id' => $year->id,\n\t\t\t\t'school_id' => $school->id\n \t]);\n }\n\n }", "title": "" }, { "docid": "b9cff682d2526f461ce57526e042f677", "score": "0.76953036", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Classroom::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few classrooms in our database:\n for ($i = 0; $i < 10; $i++) {\n Classroom::create([\n 'name' => $faker->word, \n ]);\n }\n }", "title": "" }, { "docid": "eac5616aa00d523969bc5322c2c0dff6", "score": "0.7694862", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n factory(App\\Models\\Setting::class,1)->create();\n //factory(App\\Models\\Customer::class,1)->create();\n \n //factory(App\\Models\\Category::class,10)->create();\n //factory(App\\Models\\Sub_category::class,10)->create();\n //factory(App\\Models\\ChildTag::class,10)->create();\n //factory(App\\Models\\Pro_model::class,10)->create();\n //factory(App\\Models\\Brand::class,10)->create();\n\n factory(App\\Models\\Invoice_setting::class,1)->create();\n }", "title": "" }, { "docid": "b7ef246494fe8d88b196c2b7221af528", "score": "0.76934123", "text": "public function run()\n {\n //Users Seeder factory & Books\n factory(App\\User::class, 10)->create()->each(function ($user)\n {\n $user->books()->saveMany(factory(App\\Models\\Book::class, 2)->make());\n });\n\n //Reviews\n factory(App\\Models\\Review::class, 60)->create();\n }", "title": "" }, { "docid": "f61b7d83aa13c60fe3627733a07ab15f", "score": "0.7692373", "text": "public function run()\n {\n $this->call(UserTableSeeder::class);\n// $this->call(CurrencySeeder::class);\n// $this->call(PermissionsTableSeeder::class);\n// DB::table('users')->insert([\n// 'surname' => 'MR',\n// 'first_name' => 'Imtiaz',\n// 'last_name' => 'ahmed',\n// 'username' => 'admin',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('admin1234'),\n// ]);\n\n// DB::table('business')->insert([\n// 'name' => 'Xyz',\n// 'currency_id' => Currency::first()->id,\n// 'owner_id' => User::first()->id\n// ]);\n// $user = User::first();\n// $user->business_id = Business::first()->id;\n// $user->save();\n }", "title": "" }, { "docid": "4aca49de13fcd4b5b6824cedd323b42a", "score": "0.7691611", "text": "public function run()\n {\n $this->call(EventSpeakerSeeder::class);\n $this->call(EventTypeSeeder::class);\n \n factory(Event::class,10)->create();\n\n factory(Participant::class,10)->create();\n for ($i=0; $i < Event::count(); $i++) {\n factory(EventParticipant::class)->create(['participant_id'=> random_int(1, Participant::count()), 'event_id'=> random_int(1, Event::count())]);\n }\n \n factory(Budget::class,10)->create();\n for ($i=0; $i < Event::count(); $i++) { \n \tfactory(EventBudget::class)->create(['budget_id'=> random_int(1, Budget::count()), 'event_id'=> random_int(1, Event::count())]);\n }\n\n $employee = factory(Employee::class)\n ->create([\n 'email' => '[email protected]',\n 'first_name' => 'Jade',\n 'last_name' => 'Doe',\n 'contact_number' => '09358711471']);\n\n factory(User::class)->create([\n 'email' => $employee->email,\n 'password' => Hash::make('secret'),\n ]);\n }", "title": "" }, { "docid": "d46ce473aff191c97b929677db1af6c9", "score": "0.7690052", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory('App\\Student',40)->create();\n\n $subjects =['Bangla','English','Math'];\n\n foreach ($subjects as $subject) {\n \\App\\Subject::create(['subName' => $subject]);\n }\n }", "title": "" }, { "docid": "1901f179a21e06626c23a8832671e91a", "score": "0.7689779", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('users')->insert([\n // 'name' => 'John Doe',\n // 'email' => '[email protected]',\n // 'email_verified_at' => now(),\n // 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n // 'remember_token' => Str::random(10)\n // ]);\n\n //factory(App\\User::class, 20)->create();\n\n /*\n $doe=factory(App\\User::class)->states('john-doe')->create();\n $other=factory(App\\User::class, 20)->create();\n $users=$other->concat([$doe]);\n //dd($users->count());\n\n $posts=factory(App\\BlogPost::class, 50)->make()->each(function($post) use ($users) {\n $post->user_id=$users->random()->id;\n $post->save();\n });\n\n $comments=factory(App\\Comment::class, 150)->make()->each(function($comment) use ($posts) {\n $comment->blog_post_id=$posts->random()->id;\n $comment->save();\n });\n */\n\n if($this->command->confirm('Do you want to refresh the database?', true)) {\n $this->command->call('migrate:refresh');\n $this->command->info('Database was refreshed');\n } else {\n return;\n }\n\n $this->call([\n UsersTableSeeder::class,\n BlogPostsTableSeeder::class,\n CommentsTableSeeder::class,\n TagsTableSeeder::class,\n BlogPostTagTableSeeder::class\n ]);\n }", "title": "" }, { "docid": "fedf5ccdccb089bfacd42517c1914214", "score": "0.7687648", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call(PostSeeder::class);\n\n // foreach( range(1, 100) as $i) {\n // DB::table('posts')->insert([\n // 'title' => 'First Post',\n // 'content' => 'This is content'\n // ]);\n // }\n\n }", "title": "" }, { "docid": "4675f99b4c0549cf01a20835acd2fc30", "score": "0.7685214", "text": "public function run()\n {\n $faker = Factory::create();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Order_Fruit::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $usersIDs = DB::table('users')->pluck('id');\n $fruitsIDs = DB::table('users')->pluck('id');\n\n for ($i = 1; $i <= 20; $i++) {\n Order_Fruit::create([\n 'user_id' => $faker->randomElement($usersIDs),\n 'fruit_id' => $faker->randomElement($fruitsIDs),\n 'quantity' => mt_rand(1, 10000)\n ]);\n }\n }", "title": "" }, { "docid": "5f8e1ca4aaa356dde12e347615adf7eb", "score": "0.7684675", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n\n $this->call(DepartamentSeeder::class);\n $this->call(TownshipSeeder::class);\n \n User::Create([\n 'name' => 'Test',\n 'email' => '[email protected]',\n 'gender'=>'masculino',\n 'birthdate'=>'2000-12-12',\n 'address'=>'direccion del usuario',\n 'number'=>'18007878',\n 'condition'=>1,\n 'email_verified_at' => now(),\n 'password' => '$2y$10$rq5oCT9eD1szjfUsTn5E8uJWCMCvFRjUsrq85t/pz1Qy9CRxoDADu', // password asd.123456\n 'township_id' => rand(1,200),\n 'profile_photo_path' => 'profile-photos/user.png'\n ])->assignRole('Administrador');\n\n User::factory(20)->create();\n $this->call(UserTypeSeeder::class);\n $this->call(UserStatusSeeder::class);\n $this->call(CategorySeeder::class);\n Subscription::factory(90)->Create();\n $this->call(AdvertStatusSeeder::class);\n\n Advert::factory(90)->create();\n $this->call(CurrencySeeder::class);\n Product::factory(90)->create();\n AdvertComment::factory(10)->create();\n $this->call(AdvertPhotoSeeder::class);\n\n \n \n\n }", "title": "" }, { "docid": "9ba73b432cc500f657e338ec268d734b", "score": "0.76783127", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $insertUser = [\n 'name' => 'Admin',\n\n 'email' => '[email protected]',\n\n 'email_verified_at' => now(),\n\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n\n 'remember_token' => 1\n ];\n\n User::create($insertUser);\n\n //Tipos\n Tipo::create(['nome'=>'Projetor']);\n Tipo::create(['nome'=>'Caixa de Som']);\n Tipo::create(['nome'=>'Cadeira']);\n Tipo::create(['nome'=>'Microfone']);\n //Equipamentos\n Equipamento::create([\n 'nome'=>'Projetor Sala 2',\n 'tombamento'=>520,\n 'tipo_id' =>'1'\n ]);\n Equipamento::create([\n 'nome'=>'Caixa de Som Sala 2',\n 'tombamento'=>420,\n 'tipo_id' =>'2'\n ]);\n Equipamento::create([\n 'nome'=>'Cadeira do L2',\n 'tombamento'=>320,\n 'tipo_id' =>'3'\n ]);\n Equipamento::create([\n 'nome'=>'Microfone da DAEE',\n 'tombamento'=>220,\n 'tipo_id' =>'4'\n ]);\n \n }", "title": "" }, { "docid": "42fc2a1b8f646134de8caf8efc3e3085", "score": "0.76778483", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('colaboradores')->insert([\n \t'nome' => 'Thiago Hofmeister',\n \t'email' => '[email protected]',\n \t'telefone' => '(51) 99401-7101',\n \t'data_nascimento' => '1997-04-25',\n \t'password' => Hash::make('540120'),\n \t'status' => '1'\n ]);\n DB::table('colaboradores')->insert([\n \t'nome' => 'Tiago Silveira',\n \t'email' => '[email protected]',\n \t'telefone' => '(51) 99366-4639',\n \t'data_nascimento' => '1997-04-25',\n \t'password' => Hash::make('456123'),\n \t'status' => '1'\n ]);\n }", "title": "" }, { "docid": "afbaaf086b3f79ed1f806e9a33187158", "score": "0.7676384", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //factory('App\\User', 50)->create;\n\n //Model::unguard();\n factory('App\\Estado', 5)->create();\n factory('App\\Municipio', 3)->create();\n factory('App\\Parroquia', 5)->create();\n factory('App\\Filial', 5)->create();\n factory('App\\Nomina', 5)->create();\n //factory('App\\User', 10)->create();\n //factory('App\\Trabajador', 1)->create();\n //factory('App\\Docente', 1)->create();\n factory('App\\Materia', 1)->create();\n //factory('App\\Responsable', 1)->create();\n \n factory('App\\Talla', 4)->create();\n //factory('App\\Institucion', 1)->create();\n //factory('App\\Ruta', 1)->create();\n //factory('App\\Alumno', 1)->create();\n //Model::reguard();\n\n }", "title": "" }, { "docid": "bd0a031dbbd471e642fb795f1cb5d045", "score": "0.767528", "text": "public function run()\n {\n\n $this->call(\\Database\\Seeders\\RolesSeeder::class);\n $this->call(\\Database\\Seeders\\AdminsSeeder::class);\n \\App\\Models\\Users::factory(4)->create();\n $this->call(\\Database\\Seeders\\CoursesSeeder::class);\n \\App\\Models\\CourseItems::factory(4)->create();\n \\App\\Models\\Assignments::factory(4)->create();\n\n }", "title": "" }, { "docid": "7c0b282beba065f3cb3881f8cb6483e6", "score": "0.7674867", "text": "public function run()\n {\n $faker = Factory::create();\n\n factory(User::class, 5)\n ->create()\n ->each(function ($user) use ($faker) {\n factory(Post::class, $faker->numberBetween(2, 20))\n ->create([\n 'user_id' => $user->id\n ])\n ->each(function ($post) use ($faker) {\n factory(Comment::class, $faker->numberBetween(10, 60))\n ->create([\n 'body' => $faker->paragraph,\n 'approved' => mt_rand(1, 2),\n 'type' => mt_rand(1, 10),\n 'commentable_type' => 'App\\Model\\Post',\n 'commentable_id' => $post->id\n ]);\n });\n });\n\n factory(NewsletterSubscription::class, $faker->numberBetween(5, 10))->create();\n //factory(DB::table('post_categories'), $faker->numberBetween(1, 63))->create();\n }", "title": "" }, { "docid": "d16b4c245ec59889dc57494208c09493", "score": "0.7674503", "text": "public function run()\n {\n // You can run this seeder after create a db\n // This function can create some fake data\n // sequel pro-test\n\n //need set database as nullable\n // ...->commant()->nullable();\n\n $newResume = new Resume();\n $newResume->name = \"Russell\";\n $newResume->phoneNumber = \"0900000999\";\n $newResume->birthday = \"19960131\";\n $newResume->address = \"home\";\n $newResume->resume = 'hello world';\n //$newResume->resumetyp = 'english';\n $newResume->save();\n }", "title": "" }, { "docid": "770a2fa12b33357de3190927264ee1af", "score": "0.767388", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class,20)->create();\n Topic::create(['name'=>'Featured sitest','slug' => 'featured']);\n Topic::create(['name'=>'Useful links','slug' => 'Links']);\n Topic::create(['name'=>'Guides Tutorials','slug' => 'Tutorials']);\n\n factory(Post::class,20)->create();\n\n }", "title": "" }, { "docid": "719751addae7f27742c307b2982b7fd6", "score": "0.76738024", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(AdminSeeder::class);\n $this->call(SettingSeeder::class);\n $this->call(AboutSeeder::class);\n $this->call(CounterSeeder::class);\n $this->call(SeoSeeder::class);\n // \\App\\Models\\Slider::factory(5)->create();\n // \\App\\Models\\Customer::factory(15)->create();\n // \\App\\Models\\Course::factory(30)->create();\n // \\App\\Models\\Gallary::factory(50)->create();\n // \\App\\Models\\Bolg::factory(30)->create();\n // \\App\\Models\\Advert::factory(30)->create();\n \n }", "title": "" }, { "docid": "ec09ea32933a15c9ae1def22c2a6e32b", "score": "0.7673265", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// $this->call(ThanhVienTableSeeder::class);\n factory(App\\Product::class,50)->create();\n factory(App\\Review::class,300)->create();\n\n }", "title": "" }, { "docid": "da277d77f5d75049f332088792d9a23e", "score": "0.767105", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n foreach(range(1,10) as $value){\n \tApp\\Models\\Survey::create([\n \t\t'name' => $faker->name,\n \t\t'description' => $faker->text,\n \t\t'user_id' => 1,\n \t\t'category_id' => rand(1,10),\n \t]);\n }\n }", "title": "" }, { "docid": "9a06a265677a0b9239626227aead02d5", "score": "0.76698816", "text": "public function run()\n {\n DB::table('patients')->delete();\n $faker = Faker::create();\n echo \"[Seed] Table 'patients'\\n\";\n foreach(range(1, 80) as $i) {\n Patient::create([\n 'name' => $faker->firstName,\n 'lastname' => $faker->lastName,\n 'jobtitle' => $faker->jobTitle,\n 'cep' => $faker->numerify('#####-###'),\n 'street' => $faker->streetName,\n 'number' => $faker->buildingNumber(),\n 'district' => $faker->word,\n 'state' => $faker->state,\n 'city' => $faker->city,\n 'cellphone' => $faker->numerify('(##) #####-####'),\n 'phone' => $faker->numerify('(##) ####-####'),\n 'email' => $faker->companyEmail\n ]);\n }\n }", "title": "" }, { "docid": "ed928faf974c57003bc826bb9ccb457a", "score": "0.76697904", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n /*DB::table('posts')->insert([\n 'title' => Str::random(30),\n 'body' => Str::random(500),\n 'slug' => Str::random(20)\n ]);*/\n \n \n \n DB::table('comments')->insert([\n 'comment'=>Str::random(40),\n 'user_id'=>1,\n 'post_id'=>1\n ]);\n //$this->call(RolesTableSeeder::class);\n //$this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "b1db1834572e6aa1aec44e257c716b76", "score": "0.7666543", "text": "public function run()\n {\n\n Eloquent::unguard();\n\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n User::truncate();\n $usersData = [\n ['first_name'=>'Admin', 'last_name'=>'Admin','email'=>'[email protected]' ,'password' => Hash::make('admin123'),'contact_no' => '9821258699',\n 'role_id'=>'2','created_at' => Carbon::now(),\n\n ],\n ['first_name'=>'Prajakta', 'last_name'=>'Sisale','email'=>'[email protected]' ,'password' => Hash::make('prajakta123'),'contact_no' => '9821258699',\n 'role_id'=>'2','created_at' => Carbon::now(),\n\n ],\n ['first_name'=>'Praju', 'last_name'=>'Sisale','email'=>'[email protected]' ,'password' => Hash::make('praju123'),'contact_no' => '9821258677',\n 'role_id'=>'5','created_at' => Carbon::now(),\n ]\n\n ];\n\n\n DB::table(\"users\")->insert($usersData);\n }", "title": "" }, { "docid": "44cb8c34219fda585acb1f8ff6dd4ea1", "score": "0.76641893", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n User::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n $faker = \\Faker\\Factory::create();\n\t\tfor ($i=0; $i < 10; $i++) {\n $name = $faker->lastName();\n $firstname = $faker->firstName();\n DB::table('users')->insert([\n 'mail' => $name.'.'.$firstname.'@gmail.com', \n 'password' => md5($name.'.'.$firstname),\n 'nom' => $name,\n 'prenom' => $firstname,\n 'ville' => $faker->address,\n 'login' => $name.'.'.$firstname,\n 'magasin_id' => $faker->numberBetween($min = 1, $max = 10),\n 'created_at' => Now(),\n 'updated_at' => Now(),\n\t\t ]);\n\t\t}\n }", "title": "" }, { "docid": "7de5c832894871b9776743baacb6f84b", "score": "0.7663944", "text": "public function run()\n {\n // $this->call(my_seeds::class)\n //gets unix timestamp\n\t\t$date = new DateTime();\n\t\t$time_now = $date->format('Y-m-d H:i:s');\n\n DB::table('users')->insert([\n 'fname' => \"Ebrahim\",\n 'sname' => \"Ravat\",\n 'email' => \"[email protected]\",\n 'password' => bcrypt('test123')\n ]);\n\n DB::table('users')->insert([\n 'fname' => \"Bob\",\n 'sname' => \"The Builder\",\n 'email' => \"[email protected]\",\n 'password' => bcrypt('test123')\n ]); \n\n $faker = Faker::create('en_GB');\n $num_of_users = 10;\n $num_of_posts = 25;\n\n foreach (range(1,$num_of_users) as $index) {\n $name = $faker->firstName();\n DB::table('users')->insert([\n 'fname' => $name,\n 'sname' => $faker->lastname(),\n 'email' => $name.\"@\".$faker->domainName,\n 'password' => bcrypt('test123')\n ]);\n } \n\n foreach (range(1,$num_of_posts) as $index) {\n DB::table('rental')->insert([\n 'user_id' => $faker->numberBetween(1,$num_of_users),\n 'title' => $faker->word.\" \".$faker->word,\n 'description' => $faker->paragraph,\n 'make' => $this->randomCarType(),\n 'model' => $faker->word,\n 'avail' => $faker->numberBetween(0,1)\n ]);\n } \n }", "title": "" }, { "docid": "0f13bc8606fe11499f6c86ae6956a222", "score": "0.7663207", "text": "public function run()\n {\n $faker = Factory::create();\n\n $users = User::all()->pluck('id')->toArray();\n\n for ($i = 1;$i < 20;$i++) {\n $sentence = $faker->sentence(10);\n DB::table('postsenUS')->insert([\n 'title' => $sentence,\n 'user_id' => $faker->randomElement($users),\n 'slug' => $faker->slug,\n 'content' => $faker->text()\n ]);\n }\n }", "title": "" }, { "docid": "1216b563a7d5d0b82da21dc42d8e3a86", "score": "0.76629615", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class)->times(150)->create();\n\n $brands = factory(App\\Brand::class)->times(10)->create();\n $categories = factory(App\\Category::class)->times(9)->create();\n $colors = factory(App\\Color::class)->times(9)->create();\n $sizes = factory(App\\Size::class)->times(7)->create();\n $states = factory(App\\State::class)->times(3)->create();\n $subcategories = factory(App\\Subcategory::class)->times(2)->create();\n $products = factory(App\\Product::class)->times(50)->create();\n \t\t$users = factory(App\\User::class)->times(150)->create();\n \n\n\n\n foreach ($products as $oneProduct) {\n \t\t\t$oneProduct->brand()->associate($brands->random(1)->first()->id);\n $oneProduct->category()->associate($categories->random(1)->first()->id);\n \t\t\t$oneProduct->user()->associate($users->random(1)->first()->id); \n \t\t\t$oneProduct->save();\n\n \t\t\t$oneProduct->colors()->sync($colors->random(3));\n $oneProduct->sizes()->sync($sizes->random(3));\n\n \t\t}\n\n // foreach ($categories as $oneCategory) {\n // $oneCategory->subcategories()->attach($subcategories->random(1)->first()->id);\n // $oneCategory->save();\n // }\n\n\n\n foreach ($categories as $oneCategory) {\n $oneCategory->subcategories()->sync($subcategories->random(2));\n }\n\n\n }", "title": "" }, { "docid": "15bceb499e4f961c56e4636cd137b2e9", "score": "0.766296", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n $this->call(VotesTableSeeder::class);\n\n $user = new \\App\\User();\n $user->name = 'Andrey';\n $user->email = '[email protected]';\n $user->password = md5('[email protected]');\n $user->remember_token = md5(time() . '[email protected]');\n $user->id_permission = 1;\n $user->save();\n\n for ($i = 1; $i < 10; $i++) {\n\n $user = new \\App\\User();\n $user->name = 'Andrey' . $i;\n $user->email = $i . '[email protected]';\n $user->password = md5($i . '[email protected]');\n $user->remember_token = md5(time() . '[email protected]' . $i);\n $user->id_permission = 1;\n $user->save();\n }\n\n for ($i = 1; $i < 5; $i++) {\n\n $rand = (int)rand(0, 5);\n\n for ($j = 1; $j < $rand; $j++) {\n $cq = new \\App\\ClosedQuestion();\n $cq->id_votes = $i;\n $cq->id_users = $j;\n $cq->value = (bool)(round(rand()));\n $cq->save();\n }\n }\n }", "title": "" }, { "docid": "d4f7e3eb2b114563e335340a50429db0", "score": "0.7660798", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \n $user = new User(\n array(\n 'name' => 'Super Usuario',\n 'email'=> '[email protected]',\n 'password' => bcrypt('rootroot')\n )\n );\n \n $user->save();\n\n $role_admin = new Role(array(\n 'name'=>'admin'\n ));\n $role_admin->save();\n\n $role_user = new Role(array(\n 'name'=>'user'\n ));\n $role_user->save();\n\n $user->roles()->save($role_admin);\n\n $category = new Category(\n array(\n 'name'=>'Todos'\n )\n );\n $category->save();\n\n\n\n }", "title": "" }, { "docid": "9369a1d55f720edc3a33b247d343235e", "score": "0.76590776", "text": "public function run()\n {\n User::factory(3)->create();\n\n User::create([\n 'name' => 'Rizky Kurniawan',\n 'username' => 'rizky',\n 'email' => '[email protected]',\n 'password' => Hash::make('password'),\n ]);\n\n Category::create([\n 'name' => 'Web Programming',\n 'slug' => 'web-programming',\n ]);\n\n Category::create([\n 'name' => 'Web Design',\n 'slug' => 'web-design',\n ]);\n\n Category::create([\n 'name' => 'Personal',\n 'slug' => 'personal',\n ]);\n\n Post::factory(20)->create();\n }", "title": "" }, { "docid": "d2fbae49d0c021aff4c1bfc9c0a66c82", "score": "0.7657368", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Comment::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n Comment::create([\n 'post_id' => random_int(1, 50),\n 'user_id' => random_int(1, 14),\n 'content' => $faker->sentence,\n ]);\n }\n }", "title": "" }, { "docid": "4445947d1e55eb937e648f6e94fd1d65", "score": "0.7656628", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('users')->insert([\n 'name'=>'admin',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('1234'),\n 'role'=>'Administrador',\n ]);\n\n DB::table('roles')->insert([\n 'name'=>'admin',\n 'display_name'=>'Administrator',\n 'description'=>'User is allowed to manage and edit other users'\n ]);\n\n DB::table('permissions')->insert([\n 'name'=>'edit',\n 'display_name'=>'Edit Users',\n 'description'=>'edit existing users'\n ]);\n\n DB::table('cities')->insert([\n 'name'=>'Guanare',\n ]);\n DB::table('cities')->insert([\n 'name'=>'Acarigua',\n ]);\n\n DB::table('cities')->insert([\n 'name'=>'Barquisimeto',\n ]);\n\n DB::table('permissions')->insert([\n 'name'=>'Editar',\n 'description'=>'Editar usuarios y planes',\n ]);\n\n DB::table('permissions')->insert([\n 'name'=>'Eliminar',\n 'description'=>'Eliminar usuarios y planes',\n ]);\n\n }", "title": "" }, { "docid": "dd7cde5dc611b9f3b4a33844e23265fd", "score": "0.76560235", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n\n $user = factory(User::class)->create([\n 'name' => 'Toko 1',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n ]);\n\n factory(Product::class, 20)->create([\n 'user_id' => $user->id,\n ]);\n }", "title": "" }, { "docid": "aef72117062b88a29f397c729bb74ff7", "score": "0.7655589", "text": "public function run()\n {\n DB::table('articles')->delete();\n \n $articles = array(\n ['id' => 1, 'title' => 'Project 1', 'body' => 'project-1', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n \n );\n \n // Uncomment the below to run the seeder\n DB::table('articles')->insert($articles);\n }", "title": "" }, { "docid": "829de54450e151544dc6fdd3c107be13", "score": "0.76530236", "text": "public function run()\n {\n DB::table('facl_relations')->delete();\n $projects = array(\n ['cid' => '2', 'fid' => '4'],\n ['cid' => '3', 'fid' => '5'],\n\n );\n // Uncomment the below to run the seeder\n DB::table('facl_relations')->insert($projects);\n }", "title": "" } ]
9d1a4146421df7397736a0512240d9ab
/ Operation updateTableRowFormatOnline Updates the formatting properties of a table row.
[ { "docid": "ee8e79af8ebb7e46e4dc47cdd5e20b2f", "score": "0.81496435", "text": "public function updateTableRowFormatOnline(Requests\\updateTableRowFormatOnlineRequest $request)\n {\n try {\n list($response) = $this->updateTableRowFormatOnlineWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->updateTableRowFormatOnlineWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" } ]
[ { "docid": "c52683693c00e2e47bddd3fbbe124871", "score": "0.7366296", "text": "public function updateTableRowFormat(Requests\\updateTableRowFormatRequest $request)\n {\n try {\n list($response) = $this->updateTableRowFormatWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->updateTableRowFormatWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" }, { "docid": "835af14155a1ed089a48d69057945f5f", "score": "0.71060616", "text": "public function updateTableCellFormatOnline(Requests\\updateTableCellFormatOnlineRequest $request)\n {\n try {\n list($response) = $this->updateTableCellFormatOnlineWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->updateTableCellFormatOnlineWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" }, { "docid": "0873f1fdfa16db74826e2c70c808b048", "score": "0.7064706", "text": "private function updateTableRowFormatOnlineWithHttpInfo(Requests\\updateTableRowFormatOnlineRequest $request)\n {\n $returnType = 'UpdateTableRowFormatOnlineResponse';\n $this->_checkAuthToken();\n $req = $request->createRequest($this->config);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($req, $options);\n } catch (RequestException $e) {\n if ($e->getCode() == 401) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n else if ($e->getCode() < 200 || $e->getCode() > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $e->getCode(), $req->getUri()), $e->getCode(), null, null);\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $req->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $resp = $request->deserializeResponse($response);\n return [\n $resp,\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), 'UpdateTableRowFormatOnlineResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "c09f8261452eb07b16b6125e65b3862b", "score": "0.69832504", "text": "public function updateTableRowFormatOnlineAsync(Requests\\updateTableRowFormatOnlineRequest $request) \n {\n return $this->updateTableRowFormatOnlineAsyncWithHttpInfo($request)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "da63ce6f2387bc8338329644d3f7e0e0", "score": "0.64307123", "text": "private function updateTableCellFormatOnlineWithHttpInfo(Requests\\updateTableCellFormatOnlineRequest $request)\n {\n $returnType = 'UpdateTableCellFormatOnlineResponse';\n $this->_checkAuthToken();\n $req = $request->createRequest($this->config);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($req, $options);\n } catch (RequestException $e) {\n if ($e->getCode() == 401) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n else if ($e->getCode() < 200 || $e->getCode() > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $e->getCode(), $req->getUri()), $e->getCode(), null, null);\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $req->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $resp = $request->deserializeResponse($response);\n return [\n $resp,\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), 'UpdateTableCellFormatOnlineResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "656b9f82c2f2238ec1980baeb38cfda1", "score": "0.64083123", "text": "private function updateTableRowFormatOnlineAsyncWithHttpInfo(Requests\\updateTableRowFormatOnlineRequest $request) \n {\n $returnType = 'UpdateTableRowFormatOnlineResponse';\n $request = $request->createRequest($this->config);\n\n return $this->client\n ->sendAsync($request, $this->_createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($response->getStatusCode(), $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) { \n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n\n if ($exception instanceof RepeatRequestException) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n\n throw new ApiException(\n sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "d1cb1cdb6d51dba5e80ef014caa788ab", "score": "0.6385814", "text": "public function updateTableCellFormatOnlineAsync(Requests\\updateTableCellFormatOnlineRequest $request) \n {\n return $this->updateTableCellFormatOnlineAsyncWithHttpInfo($request)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "bd551cc05d80e6ab519bffbb569da084", "score": "0.6122333", "text": "public function getTableRowFormatOnline(Requests\\getTableRowFormatOnlineRequest $request)\n {\n try {\n list($response) = $this->getTableRowFormatOnlineWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->getTableRowFormatOnlineWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" }, { "docid": "adc7d4ecb63ad8b67e4645f0309f280f", "score": "0.6070107", "text": "private function updateTableRowFormatWithHttpInfo(Requests\\updateTableRowFormatRequest $request)\n {\n $returnType = '\\Aspose\\Words\\Model\\TableRowFormatResponse';\n $this->_checkAuthToken();\n $req = $request->createRequest($this->config);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($req, $options);\n } catch (RequestException $e) {\n if ($e->getCode() == 401) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n else if ($e->getCode() < 200 || $e->getCode() > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $e->getCode(), $req->getUri()), $e->getCode(), null, null);\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $req->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($statusCode, $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), '\\Aspose\\Words\\Model\\TableRowFormatResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "8cf81dc5d91eb00ade8903c78e674695", "score": "0.6009894", "text": "public function updateParagraphFormatOnline(Requests\\updateParagraphFormatOnlineRequest $request)\n {\n try {\n list($response) = $this->updateParagraphFormatOnlineWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->updateParagraphFormatOnlineWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" }, { "docid": "888ba7ea7337e6d9d794a2cd628a9735", "score": "0.5996132", "text": "public function updateTableRowFormatAsync(Requests\\updateTableRowFormatRequest $request) \n {\n return $this->updateTableRowFormatAsyncWithHttpInfo($request)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "6108c6091ddb4e1641b6fb9eb60d0561", "score": "0.5974503", "text": "private function getTableRowFormatOnlineWithHttpInfo(Requests\\getTableRowFormatOnlineRequest $request)\n {\n $returnType = '\\Aspose\\Words\\Model\\TableRowFormatResponse';\n $this->_checkAuthToken();\n $req = $request->createRequest($this->config);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($req, $options);\n } catch (RequestException $e) {\n if ($e->getCode() == 401) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n else if ($e->getCode() < 200 || $e->getCode() > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $e->getCode(), $req->getUri()), $e->getCode(), null, null);\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $req->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($statusCode, $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), '\\Aspose\\Words\\Model\\TableRowFormatResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "43f4f545d7673f075874cee751802412", "score": "0.59670556", "text": "private function updateTableCellFormatOnlineAsyncWithHttpInfo(Requests\\updateTableCellFormatOnlineRequest $request) \n {\n $returnType = 'UpdateTableCellFormatOnlineResponse';\n $request = $request->createRequest($this->config);\n\n return $this->client\n ->sendAsync($request, $this->_createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($response->getStatusCode(), $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) { \n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n\n if ($exception instanceof RepeatRequestException) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n\n throw new ApiException(\n sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "e59863cda0146b2d48e8b2de153524cf", "score": "0.57706976", "text": "public function updateParagraphListFormatOnline(Requests\\updateParagraphListFormatOnlineRequest $request)\n {\n try {\n list($response) = $this->updateParagraphListFormatOnlineWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->updateParagraphListFormatOnlineWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" }, { "docid": "54b492c2e2b5fe10eb8f28c677bc5be2", "score": "0.5680364", "text": "private function getTableRowFormatOnlineAsyncWithHttpInfo(Requests\\getTableRowFormatOnlineRequest $request) \n {\n $returnType = '\\Aspose\\Words\\Model\\TableRowFormatResponse';\n $request = $request->createRequest($this->config);\n\n return $this->client\n ->sendAsync($request, $this->_createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($response->getStatusCode(), $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) { \n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n\n if ($exception instanceof RepeatRequestException) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n\n throw new ApiException(\n sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "dad767f980973106966efd3bc8d67c18", "score": "0.55941135", "text": "private function updateTableRowFormatAsyncWithHttpInfo(Requests\\updateTableRowFormatRequest $request) \n {\n $returnType = '\\Aspose\\Words\\Model\\TableRowFormatResponse';\n $request = $request->createRequest($this->config);\n\n return $this->client\n ->sendAsync($request, $this->_createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($response->getStatusCode(), $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) { \n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n\n if ($exception instanceof RepeatRequestException) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n\n throw new ApiException(\n sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "14277df54fe9b0fec45d6eaff6aeae24", "score": "0.5546888", "text": "public function formatRow(array $row);", "title": "" }, { "docid": "8a75e0050d673e59c9147037238e2bbe", "score": "0.5523003", "text": "public function getTableRowFormatOnlineAsync(Requests\\getTableRowFormatOnlineRequest $request) \n {\n return $this->getTableRowFormatOnlineAsyncWithHttpInfo($request)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "d92973b725a1fe1ebac9d67049db4bc5", "score": "0.5355715", "text": "private function getTableCellFormatOnlineWithHttpInfo(Requests\\getTableCellFormatOnlineRequest $request)\n {\n $returnType = '\\Aspose\\Words\\Model\\TableCellFormatResponse';\n $this->_checkAuthToken();\n $req = $request->createRequest($this->config);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($req, $options);\n } catch (RequestException $e) {\n if ($e->getCode() == 401) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n else if ($e->getCode() < 200 || $e->getCode() > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $e->getCode(), $req->getUri()), $e->getCode(), null, null);\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $req->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($statusCode, $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), '\\Aspose\\Words\\Model\\TableCellFormatResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "44ffeb0760c50bc2b0c53f9802dc11d8", "score": "0.5300143", "text": "public function updateTableCellFormat(Requests\\updateTableCellFormatRequest $request)\n {\n try {\n list($response) = $this->updateTableCellFormatWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->updateTableCellFormatWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" }, { "docid": "bb03a8de52af9e0a7af313dc895a4020", "score": "0.52720106", "text": "private function updateTableCellFormatWithHttpInfo(Requests\\updateTableCellFormatRequest $request)\n {\n $returnType = '\\Aspose\\Words\\Model\\TableCellFormatResponse';\n $this->_checkAuthToken();\n $req = $request->createRequest($this->config);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($req, $options);\n } catch (RequestException $e) {\n if ($e->getCode() == 401) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n else if ($e->getCode() < 200 || $e->getCode() > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $e->getCode(), $req->getUri()), $e->getCode(), null, null);\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $req->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($statusCode, $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), '\\Aspose\\Words\\Model\\TableCellFormatResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "f4fcea88b5f7869fe12c40b1b31d314f", "score": "0.51957417", "text": "private function updateParagraphFormatOnlineWithHttpInfo(Requests\\updateParagraphFormatOnlineRequest $request)\n {\n $returnType = 'UpdateParagraphFormatOnlineResponse';\n $this->_checkAuthToken();\n $req = $request->createRequest($this->config);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($req, $options);\n } catch (RequestException $e) {\n if ($e->getCode() == 401) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n else if ($e->getCode() < 200 || $e->getCode() > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $e->getCode(), $req->getUri()), $e->getCode(), null, null);\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $req->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $resp = $request->deserializeResponse($response);\n return [\n $resp,\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), 'UpdateParagraphFormatOnlineResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "63678d3c993692c90e30df673f27e242", "score": "0.51815784", "text": "public function updateStyleOnline(Requests\\updateStyleOnlineRequest $request)\n {\n try {\n list($response) = $this->updateStyleOnlineWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->updateStyleOnlineWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" }, { "docid": "f76548672476c62ee30062200db9f80c", "score": "0.51048857", "text": "public function updateParagraphFormatOnlineAsync(Requests\\updateParagraphFormatOnlineRequest $request) \n {\n return $this->updateParagraphFormatOnlineAsyncWithHttpInfo($request)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "2fe5e95d5e4f555788aac024956c332c", "score": "0.5103134", "text": "public function updateRow($row=false, $table=false) {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "dc24124ff4c8a0b07d75f6934b685225", "score": "0.5097493", "text": "public function updateParagraphListFormatOnlineAsync(Requests\\updateParagraphListFormatOnlineRequest $request) \n {\n return $this->updateParagraphListFormatOnlineAsyncWithHttpInfo($request)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "5db938be063aa7a58eac165b9e38ce78", "score": "0.5070592", "text": "public function updateTableCellFormatAsync(Requests\\updateTableCellFormatRequest $request) \n {\n return $this->updateTableCellFormatAsyncWithHttpInfo($request)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "9ee92db2d1a7b8d95c21e447591c6be8", "score": "0.50442237", "text": "public function updateFormattingOnExisting()\n\t{\n\t\tee()->db->update(\n\t\t\t$this->getDataStorageTable(),\n\t\t\tarray('field_ft_'.$this->field_id => $this->field_default_fmt)\n\t\t);\n\t}", "title": "" }, { "docid": "31d2dc4ef52f17f6c1a797c46f5b287a", "score": "0.5022778", "text": "private function getTableCellFormatOnlineAsyncWithHttpInfo(Requests\\getTableCellFormatOnlineRequest $request) \n {\n $returnType = '\\Aspose\\Words\\Model\\TableCellFormatResponse';\n $request = $request->createRequest($this->config);\n\n return $this->client\n ->sendAsync($request, $this->_createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($response->getStatusCode(), $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) { \n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n\n if ($exception instanceof RepeatRequestException) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n\n throw new ApiException(\n sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "ed7d47ec760db85b3ea573a023654edb", "score": "0.49734074", "text": "private function updateParagraphListFormatOnlineWithHttpInfo(Requests\\updateParagraphListFormatOnlineRequest $request)\n {\n $returnType = 'UpdateParagraphListFormatOnlineResponse';\n $this->_checkAuthToken();\n $req = $request->createRequest($this->config);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($req, $options);\n } catch (RequestException $e) {\n if ($e->getCode() == 401) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n else if ($e->getCode() < 200 || $e->getCode() > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $e->getCode(), $req->getUri()), $e->getCode(), null, null);\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $req->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $resp = $request->deserializeResponse($response);\n return [\n $resp,\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), 'UpdateParagraphListFormatOnlineResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "0fae3a0579f59f5c9308112e70bf6202", "score": "0.48808867", "text": "private function updateTableCellFormatAsyncWithHttpInfo(Requests\\updateTableCellFormatRequest $request) \n {\n $returnType = '\\Aspose\\Words\\Model\\TableCellFormatResponse';\n $request = $request->createRequest($this->config);\n\n return $this->client\n ->sendAsync($request, $this->_createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($response->getStatusCode(), $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) { \n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n\n if ($exception instanceof RepeatRequestException) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n\n throw new ApiException(\n sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "e2467e4eff0b9231ae2618e27c48ec83", "score": "0.48416898", "text": "private function getTableRowFormatWithHttpInfo(Requests\\getTableRowFormatRequest $request)\n {\n $returnType = '\\Aspose\\Words\\Model\\TableRowFormatResponse';\n $this->_checkAuthToken();\n $req = $request->createRequest($this->config);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($req, $options);\n } catch (RequestException $e) {\n if ($e->getCode() == 401) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n else if ($e->getCode() < 200 || $e->getCode() > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $e->getCode(), $req->getUri()), $e->getCode(), null, null);\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $req->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($statusCode, $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), '\\Aspose\\Words\\Model\\TableRowFormatResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "93958ff3cf1c0a4a600ab6bf8827d236", "score": "0.48412055", "text": "private function updateStyleOnlineWithHttpInfo(Requests\\updateStyleOnlineRequest $request)\n {\n $returnType = 'UpdateStyleOnlineResponse';\n $this->_checkAuthToken();\n $req = $request->createRequest($this->config);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($req, $options);\n } catch (RequestException $e) {\n if ($e->getCode() == 401) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n else if ($e->getCode() < 200 || $e->getCode() > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $e->getCode(), $req->getUri()), $e->getCode(), null, null);\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $req->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $resp = $request->deserializeResponse($response);\n return [\n $resp,\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), 'UpdateStyleOnlineResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "9ddf4a6ee7bfde11b82ee63ad76aa80d", "score": "0.48323873", "text": "public function updateTablePropertiesOnline(Requests\\updateTablePropertiesOnlineRequest $request)\n {\n try {\n list($response) = $this->updateTablePropertiesOnlineWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->updateTablePropertiesOnlineWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" }, { "docid": "f8e7c3df6d1f0d256fd24fea2f06cbab", "score": "0.48271513", "text": "function EditRow() {\r\n\t\tglobal $conn, $Security, $Language, $tbl_twitter_stat;\r\n\t\t$sFilter = $tbl_twitter_stat->KeyFilter();\r\n\t\t$tbl_twitter_stat->CurrentFilter = $sFilter;\r\n\t\t$sSql = $tbl_twitter_stat->SQL();\r\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\r\n\t\t$rs = $conn->Execute($sSql);\r\n\t\t$conn->raiseErrorFn = '';\r\n\t\tif ($rs === FALSE)\r\n\t\t\treturn FALSE;\r\n\t\tif ($rs->EOF) {\r\n\t\t\t$EditRow = FALSE; // Update Failed\r\n\t\t} else {\r\n\r\n\t\t\t// Save old values\r\n\t\t\t$rsold =& $rs->fields;\r\n\t\t\t$rsnew = array();\r\n\r\n\t\t\t// id_profile\r\n\t\t\t// stat_date\r\n\t\t\t// year\r\n\r\n\t\t\t$tbl_twitter_stat->year->SetDbValueDef($rsnew, $tbl_twitter_stat->year->CurrentValue, 0, FALSE);\r\n\r\n\t\t\t// month\r\n\t\t\t$tbl_twitter_stat->month->SetDbValueDef($rsnew, $tbl_twitter_stat->month->CurrentValue, 0, FALSE);\r\n\r\n\t\t\t// week\r\n\t\t\t$tbl_twitter_stat->week->SetDbValueDef($rsnew, $tbl_twitter_stat->week->CurrentValue, 0, FALSE);\r\n\r\n\t\t\t// following\r\n\t\t\t$tbl_twitter_stat->following->SetDbValueDef($rsnew, $tbl_twitter_stat->following->CurrentValue, 0, FALSE);\r\n\r\n\t\t\t// followers\r\n\t\t\t$tbl_twitter_stat->followers->SetDbValueDef($rsnew, $tbl_twitter_stat->followers->CurrentValue, 0, FALSE);\r\n\r\n\t\t\t// listed\r\n\t\t\t$tbl_twitter_stat->listed->SetDbValueDef($rsnew, $tbl_twitter_stat->listed->CurrentValue, 0, FALSE);\r\n\r\n\t\t\t// tweets\r\n\t\t\t$tbl_twitter_stat->tweets->SetDbValueDef($rsnew, $tbl_twitter_stat->tweets->CurrentValue, 0, FALSE);\r\n\r\n\t\t\t// Call Row Updating event\r\n\t\t\t$bUpdateRow = $tbl_twitter_stat->Row_Updating($rsold, $rsnew);\r\n\t\t\tif ($bUpdateRow) {\r\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\r\n\t\t\t\t$EditRow = $conn->Execute($tbl_twitter_stat->UpdateSQL($rsnew));\r\n\t\t\t\t$conn->raiseErrorFn = '';\r\n\t\t\t} else {\r\n\t\t\t\tif ($tbl_twitter_stat->CancelMessage <> \"\") {\r\n\t\t\t\t\t$this->setMessage($tbl_twitter_stat->CancelMessage);\r\n\t\t\t\t\t$tbl_twitter_stat->CancelMessage = \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->setMessage($Language->Phrase(\"UpdateCancelled\"));\r\n\t\t\t\t}\r\n\t\t\t\t$EditRow = FALSE;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Call Row_Updated event\r\n\t\tif ($EditRow)\r\n\t\t\t$tbl_twitter_stat->Row_Updated($rsold, $rsnew);\r\n\t\t$rs->Close();\r\n\t\treturn $EditRow;\r\n\t}", "title": "" }, { "docid": "ca859bfb70fdd499581d701a0ec4f828", "score": "0.4758312", "text": "private function getTableRowOnlineWithHttpInfo(Requests\\getTableRowOnlineRequest $request)\n {\n $returnType = '\\Aspose\\Words\\Model\\TableRowResponse';\n $this->_checkAuthToken();\n $req = $request->createRequest($this->config);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($req, $options);\n } catch (RequestException $e) {\n if ($e->getCode() == 401) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n else if ($e->getCode() < 200 || $e->getCode() > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $e->getCode(), $req->getUri()), $e->getCode(), null, null);\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $req->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($statusCode, $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), '\\Aspose\\Words\\Model\\TableRowResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "ce282cf13d68a024a7d3424eb595e765", "score": "0.4754204", "text": "public function getTableCellFormatOnline(Requests\\getTableCellFormatOnlineRequest $request)\n {\n try {\n list($response) = $this->getTableCellFormatOnlineWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->getTableCellFormatOnlineWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" }, { "docid": "fecd53f4857fd1355fda5e2d025a65d6", "score": "0.47481424", "text": "public function getTableCellFormatOnlineAsync(Requests\\getTableCellFormatOnlineRequest $request) \n {\n return $this->getTableCellFormatOnlineAsyncWithHttpInfo($request)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "e02b990f8bbf7b4e5591b1c4055df216", "score": "0.4736186", "text": "public function renderTableRow($row) {\n\t\tif($this->rowCssClassExpression !== null) {\n\t\t\t$data = $this->dataProvider->data[$row];\n\t\t\t$style = $this->evaluateExpression($this->rowCssClassExpression,array('row'=>$row,'data'=>$data));\n\t\t}\n\t\telseif(is_array($this->rowCssClass) && ($n=count($this->rowCssClass))>0) {\n\t\t\t$style = $this->rowCssClass[$row%$n];\n\t\t}\n\t\t\n\t\tif( isset($style) ) {\n\t\t\t$this->sheet->getStyle($this->rowRange)->applyFromArray($this->styles[$style]);\n\t\t}\n\t\t\n\t\tforeach($this->columns as $column) {\n\t\t\t$column->renderDataCell($row);\n\t\t}\n\t}", "title": "" }, { "docid": "479b5914faf22c3b38302fc7edf2893b", "score": "0.47021466", "text": "private function updateTablePropertiesOnlineWithHttpInfo(Requests\\updateTablePropertiesOnlineRequest $request)\n {\n $returnType = 'UpdateTablePropertiesOnlineResponse';\n $this->_checkAuthToken();\n $req = $request->createRequest($this->config);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($req, $options);\n } catch (RequestException $e) {\n if ($e->getCode() == 401) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n else if ($e->getCode() < 200 || $e->getCode() > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $e->getCode(), $req->getUri()), $e->getCode(), null, null);\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $req->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $resp = $request->deserializeResponse($response);\n return [\n $resp,\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), 'UpdateTablePropertiesOnlineResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "99c56d0dbe5ac8ac7114b39f8fff33d9", "score": "0.4686344", "text": "private function getPhinxTableRowFormat(array $attributes, array $table): array\n {\n if (!empty($table['table']['row_format'])) {\n $attributes['row_format'] = strtoupper($table['table']['row_format']);\n }\n\n return $attributes;\n }", "title": "" }, { "docid": "4a4468755acf2d55bc467f1c1f3cd940", "score": "0.46563596", "text": "protected function getPhinxTableRowFormat(array $attributes, array $table): array\n {\n if (!empty($table['table']['row_format'])) {\n $attributes['row_format'] = strtoupper($table['table']['row_format']);\n }\n\n return $attributes;\n }", "title": "" }, { "docid": "31a9969e2167c1ace780873938baae16", "score": "0.46331078", "text": "public function updateParagraphListFormat(Requests\\updateParagraphListFormatRequest $request)\n {\n try {\n list($response) = $this->updateParagraphListFormatWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->updateParagraphListFormatWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" }, { "docid": "3050b66bad78c06937bdd5c68cde40e1", "score": "0.46235302", "text": "private function updateParagraphFormatOnlineAsyncWithHttpInfo(Requests\\updateParagraphFormatOnlineRequest $request) \n {\n $returnType = 'UpdateParagraphFormatOnlineResponse';\n $request = $request->createRequest($this->config);\n\n return $this->client\n ->sendAsync($request, $this->_createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($response->getStatusCode(), $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) { \n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n\n if ($exception instanceof RepeatRequestException) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n\n throw new ApiException(\n sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "698da62639816e7c84c3d63264a70a07", "score": "0.45683697", "text": "public function update_format_details($plat_id)\n\t{\n\t\t$update_set = [\n\t\t\t'format_name' => $this->input->post('format_name'),\n\t\t];\n\t\t$result_set = $this->db->where('id',$plat_id)->update('format_tbl',$update_set);\n\t\tif($this->db->affected_rows() > 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": "74f0afcdb258b2221e9dd765e8fe783a", "score": "0.4559939", "text": "function EditRow() {\n\t\tglobal $conn, $Security, $Language, $t_tinbai_mainsite;\n\t\t$sFilter = $t_tinbai_mainsite->KeyFilter();\n\t\t$t_tinbai_mainsite->CurrentFilter = $sFilter;\n\t\t$sSql = $t_tinbai_mainsite->SQL();\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE)\n\t\t\treturn FALSE;\n\t\tif ($rs->EOF) {\n\t\t\t$EditRow = FALSE; // Update Failed\n\t\t} else {\n\n\t\t\t// Save old values\n\t\t\t$rsold =& $rs->fields;\n\t\t\t$rsnew = array();\n\n\t\t\t// FK_CONGTY_ID\n\t\t\t// $t_tinbai_mainsite->FK_CONGTY_ID->SetDbValueDef($rsnew, $t_tinbai_mainsite->FK_CONGTY_ID->CurrentValue, NULL, FALSE);\n\n\t\t\t// C_ORDER_MAINSITE\n\t\t\t$t_tinbai_mainsite->C_ORDER_MAINSITE->SetDbValueDef($rsnew, ew_UnFormatDateTime($t_tinbai_mainsite->C_ORDER_MAINSITE->CurrentValue, 11, FALSE), NULL);\n\n\t\t\t// C_USER_EDIT\n\t\t\t$t_tinbai_mainsite->C_USER_EDIT->SetDbValueDef($rsnew, CurrentUserID(), NULL);\n\t\t\t$rsnew['C_USER_EDIT'] =& $t_tinbai_mainsite->C_USER_EDIT->DbValue;\n\n\t\t\t// C_EDIT_TIME\n\t\t\t$t_tinbai_mainsite->C_EDIT_TIME->SetDbValueDef($rsnew, ew_CurrentDateTime(), NULL);\n\t\t\t$rsnew['C_EDIT_TIME'] =& $t_tinbai_mainsite->C_EDIT_TIME->DbValue;\n\n\t\t\t// Call Row Updating event\n\t\t\t$bUpdateRow = $t_tinbai_mainsite->Row_Updating($rsold, $rsnew);\n\t\t\tif ($bUpdateRow) {\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t\t\t$EditRow = $conn->Execute($t_tinbai_mainsite->UpdateSQL($rsnew));\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t} else {\n\t\t\t\tif ($t_tinbai_mainsite->CancelMessage <> \"\") {\n\t\t\t\t\t$this->setMessage($t_tinbai_mainsite->CancelMessage);\n\t\t\t\t\t$t_tinbai_mainsite->CancelMessage = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->setMessage($Language->Phrase(\"UpdateCancelled\"));\n\t\t\t\t}\n\t\t\t\t$EditRow = FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// Call Row_Updated event\n\t\tif ($EditRow)\n\t\t\t$t_tinbai_mainsite->Row_Updated($rsold, $rsnew);\n\t\t$rs->Close();\n\n\t\treturn $EditRow;\n\t}", "title": "" }, { "docid": "a1025b91ad08626aa07f72f66941fe6f", "score": "0.4554615", "text": "public function updateParagraphFormat(Requests\\updateParagraphFormatRequest $request)\n {\n try {\n list($response) = $this->updateParagraphFormatWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->updateParagraphFormatWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" }, { "docid": "aa99b10b7199fc86e3689a55e12d531a", "score": "0.4532223", "text": "public function updateRunFontOnline(Requests\\updateRunFontOnlineRequest $request)\n {\n try {\n list($response) = $this->updateRunFontOnlineWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->updateRunFontOnlineWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" }, { "docid": "e126da40ddb9ebe7726c66802c4579a8", "score": "0.45300442", "text": "function EditRow() {\n\t\tglobal $conn, $Security, $Language;\n\t\t$sFilter = $this->KeyFilter();\n\t\t$this->CurrentFilter = $sFilter;\n\t\t$sSql = $this->SQL();\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE)\n\t\t\treturn FALSE;\n\t\tif ($rs->EOF) {\n\t\t\t$EditRow = FALSE; // Update Failed\n\t\t} else {\n\n\t\t\t// Save old values\n\t\t\t$rsold = &$rs->fields;\n\t\t\t$this->LoadDbValues($rsold);\n\t\t\t$rsnew = array();\n\n\t\t\t// fecha_ini\n\t\t\t$this->fecha_ini->SetDbValueDef($rsnew, $this->fecha_ini->CurrentValue, NULL, $this->fecha_ini->ReadOnly || $this->fecha_ini->MultiUpdate <> \"1\");\n\n\t\t\t// fecha_fin\n\t\t\t$this->fecha_fin->SetDbValueDef($rsnew, $this->fecha_fin->CurrentValue, NULL, $this->fecha_fin->ReadOnly || $this->fecha_fin->MultiUpdate <> \"1\");\n\n\t\t\t// id_vehiculo\n\t\t\t$this->id_vehiculo->SetDbValueDef($rsnew, $this->id_vehiculo->CurrentValue, NULL, $this->id_vehiculo->ReadOnly || $this->id_vehiculo->MultiUpdate <> \"1\");\n\n\t\t\t// id_taller\n\t\t\t$this->id_taller->SetDbValueDef($rsnew, $this->id_taller->CurrentValue, NULL, $this->id_taller->ReadOnly || $this->id_taller->MultiUpdate <> \"1\");\n\n\t\t\t// id_tipo_mantenimiento\n\t\t\t$this->id_tipo_mantenimiento->SetDbValueDef($rsnew, $this->id_tipo_mantenimiento->CurrentValue, NULL, $this->id_tipo_mantenimiento->ReadOnly || $this->id_tipo_mantenimiento->MultiUpdate <> \"1\");\n\n\t\t\t// Call Row Updating event\n\t\t\t$bUpdateRow = $this->Row_Updating($rsold, $rsnew);\n\t\t\tif ($bUpdateRow) {\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t\t\tif (count($rsnew) > 0)\n\t\t\t\t\t$EditRow = $this->Update($rsnew, \"\", $rsold);\n\t\t\t\telse\n\t\t\t\t\t$EditRow = TRUE; // No field to update\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($EditRow) {\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t\t// Use the message, do nothing\n\t\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->setFailureMessage($Language->Phrase(\"UpdateCancelled\"));\n\t\t\t\t}\n\t\t\t\t$EditRow = FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// Call Row_Updated event\n\t\tif ($EditRow)\n\t\t\t$this->Row_Updated($rsold, $rsnew);\n\t\t$rs->Close();\n\t\treturn $EditRow;\n\t}", "title": "" }, { "docid": "418d307fab9b8ba555d95fe6d6cf6a73", "score": "0.45243323", "text": "private function _renderRow($row){\n\t\tif($row['_type']=='normal'){\n\t\t\tunset($row['_type']);\n\t\t\tif($this->_numberColumns===null){\n\t\t\t\t$this->_numberColumns = count($row);\n\t\t\t}\n\t\t\tforeach($row as $numberColumn => $value){\n\t\t\t\tif(isset($this->_totalizeColumns[$numberColumn])){\n\t\t\t\t\tif(!isset($this->_totalizeValues[$numberColumn])){\n\t\t\t\t\t\t$this->_totalizeValues[$numberColumn] = 0;\n\t\t\t\t\t}\n\t\t\t\t\t$this->_totalizeValues[$numberColumn]+=$value;\n\t\t\t\t}\n\t\t\t\tif(isset($this->_columnFormats[$numberColumn])){\n\t\t\t\t\t$stdType = $this->_columnFormats[$numberColumn]->getStdType();\n\t\t\t\t\tswitch($stdType){\n\t\t\t\t\t\tcase 'number':\n\t\t\t\t\t\t\t$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$type = PHPExcel_Cell_DataType::TYPE_STRING;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$cellStyle = $this->_appendToOutput($value, $type);\n\t\t\t\t\tswitch($stdType){\n\t\t\t\t\t\tcase 'number':\n\t\t\t\t\t\t\t$cellStyle->getNumberFormat()->setFormatCode('#,##0.00');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$cellStyle = $this->_appendToOutput($value);\n\t\t\t\t}\n\t\t\t\tif(isset($this->_preparedStyles[$numberColumn])){\n\t\t\t\t\t$cellStyle->applyFromArray($this->_preparedStyles[$numberColumn]);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif($row['_type']=='raw'){\n\t\t\t\tunset($row['_type']);\n\t\t\t\tforeach($row as $numberColumn => $rawColumn){\n\t\t\t\t\t/*$output.=\"\\t\\t\\t\\t<td colspan='\".$rawColumn->getSpan().\"'\";\n\t\t\t\t\t$styles = $rawColumn->getStyle();\n\t\t\t\t\tif($styles){\n\t\t\t\t\t\t$style = $this->_prepareStyle($styles);\n\t\t\t\t\t\t$output.=\" style='\".join(';', $style).\"'\t\";\n\t\t\t\t\t}\n\t\t\t\t\t$output.=\">\".$rawColumn->getValue().\"</td>\\n\";*/\n\t\t\t\t\t$this->_appendToOutput($rawColumn->getValue());\n\t\t\t\t\tunset($rawColumn);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->_lineFeed();\n\t}", "title": "" }, { "docid": "f184ed95f94dd89072411f012b08b215", "score": "0.45144352", "text": "public function renderTableRow($row) {\r\n\t\t$change = false;\r\n\t\tif ($this->_changes && array_key_exists ( $row, $this->_changes )) {\r\n\t\t\t$change = $this->_changes [$row];\r\n\t\t\t// if change in extracolumns --> put extra row\r\n\t\t\t$columnsInExtra = array_intersect ( array_keys ( $change ['columns'] ), $this->extraRowColumns );\r\n\t\t\tif (count ( $columnsInExtra ) > 0) {\r\n\t\t\t\t$this->renderExtraRow ( $row, $change, $columnsInExtra );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// original CGridView code\r\n\t\tif ($this->rowCssClassExpression !== null) {\r\n\t\t\t$data = $this->dataProvider->data [$row];\r\n\t\t\techo '<tr class=\"' . $this->evaluateExpression ( $this->rowCssClassExpression, array (\r\n\t\t\t\t\t'row' => $row,\r\n\t\t\t\t\t'data' => $data \r\n\t\t\t) ) . '\">';\r\n\t\t} else if (is_array ( $this->rowCssClass ) && ($n = count ( $this->rowCssClass )) > 0) {\r\n\t\t\techo '<tr class=\"' . $this->rowCssClass [$row % $n] . '\">';\r\n\t\t} else {\r\n\t\t\techo '<tr>';\r\n\t\t}\r\n\t\t\r\n\t\tif (! $this->_changes) { // standart CGridview's render\r\n\t\t\tforeach ( $this->columns as $column ) {\r\n\t\t\t\t$column->renderDataCell ( $row );\r\n\t\t\t}\r\n\t\t} else { // for grouping\r\n\t\t\tforeach ( $this->columns as $column ) {\r\n\t\t\t\t$isGroupColumn = property_exists ( $column, 'name' ) && in_array ( $column->name, $this->mergeColumns );\r\n\t\t\t\tif (! $isGroupColumn) {\r\n\t\t\t\t\t$column->renderDataCell ( $row );\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$isChangedColumn = $change && array_key_exists ( $column->name, $change ['columns'] );\r\n\t\t\t\t\r\n\t\t\t\t// for rowspan show only changes (with rowspan)\r\n\t\t\t\tswitch ($this->mergeType) {\r\n\t\t\t\t\tcase self::MERGE_SIMPLE :\r\n\t\t\t\t\tcase self::MERGE_NESTED :\r\n\t\t\t\t\t\tif ($isChangedColumn) {\r\n\t\t\t\t\t\t\t$options = $column->htmlOptions;\r\n\t\t\t\t\t\t\t$column->htmlOptions ['rowspan'] = $change ['columns'] [$column->name] ['count'];\r\n\t\t\t\t\t\t\t$column->htmlOptions ['class'] = 'merge';\r\n\t\t\t\t\t\t\t$style = isset ( $column->htmlOptions ['style'] ) ? $column->htmlOptions ['style'] : '';\r\n\t\t\t\t\t\t\t$column->htmlOptions ['style'] = $style . ';' . $this->mergeCellCss;\r\n\t\t\t\t\t\t\t$column->renderDataCell ( $row );\r\n\t\t\t\t\t\t\t$column->htmlOptions = $options;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase self::MERGE_FIRSTROW :\r\n\t\t\t\t\t\tif ($isChangedColumn) {\r\n\t\t\t\t\t\t\t$column->renderDataCell ( $row );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\techo '<td></td>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\techo \"</tr>\\n\";\r\n\t}", "title": "" }, { "docid": "d72aea8f4cf8b53233f08f4e6d9a77ae", "score": "0.45140204", "text": "function formatRow(){\n\t\t$transactions = $this->add('Model_Transaction')->addCondition('reference_id',$this->model->id)->setLimit(1)->setOrder('id','asc')->tryLoadAny();\n\t\t$transactions_row = $this->add('Model_TransactionRow')->addCondition('transaction_id',$transactions->id)->setOrder('id','asc');\n\t\t$i = 1;\n\t\tforeach ($transactions_row as $tr) {\n\t\t\tif($i == 1) // first row of this transaction\n\t\t\t\t$this->current_row['loan_amount'] = $tr['amountDr'];\n\t\t\tif($i == 2)\n\t\t\t\t$this->current_row['file_charge'] = $tr['amountCr'];\n\t\t\tif($i == 3)\n\t\t\t\t$this->current_row['net_amount'] = $tr['amountCr'];\n\t\t\t$i++;\n\t\t}\n\n\t\tif(!$this->current_row['net_amount']){\n\t\t\t// Looks like there was no file charge and may be even 3rd transaction row does not exists\n\t\t\t$this->current_row['net_amount'] = $this->current_row['file_charge'];\n\t\t\t$this->current_row['file_charge'] = 0;\n\t\t}\n\n\t\tif($this->current_row['AccountNumber']){\n\t\t\t$this->loan_amount_sum += $this->current_row['loan_amount'];\n\t\t\t$this->net_amount_sum += $this->current_row['net_amount'];\n\t\t\t$this->file_charge_sum += $this->current_row['file_charge'];\n\t\t}\n\n\t\tparent::formatRow();\n\t}", "title": "" }, { "docid": "8ad30d9870660d6985c184d7b491bc97", "score": "0.45130685", "text": "function EditRow() {\n\t\tglobal $Security, $Language;\n\t\t$sFilter = $this->KeyFilter();\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\n\t\t$conn = &$this->Connection();\n\t\t$this->CurrentFilter = $sFilter;\n\t\t$sSql = $this->SQL();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE)\n\t\t\treturn FALSE;\n\t\tif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // Set no record message\n\t\t\t$EditRow = FALSE; // Update Failed\n\t\t} else {\n\n\t\t\t// Save old values\n\t\t\t$rsold = &$rs->fields;\n\t\t\t$this->LoadDbValues($rsold);\n\t\t\t$rsnew = array();\n\n\t\t\t// fecha\n\t\t\t$this->fecha->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->fecha->CurrentValue, 5), NULL, $this->fecha->ReadOnly);\n\n\t\t\t// hora\n\t\t\t$this->hora->SetDbValueDef($rsnew, $this->hora->CurrentValue, NULL, $this->hora->ReadOnly);\n\n\t\t\t// temp\n\t\t\t$this->temp->SetDbValueDef($rsnew, $this->temp->CurrentValue, NULL, $this->temp->ReadOnly);\n\n\t\t\t// hum\n\t\t\t$this->hum->SetDbValueDef($rsnew, $this->hum->CurrentValue, NULL, $this->hum->ReadOnly);\n\n\t\t\t// co2ppm\n\t\t\t$this->co2ppm->SetDbValueDef($rsnew, $this->co2ppm->CurrentValue, NULL, $this->co2ppm->ReadOnly);\n\n\t\t\t// higromet\n\t\t\t$this->higromet->SetDbValueDef($rsnew, $this->higromet->CurrentValue, NULL, $this->higromet->ReadOnly);\n\n\t\t\t// luz\n\t\t\t$this->luz->SetDbValueDef($rsnew, $this->luz->CurrentValue, NULL, $this->luz->ReadOnly);\n\n\t\t\t// maqhum\n\t\t\t$this->maqhum->SetDbValueDef($rsnew, $this->maqhum->CurrentValue, NULL, $this->maqhum->ReadOnly);\n\n\t\t\t// maqdesh\n\t\t\t$this->maqdesh->SetDbValueDef($rsnew, $this->maqdesh->CurrentValue, NULL, $this->maqdesh->ReadOnly);\n\n\t\t\t// maqcale\n\t\t\t$this->maqcale->SetDbValueDef($rsnew, $this->maqcale->CurrentValue, NULL, $this->maqcale->ReadOnly);\n\n\t\t\t// modman\n\t\t\t$this->modman->SetDbValueDef($rsnew, $this->modman->CurrentValue, NULL, $this->modman->ReadOnly);\n\n\t\t\t// periodo\n\t\t\t$this->periodo->SetDbValueDef($rsnew, $this->periodo->CurrentValue, NULL, $this->periodo->ReadOnly);\n\n\t\t\t// horasluz\n\t\t\t$this->horasluz->SetDbValueDef($rsnew, $this->horasluz->CurrentValue, NULL, $this->horasluz->ReadOnly);\n\n\t\t\t// fechaini\n\t\t\t$this->fechaini->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->fechaini->CurrentValue, 5), NULL, $this->fechaini->ReadOnly);\n\n\t\t\t// Call Row Updating event\n\t\t\t$bUpdateRow = $this->Row_Updating($rsold, $rsnew);\n\t\t\tif ($bUpdateRow) {\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\tif (count($rsnew) > 0)\n\t\t\t\t\t$EditRow = $this->Update($rsnew, \"\", $rsold);\n\t\t\t\telse\n\t\t\t\t\t$EditRow = TRUE; // No field to update\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($EditRow) {\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t\t// Use the message, do nothing\n\t\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->setFailureMessage($Language->Phrase(\"UpdateCancelled\"));\n\t\t\t\t}\n\t\t\t\t$EditRow = FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// Call Row_Updated event\n\t\tif ($EditRow)\n\t\t\t$this->Row_Updated($rsold, $rsnew);\n\t\t$rs->Close();\n\t\treturn $EditRow;\n\t}", "title": "" }, { "docid": "a1210f9caad0adfbdc49406482e4a1a1", "score": "0.4508616", "text": "function EditRow() {\n\t\tglobal $Security, $Language;\n\t\t$sFilter = $this->KeyFilter();\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\n\t\t$conn = &$this->Connection();\n\t\t$this->CurrentFilter = $sFilter;\n\t\t$sSql = $this->SQL();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE)\n\t\t\treturn FALSE;\n\t\tif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // Set no record message\n\t\t\t$EditRow = FALSE; // Update Failed\n\t\t} else {\n\n\t\t\t// Save old values\n\t\t\t$rsold = &$rs->fields;\n\t\t\t$this->LoadDbValues($rsold);\n\t\t\t$this->thumnail->OldUploadPath = \"../uploads/product/thumnail\";\n\t\t\t$this->thumnail->UploadPath = $this->thumnail->OldUploadPath;\n\t\t\t$this->image->OldUploadPath = \"../uploads/product\";\n\t\t\t$this->image->UploadPath = $this->image->OldUploadPath;\n\t\t\t$rsnew = array();\n\n\t\t\t// product_id\n\t\t\t// thumnail\n\n\t\t\tif ($this->thumnail->Visible && !$this->thumnail->ReadOnly && strval($this->thumnail->MultiUpdate) == \"1\" && !$this->thumnail->Upload->KeepFile) {\n\t\t\t\t$this->thumnail->Upload->DbValue = $rsold['thumnail']; // Get original value\n\t\t\t\tif ($this->thumnail->Upload->FileName == \"\") {\n\t\t\t\t\t$rsnew['thumnail'] = NULL;\n\t\t\t\t} else {\n\t\t\t\t\t$rsnew['thumnail'] = $this->thumnail->Upload->FileName;\n\t\t\t\t}\n\t\t\t\t$this->thumnail->ImageWidth = 107; // Resize width\n\t\t\t\t$this->thumnail->ImageHeight = 105; // Resize height\n\t\t\t}\n\n\t\t\t// image\n\t\t\tif ($this->image->Visible && !$this->image->ReadOnly && strval($this->image->MultiUpdate) == \"1\" && !$this->image->Upload->KeepFile) {\n\t\t\t\t$this->image->Upload->DbValue = $rsold['image']; // Get original value\n\t\t\t\tif ($this->image->Upload->FileName == \"\") {\n\t\t\t\t\t$rsnew['image'] = NULL;\n\t\t\t\t} else {\n\t\t\t\t\t$rsnew['image'] = $this->image->Upload->FileName;\n\t\t\t\t}\n\t\t\t\t$this->image->ImageWidth = 875; // Resize width\n\t\t\t\t$this->image->ImageHeight = 665; // Resize height\n\t\t\t}\n\n\t\t\t// Check referential integrity for master table 'products'\n\t\t\t$bValidMasterRecord = TRUE;\n\t\t\t$sMasterFilter = $this->SqlMasterFilter_products();\n\t\t\t$KeyValue = isset($rsnew['product_id']) ? $rsnew['product_id'] : $rsold['product_id'];\n\t\t\tif (strval($KeyValue) <> \"\") {\n\t\t\t\t$sMasterFilter = str_replace(\"@product_id@\", ew_AdjustSql($KeyValue), $sMasterFilter);\n\t\t\t} else {\n\t\t\t\t$bValidMasterRecord = FALSE;\n\t\t\t}\n\t\t\tif ($bValidMasterRecord) {\n\t\t\t\tif (!isset($GLOBALS[\"products\"])) $GLOBALS[\"products\"] = new cproducts();\n\t\t\t\t$rsmaster = $GLOBALS[\"products\"]->LoadRs($sMasterFilter);\n\t\t\t\t$bValidMasterRecord = ($rsmaster && !$rsmaster->EOF);\n\t\t\t\t$rsmaster->Close();\n\t\t\t}\n\t\t\tif (!$bValidMasterRecord) {\n\t\t\t\t$sRelatedRecordMsg = str_replace(\"%t\", \"products\", $Language->Phrase(\"RelatedRecordRequired\"));\n\t\t\t\t$this->setFailureMessage($sRelatedRecordMsg);\n\t\t\t\t$rs->Close();\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\tif ($this->thumnail->Visible && !$this->thumnail->Upload->KeepFile) {\n\t\t\t\t$this->thumnail->UploadPath = \"../uploads/product/thumnail\";\n\t\t\t\t$OldFiles = ew_Empty($this->thumnail->Upload->DbValue) ? array() : array($this->thumnail->Upload->DbValue);\n\t\t\t\tif (!ew_Empty($this->thumnail->Upload->FileName) && $this->UpdateCount == 1) {\n\t\t\t\t\t$NewFiles = array($this->thumnail->Upload->FileName);\n\t\t\t\t\t$NewFileCount = count($NewFiles);\n\t\t\t\t\tfor ($i = 0; $i < $NewFileCount; $i++) {\n\t\t\t\t\t\t$fldvar = ($this->thumnail->Upload->Index < 0) ? $this->thumnail->FldVar : substr($this->thumnail->FldVar, 0, 1) . $this->thumnail->Upload->Index . substr($this->thumnail->FldVar, 1);\n\t\t\t\t\t\tif ($NewFiles[$i] <> \"\") {\n\t\t\t\t\t\t\t$file = $NewFiles[$i];\n\t\t\t\t\t\t\tif (file_exists(ew_UploadTempPath($fldvar, $this->thumnail->TblVar) . $file)) {\n\t\t\t\t\t\t\t\t$OldFileFound = FALSE;\n\t\t\t\t\t\t\t\t$OldFileCount = count($OldFiles);\n\t\t\t\t\t\t\t\tfor ($j = 0; $j < $OldFileCount; $j++) {\n\t\t\t\t\t\t\t\t\t$file1 = $OldFiles[$j];\n\t\t\t\t\t\t\t\t\tif ($file1 == $file) { // Old file found, no need to delete anymore\n\t\t\t\t\t\t\t\t\t\tunset($OldFiles[$j]);\n\t\t\t\t\t\t\t\t\t\t$OldFileFound = TRUE;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ($OldFileFound) // No need to check if file exists further\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t$file1 = ew_UploadFileNameEx($this->thumnail->PhysicalUploadPath(), $file); // Get new file name\n\t\t\t\t\t\t\t\tif ($file1 <> $file) { // Rename temp file\n\t\t\t\t\t\t\t\t\twhile (file_exists(ew_UploadTempPath($fldvar, $this->thumnail->TblVar) . $file1) || file_exists($this->thumnail->PhysicalUploadPath() . $file1)) // Make sure no file name clash\n\t\t\t\t\t\t\t\t\t\t$file1 = ew_UniqueFilename($this->thumnail->PhysicalUploadPath(), $file1, TRUE); // Use indexed name\n\t\t\t\t\t\t\t\t\trename(ew_UploadTempPath($fldvar, $this->thumnail->TblVar) . $file, ew_UploadTempPath($fldvar, $this->thumnail->TblVar) . $file1);\n\t\t\t\t\t\t\t\t\t$NewFiles[$i] = $file1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->thumnail->Upload->DbValue = empty($OldFiles) ? \"\" : implode(EW_MULTIPLE_UPLOAD_SEPARATOR, $OldFiles);\n\t\t\t\t\t$this->thumnail->Upload->FileName = implode(EW_MULTIPLE_UPLOAD_SEPARATOR, $NewFiles);\n\t\t\t\t\t$this->thumnail->SetDbValueDef($rsnew, $this->thumnail->Upload->FileName, NULL, $this->thumnail->ReadOnly || $this->thumnail->MultiUpdate <> \"1\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->image->Visible && !$this->image->Upload->KeepFile) {\n\t\t\t\t$this->image->UploadPath = \"../uploads/product\";\n\t\t\t\t$OldFiles = ew_Empty($this->image->Upload->DbValue) ? array() : array($this->image->Upload->DbValue);\n\t\t\t\tif (!ew_Empty($this->image->Upload->FileName) && $this->UpdateCount == 1) {\n\t\t\t\t\t$NewFiles = array($this->image->Upload->FileName);\n\t\t\t\t\t$NewFileCount = count($NewFiles);\n\t\t\t\t\tfor ($i = 0; $i < $NewFileCount; $i++) {\n\t\t\t\t\t\t$fldvar = ($this->image->Upload->Index < 0) ? $this->image->FldVar : substr($this->image->FldVar, 0, 1) . $this->image->Upload->Index . substr($this->image->FldVar, 1);\n\t\t\t\t\t\tif ($NewFiles[$i] <> \"\") {\n\t\t\t\t\t\t\t$file = $NewFiles[$i];\n\t\t\t\t\t\t\tif (file_exists(ew_UploadTempPath($fldvar, $this->image->TblVar) . $file)) {\n\t\t\t\t\t\t\t\t$OldFileFound = FALSE;\n\t\t\t\t\t\t\t\t$OldFileCount = count($OldFiles);\n\t\t\t\t\t\t\t\tfor ($j = 0; $j < $OldFileCount; $j++) {\n\t\t\t\t\t\t\t\t\t$file1 = $OldFiles[$j];\n\t\t\t\t\t\t\t\t\tif ($file1 == $file) { // Old file found, no need to delete anymore\n\t\t\t\t\t\t\t\t\t\tunset($OldFiles[$j]);\n\t\t\t\t\t\t\t\t\t\t$OldFileFound = TRUE;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ($OldFileFound) // No need to check if file exists further\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t$file1 = ew_UploadFileNameEx($this->image->PhysicalUploadPath(), $file); // Get new file name\n\t\t\t\t\t\t\t\tif ($file1 <> $file) { // Rename temp file\n\t\t\t\t\t\t\t\t\twhile (file_exists(ew_UploadTempPath($fldvar, $this->image->TblVar) . $file1) || file_exists($this->image->PhysicalUploadPath() . $file1)) // Make sure no file name clash\n\t\t\t\t\t\t\t\t\t\t$file1 = ew_UniqueFilename($this->image->PhysicalUploadPath(), $file1, TRUE); // Use indexed name\n\t\t\t\t\t\t\t\t\trename(ew_UploadTempPath($fldvar, $this->image->TblVar) . $file, ew_UploadTempPath($fldvar, $this->image->TblVar) . $file1);\n\t\t\t\t\t\t\t\t\t$NewFiles[$i] = $file1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->image->Upload->DbValue = empty($OldFiles) ? \"\" : implode(EW_MULTIPLE_UPLOAD_SEPARATOR, $OldFiles);\n\t\t\t\t\t$this->image->Upload->FileName = implode(EW_MULTIPLE_UPLOAD_SEPARATOR, $NewFiles);\n\t\t\t\t\t$this->image->SetDbValueDef($rsnew, $this->image->Upload->FileName, NULL, $this->image->ReadOnly || $this->image->MultiUpdate <> \"1\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Call Row Updating event\n\t\t\t$bUpdateRow = $this->Row_Updating($rsold, $rsnew);\n\t\t\tif ($bUpdateRow) {\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\tif (count($rsnew) > 0)\n\t\t\t\t\t$EditRow = $this->Update($rsnew, \"\", $rsold);\n\t\t\t\telse\n\t\t\t\t\t$EditRow = TRUE; // No field to update\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($EditRow) {\n\t\t\t\t\tif ($this->thumnail->Visible && !$this->thumnail->Upload->KeepFile) {\n\t\t\t\t\t\t$OldFiles = ew_Empty($this->thumnail->Upload->DbValue) ? array() : array($this->thumnail->Upload->DbValue);\n\t\t\t\t\t\tif (!ew_Empty($this->thumnail->Upload->FileName) && $this->UpdateCount == 1) {\n\t\t\t\t\t\t\t$NewFiles = array($this->thumnail->Upload->FileName);\n\t\t\t\t\t\t\t$NewFiles2 = array($rsnew['thumnail']);\n\t\t\t\t\t\t\t$NewFileCount = count($NewFiles);\n\t\t\t\t\t\t\tfor ($i = 0; $i < $NewFileCount; $i++) {\n\t\t\t\t\t\t\t\t$fldvar = ($this->thumnail->Upload->Index < 0) ? $this->thumnail->FldVar : substr($this->thumnail->FldVar, 0, 1) . $this->thumnail->Upload->Index . substr($this->thumnail->FldVar, 1);\n\t\t\t\t\t\t\t\tif ($NewFiles[$i] <> \"\") {\n\t\t\t\t\t\t\t\t\t$file = ew_UploadTempPath($fldvar, $this->thumnail->TblVar) . $NewFiles[$i];\n\t\t\t\t\t\t\t\t\tif (file_exists($file)) {\n\t\t\t\t\t\t\t\t\t\tif (@$NewFiles2[$i] <> \"\") // Use correct file name\n\t\t\t\t\t\t\t\t\t\t\t$NewFiles[$i] = $NewFiles2[$i];\n\t\t\t\t\t\t\t\t\t\tif (!$this->thumnail->Upload->ResizeAndSaveToFile($this->thumnail->ImageWidth, $this->thumnail->ImageHeight, EW_THUMBNAIL_DEFAULT_QUALITY, $NewFiles[$i], TRUE, $i)) {\n\t\t\t\t\t\t\t\t\t\t\t$this->setFailureMessage($Language->Phrase(\"UploadErrMsg7\"));\n\t\t\t\t\t\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$NewFiles = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$OldFileCount = count($OldFiles);\n\t\t\t\t\t\tfor ($i = 0; $i < $OldFileCount; $i++) {\n\t\t\t\t\t\t\tif ($OldFiles[$i] <> \"\" && !in_array($OldFiles[$i], $NewFiles))\n\t\t\t\t\t\t\t\t@unlink($this->thumnail->OldPhysicalUploadPath() . $OldFiles[$i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($this->image->Visible && !$this->image->Upload->KeepFile) {\n\t\t\t\t\t\t$OldFiles = ew_Empty($this->image->Upload->DbValue) ? array() : array($this->image->Upload->DbValue);\n\t\t\t\t\t\tif (!ew_Empty($this->image->Upload->FileName) && $this->UpdateCount == 1) {\n\t\t\t\t\t\t\t$NewFiles = array($this->image->Upload->FileName);\n\t\t\t\t\t\t\t$NewFiles2 = array($rsnew['image']);\n\t\t\t\t\t\t\t$NewFileCount = count($NewFiles);\n\t\t\t\t\t\t\tfor ($i = 0; $i < $NewFileCount; $i++) {\n\t\t\t\t\t\t\t\t$fldvar = ($this->image->Upload->Index < 0) ? $this->image->FldVar : substr($this->image->FldVar, 0, 1) . $this->image->Upload->Index . substr($this->image->FldVar, 1);\n\t\t\t\t\t\t\t\tif ($NewFiles[$i] <> \"\") {\n\t\t\t\t\t\t\t\t\t$file = ew_UploadTempPath($fldvar, $this->image->TblVar) . $NewFiles[$i];\n\t\t\t\t\t\t\t\t\tif (file_exists($file)) {\n\t\t\t\t\t\t\t\t\t\tif (@$NewFiles2[$i] <> \"\") // Use correct file name\n\t\t\t\t\t\t\t\t\t\t\t$NewFiles[$i] = $NewFiles2[$i];\n\t\t\t\t\t\t\t\t\t\tif (!$this->image->Upload->ResizeAndSaveToFile($this->image->ImageWidth, $this->image->ImageHeight, EW_THUMBNAIL_DEFAULT_QUALITY, $NewFiles[$i], TRUE, $i)) {\n\t\t\t\t\t\t\t\t\t\t\t$this->setFailureMessage($Language->Phrase(\"UploadErrMsg7\"));\n\t\t\t\t\t\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$NewFiles = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$OldFileCount = count($OldFiles);\n\t\t\t\t\t\tfor ($i = 0; $i < $OldFileCount; $i++) {\n\t\t\t\t\t\t\tif ($OldFiles[$i] <> \"\" && !in_array($OldFiles[$i], $NewFiles))\n\t\t\t\t\t\t\t\t@unlink($this->image->OldPhysicalUploadPath() . $OldFiles[$i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t\t// Use the message, do nothing\n\t\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->setFailureMessage($Language->Phrase(\"UpdateCancelled\"));\n\t\t\t\t}\n\t\t\t\t$EditRow = FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// Call Row_Updated event\n\t\tif ($EditRow)\n\t\t\t$this->Row_Updated($rsold, $rsnew);\n\t\t$rs->Close();\n\n\t\t// thumnail\n\t\tew_CleanUploadTempPath($this->thumnail, $this->thumnail->Upload->Index);\n\n\t\t// image\n\t\tew_CleanUploadTempPath($this->image, $this->image->Upload->Index);\n\t\treturn $EditRow;\n\t}", "title": "" }, { "docid": "6e2501048fff56e87132871359eea109", "score": "0.45045036", "text": "public function modify_row(&$p_row)\n {\n $l_dao = isys_cmdb_dao::instance($this->m_db);\n\n $p_row['isys_obj__title'] = '<a href=\"?' . C__CMDB__GET__OBJECT . '=' . $p_row['isys_obj__id'] . '\">' . $p_row['isys_obj__title'] . '</a>';\n $p_row['isys_obj_type__title'] = '<a href=\"?' . C__CMDB__GET__OBJECTTYPE . '=' . $l_dao->get_objTypeID(\n $p_row['isys_obj__id']\n ) . '&' . C__CMDB__GET__VIEWMODE . '=' . C__CMDB__VIEW__LIST_OBJECT . '\">' . _L($l_dao->get_obj_type_name_by_obj_id($p_row['isys_obj__id'])) . '</a>';\n }", "title": "" }, { "docid": "dcf8d8254ff4ed2ba9c1f320a29103e4", "score": "0.45023483", "text": "private function getTableRowFormatAsyncWithHttpInfo(Requests\\getTableRowFormatRequest $request) \n {\n $returnType = '\\Aspose\\Words\\Model\\TableRowFormatResponse';\n $request = $request->createRequest($this->config);\n\n return $this->client\n ->sendAsync($request, $this->_createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($response->getStatusCode(), $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) { \n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n\n if ($exception instanceof RepeatRequestException) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n\n throw new ApiException(\n sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "4f94fef859e6f56769aa967232e4c52c", "score": "0.45005628", "text": "function EditRow() {\n\t\tglobal $conn, $Security, $Language, $jrf_tbl;\n\t\t$sFilter = $jrf_tbl->KeyFilter();\n\t\t$jrf_tbl->CurrentFilter = $sFilter;\n\t\t$sSql = $jrf_tbl->SQL();\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE)\n\t\t\treturn FALSE;\n\t\tif ($rs->EOF) {\n\t\t\t$EditRow = FALSE; // Update Failed\n\t\t} else {\n\n\t\t\t// Save old values\n\t\t\t$rsold =& $rs->fields;\n\t\t\t$rsnew = array();\n\n\t\t\t// strjrfnum\n\t\t\t$jrf_tbl->strjrfnum->SetDbValueDef($rsnew, $jrf_tbl->strjrfnum->CurrentValue, NULL, FALSE);\n\n\t\t\t// strquarter\n\t\t\t$jrf_tbl->strquarter->SetDbValueDef($rsnew, $jrf_tbl->strquarter->CurrentValue, NULL, FALSE);\n\n\t\t\t// strmon\n\t\t\t$jrf_tbl->strmon->SetDbValueDef($rsnew, $jrf_tbl->strmon->CurrentValue, NULL, FALSE);\n\n\t\t\t// stryear\n\t\t\t$jrf_tbl->stryear->SetDbValueDef($rsnew, $jrf_tbl->stryear->CurrentValue, NULL, FALSE);\n\n\t\t\t// strdate\n\t\t\t$jrf_tbl->strdate->SetDbValueDef($rsnew, $jrf_tbl->strdate->CurrentValue, NULL, FALSE);\n\n\t\t\t// strtime\n\t\t\t$jrf_tbl->strtime->SetDbValueDef($rsnew, $jrf_tbl->strtime->CurrentValue, NULL, FALSE);\n\n\t\t\t// strduedate\n\t\t\t$jrf_tbl->strduedate->SetDbValueDef($rsnew, $jrf_tbl->strduedate->CurrentValue, NULL, FALSE);\n\n\t\t\t// strsubject\n\t\t\t$jrf_tbl->strsubject->SetDbValueDef($rsnew, $jrf_tbl->strsubject->CurrentValue, NULL, FALSE);\n\n\t\t\t// strusername\n\t\t\t$jrf_tbl->strusername->SetDbValueDef($rsnew, $jrf_tbl->strusername->CurrentValue, NULL, FALSE);\n\n\t\t\t// strusereadd\n\t\t\t$jrf_tbl->strusereadd->SetDbValueDef($rsnew, $jrf_tbl->strusereadd->CurrentValue, NULL, FALSE);\n\n\t\t\t// strcompany\n\t\t\t$jrf_tbl->strcompany->SetDbValueDef($rsnew, $jrf_tbl->strcompany->CurrentValue, NULL, FALSE);\n\n\t\t\t// strdepartment\n\t\t\t$jrf_tbl->strdepartment->SetDbValueDef($rsnew, $jrf_tbl->strdepartment->CurrentValue, NULL, FALSE);\n\n\t\t\t// strloc\n\t\t\t$jrf_tbl->strloc->SetDbValueDef($rsnew, $jrf_tbl->strloc->CurrentValue, NULL, FALSE);\n\n\t\t\t// strposition\n\t\t\t$jrf_tbl->strposition->SetDbValueDef($rsnew, $jrf_tbl->strposition->CurrentValue, NULL, FALSE);\n\n\t\t\t// strtelephone\n\t\t\t$jrf_tbl->strtelephone->SetDbValueDef($rsnew, $jrf_tbl->strtelephone->CurrentValue, NULL, FALSE);\n\n\t\t\t// strcostcent\n\t\t\t$jrf_tbl->strcostcent->SetDbValueDef($rsnew, $jrf_tbl->strcostcent->CurrentValue, NULL, FALSE);\n\n\t\t\t// strnature\n\t\t\t$jrf_tbl->strnature->SetDbValueDef($rsnew, $jrf_tbl->strnature->CurrentValue, NULL, FALSE);\n\n\t\t\t// strdescript\n\t\t\t$jrf_tbl->strdescript->SetDbValueDef($rsnew, $jrf_tbl->strdescript->CurrentValue, NULL, FALSE);\n\n\t\t\t// strattach\n\t\t\t$jrf_tbl->strattach->SetDbValueDef($rsnew, $jrf_tbl->strattach->CurrentValue, NULL, FALSE);\n\n\t\t\t// strarea\n\t\t\t$jrf_tbl->strarea->SetDbValueDef($rsnew, $jrf_tbl->strarea->CurrentValue, NULL, FALSE);\n\n\t\t\t// strpriority\n\t\t\t$jrf_tbl->strpriority->SetDbValueDef($rsnew, $jrf_tbl->strpriority->CurrentValue, NULL, FALSE);\n\n\t\t\t// strstatus\n\t\t\t$jrf_tbl->strstatus->SetDbValueDef($rsnew, $jrf_tbl->strstatus->CurrentValue, NULL, FALSE);\n\n\t\t\t// strlastedit\n\t\t\t$jrf_tbl->strlastedit->SetDbValueDef($rsnew, $jrf_tbl->strlastedit->CurrentValue, NULL, FALSE);\n\n\t\t\t// strcategory\n\t\t\t$jrf_tbl->strcategory->SetDbValueDef($rsnew, $jrf_tbl->strcategory->CurrentValue, NULL, FALSE);\n\n\t\t\t// strassigned\n\t\t\t$jrf_tbl->strassigned->SetDbValueDef($rsnew, $jrf_tbl->strassigned->CurrentValue, NULL, FALSE);\n\n\t\t\t// strremarks\n\t\t\t$jrf_tbl->strremarks->SetDbValueDef($rsnew, $jrf_tbl->strremarks->CurrentValue, \"\", FALSE);\n\n\t\t\t// strdatecomplete\n\t\t\t$jrf_tbl->strdatecomplete->SetDbValueDef($rsnew, $jrf_tbl->strdatecomplete->CurrentValue, NULL, FALSE);\n\n\t\t\t// Call Row Updating event\n\t\t\t$bUpdateRow = $jrf_tbl->Row_Updating($rsold, $rsnew);\n\t\t\tif ($bUpdateRow) {\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t\t\t$EditRow = $conn->Execute($jrf_tbl->UpdateSQL($rsnew));\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t} else {\n\t\t\t\tif ($jrf_tbl->CancelMessage <> \"\") {\n\t\t\t\t\t$this->setMessage($jrf_tbl->CancelMessage);\n\t\t\t\t\t$jrf_tbl->CancelMessage = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->setMessage($Language->Phrase(\"UpdateCancelled\"));\n\t\t\t\t}\n\t\t\t\t$EditRow = FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// Call Row_Updated event\n\t\tif ($EditRow)\n\t\t\t$jrf_tbl->Row_Updated($rsold, $rsnew);\n\t\t$rs->Close();\n\t\treturn $EditRow;\n\t}", "title": "" }, { "docid": "85595a901a057fdf3f13ae794b4b76ca", "score": "0.4491718", "text": "private function updateParagraphListFormatOnlineAsyncWithHttpInfo(Requests\\updateParagraphListFormatOnlineRequest $request) \n {\n $returnType = 'UpdateParagraphListFormatOnlineResponse';\n $request = $request->createRequest($this->config);\n\n return $this->client\n ->sendAsync($request, $this->_createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($response->getStatusCode(), $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) { \n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n\n if ($exception instanceof RepeatRequestException) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n\n throw new ApiException(\n sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "efba15a1c4127506c4967691a4c9e631", "score": "0.44716087", "text": "public function format_row($row) {\n $formattedrow = array();\n foreach (array_keys($this->columns) as $column) {\n $colmethodname = 'col_' . $column;\n\n if (preg_match('/stepno_([0-9]+)_data$/', $column, $matches)) {\n // If this field is the data field for the step call the column step settings.\n $formattedcolumn = $this->col_step($row, $matches[1]);\n } else if (method_exists($this, $colmethodname)) {\n $formattedcolumn = $this->$colmethodname($row);\n } else {\n $formattedcolumn = $this->other_cols($column, $row);\n if ($formattedcolumn === null) {\n $formattedcolumn = $row->$column;\n }\n }\n $formattedrow[$column] = $formattedcolumn;\n }\n return $formattedrow;\n }", "title": "" }, { "docid": "2cc81b116c4d647e130de277e8b98970", "score": "0.4465731", "text": "function EditRow() {\n\t\tglobal $conn, $Security, $Language;\n\t\t$sFilter = $this->KeyFilter();\n\t\t$this->CurrentFilter = $sFilter;\n\t\t$sSql = $this->SQL();\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE)\n\t\t\treturn FALSE;\n\t\tif ($rs->EOF) {\n\t\t\t$EditRow = FALSE; // Update Failed\n\t\t} else {\n\n\t\t\t// Save old values\n\t\t\t$rsold = &$rs->fields;\n\t\t\t$this->LoadDbValues($rsold);\n\t\t\t$rsnew = array();\n\n\t\t\t// fecha_recepcion\n\t\t\t$this->fecha_recepcion->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->fecha_recepcion->CurrentValue, 7), ew_CurrentDate(), $this->fecha_recepcion->ReadOnly);\n\n\t\t\t// cliente\n\t\t\t$this->cliente->SetDbValueDef($rsnew, $this->cliente->CurrentValue, NULL, $this->cliente->ReadOnly);\n\n\t\t\t// id_tipo_cliente\n\t\t\t$this->id_tipo_cliente->SetDbValueDef($rsnew, $this->id_tipo_cliente->CurrentValue, NULL, $this->id_tipo_cliente->ReadOnly);\n\n\t\t\t// tel\n\t\t\t$this->tel->SetDbValueDef($rsnew, $this->tel->CurrentValue, NULL, $this->tel->ReadOnly);\n\n\t\t\t// cel\n\t\t\t$this->cel->SetDbValueDef($rsnew, $this->cel->CurrentValue, NULL, $this->cel->ReadOnly);\n\n\t\t\t// objetos\n\t\t\t$this->objetos->SetDbValueDef($rsnew, $this->objetos->CurrentValue, NULL, $this->objetos->ReadOnly);\n\n\t\t\t// detalle_a_realizar\n\t\t\t$this->detalle_a_realizar->SetDbValueDef($rsnew, $this->detalle_a_realizar->CurrentValue, NULL, $this->detalle_a_realizar->ReadOnly);\n\n\t\t\t// fecha_entrega\n\t\t\t$this->fecha_entrega->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->fecha_entrega->CurrentValue, 7), NULL, $this->fecha_entrega->ReadOnly);\n\n\t\t\t// observaciones\n\t\t\t$this->observaciones->SetDbValueDef($rsnew, $this->observaciones->CurrentValue, NULL, $this->observaciones->ReadOnly);\n\n\t\t\t// id_estado\n\t\t\t$this->id_estado->SetDbValueDef($rsnew, $this->id_estado->CurrentValue, 0, $this->id_estado->ReadOnly);\n\n\t\t\t// precio\n\t\t\t$this->precio->SetDbValueDef($rsnew, $this->precio->CurrentValue, NULL, $this->precio->ReadOnly);\n\n\t\t\t// entrega\n\t\t\t$this->entrega->SetDbValueDef($rsnew, $this->entrega->CurrentValue, NULL, $this->entrega->ReadOnly);\n\n\t\t\t// foto1\n\t\t\tif (!($this->foto1->ReadOnly) && !$this->foto1->Upload->KeepFile) {\n\t\t\t\t$this->foto1->Upload->DbValue = $rs->fields('foto1'); // Get original value\n\t\t\t\tif ($this->foto1->Upload->FileName == \"\") {\n\t\t\t\t\t$rsnew['foto1'] = NULL;\n\t\t\t\t} else {\n\t\t\t\t\t$rsnew['foto1'] = $this->foto1->Upload->FileName;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// foto2\n\t\t\tif (!($this->foto2->ReadOnly) && !$this->foto2->Upload->KeepFile) {\n\t\t\t\t$this->foto2->Upload->DbValue = $rs->fields('foto2'); // Get original value\n\t\t\t\tif ($this->foto2->Upload->FileName == \"\") {\n\t\t\t\t\t$rsnew['foto2'] = NULL;\n\t\t\t\t} else {\n\t\t\t\t\t$rsnew['foto2'] = $this->foto2->Upload->FileName;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!$this->foto1->Upload->KeepFile) {\n\t\t\t\tif (!ew_Empty($this->foto1->Upload->Value)) {\n\t\t\t\t\tif ($this->foto1->Upload->FileName == $this->foto1->Upload->DbValue) { // Overwrite if same file name\n\t\t\t\t\t\t$this->foto1->Upload->DbValue = \"\"; // No need to delete any more\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$rsnew['foto1'] = ew_UploadFileNameEx(ew_UploadPathEx(TRUE, $this->foto1->UploadPath), $rsnew['foto1']); // Get new file name\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!$this->foto2->Upload->KeepFile) {\n\t\t\t\tif (!ew_Empty($this->foto2->Upload->Value)) {\n\t\t\t\t\tif ($this->foto2->Upload->FileName == $this->foto2->Upload->DbValue) { // Overwrite if same file name\n\t\t\t\t\t\t$this->foto2->Upload->DbValue = \"\"; // No need to delete any more\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$rsnew['foto2'] = ew_UploadFileNameEx(ew_UploadPathEx(TRUE, $this->foto2->UploadPath), $rsnew['foto2']); // Get new file name\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Call Row Updating event\n\t\t\t$bUpdateRow = $this->Row_Updating($rsold, $rsnew);\n\t\t\tif ($bUpdateRow) {\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t\t\tif (count($rsnew) > 0)\n\t\t\t\t\t$EditRow = $this->Update($rsnew, \"\", $rsold);\n\t\t\t\telse\n\t\t\t\t\t$EditRow = TRUE; // No field to update\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($EditRow) {\n\t\t\t\t\tif (!$this->foto1->Upload->KeepFile) {\n\t\t\t\t\t\tif (!ew_Empty($this->foto1->Upload->Value)) {\n\t\t\t\t\t\t\t$this->foto1->Upload->SaveToFile($this->foto1->UploadPath, $rsnew['foto1'], TRUE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($this->foto1->Upload->DbValue <> \"\")\n\t\t\t\t\t\t\t@unlink(ew_UploadPathEx(TRUE, $this->foto1->OldUploadPath) . $this->foto1->Upload->DbValue);\n\t\t\t\t\t}\n\t\t\t\t\tif (!$this->foto2->Upload->KeepFile) {\n\t\t\t\t\t\tif (!ew_Empty($this->foto2->Upload->Value)) {\n\t\t\t\t\t\t\t$this->foto2->Upload->SaveToFile($this->foto2->UploadPath, $rsnew['foto2'], TRUE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($this->foto2->Upload->DbValue <> \"\")\n\t\t\t\t\t\t\t@unlink(ew_UploadPathEx(TRUE, $this->foto2->OldUploadPath) . $this->foto2->Upload->DbValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t\t// Use the message, do nothing\n\t\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->setFailureMessage($Language->Phrase(\"UpdateCancelled\"));\n\t\t\t\t}\n\t\t\t\t$EditRow = FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// Call Row_Updated event\n\t\tif ($EditRow)\n\t\t\t$this->Row_Updated($rsold, $rsnew);\n\t\t$rs->Close();\n\n\t\t// foto1\n\t\tew_CleanUploadTempPath($this->foto1, $this->foto1->Upload->Index);\n\n\t\t// foto2\n\t\tew_CleanUploadTempPath($this->foto2, $this->foto2->Upload->Index);\n\t\treturn $EditRow;\n\t}", "title": "" }, { "docid": "b67a7d90f611a0f00b1b1292da81bf5c", "score": "0.44512826", "text": "public function formRowRender(&$rowvalues, &$row) {\n // $row->propvalue = number_format($row->propvalue, 3);\n }", "title": "" }, { "docid": "99e41305ebf3c215cd8636cd174a0b5c", "score": "0.4449923", "text": "public function renderTableOnline(Requests\\renderTableOnlineRequest $request)\n {\n try {\n list($response) = $this->renderTableOnlineWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->renderTableOnlineWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" }, { "docid": "f0d3589a877e75b1428f949754a7b38f", "score": "0.44490576", "text": "private function getTableRowOnlineAsyncWithHttpInfo(Requests\\getTableRowOnlineRequest $request) \n {\n $returnType = '\\Aspose\\Words\\Model\\TableRowResponse';\n $request = $request->createRequest($this->config);\n\n return $this->client\n ->sendAsync($request, $this->_createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($response->getStatusCode(), $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) { \n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n\n if ($exception instanceof RepeatRequestException) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n\n throw new ApiException(\n sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "729b608a1976f57990a6ec1f48813b09", "score": "0.44484925", "text": "private function insertTableRowOnlineWithHttpInfo(Requests\\insertTableRowOnlineRequest $request)\n {\n $returnType = 'InsertTableRowOnlineResponse';\n $this->_checkAuthToken();\n $req = $request->createRequest($this->config);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($req, $options);\n } catch (RequestException $e) {\n if ($e->getCode() == 401) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n else if ($e->getCode() < 200 || $e->getCode() > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $e->getCode(), $req->getUri()), $e->getCode(), null, null);\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $req->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $resp = $request->deserializeResponse($response);\n return [\n $resp,\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), 'InsertTableRowOnlineResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "17a12f8ad2404038b9da2b6aba0d1d14", "score": "0.44403487", "text": "function update_row( $row, $i, $field, $post_id ) {\n\t\t\t// bail early if no layout reference\n\t\t\tif ( ! is_array( $row ) || ! isset( $row['acf_fc_layout'] ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// get layout\n\t\t\t$layout = $this->get_layout( $row['acf_fc_layout'], $field );\n\n\t\t\t// bail early if no layout\n\t\t\tif ( ! $layout || empty( $layout['sub_fields'] ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tforeach ( $layout['sub_fields'] as $sub_field ) {\n\t\t\t\t$value = null;\n\n\t\t\t\tif ( array_key_exists( $sub_field['key'], $row ) ) {\n\t\t\t\t\t$value = $row[ $sub_field['key'] ];\n\t\t\t\t} elseif ( array_key_exists( $sub_field['name'], $row ) ) {\n\t\t\t\t\t$value = $row[ $sub_field['name'] ];\n\t\t\t\t} else {\n\t\t\t\t\t// Value does not exist.\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// modify name for save\n\t\t\t\t$sub_field['name'] = \"{$field['name']}_{$i}_{$sub_field['name']}\";\n\n\t\t\t\t// update field\n\t\t\t\tacf_update_value( $value, $post_id, $sub_field );\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "8450a3df3ad2c2e619c601636c193862", "score": "0.440486", "text": "function SetBoldRow($row)\n//=============================================================================\n {\n $xls_row = $this->GetRow($row);\n $cell_count = count($xls_row->Cell);\n for( $i = 0; $i < $cell_count; $i++ )\n {\n $this->SetBold( $row, $i );\n }\n }", "title": "" }, { "docid": "8858a0009803cf8c591901c3572d35d5", "score": "0.4404538", "text": "public function applyStyleToDocumentElementOnline(Requests\\applyStyleToDocumentElementOnlineRequest $request)\n {\n try {\n list($response) = $this->applyStyleToDocumentElementOnlineWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->applyStyleToDocumentElementOnlineWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" }, { "docid": "8e7ae519d090174dc104925f75af8946", "score": "0.43981925", "text": "function EditRow() {\n\t\tglobal $conn, $Security, $Language;\n\t\t$sFilter = $this->KeyFilter();\n\t\t$this->CurrentFilter = $sFilter;\n\t\t$sSql = $this->SQL();\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE)\n\t\t\treturn FALSE;\n\t\tif ($rs->EOF) {\n\t\t\t$EditRow = FALSE; // Update Failed\n\t\t} else {\n\n\t\t\t// Save old values\n\t\t\t$rsold = &$rs->fields;\n\t\t\t$this->LoadDbValues($rsold);\n\t\t\t$rsnew = array();\n\n\t\t\t// Kode\n\t\t\t$this->Kode->SetDbValueDef($rsnew, $this->Kode->CurrentValue, \"\", $this->Kode->ReadOnly);\n\n\t\t\t// Nama Barang\n\t\t\t$this->Nama_Barang->SetDbValueDef($rsnew, $this->Nama_Barang->CurrentValue, \"\", $this->Nama_Barang->ReadOnly);\n\n\t\t\t// Satuan\n\t\t\t$this->Satuan->SetDbValueDef($rsnew, $this->Satuan->CurrentValue, \"\", $this->Satuan->ReadOnly);\n\n\t\t\t// Harga Pokok\n\t\t\t$this->Harga_Pokok->SetDbValueDef($rsnew, $this->Harga_Pokok->CurrentValue, 0, $this->Harga_Pokok->ReadOnly);\n\n\t\t\t// Harga Jual\n\t\t\t$this->Harga_Jual->SetDbValueDef($rsnew, $this->Harga_Jual->CurrentValue, 0, $this->Harga_Jual->ReadOnly);\n\n\t\t\t// Jumlah\n\t\t\t$this->Jumlah->SetDbValueDef($rsnew, $this->Jumlah->CurrentValue, 0, $this->Jumlah->ReadOnly);\n\n\t\t\t// Supplier\n\t\t\t$this->Supplier->SetDbValueDef($rsnew, $this->Supplier->CurrentValue, \"\", $this->Supplier->ReadOnly);\n\n\t\t\t// Call Row Updating event\n\t\t\t$bUpdateRow = $this->Row_Updating($rsold, $rsnew);\n\t\t\tif ($bUpdateRow) {\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t\t\tif (count($rsnew) > 0)\n\t\t\t\t\t$EditRow = $this->Update($rsnew, \"\", $rsold);\n\t\t\t\telse\n\t\t\t\t\t$EditRow = TRUE; // No field to update\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($EditRow) {\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t\t// Use the message, do nothing\n\t\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->setFailureMessage($Language->Phrase(\"UpdateCancelled\"));\n\t\t\t\t}\n\t\t\t\t$EditRow = FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// Call Row_Updated event\n\t\tif ($EditRow)\n\t\t\t$this->Row_Updated($rsold, $rsnew);\n\t\t$rs->Close();\n\t\treturn $EditRow;\n\t}", "title": "" }, { "docid": "58094ac1aee7f623772587322beaf55e", "score": "0.4396219", "text": "private function applyStyleToDocumentElementOnlineWithHttpInfo(Requests\\applyStyleToDocumentElementOnlineRequest $request)\n {\n $returnType = 'ApplyStyleToDocumentElementOnlineResponse';\n $this->_checkAuthToken();\n $req = $request->createRequest($this->config);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($req, $options);\n } catch (RequestException $e) {\n if ($e->getCode() == 401) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n else if ($e->getCode() < 200 || $e->getCode() > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $e->getCode(), $req->getUri()), $e->getCode(), null, null);\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $req->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $resp = $request->deserializeResponse($response);\n return [\n $resp,\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), 'ApplyStyleToDocumentElementOnlineResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "98d37aad6591f720e608d0605e222f0c", "score": "0.43943623", "text": "public function writeTableStyle(XMLWriter $objWriter, Table $shape): void\n {\n foreach ($shape->getRows() as $keyRow => $shapeRow) {\n // style:style\n $objWriter->startElement('style:style');\n $objWriter->writeAttribute('style:name', 'gr' . $this->shapeId . 'r' . $keyRow);\n $objWriter->writeAttribute('style:family', 'table-row');\n\n // style:table-row-properties\n $objWriter->startElement('style:table-row-properties');\n $objWriter->writeAttribute('style:row-height', Text::numberFormat(CommonDrawing::pointsToCentimeters($shapeRow->getHeight()), 3) . 'cm');\n $objWriter->endElement();\n\n $objWriter->endElement();\n\n foreach ($shapeRow->getCells() as $keyCell => $shapeCell) {\n // style:style\n $objWriter->startElement('style:style');\n $objWriter->writeAttribute('style:name', 'gr' . $this->shapeId . 'r' . $keyRow . 'c' . $keyCell);\n $objWriter->writeAttribute('style:family', 'table-cell');\n\n /*\n * Note : This element is not valid in the Schema 1.2\n */\n // style:graphic-properties\n if (Fill::FILL_NONE != $shapeCell->getFill()->getFillType()) {\n $objWriter->startElement('style:graphic-properties');\n if (Fill::FILL_SOLID == $shapeCell->getFill()->getFillType()) {\n $objWriter->writeAttribute('draw:fill', 'solid');\n $objWriter->writeAttribute('draw:fill-color', '#' . $shapeCell->getFill()->getStartColor()->getRGB());\n }\n if (Fill::FILL_GRADIENT_LINEAR == $shapeCell->getFill()->getFillType()) {\n $objWriter->writeAttribute('draw:fill', 'gradient');\n $objWriter->writeAttribute('draw:fill-gradient-name', 'gradient_' . $shapeCell->getFill()->getHashCode());\n }\n $objWriter->endElement();\n }\n // >style:graphic-properties\n\n // style:paragraph-properties\n $objWriter->startElement('style:paragraph-properties');\n $cellBorders = $shapeCell->getBorders();\n $cellBordersBottomHashCode = $cellBorders->getBottom()->getHashCode();\n if ($cellBordersBottomHashCode == $cellBorders->getTop()->getHashCode()\n && $cellBordersBottomHashCode == $cellBorders->getLeft()->getHashCode()\n && $cellBordersBottomHashCode == $cellBorders->getRight()->getHashCode()) {\n $lineStyle = 'none';\n $lineWidth = Text::numberFormat($cellBorders->getBottom()->getLineWidth() / 1.75, 2);\n $lineColor = $cellBorders->getBottom()->getColor()->getRGB();\n switch ($cellBorders->getBottom()->getLineStyle()) {\n case Border::LINE_SINGLE:\n $lineStyle = 'solid';\n }\n $objWriter->writeAttribute('fo:border', $lineWidth . 'pt ' . $lineStyle . ' #' . $lineColor);\n } else {\n $lineStyle = 'none';\n $lineWidth = Text::numberFormat($cellBorders->getBottom()->getLineWidth() / 1.75, 2);\n $lineColor = $cellBorders->getBottom()->getColor()->getRGB();\n switch ($cellBorders->getBottom()->getLineStyle()) {\n case Border::LINE_SINGLE:\n $lineStyle = 'solid';\n }\n $objWriter->writeAttribute('fo:border-bottom', $lineWidth . 'pt ' . $lineStyle . ' #' . $lineColor);\n // TOP\n $lineStyle = 'none';\n $lineWidth = Text::numberFormat($cellBorders->getTop()->getLineWidth() / 1.75, 2);\n $lineColor = $cellBorders->getTop()->getColor()->getRGB();\n switch ($cellBorders->getTop()->getLineStyle()) {\n case Border::LINE_SINGLE:\n $lineStyle = 'solid';\n }\n $objWriter->writeAttribute('fo:border-top', $lineWidth . 'pt ' . $lineStyle . ' #' . $lineColor);\n // RIGHT\n $lineStyle = 'none';\n $lineWidth = Text::numberFormat($cellBorders->getRight()->getLineWidth() / 1.75, 2);\n $lineColor = $cellBorders->getRight()->getColor()->getRGB();\n switch ($cellBorders->getRight()->getLineStyle()) {\n case Border::LINE_SINGLE:\n $lineStyle = 'solid';\n }\n $objWriter->writeAttribute('fo:border-right', $lineWidth . 'pt ' . $lineStyle . ' #' . $lineColor);\n // LEFT\n $lineStyle = 'none';\n $lineWidth = Text::numberFormat($cellBorders->getLeft()->getLineWidth() / 1.75, 2);\n $lineColor = $cellBorders->getLeft()->getColor()->getRGB();\n switch ($cellBorders->getLeft()->getLineStyle()) {\n case Border::LINE_SINGLE:\n $lineStyle = 'solid';\n }\n $objWriter->writeAttribute('fo:border-left', $lineWidth . 'pt ' . $lineStyle . ' #' . $lineColor);\n }\n // >style:paragraph-properties\n $objWriter->endElement();\n // >style:style\n $objWriter->endElement();\n\n foreach ($shapeCell->getParagraphs() as $shapeParagraph) {\n foreach ($shapeParagraph->getRichTextElements() as $shapeRichText) {\n if ($shapeRichText instanceof Run) {\n // Style des font text\n if (!isset($this->arrStyleTextFont[$shapeRichText->getHashCode()])) {\n $this->arrStyleTextFont[$shapeRichText->getHashCode()] = $shapeRichText;\n }\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "937ad0bbcf9072cae80c0fb6e565a0f7", "score": "0.43895558", "text": "public function getTableRowOnline(Requests\\getTableRowOnlineRequest $request)\n {\n try {\n list($response) = $this->getTableRowOnlineWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->getTableRowOnlineWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" }, { "docid": "ff47cb0a64f92955becd55d358f3d32f", "score": "0.43887058", "text": "public function update($table, $data, $where, $format = null, $where_format = null) {\n if (!is_array($data) || !is_array($where))\n return false;\n\n $formats = $format = (array) $format;\n $bits = $wheres = array();\n foreach ((array) array_keys($data) as $field) {\n if (!empty($format))\n $form = ( $form = array_shift($formats) ) ? $form : $format[0];\n elseif (isset($this->field_types[$field]))\n $form = $this->field_types[$field];\n else\n $form = '%s';\n $bits[] = \"`$field` = {$form}\";\n }\n\n $where_formats = $where_format = (array) $where_format;\n foreach ((array) array_keys($where) as $field) {\n if (!empty($where_format))\n $form = ( $form = array_shift($where_formats) ) ? $form : $where_format[0];\n elseif (isset($this->field_types[$field]))\n $form = $this->field_types[$field];\n else\n $form = '%s';\n $wheres[] = \"`$field` = {$form}\";\n }\n\n $sql = \"UPDATE `$table` SET \" . implode(', ', $bits) . ' WHERE ' . implode(' AND ', $wheres);\n return $this->query($this->prepare($sql, array_merge(array_values($data), array_values($where))));\n }", "title": "" }, { "docid": "670e121669b0b35f37f5f97aab038f46", "score": "0.4378236", "text": "function EditRow() {\n\t\tglobal $conn, $Security, $Language, $mapas_zonas;\n\t\t$sFilter = $mapas_zonas->KeyFilter();\n\t\t$mapas_zonas->CurrentFilter = $sFilter;\n\t\t$sSql = $mapas_zonas->SQL();\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE)\n\t\t\treturn FALSE;\n\t\tif ($rs->EOF) {\n\t\t\t$EditRow = FALSE; // Update Failed\n\t\t} else {\n\n\t\t\t// Save old values\n\t\t\t$rsold =& $rs->fields;\n\t\t\t$rsnew = array();\n\n\t\t\t// mapa\n\t\t\t$mapas_zonas->mapa->SetDbValueDef($rsnew, $mapas_zonas->mapa->CurrentValue, 0, FALSE);\n\n\t\t\t// pos_x\n\t\t\t$mapas_zonas->pos_x->SetDbValueDef($rsnew, $mapas_zonas->pos_x->CurrentValue, 0, FALSE);\n\n\t\t\t// pos_y\n\t\t\t$mapas_zonas->pos_y->SetDbValueDef($rsnew, $mapas_zonas->pos_y->CurrentValue, 0, FALSE);\n\n\t\t\t// secuencia\n\t\t\t$mapas_zonas->secuencia->SetDbValueDef($rsnew, $mapas_zonas->secuencia->CurrentValue, 0, FALSE);\n\n\t\t\t// width\n\t\t\t$mapas_zonas->width->SetDbValueDef($rsnew, $mapas_zonas->width->CurrentValue, 0, FALSE);\n\n\t\t\t// height\n\t\t\t$mapas_zonas->height->SetDbValueDef($rsnew, $mapas_zonas->height->CurrentValue, 0, FALSE);\n\n\t\t\t// titulo\n\t\t\t$mapas_zonas->titulo->SetDbValueDef($rsnew, $mapas_zonas->titulo->CurrentValue, NULL, FALSE);\n\n\t\t\t// Call Row Updating event\n\t\t\t$bUpdateRow = $mapas_zonas->Row_Updating($rsold, $rsnew);\n\t\t\tif ($bUpdateRow) {\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t\t\t$EditRow = $conn->Execute($mapas_zonas->UpdateSQL($rsnew));\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t} else {\n\t\t\t\tif ($mapas_zonas->CancelMessage <> \"\") {\n\t\t\t\t\t$this->setMessage($mapas_zonas->CancelMessage);\n\t\t\t\t\t$mapas_zonas->CancelMessage = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->setMessage($Language->Phrase(\"UpdateCancelled\"));\n\t\t\t\t}\n\t\t\t\t$EditRow = FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// Call Row_Updated event\n\t\tif ($EditRow)\n\t\t\t$mapas_zonas->Row_Updated($rsold, $rsnew);\n\t\t$rs->Close();\n\t\treturn $EditRow;\n\t}", "title": "" }, { "docid": "6fa3718558a4a186342aa28a7e7011b6", "score": "0.43750533", "text": "function update_row($chartid, $rowId){\n global $DB;\n \n //echo \"rowid=\".$rowId;\n $record = new stdClass();\n $record->id = $chartid;\n if ($rowId == $chartid){\n\n\n $record->type = optional_param($rowId.\"_c0\", '', PARAM_TEXT);\n $record->title = optional_param($rowId.\"_c1\", '', PARAM_TEXT);\n $record->xaxistitle = optional_param($rowId.\"_c2\", '', PARAM_TEXT);\n $record->yaxistitle = optional_param($rowId.\"_c3\", '', PARAM_TEXT);\n $record->chartoptions = optional_param($rowId.\"_c4\",'', PARAM_TEXT);\n } else {\n $record->series1 = optional_param($rowId.\"_c0\",'', PARAM_TEXT);\n $record->series2 = optional_param($rowId.\"_c1\",'', PARAM_TEXT);\n $record->series3 = optional_param($rowId.\"_c2\",'', PARAM_TEXT);\n $record->series4 = optional_param($rowId.\"_c3\",'', PARAM_TEXT);\n $record->series5 = optional_param($rowId.\"_c4\",'', PARAM_TEXT);\n }\n\n\n //print_r($record);\n\n //$DB->insert_record('filter_chart_data', $record, true);\n //$out=$DB->update_record('filter_chart_users', $record);\n //print_r($out);\n if($DB->update_record('filter_chart_users', $record, true)){\n ///success\n echo \"success\";\n } else {\n //failure\n echo \"Database updated failed\";\n }\n \n return \"update\"; \n}", "title": "" }, { "docid": "341465f70f4403fc270f1c03a309f5cd", "score": "0.436517", "text": "public function deleteTableRowOnline(Requests\\deleteTableRowOnlineRequest $request)\n {\n try {\n list($response) = $this->deleteTableRowOnlineWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->deleteTableRowOnlineWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" }, { "docid": "ea1d0a82f54d15fa073c1a461f6e1512", "score": "0.43639803", "text": "public function setRowStyle($rowindex, $callback)\n {\n $this->repo->set(\"style_row@{$this->currentTableId}@{$rowindex}\", $callback);\n }", "title": "" }, { "docid": "a83bf8d5134bc89eec844802ab8c4fa3", "score": "0.43539697", "text": "public function updateStyleOnlineAsync(Requests\\updateStyleOnlineRequest $request) \n {\n return $this->updateStyleOnlineAsyncWithHttpInfo($request)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "2abdc7876a28a33f2475eec50e739a8f", "score": "0.43536502", "text": "private function deleteTableRowOnlineWithHttpInfo(Requests\\deleteTableRowOnlineRequest $request)\n {\n $returnType = 'FILES_COLLECTION';\n $this->_checkAuthToken();\n $req = $request->createRequest($this->config);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($req, $options);\n } catch (RequestException $e) {\n if ($e->getCode() == 401) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n else if ($e->getCode() < 200 || $e->getCode() > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $e->getCode(), $req->getUri()), $e->getCode(), null, null);\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $req->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($statusCode, $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), 'FILES_COLLECTION', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "2953be88afa0114c125719dc6ac8ff84", "score": "0.43453908", "text": "function EditRow() {\n\t\tglobal $conn, $Security, $asset_detail;\n\t\t$sFilter = $asset_detail->KeyFilter();\n\t\t$asset_detail->CurrentFilter = $sFilter;\n\t\t$sSql = $asset_detail->SQL();\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE)\n\t\t\treturn FALSE;\n\t\tif ($rs->EOF) {\n\t\t\t$EditRow = FALSE; // Update Failed\n\t\t} else {\n\n\t\t\t// Save old values\n\t\t\t$rsold =& $rs->fields;\n\t\t\t$rsnew = array();\n\n\t\t\t// Field kode\n\t\t\t// Field category\n\n\t\t\t$asset_detail->category->SetDbValueDef($asset_detail->category->CurrentValue, 0);\n\t\t\t$rsnew['category'] =& $asset_detail->category->DbValue;\n\n\t\t\t// Field kode_barang\n\t\t\t$asset_detail->kode_barang->SetDbValueDef($asset_detail->kode_barang->CurrentValue, \"\");\n\t\t\t$rsnew['kode_barang'] =& $asset_detail->kode_barang->DbValue;\n\n\t\t\t// Field nama_barang\n\t\t\t$asset_detail->nama_barang->SetDbValueDef($asset_detail->nama_barang->CurrentValue, \"\");\n\t\t\t$rsnew['nama_barang'] =& $asset_detail->nama_barang->DbValue;\n\n\t\t\t// Field jml\n\t\t\t$asset_detail->jml->SetDbValueDef($asset_detail->jml->CurrentValue, 0);\n\t\t\t$rsnew['jml'] =& $asset_detail->jml->DbValue;\n\n\t\t\t// Field tgl_pembelian\n\t\t\t$asset_detail->tgl_pembelian->SetDbValueDef(ew_UnFormatDateTime($asset_detail->tgl_pembelian->CurrentValue, 7), ew_CurrentDate());\n\t\t\t$rsnew['tgl_pembelian'] =& $asset_detail->tgl_pembelian->DbValue;\n\n\t\t\t// Field nilai_pembelian\n\t\t\t$asset_detail->nilai_pembelian->SetDbValueDef($asset_detail->nilai_pembelian->CurrentValue, 0);\n\t\t\t$rsnew['nilai_pembelian'] =& $asset_detail->nilai_pembelian->DbValue;\n\n\t\t\t// Call Row Updating event\n\t\t\t$bUpdateRow = $asset_detail->Row_Updating($rsold, $rsnew);\n\t\t\tif ($bUpdateRow) {\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t\t\t$EditRow = $conn->Execute($asset_detail->UpdateSQL($rsnew));\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t} else {\n\t\t\t\tif ($asset_detail->CancelMessage <> \"\") {\n\t\t\t\t\t$this->setMessage($asset_detail->CancelMessage);\n\t\t\t\t\t$asset_detail->CancelMessage = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->setMessage(\"Update cancelled\");\n\t\t\t\t}\n\t\t\t\t$EditRow = FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// Call Row_Updated event\n\t\tif ($EditRow)\n\t\t\t$asset_detail->Row_Updated($rsold, $rsnew);\n\t\t$rs->Close();\n\t\treturn $EditRow;\n\t}", "title": "" }, { "docid": "2c896534e242233bf4d27eb6a17a4a1b", "score": "0.43439126", "text": "public function getTableRowFormat(Requests\\getTableRowFormatRequest $request)\n {\n try {\n list($response) = $this->getTableRowFormatWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n \t\ttry {\n \tlist($response) = $this->getTableRowFormatWithHttpInfo($request);\n \treturn $response;\n \t}\n \tcatch(RepeatRequestException $e) {\n \tthrow new ApiException('Authorization failed', $e->getCode(), null, null);\n \t} \n } \n }", "title": "" }, { "docid": "047e01bdf029c63fb7e0e093ec06086f", "score": "0.43296131", "text": "function EditRow() {\n\t\tglobal $Security, $Language;\n\t\t$sFilter = $this->KeyFilter();\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\n\t\t$conn = &$this->Connection();\n\t\t$this->CurrentFilter = $sFilter;\n\t\t$sSql = $this->SQL();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE)\n\t\t\treturn FALSE;\n\t\tif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // Set no record message\n\t\t\t$EditRow = FALSE; // Update Failed\n\t\t} else {\n\n\t\t\t// Begin transaction\n\t\t\tif ($this->getCurrentDetailTable() <> \"\")\n\t\t\t\t$conn->BeginTrans();\n\n\t\t\t// Save old values\n\t\t\t$rsold = &$rs->fields;\n\t\t\t$this->LoadDbValues($rsold);\n\t\t\t$rsnew = array();\n\n\t\t\t// NoKontrak\n\t\t\t$this->NoKontrak->SetDbValueDef($rsnew, $this->NoKontrak->CurrentValue, \"\", $this->NoKontrak->ReadOnly);\n\n\t\t\t// TglKontrak\n\t\t\t$this->TglKontrak->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->TglKontrak->CurrentValue, 7), ew_CurrentDate(), $this->TglKontrak->ReadOnly);\n\n\t\t\t// nasabah_id\n\t\t\t$this->nasabah_id->SetDbValueDef($rsnew, $this->nasabah_id->CurrentValue, 0, $this->nasabah_id->ReadOnly);\n\n\t\t\t// Pinjaman\n\t\t\t$this->Pinjaman->SetDbValueDef($rsnew, $this->Pinjaman->CurrentValue, 0, $this->Pinjaman->ReadOnly);\n\n\t\t\t// LamaAngsuran\n\t\t\t$this->LamaAngsuran->SetDbValueDef($rsnew, $this->LamaAngsuran->CurrentValue, 0, $this->LamaAngsuran->ReadOnly);\n\n\t\t\t// Bunga\n\t\t\t$this->Bunga->SetDbValueDef($rsnew, $this->Bunga->CurrentValue, 0, $this->Bunga->ReadOnly);\n\n\t\t\t// Denda\n\t\t\t$this->Denda->SetDbValueDef($rsnew, $this->Denda->CurrentValue, 0, $this->Denda->ReadOnly);\n\n\t\t\t// DispensasiDenda\n\t\t\t$this->DispensasiDenda->SetDbValueDef($rsnew, $this->DispensasiDenda->CurrentValue, 0, $this->DispensasiDenda->ReadOnly);\n\n\t\t\t// AngsuranPokok\n\t\t\t$this->AngsuranPokok->SetDbValueDef($rsnew, $this->AngsuranPokok->CurrentValue, 0, $this->AngsuranPokok->ReadOnly);\n\n\t\t\t// AngsuranBunga\n\t\t\t$this->AngsuranBunga->SetDbValueDef($rsnew, $this->AngsuranBunga->CurrentValue, 0, $this->AngsuranBunga->ReadOnly);\n\n\t\t\t// AngsuranTotal\n\t\t\t$this->AngsuranTotal->SetDbValueDef($rsnew, $this->AngsuranTotal->CurrentValue, 0, $this->AngsuranTotal->ReadOnly);\n\n\t\t\t// NoKontrakRefTo\n\t\t\t$this->NoKontrakRefTo->SetDbValueDef($rsnew, $this->NoKontrakRefTo->CurrentValue, NULL, $this->NoKontrakRefTo->ReadOnly);\n\n\t\t\t// Call Row Updating event\n\t\t\t$bUpdateRow = $this->Row_Updating($rsold, $rsnew);\n\t\t\tif ($bUpdateRow) {\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\tif (count($rsnew) > 0)\n\t\t\t\t\t$EditRow = $this->Update($rsnew, \"\", $rsold);\n\t\t\t\telse\n\t\t\t\t\t$EditRow = TRUE; // No field to update\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($EditRow) {\n\t\t\t\t}\n\n\t\t\t\t// Update detail records\n\t\t\t\t$DetailTblVar = explode(\",\", $this->getCurrentDetailTable());\n\t\t\t\tif ($EditRow) {\n\t\t\t\t\tif (in_array(\"t04_angsuran\", $DetailTblVar) && $GLOBALS[\"t04_angsuran\"]->DetailEdit) {\n\t\t\t\t\t\tif (!isset($GLOBALS[\"t04_angsuran_grid\"])) $GLOBALS[\"t04_angsuran_grid\"] = new ct04_angsuran_grid(); // Get detail page object\n\t\t\t\t\t\t$Security->LoadCurrentUserLevel($this->ProjectID . \"t04_angsuran\"); // Load user level of detail table\n\t\t\t\t\t\t$EditRow = $GLOBALS[\"t04_angsuran_grid\"]->GridUpdate();\n\t\t\t\t\t\t$Security->LoadCurrentUserLevel($this->ProjectID . $this->TableName); // Restore user level of master table\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($EditRow) {\n\t\t\t\t\tif (in_array(\"t05_pinjamanjaminan\", $DetailTblVar) && $GLOBALS[\"t05_pinjamanjaminan\"]->DetailEdit) {\n\t\t\t\t\t\tif (!isset($GLOBALS[\"t05_pinjamanjaminan_grid\"])) $GLOBALS[\"t05_pinjamanjaminan_grid\"] = new ct05_pinjamanjaminan_grid(); // Get detail page object\n\t\t\t\t\t\t$Security->LoadCurrentUserLevel($this->ProjectID . \"t05_pinjamanjaminan\"); // Load user level of detail table\n\t\t\t\t\t\t$EditRow = $GLOBALS[\"t05_pinjamanjaminan_grid\"]->GridUpdate();\n\t\t\t\t\t\t$Security->LoadCurrentUserLevel($this->ProjectID . $this->TableName); // Restore user level of master table\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($EditRow) {\n\t\t\t\t\tif (in_array(\"t06_pinjamantitipan\", $DetailTblVar) && $GLOBALS[\"t06_pinjamantitipan\"]->DetailEdit) {\n\t\t\t\t\t\tif (!isset($GLOBALS[\"t06_pinjamantitipan_grid\"])) $GLOBALS[\"t06_pinjamantitipan_grid\"] = new ct06_pinjamantitipan_grid(); // Get detail page object\n\t\t\t\t\t\t$Security->LoadCurrentUserLevel($this->ProjectID . \"t06_pinjamantitipan\"); // Load user level of detail table\n\t\t\t\t\t\t$EditRow = $GLOBALS[\"t06_pinjamantitipan_grid\"]->GridUpdate();\n\t\t\t\t\t\t$Security->LoadCurrentUserLevel($this->ProjectID . $this->TableName); // Restore user level of master table\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Commit/Rollback transaction\n\t\t\t\tif ($this->getCurrentDetailTable() <> \"\") {\n\t\t\t\t\tif ($EditRow) {\n\t\t\t\t\t\t$conn->CommitTrans(); // Commit transaction\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$conn->RollbackTrans(); // Rollback transaction\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t\t// Use the message, do nothing\n\t\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->setFailureMessage($Language->Phrase(\"UpdateCancelled\"));\n\t\t\t\t}\n\t\t\t\t$EditRow = FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// Call Row_Updated event\n\t\tif ($EditRow)\n\t\t\t$this->Row_Updated($rsold, $rsnew);\n\t\t$rs->Close();\n\t\treturn $EditRow;\n\t}", "title": "" }, { "docid": "ee4a0ff8487930139c1a644cd2dca3d3", "score": "0.43211907", "text": "public function addTableRow($theEntries, $theRowParams = array()) {\n\n\t\t// use row params\n\t\tforeach ($theRowParams as $paramKey => $paramValue) {\n\t\t\tforeach ($theEntries as &$entryRow) {\n\t\t\t\tif (!array_key_exists($paramKey, $entryRow)) {\n\t\t\t\t\t$entryRow[$paramKey] = $paramValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// use column params\n\t\t$currentColumn = $this->tableParams['col_offset'];\n\t\tforeach ($theEntries as &$entryColumn) {\n\t\t\tif (array_key_exists($currentColumn, $this->tableParams['col_params'])) {\n\t\t\t\tforeach ($this->tableParams['col_params'][$currentColumn] as $paramKey => $paramValue) {\n\t\t\t\t\tif (!array_key_exists($paramKey, $entryColumn)) {\n\t\t\t\t\t\t$entryColumn[$paramKey] = $paramValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$currentColumn++;\n\t\t}\n\n\t\t// get current column\n\t\t$currentColumn = $this->tableParams['col_offset'];\n\n\t\t// print values\n\t\tforeach ($theEntries as $entry) {\n\n\t\t\tforeach ($entry as $entryKey => $entryValue) {\n\n\t\t\t\tswitch ($entryKey) {\n\n\t\t\t\t\tcase 'text':\n\t\t\t\t\t\t$this->xls->getActiveSheet()->setCellValueByColumnAndRow($currentColumn, $this->tableParams['current_row'], $entryValue);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'font-name':\n\t\t\t\t\t\t$this->xls->getActiveSheet()->getStyleByColumnAndRow($currentColumn, $this->tableParams['current_row'])->getFont()->setName($entryValue);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'font-size':\n\t\t\t\t\t\t$this->xls->getActiveSheet()->getStyleByColumnAndRow($currentColumn, $this->tableParams['current_row'])->getFont()->setSize($entryValue);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'font-weight':\n\t\t\t\t\t\tswitch ($entryValue) {\n\t\t\t\t\t\t\tcase 'normal':\n\t\t\t\t\t\t\tcase 'lighter':\n\t\t\t\t\t\t\t\t$this->xls->getActiveSheet()->getStyleByColumnAndRow($currentColumn, $this->tableParams['current_row'])->getFont()->setBold(false);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'bold':\n\t\t\t\t\t\t\tcase 'bolder':\n\t\t\t\t\t\t\t\t$this->xls->getActiveSheet()->getStyleByColumnAndRow($currentColumn, $this->tableParams['current_row'])->getFont()->setBold(true);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'font-style':\n\t\t\t\t\t\tswitch ($entryValue) {\n\t\t\t\t\t\t\tcase 'normal':\n\t\t\t\t\t\t\t\t$this->xls->getActiveSheet()->getStyleByColumnAndRow($currentColumn, $this->tableParams['current_row'])->getFont()->setItalic(false);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'italic':\n\t\t\t\t\t\t\tcase 'oblique':\n\t\t\t\t\t\t\t\t$this->xls->getActiveSheet()->getStyleByColumnAndRow($currentColumn, $this->tableParams['current_row'])->getFont()->setItalic(true);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'color':\n\t\t\t\t\t\t$this->xls->getActiveSheet()->getStyleByColumnAndRow($currentColumn, $this->tableParams['current_row'])->applyFromArray(array('font' => array('color' => array('rgb' => $entryValue))));\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'bg-color':\n\t\t\t\t\t\t$this->xls->getActiveSheet()->getStyleByColumnAndRow($currentColumn, $this->tableParams['current_row'])->applyFromArray(array('fill' => array('type' => PHPExcel_Style_Fill::FILL_SOLID, 'color' => array('rgb' => $entryValue))));\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'wrap':\n\t\t\t\t\t\tif ($entryValue == true) {\n\t\t\t\t\t\t\t$this->xls->getActiveSheet()->getStyle(sprintf('%1$s%2$d:%1$s%2$d', PHPExcel_Cell::stringFromColumnIndex($currentColumn), $this->tableParams['current_row']))->getAlignment()->setWrapText(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$currentColumn++;\n\t\t}\n\n\t\t$this->tableParams['current_row']++;\n\t\t$this->tableParams['row_count']++;\n\t\t$this->tableParams['col_count'] = max($this->tableParams['col_count'], count($theEntries));\n\t}", "title": "" }, { "docid": "a1c02aeafdd7706d19065b84e9904075", "score": "0.42923883", "text": "private function updateRunFontOnlineWithHttpInfo(Requests\\updateRunFontOnlineRequest $request)\n {\n $returnType = 'UpdateRunFontOnlineResponse';\n $this->_checkAuthToken();\n $req = $request->createRequest($this->config);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($req, $options);\n } catch (RequestException $e) {\n if ($e->getCode() == 401) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n else if ($e->getCode() < 200 || $e->getCode() > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $e->getCode(), $req->getUri()), $e->getCode(), null, null);\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $req->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $resp = $request->deserializeResponse($response);\n return [\n $resp,\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), 'UpdateRunFontOnlineResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "0e3656442dd19c09f1b7263704afdc6b", "score": "0.42804796", "text": "function wysiwyg_source_formater_update_rule($form, &$form_state) {\n // TODO\n}", "title": "" }, { "docid": "c5e18182e9488e743bf451a2ad531b3a", "score": "0.42795572", "text": "public static function format($row, $column = null, $serviceLocator = null)\n {\n return $row['id'] . FeeStatus::format($row);\n }", "title": "" }, { "docid": "80c33ab5bf7b88b9ba3f5d3a3247f7b4", "score": "0.42563054", "text": "public function update($table, $data, $format, $where, $where_format) {\n\t\t\tif ( empty( $table ) || empty( $data ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// Connect to the database\n\t\t\t$db = $this->connect();\n\t\t\t\n\t\t\t// Cast $data and $format to arrays\n\t\t\t$data = (array) $data;\n\t\t\t$format = (array) $format;\n\t\t\t\n\t\t\t// Build format array\n\t\t\t$format = implode('', $format); \n\t\t\t$format = str_replace('%', '', $format);\n\t\t\t$where_format = implode('', $where_format); \n\t\t\t$where_format = str_replace('%', '', $where_format);\n\t\t\t$format .= $where_format;\n\t\t\t\n\t\t\tlist( $fields, $placeholders, $values ) = $this->prep_query($data, 'update');\n\t\t\t\n\t\t\t//Format where clause\n\t\t\t$where_clause = '';\n\t\t\t$where_values = '';\n\t\t\t$count = 0;\n\t\t\t\n\t\t\tforeach ( $where as $field => $value ) {\n\t\t\t\tif ( $count > 0 ) {\n\t\t\t\t\t$where_clause .= ' AND ';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$where_clause .= $field . '=?';\n\t\t\t\t$where_values[] = $value;\n\t\t\t\t\n\t\t\t\t$count++;\n\t\t\t}\n\n\t\t\t// Prepend $format onto $values\n\t\t\tarray_unshift($values, $format);\n\t\t\t$values = array_merge($values, $where_values);\n\n\t\t\t// Prepary our query for binding\n\t\t\t$stmt = $db->prepare(\"UPDATE {$table} SET {$placeholders} WHERE {$where_clause}\");\n\t\t\t\n\t\t\t// Dynamically bind values\n\t\t\tcall_user_func_array( array( $stmt, 'bind_param'), $this->ref_values($values));\n\t\t\t\n\t\t\t// Execute the query\n\t\t\t$stmt->execute(); \n\t\t\t\n\t\t\t// Check for successful insertion\n\t\t\tif ( $stmt->affected_rows ) { \n\t\t\t\treturn true; \n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "f103fa6c1941ce15041dcc672e0363ab", "score": "0.4244192", "text": "public function update(User $user, Productstyle $productstyle)\n {\n if ( $user->can('update product style') ) {\n return true;\n }\n }", "title": "" }, { "docid": "faf75f9b281dde956b60c913249a40d5", "score": "0.42344692", "text": "private function renderTableOnlineWithHttpInfo(Requests\\renderTableOnlineRequest $request)\n {\n $returnType = '\\SplFileObject';\n $this->_checkAuthToken();\n $req = $request->createRequest($this->config);\n\n try {\n $options = $this->_createHttpClientOption();\n try {\n $response = $this->client->send($req, $options);\n } catch (RequestException $e) {\n if ($e->getCode() == 401) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n else if ($e->getCode() < 200 || $e->getCode() > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $e->getCode(), $req->getUri()), $e->getCode(), null, null);\n }\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $req->getUri()), $statusCode, $response->getHeaders(), $response->getBody());\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($statusCode, $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize($e->getResponseBody(), '\\SplFileObject', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "a6fa791764c73a20217de65f767ddee7", "score": "0.42325896", "text": "public function update(array $row)\n {\n //get query builder\n $qb = $this->connection->createQueryBuilder();\n\n //set the table\n $qb->update($this->table);\n\n //set query params\n foreach ($row as $colName => $value) {\n if ($colName === 'id') {\n $qb->where('id = :id');\n $qb->setParameter('id', $value);\n } else {\n $qb->set($colName, ':' . $colName);\n $qb->setParameter($colName, $value);\n }\n }\n\n //return query results\n return $qb->execute();\n }", "title": "" }, { "docid": "006accfcd2a25b58ca0380ca6c72b993", "score": "0.4226624", "text": "function wp_plugin_update_row($file, $plugin_data) {\r\n\t\t\r\n\t\tglobal $arrPluginCount;\r\n\r\n\t\t//load plugin options\r\n\t\t$options_arr = get_option('pui_params');\r\n\t\t$pui_display_msg = $options_arr[\"pui_display_msg\"];\r\n\t\t\r\n\t\t$current = get_transient('update_plugins');\r\n\t\tif ( !isset($current->response[ $file ]) )\r\n\t\t\treturn false;\r\n\r\n\t\tif ( isset($this->ignores[$file]) ) {\r\n\t\t\t$r = $current->response[ $file ];\r\n\t\t\t$plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array());\r\n\t\t\t$plugin_name = wp_kses( $plugin_data['Name'], $plugins_allowedtags );\r\n\r\n\t\t\t$details_url = admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&TB_iframe=true&width=600&height=800');\r\n\t\t\t\r\n\t\t\t$arrPluginCount[] = $plugin_name;\r\n\r\n\t\t\t//check if option is set to show update notices\r\n\t\t\tIf ($pui_display_msg != \"on\") {\r\n\t\t\t\techo '<tr class=\"plugin-update-tr\"><td colspan=\"3\" class=\"plugin-update\"><div class=\"update-message-ignore\">';\r\n\t\t\t\tprintf( __('The ability to update this plugin by automatic means has been disabled by the site administrator. However, it is reported that there is a new version of %1$s available. <a href=\"%2$s\" class=\"thickbox\" title=\"%3$s\">View version %4$s Details</a>.', 'plugin-update-ignore'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );\r\n\t\t\t}\r\n\r\n\t\t\tdo_action( \"in_plugin_update_message-$file\", $plugin_data, $r );\r\n\r\n\t\t\techo '</div></td></tr>';\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t// If we are using WP < 2.9 we are replacing the after_plugin_row action for all plugins, so call the built in WP function, to keep from showing our custom message.\r\n\t\t\twp_plugin_update_row($file, $plugin_data);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "33bdb283eabdf5f460b4012ae22112bf", "score": "0.42148897", "text": "public function update($table, $data, $format, $where, $where_format) {\n\t\tif ( empty( $table ) || empty( $data ) ) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Connect to the database\n\t\t$db = $this->connect();\n\t\t\n\t\t// Cast $data and $format to arrays\n\t\t$data = (array) $data;\n\t\t$format = (array) $format;\n\t\t\n\t\t// Build format array\n\t\t$format = implode('', $format); \n\t\t$format = str_replace('%', '', $format);\n\t\t$where_format = implode('', $where_format); \n\t\t$where_format = str_replace('%', '', $where_format);\n\t\t$format .= $where_format;\n\t\t\n\t\tlist( $fields, $placeholders, $values ) = $this->prep_query($data, 'update');\n\t\t\n\t\t//Format where clause\n\t\t$where_clause = '';\n\t\t$where_values = '';\n\t\t$count = 0;\n\t\t\n\t\tforeach ( $where as $field => $value ) {\n\t\t\tif ( $count > 0 ) {\n\t\t\t\t$where_clause .= ' AND ';\n\t\t\t}\n\t\t\t\n\t\t\t$where_clause .= $field . '=?';\n\t\t\t$where_values[] = $value;\n\t\t\t\n\t\t\t$count++;\n\t\t}\n\n\t\t// Prepend $format onto $values\n\t\tarray_unshift($values, $format);\n\t\t$values = array_merge($values, $where_values);\n\n\t\t// Prepary our query for binding\n\t\t$stmt = $db->prepare(\"UPDATE {$table} SET {$placeholders} WHERE {$where_clause}\");\n\t\t\n\t\tif(!$stmt) {\n\t\t\t$this->error[] = 'Error Prepare: ' . $db->error;\n\t\t\treturn false;\n\t\t}\n\n\t\t// Dynamically bind values\n\t\tcall_user_func_array( array( $stmt, 'bind_param'), $this->ref_values($values));\n\t\t\n\t\t// Execute the query\n\t\t$stmt->execute();\n\t\t\n\t\t// Check for successful insertion\n\t\tif ( $stmt->affected_rows ) {\n\t\t\treturn true;\n\t\t}\n\t\tif(empty($this->error)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "cd0c45ea2746b1974596025a5ec548e0", "score": "0.42124262", "text": "function SetRowAttr($row, wxGridCellAttr &$attr){}", "title": "" }, { "docid": "a9efc0826cd88d0d8a67e4aedfd90b76", "score": "0.41973352", "text": "protected function _formatPieceTable($format, $edition, $artworks = null) {\n\t\tif (!is_null($artworks)) {\n\t\t\t$caption = '';\n\t\t\t$this->_View->set('caption', $caption);\n\t\t\treturn;\n\t\t}\n\n\t\t// detecting when we're fully qualified to the format level has been uncertain.\n\t\t// controller() can't be relied on because of redirecting that happens\n\t\t$this->_mainModeFormatPieceTable($format, $edition);\n\t}", "title": "" }, { "docid": "ac26e5b440e8fbb9156f53e7d2d3049b", "score": "0.41894224", "text": "public function addRow(array $dataRow, $style = 0)\n {\n if (!is_int($style)) {\n $style = $this->addStyle($style);\n }\n\n $this->spl->fwrite(RowHelper::buildRow($dataRow, $style));\n }", "title": "" }, { "docid": "ef0d640e93e931399839e764802cbd66", "score": "0.41870502", "text": "public function update(TimetableRequest $request, Timetable $timetable)\n {\n $timetable->update($request->only($this->attributes())+\n [\n 'saturday' => request('saturday') == 'Enable' ? 'Enable':'',\n 'sunday' => request('sunday') == 'Enable' ? 'Enable':'',\n 'monday' => request('monday') == 'Enable' ? 'Enable':'',\n 'tuesday' => request('tuesday') == 'Enable' ? 'Enable':'',\n 'wednesday' => request('wednesday') == 'Enable' ? 'Enable':'',\n 'thursday' => request('thursday') == 'Enable' ? 'Enable':'',\n 'friday' => request('friday') == 'Enable' ? 'Enable':'',\n ]);\n toast(trans('msg.updated_successfully'),'success');\n return redirect()->route('timetables.index');\n }", "title": "" }, { "docid": "e438dd59df686a67766bd61d8537d7e4", "score": "0.41850716", "text": "public function update( $row_id, $data ) {\n global $wpdb;\n\n $row_id = absint( $row_id );\n\n if ( empty( $row_id ) ) {\n return false;\n }\n\n // Initialise column format array\n $column_formats = $this->get_column_formats();\n\n // Force fields to lower case\n $data = array_change_key_case( $data, CASE_LOWER );\n\n // White list columns\n $data = array_intersect_key( $data, $column_formats );\n\n // Reorder $column_formats to match the order of columns given in $data\n $data_keys = array_keys( $data );\n $column_formats = array_merge( array_flip( $data_keys ), $column_formats );\n $column_formats = array_intersect_key( $column_formats, array_flip( $data_keys ) );\n\n // Perform the update\n $update_success = $wpdb->update( $this->table_name, $data, array( $this->primary_key => $row_id ), $column_formats, array( '%d' ) );\n\n if ( $update_success === false ) {\n return false;\n }\n\n // Return the updated row's ID\n return $row_id;\n }", "title": "" }, { "docid": "8b2ce47fa647612a586331b008c993be", "score": "0.4177895", "text": "private function updateStyleOnlineAsyncWithHttpInfo(Requests\\updateStyleOnlineRequest $request) \n {\n $returnType = 'UpdateStyleOnlineResponse';\n $request = $request->createRequest($this->config);\n\n return $this->client\n ->sendAsync($request, $this->_createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject' || $returnType === 'FILES_COLLECTION') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n if ($this->config->getDebug()) {\n $this->_writeResponseLog($response->getStatusCode(), $response->getHeaders(), ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()));\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, $response->getHeaders()),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) { \n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n\n if ($exception instanceof RepeatRequestException) {\n $this->_requestToken();\n throw new RepeatRequestException(\"Request must be retried\", 401, null, null);\n }\n\n throw new ApiException(\n sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "a42e8b9e511a65af7c15551dfb722ddb", "score": "0.41753915", "text": "public function updateTablePropertiesOnlineAsync(Requests\\updateTablePropertiesOnlineRequest $request) \n {\n return $this->updateTablePropertiesOnlineAsyncWithHttpInfo($request)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "59e05cd63a6b53984f58471fa9eea371", "score": "0.41639122", "text": "public function modify_row(&$p_row)\n {\n global $g_dirs;\n\n $l_empty_value = isys_tenantsettings::get('gui.empty_value', '-');\n\n // Assigned net.\n if ($p_row['isys_catg_ip_list__isys_cats_net_ip_addresses_list__id'] > 0)\n {\n /** @var isys_cmdb_dao_category_s_net_ip_addresses $l_cats_net_ip_addresses_dao */\n $l_cats_net_ip_addresses_dao = isys_cmdb_dao_category_s_net_ip_addresses::instance($this->get_database_component());\n\n $l_row = $l_cats_net_ip_addresses_dao->get_data($p_row['isys_catg_ip_list__isys_cats_net_ip_addresses_list__id'])\n ->get_row();\n\n if ($l_row['isys_cats_net_ip_addresses_list__isys_obj__id'] > 0)\n {\n $l_row2 = $l_cats_net_ip_addresses_dao->get_data_by_object($l_row['isys_cats_net_ip_addresses_list__isys_obj__id'])\n ->get_row();\n\n $p_row['isys_catg_ip_list__assigned_net'] = '<a href=\"' . isys_helper_link::create_url(\n [C__CMDB__GET__OBJECT => $l_row['isys_cats_net_ip_addresses_list__isys_obj__id']]\n ) . '\" >' . $l_row2['isys_obj__title'] . '</a>';\n } // if\n } // if\n\n $p_row['isys_catg_ip_list__hostname'] = $p_row['isys_catg_ip_list__hostname'] ?: $l_empty_value;\n\n // \"Yes\" / \"No\" for the primary field.\n $p_row['isys_catg_ip_list__primary'] = ($p_row['isys_catg_ip_list__primary'] == 0) ? '<img src=\"' . $g_dirs['images'] . 'icons/silk/bullet_red.png\" class=\"vam mr5\" /><span class=\"vam red\">' . _L(\n 'LC__UNIVERSAL__NO'\n ) . '</span>' : '<img src=\"' . $g_dirs['images'] . 'icons/silk/bullet_green.png\" class=\"vam mr5\" /><span class=\"vam green\">' . _L(\n 'LC__UNIVERSAL__YES'\n ) . '</span>';\n\n // If we display an IPv6 address, we shorten the output.\n if ($p_row['isys_net_type__id'] == C__CATS_NET_TYPE__IPV6)\n {\n $p_row['ip_assignment'] = _L($p_row['isys_ipv6_assignment__title']);\n $p_row['isys_cats_net_ip_addresses_list__title'] = Ip::validate_ipv6($p_row['isys_cats_net_ip_addresses_list__title'], true);\n if (empty($p_row['isys_cats_net_ip_addresses_list__title']))\n {\n $p_row['isys_cats_net_ip_addresses_list__title'] = $l_empty_value;\n } // if\n }\n else\n {\n $p_row['ip_assignment'] = _L($p_row['isys_ip_assignment__title']);\n if (empty($p_row['isys_cats_net_ip_addresses_list__title']))\n {\n $p_row['isys_cats_net_ip_addresses_list__title'] = $l_empty_value;\n } // if\n } // if\n\n /** @var isys_cmdb_dao_category_g_ip $l_dao_ip */\n $l_dao_ip = isys_cmdb_dao_category_g_ip::instance($this->get_database_component());\n\n // Retrieve domains.\n $l_res_domains = $l_dao_ip->get_assigned_dns_domain(null, $p_row['isys_catg_ip_list__id']);\n\n if (count($l_res_domains))\n {\n $l_domain_titles = [];\n\n while ($l_row_domain = $l_res_domains->get_row())\n {\n // Add title\n $l_domain_titles[] = $l_row_domain['isys_net_dns_domain__title'];\n } // while\n\n // Build list of dns domains\n $p_row['dns_domains'] = $l_domain_titles;\n }\n else\n {\n $p_row['dns_domains'] = $l_empty_value;\n } // if\n }", "title": "" }, { "docid": "a2fee19100e77de30f400618aaaf5bf6", "score": "0.41623467", "text": "public function update($row)\n {\n try {\n\n $initial_row = $row;\n $product = Product::where('SKU', '=', $row['SKU'])->firstOrFail();\n unset($row['SKU']);\n\n $stock = $product->Stock()->get();\n if (sizeof($stock)==0) {\n $stock = new Stock();\n }else{\n $stock = $stock[0];\n }\n\n foreach ($row as $key => $value) {\n $stock[$key] = $value;\n }\n\n $stock->product_id = $product->id;\n $stock->save();\n $process = ['1', 'Stock Updated, Product partner found'];\n return $process;\n\n } catch (Exception $e) {\n Log::error('Stock not saved. SKU: ' . $initial_row['SKU'] . ' Error: ' . $e);\n $process = ['2', 'Stock not Updated, Product partner not found'];\n return $process;\n }\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "a58e40c38eaec732c59ca7f5febe3ff5", "score": "0.0", "text": "public function run()\n {\n DB::table('areas')->truncate();\n $data = collect(json_decode('[{\"code\":\"110101\",\"name\":\"东城区\",\"cityCode\":\"1101\",\"provinceCode\":\"11\"},{\"code\":\"110102\",\"name\":\"西城区\",\"cityCode\":\"1101\",\"provinceCode\":\"11\"},{\"code\":\"110105\",\"name\":\"朝阳区\",\"cityCode\":\"1101\",\"provinceCode\":\"11\"},{\"code\":\"110106\",\"name\":\"丰台区\",\"cityCode\":\"1101\",\"provinceCode\":\"11\"},{\"code\":\"110107\",\"name\":\"石景山区\",\"cityCode\":\"1101\",\"provinceCode\":\"11\"},{\"code\":\"110108\",\"name\":\"海淀区\",\"cityCode\":\"1101\",\"provinceCode\":\"11\"},{\"code\":\"110109\",\"name\":\"门头沟区\",\"cityCode\":\"1101\",\"provinceCode\":\"11\"},{\"code\":\"110111\",\"name\":\"房山区\",\"cityCode\":\"1101\",\"provinceCode\":\"11\"},{\"code\":\"110112\",\"name\":\"通州区\",\"cityCode\":\"1101\",\"provinceCode\":\"11\"},{\"code\":\"110113\",\"name\":\"顺义区\",\"cityCode\":\"1101\",\"provinceCode\":\"11\"},{\"code\":\"110114\",\"name\":\"昌平区\",\"cityCode\":\"1101\",\"provinceCode\":\"11\"},{\"code\":\"110115\",\"name\":\"大兴区\",\"cityCode\":\"1101\",\"provinceCode\":\"11\"},{\"code\":\"110116\",\"name\":\"怀柔区\",\"cityCode\":\"1101\",\"provinceCode\":\"11\"},{\"code\":\"110117\",\"name\":\"平谷区\",\"cityCode\":\"1101\",\"provinceCode\":\"11\"},{\"code\":\"110118\",\"name\":\"密云区\",\"cityCode\":\"1101\",\"provinceCode\":\"11\"},{\"code\":\"110119\",\"name\":\"延庆区\",\"cityCode\":\"1101\",\"provinceCode\":\"11\"},{\"code\":\"120101\",\"name\":\"和平区\",\"cityCode\":\"1201\",\"provinceCode\":\"12\"},{\"code\":\"120102\",\"name\":\"河东区\",\"cityCode\":\"1201\",\"provinceCode\":\"12\"},{\"code\":\"120103\",\"name\":\"河西区\",\"cityCode\":\"1201\",\"provinceCode\":\"12\"},{\"code\":\"120104\",\"name\":\"南开区\",\"cityCode\":\"1201\",\"provinceCode\":\"12\"},{\"code\":\"120105\",\"name\":\"河北区\",\"cityCode\":\"1201\",\"provinceCode\":\"12\"},{\"code\":\"120106\",\"name\":\"红桥区\",\"cityCode\":\"1201\",\"provinceCode\":\"12\"},{\"code\":\"120110\",\"name\":\"东丽区\",\"cityCode\":\"1201\",\"provinceCode\":\"12\"},{\"code\":\"120111\",\"name\":\"西青区\",\"cityCode\":\"1201\",\"provinceCode\":\"12\"},{\"code\":\"120112\",\"name\":\"津南区\",\"cityCode\":\"1201\",\"provinceCode\":\"12\"},{\"code\":\"120113\",\"name\":\"北辰区\",\"cityCode\":\"1201\",\"provinceCode\":\"12\"},{\"code\":\"120114\",\"name\":\"武清区\",\"cityCode\":\"1201\",\"provinceCode\":\"12\"},{\"code\":\"120115\",\"name\":\"宝坻区\",\"cityCode\":\"1201\",\"provinceCode\":\"12\"},{\"code\":\"120116\",\"name\":\"滨海新区\",\"cityCode\":\"1201\",\"provinceCode\":\"12\"},{\"code\":\"120117\",\"name\":\"宁河区\",\"cityCode\":\"1201\",\"provinceCode\":\"12\"},{\"code\":\"120118\",\"name\":\"静海区\",\"cityCode\":\"1201\",\"provinceCode\":\"12\"},{\"code\":\"120119\",\"name\":\"蓟州区\",\"cityCode\":\"1201\",\"provinceCode\":\"12\"},{\"code\":\"130102\",\"name\":\"长安区\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130104\",\"name\":\"桥西区\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130105\",\"name\":\"新华区\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130107\",\"name\":\"井陉矿区\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130108\",\"name\":\"裕华区\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130109\",\"name\":\"藁城区\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130110\",\"name\":\"鹿泉区\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130111\",\"name\":\"栾城区\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130121\",\"name\":\"井陉县\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130123\",\"name\":\"正定县\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130125\",\"name\":\"行唐县\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130126\",\"name\":\"灵寿县\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130127\",\"name\":\"高邑县\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130128\",\"name\":\"深泽县\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130129\",\"name\":\"赞皇县\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130130\",\"name\":\"无极县\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130131\",\"name\":\"平山县\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130132\",\"name\":\"元氏县\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130133\",\"name\":\"赵县\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130171\",\"name\":\"石家庄高新技术产业开发区\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130172\",\"name\":\"石家庄循环化工园区\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130181\",\"name\":\"辛集市\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130183\",\"name\":\"晋州市\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130184\",\"name\":\"新乐市\",\"cityCode\":\"1301\",\"provinceCode\":\"13\"},{\"code\":\"130202\",\"name\":\"路南区\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130203\",\"name\":\"路北区\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130204\",\"name\":\"古冶区\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130205\",\"name\":\"开平区\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130207\",\"name\":\"丰南区\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130208\",\"name\":\"丰润区\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130209\",\"name\":\"曹妃甸区\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130223\",\"name\":\"滦县\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130224\",\"name\":\"滦南县\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130225\",\"name\":\"乐亭县\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130227\",\"name\":\"迁西县\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130229\",\"name\":\"玉田县\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130271\",\"name\":\"唐山市芦台经济技术开发区\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130272\",\"name\":\"唐山市汉沽管理区\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130273\",\"name\":\"唐山高新技术产业开发区\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130274\",\"name\":\"河北唐山海港经济开发区\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130281\",\"name\":\"遵化市\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130283\",\"name\":\"迁安市\",\"cityCode\":\"1302\",\"provinceCode\":\"13\"},{\"code\":\"130302\",\"name\":\"海港区\",\"cityCode\":\"1303\",\"provinceCode\":\"13\"},{\"code\":\"130303\",\"name\":\"山海关区\",\"cityCode\":\"1303\",\"provinceCode\":\"13\"},{\"code\":\"130304\",\"name\":\"北戴河区\",\"cityCode\":\"1303\",\"provinceCode\":\"13\"},{\"code\":\"130306\",\"name\":\"抚宁区\",\"cityCode\":\"1303\",\"provinceCode\":\"13\"},{\"code\":\"130321\",\"name\":\"青龙满族自治县\",\"cityCode\":\"1303\",\"provinceCode\":\"13\"},{\"code\":\"130322\",\"name\":\"昌黎县\",\"cityCode\":\"1303\",\"provinceCode\":\"13\"},{\"code\":\"130324\",\"name\":\"卢龙县\",\"cityCode\":\"1303\",\"provinceCode\":\"13\"},{\"code\":\"130371\",\"name\":\"秦皇岛市经济技术开发区\",\"cityCode\":\"1303\",\"provinceCode\":\"13\"},{\"code\":\"130372\",\"name\":\"北戴河新区\",\"cityCode\":\"1303\",\"provinceCode\":\"13\"},{\"code\":\"130402\",\"name\":\"邯山区\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130403\",\"name\":\"丛台区\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130404\",\"name\":\"复兴区\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130406\",\"name\":\"峰峰矿区\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130407\",\"name\":\"肥乡区\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130408\",\"name\":\"永年区\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130423\",\"name\":\"临漳县\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130424\",\"name\":\"成安县\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130425\",\"name\":\"大名县\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130426\",\"name\":\"涉县\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130427\",\"name\":\"磁县\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130430\",\"name\":\"邱县\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130431\",\"name\":\"鸡泽县\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130432\",\"name\":\"广平县\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130433\",\"name\":\"馆陶县\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130434\",\"name\":\"魏县\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130435\",\"name\":\"曲周县\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130471\",\"name\":\"邯郸经济技术开发区\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130473\",\"name\":\"邯郸冀南新区\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130481\",\"name\":\"武安市\",\"cityCode\":\"1304\",\"provinceCode\":\"13\"},{\"code\":\"130502\",\"name\":\"桥东区\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130503\",\"name\":\"桥西区\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130521\",\"name\":\"邢台县\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130522\",\"name\":\"临城县\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130523\",\"name\":\"内丘县\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130524\",\"name\":\"柏乡县\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130525\",\"name\":\"隆尧县\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130526\",\"name\":\"任县\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130527\",\"name\":\"南和县\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130528\",\"name\":\"宁晋县\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130529\",\"name\":\"巨鹿县\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130530\",\"name\":\"新河县\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130531\",\"name\":\"广宗县\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130532\",\"name\":\"平乡县\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130533\",\"name\":\"威县\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130534\",\"name\":\"清河县\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130535\",\"name\":\"临西县\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130571\",\"name\":\"河北邢台经济开发区\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130581\",\"name\":\"南宫市\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130582\",\"name\":\"沙河市\",\"cityCode\":\"1305\",\"provinceCode\":\"13\"},{\"code\":\"130602\",\"name\":\"竞秀区\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130606\",\"name\":\"莲池区\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130607\",\"name\":\"满城区\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130608\",\"name\":\"清苑区\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130609\",\"name\":\"徐水区\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130623\",\"name\":\"涞水县\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130624\",\"name\":\"阜平县\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130626\",\"name\":\"定兴县\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130627\",\"name\":\"唐县\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130628\",\"name\":\"高阳县\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130629\",\"name\":\"容城县\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130630\",\"name\":\"涞源县\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130631\",\"name\":\"望都县\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130632\",\"name\":\"安新县\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130633\",\"name\":\"易县\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130634\",\"name\":\"曲阳县\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130635\",\"name\":\"蠡县\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130636\",\"name\":\"顺平县\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130637\",\"name\":\"博野县\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130638\",\"name\":\"雄县\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130671\",\"name\":\"保定高新技术产业开发区\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130672\",\"name\":\"保定白沟新城\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130681\",\"name\":\"涿州市\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130682\",\"name\":\"定州市\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130683\",\"name\":\"安国市\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130684\",\"name\":\"高碑店市\",\"cityCode\":\"1306\",\"provinceCode\":\"13\"},{\"code\":\"130702\",\"name\":\"桥东区\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130703\",\"name\":\"桥西区\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130705\",\"name\":\"宣化区\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130706\",\"name\":\"下花园区\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130708\",\"name\":\"万全区\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130709\",\"name\":\"崇礼区\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130722\",\"name\":\"张北县\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130723\",\"name\":\"康保县\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130724\",\"name\":\"沽源县\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130725\",\"name\":\"尚义县\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130726\",\"name\":\"蔚县\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130727\",\"name\":\"阳原县\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130728\",\"name\":\"怀安县\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130730\",\"name\":\"怀来县\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130731\",\"name\":\"涿鹿县\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130732\",\"name\":\"赤城县\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130771\",\"name\":\"张家口市高新技术产业开发区\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130772\",\"name\":\"张家口市察北管理区\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130773\",\"name\":\"张家口市塞北管理区\",\"cityCode\":\"1307\",\"provinceCode\":\"13\"},{\"code\":\"130802\",\"name\":\"双桥区\",\"cityCode\":\"1308\",\"provinceCode\":\"13\"},{\"code\":\"130803\",\"name\":\"双滦区\",\"cityCode\":\"1308\",\"provinceCode\":\"13\"},{\"code\":\"130804\",\"name\":\"鹰手营子矿区\",\"cityCode\":\"1308\",\"provinceCode\":\"13\"},{\"code\":\"130821\",\"name\":\"承德县\",\"cityCode\":\"1308\",\"provinceCode\":\"13\"},{\"code\":\"130822\",\"name\":\"兴隆县\",\"cityCode\":\"1308\",\"provinceCode\":\"13\"},{\"code\":\"130824\",\"name\":\"滦平县\",\"cityCode\":\"1308\",\"provinceCode\":\"13\"},{\"code\":\"130825\",\"name\":\"隆化县\",\"cityCode\":\"1308\",\"provinceCode\":\"13\"},{\"code\":\"130826\",\"name\":\"丰宁满族自治县\",\"cityCode\":\"1308\",\"provinceCode\":\"13\"},{\"code\":\"130827\",\"name\":\"宽城满族自治县\",\"cityCode\":\"1308\",\"provinceCode\":\"13\"},{\"code\":\"130828\",\"name\":\"围场满族蒙古族自治县\",\"cityCode\":\"1308\",\"provinceCode\":\"13\"},{\"code\":\"130871\",\"name\":\"承德高新技术产业开发区\",\"cityCode\":\"1308\",\"provinceCode\":\"13\"},{\"code\":\"130881\",\"name\":\"平泉市\",\"cityCode\":\"1308\",\"provinceCode\":\"13\"},{\"code\":\"130902\",\"name\":\"新华区\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130903\",\"name\":\"运河区\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130921\",\"name\":\"沧县\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130922\",\"name\":\"青县\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130923\",\"name\":\"东光县\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130924\",\"name\":\"海兴县\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130925\",\"name\":\"盐山县\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130926\",\"name\":\"肃宁县\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130927\",\"name\":\"南皮县\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130928\",\"name\":\"吴桥县\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130929\",\"name\":\"献县\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130930\",\"name\":\"孟村回族自治县\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130971\",\"name\":\"河北沧州经济开发区\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130972\",\"name\":\"沧州高新技术产业开发区\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130973\",\"name\":\"沧州渤海新区\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130981\",\"name\":\"泊头市\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130982\",\"name\":\"任丘市\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130983\",\"name\":\"黄骅市\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"130984\",\"name\":\"河间市\",\"cityCode\":\"1309\",\"provinceCode\":\"13\"},{\"code\":\"131002\",\"name\":\"安次区\",\"cityCode\":\"1310\",\"provinceCode\":\"13\"},{\"code\":\"131003\",\"name\":\"广阳区\",\"cityCode\":\"1310\",\"provinceCode\":\"13\"},{\"code\":\"131022\",\"name\":\"固安县\",\"cityCode\":\"1310\",\"provinceCode\":\"13\"},{\"code\":\"131023\",\"name\":\"永清县\",\"cityCode\":\"1310\",\"provinceCode\":\"13\"},{\"code\":\"131024\",\"name\":\"香河县\",\"cityCode\":\"1310\",\"provinceCode\":\"13\"},{\"code\":\"131025\",\"name\":\"大城县\",\"cityCode\":\"1310\",\"provinceCode\":\"13\"},{\"code\":\"131026\",\"name\":\"文安县\",\"cityCode\":\"1310\",\"provinceCode\":\"13\"},{\"code\":\"131028\",\"name\":\"大厂回族自治县\",\"cityCode\":\"1310\",\"provinceCode\":\"13\"},{\"code\":\"131071\",\"name\":\"廊坊经济技术开发区\",\"cityCode\":\"1310\",\"provinceCode\":\"13\"},{\"code\":\"131081\",\"name\":\"霸州市\",\"cityCode\":\"1310\",\"provinceCode\":\"13\"},{\"code\":\"131082\",\"name\":\"三河市\",\"cityCode\":\"1310\",\"provinceCode\":\"13\"},{\"code\":\"131102\",\"name\":\"桃城区\",\"cityCode\":\"1311\",\"provinceCode\":\"13\"},{\"code\":\"131103\",\"name\":\"冀州区\",\"cityCode\":\"1311\",\"provinceCode\":\"13\"},{\"code\":\"131121\",\"name\":\"枣强县\",\"cityCode\":\"1311\",\"provinceCode\":\"13\"},{\"code\":\"131122\",\"name\":\"武邑县\",\"cityCode\":\"1311\",\"provinceCode\":\"13\"},{\"code\":\"131123\",\"name\":\"武强县\",\"cityCode\":\"1311\",\"provinceCode\":\"13\"},{\"code\":\"131124\",\"name\":\"饶阳县\",\"cityCode\":\"1311\",\"provinceCode\":\"13\"},{\"code\":\"131125\",\"name\":\"安平县\",\"cityCode\":\"1311\",\"provinceCode\":\"13\"},{\"code\":\"131126\",\"name\":\"故城县\",\"cityCode\":\"1311\",\"provinceCode\":\"13\"},{\"code\":\"131127\",\"name\":\"景县\",\"cityCode\":\"1311\",\"provinceCode\":\"13\"},{\"code\":\"131128\",\"name\":\"阜城县\",\"cityCode\":\"1311\",\"provinceCode\":\"13\"},{\"code\":\"131171\",\"name\":\"河北衡水经济开发区\",\"cityCode\":\"1311\",\"provinceCode\":\"13\"},{\"code\":\"131172\",\"name\":\"衡水滨湖新区\",\"cityCode\":\"1311\",\"provinceCode\":\"13\"},{\"code\":\"131182\",\"name\":\"深州市\",\"cityCode\":\"1311\",\"provinceCode\":\"13\"},{\"code\":\"140105\",\"name\":\"小店区\",\"cityCode\":\"1401\",\"provinceCode\":\"14\"},{\"code\":\"140106\",\"name\":\"迎泽区\",\"cityCode\":\"1401\",\"provinceCode\":\"14\"},{\"code\":\"140107\",\"name\":\"杏花岭区\",\"cityCode\":\"1401\",\"provinceCode\":\"14\"},{\"code\":\"140108\",\"name\":\"尖草坪区\",\"cityCode\":\"1401\",\"provinceCode\":\"14\"},{\"code\":\"140109\",\"name\":\"万柏林区\",\"cityCode\":\"1401\",\"provinceCode\":\"14\"},{\"code\":\"140110\",\"name\":\"晋源区\",\"cityCode\":\"1401\",\"provinceCode\":\"14\"},{\"code\":\"140121\",\"name\":\"清徐县\",\"cityCode\":\"1401\",\"provinceCode\":\"14\"},{\"code\":\"140122\",\"name\":\"阳曲县\",\"cityCode\":\"1401\",\"provinceCode\":\"14\"},{\"code\":\"140123\",\"name\":\"娄烦县\",\"cityCode\":\"1401\",\"provinceCode\":\"14\"},{\"code\":\"140171\",\"name\":\"山西转型综合改革示范区\",\"cityCode\":\"1401\",\"provinceCode\":\"14\"},{\"code\":\"140181\",\"name\":\"古交市\",\"cityCode\":\"1401\",\"provinceCode\":\"14\"},{\"code\":\"140202\",\"name\":\"城区\",\"cityCode\":\"1402\",\"provinceCode\":\"14\"},{\"code\":\"140203\",\"name\":\"矿区\",\"cityCode\":\"1402\",\"provinceCode\":\"14\"},{\"code\":\"140211\",\"name\":\"南郊区\",\"cityCode\":\"1402\",\"provinceCode\":\"14\"},{\"code\":\"140212\",\"name\":\"新荣区\",\"cityCode\":\"1402\",\"provinceCode\":\"14\"},{\"code\":\"140221\",\"name\":\"阳高县\",\"cityCode\":\"1402\",\"provinceCode\":\"14\"},{\"code\":\"140222\",\"name\":\"天镇县\",\"cityCode\":\"1402\",\"provinceCode\":\"14\"},{\"code\":\"140223\",\"name\":\"广灵县\",\"cityCode\":\"1402\",\"provinceCode\":\"14\"},{\"code\":\"140224\",\"name\":\"灵丘县\",\"cityCode\":\"1402\",\"provinceCode\":\"14\"},{\"code\":\"140225\",\"name\":\"浑源县\",\"cityCode\":\"1402\",\"provinceCode\":\"14\"},{\"code\":\"140226\",\"name\":\"左云县\",\"cityCode\":\"1402\",\"provinceCode\":\"14\"},{\"code\":\"140227\",\"name\":\"大同县\",\"cityCode\":\"1402\",\"provinceCode\":\"14\"},{\"code\":\"140271\",\"name\":\"山西大同经济开发区\",\"cityCode\":\"1402\",\"provinceCode\":\"14\"},{\"code\":\"140302\",\"name\":\"城区\",\"cityCode\":\"1403\",\"provinceCode\":\"14\"},{\"code\":\"140303\",\"name\":\"矿区\",\"cityCode\":\"1403\",\"provinceCode\":\"14\"},{\"code\":\"140311\",\"name\":\"郊区\",\"cityCode\":\"1403\",\"provinceCode\":\"14\"},{\"code\":\"140321\",\"name\":\"平定县\",\"cityCode\":\"1403\",\"provinceCode\":\"14\"},{\"code\":\"140322\",\"name\":\"盂县\",\"cityCode\":\"1403\",\"provinceCode\":\"14\"},{\"code\":\"140371\",\"name\":\"山西阳泉经济开发区\",\"cityCode\":\"1403\",\"provinceCode\":\"14\"},{\"code\":\"140402\",\"name\":\"城区\",\"cityCode\":\"1404\",\"provinceCode\":\"14\"},{\"code\":\"140411\",\"name\":\"郊区\",\"cityCode\":\"1404\",\"provinceCode\":\"14\"},{\"code\":\"140421\",\"name\":\"长治县\",\"cityCode\":\"1404\",\"provinceCode\":\"14\"},{\"code\":\"140423\",\"name\":\"襄垣县\",\"cityCode\":\"1404\",\"provinceCode\":\"14\"},{\"code\":\"140424\",\"name\":\"屯留县\",\"cityCode\":\"1404\",\"provinceCode\":\"14\"},{\"code\":\"140425\",\"name\":\"平顺县\",\"cityCode\":\"1404\",\"provinceCode\":\"14\"},{\"code\":\"140426\",\"name\":\"黎城县\",\"cityCode\":\"1404\",\"provinceCode\":\"14\"},{\"code\":\"140427\",\"name\":\"壶关县\",\"cityCode\":\"1404\",\"provinceCode\":\"14\"},{\"code\":\"140428\",\"name\":\"长子县\",\"cityCode\":\"1404\",\"provinceCode\":\"14\"},{\"code\":\"140429\",\"name\":\"武乡县\",\"cityCode\":\"1404\",\"provinceCode\":\"14\"},{\"code\":\"140430\",\"name\":\"沁县\",\"cityCode\":\"1404\",\"provinceCode\":\"14\"},{\"code\":\"140431\",\"name\":\"沁源县\",\"cityCode\":\"1404\",\"provinceCode\":\"14\"},{\"code\":\"140471\",\"name\":\"山西长治高新技术产业园区\",\"cityCode\":\"1404\",\"provinceCode\":\"14\"},{\"code\":\"140481\",\"name\":\"潞城市\",\"cityCode\":\"1404\",\"provinceCode\":\"14\"},{\"code\":\"140502\",\"name\":\"城区\",\"cityCode\":\"1405\",\"provinceCode\":\"14\"},{\"code\":\"140521\",\"name\":\"沁水县\",\"cityCode\":\"1405\",\"provinceCode\":\"14\"},{\"code\":\"140522\",\"name\":\"阳城县\",\"cityCode\":\"1405\",\"provinceCode\":\"14\"},{\"code\":\"140524\",\"name\":\"陵川县\",\"cityCode\":\"1405\",\"provinceCode\":\"14\"},{\"code\":\"140525\",\"name\":\"泽州县\",\"cityCode\":\"1405\",\"provinceCode\":\"14\"},{\"code\":\"140581\",\"name\":\"高平市\",\"cityCode\":\"1405\",\"provinceCode\":\"14\"},{\"code\":\"140602\",\"name\":\"朔城区\",\"cityCode\":\"1406\",\"provinceCode\":\"14\"},{\"code\":\"140603\",\"name\":\"平鲁区\",\"cityCode\":\"1406\",\"provinceCode\":\"14\"},{\"code\":\"140621\",\"name\":\"山阴县\",\"cityCode\":\"1406\",\"provinceCode\":\"14\"},{\"code\":\"140622\",\"name\":\"应县\",\"cityCode\":\"1406\",\"provinceCode\":\"14\"},{\"code\":\"140623\",\"name\":\"右玉县\",\"cityCode\":\"1406\",\"provinceCode\":\"14\"},{\"code\":\"140624\",\"name\":\"怀仁县\",\"cityCode\":\"1406\",\"provinceCode\":\"14\"},{\"code\":\"140671\",\"name\":\"山西朔州经济开发区\",\"cityCode\":\"1406\",\"provinceCode\":\"14\"},{\"code\":\"140702\",\"name\":\"榆次区\",\"cityCode\":\"1407\",\"provinceCode\":\"14\"},{\"code\":\"140721\",\"name\":\"榆社县\",\"cityCode\":\"1407\",\"provinceCode\":\"14\"},{\"code\":\"140722\",\"name\":\"左权县\",\"cityCode\":\"1407\",\"provinceCode\":\"14\"},{\"code\":\"140723\",\"name\":\"和顺县\",\"cityCode\":\"1407\",\"provinceCode\":\"14\"},{\"code\":\"140724\",\"name\":\"昔阳县\",\"cityCode\":\"1407\",\"provinceCode\":\"14\"},{\"code\":\"140725\",\"name\":\"寿阳县\",\"cityCode\":\"1407\",\"provinceCode\":\"14\"},{\"code\":\"140726\",\"name\":\"太谷县\",\"cityCode\":\"1407\",\"provinceCode\":\"14\"},{\"code\":\"140727\",\"name\":\"祁县\",\"cityCode\":\"1407\",\"provinceCode\":\"14\"},{\"code\":\"140728\",\"name\":\"平遥县\",\"cityCode\":\"1407\",\"provinceCode\":\"14\"},{\"code\":\"140729\",\"name\":\"灵石县\",\"cityCode\":\"1407\",\"provinceCode\":\"14\"},{\"code\":\"140781\",\"name\":\"介休市\",\"cityCode\":\"1407\",\"provinceCode\":\"14\"},{\"code\":\"140802\",\"name\":\"盐湖区\",\"cityCode\":\"1408\",\"provinceCode\":\"14\"},{\"code\":\"140821\",\"name\":\"临猗县\",\"cityCode\":\"1408\",\"provinceCode\":\"14\"},{\"code\":\"140822\",\"name\":\"万荣县\",\"cityCode\":\"1408\",\"provinceCode\":\"14\"},{\"code\":\"140823\",\"name\":\"闻喜县\",\"cityCode\":\"1408\",\"provinceCode\":\"14\"},{\"code\":\"140824\",\"name\":\"稷山县\",\"cityCode\":\"1408\",\"provinceCode\":\"14\"},{\"code\":\"140825\",\"name\":\"新绛县\",\"cityCode\":\"1408\",\"provinceCode\":\"14\"},{\"code\":\"140826\",\"name\":\"绛县\",\"cityCode\":\"1408\",\"provinceCode\":\"14\"},{\"code\":\"140827\",\"name\":\"垣曲县\",\"cityCode\":\"1408\",\"provinceCode\":\"14\"},{\"code\":\"140828\",\"name\":\"夏县\",\"cityCode\":\"1408\",\"provinceCode\":\"14\"},{\"code\":\"140829\",\"name\":\"平陆县\",\"cityCode\":\"1408\",\"provinceCode\":\"14\"},{\"code\":\"140830\",\"name\":\"芮城县\",\"cityCode\":\"1408\",\"provinceCode\":\"14\"},{\"code\":\"140881\",\"name\":\"永济市\",\"cityCode\":\"1408\",\"provinceCode\":\"14\"},{\"code\":\"140882\",\"name\":\"河津市\",\"cityCode\":\"1408\",\"provinceCode\":\"14\"},{\"code\":\"140902\",\"name\":\"忻府区\",\"cityCode\":\"1409\",\"provinceCode\":\"14\"},{\"code\":\"140921\",\"name\":\"定襄县\",\"cityCode\":\"1409\",\"provinceCode\":\"14\"},{\"code\":\"140922\",\"name\":\"五台县\",\"cityCode\":\"1409\",\"provinceCode\":\"14\"},{\"code\":\"140923\",\"name\":\"代县\",\"cityCode\":\"1409\",\"provinceCode\":\"14\"},{\"code\":\"140924\",\"name\":\"繁峙县\",\"cityCode\":\"1409\",\"provinceCode\":\"14\"},{\"code\":\"140925\",\"name\":\"宁武县\",\"cityCode\":\"1409\",\"provinceCode\":\"14\"},{\"code\":\"140926\",\"name\":\"静乐县\",\"cityCode\":\"1409\",\"provinceCode\":\"14\"},{\"code\":\"140927\",\"name\":\"神池县\",\"cityCode\":\"1409\",\"provinceCode\":\"14\"},{\"code\":\"140928\",\"name\":\"五寨县\",\"cityCode\":\"1409\",\"provinceCode\":\"14\"},{\"code\":\"140929\",\"name\":\"岢岚县\",\"cityCode\":\"1409\",\"provinceCode\":\"14\"},{\"code\":\"140930\",\"name\":\"河曲县\",\"cityCode\":\"1409\",\"provinceCode\":\"14\"},{\"code\":\"140931\",\"name\":\"保德县\",\"cityCode\":\"1409\",\"provinceCode\":\"14\"},{\"code\":\"140932\",\"name\":\"偏关县\",\"cityCode\":\"1409\",\"provinceCode\":\"14\"},{\"code\":\"140971\",\"name\":\"五台山风景名胜区\",\"cityCode\":\"1409\",\"provinceCode\":\"14\"},{\"code\":\"140981\",\"name\":\"原平市\",\"cityCode\":\"1409\",\"provinceCode\":\"14\"},{\"code\":\"141002\",\"name\":\"尧都区\",\"cityCode\":\"1410\",\"provinceCode\":\"14\"},{\"code\":\"141021\",\"name\":\"曲沃县\",\"cityCode\":\"1410\",\"provinceCode\":\"14\"},{\"code\":\"141022\",\"name\":\"翼城县\",\"cityCode\":\"1410\",\"provinceCode\":\"14\"},{\"code\":\"141023\",\"name\":\"襄汾县\",\"cityCode\":\"1410\",\"provinceCode\":\"14\"},{\"code\":\"141024\",\"name\":\"洪洞县\",\"cityCode\":\"1410\",\"provinceCode\":\"14\"},{\"code\":\"141025\",\"name\":\"古县\",\"cityCode\":\"1410\",\"provinceCode\":\"14\"},{\"code\":\"141026\",\"name\":\"安泽县\",\"cityCode\":\"1410\",\"provinceCode\":\"14\"},{\"code\":\"141027\",\"name\":\"浮山县\",\"cityCode\":\"1410\",\"provinceCode\":\"14\"},{\"code\":\"141028\",\"name\":\"吉县\",\"cityCode\":\"1410\",\"provinceCode\":\"14\"},{\"code\":\"141029\",\"name\":\"乡宁县\",\"cityCode\":\"1410\",\"provinceCode\":\"14\"},{\"code\":\"141030\",\"name\":\"大宁县\",\"cityCode\":\"1410\",\"provinceCode\":\"14\"},{\"code\":\"141031\",\"name\":\"隰县\",\"cityCode\":\"1410\",\"provinceCode\":\"14\"},{\"code\":\"141032\",\"name\":\"永和县\",\"cityCode\":\"1410\",\"provinceCode\":\"14\"},{\"code\":\"141033\",\"name\":\"蒲县\",\"cityCode\":\"1410\",\"provinceCode\":\"14\"},{\"code\":\"141034\",\"name\":\"汾西县\",\"cityCode\":\"1410\",\"provinceCode\":\"14\"},{\"code\":\"141081\",\"name\":\"侯马市\",\"cityCode\":\"1410\",\"provinceCode\":\"14\"},{\"code\":\"141082\",\"name\":\"霍州市\",\"cityCode\":\"1410\",\"provinceCode\":\"14\"},{\"code\":\"141102\",\"name\":\"离石区\",\"cityCode\":\"1411\",\"provinceCode\":\"14\"},{\"code\":\"141121\",\"name\":\"文水县\",\"cityCode\":\"1411\",\"provinceCode\":\"14\"},{\"code\":\"141122\",\"name\":\"交城县\",\"cityCode\":\"1411\",\"provinceCode\":\"14\"},{\"code\":\"141123\",\"name\":\"兴县\",\"cityCode\":\"1411\",\"provinceCode\":\"14\"},{\"code\":\"141124\",\"name\":\"临县\",\"cityCode\":\"1411\",\"provinceCode\":\"14\"},{\"code\":\"141125\",\"name\":\"柳林县\",\"cityCode\":\"1411\",\"provinceCode\":\"14\"},{\"code\":\"141126\",\"name\":\"石楼县\",\"cityCode\":\"1411\",\"provinceCode\":\"14\"},{\"code\":\"141127\",\"name\":\"岚县\",\"cityCode\":\"1411\",\"provinceCode\":\"14\"},{\"code\":\"141128\",\"name\":\"方山县\",\"cityCode\":\"1411\",\"provinceCode\":\"14\"},{\"code\":\"141129\",\"name\":\"中阳县\",\"cityCode\":\"1411\",\"provinceCode\":\"14\"},{\"code\":\"141130\",\"name\":\"交口县\",\"cityCode\":\"1411\",\"provinceCode\":\"14\"},{\"code\":\"141181\",\"name\":\"孝义市\",\"cityCode\":\"1411\",\"provinceCode\":\"14\"},{\"code\":\"141182\",\"name\":\"汾阳市\",\"cityCode\":\"1411\",\"provinceCode\":\"14\"},{\"code\":\"150102\",\"name\":\"新城区\",\"cityCode\":\"1501\",\"provinceCode\":\"15\"},{\"code\":\"150103\",\"name\":\"回民区\",\"cityCode\":\"1501\",\"provinceCode\":\"15\"},{\"code\":\"150104\",\"name\":\"玉泉区\",\"cityCode\":\"1501\",\"provinceCode\":\"15\"},{\"code\":\"150105\",\"name\":\"赛罕区\",\"cityCode\":\"1501\",\"provinceCode\":\"15\"},{\"code\":\"150121\",\"name\":\"土默特左旗\",\"cityCode\":\"1501\",\"provinceCode\":\"15\"},{\"code\":\"150122\",\"name\":\"托克托县\",\"cityCode\":\"1501\",\"provinceCode\":\"15\"},{\"code\":\"150123\",\"name\":\"和林格尔县\",\"cityCode\":\"1501\",\"provinceCode\":\"15\"},{\"code\":\"150124\",\"name\":\"清水河县\",\"cityCode\":\"1501\",\"provinceCode\":\"15\"},{\"code\":\"150125\",\"name\":\"武川县\",\"cityCode\":\"1501\",\"provinceCode\":\"15\"},{\"code\":\"150171\",\"name\":\"呼和浩特金海工业园区\",\"cityCode\":\"1501\",\"provinceCode\":\"15\"},{\"code\":\"150172\",\"name\":\"呼和浩特经济技术开发区\",\"cityCode\":\"1501\",\"provinceCode\":\"15\"},{\"code\":\"150202\",\"name\":\"东河区\",\"cityCode\":\"1502\",\"provinceCode\":\"15\"},{\"code\":\"150203\",\"name\":\"昆都仑区\",\"cityCode\":\"1502\",\"provinceCode\":\"15\"},{\"code\":\"150204\",\"name\":\"青山区\",\"cityCode\":\"1502\",\"provinceCode\":\"15\"},{\"code\":\"150205\",\"name\":\"石拐区\",\"cityCode\":\"1502\",\"provinceCode\":\"15\"},{\"code\":\"150206\",\"name\":\"白云鄂博矿区\",\"cityCode\":\"1502\",\"provinceCode\":\"15\"},{\"code\":\"150207\",\"name\":\"九原区\",\"cityCode\":\"1502\",\"provinceCode\":\"15\"},{\"code\":\"150221\",\"name\":\"土默特右旗\",\"cityCode\":\"1502\",\"provinceCode\":\"15\"},{\"code\":\"150222\",\"name\":\"固阳县\",\"cityCode\":\"1502\",\"provinceCode\":\"15\"},{\"code\":\"150223\",\"name\":\"达尔罕茂明安联合旗\",\"cityCode\":\"1502\",\"provinceCode\":\"15\"},{\"code\":\"150271\",\"name\":\"包头稀土高新技术产业开发区\",\"cityCode\":\"1502\",\"provinceCode\":\"15\"},{\"code\":\"150302\",\"name\":\"海勃湾区\",\"cityCode\":\"1503\",\"provinceCode\":\"15\"},{\"code\":\"150303\",\"name\":\"海南区\",\"cityCode\":\"1503\",\"provinceCode\":\"15\"},{\"code\":\"150304\",\"name\":\"乌达区\",\"cityCode\":\"1503\",\"provinceCode\":\"15\"},{\"code\":\"150402\",\"name\":\"红山区\",\"cityCode\":\"1504\",\"provinceCode\":\"15\"},{\"code\":\"150403\",\"name\":\"元宝山区\",\"cityCode\":\"1504\",\"provinceCode\":\"15\"},{\"code\":\"150404\",\"name\":\"松山区\",\"cityCode\":\"1504\",\"provinceCode\":\"15\"},{\"code\":\"150421\",\"name\":\"阿鲁科尔沁旗\",\"cityCode\":\"1504\",\"provinceCode\":\"15\"},{\"code\":\"150422\",\"name\":\"巴林左旗\",\"cityCode\":\"1504\",\"provinceCode\":\"15\"},{\"code\":\"150423\",\"name\":\"巴林右旗\",\"cityCode\":\"1504\",\"provinceCode\":\"15\"},{\"code\":\"150424\",\"name\":\"林西县\",\"cityCode\":\"1504\",\"provinceCode\":\"15\"},{\"code\":\"150425\",\"name\":\"克什克腾旗\",\"cityCode\":\"1504\",\"provinceCode\":\"15\"},{\"code\":\"150426\",\"name\":\"翁牛特旗\",\"cityCode\":\"1504\",\"provinceCode\":\"15\"},{\"code\":\"150428\",\"name\":\"喀喇沁旗\",\"cityCode\":\"1504\",\"provinceCode\":\"15\"},{\"code\":\"150429\",\"name\":\"宁城县\",\"cityCode\":\"1504\",\"provinceCode\":\"15\"},{\"code\":\"150430\",\"name\":\"敖汉旗\",\"cityCode\":\"1504\",\"provinceCode\":\"15\"},{\"code\":\"150502\",\"name\":\"科尔沁区\",\"cityCode\":\"1505\",\"provinceCode\":\"15\"},{\"code\":\"150521\",\"name\":\"科尔沁左翼中旗\",\"cityCode\":\"1505\",\"provinceCode\":\"15\"},{\"code\":\"150522\",\"name\":\"科尔沁左翼后旗\",\"cityCode\":\"1505\",\"provinceCode\":\"15\"},{\"code\":\"150523\",\"name\":\"开鲁县\",\"cityCode\":\"1505\",\"provinceCode\":\"15\"},{\"code\":\"150524\",\"name\":\"库伦旗\",\"cityCode\":\"1505\",\"provinceCode\":\"15\"},{\"code\":\"150525\",\"name\":\"奈曼旗\",\"cityCode\":\"1505\",\"provinceCode\":\"15\"},{\"code\":\"150526\",\"name\":\"扎鲁特旗\",\"cityCode\":\"1505\",\"provinceCode\":\"15\"},{\"code\":\"150571\",\"name\":\"通辽经济技术开发区\",\"cityCode\":\"1505\",\"provinceCode\":\"15\"},{\"code\":\"150581\",\"name\":\"霍林郭勒市\",\"cityCode\":\"1505\",\"provinceCode\":\"15\"},{\"code\":\"150602\",\"name\":\"东胜区\",\"cityCode\":\"1506\",\"provinceCode\":\"15\"},{\"code\":\"150603\",\"name\":\"康巴什区\",\"cityCode\":\"1506\",\"provinceCode\":\"15\"},{\"code\":\"150621\",\"name\":\"达拉特旗\",\"cityCode\":\"1506\",\"provinceCode\":\"15\"},{\"code\":\"150622\",\"name\":\"准格尔旗\",\"cityCode\":\"1506\",\"provinceCode\":\"15\"},{\"code\":\"150623\",\"name\":\"鄂托克前旗\",\"cityCode\":\"1506\",\"provinceCode\":\"15\"},{\"code\":\"150624\",\"name\":\"鄂托克旗\",\"cityCode\":\"1506\",\"provinceCode\":\"15\"},{\"code\":\"150625\",\"name\":\"杭锦旗\",\"cityCode\":\"1506\",\"provinceCode\":\"15\"},{\"code\":\"150626\",\"name\":\"乌审旗\",\"cityCode\":\"1506\",\"provinceCode\":\"15\"},{\"code\":\"150627\",\"name\":\"伊金霍洛旗\",\"cityCode\":\"1506\",\"provinceCode\":\"15\"},{\"code\":\"150702\",\"name\":\"海拉尔区\",\"cityCode\":\"1507\",\"provinceCode\":\"15\"},{\"code\":\"150703\",\"name\":\"扎赉诺尔区\",\"cityCode\":\"1507\",\"provinceCode\":\"15\"},{\"code\":\"150721\",\"name\":\"阿荣旗\",\"cityCode\":\"1507\",\"provinceCode\":\"15\"},{\"code\":\"150722\",\"name\":\"莫力达瓦达斡尔族自治旗\",\"cityCode\":\"1507\",\"provinceCode\":\"15\"},{\"code\":\"150723\",\"name\":\"鄂伦春自治旗\",\"cityCode\":\"1507\",\"provinceCode\":\"15\"},{\"code\":\"150724\",\"name\":\"鄂温克族自治旗\",\"cityCode\":\"1507\",\"provinceCode\":\"15\"},{\"code\":\"150725\",\"name\":\"陈巴尔虎旗\",\"cityCode\":\"1507\",\"provinceCode\":\"15\"},{\"code\":\"150726\",\"name\":\"新巴尔虎左旗\",\"cityCode\":\"1507\",\"provinceCode\":\"15\"},{\"code\":\"150727\",\"name\":\"新巴尔虎右旗\",\"cityCode\":\"1507\",\"provinceCode\":\"15\"},{\"code\":\"150781\",\"name\":\"满洲里市\",\"cityCode\":\"1507\",\"provinceCode\":\"15\"},{\"code\":\"150782\",\"name\":\"牙克石市\",\"cityCode\":\"1507\",\"provinceCode\":\"15\"},{\"code\":\"150783\",\"name\":\"扎兰屯市\",\"cityCode\":\"1507\",\"provinceCode\":\"15\"},{\"code\":\"150784\",\"name\":\"额尔古纳市\",\"cityCode\":\"1507\",\"provinceCode\":\"15\"},{\"code\":\"150785\",\"name\":\"根河市\",\"cityCode\":\"1507\",\"provinceCode\":\"15\"},{\"code\":\"150802\",\"name\":\"临河区\",\"cityCode\":\"1508\",\"provinceCode\":\"15\"},{\"code\":\"150821\",\"name\":\"五原县\",\"cityCode\":\"1508\",\"provinceCode\":\"15\"},{\"code\":\"150822\",\"name\":\"磴口县\",\"cityCode\":\"1508\",\"provinceCode\":\"15\"},{\"code\":\"150823\",\"name\":\"乌拉特前旗\",\"cityCode\":\"1508\",\"provinceCode\":\"15\"},{\"code\":\"150824\",\"name\":\"乌拉特中旗\",\"cityCode\":\"1508\",\"provinceCode\":\"15\"},{\"code\":\"150825\",\"name\":\"乌拉特后旗\",\"cityCode\":\"1508\",\"provinceCode\":\"15\"},{\"code\":\"150826\",\"name\":\"杭锦后旗\",\"cityCode\":\"1508\",\"provinceCode\":\"15\"},{\"code\":\"150902\",\"name\":\"集宁区\",\"cityCode\":\"1509\",\"provinceCode\":\"15\"},{\"code\":\"150921\",\"name\":\"卓资县\",\"cityCode\":\"1509\",\"provinceCode\":\"15\"},{\"code\":\"150922\",\"name\":\"化德县\",\"cityCode\":\"1509\",\"provinceCode\":\"15\"},{\"code\":\"150923\",\"name\":\"商都县\",\"cityCode\":\"1509\",\"provinceCode\":\"15\"},{\"code\":\"150924\",\"name\":\"兴和县\",\"cityCode\":\"1509\",\"provinceCode\":\"15\"},{\"code\":\"150925\",\"name\":\"凉城县\",\"cityCode\":\"1509\",\"provinceCode\":\"15\"},{\"code\":\"150926\",\"name\":\"察哈尔右翼前旗\",\"cityCode\":\"1509\",\"provinceCode\":\"15\"},{\"code\":\"150927\",\"name\":\"察哈尔右翼中旗\",\"cityCode\":\"1509\",\"provinceCode\":\"15\"},{\"code\":\"150928\",\"name\":\"察哈尔右翼后旗\",\"cityCode\":\"1509\",\"provinceCode\":\"15\"},{\"code\":\"150929\",\"name\":\"四子王旗\",\"cityCode\":\"1509\",\"provinceCode\":\"15\"},{\"code\":\"150981\",\"name\":\"丰镇市\",\"cityCode\":\"1509\",\"provinceCode\":\"15\"},{\"code\":\"152201\",\"name\":\"乌兰浩特市\",\"cityCode\":\"1522\",\"provinceCode\":\"15\"},{\"code\":\"152202\",\"name\":\"阿尔山市\",\"cityCode\":\"1522\",\"provinceCode\":\"15\"},{\"code\":\"152221\",\"name\":\"科尔沁右翼前旗\",\"cityCode\":\"1522\",\"provinceCode\":\"15\"},{\"code\":\"152222\",\"name\":\"科尔沁右翼中旗\",\"cityCode\":\"1522\",\"provinceCode\":\"15\"},{\"code\":\"152223\",\"name\":\"扎赉特旗\",\"cityCode\":\"1522\",\"provinceCode\":\"15\"},{\"code\":\"152224\",\"name\":\"突泉县\",\"cityCode\":\"1522\",\"provinceCode\":\"15\"},{\"code\":\"152501\",\"name\":\"二连浩特市\",\"cityCode\":\"1525\",\"provinceCode\":\"15\"},{\"code\":\"152502\",\"name\":\"锡林浩特市\",\"cityCode\":\"1525\",\"provinceCode\":\"15\"},{\"code\":\"152522\",\"name\":\"阿巴嘎旗\",\"cityCode\":\"1525\",\"provinceCode\":\"15\"},{\"code\":\"152523\",\"name\":\"苏尼特左旗\",\"cityCode\":\"1525\",\"provinceCode\":\"15\"},{\"code\":\"152524\",\"name\":\"苏尼特右旗\",\"cityCode\":\"1525\",\"provinceCode\":\"15\"},{\"code\":\"152525\",\"name\":\"东乌珠穆沁旗\",\"cityCode\":\"1525\",\"provinceCode\":\"15\"},{\"code\":\"152526\",\"name\":\"西乌珠穆沁旗\",\"cityCode\":\"1525\",\"provinceCode\":\"15\"},{\"code\":\"152527\",\"name\":\"太仆寺旗\",\"cityCode\":\"1525\",\"provinceCode\":\"15\"},{\"code\":\"152528\",\"name\":\"镶黄旗\",\"cityCode\":\"1525\",\"provinceCode\":\"15\"},{\"code\":\"152529\",\"name\":\"正镶白旗\",\"cityCode\":\"1525\",\"provinceCode\":\"15\"},{\"code\":\"152530\",\"name\":\"正蓝旗\",\"cityCode\":\"1525\",\"provinceCode\":\"15\"},{\"code\":\"152531\",\"name\":\"多伦县\",\"cityCode\":\"1525\",\"provinceCode\":\"15\"},{\"code\":\"152571\",\"name\":\"乌拉盖管委会\",\"cityCode\":\"1525\",\"provinceCode\":\"15\"},{\"code\":\"152921\",\"name\":\"阿拉善左旗\",\"cityCode\":\"1529\",\"provinceCode\":\"15\"},{\"code\":\"152922\",\"name\":\"阿拉善右旗\",\"cityCode\":\"1529\",\"provinceCode\":\"15\"},{\"code\":\"152923\",\"name\":\"额济纳旗\",\"cityCode\":\"1529\",\"provinceCode\":\"15\"},{\"code\":\"152971\",\"name\":\"内蒙古阿拉善经济开发区\",\"cityCode\":\"1529\",\"provinceCode\":\"15\"},{\"code\":\"210102\",\"name\":\"和平区\",\"cityCode\":\"2101\",\"provinceCode\":\"21\"},{\"code\":\"210103\",\"name\":\"沈河区\",\"cityCode\":\"2101\",\"provinceCode\":\"21\"},{\"code\":\"210104\",\"name\":\"大东区\",\"cityCode\":\"2101\",\"provinceCode\":\"21\"},{\"code\":\"210105\",\"name\":\"皇姑区\",\"cityCode\":\"2101\",\"provinceCode\":\"21\"},{\"code\":\"210106\",\"name\":\"铁西区\",\"cityCode\":\"2101\",\"provinceCode\":\"21\"},{\"code\":\"210111\",\"name\":\"苏家屯区\",\"cityCode\":\"2101\",\"provinceCode\":\"21\"},{\"code\":\"210112\",\"name\":\"浑南区\",\"cityCode\":\"2101\",\"provinceCode\":\"21\"},{\"code\":\"210113\",\"name\":\"沈北新区\",\"cityCode\":\"2101\",\"provinceCode\":\"21\"},{\"code\":\"210114\",\"name\":\"于洪区\",\"cityCode\":\"2101\",\"provinceCode\":\"21\"},{\"code\":\"210115\",\"name\":\"辽中区\",\"cityCode\":\"2101\",\"provinceCode\":\"21\"},{\"code\":\"210123\",\"name\":\"康平县\",\"cityCode\":\"2101\",\"provinceCode\":\"21\"},{\"code\":\"210124\",\"name\":\"法库县\",\"cityCode\":\"2101\",\"provinceCode\":\"21\"},{\"code\":\"210181\",\"name\":\"新民市\",\"cityCode\":\"2101\",\"provinceCode\":\"21\"},{\"code\":\"210202\",\"name\":\"中山区\",\"cityCode\":\"2102\",\"provinceCode\":\"21\"},{\"code\":\"210203\",\"name\":\"西岗区\",\"cityCode\":\"2102\",\"provinceCode\":\"21\"},{\"code\":\"210204\",\"name\":\"沙河口区\",\"cityCode\":\"2102\",\"provinceCode\":\"21\"},{\"code\":\"210211\",\"name\":\"甘井子区\",\"cityCode\":\"2102\",\"provinceCode\":\"21\"},{\"code\":\"210212\",\"name\":\"旅顺口区\",\"cityCode\":\"2102\",\"provinceCode\":\"21\"},{\"code\":\"210213\",\"name\":\"金州区\",\"cityCode\":\"2102\",\"provinceCode\":\"21\"},{\"code\":\"210214\",\"name\":\"普兰店区\",\"cityCode\":\"2102\",\"provinceCode\":\"21\"},{\"code\":\"210224\",\"name\":\"长海县\",\"cityCode\":\"2102\",\"provinceCode\":\"21\"},{\"code\":\"210281\",\"name\":\"瓦房店市\",\"cityCode\":\"2102\",\"provinceCode\":\"21\"},{\"code\":\"210283\",\"name\":\"庄河市\",\"cityCode\":\"2102\",\"provinceCode\":\"21\"},{\"code\":\"210302\",\"name\":\"铁东区\",\"cityCode\":\"2103\",\"provinceCode\":\"21\"},{\"code\":\"210303\",\"name\":\"铁西区\",\"cityCode\":\"2103\",\"provinceCode\":\"21\"},{\"code\":\"210304\",\"name\":\"立山区\",\"cityCode\":\"2103\",\"provinceCode\":\"21\"},{\"code\":\"210311\",\"name\":\"千山区\",\"cityCode\":\"2103\",\"provinceCode\":\"21\"},{\"code\":\"210321\",\"name\":\"台安县\",\"cityCode\":\"2103\",\"provinceCode\":\"21\"},{\"code\":\"210323\",\"name\":\"岫岩满族自治县\",\"cityCode\":\"2103\",\"provinceCode\":\"21\"},{\"code\":\"210381\",\"name\":\"海城市\",\"cityCode\":\"2103\",\"provinceCode\":\"21\"},{\"code\":\"210402\",\"name\":\"新抚区\",\"cityCode\":\"2104\",\"provinceCode\":\"21\"},{\"code\":\"210403\",\"name\":\"东洲区\",\"cityCode\":\"2104\",\"provinceCode\":\"21\"},{\"code\":\"210404\",\"name\":\"望花区\",\"cityCode\":\"2104\",\"provinceCode\":\"21\"},{\"code\":\"210411\",\"name\":\"顺城区\",\"cityCode\":\"2104\",\"provinceCode\":\"21\"},{\"code\":\"210421\",\"name\":\"抚顺县\",\"cityCode\":\"2104\",\"provinceCode\":\"21\"},{\"code\":\"210422\",\"name\":\"新宾满族自治县\",\"cityCode\":\"2104\",\"provinceCode\":\"21\"},{\"code\":\"210423\",\"name\":\"清原满族自治县\",\"cityCode\":\"2104\",\"provinceCode\":\"21\"},{\"code\":\"210502\",\"name\":\"平山区\",\"cityCode\":\"2105\",\"provinceCode\":\"21\"},{\"code\":\"210503\",\"name\":\"溪湖区\",\"cityCode\":\"2105\",\"provinceCode\":\"21\"},{\"code\":\"210504\",\"name\":\"明山区\",\"cityCode\":\"2105\",\"provinceCode\":\"21\"},{\"code\":\"210505\",\"name\":\"南芬区\",\"cityCode\":\"2105\",\"provinceCode\":\"21\"},{\"code\":\"210521\",\"name\":\"本溪满族自治县\",\"cityCode\":\"2105\",\"provinceCode\":\"21\"},{\"code\":\"210522\",\"name\":\"桓仁满族自治县\",\"cityCode\":\"2105\",\"provinceCode\":\"21\"},{\"code\":\"210602\",\"name\":\"元宝区\",\"cityCode\":\"2106\",\"provinceCode\":\"21\"},{\"code\":\"210603\",\"name\":\"振兴区\",\"cityCode\":\"2106\",\"provinceCode\":\"21\"},{\"code\":\"210604\",\"name\":\"振安区\",\"cityCode\":\"2106\",\"provinceCode\":\"21\"},{\"code\":\"210624\",\"name\":\"宽甸满族自治县\",\"cityCode\":\"2106\",\"provinceCode\":\"21\"},{\"code\":\"210681\",\"name\":\"东港市\",\"cityCode\":\"2106\",\"provinceCode\":\"21\"},{\"code\":\"210682\",\"name\":\"凤城市\",\"cityCode\":\"2106\",\"provinceCode\":\"21\"},{\"code\":\"210702\",\"name\":\"古塔区\",\"cityCode\":\"2107\",\"provinceCode\":\"21\"},{\"code\":\"210703\",\"name\":\"凌河区\",\"cityCode\":\"2107\",\"provinceCode\":\"21\"},{\"code\":\"210711\",\"name\":\"太和区\",\"cityCode\":\"2107\",\"provinceCode\":\"21\"},{\"code\":\"210726\",\"name\":\"黑山县\",\"cityCode\":\"2107\",\"provinceCode\":\"21\"},{\"code\":\"210727\",\"name\":\"义县\",\"cityCode\":\"2107\",\"provinceCode\":\"21\"},{\"code\":\"210781\",\"name\":\"凌海市\",\"cityCode\":\"2107\",\"provinceCode\":\"21\"},{\"code\":\"210782\",\"name\":\"北镇市\",\"cityCode\":\"2107\",\"provinceCode\":\"21\"},{\"code\":\"210802\",\"name\":\"站前区\",\"cityCode\":\"2108\",\"provinceCode\":\"21\"},{\"code\":\"210803\",\"name\":\"西市区\",\"cityCode\":\"2108\",\"provinceCode\":\"21\"},{\"code\":\"210804\",\"name\":\"鲅鱼圈区\",\"cityCode\":\"2108\",\"provinceCode\":\"21\"},{\"code\":\"210811\",\"name\":\"老边区\",\"cityCode\":\"2108\",\"provinceCode\":\"21\"},{\"code\":\"210881\",\"name\":\"盖州市\",\"cityCode\":\"2108\",\"provinceCode\":\"21\"},{\"code\":\"210882\",\"name\":\"大石桥市\",\"cityCode\":\"2108\",\"provinceCode\":\"21\"},{\"code\":\"210902\",\"name\":\"海州区\",\"cityCode\":\"2109\",\"provinceCode\":\"21\"},{\"code\":\"210903\",\"name\":\"新邱区\",\"cityCode\":\"2109\",\"provinceCode\":\"21\"},{\"code\":\"210904\",\"name\":\"太平区\",\"cityCode\":\"2109\",\"provinceCode\":\"21\"},{\"code\":\"210905\",\"name\":\"清河门区\",\"cityCode\":\"2109\",\"provinceCode\":\"21\"},{\"code\":\"210911\",\"name\":\"细河区\",\"cityCode\":\"2109\",\"provinceCode\":\"21\"},{\"code\":\"210921\",\"name\":\"阜新蒙古族自治县\",\"cityCode\":\"2109\",\"provinceCode\":\"21\"},{\"code\":\"210922\",\"name\":\"彰武县\",\"cityCode\":\"2109\",\"provinceCode\":\"21\"},{\"code\":\"211002\",\"name\":\"白塔区\",\"cityCode\":\"2110\",\"provinceCode\":\"21\"},{\"code\":\"211003\",\"name\":\"文圣区\",\"cityCode\":\"2110\",\"provinceCode\":\"21\"},{\"code\":\"211004\",\"name\":\"宏伟区\",\"cityCode\":\"2110\",\"provinceCode\":\"21\"},{\"code\":\"211005\",\"name\":\"弓长岭区\",\"cityCode\":\"2110\",\"provinceCode\":\"21\"},{\"code\":\"211011\",\"name\":\"太子河区\",\"cityCode\":\"2110\",\"provinceCode\":\"21\"},{\"code\":\"211021\",\"name\":\"辽阳县\",\"cityCode\":\"2110\",\"provinceCode\":\"21\"},{\"code\":\"211081\",\"name\":\"灯塔市\",\"cityCode\":\"2110\",\"provinceCode\":\"21\"},{\"code\":\"211102\",\"name\":\"双台子区\",\"cityCode\":\"2111\",\"provinceCode\":\"21\"},{\"code\":\"211103\",\"name\":\"兴隆台区\",\"cityCode\":\"2111\",\"provinceCode\":\"21\"},{\"code\":\"211104\",\"name\":\"大洼区\",\"cityCode\":\"2111\",\"provinceCode\":\"21\"},{\"code\":\"211122\",\"name\":\"盘山县\",\"cityCode\":\"2111\",\"provinceCode\":\"21\"},{\"code\":\"211202\",\"name\":\"银州区\",\"cityCode\":\"2112\",\"provinceCode\":\"21\"},{\"code\":\"211204\",\"name\":\"清河区\",\"cityCode\":\"2112\",\"provinceCode\":\"21\"},{\"code\":\"211221\",\"name\":\"铁岭县\",\"cityCode\":\"2112\",\"provinceCode\":\"21\"},{\"code\":\"211223\",\"name\":\"西丰县\",\"cityCode\":\"2112\",\"provinceCode\":\"21\"},{\"code\":\"211224\",\"name\":\"昌图县\",\"cityCode\":\"2112\",\"provinceCode\":\"21\"},{\"code\":\"211281\",\"name\":\"调兵山市\",\"cityCode\":\"2112\",\"provinceCode\":\"21\"},{\"code\":\"211282\",\"name\":\"开原市\",\"cityCode\":\"2112\",\"provinceCode\":\"21\"},{\"code\":\"211302\",\"name\":\"双塔区\",\"cityCode\":\"2113\",\"provinceCode\":\"21\"},{\"code\":\"211303\",\"name\":\"龙城区\",\"cityCode\":\"2113\",\"provinceCode\":\"21\"},{\"code\":\"211321\",\"name\":\"朝阳县\",\"cityCode\":\"2113\",\"provinceCode\":\"21\"},{\"code\":\"211322\",\"name\":\"建平县\",\"cityCode\":\"2113\",\"provinceCode\":\"21\"},{\"code\":\"211324\",\"name\":\"喀喇沁左翼蒙古族自治县\",\"cityCode\":\"2113\",\"provinceCode\":\"21\"},{\"code\":\"211381\",\"name\":\"北票市\",\"cityCode\":\"2113\",\"provinceCode\":\"21\"},{\"code\":\"211382\",\"name\":\"凌源市\",\"cityCode\":\"2113\",\"provinceCode\":\"21\"},{\"code\":\"211402\",\"name\":\"连山区\",\"cityCode\":\"2114\",\"provinceCode\":\"21\"},{\"code\":\"211403\",\"name\":\"龙港区\",\"cityCode\":\"2114\",\"provinceCode\":\"21\"},{\"code\":\"211404\",\"name\":\"南票区\",\"cityCode\":\"2114\",\"provinceCode\":\"21\"},{\"code\":\"211421\",\"name\":\"绥中县\",\"cityCode\":\"2114\",\"provinceCode\":\"21\"},{\"code\":\"211422\",\"name\":\"建昌县\",\"cityCode\":\"2114\",\"provinceCode\":\"21\"},{\"code\":\"211481\",\"name\":\"兴城市\",\"cityCode\":\"2114\",\"provinceCode\":\"21\"},{\"code\":\"220102\",\"name\":\"南关区\",\"cityCode\":\"2201\",\"provinceCode\":\"22\"},{\"code\":\"220103\",\"name\":\"宽城区\",\"cityCode\":\"2201\",\"provinceCode\":\"22\"},{\"code\":\"220104\",\"name\":\"朝阳区\",\"cityCode\":\"2201\",\"provinceCode\":\"22\"},{\"code\":\"220105\",\"name\":\"二道区\",\"cityCode\":\"2201\",\"provinceCode\":\"22\"},{\"code\":\"220106\",\"name\":\"绿园区\",\"cityCode\":\"2201\",\"provinceCode\":\"22\"},{\"code\":\"220112\",\"name\":\"双阳区\",\"cityCode\":\"2201\",\"provinceCode\":\"22\"},{\"code\":\"220113\",\"name\":\"九台区\",\"cityCode\":\"2201\",\"provinceCode\":\"22\"},{\"code\":\"220122\",\"name\":\"农安县\",\"cityCode\":\"2201\",\"provinceCode\":\"22\"},{\"code\":\"220171\",\"name\":\"长春经济技术开发区\",\"cityCode\":\"2201\",\"provinceCode\":\"22\"},{\"code\":\"220172\",\"name\":\"长春净月高新技术产业开发区\",\"cityCode\":\"2201\",\"provinceCode\":\"22\"},{\"code\":\"220173\",\"name\":\"长春高新技术产业开发区\",\"cityCode\":\"2201\",\"provinceCode\":\"22\"},{\"code\":\"220174\",\"name\":\"长春汽车经济技术开发区\",\"cityCode\":\"2201\",\"provinceCode\":\"22\"},{\"code\":\"220182\",\"name\":\"榆树市\",\"cityCode\":\"2201\",\"provinceCode\":\"22\"},{\"code\":\"220183\",\"name\":\"德惠市\",\"cityCode\":\"2201\",\"provinceCode\":\"22\"},{\"code\":\"220202\",\"name\":\"昌邑区\",\"cityCode\":\"2202\",\"provinceCode\":\"22\"},{\"code\":\"220203\",\"name\":\"龙潭区\",\"cityCode\":\"2202\",\"provinceCode\":\"22\"},{\"code\":\"220204\",\"name\":\"船营区\",\"cityCode\":\"2202\",\"provinceCode\":\"22\"},{\"code\":\"220211\",\"name\":\"丰满区\",\"cityCode\":\"2202\",\"provinceCode\":\"22\"},{\"code\":\"220221\",\"name\":\"永吉县\",\"cityCode\":\"2202\",\"provinceCode\":\"22\"},{\"code\":\"220271\",\"name\":\"吉林经济开发区\",\"cityCode\":\"2202\",\"provinceCode\":\"22\"},{\"code\":\"220272\",\"name\":\"吉林高新技术产业开发区\",\"cityCode\":\"2202\",\"provinceCode\":\"22\"},{\"code\":\"220273\",\"name\":\"吉林中国新加坡食品区\",\"cityCode\":\"2202\",\"provinceCode\":\"22\"},{\"code\":\"220281\",\"name\":\"蛟河市\",\"cityCode\":\"2202\",\"provinceCode\":\"22\"},{\"code\":\"220282\",\"name\":\"桦甸市\",\"cityCode\":\"2202\",\"provinceCode\":\"22\"},{\"code\":\"220283\",\"name\":\"舒兰市\",\"cityCode\":\"2202\",\"provinceCode\":\"22\"},{\"code\":\"220284\",\"name\":\"磐石市\",\"cityCode\":\"2202\",\"provinceCode\":\"22\"},{\"code\":\"220302\",\"name\":\"铁西区\",\"cityCode\":\"2203\",\"provinceCode\":\"22\"},{\"code\":\"220303\",\"name\":\"铁东区\",\"cityCode\":\"2203\",\"provinceCode\":\"22\"},{\"code\":\"220322\",\"name\":\"梨树县\",\"cityCode\":\"2203\",\"provinceCode\":\"22\"},{\"code\":\"220323\",\"name\":\"伊通满族自治县\",\"cityCode\":\"2203\",\"provinceCode\":\"22\"},{\"code\":\"220381\",\"name\":\"公主岭市\",\"cityCode\":\"2203\",\"provinceCode\":\"22\"},{\"code\":\"220382\",\"name\":\"双辽市\",\"cityCode\":\"2203\",\"provinceCode\":\"22\"},{\"code\":\"220402\",\"name\":\"龙山区\",\"cityCode\":\"2204\",\"provinceCode\":\"22\"},{\"code\":\"220403\",\"name\":\"西安区\",\"cityCode\":\"2204\",\"provinceCode\":\"22\"},{\"code\":\"220421\",\"name\":\"东丰县\",\"cityCode\":\"2204\",\"provinceCode\":\"22\"},{\"code\":\"220422\",\"name\":\"东辽县\",\"cityCode\":\"2204\",\"provinceCode\":\"22\"},{\"code\":\"220502\",\"name\":\"东昌区\",\"cityCode\":\"2205\",\"provinceCode\":\"22\"},{\"code\":\"220503\",\"name\":\"二道江区\",\"cityCode\":\"2205\",\"provinceCode\":\"22\"},{\"code\":\"220521\",\"name\":\"通化县\",\"cityCode\":\"2205\",\"provinceCode\":\"22\"},{\"code\":\"220523\",\"name\":\"辉南县\",\"cityCode\":\"2205\",\"provinceCode\":\"22\"},{\"code\":\"220524\",\"name\":\"柳河县\",\"cityCode\":\"2205\",\"provinceCode\":\"22\"},{\"code\":\"220581\",\"name\":\"梅河口市\",\"cityCode\":\"2205\",\"provinceCode\":\"22\"},{\"code\":\"220582\",\"name\":\"集安市\",\"cityCode\":\"2205\",\"provinceCode\":\"22\"},{\"code\":\"220602\",\"name\":\"浑江区\",\"cityCode\":\"2206\",\"provinceCode\":\"22\"},{\"code\":\"220605\",\"name\":\"江源区\",\"cityCode\":\"2206\",\"provinceCode\":\"22\"},{\"code\":\"220621\",\"name\":\"抚松县\",\"cityCode\":\"2206\",\"provinceCode\":\"22\"},{\"code\":\"220622\",\"name\":\"靖宇县\",\"cityCode\":\"2206\",\"provinceCode\":\"22\"},{\"code\":\"220623\",\"name\":\"长白朝鲜族自治县\",\"cityCode\":\"2206\",\"provinceCode\":\"22\"},{\"code\":\"220681\",\"name\":\"临江市\",\"cityCode\":\"2206\",\"provinceCode\":\"22\"},{\"code\":\"220702\",\"name\":\"宁江区\",\"cityCode\":\"2207\",\"provinceCode\":\"22\"},{\"code\":\"220721\",\"name\":\"前郭尔罗斯蒙古族自治县\",\"cityCode\":\"2207\",\"provinceCode\":\"22\"},{\"code\":\"220722\",\"name\":\"长岭县\",\"cityCode\":\"2207\",\"provinceCode\":\"22\"},{\"code\":\"220723\",\"name\":\"乾安县\",\"cityCode\":\"2207\",\"provinceCode\":\"22\"},{\"code\":\"220771\",\"name\":\"吉林松原经济开发区\",\"cityCode\":\"2207\",\"provinceCode\":\"22\"},{\"code\":\"220781\",\"name\":\"扶余市\",\"cityCode\":\"2207\",\"provinceCode\":\"22\"},{\"code\":\"220802\",\"name\":\"洮北区\",\"cityCode\":\"2208\",\"provinceCode\":\"22\"},{\"code\":\"220821\",\"name\":\"镇赉县\",\"cityCode\":\"2208\",\"provinceCode\":\"22\"},{\"code\":\"220822\",\"name\":\"通榆县\",\"cityCode\":\"2208\",\"provinceCode\":\"22\"},{\"code\":\"220871\",\"name\":\"吉林白城经济开发区\",\"cityCode\":\"2208\",\"provinceCode\":\"22\"},{\"code\":\"220881\",\"name\":\"洮南市\",\"cityCode\":\"2208\",\"provinceCode\":\"22\"},{\"code\":\"220882\",\"name\":\"大安市\",\"cityCode\":\"2208\",\"provinceCode\":\"22\"},{\"code\":\"222401\",\"name\":\"延吉市\",\"cityCode\":\"2224\",\"provinceCode\":\"22\"},{\"code\":\"222402\",\"name\":\"图们市\",\"cityCode\":\"2224\",\"provinceCode\":\"22\"},{\"code\":\"222403\",\"name\":\"敦化市\",\"cityCode\":\"2224\",\"provinceCode\":\"22\"},{\"code\":\"222404\",\"name\":\"珲春市\",\"cityCode\":\"2224\",\"provinceCode\":\"22\"},{\"code\":\"222405\",\"name\":\"龙井市\",\"cityCode\":\"2224\",\"provinceCode\":\"22\"},{\"code\":\"222406\",\"name\":\"和龙市\",\"cityCode\":\"2224\",\"provinceCode\":\"22\"},{\"code\":\"222424\",\"name\":\"汪清县\",\"cityCode\":\"2224\",\"provinceCode\":\"22\"},{\"code\":\"222426\",\"name\":\"安图县\",\"cityCode\":\"2224\",\"provinceCode\":\"22\"},{\"code\":\"230102\",\"name\":\"道里区\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230103\",\"name\":\"南岗区\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230104\",\"name\":\"道外区\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230108\",\"name\":\"平房区\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230109\",\"name\":\"松北区\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230110\",\"name\":\"香坊区\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230111\",\"name\":\"呼兰区\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230112\",\"name\":\"阿城区\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230113\",\"name\":\"双城区\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230123\",\"name\":\"依兰县\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230124\",\"name\":\"方正县\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230125\",\"name\":\"宾县\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230126\",\"name\":\"巴彦县\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230127\",\"name\":\"木兰县\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230128\",\"name\":\"通河县\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230129\",\"name\":\"延寿县\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230183\",\"name\":\"尚志市\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230184\",\"name\":\"五常市\",\"cityCode\":\"2301\",\"provinceCode\":\"23\"},{\"code\":\"230202\",\"name\":\"龙沙区\",\"cityCode\":\"2302\",\"provinceCode\":\"23\"},{\"code\":\"230203\",\"name\":\"建华区\",\"cityCode\":\"2302\",\"provinceCode\":\"23\"},{\"code\":\"230204\",\"name\":\"铁锋区\",\"cityCode\":\"2302\",\"provinceCode\":\"23\"},{\"code\":\"230205\",\"name\":\"昂昂溪区\",\"cityCode\":\"2302\",\"provinceCode\":\"23\"},{\"code\":\"230206\",\"name\":\"富拉尔基区\",\"cityCode\":\"2302\",\"provinceCode\":\"23\"},{\"code\":\"230207\",\"name\":\"碾子山区\",\"cityCode\":\"2302\",\"provinceCode\":\"23\"},{\"code\":\"230208\",\"name\":\"梅里斯达斡尔族区\",\"cityCode\":\"2302\",\"provinceCode\":\"23\"},{\"code\":\"230221\",\"name\":\"龙江县\",\"cityCode\":\"2302\",\"provinceCode\":\"23\"},{\"code\":\"230223\",\"name\":\"依安县\",\"cityCode\":\"2302\",\"provinceCode\":\"23\"},{\"code\":\"230224\",\"name\":\"泰来县\",\"cityCode\":\"2302\",\"provinceCode\":\"23\"},{\"code\":\"230225\",\"name\":\"甘南县\",\"cityCode\":\"2302\",\"provinceCode\":\"23\"},{\"code\":\"230227\",\"name\":\"富裕县\",\"cityCode\":\"2302\",\"provinceCode\":\"23\"},{\"code\":\"230229\",\"name\":\"克山县\",\"cityCode\":\"2302\",\"provinceCode\":\"23\"},{\"code\":\"230230\",\"name\":\"克东县\",\"cityCode\":\"2302\",\"provinceCode\":\"23\"},{\"code\":\"230231\",\"name\":\"拜泉县\",\"cityCode\":\"2302\",\"provinceCode\":\"23\"},{\"code\":\"230281\",\"name\":\"讷河市\",\"cityCode\":\"2302\",\"provinceCode\":\"23\"},{\"code\":\"230302\",\"name\":\"鸡冠区\",\"cityCode\":\"2303\",\"provinceCode\":\"23\"},{\"code\":\"230303\",\"name\":\"恒山区\",\"cityCode\":\"2303\",\"provinceCode\":\"23\"},{\"code\":\"230304\",\"name\":\"滴道区\",\"cityCode\":\"2303\",\"provinceCode\":\"23\"},{\"code\":\"230305\",\"name\":\"梨树区\",\"cityCode\":\"2303\",\"provinceCode\":\"23\"},{\"code\":\"230306\",\"name\":\"城子河区\",\"cityCode\":\"2303\",\"provinceCode\":\"23\"},{\"code\":\"230307\",\"name\":\"麻山区\",\"cityCode\":\"2303\",\"provinceCode\":\"23\"},{\"code\":\"230321\",\"name\":\"鸡东县\",\"cityCode\":\"2303\",\"provinceCode\":\"23\"},{\"code\":\"230381\",\"name\":\"虎林市\",\"cityCode\":\"2303\",\"provinceCode\":\"23\"},{\"code\":\"230382\",\"name\":\"密山市\",\"cityCode\":\"2303\",\"provinceCode\":\"23\"},{\"code\":\"230402\",\"name\":\"向阳区\",\"cityCode\":\"2304\",\"provinceCode\":\"23\"},{\"code\":\"230403\",\"name\":\"工农区\",\"cityCode\":\"2304\",\"provinceCode\":\"23\"},{\"code\":\"230404\",\"name\":\"南山区\",\"cityCode\":\"2304\",\"provinceCode\":\"23\"},{\"code\":\"230405\",\"name\":\"兴安区\",\"cityCode\":\"2304\",\"provinceCode\":\"23\"},{\"code\":\"230406\",\"name\":\"东山区\",\"cityCode\":\"2304\",\"provinceCode\":\"23\"},{\"code\":\"230407\",\"name\":\"兴山区\",\"cityCode\":\"2304\",\"provinceCode\":\"23\"},{\"code\":\"230421\",\"name\":\"萝北县\",\"cityCode\":\"2304\",\"provinceCode\":\"23\"},{\"code\":\"230422\",\"name\":\"绥滨县\",\"cityCode\":\"2304\",\"provinceCode\":\"23\"},{\"code\":\"230502\",\"name\":\"尖山区\",\"cityCode\":\"2305\",\"provinceCode\":\"23\"},{\"code\":\"230503\",\"name\":\"岭东区\",\"cityCode\":\"2305\",\"provinceCode\":\"23\"},{\"code\":\"230505\",\"name\":\"四方台区\",\"cityCode\":\"2305\",\"provinceCode\":\"23\"},{\"code\":\"230506\",\"name\":\"宝山区\",\"cityCode\":\"2305\",\"provinceCode\":\"23\"},{\"code\":\"230521\",\"name\":\"集贤县\",\"cityCode\":\"2305\",\"provinceCode\":\"23\"},{\"code\":\"230522\",\"name\":\"友谊县\",\"cityCode\":\"2305\",\"provinceCode\":\"23\"},{\"code\":\"230523\",\"name\":\"宝清县\",\"cityCode\":\"2305\",\"provinceCode\":\"23\"},{\"code\":\"230524\",\"name\":\"饶河县\",\"cityCode\":\"2305\",\"provinceCode\":\"23\"},{\"code\":\"230602\",\"name\":\"萨尔图区\",\"cityCode\":\"2306\",\"provinceCode\":\"23\"},{\"code\":\"230603\",\"name\":\"龙凤区\",\"cityCode\":\"2306\",\"provinceCode\":\"23\"},{\"code\":\"230604\",\"name\":\"让胡路区\",\"cityCode\":\"2306\",\"provinceCode\":\"23\"},{\"code\":\"230605\",\"name\":\"红岗区\",\"cityCode\":\"2306\",\"provinceCode\":\"23\"},{\"code\":\"230606\",\"name\":\"大同区\",\"cityCode\":\"2306\",\"provinceCode\":\"23\"},{\"code\":\"230621\",\"name\":\"肇州县\",\"cityCode\":\"2306\",\"provinceCode\":\"23\"},{\"code\":\"230622\",\"name\":\"肇源县\",\"cityCode\":\"2306\",\"provinceCode\":\"23\"},{\"code\":\"230623\",\"name\":\"林甸县\",\"cityCode\":\"2306\",\"provinceCode\":\"23\"},{\"code\":\"230624\",\"name\":\"杜尔伯特蒙古族自治县\",\"cityCode\":\"2306\",\"provinceCode\":\"23\"},{\"code\":\"230671\",\"name\":\"大庆高新技术产业开发区\",\"cityCode\":\"2306\",\"provinceCode\":\"23\"},{\"code\":\"230702\",\"name\":\"伊春区\",\"cityCode\":\"2307\",\"provinceCode\":\"23\"},{\"code\":\"230703\",\"name\":\"南岔区\",\"cityCode\":\"2307\",\"provinceCode\":\"23\"},{\"code\":\"230704\",\"name\":\"友好区\",\"cityCode\":\"2307\",\"provinceCode\":\"23\"},{\"code\":\"230705\",\"name\":\"西林区\",\"cityCode\":\"2307\",\"provinceCode\":\"23\"},{\"code\":\"230706\",\"name\":\"翠峦区\",\"cityCode\":\"2307\",\"provinceCode\":\"23\"},{\"code\":\"230707\",\"name\":\"新青区\",\"cityCode\":\"2307\",\"provinceCode\":\"23\"},{\"code\":\"230708\",\"name\":\"美溪区\",\"cityCode\":\"2307\",\"provinceCode\":\"23\"},{\"code\":\"230709\",\"name\":\"金山屯区\",\"cityCode\":\"2307\",\"provinceCode\":\"23\"},{\"code\":\"230710\",\"name\":\"五营区\",\"cityCode\":\"2307\",\"provinceCode\":\"23\"},{\"code\":\"230711\",\"name\":\"乌马河区\",\"cityCode\":\"2307\",\"provinceCode\":\"23\"},{\"code\":\"230712\",\"name\":\"汤旺河区\",\"cityCode\":\"2307\",\"provinceCode\":\"23\"},{\"code\":\"230713\",\"name\":\"带岭区\",\"cityCode\":\"2307\",\"provinceCode\":\"23\"},{\"code\":\"230714\",\"name\":\"乌伊岭区\",\"cityCode\":\"2307\",\"provinceCode\":\"23\"},{\"code\":\"230715\",\"name\":\"红星区\",\"cityCode\":\"2307\",\"provinceCode\":\"23\"},{\"code\":\"230716\",\"name\":\"上甘岭区\",\"cityCode\":\"2307\",\"provinceCode\":\"23\"},{\"code\":\"230722\",\"name\":\"嘉荫县\",\"cityCode\":\"2307\",\"provinceCode\":\"23\"},{\"code\":\"230781\",\"name\":\"铁力市\",\"cityCode\":\"2307\",\"provinceCode\":\"23\"},{\"code\":\"230803\",\"name\":\"向阳区\",\"cityCode\":\"2308\",\"provinceCode\":\"23\"},{\"code\":\"230804\",\"name\":\"前进区\",\"cityCode\":\"2308\",\"provinceCode\":\"23\"},{\"code\":\"230805\",\"name\":\"东风区\",\"cityCode\":\"2308\",\"provinceCode\":\"23\"},{\"code\":\"230811\",\"name\":\"郊区\",\"cityCode\":\"2308\",\"provinceCode\":\"23\"},{\"code\":\"230822\",\"name\":\"桦南县\",\"cityCode\":\"2308\",\"provinceCode\":\"23\"},{\"code\":\"230826\",\"name\":\"桦川县\",\"cityCode\":\"2308\",\"provinceCode\":\"23\"},{\"code\":\"230828\",\"name\":\"汤原县\",\"cityCode\":\"2308\",\"provinceCode\":\"23\"},{\"code\":\"230881\",\"name\":\"同江市\",\"cityCode\":\"2308\",\"provinceCode\":\"23\"},{\"code\":\"230882\",\"name\":\"富锦市\",\"cityCode\":\"2308\",\"provinceCode\":\"23\"},{\"code\":\"230883\",\"name\":\"抚远市\",\"cityCode\":\"2308\",\"provinceCode\":\"23\"},{\"code\":\"230902\",\"name\":\"新兴区\",\"cityCode\":\"2309\",\"provinceCode\":\"23\"},{\"code\":\"230903\",\"name\":\"桃山区\",\"cityCode\":\"2309\",\"provinceCode\":\"23\"},{\"code\":\"230904\",\"name\":\"茄子河区\",\"cityCode\":\"2309\",\"provinceCode\":\"23\"},{\"code\":\"230921\",\"name\":\"勃利县\",\"cityCode\":\"2309\",\"provinceCode\":\"23\"},{\"code\":\"231002\",\"name\":\"东安区\",\"cityCode\":\"2310\",\"provinceCode\":\"23\"},{\"code\":\"231003\",\"name\":\"阳明区\",\"cityCode\":\"2310\",\"provinceCode\":\"23\"},{\"code\":\"231004\",\"name\":\"爱民区\",\"cityCode\":\"2310\",\"provinceCode\":\"23\"},{\"code\":\"231005\",\"name\":\"西安区\",\"cityCode\":\"2310\",\"provinceCode\":\"23\"},{\"code\":\"231025\",\"name\":\"林口县\",\"cityCode\":\"2310\",\"provinceCode\":\"23\"},{\"code\":\"231071\",\"name\":\"牡丹江经济技术开发区\",\"cityCode\":\"2310\",\"provinceCode\":\"23\"},{\"code\":\"231081\",\"name\":\"绥芬河市\",\"cityCode\":\"2310\",\"provinceCode\":\"23\"},{\"code\":\"231083\",\"name\":\"海林市\",\"cityCode\":\"2310\",\"provinceCode\":\"23\"},{\"code\":\"231084\",\"name\":\"宁安市\",\"cityCode\":\"2310\",\"provinceCode\":\"23\"},{\"code\":\"231085\",\"name\":\"穆棱市\",\"cityCode\":\"2310\",\"provinceCode\":\"23\"},{\"code\":\"231086\",\"name\":\"东宁市\",\"cityCode\":\"2310\",\"provinceCode\":\"23\"},{\"code\":\"231102\",\"name\":\"爱辉区\",\"cityCode\":\"2311\",\"provinceCode\":\"23\"},{\"code\":\"231121\",\"name\":\"嫩江县\",\"cityCode\":\"2311\",\"provinceCode\":\"23\"},{\"code\":\"231123\",\"name\":\"逊克县\",\"cityCode\":\"2311\",\"provinceCode\":\"23\"},{\"code\":\"231124\",\"name\":\"孙吴县\",\"cityCode\":\"2311\",\"provinceCode\":\"23\"},{\"code\":\"231181\",\"name\":\"北安市\",\"cityCode\":\"2311\",\"provinceCode\":\"23\"},{\"code\":\"231182\",\"name\":\"五大连池市\",\"cityCode\":\"2311\",\"provinceCode\":\"23\"},{\"code\":\"231202\",\"name\":\"北林区\",\"cityCode\":\"2312\",\"provinceCode\":\"23\"},{\"code\":\"231221\",\"name\":\"望奎县\",\"cityCode\":\"2312\",\"provinceCode\":\"23\"},{\"code\":\"231222\",\"name\":\"兰西县\",\"cityCode\":\"2312\",\"provinceCode\":\"23\"},{\"code\":\"231223\",\"name\":\"青冈县\",\"cityCode\":\"2312\",\"provinceCode\":\"23\"},{\"code\":\"231224\",\"name\":\"庆安县\",\"cityCode\":\"2312\",\"provinceCode\":\"23\"},{\"code\":\"231225\",\"name\":\"明水县\",\"cityCode\":\"2312\",\"provinceCode\":\"23\"},{\"code\":\"231226\",\"name\":\"绥棱县\",\"cityCode\":\"2312\",\"provinceCode\":\"23\"},{\"code\":\"231281\",\"name\":\"安达市\",\"cityCode\":\"2312\",\"provinceCode\":\"23\"},{\"code\":\"231282\",\"name\":\"肇东市\",\"cityCode\":\"2312\",\"provinceCode\":\"23\"},{\"code\":\"231283\",\"name\":\"海伦市\",\"cityCode\":\"2312\",\"provinceCode\":\"23\"},{\"code\":\"232701\",\"name\":\"加格达奇区\",\"cityCode\":\"2327\",\"provinceCode\":\"23\"},{\"code\":\"232702\",\"name\":\"松岭区\",\"cityCode\":\"2327\",\"provinceCode\":\"23\"},{\"code\":\"232703\",\"name\":\"新林区\",\"cityCode\":\"2327\",\"provinceCode\":\"23\"},{\"code\":\"232704\",\"name\":\"呼中区\",\"cityCode\":\"2327\",\"provinceCode\":\"23\"},{\"code\":\"232721\",\"name\":\"呼玛县\",\"cityCode\":\"2327\",\"provinceCode\":\"23\"},{\"code\":\"232722\",\"name\":\"塔河县\",\"cityCode\":\"2327\",\"provinceCode\":\"23\"},{\"code\":\"232723\",\"name\":\"漠河县\",\"cityCode\":\"2327\",\"provinceCode\":\"23\"},{\"code\":\"310101\",\"name\":\"黄浦区\",\"cityCode\":\"3101\",\"provinceCode\":\"31\"},{\"code\":\"310104\",\"name\":\"徐汇区\",\"cityCode\":\"3101\",\"provinceCode\":\"31\"},{\"code\":\"310105\",\"name\":\"长宁区\",\"cityCode\":\"3101\",\"provinceCode\":\"31\"},{\"code\":\"310106\",\"name\":\"静安区\",\"cityCode\":\"3101\",\"provinceCode\":\"31\"},{\"code\":\"310107\",\"name\":\"普陀区\",\"cityCode\":\"3101\",\"provinceCode\":\"31\"},{\"code\":\"310109\",\"name\":\"虹口区\",\"cityCode\":\"3101\",\"provinceCode\":\"31\"},{\"code\":\"310110\",\"name\":\"杨浦区\",\"cityCode\":\"3101\",\"provinceCode\":\"31\"},{\"code\":\"310112\",\"name\":\"闵行区\",\"cityCode\":\"3101\",\"provinceCode\":\"31\"},{\"code\":\"310113\",\"name\":\"宝山区\",\"cityCode\":\"3101\",\"provinceCode\":\"31\"},{\"code\":\"310114\",\"name\":\"嘉定区\",\"cityCode\":\"3101\",\"provinceCode\":\"31\"},{\"code\":\"310115\",\"name\":\"浦东新区\",\"cityCode\":\"3101\",\"provinceCode\":\"31\"},{\"code\":\"310116\",\"name\":\"金山区\",\"cityCode\":\"3101\",\"provinceCode\":\"31\"},{\"code\":\"310117\",\"name\":\"松江区\",\"cityCode\":\"3101\",\"provinceCode\":\"31\"},{\"code\":\"310118\",\"name\":\"青浦区\",\"cityCode\":\"3101\",\"provinceCode\":\"31\"},{\"code\":\"310120\",\"name\":\"奉贤区\",\"cityCode\":\"3101\",\"provinceCode\":\"31\"},{\"code\":\"310151\",\"name\":\"崇明区\",\"cityCode\":\"3101\",\"provinceCode\":\"31\"},{\"code\":\"320102\",\"name\":\"玄武区\",\"cityCode\":\"3201\",\"provinceCode\":\"32\"},{\"code\":\"320104\",\"name\":\"秦淮区\",\"cityCode\":\"3201\",\"provinceCode\":\"32\"},{\"code\":\"320105\",\"name\":\"建邺区\",\"cityCode\":\"3201\",\"provinceCode\":\"32\"},{\"code\":\"320106\",\"name\":\"鼓楼区\",\"cityCode\":\"3201\",\"provinceCode\":\"32\"},{\"code\":\"320111\",\"name\":\"浦口区\",\"cityCode\":\"3201\",\"provinceCode\":\"32\"},{\"code\":\"320113\",\"name\":\"栖霞区\",\"cityCode\":\"3201\",\"provinceCode\":\"32\"},{\"code\":\"320114\",\"name\":\"雨花台区\",\"cityCode\":\"3201\",\"provinceCode\":\"32\"},{\"code\":\"320115\",\"name\":\"江宁区\",\"cityCode\":\"3201\",\"provinceCode\":\"32\"},{\"code\":\"320116\",\"name\":\"六合区\",\"cityCode\":\"3201\",\"provinceCode\":\"32\"},{\"code\":\"320117\",\"name\":\"溧水区\",\"cityCode\":\"3201\",\"provinceCode\":\"32\"},{\"code\":\"320118\",\"name\":\"高淳区\",\"cityCode\":\"3201\",\"provinceCode\":\"32\"},{\"code\":\"320205\",\"name\":\"锡山区\",\"cityCode\":\"3202\",\"provinceCode\":\"32\"},{\"code\":\"320206\",\"name\":\"惠山区\",\"cityCode\":\"3202\",\"provinceCode\":\"32\"},{\"code\":\"320211\",\"name\":\"滨湖区\",\"cityCode\":\"3202\",\"provinceCode\":\"32\"},{\"code\":\"320213\",\"name\":\"梁溪区\",\"cityCode\":\"3202\",\"provinceCode\":\"32\"},{\"code\":\"320214\",\"name\":\"新吴区\",\"cityCode\":\"3202\",\"provinceCode\":\"32\"},{\"code\":\"320281\",\"name\":\"江阴市\",\"cityCode\":\"3202\",\"provinceCode\":\"32\"},{\"code\":\"320282\",\"name\":\"宜兴市\",\"cityCode\":\"3202\",\"provinceCode\":\"32\"},{\"code\":\"320302\",\"name\":\"鼓楼区\",\"cityCode\":\"3203\",\"provinceCode\":\"32\"},{\"code\":\"320303\",\"name\":\"云龙区\",\"cityCode\":\"3203\",\"provinceCode\":\"32\"},{\"code\":\"320305\",\"name\":\"贾汪区\",\"cityCode\":\"3203\",\"provinceCode\":\"32\"},{\"code\":\"320311\",\"name\":\"泉山区\",\"cityCode\":\"3203\",\"provinceCode\":\"32\"},{\"code\":\"320312\",\"name\":\"铜山区\",\"cityCode\":\"3203\",\"provinceCode\":\"32\"},{\"code\":\"320321\",\"name\":\"丰县\",\"cityCode\":\"3203\",\"provinceCode\":\"32\"},{\"code\":\"320322\",\"name\":\"沛县\",\"cityCode\":\"3203\",\"provinceCode\":\"32\"},{\"code\":\"320324\",\"name\":\"睢宁县\",\"cityCode\":\"3203\",\"provinceCode\":\"32\"},{\"code\":\"320371\",\"name\":\"徐州经济技术开发区\",\"cityCode\":\"3203\",\"provinceCode\":\"32\"},{\"code\":\"320381\",\"name\":\"新沂市\",\"cityCode\":\"3203\",\"provinceCode\":\"32\"},{\"code\":\"320382\",\"name\":\"邳州市\",\"cityCode\":\"3203\",\"provinceCode\":\"32\"},{\"code\":\"320402\",\"name\":\"天宁区\",\"cityCode\":\"3204\",\"provinceCode\":\"32\"},{\"code\":\"320404\",\"name\":\"钟楼区\",\"cityCode\":\"3204\",\"provinceCode\":\"32\"},{\"code\":\"320411\",\"name\":\"新北区\",\"cityCode\":\"3204\",\"provinceCode\":\"32\"},{\"code\":\"320412\",\"name\":\"武进区\",\"cityCode\":\"3204\",\"provinceCode\":\"32\"},{\"code\":\"320413\",\"name\":\"金坛区\",\"cityCode\":\"3204\",\"provinceCode\":\"32\"},{\"code\":\"320481\",\"name\":\"溧阳市\",\"cityCode\":\"3204\",\"provinceCode\":\"32\"},{\"code\":\"320505\",\"name\":\"虎丘区\",\"cityCode\":\"3205\",\"provinceCode\":\"32\"},{\"code\":\"320506\",\"name\":\"吴中区\",\"cityCode\":\"3205\",\"provinceCode\":\"32\"},{\"code\":\"320507\",\"name\":\"相城区\",\"cityCode\":\"3205\",\"provinceCode\":\"32\"},{\"code\":\"320508\",\"name\":\"姑苏区\",\"cityCode\":\"3205\",\"provinceCode\":\"32\"},{\"code\":\"320509\",\"name\":\"吴江区\",\"cityCode\":\"3205\",\"provinceCode\":\"32\"},{\"code\":\"320571\",\"name\":\"苏州工业园区\",\"cityCode\":\"3205\",\"provinceCode\":\"32\"},{\"code\":\"320581\",\"name\":\"常熟市\",\"cityCode\":\"3205\",\"provinceCode\":\"32\"},{\"code\":\"320582\",\"name\":\"张家港市\",\"cityCode\":\"3205\",\"provinceCode\":\"32\"},{\"code\":\"320583\",\"name\":\"昆山市\",\"cityCode\":\"3205\",\"provinceCode\":\"32\"},{\"code\":\"320585\",\"name\":\"太仓市\",\"cityCode\":\"3205\",\"provinceCode\":\"32\"},{\"code\":\"320602\",\"name\":\"崇川区\",\"cityCode\":\"3206\",\"provinceCode\":\"32\"},{\"code\":\"320611\",\"name\":\"港闸区\",\"cityCode\":\"3206\",\"provinceCode\":\"32\"},{\"code\":\"320612\",\"name\":\"通州区\",\"cityCode\":\"3206\",\"provinceCode\":\"32\"},{\"code\":\"320621\",\"name\":\"海安县\",\"cityCode\":\"3206\",\"provinceCode\":\"32\"},{\"code\":\"320623\",\"name\":\"如东县\",\"cityCode\":\"3206\",\"provinceCode\":\"32\"},{\"code\":\"320671\",\"name\":\"南通经济技术开发区\",\"cityCode\":\"3206\",\"provinceCode\":\"32\"},{\"code\":\"320681\",\"name\":\"启东市\",\"cityCode\":\"3206\",\"provinceCode\":\"32\"},{\"code\":\"320682\",\"name\":\"如皋市\",\"cityCode\":\"3206\",\"provinceCode\":\"32\"},{\"code\":\"320684\",\"name\":\"海门市\",\"cityCode\":\"3206\",\"provinceCode\":\"32\"},{\"code\":\"320703\",\"name\":\"连云区\",\"cityCode\":\"3207\",\"provinceCode\":\"32\"},{\"code\":\"320706\",\"name\":\"海州区\",\"cityCode\":\"3207\",\"provinceCode\":\"32\"},{\"code\":\"320707\",\"name\":\"赣榆区\",\"cityCode\":\"3207\",\"provinceCode\":\"32\"},{\"code\":\"320722\",\"name\":\"东海县\",\"cityCode\":\"3207\",\"provinceCode\":\"32\"},{\"code\":\"320723\",\"name\":\"灌云县\",\"cityCode\":\"3207\",\"provinceCode\":\"32\"},{\"code\":\"320724\",\"name\":\"灌南县\",\"cityCode\":\"3207\",\"provinceCode\":\"32\"},{\"code\":\"320771\",\"name\":\"连云港经济技术开发区\",\"cityCode\":\"3207\",\"provinceCode\":\"32\"},{\"code\":\"320772\",\"name\":\"连云港高新技术产业开发区\",\"cityCode\":\"3207\",\"provinceCode\":\"32\"},{\"code\":\"320803\",\"name\":\"淮安区\",\"cityCode\":\"3208\",\"provinceCode\":\"32\"},{\"code\":\"320804\",\"name\":\"淮阴区\",\"cityCode\":\"3208\",\"provinceCode\":\"32\"},{\"code\":\"320812\",\"name\":\"清江浦区\",\"cityCode\":\"3208\",\"provinceCode\":\"32\"},{\"code\":\"320813\",\"name\":\"洪泽区\",\"cityCode\":\"3208\",\"provinceCode\":\"32\"},{\"code\":\"320826\",\"name\":\"涟水县\",\"cityCode\":\"3208\",\"provinceCode\":\"32\"},{\"code\":\"320830\",\"name\":\"盱眙县\",\"cityCode\":\"3208\",\"provinceCode\":\"32\"},{\"code\":\"320831\",\"name\":\"金湖县\",\"cityCode\":\"3208\",\"provinceCode\":\"32\"},{\"code\":\"320871\",\"name\":\"淮安经济技术开发区\",\"cityCode\":\"3208\",\"provinceCode\":\"32\"},{\"code\":\"320902\",\"name\":\"亭湖区\",\"cityCode\":\"3209\",\"provinceCode\":\"32\"},{\"code\":\"320903\",\"name\":\"盐都区\",\"cityCode\":\"3209\",\"provinceCode\":\"32\"},{\"code\":\"320904\",\"name\":\"大丰区\",\"cityCode\":\"3209\",\"provinceCode\":\"32\"},{\"code\":\"320921\",\"name\":\"响水县\",\"cityCode\":\"3209\",\"provinceCode\":\"32\"},{\"code\":\"320922\",\"name\":\"滨海县\",\"cityCode\":\"3209\",\"provinceCode\":\"32\"},{\"code\":\"320923\",\"name\":\"阜宁县\",\"cityCode\":\"3209\",\"provinceCode\":\"32\"},{\"code\":\"320924\",\"name\":\"射阳县\",\"cityCode\":\"3209\",\"provinceCode\":\"32\"},{\"code\":\"320925\",\"name\":\"建湖县\",\"cityCode\":\"3209\",\"provinceCode\":\"32\"},{\"code\":\"320971\",\"name\":\"盐城经济技术开发区\",\"cityCode\":\"3209\",\"provinceCode\":\"32\"},{\"code\":\"320981\",\"name\":\"东台市\",\"cityCode\":\"3209\",\"provinceCode\":\"32\"},{\"code\":\"321002\",\"name\":\"广陵区\",\"cityCode\":\"3210\",\"provinceCode\":\"32\"},{\"code\":\"321003\",\"name\":\"邗江区\",\"cityCode\":\"3210\",\"provinceCode\":\"32\"},{\"code\":\"321012\",\"name\":\"江都区\",\"cityCode\":\"3210\",\"provinceCode\":\"32\"},{\"code\":\"321023\",\"name\":\"宝应县\",\"cityCode\":\"3210\",\"provinceCode\":\"32\"},{\"code\":\"321071\",\"name\":\"扬州经济技术开发区\",\"cityCode\":\"3210\",\"provinceCode\":\"32\"},{\"code\":\"321081\",\"name\":\"仪征市\",\"cityCode\":\"3210\",\"provinceCode\":\"32\"},{\"code\":\"321084\",\"name\":\"高邮市\",\"cityCode\":\"3210\",\"provinceCode\":\"32\"},{\"code\":\"321102\",\"name\":\"京口区\",\"cityCode\":\"3211\",\"provinceCode\":\"32\"},{\"code\":\"321111\",\"name\":\"润州区\",\"cityCode\":\"3211\",\"provinceCode\":\"32\"},{\"code\":\"321112\",\"name\":\"丹徒区\",\"cityCode\":\"3211\",\"provinceCode\":\"32\"},{\"code\":\"321171\",\"name\":\"镇江新区\",\"cityCode\":\"3211\",\"provinceCode\":\"32\"},{\"code\":\"321181\",\"name\":\"丹阳市\",\"cityCode\":\"3211\",\"provinceCode\":\"32\"},{\"code\":\"321182\",\"name\":\"扬中市\",\"cityCode\":\"3211\",\"provinceCode\":\"32\"},{\"code\":\"321183\",\"name\":\"句容市\",\"cityCode\":\"3211\",\"provinceCode\":\"32\"},{\"code\":\"321202\",\"name\":\"海陵区\",\"cityCode\":\"3212\",\"provinceCode\":\"32\"},{\"code\":\"321203\",\"name\":\"高港区\",\"cityCode\":\"3212\",\"provinceCode\":\"32\"},{\"code\":\"321204\",\"name\":\"姜堰区\",\"cityCode\":\"3212\",\"provinceCode\":\"32\"},{\"code\":\"321271\",\"name\":\"泰州医药高新技术产业开发区\",\"cityCode\":\"3212\",\"provinceCode\":\"32\"},{\"code\":\"321281\",\"name\":\"兴化市\",\"cityCode\":\"3212\",\"provinceCode\":\"32\"},{\"code\":\"321282\",\"name\":\"靖江市\",\"cityCode\":\"3212\",\"provinceCode\":\"32\"},{\"code\":\"321283\",\"name\":\"泰兴市\",\"cityCode\":\"3212\",\"provinceCode\":\"32\"},{\"code\":\"321302\",\"name\":\"宿城区\",\"cityCode\":\"3213\",\"provinceCode\":\"32\"},{\"code\":\"321311\",\"name\":\"宿豫区\",\"cityCode\":\"3213\",\"provinceCode\":\"32\"},{\"code\":\"321322\",\"name\":\"沭阳县\",\"cityCode\":\"3213\",\"provinceCode\":\"32\"},{\"code\":\"321323\",\"name\":\"泗阳县\",\"cityCode\":\"3213\",\"provinceCode\":\"32\"},{\"code\":\"321324\",\"name\":\"泗洪县\",\"cityCode\":\"3213\",\"provinceCode\":\"32\"},{\"code\":\"321371\",\"name\":\"宿迁经济技术开发区\",\"cityCode\":\"3213\",\"provinceCode\":\"32\"},{\"code\":\"330102\",\"name\":\"上城区\",\"cityCode\":\"3301\",\"provinceCode\":\"33\"},{\"code\":\"330103\",\"name\":\"下城区\",\"cityCode\":\"3301\",\"provinceCode\":\"33\"},{\"code\":\"330104\",\"name\":\"江干区\",\"cityCode\":\"3301\",\"provinceCode\":\"33\"},{\"code\":\"330105\",\"name\":\"拱墅区\",\"cityCode\":\"3301\",\"provinceCode\":\"33\"},{\"code\":\"330106\",\"name\":\"西湖区\",\"cityCode\":\"3301\",\"provinceCode\":\"33\"},{\"code\":\"330108\",\"name\":\"滨江区\",\"cityCode\":\"3301\",\"provinceCode\":\"33\"},{\"code\":\"330109\",\"name\":\"萧山区\",\"cityCode\":\"3301\",\"provinceCode\":\"33\"},{\"code\":\"330110\",\"name\":\"余杭区\",\"cityCode\":\"3301\",\"provinceCode\":\"33\"},{\"code\":\"330111\",\"name\":\"富阳区\",\"cityCode\":\"3301\",\"provinceCode\":\"33\"},{\"code\":\"330112\",\"name\":\"临安区\",\"cityCode\":\"3301\",\"provinceCode\":\"33\"},{\"code\":\"330122\",\"name\":\"桐庐县\",\"cityCode\":\"3301\",\"provinceCode\":\"33\"},{\"code\":\"330127\",\"name\":\"淳安县\",\"cityCode\":\"3301\",\"provinceCode\":\"33\"},{\"code\":\"330182\",\"name\":\"建德市\",\"cityCode\":\"3301\",\"provinceCode\":\"33\"},{\"code\":\"330203\",\"name\":\"海曙区\",\"cityCode\":\"3302\",\"provinceCode\":\"33\"},{\"code\":\"330205\",\"name\":\"江北区\",\"cityCode\":\"3302\",\"provinceCode\":\"33\"},{\"code\":\"330206\",\"name\":\"北仑区\",\"cityCode\":\"3302\",\"provinceCode\":\"33\"},{\"code\":\"330211\",\"name\":\"镇海区\",\"cityCode\":\"3302\",\"provinceCode\":\"33\"},{\"code\":\"330212\",\"name\":\"鄞州区\",\"cityCode\":\"3302\",\"provinceCode\":\"33\"},{\"code\":\"330213\",\"name\":\"奉化区\",\"cityCode\":\"3302\",\"provinceCode\":\"33\"},{\"code\":\"330225\",\"name\":\"象山县\",\"cityCode\":\"3302\",\"provinceCode\":\"33\"},{\"code\":\"330226\",\"name\":\"宁海县\",\"cityCode\":\"3302\",\"provinceCode\":\"33\"},{\"code\":\"330281\",\"name\":\"余姚市\",\"cityCode\":\"3302\",\"provinceCode\":\"33\"},{\"code\":\"330282\",\"name\":\"慈溪市\",\"cityCode\":\"3302\",\"provinceCode\":\"33\"},{\"code\":\"330302\",\"name\":\"鹿城区\",\"cityCode\":\"3303\",\"provinceCode\":\"33\"},{\"code\":\"330303\",\"name\":\"龙湾区\",\"cityCode\":\"3303\",\"provinceCode\":\"33\"},{\"code\":\"330304\",\"name\":\"瓯海区\",\"cityCode\":\"3303\",\"provinceCode\":\"33\"},{\"code\":\"330305\",\"name\":\"洞头区\",\"cityCode\":\"3303\",\"provinceCode\":\"33\"},{\"code\":\"330324\",\"name\":\"永嘉县\",\"cityCode\":\"3303\",\"provinceCode\":\"33\"},{\"code\":\"330326\",\"name\":\"平阳县\",\"cityCode\":\"3303\",\"provinceCode\":\"33\"},{\"code\":\"330327\",\"name\":\"苍南县\",\"cityCode\":\"3303\",\"provinceCode\":\"33\"},{\"code\":\"330328\",\"name\":\"文成县\",\"cityCode\":\"3303\",\"provinceCode\":\"33\"},{\"code\":\"330329\",\"name\":\"泰顺县\",\"cityCode\":\"3303\",\"provinceCode\":\"33\"},{\"code\":\"330371\",\"name\":\"温州经济技术开发区\",\"cityCode\":\"3303\",\"provinceCode\":\"33\"},{\"code\":\"330381\",\"name\":\"瑞安市\",\"cityCode\":\"3303\",\"provinceCode\":\"33\"},{\"code\":\"330382\",\"name\":\"乐清市\",\"cityCode\":\"3303\",\"provinceCode\":\"33\"},{\"code\":\"330402\",\"name\":\"南湖区\",\"cityCode\":\"3304\",\"provinceCode\":\"33\"},{\"code\":\"330411\",\"name\":\"秀洲区\",\"cityCode\":\"3304\",\"provinceCode\":\"33\"},{\"code\":\"330421\",\"name\":\"嘉善县\",\"cityCode\":\"3304\",\"provinceCode\":\"33\"},{\"code\":\"330424\",\"name\":\"海盐县\",\"cityCode\":\"3304\",\"provinceCode\":\"33\"},{\"code\":\"330481\",\"name\":\"海宁市\",\"cityCode\":\"3304\",\"provinceCode\":\"33\"},{\"code\":\"330482\",\"name\":\"平湖市\",\"cityCode\":\"3304\",\"provinceCode\":\"33\"},{\"code\":\"330483\",\"name\":\"桐乡市\",\"cityCode\":\"3304\",\"provinceCode\":\"33\"},{\"code\":\"330502\",\"name\":\"吴兴区\",\"cityCode\":\"3305\",\"provinceCode\":\"33\"},{\"code\":\"330503\",\"name\":\"南浔区\",\"cityCode\":\"3305\",\"provinceCode\":\"33\"},{\"code\":\"330521\",\"name\":\"德清县\",\"cityCode\":\"3305\",\"provinceCode\":\"33\"},{\"code\":\"330522\",\"name\":\"长兴县\",\"cityCode\":\"3305\",\"provinceCode\":\"33\"},{\"code\":\"330523\",\"name\":\"安吉县\",\"cityCode\":\"3305\",\"provinceCode\":\"33\"},{\"code\":\"330602\",\"name\":\"越城区\",\"cityCode\":\"3306\",\"provinceCode\":\"33\"},{\"code\":\"330603\",\"name\":\"柯桥区\",\"cityCode\":\"3306\",\"provinceCode\":\"33\"},{\"code\":\"330604\",\"name\":\"上虞区\",\"cityCode\":\"3306\",\"provinceCode\":\"33\"},{\"code\":\"330624\",\"name\":\"新昌县\",\"cityCode\":\"3306\",\"provinceCode\":\"33\"},{\"code\":\"330681\",\"name\":\"诸暨市\",\"cityCode\":\"3306\",\"provinceCode\":\"33\"},{\"code\":\"330683\",\"name\":\"嵊州市\",\"cityCode\":\"3306\",\"provinceCode\":\"33\"},{\"code\":\"330702\",\"name\":\"婺城区\",\"cityCode\":\"3307\",\"provinceCode\":\"33\"},{\"code\":\"330703\",\"name\":\"金东区\",\"cityCode\":\"3307\",\"provinceCode\":\"33\"},{\"code\":\"330723\",\"name\":\"武义县\",\"cityCode\":\"3307\",\"provinceCode\":\"33\"},{\"code\":\"330726\",\"name\":\"浦江县\",\"cityCode\":\"3307\",\"provinceCode\":\"33\"},{\"code\":\"330727\",\"name\":\"磐安县\",\"cityCode\":\"3307\",\"provinceCode\":\"33\"},{\"code\":\"330781\",\"name\":\"兰溪市\",\"cityCode\":\"3307\",\"provinceCode\":\"33\"},{\"code\":\"330782\",\"name\":\"义乌市\",\"cityCode\":\"3307\",\"provinceCode\":\"33\"},{\"code\":\"330783\",\"name\":\"东阳市\",\"cityCode\":\"3307\",\"provinceCode\":\"33\"},{\"code\":\"330784\",\"name\":\"永康市\",\"cityCode\":\"3307\",\"provinceCode\":\"33\"},{\"code\":\"330802\",\"name\":\"柯城区\",\"cityCode\":\"3308\",\"provinceCode\":\"33\"},{\"code\":\"330803\",\"name\":\"衢江区\",\"cityCode\":\"3308\",\"provinceCode\":\"33\"},{\"code\":\"330822\",\"name\":\"常山县\",\"cityCode\":\"3308\",\"provinceCode\":\"33\"},{\"code\":\"330824\",\"name\":\"开化县\",\"cityCode\":\"3308\",\"provinceCode\":\"33\"},{\"code\":\"330825\",\"name\":\"龙游县\",\"cityCode\":\"3308\",\"provinceCode\":\"33\"},{\"code\":\"330881\",\"name\":\"江山市\",\"cityCode\":\"3308\",\"provinceCode\":\"33\"},{\"code\":\"330902\",\"name\":\"定海区\",\"cityCode\":\"3309\",\"provinceCode\":\"33\"},{\"code\":\"330903\",\"name\":\"普陀区\",\"cityCode\":\"3309\",\"provinceCode\":\"33\"},{\"code\":\"330921\",\"name\":\"岱山县\",\"cityCode\":\"3309\",\"provinceCode\":\"33\"},{\"code\":\"330922\",\"name\":\"嵊泗县\",\"cityCode\":\"3309\",\"provinceCode\":\"33\"},{\"code\":\"331002\",\"name\":\"椒江区\",\"cityCode\":\"3310\",\"provinceCode\":\"33\"},{\"code\":\"331003\",\"name\":\"黄岩区\",\"cityCode\":\"3310\",\"provinceCode\":\"33\"},{\"code\":\"331004\",\"name\":\"路桥区\",\"cityCode\":\"3310\",\"provinceCode\":\"33\"},{\"code\":\"331022\",\"name\":\"三门县\",\"cityCode\":\"3310\",\"provinceCode\":\"33\"},{\"code\":\"331023\",\"name\":\"天台县\",\"cityCode\":\"3310\",\"provinceCode\":\"33\"},{\"code\":\"331024\",\"name\":\"仙居县\",\"cityCode\":\"3310\",\"provinceCode\":\"33\"},{\"code\":\"331081\",\"name\":\"温岭市\",\"cityCode\":\"3310\",\"provinceCode\":\"33\"},{\"code\":\"331082\",\"name\":\"临海市\",\"cityCode\":\"3310\",\"provinceCode\":\"33\"},{\"code\":\"331083\",\"name\":\"玉环市\",\"cityCode\":\"3310\",\"provinceCode\":\"33\"},{\"code\":\"331102\",\"name\":\"莲都区\",\"cityCode\":\"3311\",\"provinceCode\":\"33\"},{\"code\":\"331121\",\"name\":\"青田县\",\"cityCode\":\"3311\",\"provinceCode\":\"33\"},{\"code\":\"331122\",\"name\":\"缙云县\",\"cityCode\":\"3311\",\"provinceCode\":\"33\"},{\"code\":\"331123\",\"name\":\"遂昌县\",\"cityCode\":\"3311\",\"provinceCode\":\"33\"},{\"code\":\"331124\",\"name\":\"松阳县\",\"cityCode\":\"3311\",\"provinceCode\":\"33\"},{\"code\":\"331125\",\"name\":\"云和县\",\"cityCode\":\"3311\",\"provinceCode\":\"33\"},{\"code\":\"331126\",\"name\":\"庆元县\",\"cityCode\":\"3311\",\"provinceCode\":\"33\"},{\"code\":\"331127\",\"name\":\"景宁畲族自治县\",\"cityCode\":\"3311\",\"provinceCode\":\"33\"},{\"code\":\"331181\",\"name\":\"龙泉市\",\"cityCode\":\"3311\",\"provinceCode\":\"33\"},{\"code\":\"340102\",\"name\":\"瑶海区\",\"cityCode\":\"3401\",\"provinceCode\":\"34\"},{\"code\":\"340103\",\"name\":\"庐阳区\",\"cityCode\":\"3401\",\"provinceCode\":\"34\"},{\"code\":\"340104\",\"name\":\"蜀山区\",\"cityCode\":\"3401\",\"provinceCode\":\"34\"},{\"code\":\"340111\",\"name\":\"包河区\",\"cityCode\":\"3401\",\"provinceCode\":\"34\"},{\"code\":\"340121\",\"name\":\"长丰县\",\"cityCode\":\"3401\",\"provinceCode\":\"34\"},{\"code\":\"340122\",\"name\":\"肥东县\",\"cityCode\":\"3401\",\"provinceCode\":\"34\"},{\"code\":\"340123\",\"name\":\"肥西县\",\"cityCode\":\"3401\",\"provinceCode\":\"34\"},{\"code\":\"340124\",\"name\":\"庐江县\",\"cityCode\":\"3401\",\"provinceCode\":\"34\"},{\"code\":\"340171\",\"name\":\"合肥高新技术产业开发区\",\"cityCode\":\"3401\",\"provinceCode\":\"34\"},{\"code\":\"340172\",\"name\":\"合肥经济技术开发区\",\"cityCode\":\"3401\",\"provinceCode\":\"34\"},{\"code\":\"340173\",\"name\":\"合肥新站高新技术产业开发区\",\"cityCode\":\"3401\",\"provinceCode\":\"34\"},{\"code\":\"340181\",\"name\":\"巢湖市\",\"cityCode\":\"3401\",\"provinceCode\":\"34\"},{\"code\":\"340202\",\"name\":\"镜湖区\",\"cityCode\":\"3402\",\"provinceCode\":\"34\"},{\"code\":\"340203\",\"name\":\"弋江区\",\"cityCode\":\"3402\",\"provinceCode\":\"34\"},{\"code\":\"340207\",\"name\":\"鸠江区\",\"cityCode\":\"3402\",\"provinceCode\":\"34\"},{\"code\":\"340208\",\"name\":\"三山区\",\"cityCode\":\"3402\",\"provinceCode\":\"34\"},{\"code\":\"340221\",\"name\":\"芜湖县\",\"cityCode\":\"3402\",\"provinceCode\":\"34\"},{\"code\":\"340222\",\"name\":\"繁昌县\",\"cityCode\":\"3402\",\"provinceCode\":\"34\"},{\"code\":\"340223\",\"name\":\"南陵县\",\"cityCode\":\"3402\",\"provinceCode\":\"34\"},{\"code\":\"340225\",\"name\":\"无为县\",\"cityCode\":\"3402\",\"provinceCode\":\"34\"},{\"code\":\"340271\",\"name\":\"芜湖经济技术开发区\",\"cityCode\":\"3402\",\"provinceCode\":\"34\"},{\"code\":\"340272\",\"name\":\"安徽芜湖长江大桥经济开发区\",\"cityCode\":\"3402\",\"provinceCode\":\"34\"},{\"code\":\"340302\",\"name\":\"龙子湖区\",\"cityCode\":\"3403\",\"provinceCode\":\"34\"},{\"code\":\"340303\",\"name\":\"蚌山区\",\"cityCode\":\"3403\",\"provinceCode\":\"34\"},{\"code\":\"340304\",\"name\":\"禹会区\",\"cityCode\":\"3403\",\"provinceCode\":\"34\"},{\"code\":\"340311\",\"name\":\"淮上区\",\"cityCode\":\"3403\",\"provinceCode\":\"34\"},{\"code\":\"340321\",\"name\":\"怀远县\",\"cityCode\":\"3403\",\"provinceCode\":\"34\"},{\"code\":\"340322\",\"name\":\"五河县\",\"cityCode\":\"3403\",\"provinceCode\":\"34\"},{\"code\":\"340323\",\"name\":\"固镇县\",\"cityCode\":\"3403\",\"provinceCode\":\"34\"},{\"code\":\"340371\",\"name\":\"蚌埠市高新技术开发区\",\"cityCode\":\"3403\",\"provinceCode\":\"34\"},{\"code\":\"340372\",\"name\":\"蚌埠市经济开发区\",\"cityCode\":\"3403\",\"provinceCode\":\"34\"},{\"code\":\"340402\",\"name\":\"大通区\",\"cityCode\":\"3404\",\"provinceCode\":\"34\"},{\"code\":\"340403\",\"name\":\"田家庵区\",\"cityCode\":\"3404\",\"provinceCode\":\"34\"},{\"code\":\"340404\",\"name\":\"谢家集区\",\"cityCode\":\"3404\",\"provinceCode\":\"34\"},{\"code\":\"340405\",\"name\":\"八公山区\",\"cityCode\":\"3404\",\"provinceCode\":\"34\"},{\"code\":\"340406\",\"name\":\"潘集区\",\"cityCode\":\"3404\",\"provinceCode\":\"34\"},{\"code\":\"340421\",\"name\":\"凤台县\",\"cityCode\":\"3404\",\"provinceCode\":\"34\"},{\"code\":\"340422\",\"name\":\"寿县\",\"cityCode\":\"3404\",\"provinceCode\":\"34\"},{\"code\":\"340503\",\"name\":\"花山区\",\"cityCode\":\"3405\",\"provinceCode\":\"34\"},{\"code\":\"340504\",\"name\":\"雨山区\",\"cityCode\":\"3405\",\"provinceCode\":\"34\"},{\"code\":\"340506\",\"name\":\"博望区\",\"cityCode\":\"3405\",\"provinceCode\":\"34\"},{\"code\":\"340521\",\"name\":\"当涂县\",\"cityCode\":\"3405\",\"provinceCode\":\"34\"},{\"code\":\"340522\",\"name\":\"含山县\",\"cityCode\":\"3405\",\"provinceCode\":\"34\"},{\"code\":\"340523\",\"name\":\"和县\",\"cityCode\":\"3405\",\"provinceCode\":\"34\"},{\"code\":\"340602\",\"name\":\"杜集区\",\"cityCode\":\"3406\",\"provinceCode\":\"34\"},{\"code\":\"340603\",\"name\":\"相山区\",\"cityCode\":\"3406\",\"provinceCode\":\"34\"},{\"code\":\"340604\",\"name\":\"烈山区\",\"cityCode\":\"3406\",\"provinceCode\":\"34\"},{\"code\":\"340621\",\"name\":\"濉溪县\",\"cityCode\":\"3406\",\"provinceCode\":\"34\"},{\"code\":\"340705\",\"name\":\"铜官区\",\"cityCode\":\"3407\",\"provinceCode\":\"34\"},{\"code\":\"340706\",\"name\":\"义安区\",\"cityCode\":\"3407\",\"provinceCode\":\"34\"},{\"code\":\"340711\",\"name\":\"郊区\",\"cityCode\":\"3407\",\"provinceCode\":\"34\"},{\"code\":\"340722\",\"name\":\"枞阳县\",\"cityCode\":\"3407\",\"provinceCode\":\"34\"},{\"code\":\"340802\",\"name\":\"迎江区\",\"cityCode\":\"3408\",\"provinceCode\":\"34\"},{\"code\":\"340803\",\"name\":\"大观区\",\"cityCode\":\"3408\",\"provinceCode\":\"34\"},{\"code\":\"340811\",\"name\":\"宜秀区\",\"cityCode\":\"3408\",\"provinceCode\":\"34\"},{\"code\":\"340822\",\"name\":\"怀宁县\",\"cityCode\":\"3408\",\"provinceCode\":\"34\"},{\"code\":\"340824\",\"name\":\"潜山县\",\"cityCode\":\"3408\",\"provinceCode\":\"34\"},{\"code\":\"340825\",\"name\":\"太湖县\",\"cityCode\":\"3408\",\"provinceCode\":\"34\"},{\"code\":\"340826\",\"name\":\"宿松县\",\"cityCode\":\"3408\",\"provinceCode\":\"34\"},{\"code\":\"340827\",\"name\":\"望江县\",\"cityCode\":\"3408\",\"provinceCode\":\"34\"},{\"code\":\"340828\",\"name\":\"岳西县\",\"cityCode\":\"3408\",\"provinceCode\":\"34\"},{\"code\":\"340871\",\"name\":\"安徽安庆经济开发区\",\"cityCode\":\"3408\",\"provinceCode\":\"34\"},{\"code\":\"340881\",\"name\":\"桐城市\",\"cityCode\":\"3408\",\"provinceCode\":\"34\"},{\"code\":\"341002\",\"name\":\"屯溪区\",\"cityCode\":\"3410\",\"provinceCode\":\"34\"},{\"code\":\"341003\",\"name\":\"黄山区\",\"cityCode\":\"3410\",\"provinceCode\":\"34\"},{\"code\":\"341004\",\"name\":\"徽州区\",\"cityCode\":\"3410\",\"provinceCode\":\"34\"},{\"code\":\"341021\",\"name\":\"歙县\",\"cityCode\":\"3410\",\"provinceCode\":\"34\"},{\"code\":\"341022\",\"name\":\"休宁县\",\"cityCode\":\"3410\",\"provinceCode\":\"34\"},{\"code\":\"341023\",\"name\":\"黟县\",\"cityCode\":\"3410\",\"provinceCode\":\"34\"},{\"code\":\"341024\",\"name\":\"祁门县\",\"cityCode\":\"3410\",\"provinceCode\":\"34\"},{\"code\":\"341102\",\"name\":\"琅琊区\",\"cityCode\":\"3411\",\"provinceCode\":\"34\"},{\"code\":\"341103\",\"name\":\"南谯区\",\"cityCode\":\"3411\",\"provinceCode\":\"34\"},{\"code\":\"341122\",\"name\":\"来安县\",\"cityCode\":\"3411\",\"provinceCode\":\"34\"},{\"code\":\"341124\",\"name\":\"全椒县\",\"cityCode\":\"3411\",\"provinceCode\":\"34\"},{\"code\":\"341125\",\"name\":\"定远县\",\"cityCode\":\"3411\",\"provinceCode\":\"34\"},{\"code\":\"341126\",\"name\":\"凤阳县\",\"cityCode\":\"3411\",\"provinceCode\":\"34\"},{\"code\":\"341171\",\"name\":\"苏滁现代产业园\",\"cityCode\":\"3411\",\"provinceCode\":\"34\"},{\"code\":\"341172\",\"name\":\"滁州经济技术开发区\",\"cityCode\":\"3411\",\"provinceCode\":\"34\"},{\"code\":\"341181\",\"name\":\"天长市\",\"cityCode\":\"3411\",\"provinceCode\":\"34\"},{\"code\":\"341182\",\"name\":\"明光市\",\"cityCode\":\"3411\",\"provinceCode\":\"34\"},{\"code\":\"341202\",\"name\":\"颍州区\",\"cityCode\":\"3412\",\"provinceCode\":\"34\"},{\"code\":\"341203\",\"name\":\"颍东区\",\"cityCode\":\"3412\",\"provinceCode\":\"34\"},{\"code\":\"341204\",\"name\":\"颍泉区\",\"cityCode\":\"3412\",\"provinceCode\":\"34\"},{\"code\":\"341221\",\"name\":\"临泉县\",\"cityCode\":\"3412\",\"provinceCode\":\"34\"},{\"code\":\"341222\",\"name\":\"太和县\",\"cityCode\":\"3412\",\"provinceCode\":\"34\"},{\"code\":\"341225\",\"name\":\"阜南县\",\"cityCode\":\"3412\",\"provinceCode\":\"34\"},{\"code\":\"341226\",\"name\":\"颍上县\",\"cityCode\":\"3412\",\"provinceCode\":\"34\"},{\"code\":\"341271\",\"name\":\"阜阳合肥现代产业园区\",\"cityCode\":\"3412\",\"provinceCode\":\"34\"},{\"code\":\"341272\",\"name\":\"阜阳经济技术开发区\",\"cityCode\":\"3412\",\"provinceCode\":\"34\"},{\"code\":\"341282\",\"name\":\"界首市\",\"cityCode\":\"3412\",\"provinceCode\":\"34\"},{\"code\":\"341302\",\"name\":\"埇桥区\",\"cityCode\":\"3413\",\"provinceCode\":\"34\"},{\"code\":\"341321\",\"name\":\"砀山县\",\"cityCode\":\"3413\",\"provinceCode\":\"34\"},{\"code\":\"341322\",\"name\":\"萧县\",\"cityCode\":\"3413\",\"provinceCode\":\"34\"},{\"code\":\"341323\",\"name\":\"灵璧县\",\"cityCode\":\"3413\",\"provinceCode\":\"34\"},{\"code\":\"341324\",\"name\":\"泗县\",\"cityCode\":\"3413\",\"provinceCode\":\"34\"},{\"code\":\"341371\",\"name\":\"宿州马鞍山现代产业园区\",\"cityCode\":\"3413\",\"provinceCode\":\"34\"},{\"code\":\"341372\",\"name\":\"宿州经济技术开发区\",\"cityCode\":\"3413\",\"provinceCode\":\"34\"},{\"code\":\"341502\",\"name\":\"金安区\",\"cityCode\":\"3415\",\"provinceCode\":\"34\"},{\"code\":\"341503\",\"name\":\"裕安区\",\"cityCode\":\"3415\",\"provinceCode\":\"34\"},{\"code\":\"341504\",\"name\":\"叶集区\",\"cityCode\":\"3415\",\"provinceCode\":\"34\"},{\"code\":\"341522\",\"name\":\"霍邱县\",\"cityCode\":\"3415\",\"provinceCode\":\"34\"},{\"code\":\"341523\",\"name\":\"舒城县\",\"cityCode\":\"3415\",\"provinceCode\":\"34\"},{\"code\":\"341524\",\"name\":\"金寨县\",\"cityCode\":\"3415\",\"provinceCode\":\"34\"},{\"code\":\"341525\",\"name\":\"霍山县\",\"cityCode\":\"3415\",\"provinceCode\":\"34\"},{\"code\":\"341602\",\"name\":\"谯城区\",\"cityCode\":\"3416\",\"provinceCode\":\"34\"},{\"code\":\"341621\",\"name\":\"涡阳县\",\"cityCode\":\"3416\",\"provinceCode\":\"34\"},{\"code\":\"341622\",\"name\":\"蒙城县\",\"cityCode\":\"3416\",\"provinceCode\":\"34\"},{\"code\":\"341623\",\"name\":\"利辛县\",\"cityCode\":\"3416\",\"provinceCode\":\"34\"},{\"code\":\"341702\",\"name\":\"贵池区\",\"cityCode\":\"3417\",\"provinceCode\":\"34\"},{\"code\":\"341721\",\"name\":\"东至县\",\"cityCode\":\"3417\",\"provinceCode\":\"34\"},{\"code\":\"341722\",\"name\":\"石台县\",\"cityCode\":\"3417\",\"provinceCode\":\"34\"},{\"code\":\"341723\",\"name\":\"青阳县\",\"cityCode\":\"3417\",\"provinceCode\":\"34\"},{\"code\":\"341802\",\"name\":\"宣州区\",\"cityCode\":\"3418\",\"provinceCode\":\"34\"},{\"code\":\"341821\",\"name\":\"郎溪县\",\"cityCode\":\"3418\",\"provinceCode\":\"34\"},{\"code\":\"341822\",\"name\":\"广德县\",\"cityCode\":\"3418\",\"provinceCode\":\"34\"},{\"code\":\"341823\",\"name\":\"泾县\",\"cityCode\":\"3418\",\"provinceCode\":\"34\"},{\"code\":\"341824\",\"name\":\"绩溪县\",\"cityCode\":\"3418\",\"provinceCode\":\"34\"},{\"code\":\"341825\",\"name\":\"旌德县\",\"cityCode\":\"3418\",\"provinceCode\":\"34\"},{\"code\":\"341871\",\"name\":\"宣城市经济开发区\",\"cityCode\":\"3418\",\"provinceCode\":\"34\"},{\"code\":\"341881\",\"name\":\"宁国市\",\"cityCode\":\"3418\",\"provinceCode\":\"34\"},{\"code\":\"350102\",\"name\":\"鼓楼区\",\"cityCode\":\"3501\",\"provinceCode\":\"35\"},{\"code\":\"350103\",\"name\":\"台江区\",\"cityCode\":\"3501\",\"provinceCode\":\"35\"},{\"code\":\"350104\",\"name\":\"仓山区\",\"cityCode\":\"3501\",\"provinceCode\":\"35\"},{\"code\":\"350105\",\"name\":\"马尾区\",\"cityCode\":\"3501\",\"provinceCode\":\"35\"},{\"code\":\"350111\",\"name\":\"晋安区\",\"cityCode\":\"3501\",\"provinceCode\":\"35\"},{\"code\":\"350121\",\"name\":\"闽侯县\",\"cityCode\":\"3501\",\"provinceCode\":\"35\"},{\"code\":\"350122\",\"name\":\"连江县\",\"cityCode\":\"3501\",\"provinceCode\":\"35\"},{\"code\":\"350123\",\"name\":\"罗源县\",\"cityCode\":\"3501\",\"provinceCode\":\"35\"},{\"code\":\"350124\",\"name\":\"闽清县\",\"cityCode\":\"3501\",\"provinceCode\":\"35\"},{\"code\":\"350125\",\"name\":\"永泰县\",\"cityCode\":\"3501\",\"provinceCode\":\"35\"},{\"code\":\"350128\",\"name\":\"平潭县\",\"cityCode\":\"3501\",\"provinceCode\":\"35\"},{\"code\":\"350181\",\"name\":\"福清市\",\"cityCode\":\"3501\",\"provinceCode\":\"35\"},{\"code\":\"350182\",\"name\":\"长乐市\",\"cityCode\":\"3501\",\"provinceCode\":\"35\"},{\"code\":\"350203\",\"name\":\"思明区\",\"cityCode\":\"3502\",\"provinceCode\":\"35\"},{\"code\":\"350205\",\"name\":\"海沧区\",\"cityCode\":\"3502\",\"provinceCode\":\"35\"},{\"code\":\"350206\",\"name\":\"湖里区\",\"cityCode\":\"3502\",\"provinceCode\":\"35\"},{\"code\":\"350211\",\"name\":\"集美区\",\"cityCode\":\"3502\",\"provinceCode\":\"35\"},{\"code\":\"350212\",\"name\":\"同安区\",\"cityCode\":\"3502\",\"provinceCode\":\"35\"},{\"code\":\"350213\",\"name\":\"翔安区\",\"cityCode\":\"3502\",\"provinceCode\":\"35\"},{\"code\":\"350302\",\"name\":\"城厢区\",\"cityCode\":\"3503\",\"provinceCode\":\"35\"},{\"code\":\"350303\",\"name\":\"涵江区\",\"cityCode\":\"3503\",\"provinceCode\":\"35\"},{\"code\":\"350304\",\"name\":\"荔城区\",\"cityCode\":\"3503\",\"provinceCode\":\"35\"},{\"code\":\"350305\",\"name\":\"秀屿区\",\"cityCode\":\"3503\",\"provinceCode\":\"35\"},{\"code\":\"350322\",\"name\":\"仙游县\",\"cityCode\":\"3503\",\"provinceCode\":\"35\"},{\"code\":\"350402\",\"name\":\"梅列区\",\"cityCode\":\"3504\",\"provinceCode\":\"35\"},{\"code\":\"350403\",\"name\":\"三元区\",\"cityCode\":\"3504\",\"provinceCode\":\"35\"},{\"code\":\"350421\",\"name\":\"明溪县\",\"cityCode\":\"3504\",\"provinceCode\":\"35\"},{\"code\":\"350423\",\"name\":\"清流县\",\"cityCode\":\"3504\",\"provinceCode\":\"35\"},{\"code\":\"350424\",\"name\":\"宁化县\",\"cityCode\":\"3504\",\"provinceCode\":\"35\"},{\"code\":\"350425\",\"name\":\"大田县\",\"cityCode\":\"3504\",\"provinceCode\":\"35\"},{\"code\":\"350426\",\"name\":\"尤溪县\",\"cityCode\":\"3504\",\"provinceCode\":\"35\"},{\"code\":\"350427\",\"name\":\"沙县\",\"cityCode\":\"3504\",\"provinceCode\":\"35\"},{\"code\":\"350428\",\"name\":\"将乐县\",\"cityCode\":\"3504\",\"provinceCode\":\"35\"},{\"code\":\"350429\",\"name\":\"泰宁县\",\"cityCode\":\"3504\",\"provinceCode\":\"35\"},{\"code\":\"350430\",\"name\":\"建宁县\",\"cityCode\":\"3504\",\"provinceCode\":\"35\"},{\"code\":\"350481\",\"name\":\"永安市\",\"cityCode\":\"3504\",\"provinceCode\":\"35\"},{\"code\":\"350502\",\"name\":\"鲤城区\",\"cityCode\":\"3505\",\"provinceCode\":\"35\"},{\"code\":\"350503\",\"name\":\"丰泽区\",\"cityCode\":\"3505\",\"provinceCode\":\"35\"},{\"code\":\"350504\",\"name\":\"洛江区\",\"cityCode\":\"3505\",\"provinceCode\":\"35\"},{\"code\":\"350505\",\"name\":\"泉港区\",\"cityCode\":\"3505\",\"provinceCode\":\"35\"},{\"code\":\"350521\",\"name\":\"惠安县\",\"cityCode\":\"3505\",\"provinceCode\":\"35\"},{\"code\":\"350524\",\"name\":\"安溪县\",\"cityCode\":\"3505\",\"provinceCode\":\"35\"},{\"code\":\"350525\",\"name\":\"永春县\",\"cityCode\":\"3505\",\"provinceCode\":\"35\"},{\"code\":\"350526\",\"name\":\"德化县\",\"cityCode\":\"3505\",\"provinceCode\":\"35\"},{\"code\":\"350527\",\"name\":\"金门县\",\"cityCode\":\"3505\",\"provinceCode\":\"35\"},{\"code\":\"350581\",\"name\":\"石狮市\",\"cityCode\":\"3505\",\"provinceCode\":\"35\"},{\"code\":\"350582\",\"name\":\"晋江市\",\"cityCode\":\"3505\",\"provinceCode\":\"35\"},{\"code\":\"350583\",\"name\":\"南安市\",\"cityCode\":\"3505\",\"provinceCode\":\"35\"},{\"code\":\"350602\",\"name\":\"芗城区\",\"cityCode\":\"3506\",\"provinceCode\":\"35\"},{\"code\":\"350603\",\"name\":\"龙文区\",\"cityCode\":\"3506\",\"provinceCode\":\"35\"},{\"code\":\"350622\",\"name\":\"云霄县\",\"cityCode\":\"3506\",\"provinceCode\":\"35\"},{\"code\":\"350623\",\"name\":\"漳浦县\",\"cityCode\":\"3506\",\"provinceCode\":\"35\"},{\"code\":\"350624\",\"name\":\"诏安县\",\"cityCode\":\"3506\",\"provinceCode\":\"35\"},{\"code\":\"350625\",\"name\":\"长泰县\",\"cityCode\":\"3506\",\"provinceCode\":\"35\"},{\"code\":\"350626\",\"name\":\"东山县\",\"cityCode\":\"3506\",\"provinceCode\":\"35\"},{\"code\":\"350627\",\"name\":\"南靖县\",\"cityCode\":\"3506\",\"provinceCode\":\"35\"},{\"code\":\"350628\",\"name\":\"平和县\",\"cityCode\":\"3506\",\"provinceCode\":\"35\"},{\"code\":\"350629\",\"name\":\"华安县\",\"cityCode\":\"3506\",\"provinceCode\":\"35\"},{\"code\":\"350681\",\"name\":\"龙海市\",\"cityCode\":\"3506\",\"provinceCode\":\"35\"},{\"code\":\"350702\",\"name\":\"延平区\",\"cityCode\":\"3507\",\"provinceCode\":\"35\"},{\"code\":\"350703\",\"name\":\"建阳区\",\"cityCode\":\"3507\",\"provinceCode\":\"35\"},{\"code\":\"350721\",\"name\":\"顺昌县\",\"cityCode\":\"3507\",\"provinceCode\":\"35\"},{\"code\":\"350722\",\"name\":\"浦城县\",\"cityCode\":\"3507\",\"provinceCode\":\"35\"},{\"code\":\"350723\",\"name\":\"光泽县\",\"cityCode\":\"3507\",\"provinceCode\":\"35\"},{\"code\":\"350724\",\"name\":\"松溪县\",\"cityCode\":\"3507\",\"provinceCode\":\"35\"},{\"code\":\"350725\",\"name\":\"政和县\",\"cityCode\":\"3507\",\"provinceCode\":\"35\"},{\"code\":\"350781\",\"name\":\"邵武市\",\"cityCode\":\"3507\",\"provinceCode\":\"35\"},{\"code\":\"350782\",\"name\":\"武夷山市\",\"cityCode\":\"3507\",\"provinceCode\":\"35\"},{\"code\":\"350783\",\"name\":\"建瓯市\",\"cityCode\":\"3507\",\"provinceCode\":\"35\"},{\"code\":\"350802\",\"name\":\"新罗区\",\"cityCode\":\"3508\",\"provinceCode\":\"35\"},{\"code\":\"350803\",\"name\":\"永定区\",\"cityCode\":\"3508\",\"provinceCode\":\"35\"},{\"code\":\"350821\",\"name\":\"长汀县\",\"cityCode\":\"3508\",\"provinceCode\":\"35\"},{\"code\":\"350823\",\"name\":\"上杭县\",\"cityCode\":\"3508\",\"provinceCode\":\"35\"},{\"code\":\"350824\",\"name\":\"武平县\",\"cityCode\":\"3508\",\"provinceCode\":\"35\"},{\"code\":\"350825\",\"name\":\"连城县\",\"cityCode\":\"3508\",\"provinceCode\":\"35\"},{\"code\":\"350881\",\"name\":\"漳平市\",\"cityCode\":\"3508\",\"provinceCode\":\"35\"},{\"code\":\"350902\",\"name\":\"蕉城区\",\"cityCode\":\"3509\",\"provinceCode\":\"35\"},{\"code\":\"350921\",\"name\":\"霞浦县\",\"cityCode\":\"3509\",\"provinceCode\":\"35\"},{\"code\":\"350922\",\"name\":\"古田县\",\"cityCode\":\"3509\",\"provinceCode\":\"35\"},{\"code\":\"350923\",\"name\":\"屏南县\",\"cityCode\":\"3509\",\"provinceCode\":\"35\"},{\"code\":\"350924\",\"name\":\"寿宁县\",\"cityCode\":\"3509\",\"provinceCode\":\"35\"},{\"code\":\"350925\",\"name\":\"周宁县\",\"cityCode\":\"3509\",\"provinceCode\":\"35\"},{\"code\":\"350926\",\"name\":\"柘荣县\",\"cityCode\":\"3509\",\"provinceCode\":\"35\"},{\"code\":\"350981\",\"name\":\"福安市\",\"cityCode\":\"3509\",\"provinceCode\":\"35\"},{\"code\":\"350982\",\"name\":\"福鼎市\",\"cityCode\":\"3509\",\"provinceCode\":\"35\"},{\"code\":\"360102\",\"name\":\"东湖区\",\"cityCode\":\"3601\",\"provinceCode\":\"36\"},{\"code\":\"360103\",\"name\":\"西湖区\",\"cityCode\":\"3601\",\"provinceCode\":\"36\"},{\"code\":\"360104\",\"name\":\"青云谱区\",\"cityCode\":\"3601\",\"provinceCode\":\"36\"},{\"code\":\"360105\",\"name\":\"湾里区\",\"cityCode\":\"3601\",\"provinceCode\":\"36\"},{\"code\":\"360111\",\"name\":\"青山湖区\",\"cityCode\":\"3601\",\"provinceCode\":\"36\"},{\"code\":\"360112\",\"name\":\"新建区\",\"cityCode\":\"3601\",\"provinceCode\":\"36\"},{\"code\":\"360121\",\"name\":\"南昌县\",\"cityCode\":\"3601\",\"provinceCode\":\"36\"},{\"code\":\"360123\",\"name\":\"安义县\",\"cityCode\":\"3601\",\"provinceCode\":\"36\"},{\"code\":\"360124\",\"name\":\"进贤县\",\"cityCode\":\"3601\",\"provinceCode\":\"36\"},{\"code\":\"360202\",\"name\":\"昌江区\",\"cityCode\":\"3602\",\"provinceCode\":\"36\"},{\"code\":\"360203\",\"name\":\"珠山区\",\"cityCode\":\"3602\",\"provinceCode\":\"36\"},{\"code\":\"360222\",\"name\":\"浮梁县\",\"cityCode\":\"3602\",\"provinceCode\":\"36\"},{\"code\":\"360281\",\"name\":\"乐平市\",\"cityCode\":\"3602\",\"provinceCode\":\"36\"},{\"code\":\"360302\",\"name\":\"安源区\",\"cityCode\":\"3603\",\"provinceCode\":\"36\"},{\"code\":\"360313\",\"name\":\"湘东区\",\"cityCode\":\"3603\",\"provinceCode\":\"36\"},{\"code\":\"360321\",\"name\":\"莲花县\",\"cityCode\":\"3603\",\"provinceCode\":\"36\"},{\"code\":\"360322\",\"name\":\"上栗县\",\"cityCode\":\"3603\",\"provinceCode\":\"36\"},{\"code\":\"360323\",\"name\":\"芦溪县\",\"cityCode\":\"3603\",\"provinceCode\":\"36\"},{\"code\":\"360402\",\"name\":\"濂溪区\",\"cityCode\":\"3604\",\"provinceCode\":\"36\"},{\"code\":\"360403\",\"name\":\"浔阳区\",\"cityCode\":\"3604\",\"provinceCode\":\"36\"},{\"code\":\"360404\",\"name\":\"柴桑区\",\"cityCode\":\"3604\",\"provinceCode\":\"36\"},{\"code\":\"360423\",\"name\":\"武宁县\",\"cityCode\":\"3604\",\"provinceCode\":\"36\"},{\"code\":\"360424\",\"name\":\"修水县\",\"cityCode\":\"3604\",\"provinceCode\":\"36\"},{\"code\":\"360425\",\"name\":\"永修县\",\"cityCode\":\"3604\",\"provinceCode\":\"36\"},{\"code\":\"360426\",\"name\":\"德安县\",\"cityCode\":\"3604\",\"provinceCode\":\"36\"},{\"code\":\"360428\",\"name\":\"都昌县\",\"cityCode\":\"3604\",\"provinceCode\":\"36\"},{\"code\":\"360429\",\"name\":\"湖口县\",\"cityCode\":\"3604\",\"provinceCode\":\"36\"},{\"code\":\"360430\",\"name\":\"彭泽县\",\"cityCode\":\"3604\",\"provinceCode\":\"36\"},{\"code\":\"360481\",\"name\":\"瑞昌市\",\"cityCode\":\"3604\",\"provinceCode\":\"36\"},{\"code\":\"360482\",\"name\":\"共青城市\",\"cityCode\":\"3604\",\"provinceCode\":\"36\"},{\"code\":\"360483\",\"name\":\"庐山市\",\"cityCode\":\"3604\",\"provinceCode\":\"36\"},{\"code\":\"360502\",\"name\":\"渝水区\",\"cityCode\":\"3605\",\"provinceCode\":\"36\"},{\"code\":\"360521\",\"name\":\"分宜县\",\"cityCode\":\"3605\",\"provinceCode\":\"36\"},{\"code\":\"360602\",\"name\":\"月湖区\",\"cityCode\":\"3606\",\"provinceCode\":\"36\"},{\"code\":\"360622\",\"name\":\"余江县\",\"cityCode\":\"3606\",\"provinceCode\":\"36\"},{\"code\":\"360681\",\"name\":\"贵溪市\",\"cityCode\":\"3606\",\"provinceCode\":\"36\"},{\"code\":\"360702\",\"name\":\"章贡区\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360703\",\"name\":\"南康区\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360704\",\"name\":\"赣县区\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360722\",\"name\":\"信丰县\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360723\",\"name\":\"大余县\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360724\",\"name\":\"上犹县\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360725\",\"name\":\"崇义县\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360726\",\"name\":\"安远县\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360727\",\"name\":\"龙南县\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360728\",\"name\":\"定南县\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360729\",\"name\":\"全南县\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360730\",\"name\":\"宁都县\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360731\",\"name\":\"于都县\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360732\",\"name\":\"兴国县\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360733\",\"name\":\"会昌县\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360734\",\"name\":\"寻乌县\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360735\",\"name\":\"石城县\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360781\",\"name\":\"瑞金市\",\"cityCode\":\"3607\",\"provinceCode\":\"36\"},{\"code\":\"360802\",\"name\":\"吉州区\",\"cityCode\":\"3608\",\"provinceCode\":\"36\"},{\"code\":\"360803\",\"name\":\"青原区\",\"cityCode\":\"3608\",\"provinceCode\":\"36\"},{\"code\":\"360821\",\"name\":\"吉安县\",\"cityCode\":\"3608\",\"provinceCode\":\"36\"},{\"code\":\"360822\",\"name\":\"吉水县\",\"cityCode\":\"3608\",\"provinceCode\":\"36\"},{\"code\":\"360823\",\"name\":\"峡江县\",\"cityCode\":\"3608\",\"provinceCode\":\"36\"},{\"code\":\"360824\",\"name\":\"新干县\",\"cityCode\":\"3608\",\"provinceCode\":\"36\"},{\"code\":\"360825\",\"name\":\"永丰县\",\"cityCode\":\"3608\",\"provinceCode\":\"36\"},{\"code\":\"360826\",\"name\":\"泰和县\",\"cityCode\":\"3608\",\"provinceCode\":\"36\"},{\"code\":\"360827\",\"name\":\"遂川县\",\"cityCode\":\"3608\",\"provinceCode\":\"36\"},{\"code\":\"360828\",\"name\":\"万安县\",\"cityCode\":\"3608\",\"provinceCode\":\"36\"},{\"code\":\"360829\",\"name\":\"安福县\",\"cityCode\":\"3608\",\"provinceCode\":\"36\"},{\"code\":\"360830\",\"name\":\"永新县\",\"cityCode\":\"3608\",\"provinceCode\":\"36\"},{\"code\":\"360881\",\"name\":\"井冈山市\",\"cityCode\":\"3608\",\"provinceCode\":\"36\"},{\"code\":\"360902\",\"name\":\"袁州区\",\"cityCode\":\"3609\",\"provinceCode\":\"36\"},{\"code\":\"360921\",\"name\":\"奉新县\",\"cityCode\":\"3609\",\"provinceCode\":\"36\"},{\"code\":\"360922\",\"name\":\"万载县\",\"cityCode\":\"3609\",\"provinceCode\":\"36\"},{\"code\":\"360923\",\"name\":\"上高县\",\"cityCode\":\"3609\",\"provinceCode\":\"36\"},{\"code\":\"360924\",\"name\":\"宜丰县\",\"cityCode\":\"3609\",\"provinceCode\":\"36\"},{\"code\":\"360925\",\"name\":\"靖安县\",\"cityCode\":\"3609\",\"provinceCode\":\"36\"},{\"code\":\"360926\",\"name\":\"铜鼓县\",\"cityCode\":\"3609\",\"provinceCode\":\"36\"},{\"code\":\"360981\",\"name\":\"丰城市\",\"cityCode\":\"3609\",\"provinceCode\":\"36\"},{\"code\":\"360982\",\"name\":\"樟树市\",\"cityCode\":\"3609\",\"provinceCode\":\"36\"},{\"code\":\"360983\",\"name\":\"高安市\",\"cityCode\":\"3609\",\"provinceCode\":\"36\"},{\"code\":\"361002\",\"name\":\"临川区\",\"cityCode\":\"3610\",\"provinceCode\":\"36\"},{\"code\":\"361003\",\"name\":\"东乡区\",\"cityCode\":\"3610\",\"provinceCode\":\"36\"},{\"code\":\"361021\",\"name\":\"南城县\",\"cityCode\":\"3610\",\"provinceCode\":\"36\"},{\"code\":\"361022\",\"name\":\"黎川县\",\"cityCode\":\"3610\",\"provinceCode\":\"36\"},{\"code\":\"361023\",\"name\":\"南丰县\",\"cityCode\":\"3610\",\"provinceCode\":\"36\"},{\"code\":\"361024\",\"name\":\"崇仁县\",\"cityCode\":\"3610\",\"provinceCode\":\"36\"},{\"code\":\"361025\",\"name\":\"乐安县\",\"cityCode\":\"3610\",\"provinceCode\":\"36\"},{\"code\":\"361026\",\"name\":\"宜黄县\",\"cityCode\":\"3610\",\"provinceCode\":\"36\"},{\"code\":\"361027\",\"name\":\"金溪县\",\"cityCode\":\"3610\",\"provinceCode\":\"36\"},{\"code\":\"361028\",\"name\":\"资溪县\",\"cityCode\":\"3610\",\"provinceCode\":\"36\"},{\"code\":\"361030\",\"name\":\"广昌县\",\"cityCode\":\"3610\",\"provinceCode\":\"36\"},{\"code\":\"361102\",\"name\":\"信州区\",\"cityCode\":\"3611\",\"provinceCode\":\"36\"},{\"code\":\"361103\",\"name\":\"广丰区\",\"cityCode\":\"3611\",\"provinceCode\":\"36\"},{\"code\":\"361121\",\"name\":\"上饶县\",\"cityCode\":\"3611\",\"provinceCode\":\"36\"},{\"code\":\"361123\",\"name\":\"玉山县\",\"cityCode\":\"3611\",\"provinceCode\":\"36\"},{\"code\":\"361124\",\"name\":\"铅山县\",\"cityCode\":\"3611\",\"provinceCode\":\"36\"},{\"code\":\"361125\",\"name\":\"横峰县\",\"cityCode\":\"3611\",\"provinceCode\":\"36\"},{\"code\":\"361126\",\"name\":\"弋阳县\",\"cityCode\":\"3611\",\"provinceCode\":\"36\"},{\"code\":\"361127\",\"name\":\"余干县\",\"cityCode\":\"3611\",\"provinceCode\":\"36\"},{\"code\":\"361128\",\"name\":\"鄱阳县\",\"cityCode\":\"3611\",\"provinceCode\":\"36\"},{\"code\":\"361129\",\"name\":\"万年县\",\"cityCode\":\"3611\",\"provinceCode\":\"36\"},{\"code\":\"361130\",\"name\":\"婺源县\",\"cityCode\":\"3611\",\"provinceCode\":\"36\"},{\"code\":\"361181\",\"name\":\"德兴市\",\"cityCode\":\"3611\",\"provinceCode\":\"36\"},{\"code\":\"370102\",\"name\":\"历下区\",\"cityCode\":\"3701\",\"provinceCode\":\"37\"},{\"code\":\"370103\",\"name\":\"市中区\",\"cityCode\":\"3701\",\"provinceCode\":\"37\"},{\"code\":\"370104\",\"name\":\"槐荫区\",\"cityCode\":\"3701\",\"provinceCode\":\"37\"},{\"code\":\"370105\",\"name\":\"天桥区\",\"cityCode\":\"3701\",\"provinceCode\":\"37\"},{\"code\":\"370112\",\"name\":\"历城区\",\"cityCode\":\"3701\",\"provinceCode\":\"37\"},{\"code\":\"370113\",\"name\":\"长清区\",\"cityCode\":\"3701\",\"provinceCode\":\"37\"},{\"code\":\"370114\",\"name\":\"章丘区\",\"cityCode\":\"3701\",\"provinceCode\":\"37\"},{\"code\":\"370124\",\"name\":\"平阴县\",\"cityCode\":\"3701\",\"provinceCode\":\"37\"},{\"code\":\"370125\",\"name\":\"济阳县\",\"cityCode\":\"3701\",\"provinceCode\":\"37\"},{\"code\":\"370126\",\"name\":\"商河县\",\"cityCode\":\"3701\",\"provinceCode\":\"37\"},{\"code\":\"370171\",\"name\":\"济南高新技术产业开发区\",\"cityCode\":\"3701\",\"provinceCode\":\"37\"},{\"code\":\"370202\",\"name\":\"市南区\",\"cityCode\":\"3702\",\"provinceCode\":\"37\"},{\"code\":\"370203\",\"name\":\"市北区\",\"cityCode\":\"3702\",\"provinceCode\":\"37\"},{\"code\":\"370211\",\"name\":\"黄岛区\",\"cityCode\":\"3702\",\"provinceCode\":\"37\"},{\"code\":\"370212\",\"name\":\"崂山区\",\"cityCode\":\"3702\",\"provinceCode\":\"37\"},{\"code\":\"370213\",\"name\":\"李沧区\",\"cityCode\":\"3702\",\"provinceCode\":\"37\"},{\"code\":\"370214\",\"name\":\"城阳区\",\"cityCode\":\"3702\",\"provinceCode\":\"37\"},{\"code\":\"370215\",\"name\":\"即墨区\",\"cityCode\":\"3702\",\"provinceCode\":\"37\"},{\"code\":\"370271\",\"name\":\"青岛高新技术产业开发区\",\"cityCode\":\"3702\",\"provinceCode\":\"37\"},{\"code\":\"370281\",\"name\":\"胶州市\",\"cityCode\":\"3702\",\"provinceCode\":\"37\"},{\"code\":\"370283\",\"name\":\"平度市\",\"cityCode\":\"3702\",\"provinceCode\":\"37\"},{\"code\":\"370285\",\"name\":\"莱西市\",\"cityCode\":\"3702\",\"provinceCode\":\"37\"},{\"code\":\"370302\",\"name\":\"淄川区\",\"cityCode\":\"3703\",\"provinceCode\":\"37\"},{\"code\":\"370303\",\"name\":\"张店区\",\"cityCode\":\"3703\",\"provinceCode\":\"37\"},{\"code\":\"370304\",\"name\":\"博山区\",\"cityCode\":\"3703\",\"provinceCode\":\"37\"},{\"code\":\"370305\",\"name\":\"临淄区\",\"cityCode\":\"3703\",\"provinceCode\":\"37\"},{\"code\":\"370306\",\"name\":\"周村区\",\"cityCode\":\"3703\",\"provinceCode\":\"37\"},{\"code\":\"370321\",\"name\":\"桓台县\",\"cityCode\":\"3703\",\"provinceCode\":\"37\"},{\"code\":\"370322\",\"name\":\"高青县\",\"cityCode\":\"3703\",\"provinceCode\":\"37\"},{\"code\":\"370323\",\"name\":\"沂源县\",\"cityCode\":\"3703\",\"provinceCode\":\"37\"},{\"code\":\"370402\",\"name\":\"市中区\",\"cityCode\":\"3704\",\"provinceCode\":\"37\"},{\"code\":\"370403\",\"name\":\"薛城区\",\"cityCode\":\"3704\",\"provinceCode\":\"37\"},{\"code\":\"370404\",\"name\":\"峄城区\",\"cityCode\":\"3704\",\"provinceCode\":\"37\"},{\"code\":\"370405\",\"name\":\"台儿庄区\",\"cityCode\":\"3704\",\"provinceCode\":\"37\"},{\"code\":\"370406\",\"name\":\"山亭区\",\"cityCode\":\"3704\",\"provinceCode\":\"37\"},{\"code\":\"370481\",\"name\":\"滕州市\",\"cityCode\":\"3704\",\"provinceCode\":\"37\"},{\"code\":\"370502\",\"name\":\"东营区\",\"cityCode\":\"3705\",\"provinceCode\":\"37\"},{\"code\":\"370503\",\"name\":\"河口区\",\"cityCode\":\"3705\",\"provinceCode\":\"37\"},{\"code\":\"370505\",\"name\":\"垦利区\",\"cityCode\":\"3705\",\"provinceCode\":\"37\"},{\"code\":\"370522\",\"name\":\"利津县\",\"cityCode\":\"3705\",\"provinceCode\":\"37\"},{\"code\":\"370523\",\"name\":\"广饶县\",\"cityCode\":\"3705\",\"provinceCode\":\"37\"},{\"code\":\"370571\",\"name\":\"东营经济技术开发区\",\"cityCode\":\"3705\",\"provinceCode\":\"37\"},{\"code\":\"370572\",\"name\":\"东营港经济开发区\",\"cityCode\":\"3705\",\"provinceCode\":\"37\"},{\"code\":\"370602\",\"name\":\"芝罘区\",\"cityCode\":\"3706\",\"provinceCode\":\"37\"},{\"code\":\"370611\",\"name\":\"福山区\",\"cityCode\":\"3706\",\"provinceCode\":\"37\"},{\"code\":\"370612\",\"name\":\"牟平区\",\"cityCode\":\"3706\",\"provinceCode\":\"37\"},{\"code\":\"370613\",\"name\":\"莱山区\",\"cityCode\":\"3706\",\"provinceCode\":\"37\"},{\"code\":\"370634\",\"name\":\"长岛县\",\"cityCode\":\"3706\",\"provinceCode\":\"37\"},{\"code\":\"370671\",\"name\":\"烟台高新技术产业开发区\",\"cityCode\":\"3706\",\"provinceCode\":\"37\"},{\"code\":\"370672\",\"name\":\"烟台经济技术开发区\",\"cityCode\":\"3706\",\"provinceCode\":\"37\"},{\"code\":\"370681\",\"name\":\"龙口市\",\"cityCode\":\"3706\",\"provinceCode\":\"37\"},{\"code\":\"370682\",\"name\":\"莱阳市\",\"cityCode\":\"3706\",\"provinceCode\":\"37\"},{\"code\":\"370683\",\"name\":\"莱州市\",\"cityCode\":\"3706\",\"provinceCode\":\"37\"},{\"code\":\"370684\",\"name\":\"蓬莱市\",\"cityCode\":\"3706\",\"provinceCode\":\"37\"},{\"code\":\"370685\",\"name\":\"招远市\",\"cityCode\":\"3706\",\"provinceCode\":\"37\"},{\"code\":\"370686\",\"name\":\"栖霞市\",\"cityCode\":\"3706\",\"provinceCode\":\"37\"},{\"code\":\"370687\",\"name\":\"海阳市\",\"cityCode\":\"3706\",\"provinceCode\":\"37\"},{\"code\":\"370702\",\"name\":\"潍城区\",\"cityCode\":\"3707\",\"provinceCode\":\"37\"},{\"code\":\"370703\",\"name\":\"寒亭区\",\"cityCode\":\"3707\",\"provinceCode\":\"37\"},{\"code\":\"370704\",\"name\":\"坊子区\",\"cityCode\":\"3707\",\"provinceCode\":\"37\"},{\"code\":\"370705\",\"name\":\"奎文区\",\"cityCode\":\"3707\",\"provinceCode\":\"37\"},{\"code\":\"370724\",\"name\":\"临朐县\",\"cityCode\":\"3707\",\"provinceCode\":\"37\"},{\"code\":\"370725\",\"name\":\"昌乐县\",\"cityCode\":\"3707\",\"provinceCode\":\"37\"},{\"code\":\"370772\",\"name\":\"潍坊滨海经济技术开发区\",\"cityCode\":\"3707\",\"provinceCode\":\"37\"},{\"code\":\"370781\",\"name\":\"青州市\",\"cityCode\":\"3707\",\"provinceCode\":\"37\"},{\"code\":\"370782\",\"name\":\"诸城市\",\"cityCode\":\"3707\",\"provinceCode\":\"37\"},{\"code\":\"370783\",\"name\":\"寿光市\",\"cityCode\":\"3707\",\"provinceCode\":\"37\"},{\"code\":\"370784\",\"name\":\"安丘市\",\"cityCode\":\"3707\",\"provinceCode\":\"37\"},{\"code\":\"370785\",\"name\":\"高密市\",\"cityCode\":\"3707\",\"provinceCode\":\"37\"},{\"code\":\"370786\",\"name\":\"昌邑市\",\"cityCode\":\"3707\",\"provinceCode\":\"37\"},{\"code\":\"370811\",\"name\":\"任城区\",\"cityCode\":\"3708\",\"provinceCode\":\"37\"},{\"code\":\"370812\",\"name\":\"兖州区\",\"cityCode\":\"3708\",\"provinceCode\":\"37\"},{\"code\":\"370826\",\"name\":\"微山县\",\"cityCode\":\"3708\",\"provinceCode\":\"37\"},{\"code\":\"370827\",\"name\":\"鱼台县\",\"cityCode\":\"3708\",\"provinceCode\":\"37\"},{\"code\":\"370828\",\"name\":\"金乡县\",\"cityCode\":\"3708\",\"provinceCode\":\"37\"},{\"code\":\"370829\",\"name\":\"嘉祥县\",\"cityCode\":\"3708\",\"provinceCode\":\"37\"},{\"code\":\"370830\",\"name\":\"汶上县\",\"cityCode\":\"3708\",\"provinceCode\":\"37\"},{\"code\":\"370831\",\"name\":\"泗水县\",\"cityCode\":\"3708\",\"provinceCode\":\"37\"},{\"code\":\"370832\",\"name\":\"梁山县\",\"cityCode\":\"3708\",\"provinceCode\":\"37\"},{\"code\":\"370871\",\"name\":\"济宁高新技术产业开发区\",\"cityCode\":\"3708\",\"provinceCode\":\"37\"},{\"code\":\"370881\",\"name\":\"曲阜市\",\"cityCode\":\"3708\",\"provinceCode\":\"37\"},{\"code\":\"370883\",\"name\":\"邹城市\",\"cityCode\":\"3708\",\"provinceCode\":\"37\"},{\"code\":\"370902\",\"name\":\"泰山区\",\"cityCode\":\"3709\",\"provinceCode\":\"37\"},{\"code\":\"370911\",\"name\":\"岱岳区\",\"cityCode\":\"3709\",\"provinceCode\":\"37\"},{\"code\":\"370921\",\"name\":\"宁阳县\",\"cityCode\":\"3709\",\"provinceCode\":\"37\"},{\"code\":\"370923\",\"name\":\"东平县\",\"cityCode\":\"3709\",\"provinceCode\":\"37\"},{\"code\":\"370982\",\"name\":\"新泰市\",\"cityCode\":\"3709\",\"provinceCode\":\"37\"},{\"code\":\"370983\",\"name\":\"肥城市\",\"cityCode\":\"3709\",\"provinceCode\":\"37\"},{\"code\":\"371002\",\"name\":\"环翠区\",\"cityCode\":\"3710\",\"provinceCode\":\"37\"},{\"code\":\"371003\",\"name\":\"文登区\",\"cityCode\":\"3710\",\"provinceCode\":\"37\"},{\"code\":\"371071\",\"name\":\"威海火炬高技术产业开发区\",\"cityCode\":\"3710\",\"provinceCode\":\"37\"},{\"code\":\"371072\",\"name\":\"威海经济技术开发区\",\"cityCode\":\"3710\",\"provinceCode\":\"37\"},{\"code\":\"371073\",\"name\":\"威海临港经济技术开发区\",\"cityCode\":\"3710\",\"provinceCode\":\"37\"},{\"code\":\"371082\",\"name\":\"荣成市\",\"cityCode\":\"3710\",\"provinceCode\":\"37\"},{\"code\":\"371083\",\"name\":\"乳山市\",\"cityCode\":\"3710\",\"provinceCode\":\"37\"},{\"code\":\"371102\",\"name\":\"东港区\",\"cityCode\":\"3711\",\"provinceCode\":\"37\"},{\"code\":\"371103\",\"name\":\"岚山区\",\"cityCode\":\"3711\",\"provinceCode\":\"37\"},{\"code\":\"371121\",\"name\":\"五莲县\",\"cityCode\":\"3711\",\"provinceCode\":\"37\"},{\"code\":\"371122\",\"name\":\"莒县\",\"cityCode\":\"3711\",\"provinceCode\":\"37\"},{\"code\":\"371171\",\"name\":\"日照经济技术开发区\",\"cityCode\":\"3711\",\"provinceCode\":\"37\"},{\"code\":\"371172\",\"name\":\"日照国际海洋城\",\"cityCode\":\"3711\",\"provinceCode\":\"37\"},{\"code\":\"371202\",\"name\":\"莱城区\",\"cityCode\":\"3712\",\"provinceCode\":\"37\"},{\"code\":\"371203\",\"name\":\"钢城区\",\"cityCode\":\"3712\",\"provinceCode\":\"37\"},{\"code\":\"371302\",\"name\":\"兰山区\",\"cityCode\":\"3713\",\"provinceCode\":\"37\"},{\"code\":\"371311\",\"name\":\"罗庄区\",\"cityCode\":\"3713\",\"provinceCode\":\"37\"},{\"code\":\"371312\",\"name\":\"河东区\",\"cityCode\":\"3713\",\"provinceCode\":\"37\"},{\"code\":\"371321\",\"name\":\"沂南县\",\"cityCode\":\"3713\",\"provinceCode\":\"37\"},{\"code\":\"371322\",\"name\":\"郯城县\",\"cityCode\":\"3713\",\"provinceCode\":\"37\"},{\"code\":\"371323\",\"name\":\"沂水县\",\"cityCode\":\"3713\",\"provinceCode\":\"37\"},{\"code\":\"371324\",\"name\":\"兰陵县\",\"cityCode\":\"3713\",\"provinceCode\":\"37\"},{\"code\":\"371325\",\"name\":\"费县\",\"cityCode\":\"3713\",\"provinceCode\":\"37\"},{\"code\":\"371326\",\"name\":\"平邑县\",\"cityCode\":\"3713\",\"provinceCode\":\"37\"},{\"code\":\"371327\",\"name\":\"莒南县\",\"cityCode\":\"3713\",\"provinceCode\":\"37\"},{\"code\":\"371328\",\"name\":\"蒙阴县\",\"cityCode\":\"3713\",\"provinceCode\":\"37\"},{\"code\":\"371329\",\"name\":\"临沭县\",\"cityCode\":\"3713\",\"provinceCode\":\"37\"},{\"code\":\"371371\",\"name\":\"临沂高新技术产业开发区\",\"cityCode\":\"3713\",\"provinceCode\":\"37\"},{\"code\":\"371372\",\"name\":\"临沂经济技术开发区\",\"cityCode\":\"3713\",\"provinceCode\":\"37\"},{\"code\":\"371373\",\"name\":\"临沂临港经济开发区\",\"cityCode\":\"3713\",\"provinceCode\":\"37\"},{\"code\":\"371402\",\"name\":\"德城区\",\"cityCode\":\"3714\",\"provinceCode\":\"37\"},{\"code\":\"371403\",\"name\":\"陵城区\",\"cityCode\":\"3714\",\"provinceCode\":\"37\"},{\"code\":\"371422\",\"name\":\"宁津县\",\"cityCode\":\"3714\",\"provinceCode\":\"37\"},{\"code\":\"371423\",\"name\":\"庆云县\",\"cityCode\":\"3714\",\"provinceCode\":\"37\"},{\"code\":\"371424\",\"name\":\"临邑县\",\"cityCode\":\"3714\",\"provinceCode\":\"37\"},{\"code\":\"371425\",\"name\":\"齐河县\",\"cityCode\":\"3714\",\"provinceCode\":\"37\"},{\"code\":\"371426\",\"name\":\"平原县\",\"cityCode\":\"3714\",\"provinceCode\":\"37\"},{\"code\":\"371427\",\"name\":\"夏津县\",\"cityCode\":\"3714\",\"provinceCode\":\"37\"},{\"code\":\"371428\",\"name\":\"武城县\",\"cityCode\":\"3714\",\"provinceCode\":\"37\"},{\"code\":\"371471\",\"name\":\"德州经济技术开发区\",\"cityCode\":\"3714\",\"provinceCode\":\"37\"},{\"code\":\"371472\",\"name\":\"德州运河经济开发区\",\"cityCode\":\"3714\",\"provinceCode\":\"37\"},{\"code\":\"371481\",\"name\":\"乐陵市\",\"cityCode\":\"3714\",\"provinceCode\":\"37\"},{\"code\":\"371482\",\"name\":\"禹城市\",\"cityCode\":\"3714\",\"provinceCode\":\"37\"},{\"code\":\"371502\",\"name\":\"东昌府区\",\"cityCode\":\"3715\",\"provinceCode\":\"37\"},{\"code\":\"371521\",\"name\":\"阳谷县\",\"cityCode\":\"3715\",\"provinceCode\":\"37\"},{\"code\":\"371522\",\"name\":\"莘县\",\"cityCode\":\"3715\",\"provinceCode\":\"37\"},{\"code\":\"371523\",\"name\":\"茌平县\",\"cityCode\":\"3715\",\"provinceCode\":\"37\"},{\"code\":\"371524\",\"name\":\"东阿县\",\"cityCode\":\"3715\",\"provinceCode\":\"37\"},{\"code\":\"371525\",\"name\":\"冠县\",\"cityCode\":\"3715\",\"provinceCode\":\"37\"},{\"code\":\"371526\",\"name\":\"高唐县\",\"cityCode\":\"3715\",\"provinceCode\":\"37\"},{\"code\":\"371581\",\"name\":\"临清市\",\"cityCode\":\"3715\",\"provinceCode\":\"37\"},{\"code\":\"371602\",\"name\":\"滨城区\",\"cityCode\":\"3716\",\"provinceCode\":\"37\"},{\"code\":\"371603\",\"name\":\"沾化区\",\"cityCode\":\"3716\",\"provinceCode\":\"37\"},{\"code\":\"371621\",\"name\":\"惠民县\",\"cityCode\":\"3716\",\"provinceCode\":\"37\"},{\"code\":\"371622\",\"name\":\"阳信县\",\"cityCode\":\"3716\",\"provinceCode\":\"37\"},{\"code\":\"371623\",\"name\":\"无棣县\",\"cityCode\":\"3716\",\"provinceCode\":\"37\"},{\"code\":\"371625\",\"name\":\"博兴县\",\"cityCode\":\"3716\",\"provinceCode\":\"37\"},{\"code\":\"371626\",\"name\":\"邹平县\",\"cityCode\":\"3716\",\"provinceCode\":\"37\"},{\"code\":\"371702\",\"name\":\"牡丹区\",\"cityCode\":\"3717\",\"provinceCode\":\"37\"},{\"code\":\"371703\",\"name\":\"定陶区\",\"cityCode\":\"3717\",\"provinceCode\":\"37\"},{\"code\":\"371721\",\"name\":\"曹县\",\"cityCode\":\"3717\",\"provinceCode\":\"37\"},{\"code\":\"371722\",\"name\":\"单县\",\"cityCode\":\"3717\",\"provinceCode\":\"37\"},{\"code\":\"371723\",\"name\":\"成武县\",\"cityCode\":\"3717\",\"provinceCode\":\"37\"},{\"code\":\"371724\",\"name\":\"巨野县\",\"cityCode\":\"3717\",\"provinceCode\":\"37\"},{\"code\":\"371725\",\"name\":\"郓城县\",\"cityCode\":\"3717\",\"provinceCode\":\"37\"},{\"code\":\"371726\",\"name\":\"鄄城县\",\"cityCode\":\"3717\",\"provinceCode\":\"37\"},{\"code\":\"371728\",\"name\":\"东明县\",\"cityCode\":\"3717\",\"provinceCode\":\"37\"},{\"code\":\"371771\",\"name\":\"菏泽经济技术开发区\",\"cityCode\":\"3717\",\"provinceCode\":\"37\"},{\"code\":\"371772\",\"name\":\"菏泽高新技术开发区\",\"cityCode\":\"3717\",\"provinceCode\":\"37\"},{\"code\":\"410102\",\"name\":\"中原区\",\"cityCode\":\"4101\",\"provinceCode\":\"41\"},{\"code\":\"410103\",\"name\":\"二七区\",\"cityCode\":\"4101\",\"provinceCode\":\"41\"},{\"code\":\"410104\",\"name\":\"管城回族区\",\"cityCode\":\"4101\",\"provinceCode\":\"41\"},{\"code\":\"410105\",\"name\":\"金水区\",\"cityCode\":\"4101\",\"provinceCode\":\"41\"},{\"code\":\"410106\",\"name\":\"上街区\",\"cityCode\":\"4101\",\"provinceCode\":\"41\"},{\"code\":\"410108\",\"name\":\"惠济区\",\"cityCode\":\"4101\",\"provinceCode\":\"41\"},{\"code\":\"410122\",\"name\":\"中牟县\",\"cityCode\":\"4101\",\"provinceCode\":\"41\"},{\"code\":\"410171\",\"name\":\"郑州经济技术开发区\",\"cityCode\":\"4101\",\"provinceCode\":\"41\"},{\"code\":\"410172\",\"name\":\"郑州高新技术产业开发区\",\"cityCode\":\"4101\",\"provinceCode\":\"41\"},{\"code\":\"410173\",\"name\":\"郑州航空港经济综合实验区\",\"cityCode\":\"4101\",\"provinceCode\":\"41\"},{\"code\":\"410181\",\"name\":\"巩义市\",\"cityCode\":\"4101\",\"provinceCode\":\"41\"},{\"code\":\"410182\",\"name\":\"荥阳市\",\"cityCode\":\"4101\",\"provinceCode\":\"41\"},{\"code\":\"410183\",\"name\":\"新密市\",\"cityCode\":\"4101\",\"provinceCode\":\"41\"},{\"code\":\"410184\",\"name\":\"新郑市\",\"cityCode\":\"4101\",\"provinceCode\":\"41\"},{\"code\":\"410185\",\"name\":\"登封市\",\"cityCode\":\"4101\",\"provinceCode\":\"41\"},{\"code\":\"410202\",\"name\":\"龙亭区\",\"cityCode\":\"4102\",\"provinceCode\":\"41\"},{\"code\":\"410203\",\"name\":\"顺河回族区\",\"cityCode\":\"4102\",\"provinceCode\":\"41\"},{\"code\":\"410204\",\"name\":\"鼓楼区\",\"cityCode\":\"4102\",\"provinceCode\":\"41\"},{\"code\":\"410205\",\"name\":\"禹王台区\",\"cityCode\":\"4102\",\"provinceCode\":\"41\"},{\"code\":\"410212\",\"name\":\"祥符区\",\"cityCode\":\"4102\",\"provinceCode\":\"41\"},{\"code\":\"410221\",\"name\":\"杞县\",\"cityCode\":\"4102\",\"provinceCode\":\"41\"},{\"code\":\"410222\",\"name\":\"通许县\",\"cityCode\":\"4102\",\"provinceCode\":\"41\"},{\"code\":\"410223\",\"name\":\"尉氏县\",\"cityCode\":\"4102\",\"provinceCode\":\"41\"},{\"code\":\"410225\",\"name\":\"兰考县\",\"cityCode\":\"4102\",\"provinceCode\":\"41\"},{\"code\":\"410302\",\"name\":\"老城区\",\"cityCode\":\"4103\",\"provinceCode\":\"41\"},{\"code\":\"410303\",\"name\":\"西工区\",\"cityCode\":\"4103\",\"provinceCode\":\"41\"},{\"code\":\"410304\",\"name\":\"瀍河回族区\",\"cityCode\":\"4103\",\"provinceCode\":\"41\"},{\"code\":\"410305\",\"name\":\"涧西区\",\"cityCode\":\"4103\",\"provinceCode\":\"41\"},{\"code\":\"410306\",\"name\":\"吉利区\",\"cityCode\":\"4103\",\"provinceCode\":\"41\"},{\"code\":\"410311\",\"name\":\"洛龙区\",\"cityCode\":\"4103\",\"provinceCode\":\"41\"},{\"code\":\"410322\",\"name\":\"孟津县\",\"cityCode\":\"4103\",\"provinceCode\":\"41\"},{\"code\":\"410323\",\"name\":\"新安县\",\"cityCode\":\"4103\",\"provinceCode\":\"41\"},{\"code\":\"410324\",\"name\":\"栾川县\",\"cityCode\":\"4103\",\"provinceCode\":\"41\"},{\"code\":\"410325\",\"name\":\"嵩县\",\"cityCode\":\"4103\",\"provinceCode\":\"41\"},{\"code\":\"410326\",\"name\":\"汝阳县\",\"cityCode\":\"4103\",\"provinceCode\":\"41\"},{\"code\":\"410327\",\"name\":\"宜阳县\",\"cityCode\":\"4103\",\"provinceCode\":\"41\"},{\"code\":\"410328\",\"name\":\"洛宁县\",\"cityCode\":\"4103\",\"provinceCode\":\"41\"},{\"code\":\"410329\",\"name\":\"伊川县\",\"cityCode\":\"4103\",\"provinceCode\":\"41\"},{\"code\":\"410371\",\"name\":\"洛阳高新技术产业开发区\",\"cityCode\":\"4103\",\"provinceCode\":\"41\"},{\"code\":\"410381\",\"name\":\"偃师市\",\"cityCode\":\"4103\",\"provinceCode\":\"41\"},{\"code\":\"410402\",\"name\":\"新华区\",\"cityCode\":\"4104\",\"provinceCode\":\"41\"},{\"code\":\"410403\",\"name\":\"卫东区\",\"cityCode\":\"4104\",\"provinceCode\":\"41\"},{\"code\":\"410404\",\"name\":\"石龙区\",\"cityCode\":\"4104\",\"provinceCode\":\"41\"},{\"code\":\"410411\",\"name\":\"湛河区\",\"cityCode\":\"4104\",\"provinceCode\":\"41\"},{\"code\":\"410421\",\"name\":\"宝丰县\",\"cityCode\":\"4104\",\"provinceCode\":\"41\"},{\"code\":\"410422\",\"name\":\"叶县\",\"cityCode\":\"4104\",\"provinceCode\":\"41\"},{\"code\":\"410423\",\"name\":\"鲁山县\",\"cityCode\":\"4104\",\"provinceCode\":\"41\"},{\"code\":\"410425\",\"name\":\"郏县\",\"cityCode\":\"4104\",\"provinceCode\":\"41\"},{\"code\":\"410471\",\"name\":\"平顶山高新技术产业开发区\",\"cityCode\":\"4104\",\"provinceCode\":\"41\"},{\"code\":\"410472\",\"name\":\"平顶山市新城区\",\"cityCode\":\"4104\",\"provinceCode\":\"41\"},{\"code\":\"410481\",\"name\":\"舞钢市\",\"cityCode\":\"4104\",\"provinceCode\":\"41\"},{\"code\":\"410482\",\"name\":\"汝州市\",\"cityCode\":\"4104\",\"provinceCode\":\"41\"},{\"code\":\"410502\",\"name\":\"文峰区\",\"cityCode\":\"4105\",\"provinceCode\":\"41\"},{\"code\":\"410503\",\"name\":\"北关区\",\"cityCode\":\"4105\",\"provinceCode\":\"41\"},{\"code\":\"410505\",\"name\":\"殷都区\",\"cityCode\":\"4105\",\"provinceCode\":\"41\"},{\"code\":\"410506\",\"name\":\"龙安区\",\"cityCode\":\"4105\",\"provinceCode\":\"41\"},{\"code\":\"410522\",\"name\":\"安阳县\",\"cityCode\":\"4105\",\"provinceCode\":\"41\"},{\"code\":\"410523\",\"name\":\"汤阴县\",\"cityCode\":\"4105\",\"provinceCode\":\"41\"},{\"code\":\"410526\",\"name\":\"滑县\",\"cityCode\":\"4105\",\"provinceCode\":\"41\"},{\"code\":\"410527\",\"name\":\"内黄县\",\"cityCode\":\"4105\",\"provinceCode\":\"41\"},{\"code\":\"410571\",\"name\":\"安阳高新技术产业开发区\",\"cityCode\":\"4105\",\"provinceCode\":\"41\"},{\"code\":\"410581\",\"name\":\"林州市\",\"cityCode\":\"4105\",\"provinceCode\":\"41\"},{\"code\":\"410602\",\"name\":\"鹤山区\",\"cityCode\":\"4106\",\"provinceCode\":\"41\"},{\"code\":\"410603\",\"name\":\"山城区\",\"cityCode\":\"4106\",\"provinceCode\":\"41\"},{\"code\":\"410611\",\"name\":\"淇滨区\",\"cityCode\":\"4106\",\"provinceCode\":\"41\"},{\"code\":\"410621\",\"name\":\"浚县\",\"cityCode\":\"4106\",\"provinceCode\":\"41\"},{\"code\":\"410622\",\"name\":\"淇县\",\"cityCode\":\"4106\",\"provinceCode\":\"41\"},{\"code\":\"410671\",\"name\":\"鹤壁经济技术开发区\",\"cityCode\":\"4106\",\"provinceCode\":\"41\"},{\"code\":\"410702\",\"name\":\"红旗区\",\"cityCode\":\"4107\",\"provinceCode\":\"41\"},{\"code\":\"410703\",\"name\":\"卫滨区\",\"cityCode\":\"4107\",\"provinceCode\":\"41\"},{\"code\":\"410704\",\"name\":\"凤泉区\",\"cityCode\":\"4107\",\"provinceCode\":\"41\"},{\"code\":\"410711\",\"name\":\"牧野区\",\"cityCode\":\"4107\",\"provinceCode\":\"41\"},{\"code\":\"410721\",\"name\":\"新乡县\",\"cityCode\":\"4107\",\"provinceCode\":\"41\"},{\"code\":\"410724\",\"name\":\"获嘉县\",\"cityCode\":\"4107\",\"provinceCode\":\"41\"},{\"code\":\"410725\",\"name\":\"原阳县\",\"cityCode\":\"4107\",\"provinceCode\":\"41\"},{\"code\":\"410726\",\"name\":\"延津县\",\"cityCode\":\"4107\",\"provinceCode\":\"41\"},{\"code\":\"410727\",\"name\":\"封丘县\",\"cityCode\":\"4107\",\"provinceCode\":\"41\"},{\"code\":\"410728\",\"name\":\"长垣县\",\"cityCode\":\"4107\",\"provinceCode\":\"41\"},{\"code\":\"410771\",\"name\":\"新乡高新技术产业开发区\",\"cityCode\":\"4107\",\"provinceCode\":\"41\"},{\"code\":\"410772\",\"name\":\"新乡经济技术开发区\",\"cityCode\":\"4107\",\"provinceCode\":\"41\"},{\"code\":\"410773\",\"name\":\"新乡市平原城乡一体化示范区\",\"cityCode\":\"4107\",\"provinceCode\":\"41\"},{\"code\":\"410781\",\"name\":\"卫辉市\",\"cityCode\":\"4107\",\"provinceCode\":\"41\"},{\"code\":\"410782\",\"name\":\"辉县市\",\"cityCode\":\"4107\",\"provinceCode\":\"41\"},{\"code\":\"410802\",\"name\":\"解放区\",\"cityCode\":\"4108\",\"provinceCode\":\"41\"},{\"code\":\"410803\",\"name\":\"中站区\",\"cityCode\":\"4108\",\"provinceCode\":\"41\"},{\"code\":\"410804\",\"name\":\"马村区\",\"cityCode\":\"4108\",\"provinceCode\":\"41\"},{\"code\":\"410811\",\"name\":\"山阳区\",\"cityCode\":\"4108\",\"provinceCode\":\"41\"},{\"code\":\"410821\",\"name\":\"修武县\",\"cityCode\":\"4108\",\"provinceCode\":\"41\"},{\"code\":\"410822\",\"name\":\"博爱县\",\"cityCode\":\"4108\",\"provinceCode\":\"41\"},{\"code\":\"410823\",\"name\":\"武陟县\",\"cityCode\":\"4108\",\"provinceCode\":\"41\"},{\"code\":\"410825\",\"name\":\"温县\",\"cityCode\":\"4108\",\"provinceCode\":\"41\"},{\"code\":\"410871\",\"name\":\"焦作城乡一体化示范区\",\"cityCode\":\"4108\",\"provinceCode\":\"41\"},{\"code\":\"410882\",\"name\":\"沁阳市\",\"cityCode\":\"4108\",\"provinceCode\":\"41\"},{\"code\":\"410883\",\"name\":\"孟州市\",\"cityCode\":\"4108\",\"provinceCode\":\"41\"},{\"code\":\"410902\",\"name\":\"华龙区\",\"cityCode\":\"4109\",\"provinceCode\":\"41\"},{\"code\":\"410922\",\"name\":\"清丰县\",\"cityCode\":\"4109\",\"provinceCode\":\"41\"},{\"code\":\"410923\",\"name\":\"南乐县\",\"cityCode\":\"4109\",\"provinceCode\":\"41\"},{\"code\":\"410926\",\"name\":\"范县\",\"cityCode\":\"4109\",\"provinceCode\":\"41\"},{\"code\":\"410927\",\"name\":\"台前县\",\"cityCode\":\"4109\",\"provinceCode\":\"41\"},{\"code\":\"410928\",\"name\":\"濮阳县\",\"cityCode\":\"4109\",\"provinceCode\":\"41\"},{\"code\":\"410971\",\"name\":\"河南濮阳工业园区\",\"cityCode\":\"4109\",\"provinceCode\":\"41\"},{\"code\":\"410972\",\"name\":\"濮阳经济技术开发区\",\"cityCode\":\"4109\",\"provinceCode\":\"41\"},{\"code\":\"411002\",\"name\":\"魏都区\",\"cityCode\":\"4110\",\"provinceCode\":\"41\"},{\"code\":\"411003\",\"name\":\"建安区\",\"cityCode\":\"4110\",\"provinceCode\":\"41\"},{\"code\":\"411024\",\"name\":\"鄢陵县\",\"cityCode\":\"4110\",\"provinceCode\":\"41\"},{\"code\":\"411025\",\"name\":\"襄城县\",\"cityCode\":\"4110\",\"provinceCode\":\"41\"},{\"code\":\"411071\",\"name\":\"许昌经济技术开发区\",\"cityCode\":\"4110\",\"provinceCode\":\"41\"},{\"code\":\"411081\",\"name\":\"禹州市\",\"cityCode\":\"4110\",\"provinceCode\":\"41\"},{\"code\":\"411082\",\"name\":\"长葛市\",\"cityCode\":\"4110\",\"provinceCode\":\"41\"},{\"code\":\"411102\",\"name\":\"源汇区\",\"cityCode\":\"4111\",\"provinceCode\":\"41\"},{\"code\":\"411103\",\"name\":\"郾城区\",\"cityCode\":\"4111\",\"provinceCode\":\"41\"},{\"code\":\"411104\",\"name\":\"召陵区\",\"cityCode\":\"4111\",\"provinceCode\":\"41\"},{\"code\":\"411121\",\"name\":\"舞阳县\",\"cityCode\":\"4111\",\"provinceCode\":\"41\"},{\"code\":\"411122\",\"name\":\"临颍县\",\"cityCode\":\"4111\",\"provinceCode\":\"41\"},{\"code\":\"411171\",\"name\":\"漯河经济技术开发区\",\"cityCode\":\"4111\",\"provinceCode\":\"41\"},{\"code\":\"411202\",\"name\":\"湖滨区\",\"cityCode\":\"4112\",\"provinceCode\":\"41\"},{\"code\":\"411203\",\"name\":\"陕州区\",\"cityCode\":\"4112\",\"provinceCode\":\"41\"},{\"code\":\"411221\",\"name\":\"渑池县\",\"cityCode\":\"4112\",\"provinceCode\":\"41\"},{\"code\":\"411224\",\"name\":\"卢氏县\",\"cityCode\":\"4112\",\"provinceCode\":\"41\"},{\"code\":\"411271\",\"name\":\"河南三门峡经济开发区\",\"cityCode\":\"4112\",\"provinceCode\":\"41\"},{\"code\":\"411281\",\"name\":\"义马市\",\"cityCode\":\"4112\",\"provinceCode\":\"41\"},{\"code\":\"411282\",\"name\":\"灵宝市\",\"cityCode\":\"4112\",\"provinceCode\":\"41\"},{\"code\":\"411302\",\"name\":\"宛城区\",\"cityCode\":\"4113\",\"provinceCode\":\"41\"},{\"code\":\"411303\",\"name\":\"卧龙区\",\"cityCode\":\"4113\",\"provinceCode\":\"41\"},{\"code\":\"411321\",\"name\":\"南召县\",\"cityCode\":\"4113\",\"provinceCode\":\"41\"},{\"code\":\"411322\",\"name\":\"方城县\",\"cityCode\":\"4113\",\"provinceCode\":\"41\"},{\"code\":\"411323\",\"name\":\"西峡县\",\"cityCode\":\"4113\",\"provinceCode\":\"41\"},{\"code\":\"411324\",\"name\":\"镇平县\",\"cityCode\":\"4113\",\"provinceCode\":\"41\"},{\"code\":\"411325\",\"name\":\"内乡县\",\"cityCode\":\"4113\",\"provinceCode\":\"41\"},{\"code\":\"411326\",\"name\":\"淅川县\",\"cityCode\":\"4113\",\"provinceCode\":\"41\"},{\"code\":\"411327\",\"name\":\"社旗县\",\"cityCode\":\"4113\",\"provinceCode\":\"41\"},{\"code\":\"411328\",\"name\":\"唐河县\",\"cityCode\":\"4113\",\"provinceCode\":\"41\"},{\"code\":\"411329\",\"name\":\"新野县\",\"cityCode\":\"4113\",\"provinceCode\":\"41\"},{\"code\":\"411330\",\"name\":\"桐柏县\",\"cityCode\":\"4113\",\"provinceCode\":\"41\"},{\"code\":\"411371\",\"name\":\"南阳高新技术产业开发区\",\"cityCode\":\"4113\",\"provinceCode\":\"41\"},{\"code\":\"411372\",\"name\":\"南阳市城乡一体化示范区\",\"cityCode\":\"4113\",\"provinceCode\":\"41\"},{\"code\":\"411381\",\"name\":\"邓州市\",\"cityCode\":\"4113\",\"provinceCode\":\"41\"},{\"code\":\"411402\",\"name\":\"梁园区\",\"cityCode\":\"4114\",\"provinceCode\":\"41\"},{\"code\":\"411403\",\"name\":\"睢阳区\",\"cityCode\":\"4114\",\"provinceCode\":\"41\"},{\"code\":\"411421\",\"name\":\"民权县\",\"cityCode\":\"4114\",\"provinceCode\":\"41\"},{\"code\":\"411422\",\"name\":\"睢县\",\"cityCode\":\"4114\",\"provinceCode\":\"41\"},{\"code\":\"411423\",\"name\":\"宁陵县\",\"cityCode\":\"4114\",\"provinceCode\":\"41\"},{\"code\":\"411424\",\"name\":\"柘城县\",\"cityCode\":\"4114\",\"provinceCode\":\"41\"},{\"code\":\"411425\",\"name\":\"虞城县\",\"cityCode\":\"4114\",\"provinceCode\":\"41\"},{\"code\":\"411426\",\"name\":\"夏邑县\",\"cityCode\":\"4114\",\"provinceCode\":\"41\"},{\"code\":\"411471\",\"name\":\"豫东综合物流产业聚集区\",\"cityCode\":\"4114\",\"provinceCode\":\"41\"},{\"code\":\"411472\",\"name\":\"河南商丘经济开发区\",\"cityCode\":\"4114\",\"provinceCode\":\"41\"},{\"code\":\"411481\",\"name\":\"永城市\",\"cityCode\":\"4114\",\"provinceCode\":\"41\"},{\"code\":\"411502\",\"name\":\"浉河区\",\"cityCode\":\"4115\",\"provinceCode\":\"41\"},{\"code\":\"411503\",\"name\":\"平桥区\",\"cityCode\":\"4115\",\"provinceCode\":\"41\"},{\"code\":\"411521\",\"name\":\"罗山县\",\"cityCode\":\"4115\",\"provinceCode\":\"41\"},{\"code\":\"411522\",\"name\":\"光山县\",\"cityCode\":\"4115\",\"provinceCode\":\"41\"},{\"code\":\"411523\",\"name\":\"新县\",\"cityCode\":\"4115\",\"provinceCode\":\"41\"},{\"code\":\"411524\",\"name\":\"商城县\",\"cityCode\":\"4115\",\"provinceCode\":\"41\"},{\"code\":\"411525\",\"name\":\"固始县\",\"cityCode\":\"4115\",\"provinceCode\":\"41\"},{\"code\":\"411526\",\"name\":\"潢川县\",\"cityCode\":\"4115\",\"provinceCode\":\"41\"},{\"code\":\"411527\",\"name\":\"淮滨县\",\"cityCode\":\"4115\",\"provinceCode\":\"41\"},{\"code\":\"411528\",\"name\":\"息县\",\"cityCode\":\"4115\",\"provinceCode\":\"41\"},{\"code\":\"411571\",\"name\":\"信阳高新技术产业开发区\",\"cityCode\":\"4115\",\"provinceCode\":\"41\"},{\"code\":\"411602\",\"name\":\"川汇区\",\"cityCode\":\"4116\",\"provinceCode\":\"41\"},{\"code\":\"411621\",\"name\":\"扶沟县\",\"cityCode\":\"4116\",\"provinceCode\":\"41\"},{\"code\":\"411622\",\"name\":\"西华县\",\"cityCode\":\"4116\",\"provinceCode\":\"41\"},{\"code\":\"411623\",\"name\":\"商水县\",\"cityCode\":\"4116\",\"provinceCode\":\"41\"},{\"code\":\"411624\",\"name\":\"沈丘县\",\"cityCode\":\"4116\",\"provinceCode\":\"41\"},{\"code\":\"411625\",\"name\":\"郸城县\",\"cityCode\":\"4116\",\"provinceCode\":\"41\"},{\"code\":\"411626\",\"name\":\"淮阳县\",\"cityCode\":\"4116\",\"provinceCode\":\"41\"},{\"code\":\"411627\",\"name\":\"太康县\",\"cityCode\":\"4116\",\"provinceCode\":\"41\"},{\"code\":\"411628\",\"name\":\"鹿邑县\",\"cityCode\":\"4116\",\"provinceCode\":\"41\"},{\"code\":\"411671\",\"name\":\"河南周口经济开发区\",\"cityCode\":\"4116\",\"provinceCode\":\"41\"},{\"code\":\"411681\",\"name\":\"项城市\",\"cityCode\":\"4116\",\"provinceCode\":\"41\"},{\"code\":\"411702\",\"name\":\"驿城区\",\"cityCode\":\"4117\",\"provinceCode\":\"41\"},{\"code\":\"411721\",\"name\":\"西平县\",\"cityCode\":\"4117\",\"provinceCode\":\"41\"},{\"code\":\"411722\",\"name\":\"上蔡县\",\"cityCode\":\"4117\",\"provinceCode\":\"41\"},{\"code\":\"411723\",\"name\":\"平舆县\",\"cityCode\":\"4117\",\"provinceCode\":\"41\"},{\"code\":\"411724\",\"name\":\"正阳县\",\"cityCode\":\"4117\",\"provinceCode\":\"41\"},{\"code\":\"411725\",\"name\":\"确山县\",\"cityCode\":\"4117\",\"provinceCode\":\"41\"},{\"code\":\"411726\",\"name\":\"泌阳县\",\"cityCode\":\"4117\",\"provinceCode\":\"41\"},{\"code\":\"411727\",\"name\":\"汝南县\",\"cityCode\":\"4117\",\"provinceCode\":\"41\"},{\"code\":\"411728\",\"name\":\"遂平县\",\"cityCode\":\"4117\",\"provinceCode\":\"41\"},{\"code\":\"411729\",\"name\":\"新蔡县\",\"cityCode\":\"4117\",\"provinceCode\":\"41\"},{\"code\":\"411771\",\"name\":\"河南驻马店经济开发区\",\"cityCode\":\"4117\",\"provinceCode\":\"41\"},{\"code\":\"419001\",\"name\":\"济源市\",\"cityCode\":\"4190\",\"provinceCode\":\"41\"},{\"code\":\"420102\",\"name\":\"江岸区\",\"cityCode\":\"4201\",\"provinceCode\":\"42\"},{\"code\":\"420103\",\"name\":\"江汉区\",\"cityCode\":\"4201\",\"provinceCode\":\"42\"},{\"code\":\"420104\",\"name\":\"硚口区\",\"cityCode\":\"4201\",\"provinceCode\":\"42\"},{\"code\":\"420105\",\"name\":\"汉阳区\",\"cityCode\":\"4201\",\"provinceCode\":\"42\"},{\"code\":\"420106\",\"name\":\"武昌区\",\"cityCode\":\"4201\",\"provinceCode\":\"42\"},{\"code\":\"420107\",\"name\":\"青山区\",\"cityCode\":\"4201\",\"provinceCode\":\"42\"},{\"code\":\"420111\",\"name\":\"洪山区\",\"cityCode\":\"4201\",\"provinceCode\":\"42\"},{\"code\":\"420112\",\"name\":\"东西湖区\",\"cityCode\":\"4201\",\"provinceCode\":\"42\"},{\"code\":\"420113\",\"name\":\"汉南区\",\"cityCode\":\"4201\",\"provinceCode\":\"42\"},{\"code\":\"420114\",\"name\":\"蔡甸区\",\"cityCode\":\"4201\",\"provinceCode\":\"42\"},{\"code\":\"420115\",\"name\":\"江夏区\",\"cityCode\":\"4201\",\"provinceCode\":\"42\"},{\"code\":\"420116\",\"name\":\"黄陂区\",\"cityCode\":\"4201\",\"provinceCode\":\"42\"},{\"code\":\"420117\",\"name\":\"新洲区\",\"cityCode\":\"4201\",\"provinceCode\":\"42\"},{\"code\":\"420202\",\"name\":\"黄石港区\",\"cityCode\":\"4202\",\"provinceCode\":\"42\"},{\"code\":\"420203\",\"name\":\"西塞山区\",\"cityCode\":\"4202\",\"provinceCode\":\"42\"},{\"code\":\"420204\",\"name\":\"下陆区\",\"cityCode\":\"4202\",\"provinceCode\":\"42\"},{\"code\":\"420205\",\"name\":\"铁山区\",\"cityCode\":\"4202\",\"provinceCode\":\"42\"},{\"code\":\"420222\",\"name\":\"阳新县\",\"cityCode\":\"4202\",\"provinceCode\":\"42\"},{\"code\":\"420281\",\"name\":\"大冶市\",\"cityCode\":\"4202\",\"provinceCode\":\"42\"},{\"code\":\"420302\",\"name\":\"茅箭区\",\"cityCode\":\"4203\",\"provinceCode\":\"42\"},{\"code\":\"420303\",\"name\":\"张湾区\",\"cityCode\":\"4203\",\"provinceCode\":\"42\"},{\"code\":\"420304\",\"name\":\"郧阳区\",\"cityCode\":\"4203\",\"provinceCode\":\"42\"},{\"code\":\"420322\",\"name\":\"郧西县\",\"cityCode\":\"4203\",\"provinceCode\":\"42\"},{\"code\":\"420323\",\"name\":\"竹山县\",\"cityCode\":\"4203\",\"provinceCode\":\"42\"},{\"code\":\"420324\",\"name\":\"竹溪县\",\"cityCode\":\"4203\",\"provinceCode\":\"42\"},{\"code\":\"420325\",\"name\":\"房县\",\"cityCode\":\"4203\",\"provinceCode\":\"42\"},{\"code\":\"420381\",\"name\":\"丹江口市\",\"cityCode\":\"4203\",\"provinceCode\":\"42\"},{\"code\":\"420502\",\"name\":\"西陵区\",\"cityCode\":\"4205\",\"provinceCode\":\"42\"},{\"code\":\"420503\",\"name\":\"伍家岗区\",\"cityCode\":\"4205\",\"provinceCode\":\"42\"},{\"code\":\"420504\",\"name\":\"点军区\",\"cityCode\":\"4205\",\"provinceCode\":\"42\"},{\"code\":\"420505\",\"name\":\"猇亭区\",\"cityCode\":\"4205\",\"provinceCode\":\"42\"},{\"code\":\"420506\",\"name\":\"夷陵区\",\"cityCode\":\"4205\",\"provinceCode\":\"42\"},{\"code\":\"420525\",\"name\":\"远安县\",\"cityCode\":\"4205\",\"provinceCode\":\"42\"},{\"code\":\"420526\",\"name\":\"兴山县\",\"cityCode\":\"4205\",\"provinceCode\":\"42\"},{\"code\":\"420527\",\"name\":\"秭归县\",\"cityCode\":\"4205\",\"provinceCode\":\"42\"},{\"code\":\"420528\",\"name\":\"长阳土家族自治县\",\"cityCode\":\"4205\",\"provinceCode\":\"42\"},{\"code\":\"420529\",\"name\":\"五峰土家族自治县\",\"cityCode\":\"4205\",\"provinceCode\":\"42\"},{\"code\":\"420581\",\"name\":\"宜都市\",\"cityCode\":\"4205\",\"provinceCode\":\"42\"},{\"code\":\"420582\",\"name\":\"当阳市\",\"cityCode\":\"4205\",\"provinceCode\":\"42\"},{\"code\":\"420583\",\"name\":\"枝江市\",\"cityCode\":\"4205\",\"provinceCode\":\"42\"},{\"code\":\"420602\",\"name\":\"襄城区\",\"cityCode\":\"4206\",\"provinceCode\":\"42\"},{\"code\":\"420606\",\"name\":\"樊城区\",\"cityCode\":\"4206\",\"provinceCode\":\"42\"},{\"code\":\"420607\",\"name\":\"襄州区\",\"cityCode\":\"4206\",\"provinceCode\":\"42\"},{\"code\":\"420624\",\"name\":\"南漳县\",\"cityCode\":\"4206\",\"provinceCode\":\"42\"},{\"code\":\"420625\",\"name\":\"谷城县\",\"cityCode\":\"4206\",\"provinceCode\":\"42\"},{\"code\":\"420626\",\"name\":\"保康县\",\"cityCode\":\"4206\",\"provinceCode\":\"42\"},{\"code\":\"420682\",\"name\":\"老河口市\",\"cityCode\":\"4206\",\"provinceCode\":\"42\"},{\"code\":\"420683\",\"name\":\"枣阳市\",\"cityCode\":\"4206\",\"provinceCode\":\"42\"},{\"code\":\"420684\",\"name\":\"宜城市\",\"cityCode\":\"4206\",\"provinceCode\":\"42\"},{\"code\":\"420702\",\"name\":\"梁子湖区\",\"cityCode\":\"4207\",\"provinceCode\":\"42\"},{\"code\":\"420703\",\"name\":\"华容区\",\"cityCode\":\"4207\",\"provinceCode\":\"42\"},{\"code\":\"420704\",\"name\":\"鄂城区\",\"cityCode\":\"4207\",\"provinceCode\":\"42\"},{\"code\":\"420802\",\"name\":\"东宝区\",\"cityCode\":\"4208\",\"provinceCode\":\"42\"},{\"code\":\"420804\",\"name\":\"掇刀区\",\"cityCode\":\"4208\",\"provinceCode\":\"42\"},{\"code\":\"420821\",\"name\":\"京山县\",\"cityCode\":\"4208\",\"provinceCode\":\"42\"},{\"code\":\"420822\",\"name\":\"沙洋县\",\"cityCode\":\"4208\",\"provinceCode\":\"42\"},{\"code\":\"420881\",\"name\":\"钟祥市\",\"cityCode\":\"4208\",\"provinceCode\":\"42\"},{\"code\":\"420902\",\"name\":\"孝南区\",\"cityCode\":\"4209\",\"provinceCode\":\"42\"},{\"code\":\"420921\",\"name\":\"孝昌县\",\"cityCode\":\"4209\",\"provinceCode\":\"42\"},{\"code\":\"420922\",\"name\":\"大悟县\",\"cityCode\":\"4209\",\"provinceCode\":\"42\"},{\"code\":\"420923\",\"name\":\"云梦县\",\"cityCode\":\"4209\",\"provinceCode\":\"42\"},{\"code\":\"420981\",\"name\":\"应城市\",\"cityCode\":\"4209\",\"provinceCode\":\"42\"},{\"code\":\"420982\",\"name\":\"安陆市\",\"cityCode\":\"4209\",\"provinceCode\":\"42\"},{\"code\":\"420984\",\"name\":\"汉川市\",\"cityCode\":\"4209\",\"provinceCode\":\"42\"},{\"code\":\"421002\",\"name\":\"沙市区\",\"cityCode\":\"4210\",\"provinceCode\":\"42\"},{\"code\":\"421003\",\"name\":\"荆州区\",\"cityCode\":\"4210\",\"provinceCode\":\"42\"},{\"code\":\"421022\",\"name\":\"公安县\",\"cityCode\":\"4210\",\"provinceCode\":\"42\"},{\"code\":\"421023\",\"name\":\"监利县\",\"cityCode\":\"4210\",\"provinceCode\":\"42\"},{\"code\":\"421024\",\"name\":\"江陵县\",\"cityCode\":\"4210\",\"provinceCode\":\"42\"},{\"code\":\"421071\",\"name\":\"荆州经济技术开发区\",\"cityCode\":\"4210\",\"provinceCode\":\"42\"},{\"code\":\"421081\",\"name\":\"石首市\",\"cityCode\":\"4210\",\"provinceCode\":\"42\"},{\"code\":\"421083\",\"name\":\"洪湖市\",\"cityCode\":\"4210\",\"provinceCode\":\"42\"},{\"code\":\"421087\",\"name\":\"松滋市\",\"cityCode\":\"4210\",\"provinceCode\":\"42\"},{\"code\":\"421102\",\"name\":\"黄州区\",\"cityCode\":\"4211\",\"provinceCode\":\"42\"},{\"code\":\"421121\",\"name\":\"团风县\",\"cityCode\":\"4211\",\"provinceCode\":\"42\"},{\"code\":\"421122\",\"name\":\"红安县\",\"cityCode\":\"4211\",\"provinceCode\":\"42\"},{\"code\":\"421123\",\"name\":\"罗田县\",\"cityCode\":\"4211\",\"provinceCode\":\"42\"},{\"code\":\"421124\",\"name\":\"英山县\",\"cityCode\":\"4211\",\"provinceCode\":\"42\"},{\"code\":\"421125\",\"name\":\"浠水县\",\"cityCode\":\"4211\",\"provinceCode\":\"42\"},{\"code\":\"421126\",\"name\":\"蕲春县\",\"cityCode\":\"4211\",\"provinceCode\":\"42\"},{\"code\":\"421127\",\"name\":\"黄梅县\",\"cityCode\":\"4211\",\"provinceCode\":\"42\"},{\"code\":\"421171\",\"name\":\"龙感湖管理区\",\"cityCode\":\"4211\",\"provinceCode\":\"42\"},{\"code\":\"421181\",\"name\":\"麻城市\",\"cityCode\":\"4211\",\"provinceCode\":\"42\"},{\"code\":\"421182\",\"name\":\"武穴市\",\"cityCode\":\"4211\",\"provinceCode\":\"42\"},{\"code\":\"421202\",\"name\":\"咸安区\",\"cityCode\":\"4212\",\"provinceCode\":\"42\"},{\"code\":\"421221\",\"name\":\"嘉鱼县\",\"cityCode\":\"4212\",\"provinceCode\":\"42\"},{\"code\":\"421222\",\"name\":\"通城县\",\"cityCode\":\"4212\",\"provinceCode\":\"42\"},{\"code\":\"421223\",\"name\":\"崇阳县\",\"cityCode\":\"4212\",\"provinceCode\":\"42\"},{\"code\":\"421224\",\"name\":\"通山县\",\"cityCode\":\"4212\",\"provinceCode\":\"42\"},{\"code\":\"421281\",\"name\":\"赤壁市\",\"cityCode\":\"4212\",\"provinceCode\":\"42\"},{\"code\":\"421303\",\"name\":\"曾都区\",\"cityCode\":\"4213\",\"provinceCode\":\"42\"},{\"code\":\"421321\",\"name\":\"随县\",\"cityCode\":\"4213\",\"provinceCode\":\"42\"},{\"code\":\"421381\",\"name\":\"广水市\",\"cityCode\":\"4213\",\"provinceCode\":\"42\"},{\"code\":\"422801\",\"name\":\"恩施市\",\"cityCode\":\"4228\",\"provinceCode\":\"42\"},{\"code\":\"422802\",\"name\":\"利川市\",\"cityCode\":\"4228\",\"provinceCode\":\"42\"},{\"code\":\"422822\",\"name\":\"建始县\",\"cityCode\":\"4228\",\"provinceCode\":\"42\"},{\"code\":\"422823\",\"name\":\"巴东县\",\"cityCode\":\"4228\",\"provinceCode\":\"42\"},{\"code\":\"422825\",\"name\":\"宣恩县\",\"cityCode\":\"4228\",\"provinceCode\":\"42\"},{\"code\":\"422826\",\"name\":\"咸丰县\",\"cityCode\":\"4228\",\"provinceCode\":\"42\"},{\"code\":\"422827\",\"name\":\"来凤县\",\"cityCode\":\"4228\",\"provinceCode\":\"42\"},{\"code\":\"422828\",\"name\":\"鹤峰县\",\"cityCode\":\"4228\",\"provinceCode\":\"42\"},{\"code\":\"429004\",\"name\":\"仙桃市\",\"cityCode\":\"4290\",\"provinceCode\":\"42\"},{\"code\":\"429005\",\"name\":\"潜江市\",\"cityCode\":\"4290\",\"provinceCode\":\"42\"},{\"code\":\"429006\",\"name\":\"天门市\",\"cityCode\":\"4290\",\"provinceCode\":\"42\"},{\"code\":\"429021\",\"name\":\"神农架林区\",\"cityCode\":\"4290\",\"provinceCode\":\"42\"},{\"code\":\"430102\",\"name\":\"芙蓉区\",\"cityCode\":\"4301\",\"provinceCode\":\"43\"},{\"code\":\"430103\",\"name\":\"天心区\",\"cityCode\":\"4301\",\"provinceCode\":\"43\"},{\"code\":\"430104\",\"name\":\"岳麓区\",\"cityCode\":\"4301\",\"provinceCode\":\"43\"},{\"code\":\"430105\",\"name\":\"开福区\",\"cityCode\":\"4301\",\"provinceCode\":\"43\"},{\"code\":\"430111\",\"name\":\"雨花区\",\"cityCode\":\"4301\",\"provinceCode\":\"43\"},{\"code\":\"430112\",\"name\":\"望城区\",\"cityCode\":\"4301\",\"provinceCode\":\"43\"},{\"code\":\"430121\",\"name\":\"长沙县\",\"cityCode\":\"4301\",\"provinceCode\":\"43\"},{\"code\":\"430181\",\"name\":\"浏阳市\",\"cityCode\":\"4301\",\"provinceCode\":\"43\"},{\"code\":\"430182\",\"name\":\"宁乡市\",\"cityCode\":\"4301\",\"provinceCode\":\"43\"},{\"code\":\"430202\",\"name\":\"荷塘区\",\"cityCode\":\"4302\",\"provinceCode\":\"43\"},{\"code\":\"430203\",\"name\":\"芦淞区\",\"cityCode\":\"4302\",\"provinceCode\":\"43\"},{\"code\":\"430204\",\"name\":\"石峰区\",\"cityCode\":\"4302\",\"provinceCode\":\"43\"},{\"code\":\"430211\",\"name\":\"天元区\",\"cityCode\":\"4302\",\"provinceCode\":\"43\"},{\"code\":\"430221\",\"name\":\"株洲县\",\"cityCode\":\"4302\",\"provinceCode\":\"43\"},{\"code\":\"430223\",\"name\":\"攸县\",\"cityCode\":\"4302\",\"provinceCode\":\"43\"},{\"code\":\"430224\",\"name\":\"茶陵县\",\"cityCode\":\"4302\",\"provinceCode\":\"43\"},{\"code\":\"430225\",\"name\":\"炎陵县\",\"cityCode\":\"4302\",\"provinceCode\":\"43\"},{\"code\":\"430271\",\"name\":\"云龙示范区\",\"cityCode\":\"4302\",\"provinceCode\":\"43\"},{\"code\":\"430281\",\"name\":\"醴陵市\",\"cityCode\":\"4302\",\"provinceCode\":\"43\"},{\"code\":\"430302\",\"name\":\"雨湖区\",\"cityCode\":\"4303\",\"provinceCode\":\"43\"},{\"code\":\"430304\",\"name\":\"岳塘区\",\"cityCode\":\"4303\",\"provinceCode\":\"43\"},{\"code\":\"430321\",\"name\":\"湘潭县\",\"cityCode\":\"4303\",\"provinceCode\":\"43\"},{\"code\":\"430371\",\"name\":\"湖南湘潭高新技术产业园区\",\"cityCode\":\"4303\",\"provinceCode\":\"43\"},{\"code\":\"430372\",\"name\":\"湘潭昭山示范区\",\"cityCode\":\"4303\",\"provinceCode\":\"43\"},{\"code\":\"430373\",\"name\":\"湘潭九华示范区\",\"cityCode\":\"4303\",\"provinceCode\":\"43\"},{\"code\":\"430381\",\"name\":\"湘乡市\",\"cityCode\":\"4303\",\"provinceCode\":\"43\"},{\"code\":\"430382\",\"name\":\"韶山市\",\"cityCode\":\"4303\",\"provinceCode\":\"43\"},{\"code\":\"430405\",\"name\":\"珠晖区\",\"cityCode\":\"4304\",\"provinceCode\":\"43\"},{\"code\":\"430406\",\"name\":\"雁峰区\",\"cityCode\":\"4304\",\"provinceCode\":\"43\"},{\"code\":\"430407\",\"name\":\"石鼓区\",\"cityCode\":\"4304\",\"provinceCode\":\"43\"},{\"code\":\"430408\",\"name\":\"蒸湘区\",\"cityCode\":\"4304\",\"provinceCode\":\"43\"},{\"code\":\"430412\",\"name\":\"南岳区\",\"cityCode\":\"4304\",\"provinceCode\":\"43\"},{\"code\":\"430421\",\"name\":\"衡阳县\",\"cityCode\":\"4304\",\"provinceCode\":\"43\"},{\"code\":\"430422\",\"name\":\"衡南县\",\"cityCode\":\"4304\",\"provinceCode\":\"43\"},{\"code\":\"430423\",\"name\":\"衡山县\",\"cityCode\":\"4304\",\"provinceCode\":\"43\"},{\"code\":\"430424\",\"name\":\"衡东县\",\"cityCode\":\"4304\",\"provinceCode\":\"43\"},{\"code\":\"430426\",\"name\":\"祁东县\",\"cityCode\":\"4304\",\"provinceCode\":\"43\"},{\"code\":\"430471\",\"name\":\"衡阳综合保税区\",\"cityCode\":\"4304\",\"provinceCode\":\"43\"},{\"code\":\"430472\",\"name\":\"湖南衡阳高新技术产业园区\",\"cityCode\":\"4304\",\"provinceCode\":\"43\"},{\"code\":\"430473\",\"name\":\"湖南衡阳松木经济开发区\",\"cityCode\":\"4304\",\"provinceCode\":\"43\"},{\"code\":\"430481\",\"name\":\"耒阳市\",\"cityCode\":\"4304\",\"provinceCode\":\"43\"},{\"code\":\"430482\",\"name\":\"常宁市\",\"cityCode\":\"4304\",\"provinceCode\":\"43\"},{\"code\":\"430502\",\"name\":\"双清区\",\"cityCode\":\"4305\",\"provinceCode\":\"43\"},{\"code\":\"430503\",\"name\":\"大祥区\",\"cityCode\":\"4305\",\"provinceCode\":\"43\"},{\"code\":\"430511\",\"name\":\"北塔区\",\"cityCode\":\"4305\",\"provinceCode\":\"43\"},{\"code\":\"430521\",\"name\":\"邵东县\",\"cityCode\":\"4305\",\"provinceCode\":\"43\"},{\"code\":\"430522\",\"name\":\"新邵县\",\"cityCode\":\"4305\",\"provinceCode\":\"43\"},{\"code\":\"430523\",\"name\":\"邵阳县\",\"cityCode\":\"4305\",\"provinceCode\":\"43\"},{\"code\":\"430524\",\"name\":\"隆回县\",\"cityCode\":\"4305\",\"provinceCode\":\"43\"},{\"code\":\"430525\",\"name\":\"洞口县\",\"cityCode\":\"4305\",\"provinceCode\":\"43\"},{\"code\":\"430527\",\"name\":\"绥宁县\",\"cityCode\":\"4305\",\"provinceCode\":\"43\"},{\"code\":\"430528\",\"name\":\"新宁县\",\"cityCode\":\"4305\",\"provinceCode\":\"43\"},{\"code\":\"430529\",\"name\":\"城步苗族自治县\",\"cityCode\":\"4305\",\"provinceCode\":\"43\"},{\"code\":\"430581\",\"name\":\"武冈市\",\"cityCode\":\"4305\",\"provinceCode\":\"43\"},{\"code\":\"430602\",\"name\":\"岳阳楼区\",\"cityCode\":\"4306\",\"provinceCode\":\"43\"},{\"code\":\"430603\",\"name\":\"云溪区\",\"cityCode\":\"4306\",\"provinceCode\":\"43\"},{\"code\":\"430611\",\"name\":\"君山区\",\"cityCode\":\"4306\",\"provinceCode\":\"43\"},{\"code\":\"430621\",\"name\":\"岳阳县\",\"cityCode\":\"4306\",\"provinceCode\":\"43\"},{\"code\":\"430623\",\"name\":\"华容县\",\"cityCode\":\"4306\",\"provinceCode\":\"43\"},{\"code\":\"430624\",\"name\":\"湘阴县\",\"cityCode\":\"4306\",\"provinceCode\":\"43\"},{\"code\":\"430626\",\"name\":\"平江县\",\"cityCode\":\"4306\",\"provinceCode\":\"43\"},{\"code\":\"430671\",\"name\":\"岳阳市屈原管理区\",\"cityCode\":\"4306\",\"provinceCode\":\"43\"},{\"code\":\"430681\",\"name\":\"汨罗市\",\"cityCode\":\"4306\",\"provinceCode\":\"43\"},{\"code\":\"430682\",\"name\":\"临湘市\",\"cityCode\":\"4306\",\"provinceCode\":\"43\"},{\"code\":\"430702\",\"name\":\"武陵区\",\"cityCode\":\"4307\",\"provinceCode\":\"43\"},{\"code\":\"430703\",\"name\":\"鼎城区\",\"cityCode\":\"4307\",\"provinceCode\":\"43\"},{\"code\":\"430721\",\"name\":\"安乡县\",\"cityCode\":\"4307\",\"provinceCode\":\"43\"},{\"code\":\"430722\",\"name\":\"汉寿县\",\"cityCode\":\"4307\",\"provinceCode\":\"43\"},{\"code\":\"430723\",\"name\":\"澧县\",\"cityCode\":\"4307\",\"provinceCode\":\"43\"},{\"code\":\"430724\",\"name\":\"临澧县\",\"cityCode\":\"4307\",\"provinceCode\":\"43\"},{\"code\":\"430725\",\"name\":\"桃源县\",\"cityCode\":\"4307\",\"provinceCode\":\"43\"},{\"code\":\"430726\",\"name\":\"石门县\",\"cityCode\":\"4307\",\"provinceCode\":\"43\"},{\"code\":\"430771\",\"name\":\"常德市西洞庭管理区\",\"cityCode\":\"4307\",\"provinceCode\":\"43\"},{\"code\":\"430781\",\"name\":\"津市市\",\"cityCode\":\"4307\",\"provinceCode\":\"43\"},{\"code\":\"430802\",\"name\":\"永定区\",\"cityCode\":\"4308\",\"provinceCode\":\"43\"},{\"code\":\"430811\",\"name\":\"武陵源区\",\"cityCode\":\"4308\",\"provinceCode\":\"43\"},{\"code\":\"430821\",\"name\":\"慈利县\",\"cityCode\":\"4308\",\"provinceCode\":\"43\"},{\"code\":\"430822\",\"name\":\"桑植县\",\"cityCode\":\"4308\",\"provinceCode\":\"43\"},{\"code\":\"430902\",\"name\":\"资阳区\",\"cityCode\":\"4309\",\"provinceCode\":\"43\"},{\"code\":\"430903\",\"name\":\"赫山区\",\"cityCode\":\"4309\",\"provinceCode\":\"43\"},{\"code\":\"430921\",\"name\":\"南县\",\"cityCode\":\"4309\",\"provinceCode\":\"43\"},{\"code\":\"430922\",\"name\":\"桃江县\",\"cityCode\":\"4309\",\"provinceCode\":\"43\"},{\"code\":\"430923\",\"name\":\"安化县\",\"cityCode\":\"4309\",\"provinceCode\":\"43\"},{\"code\":\"430971\",\"name\":\"益阳市大通湖管理区\",\"cityCode\":\"4309\",\"provinceCode\":\"43\"},{\"code\":\"430972\",\"name\":\"湖南益阳高新技术产业园区\",\"cityCode\":\"4309\",\"provinceCode\":\"43\"},{\"code\":\"430981\",\"name\":\"沅江市\",\"cityCode\":\"4309\",\"provinceCode\":\"43\"},{\"code\":\"431002\",\"name\":\"北湖区\",\"cityCode\":\"4310\",\"provinceCode\":\"43\"},{\"code\":\"431003\",\"name\":\"苏仙区\",\"cityCode\":\"4310\",\"provinceCode\":\"43\"},{\"code\":\"431021\",\"name\":\"桂阳县\",\"cityCode\":\"4310\",\"provinceCode\":\"43\"},{\"code\":\"431022\",\"name\":\"宜章县\",\"cityCode\":\"4310\",\"provinceCode\":\"43\"},{\"code\":\"431023\",\"name\":\"永兴县\",\"cityCode\":\"4310\",\"provinceCode\":\"43\"},{\"code\":\"431024\",\"name\":\"嘉禾县\",\"cityCode\":\"4310\",\"provinceCode\":\"43\"},{\"code\":\"431025\",\"name\":\"临武县\",\"cityCode\":\"4310\",\"provinceCode\":\"43\"},{\"code\":\"431026\",\"name\":\"汝城县\",\"cityCode\":\"4310\",\"provinceCode\":\"43\"},{\"code\":\"431027\",\"name\":\"桂东县\",\"cityCode\":\"4310\",\"provinceCode\":\"43\"},{\"code\":\"431028\",\"name\":\"安仁县\",\"cityCode\":\"4310\",\"provinceCode\":\"43\"},{\"code\":\"431081\",\"name\":\"资兴市\",\"cityCode\":\"4310\",\"provinceCode\":\"43\"},{\"code\":\"431102\",\"name\":\"零陵区\",\"cityCode\":\"4311\",\"provinceCode\":\"43\"},{\"code\":\"431103\",\"name\":\"冷水滩区\",\"cityCode\":\"4311\",\"provinceCode\":\"43\"},{\"code\":\"431121\",\"name\":\"祁阳县\",\"cityCode\":\"4311\",\"provinceCode\":\"43\"},{\"code\":\"431122\",\"name\":\"东安县\",\"cityCode\":\"4311\",\"provinceCode\":\"43\"},{\"code\":\"431123\",\"name\":\"双牌县\",\"cityCode\":\"4311\",\"provinceCode\":\"43\"},{\"code\":\"431124\",\"name\":\"道县\",\"cityCode\":\"4311\",\"provinceCode\":\"43\"},{\"code\":\"431125\",\"name\":\"江永县\",\"cityCode\":\"4311\",\"provinceCode\":\"43\"},{\"code\":\"431126\",\"name\":\"宁远县\",\"cityCode\":\"4311\",\"provinceCode\":\"43\"},{\"code\":\"431127\",\"name\":\"蓝山县\",\"cityCode\":\"4311\",\"provinceCode\":\"43\"},{\"code\":\"431128\",\"name\":\"新田县\",\"cityCode\":\"4311\",\"provinceCode\":\"43\"},{\"code\":\"431129\",\"name\":\"江华瑶族自治县\",\"cityCode\":\"4311\",\"provinceCode\":\"43\"},{\"code\":\"431171\",\"name\":\"永州经济技术开发区\",\"cityCode\":\"4311\",\"provinceCode\":\"43\"},{\"code\":\"431172\",\"name\":\"永州市金洞管理区\",\"cityCode\":\"4311\",\"provinceCode\":\"43\"},{\"code\":\"431173\",\"name\":\"永州市回龙圩管理区\",\"cityCode\":\"4311\",\"provinceCode\":\"43\"},{\"code\":\"431202\",\"name\":\"鹤城区\",\"cityCode\":\"4312\",\"provinceCode\":\"43\"},{\"code\":\"431221\",\"name\":\"中方县\",\"cityCode\":\"4312\",\"provinceCode\":\"43\"},{\"code\":\"431222\",\"name\":\"沅陵县\",\"cityCode\":\"4312\",\"provinceCode\":\"43\"},{\"code\":\"431223\",\"name\":\"辰溪县\",\"cityCode\":\"4312\",\"provinceCode\":\"43\"},{\"code\":\"431224\",\"name\":\"溆浦县\",\"cityCode\":\"4312\",\"provinceCode\":\"43\"},{\"code\":\"431225\",\"name\":\"会同县\",\"cityCode\":\"4312\",\"provinceCode\":\"43\"},{\"code\":\"431226\",\"name\":\"麻阳苗族自治县\",\"cityCode\":\"4312\",\"provinceCode\":\"43\"},{\"code\":\"431227\",\"name\":\"新晃侗族自治县\",\"cityCode\":\"4312\",\"provinceCode\":\"43\"},{\"code\":\"431228\",\"name\":\"芷江侗族自治县\",\"cityCode\":\"4312\",\"provinceCode\":\"43\"},{\"code\":\"431229\",\"name\":\"靖州苗族侗族自治县\",\"cityCode\":\"4312\",\"provinceCode\":\"43\"},{\"code\":\"431230\",\"name\":\"通道侗族自治县\",\"cityCode\":\"4312\",\"provinceCode\":\"43\"},{\"code\":\"431271\",\"name\":\"怀化市洪江管理区\",\"cityCode\":\"4312\",\"provinceCode\":\"43\"},{\"code\":\"431281\",\"name\":\"洪江市\",\"cityCode\":\"4312\",\"provinceCode\":\"43\"},{\"code\":\"431302\",\"name\":\"娄星区\",\"cityCode\":\"4313\",\"provinceCode\":\"43\"},{\"code\":\"431321\",\"name\":\"双峰县\",\"cityCode\":\"4313\",\"provinceCode\":\"43\"},{\"code\":\"431322\",\"name\":\"新化县\",\"cityCode\":\"4313\",\"provinceCode\":\"43\"},{\"code\":\"431381\",\"name\":\"冷水江市\",\"cityCode\":\"4313\",\"provinceCode\":\"43\"},{\"code\":\"431382\",\"name\":\"涟源市\",\"cityCode\":\"4313\",\"provinceCode\":\"43\"},{\"code\":\"433101\",\"name\":\"吉首市\",\"cityCode\":\"4331\",\"provinceCode\":\"43\"},{\"code\":\"433122\",\"name\":\"泸溪县\",\"cityCode\":\"4331\",\"provinceCode\":\"43\"},{\"code\":\"433123\",\"name\":\"凤凰县\",\"cityCode\":\"4331\",\"provinceCode\":\"43\"},{\"code\":\"433124\",\"name\":\"花垣县\",\"cityCode\":\"4331\",\"provinceCode\":\"43\"},{\"code\":\"433125\",\"name\":\"保靖县\",\"cityCode\":\"4331\",\"provinceCode\":\"43\"},{\"code\":\"433126\",\"name\":\"古丈县\",\"cityCode\":\"4331\",\"provinceCode\":\"43\"},{\"code\":\"433127\",\"name\":\"永顺县\",\"cityCode\":\"4331\",\"provinceCode\":\"43\"},{\"code\":\"433130\",\"name\":\"龙山县\",\"cityCode\":\"4331\",\"provinceCode\":\"43\"},{\"code\":\"433172\",\"name\":\"湖南吉首经济开发区\",\"cityCode\":\"4331\",\"provinceCode\":\"43\"},{\"code\":\"433173\",\"name\":\"湖南永顺经济开发区\",\"cityCode\":\"4331\",\"provinceCode\":\"43\"},{\"code\":\"440103\",\"name\":\"荔湾区\",\"cityCode\":\"4401\",\"provinceCode\":\"44\"},{\"code\":\"440104\",\"name\":\"越秀区\",\"cityCode\":\"4401\",\"provinceCode\":\"44\"},{\"code\":\"440105\",\"name\":\"海珠区\",\"cityCode\":\"4401\",\"provinceCode\":\"44\"},{\"code\":\"440106\",\"name\":\"天河区\",\"cityCode\":\"4401\",\"provinceCode\":\"44\"},{\"code\":\"440111\",\"name\":\"白云区\",\"cityCode\":\"4401\",\"provinceCode\":\"44\"},{\"code\":\"440112\",\"name\":\"黄埔区\",\"cityCode\":\"4401\",\"provinceCode\":\"44\"},{\"code\":\"440113\",\"name\":\"番禺区\",\"cityCode\":\"4401\",\"provinceCode\":\"44\"},{\"code\":\"440114\",\"name\":\"花都区\",\"cityCode\":\"4401\",\"provinceCode\":\"44\"},{\"code\":\"440115\",\"name\":\"南沙区\",\"cityCode\":\"4401\",\"provinceCode\":\"44\"},{\"code\":\"440117\",\"name\":\"从化区\",\"cityCode\":\"4401\",\"provinceCode\":\"44\"},{\"code\":\"440118\",\"name\":\"增城区\",\"cityCode\":\"4401\",\"provinceCode\":\"44\"},{\"code\":\"440203\",\"name\":\"武江区\",\"cityCode\":\"4402\",\"provinceCode\":\"44\"},{\"code\":\"440204\",\"name\":\"浈江区\",\"cityCode\":\"4402\",\"provinceCode\":\"44\"},{\"code\":\"440205\",\"name\":\"曲江区\",\"cityCode\":\"4402\",\"provinceCode\":\"44\"},{\"code\":\"440222\",\"name\":\"始兴县\",\"cityCode\":\"4402\",\"provinceCode\":\"44\"},{\"code\":\"440224\",\"name\":\"仁化县\",\"cityCode\":\"4402\",\"provinceCode\":\"44\"},{\"code\":\"440229\",\"name\":\"翁源县\",\"cityCode\":\"4402\",\"provinceCode\":\"44\"},{\"code\":\"440232\",\"name\":\"乳源瑶族自治县\",\"cityCode\":\"4402\",\"provinceCode\":\"44\"},{\"code\":\"440233\",\"name\":\"新丰县\",\"cityCode\":\"4402\",\"provinceCode\":\"44\"},{\"code\":\"440281\",\"name\":\"乐昌市\",\"cityCode\":\"4402\",\"provinceCode\":\"44\"},{\"code\":\"440282\",\"name\":\"南雄市\",\"cityCode\":\"4402\",\"provinceCode\":\"44\"},{\"code\":\"440303\",\"name\":\"罗湖区\",\"cityCode\":\"4403\",\"provinceCode\":\"44\"},{\"code\":\"440304\",\"name\":\"福田区\",\"cityCode\":\"4403\",\"provinceCode\":\"44\"},{\"code\":\"440305\",\"name\":\"南山区\",\"cityCode\":\"4403\",\"provinceCode\":\"44\"},{\"code\":\"440306\",\"name\":\"宝安区\",\"cityCode\":\"4403\",\"provinceCode\":\"44\"},{\"code\":\"440307\",\"name\":\"龙岗区\",\"cityCode\":\"4403\",\"provinceCode\":\"44\"},{\"code\":\"440308\",\"name\":\"盐田区\",\"cityCode\":\"4403\",\"provinceCode\":\"44\"},{\"code\":\"440309\",\"name\":\"龙华区\",\"cityCode\":\"4403\",\"provinceCode\":\"44\"},{\"code\":\"440310\",\"name\":\"坪山区\",\"cityCode\":\"4403\",\"provinceCode\":\"44\"},{\"code\":\"440402\",\"name\":\"香洲区\",\"cityCode\":\"4404\",\"provinceCode\":\"44\"},{\"code\":\"440403\",\"name\":\"斗门区\",\"cityCode\":\"4404\",\"provinceCode\":\"44\"},{\"code\":\"440404\",\"name\":\"金湾区\",\"cityCode\":\"4404\",\"provinceCode\":\"44\"},{\"code\":\"440507\",\"name\":\"龙湖区\",\"cityCode\":\"4405\",\"provinceCode\":\"44\"},{\"code\":\"440511\",\"name\":\"金平区\",\"cityCode\":\"4405\",\"provinceCode\":\"44\"},{\"code\":\"440512\",\"name\":\"濠江区\",\"cityCode\":\"4405\",\"provinceCode\":\"44\"},{\"code\":\"440513\",\"name\":\"潮阳区\",\"cityCode\":\"4405\",\"provinceCode\":\"44\"},{\"code\":\"440514\",\"name\":\"潮南区\",\"cityCode\":\"4405\",\"provinceCode\":\"44\"},{\"code\":\"440515\",\"name\":\"澄海区\",\"cityCode\":\"4405\",\"provinceCode\":\"44\"},{\"code\":\"440523\",\"name\":\"南澳县\",\"cityCode\":\"4405\",\"provinceCode\":\"44\"},{\"code\":\"440604\",\"name\":\"禅城区\",\"cityCode\":\"4406\",\"provinceCode\":\"44\"},{\"code\":\"440605\",\"name\":\"南海区\",\"cityCode\":\"4406\",\"provinceCode\":\"44\"},{\"code\":\"440606\",\"name\":\"顺德区\",\"cityCode\":\"4406\",\"provinceCode\":\"44\"},{\"code\":\"440607\",\"name\":\"三水区\",\"cityCode\":\"4406\",\"provinceCode\":\"44\"},{\"code\":\"440608\",\"name\":\"高明区\",\"cityCode\":\"4406\",\"provinceCode\":\"44\"},{\"code\":\"440703\",\"name\":\"蓬江区\",\"cityCode\":\"4407\",\"provinceCode\":\"44\"},{\"code\":\"440704\",\"name\":\"江海区\",\"cityCode\":\"4407\",\"provinceCode\":\"44\"},{\"code\":\"440705\",\"name\":\"新会区\",\"cityCode\":\"4407\",\"provinceCode\":\"44\"},{\"code\":\"440781\",\"name\":\"台山市\",\"cityCode\":\"4407\",\"provinceCode\":\"44\"},{\"code\":\"440783\",\"name\":\"开平市\",\"cityCode\":\"4407\",\"provinceCode\":\"44\"},{\"code\":\"440784\",\"name\":\"鹤山市\",\"cityCode\":\"4407\",\"provinceCode\":\"44\"},{\"code\":\"440785\",\"name\":\"恩平市\",\"cityCode\":\"4407\",\"provinceCode\":\"44\"},{\"code\":\"440802\",\"name\":\"赤坎区\",\"cityCode\":\"4408\",\"provinceCode\":\"44\"},{\"code\":\"440803\",\"name\":\"霞山区\",\"cityCode\":\"4408\",\"provinceCode\":\"44\"},{\"code\":\"440804\",\"name\":\"坡头区\",\"cityCode\":\"4408\",\"provinceCode\":\"44\"},{\"code\":\"440811\",\"name\":\"麻章区\",\"cityCode\":\"4408\",\"provinceCode\":\"44\"},{\"code\":\"440823\",\"name\":\"遂溪县\",\"cityCode\":\"4408\",\"provinceCode\":\"44\"},{\"code\":\"440825\",\"name\":\"徐闻县\",\"cityCode\":\"4408\",\"provinceCode\":\"44\"},{\"code\":\"440881\",\"name\":\"廉江市\",\"cityCode\":\"4408\",\"provinceCode\":\"44\"},{\"code\":\"440882\",\"name\":\"雷州市\",\"cityCode\":\"4408\",\"provinceCode\":\"44\"},{\"code\":\"440883\",\"name\":\"吴川市\",\"cityCode\":\"4408\",\"provinceCode\":\"44\"},{\"code\":\"440902\",\"name\":\"茂南区\",\"cityCode\":\"4409\",\"provinceCode\":\"44\"},{\"code\":\"440904\",\"name\":\"电白区\",\"cityCode\":\"4409\",\"provinceCode\":\"44\"},{\"code\":\"440981\",\"name\":\"高州市\",\"cityCode\":\"4409\",\"provinceCode\":\"44\"},{\"code\":\"440982\",\"name\":\"化州市\",\"cityCode\":\"4409\",\"provinceCode\":\"44\"},{\"code\":\"440983\",\"name\":\"信宜市\",\"cityCode\":\"4409\",\"provinceCode\":\"44\"},{\"code\":\"441202\",\"name\":\"端州区\",\"cityCode\":\"4412\",\"provinceCode\":\"44\"},{\"code\":\"441203\",\"name\":\"鼎湖区\",\"cityCode\":\"4412\",\"provinceCode\":\"44\"},{\"code\":\"441204\",\"name\":\"高要区\",\"cityCode\":\"4412\",\"provinceCode\":\"44\"},{\"code\":\"441223\",\"name\":\"广宁县\",\"cityCode\":\"4412\",\"provinceCode\":\"44\"},{\"code\":\"441224\",\"name\":\"怀集县\",\"cityCode\":\"4412\",\"provinceCode\":\"44\"},{\"code\":\"441225\",\"name\":\"封开县\",\"cityCode\":\"4412\",\"provinceCode\":\"44\"},{\"code\":\"441226\",\"name\":\"德庆县\",\"cityCode\":\"4412\",\"provinceCode\":\"44\"},{\"code\":\"441284\",\"name\":\"四会市\",\"cityCode\":\"4412\",\"provinceCode\":\"44\"},{\"code\":\"441302\",\"name\":\"惠城区\",\"cityCode\":\"4413\",\"provinceCode\":\"44\"},{\"code\":\"441303\",\"name\":\"惠阳区\",\"cityCode\":\"4413\",\"provinceCode\":\"44\"},{\"code\":\"441322\",\"name\":\"博罗县\",\"cityCode\":\"4413\",\"provinceCode\":\"44\"},{\"code\":\"441323\",\"name\":\"惠东县\",\"cityCode\":\"4413\",\"provinceCode\":\"44\"},{\"code\":\"441324\",\"name\":\"龙门县\",\"cityCode\":\"4413\",\"provinceCode\":\"44\"},{\"code\":\"441402\",\"name\":\"梅江区\",\"cityCode\":\"4414\",\"provinceCode\":\"44\"},{\"code\":\"441403\",\"name\":\"梅县区\",\"cityCode\":\"4414\",\"provinceCode\":\"44\"},{\"code\":\"441422\",\"name\":\"大埔县\",\"cityCode\":\"4414\",\"provinceCode\":\"44\"},{\"code\":\"441423\",\"name\":\"丰顺县\",\"cityCode\":\"4414\",\"provinceCode\":\"44\"},{\"code\":\"441424\",\"name\":\"五华县\",\"cityCode\":\"4414\",\"provinceCode\":\"44\"},{\"code\":\"441426\",\"name\":\"平远县\",\"cityCode\":\"4414\",\"provinceCode\":\"44\"},{\"code\":\"441427\",\"name\":\"蕉岭县\",\"cityCode\":\"4414\",\"provinceCode\":\"44\"},{\"code\":\"441481\",\"name\":\"兴宁市\",\"cityCode\":\"4414\",\"provinceCode\":\"44\"},{\"code\":\"441502\",\"name\":\"城区\",\"cityCode\":\"4415\",\"provinceCode\":\"44\"},{\"code\":\"441521\",\"name\":\"海丰县\",\"cityCode\":\"4415\",\"provinceCode\":\"44\"},{\"code\":\"441523\",\"name\":\"陆河县\",\"cityCode\":\"4415\",\"provinceCode\":\"44\"},{\"code\":\"441581\",\"name\":\"陆丰市\",\"cityCode\":\"4415\",\"provinceCode\":\"44\"},{\"code\":\"441602\",\"name\":\"源城区\",\"cityCode\":\"4416\",\"provinceCode\":\"44\"},{\"code\":\"441621\",\"name\":\"紫金县\",\"cityCode\":\"4416\",\"provinceCode\":\"44\"},{\"code\":\"441622\",\"name\":\"龙川县\",\"cityCode\":\"4416\",\"provinceCode\":\"44\"},{\"code\":\"441623\",\"name\":\"连平县\",\"cityCode\":\"4416\",\"provinceCode\":\"44\"},{\"code\":\"441624\",\"name\":\"和平县\",\"cityCode\":\"4416\",\"provinceCode\":\"44\"},{\"code\":\"441625\",\"name\":\"东源县\",\"cityCode\":\"4416\",\"provinceCode\":\"44\"},{\"code\":\"441702\",\"name\":\"江城区\",\"cityCode\":\"4417\",\"provinceCode\":\"44\"},{\"code\":\"441704\",\"name\":\"阳东区\",\"cityCode\":\"4417\",\"provinceCode\":\"44\"},{\"code\":\"441721\",\"name\":\"阳西县\",\"cityCode\":\"4417\",\"provinceCode\":\"44\"},{\"code\":\"441781\",\"name\":\"阳春市\",\"cityCode\":\"4417\",\"provinceCode\":\"44\"},{\"code\":\"441802\",\"name\":\"清城区\",\"cityCode\":\"4418\",\"provinceCode\":\"44\"},{\"code\":\"441803\",\"name\":\"清新区\",\"cityCode\":\"4418\",\"provinceCode\":\"44\"},{\"code\":\"441821\",\"name\":\"佛冈县\",\"cityCode\":\"4418\",\"provinceCode\":\"44\"},{\"code\":\"441823\",\"name\":\"阳山县\",\"cityCode\":\"4418\",\"provinceCode\":\"44\"},{\"code\":\"441825\",\"name\":\"连山壮族瑶族自治县\",\"cityCode\":\"4418\",\"provinceCode\":\"44\"},{\"code\":\"441826\",\"name\":\"连南瑶族自治县\",\"cityCode\":\"4418\",\"provinceCode\":\"44\"},{\"code\":\"441881\",\"name\":\"英德市\",\"cityCode\":\"4418\",\"provinceCode\":\"44\"},{\"code\":\"441882\",\"name\":\"连州市\",\"cityCode\":\"4418\",\"provinceCode\":\"44\"},{\"code\":\"441900\",\"name\":\"东莞市\",\"cityCode\":\"4419\",\"provinceCode\":\"44\"},{\"code\":\"442000\",\"name\":\"中山市\",\"cityCode\":\"4420\",\"provinceCode\":\"44\"},{\"code\":\"445102\",\"name\":\"湘桥区\",\"cityCode\":\"4451\",\"provinceCode\":\"44\"},{\"code\":\"445103\",\"name\":\"潮安区\",\"cityCode\":\"4451\",\"provinceCode\":\"44\"},{\"code\":\"445122\",\"name\":\"饶平县\",\"cityCode\":\"4451\",\"provinceCode\":\"44\"},{\"code\":\"445202\",\"name\":\"榕城区\",\"cityCode\":\"4452\",\"provinceCode\":\"44\"},{\"code\":\"445203\",\"name\":\"揭东区\",\"cityCode\":\"4452\",\"provinceCode\":\"44\"},{\"code\":\"445222\",\"name\":\"揭西县\",\"cityCode\":\"4452\",\"provinceCode\":\"44\"},{\"code\":\"445224\",\"name\":\"惠来县\",\"cityCode\":\"4452\",\"provinceCode\":\"44\"},{\"code\":\"445281\",\"name\":\"普宁市\",\"cityCode\":\"4452\",\"provinceCode\":\"44\"},{\"code\":\"445302\",\"name\":\"云城区\",\"cityCode\":\"4453\",\"provinceCode\":\"44\"},{\"code\":\"445303\",\"name\":\"云安区\",\"cityCode\":\"4453\",\"provinceCode\":\"44\"},{\"code\":\"445321\",\"name\":\"新兴县\",\"cityCode\":\"4453\",\"provinceCode\":\"44\"},{\"code\":\"445322\",\"name\":\"郁南县\",\"cityCode\":\"4453\",\"provinceCode\":\"44\"},{\"code\":\"445381\",\"name\":\"罗定市\",\"cityCode\":\"4453\",\"provinceCode\":\"44\"},{\"code\":\"450102\",\"name\":\"兴宁区\",\"cityCode\":\"4501\",\"provinceCode\":\"45\"},{\"code\":\"450103\",\"name\":\"青秀区\",\"cityCode\":\"4501\",\"provinceCode\":\"45\"},{\"code\":\"450105\",\"name\":\"江南区\",\"cityCode\":\"4501\",\"provinceCode\":\"45\"},{\"code\":\"450107\",\"name\":\"西乡塘区\",\"cityCode\":\"4501\",\"provinceCode\":\"45\"},{\"code\":\"450108\",\"name\":\"良庆区\",\"cityCode\":\"4501\",\"provinceCode\":\"45\"},{\"code\":\"450109\",\"name\":\"邕宁区\",\"cityCode\":\"4501\",\"provinceCode\":\"45\"},{\"code\":\"450110\",\"name\":\"武鸣区\",\"cityCode\":\"4501\",\"provinceCode\":\"45\"},{\"code\":\"450123\",\"name\":\"隆安县\",\"cityCode\":\"4501\",\"provinceCode\":\"45\"},{\"code\":\"450124\",\"name\":\"马山县\",\"cityCode\":\"4501\",\"provinceCode\":\"45\"},{\"code\":\"450125\",\"name\":\"上林县\",\"cityCode\":\"4501\",\"provinceCode\":\"45\"},{\"code\":\"450126\",\"name\":\"宾阳县\",\"cityCode\":\"4501\",\"provinceCode\":\"45\"},{\"code\":\"450127\",\"name\":\"横县\",\"cityCode\":\"4501\",\"provinceCode\":\"45\"},{\"code\":\"450202\",\"name\":\"城中区\",\"cityCode\":\"4502\",\"provinceCode\":\"45\"},{\"code\":\"450203\",\"name\":\"鱼峰区\",\"cityCode\":\"4502\",\"provinceCode\":\"45\"},{\"code\":\"450204\",\"name\":\"柳南区\",\"cityCode\":\"4502\",\"provinceCode\":\"45\"},{\"code\":\"450205\",\"name\":\"柳北区\",\"cityCode\":\"4502\",\"provinceCode\":\"45\"},{\"code\":\"450206\",\"name\":\"柳江区\",\"cityCode\":\"4502\",\"provinceCode\":\"45\"},{\"code\":\"450222\",\"name\":\"柳城县\",\"cityCode\":\"4502\",\"provinceCode\":\"45\"},{\"code\":\"450223\",\"name\":\"鹿寨县\",\"cityCode\":\"4502\",\"provinceCode\":\"45\"},{\"code\":\"450224\",\"name\":\"融安县\",\"cityCode\":\"4502\",\"provinceCode\":\"45\"},{\"code\":\"450225\",\"name\":\"融水苗族自治县\",\"cityCode\":\"4502\",\"provinceCode\":\"45\"},{\"code\":\"450226\",\"name\":\"三江侗族自治县\",\"cityCode\":\"4502\",\"provinceCode\":\"45\"},{\"code\":\"450302\",\"name\":\"秀峰区\",\"cityCode\":\"4503\",\"provinceCode\":\"45\"},{\"code\":\"450303\",\"name\":\"叠彩区\",\"cityCode\":\"4503\",\"provinceCode\":\"45\"},{\"code\":\"450304\",\"name\":\"象山区\",\"cityCode\":\"4503\",\"provinceCode\":\"45\"},{\"code\":\"450305\",\"name\":\"七星区\",\"cityCode\":\"4503\",\"provinceCode\":\"45\"},{\"code\":\"450311\",\"name\":\"雁山区\",\"cityCode\":\"4503\",\"provinceCode\":\"45\"},{\"code\":\"450312\",\"name\":\"临桂区\",\"cityCode\":\"4503\",\"provinceCode\":\"45\"},{\"code\":\"450321\",\"name\":\"阳朔县\",\"cityCode\":\"4503\",\"provinceCode\":\"45\"},{\"code\":\"450323\",\"name\":\"灵川县\",\"cityCode\":\"4503\",\"provinceCode\":\"45\"},{\"code\":\"450324\",\"name\":\"全州县\",\"cityCode\":\"4503\",\"provinceCode\":\"45\"},{\"code\":\"450325\",\"name\":\"兴安县\",\"cityCode\":\"4503\",\"provinceCode\":\"45\"},{\"code\":\"450326\",\"name\":\"永福县\",\"cityCode\":\"4503\",\"provinceCode\":\"45\"},{\"code\":\"450327\",\"name\":\"灌阳县\",\"cityCode\":\"4503\",\"provinceCode\":\"45\"},{\"code\":\"450328\",\"name\":\"龙胜各族自治县\",\"cityCode\":\"4503\",\"provinceCode\":\"45\"},{\"code\":\"450329\",\"name\":\"资源县\",\"cityCode\":\"4503\",\"provinceCode\":\"45\"},{\"code\":\"450330\",\"name\":\"平乐县\",\"cityCode\":\"4503\",\"provinceCode\":\"45\"},{\"code\":\"450331\",\"name\":\"荔浦县\",\"cityCode\":\"4503\",\"provinceCode\":\"45\"},{\"code\":\"450332\",\"name\":\"恭城瑶族自治县\",\"cityCode\":\"4503\",\"provinceCode\":\"45\"},{\"code\":\"450403\",\"name\":\"万秀区\",\"cityCode\":\"4504\",\"provinceCode\":\"45\"},{\"code\":\"450405\",\"name\":\"长洲区\",\"cityCode\":\"4504\",\"provinceCode\":\"45\"},{\"code\":\"450406\",\"name\":\"龙圩区\",\"cityCode\":\"4504\",\"provinceCode\":\"45\"},{\"code\":\"450421\",\"name\":\"苍梧县\",\"cityCode\":\"4504\",\"provinceCode\":\"45\"},{\"code\":\"450422\",\"name\":\"藤县\",\"cityCode\":\"4504\",\"provinceCode\":\"45\"},{\"code\":\"450423\",\"name\":\"蒙山县\",\"cityCode\":\"4504\",\"provinceCode\":\"45\"},{\"code\":\"450481\",\"name\":\"岑溪市\",\"cityCode\":\"4504\",\"provinceCode\":\"45\"},{\"code\":\"450502\",\"name\":\"海城区\",\"cityCode\":\"4505\",\"provinceCode\":\"45\"},{\"code\":\"450503\",\"name\":\"银海区\",\"cityCode\":\"4505\",\"provinceCode\":\"45\"},{\"code\":\"450512\",\"name\":\"铁山港区\",\"cityCode\":\"4505\",\"provinceCode\":\"45\"},{\"code\":\"450521\",\"name\":\"合浦县\",\"cityCode\":\"4505\",\"provinceCode\":\"45\"},{\"code\":\"450602\",\"name\":\"港口区\",\"cityCode\":\"4506\",\"provinceCode\":\"45\"},{\"code\":\"450603\",\"name\":\"防城区\",\"cityCode\":\"4506\",\"provinceCode\":\"45\"},{\"code\":\"450621\",\"name\":\"上思县\",\"cityCode\":\"4506\",\"provinceCode\":\"45\"},{\"code\":\"450681\",\"name\":\"东兴市\",\"cityCode\":\"4506\",\"provinceCode\":\"45\"},{\"code\":\"450702\",\"name\":\"钦南区\",\"cityCode\":\"4507\",\"provinceCode\":\"45\"},{\"code\":\"450703\",\"name\":\"钦北区\",\"cityCode\":\"4507\",\"provinceCode\":\"45\"},{\"code\":\"450721\",\"name\":\"灵山县\",\"cityCode\":\"4507\",\"provinceCode\":\"45\"},{\"code\":\"450722\",\"name\":\"浦北县\",\"cityCode\":\"4507\",\"provinceCode\":\"45\"},{\"code\":\"450802\",\"name\":\"港北区\",\"cityCode\":\"4508\",\"provinceCode\":\"45\"},{\"code\":\"450803\",\"name\":\"港南区\",\"cityCode\":\"4508\",\"provinceCode\":\"45\"},{\"code\":\"450804\",\"name\":\"覃塘区\",\"cityCode\":\"4508\",\"provinceCode\":\"45\"},{\"code\":\"450821\",\"name\":\"平南县\",\"cityCode\":\"4508\",\"provinceCode\":\"45\"},{\"code\":\"450881\",\"name\":\"桂平市\",\"cityCode\":\"4508\",\"provinceCode\":\"45\"},{\"code\":\"450902\",\"name\":\"玉州区\",\"cityCode\":\"4509\",\"provinceCode\":\"45\"},{\"code\":\"450903\",\"name\":\"福绵区\",\"cityCode\":\"4509\",\"provinceCode\":\"45\"},{\"code\":\"450921\",\"name\":\"容县\",\"cityCode\":\"4509\",\"provinceCode\":\"45\"},{\"code\":\"450922\",\"name\":\"陆川县\",\"cityCode\":\"4509\",\"provinceCode\":\"45\"},{\"code\":\"450923\",\"name\":\"博白县\",\"cityCode\":\"4509\",\"provinceCode\":\"45\"},{\"code\":\"450924\",\"name\":\"兴业县\",\"cityCode\":\"4509\",\"provinceCode\":\"45\"},{\"code\":\"450981\",\"name\":\"北流市\",\"cityCode\":\"4509\",\"provinceCode\":\"45\"},{\"code\":\"451002\",\"name\":\"右江区\",\"cityCode\":\"4510\",\"provinceCode\":\"45\"},{\"code\":\"451021\",\"name\":\"田阳县\",\"cityCode\":\"4510\",\"provinceCode\":\"45\"},{\"code\":\"451022\",\"name\":\"田东县\",\"cityCode\":\"4510\",\"provinceCode\":\"45\"},{\"code\":\"451023\",\"name\":\"平果县\",\"cityCode\":\"4510\",\"provinceCode\":\"45\"},{\"code\":\"451024\",\"name\":\"德保县\",\"cityCode\":\"4510\",\"provinceCode\":\"45\"},{\"code\":\"451026\",\"name\":\"那坡县\",\"cityCode\":\"4510\",\"provinceCode\":\"45\"},{\"code\":\"451027\",\"name\":\"凌云县\",\"cityCode\":\"4510\",\"provinceCode\":\"45\"},{\"code\":\"451028\",\"name\":\"乐业县\",\"cityCode\":\"4510\",\"provinceCode\":\"45\"},{\"code\":\"451029\",\"name\":\"田林县\",\"cityCode\":\"4510\",\"provinceCode\":\"45\"},{\"code\":\"451030\",\"name\":\"西林县\",\"cityCode\":\"4510\",\"provinceCode\":\"45\"},{\"code\":\"451031\",\"name\":\"隆林各族自治县\",\"cityCode\":\"4510\",\"provinceCode\":\"45\"},{\"code\":\"451081\",\"name\":\"靖西市\",\"cityCode\":\"4510\",\"provinceCode\":\"45\"},{\"code\":\"451102\",\"name\":\"八步区\",\"cityCode\":\"4511\",\"provinceCode\":\"45\"},{\"code\":\"451103\",\"name\":\"平桂区\",\"cityCode\":\"4511\",\"provinceCode\":\"45\"},{\"code\":\"451121\",\"name\":\"昭平县\",\"cityCode\":\"4511\",\"provinceCode\":\"45\"},{\"code\":\"451122\",\"name\":\"钟山县\",\"cityCode\":\"4511\",\"provinceCode\":\"45\"},{\"code\":\"451123\",\"name\":\"富川瑶族自治县\",\"cityCode\":\"4511\",\"provinceCode\":\"45\"},{\"code\":\"451202\",\"name\":\"金城江区\",\"cityCode\":\"4512\",\"provinceCode\":\"45\"},{\"code\":\"451203\",\"name\":\"宜州区\",\"cityCode\":\"4512\",\"provinceCode\":\"45\"},{\"code\":\"451221\",\"name\":\"南丹县\",\"cityCode\":\"4512\",\"provinceCode\":\"45\"},{\"code\":\"451222\",\"name\":\"天峨县\",\"cityCode\":\"4512\",\"provinceCode\":\"45\"},{\"code\":\"451223\",\"name\":\"凤山县\",\"cityCode\":\"4512\",\"provinceCode\":\"45\"},{\"code\":\"451224\",\"name\":\"东兰县\",\"cityCode\":\"4512\",\"provinceCode\":\"45\"},{\"code\":\"451225\",\"name\":\"罗城仫佬族自治县\",\"cityCode\":\"4512\",\"provinceCode\":\"45\"},{\"code\":\"451226\",\"name\":\"环江毛南族自治县\",\"cityCode\":\"4512\",\"provinceCode\":\"45\"},{\"code\":\"451227\",\"name\":\"巴马瑶族自治县\",\"cityCode\":\"4512\",\"provinceCode\":\"45\"},{\"code\":\"451228\",\"name\":\"都安瑶族自治县\",\"cityCode\":\"4512\",\"provinceCode\":\"45\"},{\"code\":\"451229\",\"name\":\"大化瑶族自治县\",\"cityCode\":\"4512\",\"provinceCode\":\"45\"},{\"code\":\"451302\",\"name\":\"兴宾区\",\"cityCode\":\"4513\",\"provinceCode\":\"45\"},{\"code\":\"451321\",\"name\":\"忻城县\",\"cityCode\":\"4513\",\"provinceCode\":\"45\"},{\"code\":\"451322\",\"name\":\"象州县\",\"cityCode\":\"4513\",\"provinceCode\":\"45\"},{\"code\":\"451323\",\"name\":\"武宣县\",\"cityCode\":\"4513\",\"provinceCode\":\"45\"},{\"code\":\"451324\",\"name\":\"金秀瑶族自治县\",\"cityCode\":\"4513\",\"provinceCode\":\"45\"},{\"code\":\"451381\",\"name\":\"合山市\",\"cityCode\":\"4513\",\"provinceCode\":\"45\"},{\"code\":\"451402\",\"name\":\"江州区\",\"cityCode\":\"4514\",\"provinceCode\":\"45\"},{\"code\":\"451421\",\"name\":\"扶绥县\",\"cityCode\":\"4514\",\"provinceCode\":\"45\"},{\"code\":\"451422\",\"name\":\"宁明县\",\"cityCode\":\"4514\",\"provinceCode\":\"45\"},{\"code\":\"451423\",\"name\":\"龙州县\",\"cityCode\":\"4514\",\"provinceCode\":\"45\"},{\"code\":\"451424\",\"name\":\"大新县\",\"cityCode\":\"4514\",\"provinceCode\":\"45\"},{\"code\":\"451425\",\"name\":\"天等县\",\"cityCode\":\"4514\",\"provinceCode\":\"45\"},{\"code\":\"451481\",\"name\":\"凭祥市\",\"cityCode\":\"4514\",\"provinceCode\":\"45\"},{\"code\":\"460105\",\"name\":\"秀英区\",\"cityCode\":\"4601\",\"provinceCode\":\"46\"},{\"code\":\"460106\",\"name\":\"龙华区\",\"cityCode\":\"4601\",\"provinceCode\":\"46\"},{\"code\":\"460107\",\"name\":\"琼山区\",\"cityCode\":\"4601\",\"provinceCode\":\"46\"},{\"code\":\"460108\",\"name\":\"美兰区\",\"cityCode\":\"4601\",\"provinceCode\":\"46\"},{\"code\":\"460202\",\"name\":\"海棠区\",\"cityCode\":\"4602\",\"provinceCode\":\"46\"},{\"code\":\"460203\",\"name\":\"吉阳区\",\"cityCode\":\"4602\",\"provinceCode\":\"46\"},{\"code\":\"460204\",\"name\":\"天涯区\",\"cityCode\":\"4602\",\"provinceCode\":\"46\"},{\"code\":\"460205\",\"name\":\"崖州区\",\"cityCode\":\"4602\",\"provinceCode\":\"46\"},{\"code\":\"460321\",\"name\":\"西沙群岛\",\"cityCode\":\"4603\",\"provinceCode\":\"46\"},{\"code\":\"460322\",\"name\":\"南沙群岛\",\"cityCode\":\"4603\",\"provinceCode\":\"46\"},{\"code\":\"460323\",\"name\":\"中沙群岛的岛礁及其海域\",\"cityCode\":\"4603\",\"provinceCode\":\"46\"},{\"code\":\"460400\",\"name\":\"儋州市\",\"cityCode\":\"4604\",\"provinceCode\":\"46\"},{\"code\":\"469001\",\"name\":\"五指山市\",\"cityCode\":\"4690\",\"provinceCode\":\"46\"},{\"code\":\"469002\",\"name\":\"琼海市\",\"cityCode\":\"4690\",\"provinceCode\":\"46\"},{\"code\":\"469005\",\"name\":\"文昌市\",\"cityCode\":\"4690\",\"provinceCode\":\"46\"},{\"code\":\"469006\",\"name\":\"万宁市\",\"cityCode\":\"4690\",\"provinceCode\":\"46\"},{\"code\":\"469007\",\"name\":\"东方市\",\"cityCode\":\"4690\",\"provinceCode\":\"46\"},{\"code\":\"469021\",\"name\":\"定安县\",\"cityCode\":\"4690\",\"provinceCode\":\"46\"},{\"code\":\"469022\",\"name\":\"屯昌县\",\"cityCode\":\"4690\",\"provinceCode\":\"46\"},{\"code\":\"469023\",\"name\":\"澄迈县\",\"cityCode\":\"4690\",\"provinceCode\":\"46\"},{\"code\":\"469024\",\"name\":\"临高县\",\"cityCode\":\"4690\",\"provinceCode\":\"46\"},{\"code\":\"469025\",\"name\":\"白沙黎族自治县\",\"cityCode\":\"4690\",\"provinceCode\":\"46\"},{\"code\":\"469026\",\"name\":\"昌江黎族自治县\",\"cityCode\":\"4690\",\"provinceCode\":\"46\"},{\"code\":\"469027\",\"name\":\"乐东黎族自治县\",\"cityCode\":\"4690\",\"provinceCode\":\"46\"},{\"code\":\"469028\",\"name\":\"陵水黎族自治县\",\"cityCode\":\"4690\",\"provinceCode\":\"46\"},{\"code\":\"469029\",\"name\":\"保亭黎族苗族自治县\",\"cityCode\":\"4690\",\"provinceCode\":\"46\"},{\"code\":\"469030\",\"name\":\"琼中黎族苗族自治县\",\"cityCode\":\"4690\",\"provinceCode\":\"46\"},{\"code\":\"500101\",\"name\":\"万州区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500102\",\"name\":\"涪陵区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500103\",\"name\":\"渝中区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500104\",\"name\":\"大渡口区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500105\",\"name\":\"江北区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500106\",\"name\":\"沙坪坝区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500107\",\"name\":\"九龙坡区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500108\",\"name\":\"南岸区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500109\",\"name\":\"北碚区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500110\",\"name\":\"綦江区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500111\",\"name\":\"大足区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500112\",\"name\":\"渝北区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500113\",\"name\":\"巴南区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500114\",\"name\":\"黔江区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500115\",\"name\":\"长寿区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500116\",\"name\":\"江津区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500117\",\"name\":\"合川区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500118\",\"name\":\"永川区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500119\",\"name\":\"南川区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500120\",\"name\":\"璧山区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500151\",\"name\":\"铜梁区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500152\",\"name\":\"潼南区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500153\",\"name\":\"荣昌区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500154\",\"name\":\"开州区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500155\",\"name\":\"梁平区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500156\",\"name\":\"武隆区\",\"cityCode\":\"5001\",\"provinceCode\":\"50\"},{\"code\":\"500229\",\"name\":\"城口县\",\"cityCode\":\"5002\",\"provinceCode\":\"50\"},{\"code\":\"500230\",\"name\":\"丰都县\",\"cityCode\":\"5002\",\"provinceCode\":\"50\"},{\"code\":\"500231\",\"name\":\"垫江县\",\"cityCode\":\"5002\",\"provinceCode\":\"50\"},{\"code\":\"500233\",\"name\":\"忠县\",\"cityCode\":\"5002\",\"provinceCode\":\"50\"},{\"code\":\"500235\",\"name\":\"云阳县\",\"cityCode\":\"5002\",\"provinceCode\":\"50\"},{\"code\":\"500236\",\"name\":\"奉节县\",\"cityCode\":\"5002\",\"provinceCode\":\"50\"},{\"code\":\"500237\",\"name\":\"巫山县\",\"cityCode\":\"5002\",\"provinceCode\":\"50\"},{\"code\":\"500238\",\"name\":\"巫溪县\",\"cityCode\":\"5002\",\"provinceCode\":\"50\"},{\"code\":\"500240\",\"name\":\"石柱土家族自治县\",\"cityCode\":\"5002\",\"provinceCode\":\"50\"},{\"code\":\"500241\",\"name\":\"秀山土家族苗族自治县\",\"cityCode\":\"5002\",\"provinceCode\":\"50\"},{\"code\":\"500242\",\"name\":\"酉阳土家族苗族自治县\",\"cityCode\":\"5002\",\"provinceCode\":\"50\"},{\"code\":\"500243\",\"name\":\"彭水苗族土家族自治县\",\"cityCode\":\"5002\",\"provinceCode\":\"50\"},{\"code\":\"510104\",\"name\":\"锦江区\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510105\",\"name\":\"青羊区\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510106\",\"name\":\"金牛区\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510107\",\"name\":\"武侯区\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510108\",\"name\":\"成华区\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510112\",\"name\":\"龙泉驿区\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510113\",\"name\":\"青白江区\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510114\",\"name\":\"新都区\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510115\",\"name\":\"温江区\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510116\",\"name\":\"双流区\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510117\",\"name\":\"郫都区\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510121\",\"name\":\"金堂县\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510129\",\"name\":\"大邑县\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510131\",\"name\":\"蒲江县\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510132\",\"name\":\"新津县\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510181\",\"name\":\"都江堰市\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510182\",\"name\":\"彭州市\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510183\",\"name\":\"邛崃市\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510184\",\"name\":\"崇州市\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510185\",\"name\":\"简阳市\",\"cityCode\":\"5101\",\"provinceCode\":\"51\"},{\"code\":\"510302\",\"name\":\"自流井区\",\"cityCode\":\"5103\",\"provinceCode\":\"51\"},{\"code\":\"510303\",\"name\":\"贡井区\",\"cityCode\":\"5103\",\"provinceCode\":\"51\"},{\"code\":\"510304\",\"name\":\"大安区\",\"cityCode\":\"5103\",\"provinceCode\":\"51\"},{\"code\":\"510311\",\"name\":\"沿滩区\",\"cityCode\":\"5103\",\"provinceCode\":\"51\"},{\"code\":\"510321\",\"name\":\"荣县\",\"cityCode\":\"5103\",\"provinceCode\":\"51\"},{\"code\":\"510322\",\"name\":\"富顺县\",\"cityCode\":\"5103\",\"provinceCode\":\"51\"},{\"code\":\"510402\",\"name\":\"东区\",\"cityCode\":\"5104\",\"provinceCode\":\"51\"},{\"code\":\"510403\",\"name\":\"西区\",\"cityCode\":\"5104\",\"provinceCode\":\"51\"},{\"code\":\"510411\",\"name\":\"仁和区\",\"cityCode\":\"5104\",\"provinceCode\":\"51\"},{\"code\":\"510421\",\"name\":\"米易县\",\"cityCode\":\"5104\",\"provinceCode\":\"51\"},{\"code\":\"510422\",\"name\":\"盐边县\",\"cityCode\":\"5104\",\"provinceCode\":\"51\"},{\"code\":\"510502\",\"name\":\"江阳区\",\"cityCode\":\"5105\",\"provinceCode\":\"51\"},{\"code\":\"510503\",\"name\":\"纳溪区\",\"cityCode\":\"5105\",\"provinceCode\":\"51\"},{\"code\":\"510504\",\"name\":\"龙马潭区\",\"cityCode\":\"5105\",\"provinceCode\":\"51\"},{\"code\":\"510521\",\"name\":\"泸县\",\"cityCode\":\"5105\",\"provinceCode\":\"51\"},{\"code\":\"510522\",\"name\":\"合江县\",\"cityCode\":\"5105\",\"provinceCode\":\"51\"},{\"code\":\"510524\",\"name\":\"叙永县\",\"cityCode\":\"5105\",\"provinceCode\":\"51\"},{\"code\":\"510525\",\"name\":\"古蔺县\",\"cityCode\":\"5105\",\"provinceCode\":\"51\"},{\"code\":\"510603\",\"name\":\"旌阳区\",\"cityCode\":\"5106\",\"provinceCode\":\"51\"},{\"code\":\"510604\",\"name\":\"罗江区\",\"cityCode\":\"5106\",\"provinceCode\":\"51\"},{\"code\":\"510623\",\"name\":\"中江县\",\"cityCode\":\"5106\",\"provinceCode\":\"51\"},{\"code\":\"510681\",\"name\":\"广汉市\",\"cityCode\":\"5106\",\"provinceCode\":\"51\"},{\"code\":\"510682\",\"name\":\"什邡市\",\"cityCode\":\"5106\",\"provinceCode\":\"51\"},{\"code\":\"510683\",\"name\":\"绵竹市\",\"cityCode\":\"5106\",\"provinceCode\":\"51\"},{\"code\":\"510703\",\"name\":\"涪城区\",\"cityCode\":\"5107\",\"provinceCode\":\"51\"},{\"code\":\"510704\",\"name\":\"游仙区\",\"cityCode\":\"5107\",\"provinceCode\":\"51\"},{\"code\":\"510705\",\"name\":\"安州区\",\"cityCode\":\"5107\",\"provinceCode\":\"51\"},{\"code\":\"510722\",\"name\":\"三台县\",\"cityCode\":\"5107\",\"provinceCode\":\"51\"},{\"code\":\"510723\",\"name\":\"盐亭县\",\"cityCode\":\"5107\",\"provinceCode\":\"51\"},{\"code\":\"510725\",\"name\":\"梓潼县\",\"cityCode\":\"5107\",\"provinceCode\":\"51\"},{\"code\":\"510726\",\"name\":\"北川羌族自治县\",\"cityCode\":\"5107\",\"provinceCode\":\"51\"},{\"code\":\"510727\",\"name\":\"平武县\",\"cityCode\":\"5107\",\"provinceCode\":\"51\"},{\"code\":\"510781\",\"name\":\"江油市\",\"cityCode\":\"5107\",\"provinceCode\":\"51\"},{\"code\":\"510802\",\"name\":\"利州区\",\"cityCode\":\"5108\",\"provinceCode\":\"51\"},{\"code\":\"510811\",\"name\":\"昭化区\",\"cityCode\":\"5108\",\"provinceCode\":\"51\"},{\"code\":\"510812\",\"name\":\"朝天区\",\"cityCode\":\"5108\",\"provinceCode\":\"51\"},{\"code\":\"510821\",\"name\":\"旺苍县\",\"cityCode\":\"5108\",\"provinceCode\":\"51\"},{\"code\":\"510822\",\"name\":\"青川县\",\"cityCode\":\"5108\",\"provinceCode\":\"51\"},{\"code\":\"510823\",\"name\":\"剑阁县\",\"cityCode\":\"5108\",\"provinceCode\":\"51\"},{\"code\":\"510824\",\"name\":\"苍溪县\",\"cityCode\":\"5108\",\"provinceCode\":\"51\"},{\"code\":\"510903\",\"name\":\"船山区\",\"cityCode\":\"5109\",\"provinceCode\":\"51\"},{\"code\":\"510904\",\"name\":\"安居区\",\"cityCode\":\"5109\",\"provinceCode\":\"51\"},{\"code\":\"510921\",\"name\":\"蓬溪县\",\"cityCode\":\"5109\",\"provinceCode\":\"51\"},{\"code\":\"510922\",\"name\":\"射洪县\",\"cityCode\":\"5109\",\"provinceCode\":\"51\"},{\"code\":\"510923\",\"name\":\"大英县\",\"cityCode\":\"5109\",\"provinceCode\":\"51\"},{\"code\":\"511002\",\"name\":\"市中区\",\"cityCode\":\"5110\",\"provinceCode\":\"51\"},{\"code\":\"511011\",\"name\":\"东兴区\",\"cityCode\":\"5110\",\"provinceCode\":\"51\"},{\"code\":\"511024\",\"name\":\"威远县\",\"cityCode\":\"5110\",\"provinceCode\":\"51\"},{\"code\":\"511025\",\"name\":\"资中县\",\"cityCode\":\"5110\",\"provinceCode\":\"51\"},{\"code\":\"511071\",\"name\":\"内江经济开发区\",\"cityCode\":\"5110\",\"provinceCode\":\"51\"},{\"code\":\"511083\",\"name\":\"隆昌市\",\"cityCode\":\"5110\",\"provinceCode\":\"51\"},{\"code\":\"511102\",\"name\":\"市中区\",\"cityCode\":\"5111\",\"provinceCode\":\"51\"},{\"code\":\"511111\",\"name\":\"沙湾区\",\"cityCode\":\"5111\",\"provinceCode\":\"51\"},{\"code\":\"511112\",\"name\":\"五通桥区\",\"cityCode\":\"5111\",\"provinceCode\":\"51\"},{\"code\":\"511113\",\"name\":\"金口河区\",\"cityCode\":\"5111\",\"provinceCode\":\"51\"},{\"code\":\"511123\",\"name\":\"犍为县\",\"cityCode\":\"5111\",\"provinceCode\":\"51\"},{\"code\":\"511124\",\"name\":\"井研县\",\"cityCode\":\"5111\",\"provinceCode\":\"51\"},{\"code\":\"511126\",\"name\":\"夹江县\",\"cityCode\":\"5111\",\"provinceCode\":\"51\"},{\"code\":\"511129\",\"name\":\"沐川县\",\"cityCode\":\"5111\",\"provinceCode\":\"51\"},{\"code\":\"511132\",\"name\":\"峨边彝族自治县\",\"cityCode\":\"5111\",\"provinceCode\":\"51\"},{\"code\":\"511133\",\"name\":\"马边彝族自治县\",\"cityCode\":\"5111\",\"provinceCode\":\"51\"},{\"code\":\"511181\",\"name\":\"峨眉山市\",\"cityCode\":\"5111\",\"provinceCode\":\"51\"},{\"code\":\"511302\",\"name\":\"顺庆区\",\"cityCode\":\"5113\",\"provinceCode\":\"51\"},{\"code\":\"511303\",\"name\":\"高坪区\",\"cityCode\":\"5113\",\"provinceCode\":\"51\"},{\"code\":\"511304\",\"name\":\"嘉陵区\",\"cityCode\":\"5113\",\"provinceCode\":\"51\"},{\"code\":\"511321\",\"name\":\"南部县\",\"cityCode\":\"5113\",\"provinceCode\":\"51\"},{\"code\":\"511322\",\"name\":\"营山县\",\"cityCode\":\"5113\",\"provinceCode\":\"51\"},{\"code\":\"511323\",\"name\":\"蓬安县\",\"cityCode\":\"5113\",\"provinceCode\":\"51\"},{\"code\":\"511324\",\"name\":\"仪陇县\",\"cityCode\":\"5113\",\"provinceCode\":\"51\"},{\"code\":\"511325\",\"name\":\"西充县\",\"cityCode\":\"5113\",\"provinceCode\":\"51\"},{\"code\":\"511381\",\"name\":\"阆中市\",\"cityCode\":\"5113\",\"provinceCode\":\"51\"},{\"code\":\"511402\",\"name\":\"东坡区\",\"cityCode\":\"5114\",\"provinceCode\":\"51\"},{\"code\":\"511403\",\"name\":\"彭山区\",\"cityCode\":\"5114\",\"provinceCode\":\"51\"},{\"code\":\"511421\",\"name\":\"仁寿县\",\"cityCode\":\"5114\",\"provinceCode\":\"51\"},{\"code\":\"511423\",\"name\":\"洪雅县\",\"cityCode\":\"5114\",\"provinceCode\":\"51\"},{\"code\":\"511424\",\"name\":\"丹棱县\",\"cityCode\":\"5114\",\"provinceCode\":\"51\"},{\"code\":\"511425\",\"name\":\"青神县\",\"cityCode\":\"5114\",\"provinceCode\":\"51\"},{\"code\":\"511502\",\"name\":\"翠屏区\",\"cityCode\":\"5115\",\"provinceCode\":\"51\"},{\"code\":\"511503\",\"name\":\"南溪区\",\"cityCode\":\"5115\",\"provinceCode\":\"51\"},{\"code\":\"511521\",\"name\":\"宜宾县\",\"cityCode\":\"5115\",\"provinceCode\":\"51\"},{\"code\":\"511523\",\"name\":\"江安县\",\"cityCode\":\"5115\",\"provinceCode\":\"51\"},{\"code\":\"511524\",\"name\":\"长宁县\",\"cityCode\":\"5115\",\"provinceCode\":\"51\"},{\"code\":\"511525\",\"name\":\"高县\",\"cityCode\":\"5115\",\"provinceCode\":\"51\"},{\"code\":\"511526\",\"name\":\"珙县\",\"cityCode\":\"5115\",\"provinceCode\":\"51\"},{\"code\":\"511527\",\"name\":\"筠连县\",\"cityCode\":\"5115\",\"provinceCode\":\"51\"},{\"code\":\"511528\",\"name\":\"兴文县\",\"cityCode\":\"5115\",\"provinceCode\":\"51\"},{\"code\":\"511529\",\"name\":\"屏山县\",\"cityCode\":\"5115\",\"provinceCode\":\"51\"},{\"code\":\"511602\",\"name\":\"广安区\",\"cityCode\":\"5116\",\"provinceCode\":\"51\"},{\"code\":\"511603\",\"name\":\"前锋区\",\"cityCode\":\"5116\",\"provinceCode\":\"51\"},{\"code\":\"511621\",\"name\":\"岳池县\",\"cityCode\":\"5116\",\"provinceCode\":\"51\"},{\"code\":\"511622\",\"name\":\"武胜县\",\"cityCode\":\"5116\",\"provinceCode\":\"51\"},{\"code\":\"511623\",\"name\":\"邻水县\",\"cityCode\":\"5116\",\"provinceCode\":\"51\"},{\"code\":\"511681\",\"name\":\"华蓥市\",\"cityCode\":\"5116\",\"provinceCode\":\"51\"},{\"code\":\"511702\",\"name\":\"通川区\",\"cityCode\":\"5117\",\"provinceCode\":\"51\"},{\"code\":\"511703\",\"name\":\"达川区\",\"cityCode\":\"5117\",\"provinceCode\":\"51\"},{\"code\":\"511722\",\"name\":\"宣汉县\",\"cityCode\":\"5117\",\"provinceCode\":\"51\"},{\"code\":\"511723\",\"name\":\"开江县\",\"cityCode\":\"5117\",\"provinceCode\":\"51\"},{\"code\":\"511724\",\"name\":\"大竹县\",\"cityCode\":\"5117\",\"provinceCode\":\"51\"},{\"code\":\"511725\",\"name\":\"渠县\",\"cityCode\":\"5117\",\"provinceCode\":\"51\"},{\"code\":\"511771\",\"name\":\"达州经济开发区\",\"cityCode\":\"5117\",\"provinceCode\":\"51\"},{\"code\":\"511781\",\"name\":\"万源市\",\"cityCode\":\"5117\",\"provinceCode\":\"51\"},{\"code\":\"511802\",\"name\":\"雨城区\",\"cityCode\":\"5118\",\"provinceCode\":\"51\"},{\"code\":\"511803\",\"name\":\"名山区\",\"cityCode\":\"5118\",\"provinceCode\":\"51\"},{\"code\":\"511822\",\"name\":\"荥经县\",\"cityCode\":\"5118\",\"provinceCode\":\"51\"},{\"code\":\"511823\",\"name\":\"汉源县\",\"cityCode\":\"5118\",\"provinceCode\":\"51\"},{\"code\":\"511824\",\"name\":\"石棉县\",\"cityCode\":\"5118\",\"provinceCode\":\"51\"},{\"code\":\"511825\",\"name\":\"天全县\",\"cityCode\":\"5118\",\"provinceCode\":\"51\"},{\"code\":\"511826\",\"name\":\"芦山县\",\"cityCode\":\"5118\",\"provinceCode\":\"51\"},{\"code\":\"511827\",\"name\":\"宝兴县\",\"cityCode\":\"5118\",\"provinceCode\":\"51\"},{\"code\":\"511902\",\"name\":\"巴州区\",\"cityCode\":\"5119\",\"provinceCode\":\"51\"},{\"code\":\"511903\",\"name\":\"恩阳区\",\"cityCode\":\"5119\",\"provinceCode\":\"51\"},{\"code\":\"511921\",\"name\":\"通江县\",\"cityCode\":\"5119\",\"provinceCode\":\"51\"},{\"code\":\"511922\",\"name\":\"南江县\",\"cityCode\":\"5119\",\"provinceCode\":\"51\"},{\"code\":\"511923\",\"name\":\"平昌县\",\"cityCode\":\"5119\",\"provinceCode\":\"51\"},{\"code\":\"511971\",\"name\":\"巴中经济开发区\",\"cityCode\":\"5119\",\"provinceCode\":\"51\"},{\"code\":\"512002\",\"name\":\"雁江区\",\"cityCode\":\"5120\",\"provinceCode\":\"51\"},{\"code\":\"512021\",\"name\":\"安岳县\",\"cityCode\":\"5120\",\"provinceCode\":\"51\"},{\"code\":\"512022\",\"name\":\"乐至县\",\"cityCode\":\"5120\",\"provinceCode\":\"51\"},{\"code\":\"513201\",\"name\":\"马尔康市\",\"cityCode\":\"5132\",\"provinceCode\":\"51\"},{\"code\":\"513221\",\"name\":\"汶川县\",\"cityCode\":\"5132\",\"provinceCode\":\"51\"},{\"code\":\"513222\",\"name\":\"理县\",\"cityCode\":\"5132\",\"provinceCode\":\"51\"},{\"code\":\"513223\",\"name\":\"茂县\",\"cityCode\":\"5132\",\"provinceCode\":\"51\"},{\"code\":\"513224\",\"name\":\"松潘县\",\"cityCode\":\"5132\",\"provinceCode\":\"51\"},{\"code\":\"513225\",\"name\":\"九寨沟县\",\"cityCode\":\"5132\",\"provinceCode\":\"51\"},{\"code\":\"513226\",\"name\":\"金川县\",\"cityCode\":\"5132\",\"provinceCode\":\"51\"},{\"code\":\"513227\",\"name\":\"小金县\",\"cityCode\":\"5132\",\"provinceCode\":\"51\"},{\"code\":\"513228\",\"name\":\"黑水县\",\"cityCode\":\"5132\",\"provinceCode\":\"51\"},{\"code\":\"513230\",\"name\":\"壤塘县\",\"cityCode\":\"5132\",\"provinceCode\":\"51\"},{\"code\":\"513231\",\"name\":\"阿坝县\",\"cityCode\":\"5132\",\"provinceCode\":\"51\"},{\"code\":\"513232\",\"name\":\"若尔盖县\",\"cityCode\":\"5132\",\"provinceCode\":\"51\"},{\"code\":\"513233\",\"name\":\"红原县\",\"cityCode\":\"5132\",\"provinceCode\":\"51\"},{\"code\":\"513301\",\"name\":\"康定市\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513322\",\"name\":\"泸定县\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513323\",\"name\":\"丹巴县\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513324\",\"name\":\"九龙县\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513325\",\"name\":\"雅江县\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513326\",\"name\":\"道孚县\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513327\",\"name\":\"炉霍县\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513328\",\"name\":\"甘孜县\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513329\",\"name\":\"新龙县\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513330\",\"name\":\"德格县\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513331\",\"name\":\"白玉县\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513332\",\"name\":\"石渠县\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513333\",\"name\":\"色达县\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513334\",\"name\":\"理塘县\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513335\",\"name\":\"巴塘县\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513336\",\"name\":\"乡城县\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513337\",\"name\":\"稻城县\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513338\",\"name\":\"得荣县\",\"cityCode\":\"5133\",\"provinceCode\":\"51\"},{\"code\":\"513401\",\"name\":\"西昌市\",\"cityCode\":\"5134\",\"provinceCode\":\"51\"},{\"code\":\"513422\",\"name\":\"木里藏族自治县\",\"cityCode\":\"5134\",\"provinceCode\":\"51\"},{\"code\":\"513423\",\"name\":\"盐源县\",\"cityCode\":\"5134\",\"provinceCode\":\"51\"},{\"code\":\"513424\",\"name\":\"德昌县\",\"cityCode\":\"5134\",\"provinceCode\":\"51\"},{\"code\":\"513425\",\"name\":\"会理县\",\"cityCode\":\"5134\",\"provinceCode\":\"51\"},{\"code\":\"513426\",\"name\":\"会东县\",\"cityCode\":\"5134\",\"provinceCode\":\"51\"},{\"code\":\"513427\",\"name\":\"宁南县\",\"cityCode\":\"5134\",\"provinceCode\":\"51\"},{\"code\":\"513428\",\"name\":\"普格县\",\"cityCode\":\"5134\",\"provinceCode\":\"51\"},{\"code\":\"513429\",\"name\":\"布拖县\",\"cityCode\":\"5134\",\"provinceCode\":\"51\"},{\"code\":\"513430\",\"name\":\"金阳县\",\"cityCode\":\"5134\",\"provinceCode\":\"51\"},{\"code\":\"513431\",\"name\":\"昭觉县\",\"cityCode\":\"5134\",\"provinceCode\":\"51\"},{\"code\":\"513432\",\"name\":\"喜德县\",\"cityCode\":\"5134\",\"provinceCode\":\"51\"},{\"code\":\"513433\",\"name\":\"冕宁县\",\"cityCode\":\"5134\",\"provinceCode\":\"51\"},{\"code\":\"513434\",\"name\":\"越西县\",\"cityCode\":\"5134\",\"provinceCode\":\"51\"},{\"code\":\"513435\",\"name\":\"甘洛县\",\"cityCode\":\"5134\",\"provinceCode\":\"51\"},{\"code\":\"513436\",\"name\":\"美姑县\",\"cityCode\":\"5134\",\"provinceCode\":\"51\"},{\"code\":\"513437\",\"name\":\"雷波县\",\"cityCode\":\"5134\",\"provinceCode\":\"51\"},{\"code\":\"520102\",\"name\":\"南明区\",\"cityCode\":\"5201\",\"provinceCode\":\"52\"},{\"code\":\"520103\",\"name\":\"云岩区\",\"cityCode\":\"5201\",\"provinceCode\":\"52\"},{\"code\":\"520111\",\"name\":\"花溪区\",\"cityCode\":\"5201\",\"provinceCode\":\"52\"},{\"code\":\"520112\",\"name\":\"乌当区\",\"cityCode\":\"5201\",\"provinceCode\":\"52\"},{\"code\":\"520113\",\"name\":\"白云区\",\"cityCode\":\"5201\",\"provinceCode\":\"52\"},{\"code\":\"520115\",\"name\":\"观山湖区\",\"cityCode\":\"5201\",\"provinceCode\":\"52\"},{\"code\":\"520121\",\"name\":\"开阳县\",\"cityCode\":\"5201\",\"provinceCode\":\"52\"},{\"code\":\"520122\",\"name\":\"息烽县\",\"cityCode\":\"5201\",\"provinceCode\":\"52\"},{\"code\":\"520123\",\"name\":\"修文县\",\"cityCode\":\"5201\",\"provinceCode\":\"52\"},{\"code\":\"520181\",\"name\":\"清镇市\",\"cityCode\":\"5201\",\"provinceCode\":\"52\"},{\"code\":\"520201\",\"name\":\"钟山区\",\"cityCode\":\"5202\",\"provinceCode\":\"52\"},{\"code\":\"520203\",\"name\":\"六枝特区\",\"cityCode\":\"5202\",\"provinceCode\":\"52\"},{\"code\":\"520221\",\"name\":\"水城县\",\"cityCode\":\"5202\",\"provinceCode\":\"52\"},{\"code\":\"520281\",\"name\":\"盘州市\",\"cityCode\":\"5202\",\"provinceCode\":\"52\"},{\"code\":\"520302\",\"name\":\"红花岗区\",\"cityCode\":\"5203\",\"provinceCode\":\"52\"},{\"code\":\"520303\",\"name\":\"汇川区\",\"cityCode\":\"5203\",\"provinceCode\":\"52\"},{\"code\":\"520304\",\"name\":\"播州区\",\"cityCode\":\"5203\",\"provinceCode\":\"52\"},{\"code\":\"520322\",\"name\":\"桐梓县\",\"cityCode\":\"5203\",\"provinceCode\":\"52\"},{\"code\":\"520323\",\"name\":\"绥阳县\",\"cityCode\":\"5203\",\"provinceCode\":\"52\"},{\"code\":\"520324\",\"name\":\"正安县\",\"cityCode\":\"5203\",\"provinceCode\":\"52\"},{\"code\":\"520325\",\"name\":\"道真仡佬族苗族自治县\",\"cityCode\":\"5203\",\"provinceCode\":\"52\"},{\"code\":\"520326\",\"name\":\"务川仡佬族苗族自治县\",\"cityCode\":\"5203\",\"provinceCode\":\"52\"},{\"code\":\"520327\",\"name\":\"凤冈县\",\"cityCode\":\"5203\",\"provinceCode\":\"52\"},{\"code\":\"520328\",\"name\":\"湄潭县\",\"cityCode\":\"5203\",\"provinceCode\":\"52\"},{\"code\":\"520329\",\"name\":\"余庆县\",\"cityCode\":\"5203\",\"provinceCode\":\"52\"},{\"code\":\"520330\",\"name\":\"习水县\",\"cityCode\":\"5203\",\"provinceCode\":\"52\"},{\"code\":\"520381\",\"name\":\"赤水市\",\"cityCode\":\"5203\",\"provinceCode\":\"52\"},{\"code\":\"520382\",\"name\":\"仁怀市\",\"cityCode\":\"5203\",\"provinceCode\":\"52\"},{\"code\":\"520402\",\"name\":\"西秀区\",\"cityCode\":\"5204\",\"provinceCode\":\"52\"},{\"code\":\"520403\",\"name\":\"平坝区\",\"cityCode\":\"5204\",\"provinceCode\":\"52\"},{\"code\":\"520422\",\"name\":\"普定县\",\"cityCode\":\"5204\",\"provinceCode\":\"52\"},{\"code\":\"520423\",\"name\":\"镇宁布依族苗族自治县\",\"cityCode\":\"5204\",\"provinceCode\":\"52\"},{\"code\":\"520424\",\"name\":\"关岭布依族苗族自治县\",\"cityCode\":\"5204\",\"provinceCode\":\"52\"},{\"code\":\"520425\",\"name\":\"紫云苗族布依族自治县\",\"cityCode\":\"5204\",\"provinceCode\":\"52\"},{\"code\":\"520502\",\"name\":\"七星关区\",\"cityCode\":\"5205\",\"provinceCode\":\"52\"},{\"code\":\"520521\",\"name\":\"大方县\",\"cityCode\":\"5205\",\"provinceCode\":\"52\"},{\"code\":\"520522\",\"name\":\"黔西县\",\"cityCode\":\"5205\",\"provinceCode\":\"52\"},{\"code\":\"520523\",\"name\":\"金沙县\",\"cityCode\":\"5205\",\"provinceCode\":\"52\"},{\"code\":\"520524\",\"name\":\"织金县\",\"cityCode\":\"5205\",\"provinceCode\":\"52\"},{\"code\":\"520525\",\"name\":\"纳雍县\",\"cityCode\":\"5205\",\"provinceCode\":\"52\"},{\"code\":\"520526\",\"name\":\"威宁彝族回族苗族自治县\",\"cityCode\":\"5205\",\"provinceCode\":\"52\"},{\"code\":\"520527\",\"name\":\"赫章县\",\"cityCode\":\"5205\",\"provinceCode\":\"52\"},{\"code\":\"520602\",\"name\":\"碧江区\",\"cityCode\":\"5206\",\"provinceCode\":\"52\"},{\"code\":\"520603\",\"name\":\"万山区\",\"cityCode\":\"5206\",\"provinceCode\":\"52\"},{\"code\":\"520621\",\"name\":\"江口县\",\"cityCode\":\"5206\",\"provinceCode\":\"52\"},{\"code\":\"520622\",\"name\":\"玉屏侗族自治县\",\"cityCode\":\"5206\",\"provinceCode\":\"52\"},{\"code\":\"520623\",\"name\":\"石阡县\",\"cityCode\":\"5206\",\"provinceCode\":\"52\"},{\"code\":\"520624\",\"name\":\"思南县\",\"cityCode\":\"5206\",\"provinceCode\":\"52\"},{\"code\":\"520625\",\"name\":\"印江土家族苗族自治县\",\"cityCode\":\"5206\",\"provinceCode\":\"52\"},{\"code\":\"520626\",\"name\":\"德江县\",\"cityCode\":\"5206\",\"provinceCode\":\"52\"},{\"code\":\"520627\",\"name\":\"沿河土家族自治县\",\"cityCode\":\"5206\",\"provinceCode\":\"52\"},{\"code\":\"520628\",\"name\":\"松桃苗族自治县\",\"cityCode\":\"5206\",\"provinceCode\":\"52\"},{\"code\":\"522301\",\"name\":\"兴义市\",\"cityCode\":\"5223\",\"provinceCode\":\"52\"},{\"code\":\"522322\",\"name\":\"兴仁县\",\"cityCode\":\"5223\",\"provinceCode\":\"52\"},{\"code\":\"522323\",\"name\":\"普安县\",\"cityCode\":\"5223\",\"provinceCode\":\"52\"},{\"code\":\"522324\",\"name\":\"晴隆县\",\"cityCode\":\"5223\",\"provinceCode\":\"52\"},{\"code\":\"522325\",\"name\":\"贞丰县\",\"cityCode\":\"5223\",\"provinceCode\":\"52\"},{\"code\":\"522326\",\"name\":\"望谟县\",\"cityCode\":\"5223\",\"provinceCode\":\"52\"},{\"code\":\"522327\",\"name\":\"册亨县\",\"cityCode\":\"5223\",\"provinceCode\":\"52\"},{\"code\":\"522328\",\"name\":\"安龙县\",\"cityCode\":\"5223\",\"provinceCode\":\"52\"},{\"code\":\"522601\",\"name\":\"凯里市\",\"cityCode\":\"5226\",\"provinceCode\":\"52\"},{\"code\":\"522622\",\"name\":\"黄平县\",\"cityCode\":\"5226\",\"provinceCode\":\"52\"},{\"code\":\"522623\",\"name\":\"施秉县\",\"cityCode\":\"5226\",\"provinceCode\":\"52\"},{\"code\":\"522624\",\"name\":\"三穗县\",\"cityCode\":\"5226\",\"provinceCode\":\"52\"},{\"code\":\"522625\",\"name\":\"镇远县\",\"cityCode\":\"5226\",\"provinceCode\":\"52\"},{\"code\":\"522626\",\"name\":\"岑巩县\",\"cityCode\":\"5226\",\"provinceCode\":\"52\"},{\"code\":\"522627\",\"name\":\"天柱县\",\"cityCode\":\"5226\",\"provinceCode\":\"52\"},{\"code\":\"522628\",\"name\":\"锦屏县\",\"cityCode\":\"5226\",\"provinceCode\":\"52\"},{\"code\":\"522629\",\"name\":\"剑河县\",\"cityCode\":\"5226\",\"provinceCode\":\"52\"},{\"code\":\"522630\",\"name\":\"台江县\",\"cityCode\":\"5226\",\"provinceCode\":\"52\"},{\"code\":\"522631\",\"name\":\"黎平县\",\"cityCode\":\"5226\",\"provinceCode\":\"52\"},{\"code\":\"522632\",\"name\":\"榕江县\",\"cityCode\":\"5226\",\"provinceCode\":\"52\"},{\"code\":\"522633\",\"name\":\"从江县\",\"cityCode\":\"5226\",\"provinceCode\":\"52\"},{\"code\":\"522634\",\"name\":\"雷山县\",\"cityCode\":\"5226\",\"provinceCode\":\"52\"},{\"code\":\"522635\",\"name\":\"麻江县\",\"cityCode\":\"5226\",\"provinceCode\":\"52\"},{\"code\":\"522636\",\"name\":\"丹寨县\",\"cityCode\":\"5226\",\"provinceCode\":\"52\"},{\"code\":\"522701\",\"name\":\"都匀市\",\"cityCode\":\"5227\",\"provinceCode\":\"52\"},{\"code\":\"522702\",\"name\":\"福泉市\",\"cityCode\":\"5227\",\"provinceCode\":\"52\"},{\"code\":\"522722\",\"name\":\"荔波县\",\"cityCode\":\"5227\",\"provinceCode\":\"52\"},{\"code\":\"522723\",\"name\":\"贵定县\",\"cityCode\":\"5227\",\"provinceCode\":\"52\"},{\"code\":\"522725\",\"name\":\"瓮安县\",\"cityCode\":\"5227\",\"provinceCode\":\"52\"},{\"code\":\"522726\",\"name\":\"独山县\",\"cityCode\":\"5227\",\"provinceCode\":\"52\"},{\"code\":\"522727\",\"name\":\"平塘县\",\"cityCode\":\"5227\",\"provinceCode\":\"52\"},{\"code\":\"522728\",\"name\":\"罗甸县\",\"cityCode\":\"5227\",\"provinceCode\":\"52\"},{\"code\":\"522729\",\"name\":\"长顺县\",\"cityCode\":\"5227\",\"provinceCode\":\"52\"},{\"code\":\"522730\",\"name\":\"龙里县\",\"cityCode\":\"5227\",\"provinceCode\":\"52\"},{\"code\":\"522731\",\"name\":\"惠水县\",\"cityCode\":\"5227\",\"provinceCode\":\"52\"},{\"code\":\"522732\",\"name\":\"三都水族自治县\",\"cityCode\":\"5227\",\"provinceCode\":\"52\"},{\"code\":\"530102\",\"name\":\"五华区\",\"cityCode\":\"5301\",\"provinceCode\":\"53\"},{\"code\":\"530103\",\"name\":\"盘龙区\",\"cityCode\":\"5301\",\"provinceCode\":\"53\"},{\"code\":\"530111\",\"name\":\"官渡区\",\"cityCode\":\"5301\",\"provinceCode\":\"53\"},{\"code\":\"530112\",\"name\":\"西山区\",\"cityCode\":\"5301\",\"provinceCode\":\"53\"},{\"code\":\"530113\",\"name\":\"东川区\",\"cityCode\":\"5301\",\"provinceCode\":\"53\"},{\"code\":\"530114\",\"name\":\"呈贡区\",\"cityCode\":\"5301\",\"provinceCode\":\"53\"},{\"code\":\"530115\",\"name\":\"晋宁区\",\"cityCode\":\"5301\",\"provinceCode\":\"53\"},{\"code\":\"530124\",\"name\":\"富民县\",\"cityCode\":\"5301\",\"provinceCode\":\"53\"},{\"code\":\"530125\",\"name\":\"宜良县\",\"cityCode\":\"5301\",\"provinceCode\":\"53\"},{\"code\":\"530126\",\"name\":\"石林彝族自治县\",\"cityCode\":\"5301\",\"provinceCode\":\"53\"},{\"code\":\"530127\",\"name\":\"嵩明县\",\"cityCode\":\"5301\",\"provinceCode\":\"53\"},{\"code\":\"530128\",\"name\":\"禄劝彝族苗族自治县\",\"cityCode\":\"5301\",\"provinceCode\":\"53\"},{\"code\":\"530129\",\"name\":\"寻甸回族彝族自治县\",\"cityCode\":\"5301\",\"provinceCode\":\"53\"},{\"code\":\"530181\",\"name\":\"安宁市\",\"cityCode\":\"5301\",\"provinceCode\":\"53\"},{\"code\":\"530302\",\"name\":\"麒麟区\",\"cityCode\":\"5303\",\"provinceCode\":\"53\"},{\"code\":\"530303\",\"name\":\"沾益区\",\"cityCode\":\"5303\",\"provinceCode\":\"53\"},{\"code\":\"530321\",\"name\":\"马龙县\",\"cityCode\":\"5303\",\"provinceCode\":\"53\"},{\"code\":\"530322\",\"name\":\"陆良县\",\"cityCode\":\"5303\",\"provinceCode\":\"53\"},{\"code\":\"530323\",\"name\":\"师宗县\",\"cityCode\":\"5303\",\"provinceCode\":\"53\"},{\"code\":\"530324\",\"name\":\"罗平县\",\"cityCode\":\"5303\",\"provinceCode\":\"53\"},{\"code\":\"530325\",\"name\":\"富源县\",\"cityCode\":\"5303\",\"provinceCode\":\"53\"},{\"code\":\"530326\",\"name\":\"会泽县\",\"cityCode\":\"5303\",\"provinceCode\":\"53\"},{\"code\":\"530381\",\"name\":\"宣威市\",\"cityCode\":\"5303\",\"provinceCode\":\"53\"},{\"code\":\"530402\",\"name\":\"红塔区\",\"cityCode\":\"5304\",\"provinceCode\":\"53\"},{\"code\":\"530403\",\"name\":\"江川区\",\"cityCode\":\"5304\",\"provinceCode\":\"53\"},{\"code\":\"530422\",\"name\":\"澄江县\",\"cityCode\":\"5304\",\"provinceCode\":\"53\"},{\"code\":\"530423\",\"name\":\"通海县\",\"cityCode\":\"5304\",\"provinceCode\":\"53\"},{\"code\":\"530424\",\"name\":\"华宁县\",\"cityCode\":\"5304\",\"provinceCode\":\"53\"},{\"code\":\"530425\",\"name\":\"易门县\",\"cityCode\":\"5304\",\"provinceCode\":\"53\"},{\"code\":\"530426\",\"name\":\"峨山彝族自治县\",\"cityCode\":\"5304\",\"provinceCode\":\"53\"},{\"code\":\"530427\",\"name\":\"新平彝族傣族自治县\",\"cityCode\":\"5304\",\"provinceCode\":\"53\"},{\"code\":\"530428\",\"name\":\"元江哈尼族彝族傣族自治县\",\"cityCode\":\"5304\",\"provinceCode\":\"53\"},{\"code\":\"530502\",\"name\":\"隆阳区\",\"cityCode\":\"5305\",\"provinceCode\":\"53\"},{\"code\":\"530521\",\"name\":\"施甸县\",\"cityCode\":\"5305\",\"provinceCode\":\"53\"},{\"code\":\"530523\",\"name\":\"龙陵县\",\"cityCode\":\"5305\",\"provinceCode\":\"53\"},{\"code\":\"530524\",\"name\":\"昌宁县\",\"cityCode\":\"5305\",\"provinceCode\":\"53\"},{\"code\":\"530581\",\"name\":\"腾冲市\",\"cityCode\":\"5305\",\"provinceCode\":\"53\"},{\"code\":\"530602\",\"name\":\"昭阳区\",\"cityCode\":\"5306\",\"provinceCode\":\"53\"},{\"code\":\"530621\",\"name\":\"鲁甸县\",\"cityCode\":\"5306\",\"provinceCode\":\"53\"},{\"code\":\"530622\",\"name\":\"巧家县\",\"cityCode\":\"5306\",\"provinceCode\":\"53\"},{\"code\":\"530623\",\"name\":\"盐津县\",\"cityCode\":\"5306\",\"provinceCode\":\"53\"},{\"code\":\"530624\",\"name\":\"大关县\",\"cityCode\":\"5306\",\"provinceCode\":\"53\"},{\"code\":\"530625\",\"name\":\"永善县\",\"cityCode\":\"5306\",\"provinceCode\":\"53\"},{\"code\":\"530626\",\"name\":\"绥江县\",\"cityCode\":\"5306\",\"provinceCode\":\"53\"},{\"code\":\"530627\",\"name\":\"镇雄县\",\"cityCode\":\"5306\",\"provinceCode\":\"53\"},{\"code\":\"530628\",\"name\":\"彝良县\",\"cityCode\":\"5306\",\"provinceCode\":\"53\"},{\"code\":\"530629\",\"name\":\"威信县\",\"cityCode\":\"5306\",\"provinceCode\":\"53\"},{\"code\":\"530630\",\"name\":\"水富县\",\"cityCode\":\"5306\",\"provinceCode\":\"53\"},{\"code\":\"530702\",\"name\":\"古城区\",\"cityCode\":\"5307\",\"provinceCode\":\"53\"},{\"code\":\"530721\",\"name\":\"玉龙纳西族自治县\",\"cityCode\":\"5307\",\"provinceCode\":\"53\"},{\"code\":\"530722\",\"name\":\"永胜县\",\"cityCode\":\"5307\",\"provinceCode\":\"53\"},{\"code\":\"530723\",\"name\":\"华坪县\",\"cityCode\":\"5307\",\"provinceCode\":\"53\"},{\"code\":\"530724\",\"name\":\"宁蒗彝族自治县\",\"cityCode\":\"5307\",\"provinceCode\":\"53\"},{\"code\":\"530802\",\"name\":\"思茅区\",\"cityCode\":\"5308\",\"provinceCode\":\"53\"},{\"code\":\"530821\",\"name\":\"宁洱哈尼族彝族自治县\",\"cityCode\":\"5308\",\"provinceCode\":\"53\"},{\"code\":\"530822\",\"name\":\"墨江哈尼族自治县\",\"cityCode\":\"5308\",\"provinceCode\":\"53\"},{\"code\":\"530823\",\"name\":\"景东彝族自治县\",\"cityCode\":\"5308\",\"provinceCode\":\"53\"},{\"code\":\"530824\",\"name\":\"景谷傣族彝族自治县\",\"cityCode\":\"5308\",\"provinceCode\":\"53\"},{\"code\":\"530825\",\"name\":\"镇沅彝族哈尼族拉祜族自治县\",\"cityCode\":\"5308\",\"provinceCode\":\"53\"},{\"code\":\"530826\",\"name\":\"江城哈尼族彝族自治县\",\"cityCode\":\"5308\",\"provinceCode\":\"53\"},{\"code\":\"530827\",\"name\":\"孟连傣族拉祜族佤族自治县\",\"cityCode\":\"5308\",\"provinceCode\":\"53\"},{\"code\":\"530828\",\"name\":\"澜沧拉祜族自治县\",\"cityCode\":\"5308\",\"provinceCode\":\"53\"},{\"code\":\"530829\",\"name\":\"西盟佤族自治县\",\"cityCode\":\"5308\",\"provinceCode\":\"53\"},{\"code\":\"530902\",\"name\":\"临翔区\",\"cityCode\":\"5309\",\"provinceCode\":\"53\"},{\"code\":\"530921\",\"name\":\"凤庆县\",\"cityCode\":\"5309\",\"provinceCode\":\"53\"},{\"code\":\"530922\",\"name\":\"云县\",\"cityCode\":\"5309\",\"provinceCode\":\"53\"},{\"code\":\"530923\",\"name\":\"永德县\",\"cityCode\":\"5309\",\"provinceCode\":\"53\"},{\"code\":\"530924\",\"name\":\"镇康县\",\"cityCode\":\"5309\",\"provinceCode\":\"53\"},{\"code\":\"530925\",\"name\":\"双江拉祜族佤族布朗族傣族自治县\",\"cityCode\":\"5309\",\"provinceCode\":\"53\"},{\"code\":\"530926\",\"name\":\"耿马傣族佤族自治县\",\"cityCode\":\"5309\",\"provinceCode\":\"53\"},{\"code\":\"530927\",\"name\":\"沧源佤族自治县\",\"cityCode\":\"5309\",\"provinceCode\":\"53\"},{\"code\":\"532301\",\"name\":\"楚雄市\",\"cityCode\":\"5323\",\"provinceCode\":\"53\"},{\"code\":\"532322\",\"name\":\"双柏县\",\"cityCode\":\"5323\",\"provinceCode\":\"53\"},{\"code\":\"532323\",\"name\":\"牟定县\",\"cityCode\":\"5323\",\"provinceCode\":\"53\"},{\"code\":\"532324\",\"name\":\"南华县\",\"cityCode\":\"5323\",\"provinceCode\":\"53\"},{\"code\":\"532325\",\"name\":\"姚安县\",\"cityCode\":\"5323\",\"provinceCode\":\"53\"},{\"code\":\"532326\",\"name\":\"大姚县\",\"cityCode\":\"5323\",\"provinceCode\":\"53\"},{\"code\":\"532327\",\"name\":\"永仁县\",\"cityCode\":\"5323\",\"provinceCode\":\"53\"},{\"code\":\"532328\",\"name\":\"元谋县\",\"cityCode\":\"5323\",\"provinceCode\":\"53\"},{\"code\":\"532329\",\"name\":\"武定县\",\"cityCode\":\"5323\",\"provinceCode\":\"53\"},{\"code\":\"532331\",\"name\":\"禄丰县\",\"cityCode\":\"5323\",\"provinceCode\":\"53\"},{\"code\":\"532501\",\"name\":\"个旧市\",\"cityCode\":\"5325\",\"provinceCode\":\"53\"},{\"code\":\"532502\",\"name\":\"开远市\",\"cityCode\":\"5325\",\"provinceCode\":\"53\"},{\"code\":\"532503\",\"name\":\"蒙自市\",\"cityCode\":\"5325\",\"provinceCode\":\"53\"},{\"code\":\"532504\",\"name\":\"弥勒市\",\"cityCode\":\"5325\",\"provinceCode\":\"53\"},{\"code\":\"532523\",\"name\":\"屏边苗族自治县\",\"cityCode\":\"5325\",\"provinceCode\":\"53\"},{\"code\":\"532524\",\"name\":\"建水县\",\"cityCode\":\"5325\",\"provinceCode\":\"53\"},{\"code\":\"532525\",\"name\":\"石屏县\",\"cityCode\":\"5325\",\"provinceCode\":\"53\"},{\"code\":\"532527\",\"name\":\"泸西县\",\"cityCode\":\"5325\",\"provinceCode\":\"53\"},{\"code\":\"532528\",\"name\":\"元阳县\",\"cityCode\":\"5325\",\"provinceCode\":\"53\"},{\"code\":\"532529\",\"name\":\"红河县\",\"cityCode\":\"5325\",\"provinceCode\":\"53\"},{\"code\":\"532530\",\"name\":\"金平苗族瑶族傣族自治县\",\"cityCode\":\"5325\",\"provinceCode\":\"53\"},{\"code\":\"532531\",\"name\":\"绿春县\",\"cityCode\":\"5325\",\"provinceCode\":\"53\"},{\"code\":\"532532\",\"name\":\"河口瑶族自治县\",\"cityCode\":\"5325\",\"provinceCode\":\"53\"},{\"code\":\"532601\",\"name\":\"文山市\",\"cityCode\":\"5326\",\"provinceCode\":\"53\"},{\"code\":\"532622\",\"name\":\"砚山县\",\"cityCode\":\"5326\",\"provinceCode\":\"53\"},{\"code\":\"532623\",\"name\":\"西畴县\",\"cityCode\":\"5326\",\"provinceCode\":\"53\"},{\"code\":\"532624\",\"name\":\"麻栗坡县\",\"cityCode\":\"5326\",\"provinceCode\":\"53\"},{\"code\":\"532625\",\"name\":\"马关县\",\"cityCode\":\"5326\",\"provinceCode\":\"53\"},{\"code\":\"532626\",\"name\":\"丘北县\",\"cityCode\":\"5326\",\"provinceCode\":\"53\"},{\"code\":\"532627\",\"name\":\"广南县\",\"cityCode\":\"5326\",\"provinceCode\":\"53\"},{\"code\":\"532628\",\"name\":\"富宁县\",\"cityCode\":\"5326\",\"provinceCode\":\"53\"},{\"code\":\"532801\",\"name\":\"景洪市\",\"cityCode\":\"5328\",\"provinceCode\":\"53\"},{\"code\":\"532822\",\"name\":\"勐海县\",\"cityCode\":\"5328\",\"provinceCode\":\"53\"},{\"code\":\"532823\",\"name\":\"勐腊县\",\"cityCode\":\"5328\",\"provinceCode\":\"53\"},{\"code\":\"532901\",\"name\":\"大理市\",\"cityCode\":\"5329\",\"provinceCode\":\"53\"},{\"code\":\"532922\",\"name\":\"漾濞彝族自治县\",\"cityCode\":\"5329\",\"provinceCode\":\"53\"},{\"code\":\"532923\",\"name\":\"祥云县\",\"cityCode\":\"5329\",\"provinceCode\":\"53\"},{\"code\":\"532924\",\"name\":\"宾川县\",\"cityCode\":\"5329\",\"provinceCode\":\"53\"},{\"code\":\"532925\",\"name\":\"弥渡县\",\"cityCode\":\"5329\",\"provinceCode\":\"53\"},{\"code\":\"532926\",\"name\":\"南涧彝族自治县\",\"cityCode\":\"5329\",\"provinceCode\":\"53\"},{\"code\":\"532927\",\"name\":\"巍山彝族回族自治县\",\"cityCode\":\"5329\",\"provinceCode\":\"53\"},{\"code\":\"532928\",\"name\":\"永平县\",\"cityCode\":\"5329\",\"provinceCode\":\"53\"},{\"code\":\"532929\",\"name\":\"云龙县\",\"cityCode\":\"5329\",\"provinceCode\":\"53\"},{\"code\":\"532930\",\"name\":\"洱源县\",\"cityCode\":\"5329\",\"provinceCode\":\"53\"},{\"code\":\"532931\",\"name\":\"剑川县\",\"cityCode\":\"5329\",\"provinceCode\":\"53\"},{\"code\":\"532932\",\"name\":\"鹤庆县\",\"cityCode\":\"5329\",\"provinceCode\":\"53\"},{\"code\":\"533102\",\"name\":\"瑞丽市\",\"cityCode\":\"5331\",\"provinceCode\":\"53\"},{\"code\":\"533103\",\"name\":\"芒市\",\"cityCode\":\"5331\",\"provinceCode\":\"53\"},{\"code\":\"533122\",\"name\":\"梁河县\",\"cityCode\":\"5331\",\"provinceCode\":\"53\"},{\"code\":\"533123\",\"name\":\"盈江县\",\"cityCode\":\"5331\",\"provinceCode\":\"53\"},{\"code\":\"533124\",\"name\":\"陇川县\",\"cityCode\":\"5331\",\"provinceCode\":\"53\"},{\"code\":\"533301\",\"name\":\"泸水市\",\"cityCode\":\"5333\",\"provinceCode\":\"53\"},{\"code\":\"533323\",\"name\":\"福贡县\",\"cityCode\":\"5333\",\"provinceCode\":\"53\"},{\"code\":\"533324\",\"name\":\"贡山独龙族怒族自治县\",\"cityCode\":\"5333\",\"provinceCode\":\"53\"},{\"code\":\"533325\",\"name\":\"兰坪白族普米族自治县\",\"cityCode\":\"5333\",\"provinceCode\":\"53\"},{\"code\":\"533401\",\"name\":\"香格里拉市\",\"cityCode\":\"5334\",\"provinceCode\":\"53\"},{\"code\":\"533422\",\"name\":\"德钦县\",\"cityCode\":\"5334\",\"provinceCode\":\"53\"},{\"code\":\"533423\",\"name\":\"维西傈僳族自治县\",\"cityCode\":\"5334\",\"provinceCode\":\"53\"},{\"code\":\"540102\",\"name\":\"城关区\",\"cityCode\":\"5401\",\"provinceCode\":\"54\"},{\"code\":\"540103\",\"name\":\"堆龙德庆区\",\"cityCode\":\"5401\",\"provinceCode\":\"54\"},{\"code\":\"540121\",\"name\":\"林周县\",\"cityCode\":\"5401\",\"provinceCode\":\"54\"},{\"code\":\"540122\",\"name\":\"当雄县\",\"cityCode\":\"5401\",\"provinceCode\":\"54\"},{\"code\":\"540123\",\"name\":\"尼木县\",\"cityCode\":\"5401\",\"provinceCode\":\"54\"},{\"code\":\"540124\",\"name\":\"曲水县\",\"cityCode\":\"5401\",\"provinceCode\":\"54\"},{\"code\":\"540126\",\"name\":\"达孜县\",\"cityCode\":\"5401\",\"provinceCode\":\"54\"},{\"code\":\"540127\",\"name\":\"墨竹工卡县\",\"cityCode\":\"5401\",\"provinceCode\":\"54\"},{\"code\":\"540171\",\"name\":\"格尔木藏青工业园区\",\"cityCode\":\"5401\",\"provinceCode\":\"54\"},{\"code\":\"540172\",\"name\":\"拉萨经济技术开发区\",\"cityCode\":\"5401\",\"provinceCode\":\"54\"},{\"code\":\"540173\",\"name\":\"西藏文化旅游创意园区\",\"cityCode\":\"5401\",\"provinceCode\":\"54\"},{\"code\":\"540174\",\"name\":\"达孜工业园区\",\"cityCode\":\"5401\",\"provinceCode\":\"54\"},{\"code\":\"540202\",\"name\":\"桑珠孜区\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540221\",\"name\":\"南木林县\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540222\",\"name\":\"江孜县\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540223\",\"name\":\"定日县\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540224\",\"name\":\"萨迦县\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540225\",\"name\":\"拉孜县\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540226\",\"name\":\"昂仁县\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540227\",\"name\":\"谢通门县\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540228\",\"name\":\"白朗县\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540229\",\"name\":\"仁布县\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540230\",\"name\":\"康马县\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540231\",\"name\":\"定结县\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540232\",\"name\":\"仲巴县\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540233\",\"name\":\"亚东县\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540234\",\"name\":\"吉隆县\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540235\",\"name\":\"聂拉木县\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540236\",\"name\":\"萨嘎县\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540237\",\"name\":\"岗巴县\",\"cityCode\":\"5402\",\"provinceCode\":\"54\"},{\"code\":\"540302\",\"name\":\"卡若区\",\"cityCode\":\"5403\",\"provinceCode\":\"54\"},{\"code\":\"540321\",\"name\":\"江达县\",\"cityCode\":\"5403\",\"provinceCode\":\"54\"},{\"code\":\"540322\",\"name\":\"贡觉县\",\"cityCode\":\"5403\",\"provinceCode\":\"54\"},{\"code\":\"540323\",\"name\":\"类乌齐县\",\"cityCode\":\"5403\",\"provinceCode\":\"54\"},{\"code\":\"540324\",\"name\":\"丁青县\",\"cityCode\":\"5403\",\"provinceCode\":\"54\"},{\"code\":\"540325\",\"name\":\"察雅县\",\"cityCode\":\"5403\",\"provinceCode\":\"54\"},{\"code\":\"540326\",\"name\":\"八宿县\",\"cityCode\":\"5403\",\"provinceCode\":\"54\"},{\"code\":\"540327\",\"name\":\"左贡县\",\"cityCode\":\"5403\",\"provinceCode\":\"54\"},{\"code\":\"540328\",\"name\":\"芒康县\",\"cityCode\":\"5403\",\"provinceCode\":\"54\"},{\"code\":\"540329\",\"name\":\"洛隆县\",\"cityCode\":\"5403\",\"provinceCode\":\"54\"},{\"code\":\"540330\",\"name\":\"边坝县\",\"cityCode\":\"5403\",\"provinceCode\":\"54\"},{\"code\":\"540402\",\"name\":\"巴宜区\",\"cityCode\":\"5404\",\"provinceCode\":\"54\"},{\"code\":\"540421\",\"name\":\"工布江达县\",\"cityCode\":\"5404\",\"provinceCode\":\"54\"},{\"code\":\"540422\",\"name\":\"米林县\",\"cityCode\":\"5404\",\"provinceCode\":\"54\"},{\"code\":\"540423\",\"name\":\"墨脱县\",\"cityCode\":\"5404\",\"provinceCode\":\"54\"},{\"code\":\"540424\",\"name\":\"波密县\",\"cityCode\":\"5404\",\"provinceCode\":\"54\"},{\"code\":\"540425\",\"name\":\"察隅县\",\"cityCode\":\"5404\",\"provinceCode\":\"54\"},{\"code\":\"540426\",\"name\":\"朗县\",\"cityCode\":\"5404\",\"provinceCode\":\"54\"},{\"code\":\"540502\",\"name\":\"乃东区\",\"cityCode\":\"5405\",\"provinceCode\":\"54\"},{\"code\":\"540521\",\"name\":\"扎囊县\",\"cityCode\":\"5405\",\"provinceCode\":\"54\"},{\"code\":\"540522\",\"name\":\"贡嘎县\",\"cityCode\":\"5405\",\"provinceCode\":\"54\"},{\"code\":\"540523\",\"name\":\"桑日县\",\"cityCode\":\"5405\",\"provinceCode\":\"54\"},{\"code\":\"540524\",\"name\":\"琼结县\",\"cityCode\":\"5405\",\"provinceCode\":\"54\"},{\"code\":\"540525\",\"name\":\"曲松县\",\"cityCode\":\"5405\",\"provinceCode\":\"54\"},{\"code\":\"540526\",\"name\":\"措美县\",\"cityCode\":\"5405\",\"provinceCode\":\"54\"},{\"code\":\"540527\",\"name\":\"洛扎县\",\"cityCode\":\"5405\",\"provinceCode\":\"54\"},{\"code\":\"540528\",\"name\":\"加查县\",\"cityCode\":\"5405\",\"provinceCode\":\"54\"},{\"code\":\"540529\",\"name\":\"隆子县\",\"cityCode\":\"5405\",\"provinceCode\":\"54\"},{\"code\":\"540530\",\"name\":\"错那县\",\"cityCode\":\"5405\",\"provinceCode\":\"54\"},{\"code\":\"540531\",\"name\":\"浪卡子县\",\"cityCode\":\"5405\",\"provinceCode\":\"54\"},{\"code\":\"542421\",\"name\":\"那曲县\",\"cityCode\":\"5424\",\"provinceCode\":\"54\"},{\"code\":\"542422\",\"name\":\"嘉黎县\",\"cityCode\":\"5424\",\"provinceCode\":\"54\"},{\"code\":\"542423\",\"name\":\"比如县\",\"cityCode\":\"5424\",\"provinceCode\":\"54\"},{\"code\":\"542424\",\"name\":\"聂荣县\",\"cityCode\":\"5424\",\"provinceCode\":\"54\"},{\"code\":\"542425\",\"name\":\"安多县\",\"cityCode\":\"5424\",\"provinceCode\":\"54\"},{\"code\":\"542426\",\"name\":\"申扎县\",\"cityCode\":\"5424\",\"provinceCode\":\"54\"},{\"code\":\"542427\",\"name\":\"索县\",\"cityCode\":\"5424\",\"provinceCode\":\"54\"},{\"code\":\"542428\",\"name\":\"班戈县\",\"cityCode\":\"5424\",\"provinceCode\":\"54\"},{\"code\":\"542429\",\"name\":\"巴青县\",\"cityCode\":\"5424\",\"provinceCode\":\"54\"},{\"code\":\"542430\",\"name\":\"尼玛县\",\"cityCode\":\"5424\",\"provinceCode\":\"54\"},{\"code\":\"542431\",\"name\":\"双湖县\",\"cityCode\":\"5424\",\"provinceCode\":\"54\"},{\"code\":\"542521\",\"name\":\"普兰县\",\"cityCode\":\"5425\",\"provinceCode\":\"54\"},{\"code\":\"542522\",\"name\":\"札达县\",\"cityCode\":\"5425\",\"provinceCode\":\"54\"},{\"code\":\"542523\",\"name\":\"噶尔县\",\"cityCode\":\"5425\",\"provinceCode\":\"54\"},{\"code\":\"542524\",\"name\":\"日土县\",\"cityCode\":\"5425\",\"provinceCode\":\"54\"},{\"code\":\"542525\",\"name\":\"革吉县\",\"cityCode\":\"5425\",\"provinceCode\":\"54\"},{\"code\":\"542526\",\"name\":\"改则县\",\"cityCode\":\"5425\",\"provinceCode\":\"54\"},{\"code\":\"542527\",\"name\":\"措勤县\",\"cityCode\":\"5425\",\"provinceCode\":\"54\"},{\"code\":\"610102\",\"name\":\"新城区\",\"cityCode\":\"6101\",\"provinceCode\":\"61\"},{\"code\":\"610103\",\"name\":\"碑林区\",\"cityCode\":\"6101\",\"provinceCode\":\"61\"},{\"code\":\"610104\",\"name\":\"莲湖区\",\"cityCode\":\"6101\",\"provinceCode\":\"61\"},{\"code\":\"610111\",\"name\":\"灞桥区\",\"cityCode\":\"6101\",\"provinceCode\":\"61\"},{\"code\":\"610112\",\"name\":\"未央区\",\"cityCode\":\"6101\",\"provinceCode\":\"61\"},{\"code\":\"610113\",\"name\":\"雁塔区\",\"cityCode\":\"6101\",\"provinceCode\":\"61\"},{\"code\":\"610114\",\"name\":\"阎良区\",\"cityCode\":\"6101\",\"provinceCode\":\"61\"},{\"code\":\"610115\",\"name\":\"临潼区\",\"cityCode\":\"6101\",\"provinceCode\":\"61\"},{\"code\":\"610116\",\"name\":\"长安区\",\"cityCode\":\"6101\",\"provinceCode\":\"61\"},{\"code\":\"610117\",\"name\":\"高陵区\",\"cityCode\":\"6101\",\"provinceCode\":\"61\"},{\"code\":\"610118\",\"name\":\"鄠邑区\",\"cityCode\":\"6101\",\"provinceCode\":\"61\"},{\"code\":\"610122\",\"name\":\"蓝田县\",\"cityCode\":\"6101\",\"provinceCode\":\"61\"},{\"code\":\"610124\",\"name\":\"周至县\",\"cityCode\":\"6101\",\"provinceCode\":\"61\"},{\"code\":\"610202\",\"name\":\"王益区\",\"cityCode\":\"6102\",\"provinceCode\":\"61\"},{\"code\":\"610203\",\"name\":\"印台区\",\"cityCode\":\"6102\",\"provinceCode\":\"61\"},{\"code\":\"610204\",\"name\":\"耀州区\",\"cityCode\":\"6102\",\"provinceCode\":\"61\"},{\"code\":\"610222\",\"name\":\"宜君县\",\"cityCode\":\"6102\",\"provinceCode\":\"61\"},{\"code\":\"610302\",\"name\":\"渭滨区\",\"cityCode\":\"6103\",\"provinceCode\":\"61\"},{\"code\":\"610303\",\"name\":\"金台区\",\"cityCode\":\"6103\",\"provinceCode\":\"61\"},{\"code\":\"610304\",\"name\":\"陈仓区\",\"cityCode\":\"6103\",\"provinceCode\":\"61\"},{\"code\":\"610322\",\"name\":\"凤翔县\",\"cityCode\":\"6103\",\"provinceCode\":\"61\"},{\"code\":\"610323\",\"name\":\"岐山县\",\"cityCode\":\"6103\",\"provinceCode\":\"61\"},{\"code\":\"610324\",\"name\":\"扶风县\",\"cityCode\":\"6103\",\"provinceCode\":\"61\"},{\"code\":\"610326\",\"name\":\"眉县\",\"cityCode\":\"6103\",\"provinceCode\":\"61\"},{\"code\":\"610327\",\"name\":\"陇县\",\"cityCode\":\"6103\",\"provinceCode\":\"61\"},{\"code\":\"610328\",\"name\":\"千阳县\",\"cityCode\":\"6103\",\"provinceCode\":\"61\"},{\"code\":\"610329\",\"name\":\"麟游县\",\"cityCode\":\"6103\",\"provinceCode\":\"61\"},{\"code\":\"610330\",\"name\":\"凤县\",\"cityCode\":\"6103\",\"provinceCode\":\"61\"},{\"code\":\"610331\",\"name\":\"太白县\",\"cityCode\":\"6103\",\"provinceCode\":\"61\"},{\"code\":\"610402\",\"name\":\"秦都区\",\"cityCode\":\"6104\",\"provinceCode\":\"61\"},{\"code\":\"610403\",\"name\":\"杨陵区\",\"cityCode\":\"6104\",\"provinceCode\":\"61\"},{\"code\":\"610404\",\"name\":\"渭城区\",\"cityCode\":\"6104\",\"provinceCode\":\"61\"},{\"code\":\"610422\",\"name\":\"三原县\",\"cityCode\":\"6104\",\"provinceCode\":\"61\"},{\"code\":\"610423\",\"name\":\"泾阳县\",\"cityCode\":\"6104\",\"provinceCode\":\"61\"},{\"code\":\"610424\",\"name\":\"乾县\",\"cityCode\":\"6104\",\"provinceCode\":\"61\"},{\"code\":\"610425\",\"name\":\"礼泉县\",\"cityCode\":\"6104\",\"provinceCode\":\"61\"},{\"code\":\"610426\",\"name\":\"永寿县\",\"cityCode\":\"6104\",\"provinceCode\":\"61\"},{\"code\":\"610427\",\"name\":\"彬县\",\"cityCode\":\"6104\",\"provinceCode\":\"61\"},{\"code\":\"610428\",\"name\":\"长武县\",\"cityCode\":\"6104\",\"provinceCode\":\"61\"},{\"code\":\"610429\",\"name\":\"旬邑县\",\"cityCode\":\"6104\",\"provinceCode\":\"61\"},{\"code\":\"610430\",\"name\":\"淳化县\",\"cityCode\":\"6104\",\"provinceCode\":\"61\"},{\"code\":\"610431\",\"name\":\"武功县\",\"cityCode\":\"6104\",\"provinceCode\":\"61\"},{\"code\":\"610481\",\"name\":\"兴平市\",\"cityCode\":\"6104\",\"provinceCode\":\"61\"},{\"code\":\"610502\",\"name\":\"临渭区\",\"cityCode\":\"6105\",\"provinceCode\":\"61\"},{\"code\":\"610503\",\"name\":\"华州区\",\"cityCode\":\"6105\",\"provinceCode\":\"61\"},{\"code\":\"610522\",\"name\":\"潼关县\",\"cityCode\":\"6105\",\"provinceCode\":\"61\"},{\"code\":\"610523\",\"name\":\"大荔县\",\"cityCode\":\"6105\",\"provinceCode\":\"61\"},{\"code\":\"610524\",\"name\":\"合阳县\",\"cityCode\":\"6105\",\"provinceCode\":\"61\"},{\"code\":\"610525\",\"name\":\"澄城县\",\"cityCode\":\"6105\",\"provinceCode\":\"61\"},{\"code\":\"610526\",\"name\":\"蒲城县\",\"cityCode\":\"6105\",\"provinceCode\":\"61\"},{\"code\":\"610527\",\"name\":\"白水县\",\"cityCode\":\"6105\",\"provinceCode\":\"61\"},{\"code\":\"610528\",\"name\":\"富平县\",\"cityCode\":\"6105\",\"provinceCode\":\"61\"},{\"code\":\"610581\",\"name\":\"韩城市\",\"cityCode\":\"6105\",\"provinceCode\":\"61\"},{\"code\":\"610582\",\"name\":\"华阴市\",\"cityCode\":\"6105\",\"provinceCode\":\"61\"},{\"code\":\"610602\",\"name\":\"宝塔区\",\"cityCode\":\"6106\",\"provinceCode\":\"61\"},{\"code\":\"610603\",\"name\":\"安塞区\",\"cityCode\":\"6106\",\"provinceCode\":\"61\"},{\"code\":\"610621\",\"name\":\"延长县\",\"cityCode\":\"6106\",\"provinceCode\":\"61\"},{\"code\":\"610622\",\"name\":\"延川县\",\"cityCode\":\"6106\",\"provinceCode\":\"61\"},{\"code\":\"610623\",\"name\":\"子长县\",\"cityCode\":\"6106\",\"provinceCode\":\"61\"},{\"code\":\"610625\",\"name\":\"志丹县\",\"cityCode\":\"6106\",\"provinceCode\":\"61\"},{\"code\":\"610626\",\"name\":\"吴起县\",\"cityCode\":\"6106\",\"provinceCode\":\"61\"},{\"code\":\"610627\",\"name\":\"甘泉县\",\"cityCode\":\"6106\",\"provinceCode\":\"61\"},{\"code\":\"610628\",\"name\":\"富县\",\"cityCode\":\"6106\",\"provinceCode\":\"61\"},{\"code\":\"610629\",\"name\":\"洛川县\",\"cityCode\":\"6106\",\"provinceCode\":\"61\"},{\"code\":\"610630\",\"name\":\"宜川县\",\"cityCode\":\"6106\",\"provinceCode\":\"61\"},{\"code\":\"610631\",\"name\":\"黄龙县\",\"cityCode\":\"6106\",\"provinceCode\":\"61\"},{\"code\":\"610632\",\"name\":\"黄陵县\",\"cityCode\":\"6106\",\"provinceCode\":\"61\"},{\"code\":\"610702\",\"name\":\"汉台区\",\"cityCode\":\"6107\",\"provinceCode\":\"61\"},{\"code\":\"610703\",\"name\":\"南郑区\",\"cityCode\":\"6107\",\"provinceCode\":\"61\"},{\"code\":\"610722\",\"name\":\"城固县\",\"cityCode\":\"6107\",\"provinceCode\":\"61\"},{\"code\":\"610723\",\"name\":\"洋县\",\"cityCode\":\"6107\",\"provinceCode\":\"61\"},{\"code\":\"610724\",\"name\":\"西乡县\",\"cityCode\":\"6107\",\"provinceCode\":\"61\"},{\"code\":\"610725\",\"name\":\"勉县\",\"cityCode\":\"6107\",\"provinceCode\":\"61\"},{\"code\":\"610726\",\"name\":\"宁强县\",\"cityCode\":\"6107\",\"provinceCode\":\"61\"},{\"code\":\"610727\",\"name\":\"略阳县\",\"cityCode\":\"6107\",\"provinceCode\":\"61\"},{\"code\":\"610728\",\"name\":\"镇巴县\",\"cityCode\":\"6107\",\"provinceCode\":\"61\"},{\"code\":\"610729\",\"name\":\"留坝县\",\"cityCode\":\"6107\",\"provinceCode\":\"61\"},{\"code\":\"610730\",\"name\":\"佛坪县\",\"cityCode\":\"6107\",\"provinceCode\":\"61\"},{\"code\":\"610802\",\"name\":\"榆阳区\",\"cityCode\":\"6108\",\"provinceCode\":\"61\"},{\"code\":\"610803\",\"name\":\"横山区\",\"cityCode\":\"6108\",\"provinceCode\":\"61\"},{\"code\":\"610822\",\"name\":\"府谷县\",\"cityCode\":\"6108\",\"provinceCode\":\"61\"},{\"code\":\"610824\",\"name\":\"靖边县\",\"cityCode\":\"6108\",\"provinceCode\":\"61\"},{\"code\":\"610825\",\"name\":\"定边县\",\"cityCode\":\"6108\",\"provinceCode\":\"61\"},{\"code\":\"610826\",\"name\":\"绥德县\",\"cityCode\":\"6108\",\"provinceCode\":\"61\"},{\"code\":\"610827\",\"name\":\"米脂县\",\"cityCode\":\"6108\",\"provinceCode\":\"61\"},{\"code\":\"610828\",\"name\":\"佳县\",\"cityCode\":\"6108\",\"provinceCode\":\"61\"},{\"code\":\"610829\",\"name\":\"吴堡县\",\"cityCode\":\"6108\",\"provinceCode\":\"61\"},{\"code\":\"610830\",\"name\":\"清涧县\",\"cityCode\":\"6108\",\"provinceCode\":\"61\"},{\"code\":\"610831\",\"name\":\"子洲县\",\"cityCode\":\"6108\",\"provinceCode\":\"61\"},{\"code\":\"610881\",\"name\":\"神木市\",\"cityCode\":\"6108\",\"provinceCode\":\"61\"},{\"code\":\"610902\",\"name\":\"汉滨区\",\"cityCode\":\"6109\",\"provinceCode\":\"61\"},{\"code\":\"610921\",\"name\":\"汉阴县\",\"cityCode\":\"6109\",\"provinceCode\":\"61\"},{\"code\":\"610922\",\"name\":\"石泉县\",\"cityCode\":\"6109\",\"provinceCode\":\"61\"},{\"code\":\"610923\",\"name\":\"宁陕县\",\"cityCode\":\"6109\",\"provinceCode\":\"61\"},{\"code\":\"610924\",\"name\":\"紫阳县\",\"cityCode\":\"6109\",\"provinceCode\":\"61\"},{\"code\":\"610925\",\"name\":\"岚皋县\",\"cityCode\":\"6109\",\"provinceCode\":\"61\"},{\"code\":\"610926\",\"name\":\"平利县\",\"cityCode\":\"6109\",\"provinceCode\":\"61\"},{\"code\":\"610927\",\"name\":\"镇坪县\",\"cityCode\":\"6109\",\"provinceCode\":\"61\"},{\"code\":\"610928\",\"name\":\"旬阳县\",\"cityCode\":\"6109\",\"provinceCode\":\"61\"},{\"code\":\"610929\",\"name\":\"白河县\",\"cityCode\":\"6109\",\"provinceCode\":\"61\"},{\"code\":\"611002\",\"name\":\"商州区\",\"cityCode\":\"6110\",\"provinceCode\":\"61\"},{\"code\":\"611021\",\"name\":\"洛南县\",\"cityCode\":\"6110\",\"provinceCode\":\"61\"},{\"code\":\"611022\",\"name\":\"丹凤县\",\"cityCode\":\"6110\",\"provinceCode\":\"61\"},{\"code\":\"611023\",\"name\":\"商南县\",\"cityCode\":\"6110\",\"provinceCode\":\"61\"},{\"code\":\"611024\",\"name\":\"山阳县\",\"cityCode\":\"6110\",\"provinceCode\":\"61\"},{\"code\":\"611025\",\"name\":\"镇安县\",\"cityCode\":\"6110\",\"provinceCode\":\"61\"},{\"code\":\"611026\",\"name\":\"柞水县\",\"cityCode\":\"6110\",\"provinceCode\":\"61\"},{\"code\":\"620102\",\"name\":\"城关区\",\"cityCode\":\"6201\",\"provinceCode\":\"62\"},{\"code\":\"620103\",\"name\":\"七里河区\",\"cityCode\":\"6201\",\"provinceCode\":\"62\"},{\"code\":\"620104\",\"name\":\"西固区\",\"cityCode\":\"6201\",\"provinceCode\":\"62\"},{\"code\":\"620105\",\"name\":\"安宁区\",\"cityCode\":\"6201\",\"provinceCode\":\"62\"},{\"code\":\"620111\",\"name\":\"红古区\",\"cityCode\":\"6201\",\"provinceCode\":\"62\"},{\"code\":\"620121\",\"name\":\"永登县\",\"cityCode\":\"6201\",\"provinceCode\":\"62\"},{\"code\":\"620122\",\"name\":\"皋兰县\",\"cityCode\":\"6201\",\"provinceCode\":\"62\"},{\"code\":\"620123\",\"name\":\"榆中县\",\"cityCode\":\"6201\",\"provinceCode\":\"62\"},{\"code\":\"620171\",\"name\":\"兰州新区\",\"cityCode\":\"6201\",\"provinceCode\":\"62\"},{\"code\":\"620201\",\"name\":\"嘉峪关市\",\"cityCode\":\"6202\",\"provinceCode\":\"62\"},{\"code\":\"620302\",\"name\":\"金川区\",\"cityCode\":\"6203\",\"provinceCode\":\"62\"},{\"code\":\"620321\",\"name\":\"永昌县\",\"cityCode\":\"6203\",\"provinceCode\":\"62\"},{\"code\":\"620402\",\"name\":\"白银区\",\"cityCode\":\"6204\",\"provinceCode\":\"62\"},{\"code\":\"620403\",\"name\":\"平川区\",\"cityCode\":\"6204\",\"provinceCode\":\"62\"},{\"code\":\"620421\",\"name\":\"靖远县\",\"cityCode\":\"6204\",\"provinceCode\":\"62\"},{\"code\":\"620422\",\"name\":\"会宁县\",\"cityCode\":\"6204\",\"provinceCode\":\"62\"},{\"code\":\"620423\",\"name\":\"景泰县\",\"cityCode\":\"6204\",\"provinceCode\":\"62\"},{\"code\":\"620502\",\"name\":\"秦州区\",\"cityCode\":\"6205\",\"provinceCode\":\"62\"},{\"code\":\"620503\",\"name\":\"麦积区\",\"cityCode\":\"6205\",\"provinceCode\":\"62\"},{\"code\":\"620521\",\"name\":\"清水县\",\"cityCode\":\"6205\",\"provinceCode\":\"62\"},{\"code\":\"620522\",\"name\":\"秦安县\",\"cityCode\":\"6205\",\"provinceCode\":\"62\"},{\"code\":\"620523\",\"name\":\"甘谷县\",\"cityCode\":\"6205\",\"provinceCode\":\"62\"},{\"code\":\"620524\",\"name\":\"武山县\",\"cityCode\":\"6205\",\"provinceCode\":\"62\"},{\"code\":\"620525\",\"name\":\"张家川回族自治县\",\"cityCode\":\"6205\",\"provinceCode\":\"62\"},{\"code\":\"620602\",\"name\":\"凉州区\",\"cityCode\":\"6206\",\"provinceCode\":\"62\"},{\"code\":\"620621\",\"name\":\"民勤县\",\"cityCode\":\"6206\",\"provinceCode\":\"62\"},{\"code\":\"620622\",\"name\":\"古浪县\",\"cityCode\":\"6206\",\"provinceCode\":\"62\"},{\"code\":\"620623\",\"name\":\"天祝藏族自治县\",\"cityCode\":\"6206\",\"provinceCode\":\"62\"},{\"code\":\"620702\",\"name\":\"甘州区\",\"cityCode\":\"6207\",\"provinceCode\":\"62\"},{\"code\":\"620721\",\"name\":\"肃南裕固族自治县\",\"cityCode\":\"6207\",\"provinceCode\":\"62\"},{\"code\":\"620722\",\"name\":\"民乐县\",\"cityCode\":\"6207\",\"provinceCode\":\"62\"},{\"code\":\"620723\",\"name\":\"临泽县\",\"cityCode\":\"6207\",\"provinceCode\":\"62\"},{\"code\":\"620724\",\"name\":\"高台县\",\"cityCode\":\"6207\",\"provinceCode\":\"62\"},{\"code\":\"620725\",\"name\":\"山丹县\",\"cityCode\":\"6207\",\"provinceCode\":\"62\"},{\"code\":\"620802\",\"name\":\"崆峒区\",\"cityCode\":\"6208\",\"provinceCode\":\"62\"},{\"code\":\"620821\",\"name\":\"泾川县\",\"cityCode\":\"6208\",\"provinceCode\":\"62\"},{\"code\":\"620822\",\"name\":\"灵台县\",\"cityCode\":\"6208\",\"provinceCode\":\"62\"},{\"code\":\"620823\",\"name\":\"崇信县\",\"cityCode\":\"6208\",\"provinceCode\":\"62\"},{\"code\":\"620824\",\"name\":\"华亭县\",\"cityCode\":\"6208\",\"provinceCode\":\"62\"},{\"code\":\"620825\",\"name\":\"庄浪县\",\"cityCode\":\"6208\",\"provinceCode\":\"62\"},{\"code\":\"620826\",\"name\":\"静宁县\",\"cityCode\":\"6208\",\"provinceCode\":\"62\"},{\"code\":\"620871\",\"name\":\"平凉工业园区\",\"cityCode\":\"6208\",\"provinceCode\":\"62\"},{\"code\":\"620902\",\"name\":\"肃州区\",\"cityCode\":\"6209\",\"provinceCode\":\"62\"},{\"code\":\"620921\",\"name\":\"金塔县\",\"cityCode\":\"6209\",\"provinceCode\":\"62\"},{\"code\":\"620922\",\"name\":\"瓜州县\",\"cityCode\":\"6209\",\"provinceCode\":\"62\"},{\"code\":\"620923\",\"name\":\"肃北蒙古族自治县\",\"cityCode\":\"6209\",\"provinceCode\":\"62\"},{\"code\":\"620924\",\"name\":\"阿克塞哈萨克族自治县\",\"cityCode\":\"6209\",\"provinceCode\":\"62\"},{\"code\":\"620981\",\"name\":\"玉门市\",\"cityCode\":\"6209\",\"provinceCode\":\"62\"},{\"code\":\"620982\",\"name\":\"敦煌市\",\"cityCode\":\"6209\",\"provinceCode\":\"62\"},{\"code\":\"621002\",\"name\":\"西峰区\",\"cityCode\":\"6210\",\"provinceCode\":\"62\"},{\"code\":\"621021\",\"name\":\"庆城县\",\"cityCode\":\"6210\",\"provinceCode\":\"62\"},{\"code\":\"621022\",\"name\":\"环县\",\"cityCode\":\"6210\",\"provinceCode\":\"62\"},{\"code\":\"621023\",\"name\":\"华池县\",\"cityCode\":\"6210\",\"provinceCode\":\"62\"},{\"code\":\"621024\",\"name\":\"合水县\",\"cityCode\":\"6210\",\"provinceCode\":\"62\"},{\"code\":\"621025\",\"name\":\"正宁县\",\"cityCode\":\"6210\",\"provinceCode\":\"62\"},{\"code\":\"621026\",\"name\":\"宁县\",\"cityCode\":\"6210\",\"provinceCode\":\"62\"},{\"code\":\"621027\",\"name\":\"镇原县\",\"cityCode\":\"6210\",\"provinceCode\":\"62\"},{\"code\":\"621102\",\"name\":\"安定区\",\"cityCode\":\"6211\",\"provinceCode\":\"62\"},{\"code\":\"621121\",\"name\":\"通渭县\",\"cityCode\":\"6211\",\"provinceCode\":\"62\"},{\"code\":\"621122\",\"name\":\"陇西县\",\"cityCode\":\"6211\",\"provinceCode\":\"62\"},{\"code\":\"621123\",\"name\":\"渭源县\",\"cityCode\":\"6211\",\"provinceCode\":\"62\"},{\"code\":\"621124\",\"name\":\"临洮县\",\"cityCode\":\"6211\",\"provinceCode\":\"62\"},{\"code\":\"621125\",\"name\":\"漳县\",\"cityCode\":\"6211\",\"provinceCode\":\"62\"},{\"code\":\"621126\",\"name\":\"岷县\",\"cityCode\":\"6211\",\"provinceCode\":\"62\"},{\"code\":\"621202\",\"name\":\"武都区\",\"cityCode\":\"6212\",\"provinceCode\":\"62\"},{\"code\":\"621221\",\"name\":\"成县\",\"cityCode\":\"6212\",\"provinceCode\":\"62\"},{\"code\":\"621222\",\"name\":\"文县\",\"cityCode\":\"6212\",\"provinceCode\":\"62\"},{\"code\":\"621223\",\"name\":\"宕昌县\",\"cityCode\":\"6212\",\"provinceCode\":\"62\"},{\"code\":\"621224\",\"name\":\"康县\",\"cityCode\":\"6212\",\"provinceCode\":\"62\"},{\"code\":\"621225\",\"name\":\"西和县\",\"cityCode\":\"6212\",\"provinceCode\":\"62\"},{\"code\":\"621226\",\"name\":\"礼县\",\"cityCode\":\"6212\",\"provinceCode\":\"62\"},{\"code\":\"621227\",\"name\":\"徽县\",\"cityCode\":\"6212\",\"provinceCode\":\"62\"},{\"code\":\"621228\",\"name\":\"两当县\",\"cityCode\":\"6212\",\"provinceCode\":\"62\"},{\"code\":\"622901\",\"name\":\"临夏市\",\"cityCode\":\"6229\",\"provinceCode\":\"62\"},{\"code\":\"622921\",\"name\":\"临夏县\",\"cityCode\":\"6229\",\"provinceCode\":\"62\"},{\"code\":\"622922\",\"name\":\"康乐县\",\"cityCode\":\"6229\",\"provinceCode\":\"62\"},{\"code\":\"622923\",\"name\":\"永靖县\",\"cityCode\":\"6229\",\"provinceCode\":\"62\"},{\"code\":\"622924\",\"name\":\"广河县\",\"cityCode\":\"6229\",\"provinceCode\":\"62\"},{\"code\":\"622925\",\"name\":\"和政县\",\"cityCode\":\"6229\",\"provinceCode\":\"62\"},{\"code\":\"622926\",\"name\":\"东乡族自治县\",\"cityCode\":\"6229\",\"provinceCode\":\"62\"},{\"code\":\"622927\",\"name\":\"积石山保安族东乡族撒拉族自治县\",\"cityCode\":\"6229\",\"provinceCode\":\"62\"},{\"code\":\"623001\",\"name\":\"合作市\",\"cityCode\":\"6230\",\"provinceCode\":\"62\"},{\"code\":\"623021\",\"name\":\"临潭县\",\"cityCode\":\"6230\",\"provinceCode\":\"62\"},{\"code\":\"623022\",\"name\":\"卓尼县\",\"cityCode\":\"6230\",\"provinceCode\":\"62\"},{\"code\":\"623023\",\"name\":\"舟曲县\",\"cityCode\":\"6230\",\"provinceCode\":\"62\"},{\"code\":\"623024\",\"name\":\"迭部县\",\"cityCode\":\"6230\",\"provinceCode\":\"62\"},{\"code\":\"623025\",\"name\":\"玛曲县\",\"cityCode\":\"6230\",\"provinceCode\":\"62\"},{\"code\":\"623026\",\"name\":\"碌曲县\",\"cityCode\":\"6230\",\"provinceCode\":\"62\"},{\"code\":\"623027\",\"name\":\"夏河县\",\"cityCode\":\"6230\",\"provinceCode\":\"62\"},{\"code\":\"630102\",\"name\":\"城东区\",\"cityCode\":\"6301\",\"provinceCode\":\"63\"},{\"code\":\"630103\",\"name\":\"城中区\",\"cityCode\":\"6301\",\"provinceCode\":\"63\"},{\"code\":\"630104\",\"name\":\"城西区\",\"cityCode\":\"6301\",\"provinceCode\":\"63\"},{\"code\":\"630105\",\"name\":\"城北区\",\"cityCode\":\"6301\",\"provinceCode\":\"63\"},{\"code\":\"630121\",\"name\":\"大通回族土族自治县\",\"cityCode\":\"6301\",\"provinceCode\":\"63\"},{\"code\":\"630122\",\"name\":\"湟中县\",\"cityCode\":\"6301\",\"provinceCode\":\"63\"},{\"code\":\"630123\",\"name\":\"湟源县\",\"cityCode\":\"6301\",\"provinceCode\":\"63\"},{\"code\":\"630202\",\"name\":\"乐都区\",\"cityCode\":\"6302\",\"provinceCode\":\"63\"},{\"code\":\"630203\",\"name\":\"平安区\",\"cityCode\":\"6302\",\"provinceCode\":\"63\"},{\"code\":\"630222\",\"name\":\"民和回族土族自治县\",\"cityCode\":\"6302\",\"provinceCode\":\"63\"},{\"code\":\"630223\",\"name\":\"互助土族自治县\",\"cityCode\":\"6302\",\"provinceCode\":\"63\"},{\"code\":\"630224\",\"name\":\"化隆回族自治县\",\"cityCode\":\"6302\",\"provinceCode\":\"63\"},{\"code\":\"630225\",\"name\":\"循化撒拉族自治县\",\"cityCode\":\"6302\",\"provinceCode\":\"63\"},{\"code\":\"632221\",\"name\":\"门源回族自治县\",\"cityCode\":\"6322\",\"provinceCode\":\"63\"},{\"code\":\"632222\",\"name\":\"祁连县\",\"cityCode\":\"6322\",\"provinceCode\":\"63\"},{\"code\":\"632223\",\"name\":\"海晏县\",\"cityCode\":\"6322\",\"provinceCode\":\"63\"},{\"code\":\"632224\",\"name\":\"刚察县\",\"cityCode\":\"6322\",\"provinceCode\":\"63\"},{\"code\":\"632321\",\"name\":\"同仁县\",\"cityCode\":\"6323\",\"provinceCode\":\"63\"},{\"code\":\"632322\",\"name\":\"尖扎县\",\"cityCode\":\"6323\",\"provinceCode\":\"63\"},{\"code\":\"632323\",\"name\":\"泽库县\",\"cityCode\":\"6323\",\"provinceCode\":\"63\"},{\"code\":\"632324\",\"name\":\"河南蒙古族自治县\",\"cityCode\":\"6323\",\"provinceCode\":\"63\"},{\"code\":\"632521\",\"name\":\"共和县\",\"cityCode\":\"6325\",\"provinceCode\":\"63\"},{\"code\":\"632522\",\"name\":\"同德县\",\"cityCode\":\"6325\",\"provinceCode\":\"63\"},{\"code\":\"632523\",\"name\":\"贵德县\",\"cityCode\":\"6325\",\"provinceCode\":\"63\"},{\"code\":\"632524\",\"name\":\"兴海县\",\"cityCode\":\"6325\",\"provinceCode\":\"63\"},{\"code\":\"632525\",\"name\":\"贵南县\",\"cityCode\":\"6325\",\"provinceCode\":\"63\"},{\"code\":\"632621\",\"name\":\"玛沁县\",\"cityCode\":\"6326\",\"provinceCode\":\"63\"},{\"code\":\"632622\",\"name\":\"班玛县\",\"cityCode\":\"6326\",\"provinceCode\":\"63\"},{\"code\":\"632623\",\"name\":\"甘德县\",\"cityCode\":\"6326\",\"provinceCode\":\"63\"},{\"code\":\"632624\",\"name\":\"达日县\",\"cityCode\":\"6326\",\"provinceCode\":\"63\"},{\"code\":\"632625\",\"name\":\"久治县\",\"cityCode\":\"6326\",\"provinceCode\":\"63\"},{\"code\":\"632626\",\"name\":\"玛多县\",\"cityCode\":\"6326\",\"provinceCode\":\"63\"},{\"code\":\"632701\",\"name\":\"玉树市\",\"cityCode\":\"6327\",\"provinceCode\":\"63\"},{\"code\":\"632722\",\"name\":\"杂多县\",\"cityCode\":\"6327\",\"provinceCode\":\"63\"},{\"code\":\"632723\",\"name\":\"称多县\",\"cityCode\":\"6327\",\"provinceCode\":\"63\"},{\"code\":\"632724\",\"name\":\"治多县\",\"cityCode\":\"6327\",\"provinceCode\":\"63\"},{\"code\":\"632725\",\"name\":\"囊谦县\",\"cityCode\":\"6327\",\"provinceCode\":\"63\"},{\"code\":\"632726\",\"name\":\"曲麻莱县\",\"cityCode\":\"6327\",\"provinceCode\":\"63\"},{\"code\":\"632801\",\"name\":\"格尔木市\",\"cityCode\":\"6328\",\"provinceCode\":\"63\"},{\"code\":\"632802\",\"name\":\"德令哈市\",\"cityCode\":\"6328\",\"provinceCode\":\"63\"},{\"code\":\"632821\",\"name\":\"乌兰县\",\"cityCode\":\"6328\",\"provinceCode\":\"63\"},{\"code\":\"632822\",\"name\":\"都兰县\",\"cityCode\":\"6328\",\"provinceCode\":\"63\"},{\"code\":\"632823\",\"name\":\"天峻县\",\"cityCode\":\"6328\",\"provinceCode\":\"63\"},{\"code\":\"632857\",\"name\":\"大柴旦行政委员会\",\"cityCode\":\"6328\",\"provinceCode\":\"63\"},{\"code\":\"632858\",\"name\":\"冷湖行政委员会\",\"cityCode\":\"6328\",\"provinceCode\":\"63\"},{\"code\":\"632859\",\"name\":\"茫崖行政委员会\",\"cityCode\":\"6328\",\"provinceCode\":\"63\"},{\"code\":\"640104\",\"name\":\"兴庆区\",\"cityCode\":\"6401\",\"provinceCode\":\"64\"},{\"code\":\"640105\",\"name\":\"西夏区\",\"cityCode\":\"6401\",\"provinceCode\":\"64\"},{\"code\":\"640106\",\"name\":\"金凤区\",\"cityCode\":\"6401\",\"provinceCode\":\"64\"},{\"code\":\"640121\",\"name\":\"永宁县\",\"cityCode\":\"6401\",\"provinceCode\":\"64\"},{\"code\":\"640122\",\"name\":\"贺兰县\",\"cityCode\":\"6401\",\"provinceCode\":\"64\"},{\"code\":\"640181\",\"name\":\"灵武市\",\"cityCode\":\"6401\",\"provinceCode\":\"64\"},{\"code\":\"640202\",\"name\":\"大武口区\",\"cityCode\":\"6402\",\"provinceCode\":\"64\"},{\"code\":\"640205\",\"name\":\"惠农区\",\"cityCode\":\"6402\",\"provinceCode\":\"64\"},{\"code\":\"640221\",\"name\":\"平罗县\",\"cityCode\":\"6402\",\"provinceCode\":\"64\"},{\"code\":\"640302\",\"name\":\"利通区\",\"cityCode\":\"6403\",\"provinceCode\":\"64\"},{\"code\":\"640303\",\"name\":\"红寺堡区\",\"cityCode\":\"6403\",\"provinceCode\":\"64\"},{\"code\":\"640323\",\"name\":\"盐池县\",\"cityCode\":\"6403\",\"provinceCode\":\"64\"},{\"code\":\"640324\",\"name\":\"同心县\",\"cityCode\":\"6403\",\"provinceCode\":\"64\"},{\"code\":\"640381\",\"name\":\"青铜峡市\",\"cityCode\":\"6403\",\"provinceCode\":\"64\"},{\"code\":\"640402\",\"name\":\"原州区\",\"cityCode\":\"6404\",\"provinceCode\":\"64\"},{\"code\":\"640422\",\"name\":\"西吉县\",\"cityCode\":\"6404\",\"provinceCode\":\"64\"},{\"code\":\"640423\",\"name\":\"隆德县\",\"cityCode\":\"6404\",\"provinceCode\":\"64\"},{\"code\":\"640424\",\"name\":\"泾源县\",\"cityCode\":\"6404\",\"provinceCode\":\"64\"},{\"code\":\"640425\",\"name\":\"彭阳县\",\"cityCode\":\"6404\",\"provinceCode\":\"64\"},{\"code\":\"640502\",\"name\":\"沙坡头区\",\"cityCode\":\"6405\",\"provinceCode\":\"64\"},{\"code\":\"640521\",\"name\":\"中宁县\",\"cityCode\":\"6405\",\"provinceCode\":\"64\"},{\"code\":\"640522\",\"name\":\"海原县\",\"cityCode\":\"6405\",\"provinceCode\":\"64\"},{\"code\":\"650102\",\"name\":\"天山区\",\"cityCode\":\"6501\",\"provinceCode\":\"65\"},{\"code\":\"650103\",\"name\":\"沙依巴克区\",\"cityCode\":\"6501\",\"provinceCode\":\"65\"},{\"code\":\"650104\",\"name\":\"新市区\",\"cityCode\":\"6501\",\"provinceCode\":\"65\"},{\"code\":\"650105\",\"name\":\"水磨沟区\",\"cityCode\":\"6501\",\"provinceCode\":\"65\"},{\"code\":\"650106\",\"name\":\"头屯河区\",\"cityCode\":\"6501\",\"provinceCode\":\"65\"},{\"code\":\"650107\",\"name\":\"达坂城区\",\"cityCode\":\"6501\",\"provinceCode\":\"65\"},{\"code\":\"650109\",\"name\":\"米东区\",\"cityCode\":\"6501\",\"provinceCode\":\"65\"},{\"code\":\"650121\",\"name\":\"乌鲁木齐县\",\"cityCode\":\"6501\",\"provinceCode\":\"65\"},{\"code\":\"650171\",\"name\":\"乌鲁木齐经济技术开发区\",\"cityCode\":\"6501\",\"provinceCode\":\"65\"},{\"code\":\"650172\",\"name\":\"乌鲁木齐高新技术产业开发区\",\"cityCode\":\"6501\",\"provinceCode\":\"65\"},{\"code\":\"650202\",\"name\":\"独山子区\",\"cityCode\":\"6502\",\"provinceCode\":\"65\"},{\"code\":\"650203\",\"name\":\"克拉玛依区\",\"cityCode\":\"6502\",\"provinceCode\":\"65\"},{\"code\":\"650204\",\"name\":\"白碱滩区\",\"cityCode\":\"6502\",\"provinceCode\":\"65\"},{\"code\":\"650205\",\"name\":\"乌尔禾区\",\"cityCode\":\"6502\",\"provinceCode\":\"65\"},{\"code\":\"650402\",\"name\":\"高昌区\",\"cityCode\":\"6504\",\"provinceCode\":\"65\"},{\"code\":\"650421\",\"name\":\"鄯善县\",\"cityCode\":\"6504\",\"provinceCode\":\"65\"},{\"code\":\"650422\",\"name\":\"托克逊县\",\"cityCode\":\"6504\",\"provinceCode\":\"65\"},{\"code\":\"650502\",\"name\":\"伊州区\",\"cityCode\":\"6505\",\"provinceCode\":\"65\"},{\"code\":\"650521\",\"name\":\"巴里坤哈萨克自治县\",\"cityCode\":\"6505\",\"provinceCode\":\"65\"},{\"code\":\"650522\",\"name\":\"伊吾县\",\"cityCode\":\"6505\",\"provinceCode\":\"65\"},{\"code\":\"652301\",\"name\":\"昌吉市\",\"cityCode\":\"6523\",\"provinceCode\":\"65\"},{\"code\":\"652302\",\"name\":\"阜康市\",\"cityCode\":\"6523\",\"provinceCode\":\"65\"},{\"code\":\"652323\",\"name\":\"呼图壁县\",\"cityCode\":\"6523\",\"provinceCode\":\"65\"},{\"code\":\"652324\",\"name\":\"玛纳斯县\",\"cityCode\":\"6523\",\"provinceCode\":\"65\"},{\"code\":\"652325\",\"name\":\"奇台县\",\"cityCode\":\"6523\",\"provinceCode\":\"65\"},{\"code\":\"652327\",\"name\":\"吉木萨尔县\",\"cityCode\":\"6523\",\"provinceCode\":\"65\"},{\"code\":\"652328\",\"name\":\"木垒哈萨克自治县\",\"cityCode\":\"6523\",\"provinceCode\":\"65\"},{\"code\":\"652701\",\"name\":\"博乐市\",\"cityCode\":\"6527\",\"provinceCode\":\"65\"},{\"code\":\"652702\",\"name\":\"阿拉山口市\",\"cityCode\":\"6527\",\"provinceCode\":\"65\"},{\"code\":\"652722\",\"name\":\"精河县\",\"cityCode\":\"6527\",\"provinceCode\":\"65\"},{\"code\":\"652723\",\"name\":\"温泉县\",\"cityCode\":\"6527\",\"provinceCode\":\"65\"},{\"code\":\"652801\",\"name\":\"库尔勒市\",\"cityCode\":\"6528\",\"provinceCode\":\"65\"},{\"code\":\"652822\",\"name\":\"轮台县\",\"cityCode\":\"6528\",\"provinceCode\":\"65\"},{\"code\":\"652823\",\"name\":\"尉犁县\",\"cityCode\":\"6528\",\"provinceCode\":\"65\"},{\"code\":\"652824\",\"name\":\"若羌县\",\"cityCode\":\"6528\",\"provinceCode\":\"65\"},{\"code\":\"652825\",\"name\":\"且末县\",\"cityCode\":\"6528\",\"provinceCode\":\"65\"},{\"code\":\"652826\",\"name\":\"焉耆回族自治县\",\"cityCode\":\"6528\",\"provinceCode\":\"65\"},{\"code\":\"652827\",\"name\":\"和静县\",\"cityCode\":\"6528\",\"provinceCode\":\"65\"},{\"code\":\"652828\",\"name\":\"和硕县\",\"cityCode\":\"6528\",\"provinceCode\":\"65\"},{\"code\":\"652829\",\"name\":\"博湖县\",\"cityCode\":\"6528\",\"provinceCode\":\"65\"},{\"code\":\"652871\",\"name\":\"库尔勒经济技术开发区\",\"cityCode\":\"6528\",\"provinceCode\":\"65\"},{\"code\":\"652901\",\"name\":\"阿克苏市\",\"cityCode\":\"6529\",\"provinceCode\":\"65\"},{\"code\":\"652922\",\"name\":\"温宿县\",\"cityCode\":\"6529\",\"provinceCode\":\"65\"},{\"code\":\"652923\",\"name\":\"库车县\",\"cityCode\":\"6529\",\"provinceCode\":\"65\"},{\"code\":\"652924\",\"name\":\"沙雅县\",\"cityCode\":\"6529\",\"provinceCode\":\"65\"},{\"code\":\"652925\",\"name\":\"新和县\",\"cityCode\":\"6529\",\"provinceCode\":\"65\"},{\"code\":\"652926\",\"name\":\"拜城县\",\"cityCode\":\"6529\",\"provinceCode\":\"65\"},{\"code\":\"652927\",\"name\":\"乌什县\",\"cityCode\":\"6529\",\"provinceCode\":\"65\"},{\"code\":\"652928\",\"name\":\"阿瓦提县\",\"cityCode\":\"6529\",\"provinceCode\":\"65\"},{\"code\":\"652929\",\"name\":\"柯坪县\",\"cityCode\":\"6529\",\"provinceCode\":\"65\"},{\"code\":\"653001\",\"name\":\"阿图什市\",\"cityCode\":\"6530\",\"provinceCode\":\"65\"},{\"code\":\"653022\",\"name\":\"阿克陶县\",\"cityCode\":\"6530\",\"provinceCode\":\"65\"},{\"code\":\"653023\",\"name\":\"阿合奇县\",\"cityCode\":\"6530\",\"provinceCode\":\"65\"},{\"code\":\"653024\",\"name\":\"乌恰县\",\"cityCode\":\"6530\",\"provinceCode\":\"65\"},{\"code\":\"653101\",\"name\":\"喀什市\",\"cityCode\":\"6531\",\"provinceCode\":\"65\"},{\"code\":\"653121\",\"name\":\"疏附县\",\"cityCode\":\"6531\",\"provinceCode\":\"65\"},{\"code\":\"653122\",\"name\":\"疏勒县\",\"cityCode\":\"6531\",\"provinceCode\":\"65\"},{\"code\":\"653123\",\"name\":\"英吉沙县\",\"cityCode\":\"6531\",\"provinceCode\":\"65\"},{\"code\":\"653124\",\"name\":\"泽普县\",\"cityCode\":\"6531\",\"provinceCode\":\"65\"},{\"code\":\"653125\",\"name\":\"莎车县\",\"cityCode\":\"6531\",\"provinceCode\":\"65\"},{\"code\":\"653126\",\"name\":\"叶城县\",\"cityCode\":\"6531\",\"provinceCode\":\"65\"},{\"code\":\"653127\",\"name\":\"麦盖提县\",\"cityCode\":\"6531\",\"provinceCode\":\"65\"},{\"code\":\"653128\",\"name\":\"岳普湖县\",\"cityCode\":\"6531\",\"provinceCode\":\"65\"},{\"code\":\"653129\",\"name\":\"伽师县\",\"cityCode\":\"6531\",\"provinceCode\":\"65\"},{\"code\":\"653130\",\"name\":\"巴楚县\",\"cityCode\":\"6531\",\"provinceCode\":\"65\"},{\"code\":\"653131\",\"name\":\"塔什库尔干塔吉克自治县\",\"cityCode\":\"6531\",\"provinceCode\":\"65\"},{\"code\":\"653201\",\"name\":\"和田市\",\"cityCode\":\"6532\",\"provinceCode\":\"65\"},{\"code\":\"653221\",\"name\":\"和田县\",\"cityCode\":\"6532\",\"provinceCode\":\"65\"},{\"code\":\"653222\",\"name\":\"墨玉县\",\"cityCode\":\"6532\",\"provinceCode\":\"65\"},{\"code\":\"653223\",\"name\":\"皮山县\",\"cityCode\":\"6532\",\"provinceCode\":\"65\"},{\"code\":\"653224\",\"name\":\"洛浦县\",\"cityCode\":\"6532\",\"provinceCode\":\"65\"},{\"code\":\"653225\",\"name\":\"策勒县\",\"cityCode\":\"6532\",\"provinceCode\":\"65\"},{\"code\":\"653226\",\"name\":\"于田县\",\"cityCode\":\"6532\",\"provinceCode\":\"65\"},{\"code\":\"653227\",\"name\":\"民丰县\",\"cityCode\":\"6532\",\"provinceCode\":\"65\"},{\"code\":\"654002\",\"name\":\"伊宁市\",\"cityCode\":\"6540\",\"provinceCode\":\"65\"},{\"code\":\"654003\",\"name\":\"奎屯市\",\"cityCode\":\"6540\",\"provinceCode\":\"65\"},{\"code\":\"654004\",\"name\":\"霍尔果斯市\",\"cityCode\":\"6540\",\"provinceCode\":\"65\"},{\"code\":\"654021\",\"name\":\"伊宁县\",\"cityCode\":\"6540\",\"provinceCode\":\"65\"},{\"code\":\"654022\",\"name\":\"察布查尔锡伯自治县\",\"cityCode\":\"6540\",\"provinceCode\":\"65\"},{\"code\":\"654023\",\"name\":\"霍城县\",\"cityCode\":\"6540\",\"provinceCode\":\"65\"},{\"code\":\"654024\",\"name\":\"巩留县\",\"cityCode\":\"6540\",\"provinceCode\":\"65\"},{\"code\":\"654025\",\"name\":\"新源县\",\"cityCode\":\"6540\",\"provinceCode\":\"65\"},{\"code\":\"654026\",\"name\":\"昭苏县\",\"cityCode\":\"6540\",\"provinceCode\":\"65\"},{\"code\":\"654027\",\"name\":\"特克斯县\",\"cityCode\":\"6540\",\"provinceCode\":\"65\"},{\"code\":\"654028\",\"name\":\"尼勒克县\",\"cityCode\":\"6540\",\"provinceCode\":\"65\"},{\"code\":\"654201\",\"name\":\"塔城市\",\"cityCode\":\"6542\",\"provinceCode\":\"65\"},{\"code\":\"654202\",\"name\":\"乌苏市\",\"cityCode\":\"6542\",\"provinceCode\":\"65\"},{\"code\":\"654221\",\"name\":\"额敏县\",\"cityCode\":\"6542\",\"provinceCode\":\"65\"},{\"code\":\"654223\",\"name\":\"沙湾县\",\"cityCode\":\"6542\",\"provinceCode\":\"65\"},{\"code\":\"654224\",\"name\":\"托里县\",\"cityCode\":\"6542\",\"provinceCode\":\"65\"},{\"code\":\"654225\",\"name\":\"裕民县\",\"cityCode\":\"6542\",\"provinceCode\":\"65\"},{\"code\":\"654226\",\"name\":\"和布克赛尔蒙古自治县\",\"cityCode\":\"6542\",\"provinceCode\":\"65\"},{\"code\":\"654301\",\"name\":\"阿勒泰市\",\"cityCode\":\"6543\",\"provinceCode\":\"65\"},{\"code\":\"654321\",\"name\":\"布尔津县\",\"cityCode\":\"6543\",\"provinceCode\":\"65\"},{\"code\":\"654322\",\"name\":\"富蕴县\",\"cityCode\":\"6543\",\"provinceCode\":\"65\"},{\"code\":\"654323\",\"name\":\"福海县\",\"cityCode\":\"6543\",\"provinceCode\":\"65\"},{\"code\":\"654324\",\"name\":\"哈巴河县\",\"cityCode\":\"6543\",\"provinceCode\":\"65\"},{\"code\":\"654325\",\"name\":\"青河县\",\"cityCode\":\"6543\",\"provinceCode\":\"65\"},{\"code\":\"654326\",\"name\":\"吉木乃县\",\"cityCode\":\"6543\",\"provinceCode\":\"65\"},{\"code\":\"659001\",\"name\":\"石河子市\",\"cityCode\":\"6590\",\"provinceCode\":\"65\"},{\"code\":\"659002\",\"name\":\"阿拉尔市\",\"cityCode\":\"6590\",\"provinceCode\":\"65\"},{\"code\":\"659003\",\"name\":\"图木舒克市\",\"cityCode\":\"6590\",\"provinceCode\":\"65\"},{\"code\":\"659004\",\"name\":\"五家渠市\",\"cityCode\":\"6590\",\"provinceCode\":\"65\"},{\"code\":\"659006\",\"name\":\"铁门关市\",\"cityCode\":\"6590\",\"provinceCode\":\"65\"}]',true));\n $data->each(function($area){\n \\App\\Models\\Divisions\\Area::create(\n [\n 'id'=>$area['code'],\n 'name'=>$area['name'],\n 'city_id'=>$area['cityCode'],\n 'province_id'=>$area['provinceCode'],\n ]\n );\n });\n }", "title": "" } ]
[ { "docid": "520d3a91ddad10619dacf1b7197c5aec", "score": "0.7992128", "text": "public function run()\n {\n DB::table('users')->insert([\n 'id' => 1,\n 'name' => 'Usuário',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n ]);\n\n DB::table('empresas')->insert([\n 'nome' => 'Empreendimentos S.A.',\n 'telefone' => '11900001111',\n 'endereco' => 'Rua Qualquer',\n 'cep' => '00000-000',\n 'cnpj' => '00.000.000/0000-00',\n 'user_id' => 1\n ]);\n\n $faker = Faker::create();\n foreach (range(1,5) as $i){\n DB::table('fornecedores')->insert([\n 'nome' => $faker->name,\n 'email' => $faker->email,\n 'mensalidade' => mt_rand( 0, $faker->numberBetween(100, 1000) ) / 10,\n 'user_id' => 1\n ]);\n }\n }", "title": "" }, { "docid": "9d32f8ff8b6ed1c924761b8262ce875e", "score": "0.79787016", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n\t factory(App\\Models\\Person::class , 10)->create(); \n\t factory(App\\Models\\Company::class , 10)->create(); \n\t factory(App\\Models\\Account::class , 10)->create(); \n factory(App\\Models\\Tag::class , 10)->create();\n factory(App\\Models\\Customer::class , 10)->create();\n factory(App\\Models\\Project::class , 10)->create();\n factory(App\\Models\\Domain::class , 3)->create();\n\n foreach (['Watermark', 'Filter', 'Optimize'] as $index) {\n DB::table('processes')->insert([\n 'name' => $index, \n 'class' => $index,\n ]);\n }\n\n DB::table('process_tag')->insert([\n 'process_id' => 1, \n 'tag_id' => 1,\n ]);\n \n DB::table('process_tag')->insert([\n 'process_id' => 1, \n 'tag_id' => 2,\n ]);\n\n DB::table('process_tag')->insert([\n 'process_id' => 2, \n 'tag_id' => 3,\n ]);\n\n }", "title": "" }, { "docid": "e3f2301106fd912254f1c33890600754", "score": "0.7965562", "text": "public function run()\n {\n //Create faker instance\n $faker = \\Faker\\Factory::create();\n //Flush the table before recreate\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n DB::table('chapters')->truncate();\n \\App\\Chapter::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n foreach (range(1,5) as $number) {\n \\App\\Chapter::create([\n 'chapter' => $faker->word,\n 'subject_id'=> rand(1,3),\n ]);\n }\n }", "title": "" }, { "docid": "9e7127cb6c71143fb79c04b4fee8ad17", "score": "0.7947562", "text": "public function run()\n {\n /**\n * Seed Users Table\n */\n DB::table('users')->insert([\n [\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin'),\n 'role_id' => Config::get('constants.roles.administrator'),\n 'created_at' => Carbon::now()\n ],\n [\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'password' => Hash::make('johndoe'),\n 'role_id' => Config::get('constants.roles.user'),\n 'created_at' => Carbon::now()\n ],\n ]);\n\n /**\n * Seed Roles Table\n */\n DB::table('roles')->insert([\n [\n 'display_name' => 'Administrator',\n 'description' => 'System Admin',\n 'created_at' => Carbon::now()\n ],\n [\n 'display_name' => 'User',\n 'description' => 'Can access expenses',\n 'created_at' => Carbon::now()\n ],\n ]);\n }", "title": "" }, { "docid": "37ee2d6976618f232b9fc479d5b57a06", "score": "0.79213214", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n \n Post::insert([\n [\n 'id' => 1,\n 'title' => 'post 1',\n 'content' => 'post content 1'\n ], \n [\n 'id' => 2,\n 'title' => 'post 2',\n 'content' => 'post content 2'\n ],\n [\n 'id' => 3,\n 'title' => 'post 3',\n 'content' => 'post content 3'\n ],\n [\n 'id' => 4,\n 'title' => 'post 4',\n 'content' => 'post content 4'\n ],\n [\n 'id' => 5,\n 'title' => 'post 5',\n 'content' => 'post content 5'\n ],\n [\n 'id' => 6,\n 'title' => 'post 6',\n 'content' => 'post content 6'\n ],\n [\n 'id' => 7,\n 'title' => 'post 7',\n 'content' => 'post content 7'\n ]\n ]);\n \n }", "title": "" }, { "docid": "341ec9573f9443b609a2c9e8c0a90413", "score": "0.79124165", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \tfactory(App\\User::class)->create();\n factory(App\\Client::class, 40)->create();\n factory(App\\Driver::class, 20)->create();\n factory(App\\Guide::class, 20)->create();\n factory(App\\Vehicle::class, 30)->create();\n factory(App\\Order::class, 80)->create();\n factory(App\\Invoice::class, 160)->create();\n factory(App\\DriverSchedule::class, 50)->create();\n factory(App\\GuideSchedule::class, 50)->create();\n factory(App\\VehicleSchedule::class, 50)->create();\n\n\n // Seed driver_order table\n\n $orders = App\\Order::all();\n $drivers = App\\Driver::all();\n $guides = App\\Guide::all();\n $vehicles = App\\Vehicle::all();\n\n $this->seedManyToMany($drivers, $orders);\n $this->seedManyToMany($guides, $orders);\n $this->seedManyToMany($vehicles, $orders);\n }", "title": "" }, { "docid": "c455dbfa0c734909206ed15084e64a1d", "score": "0.79038024", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(ArticlesTableSeeder::class);\n\n\n DB::table('categories')->delete();\n //insert some dummy records\n DB::table('categories')->insert(array(\n array('name'=>'groenten','pic'=>'groenten.png'),\n array('name'=>'vlees','pic'=>'vlees.png'),\n array('name'=>'fruit','pic'=>'fruit.png'),\n array('name'=>'snacks','pic'=>'snacks.png'),\n array('name'=>'drinken','pic'=>'drinken.png')\n\n ));\n }", "title": "" }, { "docid": "ec53d7f325471d31c8d4b9ef320da423", "score": "0.78988916", "text": "public function run()\n {\n $this->call(LanguageTableSeeder::class);\n $this->call(SkillsTableSeeder::class);\n\n// factory(\\App\\Skill::class, 1000)->create();\n\n factory(\\App\\User::class, 20)->create()->each(function($user) {\n $user->skills()->saveMany(\\App\\Skill::all()->random(rand(1, 25)));\n $user->languages()->saveMany(\\App\\Language::all()->random(rand(1, 10)));\n $user->save();\n });\n\n factory(\\App\\Question::class, 50)->create()->each(function($question) {\n $question->skills()->saveMany(\\App\\Skill::all()->random(rand(1, 5)));\n $question->save();\n });\n\n factory(\\App\\Answer::class, 50)->create();\n factory(\\App\\Vote::class, 80)->create();\n }", "title": "" }, { "docid": "b29caf34b66d3312d3383baca3e725cf", "score": "0.7895321", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\Set::class, 3)->create()->each(function ($set) {\n $setProducts = factory(\\App\\Product::class, 30)->make();\n\n $set->products()->saveMany($setProducts);\n });\n factory(\\App\\Category::class, 3)->create();\n\n }", "title": "" }, { "docid": "88258f9f401554ae03712d5c26de4e86", "score": "0.78949255", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n\n foreach (range(1,10) as $index) {\n Product::create([\n 'title' => $faker->name ,\n 'description' => $faker->text ,\n 'price' => $faker->numberBetween(10, 100),\n ]);\n }\n }", "title": "" }, { "docid": "c5ca42e038468200777d2f68273e9f74", "score": "0.7888331", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => \"Jovan\",\n 'password' => Hash::make(\"12121212\"),\n 'email' => \"[email protected]\"\n ]);\n\n DB::table('users')->insert([\n 'name' => \"Pera\",\n 'password' => Hash::make(\"123123123\"),\n 'email' => \"[email protected]\"\n ]);\n\n $faker = Faker::create();\n for ($i = 0; $i < 10; $i++) {\n DB::table('posts')->insert([\n 'title' => $faker->text(40),\n 'content' => $faker->sentence(10),\n 'user_id' => $faker->numberBetween(1, 2)\n ]);\n }\n }", "title": "" }, { "docid": "3b2875053d0fe7dd172affc98ba741cd", "score": "0.7887019", "text": "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n\n\n DB::table('users')->insert([\n 'name' => 'Juste',\n 'email' => '[email protected]',\n 'password' => Hash::make('123'),\n ]);\n\n foreach (range(0, 10) as $_ ) {\n \n DB::table('posts')->insert([\n 'town' => $faker->city(),\n 'capacity' => 20,\n 'code' =>'P-'.rand(1,99),\n ]);\n }\n\n foreach (range(1, 50) as $_ ) {\n DB::table('parcels')->insert([\n 'weight' => mt_rand(111, 15999)/100,\n 'phone' => '+37069'.rand(100000, 999999),\n 'info' => $faker->text(400),\n 'post_id' => rand(1, 11)\n ]);\n }\n\n\n }", "title": "" }, { "docid": "b07e3ee3c4b1736184933db829b4a9bc", "score": "0.7874933", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n App\\Role::create([\n 'name' => 'Administrador',\n 'description' => 'no se'\n ]);\n\n App\\Role::create([\n 'name' => 'Edil',\n 'description' => 'no se'\n ]);\n\n App\\Role::create([\n 'name' => 'Ciudadano',\n 'description' => 'no se'\n ]);\n\n\n App\\Locality::create([\n 'name' => 'Puente Aranda',\n 'city_id' => 495,\n ]);\n\n\n App\\Entity::create([\n 'name' => 'Administracion del sistema',\n 'phone_contact' => '301301301',\n 'email' => '[email protected]',\n 'country_id' => 48\n ]);\n\n App\\Entity::create([\n 'name' => 'Entidad 1',\n 'phone_contact' => '301301301',\n 'email' => '[email protected]',\n 'country_id' => 48\n ]);\n\n App\\User::create([\n 'name' => 'Oscar',\n 'email' => '[email protected]',\n 'password' => bcrypt('oscar123'),\n 'last_name' => 'Amado',\n 'entity_id' => 1,\n 'rol_id' => 1,\n 'document' => '1022445546',\n ]);\n\n }", "title": "" }, { "docid": "385bfd731a375a2d4ef0c36d568c50e1", "score": "0.786952", "text": "public function run()\n {\n //Clears database\n DB::table('users')->delete();\n DB::table('settings')->delete();\n\n //Seeds database\n factory(User::class,\"admin\", 1)->create();\n factory(User::class, 10)->create();\n factory(Setting::class, 1)->create();\n }", "title": "" }, { "docid": "6e77cc4bd37ebe82a97b96bf3dec7bab", "score": "0.7860597", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('item')->insert([\n 'title' => $faker->name,\n 'description' => $faker->realText($maxNbChars = 200, $indexSize = 2),\n 'id_model' =>$faker->numberBetween(1,69),\n 'id_province' =>$faker->numberBetween(1,96),\n 'id_brand' =>$faker->numberBetween(1,79),\n 'id_user' =>$faker->numberBetween(1,7),\n\t 'created_at' => $faker->dateTimeBetween($startDate = '-1 months', $endDate = 'now'),\n 'status' => $faker->randomElement(array('New', 'Active', 'Inactive')),\n\t ]);\n }\n }", "title": "" }, { "docid": "10380f0624cacc8ec438ce737cd5a23c", "score": "0.785481", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n \\App\\Review::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 50; $i++) {\n \\App\\Review::create([\n 'user_id' => $faker->randomElement(\\App\\User::all()->pluck('id')->toArray()),\n 'restaurant_id' => $faker->randomElement(\\App\\Restaurant::all()->pluck('google_places_id')->toArray()),\n 'review_text' => $faker->paragraph,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "7b08efa0e8b289b221b37a9f42fcbab6", "score": "0.7840935", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(VideosTableSeeder::class);\n\n factory(App\\Models\\User::class, 5)->create()->each(function ($i) {\n $i->interests()\n ->saveMany(\n factory(App\\Models\\Interest::class, rand(1, 5))->make()\n );\n });\n }", "title": "" }, { "docid": "4d8a3e194e5213b07ba6e1f01065371a", "score": "0.78395134", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n User::create(array('first_name' => 'George','last_name' => 'Petrou', 'avatar' => 'default.jpg', 'email' => '[email protected]','password' => Hash::make('1234')));\n User::create(array('first_name' => 'Nick','last_name' => 'Jones', 'avatar' => 'default.jpg', 'email' => '[email protected]','password' => Hash::make('1235')));\n User::create(array('first_name' => 'Ryan','last_name' => 'Giggs', 'avatar' => 'default.jpg', 'email' => '[email protected]','password' => Hash::make('1236')));\n Roles::create(array('role' => 'admin','user_id' => 1));\n Roles::create(array('role' => 'user','user_id' => 2));\n Roles::create(array('role' => 'user','user_id' => 3));\n }", "title": "" }, { "docid": "bc912a8c1dddc8fa40444c9031b40718", "score": "0.78330994", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = [\n [\n 'name' => 'admin',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'jahed',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'hasan',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'jahedhasan',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'jh',\n 'email' => '[email protected]'\n ],\n \n [\n 'name' => 'jahedd',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'jb',\n 'email' => '[email protected]'\n ],\n ];\n foreach ($users as $user) {\n factory(User::class)->create([\n 'name' => $user['name'],\n 'email' => $user['email']\n ]);\n }\n factory(Note::class, 30)->create();\n }", "title": "" }, { "docid": "32f8a9675ac74c00bb4974c472281dba", "score": "0.7821223", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // Customer::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n Customer::create([\n 'full_name' =>$faker->name,\n 'cin' =>$faker->word,\n 'phone' => $faker->e164PhoneNumber ,\n 'email' =>$faker->Email, \n // 'user_id' =>$i+1, \n 'workspace_id' =>1, \n ]);\n }\n }", "title": "" }, { "docid": "7390b50b8fae46f7555e0eaf084fd3ef", "score": "0.7807736", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('users')->insert([\n // 'name' => str_random(10),\n // 'email' => str_random(10).'@gmail.com',\n // 'password' => bcrypt('secret'),\n // ]);\n for($count=1;$count<=3; $count++ ){\n\t DB::table('users')->insert([\n\t 'name' => 'admin'.$count,\n\t 'email' => 'admin'.$count.'@gmail.com',\n\t 'password' => bcrypt('admin'),\n\t 'admin'\t=>1,\n\t ]);\n }\n // DB::table('projects')->insert([\n // 'title' => str_random(10),\n // 'description' => str_random(100),\n // 'status' => 'open',\n // 'category' => 'Web',\n // ]); \n // DB::table('tasks')->insert([\n // 'title' => str_random(10),\n // 'description' => str_random(100),\n // 'status' => 'in progress',\n // 'category' => 'Front-End',\n // 'project_id'=>1\n // ]);\n // DB::table('task_user')->insert([\n // \t'task_id' => 1,\n // \t'user_id'\t=> 1,\n\n // \t]);\n }", "title": "" }, { "docid": "4d4c9c609f68448903976a4c7b76bb72", "score": "0.7806386", "text": "public function run() {\n $this->call(CountriesSeeder::class);\n $this->call(CastsTableSeeder::class);\n $this->call(MoviesSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'user_type' => 'ADMIN'\n ]);\n DB::table('ratings')->insert(\n [\n 'user_id' => 1,\n 'movie_id' => 1,\n 'rating_value' => 5\n ]\n );\n }", "title": "" }, { "docid": "39cab0ab1b75aec77c6b02db375756d1", "score": "0.7804264", "text": "public function run()\n {\n /*$this->call([\n //LanguageTableSeeder::class,\n UsersTableSeeder::class\n ]);*/\n\n //create dummy data for cashflow\n $faker = Faker::create();\n foreach (range(1,100) as $index) {\n\n DB::table('cashflow')->insert([\n 'name' => $faker->sentence(6, true),\n 'description' => $faker->text,\n 'flow_type' => $faker->randomElement(array ('1','2')),\n 'amount' => $faker->numberBetween(1000, 9000),\n 'created_at' => $faker->dateTimeThisYear('now', 'UTC') \n ]);\n }\n }", "title": "" }, { "docid": "249635981f4ce9205eb86a95422d00e1", "score": "0.780369", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n $this->call(PermissionSeeder::class);\n factory(Tag::class, 20)->create();\n Permission::where('slug', 'manage-users')->first()->roles()\n ->sync([\n Role::where('slug', 'administrator')->first()->id,\n ]);\n Permission::where('slug', 'manage-articles')->first()->roles()\n ->sync([\n Role::where('slug', 'administrator')->first()->id,\n Role::where('slug', 'editor')->first()->id,\n ]);\n $this->call(UserSeeder::class);\n factory(User::class, 2)->create()->each(function($user) {\n $user->articles()->saveMany(factory(Article::class, (int) rand(10, 20))->make());\n $user->news()->saveMany(factory(News::class, (int) rand(10, 20))->make());\n });\n $this->call(EntryTagTableSeeder::class);\n $this->call(CommentTableSeeder::class);\n }", "title": "" }, { "docid": "11218f98139c57a6846510c7c4c15a64", "score": "0.77917063", "text": "public function run()\n {\n $faker = FakerFactory::create();\n\n # php artisan migrate:refresh --seed\n $bob = new App\\User();\n $bob->name = \"Bob\";\n $bob->email = \"[email protected]\";\n $bob->password = bcrypt(\"123456\");\n $bob->save();\n\n $alice = new App\\User();\n $alice->name = \"Alice\";\n $alice->email = \"[email protected]\";\n $alice->password = bcrypt(\"123456\");\n $alice->save();\n\n for($i=0; $i<20; $i++) {\n $comment = new App\\Comment();\n $comment->comment = $faker->paragraph;\n $comment->post_id = rand(1, 10);\n $comment->user_id = rand(1, 2);\n $comment->save();\n }\n\n for($i=0; $i<10; $i++) {\n $post = new App\\Post();\n $post->title = $faker->sentence;\n $post->body = $faker->paragraph;\n $post->category_id = rand(1, 5);\n $post->save();\n }\n\n for($i=0; $i<5; $i++) {\n $category = new App\\Category();\n $category->name = ucwords( $faker->word );\n $category->save();\n }\n\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "0abeef674742d2ee575c2285b0a63e54", "score": "0.7787361", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n //seta = 0\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n //Cidades \n DB::table('cidades')->truncate();\n \tDB::table('cidades')->insert([\n \t\t// 'id' => \"1\",\n 'cidade_nome' => \"Cuiabá\",\n ]);\n \tDB::table('cidades')->insert([\n \t\t// 'id' => \"2\",\n 'cidade_nome' => \"Várzea Grande\",\n ]);\n\n\n //Planos \n DB::table('planos')->truncate();\n \tDB::table('planos')->insert([\n \t\t// 'id' => \"1\",\n 'plano_nome' => \"Silver\",\n 'plano_vantagens' => \"Para controle financeiro de quem trabalha sozinho\",\n ]);\n \tDB::table('planos')->insert([\n \t\t// 'id' => \"2\",\n 'plano_nome' => \"Gold\",\n 'plano_vantagens' => \"Melhor opção para quem quer crescer e receber mais rápido.\", \n ]);\n \tDB::table('planos')->insert([\n \t\t// 'id' => \"2\",\n 'plano_nome' => \"Platium\",\n 'plano_vantagens' => \"Mais notas e boletos para sua empresa.\",\n ]);\n\n\n }", "title": "" }, { "docid": "e1d4f0e4e0b4cd624b555f00f69d8386", "score": "0.77770865", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n //----DATOS REALES DE PRUEBA---------\n $this->call(CitySeeder::class);\n $this->call(SucursaleSeeder::class);\n $this->call(StateSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(RoleSeeder::class);\n\n //-----DATOS FALSOS DE PRUEBA--------\n //User::factory(10)->create();\n Product::factory(5)->create();\n Group::factory(5)->create();\n Modifier::factory(20)->create();\n //Sale::factory(20)->create();\n }", "title": "" }, { "docid": "5636dd7cb3d474c1bf2462b273b361ff", "score": "0.7776088", "text": "public function run()\n {\n\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('users')->truncate();\n DB::table('categories')->truncate();\n\n\n //seeding the data\n\n User::factory()->count(1)->create();\n\n Category::factory()->count(10)->create()->each(function($category){\n $category->products()->saveMany(Product::factory(Product::class)->count(5)->create());\n });\n\n // \\App\\Models\\User::factory(10)->create();\n }", "title": "" }, { "docid": "a8dfa675e6ffec96b1dd6192fd68b3a2", "score": "0.77732474", "text": "public function run()\n {\n \t// Crear Seeder\n \t// php artisan make:seeder MiniSkillsTableSeeder\n\n \t// Ejecutar\n \t//php artisan db:seed --class=MiniSkillsTableSeeder\n \t//\n \t/*\n \tDB::table('mini_skills')->insert([\n\t 'title' => 'SEO',\n\t 'progress' => 100, \n\t 'status' => 1,\n\t 'created_at' => now(),\n\t 'updated_at' => now()\n ]);\n */\n \n \n\n \tMiniSkill::create([\n\t 'title' => 'SEO',\n\t 'progress' => 100, \n\t 'status' => 1\n ]);\n }", "title": "" }, { "docid": "e09eb1651561e63be4b2b1e9c41c333c", "score": "0.77729875", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\Admin', 1)->create();\n factory('App\\Membre', 10)->create();\n factory('App\\Psychologue', 10)->create();\n factory('App\\Blog', 10)->create();\n factory('App\\Statut', 10)->create();\n factory('App\\Discussion', 10)->create();\n }", "title": "" }, { "docid": "fc4ebf94d0a8bf8e90abe65163ca460c", "score": "0.77711946", "text": "public function run()\n {\n $this->call(UsersSeeder::class);\n // factory(App\\User::class, 5)->create()->each(function ($u) {\n // \t$u->laporan()->saveMany(factory(App\\Laporan::class, 5)->make());\n // });\n // factory(App\\Dospem::class, 2)->create();\n // factory(App\\Pemlap::class, 2)->create();\n // factory(App\\Instansi::class, 2)->create();\n }", "title": "" }, { "docid": "afcd93274839927545e6c2a6489c97b4", "score": "0.7769354", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $faker=Faker::create();\n foreach (range(1,100) as $index) {\n DB::table('posts')->insert([\n 'title'=>$faker->text(30),\n 'body'=>$faker->text(300)\n ]);\n }\n }", "title": "" }, { "docid": "b9f891c56a6dcdf4ec65f847082d6389", "score": "0.77666545", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 5) as $index) {\n DB::table('articles')->insert(\n [\n 'name' => $faker->unique()->word,\n 'user_id' => 1,\n 'title' => $faker->words(3, true),\n 'text' => $faker->text(1000),\n 'rank' => $faker->randomNumber(),\n 'enabled' => $faker->boolean(true),\n 'created_at' => $faker->date(),\n 'updated_at' => $faker->date(),\n ]\n );\n }\n }", "title": "" }, { "docid": "f908dcf673136d275768a26e1ed8f43d", "score": "0.77663046", "text": "public function run()\n {\n /*\n // Seed with a database querry.\n DB::table('users')->insert([\n 'name' => Person::firstNameMale(),\n 'email' => str_random(10) . '@' . str_random(5) . '.com',\n 'password' => bcrypt('secret'),\n 'date_birth' => DateTime::unixTime(),\n 'telephone' => PhoneNumber::phoneNumber(),\n 'address' => Address::streetSuffix() . $this->delimiter . Address::buildingNumber() . $this->address_delimiter .\n Address::postcode() . $this->delimiter . Address::citySuffix() . $this->address_delimiter .\n Address::country(),\n 'nationality' => Miscellaneous::countryCode(),\n 'work_permit' => str_random(1),\n 'driver_permit' => 'yes',\n ]);\n */\n\n //Seeding with a factory.\n // No relationships are made.\n factory(App\\User::class,5)->create();\n /*\n // Seed and attach relationships to each user;\n factory(App\\User::class,5)->create()->each(function($u){\n $u->templates()->save(factory(App\\Template::class)->make());\n // Cannot continue as the foreign key integrities are not respected afterwards.\n $u->cvs()->save(factory(App\\Cv::class)->make());\n $u->sections()->save(factory(App\\Section::class)->make());\n $u->skills()->save(factory(App\\Skill::class)->make());\n $u->hobbies()->save(factory(App\\Hobby::class)->make());\n $u->jobs()->save(factory(App\\Work::class)->make());\n $u->languages()->save(factory(App\\Language::class)->make());\n $u->educations()->save(factory(App\\Education::class)->make());\n });\n */\n }", "title": "" }, { "docid": "40ca19c7f708ecdfdcd4af8c02d83f2f", "score": "0.7763938", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(AdminTableSeeder::class);\n // factory(App\\Admin::class, 50)->create();]\n factory(App\\Model\\Artist::class, 15)->create();\n factory(App\\Model\\Category::class, 20)->create();\n factory(App\\Model\\Album::class, 20)->create();\n factory(App\\Model\\Song::class, 50)->create();\n }", "title": "" }, { "docid": "78fa4e7ae6998de91422744dcdef4f25", "score": "0.77621245", "text": "public function run()\n { \n \n /* factory(App\\Resource::class, 10000)->create();\n factory(App\\Work::class, 50)->create();\n factory(App\\Cost::class, 500)->create();\n factory(App\\Refwork::class, 50)->create();\n factory(App\\Refresource::class, 200)->create(); */\n\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n \n }", "title": "" }, { "docid": "480eecd886ef3ee8fb2edf36add7a6e6", "score": "0.7761234", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(RoleUserTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n// factory('App\\User', 15)->create();\n factory('App\\Article', 6)->create();\n $this->call(ArticlesTableSeeder::class);\n $this->call(ArticleCategoryTableSeeder::class);\n\n }", "title": "" }, { "docid": "43e31086667a15be4100b3788e32525a", "score": "0.77569884", "text": "public function run()\n {\n $faker = Faker::create('id_ID');\n DB::table('users')->insert([\n [\"role_id\" => 1, \"name\" => 'Admin 1', \"email\" => \"[email protected]\", \"password\" => Hash::make(\"admin12345\")],\n [\"role_id\" => 1, \"name\" => 'Admin 2', \"email\" => \"[email protected]\", \"password\" => Hash::make(\"admin12345\")],\n [\"role_id\" => 2, \"name\" => 'John Doe', \"email\" => \"[email protected]\", \"password\" => Hash::make(\"john12345\")],\n [\"role_id\" => 2, \"name\" => 'Ji Eun', \"email\" => \"[email protected]\", \"password\" => Hash::make(\"jieun12345\")],\n ]);\n }", "title": "" }, { "docid": "c5a55e8cf6dced6dcea94dbb4eb4d4fe", "score": "0.7746075", "text": "public function run()\n {\n $this->seed('EntryTypesTableSeeder');\n\t\t$this->seed('TaxonomyTableSeeder');\n\t\t$this->seed('RolesTableSeeder');\n\t\t$this->seed('SettingsTableSeeder');\n\t\t$this->seed('PagesTableSeeder');\n\t\t$this->seed('MenuTableSeeder');\n }", "title": "" }, { "docid": "84eb153850f1545b5a2f9529a74ca3bb", "score": "0.774333", "text": "public function run()\n {\n Author::factory(10)->create();\n Book::factory(10)->create();\n Relation::factory(10)->create();\n $this->call([\n UserSeeder::class,\n RelationSeeder::class\n ]);\n }", "title": "" }, { "docid": "1159542e19a2f9f8712ba8239cdba0c8", "score": "0.7737675", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Category::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n $categories = [\n 'Acheter et vendre','Autos et véhicules','Immobilier','Services','Animaux','Locations de vacances','Communauté'\n ];\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 7; $i++) {\n Category::create([\n 'name' => $categories[$i]\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n }", "title": "" }, { "docid": "d2d80f7d460efe018a3f140847e1a279", "score": "0.7736776", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // Dejar nulo las claves foraneas\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n DB::table('category_product')->truncate();\n\n //Me ayudara para que los eventos al comienzo no se activen\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $catidadUsuarios = 200;\n $cantidadCategorias = 30;\n $cantidadProductos = 500;\n $cantidadTransacciones = 1000;\n\n factory(User::class,$catidadUsuarios)->create();\n factory(Category::class,$cantidadCategorias)->create();\n\n factory(Product::class,$cantidadProductos)->create()->each(\n function($producto){\n //random (colleccion)\n $categorias=Category::all()->random(mt_rand(1,5))->pluck('id');\n $producto->categories()->attach($categorias);\n }\n );\n\n factory(Transaction::class, $cantidadTransacciones)->create();\n }", "title": "" }, { "docid": "b71b6c9d43290ee575ba0a2222937224", "score": "0.7735867", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n \n $data = [];\n\n $users=App\\User::pluck('id')->toArray();//permet de retourner les id de la table et les stock dans une table\n \n for ($i = 1; $i <= 100 ; $i++) {\n array_push($data, [\n 'name'=>$faker->sentence,\n 'body'=>$faker->realText(2000) ,\n 'user_id'=>$faker->randomElement($users),\n 'published_at'=>$faker->datetime(),\n\n ]);\n }\n Article::insert($data);\n }", "title": "" }, { "docid": "9d2e1f29bfaf34564e90f02a58e8ad3b", "score": "0.77346915", "text": "public function run()\n {\n \t\n \tDB::table('profissao')->insert([\n 'descricao' => 'Professor'\n ]);\n\n DB::table('profissao')->insert([\n 'descricao' => 'Aluno'\n ]);\n\n DB::table('profissao')->insert([\n 'descricao' => 'Engenheiro'\n ]);\n\n DB::table('profissao')->insert([\n 'descricao' => 'Agricultor'\n ]);\n\n DB::table('profissao')->insert([\n 'descricao' => 'Outro'\n ]);\n\n\n DB::table('perfil')->insert([\n 'descricao' => 'Administrador'\n ]);\n\n DB::table('perfil')->insert([\n 'descricao' => 'Registrador'\n ]);\n \n $this->call(ModelosTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(PluviometrosSeeder::class); \n }", "title": "" }, { "docid": "de46177ac0fa0a295c6ae2ab0fba4901", "score": "0.7733467", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(Course::class, 10)->create()->each(function($course){\n $course->episodes()->saveMany(factory(Episode::class,10)->make());\n });\n }", "title": "" }, { "docid": "5c50c6331a8da5e7c37b7e78f795a900", "score": "0.7731594", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => '123123'\n ]);\n\n Security::create(['code' => 'helloworld']);\n Security::create(['code' => 'welcomehere']);\n }", "title": "" }, { "docid": "5594e3238793cf289d046986c5f56d58", "score": "0.77295095", "text": "public function run() {\n // \\App\\Models\\User::factory(10)->create();\n// $this->call(ArticlesTableSeeder::class);\n// $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n // Let's make sure everyone has the same password and\n // let's hash it before the loop, or else our seeder\n // will be too slow.\n $password = Hash::make('netireki');\n\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n\n // And now let's generate a few dozen users for our app:\n for ($i = 0; $i < 10; $i++) {\n User::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => $password,\n ]);\n }\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "b330d291de9fbd392f253311a96f3c6d", "score": "0.7729395", "text": "public function run()\n {\n // \\App\\Models\\User::factory(1)->create();\n // \\App\\Models\\Article::factory(5)->create();\n // \\App\\Models\\Category::factory(5)->create();\n // \\App\\Models\\Topic::factory(5)->create();\n // \\App\\Models\\Tag::factory(5)->create();\n // $this->call(ArticleCategorySeeder::class);\n // $this->call(ArticleTopicSeeder::class);\n $this->call(RegionSeeder::class);\n }", "title": "" }, { "docid": "bad0c06d6cc426f60d248d0caa0771bb", "score": "0.77290624", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(AssessmentSeeder::class);\n DB::table('users')->insert([\n\n [\n 'name' => 'Admin 1',\n 'email' => '[email protected]',\n 'password' => bcrypt('test1234'),\n ],\n [\n 'name' => 'Admin 2',\n 'email' => '[email protected]',\n 'password' => bcrypt('test1234'),\n ],\n [\n 'name' => 'Admin 3',\n 'email' => '[email protected]',\n 'password' => bcrypt('test1234'),\n ]\n\n ]);\n }", "title": "" }, { "docid": "2e159f4e54504bdde9f62ecdf35810ee", "score": "0.772654", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User',50)->create();\n factory('App\\Post',50)->create();\n factory('App\\Profile',50)->create();\n factory('App\\Category',3)->create();\n \n $posts = factory(App\\Post::class)->create();\n\n factory(Comment::class, 30)->create([\n 'post_id' => $posts->id\n ]);\n\n $comment = Comment::first();\n\n factory(Comment::class, 20)->create([\n 'post_id' => $posts->id,\n 'comment_id' => $comment->id,\n ]);\n\n }", "title": "" }, { "docid": "bad3760d584e717874b4137c76409e6b", "score": "0.7724795", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::table('roles')->insert([\n 'name' => 'SUPERUSER',\n ]);\n\n DB::table('contractors')->insert([\n 'name' => 'MY ENTERPRISE',\n ]);\n\n DB::table('projects')->insert([\n 'name' => 'PROJECT EXAMPLE',\n 'datestart' => now()->format('Y-m-d H:i:s'),\n 'dateFinish' => now()->format('Y-m-d H:i:s'),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'SUPERUSER',\n 'user' => 'superuser',\n 'email' => '[email protected]',\n 'password' => Hash::make('IdonSoft'),\n 'role_id' => '1',\n 'contractor_id' => '1',\n ]);\n\n DB::table('permits')->insert([\n 'user_id' => '1',\n 'create_folio' => '1',\n 'create_dailyreport' => '1',\n 'create_note' => '1',\n 'create_comment' => '1',\n 'print_dailyreport' => '1',\n 'print_note' => '1',\n 'print_folio' => '1',\n 'edit_sequence' => '1',\n ]);\n \n }", "title": "" }, { "docid": "d6c8622705e47deae5dda1c458f83e8a", "score": "0.7724516", "text": "public function run()\n {\n DB::table('dias')->insert([\n // Para que los tres tipos de roles puedan darse,\n // Poner php artisan migrate:fresh --seed para hacer la migración del seed\n // primero php artisan db:seed --class=RolesTableSeeder\n // y luego php artisan db:seed --class=UsersTableSeeder\n // finalmente php artisan db:seed --class=DiasTableSeeder\n [\n 'nombre' => 'Lunes'\n ],\n [\n 'nombre' => 'Martes'\n ],\n [\n 'nombre' => 'Miercoles'\n ],\n [\n 'nombre' => 'Jueves'\n ],\n [\n 'nombre' => 'Viernes'\n ],\n [\n 'nombre' => 'Sabado'\n ],\n [\n 'nombre' => 'Domingo'\n ]\n ]);\n }", "title": "" }, { "docid": "7c1039e8faa671c62b7faf41b7d53536", "score": "0.77197814", "text": "public function run()\n {\n Model::unguard();\n Category::where('id', '<=', '5')->delete();\n $data = [\n ['name' => '汽车'],\n ['name' => '游戏'],\n ['name' => '影视'],\n ['name' => '社会'],\n ['name' => '政治'],\n ];\n foreach ($data as $d) {\n Category::create($d);\n }\n factory(Content::class, 1000)->create();\n // $this->call(\"OthersTableSeeder\");\n }", "title": "" }, { "docid": "bbdcb34cad1d7381d781f85b5830c22f", "score": "0.77192366", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// $this->depeartmntTableSeed();\n// $this->designationTableSeed();\n /**\n * Run the database seeds.\n *\n * @return void\n */\n\n }", "title": "" }, { "docid": "7d13b7cccd5ea1d589bdc8b1ce81b63f", "score": "0.7715028", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // factory(App\\User::class)->create();\n\n // factory(Student::class,50)->create()->each(function($student)\n // {\n // $student->educationalQualification()->save(factory(Parents::class)->make());\n // $student->educationalQualification()->save(factory(Payment::class)->make());\n // $student->educationalQualification()->save(factory(Guardian::class)->make());\n // $student->educationalQualification()->save(factory(EQ::class)->make());\n // });\n }", "title": "" }, { "docid": "b84407b90ecd0da0f136c70b54b6b0f0", "score": "0.7710997", "text": "public function run()\n {\n /// Let's truncate our existing records to start from scratch.\n Category::truncate();\n\n $faker = \\Faker\\Factory::create();\n $category_names = array('Category One', 'Category Two');\n foreach($category_names as $name) {\n Category::create([\n 'name' => $name,\n 'price_mod' => $faker->randomFloat($nbMaxDecimals = 2, $min = -2, $max = 10.0),\n ]);\n }\n }", "title": "" }, { "docid": "1506f1139a748a04763396e2ad86ef7a", "score": "0.7710608", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n factory(Category::class,10)->create();\n factory(ProductType::class,20)->create();\n // factory(Product::class,150)->create();\n $this->call(ProductSeeder::class);\n\n }", "title": "" }, { "docid": "510b6a95b0bda8150598fcfcd5e0fa41", "score": "0.77091455", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \n \\App\\User::truncate();\n \\App\\Category::truncate();\n \\App\\Product::truncate();\n \\App\\Transaction::truncate();\n\n \\App\\User::flushEventListeners();\n \\App\\Category::flushEventListeners();\n \\App\\Product::flushEventListeners();\n \\App\\Transaction::flushEventListeners();\n\n factory(\\App\\User::class,100)->create();\n factory(\\App\\Category::class,10)->create();\n factory(\\App\\Product::class,30)->create()->each(\n function ($product) {\n $categories = \\App\\Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n }\n );\n factory(\\App\\Transaction::class,10)->create();\n\n }", "title": "" }, { "docid": "2f62f5093b8e26beb38831e5bdf29130", "score": "0.7708483", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('employees')->insert([\n 'id' => $index,\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('12345678')\n ]);\n }\n $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "c31a689ff9ae8523f84c6d76cbc5c3ea", "score": "0.7707085", "text": "public function run()\n {\n $user = [\n 'name' => 'Heru Trijaya',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt(\"password\"),\n 'remember_token' => Str::random(10),\n 'created_at' => now(),\n ];\n DB::table('users')->insert($user);\n $user = [\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt(\"password\"),\n 'remember_token' => Str::random(10),\n 'created_at' => now(),\n ];\n DB::table('users')->insert($user);\n \\App\\Models\\Author::factory(10)->create();\n \\App\\Models\\Book::factory(10)->create();\n }", "title": "" }, { "docid": "5b9bc9e211e20662e2eb7209dd7f3c70", "score": "0.7703563", "text": "public function run()\n {\n Student::factory(10)->create();\n Post::factory(10)->create();\n Category::factory(10)->create();\n Category_Post::factory(10)->create();\n Comment::factory(10)->create();\n // $this->call([\n // TableFirst::class,\n // SubjectTableSeeder::class,\n // ThuanSeeder::class,\n // ]);\n }", "title": "" }, { "docid": "134a3a3db82b46df656b48877e3819ce", "score": "0.77008", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n // Seed the Time Zones\n //$this->call(TimeZonesTableSeeder::class);\n\n // Seed the Languages\n $this->call(LanguagesTableSeeder::class);\n\n // Seed the countries\n $this->call(CountriesTableSeeder::class);\n\n // Seed the setting table\n $this->call(SettingsTableSeeder::class);\n\n // Seed the company & company translation\n //$this->call(CompanySeeder::class);\n\n // Seed Brand table\n //$this->call(BrandSeeder::class);\n\n // Seed Vehicle table\n //$this->call(VehicleSeeder::class);\n\n // Seed dealership group table\n //$this->call(GroupSeeder::class);\n\n // Seed Dealership table\n //$this->call(DealershipSeeder::class);\n\n // Seed Event type table\n //$this->call(EventTypeSeeder::class);\n\n // Seed Event table\n //$this->call(EventSeeder::class);\n\n // Seed Region table\n //$this->call(RegionSeeder::class);\n\n // Seed Brand Dealership table\n //$this->call(BrandDealershipSeeder::class);\n\n\n // Seed User table\n $this->call(UserSeeder::class);\n\n // Seed Guest table\n// $this->call(GuestSeeder::class);\n }", "title": "" }, { "docid": "c9cd9baaee4f0804b80ef0f6ae5ccbb6", "score": "0.7700753", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n User::create([\n 'email' => '[email protected]',\n 'name' => 'Ceci',\n 'password' => bcrypt('123456'),\n 'role' => 'U'\n ]);\n User::create([\n 'email' => '[email protected]',\n 'name' => 'Emmanuel',\n 'password' => bcrypt('123456'),\n 'role' => 'U'\n ]);\n User::create([\n 'email' => '[email protected]',\n 'name' => 'Fabián Montero',\n 'password' => bcrypt('123456'),\n 'role' => 'A'\n ]);\n User::create([\n 'email' => '[email protected]',\n 'name' => 'Santiago Montero',\n 'password' => bcrypt('123456'),\n 'role' => 'U'\n ]);\n }", "title": "" }, { "docid": "cf80c34d1b3a3ce834cad902d96a49ae", "score": "0.7695887", "text": "public function run()\n {\n \\App\\Models\\User::factory(10)->create();\n $this->call(DicRegionsTableSeeder::class);\n $this->call(DicCitiesTableSeeder::class);\n $this->call(AdCategoriesTableSeeder::class);\n Adverts::factory()->count(100)->create();\n }", "title": "" }, { "docid": "8d26d80f703923cebce1f22a4b67618a", "score": "0.76952183", "text": "public function run()\n {\n\n //Make roles and permissions\n\t Role::create(['name' => 'user']); // normal register user\n\t Role::create(['name' => 'owner']); // owner club user\n\t Role::create(['name' => 'manager']); // portal manager\n\t Role::create(['name' => 'admin']); // admin with full permission\n\n //Start other seeders.\n $this->call([\n MusicTypesTableSeeder::class,\n\t VoivodeshipsTableSeeder::class,\n\t CitiesTableSeeder::class,\n UsersTableSeeder::class,\n\t ClubsTableSeeder::class,\n\t EventsTableSeeder::class,\n\t UserSettingsSeeder::class\n ]);\n\n }", "title": "" }, { "docid": "d95416047e958fc5cae8011cf9c8b698", "score": "0.7695155", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n for ($i=0; $i < 20; $i++) { \n \tPost::create([\n \t\t'title'=> $faker->sentence,\n \t\t'body'=> implode('',$faker->sentences(4))\n \t\t]);\n }\n }", "title": "" }, { "docid": "58e1005fcab19ab4f45f7567ad4fbe32", "score": "0.76921916", "text": "public function run()\n {\n //factory(App\\Category::class, 5)->create();\n $this->call(PageSeeder::class);\n $this->call(TagSeeder::class);\n $this->call([\n CategorySeeder::class,\n ProductCategorySeeder::class,\n ProductTagSeeder::class,\n RelationshipSeeder::class,\n \n ]);\n factory(App\\Comment::class, 200)->create();\n factory(App\\User::class, 25)->create();\n //factory(App\\ProductCategory::class,5)->create();\n factory('App\\Post',50)->create();\n factory('App\\Product',80)->create();\n }", "title": "" }, { "docid": "07d21e2f0b22563e12932cf198047658", "score": "0.7690095", "text": "public function run()\n {\n $faker = Faker::create();\n $products = c2a(Product::lists('id'));\n $users = c2a(User::lists('id'));\n\n foreach (range(1, 20) as $index) {\n Topic::create([\n 'title' => $faker->sentence(6),\n 'slug' => $faker->name,\n 'product_id' => $faker->randomElement($products),\n 'user_id' => $faker->randomElement($users),\n 'keywords' => $faker->sentence,\n 'description' => $faker->sentence(10),\n 'content' => $faker->sentence(100),\n 'page_view_count' => rand(10, 3059),\n 'vote_count' => rand(0, 199),\n 'reply_count' => rand(0, 100)\n ]);\n }\n\n }", "title": "" }, { "docid": "454fbceec11c7288d6d51c17b75dacd8", "score": "0.7688257", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(\\App\\User::class, 1)->create([\n 'email' => '[email protected]',\n 'role' => \\App\\User::ROLE_ADMIN\n ]);\n\n factory(\\App\\User::class, 1)-> create([\n 'email' => '[email protected]'\n ]);\n\n $this->call(PostTableSeeder::class);\n $this->call(TbSinproAdminPermissaoSeeder::class);\n// factory(\\App\\Post::class, 20)->create();\n\n }", "title": "" }, { "docid": "201732e6ba9e0b6eef969d5379841fde", "score": "0.7688141", "text": "public function run()\n {\n //factory(\\App\\Models\\User::class, 10)->create();\n\n $users = \\App\\Models\\Role::all()->pluck('id')->toArray();\n\n /**\n * Creating seeder for every role\n */\n for ($i = 1; $i < (sizeof($users)); $i++) {\n DB::table('users')->insert([\n\n 'name' => 'Janko',\n 'email' => 'janko' . $i . '@gmail.com',\n 'surname' => 'Mrkvicka',\n 'password' => bcrypt('test123'),\n 'email_verified_at' => now(),\n 'id_role' => $users[$i - 1],\n 'created_at' => now(),]);\n }\n\n }", "title": "" }, { "docid": "d0ebc0b2fe28ccfde9a1ac80f9ebf4ad", "score": "0.768708", "text": "public function run()\n {\n $this->call(UserTableSeeder::class);\n // $this->call(MissionTableSeeder::class);\n factory(App\\Models\\Mission::class, 20)->create();\n factory(App\\Models\\Project::class, 20)->create();\n factory(App\\Models\\News::class, 20)->create();\n factory(App\\Models\\Event::class, 20)->create();\n }", "title": "" }, { "docid": "2603f00e40c258c840226bb9122a174d", "score": "0.76867145", "text": "public function run() {\n $this->call(AppConfigSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(TopicTableSeeder::class);\n $this->call(BankTableSeeder::class);\n $this->call(ProvinceTableSeeder::class);\n\n // factory(App\\Product::class, 100)\n // ->create()\n // ->each(function ($product) {\n // $product->fees()->saveMany(factory(App\\ProductFee::class, 3)->create([\n // 'product_id' => $product->id,\n // ]));\n // });\n }", "title": "" }, { "docid": "0e51afc722eeda1b1ce5a397b6fed9ba", "score": "0.76860857", "text": "public function run()\n {\n \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\ItemCondition::factory(10)->create();\n\n $this->call([\n PrimaryCategorySeeder::class,\n SecondaryCategorySeeder::class,\n // ItemConditionSeeder::class,\n ]);\n\n DB::table('users')->insert([\n 'name' => 'root',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'remember_token' => Str::random(10),\n 'password' => Hash::make('11111111'),\n ]);\n }", "title": "" }, { "docid": "869949cd0ca1c0b3e62d490a128b7a0b", "score": "0.76857895", "text": "public function run()\n {\n $this->call(ReputationsTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(PublishersTableSeeder::class);\n $this->call(AuthorsTableSeeder::class);\n $this->call(TagsTableSeeder::class);\n $this->call(BooksTableSeeder::class);\n // $this->call(UserImagesTableSeeder::class);\n // $this->call(BookImagesTableSeeder::class);\n // $this->call(AuthorImagesTableSeeder::class);\n // $this->call(ScoresTableSeeder::class);\n\n $this->call(AuthorBookTableSeeder::class);\n $this->call(BookTagTableSeeder::class);\n // $this->call(RoleUserTablerSeeder::class);\n\n // factory(App\\User::class, 35)->create();\n\n // factory(App\\Score::class, 100)->create();\n\n factory(App\\Review::class, 35)->create();\n\n // factory(App\\ReviewResponse::class, 35)->create();\n\n $this->call(SocialMediasTableSeeder::class);\n }", "title": "" }, { "docid": "989db8f23e2aa4fc9b9956c2987e7b19", "score": "0.7683379", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create('en_GB');\n\n \\App\\User::create([\n 'name' => env('ADMIN_NAME', ''),\n 'email' => env('ADMIN_EMAIL', ''),\n 'email_verified_at' => now(),\n 'password' => bcrypt(env('ADMIN_PASSWORD', '')),\n 'role' => 'admin',\n 'created_at' => now(),\n ]);\n\n // Added seed of random UK address data for ease\n for ($i = 0; $i < 10; $i++) \n {\n \\App\\Restaurant::create([\n 'name' => $faker->name,\n 'street' => $faker->streetName,\n 'city' => $faker->city,\n 'postcode' => $faker->postcode\n ]);\n }\n }", "title": "" }, { "docid": "ec07eb0122812cf17ee5e1ceaae51aeb", "score": "0.7680502", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n factory(Subscriber::class, 2)->create();\n factory(Shop::class, 10)->create();\n factory(Music::class, 10)->create();\n factory(Video::class, 2)->create();\n\n }", "title": "" }, { "docid": "51a1f86bae6860c0a7c4877c0fefde5c", "score": "0.76785475", "text": "public function run()\n {\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('password')\n ]);\n User::create([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => bcrypt('password')\n ]);\n\n Companies::create([\n 'name' => 'Mark Zuckenberg',\n 'email' => '[email protected]',\n 'website' => 'https://www.facebook.com/'\n ]);\n\n Companies::create([\n 'name' => 'Kevin Systrom',\n 'email' => '[email protected]',\n 'website' => 'https://www.instagram.com/'\n ]);\n\n // Companies::factory(5)->create();\n\n Employees::factory(20)->create();\n }", "title": "" }, { "docid": "68c5a5f69b2f6ff14c735017c7d3ac07", "score": "0.76763934", "text": "public function run()\n {\n $this->call([\n ItemSeeder::class,\n PropertySeeder::class,\n ItemPropertiesSeeder::class,\n\n ]);\n /*\n \\App\\Models\\Item::factory(10)->create();\n \\App\\Models\\Property::factory(10)->create();\n \\App\\Models\\ItemProperties::factory(10)->create();\n */\n \\App\\Models\\User::create([\n 'name' => 'simple',\n 'email' => '[email protected]',\n 'password' =>Hash::make('simple'),\n ]);\n \n\n\n }", "title": "" }, { "docid": "040547254a75eaa4c796f44c64dd6435", "score": "0.76726955", "text": "public function run()\n {\n $user_ids = ['1','2','3','4','5'];\n\n\t\t$faker = app(Faker\\Generator::class);\n\n $posts = factory(Post::class)->times(50)->make()->each(function ($post) use ($faker, $user_ids) {\n $post->user_id = $faker->randomElement($user_ids);\n });\n\n Post::insert($posts->toArray());\n }", "title": "" }, { "docid": "bd269fc9c6211e950f76f57cd2214618", "score": "0.76678604", "text": "public function run()\n {\n\n $data = [\n ['name'=>'Computer Science'],\n ['name'=>'Pharmacy'],\n ['name'=>'Psychology'],\n ['name'=>'Medicine'],\n ['name'=>'Dentistry'],\n\n ];\n $faker = Faker::create();\n foreach($data as $d){\n DB::table('faculties')->insert([\n 'name' => $d['name'],\n 'description' => $faker->sentence,\n ]);\n }\n }", "title": "" }, { "docid": "b8157e614e83d25d500f4d94dffc10e8", "score": "0.76667905", "text": "public function run()\n {\n m_dosens::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 m_dosens::create([\n 'body' => $faker-> paragraph,\n 'id'=> $faker -> rand(),\n 'nama_dosen'=> $faker -> sentence,\n 'matkul'=> $faker -> sentence,\n 'ruang kelas' => $faker -> sentence,\n $table->timestamps(),\n ]);\n }\n }", "title": "" }, { "docid": "f3ec341e6252123b6f3f5aacac2d5793", "score": "0.7664834", "text": "public function run()\n {\n \\App\\Models\\Address::factory(20)->create(); // php artisan db:seed --class=AddressSeeder\n \\App\\Models\\User::factory(15)->create(); // php artisan db:seed --class=UserSeeder\n \\App\\Models\\Admin::factory(4)->create(); // php artisan db:seed --class=AdminSeeder\n \\App\\Models\\Client::factory(16)->create(); // php artisan db:seed --class=ClientSeeder\n \\App\\Models\\Unit::factory(5)->create(); // php artisan db:seed --class=UnitSeeder\n \\App\\Models\\Category::factory(13)->create(); // php artisan db:seed --class=CategorySeeder\n \\App\\Models\\Market::factory(20)->create(); // php artisan db:seed --class=MarketSeeder\n \\App\\Models\\Product::factory(30)->create(); // php artisan db:seed --class=ProductSeeder\n // \\App\\Models\\Rating::factory(10)->create(); // php artisan db:seed --class=RatingSeeder\n // \\App\\Models\\Price::factory(30)->create(50); // php artisan db:seed --class=PriceSeeder\n }", "title": "" }, { "docid": "e6df187fdede5a2fd76c7dced952e9f5", "score": "0.76642543", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'username' => 'Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('Admin')\n ]);\n Author::factory(30)->create()->each(function($author){\n $volumes = Volum::factory(10)->make();\n $author->volums()->saveMany($volumes);\n });\n\n }", "title": "" }, { "docid": "c184051466e0849a143a12cd08517914", "score": "0.76604694", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // DB::table('socios')->insert(['nombre'=>'pepe','dni'=>'12345678','direccion'=>'por ahi 222','nacimiento'=>'2020-10-10','email'=>'[email protected]','telefono'=>'456798456','url'=>'www.google.com']);\n // DB::table('socios')->insert(['nombre'=>'juan','dni'=>'12332378','direccion'=>'por allk 222','nacimiento'=>'2010-10-10','email'=>'[email protected]','telefono'=>'223242434','url'=>'www.google1.com']);\n \\App\\Models\\Estado::factory(3)->create();\n \\App\\Models\\Socios::factory(10)->create();\n //$this->call(SociosSeeder::class);\n }", "title": "" }, { "docid": "ffe63233202bdd209cfbffd2e2f07ebd", "score": "0.7660093", "text": "public function run()\n {\n Author::factory(50)->create();\n Books::factory(100)->create();\n $this->call(UserTableSeeder::class);\n $this->call(ShelveTableSeeder::class);\n $this->call(ShelveBookSeeder::class);\n }", "title": "" }, { "docid": "bb85cd62424281e6a7862cad3a9b9b5a", "score": "0.7659672", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'luoyinghao',\n 'email' => '[email protected]',\n 'group_id' => 1,\n 'status' => 1,\n 'password' => bcrypt('123456'),\n ]);\n\n DB::table('pet')->insert([\n 'name' => 'default',\n 'nick' => '弹幕娘',\n 'user_id' => 1,\n ]);\n\n DB::table('user_pet')->insert([\n 'user_id' => 1,\n 'pet_id' => 1,\n 'exp' => 1,\n ]);\n\n DB::table('event')->insert([\n 'sender' => '系统',\n 'sender_id' => 0,\n 'action' => 7,\n 'target' => 0,\n 'target_type' => 'announce',\n 'content' => '这是通告,通告听到了吗?听到了请回答,听到了请回答',\n 'type' => 'remind',\n 'receiver' => 0,\n 'is_read' => 1,\n 'time' => date('Y-m-d H:i:s')\n ]);\n\n }", "title": "" }, { "docid": "d200dedc6a0dba3a8fcc4d5cb3b5af61", "score": "0.7659325", "text": "public function run()\n {\n /* $this->call(UsersTableSeeder::class);\n $this->call(CollectoinsTableSeeder::class);\n $this->call(Extra_itemsTableSeeder::class);\n $this->call(AdditionalsTableSeeder::class);*/\n\n\n DB::table('roles')-> insert([\n [\n 'name' => 'Admin',\n 'alias' => 'admin',\n 'created_at' => date(\"Y-m-d H:i:s\")\n ],\n [\n 'name' => 'User',\n 'alias' => 'user',\n 'created_at' => date(\"Y-m-d H:i:s\")\n ]\n ]);\n\n\n }", "title": "" }, { "docid": "a5ce77c3e99f12ab19018d9164fdffc8", "score": "0.76591766", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $directors=factory(App\\Director::class)->times(7)->create();\n $movies=Movie::all();\n\n foreach ($movies as $oneMovies) {\n $oneMovies->director()->associate($directors->random(1)->first()->id);\n $oneMovies->save();\n }\n\n }", "title": "" }, { "docid": "d26cbbf9444f51683da0101c8bae9147", "score": "0.7656243", "text": "public function run()\n {\n //create a known demo user\n User::factory()->create([\n 'email' => '[email protected]'\n ]);\n\n $this->call([\n UserTableSeeder::class,\n ]);\n\n Quiz::factory()->count(20)->create()->each(function($c) {\n $c->mcqs()->saveMany(\n MCQ::factory()->count(random_int(10,50))->create()\n );\n });\n }", "title": "" }, { "docid": "5340b733c0c35d4a0890dae51ca9f01e", "score": "0.7655571", "text": "public function run()\n {\n $this->truncateUserTables();\n\n \\App\\Models\\User::firstOrCreate([\n 'name' => 'Admin User',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin1123'),\n ]);\n\n $faker = Faker::create();\n\n foreach (range(1, 25) as $index) {\n \\App\\Models\\Student::create([\n 'fullname' => $faker->firstname,\n 'roll' => $index,\n 'propic' => null,\n ]);\n }\n }", "title": "" }, { "docid": "a48cd5bbd88c4d067c54457c50be726c", "score": "0.7653848", "text": "public function run()\n {\n $this->truncateTables([\n 'users',\n 'images',\n 'likes',\n 'comments'\n ]);\n \n User::factory(10)->create();\n Image::factory(10)->create();\n Like::factory(10)->create();\n Comment::factory(10)->create();\n\n $this->call([\n UserSeeder::class,\n ]);\n }", "title": "" }, { "docid": "786ba8399b50f481be52bd7398718a58", "score": "0.76531196", "text": "public function run()\n {\n //$this->call(CitySeeder::class);\n \n City::factory(12)->create();\n $this->call(VehicleSeeder::class);\n \n //$this->call(TelephoneSeeder::class);\n \n Telephone::factory(50)->create();\n Rental::factory(100)->create();\n\n }", "title": "" }, { "docid": "e6f06365d22e1b28b3bd14b58444dc04", "score": "0.76521194", "text": "public function run()\n {\n\n $faker = Faker::create();\n\n foreach(range(1,10) as $index){\n DB::table('iis_interpret')->insert([\n 'name' => $faker->sentence(3, true),\n 'members' => $faker->sentence(3, true),\n 'genre' => $faker->randomElement($array = array ('pop','rock','rap', 'metal', 'punk')),\n 'publisher' => $faker->word(),\n 'image' => $faker->imageUrl($width = 1280, $height = 720),\n 'description' => $faker->paragraph(2),\n 'formed_at' => $faker->date($format = 'Y-m-d H:i:s', $max = 'now'),\n 'created_at' => $faker->date($format = 'Y-m-d H:i:s', $max = 'now'),\n 'updated_at' => $faker->date($format = 'Y-m-d H:i:s', $max = 'now')\n ]);\n }\n\n }", "title": "" }, { "docid": "c8e097995b44d3b77d7922d45d3e7d18", "score": "0.7651747", "text": "public function run()\n {\n Model::unguard();\n\n // https://gist.github.com/isimmons/8202227\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n User::truncate();\n Category::truncate();\n Post::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $categories = factory(App\\Category::class, 30)->create();\n\n factory(App\\User::class, 10)->create()->each(function($user) use ($categories) {\n $user->posts()->saveMany(factory(App\\Post::class, 50)->create()->each(function($post) use ($categories) {\n $post->categories()->sync($categories->random(3)->pluck('id')->all());\n }));\n });\n\n Model::reguard();\n }", "title": "" }, { "docid": "b95080596763428b065e5fbdb7fdf0c5", "score": "0.7650356", "text": "public function run()\n {\n $faker \t= Factory::create('id_ID');\n \t$data \t= [];\n \tforeach (range(1,50) as $i) {\n \t\t$data[] = [\n \t\t\t'title' \t\t=> 'Beli Deposit',\n \t\t\t'content'\t\t=> 'Membeli deposit sebesar 50000',\n \t\t\t'user_id'\t\t=> '38',\n \t\t\t'created_at'\t=> $faker->datetime,\n \t\t\t'updated_at'\t=> now(),\n \t\t];\n \t}\n \tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\n \tDB::table('activities')->truncate();\n \tDB::table('activities')->insert($data);\n }", "title": "" }, { "docid": "4caecf4e2dbd3c5accb7ad81244e8ae2", "score": "0.76480454", "text": "public function run()\n {\n // seed of perfis\n DB::table('perfis')->insert([\n [\n 'id' => 1,\n 'name' => 'admin',\n 'display_name' => 'Administrador',\n 'description' => 'Perfil de administrador',\n ],\n [\n 'id' => 2,\n 'name' => 'usuario',\n 'display_name' => 'Usuario',\n 'description' => 'Perfil do Usuario que aloca e compra imoveis.',\n ],\n ]);\n\n /**\n * Adicionar a permissao para os usurios da seed\n */\n DB::table('usuarios_perfis')->insert([\n [\n 'usuario_id' => 1,\n 'perfil_id' => 1\n ],\n [\n 'usuario_id' => 2,\n 'perfil_id' => 1\n ],\n [\n 'usuario_id' => 3,\n 'perfil_id' => 1\n ],\n [\n 'usuario_id' => 4,\n 'perfil_id' => 1\n ],\n [\n 'usuario_id' => 5,\n 'perfil_id' => 1\n ],\n [\n 'usuario_id' => 6,\n 'perfil_id' => 2\n ],\n ]);\n }", "title": "" }, { "docid": "4f4496d20543369fd27d03bb58fe3133", "score": "0.76468253", "text": "public function run()\n {\n $faker = app(Faker\\Generator::class);\n $user = User::find(1);\n\n $topics = factory(Topic::class)->times(rand(100, 200))->make()->each(function ($topic) use ($faker, $user) {\n $topic->user_id = 1;\n $topic->category_id = 1;\n $topic->is_excellent = rand(0, 1) ? 'yes' : 'no';\n });\n Topic::insert($topics->toArray());\n }", "title": "" }, { "docid": "4ac022527ef235783677bc6ef115503d", "score": "0.76461226", "text": "public function run()\n {\n $this->call(BlogArticlesCategoriesTableSeeder::class);\n $this->call(ProductsCategoriesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(BlogEventsCategoriesTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n factory(\\App\\Models\\User::class, 50)->create();\n factory(\\App\\Models\\BlogEvent::class, 50)->create();\n factory(\\App\\Models\\BlogArticle::class, 50)->create();\n\n }", "title": "" }, { "docid": "8945612ec7a49f0f1852938590417f44", "score": "0.7646043", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('items')->insert([\n ['name' => '1 More E1001 Triple Driver IEM'],\n ['name' => '1 More E1001 Triple Driver IEM (Demo)'],\n ['name' => '1 More Piston Fit'],\n ['name' => 'ALO Litz MMCX 2.5'],\n ['name' => 'ATH-AR1iS'],\n ['name' => 'ATH-DSR7BT Black'],\n ['name' => 'ATH-LS50iS Black'],\n ['name' => 'ATH-LS70iS Black'],\n ]);\n }", "title": "" }, { "docid": "68bf7d23d85baec30f2ba67a6fa4e4b6", "score": "0.76455927", "text": "public function run()\n {\n $this->studentSkillsSeeder();\n $this->studentTagsSeeder();\n }", "title": "" }, { "docid": "8494dc0b48ead42c5e9f8183bb5471d3", "score": "0.76453424", "text": "public function run()\n {\n \\App\\User::truncate();\n $faker = Faker\\Factory::create();\n for($i=0;$i<50;$i++){\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'lastName' => $faker->lastName,\n 'email' => $faker->email,\n 'sex' => 'f',\n 'phone' => $faker->phoneNumber,\n 'pesel' => $faker->randomDigit,\n 'role' => 'user',\n 'password' => bcrypt('secret'),\n ]);\n }\n DB::table('users')->insert([\n 'name' => 'Sample',\n 'lastName' => 'Example',\n 'email' => \"[email protected]\",\n 'sex' => 'f',\n 'phone' => $faker->phoneNumber,\n 'pesel' => $faker->randomDigit,\n 'role' => 'admin',\n 'password' => bcrypt('secret'),\n ]);\n }", "title": "" } ]
d9eea56b78c5a3ca19e0b56b3c7d0338
Runs Delete Pos Backend Entity test
[ { "docid": "cbc49430076be710cc8661eecc073a2d", "score": "0.6701512", "text": "public function testDeletePosEntity(Pos $pos)\n {\n // Preconditions:\n $pos->persist();\n\n // Steps:\n $filter = ['pos_name' => $pos->getPosName()];\n $this->posIndexPage->open();\n $this->posIndexPage->getPosGrid()->searchAndOpen($filter);\n $this->posEditPage->getFormPageActions()->delete();\n $this->posEditPage->getModalBlock()->acceptAlert();\n }", "title": "" } ]
[ { "docid": "22dca2d72ec2a9e5a3868393515e6015", "score": "0.7758433", "text": "public function testDelete() {\r\n\t}", "title": "" }, { "docid": "719c1864cd169f91807cb175b264898e", "score": "0.75901395", "text": "public function testSalesProbabilitiesIdDelete()\n {\n\n }", "title": "" }, { "docid": "a7a4cd87d954ac5ea602e34f2b6690fb", "score": "0.7578966", "text": "public function testDelete()\n {\n }", "title": "" }, { "docid": "a7a4cd87d954ac5ea602e34f2b6690fb", "score": "0.7578966", "text": "public function testDelete()\n {\n }", "title": "" }, { "docid": "bc76e78acb7b8e22867d300be8d7611f", "score": "0.7529416", "text": "public function test_delete_item() {\n\t}", "title": "" }, { "docid": "8997700da58a1e1047589f70b573c272", "score": "0.7514064", "text": "public function testDeleteProductionModel()\n {\n }", "title": "" }, { "docid": "b101b714306eb31e82aa6bfcaf1c1c13", "score": "0.74353164", "text": "public function test_deleteAsn() {\n\n }", "title": "" }, { "docid": "4d19a019b37d868877126140c272f49a", "score": "0.7421491", "text": "public function testDeleteStoreItem()\n {\n }", "title": "" }, { "docid": "682f166eebf1e06c0c9e3cb0fe01decf", "score": "0.7365291", "text": "public function testCoreModelDelete() {\n $stringIdentifier = \"deleteTestIdentifier\";\n $trophyType = new Trophytype();\n $trophyType->setName($stringIdentifier);\n $this->trophyTypeModel->create($trophyType, true);\n\n//Make sure that it exists in the database, by finding it and asserting its identifier.\n//If it does not exist, the assertion will fail.\n $dbTrophyType = $this->trophyTypeModel->findOneBy(['name' => $stringIdentifier]);\n $this->assertEquals($stringIdentifier, $dbTrophyType->getName());\n\n//Use the delete method to delete the record from the db and make sure it really doesn't exist\n $this->trophyTypeModel->delete($dbTrophyType, true);\n\n try {\n $dbTrophyTypeCheck = $this->trophyTypeModel->findOneBy(['name' => $stringIdentifier]);\n dump($dbTrophyTypeCheck);\n } catch (\\Exception $e) {\n $dbTrophyTypeCheck = \"Not found\";\n }\n\n $this->assertEquals($dbTrophyTypeCheck, \"Not found\");\n }", "title": "" }, { "docid": "20f575f77088be7b8a13cefca2b66310", "score": "0.7297122", "text": "public function testDelete()\n {\n //Tests by id\n $this->clientAuthenticated->request('DELETE', '/pickup/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Tests by registrationId\n $this->clientAuthenticated->request('DELETE', '/pickup/delete-registration/1');\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Pickup', 'pickupId', self::$objectId);\n $this->deleteEntity('Pickup', 'pickupId', self::$objectId + 1);\n $this->deleteEntity('Pickup', 'pickupId', self::$objectId + 2);\n $this->deleteEntity('Pickup', 'pickupId', self::$objectId + 3);\n $this->deleteEntity('Pickup', 'pickupId', self::$objectId + 4);\n }", "title": "" }, { "docid": "0b5a1fa79649b946c5e8f205fcf8242f", "score": "0.7282602", "text": "public function testDelete3()\n {\n }", "title": "" }, { "docid": "f71d338f9e8940e6b9d1161644be2113", "score": "0.72795653", "text": "public function testDelete1()\n {\n }", "title": "" }, { "docid": "1894076873018aca7a96b8929006417a", "score": "0.7274871", "text": "public function testDelete2()\n {\n }", "title": "" }, { "docid": "79ff691e96f261fd57eb0a29be18d921", "score": "0.724058", "text": "public function testDelete()\n {\n $id = 1;\n $this->repository->delete($id);\n \n $this->assertTrue(true);\n }", "title": "" }, { "docid": "28927b6c68ebdbfa2ac55a987eb9bddb", "score": "0.7236468", "text": "public function testDelete4()\n {\n }", "title": "" }, { "docid": "948480605833a427666bc469b7103d93", "score": "0.7166271", "text": "abstract public function delete( $entity );", "title": "" }, { "docid": "92d8dc7097f912cb1845b7f82d98d660", "score": "0.7148691", "text": "public function testProjectProjectsIdDelete()\n {\n\n }", "title": "" }, { "docid": "9c84d1300efcb4311de589bedf09f362", "score": "0.7146472", "text": "public function testProductSizesIdProductsFkDelete()\n {\n\n }", "title": "" }, { "docid": "9c826577a16ade5b00fb5fedd8bcb29b", "score": "0.7123882", "text": "public function testDelete6()\n {\n }", "title": "" }, { "docid": "100728eb1ddd471f54c4ffca23fcbf08", "score": "0.71026623", "text": "public function testProductSizesIdProductsDelete()\n {\n\n }", "title": "" }, { "docid": "46df0f56dfee105227a9239695d9088c", "score": "0.7096529", "text": "public function testDelete()\n {\n // init\n $this->defineDebuggerAgent();\n $Test = new \\Test();\n\n $r = $Test->Delete(1);\n\n // assets\n $this->assertFalse($r);\n }", "title": "" }, { "docid": "caaebc7b46138ef1614e44c9e5012a98", "score": "0.7086384", "text": "public function testDeleteProductionModelTag()\n {\n }", "title": "" }, { "docid": "9e956d1e97e12916c039dc91ccefd67b", "score": "0.70795166", "text": "public function testDeleteItemTemplate()\n {\n }", "title": "" }, { "docid": "35ef8c29b8ca9563fe4fb5eed2e89340", "score": "0.7065835", "text": "public function testDeleteClientStatusUsingDelete()\n {\n }", "title": "" }, { "docid": "aff0efe64eb293bc2ea06b66592c1fd5", "score": "0.7053947", "text": "public function testDeleteClientUsingDelete()\n {\n }", "title": "" }, { "docid": "2d72fae31f0373ea4bea56f428244ada", "score": "0.70326155", "text": "public function test_deleteProgramById() {\n\n }", "title": "" }, { "docid": "a318782ef78265cca060d396c8a3c282", "score": "0.70058197", "text": "public function Delete($entity)\n {\n }", "title": "" }, { "docid": "8b135655bf027e03447de34f80da2444", "score": "0.70037055", "text": "public function testDelete()\n {\n $client = new Client();\n $client->name = 'Steve Jobs';\n $client->login = 'steve<br> ';\n $client->password = 'teste';\n $client->status = 'ATIVO';\n\n $this->em->persist($client);\n $this->em->flush();\n\n $saved = $this->em->find('Api\\Model\\Client', $client->id);\n $id = $saved->id;\n $this->em->remove($saved);\n $this->em->flush();\n\n $saved = $this->em->find('Api\\Model\\Client', $id);\n $this->assertNull($saved);\n\n }", "title": "" }, { "docid": "a06e62ab8855bca8f9ae76566ca81678", "score": "0.7001905", "text": "public function testDeleteVehicle()\n {\n }", "title": "" }, { "docid": "d42dab2c1056cf07f60115a8ff909fe2", "score": "0.70008725", "text": "public function Delete($entity) {\n }", "title": "" }, { "docid": "d42dab2c1056cf07f60115a8ff909fe2", "score": "0.70008725", "text": "public function Delete($entity) {\n }", "title": "" }, { "docid": "ceac379196d2f6ec93a43fce8fd158ab", "score": "0.6987181", "text": "public function testDeleteFromIndexAction(): void {\n // Load datas\n $skillLevel = new SkillLevel();\n $skillLevel\n ->setCurrentLocale(\"fr\")\n ->translate()->setTitle('Test');\n $this->loadDatas($this->getEntityManager(), [$skillLevel]);\n\n // Login and go to the index page.\n $crawler = $this->logInAdmin();\n $client = $this->getClient();\n $crawler = $client->click($crawler->selectLink(\"Gestion des niveaux de compétence\")->link());\n\n $this->assertEquals(1, $crawler->filter(\"#skilllevel-container > .row > div\")->count(), \"1. The page has to contain 1 item.\");\n\n // Delete the entity.\n $client->submit($crawler->selectButton('Supprimer')->form());\n $crawler = $client->followRedirect();\n\n $this->assertContains(\"Il n'y a aucune donnée pour le moment !\",\n $crawler->filter(\"#skilllevel-container\")->text(), \"2. The container should have the no-item message\");\n }", "title": "" }, { "docid": "b9a32cc886eab6e35c8309911aa4bc37", "score": "0.69768274", "text": "public function testDelete5()\n {\n }", "title": "" }, { "docid": "b9a32cc886eab6e35c8309911aa4bc37", "score": "0.69768274", "text": "public function testDelete5()\n {\n }", "title": "" }, { "docid": "8a7230fef68ed8584a6d3695b2a2533e", "score": "0.6954207", "text": "public function testProductSizesIdSizeMaterialsFkDelete()\n {\n\n }", "title": "" }, { "docid": "2ceba328f67e453fc188d28fb1da8df0", "score": "0.69374096", "text": "public function testDeleteTodo() {\n $todo = factory(Todo::class)->create();\n $todoRepository = new TodoRepository($todo);\n $todoRepository->delete();\n\n $this->assertSoftDeleted('todos', [\n 'id'=> $todo->id,\n ]);\n\n }", "title": "" }, { "docid": "9f6e29d999b09c5873f9cc88014acfc4", "score": "0.6936947", "text": "public function testDelete()\n\t{\t// to be done later\n /*Input::replace($this->drugData);\n $drug = new DrugController;\n $drug->store();\n\t\t$drugStored = Drug::orderBy('id','desc')->take(1)->get()->toArray();\n\n $drug->delete($drugStored[0]['id']);\n\n\t\t$drugDeleted = Drug::withTrashed()->find($drugStored[0]['id']);\n\t\t$this->assertNotNull($drugDeleted->deleted_at);*/\n\t}", "title": "" }, { "docid": "6df21491083753d632723a6eb452b654", "score": "0.6935305", "text": "public function test_delete() {\n $this->get_tournament_inactive();\n $this->assertTrue($this->object->delete());\n $this->assertNull($this->object->id);\n $this->assertNull($this->object->title);\n }", "title": "" }, { "docid": "4fb316a320108108eb750abffd1f9882", "score": "0.69241023", "text": "public function testDelete()\n {\n $this->name = 'test5';\n //does not matter what you give after id, id is the most important, and the function is gonna take only id anyway\n $this->vals = ['id' => 123123, 'first_name' => 'Somebody'];\n $this->delete();\n }", "title": "" }, { "docid": "089f9252c8c864d5616da93a194fbdef", "score": "0.6924098", "text": "public function delete($entity)\n {\n }", "title": "" }, { "docid": "06a5c16c8e3ac4fdb9e9559ce62bd32e", "score": "0.69220465", "text": "public function testProductSizesIdMaterialsFkDelete()\n {\n\n }", "title": "" }, { "docid": "80dc4c28ffe5bba68eba30c829fc3b19", "score": "0.6920411", "text": "public function testDelete8()\n {\n }", "title": "" }, { "docid": "6982c79be47713417ffaed3124a15c15", "score": "0.691444", "text": "public function testDeletion()\n {\n $fixture = new ContactEmailDataFixture();\n $fixture->load($this->entityManager);\n\n /**\n * @var Appbundle\\Repository\\ContactEmailRepository\n */\n $repository=$this->entityManager->getRepository(ContactEmail::class);\n\n $emailToDelete='[email protected]';\n $repository->deleteEmail($emailToDelete);\n\n $emailSearched=$repository->findOneBy(['email'=>$emailToDelete]);\n $this->assertEmpty($emailSearched);\n }", "title": "" }, { "docid": "def4930ee14b0a20fdb3906e6f7521d1", "score": "0.69110125", "text": "public function testDeletePage()\n {\n }", "title": "" }, { "docid": "0d8067517819d01014ee2e55697229bf", "score": "0.6900674", "text": "public function testDeleteTeachingClassStudentItem()\n {\n }", "title": "" }, { "docid": "6faf1ada7196598c34e623313c90aca2", "score": "0.68979925", "text": "public function testDelete()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "fe6616f27f3dc3d7685e81c600d0f9b5", "score": "0.6890525", "text": "public function testDeleteDatatableEntries2()\n {\n }", "title": "" }, { "docid": "99fd6a5a526940d440c9ec621ed0ae74", "score": "0.6877314", "text": "public function testProcurementCategoriesIdDelete()\n {\n\n }", "title": "" }, { "docid": "271c45cfca92ee9a46ae414cc14357c4", "score": "0.6866529", "text": "public function testDevicesDeviceDeletePost()\n {\n }", "title": "" }, { "docid": "a219006d92756cfdf02bbe0b64f26930", "score": "0.6864745", "text": "public function testDeleteProductionModelFile()\n {\n }", "title": "" }, { "docid": "9f8f1a02985f3731db6db190fdfaf568", "score": "0.686079", "text": "public function test_deleteWorkTag() {\n\n }", "title": "" }, { "docid": "a729c604903346013f0877cc31054318", "score": "0.68597156", "text": "public function testProductSizesIdMaterialsRelFkDelete()\n {\n\n }", "title": "" }, { "docid": "1701ea064b8f6a4c24620d33ff643e32", "score": "0.68412423", "text": "public function testDelete(){\n \n $data = new Uploadinfo();\n $data->setFirstName(\"Test First Name\");\n $data->setLastName(\"Test last Name\");\n $data->setAddress(\"Test Address\");\n $data->setAddressTwo(\"Address Two\");\n $data->setEmail(\"[email protected]\");\n $data->setCreatedDate(new \\DateTime(\"now\"));\n $data->setModifiedDate(new \\DateTime(\"now\"));\n $data->setPhone(\"98899898989\");\n $this->em ->persist($data);\n $this->em ->flush();\n \n $row = $this->em->createQuery(\"SELECT a.id FROM uploadBundle:Uploadinfo a order by a.id desc\")->getScalarResult(); \n $id = $row[0]['id'];\n $crawler = $this->client->request('POST', '/delete',array('id'=>$id));\n $this->assertTrue($this->client->getResponse()->isSuccessful());\n \n }", "title": "" }, { "docid": "c308724d2ff67247a8c9eb44e2066cb2", "score": "0.6836029", "text": "public function testPostJobDelete()\n {\n }", "title": "" }, { "docid": "462e3341a13b7da565e6e6f4d8cba7a3", "score": "0.6832366", "text": "public function testDeleteProductMix()\n {\n }", "title": "" }, { "docid": "6697037c36b3188cd9e246a866c4793a", "score": "0.68111706", "text": "public function testTeamDelete()\n {\n }", "title": "" }, { "docid": "7a5cbbc9e62e19a4a654e9da5bcdd325", "score": "0.6802399", "text": "public function testStockDelete()\n {\n //create stock\n $record = factory(self::model)->create();\n \n //delete post\n $this->post(route(self::baseRoute . '.delete', ['product' => $record->product_id, self::singularName => $record->id]));\n\n //check not exists on db\n $this->assertFalse((self::model)::where('id', $record->id)->exists());\n }", "title": "" }, { "docid": "88b256df4cbda1eba669d37ed93254c7", "score": "0.6801149", "text": "public function testDelete()\n {\n $table = TableRegistry::get('SiteAuthors');\n $table->save(new \\Cake\\ORM\\Entity(['id' => 1, 'site_id' => 2]));\n $entity = $table->get([1, 1]);\n $result = $table->delete($entity);\n $this->assertTrue($result);\n\n $this->assertEquals(4, $table->find('all')->count());\n $this->assertEmpty($table->find()->where(['id' => 1, 'site_id' => 1])->first());\n }", "title": "" }, { "docid": "04edae2b6a8db783b4c0878cfca54170", "score": "0.6798441", "text": "public function testStandardDelete()\n {\n $this->utility->impersonate('administrator');\n\n list($type, $entry) = $this->_createTestTypeAndEntry();\n $this->request->setMethod('POST');\n $this->dispatch('/content/delete/id/'. $entry->getId());\n $responseBody = $this->getResponse()->getBody();\n $this->assertModule('content', __LINE__ .': Last module run should be content module.'. $responseBody);\n $this->assertController('index', __LINE__ .': Expected controller'. $responseBody);\n $this->assertAction('delete', __LINE__ .': Expected action'. $responseBody);\n\n // expect redirect to manage index.\n $this->assertRedirectTo('/', __LINE__ .': Expect redirect to content manage index.'. $responseBody);\n }", "title": "" }, { "docid": "d0196dc53de3c72cb2a1c58790ae3a7a", "score": "0.6795835", "text": "public function testProfileDelete()\n {\n }", "title": "" }, { "docid": "f33f6ae881ac51162874c6dc71c29e44", "score": "0.6792255", "text": "public function testDelete()\n {\n $service = new ScheduleDeleteService($this->scheduleRepo);\n $result = $service->delete(1);\n\n $this->assertTrue($result);\n }", "title": "" }, { "docid": "fcb8007461f604a8a30150ca83f0ec4e", "score": "0.67918736", "text": "public function deleteTest()\n {\n \t$this->addTest();\n \t$contenido = Bibliografia::find(1);\n\n\t\t$request = [\n\t\t\t\"data\"=> [\n\t\t\t\t\"tipo\"=>\"bibliografias\",\n\t\t\t\t\"id\"=> $contenido->id,\n\t\t\t\t\"cod_curso\"=> $contenido->cod_curso,\n\t\t\t\t\"semestre\"=>$contenido->semestre, \n\t\t\t\t],\n\t\t\t];\n\t\t$success = $this->post('api/deleteData', $request);\n\t\t$this->assertDatabaseMissing('bibliografias',[ \n\t\t\t\t\t\"id\"=> $contenido->id,\n\t\t\t\t\t\"cod_curso\"=> $contenido->cod_curso,\n\t\t\t\t\t\"semestre\"=>$contenido->semestre, \n\t\t\t\t]);\n\n }", "title": "" }, { "docid": "4f2934141d9334a53c6387d9af16106a", "score": "0.67656875", "text": "public function testDeleteJob()\n {\n }", "title": "" }, { "docid": "1d42f55a72cf9bc502a4c865015bb107", "score": "0.6762556", "text": "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/blog/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Blog', 'blogId', self::$objectId);\n }", "title": "" }, { "docid": "673047ed4282ba4b5da16740654c9a83", "score": "0.672672", "text": "public function testScheduleTypesIdDelete()\n {\n\n }", "title": "" }, { "docid": "23082eeae748c2273639a493065c3b87", "score": "0.6710908", "text": "public function testDeleteAchBankLinkUsingDelete()\n {\n }", "title": "" }, { "docid": "d63e1a6e43bca2f71c212048164ce1a2", "score": "0.6701561", "text": "public function testProductTypesIdSizesFkDelete()\n {\n\n }", "title": "" }, { "docid": "8f903a07af07fccbe796e2ae9d2c4caf", "score": "0.6701014", "text": "public function testDeleteOrganizationConfigTemplate()\n {\n }", "title": "" }, { "docid": "7b759dd8cef63cb07f37495e77bf915f", "score": "0.6697052", "text": "public function testDelete()\n {\n $this->dispatchRouter(\n '/test/crud/',\n ['id' => 3],\n Http\\Request::METHOD_DELETE\n );\n $this->assertOk();\n\n $count = $this->getApp()->getDb()->fetchOne(\n 'SELECT count(*) FROM `test` WHERE `email` = ?',\n ['[email protected]']\n );\n $this->assertEquals($count, 0);\n }", "title": "" }, { "docid": "3ef21a1da7da3f4816503687e33c5f7a", "score": "0.6694722", "text": "public function testDeletePhoneSite()\n {\n }", "title": "" }, { "docid": "40cbc531aa6e21d7cde92be99d4b18dc", "score": "0.6690076", "text": "public function testDeleteClientResponseUsingDelete()\n {\n }", "title": "" }, { "docid": "358ac0e824cef5f24178fc0daf22ba70", "score": "0.6683594", "text": "public function delete($entity);", "title": "" }, { "docid": "d991e198d96893c322385f29240bbe21", "score": "0.6679733", "text": "public function testTeamMemberDelete()\n {\n }", "title": "" }, { "docid": "c41add09eae5ade290c90393ce51d632", "score": "0.66711664", "text": "public function testCategoriesCategoryIdDelete()\n {\n }", "title": "" }, { "docid": "3a674f52caf4a2722845b3ede7623556", "score": "0.66694313", "text": "public function testResourcesDeleteResource()\n {\n }", "title": "" }, { "docid": "44985cdd9be81d0d9d76949d1212f7fd", "score": "0.6665306", "text": "public function testMarketingCampaignsTypesIdDelete()\n {\n\n }", "title": "" }, { "docid": "32ece3a3c9b790324361da91ba8fd6f1", "score": "0.66591835", "text": "public function testDeleteGreeting()\n {\n }", "title": "" }, { "docid": "3d9cebf06959c2ae38f011900b145d7e", "score": "0.665546", "text": "public function testDeleteGuarantor()\n {\n }", "title": "" }, { "docid": "2e68b4845e1fb3c56cd0c99689ee2e35", "score": "0.6654386", "text": "public function test_dish_can_be_deleted()\n {\n $this->withoutExceptionHandling();\n $dish = Dish::factory()->create();\n\n $response = $this->delete('/api/dishes/1');\n $response->assertStatus(204);\n \n }", "title": "" }, { "docid": "440553502633d14e1277a9c05bd67b19", "score": "0.6650165", "text": "public function test_action_Manage_Delete()\n\t{\n\t\t$_SERVER['REQUEST_METHOD'] = 'POST';\n\t\t$_POST['oper'] = 'del';\n\t\t$_POST['id'] = 3; // book_guid\n\t\t\n\t\t$this->controllerSite->runAction('manage');\n\t\t\n\t\tunset($this->books['expected'][2]);\n\t\t$this->assertDataSetsEqual($this->createArrayDataSet(['books' => $this->books['expected']]), $this->getConnection()->createDataSet(['books']));\n\t}", "title": "" }, { "docid": "06f643803b233c140e9bd4770d2f8368", "score": "0.6639849", "text": "public function testDeleteExternal1()\n {\n }", "title": "" }, { "docid": "8a574c2bc0a079b3a948410b5f86fb94", "score": "0.6635808", "text": "public function testDeleteUserProperties()\n {\n\n }", "title": "" }, { "docid": "83827ed699acf1bd5a753143d573a1d2", "score": "0.66303223", "text": "public function testDeleteWaiter(){\r\n $this->CI->load->model('BusinessLogic');\r\n $rez=$this->CI->BusinessLogic->deleteWaiter(4997);\r\n $this->assertEquals(true, $rez, \"Doslo je do greske pri brisanju konobara.\");\r\n }", "title": "" }, { "docid": "b481ecdf3c4d30dc05bc992e6bb52406", "score": "0.66290724", "text": "public function test_deleteAsnTag() {\n\n }", "title": "" }, { "docid": "9b300c020a2ee249889b701e47c26634", "score": "0.66264", "text": "public function testSecurityMappingDelete()\r\n {\r\n\r\n }", "title": "" }, { "docid": "017e09dd9c5b732b036411c067ce905f", "score": "0.6624037", "text": "public function testDeleteMessageItem()\n {\n }", "title": "" }, { "docid": "dc476c4b95584bea9cb4ea0d341e8493", "score": "0.6617664", "text": "public function testDeleteDocFromIndex()\n {\n $this->name = 'CoreProduct';\n //Mainly you will need only id, but if the primary key is different than 'id'\n //Like core_id or stuff\n //Make sure you put the primary ked first\n //$this->data = ['core_id'=>2342] would work as well\n $this->data = ['id' => 28, 'name' => 'Menumenu'];\n $this->deleteDocFromIndex();\n }", "title": "" }, { "docid": "8c3649ad04ad216da0d5c371d0dd8ac0", "score": "0.66160357", "text": "public function testAppliancesApplianceDeletePost()\n {\n }", "title": "" }, { "docid": "ae06948a417f8896d9d0b9d43976d4a9", "score": "0.6613052", "text": "public function testProductDestroy()\n {\n\n\n $product = Product::create(['name' => 'Test Product', 'type' => 'BASIC']);\n\n $response = $this->actingAs($this->adminUser,'admin')\n ->delete(\"/admin/product/{$product->id}\");\n\n $response->assertRedirect('/admin/product')\n ->assertStatus(302);\n $this->assertDatabaseMissing('products',['slug' => $product->slug]);\n\n }", "title": "" }, { "docid": "3e2b7e10a98f937fd2ad3f50dfec863e", "score": "0.66110045", "text": "public function testDelete()\n\t{\n\t\t$this->connection\n\t\t\t->expects($this->once())\n\t\t\t->method('delete')\n\t\t\t->willReturn(1);\n\n\t\t$this->dataMapper->delete(new Article());\n\t}", "title": "" }, { "docid": "f6ba87b42d237ee38d9d8eac71dbf4c5", "score": "0.65954435", "text": "public function testExample()\n {\n $user = User::find(6);\n $user->delete();\n $this->assertDatabaseMissing('users',['id' => '5']);\n }", "title": "" }, { "docid": "bed47f3293a0b2e28e123d44424251fc", "score": "0.6578251", "text": "public function test_can_delete_the_product()\n {\n\n $product = Product::factory()->create();\n $response = $this->json('DELETE', '/api/products/'.$product->id, []);\n\n $response->seeJson([\n 'status' => 'success',\n ])\n ->seeJsonEquals([\n 'message' => 'Product deleted successfully',\n 'status' => 'success',\n ]);\n\n }", "title": "" }, { "docid": "648bb4a586c279ded5298ab84394476d", "score": "0.6567108", "text": "public function test_delete_records() {\n\t\t$table = 'login' ;\n\t\t$conditions = array('pass'=>'LBL');\t\t\n\t\t//$this->assertTrue(delete_records($table,$conditions)) ;\n\t}", "title": "" }, { "docid": "cf501777ba3a663754605aa24f2dbed0", "score": "0.6551263", "text": "public function testBetaGroupsDeleteInstance()\n {\n }", "title": "" }, { "docid": "e7139e59c546e4dab374a7b2abc55b05", "score": "0.6547797", "text": "public function testDelete()\n {\n $this->dispatch('/test/rest/1001', [], RequestMethod::DELETE);\n self::assertResponseCode(StatusCode::NO_CONTENT);\n\n $count = Db::fetchOne(\n 'SELECT count(*) FROM `test` WHERE `id` = ?',\n [1001]\n );\n self::assertEquals($count, 0);\n }", "title": "" }, { "docid": "e3f863ad8a4d77de9e5493af637b7c3b", "score": "0.6547365", "text": "public function testProduitDelete15(){\n $picId = $this->Products->get(1)->picture_id;\n\n //supprimer produit 1\n $this->post('/products/delete/1');\n\n $this->assertEmpty($this->Pictures->find()->where(['id'=> $picId])->toArray());\n }", "title": "" }, { "docid": "8264b720027f19c626df1ed8d8246f19", "score": "0.65428156", "text": "public function testDestroy()\n\t{\n\t\t$post_data = array('username' => 'testDelete', 'password' => 'testDelete', 'name' => 'Test Delete', 'about_me' => 'Test user for deletion','image' =>'test.jpg', 'location' => 'location');\n\t\t$this->call('POST', '/user', $post_data);\n\t\t$user = User::where('username', '=', 'testDelete')->get();\n\t\t\n\t\t\n\t\t$this->call('DELETE', '/user/'.$user[0]->id);\n\t\t$crawler = $this->client->request('GET', '/user');\n\t\t$this->assertCount(0, $crawler->filter('html:contains(\"testDelete\")'));\n\t}", "title": "" }, { "docid": "e3b91e2008fd4d3775f37b6410bd16e0", "score": "0.6541058", "text": "public function test_fileContainerDeleteById() {\n\n }", "title": "" }, { "docid": "22cbe4d1364d378c5725e037d0cb2f64", "score": "0.65403455", "text": "public function testDeleteHook()\n {\n $item = new Item;\n $item->save();\n\n $text = $this->addElementText($item, $this->_title,\n '<b>testDeleteHook</b>', 1);\n $this->toDelete($text);\n $text = $this->addElementText($item, $this->_coverage,\n \"WKT: POINT(123, 456)\\n\\nSomthing\", 0);\n $this->toDelete($text);\n\n $_POST['Elements'][(string)$this->_cutil->getElementId()] = array(\n '0' => array(\n 'mapon' => '1',\n 'text' => ''\n )\n );\n $item->save();\n\n $item_id = $item->id;\n $item->delete();\n\n $results = $this\n ->db\n ->getTable('NeatlineFeature')\n ->findBy(array( 'item_id' => $item_id ));\n\n $this->assertEmpty($results);\n }", "title": "" }, { "docid": "b3d9e9278ab74f1a7fc5c65fd0bb257d", "score": "0.6539618", "text": "public function testDelete()\n {\n $storage = $this->createStorage();\n\n $layout1 = $storage->create();\n $this->createAwesomelyComplexLayout($layout1);\n $storage->update($layout1);\n\n $storage->delete($layout1->getId());\n\n $database = $this->getDatabaseConnection();\n $countLayout = (bool)$database->query(\"select 1 from {layout} where id = ?\", [$layout1->getId()])->fetchField();\n $this->assertFalse($countLayout);\n $countItems = (bool)$database->query(\"select 1 from {layout_data} where layout_id = ?\", [$layout1->getId()])->fetchField();\n $this->assertFalse($countItems);\n }", "title": "" } ]
240867e13e63343bee476cdff1d4d16b
Ajoute une variable au template
[ { "docid": "d3f9d0b4a8898a92335417ef2a92b355", "score": "0.0", "text": "public static function set($sKey, $oValue) {\n self::$aVars[$sKey] = $oValue;\n }", "title": "" } ]
[ { "docid": "daf974e73c2b49be1f6485804eb5b1a7", "score": "0.74102324", "text": "function addVar( $template, $name, $value )\r\n\t{\r\n\t\t$this->_templates[$template]->_vars[$name] = $value;\r\n\t}", "title": "" }, { "docid": "d1e822496dd96d642a10e02bf1efc1b0", "score": "0.7139782", "text": "abstract public function addTemplateVar($smarty, $form);", "title": "" }, { "docid": "52b3808bb50c54787b7b08876077b8ee", "score": "0.6559478", "text": "function addVariable($v){\r\n\t}", "title": "" }, { "docid": "311c8a8af1b1422db402e80a893ad1d2", "score": "0.6518946", "text": "function addObject( $template, $name, $value )\r\n\t{\r\n\t\t$this->_templates[$template]->_vars[$name] = $value;\r\n\t}", "title": "" }, { "docid": "21ae014ddd4397743a9cc8e50c1327fe", "score": "0.6513355", "text": "public function addVar($key, $value)\n\t{\n $this->context->getView()->addVariable($key, $value);\n\t}", "title": "" }, { "docid": "2b40f5967c76fcc3ce55967017ce880b", "score": "0.6312578", "text": "public function myVar(){\n\t\treturn View::make('my_template.myVar')\n\t\t\t-> with('var','Tao test method.' ) \n\t\t\t-> with('var1','This is my var');\n\t}", "title": "" }, { "docid": "617c3eaf1b2a93372ecd531cfd96a27a", "score": "0.6219013", "text": "public function set($template_variable_name, $template_variable_value) {\n $this->templateVars[$template_variable_name] = $template_variable_value;\n }", "title": "" }, { "docid": "227852b98b227aea96a04c14dae64329", "score": "0.62053406", "text": "public function addTemplateInp($name = null, $value = null) {\n if(!is_string($name)) return;\n if(!isset($value)) return;\n $this->templateInp[$name] = $value;\n }", "title": "" }, { "docid": "fa2bf3c7065327de314614809204da58", "score": "0.61309177", "text": "function add_variable($variable)\n\t{\n\t\t$this->variables[] = $variable;\n\t}", "title": "" }, { "docid": "1aaa2ce259b7125ad1c798df0de305ea", "score": "0.6119496", "text": "public function append($varname, $value){\n\t\t$this->tpl_vars[$varname][] = $value;\n }", "title": "" }, { "docid": "243f0ffcb5ca53a91259fa8e8a679915", "score": "0.593789", "text": "final public function assegnaVariabiliTemplate($nomeVariabile, $dati) {\n\n $this->assign($nomeVariabile, $dati);\n }", "title": "" }, { "docid": "f17d6bb656eb8a47db03675deb0be77a", "score": "0.58618677", "text": "public function addTemplateVar($name, $value)\n {\n throw new \\Exception('Resourse unavailable.');\n }", "title": "" }, { "docid": "98c5eda744904e68f52f39b0e9a2691b", "score": "0.5858743", "text": "function add_less_var( $name, $value ) {\n\t\t$less = wp_less::instance();\n\t\t$less->add_var( $name, $value );\n\t}", "title": "" }, { "docid": "4bc7bfa51ebcb8078d45f90aec1ce6b4", "score": "0.5849438", "text": "public function addVariable($varaible, $value)\n {\n $this->variables[$varaible] = $value;\n }", "title": "" }, { "docid": "4f51c4a2f92e6e2cdf5696832bcd9739", "score": "0.5774005", "text": "function set($name, $val) {\n\t\t$this->template_vars[$name] = $val;\n\t}", "title": "" }, { "docid": "c739a610600a090891e37cda9f798463", "score": "0.5726373", "text": "public function setVar($name,$val) {\n\t\t$this->template_vars[$name] = $val;\n\t}", "title": "" }, { "docid": "399156a845968389567a9e25d6a8ab10", "score": "0.5699332", "text": "public function template($name, $value = null)\n {\n if (func_num_args() > 1) {\n return $this->_view->__set($name, $value);\n } elseif (is_array($name)) {\n return $this->_view->addVariables($name);\n }\n\n return $this->_view->__get($name);\n }", "title": "" }, { "docid": "4662392e4e90123b849b1f165a3b6ccd", "score": "0.56848323", "text": "function create_variable($name, $value)\n\t{\n\t\t$this->variables[] = new \\phpbb\\search\\sphinx\\config_variable($name, $value, '');\n\t\treturn $this->variables[count($this->variables) - 1];\n\t}", "title": "" }, { "docid": "31c04cf84803608c550d34a021694398", "score": "0.56718665", "text": "public function variable($name, $var);", "title": "" }, { "docid": "4d1c28b3e9d6748c8081eb548e125c11", "score": "0.5650222", "text": "public function addData(string $key, $value): Template\n {\n if (isset($this->data[$key])) {\n $this->data[$key] .= $value;\n } else {\n $this->data[$key] = $value;\n }\n return $this;\n }", "title": "" }, { "docid": "20e9c22e1aed5d59e16006f7a419aa43", "score": "0.5639755", "text": "function var_template_include($template){\n\t$GLOBALS['current_theme_template'] = basename($template);\n\treturn $template;\n}", "title": "" }, { "docid": "ae3e93723563192813fa663b3d2d86d7", "score": "0.56348705", "text": "function addVariable(string $token, string $variable_name) {\n $this->variables[$token] = $variable_name;\n }", "title": "" }, { "docid": "33e9ac446580445d5d977c5b1a4f1c75", "score": "0.5612989", "text": "protected function addTemplateArguments(Twig_Compiler $compiler) {\n $compiler->raw('$variables');\n }", "title": "" }, { "docid": "7ed6f621abb396144206a6b13df118c7", "score": "0.56069624", "text": "public function variable($variable, string $name = null): string {}", "title": "" }, { "docid": "dc01fc0fab20234ddc085ce19be29e86", "score": "0.55960584", "text": "private static function template($param) {\n }", "title": "" }, { "docid": "42725754edcc102e0d79a619c3c43a4b", "score": "0.5587398", "text": "public function addVariables(array $variables)\n {\n $this->_template_variables = array_merge($this->_template_variables, $variables);\n }", "title": "" }, { "docid": "2652def846c73ada85ae63f4d08042e4", "score": "0.5585669", "text": "function addLangVar($varName, array $translations, $description) {\n }", "title": "" }, { "docid": "baaa2f5ce003e67c5bb0a58be42aca55", "score": "0.5577145", "text": "public function setTemplateVariables() {\n $tvs = $this->getProperty('tvs',null);\n if ($tvs !== null) {\n $templateVariables = is_array($tvs) ? $tvs : $this->modx->fromJSON($tvs);\n if (is_array($templateVariables)) {\n foreach ($templateVariables as $id => $tv) {\n if ($tv['access']) {\n /** @var modTemplateVarTemplate $templateVarTemplate */\n $templateVarTemplate = $this->modx->getObject('modTemplateVarTemplate',array(\n 'tmplvarid' => $tv['id'],\n 'templateid' => $this->object->get('id'),\n ));\n if (empty($templateVarTemplate)) {\n $templateVarTemplate = $this->modx->newObject('modTemplateVarTemplate');\n }\n $templateVarTemplate->set('tmplvarid',$tv['id']);\n $templateVarTemplate->set('templateid',$this->object->get('id'));\n $templateVarTemplate->set('rank',isset($tv['tv_rank']) ? $tv['tv_rank'] : 0);\n $templateVarTemplate->save();\n } else {\n $templateVarTemplate = $this->modx->getObject('modTemplateVarTemplate',array(\n 'tmplvarid' => $tv['id'],\n 'templateid' => $this->object->get('id'),\n ));\n if ($templateVarTemplate && $templateVarTemplate instanceof modTemplateVarTemplate) {\n $templateVarTemplate->remove();\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "cf2599f8e916e1bffc7e56cd2e7ba0a7", "score": "0.5573239", "text": "public function __set($name, $value)\n {\n $this->_template_variables[$name] = $value;\n }", "title": "" }, { "docid": "42679254e1eeaa4df8505f063fd3a0bc", "score": "0.55542505", "text": "public function __set($name, $value)\n {\n $this->_templateVariables[$name] = $value;\n }", "title": "" }, { "docid": "9fae421ffd8f38b6e5e6a54f3e56ada6", "score": "0.5534564", "text": "public function assign($var, $val) {\n\t\t$this->template->assign($var, $val);\t\t\n\t}", "title": "" }, { "docid": "802c01231246bb4254895a75b637b20c", "score": "0.5526794", "text": "private function assignValsIntoTpl() {\n \n $this->tplEngine->assign('configMain', $this->config); \n $this->tplEngine->assign('langMain', $this->lang); \n \n }", "title": "" }, { "docid": "9df31513630b1e33ac8f9d102674dc88", "score": "0.55262136", "text": "function set($name,$value) {\n if (isset($this->_template)) {\n $this->_template->set($name, $value);\n }\n }", "title": "" }, { "docid": "9fa79ee71e0cc806fd654caba27fb7c6", "score": "0.5493607", "text": "public function setVariable($key = null, $value = null)\n {\n if ( strlen($key) ) {\n $this -> vars['<var ' . $key . ' />'] = $value;\n }\n }", "title": "" }, { "docid": "c94594899e02bc2f5c7b893b4ff5909a", "score": "0.5485847", "text": "public function addVar($name, $value) \n\t{\n\t\tif (is_array($value)) {\n\t\t\tforeach ($values as $key => $value) {\n\t\t\t\t$this->vars[$key] = $value; \t\t\t\n\t\t\t}\n\t\t}\n\t\telse { \t\n\t\t\t$this->vars[$name] = $value; \n\t\t}\n\t}", "title": "" }, { "docid": "dc7303987ae0702935b651de3367eec8", "score": "0.54635113", "text": "public function add($data):TemplateInterface;", "title": "" }, { "docid": "7cb8a63f83a8b40a9a66914ed490c227", "score": "0.5432686", "text": "public static function assignTemplate($key, $t)\r\n {\r\n self::assign($key, self::fetch($t));\r\n }", "title": "" }, { "docid": "b9e694363a723c03c4f15b70da3b730d", "score": "0.54308474", "text": "protected function merge_vars() { \n\n\tforeach ($this->vars as $key => $value) {\n\t\t$this->tpl_code = str_ireplace(\"~$key~\", $value, $this->tpl_code);\n\t}\n\n\n}", "title": "" }, { "docid": "aaa893f1fe462a56cdd9e933a00e6af6", "score": "0.54157394", "text": "public function display() : void \r\n{\r\n\textract($this->variable_data); \r\n\trequire $this->tpl;\r\n}", "title": "" }, { "docid": "dc6d9093b4ed92bda6e8662a6a65a7b9", "score": "0.5412041", "text": "function template($fileName, $vars = array())\n{\n foreach($vars as $key => $value)\n $$key = $value;\n\n ob_start();\n include($fileName);\n return ob_get_clean();\n}", "title": "" }, { "docid": "579ec5813f4e832b56bdb24ba423afab", "score": "0.5411147", "text": "public function bindVariable($variableName = '', $content = null)\n {\n }", "title": "" }, { "docid": "a7a2223e536eb3e1f6f264f12c01d99b", "score": "0.53996515", "text": "private function setVar()\n\t{\n\t\t$len = count((array)self::$var);\n\t\t$twig = self::$twig;\n\n\t\tif ($len > 0)\n\t\t{\n\t\t\tforeach (self::$var as $key => $value)\n\t\t\t{\n\t\t\t\t$twig->addGlobal($key, $value);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b4cff751ba705da4caeb3cdebc470da0", "score": "0.53881055", "text": "public function onTwigSiteVariables()\n {\n $twig = $this->grav['twig'];\n $twig->template = 'sitemap.xml.twig';\n $twig->twig_vars['sitemap'] = $this->sitemap;\n }", "title": "" }, { "docid": "47e6df0c1e2480d0f00bc80e932b1081", "score": "0.5370034", "text": "public function addCustomVar($key, $value)\n {\n $this->aoCustomVars[$key] = $value;\n }", "title": "" }, { "docid": "364d8f9c190617b6837352aead1cdb60", "score": "0.5362691", "text": "public function mergeTemplateVars()\n {\n $irhpPermitTypeId = $this->data[IrhpAppDataSource::DATA_KEY]['irhpPermitType']['id'];\n\n $this->templateVarsConfig['question']['bulletList']['list'] = 'markup-irhp-declaration-'.$irhpPermitTypeId;\n\n parent::mergeTemplateVars();\n }", "title": "" }, { "docid": "0c1f9d280b8ecf4e049fc0fcccf9d64c", "score": "0.5357461", "text": "function replace($var, $content) { \n\t\t$this->template = str_replace(\"<!--#$var#-->\", $content, $this->template);\n $this->template = str_replace(\"#$var#\", $content, $this->template);\n\n }", "title": "" }, { "docid": "07ea72803d623fc31bd82a65d97c95e8", "score": "0.5355848", "text": "function onTwigSiteVariables(Event $event){\n\t\t\t//$page = $event && isset($event['page']) ? $event['page'] : $this->grav['page'];\n\t\t\t$values = [\n\t\t\t\t'dev' => self::$dev,\n\t\t\t\t'slug' => self::$slug,\n\t\t\t\t'auth' => self::$auth,\n\t\t\t];\n\n\t\t\t$twig = $this->grav['twig'];\n\t\t\tforeach($values as $key => $value) $twig->twig_vars[self::$slug .\"_$key\"] = $value;\n\t\t}", "title": "" }, { "docid": "335d33ae323aa146b41b27a364125393", "score": "0.5354154", "text": "public function addVar(string $name, $value) : void\r\n{\r\n\t//Check to see if a valid variable name was provided, if i was no, throw an error\r\n\tif(preg_match('/^[a-zA-Z_\\x80-\\xff][a-zA-Z0-9_\\x80-\\xff]*$/', $name) == 0){\r\n\t\ttrigger_error('Invalid Variable Name Used', E_USER_ERROR);\r\n\t}\r\n\t//Assign the name and value to the array\r\n\t$this->variable_data[$name] = $value;\r\n}", "title": "" }, { "docid": "fc0e3978cb24f5e6519b0edb1ca428ce", "score": "0.53293884", "text": "public function renderTemplate()\n {\n return str_replace(\n array_keys($this -> vars),\n array_values($this -> vars),\n $this -> template\n );\n }", "title": "" }, { "docid": "c4f2b86b6f9aca41d0c8cbbea5b02b2a", "score": "0.53247726", "text": "public function addLayoutVar($name, $value) {\n\t\t$this->_layoutValues [$name] = $value;\n\t}", "title": "" }, { "docid": "30ca5f1629751313e9eb3bf47cfd38dc", "score": "0.53139985", "text": "private function replaceTemplate(){\n $this->template = strtr($this->template, $this->makeTags($this->values));\n }", "title": "" }, { "docid": "e6314261190ea04c03af6da6f56e235a", "score": "0.5311301", "text": "static public function local_get_custom_var_string($index, $name, $value) {\n return <<<EOD\n_paq.push([\"setCustomVariable\", {$index}, \"{$name}\", \"{$value}\", \"page\"]);\n\nEOD;\n }", "title": "" }, { "docid": "b0774c5fb5b9809146069b7e29abe6a5", "score": "0.52877504", "text": "public static function add($name, $value) {\n $GLOBALS['_view']->add($name, $value);\n }", "title": "" }, { "docid": "96a1eff606c08eb3976d6a62c76216b4", "score": "0.5285679", "text": "public function add_template_vars()\n\t{\n\t\t//Theme Options\n\t\t$this->assign( 'display_login', Options::get( __CLASS__ . '__login_display_location', 'sidebar' ) );\n\t\t$this->assign( 'home_label' , Options::get( __CLASS__ . '__home_label', _t( 'Blog' ) ) );\n\t\t$this->assign( 'show_author', Options::get( __CLASS__ . '__show_author', false ) );\n\n\t\tif( !$this->template_engine->assigned( 'pages' ) ) {\n\t\t\t$this->assign('pages', Posts::get( array( 'content_type' => 'page', 'status' => Post::status('published'), 'nolimit' => 1 ) ) );\n\t\t}\n\t\tif( !$this->template_engine->assigned( 'page' ) ) {\n\t\t\t$page = Controller::get_var( 'page' );\n\t\t\t$this->assign('page', isset( $page ) ? $page : 1 );\n\t\t}\n\t\tparent::add_template_vars();\n\n\t\tif ( User::identify()->loggedin ) {\n\t\t\tStack::add( 'template_header_javascript', Site::get_url('scripts') . '/jquery.js', 'jquery' );\n\t\t}\n\t}", "title": "" }, { "docid": "5253c955dcea20a7a58febf6c3e8c31c", "score": "0.5281219", "text": "public function onTwigSiteVariables()\n\t{\n\t\t$this->grav['twig']->twig_vars['topics_tags'] = $this->topics_tags;\n\t}", "title": "" }, { "docid": "0528c75a85a77b4d67096737e2a58e75", "score": "0.5269549", "text": "public function vista($template, $vars) {\n\t\techo \"<pre>Me enviaste a cargar \" . $template . \" con las variables \";\n\t\techo $vars . \"pero todavia no he sido implementada. </pre>\"\n\t}", "title": "" }, { "docid": "1794b954a482fe6300cc6d528791578a", "score": "0.52647406", "text": "public function add_var($key,$val){\n\t\t\t$this->safe_vars[$key] = $val;\n\t\t}", "title": "" }, { "docid": "db18652f8d26db1230b5a5780e38745b", "score": "0.5254462", "text": "public function onTwigSiteVariables()\n {\n $data = new \\stdClass;\n $data->page_route = $this->grav['page']->rawRoute();\n\n /** @var Page $page */\n $page = $this->grav['page'];\n\n if ($page->home()) {\n $data->page_route = '';\n }\n\n\n $data->current = $this->grav['language']->getLanguage();\n $data->languages = $this->grav['language']->getLanguages();\n\n $this->grav['twig']->twig_vars['langswitcher'] = $data;\n\n if ($this->config->get('plugins.langswitcher.built_in_css')) {\n $this->grav['assets']->add('plugin://langswitcher/css/langswitcher.css');\n }\n }", "title": "" }, { "docid": "a9f63394e0c318d064fa16ee054a424a", "score": "0.52399504", "text": "private function appendParameter($key, $value='')\n\t{\n\t\tif ($this->template_transition_array[$key] != '')\n\t\t{\n\t\t\t$this->template .= '| '.$this->template_transition_array[$key].' = '.$value.(($this->settings['append-newlines'])?\"\\r\\n\":' ');\n\t\t}\n\t\telseif (!$this->template_transition_array[$key])\n\t\t{\n\t\t\t$this->template .= '| '.$key.' = '.$value.(($this->settings['append-newlines'])?\"\\r\\n\":' ');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->unusedParameters[$key] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "6abc9b8d263cce1ed853d56e3359e5d8", "score": "0.52363473", "text": "public function setTranslationVar($var_name,$value=null) \n\t{\n\t\t$this->translation = $this->translation === null ? new Translation() : $this->translation;\n \t\n \t$this->translation->setVar($var_name,$value);\n\t}", "title": "" }, { "docid": "6e8fc0135f67b03eed64709f49a406ee", "score": "0.52349806", "text": "protected function replaceVars()\n {\n $TemplatePlateProcessor = $this->getTemplateProcessor();\n $this->replaceElements($TemplatePlateProcessor, $this->getData());\n $this->replaceElements($TemplatePlateProcessor, self::$dynamicElements);\n $this->setTemplateProcessor($TemplatePlateProcessor);\n }", "title": "" }, { "docid": "fcc49cb075a9e64e5f7c593f4db3fc55", "score": "0.52336264", "text": "function view_jrHelloWorld_saturday($_post,$_user,$_conf)\n{\n $_replace = array();\n $_replace['some_wanted_var'] = 'hello';\n $_replace['other_wanted_var'] = 'world';\n return jrCore_parse_template(\"some_template_name.tpl\",$_replace,'jrHelloWorld');\n}", "title": "" }, { "docid": "ae7f22d029607c381b77e870eefebd57", "score": "0.5231648", "text": "function add_templates(){\r\n\t\t\t?>\r\n\t\t\t\t<script type=\"text/x-template\" id=\"gcwt_timetable_template\">\r\n\t\t\t\t\t<?php include 'html/timetable.html'; ?>\r\n\t\t\t\t</script>\r\n\t\t\t<?php\r\n\t\t}", "title": "" }, { "docid": "e15714e6259c6421cea4987da165a3e5", "score": "0.52198887", "text": "abstract function getTemplateVariables();", "title": "" }, { "docid": "9816b9c72d0e9e4cd358a883b002bd28", "score": "0.5219513", "text": "public function assign($variable, $valor){\n\t\tself::$smarty->assign($variable, $valor);\n\t}", "title": "" }, { "docid": "76ade0ca1c30b8cf3aba5dabd0044a4e", "score": "0.52183634", "text": "protected function setTemplateVariables()\r\n {\r\n $this->templateVariables['result'] = [\r\n 'result' => $this->result ? 'success' : 'failure',\r\n ];\r\n\r\n if ($this->result === true) {\r\n $this->templateVariables['result']['url'] = '/download/' . $this->request->getPathVariable('id');\r\n }\r\n }", "title": "" }, { "docid": "2e9bf876c5a6529c09ceabbf05e9cceb", "score": "0.5217692", "text": "public function testCreateTemplateVars(): void\n {\n $result = $this->Form->create($this->article, [\n 'templates' => [\n 'formStart' => '<h4 class=\"mb\">{{header}}</h4><form{{attrs}}>',\n ],\n 'templateVars' => ['header' => 'headertext'],\n ]);\n $expected = [\n 'h4' => ['class'],\n 'headertext',\n '/h4',\n 'form' => [\n 'method' => 'post',\n 'action' => '/articles/add',\n 'accept-charset' => 'utf-8',\n ],\n ];\n $this->assertHtml($expected, $result);\n }", "title": "" }, { "docid": "f2b4609e4828c7d452d1eeafdf3c027c", "score": "0.5215726", "text": "public function template();", "title": "" }, { "docid": "3b4d5da6a6363bc8fdcddfcf6ebc94b7", "score": "0.5212257", "text": "public function setViewParameter(string $name, $value, bool $setTemplateVar): void;", "title": "" }, { "docid": "e7290b113706d9d6a68775e69f9b4c51", "score": "0.5208875", "text": "function template($temp, $val = array(), $tmp = 'tmp') {\n\t\t\tforeach ( $val as $k => $v ) {\n\t\t\t\t$temp = str_replace ( '{' . $tmp . '.' . $k . '}', $v, $temp );\n\t\t\t}\n\t\t\t\n\t\t\treturn $temp;\n\t\t}", "title": "" }, { "docid": "6247bae53ebf6ea240c3cbf2b79ee06d", "score": "0.52071023", "text": "function render($template,$vars = array()){\r\n\r\n // This will create variables from the array:\r\n extract($vars);\r\n include \"views/$template.php\";\r\n \r\n}", "title": "" }, { "docid": "f5ebcf9b5aa806a5b83432f683da9267", "score": "0.51967454", "text": "public function add(string $placeholder, string $value);", "title": "" }, { "docid": "bb078bc35f3f3df0133e73e341f9965c", "score": "0.5196443", "text": "private\n function __createCustomVar()\n {\n $url = \"\";\n $name = \"\";\n $val = \"\";\n $scope = \"\";\n $emptyFlg = false; // not set slot flag\n $scopeFlg = false; // scope 3 flag\n foreach($this->CustomVars as $index => $CustomVar) {\n if(is_null($CustomVar)) {\n $emptyFlg = true;\n $scopeFlg = true;\n continue;\n }\n if(1 === $index) {\n $name .= $CustomVar['name'];\n $val .= $CustomVar['value'];\n if(3 !== $CustomVar['scope']) $scope .= $CustomVar['scope'];\n } else {\n $name .= ($emptyFlg) ? \"*{$index}!\" . urlencode($CustomVar['name']) : \"*\" . urlencode($CustomVar['name']);\n $val .= ($emptyFlg) ? \"*{$index}!\" . urlencode($CustomVar['value']) : \"*\" . urlencode($CustomVar['value']);\n if(3 === $CustomVar['scope']) {\n $scopeFlg = true;\n } else {\n $scope .= ($scopeFlg) ? \"*{$index}!{$CustomVar['scope']}\" : \"*{$CustomVar['scope']}\";\n }\n }\n }\n\n if(!empty($name)) $url .= \"8({$name})\";\n if(!empty($val)) $url .= \"9({$val})\";\n if(!empty($scope)) $url .= \"11({$scope})\";\n return $url;\n }", "title": "" }, { "docid": "c3d3c0cfff3b58b24a8bacef684ba175", "score": "0.51963204", "text": "public function setData(string $key, $value): Template\n {\n $this->data[$key] = $value;\n return $this;\n }", "title": "" }, { "docid": "80ebf2265c19bc999743b5d86df82919", "score": "0.5194876", "text": "function lapa_compiler_assign($act, $parser)\n{\n $link = '';\n $attr = $parser->parseDirectiveAttributes();\n if ( !key_exists('var', $attr) ) \n throw new LapaEngineException('В функции \"assign\" не задан параметр \"var\". cтрока %s.', $parser->templateLine());\n if ( !key_exists('value', $attr) )\n throw new LapaEngineException('В функции \"assign\" не задан параметр \"value\". cтрока %s.', $parser->templateLine());\n \n if (key_exists('link', $attr) && $attr['link'] && $attr['value'][0] == '$') \n $link = '&';\n \n if ($attr['var'][0] == '$') {\n return $attr['var'] . \" = $link {$attr['value']};\";\n }\n return \"\\$this->assign({$attr['var']}, {$attr['value']});\";\n}", "title": "" }, { "docid": "39183a58477e91e21325a9dbe6f04e7d", "score": "0.5190746", "text": "public static function addVariable($key, $value)\n {\n self::$aVariables[$key] = $value;\n }", "title": "" }, { "docid": "238389b8fda27d50a6aa3c093d3e225a", "score": "0.5186774", "text": "function byron_template_part($template_part, $args = [])\n{\n $template_extra = null;\n if (isset($args['template_extra'])) {\n $template_extra = $args['template_extra'];\n }\n\n if (isset($args['query_vars']) && is_array($args['query_vars'])) {\n foreach ($args['query_vars'] as $key => $value) {\n set_query_var($key, $value);\n }\n }\n get_template_part($template_part, $template_extra);\n}", "title": "" }, { "docid": "f4aeb53015dfef4da5f9118eb2688700", "score": "0.51815516", "text": "protected function defineSmartyTemplateVariables() {\n\t\t$this->smartyTemplateVariables['entity'] = $this->determineDateEntity();\n\t\t$this->smartyTemplateVariables['prevValue'] = $this->conf['prevValue'] == '' ? -1 : intval($this->conf['prevValue']);\n\t\t$this->smartyTemplateVariables['nextValue'] = $this->conf['nextValue'] == '' ? 1 : intval($this->conf['nextValue']);\n\t\t$this->smartyTemplateVariables['labelPrevious'] = $this->conf['labelPrevious'] == '' ? '<' : $GLOBALS['TSFE']->cObj->stdWrap($this->conf['labelPrevious'], $this->conf['labelPrevious.']);\n\t\t$this->smartyTemplateVariables['labelNext'] = $this->conf['labelNext'] == '' ? '>' : $GLOBALS['TSFE']->cObj->stdWrap($this->conf['labelNext'], $this->conf['labelNext.']);\n\t\t$this->smartyTemplateVariables['header'] = $this->renderHeader();\n\t}", "title": "" }, { "docid": "51319fbac5321643d8a3e363912658a4", "score": "0.51804733", "text": "private function addMissingSmartyVar()\n {\n if ((isset($this->ssl) && $this->ssl && Configuration::get('PS_SSL_ENABLED'))\n || Tools::usingSecureMode()\n ) {\n $useSSL = true;\n } else {\n $useSSL = false;\n }\n\n $protocol_content = ($useSSL) ? 'https://' : 'http://';\n\n $this->context->smarty->assign(array(\n 'priceDisplay' => Product::getTaxCalculationMethod((int) $this->context->cookie->id_customer),\n 'base_dir' => _PS_BASE_URL_.__PS_BASE_URI__,\n 'ps_base_url' => _PS_BASE_URL_SSL_,\n 'content_dir' => $protocol_content.Tools::getHttpHost().__PS_BASE_URI__,\n ));\n }", "title": "" }, { "docid": "9702a2ee26a63d3d214c88d13fe82cf1", "score": "0.5180121", "text": "public function assign($var, $value = null, $nocache = false);", "title": "" }, { "docid": "8d9bb2c0469d6a7f464a601b57e6b043", "score": "0.5178406", "text": "public function importVar($name, $value) {\n $this->vars[$name] = $value;\n }", "title": "" }, { "docid": "62ac551a507825518019414b349b1291", "score": "0.5164471", "text": "public function __toString(){\n extract($this->vars); // extract our template variables ex: $value\n \n ob_start(); // store as internal buffer\n\n include (dirname(__FILE__) . $this->template); // include the template into our file\n\n return ob_get_clean();\n }", "title": "" }, { "docid": "5fde6aceaaddddc44148b1ab060038f8", "score": "0.5164286", "text": "public function __set( $var, $value )\n\t{\n\t\tif( strpos( $var, 'template' ) === 0 )\n\t\t{\n\t\t\tthrow new \\Exception( 'You are trying to assign a value on an attribute which is reserved to a template name' );\n\t\t}\n\n\t\t$this->vars[$var] = $value;\n\t}", "title": "" }, { "docid": "7b9acb27c66bcc92a56e38cf085d9e65", "score": "0.51630306", "text": "function add () {\n\t\t// Set onLoad to reload parent template set\n\t\t$GLOBALS['__freemed']['on_load'] = 'process';\n\t\t$GLOBALS['__freemed']['no_template_display'] = true;\n\n\t\t// Set this phy to be 'pntphy'\n\t\t$result = $GLOBALS['sql']->query(\n\t\t\t$GLOBALS['sql']->insert_query(\n\t\t\t\t$this->table_name, \n\t\t\t\t$this->variables\n\t\t\t)\n\t\t);\n\n\t\t// Put out proper JavaScript\n\t\t$GLOBALS['display_buffer'] .= \"\n\t\t\t<script LANGUAGE=\\\"JavaScript\\\">\n\t\t\tfunction process() {\n\t\t\t\topener.document.forms.\".prepare($GLOBALS['formname']).\".submit()\n\t\t\t\twindow.self.close()\n\t\t\t}\n\t\t\t</script>\n\t\t\t\";\n\n\t\ttemplate_display();\n\t}", "title": "" }, { "docid": "ba2ee4ce52a74935f9245c1c865b6bb3", "score": "0.5154533", "text": "function replace_vars($vars) {\n\t\t foreach ($vars as $k => $v) {\n\t\t\t $this->template = str_replace(\"<!--#$k#-->\", $v, $this->template); // adds hidden stuff\n\t\t\t $this->template = str_replace(\"#$k#\", $v, $this->template);\n\t\t } \n\t }", "title": "" }, { "docid": "a32d02d0978423b5267031096d4fd3c4", "score": "0.5154461", "text": "public function addRaw(array $data):TemplateInterface;", "title": "" }, { "docid": "122853a6e98ed6f922d2904f387a78fa", "score": "0.51535034", "text": "function purdyvars_inject_variables(&$node, $variables) {\n foreach($variables as $name => $data) {\n $node[$name] = $data;\n }\n }", "title": "" }, { "docid": "8f996cb387067b3c86df8172c538e7b8", "score": "0.51493937", "text": "public function add_template_vars()\n\t{\n\t\tparent::add_template_vars();\n\n\t\t// Add tags\n\t\t$this->assign( 'tags', Tags::vocabulary()->get_tree() );\n\n\t\t// Add tagline to Site Title, if set\n\t\t$site_title = Options::get( 'title' );\n\t\tif ( Options::get( 'tagline' ) ) {\n\t\t\t$site_title .= \" | \" . Options::get( 'tagline' );\n\t\t}\n\t\t$this->assign( 'site_title', $site_title );\n\n\t\t// Add a class depending on which page we are looking at. This is used to switch the\n\t\t// header and link colours on each section\n\t\tswitch ( $this->post->title ) {\n\t\t\tcase 'About':\n\t\t\t\t$page_class = 'about';\n\t\t\t\tbreak;\n\t\t\tcase 'Projects':\n\t\t\t\t$page_class = 'projects';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$page_class = '';\n\t\t}\n\t\t$this->assign( 'page_class', $page_class );\n\n\t\t$this->assign( 'all_pages', Posts::get( array( 'content_type' => Post::type( 'page' ) ) ) );\n\n\t}", "title": "" }, { "docid": "5cf72d19b3125840e80ebcba802d40ab", "score": "0.5149067", "text": "public function set($var_name='', $value='') \n\t{\n\t\t$this->_mark('Template_Set_start');\n\t\t\n\t\tif (empty($var_name))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$this->data[$var_name] = $value;\n\t\t\n\t\t$this->_mark('Template_Set_end');\n\t}", "title": "" }, { "docid": "0f4a4f2a02da7e391d382935cdd33424", "score": "0.5118564", "text": "public function assign($name,$var){\n\t\t$this->rainTPL->assign( $name, $var );\n\t}", "title": "" }, { "docid": "8d3180eec635004c24d09d4a5e6442a1", "score": "0.5118436", "text": "public function clickInsertVariable()\n {\n $this->_rootElement->find($this->addVariableButton)->click();\n }", "title": "" }, { "docid": "691464356d79b52b4295f57a77b97fdd", "score": "0.5116815", "text": "function wpseo_add_template_variables_helpcenter() {\n\t_deprecated_function( __FUNCTION__, 'WPSEO 7.6.0' );\n\n\treturn '';\n}", "title": "" }, { "docid": "664374f2038f60e2026c0a1ce3dfda2e", "score": "0.511635", "text": "public function addLocal($name, $value)\n {\n $this->locals[$name] = $value;\n }", "title": "" }, { "docid": "db99d12a46b2d78b32106057c052af69", "score": "0.51084834", "text": "public function set($key, $value)\n\t{\n\t\t$this->templateParams[$key] = $value;\n\t}", "title": "" }, { "docid": "2f65c1f95a0d2596afb7ed1358c2054a", "score": "0.51005054", "text": "public function assignVar($nameOrVarArray, $value) {\n if (is_array($nameOrVarArray)) {\n foreach ($nameOrVarArray as $key => $value) {\n $this->templateVars[$key] = $value;\n }\n } else {\n $this->templateVars[$nameOrVarArray] = $value;\n }\n }", "title": "" }, { "docid": "ecfd9d3f68eb31130015f0411c47d649", "score": "0.5094894", "text": "function p4_ex2($var) {\n return 'La var : '.$var;\n}", "title": "" }, { "docid": "37face32ebb2f15877ab071c12779827", "score": "0.50946134", "text": "protected function _addBinding($type, $variable, $value)\n {\n $this->_currentRow[$variable] = compact('type', 'value');\n }", "title": "" }, { "docid": "685a3442cf251ce699bcb0be8723e957", "score": "0.5089442", "text": "public function ae_message_add_template(){\r\n\r\n }", "title": "" }, { "docid": "77b17e029f53182e0aba8bfebf61627c", "score": "0.50889516", "text": "public static function template($template)\n {\n self::$_template = $template;\n }", "title": "" }, { "docid": "093867cdf63e7eaaaaad3df74cfa3349", "score": "0.5086866", "text": "public function add_template_file() {\n\t\t$_V['template'] = str_replace(' ', '', AFilter::text(ARequest::get('template')));\n\t\tif(!is_dir(TPL_PATH . D_S . $_V['template'])) {\n\t\t\t$this->error(L('TEMPLATE_INEXISTENCE'), Url::U('template/list_template'));\n\t\t}\n\n\t\t$_V['current_dir'] = ARequest::get('dir');\n\t\tif(!TemplateModl::check_dirStr($_V['current_dir'])) {\n\t\t\t$this->error(L('DIR_INEXISTENCE'), Url::U('template/list_template'));\n\t\t}\n\n\t\t$this->assign('_V', $_V);\n\n\t\tif(M('Template')->check_lock($_V['template'], $_V['current_dir'])) {\n\t\t\t$this->error(L('DEFAULT_TEMPLATE_IS_LOCKED'), Url::U('template/list_template_file?template=' . $_V['template'] . '&dir=' . $_V['current_dir']));\n\t\t}\n\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "9802d7fdb0f9bb148a83625bb6be116c", "score": "0.5070485", "text": "function set($name, $value){\n\t\t$this->pageTemplate->set($name,$value);\n\t}", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "34a66b02e0cd1005d9c62b8d38eb2fce", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n $gear = Gear::find($id);\n\n if (isset($request['condition']) && $request['condition'] == \"true\") {\n $request['condition'] = TRUE;\n }\n else{\n $request['condition'] = FALSE;\n }\n\n if (isset($request['warranty']) && $request['warranty'] == \"true\") {\n $request['warranty'] = TRUE;\n }\n else{\n $request['warranty'] = FALSE;\n }\n\n $this->Validator($request->all())->validate();\n\n $gear->name = $request->input('name');\n $gear->description = $request->input('description');\n $gear->price = $request->input('price');\n $gear->condition = $request->input('condition');\n $gear->warranty = $request->input('warranty');\n $gear->link = $request->input('link');\n $gear->category = $request->input('category');\n\n if ($request->hasFile('image')) {\n \n $imagearray = explode(',', $gear->image);\n foreach ($imagearray as $image) {\n File::delete($image);\n }\n\n $images = $request->file('image');\n\n $path = [];\n\n foreach($images as $key => $image) {\n \n //get file name of image and concatenate with 4 random integer for unique\n $filename = rand(1111,9999).time().'.'.$image->getClientOriginalExtension();\n //path of image for upload\n $org_path = 'images/gear/' . $filename;\n\n $path[$key] = $org_path;\n\n Image::make($image)->fit(640, 640, function ($constraint) {\n $constraint->upsize();\n })->save($org_path);\n\n }\n $stringpath = implode(',', $path);\n $gear->image = $stringpath;\n }\n $gear->save();\n\n return redirect()->intended('gear')->with('status','Your ads has been edited successfuly.');\n }", "title": "" } ]
[ { "docid": "3a50a43d393625d85bd96071942ad788", "score": "0.75714874", "text": "public function updateResource(ResourceInterface $resource);", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "752f5b9bc26efe1c7c8a075d40083e96", "score": "0.6809332", "text": "public function update(Request $request, Resource $resource)\n {\n $resource->update($request->all());\n if(isset($request->document)){\n $resource->path = $request->document->store('resources');\n $resource->save();\n }\n\n return redirect()->route('resource.index');\n }", "title": "" }, { "docid": "7445b5d4d91cbe19348b2df243d18aab", "score": "0.6627074", "text": "public function update(Request $request, Resource $resource)\n {\n $validatedData = $request->validate([\n 'name' => 'required',\n 'type' => 'required',\n 'link' => 'required',\n ], [\n 'name.required' => 'Name is required',\n 'type.required' => 'Resource Type is required',\n 'link.required' => 'Resource link is required',\n \n ]); \n \n $user = $resource->update($validatedData); \n $notification = array(\n 'message' => 'Resource updated successfully.', \n 'alert-type' => 'success'\n );\n activity() \n ->withProperties(['Resource updated' => 'customValue'])\n ->log('Resource updated successfully.');\n return back()->with($notification);\n }", "title": "" }, { "docid": "bcac9b66cace80123502cdd07ed21469", "score": "0.6605713", "text": "public function update(User $user, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "f85fbc241b72589b5e2a6a92891995d8", "score": "0.6560501", "text": "public function update(StoreResourceRequest $request, $id)\n {\n $user = Auth::user();\n\n $validator = $request->validated();\n\n $tag = $this->getTag($request);\n\n // add media to users\n // attach file to collection\n $resource = $user\n ->addMedia($request->file_name)\n ->withCustomProperties([\n 'description' => $request->description,\n 'name' => $request->name,\n 'category' => $request->category\n ])\n ->toMediaCollection($tag['tag']);\n\n // delete existing resource\n if ($resource) {\n // add event to resources\n event(new ResouceUploadSuccessfull($resource));\n\n Session::flash('success', 'Resource edited successfully');\n\n // delete\n $user->deleteMedia($id);\n\n return redirect()->route('resources.index');\n } else {\n return redirect()\n ->back()\n ->withErrors($validator)\n ->withInput();\n }\n }", "title": "" }, { "docid": "9901ee04c4556a77d0429d850748027c", "score": "0.6518833", "text": "public function updateFromResource(\n $resource,\n $entity\n );", "title": "" }, { "docid": "7cc5a0be3b2151f9d7920f9c2df70a9d", "score": "0.6504825", "text": "public static function update ($resource, $data) {\n // Retrieve resource.\n $list = self::retriveJson($resource);\n // If resource is not availabe.\n if ($list == 1) return 1;\n\n // Iterate through list.\n foreach($list as $i => $list) {\n // If an object with the given id exists, update the doc. (replace it)\n if ($list['id'] == $data['id']) {\n $list[$i] = $data;\n // Save back list.\n file_put_contents('../json/' . $resource . '.json', json_encode($list, JSON_PRETTY_PRINT|JSON_NUMERIC_CHECK));\n return 0;\n }\n }\n\n // If object does not exists.\n return 2;\n }", "title": "" }, { "docid": "cc1bb24b76b18f977d0e3ddafd2da367", "score": "0.6318228", "text": "public function updateWithForm(ResourceInterface $resource, FormInterface $form);", "title": "" }, { "docid": "462cfa1506a93082bf1af8b3d4ee6ec9", "score": "0.62273467", "text": "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n\n // make sure that the id has not been changed\n $resource->orderId = $id;\n\n $orderIndex = 0;\n foreach ($this->orders->order as $order) {\n if ($order->orderId == $id ) {\n $this->orders->order[$orderIndex] = $resource;\n }\n $orderIndex = $orderIndex + 1;\n }\n $this->writeOrders();\n\n // return true to indicate that the resource\n // was successfully updated or false otherwise\n return true;\n }", "title": "" }, { "docid": "7d6afd369d487ebb6851cb2c895ec06d", "score": "0.6224019", "text": "public function update(Request $request, $id)\n {\n //\n\n $this->validate($request,[\n 'title'=> 'required|max:255',\n 'description' => 'required',\n 'category_id'=> 'required'\n ]);\n\n $resource = Resource::find($id);\n //Check if there is a new featured image\n if($request->hasFile('featured')){\n $featured = $request->featured;\n \n $featured_new_image = time().$featured->getClientOriginalName();\n\n $featured->move('uploads/resource/', $featured_new_image);\n\n $resource->featured ='uploads/resource/'.$featured_new_image;\n }\n\n if($request->hasFile('file')){\n $file = $request->file;\n \n $file_new = time().$file->getClientOriginalName();\n\n $file->move('uploads/resource/', $file_new);\n\n $resource->file ='uploads/resource/'.$file_new;\n }\n \n\n $resource->title = $request->title;\n $resource->description =$request->description;\n $resource->category->id = $request->category_id;\n \n $resource->save();\n\n\n Session::flash('success', 'resource was Succcessfully Updated');\n \n return redirect()->route('resources');\n }", "title": "" }, { "docid": "97ab59f4e7b15c75870b07fa0dd39aba", "score": "0.6154258", "text": "public function update(UpdateResourceRequest $request, Resource $resource)\n {\n $resource->fill($request->validated());\n $resource->save();\n\n flash(__('resource.update_succeeded'), 'success');\n\n return redirect(\\localized_route('resources.show', $resource));\n }", "title": "" }, { "docid": "a8f8f45d5f4601812b2ce88dd6dbe531", "score": "0.60922074", "text": "public function update(FileStoreRequest $request, File $file): FileResource\n {\n $filePathToBeDeleted = $file->path;\n\n $uploadFile = $request->file('file');\n $path = $uploadFile->store('files');\n $file->fill([\n 'name' => $uploadFile->getClientOriginalName(),\n 'size' => $uploadFile->getSize(),\n 'path' => $path,\n ])->save();\n\n // 更新前のファイルを削除する\n Storage::delete($filePathToBeDeleted);\n\n return new FileResource($file);\n }", "title": "" }, { "docid": "73fa3eea6cf8fa9ffa3163d6f041f35a", "score": "0.6090497", "text": "public static function update(){\n $idResource = $_REQUEST[\"idResource\"];\n $name = $_REQUEST[\"name\"];\n $description = $_REQUEST[\"description\"];\n $location = $_REQUEST[\"location\"];\n $image = $_REQUEST[\"image\"];\n\n $result = DB::dataManipulation(\"UPDATE resources \n SET name='$name', description='$description', location='$location', image='$image'\n WHERE idResource = '$idResource'\");\n return $result;\n }", "title": "" }, { "docid": "c7e58c377e7036109c1a48ddf3dcfefc", "score": "0.60779715", "text": "public function update($id, $resource, callable $closure = null) : string;", "title": "" }, { "docid": "0cfb002e6b713b68d223072995d11de5", "score": "0.59343815", "text": "public function update(Request $request, $id)\n {\n try{\n Log::info('Andre sent me :'. $id );\n\n// $extension = $request->header('Content-Type');\n $resourceFile = $request->file('resource');\n $resource = Resource::find($id);\n $orientation = $request->input('orientation');\n $os = $request->input('os');\n\n if (!$resource){\n return response()->json(['status'=>false, 'mess'=>'Resource not found'], 404);\n }\n\n $extension =($resource->type=='video')?'mp4':'jpg';\n\n $resourceName = $resource->type.'_'.str_random(20).'.'.$extension;\n\n Log::info('resource Name:'. $resourceName);\n// file_put_contents(public_path(\"uploads/targets/$resourceName\"),$resourceFile);\n $resourceFile->move(public_path(\"uploads/targets/\"),$resourceName);\n\n $resource->resource = asset('uploads/targets/'.$resourceName);\n $resource->orientation = $orientation;\n\n if($extension == 'jpg'){\n\n @unlink(Resource::getPublicPath($resource->thumbnail,'uploads'));\n\n $imgIntervention = Image::make(public_path(\"uploads/targets/$resourceName\"));\n $imgIntervention->resize(300, null, function ($constraint) {\n $constraint->aspectRatio();\n });\n $imgIntervention->save(public_path(\"uploads/targets/thumb_$resourceName\"));\n\n $resource->thumbnail = asset(\"uploads/targets/thumb_$resourceName\");\n\n } elseif ($extension == 'mp4' && $os == 'ios'){\n Log::info('coding video:'.$resourceName);\n $path = \"uploads/targets/$resourceName\";\n $codecName = $this->codecVideo($path);\n $resource->resource = asset(\"uploads/targets/$codecName\");\n\n @unlink(public_path(\"uploads/targets/$resourceName\"));\n }\n $resource->save();\n\n return response()->json([\n 'status'=>true,\n 'mess'=>'Resource updated successfully',\n 'resource' => $resource->resource,\n 'orientation' => $orientation,\n 'id' => $resource->id\n ], 200);\n\n } catch (RuntimeException $e){\n Log::info(\"Run time exception :::::::{$e->getMessage()},\n {$e->getFile()},\n {$e->getLine()},\n {$e->getCode()}:::::::\n {$e->getPrevious()},\n {$e->getTraceAsString()}\");\n\n return response()->json([\n 'status'=>false,\n 'message' => 'Service not available'\n ]);\n } catch (\\Exception $e){\n Log::info(\"Error uploading resource {$e->getMessage()},{$e->getLine()}\");\n return response()->json(['status'=>false, 'mess'=>'Something bad happened','mess'=>$e->getMessage()], 500);\n }\n\n }", "title": "" }, { "docid": "224012b8fa6632fd147301ce49677476", "score": "0.5919281", "text": "public function update($path = null);", "title": "" }, { "docid": "0071066085a87af5ff4e3caa00181951", "score": "0.58929604", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'storage_name' => 'required',\n 'storage_brand' => 'required',\n 'storage_inv_level' => 'required',\n 'storage_remarks' => 'required',\n 'storage_price' => 'required',\n 'staff_id' => 'required'\n ]);\n\n $storage = Storage::find($id);\n $storage->storage_name = $request->get('storage_name');\n $storage->storage_brand = $request->get('storage_brand');\n $storage->storage_inv_level = $request->get('storage_inv_level');\n $storage->storage_remarks = $request->get('storage_remarks');\n $storage->storage_price = $request->get('storage_price');\n $storage->staff_id = $request->get('staff_id');\n $storage->save();\n return redirect()->route('storage.index')->with('success', 'Data Updated');\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "d77b59532b99d1c5a851cba200aa54d0", "score": "0.5855354", "text": "public function update(EntrepriseStoreRequest $request, $id)\n {\n \n$Entreprise=Entreprise::get()->where('id',$id)->first();\n if($Entreprise->update($request->toArray())) {\n return new EntrepriseResource($Entreprise);\n }\n }", "title": "" }, { "docid": "97987f7f27fb22ee032873cda433d9bd", "score": "0.5833858", "text": "public function update($id)\n\t{\n\t\t// $validator = Resource::validate(Input::all());\n\t\t// if ($validator->fails()) {\n\t\t// \treturn Redirect::to('resources/'.$id. '/edit')\n\t\t// \t\t->withErrors($validator)\n\t\t// \t\t->withInput(Input::all());\n\t\t// } else {\n\t\t\t// store\n\t\t\t$resource = Resource::find($id);\n\t\t\t$resource->name = Input::get('name');\n\t\t\t$resource->description = Input::get('description');\n\t\t\t$resource->url \t\t\t = Input::get('url');\n\t\t\t$resource->level = Input::get('level');\n\t\t\t$resource->faculty = Input::get('faculty');\n\t\t\t$tagIds = array();\n\n\t\t\t$deviceIds = Input::get('device');\n\n\t\t\t$tag_ids = Input::get('tag_ids');\n\n\t\t\tif($tag_ids !=''){\n\t\t\t\t $tagIds = explode(\",\", $tag_ids);\n\t\t\t\t $resource->tags()->sync($tagIds); \n\t\t\t}\n\t\t\tif(($deviceIds != '') || ($deviceIds === ''))\n\t\t\t{\n\t\t\t\t$resource->devices()->delete();\n\t\t\t\tforeach ($deviceIds as $device_type) {\n\t\t\t\t\t$device = new Device(array(\"device_type\" => $device_type));\n\t\t\t\t\t$resource->devices()->save($device);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$resource->save();\n\t\t\t// redirect\n\t\t\treturn Redirect::to('resources')->with('message', 'Successfully updated');\n\t\t// }\n\t}", "title": "" }, { "docid": "6459eee6e3a41ede04d36d11caa1d5eb", "score": "0.58181334", "text": "public function updateStream($path, $resource, Config $config) {\n return $this->upload($path, $resource, $config);\n }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747208", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "db09cf30f818ecb3e902128794767b8d", "score": "0.5746784", "text": "public function update(Request $request, $resourceKey, $resourceId)\n {\n $resource = Admin::findResourceByKey($resourceKey);\n\n if (! $resource) {\n abort(404);\n }\n\n $model = $resource::$model::findOrFail($resourceId);\n\n $resource = $resource::forModel($model);\n\n $resource->fill($request, true);\n\n $resource->model()->save();\n\n return response()->json([\n 'resource' => $resource->model(),\n 'redirectTo' => \"/resources/{$resource::key()}\",\n ]);\n }", "title": "" }, { "docid": "c663fe1b05bf4d8d7ede798fe4662e67", "score": "0.5743986", "text": "public function update(Request $request, $id)\n {\n $update = File::find($id);\n Storage::delete('public/img/'.$update->src);\n Storage::put('public/img', $request->file(('src')));\n $update->src = $request->file('src')->hashName();\n $update->save();\n return redirect('/files');\n }", "title": "" }, { "docid": "933f18c2310d5e305818c242d32a6c28", "score": "0.57367915", "text": "public function put($resource, $params=[])\n {\n return $this->request((object)['method'=>'PUT', 'url'=>$resource, 'params'=>$params]);\n }", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "60783debc10f87ff4cab890105f5fde2", "score": "0.57210916", "text": "public function updateStream($path, $resource, $config = null)\n {\n return $this->stream($path, $resource, $config, 'update');\n }", "title": "" }, { "docid": "40ffb6251c952892e7a1d8715e96cf6b", "score": "0.5709733", "text": "public function update(UpdateProductPut $request, $id)\n {\n\n // $validate = $request->validated();\n $product = Product::find($id);\n $product->name = $request->name;\n $product->sale_price = $request->sale_price;\n $product->stock = $request->stock;\n $product->description = $request->description;\n $product->status = $request->status;\n $product->id_category = $request->id_category;\n if ($request->file('url_image')) {\n $product->url_image = $this->UploadImage($request);\n }\n $product->save();\n return redirect()->route('get-product');\n }", "title": "" }, { "docid": "407b4de54d22bd98c040ebf1ed10ebd4", "score": "0.56991494", "text": "public function update(Request $request, $id)\n {\n $Image = Image::find($id);\n $product_id = $Image->product()->get()->first()->id;\n $main = $Image->main;\n\n $this->validate($request,[\n 'main'=>'required|boolean|in:' . $main,\n 'name' => 'required|max:10000|mimes:png,jpg,jpeg',\n ]);\n\n $storage = request()->file('name')->store('products','s3');\n\n $response = Image::find($id)->update([\n 'product_id'=>$product_id,\n 'main'=>$request->input('main'),\n 'name'=>$storage\n ]);\n\n $message = $response ? 'The Image was updated successfully' : 'the image could not be updated';\n\n return response(['message'=>$message],201);\n }", "title": "" }, { "docid": "1332499ac23c48464ff7796319792c7a", "score": "0.5694969", "text": "public function update(Request $request, $id)\n {\n $user = $request->user();\n $data = $request->only(['name', 'description']);\n $file = File::findOrFail($id);\n\n // not file owner\n if ($file->uploaded_by != $user->id) {\n return $this->errorUnauthorized('Unauthorized', [\"You can\\'t Update the file details.\"]);\n }\n\n $file->fill($data);\n $file->save();\n\n\n $resource = new JsonResource($file);\n\n return $resource;\n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "e30c06b78f9a9b4366cad726cc1d7e0c", "score": "0.5667808", "text": "public function update($id)\n\t{\n\t\t$input = array_except(Input::all(), '_method');\n\t\t$validation = Validator::make($input, CmsResource::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\t\t\t$resource = $this->resource->find($id);\n\t\t\t$resource->update($input);\n\n\t\t\treturn Redirect::route('backend.resources.index');\n\t\t}\n\n\t\treturn Redirect::route('backend.resources.edit', $id)\n\t\t\t->withInput()\n\t\t\t->withErrors($validation)\n\t\t\t->with('message', 'There were validation errors.');\n\t}", "title": "" }, { "docid": "c4e7a9cc1238d660d6f97533a98c2cd7", "score": "0.5662976", "text": "public function update(Request $request, $id)\n {\n $this->validator($request->all())->validate();\n $asset = Asset::findOrFail($id);\n $asset->name = $request->name;\n if ($asset->quantity > (int)$request->quantity){\n $asset->available = $asset->available - ($asset->quantity - (int)$request->quantity);\n if ($asset->available < 0){\n return response('Error, Available Asset should not be negative', 406);\n }\n $asset->quantity = (int)$request->quantity;\n } else if ($asset->quantity < (int)$request->quantity){\n $asset->available = $asset->available + ((int)$request->quantity - $asset->quantity);\n $asset->quantity = (int)$request->quantity;\n } else {\n $asset->quantity = (int)$request->quantity;\n $asset->available = (int)$request->quantity;\n }\n if($request->hasFile('image')){\n /* if($asset->image != 'no-image.png'){\n unlink('assets/'.$asset->image);\n } */\n $image = $request->file('image');\n $fileName = time().\"-\".$image->getClientOriginalName();\n $image->move('image', $fileName);\n $asset->image = $fileName;\n }\n $asset->save();\n return response()->json([\n 'message' => 'Successfully update asset',\n 'asset' => $asset\n ]);\n }", "title": "" }, { "docid": "5c940a83bd77d1ab7bfbae8c9d00ddbf", "score": "0.5660953", "text": "public function update($id, $data)\n {\n try {\n $this->logger->info(\"Trying to update resource in database table\");\n $this->checkId($id);\n\n $putValues = $this->putValues($data);\n if ($putValues > 0) {\n $bulk = new BulkWrite();\n\n $bulk->update(['_id' => intval($id)], ['$set' => $putValues]);\n\n $this->conn->executeBulkWrite('test.user', $bulk);\n echo \"Resource successfully updated\";\n $this->logger->info(\"Updating resource successful in database table\");\n }\n } catch (InvalidIdException $e) {\n $this->logger->warning(\"ID doesn't exist in database table\");\n echo \"Error: \" . $e->getMessage();\n } catch (\\Exception $e) {\n $this->logger->warning(\"Error updating resource in database table\");\n echo \"Error updating resource: \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "649350006c65652f1bf440a8fd23429b", "score": "0.563811", "text": "public function update(Request $request, Bundle $bundle)\n {\n $validated = $this->validate($request, [\n 'name' => 'required|string',\n 'colour' => 'required|string',\n 'description' => 'required|string',\n 'products' => 'required|array',\n 'products.*' => 'required|numeric',\n 'categories' => 'required|array',\n 'categories.*' => 'required|numeric',\n 'new_image' => 'sometimes|image',\n 'delete_image' => 'sometimes|numeric',\n 'design' => 'required|string',\n ]);\n\n $bundle->update([\n 'name' => $validated['name'],\n 'description' => $validated['description'],\n ]);\n\n $bundle->detail()->update([\n 'colour' => $validated['colour'],\n 'design' => $validated['design'],\n ]);\n\n $bundle->products()->sync($validated['products']);\n $bundle->detail->categories()->sync($validated['categories']);\n\n if ($request->has('new_image')) {\n $file = $validated['new_image'];\n\n $upload = $file->store(\"bundle_images/{$bundle->id}\", 's3');\n Storage::disk('s3')->setVisibility($upload, 'public');\n $imageModel = new Image([\n 'path' => basename($upload),\n 'url' => Storage::url($upload)\n ]);\n\n $bundle->detail()->image()->save($imageModel);\n $bundle->detail()->image()->where('id', $validated['delete_image'])->delete();\n }\n\n return new BundleResource($bundle);\n }", "title": "" }, { "docid": "2d0a673b6cf0d1b1620a19adfbcff86f", "score": "0.56370103", "text": "final public function update($parentId, $resourceId)\n {\n return $this->tryAndCatchWrapper('updateResource', [$parentId, $resourceId, Input::all()]);\n }", "title": "" }, { "docid": "44a8e8f174a93bc6c16b91f667c20342", "score": "0.5628897", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::find($id);\n $product->url = $request->input('url');\n $product->title = $request->input('title');\n $product->excerpt = $request->input('excerpt');\n $product->content = $request->input('content');\n $product->price_origin = $request->input('price_origin');\n $product->price_selling = $request->input('price_selling');\n $product->save();\n $product->files()->sync($request->input('images'));\n // dd($request);\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "3c2a73c4327fed0385c084b5313336dd", "score": "0.56222475", "text": "function update_resource($r,$path,$type,$title,$ingest=false,$createPreviews=true)\n\t{\n\t# Note that the file will be used at it's present location and will not be copied.\n\tglobal $syncdir,$staticsync_prefer_embedded_title;\n\n\tupdate_resource_type($r, $type);\n\n\t# Work out extension based on path\n\t$extension=explode(\".\",$path);\n \n if(count($extension)>1)\n {\n $extension=trim(strtolower(end($extension)));\n }\n else\n {\n //No extension\n $extension=\"\";\n }\n \n\n\t# file_path should only really be set to indicate a staticsync location. Otherwise, it should just be left blank.\n\tif ($ingest){$file_path=\"\";} else {$file_path=escape_check($path);}\n\n\t# Store extension/data in the database\n\tsql_query(\"update resource set archive=0,file_path='\".$file_path.\"',file_extension='$extension',preview_extension='$extension',file_modified=now() where ref='$r'\");\n\n\t# Store original filename in field, if set\n\tif (!$ingest)\n\t\t{\n\t\t# This file remains in situ; store the full path in file_path to indicate that the file is stored remotely.\n\t\tglobal $filename_field;\n\t\tif (isset($filename_field))\n\t\t\t{\n\n\t\t\t$s=explode(\"/\",$path);\n\t\t\t$filename=end($s);\n\n\t\t\tupdate_field($r,$filename_field,$filename);\n\t\t\t}\n\t\t}\n\telse\n\t\t{\n\t\t# This file is being ingested. Store only the filename.\n\t\t$s=explode(\"/\",$path);\n\t\t$filename=end($s);\n\n\t\tglobal $filename_field;\n\t\tif (isset($filename_field))\n\t\t\t{\n\t\t\tupdate_field($r,$filename_field,$filename);\n\t\t\t}\n\n\t\t# Move the file\n\t\tglobal $syncdir;\n\t\t$destination=get_resource_path($r,true,\"\",true,$extension);\n\t\t$result=rename($syncdir . \"/\" . $path,$destination);\n\t\tif ($result===false)\n\t\t\t{\n\t\t\t# The rename failed. The file is possibly still being copied or uploaded and must be ignored on this pass.\n\t\t\t# Delete the resouce just created and return false.\n\t\t\tdelete_resource($r);\n\t\t\treturn false;\n\t\t\t}\n\t\tchmod($destination,0777);\n\t\t}\n\n\t# generate title and extract embedded metadata\n\t# order depends on which title should be the default (embedded or generated)\n\tif ($staticsync_prefer_embedded_title)\n\t\t{\n\t\tupdate_field($r,8,$title);\n\t\textract_exif_comment($r,$extension);\n\t\t}\n\telse\n\t\t{\n\t\textract_exif_comment($r,$extension);\n\t\tupdate_field($r,8,$title);\n\t\t}\n\n\t# Ensure folder is created, then create previews.\n\tget_resource_path($r,false,\"pre\",true,$extension);\n\n\tif ($createPreviews)\n\t\t{\n\t\t# Attempt autorotation\n\t\tglobal $autorotate_ingest;\n\t\tif($ingest && $autorotate_ingest){AutoRotateImage($destination);}\n\t\t# Generate previews/thumbnails (if configured i.e if not completed by offline process 'create_previews.php')\n\t\tglobal $enable_thumbnail_creation_on_upload;\n\t\tif ($enable_thumbnail_creation_on_upload) {create_previews($r,false,$extension,false,false,-1,false,$ingest);}\n\t\t}\n\n\t# Pass back the newly created resource ID.\n\treturn $r;\n\t}", "title": "" }, { "docid": "aa128686308e2019542f4e4b1718d443", "score": "0.5620492", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required',\n 'price' => 'require|numeric',\n 'primary_image' => 'required',\n 'stock' => 'required|numeric',\n 'model' => 'required',\n 'descriptions' => 'required',\n ]);\n\n $celotehs = Product::findOrFail($id);\n $celotehs->name = $request->name;\n $celotehs->price = $request->price;\n $celotehs->stock = $request->stock;\n $celotehs->model = $request->model;\n $celotehs->cat_id = $request->cat_id;\n $celotehs->slug = str_slug($request->name.'-'.$request->model);\n $celotehs->descriptions = $request->descriptions;\n\n if($request->hasFIle('primary_image')){\n $file = $request->file('primary_image');\n $fileName = time().'.'.$file->getClientOriginalName();\n $ServicesPath = public_path('/product_image');\n $file->move($ServicesPath, $fileName);\n\n $oldFilename = $celotehs->primary_image;\n \\Storage::delete($oldFilename);\n $celotehs->primary_image = $fileName;\n }\n $celotehs->save();\n }", "title": "" }, { "docid": "771640493fc7ebfa6a0af52988c42fb3", "score": "0.5612911", "text": "public function update(Request $request, Product $product)\n {\n $product->title = $request->title;\n $product->description = $request->description;\n $product->category_id = $request->category_id;\n $product->manufacturer_id = $request->manufacturer_id;\n $product->price = $request->price;\n $product->quantity = $request->quantity;\n if($request->hasFile('image_url')){\n $file = $request->file('image_url');\n $file->store('public');\n $product->image_url = $file->hashName();\n }\n\n $product->update();\n\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "bf1740aaa96591f0fe97955a50a97b84", "score": "0.56054395", "text": "public function update(Request $request)\n { \n $slider = Slider::first();\n \n // @dd($request->slider_image);\n if($request->title){\n $slider->title = $request->title;\n }\n\n if($request->hasFile('slider_image')){\n if($slider->slider_image && file_exists(public_path($slider->slider_image))){\n unlink(public_path($slider->slider_image));\n }\n\n $image = $request->slider_image;\n $imageName = time() . '.' . $image->getClientOriginalExtension();\n \n Storage::putFileAs('public/slider', $image, $imageName);\n $slider->slider_image = 'storage/slider/' . $imageName;\n }\n \n\n $slider->save();\n Session::flash('success', 'Slider updated successfully');\n return redirect()->back();\n }", "title": "" }, { "docid": "b7bac3ceb1b9b8584ebd61b08fa09788", "score": "0.5604227", "text": "public function putAction()\n {\n /** XXX **/\n\n $this->view->message = sprintf('Resource #%s Updated', $id);\n $this->_response->ok();\n }", "title": "" }, { "docid": "ab8f98efb36600284def5deb6135e230", "score": "0.5592424", "text": "public function update(Request $request, $id)\n {\n //Get data from form\n $data = $request->all();\n\n //Validation\n $request->validate($this->ruleValidation());\n \n //Get product to update\n $product = Product::find($id);\n \n //Slug generation\n $data['slug'] = Str::slug($data['name'] , '-');\n \n //If image changed?\n if(!empty($data['path_img'])) {\n if(!empty($product->path_img)) {\n Storage::disk('public')->delete($product->path_img);\n }\n $data['path_img'] = Storage::disk('public')->put('images' , $data['path_img']);\n }\n \n //Update in database\n $updated = $product->update($data); //<---- Fillable in model!!\n \n //Stockpiles table update\n $data['product_id'] = $product->id; //Foreign Key\n $stockpile = Stockpile::where('product_id' , $product->id)->first();\n $stockpileUpdated = $stockpile->update($data); //<---- Fillable in model!!\n \n \n if($updated && $stockpileUpdated) {\n if (!empty($data['sizes'])) {\n $product->sizes()->sync($data['sizes']);\n } else {\n $product->sizes()->detach();\n }\n return redirect()->route('products.show' , $product->slug);\n } else {\n return redirect()->route('homepage');\n }\n }", "title": "" }, { "docid": "8d93fc07b96d71210cab24576cf6888b", "score": "0.5569772", "text": "public function update(Request $request, Post $PostResource)\n {\n $id = $request->id;\n\n $request->validate([\n 'name'=>'required',\n 'email'=>'required',\n 'mobile'=>'required|min:11|max:11',\n 'post'=>'required'\n ]);\n \n $post= Post::find($id);\n\n \n $post->name=$request->name;\n $post->email=$request->email;\n $post->mobile=$request->mobile;\n $post->post=$request->post;\n if($request->has('image')){\n\n $file = $request->file('image');\n \n $extenstion= $file->getClientOriginalExtension();\n $filename = time().'.'.$extenstion;\n $file->move('image/',$filename);\n \n $post->image = $filename;\n }\n \n $post->save();\n\n return back()->with('success','Updated successfully');\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": "a5ebf66d1c0add5886fcc1bbfb8d0b1a", "score": "0.55630946", "text": "public function updateResource($id)\n {\n try\n {\n $resource = $this->findResource($id);\n\n $resource->fill(Input::all());\n\n $resource->updated_by = Auth::id();\n\n $resource->save();\n }\n catch (Exception $e)\n {\n if($e instanceof ModelNotFoundException)\n return Response::make('Not Found', 404);\n else\n return Response::json(array('error' => $e->getMessage()), 500, array(), JSON_PRETTY_PRINT);\n }\n\n // return $resource;\n return Response::json($resource, 200, array(), JSON_PRETTY_PRINT);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0ef46f7717fdeb10a6f38c6770cdea63", "score": "0.55593103", "text": "public function update(Request $request, $id)\n {\n $input = $request->except(['_token', 'ProductImage']);\n \n $validation = Validator::make($input, Product::$rules);\n\n if ($validation->passes())\n {\n $product = Product::find($id);\n if ($request->hasFile('ProductImage'))\n {\n $image = $request->file('ProductImage');\n $fileName = time() . '.' . $image->getClientOriginalExtension();\n $relativePath = 'storage/images/' . $fileName;\n $location = public_path($relativePath);\n Image::make($image)->resize(800, 800, function ($c) {\n $c->aspectRatio();\n $c->upsize();\n })->save($location);\n $input['ProductImage'] = $relativePath;\n File::delete($product->ProductImage);\n $input['ProductImage'] = $relativePath;\n }\n $product->update($input);\n\n return redirect()->route('admin.index');\n }\n return redirect()->back()->withInput()->withErrors($validation);\n\n }", "title": "" }, { "docid": "33267ee3ddd0a9817f3485c99b6de745", "score": "0.55510455", "text": "public function update(Request $request, $id)\n {\n $data = $this->validate(request(),$this->validation(),[],$this->aliases());\n\n if(request()->hasFile(\"icon\"))\n {\n $oldLogo = manufact::find($id);\n //if record is exist with info delete this image from storage disk\n !empty($oldLogo->icon)? Storage::delete($oldLogo->icon):\"\";\n $data['icon'] =request()->file(\"icon\")->store(\"manufact\");\n\n }\n manufact::where(\"id\",$id)->update($data);\n\n session()->flash(\"success\",trans(\"admin.record_updated\"));\n return redirect(adminUrl(\"manufacts\"));\n\n }", "title": "" }, { "docid": "47168320d9d05e709b482ca518e7f1ee", "score": "0.55488104", "text": "public function setResource(FlowResource $resource) {\n\t\t$this->lastModified = new \\DateTime();\n\t\t$this->resource = $resource;\n\t\t$this->refresh();\n\t}", "title": "" }, { "docid": "5a73deb6a0e172b702c955e120ece98b", "score": "0.5545744", "text": "public function update(Request $request, BookStorageRequestController $bookStorageReq)\n {\n $this->validate($request, [\n 'price' => 'required|double',\n ]);\n\n $bookStorageReq->update($request->all());\n return $this->createdResponse(true, 'Storage Book Request updated successful', Response::HTTP_CREATED);\n\n }", "title": "" }, { "docid": "f486c0486b6da506772c0b077febc53b", "score": "0.55438197", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $product->description = $request->description;\n $product->title = $request->title;\n $product->price = $request->price;\n $product->price_discounts = ($request->price_discounts == \"\"?0 : $request->price_discounts );\n $product->is_sale = ($request->is_sale==\"\"?0:$request->is_sale);\n $product->shipping_local_price = ($request->shipping_local_price==''?'0':$request->shipping_local_price);\n $product->shipping_local_duration = ($request->shipping_local_duration==\"\"?0:$request->shipping_local_duration);\n $product->shipping_int_disabled = ($request->shipping_int_disabled==\"\"?0:$request->shipping_int_disabled);\n $product->shipping_int_price = $request->shipping_int_price;\n $product->shipping_int_duration = ($request->shipping_int_duration==\"\"?0:$request->shipping_int_duration);\n $product->logistic_provider = $request->logistic_provider;\n $product->product_type_id = $request->product_type_id;\n $product->brand_id = $this->create_brand($request->brand_id);\n $product->category_id = $this->create_category($request->category_id);;\n $product->save();\n\n $sizes_array = $request->product_size;\n $product->sizes()->sync($sizes_array);\n\n return redirect('seller/product/images/'.$product->slug);\n }", "title": "" }, { "docid": "6e27acd0248f696913d7581142ab1983", "score": "0.5543788", "text": "public abstract function update($object);", "title": "" }, { "docid": "9b6a5eaf2ee3686b5156067b74bb0dfb", "score": "0.5541244", "text": "public function update(Request $request, $id)\n {\n \n $validated = $request->validate([ \n 'name' => 'required|min:3|max:255',\n 'price' => 'required|numeric|min:1',\n 'slug' => 'required|unique:products,slug,'.$id.'|min:3|max:30', \n ]);\n\n $product = Product::findOrFail($id); \n $product -> update( $request->all() ); \n $product->productRecommended()->sync($request->productRecommended);\n\n return redirect('/admin/product');\n }", "title": "" }, { "docid": "1a5b5ef3d6bb570ffa00d57829394a42", "score": "0.55390495", "text": "public function updateResource(Request $request)\n {\n $validate = request()->validate([\n \n 'resource' => \t'required|string|max:64',\n 'id' => \t'required|integer|max:999999999',\n 'status_id' => \t'required|integer|max:999999999',\n 'user_id' => \t'required|integer|max:999999999',\n \n ]);\n\n $tableName = Str::snake($request->resource);\n\n $updated = \\DB::table($tableName)\n ->where('id', $request->id)\n ->update([\n 'status_id' => $request->status_id,\n 'user_id' => $request->user_id\n ]);\n\n $resourceName = ucwords(implode(' ',preg_split('/(?=[A-Z])/', $request->resource)));\n \n if($updated) \n {\n $status = Status::select('name')->find($request->status_id);\n \n return [ 'msj' => \"$resourceName $status->name\" , 'updated' => $updated]; \n\n } else {\n\n return [ 'msj' => \"Error al Actualizar el estatus de $resourceName\" , 'updated' => $updated];\n } \n \n }", "title": "" }, { "docid": "47ec7ae1a3f0c72b0d1b28dee038bf70", "score": "0.5536234", "text": "public function set($key, \\Cache\\Resource $resource) \n\t{\n\t\t$path = $this->resolve($key);\n\t\treturn file_put_contents($path, serialize($resource->contents()));\n\t}", "title": "" }, { "docid": "6fa462c97a105fb94770bc7df36317fd", "score": "0.55360246", "text": "public function update(Request $request, Product $product){\n if ($request->image) {\n $image = $request->file('image')->store('product'); //PEGA A IMAGEM QUE VEM DO REQUEST E SALVA NA PRODUCT\n $image = \"storage/\".$image;\n if (!$product->image != \"storage/product/imagem.jpg\"){\n Storage::delete(str_replace('storage/', '', $product->image));\n }\n }else{\n $image = $product->image; //DEIXA COMO PADRÃO\n }\n $product->update([ //FAZ O INSERT\n 'name' => $request->name,\n 'description' => $request->description,\n 'price' => $request->price,\n 'category_id' => $request->category_id,\n 'image' => $image\n ]);\n $product->tags()->sync($request->tags);\n session()->flash('success','Produto alterado com sucesso!');\n return redirect(route('product.index')); //RETORNA PARA A TELA DE PRODUTO\n\n }", "title": "" }, { "docid": "0b380d3324f425a60f02a42cf8926df0", "score": "0.5535138", "text": "private function updateInformation(ResourceInterface $resource, array $data)\n {\n $resource->setName($data['name']);\n return $resource;\n }", "title": "" }, { "docid": "f98f2ab5b3f691d4f3bcd3ab66059f75", "score": "0.5534422", "text": "public function update()\n {\n $product = Product::find(request('id'));\n $product->name = request('name');\n $product->description = request('description');\n $product->price = request('price');\n $product->visible = request('visible');\n $product->save();\n }", "title": "" }, { "docid": "6dfa34e48caec1acdad37292592274e5", "score": "0.5533082", "text": "abstract public function testUpdate($id);", "title": "" }, { "docid": "fb9110a6194ea1491d48e8acae8a6fca", "score": "0.55321616", "text": "public function update($object)\n {\n\n }", "title": "" }, { "docid": "6501efdb0a31814c4c7662ddb8023019", "score": "0.5528317", "text": "public static function update(Request $request, $resource_id)\n {\n $data = $request->all();\n $validatedData = $request->validate([\n \"listing_id\" => \"required\"\n \"title\" => \"required\"\n \"pricing_type\" => \"required\"\n \"amount\" => \"required\"\n ]);\n try {\n $store = SharedRooms::find($resource_id);\n $store->listing_id = $data['listing_id'];\n $store->title = $data['title'];\n $store->pricing_type = $data['pricing_type'];\n $store->amount = $data['amount'];\n $store->description = $data['description'] ?? null;\n $store->save();\n activity()\n ->causedBy(Auth::user()->id)\n ->performedOn($store)\n ->withProperties(['id' => $store->id])\n ->log('shared rooms created');\n return response()->json(['status'=> 'ok', 'data'=> $store, 'msg'=> 'Data updated successfully']);\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }", "title": "" }, { "docid": "0ddf9bf19010bb4376b58c65fc007dcb", "score": "0.55195576", "text": "public function update(Store $request, $id)\n {\n //set filename and directory path\n $photo = PhotoRooms::query()->find($id);\n $file = $request->file('photo');\n $roomID = 'ROOM_NO_' . $photo->room->id;\n $name = $roomID . '_' . uniqid();\n //delete photo using its public id from cloudinary\n Cloudinary::destroy($photo->public_id);\n //upload photo to cloudinary\n $cloudinary = $file->storeOnCloudinaryAs('public/rooms/' . $roomID . '/photos', $name);\n //update chosen photo with data fetched from the uploader\n $photo->update([\n 'secure_url' => $cloudinary->getSecurePath(),\n 'public_id' => $cloudinary->getPublicId()\n ]);\n\n return redirect('/admin/rooms')->with('message', 'Photo updated successfully!');\n }", "title": "" }, { "docid": "b5d2b22e695863a96f5a335c883dea91", "score": "0.55156153", "text": "public function update($item);", "title": "" }, { "docid": "04829aa320ae5bba4e589640674e688a", "score": "0.5510222", "text": "public function update(Request $request, $id)\n {\n $datosArticulo=request()->except(['_token','_method']);\n \n if ($request->hasFile('Foto')) {\n \n $articulo= Articulos::findOrFail($id);\n\n Storage::delete('public/'.$articulo->Foto);\n\n $datosArticulo['Foto']=$request->file('Foto')->store('uploads','public');\n\n }\n\n Articulos::where('id','=',$id)->update($datosArticulo);\n\n return redirect('articulos')->with('Mensaje','Empleado modificado con exito');\n\n }", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "acea4a8a9031c5ee3ac67934fabd53a5", "score": "0.55071735", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n \n $product->update([\n 'title' => request('title'),\n 'content' => request('content'),\n 'quantity' => request('quantity'),\n 'capacity' => request('capacity'),\n 'price' => request('price'),\n 'is_active' => request('is_active'),\n 'discount' => request('discount'),\n ]);\n if ($request->hasFile('photos')) {\n foreach($request->photos as $photo){\n $filename = $photo->store('uploads', 'public');\n ProductPhoto::create([\n 'product_id' => $product->id,\n 'image' => $filename\n ]);\n }\n \n }\n return redirect('admin/product')->with('flash_message', 'Product updated!');\n }", "title": "" }, { "docid": "b1a7388ada48f86ca183cbf9889c1513", "score": "0.5499085", "text": "public function update(Request $request, $id){\n \n $prod = Producto::findOrFail($id);\n \n $prod->nombre = $request->nombre;\n $prod->descripcion = $request->descripcion;\n $prod->codSubCategoria = $request->ComboBoxSubCategoria;\n $prod->codMarca = $request->ComboBoxMarca;\n $prod->precioActual = $request->precio;\n $prod->stock = $request->stock;\n $prod->descuento = $request->descuento;\n $prod->fechaActualizacion = Carbon::now()->subHours(5);\n $prod->estado = '1';\n //$prod->contadorVentas = '0';\n\n\n if(!is_null($request->imagen)){\n //Storage::disk('local')->delete($prod->nombreImagen);\n Storage::disk('local2')->delete($prod->nombreImagen);\n //$prod->nombreImagen='imagen'.$prod->codProducto.'.jpg';\n Storage::disk('local2')->put($prod->nombreImagen,\\File::get($request->file('imagen')));\n //$file = $request->file('imagen')->storeAs('imagenes',$prod->nombreImagen);\n error_log('\n \n \n Se está subiendo la imagen '.$prod->nombreImagen.'\n \n \n \n ');\n\n }\n\n $prod->save();\n return redirect()->route('producto.index')->with('¡Se ha actualizado el producto!');\n\n }", "title": "" }, { "docid": "090216138bba7467b7e1c0dcc77245f5", "score": "0.5496984", "text": "public function put($payload) {\n\n // You must to implement the logic of your REST Resource here.\n // Use current user after pass authentication to validate access.\n if (!$this->currentUser->hasPermission('access content')) {\n throw new AccessDeniedHttpException();\n }\n $payload = $this->update_record($payload);\n return new ModifiedResourceResponse($payload, 201);\n }", "title": "" }, { "docid": "a01bd2cb214605428bc6032929ebd2ae", "score": "0.5494982", "text": "public function update(UpdateRequest $request, $id)\n {\n $data = $request->all();\n\n $item = $request->item;\n\n if ($request->hasFile('image')) {\n Storage::disk('public')->delete($item->image);\n $image = $request->file('image');\n $fileName = time() . '.' . $image->getClientOriginalExtension();\n\n $data['image'] = $image->storeAs('item', $fileName, 'public');\n } else {\n $data['image'] = $item->image;\n }\n\n $item->update($data);\n\n return new ItemResource($item);\n }", "title": "" }, { "docid": "d93eb8ea18e437ad56170f6f49f20674", "score": "0.5491807", "text": "public function update(Entity $entity);", "title": "" }, { "docid": "85714b33bdb1da52c9f3c38b3fb0e4fd", "score": "0.54882276", "text": "abstract public function update($id);", "title": "" }, { "docid": "236e1dd2735a1bea5ba1c2c78bc4b202", "score": "0.5484454", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $product->name = $request->name;\n $product->category = $request->category;\n $product->price = $request->price;\n $product->product_image = $fileName;\n $product->save();\n\n return redirect('admin/product' . $id);\n }", "title": "" }, { "docid": "7a9bdbca1f7b3ebee194d03267cefe76", "score": "0.5481694", "text": "public function update(Request $request, $id)\n {\n\n $item = Stock::find($id);\n $oldFilename = $item -> image;\n\n // validate the data\n $validatedData = $request ->validate([\n 'itemName' => 'required|max:255',\n 'price' => 'required|max:6',\n 'description' => 'required|max:255',\n 'size' => 'max:3',\n 'quantity' => 'required',\n 'image' =>'image|mimes:jpeg,png,jpg,gif,svg|max:20000' //max file size of 8MB\n ],\n $messages = [\n 'itemName.required' => 'This field cannot be empty!',\n 'itemName.max' => 'Maximum number of characters is 255.',\n 'price.required' => 'This field is required.',\n 'price.max' => 'Maximum number of characters is 6',\n 'description.required' => 'This field cannot be empty!',\n 'description.max' => 'Maximum number of characters is 255.',\n 'size.max' => 'Please enter S, M, LG, XL, XXL or XXXL',\n 'quantity.required' => 'This field is required!',\n 'image.image' => 'This is not an image.',\n 'image.mimes' => 'File must be jpeg, jpg, png, gif or svg.',\n 'image.max' => 'This file is too big. Please select a smaller file.'\n\n ]);\n\n $item = $request->all(); // this retrieve the new input information\n\n $item -> save();\n Session::flash('success', 'This item was successfully updated and saved.');\n return redirect()->route('items.index', $item->id);\n }", "title": "" }, { "docid": "043c9a216e68456de9063d12449bcb0e", "score": "0.54759973", "text": "public function update(StoreProduct $request, $id)\n {\n //\n if(!$product = Product::find($id))\n return redirect()->back();\n $data = $request->all();\n\n \n if($request->hasFile('image') && $request->image->isValid()){\n // dd('aasas');\n // $nameFile = $request->name . '.' . $request->image->extension();\n // dd($request->file('image')->storeAs('products', $nameFile));\n\n // verificar se existe imagem antiga\n if($product->image && Storage::exists($product->image)){\n Storage::delete($product->image);\n }\n \n $imagePath = $request->image->store('products');\n $data['image'] = $imagePath;\n }\n\n $product->update($data);\n // $product->update($request->all());\n return redirect()->route('products.index');\n\n // dd(\"Editando produto...{$id}\");\n }", "title": "" }, { "docid": "bff9b1d6669620efd89835810decdc6d", "score": "0.5471439", "text": "public function updateStream($path, $resource, Config $config)\n {\n $originalContents = $this->read($path);\n $position = ftell($resource);\n $trueResults = 0;\n\n foreach ($this->fileSystems as $fileSystem) {\n $result = $fileSystem->updateStream($path, $resource);\n if ($result) {\n ++$trueResults;\n } else {\n break;\n }\n fseek($resource, $position, SEEK_SET);\n }\n\n if ($trueResults < count($this->fileSystems)) {\n foreach ($this->fileSystems as $fileSystem) {\n $fileSystem->update($path, $originalContents['contents']);\n }\n\n return false;\n } else {\n return $this->getMetadata($path);\n }\n }", "title": "" }, { "docid": "468c866fb6506e9875cc392d13c09b83", "score": "0.5470308", "text": "public function put($resource, array $options = [])\n {\n return $this->request('PUT', $resource, $options);\n }", "title": "" }, { "docid": "5ba92b1d417214df8c4d84d1fb3447a3", "score": "0.5465887", "text": "public function update(Store $request, $id){\n //\n $media = Media::find($id);\n if(is_null($media)) {\n return response()->json([\n 'message' => \"Media not found\",\n ], 404);\n }\n $media -> fill($request->validated());\n $media -> save();\n \t return response() -> json($media);\n }", "title": "" }, { "docid": "bd65d70b304aaa9a6ddb5a3bf53f3b21", "score": "0.5464224", "text": "public function update(StoreUpdateRelatedProduct $request, $id)\n {\n\n\n $requestRelated = $request->all();\n $relate = RelatedProduct::find($id);\n Helpers::uploadImage($request->file('image'), $relate);\n $offersRelated = [];\n foreach ($requestRelated['name'] as $key => $name) {\n $offersRelated[$name] = $requestRelated['value_id'][$key];\n }\n foreach ($requestRelated as $ki => $rel) {\n if($rel == $relate->{$ki}) {\n unset($requestRelated[$ki]);\n } else {\n $requestRelated[$ki] = $rel;\n }\n }\n\n $relatedProduct = RelatedProduct::edit($requestRelated, $relate);\n RelatedProduct::updateValues($offersRelated, $relatedProduct);\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.5460793", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "1c3c203766f18661a15d909007a99e30", "score": "0.54572994", "text": "function update($record)\n {\n $this->rest->initialize(array('server' => REST_SERVER));\n $this->rest->option(CURLOPT_PORT, REST_PORT);\n return $this->rest->put('/Material_list/item/id/' . $record->id, json_encode($record));\n }", "title": "" }, { "docid": "ea0f5d1c6cd187e999d42e0a51c94e1e", "score": "0.5455138", "text": "public function update(SliderFormRequest $request, $id)\n {\n \n //$file = $request->file('slider_img');\n //$filename = $request->file('slider_img')->getClientOriginalName();\n\n $slider = Slider::find($id);\n $slider->slider_name = $request->input('slider_name');\n $slider->slider_img = $filename;\n $slider->slider_header = $request->input('slider_header');\n $slider->description=$request->input('description');\n $slider->save();\n\n // Storage::disk('uploads')->put($filename, file_get_contents($request->file('slider_img')->getRealPath()));\n\n return redirect()->route('sliders.index');\n }", "title": "" }, { "docid": "c8533f68a36efb4f93d3bc2fbc14c4ad", "score": "0.5449132", "text": "public function update(Request $request, Product $product)\n {\n $product->price = $request->input('price');\n $product->name = $request->input('name');\n $product->discount = $request->input('discount');\n $product->description = $request->input('description');\n $product->quantity = $request->input('quantity');\n $product->type = $request->input('type');\n $product->privacy = $request->input('privacy');\n if ($request->hasFile('photo')){\n $photo = $request->file('photo');\n $filename = time() . '.' . $photo->getClientOriginalExtension();\n Image::make($photo)->resize(300,300)->save(public_path('uploads/products/'.$filename));\n $product->photo=$filename;\n }\n $product->save();\n $store_id = $product->store_id;\n return redirect(route('store.show', $store_id))->with('_success', 'Producto o servicio modificado exitosamente!');\n }", "title": "" }, { "docid": "29145b2b5a2d17132747ab887a0789c5", "score": "0.5444627", "text": "public function update(Request $request, $id)\n {\n $product = Product::where('id',$id)->firstOrfail();\n $this->validate($request,[\n 'name' => 'required|string|max:191',\n 'slug' => 'required|string|max:191|unique:products,slug,'.$product->id,\n 'model' => 'required|string|max:191',\n 'brand' => 'required|string|max:191',\n 'color' => 'required|string|max:191',\n 'price' => 'required|numeric',\n 'stock' => 'required|numeric',\n 'description' => 'required',\n 'details' => 'required'\n ]);\n \n \n \n $product->name = $request->name;\n $product->slug = $request->slug;\n $product->model = $request->model;\n $product->brand = $request->brand;\n $product->color = $request->color;\n $product->price = $request->price;\n $product->stock = $request->stock;\n $product->description = $request->description;\n $product->details = $request->details;\n\n $currentImages = $product->images;\n if($request->images != $currentImages){\n\n $name = time().'.'.explode('/', explode(':',substr($request->images, 0,strpos($request->images, ';')))[1])[1];\n\n Image::make($request->images)->save(public_path('images/').$name);\n\n $product->images =$name;\n\n $userImages = public_path('images/').$currentImages;\n if(file_exists($userImages)){\n @unlink($userImages);\n }\n\n }\n\n $product->save();\n\n\n }", "title": "" }, { "docid": "9f4d7af325b24531ea1ce846d411650c", "score": "0.5444028", "text": "public function update(Request $request, $id)\n {\n $datosProducto = request()->except(['_token','_method']);\n\n // $producto = Productos::findOrFail($id);\n // return view ('productos.edit', compact('producto'));\n\n if($request->hasFile('Imagen')){\n\n $producto = Productos::findOrFail($id);\n\n Storage::delete('public/'.$producto->Imagen);\n\n $datosProducto['Imagen']=$request->file('Imagen')->store('uploads', 'public');\n }\n\n Productos::where('id','=',$id)->update($datosProducto);\n\n return redirect('productos')->with('Mensaje', 'Producto actualizado');\n\n }", "title": "" }, { "docid": "99570621f10010f3bf881aedacae8f97", "score": "0.544297", "text": "public function update(Request $request, $id)\n {\n $data = $request->validate([\n 'name' =>'required',\n 'email' =>'required',\n 'phone' =>'required',\n 'address' =>'required',\n 'image' =>'required'\n ]);\n\n $supplier =Supplier::where('id',$id)->firstOrFail();\n $supplier->name = $request->name;\n $supplier->email = $request->email;\n $supplier->phone = $request->phone;\n $supplier->address = $request->address;\n\n if ($request->hasFile('image')){\n $image = $request->file('image');\n $filename = time() . '.' . $image->getClientOriginalExtension();\n $location = public_path('backend/images/supplier/');\n //add new photo\n $image->move($location,$filename);\n $location = public_path('backend/images/supplier/'.$filename);\n $upload_path = 'backend/images/supplier/';\n Image::make($location)->save($location);\n if(strlen($supplier->image) > 5 && file_exists(base_path().'/public/'.$supplier->image)) {\n unlink(base_path().'/public/'.$supplier->image);\n }\n $supplier->image = $upload_path.$filename;\n }\n $supplier->save();\n if($supplier){\n $notification = array(\n 'message' => 'updated successfully',\n 'alert-type' => 'success'\n );\n return redirect()->route('product.index')->with($notification);\n }\n }", "title": "" }, { "docid": "01c5e5f24300924f385a60feccb9fe42", "score": "0.5441142", "text": "public function update(Request $request,Product $product) {\n\n $request->validate([\n 'name'=>'required',\n 'stock'=>'required',\n 'description'=>'required|min:10',\n 'price'=>'required'\n\n ]);\n\nif($request->hasFile('image')) {\n $image=$request->image->store('products',['disk'=>'public']);\n\n}else {\n $image=$product->image;\n}\n\n//now update the product\n\n$product->update([\n\n 'name'=>$request->name,\n 'stock'=>$request->stock,\n 'description'=>$request->description,\n 'price'=>$request->price,\n 'image'=>$image\n]);\n\n//seent the success message\nsession()->flash('success',\"Product updated successfully\");\nreturn redirect()->back();\n}", "title": "" }, { "docid": "8e8a27769b698338635786dac32d3581", "score": "0.54356146", "text": "public function update(Request $request, $id)\n {\n $service = Service::find($id);\n $service->title = $request->title;\n $service->description = $request->description;\n\n if ($file = $request->file('icon')){\n unLink(base_path().'/public/uploads/service/icon/'.$service->icon);\n if (IceHelper::checkIconSize($request->file('icon'))){\n $service->icon = IceHelper::uploadImage($request->file('icon'),'service/icon/');\n }else{\n return redirect()->back()->withFailedMessage('The icon size is very big please select smaller size');\n\n }\n }else{\n $service->icon = $service->icon;\n }\n\n\n if ($file = $request->file('photo')){\n unLink(base_path().'/public/uploads/service/photo/'.$service->photo);\n unLink(base_path().'/public/uploads/service/photo/thumb/'.$service->photo);\n $service->photo = IceHelper::uploadImage($request->file('photo'),'service/photo/');\n }else{\n $service->photo = $service->photo;\n }\n\n $service->save();\n\n IceHelper::uploadThumb($service->photo);\n\n return redirect('/admin/service')->withFlashMessage('Service Edited');\n\n }", "title": "" }, { "docid": "c6812053ff6f2cb382d20906d7462a7e", "score": "0.54286885", "text": "public function update()\n {\n $prodData = $this->data;\n $id = $prodData['id'];\n\n // Removing id from request\n unset($prodData['id']);\n\n return Request::make('PUT', $this->endpoint . '/' . $id, $prodData, $this->cms);\n }", "title": "" }, { "docid": "3b6767bdd8024add40b378a924412ad3", "score": "0.54253227", "text": "function update_disk_usage($resource)\n\t{\n\t$ext = sql_value(\"select file_extension value from resource where ref = '$resource'\",'jpg');\n\t$path = get_resource_path($resource,true,'',false,$ext);\n\tif (file_exists($path)){\n\t\t$rsize = filesize_unlimited($path);\n\t} else {\n\t\t$rsize = 0;\n\t}\n\n\t# Scan the appropriate filestore folder and update the disk usage fields on the resource table.\n\t$dir=dirname(get_resource_path($resource,true,\"\",false));\n\tif (!file_exists($dir)) {return false;} # Folder does not yet exist.\n\t$d = dir($dir); \n\t$total=0;\n\twhile ($f = $d->read())\n\t\t{\n\t\tif ($f!=\"..\" && $f!=\".\")\n\t\t\t{\n\t\t\t$s=filesize_unlimited($dir . \"/\" .$f);\n\t\t\t#echo \"<br/>-\". $f . \" : \" . $s;\n\t\t\t$total+=$s;\n\t\t\t}\n\t\t}\n\t#echo \"<br/>total=\" . $total;\n\tsql_query(\"update resource set disk_usage='$total',disk_usage_last_updated=now(),file_size='$rsize' where ref='$resource'\");\n\treturn true;\n\t}", "title": "" }, { "docid": "6233395f9709b8b025d0b3b864ade136", "score": "0.5424529", "text": "public function update(SliderRequest $request,$id)\n {\n $id = base64_decode($id);\n $data= Slider::find($id);\n $image =$data->image; \n if($request->file('image')){\n if(File::exists(public_path('slider/'.$data->image))){\n File::delete(public_path('slider/'.$data->image));\n }\n $logoimageName = time().'.'.$request->image->extension(); \n $request->image->move(public_path('slider'), $logoimageName);\n $image = $logoimageName;\n }\n $data->country= $request->country;\n $data->title= $request->title;\n $data->description= $request->description;\n $data->image= $image;\n $data->save();\n toastr()->success('slider updated Successfully');\n return redirect()->route('admin.slider.index');\n\n }", "title": "" }, { "docid": "d3a11651e3f45d3c5fe4fe7f382408ef", "score": "0.54221493", "text": "public function updateProductStock(ProductStockRequest $request)\n {\n try {\n\n $product = Product::find($request->product_id);\n\n $product->update($request->except('_token', 'product_id'));\n\n return redirect()->route('admin.products.images.edit', $request->product_id);\n\n } catch (\\Exception $ex) {\n\n return error('admin.products', __('admin/product.there is error'));\n\n }\n\n }", "title": "" }, { "docid": "a28ba9c40e06592529f38d6d19b89b16", "score": "0.54146737", "text": "public function update($id) {\n \n }", "title": "" }, { "docid": "fa90d4335b5457d60aed5f93219c9fb9", "score": "0.5414578", "text": "function update($resource_id,$options)\n\t{\n\t\t//allowed fields\n\t\t$valid_fields=array(\n\t\t\t//'resource_id',\n\t\t\t//'survey_id',\n\t\t\t'dctype',\n\t\t\t'title',\n\t\t\t'subtitle',\n\t\t\t'author',\n\t\t\t'dcdate',\n\t\t\t'country',\n\t\t\t'language',\n\t\t\t//'id_number',\n\t\t\t'contributor',\n\t\t\t'publisher',\n\t\t\t'rights',\n\t\t\t'description',\n\t\t\t'abstract',\n\t\t\t'toc',\n\t\t\t'subjects',\n\t\t\t'filename',\n\t\t\t'dcformat',\n\t\t\t'changed');\n\n\t\t//add date modified\n\t\t$options['changed']=date(\"U\");\n\t\t\t\t\t\n\t\t//remove slash before the file path otherwise can't link the path to the file\n\t\tif (isset($options['filename']))\n\t\t{\n\t\t\tif (substr($options['filename'],0,1)=='/')\n\t\t\t{\n\t\t\t\t$options['filename']=substr($options['filename'],1,255);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//pk field name\n\t\t$key_field='resource_id';\n\t\t\n\t\t$update_arr=array();\n\n\t\t//build update statement\n\t\tforeach($options as $key=>$value)\n\t\t{\n\t\t\tif (in_array($key,$valid_fields) )\n\t\t\t{\n\t\t\t\t$update_arr[$key]=$value;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//update db\n\t\t$this->db->where($key_field, $resource_id);\n\t\t$result=$this->db->update('resources', $update_arr); \n\t\t\n\t\treturn $result;\t\t\n\t}", "title": "" } ]
438f1580e5b9f643a1de634f25d00291
Set session life time
[ { "docid": "4fe9ec4f467afd4b66a9a82ec8ee4eb1", "score": "0.78579515", "text": "public function setSessionLifeTime(int $duration)\n {\n session_set_cookie_params($duration);\n }", "title": "" } ]
[ { "docid": "534e71195ddf30cd1ed40afe84187661", "score": "0.6983404", "text": "function setLifeTime($time);", "title": "" }, { "docid": "8e72b6e8fd06744491c87ace0bd7b66d", "score": "0.6975569", "text": "function setSessionActiveTimer()\n {\n setSessionValue('activeTimer', time());\n }", "title": "" }, { "docid": "3ae68d1ebfeec8d8c9b8d58b8a814670", "score": "0.67855036", "text": "public function renew()\n {\n $_SESSION['session_start'] = $this->newTime();\n }", "title": "" }, { "docid": "4472bfa37ac89c9ef1b28d82b3689472", "score": "0.6728491", "text": "public function sustainSession()\n {\n self::$updatedSession = true;\n \n try\n {\n if( $this->getSessionTime() < time() - 70 )\n {\n $this->updateSessionTime();\n }\n }\n catch (Exception $ex)\n {\n $this->vars->destroySession();\n }\n }", "title": "" }, { "docid": "0abd5f065096da220c2b619d30989818", "score": "0.66727763", "text": "public static function setExpire($time, $add = false)\n {\n if ($add && isset($_SESSION['__HTTP_Session2_Expire'])) {\n $_SESSION['__HTTP_Session2_Expire'] += $time;\n } else {\n $_SESSION['__HTTP_Session2_Expire'] = $time;\n }\n if (!isset($_SESSION['__HTTP_Session2_Expire_TS'])) {\n $_SESSION['__HTTP_Session2_Expire_TS'] = time();\n }\n }", "title": "" }, { "docid": "442440ac07b19e0d65fcfa44fd08b97e", "score": "0.6672693", "text": "private function session(){\n\t\t@session_start();\n\n\t\tif (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > System::getConfig('sessionDestroy'))) {\n\t\t\tsession_destroy();\n\t\t\tsession_unset();\n\t\t}\n\t\t$_SESSION['LAST_ACTIVITY'] = time();\n\n\t\tif (!isset($_SESSION['CREATED'])) {\n\t\t\t$_SESSION['CREATED'] = time();\n\t\t} else if (time() - $_SESSION['CREATED'] > System::getConfig('sessionRegenerate')) {\n\t\t\tsession_regenerate_id(true);\n\t\t\t$_SESSION['CREATED'] = time();\n\t\t}\n\t}", "title": "" }, { "docid": "c280f84fc14e686d0dfbe8375e3799d6", "score": "0.66520035", "text": "public function setRememberMeTimeout($ttl);", "title": "" }, { "docid": "9b9f357f92f8d303ac5ad278da3d79e5", "score": "0.66063166", "text": "protected function setCookieLifetime($lifetime)\n {\n ini_set('session.cookie_lifetime', (int) $lifetime);\n\n if ($this->isStarted()) {\n $this->regenerateID();\n }\n }", "title": "" }, { "docid": "32160636f74560f1f37322ebde837bb9", "score": "0.6599383", "text": "protected function updateSessionTime()\n {\n self::$updatedSession = 1;\n \n $db = new SessionData();\n \n $db->updateTime($this->vars->getSessionID(), $this->vars->updateSessionTime());\n }", "title": "" }, { "docid": "4cf756cbfb3341600830f7f855d76e2f", "score": "0.65541327", "text": "function check_session()\n {\n $time=$_SERVER['REQUEST_TIME'];\n $timeout_duration = 1800;\n if (isset($_SESSION['LAST_ACTIVITY']) && ($time - $_SESSION['LAST_ACTIVITY']) > $timeout_duration) {\n session_unset();\n session_destroy();\n session_start();\n }\n $_SESSION['LAST_ACTIVITY'] = $time;\n }", "title": "" }, { "docid": "afbecf04bfc134b060a544966baa7133", "score": "0.65467966", "text": "public function startSession()\n {\n session_cache_expire($this->lifeTimeSec / 60);\n session_set_cookie_params($this->lifeTimeSec,\n $this->path,\n $this->domain);\n // cache expire, server\n ini_set(\"session.gc_maxlifetime\", $this->lifeTimeSec);\n ini_set(\"session.cookie_lifetime\", $this->lifeTimeSec);\n // custom cache expire is possible only for custom session directory\n session_save_path($this->savePath);\n session_start();\n }", "title": "" }, { "docid": "584eac0c964157b9924b20a2c605f4c6", "score": "0.646235", "text": "public function sess_update()\r\n\t{\r\n\t\t// We only update the session every five minutes by default\r\n\t\tif (($this->db_last_activity + $this->parent->sess_time_to_update) >= $this->parent->now)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Regenerate session id\r\n\t\tsession_regenerate_id();\r\n\t}", "title": "" }, { "docid": "afde7587cefd31939f8780c90dd5be71", "score": "0.63789105", "text": "protected function set_cookie() {\n\t\tsetcookie( ET_SESSION_COOKIE, $this->_session_id . '||' . $this->_expired_time , $this->_expired_time, '/' );\n\t}", "title": "" }, { "docid": "bae53ec82521c880d31b430fbdd289e8", "score": "0.6378775", "text": "public static function expire($time)\n\t{\n\t\t$_SESSION['timeout'] = time();\n\t\t$_SESSION['expire'] = $time;\n\t}", "title": "" }, { "docid": "bb90a0423c729c46348bdd7f02d08749", "score": "0.63739735", "text": "function session_cache_expire ($new_cache_expire = null) {}", "title": "" }, { "docid": "fad7b9972475b16139b0972235b5b848", "score": "0.63485736", "text": "function _session_expired()\n {\n // if this is the first time coming in, initialize access time\n if (!$this->userdata('sess_last_access')) {\n $this->set_userdata('sess_last_access', time());\n return FALSE;\n }\n\n $delta = time() - $this->userdata('sess_last_access');\n\n if ($delta >= $this->_lifetime ) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a0a61befa881efa86de22db0500bf036", "score": "0.6348491", "text": "public function setSaLifeTimeSeconds(?int $value): void {\n $this->getBackingStore()->set('saLifeTimeSeconds', $value);\n }", "title": "" }, { "docid": "19fd79ed1d4493818b5ad79d3ad1be29", "score": "0.6326444", "text": "public function setLifeTime($lifeTime=self::LIFETIME)\r\n {\r\n $this->lifeTime = $lifetime;\r\n }", "title": "" }, { "docid": "7327d3e31933cfd06ba5a5428521ed42", "score": "0.6322041", "text": "public static function sessionReGen(){\r\n if (isset($_SESSION['stale']) ){\r\n if ($_SESSION['stale'] < time() ){\r\n \r\n if (session_regenerate_id(false)){\r\n $_SESSION['stale'] = time()+300;\r\n \r\n }\r\n \r\n }\r\n }\r\n else{\r\n session_regenerate_id(true);\r\n }\r\n }", "title": "" }, { "docid": "f6b728d52e8f87ac7be2971c7cc1f7de", "score": "0.6298762", "text": "private static function startSession(int $timeout): void {\n\n\t\t$currentTime = time();\n\n\t\t# Increase session timeout. This must be set before starting the session.\n\n\t\tini_set('session.gc_maxlifetime', $timeout); # server should keep session data for AT LEAST $timeout seconds\n\n\t\t# NOTE: Do not call session_set_cookie_params( $timeout ) because it does not extend the session each time it is called, it sets a hard limit.\n\n\t\t# Extend the cookie timeout for the user's browser. See http://php.net/manual/en/function.session-set-cookie-params.php\n\t\t$options = [\n\t\t\t\t'expires' => $currentTime + $timeout,\n\t\t\t\t'samesite' => 'Strict'\n\t\t];\n\t\tsetcookie(session_name(), session_id(), $options);\n\n\t\tsession_start(); # Start session and extend server timeout by amount set in session.gc_maxlifetime above.\n\n\t\t# If we have passed the session timeout, then remove the session.\n\t\t# This will force the session timeout at the timeout we specify, instead of waiting for the GC to timeout sometime after session.gc_maxlifetime.\n\n\t\t#echo \"timeout_idle[\".date( 'Y-m-d H:i:s', $_SESSION['timeout_idle'] ).\"] < time[\".date( 'Y-m-d H:i:s', $currentTime ).\"] = [\".( $_SESSION['timeout_idle'] < $currentTime ).\"] seconds remaining until timeout[\".( $_SESSION['timeout_idle'] - $currentTime ).\"]\\n\";\n\t\tif (isset($_SESSION['timeout_idle']) && $_SESSION['timeout_idle'] < $currentTime) { # 2:05pm < 2:01pm then not expired, 2:05pm < 2:10pm then expired\n\n\t\t\tself::remove();\n\n\t\t} else {\n\n\t\t\t# Extend the timeout that we will check later (above).\n\t\t\t$_SESSION['timeout_idle'] = $currentTime + $timeout; # 2pm + 5mins = 2:05pm\n\t\t\t#echo 'new seconds remaining until timeout['.( $_SESSION['timeout_idle'] - $currentTime ).\"]\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "e59295f086d04c614e87ecf1680bfeb8", "score": "0.62776244", "text": "public function testExpire()\n {\n static::$config->expire(50);\n $this->assertEquals(50, ini_get(\"session.gc_maxlifetime\"));\n $this->assertEquals(50, ini_get(\"session.cookie_lifetime\"));\n }", "title": "" }, { "docid": "de587e0dcbbf4d580f8a084fb82c8847", "score": "0.6257509", "text": "function SetCookieLife ($iTimeout) { // Obsolete\n $this->iCookieLife = $iTimeout;\n }", "title": "" }, { "docid": "bdb34d00b13413b643d5f8695f923b21", "score": "0.62376964", "text": "static function initSession() {\n\t\tif (session_status() !== PHP_SESSION_ACTIVE)\n\t\t\tsession_start(array(\"cookie_lifetime\" => 86400));\n\n\t\tforeach ($_SESSION as $key => $val)\n\t\t\tif (strpos($key, \"timeout-\") === 0 && $val - time() <= 0)\n\t\t\t\tunset($_SESSION[$key]);\n\t}", "title": "" }, { "docid": "7a6aa0ab8eb96947343984307c883753", "score": "0.623334", "text": "public function testSetCurrentSessionMaxInactiveInterval()\n {\n }", "title": "" }, { "docid": "69587024081b2530e7b42661a5d0dc5c", "score": "0.62209344", "text": "public static function setExpireTime($time)\n {\n\t$time = max(60, $time);\n\tself::$expires = $time;\n }", "title": "" }, { "docid": "f28d3688812e62f47298a661e4f685cd", "score": "0.62084824", "text": "public function set_lifetime_filter() {\n add_filter( 'nonce_life', $this->lifetime_nonce );\n }", "title": "" }, { "docid": "483a33fcc456893d2be350423ad7e1ed", "score": "0.6193447", "text": "function sessionAgeValid($appSessionName)\n{\n $lastActivitySessionName = LAST_ACTIVITY_AUTH_PREFIX_KEY . $appSessionName;\n\n if (isset($_SESSION[$lastActivitySessionName]) && (time() - $_SESSION[$lastActivitySessionName] > SESSION_TIME_OUT)) {\n\n if (isset($_SESSION[$appSessionName])) unset($_SESSION[$appSessionName]);\n return false;\n }\n $_SESSION[$lastActivitySessionName] = time();\n\n return true;\n}", "title": "" }, { "docid": "087bd93107a1828cbea1cf4a8bff75d6", "score": "0.6165805", "text": "private function setLastUpdateTime() {\n\t\t$session = new Zend_Session_Namespace();\n\t\t$session->comments = time();\n\t}", "title": "" }, { "docid": "2ef8cacb9e3c99b0b372188e46c2d52b", "score": "0.6161391", "text": "function setLifeTime(int $time){\n return $this->lifeTime = $time;\n }", "title": "" }, { "docid": "4b6cbce41f77a98099efd9e75f08149c", "score": "0.61588", "text": "public function setExpiration($seconds)\n {\n $this->expiration = $seconds;\n }", "title": "" }, { "docid": "45326e3eb2b84d2ec2cc04a30baa521b", "score": "0.6145288", "text": "public function setCacheLifetime($seconds)\n {\n $this->tplObj->setCacheLifetime($seconds);\n }", "title": "" }, { "docid": "84ef0f403652bf8c0adea9d92ef477c7", "score": "0.61215657", "text": "public function expire()\n {\n $this->expiresTimestamp = 202046400;\n $this->maximumAge = 0;\n }", "title": "" }, { "docid": "656c14c87e1c4e77f5be21ef9f1f8c54", "score": "0.6111296", "text": "static private function _age() {\r\n\t\t$last = isset($_SESSION['LAST_ACTIVE']) ? $_SESSION['LAST_ACTIVE'] : false;\r\n\r\n\t\tif (false !== $last && (time() - $last > self::$SESSION_AGE)) {\r\n\t\t\treturn self::destroy();\r\n\t\t}\r\n\r\n\t\t$_SESSION['LAST_ACTIVE'] = time();\r\n\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "a51c2adb32a65c68876b54455898de18", "score": "0.61105716", "text": "function refresh() {\n\t\t$success = (session_status() == PHP_SESSION_ACTIVE) && session_regenerate_id();\n\t\t$this->fw->set('SESSION'.$this->prefix.'.expiration', $this->fw->get('JAR.expire'));\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "5164610994c143509031bca8248a100a", "score": "0.60878134", "text": "public function setCoreSessionCookieLifetime($value)\n {\n $this->setFieldName('session_cookie_lifetime');\n $this->loadObject(true);\n $this->setFieldValue($value);\n\n return $this;\n }", "title": "" }, { "docid": "acfdf160b73ee5136f17a505b2179e0f", "score": "0.6087033", "text": "public static function checkSessionInactivity() {\n if (Config::SESSION_INACTIVITY_ENABLED !== true) {\n return;\n }\n \n if (!isset($_SESSION[Config::SERVER_FQDN][\"last_activity\"])) {\n $_SESSION[Config::SERVER_FQDN][\"last_activity\"] = time();\n } else {\n if (time() - $_SESSION[Config::SERVER_FQDN][\"last_activity\"] > Config::SESSION_INACTIVITY_TIMEOUT) {\n session_unset();\n session_destroy();\n System::redirect(Config::SITE_PATH . Config::SESSION_INACTIVITY_REDIRECT_PATH);\n } else {\n $_SESSION[Config::SERVER_FQDN][\"last_activity\"] = time();\n }\n }\n }", "title": "" }, { "docid": "8730ea317ef4645e23b7c520dfa7d4bb", "score": "0.60792136", "text": "public function set_session_cookies() {\n\t\tif ( ! headers_sent() ) {\n\t\t\t$lifetime = current_time( 'timestamp' ) + $this->set_expiration_time();\n\t\t\t@setcookie( session_name(), session_id(), $lifetime, COOKIEPATH, COOKIE_DOMAIN, false );\n\t\t\t@setcookie( session_name() . '_expiration', $lifetime, $lifetime, COOKIEPATH, COOKIE_DOMAIN, false );\n\t\t}\n\t}", "title": "" }, { "docid": "b16088e79e60680d33d5fdbb1aef49a0", "score": "0.60723704", "text": "abstract protected function defineCacheTimeToLive();", "title": "" }, { "docid": "c186d61dffe3e71cae64eeefd8718f0a", "score": "0.6067567", "text": "function _sess_id_expired()\n {\n // if this is the first time coming in, initialize regenerated time\n if (!$this->userdata('sess_last_regenerated')) {\n $this->set_userdata('sess_last_regenerated', time());\n return false;\n }\n\n $delta = time() - $this->userdata('sess_last_regenerated');\n\n if ( $delta >= $this->_sess_id_ttl ) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "4ca63b1f19bbd718486c697320ebfeca", "score": "0.60454476", "text": "public function testSessionStorageWithRefreshLifetime()\n {\n // Given\n global $started, $time;\n\n $session = $this->getDrupalSessionStorageMock(true);\n\n $started = true;\n\n // When\n $session->start();\n\n // Then\n $this->assertEquals(2, $time, 'Time should be equal to 2 because 2 iteration is done');\n }", "title": "" }, { "docid": "f5a3585f2f8f95a017baec7de283f80c", "score": "0.60286355", "text": "public static function setIdle($time, $add = false)\n {\n if ($add && isset($_SESSION['__HTTP_Session2_Idle'])) {\n $_SESSION['__HTTP_Session2_Idle'] += $time;\n } else {\n $_SESSION['__HTTP_Session2_Idle'] = $time;\n }\n if (!isset($_SESSION['__HTTP_Session2_Idle_TS'])) {\n $_SESSION['__HTTP_Session2_Idle_TS'] = time();\n }\n }", "title": "" }, { "docid": "21884cd747a924a8682a8bff2aefee9a", "score": "0.6027949", "text": "private function handleExpiredSession() {\n $zibo = Zibo::getInstance();\n\n $sessionExpire = $zibo->getConfigValue(self::CONFIG_SESSION_EXPIRE_REDIRECT);\n if (!$sessionExpire) {\n return;\n }\n\n $user = SecurityManager::getInstance()->getUser();\n if (!$user) {\n return;\n }\n\n $response = $zibo->getResponse();\n\n $view = $response->getView();\n if (!($view instanceof HtmlView)) {\n return;\n }\n\n $sessionTime = $zibo->getConfigValue(Session::CONFIG_SESSION_TIME);\n if (!$sessionTime) {\n return;\n }\n\n if (!is_bool($sessionExpire) && !is_numeric($sessionExpire)) {\n $url = $sessionExpire;\n } else {\n $url = $zibo->getRequest()->getBaseUrl();\n }\n $timeOut = ($sessionTime * 60000) + 1000;\n\n $view->addInlineJavascript('setTimeout(\\'window.location = \"' . $url . '\"\\', ' . $timeOut . ');');\n }", "title": "" }, { "docid": "de631f1d3a6808bc396a184c5d8fcef8", "score": "0.60172343", "text": "protected function setSessionCookie() {\r\n\t\t$isSetSessionCookie = $this->isSetSessionCookie();\r\n\t\t$isRefreshTimeBasedCookie = $this->isRefreshTimeBasedCookie();\r\n\t\t\r\n\t\t// CAB ST: set it to 25 mimnutes\r\n\t\t/** CAB FIX on 2011-03-11 */\r\n\t\t$this->lifetime = 1500;\r\n\t\t\r\n\t\t$isSetSessionCookie = $this->isSetSessionCookie();\r\n\t\t$isRefreshTimeBasedCookie = true;\r\n\t\t/** CAB FIX end */\r\n\r\n\t\tif ($isSetSessionCookie || $isRefreshTimeBasedCookie) {\r\n\t\t\t$settings = $GLOBALS['TYPO3_CONF_VARS']['SYS'];\r\n\r\n\t\t\t\t// Get the domain to be used for the cookie (if any):\r\n\t\t\t$cookieDomain = $this->getCookieDomain();\r\n\t\t\t\t// If no cookie domain is set, use the base path:\r\n\t\t\t$cookiePath = ($cookieDomain ? '/' : t3lib_div::getIndpEnv('TYPO3_SITE_PATH'));\r\n\t\t\t\t// If the cookie lifetime is set, use it:\r\n\t\t\t$cookieExpire = ($isRefreshTimeBasedCookie ? $GLOBALS['EXEC_TIME'] + $this->lifetime : 0);\r\n\t\t\t\t// Use the secure option when the current request is served by a secure connection:\r\n\t\t\t$cookieSecure = (bool) $settings['cookieSecure'] && t3lib_div::getIndpEnv('TYPO3_SSL');\r\n\t\t\t\t// Deliver cookies only via HTTP and prevent possible XSS by JavaScript:\r\n\t\t\t$cookieHttpOnly = (bool) $settings['cookieHttpOnly'];\r\n\r\n\t\t\t\t// Do not set cookie if cookieSecure is set to \"1\" (force HTTPS) and no secure channel is used:\r\n\t\t\tif ((int) $settings['cookieSecure'] !== 1 || t3lib_div::getIndpEnv('TYPO3_SSL')) {\r\n\t\t\t\tsetcookie(\r\n\t\t\t\t\t$this->name,\r\n\t\t\t\t\t$this->id,\r\n\t\t\t\t\t$cookieExpire,\r\n\t\t\t\t\t$cookiePath,\r\n\t\t\t\t\t$cookieDomain,\r\n\t\t\t\t\t$cookieSecure,\r\n\t\t\t\t\t$cookieHttpOnly\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\tthrow new t3lib_exception(\r\n\t\t\t\t\t'Cookie was not set since HTTPS was forced in $TYPO3_CONF_VARS[SYS][cookieSecure].',\r\n\t\t\t\t\t1254325546\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif ($this->writeDevLog) {\r\n\t\t\t\t$devLogMessage = ($isRefreshTimeBasedCookie ? 'Updated Cookie: ' : 'Set Cookie: ') . $this->id;\r\n\t\t\t\tt3lib_div::devLog($devLogMessage . ($cookieDomain ? ', ' . $cookieDomain : ''), 't3lib_userAuth');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ba49e4b7de7f516d057ec4e2b66bb0dd", "score": "0.60123605", "text": "public function setExpires($expiry)\n {\n\n }", "title": "" }, { "docid": "4b45ec462b08b060d659ded71726181f", "score": "0.60105884", "text": "public function setCacheValidTime();", "title": "" }, { "docid": "53dec4cf5a3a1c2dfd0635338ee5d57a", "score": "0.5998118", "text": "private static function sessionCookie()\n\t{\n\t\t// start session\n\t\tself::log( \" Start session '\".self::$session_name.\"'\" );\n\n\t\tsession_set_cookie_params( 0 );\n\t\tini_set('session.gc_maxlifetime', Get::cfg('session_lenght', 3600));\n\n\t\tsession_name(self::$session_name);\n\t\tsession_start();\n\n\t\t$session_time = Get::sett('ttlSession', 3600);\n\t\tif(!isset($_SESSION['session_timeout']))\n\t\t\t$_SESSION['session_timeout'] = time();\n\t\t$session_time_passed = time() - $_SESSION['session_timeout'];\n\n\t\tif($session_time_passed > $session_time && isset($_SESSION['logged_in']) && $_SESSION['logged_in'])\n\t\t{\n\t\t\tsession_destroy();\n\t\t\tUtil::jump_to('../index.php?msg=103');\n\t\t}\n\n\t\t$_SESSION['session_timeout'] = time();\n\t}", "title": "" }, { "docid": "5910ddf17fe6f89c29b0e59e11094397", "score": "0.598679", "text": "function Session()\n\t{\n\t\t$this->time = time();\n\t\t$this->startSession();\n\t}", "title": "" }, { "docid": "e848d80d5c89b29321d4b2f35808d73c", "score": "0.59840524", "text": "public function __construct($start) \n {\n if($start && session_status() == PHP_SESSION_NONE) \n { \n session_start(); \n };\n $this->time = time()+2592000; //One month lasting\n }", "title": "" }, { "docid": "43fcc325e087a05823d4b6f35f06ae15", "score": "0.598294", "text": "function checkSessionExpire()\n\t{\n\t\t$sess_exp = session_cache_expire() * 60;\n\n\t\tif ( isset($_SESSION['admin_expire_time']) && time() - $_SESSION['admin_expire_time'] >= $sess_exp )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_SESSION['admin_expire_time'] = $_SERVER['REQUEST_TIME'];\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "ea3b90af33bad49595fa54bcbc9d1834", "score": "0.59823346", "text": "protected function _expiration() {\n return $this['session.expiration'];\n }", "title": "" }, { "docid": "b43e039c061486ec19c8a8f8ebc26476", "score": "0.59756505", "text": "private static function setSession ()\n\t{\n\t\tEvent::RUN ('mvc.setSession.before', DTArrayObject::create());\n\n (!file_exists (Registry::get ('MVC_SESSION_PATH'))) ? mkdir (Registry::get ('MVC_SESSION_PATH')) : false;\n\n $oSession = Session::is();\n $iMicrotime = microtime (true);\n $sMicrotime = sprintf (\"%06d\", ($iMicrotime - floor ($iMicrotime)) * 1000000);\n $oSession->set ('startDateTime', new \\DateTime (date ('Y-m-d H:i:s.' . $sMicrotime, $iMicrotime)));\n $oSession->set ('uniqueid', Registry::get ('MVC_UNIQUE_ID'));\n \n // copy Session Object to registry\n Registry::set ('MVC_SESSION', $oSession);\n\n\t\tEvent::RUN ('mvc.setSession.after',\n DTArrayObject::create()\n ->add_aKeyValue(\n DTKeyValue::create()->set_sKey('oSession')->set_sValue($oSession)\n )\n );\n\t}", "title": "" }, { "docid": "05024f62a3454cd98da18b5fd8f9bb0b", "score": "0.597363", "text": "public function setExpires($datetime){ }", "title": "" }, { "docid": "82bfcb03149b7155cdf8119954c93267", "score": "0.596309", "text": "function setSessionTimeOutLimit($sessionTimeOut)\n {\n setSessionValue('sessionTimeOutLimit', $sessionTimeOut);\n }", "title": "" }, { "docid": "9b520e3542bd05078a3f7e8aabd2ce12", "score": "0.5957376", "text": "public function setExpire(int $seconds)\n {\n $this->expire = $seconds;\n }", "title": "" }, { "docid": "c9f3614919a0558f665b067d76d5b3d1", "score": "0.59476745", "text": "function start_session($timeout_length = null) {\n session_start();\n if (isset($_SESSION['LAST_ACCESS'])) {\n if (!isset($timeout_length)) {\n global $DEFAULT_SESSION_TIMEOUT;\n $timeout_length = $DEFAULT_SESSION_TIMEOUT;\n }\n if ($_SESSION['LAST_ACCESS'] < (time() - $timeout_length)) {\n // last access was too long ago\n end_session();\n }\n }\n $_SESSION['LAST_ACCESS'] = time();\n }", "title": "" }, { "docid": "e1517bddad80aaea90aa2684bbe41f9a", "score": "0.59432256", "text": "public function sessiontimeout() {\n\t\tstatic $nSecs;\n\t\tif (!isset($nSecs)) {\n\t\t\t$nSecs = ini_get('session.gc_maxlifetime');\n\t\t}\n\t\treturn $nSecs;\n\t}", "title": "" }, { "docid": "84f22853a31ef208e010bee8e38c908e", "score": "0.59332156", "text": "abstract function setCacheLifetime($inLifetime);", "title": "" }, { "docid": "8129801acd70e0185420294d710a1cf3", "score": "0.5931897", "text": "function wpdev_login_session( $expire ) {\n return YEAR_IN_SECONDS;\n // return MONTH_IN_SECONDS;\n // return DAY_IN_SECONDS;\n // return HOUR_IN_SECONDS;\n}", "title": "" }, { "docid": "be085d5266a18394340d291ee930c73b", "score": "0.5930105", "text": "function keep_alive() {\n $this->session->set_userdata(\"keep_alive\", time());\n echo $this->session->userdata('keep_alive');\n }", "title": "" }, { "docid": "80133ff73809f503b5c1f1b8af24b931", "score": "0.59263945", "text": "public function set_expiration_time() {\n\n\t\treturn ( ! empty( $this->exp_option ) ? intval( $this->exp_option ) : 30 * 60 * 24 );\n\t}", "title": "" }, { "docid": "05f0de4659854208e96c6648e740e56d", "score": "0.59149116", "text": "private static function timeout()\n {\n if (\n !empty(Session::get('LAST_ACTIVITY')) &&\n time() - Session::get('LAST_ACTIVITY') > TIMEOUT\n ) {\n Session::logout([\n 'success' => 'You have been logged out due to inactivity.',\n ]);\n exit();\n }\n Session::set('LAST_ACTIVITY', time(), true);\n }", "title": "" }, { "docid": "5c762424be801567f45f10d33d91b50e", "score": "0.5911284", "text": "public function set_expiration_variant_time() {\n\n\t\treturn ( ! empty( $this->exp_option ) ? ( intval( $this->exp_option ) - 3600 ) : 30 * 60 * 23 );\n\t}", "title": "" }, { "docid": "d54dd836fc504a2b2372a66e569b357f", "score": "0.59074354", "text": "public function expire($seg)\n {\n ini_set('session.gc_maxlifetime', (int) $seg);\n ini_set('session.cookie_lifetime', (int) $seg);\n return $this;\n }", "title": "" }, { "docid": "e35de20ff60cd413c248b1fb50895e40", "score": "0.5894079", "text": "public function setExpired($time)\n\t{\n\t\t$this->expires = $time;\n\t\tCBitrixCloudOption::getOption(\"cdn_config_expire_time\")->setStringValue((string)$this->expires);\n\t}", "title": "" }, { "docid": "1b2f77d4ab50975fca7baf3b5c55b9e1", "score": "0.58940095", "text": "public function authCookieExpiration()\n {\n return 30 * MINUTE_IN_SECONDS;\n }", "title": "" }, { "docid": "818df65f143f14ef0bc5bf695fb0f1e3", "score": "0.5893913", "text": "protected function __volatile_set_expires($time)\n\t{\n\t\t$this->headers['Expires'] = $time;\n\n\t\tsession_cache_expire($time);\n\t}", "title": "" }, { "docid": "5f3a70cbdcc99a6e9b6904c09c93bc17", "score": "0.5871469", "text": "public function setCacheTime($seconds)\n\t{\n\t\t# Set the Validator instance to a variable.\n\t\t$validator=Validator::getInstance();\n\n\t\t# Check if the passed value is empty or is not an integer.\n\t\tif(empty($seconds) OR ($validator->isInt($seconds)!==TRUE))\n\t\t{\n\t\t\t# Explicitly set the value to the default (3600).\n\t\t\t$seconds=3600;\n\t\t}\n\t\t# Set the data member.\n\t\t$this->cache_time=$seconds;\n\t}", "title": "" }, { "docid": "34d46ba26c8729806a9af3e3b55d8bea", "score": "0.58677155", "text": "public function setSessionDuration($sessionDuration)\n {\n $this->sessionDuration = $sessionDuration;\n }", "title": "" }, { "docid": "84bce0a624d02f4a99c608874fb96c9b", "score": "0.58658564", "text": "public function setMaxAge(int $seconds): void\n {\n $this->max_age = $seconds;\n }", "title": "" }, { "docid": "77dcb48c4771b1c9ab960fcf80f6dd0c", "score": "0.5864058", "text": "function checkSession(){\r\n\tif(userLoggedIn()){\r\n\t\tif (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 120)) {\r\n\t\t\tsession_unset(); // remove session variable\r\n\t\t\tsession_destroy(); // destroy current session\r\n\t\t\tsession_start();\r\n\t\t\t$sessionex = \"Session expired, please log in again\";\r\n\t\t\t$_SESSION['sessionex']= $sessionex;\r\n\t\t\theader ( \"Location:\".\"Login.php\" );\r\n\t\t\r\n\t\t}\r\n\t\t$_SESSION['LAST_ACTIVITY'] = time(); // update last activity time stamp\r\n\t}\r\n}", "title": "" }, { "docid": "2f6f7c59c99af8398c5fa8bbe88b3905", "score": "0.5858761", "text": "public function setLifeTime($lifeTime)\n\t{\n\t\t$this->lifeTime = $lifeTime;\n\t\t$this->cache->setLifeTime($this->lifeTime);\n\t}", "title": "" }, { "docid": "83f87fad0eaeb5226bc33bbadbaef237", "score": "0.58560556", "text": "public function setProxyMaxAge(int $seconds): void\n {\n $this->proxy_max_age = $seconds;\n }", "title": "" }, { "docid": "26b5754db73a11fbe1f0a6b706a010ac", "score": "0.5853446", "text": "public function setCookie()\n {\n $time = time() + 50;\n file_put_contents(self::$fileName, $time);\n setcookie(self::$cookie, self::$cookieToken, $time);\n }", "title": "" }, { "docid": "c3ab9f553e963ba4261e1d09fe34b47d", "score": "0.58280706", "text": "public function setLifetime($lifetime)\n {\n $this->lifetime = $lifetime;\n }", "title": "" }, { "docid": "601068b0ace45ae0347df8c0ed66e17a", "score": "0.5816798", "text": "public function setArenaTeamsCacheTTL($seconds){\n \t\t$GLOBALS['wowarmory']['ArenaTeamsTTL'] = $seconds;\n \t}", "title": "" }, { "docid": "1feae398b83e9e663d688fb67d1cafc2", "score": "0.5816444", "text": "function regenerate()\n {\n session_regenerate_id(true);\n setcookie(session_name(),session_id(),time()+$this->ttl, $this->path, $this->domain, $this->secure, $this->http_only);\n }", "title": "" }, { "docid": "17bba5fe420e50f57837aa45a46a0626", "score": "0.58102363", "text": "function keepalive() {\n\t\n\t// If session is supposed to be saved or remembered ignore following code\n\tif(!isset($_COOKIE['auth_key'])) {\n\t\t$oldtime = $_SESSION['user_lastactive'];\n\t\tif(!empty($oldtime)) {\n\t\t\t$currenttime = time();\n\t\t\t// This is equivalent to 30 minutes\n\t\t\t$timeoutlength = 5 * 600;\n\t\t\tif($oldtime + $timeoutlength >= $currenttime) {\n\t\t\t\t\n\t\t\t\t// Set new user last active time\n\t\t\t\t$_SESSION['user_lastactive'] = $currenttime;\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t// If session has been inactive too long logout\n\t\t\t\tlogout();\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "a12ed0a75eacf0062fbbbc57e67d38e7", "score": "0.5809626", "text": "public function start()\n\t{\n\t\t\n\t\tif(session_id() == '') {\n\t\t\tsession_start();\n\t\t\tsession_regenerate_id(true);\n\t\t}\n\t\t\n\t\tif(isset($_SESSION['timeout']) ) {\n\t\t\t$session_life = time() - $_SESSION['timeout'];\n\t\t\t$expire = $_SESSION['expire'];\n\t\t\tif($session_life > $expire){\n\t\t\t\t$this->destroy(); \n\t\t\t}\n\t\t}\n\n\t\t$kite = kite::getInstance('kite');\n\t\t$expire = $kite->get('SESSION_EXPIRE');\n\t\tself::expire($expire);\n\t}", "title": "" }, { "docid": "5c9e759145b6836fd165ea54acc840f5", "score": "0.57987297", "text": "public function setCacheTime($seconds = null);", "title": "" }, { "docid": "56c5a9ed6a6b1cbb236fbc810be9ed95", "score": "0.57818085", "text": "public function get_expiry() {\n\t\treturn 3600;\n\t}", "title": "" }, { "docid": "ae0d8c285db7a8868a5e4ccaa55bf5af", "score": "0.5777869", "text": "public function setLifetime(int $lifetime): void\n {\n $this->lifetime = $lifetime;\n }", "title": "" }, { "docid": "7d1961b7801da9c7c6983f3ff6233753", "score": "0.5772385", "text": "protected function _setTimers()\n {\n if (!$this->has('session.timer.start')) {\n $start = time();\n\n $this->set('session.timer.start', $start);\n $this->set('session.timer.last', $start);\n $this->set('session.timer.now', $start);\n }\n\n $this->set('session.timer.now', time());\n $this->set('session.timer.last', $this->get('session.timer.now'));\n\n return true;\n }", "title": "" }, { "docid": "349d808d33b82dbf53dd1913df9d81bf", "score": "0.57665616", "text": "function session_set_cookie_params ($lifetime, $path = null, $domain = null, $secure = null, $httponly = null) {}", "title": "" }, { "docid": "6cb6b58e560e12f9a41dadac1bec6b7e", "score": "0.57641137", "text": "public function setAuctionHouseCacheTTL($seconds){\n \t\t$GLOBALS['wowarmory']['AuctionHouseTTL'] = $seconds;\n \t}", "title": "" }, { "docid": "af8c594a475cc5bc9b52a5793d755fc6", "score": "0.5762028", "text": "public function expiresAt();", "title": "" }, { "docid": "98886133191b36e8a6e9e5ecaac22f6a", "score": "0.5761149", "text": "function regenerateSession()\n\t{\n\t\tif (isset($_SESSION['OBSOLETE']) && ($_SESSION['OBSOLETE'] == true))\n\t\t\treturn;\n\n\t\t// Set current session to expire in 10 seconds\n\t\t$_SESSION['OBSOLETE'] = true;\n\t\t$_SESSION['EXPIRES'] = time() + 10;\n\n\t\t// Create new session without destroying the old one\n\t\tsession_regenerate_id();\n\t\t// Grab current session ID and close both sessions to allow other scripts to use them\n\t\t$newSession = session_id();\n\t\tsession_write_close();\n\t\t// Set session ID to the new one, and start it back up again\n\n\t\tsession_id($newSession);\n\t\tsession_start();\n\t\t\n\t\t// Now we unset the obsolete and expiration values for the session we want to keep\n\t\tunset($_SESSION['OBSOLETE']);\n\t\tunset($_SESSION['EXPIRES']);\n\t}", "title": "" }, { "docid": "2e5c19c5aafca05fbc120f9e8ebb33a3", "score": "0.5760952", "text": "public function setGuildsCacheTTL($seconds){\n \t\t$GLOBALS['wowarmory']['GuildsTTL'] = $seconds;\n \t}", "title": "" }, { "docid": "65c0355e4303d7d26b1e76c0df3953b2", "score": "0.5758191", "text": "function validateSession($name, $time) {\n\t// Time holds the session time difference\n\t\n\t// If the session is set\n\tif(!empty($_SESSION[$name])) {\n\n\t\t// Compare the session time since last request\n\t\tif((time()-$_SESSION[$name]) > $time) {\n\t\t\t// If the time difference is meet, make the view and regenerate the session time\n\t\t\t$_SESSION[$name] = time();\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t// If the session is not set, then generate a new one\n\t} else {\n\t\t$_SESSION[$name] = time();\n\t\treturn 1;\n\t}\n}", "title": "" }, { "docid": "a207d33d821a51dd3edf3a1456a92c1c", "score": "0.57492685", "text": "static function regenerateSession()\n\t{\n\t\t// If this session is obsolete it means there already is a new id\n\t\tif(isset($_SESSION['OBSOLETE']))\n\t\t{\n\t\t\tif($_SESSION['OBSOLETE'] == true)\n\t\t\t\treturn;\n\t\t\telse\n\t\t\t\treturn;\n\t\t}\n\n\t\t// Set current session to expire in 10 seconds\n\t\t$_SESSION['OBSOLETE'] = true;\n\t\t$_SESSION['EXPIRES'] = time() + 10;\n\n\t\t// Create new session without destroying the old one\n\t\tsession_regenerate_id(false);\n\n\t\t// Grab current session ID and close both sessions to allow other scripts to use them\n\t\t$newSession = session_id();\n\t\tsession_write_close();\n\n\t\t// Set session ID to the new one, and start it back up again\n\t\tsession_id($newSession);\n\t\tsession_start();\n\n\t\t// Now we unset the obsolete and expiration values for the session we want to keep\n\t\tunset($_SESSION['OBSOLETE']);\n\t\tunset($_SESSION['EXPIRES']);\n\t}", "title": "" }, { "docid": "ec33a3541e85dff9a15fdde23f9c25cb", "score": "0.57419693", "text": "function keepSession() {\n if(! isset($_COOKIE['auth_key'])) {\n $oldtime = $_SESSION['lastactive'];\n\n if(! empty($oldtime)) {\n $currenttime = time();\n $timeoutlength = 30 * 600;\n \n if($oldtime + $timeoutlength >= $currenttime) {\n $_SESSION['lastactive'] = $currenttime;\n }\n else {\n doLogout(); // If session has been inactive too long logout\n }\n }\n }\n}", "title": "" }, { "docid": "c31fb43a4597532806aefa516585dc8d", "score": "0.57313216", "text": "function drupal_session_start()\n {\n global $time;\n\n $time += 1;\n }", "title": "" }, { "docid": "bc69f5ae272fa8e6f8615e54ad8a28ce", "score": "0.5725973", "text": "protected static function expired()\r\n {\r\n $last = isset($_SESSION['LAST_ACTIVE']) ? $_SESSION['LAST_ACTIVE'] : false;\r\n\r\n if (false !== $last && (time() - $last > static::$config['lifetime'])) {\r\n $_SESSION['LAST_ACTIVE'] = time();\r\n return true;\r\n }\r\n\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "2b2af1e68606800f92992c88d97415a5", "score": "0.5724478", "text": "private function setSessionFlag()\n {\n $this->session->set(Session::SESSION_CHECK_KEY, Session::SESSION_CHECK_ACTIVATE);\n }", "title": "" }, { "docid": "41322701c67eb111be6a4800c9d1ea74", "score": "0.57221043", "text": "public function setExpiration($timestamp)\n {\n }", "title": "" }, { "docid": "83c2a2d7412c958c7249a8088961740f", "score": "0.5719332", "text": "protected function getLifetime(): int\n {\n $params = session_get_cookie_params();\n $cookieLifetime = (int)$params['lifetime'];\n $gcLifetime = (int)ini_get('session.gc_maxlifetime');\n\n return $cookieLifetime ? min($cookieLifetime, $gcLifetime) : $gcLifetime;\n }", "title": "" }, { "docid": "5ce602b2288f1c50ac9c9a63e979fe21", "score": "0.5709369", "text": "function isSessionHasBeenExpired()\n {\n if (isSessionExists('activeTimer') === true and isSessionExists('sessionTimeOutLimit')) {\n $activeTime = (time() - (integer)getSessionValue('activeTimer'));\n if ($activeTime > (integer)getSessionValue('sessionTimeOutLimit')) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "7b8004c5860f1dac61d8f48a74c1897a", "score": "0.5707682", "text": "public function iHaveStartedANewSession()\n {\n $this->getSession()->restart();\n }", "title": "" }, { "docid": "bcb5cf38b97cd550bfc13baacc8538a2", "score": "0.5705007", "text": "function session_set_cookie_params($lifetime, $path = NULL, $domain = NULL, $secure = false, $httponly = false)\n{\n}", "title": "" }, { "docid": "e427058a59d014e7919544d07a0105f8", "score": "0.56907976", "text": "public function setLifetime($lifetime, $overrideLifetime = null) {\n\t\tif ($lifetime < 0) {\n\t\t\t/**\n\t\t\t *\n\t\t\t * @see Zend_Session_SaveHandler_Exception\n\t\t\t */\n\t\t\trequire_once 'Zend/Session/SaveHandler/Exception.php';\n\t\t\tthrow new Zend_Session_SaveHandler_Exception ();\n\t\t} else if (empty ( $lifetime )) {\n\t\t\t$this->_lifetime = ( int ) ini_get ( 'session.gc_maxlifetime' );\n\t\t} else {\n\t\t\t$this->_lifetime = ( int ) $lifetime;\n\t\t}\n\t\t\n\t\tif ($overrideLifetime != null) {\n\t\t\t$this->setOverrideLifetime ( $overrideLifetime );\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a4ad2bd5cfd0fdc2afd914997f065ee6", "score": "0.5686979", "text": "function startSession($timeout = 600){\n\tglobal $mysqli;\n\tsession_name('czid');\n\tsession_set_cookie_params(0);\n\tsession_start();\n\n\tif (isset($_SESSION['timeout_idle']) && $_SESSION['timeout_idle'] < time()) {\n\n\t\t//logout();\n\t\t\n }else{\n\t$_SESSION['timeout_idle'] = time() + $timeout;\n\t}\n \n\n}", "title": "" } ]
1874d14ea9731645bed8761d75267a62
Return JSON chart details for user weekly activity dashboard chart
[ { "docid": "efea41c90be970d2e2e0075c85cc1892", "score": "0.0", "text": "public function usertypes($userid) {\n\n // Set the Report.\n $report = array(\n 'Report' => array(\n 'name' => 'Task Types',\n 'startdate' => null,\n 'enddate' => null,\n 'datewindow' => '-3 months',\n 'rankorder' => '',\n 'ranklimit' => null,\n 'sortorder' => null,\n ),\n 'Filter' => array(),\n 'ReportDimension' => array(\n array(\n 'model' => 'Rule',\n 'parameter' => '1',\n 'type' => '1',\n 'Dimension' => array()\n ),\n array(\n 'model' => '',\n 'parameter' => '',\n 'type' => '2',\n 'Dimension' => array()\n )\n ),\n 'ReportValue' => array(\n array(\n 'value_id' => '1',\n 'parameter' => '1',\n 'Value' => array(\n 'name' => 'Count activity',\n 'model' => 'Action',\n 'field' => '*',\n 'type' => '1',\n )\n )\n ),\n 'where' => array(\n 'Person.id' => $userid\n )\n );\n\n $current_user = $this->get_currentUser();\n\n $systems = $this->System->find('all', array(\n 'conditions' => array('customer_id' => $current_user['Member']['customer_id'])\n ));\n $systems = Set::extract($systems, '{n}.System');\n\n $report['System'] = $systems;\n\n $dimensions = $this->Report->getDimensions($report);\n\n $data = $this->Report->getReportDataFlat(\n 'COUNT(*)', // Select\n 'Action', // From\n false, // Date cache\n $this->Report->getAxis($dimensions, $report), // x-Axis\n $report['where'],\n $systems\n );\n\n $pie = array();\n foreach ($data as $k => $v) {\n $pie[] = array(\n 'text' => $k,\n 'values' => array($v)\n );\n }\n\n $chart = array(\n 'graphset' => array(\n array(\n 'id' => 'usertypes',\n 'x' => '0%',\n 'y' => '0%',\n 'width' => '100%',\n 'height' => '100%',\n 'type' => 'pie',\n 'series' => $pie,\n 'plot-area' => array(\n 'margin' => '5px',\n ),\n 'tooltip' => array(\n 'text' => \"%t: %v (%npv%)\",\n )\n )\n )\n );\n return new CakeResponse(array('body' => json_encode($chart)));\n }", "title": "" } ]
[ { "docid": "5087dfde182ecb073ad93e823bd69247", "score": "0.6864087", "text": "public function userweekly($userid) {\n\n // Set the Report.\n $report = array(\n 'Report' => array(\n 'name' => 'User Activity',\n 'startdate' => null,\n 'enddate' => null,\n 'datewindow' => '-3 months',\n 'rankorder' => '',\n 'ranklimit' => null,\n 'sortorder' => null,\n ),\n 'Filter' => array(),\n 'ReportDimension' => array(\n array(\n 'model' => 'DimensionDate',\n 'parameter' => '2',\n 'type' => '1',\n 'Dimension' => array()\n ),\n array(\n 'model' => '',\n 'parameter' => '',\n 'type' => '2',\n 'Dimension' => array()\n )\n ),\n 'ReportValue' => array(\n array(\n 'value_id' => '1',\n 'parameter' => '1',\n 'Value' => array(\n 'name' => 'Count activity',\n 'model' => 'Action',\n 'field' => '*',\n 'type' => '1',\n )\n )\n ),\n 'where' => array(\n 'Person.id' => $userid\n )\n );\n\n $current_user = $this->get_currentUser();\n\n $systems = $this->System->find('all', array(\n 'conditions' => array('customer_id' => $current_user['Member']['customer_id'])\n ));\n $systems = Set::extract($systems, '{n}.System');\n\n $report['System'] = $systems;\n\n $dimensions = $this->Report->getDimensions($report);\n\n $data = $this->Report->getReportDataFlat(\n 'COUNT(*)', // Select\n 'Action', // From\n false, // Date cache\n $this->Report->getAxis($dimensions, $report), // x-Axis\n $report['where'],\n $systems\n );\n\n $max = max(array_values($data));\n\n $chart = array(\n 'graphset' => array(\n array(\n 'id' => 'userweekly',\n 'x' => '0%',\n 'y' => '0%',\n 'width' => '100%',\n 'height' => '100%',\n 'type' => 'hbar',\n 'scale-x' => array(\n 'values' => array_keys($data),\n 'line-color' => 'none',\n 'item' => array(\n 'width' => 200,\n 'text-align' => 'left',\n 'offset-x' => 206,\n 'offset-y' => -10,\n 'font-color' => '#8391a5',\n 'font-family' => 'Arial',\n 'font-size' => '11px',\n 'padding-bottom' => '8px'\n ),\n 'tick' => array(\n 'visible' => false\n ),\n 'guide' => array(\n 'visible' => false\n )\n ),\n 'scale-y' => array(\n 'line-color' => 'none',\n 'tick' => array(\n 'visible' => false,\n ),\n 'item' => array(\n 'visible' => false,\n ),\n 'guide' => array (\n 'visible' => false,\n )\n ),\n 'plotarea' => array(\n 'margin' => '5 5 10 5',\n 'padding' => 0,\n ),\n 'plot' => array(\n 'bars-overlap' => '100%',\n 'bar-width' => '12px',\n 'thousands-separator' => ',',\n 'tooltip' => array(\n 'font-color' => '#ffffff',\n 'background-color' => '#707e94',\n 'font-family' => 'Arial',\n 'font-size' => '11px',\n 'border-radius' => '6px',\n 'shadow' => false,\n 'padding' => '5px 10px',\n ),\n 'hover-state' => array(\n 'background-color' => '#118e94'\n )\n ),\n 'series' => array(\n array(\n 'values' => array_values($data),\n '-animation' => array(\n 'method' => 0,\n 'effect' => 4,\n 'speed' => 2000,\n 'sequence' => 0\n ),\n 'z-index' => 2,\n 'styles' => array(\n 'background-color' => array_values(array_fill_keys(array_keys($data), \"#4dbac0\"))\n ),\n 'tooltip-text' => '%node-value'\n ),\n array(\n 'max-trackers' => 0,\n 'values' => array_values(array_fill_keys(array_keys($data), $max)),\n 'data-rvalues' => array_values($data),\n 'background-color' => '#d9e4eb',\n 'z-index' => 1,\n 'value-box' => array(\n 'visible' => true,\n 'offset-y' => '-10px',\n 'offset-x' => '-64px',\n 'text-align' => 'right',\n 'font-color' => '#8391a5',\n 'font-family' => 'Arial',\n 'font-size' => '11px',\n 'text' => 'Total: %data-rvalues',\n 'padding-bottom' => '8px'\n )\n )\n )\n )\n )\n );\n return new CakeResponse(array('body' => json_encode($chart)));\n }", "title": "" }, { "docid": "2798f6cfe4f1687d7c254fd0b46c8f34", "score": "0.6706304", "text": "function advanced_statistics_get_activity_data($chart_id) {\n\t$result = array(\"data\" => array(), \"options\" => array());\n\n\t$dbprefix = elgg_get_config(\"dbprefix\");\n\t$current_site_guid = elgg_get_site_entity()->getGUID();\n\n\tswitch ($chart_id) {\n\t\tcase \"day\":\n\t\t\t$data = array();\n\t\t\n\t\t\t$query = \"SELECT DAYOFWEEK(FROM_UNIXTIME(r.posted)) AS day_of_the_week, count(*) as total\";\n\t\t\t$query .= \" FROM \" . $dbprefix . \"entities e\";\n\t\t\t$query .= \" JOIN \" . $dbprefix . \"river r ON e.guid = r.object_guid\";\n\t\t\t$query .= \" WHERE e.site_guid = \" . $current_site_guid;\n\t\t\t$query .= \" GROUP BY DAYOFWEEK(FROM_UNIXTIME(posted))\";\n\t\t\n\t\t\tif ($query_result = get_data($query)) {\n\t\t\t\tforeach ($query_result as $row) {\n\t\t\t\t\t$dotw = $row->day_of_the_week;\n\t\t\t\t\t$dotw = elgg_echo(\"advanced_statistics:activity:day:\" . $dotw);\n\t\t\t\t\t\n\t\t\t\t\t$total = (int) $row->total;\n\t\t\t\t\t$data[] = array($dotw . \" [\" . $total . \"]\" , $total);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t$result[\"data\"] = array($data);\n\t\t\t$result[\"options\"] = advanced_statistics_get_default_chart_options(\"bar\");\n\t\t\n\t\t\tbreak;\n\t\tcase \"hour\":\n\t\t\t$data = array();\n\t\t\n\t\t\t$query = \"SELECT FROM_UNIXTIME(r.posted, '%k') AS hour_of_the_day, count(*) as total\";\n\t\t\t$query .= \" FROM \" . $dbprefix . \"entities e\";\n\t\t\t$query .= \" JOIN \" . $dbprefix . \"river r ON e.guid = r.object_guid\";\n\t\t\t$query .= \" WHERE e.site_guid = \" . $current_site_guid;\n\t\t\t$query .= \" GROUP BY FROM_UNIXTIME(r.posted, '%k')\";\n\t\t\n\t\t\tfor ($i = 0; $i < 24; $i++) {\n\t\t\t\t$data[$i] = array(\"$i\", 0);\n\t\t\t}\n\t\t\t\n\t\t\tif ($query_result = get_data($query)) {\n\t\t\t\tforeach ($query_result as $row) {\n\t\t\t\t\t$hotd = $row->hour_of_the_day;\n\t\t\t\t\t\n\t\t\t\t\t$total = (int) $row->total;\n\t\t\t\t\t$data[(int)$hotd] = array($hotd, $total);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t$result[\"data\"] = array($data);\n\t\t\t$result[\"options\"] = advanced_statistics_get_default_chart_options(\"bar\");\n\t\t\n\t\t\tbreak;\n\t\tcase \"timeline\":\n\t\t\t$data = array();\n\t\t\n\t\t\t$query = \"SELECT FROM_UNIXTIME(r.posted, '%Y-%m-%d') AS date_created, count(*) as total\";\n\t\t\t$query .= \" FROM \" . $dbprefix . \"entities e\";\n\t\t\t$query .= \" JOIN \" . $dbprefix . \"river r ON e.guid = r.object_guid\";\n\t\t\t$query .= \" WHERE e.site_guid = \" . $current_site_guid;\n\t\t\t$query .= \" GROUP BY FROM_UNIXTIME(r.posted, '%Y-%m-%d')\";\n\t\t\t\t\t\t\n\t\t\tif ($query_result = get_data($query)) {\n\t\t\t\tforeach ($query_result as $row) {\n\t\t\t\t\t$date_created = $row->date_created;\n\t\t\t\t\t\n\t\t\t\t\t$total = (int) $row->total;\n\t\t\t\t\t$data[] = array($date_created, $total);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t$result[\"data\"] = array($data);\n\t\t\t\n\t\t\t$result[\"options\"] = advanced_statistics_get_default_chart_options(\"date\");\n\t\t\t$result[\"options\"][\"series\"] = array(array(\"showMarker\" => false));\n\t\t\t\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$params = array(\n\t\t\t\t\"chart_id\" => $chart_id,\n\t\t\t\t\"default_result\" => $result\n\t\t\t);\n\n\t\t\t$result = elgg_trigger_plugin_hook(\"activity\", \"advanced_statistics\", $params, $result);\n\t\t\tbreak;\n\t}\n\n\treturn json_encode($result);\n}", "title": "" }, { "docid": "3b5bd6731a8935348962abe33269bd2d", "score": "0.66985613", "text": "public static function graphJSON() {\n\t\t\n\t\t$model = self::getModel();\n\t\t$category = explode('-', (empty($_GET['category']) ? null : $_GET['category']));\n\t\t$period = array_pop($category);\n\t\t$category = array_pop($category);\n\t\t$params = array();\n\t\t\n\t\t$categories = array('days', 'weeks', 'months');\n\t\tif (!in_array($category, $categories)) {\n\t\t\t$category = 'days';\n\t\t}\n\t\t\n\t\t$logs = $model->stats($category, $period);\n\t\tforeach ($logs as $key => &$log) {\n\t\t\t$log = array((string)$key, (int)$log);\n\t\t}\n\t\t\n\t\theader(\"Content-type: application/json; charset=UTF-8\");\n\t\techo json_encode(array_values($logs));\n\t\texit;\n\t\t\n\t}", "title": "" }, { "docid": "d619f9e7a106e6bf70ff1a05ac06f3c0", "score": "0.6695418", "text": "function barChartDataProvider($weekNumber) {\n // Establish connection to the server\n $servername = \"localhost\";\n $username = \"root\";\n $password = \"\";\n $dbname = \"p00702\";\n // Create connection\n $mysqli = new mysqli($servername, $username, $password, $dbname);\n\n //turn off autocommit\n $mysqli->autocommit(false);\n\n // Set up a flag for monitoring the individual queries\n $flag = true;\n\n // User ID initialisation\n $userid = $_SESSION['user_id'];\n \n //Obtain the schedule for the current week, get the dates, total number of hours per date, module codes and module titles\n $weeklyScheduleQuery = \"SELECT studydate, SUM(numberofstudyhours) AS numberofstudyhours FROM studyplans LEFT JOIN `modulecodes` ON `studyplans`.`modulecodeid` = `modulecodes`.`modulecodeid` LEFT JOIN `users` ON `modulecodes`.`userid` = `users`.`userid` WHERE WEEK(studydate) = (WEEK(CURRENT_DATE()) + $weekNumber) AND `users`.`userid` = $userid GROUP BY studydate ORDER BY studydate ASC;\";\n // Execute the query and put the result in the variable $weeklyScheduleResult\n $weeklyScheduleResult = mysqli_query($mysqli, $weeklyScheduleQuery);\n\n $data = array();\n\n // Fetch the result of the query as an array.\n while ($weeklyScheduleQueryResult = mysqli_fetch_array($weeklyScheduleResult, MYSQLI_ASSOC)) {\n //Put the result in array variables, the 'data' will tag every array in each variable with the tag 'data'\n $data[] = $weeklyScheduleQueryResult;\n }\n\n echo json_encode($data);\n\n // Finally, close the connection\n mysqli_close($mysqli);\n}", "title": "" }, { "docid": "da529159d3c0a32235a800a243b89854", "score": "0.64089465", "text": "public function index()\n { \n $week1ago = Carbon::now()->subDays(Carbon::now()->dayOfWeek);\n $week2ago = Carbon::now()->subDays(Carbon::now()->dayOfWeek)->subWeek();\n $dataWeek1Ago = booking::whereBetween('created_at', [$week1ago->startOfWeek()->format('Y-m-d'), $week1ago->endOfWeek()->format('Y-m-d')])->count();\n $dataWeek2Ago = booking::whereBetween('created_at', [$week2ago->startOfWeek()->format('Y-m-d'), $week2ago->endOfWeek()->format('Y-m-d')])->count();\n $dataWeekNow = booking::whereBetween('created_at', [Carbon::now()->startOfWeek(), Carbon::now()->endOfWeek()])->count();\n\n\n $usersChart = new UserChart;\n $usersChart->labels(['Last 2 Week', 'Last 1 Week', 'This Week']);\n $usersChart->dataset('Booking ', 'line', [$dataWeek2Ago, $dataWeek1Ago , $dataWeekNow]);\n $movie = film::all();\n return view('film.main',compact('movie','usersChart'));\n }", "title": "" }, { "docid": "e61f76feeb8dc2359ea8fc2b420723b8", "score": "0.6236096", "text": "function getActivityChartData($rawData) {\n $res = array();\n $services = array('facebook', 'twitter', 'linkedin', 'google');\n $res['clickbacks'] = array();\n\n // Initializing the Data arrays for the chart\n foreach ($services as $service) {\n $res[$service.'_likes'] = array();\n $res[$service.'_dislikes'] = array();\n $res[$service.'_contacts'] = array();\n }\n\n // Sort data by date\n $rawData['data'] = ChartUtils::sortArrayByDate($rawData['data']);\n\n // Converting data into a chart usable format\n foreach ($rawData['data'] as $data) {\n $cb = 0;\n foreach ($services as $service) {\n if(array_key_exists($service, $data)) {\n array_push($res[$service.'_likes'], $data[$service]['likes']);\n array_push($res[$service.'_dislikes'], $data[$service]['dislikes']);\n array_push($res[$service.'_contacts'], $data[$service]['contacts']);\n $cb += $data[$service]['clickbacks'];\n } else {\n array_push($res[$service.'_likes'], 0);\n array_push($res[$service.'_dislikes'], 0);\n array_push($res[$service.'_contacts'], 0);\n }\n }\n array_push($res['clickbacks'], $cb);\n }\n\n // Get pi data by date\n $res['pis'] = ChartUtils::getPiData($rawData['pis']);\n\n // Addding some metadata from the filter like categories, range, etc.\n $res['metadata'] = ChartUtils::addFilterData($res, $rawData['filter']);\n return json_encode($res);\n}", "title": "" }, { "docid": "2c4f8cfc736ed37951bab541b3d733cb", "score": "0.6219019", "text": "public function monthWiseChart()\n {\n // echo \"string\";die;\n $chartData = $this->enquiry_model->monthWiseChart($this->session->user_id,$this->session->companey_id);\n //print_r($chartData);die;\n if(!empty($chartData))\n {\n echo json_encode(array('data'=>$chartData,'status'=>'success'));\n }\n else\n {\n echo json_encode(array('status'=>'fail'));\n }\n }", "title": "" }, { "docid": "b6e48f370b1881228ceafd844dd3bcda", "score": "0.61068755", "text": "public function get_main_chart() {\n\t\tglobal $wp_locale;\n\n\t\t// Prepare data for report\n\t\t$retry_count = $this->prepare_chart_data( $this->report_data->retry_data, 'post_date', 'count', $this->chart_interval, $this->start_date, $this->chart_groupby );\n\t\t$retry_success_count = $this->prepare_chart_data( wp_list_filter( $this->report_data->retry_data, array( 'status' => 'complete' ) ), 'post_date', 'count', $this->chart_interval, $this->start_date, $this->chart_groupby );\n\t\t$retry_failure_count = $this->prepare_chart_data( wp_list_filter( $this->report_data->retry_data, array( 'status' => 'failed' ) ), 'post_date', 'count', $this->chart_interval, $this->start_date, $this->chart_groupby );\n\t\t$retry_pending_count = $this->prepare_chart_data( wp_list_filter( $this->report_data->retry_data, array( 'status' => 'pending' ) ), 'post_date', 'count', $this->chart_interval, $this->start_date, $this->chart_groupby );\n\n\t\t$renewal_count = $this->prepare_chart_data( $this->report_data->renewal_data, 'post_date', 'count', $this->chart_interval, $this->start_date, $this->chart_groupby );\n\t\t$renewal_amount = $this->prepare_chart_data( $this->report_data->renewal_data, 'post_date', 'renewal_totals', $this->chart_interval, $this->start_date, $this->chart_groupby );\n\n\t\t// Encode in json format\n\t\t$chart_data = array(\n\t\t\t'retry_count' => array_values( $retry_count ),\n\t\t\t'retry_success_count' => array_values( $retry_success_count ),\n\t\t\t'retry_failure_count' => array_values( $retry_failure_count ),\n\t\t\t'retry_pending_count' => array_values( $retry_pending_count ),\n\t\t\t'renewal_count' => array_values( $renewal_count ),\n\t\t\t'renewal_amount' => array_map( array( $this, 'round_chart_totals' ), array_values( $renewal_amount ) ),\n\t\t);\n\n\t\t$timeformat = ( $this->chart_groupby == 'day' ? '%d %b' : '%b' );\n\n\t\t?>\n\t\t<div id=\"woocommerce_subscriptions_payment_retry_chart\" class=\"chart-container\">\n\t\t\t<div class=\"chart-placeholder main\"></div>\n\t\t</div>\n\t\t<script type=\"text/javascript\">\n\n\t\t\tvar main_chart;\n\n\t\t\tjQuery(function(){\n\t\t\t\tvar chart_data = jQuery.parseJSON( '<?php echo json_encode( $chart_data ); ?>' );\n\n\t\t\t\tvar drawGraph = function( highlight ) {\n\t\t\t\t\tvar series = [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: \"<?php echo esc_js( __( 'Successful retries', 'woocommerce-subscriptions' ) ) ?>\",\n\t\t\t\t\t\t\tdata: chart_data.retry_success_count,\n\t\t\t\t\t\t\tcolor: '<?php echo esc_js( $this->chart_colours['retry_success_count'] ); ?>',\n\t\t\t\t\t\t\tbars: {\n\t\t\t\t\t\t\t\tfillColor: '<?php echo esc_js( $this->chart_colours['retry_success_count'] ); ?>',\n\t\t\t\t\t\t\t\torder: 1,\n\t\t\t\t\t\t\t\tfill: true,\n\t\t\t\t\t\t\t\tshow: true,\n\t\t\t\t\t\t\t\tlineWidth: 0,\n\t\t\t\t\t\t\t\tbarWidth: <?php echo esc_js( $this->barwidth ); ?> * 0.33,\n\t\t\t\t\t\t\t\talign: 'center'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tshadowSize: 0,\n\t\t\t\t\t\t\thoverable: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: \"<?php echo esc_js( __( 'Failed retries', 'woocommerce-subscriptions' ) ) ?>\",\n\t\t\t\t\t\t\tdata: chart_data.retry_failure_count,\n\t\t\t\t\t\t\tcolor: '<?php echo esc_js( $this->chart_colours['retry_failure_count'] ); ?>',\n\t\t\t\t\t\t\tbars: {\n\t\t\t\t\t\t\t\tfillColor: '<?php echo esc_js( $this->chart_colours['retry_failure_count'] ); ?>',\n\t\t\t\t\t\t\t\torder: 2,\n\t\t\t\t\t\t\t\tfill: true,\n\t\t\t\t\t\t\t\tshow: true,\n\t\t\t\t\t\t\t\tlineWidth: 0,\n\t\t\t\t\t\t\t\tbarWidth: <?php echo esc_js( $this->barwidth ); ?> * 0.33,\n\t\t\t\t\t\t\t\talign: 'center'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tshadowSize: 0,\n\t\t\t\t\t\t\thoverable: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: \"<?php echo esc_js( __( 'Pending retries', 'woocommerce-subscriptions' ) ) ?>\",\n\t\t\t\t\t\t\tdata: chart_data.retry_pending_count,\n\t\t\t\t\t\t\tcolor: '<?php echo esc_js( $this->chart_colours['retry_pending_count'] ); ?>',\n\t\t\t\t\t\t\tbars: {\n\t\t\t\t\t\t\t\tfillColor: '<?php echo esc_js( $this->chart_colours['retry_pending_count'] ); ?>',\n\t\t\t\t\t\t\t\torder: 3,\n\t\t\t\t\t\t\t\tfill: true,\n\t\t\t\t\t\t\t\tshow: true,\n\t\t\t\t\t\t\t\tlineWidth: 0,\n\t\t\t\t\t\t\t\tbarWidth: <?php echo esc_js( $this->barwidth ); ?> * 0.33,\n\t\t\t\t\t\t\t\talign: 'center'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tshadowSize: 0,\n\t\t\t\t\t\t\thoverable: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: \"<?php echo esc_js( __( 'Recovered Renewal Revenue', 'woocommerce-subscriptions' ) ) ?>\",\n\t\t\t\t\t\t\tdata: chart_data.renewal_amount,\n\t\t\t\t\t\t\tyaxis: 2,\n\t\t\t\t\t\t\tcolor: '<?php echo esc_js( $this->chart_colours['renewal_total'] ); ?>',\n\t\t\t\t\t\t\tpoints: {\n\t\t\t\t\t\t\t\tshow: true,\n\t\t\t\t\t\t\t\tradius: 6,\n\t\t\t\t\t\t\t\tlineWidth: 4,\n\t\t\t\t\t\t\t\tfillColor: '#fff',\n\t\t\t\t\t\t\t\tfill: true\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tlines: {\n\t\t\t\t\t\t\t\tshow: true,\n\t\t\t\t\t\t\t\tlineWidth: 5,\n\t\t\t\t\t\t\t\tfill: false\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tshadowSize: 0,\n\t\t\t\t\t\t\t<?php echo wp_kses_post( $this->get_currency_tooltip() ); ?>\n\t\t\t\t\t\t},\n\t\t\t\t\t];\n\n\t\t\t\t\tif ( highlight !== 'undefined' && series[ highlight ] ) {\n\t\t\t\t\t\thighlight_series = series[ highlight ];\n\n\t\t\t\t\t\thighlight_series.color = '#9c5d90';\n\n\t\t\t\t\t\tif ( highlight_series.bars ) {\n\t\t\t\t\t\t\thighlight_series.bars.fillColor = '#9c5d90';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( highlight_series.lines ) {\n\t\t\t\t\t\t\thighlight_series.lines.lineWidth = 5;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tmain_chart = jQuery.plot(\n\t\t\t\t\t\tjQuery('.chart-placeholder.main'),\n\t\t\t\t\t\tseries,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlegend: {\n\t\t\t\t\t\t\t\tshow: false\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tgrid: {\n\t\t\t\t\t\t\t\tcolor: '#aaa',\n\t\t\t\t\t\t\t\tborderColor: 'transparent',\n\t\t\t\t\t\t\t\tborderWidth: 0,\n\t\t\t\t\t\t\t\thoverable: true\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\txaxes: [ {\n\t\t\t\t\t\t\t\tcolor: '#aaa',\n\t\t\t\t\t\t\t\tposition: \"bottom\",\n\t\t\t\t\t\t\t\ttickColor: 'transparent',\n\t\t\t\t\t\t\t\tmode: \"time\",\n\t\t\t\t\t\t\t\ttimeformat: \"<?php echo esc_js( $timeformat ) ?>\",\n\t\t\t\t\t\t\t\tmonthNames: <?php echo json_encode( array_values( $wp_locale->month_abbrev ) ) ?>,\n\t\t\t\t\t\t\t\ttickLength: 1,\n\t\t\t\t\t\t\t\tminTickSize: [1, \"<?php echo esc_js( $this->chart_groupby ); ?>\"],\n\t\t\t\t\t\t\t\tfont: {\n\t\t\t\t\t\t\t\t\tcolor: \"#aaa\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} ],\n\t\t\t\t\t\t\tyaxes: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmin: 0,\n\t\t\t\t\t\t\t\t\tminTickSize: 1,\n\t\t\t\t\t\t\t\t\ttickDecimals: 0,\n\t\t\t\t\t\t\t\t\tcolor: '#d4d9dc',\n\t\t\t\t\t\t\t\t\tfont: { color: \"#aaa\" }\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\tposition: \"right\",\n\t\t\t\t\t\t\t\t\tmin: 0,\n\t\t\t\t\t\t\t\t\ttickDecimals: 2,\n\t\t\t\t\t\t\t\t\ttickFormatter: function (tick) {\n\t\t\t\t\t\t\t\t\t\t// Localise and format axis labels\n\t\t\t\t\t\t\t\t\t\treturn jQuery.wcs_format_money(tick,0);\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\talignTicksWithAxis: 1,\n\t\t\t\t\t\t\t\t\tcolor: 'transparent',\n\t\t\t\t\t\t\t\t\tfont: { color: \"#aaa\" }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\tstack: true,\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\n\t\t\t\t\tjQuery('.chart-placeholder').resize();\n\t\t\t\t}\n\n\t\t\t\tdrawGraph();\n\n\t\t\t\tjQuery('.highlight_series').hover(\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tdrawGraph( jQuery(this).data('series') );\n\t\t\t\t\t},\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tdrawGraph();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t});\n\t\t</script>\n\t\t<?php\n\t}", "title": "" }, { "docid": "006c0313c3f8dd71018189c7145cada4", "score": "0.60943305", "text": "public function showChartSesLog()\n {\n // load library to cek user session and level\n $this->pageauth->sess_level_auth();\n $this->load->model('pages/m_crud_user');\n $query = $this->m_crud_user->select_chartsess();\n $sesarry = array();\n foreach ($query->result() as $row) {\n $sesarry[] = $row;\n }\n echo json_encode($sesarry);\n header('Content-Type: application/json');\n }", "title": "" }, { "docid": "0fb590e030eea6de7da6a65930b1cdb6", "score": "0.60902244", "text": "public function report_with_echart()\n {\n $dataSales = $this->SalesChart();\n $datapurchases = $this->PurchasesChart();\n $Payment_chart = $this->Payment_chart();\n $TopCustomers = $this->TopCustomers();\n $Top_Products_Year = $this->Top_Products_Year();\n $report_dashboard = $this->report_dashboard();\n\n return response()->json([\n 'sales' => $dataSales,\n 'purchases' => $datapurchases,\n 'payments' => $Payment_chart,\n 'customers' => $TopCustomers,\n 'product_report' => $Top_Products_Year,\n 'report_dashboard' => $report_dashboard,\n ]);\n\n }", "title": "" }, { "docid": "f5bbbcec517e02d9a24f5ca7b93fff12", "score": "0.60676026", "text": "public function chart()\n {\n $result = DB::table('atencion')\n ->join('funcionarios', 'funcionarios.id', '=', 'atencion.funcionario_id')\n ->join('users', 'users.id', '=', 'funcionarios.user_id')\n ->whereMonth('atencion.fecha', Carbon::now()->month)\n ->select(DB::raw(\"count(*) as stockPrice, CONCAT(users.nombre,' ', users.apellido_paterno, ' ', users.apellido_materno) AS stockYear\"))\n ->groupBy('users.id','users.nombre','users.apellido_paterno','users.apellido_materno')\n ->get();\n return response()->json($result);\n }", "title": "" }, { "docid": "af1e818594f76c3a1c0f63adea145095", "score": "0.60316783", "text": "public function userChart($userId)\n\t{\n\t\t$data = array('labels' => [], 'datasets' => [array(), array()]);\n\t\t$limit = (int) Input::get('limit', 20);\n\t\t$matchStats = Stat::where('user_id', $userId)->where('type', 'player_event_match_efficiency')->orderBy('event_id')->take($limit)->get();\n\t\t$setStats = Stat::where('user_id', $userId)->where('type', 'player_event_set_efficiency')->orderBy('event_id')->take($limit)->get();\n\n\t\tforeach ($matchStats as $key => $stat)\n\t\t{\n\t\t\t$data['labels'][$key] = '.';\n\t\t\t$data['datasets'][0]['data'][$key] = $stat->value;\n\t\t\t$data['datasets'][1]['data'][$key] = $setStats[$key]->value;\n\t\t}\n\n\t\t// Colors\n\n\t\t$data['datasets'][0]['fillColor'] = \"rgba(220,220,220,0.5)\";\n\t\t$data['datasets'][0]['strokeColor'] = \"rgba(220,220,220,1)\";\n\t\t$data['datasets'][0]['pointColor'] = \"rgba(220,220,220,1)\";\n\t\t$data['datasets'][0]['pointStrokeColor'] = \"#fff\";\n\t\t$data['datasets'][1]['fillColor'] = \"rgba(151,187,205,0.1)\";\n\t\t$data['datasets'][1]['strokeColor'] = \"rgba(151,187,205,0.4)\";\n\t\t$data['datasets'][1]['pointColor'] = \"rgba(151,187,205,0.4)\";\n\t\t$data['datasets'][1]['pointStrokeColor'] = \"#ddd\";\n\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "115e55912f3b1f0c563248fe601bab02", "score": "0.5985694", "text": "public function index(){\n// ->pluck('humidity')->collect();\n\n $summary = DataSummary::whereDate('created_at', Carbon::today())\n ->first();\n\n if(!$summary){\n updateSummary();\n $summary = DataSummary::whereDate('created_at', Carbon::today())\n ->first();\n }\n\n $data_summary = json_decode($summary->collection);\n\n $graph_collect = $today_data = Dataset::whereDate('created_at', Carbon::today())\n ->orderBy('id', 'DESC')\n ->limit(15)\n ->get()\n ->collect();\n\n $temperature = [];\n $humidity = [];\n $ph = [];\n $categories = [];\n foreach ($graph_collect as $collect){\n $categories[] = Carbon::parse($collect->created_at)->format('h:i A');\n $humidity[] = round($collect->humidity, 2);\n $ph[] = round($collect->ph, 2);\n $temperature[] = round($collect->temperature, 2);\n }\n\n $area = [\n 'humidity' => $humidity,\n 'ph' => $ph,\n 'temperature' => $temperature\n ];\n\n $this_week = Carbon::today()->addDays('-7');\n $day = 1;\n $date = [];\n do{\n $current_day = $this_week->addDay();\n\n $date[] = $current_day->format('l');\n\n $prev_summary = DataSummary::whereDate('created_at', $current_day)->first();\n $avg_humidity = $avg_temperature = $avg_ph = 0;\n\n if($prev_summary){\n $decode = json_decode($prev_summary->collection);\n\n $avg_humidity = round($decode->humidity->average, 2);\n $avg_temperature = round($decode->temperature->average, 2);\n $avg_ph = round($decode->ph->average, 2);\n }\n\n $arr_h[] = $avg_humidity;\n $arr_t[] = $avg_temperature;\n $arr_p[] = $avg_ph;\n $day++;\n }while($day<=7);\n\n $weekly['date'] = $date;\n $weekly['humidity'] = $arr_h;\n $weekly['temperature'] = $arr_t;\n $weekly['ph'] = $arr_p;\n\n $weekly['date'][6] = $current_day->format('l').\" (Today)\";\n\n return view('frontend.index', compact('data_summary', 'categories', 'area', 'weekly', 'summary'));\n }", "title": "" }, { "docid": "d4d852aa2c79bd5362e43abac14ba404", "score": "0.5977867", "text": "public function SalesChart()\n {\n $role = Auth::user()->roles()->first();\n $view_records = Role::findOrFail($role->id)->inRole('record_view');\n\n // Build an array of the dates we want to show, oldest first\n $dates = collect();\n foreach (range(-6, 0) as $i) {\n $date = Carbon::now()->addDays($i)->format('Y-m-d');\n $dates->put($date, 0);\n }\n\n $date_range = \\Carbon\\Carbon::today()->subDays(6);\n // Get the sales counts\n $sales = Sale::where('date', '>=', $date_range)\n ->where('deleted_at', '=', null)\n ->where(function ($query) use ($view_records) {\n if (!$view_records) {\n return $query->where('user_id', '=', Auth::user()->id);\n }\n })\n ->groupBy(DB::raw(\"DATE_FORMAT(date,'%Y-%m-%d')\"))\n ->orderBy('date', 'asc')\n ->get([\n DB::raw(DB::raw(\"DATE_FORMAT(date,'%Y-%m-%d') as date\")),\n DB::raw('SUM(GrandTotal) AS count'),\n ])\n ->pluck('count', 'date');\n\n // Merge the two collections;\n $dates = $dates->merge($sales);\n\n $data = [];\n $days = [];\n foreach ($dates as $key => $value) {\n $data[] = $value;\n $days[] = $key;\n }\n\n return response()->json(['data' => $data, 'days' => $days]);\n\n }", "title": "" }, { "docid": "dd09a60b02c41d2be019923dd7871369", "score": "0.5953586", "text": "public function status_chart($date, $user_id){\n\t\t$i = 0;\n\t\tforeach($date as $day){\n\t\t\t$sql = \"select status, count(*) as count from tsk_plan where app_users_id = $user_id and is_deleted = 'N' and (date_format(start, '%Y-%m-%d') = '$day' or (date_format(start, '%Y-%m-%d') <= '$day'\nand date_format(end, '%Y-%m-%d') >= '$day')) group by status;\"; \n\t\t\t$result = $this->query($sql);\n\t\t\tif(strtotime($day) <= strtotime(date('Y-m-d'))){\n\t\t\t\t// iterate the results\n\t\t\t\tforeach($result as $data){ //echo $data['tsk_plan']['status'];\n\t\t\t\t\tswitch($data['tsk_plan']['status']){\n\t\t\t\t\t\tcase 'W':\n\t\t\t\t\t\t$status['p'][$i] = $data[0]['count'];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t$status['u'][$i] += $data[0]['count'];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{ // for upcoming task\t\t\t\t\n\t\t\t\tforeach($result as $data){\n\t\t\t\t\t$status['f'][$i] += $data[0]['count'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $status;\n\t}", "title": "" }, { "docid": "73594f2d1f94a4117b2cfb6a0754604e", "score": "0.59291214", "text": "public function dashboardPeriod() : JsonResponse\n {\n return response()->json([ 'period' => setting('DashboardPeriod') ]);\n }", "title": "" }, { "docid": "24c54dc51da8ec2c893307b8fa71e5f8", "score": "0.59121037", "text": "public function thisWeekJSON(){\n\t\t$mondayStartOfWeek = strtotime(\"last Monday\", strtotime(\"tomorrow\"));\n\t\t$endOfWeek = strtotime(\"next week\", $mondayStartOfWeek);\n\n\t\treturn Event::where('time', '>', date('Y-m-d H:i:s', $mondayStartOfWeek))\n\t\t\t\t\t->where('time', '<', date('Y-m-d H:i:s', $endOfWeek))\n\t\t\t\t\t->get();\n\t}", "title": "" }, { "docid": "080c6ca23213f266ee4f0b32dc36d0c8", "score": "0.5891355", "text": "public function FireStatisticalByWeekAction(){\n $fireLogic = new FireLogic($this->get('aws.dynamodb'));\n $common = new Common();\n $formatResponse = new FormatResponse();\n $valid = new UserValidateHelper();\n $date = date('Y/m/d', time());\n if(!$valid->validationDate($date)){\n return $formatResponse->createResponseRegister($common->RESULT_CODE_FAIL, $common->STATISTICAL_BY_WEEK_ERROR_REQUEST);\n }\n $response = $fireLogic->FireStatisticalbyWeek($date);\n $view = View::create();\n $view->setData($formatResponse->getResultStatistical($common->RESULT_CODE_SUCCESS, $common->STATISTICAL_BY_WEEK_SUCCESSFULLY, $response))->setStatusCode(200)->setHeader('Access-Control-Allow-Origin','*');\n return $view;\n }", "title": "" }, { "docid": "346a351be1d43ff05dc9780692d7bb8d", "score": "0.5862521", "text": "public function index()\n {\n // User Chart\n $chart = new UserChart;\n\n $today_users = User::whereDate('created_at', today())->count();\n $yesterday_users = User::whereDate('created_at', today()->subDays(1))->count();\n $users_2_days_ago = User::whereDate('created_at', today()->subDays(2))->count();\n $users_3_days_ago = User::whereDate('created_at', today()->subDays(3))->count();\n $users_4_days_ago = User::whereDate('created_at', today()->subDays(4))->count();\n $users_5_days_ago = User::whereDate('created_at', today()->subDays(5))->count();\n $users_6_days_ago = User::whereDate('created_at', today()->subDays(6))->count();\n \n $chart = new UserChart;\n $chart->labels(['6 days ago','5 days ago','4 days ago','3 days ago','2 days ago', 'Yesterday', 'Today']);\n $chart->dataset('Users Registered this week', 'bar', [$users_6_days_ago,$users_5_days_ago,$users_4_days_ago,$users_3_days_ago,$users_2_days_ago, $yesterday_users, $today_users])->options([\n \n 'backgroundColor' => [\n '#313AC4',\n '#691F59',\n '#64C5B1',\n '#3C7AA6',\n '#2577CA',\n '#A93FAA',\n '#64C5B1',\n ],\n ]);\n\n $appointment_total = Appointment::count();\n $total_users = User::count();\n $total_doctors = Doctor::count();\n return view('home', compact('chart', 'appointment_total', 'total_users', 'total_doctors'));\n }", "title": "" }, { "docid": "994b643bd3144ab109256282e83201c4", "score": "0.58605194", "text": "function advanced_statistics_get_users_data($chart_id) {\n\t$result = array(\"data\" => array(), \"options\" => array());\n\t\n\t$dbprefix = elgg_get_config(\"dbprefix\");\n\t$current_site_guid = elgg_get_site_entity()->getGUID();\n\t\n\tswitch($chart_id){\n\t\tcase \"language-distribution\":\n\t\t\t$data = array();\n\t\t\t\n\t\t\t$query = \"SELECT ue.language, count(*) AS total\";\n\t\t\t$query .= \" FROM \" . $dbprefix . \"users_entity ue\";\n\t\t\t$query .= \" JOIN \" . $dbprefix . \"entity_relationships r ON r.guid_one = ue.guid\";\n\t\t\t$query .= \" WHERE r.guid_two = \" . $current_site_guid . \" AND r.relationship = 'member_of_site'\";\n\t\t\t$query .= \" GROUP BY language\";\n\t\t\t\n\t\t\tif ($query_result = get_data($query)) {\n\t\t\t\tforeach ($query_result as $row) {\n\t\t\t\t\t$language = $row->language;\n\t\t\t\t\tif (empty($language)) {\n\t\t\t\t\t\t$language = \"unknown\";\n\t\t\t\t\t}\n\t\t\t\t\t$total = (int) $row->total;\n\t\t\t\t\t$data[] = array(elgg_echo($language) . \" [\" . $total . \"]\" , $total);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$result[\"data\"] = array($data);\n\t\t\t$result[\"options\"] = advanced_statistics_get_default_chart_options(\"pie\");\n\t\t\t\n\t\t\tbreak;\n\t\tcase \"account-creation\":\n\t\t\t$data = array();\n\t\t\t$data2 = array();\n\t\t\t\n\t\t\t$query = \"SELECT FROM_UNIXTIME(r.time_created, '%Y-%m-%d') AS date_created, count(*) AS total\";\n\t\t\t$query .= \" FROM \" . $dbprefix . \"entities e\";\n\t\t\t$query .= \" JOIN \" . $dbprefix . \"entity_relationships r ON r.guid_one = e.guid\";\n\t\t\t$query .= \" WHERE r.guid_two = \" . $current_site_guid . \" AND r.relationship = 'member_of_site'\";\n\t\t\t$query .= \" AND e.type = 'user'\";\n\t\t\t$query .= \" AND r.time_created > 0\";\n\t\t\t$query .= \" GROUP BY FROM_UNIXTIME(r.time_created, '%Y-%m-%d')\";\n\t\t\t\n\t\t\tif ($query_result = get_data($query)) {\n\t\t\t\t$total = 0;\n\t\t\t\t\n\t\t\t\tforeach ($query_result as $row) {\n\t\t\t\t\t$date_total = (int) $row->total;\n\t\t\t\t\t$total += $date_total;\n\t\t\t\t\t\n\t\t\t\t\t$data[] = array($row->date_created , $date_total);\n\t\t\t\t\t$data2[] = array($row->date_created , $total);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$result[\"data\"] = array($data, $data2);\n\t\t\t$result[\"options\"] = advanced_statistics_get_default_chart_options(\"date\");\n\t\t\t$result[\"options\"][\"series\"] = array(\n\t\t\t\tarray(\"showMarker\" => false, \"label\" => elgg_echo(\"admin:widget:new_users\")),\n\t\t\t\tarray(\"showMarker\" => false, \"label\" => elgg_echo(\"total\") . \" \" . strtolower(elgg_echo(\"item:user\")), \"yaxis\" => \"y2axis\")\n\t\t\t);\n\t\t\t$result[\"options\"][\"legend\"] = array(\"show\" => true, \"position\" => \"e\");\n\t\t\t\n\t\t\tbreak;\n\t\tcase \"most-used-domains\":\n\t\t\t$data = array();\n\t\t\t\n\t\t\t$query = \"SELECT SUBSTRING_INDEX(ue.email, '@', -1) AS domain, count(*) AS total\";\n\t\t\t$query .= \" FROM \" . $dbprefix . \"users_entity ue\";\n\t\t\t$query .= \" JOIN \" . $dbprefix . \"entity_relationships r ON r.guid_one = ue.guid\";\n\t\t\t$query .= \" WHERE r.guid_two = \" . $current_site_guid . \" AND r.relationship = 'member_of_site'\";\n\t\t\t$query .= \" GROUP BY SUBSTRING_INDEX(ue.email, '@', -1) ORDER BY total DESC LIMIT 0,10\";\n\t\t\t\n\t\t\tif ($query_result = get_data($query)) {\n\t\t\t\tforeach ($query_result as $row) {\n\t\t\t\t\t$total = (int) $row->total;\n\t\t\t\t\t$data[] = array($row->domain . \" [\" . $total . \"]\" , $total);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$result[\"data\"] = array($data);\n\t\t\t$result[\"options\"] = advanced_statistics_get_default_chart_options(\"pie\");\n\t\t\t\n\t\t\tbreak;\n\t\tcase \"account-activity\":\n\t\t\t$data = array();\n\t\t\t\n\t\t\t$query = \"SELECT FROM_UNIXTIME(e.last_action, '%Y-%m-01') AS month, count(*) AS total\";\n\t\t\t$query .= \" FROM \" . $dbprefix . \"entities e\";\n\t\t\t$query .= \" JOIN \" . $dbprefix . \"entity_relationships r ON r.guid_one = e.guid\";\n\t\t\t$query .= \" WHERE r.guid_two = \" . $current_site_guid . \" AND r.relationship = 'member_of_site'\";\n\t\t\t$query .= \" AND e.type = 'user' AND e.last_action > 0\";\n\t\t\t$query .= \" GROUP BY FROM_UNIXTIME(e.last_action, '%Y-%m')\";\n\t\t\t\n\t\t\tif ($query_result = get_data($query)) {\n\t\t\t\tforeach ($query_result as $row) {\n\t\t\t\t\t$total = (int) $row->total;\n\t\t\t\t\t$data[] = array($row->month, $total);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$result[\"data\"] = array($data);\n\t\t\t$result[\"options\"] = advanced_statistics_get_default_chart_options(\"date\");\n\t\t\t\n\t\t\tbreak;\n\t\tcase \"account-status\":\n\t\t\t$data = array();\n\t\t\t\n\t\t\t// banned users\n\t\t\t$query = \"SELECT count(*) AS total\";\n\t\t\t$query .= \" FROM \" . $dbprefix . \"entities e\";\n\t\t\t$query .= \" JOIN \" . $dbprefix . \"users_entity ue ON e.guid = ue.guid\";\n\t\t\t$query .= \" JOIN \" . $dbprefix . \"entity_relationships r ON r.guid_one = e.guid\";\n\t\t\t$query .= \" WHERE r.guid_two = \" . $current_site_guid . \" AND r.relationship = 'member_of_site'\";\n\t\t\t$query .= \" AND e.type = 'user' AND ue.banned = 'yes' AND e.enabled = 'yes'\";\n\t\t\t\n\t\t\tif ($query_result = get_data_row($query)) {\n\t\t\t\t$banned = (int) $query_result->total;\n\t\t\t\t\n\t\t\t\t$data[] = array(\"banned [\" . $banned . \"]\", $banned);\n\t\t\t}\n\t\t\t\n\t\t\t// unvalidated\n\t\t\t\n\t\t\t$validated_id = elgg_get_metastring_id('validated');\n\t\t\t$one_id = elgg_get_metastring_id('1');\n\t\t\t$unvalidated = 0;\n\t\t\t$disabled = 0;\n\t\t\t$banned = 0;\n\t\t\t\n\t\t\t$query = \"SELECT count(*) AS total\";\n\t\t\t$query .= \" FROM \" . $dbprefix . \"entities e\";\n\t\t\t$query .= \" JOIN \" . $dbprefix . \"entity_relationships r ON r.guid_one = e.guid\";\n\t\t\t$query .= \" WHERE r.guid_two = \" . $current_site_guid . \" AND r.relationship = 'member_of_site'\";\n\t\t\t$query .= \" AND e.type = 'user' AND e.enabled = 'no'\";\n\t\t\t$query .= \" AND NOT EXISTS (\n\t\t\t\t\t\tSELECT 1 FROM \" . $dbprefix . \"metadata md\n\t\t\t\t\t\tWHERE md.entity_guid = e.guid\n\t\t\t\t\t\t\tAND md.name_id = $validated_id\n\t\t\t\t\t\t\tAND md.value_id = $one_id)\";\n\t\t\t\n\t\t\tif ($query_result = get_data_row($query)) {\n\t\t\t\t$unvalidated = (int) $query_result->total;\n\t\t\t\t\t\n\t\t\t\t$data[] = array(\"unvalidated [\" . $unvalidated . \"]\", $unvalidated);\n\t\t\t}\n\t\t\t\n\t\t\t// disabled\n\t\t\t$query = \"SELECT count(*) AS total\";\n\t\t\t$query .= \" FROM \" . $dbprefix . \"entities e\";\n\t\t\t$query .= \" JOIN \" . $dbprefix . \"entity_relationships r ON r.guid_one = e.guid\";\n\t\t\t$query .= \" WHERE r.guid_two = \" . $current_site_guid . \" AND r.relationship = 'member_of_site'\";\n\t\t\t$query .= \" AND e.type = 'user' AND e.enabled = 'no'\";\n\t\t\t\n\t\t\tif ($query_result = get_data_row($query)) {\n\t\t\t\t$disabled = (int) $query_result->total;\n\t\t\t\t$disabled = $disabled - $unvalidated;\n\t\t\t\t\t\n\t\t\t\t$data[] = array(\"disabled [\" . $disabled . \"]\", $disabled);\n\t\t\t}\n\t\t\t\n\t\t\t// total\n\t\t\t$query = \"SELECT count(*) AS total\";\n\t\t\t$query .= \" FROM \" . $dbprefix . \"entities e\";\n\t\t\t$query .= \" JOIN \" . $dbprefix . \"entity_relationships r ON r.guid_one = e.guid\";\n\t\t\t$query .= \" WHERE r.guid_two = \" . $current_site_guid . \" AND r.relationship = 'member_of_site'\";\n\t\t\t$query .= \" AND e.type = 'user'\";\n\t\t\t\n\t\t\tif ($query_result = get_data_row($query)) {\n\t\t\t\t$active = (int) $query_result->total;\n\t\t\t\t$active = $active - $disabled - $unvalidated - $banned;\n\t\t\t\t\t\n\t\t\t\t$data[] = array(\"active [\" . $active . \"]\", $active);\n\t\t\t}\n\t\t\t\n\t\t\t$result[\"data\"] = array($data);\n\t\t\t$result[\"options\"] = advanced_statistics_get_default_chart_options(\"pie\");\n\t\t\t\n\t\t\tbreak;\n\t\tcase \"profile-field-usage\":\n\t\t\t$data = array();\n\t\t\t$ticks = array();\n\t\t\t\n\t\t\tif ($profile_fields = elgg_get_config(\"profile_fields\")) {\n\t\t\t\t$total_users_count = 0;\n\t\t\t\t$empty_id = elgg_get_metastring_id(\"\");\n\t\t\t\t\n\t\t\t\t// total for this field\n\t\t\t\t$query = \"SELECT count(*) AS total\";\n\t\t\t\t$query .= \" FROM \" . $dbprefix . \"entities e\";\n\t\t\t\t$query .= \" JOIN \" . $dbprefix . \"entity_relationships r ON r.guid_one = e.guid\";\n\t\t\t\t$query .= \" WHERE r.guid_two = \" . $current_site_guid . \" AND r.relationship = 'member_of_site'\";\n\t\t\t\t$query .= \" AND e.type = 'user'\";\n\t\t\t\t\t\n\t\t\t\tif ($query_result = get_data_row($query)) {\n\t\t\t\t\t$total_users_count = (int) $query_result->total;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach ($profile_fields as $field_name => $type) {\n\t\t\t\t\t$name_id = elgg_get_metastring_id($field_name);\n\t\t\t\t\t\n\t\t\t\t\t// total for this field\n\t\t\t\t\t$query = \"SELECT count(distinct e.guid) AS total\";\n\t\t\t\t\t$query .= \" FROM \" . $dbprefix . \"entities e\";\n\t\t\t\t\t$query .= \" JOIN \" . $dbprefix . \"entity_relationships r ON r.guid_one = e.guid\";\n\t\t\t\t\t$query .= \" JOIN \" . $dbprefix . \"metadata md ON e.guid = md.entity_guid\";\n\t\t\t\t\t$query .= \" WHERE r.guid_two = \" . $current_site_guid . \" AND r.relationship = 'member_of_site'\";\n\t\t\t\t\t$query .= \" AND e.type = 'user'\";\n\t\t\t\t\t$query .= \" AND md.name_id = '\" . $name_id . \"'\";\n\t\t\t\t\t$query .= \" AND md.value_id <> \" . $empty_id;\n\t\t\t\t\t\t\n\t\t\t\t\tif ($query_result = get_data_row($query)) {\n\t\t\t\t\t\t$total = (int) $query_result->total;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$ticks[] = elgg_get_excerpt(elgg_echo(\"profile:\" . $field_name), 25);\n\t\t\t\t\t\t$data[] = round(($total * 100) / $total_users_count);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$result[\"data\"] = array($data);\n\t\t\t\n\t\t\t$options = advanced_statistics_get_default_chart_options(\"bar\");\n\t\t\t$options[\"axes\"][\"xaxis\"][\"ticks\"] = $ticks;\n\t\t\t$options[\"axes\"][\"xaxis\"][\"tickRenderer\"] = \"$.jqplot.CanvasAxisTickRenderer\";\n\t\t\t$options[\"axes\"][\"xaxis\"][\"tickOptions\"] = array(\"angle\" => \"-30\", \"fontSize\" => \"8pt\");\n\t\t\t$options[\"axes\"][\"yaxis\"] = array(\"tickOptions\" => array(\"formatString\" => \"%d%\"));\n\t\t\t\t\n\t\t\t$result[\"options\"] = $options;\n\t\t\t\n\t\t\tbreak;\n\t\tcase \"popular\":\n\t\t\t$data = array();\n\t\t\t$ticks = array();\n\t\t\t\n\t\t\t$query = \"SELECT ue.name, count(*) AS total\";\n\t\t\t$query .= \" FROM \" . $dbprefix . \"users_entity ue\";\n\t\t\t$query .= \" JOIN \" . $dbprefix . \"entity_relationships r ON ue.guid = r.guid_one\";\n\t\t\t$query .= \" JOIN \" . $dbprefix . \"entity_relationships r2 ON ue.guid = r2.guid_one\";\n\t\t\t$query .= \" JOIN \" . $dbprefix . \"entities e ON ue.guid = e.guid\";\n\t\t\t$query .= \" WHERE r.relationship = 'friend'\";\n\t\t\t$query .= \" AND r2.relationship = 'member_of_site' AND r2.guid_two = \" . $current_site_guid;\n\t\t\t$query .= \" AND e.enabled = 'yes' AND ue.banned = 'no'\";\n\t\t\t$query .= \" GROUP BY ue.name\";\n\t\t\t$query .= \" ORDER BY total desc\";\n\t\t\t$query .= \" LIMIT 0, 10\";\n\t\t\t\n\t\t\tif ($query_result = get_data($query)) {\n\t\t\t\tforeach ($query_result as $row) {\n\t\t\t\t\t$data[] = (int) $row->total;\n\t\t\t\t\t$ticks[] = elgg_get_excerpt($row->name, 25);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$result[\"data\"] = array($data);\n\t\t\t\n\t\t\t$options = advanced_statistics_get_default_chart_options(\"bar\");\n\t\t\t$options[\"axes\"][\"xaxis\"][\"ticks\"] = $ticks;\n\t\t\t$options[\"axes\"][\"xaxis\"][\"tickRenderer\"] = \"$.jqplot.CanvasAxisTickRenderer\";\n\t\t\t$options[\"axes\"][\"xaxis\"][\"tickOptions\"] = array(\"angle\" => \"-70\", \"fontSize\" => \"8pt\");\n\t\t\t\n\t\t\t$result[\"options\"] = $options;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$params = array(\n\t\t\t\t\"chart_id\" => $chart_id,\n\t\t\t\t\"default_result\" => $result\n\t\t\t);\n\t\t\t\n\t\t\t$result = elgg_trigger_plugin_hook(\"users\", \"advanced_statistics\", $params, $result);\n\t\t\tbreak;\n\t}\n\t\n\treturn json_encode($result);\n}", "title": "" }, { "docid": "6330038768c8a0f3f8ef8df5d9c7eebb", "score": "0.58074784", "text": "public function getDietChart() {\n\t\t$result = $this->diet_model->getDietChartDetails(); \n\t\t$this->output->set_content_type('application/json')->set_output(json_encode($result));\n\t}", "title": "" }, { "docid": "c1fa128ea7036dbe787dc91f5661fb83", "score": "0.57790434", "text": "public function chartPage()\n {\n // $securityLogs = Security::all();\n // $enrollmentData = Enrollment::all();\n // $clubRecruitmentData = ClubRecruitment::all();\n $natality = Natality::all();\n $populationByBorough = PopulationByBorough::all();\n $populationByCommunityDistricts = PopulationByCommunityDistricts::all();\n $waterConsumption = WaterConsumption::all();\n $juvenileInvestigation = JuvenileInvestigation::all();\n $juvenileIntakes = JuvenileIntakes::all();\n $actualRevenues = ActualRevenues::all();\n $data = [];\n\n // $data['securityLogs'] = $securityLogs;\n // $data['enrollmentData'] = $enrollmentData;\n // $data['clubRecruitmentData'] = $clubRecruitmentData;\n $data['populationByBorough'] = $populationByBorough;\n $data['populationByCommunityDistricts'] = $populationByCommunityDistricts;\n $data['waterConsumption'] = $waterConsumption;\n $data['natality'] = $natality;\n $data['juvenileInvestigation'] = $juvenileInvestigation;\n $data['juvenileIntakes'] = $juvenileIntakes;\n $data['actualRevenues'] = $actualRevenues;\n\n return view('/chart',$data);\n }", "title": "" }, { "docid": "6e00b0c9b20bec2ad9b4ad273926ba6d", "score": "0.57201415", "text": "public function index()\n {\n return response()->json(['Gantt Chart']);\n }", "title": "" }, { "docid": "352b7f93dcf10646256d5314096347f1", "score": "0.570943", "text": "public function getDetailOverviewUpCommingLive(){\n $this->layout = 'ajax';\n $authUser = $this->Auth->user();\n $CustomerID = $authUser['customerId'];\n $data = $this->Account->getLiveGameInNextXXhours(array(\"CustomerID\" => $CustomerID, \"time\" => 24, 'appid' => 'pregamesite', 'userid' => $CustomerID));\n $this->set('data', $data);\n $this->render('json'); \n }", "title": "" }, { "docid": "eb300a039bb50bb44d19bb57fbdb47ff", "score": "0.5700029", "text": "public function index()\n {\n function errmsg($err){\n Session::flash('flash_message',$err);\n Session::flash('alertType',0);\n }\n if (!empty(Auth::user()->OAuth)) {\n $listid = \\App\\lists::select('id')->whereUser_id(Auth::user()->id)->get()->toArray();\n\n if(empty($listid)){\n errmsg('Please create list first!');\n return redirect('subscribers');\n }\n \n $charts = collect();\n \n $activity_data = \\App\\activity::select(\\DB::raw('TIME_TO_SEC(TIMEDIFF(open,sent)) AS time'),'email_id','camp_id','open')->wherein('list_id',$listid)->orderBy('open')->\n get();\n \n\n\n $charts['least5'] = collect();\n $charts['line'] = collect();\n $charts['line']->total = $activity_data->count();\n foreach($activity_data as $key => $value){\n \n if ($value->time === null){\n $charts['least5']->push($activity_data[$key]);\n unset($activity_data[$key]);}\n }\n \n $charts['line'] = $activity_data->map(function($value){\n\n $value->month = getdate(strtotime($value->open))['month'];\n\n return $value;\n })->groupBy('month')->map(function($value)use($charts){\n return round(($value->count()/$charts['line']->total)*100,2);\n });\n // dd($charts['line']);\n \n \n $charts['least5'] = $charts['least5']->groupBy('email_id')->map(function($value){\n return $value->count('email_id');\n });\n\n // dd($charts['least5']);\n $activity_data = $activity_data->values()->groupBy('email_id');\n // dd($activity_data->values()->toArray());\n $charts['top5'] = collect(); \n $subref = $activity_data->map(function($value,$key) use(&$charts){\n\n $value->put('count',$value->count()); \n $value->put('time',$value->sum('time'));\n $value->put('email',$key);\n \n\n\n // $value->put('campaign',$value->count('camp_id'));\n for($i = 0;$i < $value['count'];$i++)\n unset($value[$i]);\n \n $charts['top5']->put($key,$value->toArray());\n // dd($charts['top5'][$key],$charts['top5'][$key]['count']);\n if(isset($charts['least5'][$key])){\n $value['count'] = $value['count'] - $charts['least5'][$key];\n if($value['count'] < 1){\n $charts['least5'][$key] = $value['count'] * -1;\n unset($charts['top5'][$key]);\n }else{\n $charts['top5'][$key]['count'] = $value['count'];\n }\n }\n return $value;\n\n });\n // dd();\n if(empty($subref->count())){\n errmsg('No associated data found, Please make sure that the campaigns still exist at your Mailchimp account');\n return redirect('campaign');\n }\n\n $charts['least5'] = $charts['least5']->sort()->reverse()->keys();\n function _orderSort($var){\n $var = $var->sortByDesc('count')->groupBy('count')->map(function($value){\n $value = $value->sortBy('time');\n return $value;\n })->flatten()->filter(function ($value, $key) {\n if(!is_numeric($value))\n return $value;\n })->values()->toArray();\n\n return $var;\n }\n \n $charts['top5'] = _orderSort($charts['top5']);\n\n $subref = _orderSort($subref);\n \n // $charts['top5'] = $charts['top5']\n\n $charts['gender'] = \\App\\subscribers::select(\\DB::raw('gender'))\n ->wherein('email',$subref)\n ->get();\n\n $charts->put('gender',$charts['gender'] //get and pipe data to extract gender\n ->pipe(function($values){\n\n $var['male'] = 0;\n $var['female'] = 0;\n if($values->count()!=0){\n $var['total'] = $values->count();\n }else{\n $var['total']=1;\n }\n // dd($values->gender);\n foreach($values as $item){\n \n if (strtolower($item->gender) === 'male')\n $var['male'] += 1;\n if (strtolower($item->gender) === 'female')\n $var['female'] += 1;\n }\n \n return $var;\n\n }));\n $tmp = $charts['gender'];\n unset($tmp['total']);\n arsort($tmp);\n $tmp = array_keys($tmp);\n $charts->tmp = $tmp;\n\n $charts['countries'] = \\App\\subscribers::select(\\DB::raw('country, COUNT( * ) AS count'))\n ->wherein('email',$subref)\n ->groupBy('country')\n ->orderBy('count', 'desc')\n ->orderByRaw(\"FIELD(email,'\".implode(\"','\",$subref).\"')\")->take(5)->get();\n\n $charts['state'] = \\App\\subscribers::select(\\DB::raw('state, COUNT( * ) AS count'))\n ->wherein('email',$subref)\n ->groupBy('state')\n ->orderBy('count', 'desc')\n ->orderByRaw(\"FIELD(email,'\".implode(\"','\",$subref).\"')\")->take(5)->get();\n\n $charts['city'] = \\App\\subscribers::select(\\DB::raw('city, COUNT( * ) AS count'))\n ->wherein('email',$subref)\n ->groupBy('city')\n ->orderBy('count', 'desc')\n ->orderByRaw(\"FIELD(email,'\".implode(\"','\",$subref).\"')\")->take(5)->get(); \n\n $charts['age'] = \\App\\subscribers::select(\\DB::raw('age, COUNT( * ) AS count'))\n ->wherein('email',$subref)\n ->groupBy('age')\n ->orderBy('count', 'desc')\n ->orderByRaw(\"FIELD(email,'\".implode(\"','\",$subref).\"')\")->take(5)->get();\n \n \n $charts['campaign'] = \\App\\campaigns::select('name','activity.camp_id',\\DB::raw('count(*) as count'))\n ->join('activity','activity.camp_id', '=', 'campaigns.id')\n ->where('activity.open','<>','null')\n ->where('campaigns.list_id','=',$listid)\n ->groupBy('camp_id')\n ->orderBy('count','desc')->get();\n \n // dd(implode(collect($charts['top5'])->take(-1)->values()->toArray()));\n if((sizeof($charts['top5'])-5)>0){\n collect($charts['top5'])->take(5-sizeof($charts['top5']))->each(function($values) use(&$charts){\n $charts['least5']->push($values);\n });\n }\n\n \n $charts['top5'] = \\App\\subscribers::select(\\DB::raw('CONCAT(fname,\" \",mname,\" \",lname) as name'))\n ->wherein('email',$charts['top5'])\n ->orderByRaw(\"FIELD(email,'\".implode(\"','\",$charts['top5']).\"')\")->take(5)->get();\n\n $charts['least5'] = \\App\\subscribers::select('age','city','state',\\DB::raw('CONCAT(fname,\" \",mname,\" \",lname) as name'))\n ->wherein('email',$charts['least5'])\n ->orderByRaw(\"FIELD(email,'\".implode(\"','\",$charts['least5']->toArray()).\"')\")->take(5)->get();\n \n function jose($var,$param){\n return $param->groupBy($var)->map(function($value,$key)use(&$param){\n $value->put('count',$value->count());\n unset($value[0]);\n return $value;\n })->sortByDesc('count')->take(1)->keys();}\n\n $charts['least'] = [jose('age',$charts['least5']),jose('city',$charts['least5']),jose('state',$charts['least5'])];\n // dd($charts->toArray());\n return view('dashboard',['charts' => $charts]);\n }else{\n return redirect('connections');\n }\n }", "title": "" }, { "docid": "804f82d35e3f44f57cad166d5636973f", "score": "0.5696922", "text": "public function infografisuser()\n\t{\n auth_redirect();\n\n $current_user = smit_get_current_user();\n $is_admin = as_administrator($current_user);\n\n $headstyles = smit_headstyles(array(\n // Default CSS Plugin\n BE_PLUGIN_PATH . 'node-waves/waves.css',\n BE_PLUGIN_PATH . 'animate-css/animate.css',\n // Morris Chart CSS Plugin\n BE_PLUGIN_PATH . 'morrisjs/morris.css',\n ));\n\n $loadscripts = smit_scripts(array(\n // Default JS Plugin\n BE_PLUGIN_PATH . 'node-waves/waves.js',\n BE_PLUGIN_PATH . 'jquery-slimscroll/jquery.slimscroll.js',\n // Moment JS Plugin\n BE_PLUGIN_PATH . 'momentjs/moment.js',\n // Morrist Chart JS Plugin\n BE_PLUGIN_PATH . 'raphael/raphael.min.js',\n BE_PLUGIN_PATH . 'morrisjs/morris.js',\n // Always placed at bottom\n BE_JS_PATH . 'admin.js',\n // Put script based on current page\n ));\n\n $scripts_add = '';\n $scripts_init = smit_scripts_init(array(\n 'Charts.init();'\n ));\n\n $data['title'] = TITLE . 'Info Grafis Pengguna';\n $data['user'] = $current_user;\n $data['is_admin'] = $is_admin;\n $data['headstyles'] = $headstyles;\n $data['scripts'] = $loadscripts;\n $data['scripts_add'] = $scripts_add;\n $data['scripts_init'] = $scripts_init;\n $data['main_content'] = 'infografis/user';\n\n $chart = array();\n $stats = '';\n if ( $stats = $this->Model_User->stats_monthly() ) {\n // Pivoting\n\t\t\t$pivot = array();\n\t\t\tforeach( $stats as $row ) {\n if ( $row->type == 2 ) { $type = 'pendamping'; }\n elseif ( $row->type == 3 ) { $type = 'tenant'; }\n elseif ( $row->type == 4 ) { $type = 'juri'; }\n elseif ( $row->type == 5 ) { $type = 'pengusul'; }\n elseif ( $row->type == 6 ) { $type = 'pelaksana'; }\n elseif ( $row->type == 7 ) { $type = 'pelaksana_tenant'; }\n\n\t\t\t\tif ( ! isset( $pivot[ $row->period ] ) )\n\t\t\t\t\t$pivot[ $row->period ] = array();\n\n\t\t\t\tif ( ! isset( $pivot[ $row->period ][ 'total' ] ) )\n\t\t\t\t\t$pivot[ $row->period ][ 'total' ] = 0;\n\n\t\t\t\t$pivot[ $row->period ][ 'period_name' ] = $row->period_name;\n\t\t\t\t$pivot[ $row->period ][ 'total' ] += $row->total;\n\t\t\t\t$pivot[ $row->period ][ $type ] = $row->total;\n\t\t\t}\n\n $chart['xkey'] = 'period';\n $chart['ykeys'] = array( 'pendamping', 'tenant', 'juri', 'pengusul', 'pelaksana', 'pelaksana_tenant' );\n $chart['labels'] = array( 'Pendamping', 'Tenant', 'Juri', 'Pengusul', 'Pelaksana', 'Pelaksana & Tenant' );\n\n foreach( $pivot as $period => $row ) {\n // chart\n\t\t\t\t$chart['data'][] = array(\n 'period' => $period,\n 'pendamping' => smit_isset( $row[ 'pendamping' ], 0 ),\n 'tenant' => smit_isset( $row[ 'tenant' ], 0 ),\n 'juri' => smit_isset( $row[ 'juri' ], 0 ),\n 'pengusul' => smit_isset( $row[ 'pengusul' ], 0 ),\n 'pelaksana' => smit_isset( $row[ 'pelaksana' ], 0 ),\n 'pelaksana_tenant' => smit_isset( $row[ 'pelaksana_tenant' ], 0 ),\n 'total' => $row['total']\n\t\t\t\t);\n }\n }\n\n $chart_year = array();\n $stats_yearly = '';\n if ( $stats_yearly = $this->Model_User->stats_yearly() ) {\n // Pivoting\n\t\t\t$pivot_yearly = array();\n\t\t\tforeach( $stats_yearly as $row ) {\n if ( $row->type == 2 ) { $type = 'pendamping'; }\n elseif ( $row->type == 3 ) { $type = 'tenant'; }\n elseif ( $row->type == 4 ) { $type = 'juri'; }\n elseif ( $row->type == 5 ) { $type = 'pengusul'; }\n elseif ( $row->type == 6 ) { $type = 'pelaksana'; }\n elseif ( $row->type == 7 ) { $type = 'pelaksana_tenant'; }\n\n\t\t\t\tif ( ! isset( $pivot_yearly[ $row->period ] ) )\n\t\t\t\t\t$pivot_yearly[ $row->period ] = array();\n\n\t\t\t\tif ( ! isset( $pivot_yearly[ $row->period ][ 'total' ] ) )\n\t\t\t\t\t$pivot_yearly[ $row->period ][ 'total' ] = 0;\n\n\t\t\t\t$pivot_yearly[ $row->period ][ 'total' ] += $row->total;\n\t\t\t\t$pivot_yearly[ $row->period ][ $type ] = $row->total;\n\t\t\t}\n\n $chart_year['xkey'] = 'period';\n $chart_year['ykeys'] = array( 'pendamping', 'tenant', 'juri', 'pengusul', 'pelaksana', 'pelaksana_tenant' );\n $chart_year['labels'] = array( 'Pendamping', 'Tenant', 'Juri', 'Pengusul', 'Pelaksana', 'Pelaksana & Tenant' );\n\n foreach( $pivot_yearly as $period => $row ) {\n // chart\n\t\t\t\t$chart_year['data'][] = array(\n 'period' => $period,\n 'pendamping' => smit_isset( $row[ 'pendamping' ], 0 ),\n 'tenant' => smit_isset( $row[ 'tenant' ], 0 ),\n 'juri' => smit_isset( $row[ 'juri' ], 0 ),\n 'pengusul' => smit_isset( $row[ 'pengusul' ], 0 ),\n 'pelaksana' => smit_isset( $row[ 'pelaksana' ], 0 ),\n 'pelaksana_tenant' => smit_isset( $row[ 'pelaksana_tenant' ], 0 ),\n 'total' => $row['total']\n\t\t\t\t);\n }\n }\n\n $data['chart']\t\t\t= json_encode( $chart );\n $data['chart_year']\t = json_encode( $chart_year );\n $data['stats']\t = $stats;\n $data['stats_yearly']\t= $stats_yearly;\n\n $this->load->view(VIEW_BACK . 'template', $data);\n\t}", "title": "" }, { "docid": "7044468dcaab69cb8d9073bceb381234", "score": "0.5690495", "text": "public function conversionProbabilityChart()\n {\n // echo \"string\";die;\n $chartData = $this->enquiry_model->conversionProbabilityChart($this->session->user_id,$this->session->companey_id);\n //print_r($chartData);die;\n if(!empty($chartData))\n {\n echo json_encode(array('data'=>$chartData,'status'=>'success'));\n }\n else\n {\n echo json_encode(array('status'=>'fail'));\n }\n }", "title": "" }, { "docid": "7cb370af5ec6e23157191713ba7ecab9", "score": "0.5688959", "text": "public function getStats(){\n $date = Carbon::now()->subMonths(2);\n $viewsByDay = Stats::viewsByDay($date)->get();\n $advertsByDay = Stats::advertsByDay($date)->get();\n $costsByDay = Stats::costsByDay($date)->get();\n\n $csvLogs=[];\n\n //schedule log\n $csvLogs['schedule'] = $this->getLogs(LogsUtils::$LOG_SCHEDULE);\n\n //stops log\n $csvLogs['stops'] = $this->getLogs(LogsUtils::$LOG_STOPS);\n\n //notifications log\n $csvLogs['notifications'] = $this->getLogs(LogsUtils::$LOG_NOTIFICATIONS);\n\n //sitemaps log\n $csvLogs['sitemaps'] = $this->getLogs(LogsUtils::$LOG_SITEMAP);\n\n //geoIpUpdate log\n $csvLogs['geoIpUpdate'] = $this->getLogs(LogsUtils::$LOG_GEOIPUPDATE);\n\n return response()->json([\n 'viewsByDay' => $viewsByDay->toArray(),\n 'advertsByDay' => $advertsByDay->toArray(),\n 'costsByDay' => $costsByDay->toArray(),\n 'logs' => $csvLogs\n ]);\n }", "title": "" }, { "docid": "795d75c468f6bda12f8f5fe145289b4b", "score": "0.5667962", "text": "public function weekly($id_weeks){\n $where = array(\n \"id_user_add\" => $this->input->post(\"user\"),\n \"status_aktif_report\" => 0,\n \"id_week\" => $id_weeks\n );\n $field = array(\n \"id_report\",\"tipe_report\",\"pic_target\",\"location\",\"progress_percentage\",\"report\",\"tgl_report\",\"judul_report\",\"attachment\",\"support_need\",\"next_plan\",\"nama_user\",\"week_name\"\n );\n $result = selectRow(\"detail_kpi_user\",$where,$field);\n $data[\"report\"] = $result->result_array();\n \n $data[\"detail\"][\"nama_user\"] = get1Value(\"user\",\"nama_user\",array(\"id_user\" => $this->input->post(\"user\")));\n $data[\"detail\"][\"week_name\"] = \"Week \".$id_weeks;\n $data[\"detail\"][\"id_week\"] = $id_weeks;\n $where = array(\n \"id_user\" => $this->input->post(\"user\"),\n \"status_aktif_kpi\" => 0,\n \"target_kpi >\" => 0\n );\n $field = array(\n \"kpi\",\"target_kpi\",\"id_kpi_user\"\n );\n $result = selectRow(\"kpi_user\",$where,$field);\n $data[\"kpi_user\"] = $result->result_array();\n \n $this->req();\n $this->load->view(\"report/content-open\");\n $this->load->view(\"report/kpi/category-header\");\n $this->load->view(\"report/kpi/weekly-report\",$data);\n $this->load->view(\"report/content-close\");\n $this->close();\n \n $week = $id_weeks;\n $data[\"kpi_graph\"] = array();\n for($a = 0; $a<5; $a++){ /*week 5*/\n for($kpi = 0; $kpi<count($data[\"kpi_user\"]); $kpi++){\n $where = array(\n \"id_weeks\" => $week,\n \"id_user_add\" => $this->input->post(\"user\"),\n \"tipe_report\" => $data[\"kpi_user\"][$kpi][\"id_kpi_user\"],\n \"tahun\" => date(\"Y\")\n ); \n $data[\"kpi_graph\"][$a][$kpi][\"report\"] = getAmount(\"detail_kpi_user\",\"id_report\",$where); /*week 5, kpi1; week5, kpi2*/\n }\n $data[\"week\"][$a] = $week;\n $week--;\n if($week == 0){\n break;\n }\n }\n\n $this->load->view(\"report/kpi/js/chart-js\",$data);\n }", "title": "" }, { "docid": "094e8315b14e31df192d3a5753ca49ab", "score": "0.5658", "text": "public function _show_charts() {\n\t if (!empty($this->objcall)) { \n\t\t \n \t\t foreach ($this->objcall as $report=>$goto) {//goto not used in this case\n $title = localize(\"_$report\",getlocal()); //title\t\t\t\t\t\t\t \t \n\t\t\t\t$ts = '\n\t\t\t\t\t<!-- BEGIN CHART PORTLET-->\n <div class=\"widget \">\n <div class=\"widget-title\">\n <h4><i class=\"icon-reorder\"></i> '.$title.'</h4>\n <span class=\"tools\">\n <a href=\"javascript:;\" class=\"icon-chevron-down\"></a>\n <a href=\"javascript:;\" class=\"icon-remove\"></a>\n </span>\n </div>\n <div class=\"widget-body\">\n <div class=\"text-center\">\n <div id=\"'.$report.'\"></div>\n </div>\n </div>\n </div>\n <!-- END CHART PORTLET-->\n';\t\t\n\t\t\t}\n\t\t}\n\t\treturn ($ts);//stats);\t\t \n }", "title": "" }, { "docid": "b69944d94093021a87a81104202749c0", "score": "0.5636169", "text": "public function heating_piechart() {\n\t\t\t//and use the same function to handle both heating and electricity.\n\t\t\t//define client side scripts to put in header and set title\n\t\t\t$this->set('title_for_layout', 'Heating Piechart');\n\t\t\t$this->set('cssIncludes', array());\n\t\t\t$this->set('jsIncludes', array('http://cdnjs.cloudflare.com/ajax/libs/d3/2.10.0/d3.v2.min.js', 'nv.d3'));\n\n\t\t\t$this->loadModel('Data');\n\n\t\t\t//find all heating sensors the user can access\n\t\t\t$opts = array('conditions' => array('Sensor.type' => 'heating'));\n\t\t\t$sensors = $this->Sensor->find('all', $opts);\n\t\t\t$sensors_values = array();\n\t\t\t$count = 0;\n\n\t\t\t//should create php object and then push all at once -- this method is sketch\n\t\t\techo '<script> window.feeds = [];</script>';\n\t\t\tforeach ($sensors as $sensor) {\n\t\t\t\tif ($this->contractExists($sensor['Sensor']['room_id'], $this->Auth->user('id'))) {\n\t\t\t\t\t$count++;\n\t\t\t\t\t$sensor_values = array();\n\t\t\t\t\t$data = $sensor['Data'];\n\t\t\t\t\tforeach ($data as $datum) {\n\t\t\t\t\t\tarray_push($sensor_values, $datum['value']);\n\t\t\t\t\t}\n\t\t\t\t\t$final = array('name' => $sensor['Sensor']['name'], 'values' => $sensor_values);\n\t\t\t\t\techo '<script> window.feeds.push(' . json_encode($final) . ');</script>';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "ff1f6420c4fffee68530fef2bd0273ad", "score": "0.5624949", "text": "public function actionGetRefferalChartData() {\r\n $loggedInUserId = Yii::app()->session['userid'];\r\n $monthArray = array(1,2,3,4,5);\r\n $currentYear = date('Y');\r\n $currentMonth = date('m');\r\n $toDay = date('01');\r\n $fromDay = date('31');\r\n \r\n $userObject = User::model()->findByPK(array('id' => $loggedInUserId));\r\n $userRefferalDetails = User::model()->findAllByAttributes(array('sponsor_id' => $userObject->name));\r\n $refferalIds = array();\r\n $type['base'] = 0;\r\n $type['advance'] = 0;\r\n $type['pro'] = 0;\r\n $myResultArray = array();\r\n if (isset($userRefferalDetails) && !empty($userRefferalDetails)) {\r\n $basePackageArray = array(1,2,3);\r\n $advPackageArray = array(4,5,6);\r\n $proPackageArray = array(7,8,9);\r\n foreach ($userRefferalDetails as $Object) { \r\n for ($x = 1; $x <= 6; $x++) { \r\n $myDate = strtotime(date(\"d/m/Y\", strtotime($currentMonth)) . \"+\".$x.\" months\");\r\n $myMonth = date(\"m\",$myDate); \r\n $toDate = $currentYear.\"-\".$myMonth.\"-\".$toDay;\r\n $fromDate = $currentYear.\"-\".$myMonth.\"-\".$fromDay;\r\n\r\n $attribs = array('user_id'=>$Object->id ,'status'=>'1');\r\n $criteria = new CDbCriteria(array('order'=>'start_date DESC','limit'=>1));\r\n $criteria->addBetweenCondition('start_date', $toDate, $fromDate);\r\n $orderObject = Order::model()->findAllByAttributes($attribs, $criteria);\r\n\r\n if(count($orderObject)>0) { \r\n $orderObject = $orderObject[0];\r\n if(in_array($orderObject->package()->type, $basePackageArray)){\r\n $type['base']++;\r\n }\r\n if(in_array($orderObject->package()->type, $advPackageArray)){\r\n $type['advance']++;\r\n }\r\n if(in_array($orderObject->package()->type, $proPackageArray)){\r\n $type['pro']++;\r\n }\r\n } else {\r\n continue;\r\n }\r\n $myDataArray['month'] = $myMonth;\r\n $myDataArray['type'] = $type;\r\n array_push($myResultArray, $myDataArray);\r\n }\r\n \r\n }\r\n\r\n }\r\n// echo 1;exit;\r\n echo CJSON::encode($myResultArray);exit;\r\n }", "title": "" }, { "docid": "50403686f2ff348d433d291e169facf4", "score": "0.5621963", "text": "public function index()\n {\n $req = ModelsRequest::orderBy('created_at')\n ->get()\n ->groupBy(function ($data) {\n return $data->created_at->format('Y-m-d');\n });\n\n $label = [];\n $sdata = [];\n $cl = [];\n $pending = [];\n $open = [];\n $processing = [];\n $close = [];\n foreach ($req as $key => $value) {\n $label[] = $key;\n $sdata[] = count($value);\n $cl[] = $value->countBy('status');\n\n foreach ($cl as $v) {\n $pending[] = $v->all()[1] ?? 0;\n $open[] = $v->all()[2] ?? 0;\n $processing[] = $v->all()[3] ?? 0;\n $close[] = $v->all()[4] ?? 0;\n }\n }\n $statuses = [\n 'Pending' => $pending,\n 'open' => $open,\n 'processing' => $processing,\n 'close' => $close,\n ];\n\n $status = [];\n foreach ($statuses as $key => $value) {\n $status[] = [\n \"name\" => \"$key\",\n \"values\" => $value\n ];\n }\n\n $data = [\n \"chart\" => [\"labels\" => $label],\n \"datasets\" => $status\n ];\n\n $data = json_encode($data);\n\n return view('user.dashboard.index', [\n \"data\" => $data\n ]);\n }", "title": "" }, { "docid": "bb75b9178f3ce687ddd7098bcf9d7348", "score": "0.5618191", "text": "public function infografispraincubation()\n\t{\n auth_redirect();\n\n $current_user = smit_get_current_user();\n $is_admin = as_administrator($current_user);\n\n $headstyles = smit_headstyles(array(\n // Default CSS Plugin\n BE_PLUGIN_PATH . 'node-waves/waves.css',\n BE_PLUGIN_PATH . 'animate-css/animate.css',\n // Morris Chart CSS Plugin\n BE_PLUGIN_PATH . 'morrisjs/morris.css',\n ));\n\n $loadscripts = smit_scripts(array(\n // Default JS Plugin\n BE_PLUGIN_PATH . 'node-waves/waves.js',\n BE_PLUGIN_PATH . 'jquery-slimscroll/jquery.slimscroll.js',\n \n // Morrist Chart JS Plugin\n BE_PLUGIN_PATH . 'raphael/raphael.min.js',\n BE_PLUGIN_PATH . 'morrisjs/morris.js',\n // Always placed at bottom\n BE_JS_PATH . 'admin.js',\n // Put script based on current page\n ));\n\n $scripts_add = '';\n $scripts_init = smit_scripts_init(array(\n 'Charts.init();'\n ));\n\n $data['title'] = TITLE . 'Info Grafis Pra-Inkubasi';\n $data['user'] = $current_user;\n $data['is_admin'] = $is_admin;\n $data['headstyles'] = $headstyles;\n $data['scripts'] = $loadscripts;\n $data['scripts_add'] = $scripts_add;\n $data['scripts_init'] = $scripts_init;\n $data['main_content'] = 'infografis/praincubation';\n\n $chart = array();\n $stats = '';\n if ( $stats = $this->Model_Praincubation->stats_yearly() ) {\n // Pivoting\n\t\t\t$pivot_yearly = array();\n\t\t\tforeach( $stats as $row ) {\n $category = $row->category;\n\n\t\t\t\tif ( ! isset( $pivot_yearly[ $row->period ] ) )\n\t\t\t\t\t$pivot_yearly[ $row->period ] = array();\n\n\t\t\t\tif ( ! isset( $pivot_yearly[ $row->period ][ 'total' ] ) )\n\t\t\t\t\t$pivot_yearly[ $row->period ][ 'total' ] = 0;\n\n\t\t\t\t$pivot_yearly[ $row->period ][ 'total' ] += $row->total;\n\t\t\t\t$pivot_yearly[ $row->period ][ $category ] = $row->total;\n\t\t\t}\n \n $slug_arr = smit_category_slug();\n $name_arr = smit_category_name();\n\n $chart['xkey'] = 'period';\n $chart['ykeys'] = $slug_arr;\n $chart['labels'] = $name_arr;\n\n foreach( $pivot_yearly as $period => $row ) {\n $chart_arr = array('period' => $period);\n foreach($slug_arr as $slug){\n $chart_arr[$slug] = smit_isset( $row[ $slug ], 0 );\n }\n $chart_arr['total'] = $row['total'];\n\n // chart\n\t\t\t\t$chart['data'][] = $chart_arr;\n }\n }\n $data['chart']\t\t\t= json_encode( $chart );\n $data['stats']\t\t\t= $stats;\n\n $this->load->view(VIEW_BACK . 'template', $data);\n\t}", "title": "" }, { "docid": "7a4c27f855a0b7143892e443e53ca4d9", "score": "0.5614742", "text": "private function _getStatistics()\n {\n $sectionId = $this->getSettings()->section;\n $section = craft()->sections->getSectionById($sectionId)->handle;\n\n $criteria = craft()->elements->getCriteria(ElementType::Entry);\n $criteria->section = $section;\n $criteria->limit = null;\n $firstItem = $criteria->first();\n\n $allData = [];\n if ($this->getSettings()->graph) {\n //Limit the graph to start at 1st of prev month\n $lastMonthStart = date('Y-m-d', strtotime(\"first day of last month\"));\n $lastMonthStartDateWhere = ' >= ' . DateTime::createFromString($lastMonthStart, craft()->timezone)->format(DateTime::MYSQL_DATETIME);\n $criteria->postDate = $lastMonthStartDateWhere;\n foreach ($criteria as $entry) {\n if (!isset($allData[$entry->postDate->format('Y-m-d')])) {\n $allData[(string)$entry->postDate->format('Y-m-d')] = 1;\n } else {\n $allData[(string)$entry->postDate->format('Y-m-d')]++;\n }\n }\n }\n\n //Make sure we're in the local timezone! Save the old one first so we can set it back after\n $previousTimezone = date_default_timezone_get();\n date_default_timezone_set(craft()->timezone);\n\n // Today Count\n $today = date('Y-m-d');\n $tomorrow = date('Y-m-d', strtotime(\"+1 day\"));\n $todayCount = $this->_rangeCount($criteria, $today, $tomorrow);\n\n // Yesterday Count\n $yesterday = date('Y-m-d', strtotime(\"-1 day\"));\n $yesterdayCount = $this->_rangeCount($criteria, $yesterday, $today);\n\n // This Week (Last Sunday to now, including today) Count\n $thisWeekStart = date('Y-m-d', strtotime(\"1 sunday ago\"));\n $thisWeekCount = $this->_rangeCount($criteria, $thisWeekStart, $tomorrow);\n\n // Last Calendar week Sunday to Sunday Count\n $lastWeekStart = date('Y-m-d', strtotime(\"2 sundays ago\"));\n $lastWeekEnd = date('Y-m-d', strtotime(\"1 sunday ago\"));\n $lastWeekCount = $this->_rangeCount($criteria, $lastWeekStart, $lastWeekEnd);\n\n // This Month (1st to now including today) Count\n $thisMonthStart = date('Y-m-d', strtotime(\"first day of this month\"));\n $thisMonthCount = $this->_rangeCount($criteria, $thisMonthStart, $tomorrow);\n\n //All Time Count (including today)\n $firstItemDate = $firstItem->postDate->format('Y-m-d');\n $allTimeCount = $this->_rangeCount($criteria, $firstItemDate, $tomorrow);\n\n //Set the timezone back to what it was before\n date_default_timezone_set($previousTimezone);\n\n return array(\n 'counts' => array(\n 'today' => $todayCount,\n 'yesterday' => $yesterdayCount,\n 'this-week' => $thisWeekCount,\n 'last-week' => $lastWeekCount,\n 'this-month' => $thisMonthCount,\n 'all-time' => $allTimeCount,\n ),\n 'data' => $allData,\n );\n\n }", "title": "" }, { "docid": "df475b29150108be3752ffc995fd715b", "score": "0.561277", "text": "public function activitygraphAction()\r\n {\r\n $this->_helper->layout->disableLayout();\r\n\r\n $oKpiService = new Phoenix_Kpi_Service_KpiService($this->kpiSegmentsConfig);\r\n\r\n $this->view->jsonResponse = $oKpiService->getGraphKpiActivityByClientAndActivities($this->getParam('client', ''), $this->getParam('activites_id', ''));\r\n }", "title": "" }, { "docid": "96ff9bb47c9bcf7258fce50687bb3121", "score": "0.5606075", "text": "public function handler(Request $request): Chartisan\n {\n $user_registration = Visitor::select([DB::raw(\"DATE_FORMAT(created_at, '%d-%M') as date\"), DB::raw('COUNT(id) as total'), DB::raw('page_id')])->groupBy('date')->groupBy('page_id')->get();\n $user_registration_dates = Visitor::select([DB::raw(\"DATE_FORMAT(created_at, '%d-%M') as date\")])->groupBy('date')->get();\n $login = $user_registration->where('page_id', 1)->pluck('total')->toArray();\n $register = $user_registration->where('page_id', 2)->pluck('total')->toArray();\n $home = $user_registration->where('page_id', 6)->pluck('total')->toArray();\n $dates = $user_registration_dates->pluck('date')->toArray();\n //$weight = User::all('weight')->pluck('weight')->toArray();\n return Chartisan::build()\n ->labels($dates)\n ->dataset('Login Page', $login)\n ->dataset('Register Page', $register)\n ->dataset('Home Page', $home);\n }", "title": "" }, { "docid": "d787405a9369ed27ae129d4a3b15a166", "score": "0.5595881", "text": "public function getActivityByDay(Request $request){\n\n $date = $request['date'];\n $hours = $this->getHours();\n\n //to do -> contar despues de agrupar por hora\n $activities = SensorActivity::select('created_at')->where([\n ['created_at', '>=', $date.' 00:00:00'],\n ['created_at', '<=', $date.' 23:59:59']\n ])->get()->groupBy(function($date) {\n return Carbon::parse($date->created_at)->format('h:i');\n });\n\n\n\n return response()->json([\n 'analytics' => [\n 'month' => $date,\n 'prueba'=> $activities\n ]\n ]);\n\n }", "title": "" }, { "docid": "72dfc74b482a64ba446b89c92792a539", "score": "0.5590153", "text": "function hitschart()\n\t{\n\n\t\t$dt = $this->Session->read('dt');\n\t\t$pageshits = $this->Session->read('pageshits');\n\t\t$groupshits = $this->Session->read('groupshits');\n\t\t$mshit = $this->Session->read('mshit');\n\t\t$ythit = $this->Session->read('ythit');\n\t\t$album_play = $this->Session->read('album_play');\n\n\t\t\n\t\t$this->set('dt',$dt);\n\t\t$this->set('pageshits',$pageshits);\n\t\t$this->set('groupshits',$groupshits);\n\t\t$this->set('mshit',$mshit);\n\t\t$this->set('ythit',$ythit);\n\t\t$this->set('album_play',$album_play);\n\t}", "title": "" }, { "docid": "6a00181f9eb1b9703a7b3eaf5f541971", "score": "0.55763876", "text": "public function fetchDailySessionsLastMonthsByCharts($geoList,$tierText)\r\n {\r\n \r\n if($tierText != 'geozone'){\r\n return $this->fetchDailySessionsLastMonthsByChartsFilter($geoList, $tierText);\r\n }\r\n\r\n \r\n date_default_timezone_set(\"Africa/Lagos\");\r\n \r\n \r\n $monthYear = $this->getPrevious12Months();\r\n \r\n $query_date = $monthYear[11]['year'] . \"-\" . $monthYear[11]['month'] . \"-01\";\r\n \r\n \r\n $start = \"\" .strtotime(date('Y-m-01', strtotime($query_date))) * 1000;\r\n $end = \"\" .strtotime(date('Y-m-t', strtotime($query_date))) * 1000;\r\n \r\n $chartPages = array(\r\n\r\n 'Trained HWs'=>'charts_coverage_cummhwtrained',\r\n 'Facilities with Trained HWs'=>'charts_coverage_percentfacswithtrainedhw',\r\n 'Facilities Providing FP'=>'charts_coverage_percentfacsproviding',\r\n 'Facilities providing FP over time'=>'charts_coverage_providingovertime',\r\n 'Facilities with trained HWs providing FP'=>'charts_coveragefacswithhwproviding',\r\n 'Facilities with Trained HWs providing FP over time'=>'charts_coverage_coverageovertime',\r\n 'Commodity Consumption'=>'charts_consumption_consumption',\r\n 'New FP acceptors and current FP users'=>'charts_consumption_newandcurrentfpusers',\r\n 'stock outs at facilities with trained HWS'=>'charts_stockout_percentstockoutwithtrainedhw',\r\n 'Stock out at facilities providing FP'=>'charts_stockout_percentfacsprovidingbutstockedout',\r\n 'stock outs at facilities providing FP over time'=>'charts_stockout_stockouts'\r\n \r\n );\r\n \r\n \r\n \r\n \r\n \r\n $metricClient = new MetricClient();\r\n \r\n \r\n $pages = array();\r\n foreach($chartPages as $k=>$val)\r\n {\r\n $query = array(\r\n array('$match'=>array('module_name'=>'charts','page_id'=>$val,'month'=>$monthYear[11]['month'].'','year'=>$monthYear[11]['year'].'','millidate' => array('$gte'=>$start,'$lte'=>$end))),\r\n array('$lookup'=>array(\r\n 'from'=>'users',\r\n 'localField'=>'userid',\r\n 'foreignField'=>'id',\r\n 'as'=>'users'\r\n )),\r\n array('$unwind'=>'$users'),\r\n array('$unwind'=>'$users.'.$tierText),\r\n array('$match'=>array('users.'.$tierText=>array('$in'=>$geoList))),\r\n array('$sort'=>array('userid'=>1,'millidate'=>-1))\r\n );\r\n\r\n $cursorJson = $metricClient->handleDataGet($query,array(),'aggregate','metrics');\r\n\r\n $jsonData = json_decode($cursorJson,TRUE);\r\n\r\n $sessions = 0;\r\n for($i=0; $i < count($jsonData)-2; $i++)\r\n {\r\n if(isset($jsonData[$i]['userid']) && isset($jsonData[$i+1]['userid'])\r\n && isset($jsonData[$i]['millidate']) && isset($jsonData[$i+1]['millidate'])){\r\n if($jsonData[$i]['userid'] == $jsonData[$i+1]['userid'])\r\n {\r\n $diff = $jsonData[$i]['millidate'] - $jsonData[$i+1]['millidate'];\r\n\r\n\r\n if($diff >= 900000)\r\n {\r\n $sessions++;\r\n }\r\n }\r\n }\r\n }\r\n \r\n $pages[$k] = $sessions; \r\n }\r\n $pages['timeline'] = substr($monthYear[11]['month'],0,3) . ' ' . $monthYear[11]['year'];\r\n \r\n $cacheData = json_decode(file_get_contents(\"charts_total_daily_sessions.json\"));\r\n \r\n $cacheData[11] = $pages;\r\n \r\n \r\n return json_encode($cacheData);\r\n }", "title": "" }, { "docid": "73507b4cefd82528ee84b789a5243d36", "score": "0.55691326", "text": "public function getVisitorsAndPageViews()\n {\n $period = $this->analyticsDuration();\n $data = Analytics::fetchTotalVisitorsAndPageViews($period);\n\n $totalViews = ['labels' => []];\n $visitors = [];\n $pageviews = [];\n foreach ($data as $k => $item) {\n array_push($totalViews['labels'], $item['date']->format('d M'));\n\n array_push($visitors, $item['visitors']);\n array_push($pageviews, $item['pageViews']);\n }\n\n $totalViews['datasets'][] = $this->getDataSet('Page Views', $pageviews, 0);\n $totalViews['datasets'][] = $this->getDataSet('Visitors', $visitors, 1);\n\n return json_encode($totalViews);\n\n }", "title": "" }, { "docid": "04aac5ae326b79c311db268ab432609c", "score": "0.5551237", "text": "public function index()\n\t{\t\n\n\t\t$stock = $this->dashboard->getProducts();\n\t\t$arrProd = [];\n\t\tforeach ($stock as $k => $v) {\n\t\t\t$arrProd[] = ['y' => $v->stock, 'label' => $v->no_material];\n\t\t\t} ;\n\t\t\t$dataPoints = json_encode($arrProd, JSON_NUMERIC_CHECK);\n\t\t\t\n\n $data['title'] = \"Dashboard\";\n $data['content'] = \"dashboard/list\";\n $data['trans_in'] = $this->dashboard->count('trans_in');\n $data['trans_inByTime'] = $this->dashboard->countByTime('trans_in');\n $data['trans_open'] = $this->dashboard->count('trans_open');\n $data['trans_openByTime'] = $this->dashboard->countByTime('trans_open');\n $data['trans_out'] = $this->dashboard->count('trans_out');\n $data['trans_outByTime'] = $this->dashboard->countByTime('trans_out');\n\t\t$data['trans_consign'] = $this->dashboard->count('trans_consign');\n\t\t$data['trans_consignByTime'] = $this->dashboard->countByTime('trans_consign');\n\t\t$data['dataPoints'] = $dataPoints;\n\t\t\t\t\n\t\t//Column Chart\n\t\t$data['ASN'] = $this->dashboard->countByBranch('ASN');\n\t\t$data['BHI'] = $this->dashboard->countByBranch('BHI');\n\t\t$data['BLA'] = $this->dashboard->countByBranch('BLA');\n\t\t$data['BLM'] = $this->dashboard->countByBranch('BLM');\n\t\t$data['BNH'] = $this->dashboard->countByBranch('BNH');\n\t\t$data['CPR'] = $this->dashboard->countByBranch('CPR');\n\t\t$data['DEPO'] = $this->dashboard->countByBranch('DEPO');\n\t\t$data['DKA'] = $this->dashboard->countByBranch('DKA');\n\t\t$data['FTM'] = $this->dashboard->countByBranch('FTM');\n\t\t$data['MHJN'] = $this->dashboard->countByBranch('MHJN');\n\t\t$data['LBB'] = $this->dashboard->countByBranch('LBB');\n\t\t$data['SNY'] = $this->dashboard->countByBranch('SNY');\n\t\t$data['STB'] = $this->dashboard->countByBranch('STB');\n\t\t$data['OTHER'] = $this->dashboard->countByBranch('OTHER');\n\n\t\t// DEPT\t\n\t\t$data['PWR'] = $this->dashboard->countProductByDept('PWR');\n\t\t$data['AFC'] = $this->dashboard->countProductByDept('AFC');\n\t\t$data['CVL'] = $this->dashboard->countProductByDept('CVL');\n\t\t$data['DWE'] = $this->dashboard->countProductByDept('DWE');\n\t\t$data['GEN'] = $this->dashboard->countProductByDept('GEN');\n\t\t$data['ME'] = $this->dashboard->countProductByDept('ME');\n\t\t$data['PSD'] = $this->dashboard->countProductByDept('PSD');\n\t\t$data['RS'] = $this->dashboard->countProductByDept('RS');\n\t\t$data['SCM'] = $this->dashboard->countProductByDept('SCM');\n\t\t$data['SIG'] = $this->dashboard->countProductByDept('SIG');\n\t\t$data['TEL'] = $this->dashboard->countProductByDept('TEL');\n\t\t$data['TWK'] = $this->dashboard->countProductByDept('TWK');\n\t\t$data['OTHER'] = $this->dashboard->countProductByDept('OTHER');\n\n\t\t\t//Line Chart\n\n\t\t$bln = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'];\n\t\t$data['c_in'] = [];\n $data['c_open'] = [];\n $data['c_consign'] = [];\n\t\t$data['c_out'] = [];\n\t\t\n\t\tforeach ($bln as $b) {\n $data['c_in'][] = $this->dashboard->chartIn($b);\n\t\t\t$data['c_open'][] = $this->dashboard->chartOpen($b);\n\t\t\t$data['c_consign'][] = $this->dashboard->chartConsign($b);\n $data['c_out'][] = $this->dashboard->chartOut($b);\n\t\t}\n\n\t\t$this->load->view('layout/wrapper', $data, FALSE);\n\n\t\t\t\n\t}", "title": "" }, { "docid": "cb206a80d11c7d2ad5dee2765b1fdc66", "score": "0.55511403", "text": "function ajax_revenue_graphs(Request $request){\n $input = $request->all();\n\n //Find all users which are part of current team\n $userIds = [];\n foreach(Auth::user()->currentTeam->users as $user){\n array_push($userIds, $user->id);\n }\n\n $obj = new MailServiceData();\n $labelArray = $resultArray = [];\n\n //Get the number of days for which the data needs to be shown\n $days = $input['days'];\n //Fetch revenue data for current user (Note: Data is based only on final amount)\n $data = $obj->selectRaw(\"SUM(final_amount) count, DATE_FORMAT(convert_date, '%d-%m-%Y') date\")\n ->where('convert_date', '>=', Carbon::today()->subDays($days))\n// ->where('user_id', \\Auth::id())\n ->whereIn('user_id', $userIds)\n ->where('status', 2)\n ->whereNotNull('convert_date')\n ->groupBy('date')\n ->get()->toArray();\n foreach ($data as $key => $row) {\n $labelArray[$key+1] = $row['date'];\n $resultArray[$key+1] = $row['count'];\n }\n\n $labels = $result = [];\n for ($i = 1; $i <= $days; $i++) {\n $date = Carbon::today()->subDays($i-1)->format('d-m-Y');\n $key = array_search($date, $labelArray);\n $value = 0;\n if(in_array($date, $labelArray)){\n $value = $resultArray[$key];\n }\n $labels[$i] = date('d M', strtotime($date));\n $result[$i] = $value;\n }\n $labels = array_reverse(array_values($labels));\n $result = array_reverse(array_values($result));\n return json_encode(['labels' => $labels, 'result' => $result]);\n }", "title": "" }, { "docid": "a07225dfe8b789c9d2b0874af548f105", "score": "0.5549996", "text": "function sethitschart()\n\t{\n\n\t\tif($this->Session->check('id') and $this->Session->check('band_id'))\n\t\t{\n\t\t\n\t\t$mmm_id =\t$this->Session->read('id');\n\t\t$band_id =\t$this->Session->read('band_id');\n\t\t\n\t\t$fbpages = addslashes($this->Session->read('fbpages'));\n\t\t$fbgroups = addslashes($this->Session->read('fbgroups'));\n\n\n\t\t} \n\t\telse\n\t\t{\n\t\t\t//$this->Session->setFlash('Session Expired');\n\t\t\t//$this->redirect('/analytics/index/');\n\t\t\treturn ;\n\t\t} // \t\tif($this->Session->check('music') and $this->Session->check('profile') and $this->Session->check('channel') and $this->Session->check('email') and $this->Session->check('topalbum'))\n\n\n\t\t$mss= 0;\n\t\t$yt=0;\n\t\t$album=0;\n\t\t$pages=0;\n\t\t$groups=0;\n\n\t\tif($this->Session->read('lastdate')=='w') // weekly graphs quries\n\t\t{\n\n\t\t\t$qry_mss = \"select s.friends fbs , s.etime from mss_stat s , mss_login l where s.mss_id = l.mss_id and l.band_id = $band_id and l.mmm_id = '$mmm_id' and l.status=1 and FROM_UNIXTIME(s.etime) between DATE_SUB(CURDATE(), INTERVAL 9 DAY) AND CURDATE( ) order by etime\";\n\t\t\t\n\t\t\t$qry_yt = \"select y.subscriber fbs , y.etime from yt_stat y , yt_login l where y.yt_id = l.yt_id and l.band_id=$band_id and l.mmm_id='$mmm_id' and l.status=1 and \tFROM_UNIXTIME(y.etime) between DATE_SUB(CURDATE(), INTERVAL 9 DAY) AND CURDATE( ) order by etime\";\n\n\t\t\t$qry_lfm = \"select t.listeners fbs , t.etime from lfm_listeners t , lfm_music l where l.lfm_m_id =t.lfm_m_id and l.band_id=$band_id and l.mmm_id='$mmm_id' and l.status=1 and \tFROM_UNIXTIME(t.etime) between DATE_SUB(CURDATE(), INTERVAL 9 DAY) AND CURDATE( ) order by etime\";\n\n\t\t\t$qry_fbs_pages = \"select s.fan_count fbs , s.etime from fb_pages s , fb_login l where s.name='$fbpages' and s.login_id = l.login_id and l.band_id=$band_id and l.mmm_id = '$mmm_id' and l.status=1 and FROM_UNIXTIME(s.etime) between DATE_SUB(CURDATE(), INTERVAL 9 DAY) AND CURDATE( ) order by etime\";\n\n\t\t\t$qry_fbs_groups = \"select s.member fbs , s.etime from fb_group s , fb_login l where s.name='$fbgroups' and s.login_id = l.login_id and l.band_id=$band_id and l.mmm_id = '$mmm_id' and l.status=1 and FROM_UNIXTIME(s.etime) between DATE_SUB(CURDATE(), INTERVAL 9 DAY) AND CURDATE( ) order by etime\";\n\n\n\n\t\t\tif(!empty($this->params['url']['id']))\n\t\t\t{\n\n\t\t\t\tif ($this->Session->check('msh'))\n\t\t\t\t{\n\t\t\t\t\t$mss = $this->Mss->findBySql($qry_mss);\n\t\t\t\t}\n\n\t\t\t\tif ($this->Session->check('yth'))\n\t\t\t\t{\n\t\t\t\t\t$yt = $this->Ytstat->findBySql($qry_yt);\n\t\t\t\t}\n\n\t\t\t\tif ($this->Session->check('lfmsh'))\n\t\t\t\t{\n\n\n\t\t\t\t\t$album = $this->Lfmalbum->findBySql($qry_lfm);\n\t\t\t\t}\n\n\t\t\t\tif ($this->Session->check('fbspages'))\n\t\t\t\t{\n\t\t\t\t\t$pages = $this->Lfmalbum->findBySql($qry_fbs_pages);\n\t\t\t\t}\n\n\t\t\t\tif ($this->Session->check('fbsgroups'))\n\t\t\t\t{\n\t\t\t\t\t$groups = $this->Lfmalbum->findBySql($qry_fbs_groups);\n\t\t\t\t}\n\n\t\t\t} // \t\tif(!empty($this->params['url']['id']))\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t$mss = $this->Mss->findBySql($qry_mss);\n\t\t\t\t$yt = $this->Ytstat->findBySql($qry_yt);\n\t\t\t\t$album = $this->Lfmalbum->findBySql($qry_lfm);\n\t\t\t\t$pages = $this->Lfmalbum->findBySql($qry_fbs_pages);\n\t\t\t\t$groups = $this->Lfmalbum->findBySql($qry_fbs_groups);\n\n\t\t\t} //\t\tif(!empty($this->params['url']['id']))\n\n\t\t\n\t\t\n\n\t\t\t$qry= \"select DATE_SUB(CURDATE(), INTERVAL 7 DAY) last, CURDATE() curr\";\n\t\t\t$tfdate = $this->Ytstat->findBySql($qry);\n\n\t\t\t$dt =NULL;\n\t\t\t$date = NULL;\n\t\t\t$c=0;\n\t\t\t$dt[$c]=$tfdate['0']['0']['last'];\n\n\t\t\twhile($tfdate['0']['0']['curr']!=$date)\n\t\t\t{\n\t\t\t\t$date = date('Y-m-d',strtotime(date(\"Y-m-d\", strtotime($dt[$c])) . \" +1 day\"));\n\t\t\t\t$c ++;\n\t\t\t\tif($c==7)\t // i.e 0-6 last 7 days\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$dt[$c]= $date;\n\n\t\t\t} // while($tfdate['0']['0']['curr']!=$date)\n\n\t\t} // if($this->Session->read('lastdate')=='w') // weekly graphs quries\n\t\telseif($this->Session->read('lastdate')=='m') // monthly graphs quries\n\t\t{\n\n\t\t\t$qry_mss = \"select s.friends fbs , s.etime from mss_stat s , mss_login l where s.mss_id = l.mss_id and l.band_id = $band_id and l.mmm_id = '$mmm_id' and l.status=1 and FROM_UNIXTIME(s.etime) between DATE_SUB(CURDATE(), INTERVAL 1 Month) AND CURDATE( ) order by etime\";\n\n\t\t\t$qry_yt = \"select y.subscriber fbs , y.etime from yt_stat y , yt_login l where y.yt_id = l.yt_id and l.band_id = $band_id and l.mmm_id='$mmm_id' and l.status=1 and FROM_UNIXTIME(y.etime) between DATE_SUB(CURDATE(), INTERVAL 1 Month) AND CURDATE( ) order by etime\";\n\n\n\t\t\t$qry_lfm = \"select t.listeners fbs , t.etime from lfm_listeners t , lfm_music l where l.lfm_m_id =t.lfm_m_id and l.band_id = $band_id and l.mmm_id='$mmm_id' and l.status=1 and \tFROM_UNIXTIME(t.etime) between DATE_SUB(CURDATE(), INTERVAL 1 Month) AND CURDATE( ) order by\tetime\";\n\n\t\t\t$qry_fbs_pages = \"select s.fan_count fbs , s.etime from fb_pages s , fb_login l where s.name='$fbpages' and s.login_id = l.login_id and l.band_id = $band_id and l.mmm_id = '$mmm_id' and l.status=1 and FROM_UNIXTIME(s.etime) between DATE_SUB(CURDATE(), INTERVAL 1 Month) AND CURDATE( ) order by\tetime\";\n\n\t\t\t$qry_fbs_groups = \"select s.member fbs , s.etime from fb_group s , fb_login l where s.name='$fbgroups' and s.login_id = l.login_id and l.band_id = $band_id and l.mmm_id = '$mmm_id' and l.status=1 and FROM_UNIXTIME(s.etime) between DATE_SUB(CURDATE(), INTERVAL 1 Month) AND CURDATE( ) order by etime\";\n\n\n\t\t\t\t\n\t\t\tif(!empty($this->params['url']['id']))\n\t\t\t{\n\n\t\t\t\tif ($this->Session->check('msh'))\n\t\t\t\t{\n\t\t\t\t\t$mss = $this->Mss->findBySql($qry_mss);\n\t\n\n\t\t\t\t}\n\n\t\t\t\tif ($this->Session->check('yth'))\n\t\t\t\t{\n\t\t\t\t\t$yt = $this->Ytstat->findBySql($qry_yt);\n\t\t\t\t}\n\n\t\t\t\tif ($this->Session->check('lfmsh'))\n\t\t\t\t{\n\n\t\t\t\t\t$album = $this->Lfmalbum->findBySql($qry_lfm);\n\t\t\t\t}\n\n\t\t\t\tif ($this->Session->check('fbspages'))\n\t\t\t\t{\n\n\t\t\t\t\t$pages = $this->Lfmalbum->findBySql($qry_fbs_pages);\n\t\t\t\t}\n\n\t\t\t\tif ($this->Session->check('fbsgroups'))\n\t\t\t\t{\n\t\t\t\t\t$groups = $this->Lfmalbum->findBySql($qry_fbs_groups);\n\t\t\t\t}\n\n\t\t\t} // \t\tif(!empty($this->params['url']['id']))\n\t\t\telse\n\t\t\t{\n\n\n\t\t\t\t$mss = $this->Mss->findBySql($qry_mss);\n\t\t\t\t$yt = $this->Ytstat->findBySql($qry_yt);\n\t\t\t\t$album = $this->Lfmalbum->findBySql($qry_lfm);\n\t\t\t\t$pages = $this->Lfmalbum->findBySql($qry_fbs_pages);\n\t\t\t\t$groups = $this->Lfmalbum->findBySql($qry_fbs_groups);\n\n\t\t\t} //\t\tif(!empty($this->params['url']['id']))\n\n\n\t\t\t$qry= \"select DATE_SUB(CURDATE(), INTERVAL 1 Month) last, CURDATE() curr\";\n\t\t\t$tfdate = $this->Ytstat->findBySql($qry);\n\n\t\t\t$dt =NULL;\n\t\t\t$date = NULL;\n\n\t\t\t\n\t\t\t$c=0;\n\t\t\t$cdate= $tfdate['0']['0']['curr'];\n\t\t\t$curdate = date('Y-m-d',strtotime(date(\"Y-m-d\", strtotime($cdate)) . \" -1 day\"));\n\t\t\t$d=$tfdate['0']['0']['last'];\n\t\t\t$dt[$c]=date('Y-m-d',strtotime(date(\"Y-m-d\", strtotime($d))));\n\n\t\t\twhile($curdate!=$date)\n\t\t\t{\n\t\t\t\t$date = date('Y-m-d',strtotime(date(\"Y-m-d\", strtotime($dt[$c])) . \" +1 day\"));\n\t\t\t\t$c ++;\n\t\t\t\t$dt[$c]= $date;\n\n\t\t\t} // while($tfdate['0']['0']['curr']!=$date)\n\n\t\t\t$this->Session->write('mm',count($dt));\n\n\t\t} // elseif($this->Session->read('lastdate')=='m') // monthly graphs quries\n\n\t\telseif($this->Session->read('lastdate')=='y') // yearly graphs quries\n\t\t{\n\n\t\t\t$qry_mss = \"select s.friends fbs , s.etime from mss_stat s , mss_login l where s.mss_id = l.mss_id and l.band_id = $band_id and l.mmm_id = '$mmm_id' and l.status=1 and FROM_UNIXTIME(s.etime) between DATE_SUB(CURDATE(), INTERVAL 1 Year) AND CURDATE( ) order by etime\";\n\n\t\t\t$qry_yt = \"select y.subscriber fbs , y.etime from yt_stat y , yt_login l where y.yt_id = l.yt_id and l.band_id = $band_id and l.mmm_id='$mmm_id' and l.status=1 and FROM_UNIXTIME(y.etime) between DATE_SUB(CURDATE(), INTERVAL 1 Year) AND CURDATE( ) order by etime\";\n\n\n\t\t\t$qry_lfm = \"select t.listeners fbs , t.etime from lfm_listeners t , lfm_music l where l.lfm_m_id =t.lfm_m_id and l.band_id = $band_id and l.mmm_id='$mmm_id' and l.status=1 and \tFROM_UNIXTIME(t.etime) between DATE_SUB(CURDATE(), INTERVAL 1 Year) AND CURDATE( ) order by\tetime\";\n\n\t\t\t$qry_fbs_pages = \"select s.fan_count fbs , s.etime from fb_pages s , fb_login l where s.name='$fbpages' and s.login_id = l.login_id and l.band_id = $band_id and l.mmm_id = '$mmm_id' and l.status=1 and FROM_UNIXTIME(s.etime) between DATE_SUB(CURDATE(), INTERVAL 1 Year) AND CURDATE( ) order by\tetime\";\n\n\t\t\t$qry_fbs_groups = \"select s.member fbs , s.etime from fb_group s , fb_login l where s.name='$fbgroups' and s.login_id = l.login_id and l.band_id = $band_id and l.mmm_id = '$mmm_id' and l.status=1 and FROM_UNIXTIME(s.etime) between DATE_SUB(CURDATE(), INTERVAL 1 Year) AND CURDATE( ) order by\tetime\";\n\n\n\n\t\t\tif(!empty($this->params['url']['id']))\n\t\t\t{\n\n\t\t\t\tif ($this->Session->check('msh'))\n\t\t\t\t{\n\t\t\t\t\t$mss = $this->Mss->findBySql($qry_mss);\n\t\t\t\t\t$mss_data = $this->getyear($mss,'s','fbs');\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tif ($this->Session->check('yth'))\n\t\t\t\t{\n\t\t\t\t\t$yt = $this->Ytstat->findBySql($qry_yt);\n\t\t\t\t\t$yt_data =$this->getyear($yt,'y','fbs');\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tif ($this->Session->check('lfmsh'))\n\t\t\t\t{\n\n\t\t\t\t\t$album = $this->Lfmalbum->findBySql($qry_lfm);\n\t\t\t\t\t$album_data = $this->getyear($album,'t','fbs');\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tif ($this->Session->check('fbspages'))\n\t\t\t\t{\n\n\t\t\t\t\t$pages = $this->Lfmalbum->findBySql($qry_fbs_pages);\n\t\t\t\t\t$pages_data = $this->getyear($pages,'s','fbs');\n\n\t\t\t\t}\n\n\t\t\t\tif ($this->Session->check('fbsgroups'))\n\t\t\t\t{\n\n\t\t\t\t\t$groups = $this->Lfmalbum->findBySql($qry_fbs_groups);\n\t\t\t\t\t$groups_data = $this->getyear($groups,'s','fbs');\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t} // \t\tif(!empty($this->params['url']['id']))\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t$mss = $this->Mss->findBySql($qry_mss);\n\t\t\t\t$yt = $this->Ytstat->findBySql($qry_yt);\n\t\t\t\t$album = $this->Lfmalbum->findBySql($qry_lfm);\n\t\t\t\t$pages = $this->Lfmalbum->findBySql($qry_fbs_pages);\n\t\t\t\t$groups = $this->Lfmalbum->findBySql($qry_fbs_groups);\n\n\t\t\t\t$mss_data = $this->getyear($mss,'s','fbs');\n\t\t\t\t$yt_data =$this->getyear($yt,'y','fbs');\n\t\t\t\t$album_data = $this->getyear($album,'t','fbs');\n\t\t\t\t$pages_data = $this->getyear($pages,'s','fbs');\n\t\t\t\t$groups_data = $this->getyear($groups,'s','fbs');\n\t\t\t\t\n\n\t\t\t} //\t\tif(!empty($this->params['url']['id']))\n\n\t\t\t\n\n\t\t\t/*\n\t\t\t\tMonth Wise Yearly date create\n\t\t\t\t*/\n\n\t\t\t$qry= \"select DATE_SUB(CURDATE(), INTERVAL 1 Year) last, CURDATE() curr\";\n\t\t\t$tfdate = $this->Ytstat->findBySql($qry);\n\n\t\t\t$dt =NULL;\n\t\t\t$date = NULL;\n\t\t\t$c=0;\n\t\t\t$td= $tfdate['0']['0']['curr'];\n\t\t\t$td=date('M',strtotime(date(\"Y-m-d\", strtotime($td))));\n\n\n\t\t\t$d=$tfdate['0']['0']['last'];\n\t\t\t$edate=date('Y-m-d',strtotime(date(\"Y-m-d\", strtotime($d)). \" +1 Month\"));\n\t\t\t$dt[$c]=date('M',strtotime(date(\"Y-m-d\", strtotime($d)). \" +1 Month\"));\n\n\t\t\twhile($td!=$date)\n\t\t\t{\n\t\t\t\t$date = date('M',strtotime(date(\"Y-m-d\", strtotime($edate)) . \" +1 Month\"));\n\n\t\t\t\t$c ++;\n\t\t\t\t$dt[$c]= $date;\n\t\t\t\t$edate=date('Y-m-d',strtotime(date(\"Y-m-d\", strtotime($edate)). \" +1 Month\"));\n\t\t\t\tif($c>12)\n\t\t\t\t{\n\t\t\t\t break;\n\t\t\t\t} // \t\t\tif($c>12)\n\t\t\t} // while($tfdate['0']['0']['curr']!=$date)\n\n\n\n\t\t} // elseif($this->Session->read('lastdate')=='y') // yearly graphs quries\n\n\t\t$mshitscount = 0;\n\t\t$ythitscount = 0;\n\t\t$lfmhitscount = 0;\n\t\t$groupshitscount=0;\n\t\t$pageshitscount=0;\n\t\t\n\t\t\t\n\t\tif($this->Session->read('lastdate')=='y') // set data according to date for yearly graph\n\t\t{\n\n\t\t\t$flg=0;\n\t\t\tif(empty($mss_data))\n\t\t\t{\n\t\t\t\t$mscount = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$mscount = count($mss_data);\n\t\t\t}\n\n\t\t\tif(empty($yt_data))\n\t\t\t{\n\t\t\t\t$ytcount = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$ytcount = count($yt_data);\n\t\t\t}\n\t\n\t\t\tif(empty($album_data))\n\t\t\t{\n\t\t\t\t$albumcount = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$albumcount = count($album_data);\n\t\t\t}\n\n\t\t\tif(empty($pages_data))\n\t\t\t{\n\t\t\t\t$pagescount = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$pagescount = count($pages_data);\n\t\t\t}\n\n\t\t\tif(empty($groups_data))\n\t\t\t{\n\t\t\t\t$groupscount = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$groupscount = count($groups_data);\n\t\t\t}\n\n\t\t\t\n\t\t\t$flg=0;\n\t\t\t$cnt=0;\n\t\t\t$ycnt=0;\n\t\t\t$lfcnt=0;\n\t\t\t$pcnt=0;\n\t\t\t$gcnt=0;\n\n\n\t\t\tforeach($dt as $key => $val) // main date loop\n\t\t\t{\n\t\t\t\t$flg=0;\n\n\t\t\t\tfor($i=0 ; $i < $mscount ; $i++) // set Myspace views according to main loop date\n\t\t\t\t{\n\t\t\t\t\tif($mss_data[$i]['s']['etime']==$val)\n\t\t\t\t\t{\n\t\t\t\t\t\t$mshit[$cnt]= $mss_data[$i]['s']['fbs'] ;\n\t\t\t\t\t\t$mshitscount+=$mshit[$cnt];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$flg=1;\n\t\t\t\t\t\t$cnt++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} //\tif($mss_data[$i]['s']['etime'])==$val)\n\t\t\t\t} // for($i=0 ; $i < $mscount-1 ; $i++)\n\n\t\t\t\tif($flg==0)\n\t\t\t\t{\n\t\t\t\t\t$mshit[$cnt]=0;\n\t\t\t\t\t$cnt++;\n\n\t\t\t\t}\n\n\n\t\t\t\t$flg=0;\n\t\t\t\t$count=0;\n\t\t\t\tfor($i=0 ; $i < $ytcount ; $i++) // set Youtube views according to main loop date\n\t\t\t\t{\n\n\t\t\t\t\tif($yt_data[$i]['y']['etime']==$val)\n\t\t\t\t\t{\n\t\t\t\t\t\t$ythit[$ycnt]= $yt_data[$i]['y']['fbs'] ;\n\t\t\t\t\t\t$ythitscount+=$ythit[$ycnt];\n\t\t\t\t\t\t$flg=1;\n\t\t\t\t\t\t$ycnt ++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t} //\tif($yt_data[$i]['y']['etime']==$val)\n\n\t\t\t\t} // for($i=0 ; $i < $ytcount-1 ; $i++)\n\n\t\t\t\tif($flg==0)\n\t\t\t\t{\n\t\t\t\t\t$ythit[$ycnt]=0;\n\t\t\t\t\t$ycnt++;\n\n\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t$flg=0;\n\t\t\t\tfor($i=0 ; $i < $albumcount ; $i++)\t// set Las.fm top album playcount according to main loop date\n\t\t\t\t{\n\t\t\t\t\tif($album_data[$i]['t']['etime']==$val)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$album_play[$lfcnt]= $album_data[$i]['t']['fbs'];\n\t\t\t\t\t\t$lfmhitscount+=$album_play[$lfcnt];\n\t\t\t\t\t\t$flg=1;\n\t\t\t\t\t\t$lfcnt++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} //\tif($album_data[$i]['t']['etime']==$val)\n\n\t\t\t\t} // for($i=0 ; $i < $ytcount-1 ; $i++)\n\n\t\t\t\tif($flg==0)\n\t\t\t\t{\n\t\t\t\t\t$album_play[$lfcnt]=0;\n\t\t\t\t\t$lfcnt++;\n\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t$flg=0;\n\t\t\t\t$count=0;\n\t\t\t\tfor($i=0 ; $i < $pagescount ; $i++) // set Youtube views according to main loop date\n\t\t\t\t{\n\n\t\t\t\t\tif($pages_data[$i]['s']['etime']==$val)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$pageshits[$pcnt]= $pages_data[$i]['s']['fbs'] ;\n\t\t\t\t\t\t$pageshitscount+=$pageshits[$pcnt];\n\t\t\t\t\t\t$flg=1;\n\t\t\t\t\t\t$pcnt ++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t} //\tif($yt_data[$i]['y']['etime']==$val)\n\n\t\t\t\t} // for($i=0 ; $i < $ytcount-1 ; $i++)\n\n\t\t\t\tif($flg==0)\n\t\t\t\t{\n\t\t\t\t\t$pageshits[$pcnt]=0;\n\t\t\t\t\t$pcnt++;\n\n\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\t$flg=0;\n\t\t\t\t$count=0;\n\t\t\t\tfor($i=0 ; $i < $groupscount ; $i++) // set Youtube views according to main loop date\n\t\t\t\t{\n\n\t\t\t\t\tif($groups_data[$i]['s']['etime']==$val)\n\t\t\t\t\t{\n\t\t\t\t\t\t$groupshits[$gcnt]= $groups_data[$i]['s']['fbs'] ;\n\t\t\t\t\t\t$groupshitscount+=$groupshits[$gcnt];\n\t\t\t\t\t\t$flg=1;\n\t\t\t\t\t\t$pcnt ++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t} //\tif($yt_data[$i]['y']['etime']==$val)\n\n\t\t\t\t} // for($i=0 ; $i < $ytcount-1 ; $i++)\n\n\t\t\t\tif($flg==0)\n\t\t\t\t{\n\t\t\t\t\t$groupshits[$gcnt]=0;\n\t\t\t\t\t$gcnt++;\n\n\t\t\t\t}\n\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t} // foreach($dt as $key => $val)\n\t\t} // if($this->Session->read('lastdate')=='y')\n\t\telse // // set data according to date for Weekly & Monthly Graph\n\t\t{\n\n\t\t\t$flg=0;\n\n\t\t\tif(empty($mss))\n\t\t\t{\n\t\t\t\t$mscount = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$mscount = count($mss);\n\t\t\t}\n\n\t\t\tif(empty($yt))\n\t\t\t{\n\t\t\t\t$ytcount = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$ytcount = count($yt);\n\t\t\t}\n\t\n\t\t\tif(empty($album))\n\t\t\t{\n\t\t\t\t$albumcount = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$albumcount = count($album);\n\t\t\t}\n\n\t\t\tif(empty($pages))\n\t\t\t{\n\t\t\t\t$pagescount = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$pagescount = count($pages);\n\t\t\t}\n\n\t\t\tif(empty($groups))\n\t\t\t{\n\t\t\t\t$groupscount = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$groupscount = count($groups);\n\t\t\t}\n\t\t\n\t\t\t\n\t\t\t$flg=0;\n\t\t\t$cnt=0;\n\t\t\t$ycnt=0;\n\t\t\t$lfcnt=0;\n\t\t\t$pcnt=0;\n\t\t\t$gcnt=0;\n\n\t\t\tforeach($dt as $key => $val) // main date loop\n\t\t\t{\n\t\t\t\t$flg=0;\n\n\t\t\t\tfor($i=0 ; $i < $mscount ; $i++) // set Myspace views according to main loop date\n\t\t\t\t{\n\t\t\t\t\tif(date('Y-m-d',$mss[$i]['s']['etime'])==$val)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif($i!=0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$mshit[$cnt]= $mss[$i]['s']['fbs']-$mss[$i-1]['s']['fbs'];\n\t\t\t\t\t\t\t$mshitscount+=$mshit[$cnt];\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$mshit[$cnt] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$flg=1;\n\t\t\t\t\t\t$cnt++;\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t} //\tif(date('Y-m-d',$mss[$i]['s']['etime'])==$val)\n\t\t\t\t} // for($i=0 ; $i < $mscount-1 ; $i++)\n\n\t\t\t\n\t\t\t\tif($flg==0)\n\t\t\t\t{\n\t\t\t\t\t$mshit[$cnt]=0;\n\t\t\t\t\t$cnt++;\n\n\t\t\t\t}\n\n\n\t\t\t\t$flg=0;\n\t\t\t\t$count=0;\n\t\t\t\tfor($i=0 ; $i < $ytcount ; $i++) // set Youtube views according to main loop date\n\t\t\t\t{\n\n\t\t\t\t\tif(date('Y-m-d',$yt[$i]['y']['etime'])==$val)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif($i!=0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ythit[$ycnt]= $yt[$i]['y']['fbs']-$yt[$i-1]['y']['fbs'];\n\t\t\t\t\t\t\t$ythitscount+=$ythit[$ycnt];\n\n\t\t\t\t\t\t}else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ythit[$ycnt]=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$flg=1;\n\t\t\t\t\t\t$ycnt ++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} //\tif(date('Y-m-d',$yt[$i]['y']['etime'])==$val)\n\n\t\t\t\t} // for($i=0 ; $i < $ytcount-1 ; $i++)\n\n\t\t\t\tif($flg==0)\n\t\t\t\t{\n\t\t\t\t\t$ythit[$ycnt]=0;\n\t\t\t\t\t$ycnt++;\n\n\t\t\t\t}\n\t\t\t\t\t\n\n\n\t\t\t\t$flg=0;\n\t\t\t\tfor($i=0 ; $i < $albumcount ; $i++)\t// set Las.fm top album playcount according to main loop date\n\t\t\t\t{\n\t\t\t\t\tif(date('Y-m-d',$album[$i]['t']['etime'])==$val)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($i!=0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$album_play[$lfcnt]= $album[$i]['t']['fbs']-$album[$i-1]['t']['fbs'];\n\t\t\t\t\t\t\t$lfmhitscount+=$album_play[$lfcnt];\n\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$album_play[$lfcnt]=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$flg=1;\n\t\t\t\t\t\t$lfcnt++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} //\tif(date('Y-m-d',$yt[$i]['y']['etime'])==$val)\n\n\t\t\t\t} // for($i=0 ; $i < $ytcount-1 ; $i++)\n\n\t\t\t\tif($flg==0)\n\t\t\t\t{\n\t\t\t\t\t$album_play[$lfcnt]=0;\n\t\t\t\t\t$lfcnt++;\n\n\t\t\t\t}\n\n\t\t\t\t$flg=0;\n\t\t\t\tfor($i=0 ; $i < $pagescount ; $i++) // set Youtube views according to main loop date\n\t\t\t\t{\n\n\t\t\t\t\tif(date('Y-m-d',$pages[$i]['s']['etime'])==$val)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif($i!=0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$pageshits[$pcnt]= $pages[$i]['s']['fbs']-$pages[$i-1]['s']['fbs'];\n\t\t\t\t\t\t\t$pageshitscount+=$pageshits[$pcnt] ;\n\n\t\t\t\t\t\t}else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$pageshits[$pcnt]=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$flg=1;\n\t\t\t\t\t\t$pcnt ++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} //\tif(date('Y-m-d',$yt[$i]['y']['etime'])==$val)\n\n\t\t\t\t} // for($i=0 ; $i < $ytcount-1 ; $i++)\n\n\t\t\t\tif($flg==0)\n\t\t\t\t{\n\t\t\t\t\t$pageshits[$pcnt]=0;\n\t\t\t\t\t$pcnt++;\n\n\t\t\t\t}\t\t\t\n\n\t\t\t\t$flg=0;\n\t\t\t\tfor($i=0 ; $i < $groupscount ; $i++) // set Youtube views according to main loop date\n\t\t\t\t{\n\n\t\t\t\t\tif(date('Y-m-d',$groups[$i]['s']['etime'])==$val)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif($i!=0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$groupshits[$gcnt]= $groups[$i]['s']['fbs']-$groups[$i-1]['s']['fbs'];\n\t\t\t\t\t\t\t$groupshitscount+=$groupshits[$gcnt] ;\n\n\t\t\t\t\t\t}else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$groupshits[$gcnt]=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$flg=1;\n\t\t\t\t\t\t$gcnt ++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} //\tif(date('Y-m-d',$yt[$i]['y']['etime'])==$val)\n\n\t\t\t\t} // for($i=0 ; $i < $ytcount-1 ; $i++)\n\n\t\t\t\tif($flg==0)\n\t\t\t\t{\n\t\t\t\t\t$groupshits[$gcnt]=0;\n\t\t\t\t\t$gcnt++;\n\n\t\t\t\t}\t\t\t\n\n\n\t\t\t} // foreach($dt as $key => $val)\n\t\t} // if($this->Session->read('lastdate')=='y')\n\n\n\t\t\n\t\t/*\n\t\t*\tSession set to get weekly , monthly & yearly average / Percentage\n\t\t*/\t\t\t\n\t\t$this->Session->write('mshitscount',$mshitscount);\n\t\t$this->Session->write('ythitscount',$ythitscount);\n\t\t$this->Session->write('lfmhitscount',$lfmhitscount);\n\t\t$this->Session->write('pageshitscount',$pageshitscount);\n\t\t$this->Session->write('groupshitscount',$groupshitscount);\n\n\n\t\t\n\t\t/*\n\t\t*\tSession to set Graph data\n\t\t*/\n\t\t$this->Session->write('dt',$dt);\n\t\t$this->Session->write('mshit',$mshit);\n\t\t$this->Session->write('ythit',$ythit);\n\t\t$this->Session->write('album_play',$album_play);\n\t\t$this->Session->write('pageshits',$pageshits);\n\t\t$this->Session->write('groupshits',$groupshits);\n\n\n\t\t$pagesaverage = 0;\n\t\t$groupsaverage = 0;\n\t\t$msaverage = 0;\n\t\t$ytaverage = 0;\n\t\t$lfmaverage = 0;\n\n\n\t\tif($this->Session->read('lastdate')=='w')\n\t\t{\n\t\t\t$pagesaverage = round($pageshitscount/7,2);\n\t\t\t$groupsaverage = round($groupshitscount/7,2);\n\t\t\t$msaverage = round($mshitscount/7,2);\n\t\t\t$ytaverage = round($ythitscount/7,2);\n\t\t\t$lfmaverage = round($lfmhitscount/7,2);\n\n\t\t}\n\t\telseif($this->Session->read('lastdate')=='m')\n\t\t{\n\t\t\t$mm=$this->Session->read('mm');\n\t\t\t$pagesaverage = round($pageshitscount/$mm,2);\n\t\t\t$groupsaverage = round($groupshitscount/$mm,2);\n\t\t\t$msaverage = round($mshitscount/$mm,2);\n\t\t\t$ytaverage = round($ythitscount/$mm,2);\n\t\t\t$lfmaverage = round($lfmhitscount/$mm,2);\n\n\t\t}\n\t\telseif($this->Session->read('lastdate')=='y')\n\t\t{\n\t\t\t$pagesaverage = round($pageshitscount/12,2);\n\t\t\t$groupsaverage = round($groupshitscount/12,2);\n\t\t\t$msaverage = round($mshitscount/12,2);\n\t\t\t$ytaverage = round($ythitscount/12,2);\n\t\t\t$lfmaverage = round($lfmhitscount/12,2);\n\n\t\t}\n\n\t\t$this->Session->write('pagesaverage',$pagesaverage);\n\t\t$this->Session->write('groupsaverage',$groupsaverage);\n\t\t$this->Session->write('msaverage',$msaverage);\n\t\t$this->Session->write('ytaverage',$ytaverage);\n\t\t$this->Session->write('lfmaverage',$lfmaverage);\n\n\t\treturn true;\n\n\t}", "title": "" }, { "docid": "4b36d68dbb623f6cf39558080511c2c3", "score": "0.5541567", "text": "public function metrics() {\n $month = strtotime('first day of this month', time());\n $months[date(\"m Y\", $month)] = date(\"M Y\", $month);\n for ($i = 1; $i < 12; $i++) {\n $month = strtotime('first day of last month', $month);\n $months[date(\"m Y\", $month)] = date(\"M Y\", $month);\n }\n $graph_labels = array_reverse(array_values($months));\n $this->set('first_month', $graph_labels[0]);\n $this->set('last_month', $graph_labels[count($graph_labels) - 1]);\n\n $this->set('numUsers', $this->Users->find('all')->count());\n $this->loadModel('Reservations');\n $this->loadModel('Timeoff');\n $this->set('numReservations', $this->Reservations->find('all')->count());\n $this->set('pendingReservations', $this->Reservations->find('all')\n ->where(['Reservations.status' => 0])\n ->count()\n );\n $this->set('approvedReservations', $this->Reservations->find('all')\n ->where(['Reservations.status' => 1])\n ->count());\n $this->set('deniedReservations', $this->Reservations->find('all')\n ->where([ 'Reservations.status' => 2])\n ->count());\n $this->set('userReservations', \"\");\n $this->set('userActivity', \"\");\n $this->set('userName', \"\");\n \n $this->set('users', $this->Users->find('list', [\n 'idField' => 'clientID', \n 'valueField' => 'full_name'\n ]));\n\n\n // ******** graph variables ********\n\n // get a list of the last 12 months, including the current month\n $month = strtotime('first day of this month', time());\n $months[date(\"m Y\", $month)] = date(\"M Y\", $month);\n for ($i = 1; $i < 12; $i++) {\n $month = strtotime('first day of last month', $month);\n $months[date(\"m Y\", $month)] = date(\"M Y\", $month);\n }\n $this->set('graph_labels', json_encode(array_reverse(array_values($months))));\n\n $twelve_months_ago = strtotime('first day of this month last year', time());\n $twelve_months_ago = date(\"Y-m-d 00:00:00\", $twelve_months_ago);\n\n $query = $this->Reservations->find('all', [\n 'fields' => ['month' => 'date_format(created_time, \"%m %Y\")', 'total' => 'count(*)'],\n 'conditions' => ['Reservations.created_time >' => $twelve_months_ago],\n 'group' => ['year(created_time)', 'month(created_time)']\n ]);\n $reservations = $this->mergeMonths($query, $months);\n $this->set('graph_reservation_points', json_encode([\n 'Reservations' => $reservations\n ]));\n\n $query = $this->Users->find('all', [\n 'fields' => ['month' => 'date_format(created, \"%m %Y\")', 'total' => 'count(*)'],\n 'conditions' => ['Users.created >' => $twelve_months_ago],\n 'group' => ['year(created)', 'month(created)']\n ]);\n $users = $this->mergeMonths($query, $months);\n $this->set('graph_registration_points', json_encode([\n 'Registrations' => $users\n ]));\n\n // 'sick' requests\n $query = $this->Timeoff->find('all', [\n 'fields' => ['month' => 'date_format(created, \"%m %Y\")', 'total' => 'count(*)'],\n 'conditions' => [\n 'Timeoff.created >' => $twelve_months_ago,\n 'Timeoff.request_type' => 'sick'\n ],\n 'group' => ['year(created)', 'month(created)']\n ]);\n $sick = $this->mergeMonths($query, $months);\n\n // 'annual' requests\n $query = $this->Timeoff->find('all', [\n 'fields' => ['month' => 'date_format(created, \"%m %Y\")', 'total' => 'count(*)'],\n 'conditions' => [\n 'Timeoff.created >' => $twelve_months_ago,\n 'Timeoff.request_type' => 'annual'\n ],\n 'group' => ['year(created)', 'month(created)']\n ]);\n $annual = $this->mergeMonths($query, $months);\n\n // 'bonus' requests\n $query = $this->Timeoff->find('all', [\n 'fields' => ['month' => 'date_format(created, \"%m %Y\")', 'total' => 'count(*)'],\n 'conditions' => [\n 'Timeoff.created >' => $twelve_months_ago,\n 'Timeoff.request_type' => 'bonus'\n ],\n 'group' => ['year(created)', 'month(created)']\n ]);\n $bonus = $this->mergeMonths($query, $months);\n\n $this->set('graph_timeoff_points', json_encode([\n 'Sick' => $sick,\n 'Annual' => $annual,\n 'Bonus' => $bonus\n ]));\n\n }", "title": "" }, { "docid": "423ea061f1e7d18480448c557be711d7", "score": "0.55290645", "text": "public function infografisincubation()\n\t{\n auth_redirect();\n\n $current_user = smit_get_current_user();\n $is_admin = as_administrator($current_user);\n\n $headstyles = smit_headstyles(array(\n // Default CSS Plugin\n BE_PLUGIN_PATH . 'node-waves/waves.css',\n BE_PLUGIN_PATH . 'animate-css/animate.css',\n // Morris Chart CSS Plugin\n BE_PLUGIN_PATH . 'morrisjs/morris.css',\n ));\n\n $loadscripts = smit_scripts(array(\n // Default JS Plugin\n BE_PLUGIN_PATH . 'node-waves/waves.js',\n BE_PLUGIN_PATH . 'jquery-slimscroll/jquery.slimscroll.js',\n // Morrist Chart JS Plugin\n BE_PLUGIN_PATH . 'raphael/raphael.min.js',\n BE_PLUGIN_PATH . 'morrisjs/morris.js',\n // Always placed at bottom\n BE_JS_PATH . 'admin.js',\n // Put script based on current page\n ));\n\n $scripts_add = '';\n $scripts_init = smit_scripts_init(array(\n 'Charts.init();'\n ));\n\n $data['title'] = TITLE . 'Info Grafis Inkubasi';\n $data['user'] = $current_user;\n $data['is_admin'] = $is_admin;\n $data['headstyles'] = $headstyles;\n $data['scripts'] = $loadscripts;\n $data['scripts_add'] = $scripts_add;\n $data['scripts_init'] = $scripts_init;\n $data['main_content'] = 'infografis/incubation';\n \n $chart = array();\n $stats = '';\n if ( $stats = $this->Model_Incubation->stats_monthly() ) {\n // Pivoting\n\t\t\t$pivot = array();\n\t\t\tforeach( $stats as $row ) {\n $category = $row->category;\n\n\t\t\t\tif ( ! isset( $pivot[ $row->period ] ) )\n\t\t\t\t\t$pivot[ $row->period ] = array();\n\n\t\t\t\tif ( ! isset( $pivot[ $row->period ][ 'total' ] ) )\n\t\t\t\t\t$pivot[ $row->period ][ 'total' ] = 0;\n\n\t\t\t\t$pivot[ $row->period ][ 'period_name' ] = $row->period_name;\n\t\t\t\t$pivot[ $row->period ][ 'total' ] += $row->total;\n\t\t\t\t$pivot[ $row->period ][ $category ] = $row->total;\n\t\t\t}\n\n $slug_arr = smit_category_slug();\n $name_arr = smit_category_name();\n\n $chart['xkey'] = 'period';\n $chart['ykeys'] = $slug_arr;\n $chart['labels'] = $name_arr;\n\n foreach( $pivot as $period => $row ) {\n $chart_arr = array('period' => $period);\n foreach($slug_arr as $slug){\n $chart_arr[$slug] = smit_isset( $row[ $slug ], 0 );\n }\n $chart_arr['total'] = $row['total'];\n\n // chart\n\t\t\t\t$chart['data'][] = $chart_arr;\n }\n }\n\n $chart_year = array();\n $stats_yearly = '';\n if ( $stats_yearly = $this->Model_Incubation->stats_yearly() ) {\n // Pivoting\n\t\t\t$pivot_yearly = array();\n\t\t\tforeach( $stats_yearly as $row ) {\n $category = $row->category;\n\n\t\t\t\tif ( ! isset( $pivot_yearly[ $row->period ] ) )\n\t\t\t\t\t$pivot_yearly[ $row->period ] = array();\n\n\t\t\t\tif ( ! isset( $pivot_yearly[ $row->period ][ 'total' ] ) )\n\t\t\t\t\t$pivot_yearly[ $row->period ][ 'total' ] = 0;\n\n\t\t\t\t$pivot_yearly[ $row->period ][ 'total' ] += $row->total;\n\t\t\t\t$pivot_yearly[ $row->period ][ $category ] = $row->total;\n\t\t\t}\n\n $slug_arr = smit_category_slug();\n $name_arr = smit_category_name();\n\n $chart_year['xkey'] = 'period';\n $chart_year['ykeys'] = $slug_arr;\n $chart_year['labels'] = $name_arr;\n\n foreach( $pivot_yearly as $period => $row ) {\n $chart_arr = array('period' => $period);\n foreach($slug_arr as $slug){\n $chart_arr[$slug] = smit_isset( $row[ $slug ], 0 );\n }\n $chart_arr['total'] = $row['total'];\n\n // chart\n\t\t\t\t$chart_year['data'][] = $chart_arr;\n }\n }\n\n $data['chart']\t\t\t= json_encode( $chart );\n $data['chart_year']\t = json_encode( $chart_year );\n $data['stats']\t = $stats;\n $data['stats_yearly']\t= $stats_yearly;\n\n $this->load->view(VIEW_BACK . 'template', $data);\n\t}", "title": "" }, { "docid": "4998f2ccbc9b09dac2843fc30dd385f5", "score": "0.5521876", "text": "function advanced_statistics_get_system_data($chart_id) {\n\t$result = array(\"data\" => array(), \"options\" => array());\n\n\t$dbprefix = elgg_get_config(\"dbprefix\");\n\t$current_site_guid = elgg_get_site_entity()->getGUID();\n\n\tswitch ($chart_id) {\n\t\tcase \"files-users\":\n\t\t\t$data = array();\n\t\t\n\t\t\t$subtype_ids = array();\n\t\t\tif ($subtype_id = get_subtype_id(\"object\", \"file\")) {\n\t\t\t\t$subtype_ids[] = $subtype_id;\n\t\t\t}\n\t\t\tif ($subtype_id = get_subtype_id(\"object\", \"images\")) {\n\t\t\t\t$subtype_ids[] = $subtype_id;\n\t\t\t}\n\t\t\n\t\t\tif (!empty($subtype_ids)) {\n\t\t\t\n\t\t\t\t$query = \"SELECT ue.name as user, count(*) as total\";\n\t\t\t\t$query .= \" FROM \" . $dbprefix . \"entities e\";\n\t\t\t\t$query .= \" JOIN \" . $dbprefix . \"users_entity ue ON e.owner_guid = ue.guid\";\n\t\t\t\t$query .= \" WHERE e.type = 'object' AND e.subtype IN (\" . implode(\", \", $subtype_ids) . \")\";\n\t\t\t\t$query .= \" AND e.site_guid = \" . $current_site_guid;\n\t\t\t\t$query .= \" GROUP BY e.owner_guid\";\n\t\t\t\t$query .= \" ORDER BY total DESC\";\n\t\t\t\t$query .= \" LIMIT 0, 25\";\n\t\t\t\t\t\n\t\t\t\tif ($query_result = get_data($query)) {\n\t\t\t\t\tforeach ($query_result as $row) {\n\t\t\t\t\t\t$user = $row->user;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$total = (int) $row->total;\n\t\t\t\t\t\t$data[] = array(elgg_get_excerpt($user, 25), $total);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$result[\"data\"] = array($data);\n\t\t\t\t$result[\"options\"] = advanced_statistics_get_default_chart_options(\"bar\");\n\t\t\t\n\t\t\t\t$result[\"options\"][\"axes\"][\"xaxis\"][\"tickRenderer\"] = \"$.jqplot.CanvasAxisTickRenderer\";\n\t\t\t\t$result[\"options\"][\"axes\"][\"xaxis\"][\"tickOptions\"] = array(\"angle\" => \"-70\", \"fontSize\" => \"8pt\");\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"files-groups\":\n\t\t\t$data = array();\n\t\t\n\t\t\t$subtype_ids = array();\n\t\t\tif ($subtype_id = get_subtype_id(\"object\", \"file\")) {\n\t\t\t\t$subtype_ids[] = $subtype_id;\n\t\t\t}\n\t\t\tif ($subtype_id = get_subtype_id(\"object\", \"images\")) {\n\t\t\t\t$subtype_ids[] = $subtype_id;\n\t\t\t}\n\t\t\n\t\t\tif (!empty($subtype_ids)) {\n\t\t\t\n\t\t\t\t$query = \"SELECT ge.name as user, count(*) as total\";\n\t\t\t\t$query .= \" FROM \" . $dbprefix . \"entities e\";\n\t\t\t\t$query .= \" JOIN \" . $dbprefix . \"groups_entity ge ON e.container_guid = ge.guid\";\n\t\t\t\t$query .= \" WHERE e.type = 'object' AND e.subtype IN (\" . implode(\", \", $subtype_ids) . \")\";\n\t\t\t\t$query .= \" AND e.site_guid = \" . $current_site_guid;\n\t\t\t\t$query .= \" GROUP BY e.container_guid\";\n\t\t\t\t$query .= \" ORDER BY total DESC\";\n\t\t\t\t$query .= \" LIMIT 0, 25\";\n\t\t\t\t\t\n\t\t\t\tif ($query_result = get_data($query)) {\n\t\t\t\t\tforeach ($query_result as $row) {\n\t\t\t\t\t\t$user = $row->user;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$total = (int) $row->total;\n\t\t\t\t\t\t$data[] = array(elgg_get_excerpt($user, 25), $total);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$result[\"data\"] = array($data);\n\t\t\t\t$result[\"options\"] = advanced_statistics_get_default_chart_options(\"bar\");\n\t\t\t\n\t\t\t\t$result[\"options\"][\"axes\"][\"xaxis\"][\"tickRenderer\"] = \"$.jqplot.CanvasAxisTickRenderer\";\n\t\t\t\t$result[\"options\"][\"axes\"][\"xaxis\"][\"tickOptions\"] = array(\"angle\" => \"-70\", \"fontSize\" => \"8pt\");\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$params = array(\n\t\t\t\t\"chart_id\" => $chart_id,\n\t\t\t\t\"default_result\" => $result\n\t\t\t);\n\n\t\t\t$result = elgg_trigger_plugin_hook(\"system\", \"advanced_statistics\", $params, $result);\n\t\t\tbreak;\n\t}\n\n\treturn json_encode($result);\n}", "title": "" }, { "docid": "381b7d1e1d53f2c852d3c463fd5d12e8", "score": "0.55212724", "text": "public function index()\n {\n $weeks = Camping::where('active', 1)->select('week')->distinct()->get();\n $weekly = array();\n\n foreach ($weeks as $week) {\n $week_number = $week['week'];\n $wee = array(\n 'week_number'=>$week_number,\n );\n\n array_push($weekly, $wee);\n }\n\n return ['weekly'=>$weekly];\n }", "title": "" }, { "docid": "cb3b8f12f37d0a505edd1d5faeaa7608", "score": "0.55204004", "text": "function viewschart()\n\t{\n\n\t\t$dt = $this->Session->read('dt');\n\t\t$msview = $this->Session->read('msview');\n\t\t$ytview = $this->Session->read('ytview');\n\t\t$lfmplay = $this->Session->read('lfmplay');\n\n\t\t$this->set('dt',$dt);\n\t\t$this->set('msview',$msview);\n\t\t$this->set('ytview',$ytview);\n\t\t$this->set('lfmplay',$lfmplay);\n\t}", "title": "" }, { "docid": "3c0a4aaffe7f139b8523366f6d78b722", "score": "0.5508111", "text": "function mc_rp_user_month_charts(){\n\n $chart = new Highchart();\n\n $chart->chart = array(\n 'renderTo' => 'container-m',\n 'type' => 'line');\n\n $chart->title = array(\n 'text' => 'Monthly Registration Statistics');\n\n $chart->subtitle->text = 'Isra\\'life Members for '.date(\"Y\");;\n $chart->xAxis->categories = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');\n $chart->yAxis->title->text = 'Members Registration';\n $chart->tooltip->enabled = true;\n $chart->tooltip->crosshairs = true;\n $chart->tooltip->formatter = new HighchartJsExpr(\"function() {\n return '<b>'+ this.series.name +'</b><br/>'+\n this.x +': '+ this.y;\n }\");\n $chart->plotOptions->line->dataLabels->enabled = true;\n $chart->plotOptions->line->enableMouseTracking = true;\n $chart->credits->enabled = false;\n\n foreach(array('Members','Inactive','Stockist') as $series){\n $chart->series[] = array('name' => $series,'data' => mc_rp_user_type($series));\n }\n?>\n<div id=\"container-m\"></div>\n<script type=\"text/javascript\"><?php echo $chart->render(\"chart1\"); ?></script>\n<?php\n}", "title": "" }, { "docid": "c4c8e3ae34fe3d95a0cf8ce612df4ac6", "score": "0.55034035", "text": "public function getUsersCountStat()\n {\n //$userInfo['w'] = $this->getQuery(\"SELECT COUNT(*) AS count , DATE_FORMAT(created_at, '%m/%d/%Y') AS date FROM User WHERE created_at >= DATE_SUB(CURDATE(), INTERVAL 10 WEEK) GROUP BY WEEK( created_at )\",true) ;\n \n //$userInfo['m'] = $this->getQuery(\"SELECT COUNT(*) AS count , DATE_FORMAT(created_at, '%m/%d/%Y') AS date FROM User WHERE created_at >= DATE_SUB(CURDATE(), INTERVAL 10 MONTH) GROUP BY YEAR( created_at ) , MONTH( created_at )\",true) ;\n \n $dDates[] = date('Y-m-d');\n for($i=1; $i<=10; $i++) $dDates[] = date('Y-m-d', strtotime(\"- \" . $i . \" Days\"));\n $i=0;\n foreach($dDates as $dDate)\n {\n if($dDates[$i+1])\n {\n $dayQueries[] = (\"(SELECT COUNT(*) AS count FROM User WHERE (DATE(created_at)= '\".$dDates[$i].\"')) AS '\" . ($dDates[$i]) . \"'\") ;\n }\n $i++;\n }\n //print_r($dayQueries);\n $userInfo['d'] = $this->getQuery('SELECT ' . implode(' , ', $dayQueries),true) ;\n\n $wDates[] = date('Y-m-d');\n for($i=1; $i<=10; $i++) $wDates[] = date('Y-m-d', strtotime(\"- \" . $i . \" Week\"));\n $i=0;\n foreach($wDates as $wDate)\n {\n if($wDates[$i+1])\n {\n $weekQueries[] = (\"(SELECT COUNT(*) AS count FROM User WHERE (created_at <= '\".$wDates[$i].\"' AND created_at >= '\".$wDates[$i+1].\"')) AS '\" . ($wDates[$i]) . \"'\") ;\n }\n $i++;\n }\n $userInfo['w'] = $this->getQuery('SELECT ' . implode(' , ', $weekQueries),true) ;\n \n $mDates[] = date('Y-m');\n //for($i=1; $i<=10; $i++) $mDates[] = date('Y-m-d', strtotime(\"- \" . $i . \" Month\"));\n for ($i = 1; $i <= 10; $i++) {$mDates[] = date(\"Y-m\", strtotime( date( 'Y-m-01' ).\" -$i months\"));}\n //print_r($mDates);\n $i=0;\n foreach($mDates as $mDate)\n {\n if($mDates[$i+1])\n {\n //$mnthQueries[] = (\"(SELECT COUNT(*) AS count FROM User WHERE (created_at <= '\".$mDates[$i].\"' AND created_at >= '\".$mDates[$i+1].\"')) AS '\" . ($mDates[$i]) . \"'\") ;\n $mnthQueries[] = (\"(SELECT COUNT(*) AS count FROM User WHERE (date_format(created_at, '%Y-%m')= '\".$mDates[$i].\"')) AS '\" . ($mDates[$i]) . \"'\") ;\n }\n $i++;\n }\n $userInfo['m'] = $this->getQuery('SELECT ' . implode(' , ', $mnthQueries),true) ;\n \n return $userInfo ;\n }", "title": "" }, { "docid": "cfde111c35f3af2a33a514332ce0eb8e", "score": "0.55032134", "text": "public function usertime($userid) {\n\n // Set the Report.\n $report = array(\n 'Report' => array(\n 'name' => 'Task Types',\n 'startdate' => null,\n 'enddate' => null,\n 'datewindow' => '-3 months',\n 'rankorder' => '',\n 'ranklimit' => null,\n 'sortorder' => null,\n ),\n 'Filter' => array(),\n 'ReportDimension' => array(\n array(\n 'model' => 'DimensionTime',\n 'parameter' => '0',\n 'type' => '1',\n 'Dimension' => array()\n ),\n array(\n 'model' => 'DimensionTime',\n 'parameter' => '0',\n 'type' => '2',\n 'Dimension' => array()\n )\n ),\n 'ReportValue' => array(\n array(\n 'value_id' => '1',\n 'parameter' => '1',\n 'Value' => array(\n 'name' => 'Count activity',\n 'model' => 'Action',\n 'field' => '*',\n 'type' => '1',\n )\n )\n ),\n 'where' => array(\n 'Person.id' => $userid\n )\n );\n\n $current_user = $this->get_currentUser();\n\n $systems = $this->System->find('all', array(\n 'conditions' => array('customer_id' => $current_user['Member']['customer_id'])\n ));\n $systems = Set::extract($systems, '{n}.System');\n\n $report['System'] = $systems;\n\n $dimensions = $this->Report->getDimensions($report);\n\n $data = $this->Report->getLabelledReportData(\n 'COUNT(*)', // Select\n 'Action', // From\n false, // Date cache\n $this->Report->getLabelledAxis($dimensions, $report), // x-Axis\n $report['where'],\n $systems\n );\n\n $series = array();\n foreach($data as $label => $values) {\n $scaleK = array_keys($values);\n $series[] = array(\n 'text' => $label,\n 'values' => array_values($values)\n );\n }\n\n $chart = array(\n 'graphset' => array(\n array(\n 'id' => 'usertime',\n 'x' => '0%',\n 'y' => '0%',\n 'width' => '100%',\n 'height' => '100%',\n 'type' => 'radar',\n 'legend' => array(\n 'layout' => 'x4',\n 'marker' => array(\n 'type' => 'circle'\n )\n ),\n 'tooltip' => array(\n 'text' => \"%v\"\n ),\n 'plot' => array(\n 'aspect' => 'rose'\n ),\n 'scale-k' => array(\n 'aspect' => 'circle',\n 'values' => $scaleK\n ),\n 'series' => $series\n )\n )\n );\n return new CakeResponse(array('body' => json_encode($chart)));\n }", "title": "" }, { "docid": "09d98484bd8d882101a19157bc20f0c7", "score": "0.5495102", "text": "public function lineChartsData()\n {\n $numMonths = 8;\n\n $months = array();\n\n for ($i=1; $i <= $numMonths; $i++) {\n\n $time = strtotime(sprintf('-%s month', $i));\n\n $months[] = array(\n 'from' => date('Y-m-d 00:00:00', strtotime('first day of this month', $time)),\n 'to' => date('Y-m-d 23:59:59', strtotime('last day of this month', $time)),\n 'date' => date('Y-m', $time),\n );\n }\n\n $months = array_reverse($months);\n\n $data = array();\n\n foreach($months as $m) {\n\n $monthFrom = $m['from'];\n $monthTo = $m['to'];\n\n // Convert to unix\n $monthFromUnix = strtotime($monthFrom);\n $monthToUnix = strtotime($monthTo);\n\n $placed = $this->getCreatedOrders($monthFrom, $monthTo);\n $assigned = $this->getCompletedOrders($monthFrom, $monthTo);\n $completed = $this->getAssignedOrders($monthFrom, $monthTo);\n $canceled = $this->getCanceledOrders($monthFrom, $monthTo);\n\n\n $placedCount = $placed ? $placed->count() : 0;\n $assignedCount = $assigned ? $assigned->count() : 0;\n $completedCount = $completed ? $completed->count() : 0;\n $canceledCount = $canceled ? $canceled->count() : 0;\n\n\n $data[ $m['date'] ] = array(\n 'placed' => $placedCount,\n 'assigned' => $assignedCount,\n 'completed' => $completedCount,\n 'canceled' => $canceledCount,\n );\n }\n\n $jsCode = array();\n\n foreach($data as $d => $v) {\n $jsCode[] = [\n 'datetime' => $d, \n 'a' => $v['placed'], \n 'b' => $v['assigned'], \n 'c' => $v['completed'], \n 'd' => $v['canceled'],\n ];\n \n }\n\n return $jsCode;\n }", "title": "" }, { "docid": "a6cdd5246490cd81e9089c2b16345cb5", "score": "0.5473954", "text": "function get_graphics_json_data()\n {\n $mysqli = Connector::get_connection();\n\n return json_encode(array(\n 'earnings' => $this->fetch_data('earning', $mysqli),\n 'spendings' => $this->fetch_data('spending', $mysqli),\n 'global' => $this->fetch_global_data($mysqli)\n ));\n }", "title": "" }, { "docid": "1d9926e7031375e14ebc118962a1fd36", "score": "0.54708606", "text": "public function GetJSON() {\n\t\t\t// initialize result\n\t\t\t$result = Array();\n\t\t\t// get database\n\t\t\t$db = new mgDatabaseStream(DB_TABLE_ANALYTICS, DB_SELECT, Array(DB_FIELD_RELATED=>$this->related), Array(DB_FIELD_STAMP=>DB_SORTCOLUMN_ASC));\n\t\t\t// check db\n\t\t\tif($db->result==DB_OK) {\n\t\t\t\t// initialize\n\t\t\t\t$result = Array(\n\t\t\t\t\t\"mindate\"=>false,\n\t\t\t\t\t\"maxdate\"=>false,\n\t\t\t\t\t\"events\"=>Array()\n\t\t\t\t);\n\t\t\t\t// cycle\n\t\t\t\tforeach($db->getall() as $row) {\n\t\t\t\t\t// parse row\n\t\t\t\t\t$meta = @unserialize(@$row[DB_FIELD_META]);\n\t\t\t\t\t$stamp = @$row[DB_FIELD_STAMP];\n\t\t\t\t\t$source = @$row[DB_FIELD_SOURCE];\n\t\t\t\t\t$impressions = @$meta[ANALYTICS_IMPRESSIONS];\n\t\t\t\t\t$uniques = @$meta[ANALYTICS_UNIQUES];\n\t\t\t\t\t// update date\n\t\t\t\t\tif($result[\"mindate\"]===false||$stamp<$result[\"mindate\"]) {$result[\"mindate\"] = $stamp;}\n\t\t\t\t\tif($result[\"maxdate\"]===false||$stamp>$result[\"maxdate\"]) {$result[\"maxdate\"] = $stamp;}\n\t\t\t\t\t// sanity check\n\t\t\t\t\tif($source&&strlen($source)!=0) {\n\t\t\t\t\t\t// check type\n\t\t\t\t\t\tswitch(@$row[DB_FIELD_TYPE]) {\n\t\t\t\t\t\t\t// (events)\n\t\t\t\t\t\t\tcase ANALYTICS_TYPE_EVENT:\n\t\t\t\t\t\t\t\t// test event\n\t\t\t\t\t\t\t\tif(!isset($result[\"events\"][$source])) {\n\t\t\t\t\t\t\t\t\t$result[\"events\"][$source] = Array(\n\t\t\t\t\t\t\t\t\t\t\"data\"=>Array(\"impressions\"=>Array(), \"uniques\"=>Array()),\n\t\t\t\t\t\t\t\t\t\t\"dates\"=>Array()\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// record graph data\n\t\t\t\t\t\t\t\t$result[\"events\"][$source][\"data\"][\"impressions\"][] = $impressions;\n\t\t\t\t\t\t\t\t$result[\"events\"][$source][\"data\"][\"uniques\"][] = $uniques;\n\t\t\t\t\t\t\t\t// add date data\n\t\t\t\t\t\t\t\t$result[\"events\"][$source][\"dates\"][$stamp] = Array(\n\t\t\t\t\t\t\t\t\t\"uniques\"=>$uniques,\n\t\t\t\t\t\t\t\t\t\"impressions\"=>$impressions\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// process string\n\t\t\t\t$result[\"datestring\"] = sprintf(\"%s - %s\", \n\t\t\t\t\tdate(\"F j, Y\", $result[\"mindate\"]),\n\t\t\t\t\tdate(\"F j, Y\", $result[\"maxdate\"])\n\t\t\t\t);\n\t\t\t}\n\t\t\t// return\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "b21dc3559b8afeb02d202ccf8b4b10f6", "score": "0.5458038", "text": "public function piechart() {\n\t\t\t$this->set('title_for_layout', 'Energy Use Piechart');\n\t\t\t$this->set('cssIncludes', array());\n\t\t\t$this->set('jsIncludes', array('http://cdnjs.cloudflare.com/ajax/libs/d3/2.10.0/d3.v2.min.js', 'nv.d3'));\n\n\t\t\t$this->loadModel('Data');\n\t\t\t$opts = array('conditions' => array('Sensor.type' => 'electricity'));\n\t\t\t$sensors = $this->Sensor->find('all', $opts);\n\t\t\t$sensors_values = array();\n\t\t\t$count = 0;\n\n\t\t\t//should create php object and then push all at once\n\t\t\techo '<script> window.feeds = [];</script>';\n\t\t\tforeach ($sensors as $sensor) {\n\t\t\t\tif ($this->contractExists($sensor['Sensor']['room_id'], $this->Auth->user('id'))) {\n\t\t\t\t\t$count++;\n\t\t\t\t\t$sensor_values = array();\n\t\t\t\t\t$data = $sensor['Data'];\n\t\t\t\t\tforeach ($data as $datum) {\n\t\t\t\t\t\tarray_push($sensor_values, $datum['value']);\n\t\t\t\t\t}\n\t\t\t\t\t$final = array('name' => $sensor['Sensor']['name'], 'values' => $sensor_values);\n\n\t\t\t\t\t//problematic piece of code below -- compose in php and then push.\n\t\t\t\t\techo '<script> window.feeds.push(' . json_encode($final) . ');</script>';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "66bd1f9f6d74ea63a8320bb83208effb", "score": "0.5451047", "text": "public function index()\n {\n $dt = Carbon::now();\n $now = $dt->format('Y-m-d');\n $d = array();\n $events = array();\n $dataset = array();\n $user = Auth::user();\n $count = 0; // プロットの色,形を決めるためのカウンタ\n $todayDataCount = Health::where('userId', $user['email'])->where('date', $now)->count();\n $tmp_dataset = Health::where('userId', $user['email'])->orderBy('date', 'asc')->get();\n\n foreach ($tmp_dataset as $data) {\n $data = json_decode($data, true);\n\n // 心と体の症状の数をカウント\n foreach ($data as $key => $value) {\n if ($key === 'heart' || $key === 'body') {\n $tmp = explode(',', $value);\n\n if ($tmp[0] !== '') {\n $count += count($tmp);\n }\n }\n }\n\n if ($data['menstruation'] === 'あり') {\n if ($count === 0) {\n $plot = 'w_redstar.png';\n } else {\n $plot = 'redstar.png';\n }\n } else if ($data['menstruation'] === 'なし') {\n if ($count === 0) {\n $plot = 'w_dotpoint.png';\n } else {\n $plot = 'dotpoint.png';\n }\n }\n\n $data['plot'] = $plot;\n $dataset[] = $data;\n $count = 0;\n }\n\n return view('index')->with(['data' => $d, 'dataset' => $dataset, 'events' => $events, 'count' => $todayDataCount]);\n }", "title": "" }, { "docid": "284428a342820efb364b15411964cf98", "score": "0.5445656", "text": "public function overall_chart($user_id, $type){\n\t\t\t$date_cond = $type == 'M' ? date('Y-m-').'%' : date('Y-').'%';\n\t\t\t$sql = \"select is_plan, SUM( TIME_TO_SEC(TIMEDIFF(end, start))) as count from tsk_plan where app_users_id = '$user_id' \n\t\t\tand is_deleted = 'N' and type = 'D' and status != 'P' and date_format(start, '%Y-%m-%d') like '$date_cond' group by is_plan\"; \n\t\t\t$result = $this->query($sql);\n\t\t\t$planned = ''; $unplanned = '';\n\t\t\tforeach($result as $res){\n\t\t\t\tswitch($res['tsk_plan']['is_plan']){\n\t\t\t\t\tcase 'Y':\n\t\t\t\t\t$planned = $res[0]['count'];\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'N':\n\t\t\t\t\t$unplanned = $res[0]['count'];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$work_sec = 3600; // 60 * 60\n\t\t\t$planned_hr = floor($planned / $work_sec );\n\t\t\t$unplanned_hr = floor($unplanned / $work_sec);\n\t\t\t\n\t\t\t$tot_plan_hr = $planned_hr.'|'.$unplanned_hr;\n\t\t\n\t\t\n\t\treturn $tot_plan_hr;\n\t\t\n\t}", "title": "" }, { "docid": "ec80a913d1120fb327f70c411fd0b7c3", "score": "0.5440174", "text": "public static function graph() {\n\t\tself::render(array('urlJSON' => self::url('graphJSON', self::$logType)));\n\t}", "title": "" }, { "docid": "f58de0f1e35a836de93d8849f63492a6", "score": "0.54388976", "text": "public function execute()\n {\n $data = $this->getRequest()->getParams();\n $chartUrl = '';\n if ($data['chartType'] == 'diagram') {\n $chartUrl = $this->_objectManager->create(\n 'Webkul\\Marketplace\\Block\\Account\\Dashboard\\Diagrams'\n )->getSellerStatisticsGraphUrl($data['dateType']);\n } elseif ($data['chartType'] == 'location') {\n $chartUrl = $this->_objectManager->create(\n 'Webkul\\Marketplace\\Block\\Account\\Dashboard\\LocationChart'\n )->getSellerStatisticsGraphUrl($data['dateType']);\n } elseif ($data['chartType'] == 'category') {\n $chartUrl = $this->_objectManager->create(\n 'Webkul\\Marketplace\\Block\\Account\\Dashboard\\CategoryChart'\n )->getSellerStatisticsGraphUrl($data['dateType']);\n }\n $this->getResponse()->representJson(\n $this->_objectManager->get('Magento\\Framework\\Json\\Helper\\Data')\n ->jsonEncode($chartUrl)\n );\n }", "title": "" }, { "docid": "257033710769564df6652821a8f6f567", "score": "0.5437413", "text": "public function getActivitySummary($user_id) {\n $query = $this->find()->where([\n 'user_id' => $user_id,\n 'YEAR(Activities.start_date)' => date('Y'), // Current year\n ]);\n\n return [\n 'year' => $this->processStats($query),\n 'month' => $this->getMonthStats($query),\n 'week' => $this->getWeekStats($query),\n ];\n }", "title": "" }, { "docid": "1c78cdf788aa2e090c990b026bb0d158", "score": "0.54255646", "text": "public function getDataReporting() {\n\t\t$params = $this->getComponentParams ();\n\t\t\n\t\t// Perform the authentication management before going on\n\t\t$authenticationData = $this->authentication ( $params );\n\t\tif($authenticationData) {\n\t\t\treturn $authenticationData;\n\t\t}\n\t\t\n\t\t// New Service instance for the API, Google_Service_Analytics\n\t\t$service = new Google_Service_Analytics ( $this->client );\n\t\t$serviceReporting = new Google_Service_AnalyticsReporting( $this->client );\n\t\t\n\t\t$projectId = $this->getSitesProfiles ( $service, $this->client, $params );\n\t\t\n\t\tif ( $projectId instanceof Exception ) {\n\t\t\t$this->deleteToken();\n\t\t\t$this->app->enqueueMessage ( $projectId->getMessage (), 'warning' );\n\t\t\treturn '<a class=\"btn btn-primary\" href=\"index.php?option=com_jmap&amp;task=google.display\">' . JText::_ ( 'COM_JMAP_GOBACK' ) . '</a>';\n\t\t}\n\t\t\n\t\tif ($this->app->input->get('gaquery')) {\n\t\t\t$gaquery = $this->app->input->get('gaquery');\n\t\t} else {\n\t\t\t$gaquery = \"sessions\";\n\t\t}\n\t\t\n\t\t// Evaluate if the metric exists in this API, there could be an API change with incompatible metric so fallback in this case\n\t\tif(!in_array($gaquery, array('users', 'pageviews', 'bounceRate', 'organicSearches', 'sessions'))) {\n\t\t\t$gaquery = \"sessions\";\n\t\t}\n\t\t\n\t\tif ($this->app->input->get('gaperiod')) {\n\t\t\t$gaperiod = $this->app->input->get('gaperiod');\n\t\t} else {\n\t\t\t$gaperiod = \"last30days\";\n\t\t}\n\t\t\n\t\textract($this->getPeriod ( $gaperiod ));\n\t\t$title = $this->getTitle ( $gaquery );\n\t\t\n\t\t// Create the DateRange object\n\t\t$dateRange = new Google_Service_AnalyticsReporting_DateRange();\n\t\t$dateRange->setStartDate($from);\n\t\t$dateRange->setEndDate($to);\n\t\t\n\t\t// Create the Metric object\n\t\t$sessions = new Google_Service_AnalyticsReporting_Metric();\n\t\t$sessions->setExpression(\"ga:\" . $gaquery);\n\t\t$sessions->setAlias($gaquery);\n\t\t\n\t\t//Create the Dimensions object.\n\t\t$dimensionsArray = array();\n\t\tif ($gaperiod == \"today\" or $gaperiod == \"yesterday\") {\n\t\t\t$dimensionsHour = new Google_Service_AnalyticsReporting_Dimension();\n\t\t\t$dimensionsHour->setName(\"ga:hour\");\n\t\t\t$dimensionsArray = array($dimensionsHour);\n\t\t} else {\n\t\t\t$dimensionsYear = new Google_Service_AnalyticsReporting_Dimension();\n\t\t\t$dimensionsYear->setName(\"ga:year\");\n\t\t\t$dimensionsMonth = new Google_Service_AnalyticsReporting_Dimension();\n\t\t\t$dimensionsMonth->setName(\"ga:month\");\n\t\t\t$dimensionsDay = new Google_Service_AnalyticsReporting_Dimension();\n\t\t\t$dimensionsDay->setName(\"ga:day\");\n\t\t\t$dimensionsArray = array($dimensionsYear, $dimensionsMonth, $dimensionsDay);\n\t\t}\n\t\t\n\t\t// Create the ReportRequest object.\n\t\t$request = new Google_Service_AnalyticsReporting_ReportRequest();\n\t\t$request->setViewId($projectId);\n\t\t$request->setDateRanges($dateRange);\n\t\t$request->setMetrics(array($sessions));\n\t\t$request->setDimensions($dimensionsArray);\n\t\t\n\t\ttry {\n\t\t\t// Execute the ReportRequest Get for the main graph data\n\t\t\t$getRequest = new Google_Service_AnalyticsReporting_GetReportsRequest();\n\t\t\t$getRequest->setReportRequests( array( $request) );\n\t\t\t$response = $serviceReporting->reports->batchGet( $getRequest );\n\t\t\t$rows = $response->getReports()[0]->getData()->getRows();\n\t\t} catch ( Exception $e ) {\n\t\t\t$this->app->enqueueMessage ( $e->getMessage (), 'error' );\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(!empty($rows)) {\n\t\t\t$gadash_data = null;\n\t\t\tfor($rowIndex = 0; $rowIndex < count($rows); $rowIndex ++) {\n\t\t\t\t$row = $rows[ $rowIndex ];\n\t\t\t\t$rowMetrics = $row->getMetrics();\n\t\t\t\t$rowDimensions = $row->getDimensions();\n\t\t\t\t$rowValues = $rowMetrics[0]->getValues();\n\t\t\t\tif ($gaperiod == \"today\" or $gaperiod == \"yesterday\") {\n\t\t\t\t\t$gadash_data .= \"['\" . $rowDimensions [0] . \":00',\" . round ( $rowValues [0], 2 ) . \"],\";\n\t\t\t\t} else {\n\t\t\t\t\t$gadash_data .= \"['\" . $rowDimensions [0] . \"-\" . $rowDimensions [1] . \"-\" . $rowDimensions [2] . \"',\" . round ( $rowValues [0], 2 ) . \"],\";\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$gadash_data = \"[0,0]\";\n\t\t}\n\t\t\n\t\t// Setup the textual data stats\n\t\t$sessions = new Google_Service_AnalyticsReporting_Metric();\n\t\t$sessions->setExpression(\"ga:sessions\");\n\t\t$sessions->setAlias('sessions');\n\t\t\n\t\t$users = new Google_Service_AnalyticsReporting_Metric();\n\t\t$users->setExpression(\"ga:users\");\n\t\t$users->setAlias('users');\n\t\t\n\t\t$pageViews = new Google_Service_AnalyticsReporting_Metric();\n\t\t$pageViews->setExpression(\"ga:pageviews\");\n\t\t$pageViews->setAlias('pageviews');\n\t\t\n\t\t$bounceRate = new Google_Service_AnalyticsReporting_Metric();\n\t\t$bounceRate->setExpression(\"ga:bounceRate\");\n\t\t$bounceRate->setAlias('bounceRate');\n\t\t\n\t\t$organicSearches = new Google_Service_AnalyticsReporting_Metric();\n\t\t$organicSearches->setExpression(\"ga:organicSearches\");\n\t\t$organicSearches->setAlias('organicSearches');\n\t\t\n\t\t$sessionDuration = new Google_Service_AnalyticsReporting_Metric();\n\t\t$sessionDuration->setExpression(\"ga:sessionDuration\");\n\t\t$sessionDuration->setAlias('sessionDuration');\n\t\t\n\t\t$dimensionYear = new Google_Service_AnalyticsReporting_Dimension();\n\t\t$dimensionYear->setName(\"ga:year\");\n\t\t$dimensionYear = array($dimensionYear);\n\t\t\n\t\t$request->setMetrics(array($sessions, $users, $pageViews, $bounceRate, $organicSearches, $sessionDuration));\n\t\t$request->setDimensions($dimensionYear);\n\t\t\n\t\t// Execute the ReportRequest Get for the textual stats\n\t\t$getRequest = new Google_Service_AnalyticsReporting_GetReportsRequest();\n\t\t$getRequest->setReportRequests( array( $request) );\n\t\t$response = $serviceReporting->reports->batchGet($getRequest);\n\t\t$rows = $response->getReports()[0]->getData()->getRows();\n\t\t\n\t\t$textualData = array(null,null,null,null,null,null);\n\t\tif(!empty($rows)) {\n\t\t\t$row = $rows[0];\n\t\t\t$rowMetrics = $row->getMetrics();\n\t\t\t$textualData = $rowMetrics[0]->getValues();\n\t\t}\n\t\t\n\t\t$code = $this->getFirstStepCode ( $title, $gadash_data, $showevery );\n\t\t\n\t\t$getVisitsByCountry = $this->getReportingSessionMetric ( $serviceReporting, $request, 'ga:country' );\n\t\tif ($getVisitsByCountry) {\n\t\t\t$code .= $this->getVisitsByCountryCode ( $getVisitsByCountry );\n\t\t}\n\t\t\n\t\t$getTrafficSources = $this->getReportingSessionMetric ( $serviceReporting, $request, 'ga:medium' );\n\t\t$getNewReturnVisitors = $this->getReportingSessionMetric ( $serviceReporting, $request, 'ga:userType' );\n\t\tif ($getTrafficSources && $getNewReturnVisitors) {\n\t\t\t$getTrafficSources = JString::str_ireplace('(none)', 'direct', $getTrafficSources);\n\t\t\t$code .= $this->getTrafficCode ( $getTrafficSources, $getNewReturnVisitors );\n\t\t}\n\t\t\n\t\t$getTopPages = $this->getReportingTopPages ( $serviceReporting, $request );\n\t\tif ($getTopPages) {\n\t\t\t$code .= $this->getTopPagesCode ( $getTopPages );\n\t\t}\n\t\t\n\t\t$getTopReferrers = $this->getReportingTopReferrers ( $serviceReporting, $request );\n\t\tif ($getTopReferrers) {\n\t\t\t$code .= $this->getTopReferrers ( $getTopReferrers );\n\t\t}\n\t\t\n\t\t$getTopSystems = $this->getReportingTopSystems ( $serviceReporting, $request );\n\t\tif ($getTopSystems) {\n\t\t\t$code .= $this->getTopSystems ( $getTopSystems );\n\t\t}\n\t\t\n\t\t$getTopSearches = $this->getReportingTopSearches ( $serviceReporting, $request );\n\t\tif ($getTopSearches) {\n\t\t\t$code .= $this->getTopSearches ( $getTopSearches );\n\t\t}\n\t\t\n\t\t$code .= $this->getWindowResize() .\n\t\t($this->currentProfile->getWebsiteUrl() ? \"<span class='label label-primary label-large'>\" . $this->currentProfile->getWebsiteUrl() . \"</span>\" : null) .\n\t\t($this->hasOwnCredentials ? null : \"<span data-content='\" . JText::_('COM_JMAP_GOOGLE_APP_NOTSET_DESC') . \"' class='label label-warning hasPopover google pull-right'>\" . JText::_('COM_JMAP_GOOGLE_APP_NOTSET') . \"</span>\") .\n\t\t'<div id=\"ga-dash\">' .\n\t\t\t$this->getPeriodButtons($gaperiod) .\n\t\t\t'<div class=\"panel panel-info panel-group panel-group-google\" id=\"jmap_googlegraph_accordion\">\n\t\t\t\t<div class=\"panel-heading accordion-toggle\" data-toggle=\"collapse\" data-target=\"#jmap_googlestats_graph\">\n\t\t\t\t<h4><span class=\"glyphicon glyphicon-stats\"></span> ' . JText::_ ('COM_JMAP_GOOGLE_STATS' ) . '</h4>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"jmap_googlestats_graph\" class=\"panel-body panel-collapse collapse\" >' .\n\t\t\t\t\t$this->getMetricButtons($gaquery, 'users', 'pageviews', 'bounceRate', 'organicSearches', 'sessions') .\n\t\t\t\t'<div id=\"gadash_div\" style=\"height:350px;\"></div>\n\t\t\t\t<table class=\"gatable\" cellpadding=\"4\" width=\"100%\" align=\"center\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"33%\"><span class=\"label\">' . JText::_ ( 'COM_JMAP_GOOGLE_VISITS' ) . ':</span>\n\t\t\t\t\t\t<a href=\"javascript:void(0);\" class=\"gatable\">' . $textualData[0] . '</td>\n\t\t\t\t\t\t<td width=\"33%\"><span class=\"label\">' . JText::_ ( 'COM_JMAP_GOOGLE_VISITORS' ) . ':</span>\n\t\t\t\t\t\t<a href=\"javascript:void(0);\" class=\"gatable\">' . $textualData[1] . '</a></td>\n\t\t\t\t\t\t<td width=\"33%\"><span class=\"label\">' . JText::_ ( 'COM_JMAP_GOOGLE_PAGE_VIEWS' ) . ':</span>\n\t\t\t\t\t\t<a href=\"javascript:void(0);\" class=\"gatable\">' . $textualData[2] . '</a></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"33%\"><span class=\"label\">' . JText::_ ( 'COM_JMAP_GOOGLE_BOUNCE_RATE' ) . ':</span>\n\t\t\t\t\t\t<a href=\"javascript:void(0);\" class=\"gatable\">' . round ( $textualData[3], 2 ) . '%</a></td>\n\t\t\t\t\t\t<td width=\"33%\"><span class=\"label\">' . JText::_ ( 'COM_JMAP_GOOGLE_ORGANIC_SEARCHES' ) . ':</span>\n\t\t\t\t\t\t<a href=\"javascript:void(0);\" class=\"gatable\">' . $textualData[4] . '</a></td>\n\t\t\t\t\t\t<td width=\"33%\"><span class=\"label\">' . JText::_ ( 'COM_JMAP_GOOGLE_PAGES_VISIT' ) . ':</span>\n\t\t\t\t\t\t<a href=\"javascript:void(0);\" class=\"gatable\">' . (($textualData[0]) ? round ( $textualData[2] / $textualData[0], 2 ) : '0') . '</a></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</div>';\n\n\t\t$multiReports = $this->getMultiReports ('COM_JMAP_GOOGLE_MAP', 'COM_JMAP_GOOGLE_TRAFFIC', 'COM_JMAP_GOOGLE_REFERRERS', 'COM_JMAP_GOOGLE_SEARCHES', 'COM_JMAP_GOOGLE_SYSTEMS', 'COM_JMAP_GOOGLE_PAGES');\n\t\t$code .= $multiReports;\n\t\t$code .= '</div>';\n\t\t\n\t\treturn $code;\n\t}", "title": "" }, { "docid": "0e6246e308694fee09a063fe9dc00e7e", "score": "0.54131216", "text": "function displayDashBoard(){\n try {\n $mysql = \"SELECT * FROM activitylog\";\n $stmt = $this->dbconn->prepare($mysql);\n $stmt->execute();\n $data = $stmt->fetchAll();\n $result = array();\n foreach($data as $moviedata) {\n $jsonformat[\"ActivityLogID\"] = $moviedata[\"ActivityLogID\"];\n $jsonformat[\"IpAddress\"] = $moviedata[\"IpAddress\"];\n $jsonformat[\"DateAndTime\"] = $moviedata[\"DateAndTime\"];\n $jsonformat[\"BrowserType\"] = $moviedata[\"BrowserType\"];\n $jsonformat[\"Action\"] = $moviedata[\"Action\"];\n $jsonformat[\"UserID\"] = $moviedata[\"UserID\"];\n array_push($result, $jsonformat);\n }\n return $result; \n return true;\n }\n catch (PDOException $ex) {\n throw $ex;\n }\n }", "title": "" }, { "docid": "9a495f53b24ed9ba6775c9f422063f20", "score": "0.53963625", "text": "public function week_sales()\n {\n if(\\strtolower(Auth::user()->role) == 'admin'){\n $orders = Order::selectRaw('SUM(total_price) as sales, DAYOFWEEK(created_at) as day')\n ->whereRaw('WEEK(created_at) = WEEK(CURDATE())')->groupBy('day')->get();\n }else{\n $orders = Order::where('branch_id', Auth::user()->branch_id)->selectRaw('SUM(total_price) as sales, DAYOFWEEK(created_at) as day')\n ->whereRaw('WEEK(created_at) = WEEK(CURDATE())')->groupBy('day')->get();\n }\n return response()->json(\n [\n 'orders' => $orders\n ]\n );\n }", "title": "" }, { "docid": "b1ba417e19e920cd4f9e516e63b9a340", "score": "0.53884524", "text": "public function analytics()\n {\n $labels = Report_crime::with('admin')->get();\n $admin= DB::table('admins')->where('status',0)->get();\n $type = Type::all();\n\n $chart = Charts::database($labels,'bar','highcharts')\n ->title('Crime rate in Nairobi')\n ->groupBy('admin_id')\n ->elementLabel('Number of reported crimes')\n // ->values([5,10,20,15,30])\n ->dimensions(1000,500)\n ->responsive(false);\n\n return view('client/client_analytics',['chart'=>$chart,'admin'=>$admin,'type'=>$type]);\n }", "title": "" }, { "docid": "b745d9a888c986fc0f99b8e548bd1737", "score": "0.53865135", "text": "public function index()\n {\n $zoom = new Zoom();\n $user = $zoom::user()->first();\n return response()->json($user->meetings()->all());\n }", "title": "" }, { "docid": "7f137f679e4f162d4599f76c24ccd5fd", "score": "0.5383301", "text": "public function loadDashboard(){\n\n $HTMLView = (String) view('dashBoard.dashBoard')->with(['top_count' => self::get_count(),'new_count' => self::getNewCount(),'formal_doctor_count' => self::getFormalNewCount(),'nonformal_doctor_count' => self::getNonFormalNewCount()]);\n $res['page'] = $HTMLView;\n return response()->json($res);\n }", "title": "" }, { "docid": "67b4867efc4c1a46b59f5494fce0d48a", "score": "0.53785795", "text": "public function dashboard(){\n $data['current_page'] = $_SERVER['REQUEST_URI'];\n $data['title'] = \"Dashboard\";\n $data['welcomeMessage'] = \"Welcom to the Admin Panel Dashboard!\";\n\n /** Get Data For Member Totals Stats Sidebar **/\n $onlineUsers = new MembersModel();\n $data['activatedAccounts'] = count($onlineUsers->getActivatedAccounts());\n $data['onlineAccounts'] = count($onlineUsers->getOnlineAccounts());\n\n /** Get Count Data For Groups **/\n $data['usergroups'] = count($this->model->getAllGroups());\n\n /** Get Count of Members that Have Logged In Past Days **/\n $data['mem_login_past_1'] = count($this->model->getPastUsersData('LastLogin', '1'));\n $data['mem_login_past_7'] = count($this->model->getPastUsersData('LastLogin', '7'));\n $data['mem_login_past_30'] = count($this->model->getPastUsersData('LastLogin', '30'));\n $data['mem_login_past_90'] = count($this->model->getPastUsersData('LastLogin', '90'));\n $data['mem_login_past_365'] = count($this->model->getPastUsersData('LastLogin', '365'));\n\n /** Get Count of Members that Have Signed Up In Past Days **/\n $data['mem_signup_past_1'] = count($this->model->getPastUsersData('SignUp', '1'));\n $data['mem_signup_past_7'] = count($this->model->getPastUsersData('SignUp', '7'));\n $data['mem_signup_past_30'] = count($this->model->getPastUsersData('SignUp', '30'));\n $data['mem_signup_past_90'] = count($this->model->getPastUsersData('SignUp', '90'));\n $data['mem_signup_past_365'] = count($this->model->getPastUsersData('SignUp', '365'));\n\n /** Get total page views count **/\n $data['totalPageViews'] = \\Libs\\SiteStats::getTotalViews();\n\n /** Get Current UAP Version Data From UserApplePie.com **/\n $html = file_get_contents('http://www.userapplepie.com/uapversion.php?getversion=UAP');\n preg_match(\"/UAP v(.*) UAP/i\", $html, $match);\n $cur_uap_version = UAPVersion;\n if($cur_uap_version < $match[1]){ $data['cur_uap_version'] = $match[1]; }\n\n /** Check to see if Forum Plugin is Installed **/\n if(file_exists(ROOTDIR.'app/Plugins/Forum/Controllers/Forum.php')){\n $forum_status = \"Installed\";\n /** Get Current UAP Version Data From UserApplePie.com **/\n $html = file_get_contents('http://www.userapplepie.com/uapversion.php?getversion=Forum');\n preg_match(\"/UAP-Forum v(.*) UAP-Forum/i\", $html, $match);\n require_once(ROOTDIR.'app/Plugins/Forum/ForumVersion.php');\n $cur_uap_forum_version = UAPForumVersion;\n if($cur_uap_forum_version < $match[1]){ $data['cur_uap_forum_version'] = $match[1]; }\n }else{\n $forum_status = \"NOT Installed\";\n }\n $data['apd_plugin_forum'] = $forum_status;\n\n /** Check to see if Private Messages Plugin is Installed **/\n if(file_exists(ROOTDIR.'app/Plugins/Messages/Controllers/Messages.php')){\n $msg_status = \"Installed\";\n /** Get Current UAP Version Data From UserApplePie.com **/\n $html = file_get_contents('http://www.userapplepie.com/uapversion.php?getversion=Messages');\n preg_match(\"/UAP-Messages v(.*) UAP-Messages/i\", $html, $match);\n require_once(ROOTDIR.'app/Plugins/Messages/MessagesVersion.php');\n $cur_uap_messages_version = UAPMessagesVersion;\n if($cur_uap_messages_version < $match[1]){ $data['cur_uap_messages_version'] = $match[1]; }\n }else{\n $msg_status = \"NOT Installed\";\n }\n $data['apd_plugin_message'] = $msg_status;\n\n // Setup Breadcrumbs\n $data['breadcrumbs'] = \"\n <li><a href='\".DIR.\"AdminPanel'><i class='fa fa-fw fa-cog'></i> Admin Panel</a></li>\n <li class='active'><i class='fa fa-fw fa-dashboard'></i> \".$data['title'].\"</li>\n \";\n\n /** Check to see if user is logged in **/\n if($data['isLoggedIn'] = $this->auth->isLogged()){\n /** User is logged in - Get their data **/\n $u_id = $this->auth->user_info();\n $data['currentUserData'] = $this->user->getCurrentUserData($u_id);\n if($data['isAdmin'] = $this->user->checkIsAdmin($u_id) == 'false'){\n /** User Not Admin - kick them out **/\n \\Libs\\ErrorMessages::push('You are Not Admin', '');\n }\n }else{\n /** User Not logged in - kick them out **/\n \\Libs\\ErrorMessages::push('You are Not Logged In', 'Login');\n }\n\n Load::View(\"AdminPanel/AdminPanel\", $data, \"AdminPanel::AP-Sidebar::Left\", \"AdminPanel\");\n }", "title": "" }, { "docid": "f27b63666ddf9c21389a3a9e539c02ac", "score": "0.53781277", "text": "public function index()\n {\n\n // checking to see if get variable tour is set and assigning the value of 1, else assigning the value of 0.\n $tour = isset($_GET['tour']) ? 1 : 0;\n\n // returns the correct step in onboarding based off what step the user has completed already.\n $step = OnBoardingController::checkOnboardStep();\n if ($step) {\n return OnBoardingController::onBoardTriager($step);\n }\n\n // joining monthly_expenses and monthly_category tables returning the result set per authenticated user.\n $monthly_expenses = DB::table('monthly_expenses')\n ->join('monthly_category', 'monthly_category.id', 'monthly_expenses.monthly_category_id')\n ->where('user_id', '=', auth()->user()->id)\n ->get();\n\n // joining daily_expenses and daily_category tables returning the result set per authenticated user.\n $daily_expenses = DB::table('daily_expenses')\n ->join('daily_category', 'daily_category.id', 'daily_expenses.daily_category_id')\n ->where('user_id', '=', auth()->user()->id)\n ->select('daily_expenses.*')\n ->get();\n\n // returns the daily_expenses along with daily_category_title for the last week\n $daily_title = DailyExpense::join('daily_category', 'daily_category.id', 'daily_expenses.daily_category_id')\n ->where('user_id', '=', auth()->user()->id)\n ->where('daily_expenses.created_at', '>', DB::raw('CURDATE() - INTERVAL 1 WEEK'))\n ->select('daily_expenses.*', 'daily_category.title')\n ->orderby('daily_expenses.created_at', 'desc')\n ->get();\n\n // loop through the DAILY_CATEGORY_IDS\n // running a Query Builder to retrieve the $key and $val\n $expense_chart_data = [];\n foreach (Category::DAILY_CATEGORY_IDS as $key => $val) {\n $category_expenses = DailyExpense::join('daily_category', 'daily_category.id', 'daily_expenses.daily_category_id')\n ->where('user_id', '=', auth()->user()->id)\n ->where('daily_expenses.daily_category_id', '=', $key)\n ->where('daily_expenses.created_at', '>', DB::raw('CURDATE() - INTERVAL 6 DAY'))// get expenses for the last week\n ->select(DB::raw('DATE_FORMAT(daily_expenses.created_at, \"%m-%d-%Y\") as theDay'), DB::raw('SUM(daily_expenses.amount) as sum'), 'daily_category.id', 'daily_category.title')\n ->groupBy('theDay')\n ->get();\n $expense_chart_data[$val] = $category_expenses;\n }\n\n // the result set is converted to json to be used in ChartJs\n $expense_chart_data = json_encode($expense_chart_data);\n\n // returning monthly expenses with the monthly_expense type id = INCOME\n $income =\n DB::table('monthly_expenses')\n ->where('user_id', '=', auth()->user()->id)\n ->where('type_id', '=', Type::INCOME)\n ->sum('amount');\n\n // returning monthly expenses with the monthly_expense type id = EXPENSE\n $expense =\n DB::table('monthly_expenses')\n ->where('user_id', '=', auth()->user()->id)\n ->where('type_id', '=', Type::EXPENSE)\n ->sum('amount');\n\n // returning daily_expenses on or after reference date per authenticated user\n $daily_value =\n DB::table('daily_expenses')\n ->join('users', 'users.id', '=', 'daily_expenses.user_id')\n ->where('daily_expenses.user_id', '=', auth()->user()->id)\n ->whereRaw('daily_expenses.created_at >= users.reference_date')\n ->sum('amount');\n\n // returns the save_percent per authenticated user\n $save_percent =\n DB::table('users')\n ->where('id', '=', auth()->user()->id)\n ->select('save_percent')\n ->get();\n\n // returns the time between the reference date and next sunday in seconds\n $next_sunday = date('Y-m-d', strtotime('next sunday'));\n $datediff = strtotime($next_sunday) - strtotime(auth()->user()->reference_date);\n $daysBetween = floor($datediff / (60 * 60 * 24));\n\n // returns the difference between the user's monthly income and monthly expense in the onboarding\n $monthly_sum = $income - $expense;\n\n // returns the save percent per authenticated user\n $monthly_savings = auth()->user()->save_percent;\n\n $savings_sum = $monthly_sum * $monthly_savings;\n\n $monthly_total = $monthly_sum - $savings_sum;\n\n $daily_total = ($monthly_total * 12) / 365;\n\n // returns the weekly amount pro rated to sunday set to two decimal places\n $weekly_amount = number_format(($daysBetween * $daily_total) - $daily_value, 2);\n\n return view('home', compact('monthly_expenses', 'daily_expenses', 'daily_title',\n 'expense_chart_data', 'weekly_amount', 'daily_value', 'monthly_category', 'save_percent',\n 'reference_date', 'tour'));\n }", "title": "" }, { "docid": "e147d1fb7e270b5b0aa66b6a120fe8c7", "score": "0.5368105", "text": "public function getDetailOverviewUpCommingPregame(){\n $this->layout = 'ajax';\n $authUser = $this->Auth->user();\n $CustomerID = $authUser['customerId'];\n $data = $this->Account->getUpComingPreGameXXmins(array(\"CustomerID\" => $CustomerID, \"mins\" => 60, \"period\" => 2, 'appid' => 'pregamesite', 'userid' => $CustomerID));\n $this->set('data', $data);\n $this->render('json'); \n }", "title": "" }, { "docid": "21bc8df6cce1a205acf10019916a6a85", "score": "0.5367791", "text": "public function fetchDailySessionsLastMonthsByChartsFilter($geoList,$tierText)\r\n {\r\n date_default_timezone_set(\"Africa/Lagos\");\r\n \r\n $yday = date(\"Y-m-d\",strtotime(\"-1 days\"));\r\n $yday = \"\" .strtotime(date($yday . \" 00:00:00\")) * 1000;\r\n $today = \"\" . strtotime(date(\"Y-m-d 00:00:00\")) * 1000;\r\n \r\n $monthsYear = $this->getPrevious12Months();\r\n \r\n \r\n \r\n $chartPages = array(\r\n\r\n 'Trained HWs'=>'charts_coverage_cummhwtrained',\r\n 'Facilities with Trained HWs'=>'charts_coverage_percentfacswithtrainedhw',\r\n 'Facilities Providing FP'=>'charts_coverage_percentfacsproviding',\r\n 'Facilities providing FP over time'=>'charts_coverage_providingovertime',\r\n 'Facilities with trained HWs providing FP'=>'charts_coveragefacswithhwproviding',\r\n 'Facilities with Trained HWs providing FP over time'=>'charts_coverage_coverageovertime',\r\n 'Commodity Consumption'=>'charts_consumption_consumption',\r\n 'New FP acceptors and current FP users'=>'charts_consumption_newandcurrentfpusers',\r\n 'stock outs at facilities with trained HWS'=>'charts_stockout_percentstockoutwithtrainedhw',\r\n 'Stock out at facilities providing FP'=>'charts_stockout_percentfacsprovidingbutstockedout',\r\n 'stock outs at facilities providing FP over time'=>'charts_stockout_stockouts'\r\n \r\n );\r\n \r\n $perMonthPage = array();\r\n \r\n \r\n \r\n $metricClient = new MetricClient();\r\n \r\n foreach ($monthsYear as $k1=>$dates)\r\n {\r\n $pages = array();\r\n foreach($chartPages as $k=>$val)\r\n {\r\n $query = array(\r\n array('$match'=>array('module_name'=>'charts','page_id'=>$val,'month'=>$dates['month'].'','year'=>$dates['year'].'','millidate' => array('$lte'=>$today))),\r\n array('$lookup'=>array(\r\n 'from'=>'users',\r\n 'localField'=>'userid',\r\n 'foreignField'=>'id',\r\n 'as'=>'users'\r\n )),\r\n array('$unwind'=>'$users'),\r\n array('$unwind'=>'$users.'.$tierText),\r\n array('$match'=>array('users.'.$tierText=>array('$in'=>$geoList))),\r\n array('$sort'=>array('userid'=>1,'millidate'=>-1))\r\n );\r\n\r\n $cursorJson = $metricClient->handleDataGet($query,array(),'aggregate','metrics');\r\n\r\n $jsonData = json_decode($cursorJson,TRUE);\r\n\r\n $sessions = 0;\r\n for($i=0; $i < count($jsonData)-2; $i++)\r\n {\r\n if(isset($jsonData[$i]['userid']) && isset($jsonData[$i+1]['userid'])\r\n && isset($jsonData[$i]['millidate']) && isset($jsonData[$i+1]['millidate'])){\r\n if($jsonData[$i]['userid'] == $jsonData[$i+1]['userid'])\r\n {\r\n $diff = $jsonData[$i]['millidate'] - $jsonData[$i+1]['millidate'];\r\n\r\n\r\n if($diff >= 900000)\r\n {\r\n $sessions++;\r\n }\r\n }\r\n }\r\n }\r\n \r\n $pages[$k] = $sessions; \r\n }\r\n $pages['timeline'] = substr($dates['month'],0,3) . ' ' . $dates['year'];\r\n $perMonthPage[] = $pages;\r\n \r\n }\r\n \r\n return json_encode($perMonthPage);\r\n }", "title": "" }, { "docid": "5076a1bc8a92fe3ce708c56a1ae8a66f", "score": "0.5359497", "text": "public function get_data_grafics(){\n $torta1 = $this->Dao_efectividad_model->get_estado_voc_vs_tipo_estado();\n $total = $this->data_graphic_process_all($torta1);\n echo json_encode($total);\n }", "title": "" }, { "docid": "75fa85eef5a2425a0f0f7b14cac747bc", "score": "0.5346835", "text": "public function cacheDailySessionsLastMonthsByCharts($geoList,$tierText)\r\n {\r\n date_default_timezone_set(\"Africa/Lagos\");\r\n \r\n $yday = date(\"Y-m-d\",strtotime(\"-1 days\"));\r\n $yday = \"\" .strtotime(date($yday . \" 00:00:00\")) * 1000;\r\n $today = \"\" . strtotime(date(\"Y-m-d 00:00:00\")) * 1000;\r\n \r\n $monthsYear = $this->getPrevious12Months();\r\n \r\n $chartPages = array(\r\n\r\n 'Trained HWs'=>'charts_coverage_cummhwtrained',\r\n 'Facilities with Trained HWs'=>'charts_coverage_percentfacswithtrainedhw',\r\n 'Facilities Providing FP'=>'charts_coverage_percentfacsproviding',\r\n 'Facilities providing FP over time'=>'charts_coverage_providingovertime',\r\n 'Facilities with trained HWs providing FP'=>'charts_coveragefacswithhwproviding',\r\n 'Facilities with Trained HWs providing FP over time'=>'charts_coverage_coverageovertime',\r\n 'Commodity Consumption'=>'charts_consumption_consumption',\r\n 'New FP acceptors and current FP users'=>'charts_consumption_newandcurrentfpusers',\r\n 'stock outs at facilities with trained HWS'=>'charts_stockout_percentstockoutwithtrainedhw',\r\n 'Stock out at facilities providing FP'=>'charts_stockout_percentfacsprovidingbutstockedout',\r\n 'stock outs at facilities providing FP over time'=>'charts_stockout_stockouts'\r\n \r\n );\r\n \r\n $perMonthPage = array();\r\n \r\n \r\n \r\n $metricClient = new MetricClient();\r\n \r\n foreach ($monthsYear as $k1=>$dates)\r\n {\r\n $pages = array();\r\n foreach($chartPages as $k=>$val)\r\n {\r\n $query = array(\r\n array('$match'=>array('module_name'=>'charts','page_id'=>$val,'month'=>$dates['month'].'','year'=>$dates['year'].'','millidate' => array('$lte'=>$today))),\r\n array('$lookup'=>array(\r\n 'from'=>'users',\r\n 'localField'=>'userid',\r\n 'foreignField'=>'id',\r\n 'as'=>'users'\r\n )),\r\n array('$unwind'=>'$users'),\r\n array('$unwind'=>'$users.'.$tierText),\r\n array('$match'=>array('users.'.$tierText=>array('$in'=>$geoList))),\r\n array('$sort'=>array('userid'=>1,'millidate'=>-1))\r\n );\r\n\r\n $cursorJson = $metricClient->handleDataGet($query,array(),'aggregate','metrics');\r\n\r\n $jsonData = json_decode($cursorJson,TRUE);\r\n\r\n $sessions = 0;\r\n for($i=0; $i < count($jsonData)-2; $i++)\r\n {\r\n if(isset($jsonData[$i]['userid']) && isset($jsonData[$i+1]['userid'])\r\n && isset($jsonData[$i]['millidate']) && isset($jsonData[$i+1]['millidate'])){\r\n if($jsonData[$i]['userid'] == $jsonData[$i+1]['userid'])\r\n {\r\n $diff = $jsonData[$i]['millidate'] - $jsonData[$i+1]['millidate'];\r\n\r\n\r\n if($diff >= 900000)\r\n {\r\n $sessions++;\r\n }\r\n }\r\n }\r\n }\r\n \r\n $pages[$k] = $sessions; \r\n }\r\n $pages['timeline'] = substr($dates['month'],0,3) . ' ' . $dates['year'];\r\n $perMonthPage[] = $pages;\r\n \r\n }\r\n file_put_contents(\"charts_total_daily_sessions.json\", json_encode($perMonthPage)); \r\n return json_encode($perMonthPage);\r\n }", "title": "" }, { "docid": "0df804be0c3c264f1afd343b9cd0350f", "score": "0.5343853", "text": "public function customerAnalysis(Request $request)\n {\n // Get the data requested for\n $data = (is_numeric($request->customer) ? User::findOrFail($request->customer)->panelData() : PanelData::where('id', '>', 0));\n\n // Filter panel data by duration\n if($request->chart_filter == 'today') $data = $data->whereDate('panel_data.created_at', Carbon::today());\n if($request->chart_filter == 'week') $data = $data->whereBetween('panel_data.created_at', [Carbon::now()->startOfWeek(), Carbon::now()->endOfWeek()]);\n if($request->chart_filter == 'month') $data = $data->whereMonth('panel_data.created_at', date('m'))->whereYear('panel_data.created_at', date('Y'));\n if($request->chart_filter == '3month')$data = $data->whereMonth('panel_data.created_at', '>=', Carbon::now()->subMonth(3)->month);\n if($request->chart_filter == 'year') $data = $data->whereYear('panel_data.created_at', date('Y'));\n if($request->chart_filter == 'today') $data = $data->whereYear('panel_data.created_at', date('Y')); \n\n // Get the current carbon cost\n $record = CarbonPrice::where('active', 1)->orderBy('created_at', 'desc')->first();\n $carbonPrice = $record->value;\n $energy = $data->sum('energy');\n $credits = $energy/($record->credit_rate);\n\n $stats = [\n 'energy' => $energy,\n 'credits' => $credits,\n 'amount' => $credits * $carbonPrice,\n ];\n\n // Return response data\n return response()->json([\n 'customers'=> User::ofType('customer')->get(['id','name']),\n 'chart'=>[\n 'data'=> $this->generateChartData($data, $request->chart_filter),\n ],\n 'activeCustomer' => is_numeric($request->customer) ? User::with('location')->findOrFail($request->customer): $request->customer,\n 'stats' => $stats,\n ]);\n }", "title": "" }, { "docid": "6964d7f8179b9a05991f52f59fc48db6", "score": "0.5342031", "text": "public function initChart()\r\n {\r\n $days = 6;\r\n $this->lastDaysStartDate = date('Y-m-d', strtotime(\"-$days days\"));\r\n for ($i = $days; $i > 0; $i--) {\r\n $this->lastDays[] = array(\r\n 'display' => date('D, M d', strtotime(\"-$i days\")) ,\r\n 'conditions' => array(\r\n '#MODEL#.created >=' => date('Y-m-d 00:00:00', strtotime(\"-$i days\")) ,\r\n '#MODEL#.created <=' => date('Y-m-d 23:59:59', strtotime(\"-$i days\"))\t\t\t\t\t\r\n )\r\n );\r\n }\r\n $this->lastDays[] = array(\r\n 'display' => date('D, M d') ,\r\n 'conditions' => array(\r\n '#MODEL#.created >=' => date('Y-m-d 00:00:00', strtotime('now')) ,\r\n '#MODEL#.created <=' => date('Y-m-d H:i:s', strtotime('now')) ,\r\n )\r\n );\r\n //# last weeks date settings\r\n $timestamp_end = strtotime('last Saturday');\r\n $weeks = 3;\r\n $this->lastWeeksStartDate = date('Y-m-d', $timestamp_end-((($weeks*7) -1) *24*3600));\r\n for ($i = $weeks; $i > 0; $i--) {\r\n $start = $timestamp_end-((($i*7) -1) *24*3600);\r\n $end = $start+(6*24*3600);\r\n $this->lastWeeks[] = array(\r\n 'display' => date('M d', $start) . ' - ' . date('M d', $end) ,\r\n 'conditions' => array(\r\n '#MODEL#.created >=' => date('Y-m-d', $start) ,\r\n '#MODEL#.created <=' => date('Y-m-d', $end) ,\r\n )\r\n );\r\n }\r\n $this->lastWeeks[] = array(\r\n 'display' => date('M d', $timestamp_end+24*3600) . ' - ' . date('M d') ,\r\n 'conditions' => array(\r\n '#MODEL#.created >=' => date('Y-m-d', $timestamp_end+24*3600) ,\r\n '#MODEL#.created <=' => date('Y-m-d')\r\n )\r\n );\r\n //# last months date settings\r\n $months = 2;\r\n $this->lastMonthsStartDate = date('Y-m-01', strtotime(\"-$i months\", strtotime(date(\"F\") . \"1\")));\r\n for ($i = $months; $i > 0; $i--) {\r\n $this->lastMonths[] = array(\r\n 'display' => date('M, Y', strtotime(\"-$i months\")) ,\r\n 'conditions' => array(\r\n '#MODEL#.created >=' => date('Y-m-01', strtotime(\"-$i months\")) ,\r\n '#MODEL#.created <=' => date('Y-m-t', strtotime(\"-$i months\")) ,\r\n )\r\n );\r\n }\r\n $this->lastMonths[] = array(\r\n 'display' => date('M, Y') ,\r\n 'conditions' => array(\r\n '#MODEL#.created >=' => date('Y-m-01', strtotime('now')) ,\r\n '#MODEL#.created <=' => date('Y-m-t', strtotime('now')) ,\r\n )\r\n );\r\n //# last years date settings\r\n $years = 2;\r\n $this->lastYearsStartDate = date('Y-01-01', strtotime(\"-$years years\"));\r\n for ($i = $years; $i > 0; $i--) {\r\n $this->lastYears[] = array(\r\n 'display' => date('Y', strtotime(\"-$i years\")) ,\r\n 'conditions' => array(\r\n '#MODEL#.created >=' => date('Y-01-01', strtotime(\"-$i years\")) ,\r\n '#MODEL#.created <=' => date('Y-12-31', strtotime(\"-$i years\")) ,\r\n )\r\n );\r\n }\r\n $this->lastYears[] = array(\r\n 'display' => date('Y') ,\r\n 'conditions' => array(\r\n '#MODEL#.created >=' => date('Y-01-01', strtotime('now')) ,\r\n '#MODEL#.created <=' => date('Y-12-31', strtotime('now')) ,\t\t\t\t\r\n )\r\n );\r\n $this->selectRanges = array(\r\n 'lastDays' => __l('Last 7 days') ,\r\n 'lastWeeks' => __l('Last 4 weeks') ,\r\n 'lastMonths' => __l('Last 3 months') ,\r\n 'lastYears' => __l('Last 3 years')\r\n );\r\n }", "title": "" }, { "docid": "729a46878acca300f4aceb3f4dc03ab9", "score": "0.53324884", "text": "public function draw()\n {\n \t$json = datatables()\n \t\t\t->of(request()->user()->accessableUsers())\n \n ->addColumn('designation', function ($user)\n\t {\n\t // return $user->designation->name;\n\t })\n ->addColumn('roles', function ($user)\n\t {\n\t return $user->rolesAsHtml();\n\t })\n ->addColumn('status', function ($sport)\n {\n return $sport->editableStatus;\n })\n ->rawColumns([ 'roles', 'status'])\n \t\t\t->toJson(true);\n\n return $json;\n }", "title": "" }, { "docid": "734785db4567679c8e275f82a4cf2b8c", "score": "0.5332246", "text": "public function loadAccountHistory(){\n $this->layout = 'ajax';\n $authUser = $this->Auth->user();\n $CustomerID = $authUser['customerId'];\n $freePlay=@$_POST[\"freePlay\"];\n $endDate=new DateTime();\n $iniDate=new DateTime();\n date_sub($iniDate, date_interval_create_from_date_string('15 days'));\n $loadAccHis = array();\n $loadAccHis['data'] = $this->Sportbook->getAccountHistory($CustomerID,$freePlay, date_format($iniDate, 'Y-m-d'),date_format($endDate, 'Y-m-d'));\n $this->set('data', $loadAccHis);\n $this->render('json');\n\n }", "title": "" }, { "docid": "004f5357c0d36c370ba0926ab1ef985d", "score": "0.5331388", "text": "public function MSGraphReportedWastage() {\n /*\n Yearly Comparision - National\n */\n $monthval = array(\"JAN\", \"FEB\", \"MAR\", \"APR\", \"MAY\", \"JUN\", \"JUL\", \"AUG\", \"SEP\", \"OCT\", \"NOV\", \"DEC\");\n $post = $this->form_values;\n $products = $post['products'];\n $yearcomp = $post['yearcomp'];\n $all_provinces = $post['all_provinces'];\n $period = new Model_Period();\n $period->form_values = array('id' => $post['period']);\n $months = $period->getPeriodById();\n $location = new Model_Locations();\n $location->form_values['pk_id'] = $all_provinces;\n $location_name = $location->getLocationName();\n $title = \"Reporting Rate and Wastage Comparison (\" . $location_name . \"-\" . $yearcomp[0] . \")\";\n $cache = Zend_Registry::get('cacheManager')->getCache('file');\n $reportedwastages = \"REPORTEDWASTAGES_$post[period]$yearcomp[0]$products[0]$all_provinces\";\n if (!$xmlstore_array = $cache->load($reportedwastages)) {\n for ($k = 0; $k < sizeof($products); $k++) {\n $product_obj = new Model_ItemPackSizes();\n $product_obj->form_values['pk_id'] = $products[$k];\n $product_name = $product_obj->getProductName();\n $xmlstore = \"<chart exportEnabled='1' labelDisplay='rotate' slantLabels='1' yAxisMaxValue='100' exportAction='Download' caption= '$product_name $title ' exportFileName='\" . $title . \" - \" . date('Y-m-d H:i:s') . \" - \" . $product_name . \"' yAxisName='Percentage' numberSuffix='%' showValues='1' formatNumberScale='0' theme='fint'>\";\n $xmlstore .= \"<categories>\";\n for ($i = $months->getBeginMonth(); $i <= $months->getEndMonth(); $i++) {\n $month_name = $monthval[$i - 1];\n $xmlstore .= \"<category label='$month_name' />\";\n }\n $start_date = $yearcomp[0] . '-' . $months->getBeginMonth() . \"-01\";\n $end_date = $yearcomp[0] . '-' . $months->getEndMonth() . \"-01\";\n $sql = \"select REPgetWastage('P','$start_date','$end_date',1,'$products[$k]',$all_provinces,0) as xyz from dual \";\n $str_sql = $this->_em_read->getConnection()->prepare($sql);\n $str_sql->execute();\n $row = $str_sql->fetchAll();\n if (!empty($row)) {\n $filedata1 = explode('*', $row[0]['xyz']);\n }\n $sql = \"select REPgetRR('P','$start_date','$end_date',1,'$products[$k]',$all_provinces,0) as xyz from dual \";\n $str_sql = $this->_em_read->getConnection()->prepare($sql);\n $str_sql->execute();\n $row = $str_sql->fetchAll();\n if (!empty($row)) {\n $filedata2 = explode('*', $row[0]['xyz']);\n }\n $xmlstore .= \"</categories>\";\n $xmlstore .= \"<dataset seriesName='Wastage'>\";\n foreach ($filedata1 as $val2) {\n $xmlstore .= \"<set value='\" . round($val2) . \"' />\";\n }\n $xmlstore .= \"</dataset>\";\n $xmlstore .= \"<dataset seriesName='Reporting Rate'>\";\n foreach ($filedata2 as $val2) {\n $xmlstore .= \"<set value='\" . round($val2) . \"' />\";\n }\n $xmlstore .= \"</dataset>\";\n $obj_product = new Model_ItemPackSizes();\n $prod_result = $obj_product->getProductById($products[0]);\n $xmlstore .=\"<trendlines>\n <line startvalue='\" . $prod_result->getWastageRateAllowed() . \"' color='EE2000' displayvalue='Wastage Allowed:\" . $prod_result->getWastageRateAllowed() . \"%' valueonright='1' />\n </trendlines>\";\n $xmlstore .=\"</chart>\";\n $xmlstore_array[] = $xmlstore;\n }\n $cache->save($xmlstore_array, $reportedwastages);\n }\n return $xmlstore_array;\n }", "title": "" }, { "docid": "e6a59e080e57a60ff6a29e7d1cd16863", "score": "0.5327598", "text": "public static function getLevelChartData(){\n $sql = \"select a.desc as category, a.id as categoryId, count(b.id) as count ,a.color as color from alarm_level a\n left join device_alarm b on a.id = b.alarmLevel where a.id<10\n group by a.id\";\n $rows = Yii::$app->db->createCommand($sql)->queryAll();\n $data = [];\n $categories = [];\n $colors = [];\n foreach($rows as $row){\n $colors[] = $row[\"color\"];\n $data[] = [\n \"name\" => $row[\"category\"],\n \"value\" => (int)$row[\"count\"],\n ];\n $categories[] = $row[\"category\"];\n }\n return [\n \"data\" => $data,\n \"categories\" => $categories,\n \"colors\" => $colors\n ];\n }", "title": "" }, { "docid": "50a4d82c7981fe3cfb55cca9a95acaff", "score": "0.5320279", "text": "function bootstrap_theme3($title=\"\",$content=\"\",$plugins=\"\",$user=\"\",$sub_menu=\"\",$group=\"\"){\n \n \n //Statistik Complaint\n $stat_complaint = mysql_num_rows(mysql_query(\"SELECT * FROM `gx_complaint` WHERE `log_time` LIKE '%\".date(\"Y-m-\").\"%';\"));\n $stat_ticket = mysql_num_rows(mysql_query(\"SELECT * FROM `gx_complaint` WHERE `log_time` LIKE '%\".date(\"Y-m-\").\"%' AND `complaint_type` = 'Problem';\"));\n $stat_nonticket = mysql_num_rows(mysql_query(\"SELECT * FROM `gx_complaint` WHERE `log_time` LIKE '%\".date(\"Y-m-\").\"%' AND `complaint_type` = 'Request';\"));\n \n //Statistik Week\n$year = date(\"Y\"); // Year 2010\n$week1 = isset($_GET[\"w\"]) ? (int)$_GET[\"w\"] : \"\"; // Week 1\n$week = ($week1==\"\") ? date(\"W\") : sprintf(\"%02s\", $week1); // Week 1\n\n\n$data_graph = 'series: [';\n\n$jum_total_complaint = \"\";\n$jum_total_ticket = \"\";\n$jum_total_nonticket = \"\";\n\n$sum_complaint = \"\";\n$sum_ticket = \"\";\n$sum_nonticket = \"\";\n\n$data_complaint = \"\";\n$data_ticket = \"\";\n$data_nonticket = \"\";\n\nfor($i=1;$i<=7; $i++){\n\n$date = date( \"Y-m-d\", strtotime($year.\"W\".$week.\"$i\") ); // First day of week\n\n//echo $date.'<br>';\n\n\t$jum_total_complaint = mysql_num_rows(mysql_query(\"SELECT * FROM `gx_complaint`, `user_details` WHERE\n\t `gx_complaint`.`id_cso` = `user_details`.`user_index` AND\n\t\t `gx_complaint`.`log_time` LIKE '$date%' AND\n\t\t `gx_complaint`.`level` = '0'\"));\n\t\n\t$jum_total_ticket = mysql_num_rows(mysql_query(\"SELECT * FROM `gx_complaint`, `user_details` WHERE\n\t `gx_complaint`.`id_cso` = `user_details`.`user_index` AND\n\t\t `gx_complaint`.`complaint_type` = 'Problem' AND\n\t\t `gx_complaint`.`log_time` LIKE '$date%' AND\n\t\t `gx_complaint`.`level` = '0'\"));\n \n\t$jum_total_nonticket = mysql_num_rows(mysql_query(\"SELECT * FROM `gx_complaint`, `user_details` WHERE\n\t `gx_complaint`.`id_cso` = `user_details`.`user_index` AND\n\t\t `gx_complaint`.`complaint_type` = 'Request' AND\n\t\t `gx_complaint`.`log_time` LIKE '$date%' AND\n\t\t `gx_complaint`.`level` = '0'\"));\n \n$data_complaint .= $jum_total_complaint.\",\";\n$data_ticket .= $jum_total_ticket.\",\";\n$data_nonticket .= $jum_total_nonticket.\",\";\n\n$sum_complaint += $jum_total_complaint;\n$sum_ticket += $jum_total_ticket;\n$sum_nonticket += $jum_total_nonticket;\n\n}\n\n$complaint\t\t= substr($data_complaint, 0, -1);\n$ticket\t\t\t= substr($data_ticket, 0, -1);\n$nonticket\t\t= substr($data_nonticket, 0, -1);\n\n\n//END Statistik week\n \n \n $menu_list = '\n\t\t<li class=\"ic-dashboard\"><a href=\"home.php\"><span>Dashboard</span></a> \n\t\t <!--<ul>\n <li><a href=\"#\">Sub 1</a> </li>\n <li><a href=\"#\">Sub 2</a> </li>\n </ul>-->\n </li>\n\t\t<li class=\"ic-grid-tables\"><a href=\"incoming.php?type=complaint\"><span>Complaint</span></a>\n\t\t \n </li>\n <li class=\"ic-form-style\"><a href=\"report.php?type=list_report\"><span>Daily Report</span></a>\n \n </li>\n\t\t<li class=\"ic-charts\"><a href=\"absensi.php\"><span>Schedule</span></a>\n\t\t \n </li>\n\t\t<li class=\"ic-gallery dd\"><a href=\"download.php\"><span>Download</span></a>\n\t\t \n </li>\n\t\t<!--<li class=\"ic-grid-tables\"><a href=\"#\"><span>Piutang</span></a>\n\t\t \n </li>-->\n\t\t<li class=\"ic-form-style\"><a href=\"incoming.php?type=spktech\"><span>Maintenance</span></a>\n\t\t \n </li>\n <li class=\"ic-notifications\"><a href=\"notifikasi.php\"><span>Notifications</span></a>\n \n </li>\n\t\t<li class=\"ic-dashboard\"><a href=\"logs.php?view=table\"><span>Logs</span></a> \n\t\t \n </li>\n \n ';\n\n \n $sidebar = '<aside class=\"left-side sidebar-offcanvas\">\n <!-- sidebar: style can be found in sidebar.less -->\n <section class=\"sidebar\">\n <!-- sidebar menu: : style can be found in sidebar.less -->\n <ul class=\"sidebar-menu\">';\n //$sidebar .= '<li'.(($sub_menu==\"dashboard\") ? ' class=\"active\"' : '';).'><a href=\"home.php\"><i class=\"fa fa-dashboard\"></i><span>Dashboard</span></a></li>';\n //$sidebar .= '<li'.(($sub_menu==\"widget\") ? ' class=\"active\"' : '';).'><a href=\"pages/widgets.html\"><i class=\"fa fa-th\"></i> <span>Widgets</span> <small class=\"badge pull-right bg-green\">new</small></a></li>';\n //Submenu CSO\n $sidebar .= '<li'.(($sub_menu==\"dashboard\" || $sub_menu==\"complaint\" || $sub_menu==\"administration\" || $sub_menu==\"staff\" || $sub_menu==\"absensi\" || $sub_menu==\"profile\" || $sub_menu==\"mailbox\")\n ? ' class=\"treeview active\"' : ' class=\"treeview\"').'><a href=\"#\"><i class=\"fa fa-edit\"></i><span>Customer Service</span><i class=\"fa fa-angle-left pull-right\"></i></a>\n <ul class=\"treeview-menu\">\n <li'.(($sub_menu==\"dashboard\") ? ' class=\"active\"' : '').'><a href=\"home.php\"><i class=\"fa fa-dashboard\"></i><span>Dashboard</span></a></li>\n <li'.(($sub_menu==\"complaint\") ? ' class=\"active\"' : '').'><a href=\"complaint.php\"><i class=\"fa fa-edit\"></i> Complaint</a></li>\n\t\t\t <li'.(($sub_menu==\"administration\") ? ' class=\"active\"' : '').'><a href=\"administration.php\"><i class=\"fa fa-edit\"></i> Administration</a></li>\n\t\t\t <li'.(($sub_menu==\"absensi\") ? ' class=\"active\"' : '').'><a href=\"absensi.php\"><i class=\"fa fa-edit\"></i> Absensi</a></li>\n\t\t\t <li'.(($sub_menu==\"staff\") ? ' class=\"active\"' : '').'><a href=\"staff.php\"><i class=\"glyphicon glyphicon-user\"></i> Staff</a></li>\n\t\t\t <li'.(($sub_menu==\"profile\") ? ' class=\"active\"' : '').'><a href=\"profile.php\"><i class=\"glyphicon glyphicon-user\"></i> Profile</a></li>\n\t\t\t <li'.(($sub_menu==\"mailbox\") ? ' class=\"active\"' : '').'><a href=\"mailbox.php\"><i class=\"fa fa-envelope\"></i> Mailbox</a></li>\n </ul>\n </li>';\n //Submenu MKT\n $sidebar .= '<li'.(($sub_menu==\"dashboard_mkt\" || $sub_menu==\"prospek\" || $sub_menu==\"nonprospek\" || $sub_menu==\"spk_mkt\" || $sub_menu==\"profile_mkt\") ?' class=\"treeview active\"' : ' class=\"treeview\"').'><a href=\"#\"><i class=\"fa fa-edit\"></i><span>Marketing</span><i class=\"fa fa-angle-left pull-right\"></i></a>\n <ul class=\"treeview-menu\">\n <li'.(($sub_menu==\"dashboard_mkt\") ? ' class=\"active\"' : '').'><a href=\"home.php\"><i class=\"fa fa-dashboard\"></i><span>Dashboard</span></a></li>\n <li'.(($sub_menu==\"prospek\") ? ' class=\"active\"' : '').'><a href=\"list_prospek.php\"><i class=\"fa fa-edit\"></i> List Prospek</a></li>\n\t\t\t <li'.(($sub_menu==\"nonprospek\") ? ' class=\"active\"' : '').'><a href=\"list_nonprospek.php\"><i class=\"fa fa-edit\"></i> List Non Prospek</a></li>\n\t\t\t <li'.(($sub_menu==\"spk_mkt\") ? ' class=\"active\"' : '').'><a href=\"spk_mkt.php\"><i class=\"fa fa-edit\"></i> SPK Marketing</a></li>\n\t\t\t <li'.(($sub_menu==\"profile_mkt\") ? ' class=\"active\"' : '').'><a href=\"profile.php\"><i class=\"glyphicon glyphicon-user\"></i> Profile</a></li>\n </ul>\n </li>';\n //submenu technician\n $sidebar .= '<li'.(($sub_menu==\"dashboard_tech\" || $sub_menu==\"profile_tech\" || $sub_menu==\"spk_tech\") ?' class=\"treeview active\"' : ' class=\"treeview\"').'><a href=\"#\"><i class=\"fa fa-edit\"></i><span>Technician</span><i class=\"fa fa-angle-left pull-right\"></i></a>\n <ul class=\"treeview-menu\">\n <li'.(($sub_menu==\"dashboard_tech\") ? ' class=\"active\"' : '').'><a href=\"home.php\"><i class=\"fa fa-dashboard\"></i><span>Dashboard</span></a></li>\n <li'.(($sub_menu==\"spk_tech\") ? ' class=\"active\"' : '').'><a href=\"spk_tech.php\"><i class=\"fa fa-edit\"></i> SPK Technician</a></li>\n\t\t\t <li'.(($sub_menu==\"profile_tech\") ? ' class=\"active\"' : '').'><a href=\"profile.php\"><i class=\"glyphicon glyphicon-user\"></i> Profile</a></li>\n </ul>\n </li>';\n //submenu Research\n $sidebar .= '<li'.(($sub_menu==\"agenda\" || $sub_menu==\"profile_rd\") ?' class=\"treeview active\"' : ' class=\"treeview\"').'><a href=\"#\"><i class=\"fa fa-edit\"></i><span>Research</span><i class=\"fa fa-angle-left pull-right\"></i></a>\n <ul class=\"treeview-menu\">\n <li'.(($sub_menu==\"agenda\") ? ' class=\"active\"' : '').'><a href=\"agenda.php\"><i class=\"fa fa-edit\"></i> Agenda</a></li>\n\t\t\t <li'.(($sub_menu==\"profile_rd\") ? ' class=\"active\"' : '').'><a href=\"profile.php\"><i class=\"glyphicon glyphicon-user\"></i> Profile</a></li>\n </ul>\n </li>';\n\t\t \n //$sidebar .= '<li'.(($sub_menu==\"dashboard\") ? ' class=\"active\"' : '').'><a href=\"home.php\"><i class=\"fa fa-dashboard\"></i><span>Dashboard</span></a></li>';\n //$sidebar .= '<li'.(($sub_menu==\"dashboard\") ? ' class=\"active\"' : '').'><a href=\"home.php\"><i class=\"fa fa-dashboard\"></i><span>Dashboard</span></a></li>';\n \n $sidebar .= '</ul>\n </section>\n <!-- /.sidebar -->\n </aside>';\n \n \n\t\n\t$riset\t \t = ($sub_menu==\"Dashboard Riset\") ? '<li class=\"displayactive\"><a href=\"agenda.php\">Agenda</a> </li>' : '<li ><a href=\"agenda.php\">Agenda</a> </li>';\n\t$riset\t \t .= ($sub_menu==\"Dashboard Riset\") ? '<li class=\"displayactive\"><a href=\"#\">Profile</a> </li>' : '<li ><a href=\"#\">Profile</a> </li>';\n\t\n\t\n \n $title = ($title != \"\") ? \"Helpdesk Bali (beta) - $title\" : \"Helpdesk Bali (beta)\";\n\n \n //MailBox\n $sql_mailbox = mysql_query(\"SELECT * FROM `gx_email` WHERE `kategori` = '' ORDER BY `DateE` DESC\");\n $sum_mailbox = mysql_num_rows($sql_mailbox);\n\n $template ='<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>'.$title.'</title>\n <meta content=\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\" name=\"viewport\">\n <!-- bootstrap 3.0.2 -->\n <link href=\"'.URL.'css/bootstrap.min.css\" rel=\"stylesheet\" type=\"text/css\" />\n <!-- font Awesome -->\n <link href=\"'.URL.'css/font-awesome.min.css\" rel=\"stylesheet\" type=\"text/css\" />\n <!-- Ionicons -->\n <link href=\"'.URL.'css/ionicons.min.css\" rel=\"stylesheet\" type=\"text/css\" />\n <!-- Morris chart -->\n <link href=\"'.URL.'css/morris/morris.css\" rel=\"stylesheet\" type=\"text/css\" />\n <!-- jvectormap -->\n <link href=\"'.URL.'css/jvectormap/jquery-jvectormap-1.2.2.css\" rel=\"stylesheet\" type=\"text/css\" />\n <!-- fullCalendar -->\n <link href=\"'.URL.'css/fullcalendar/fullcalendar.css\" rel=\"stylesheet\" type=\"text/css\" />\n <!-- Daterange picker -->\n <link href=\"'.URL.'css/daterangepicker/daterangepicker-bs3.css\" rel=\"stylesheet\" type=\"text/css\" />\n <!-- bootstrap wysihtml5 - text editor -->\n <link href=\"'.URL.'css/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css\" rel=\"stylesheet\" type=\"text/css\" />\n <!-- Theme style -->\n <link href=\"'.URL.'css/AdminLTE.css\" rel=\"stylesheet\" type=\"text/css\" />\n\n <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->\n <!-- WARNING: Respond.js doesn\\'t work if you view the page via file:// -->\n <!--[if lt IE 9]>\n <script src=\"https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js\"></script>\n <script src=\"https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js\"></script>\n <![endif]-->\n\t\n\t\n\t\n </head>\n <body class=\"skin-blue\">\n\t <!-- header logo: style can be found in header.less -->\n <header class=\"header\">\n <a href=\"home.php\" class=\"logo\">\n <!-- Add the class icon to your logo image or logo icon to add the margining -->\n Globalxtreme Helpdesk\n </a>\n <!-- Header Navbar: style can be found in header.less -->\n <nav class=\"navbar navbar-static-top\" role=\"navigation\">\n <!-- Sidebar toggle button-->\n <a href=\"#\" class=\"navbar-btn sidebar-toggle\" data-toggle=\"offcanvas\" role=\"button\">\n <span class=\"sr-only\">Toggle navigation</span>\n <span class=\"icon-bar\"></span>\n <span class=\"icon-bar\"></span>\n <span class=\"icon-bar\"></span>\n </a>\n <div class=\"navbar-right\">\n <ul class=\"nav navbar-nav\">\n <!-- Messages: style can be found in dropdown.less-->\n <li class=\"dropdown messages-menu\">\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n <i class=\"fa fa-envelope\"></i>\n <span class=\"label label-danger\">'.$sum_mailbox.'</span>\n </a>\n <ul class=\"dropdown-menu\">\n <li class=\"header\">You have '.$sum_mailbox.' messages</li>\n <li>\n <!-- inner menu: contains the actual data -->\n <ul class=\"menu\">';\n while($row_mailbox = mysql_fetch_array($sql_mailbox)){\n $template .= '<li><!-- start message -->\n <a href=\"form_mailbox.php?id='.$row_mailbox[\"ID\"].'\" onclick=\"return valideopenerform(\\'form_mailbox.php?id='.str_replace(' ', '', $row_mailbox[\"ID\"]).'\\',\\'mailbox'.$row_mailbox[\"ID\"].'\\');\">\n <div class=\"pull-left\">\n <img src=\"img/default_avatar.png\" class=\"img-circle\" alt=\"User Image\"/>\n </div>\n <h4>\n '.$row_mailbox[\"EmailFromP\"].'\n <small><i class=\"fa fa-clock-o\"></i> '.date(\"H:i\", strtotime($row_mailbox[\"DateE\"])).'</small>\n </h4>\n <p>'.$row_mailbox[\"Subject\"].'</p>\n </a>\n </li><!-- end message -->';\n }\n \n $template .='\n </ul>\n </li>\n <li class=\"footer\"><a href=\"mailbox.php\">See All Messages</a></li>\n </ul>\n </li>\n <!-- Notifications: style can be found in dropdown.less -->\n <li class=\"dropdown notifications-menu\">\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n <i class=\"fa fa-warning\"></i>\n <span class=\"label label-warning\">10</span>\n </a>\n <ul class=\"dropdown-menu\">\n <li class=\"header\">You have 10 notifications</li>\n <li>\n <!-- inner menu: contains the actual data -->\n <ul class=\"menu\">\n <li>\n <a href=\"#\">\n <i class=\"ion ion-ios7-people info\"></i> 5 new members joined today\n </a>\n </li>\n <li>\n <a href=\"#\">\n <i class=\"fa fa-warning danger\"></i> Very long description here that may not fit into the page and may cause design problems\n </a>\n </li>\n <li>\n <a href=\"#\">\n <i class=\"fa fa-users warning\"></i> 5 new members joined\n </a>\n </li>\n\n <li>\n <a href=\"#\">\n <i class=\"ion ion-ios7-cart success\"></i> 25 sales made\n </a>\n </li>\n <li>\n <a href=\"#\">\n <i class=\"ion ion-ios7-person danger\"></i> You changed your username\n </a>\n </li>\n </ul>\n </li>\n <li class=\"footer\"><a href=\"#\">View all</a></li>\n </ul>\n </li>\n <!-- Tasks: style can be found in dropdown.less -->\n <li class=\"dropdown tasks-menu\">\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n <i class=\"fa fa-tasks\"></i>\n <span class=\"label label-success\">9</span>\n </a>\n <ul class=\"dropdown-menu\">\n <li class=\"header\">You have 9 tasks</li>\n <li>\n <!-- inner menu: contains the actual data -->\n <ul class=\"menu\">\n <li><!-- Task item -->\n <a href=\"#\">\n <h3>\n Design some buttons\n <small class=\"pull-right\">20%</small>\n </h3>\n <div class=\"progress xs\">\n <div class=\"progress-bar progress-bar-aqua\" style=\"width: 20%\" role=\"progressbar\" aria-valuenow=\"20\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n <span class=\"sr-only\">20% Complete</span>\n </div>\n </div>\n </a>\n </li><!-- end task item -->\n <li><!-- Task item -->\n <a href=\"#\">\n <h3>\n Create a nice theme\n <small class=\"pull-right\">40%</small>\n </h3>\n <div class=\"progress xs\">\n <div class=\"progress-bar progress-bar-green\" style=\"width: 40%\" role=\"progressbar\" aria-valuenow=\"20\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n <span class=\"sr-only\">40% Complete</span>\n </div>\n </div>\n </a>\n </li><!-- end task item -->\n <li><!-- Task item -->\n <a href=\"#\">\n <h3>\n Some task I need to do\n <small class=\"pull-right\">60%</small>\n </h3>\n <div class=\"progress xs\">\n <div class=\"progress-bar progress-bar-red\" style=\"width: 60%\" role=\"progressbar\" aria-valuenow=\"20\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n <span class=\"sr-only\">60% Complete</span>\n </div>\n </div>\n </a>\n </li><!-- end task item -->\n <li><!-- Task item -->\n <a href=\"#\">\n <h3>\n Make beautiful transitions\n <small class=\"pull-right\">80%</small>\n </h3>\n <div class=\"progress xs\">\n <div class=\"progress-bar progress-bar-yellow\" style=\"width: 80%\" role=\"progressbar\" aria-valuenow=\"20\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n <span class=\"sr-only\">80% Complete</span>\n </div>\n </div>\n </a>\n </li><!-- end task item -->\n </ul>\n </li>\n <li class=\"footer\">\n <a href=\"#\">View all tasks</a>\n </li>\n </ul>\n </li>\n <!-- User Account: style can be found in dropdown.less -->\n <li class=\"dropdown user user-menu\">\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n <i class=\"glyphicon glyphicon-user\"></i>\n <span>'.ucfirst($user).' <i class=\"caret\"></i></span>\n </a>\n <ul class=\"dropdown-menu\">\n <!-- User image -->\n <li class=\"user-header bg-light-blue\">\n <img src=\"'.URL.'img/avatar5.png\" class=\"img-circle\" alt=\"User Image\" />\n <p>\n '.ucfirst($user).'\n <small></small>\n </p>\n </li>\n \n <!-- Menu Footer-->\n <li class=\"user-footer\">\n <div class=\"pull-left\">\n <a href=\"#\" class=\"btn btn-default btn-flat\">Profile</a>\n </div>\n <div class=\"pull-right\">\n <a href=\"javascript:logout();\" class=\"btn btn-default btn-flat\">Sign out</a>\n </div>\n </li>\n </ul>\n </li>\n </ul>\n </div>\n </nav>\n </header>\n <div class=\"wrapper row-offcanvas row-offcanvas-left\">\n '.$sidebar.'\n\n <!-- Right side column. Contains the navbar and content of the page -->\n <aside class=\"right-side\">\n '.$content.'\n\t </aside><!-- /.right-side -->\n </div><!-- ./wrapper -->\n \n <div id=\"notification\"></div>\n\n <!-- add new calendar event modal -->\n\n\n <!-- jQuery 2.0.2 -->\n <script src=\"'.URL.'js/jquery.min.js\"></script>\n <!-- jQuery UI 1.10.3 -->\n <script src=\"'.URL.'js/jquery-ui-1.10.3.min.js\" type=\"text/javascript\"></script>\n <!-- Bootstrap -->\n <script src=\"'.URL.'js/bootstrap.min.js\" type=\"text/javascript\"></script>\n \n\t<!-- AdminLTE App -->\n <script src=\"'.URL.'js/AdminLTE/app.js\" type=\"text/javascript\"></script> \n \n\t'.$plugins.'\n\n<script language=\"javascript\">\n//confirm message for logout.\nfunction logout() {\n if (confirm(\"Anda yakin untuk keluar ?\")) {\n\t \n window.location.href = \"logout.php\";\n }\n}\n//open popup window\nfunction valideopenerform(url,title){\n\tvar popy= window.open(url,title,\"toolbar=no, scrollbars=yes, resizable=no, location=no,menubar=no,status=no,top=50%,left=50%,height=550,width=850\")\n\tif (window.focus) {popy.focus()}\n\treturn false;\n }\n</script>\n<!-- Growl Notification -->\n<script src=\"'.URL.'js/plugins/growl/jquery.bootstrap-growl.js\"></script>\n<script type=\"text/javascript\">\n $(function () {\n $.ajaxSetup({ cache: false }); \n setInterval(function() {\n $(\\'#notification\\').load(\\'ajax/notif.php\\');\n }, 20000); \n });\n \n</script>\n</body>\n</html>';\n\n\n\nreturn $template;\n\n}", "title": "" }, { "docid": "64f5e91047801fc8e5c615ff0be64619", "score": "0.53140944", "text": "public function showCharts(\\App\\Request $request)\n\t{\n\t\t$recordId = $request->getInteger('record');\n\t\t$moduleName = $request->getModule();\n\t\t$viewer = $this->getViewer($request);\n\t\t$moduleModel = Vtiger_Module_Model::getInstance('OSSTimeControl');\n\t\tif ($moduleModel) {\n\t\t\t$data = $moduleModel->getTimeUsers($recordId, $moduleName);\n\t\t}\n\t\t$viewer->assign('MODULE_NAME', $moduleName);\n\t\t$viewer->assign('DATA', $data);\n\t\t$viewer->view('charts/ShowTimeProjectUsers.tpl', $moduleName);\n\t}", "title": "" }, { "docid": "31f00fc4b216f10e6fe0dae16e7cb9d2", "score": "0.53079045", "text": "public function get_dashboard()\n\t{\n\t\t// Not sure how best to determine this yet, maybe set an option on install, maybe do this:\n\t\t$firstpostdate = DB::get_value( 'SELECT min(pubdate) FROM {posts} WHERE status = ?', array( Post::status( 'published' ) ) );\n\t\tif ( $firstpostdate ) {\n\t\t\t$this->theme->active_time = HabariDateTime::date_create( $firstpostdate );\n\t\t}\n\n\t\t// check to see if we have updates to display\n\t\t$this->theme->updates = Options::get( 'updates_available', array() );\n\n\t\t// collect all the stats we display on the dashboard\n\t\t$user = User::identify();\n\t\t$this->theme->stats = array(\n\t\t\t'author_count' => Users::get( array( 'count' => 1 ) ),\n\t\t\t'post_count' => Posts::get( array( 'count' => 1, 'content_type' => Post::type( 'any' ), 'status' => Post::status( 'published' ) ) ),\n\t\t\t'comment_count' => Comments::count_total( Comment::STATUS_APPROVED, false ),\n\t\t\t'tag_count' => Tags::vocabulary()->count_total(),\n\t\t\t'user_draft_count' => Posts::get( array( 'count' => 1, 'content_type' => Post::type( 'any' ), 'status' => Post::status( 'draft' ), 'user_id' => $user->id ) ),\n\t\t\t'unapproved_comment_count' => User::identify()->can( 'manage_all_comments' ) ? Comments::count_total( Comment::STATUS_UNAPPROVED, false ) : Comments::count_by_author( User::identify()->id, Comment::STATUS_UNAPPROVED ),\n\t\t\t'spam_comment_count' => $user->can( 'manage_all_comments' ) ? Comments::count_total( Comment::STATUS_SPAM, false ) : Comments::count_by_author( $user->id, Comment::STATUS_SPAM ),\n\t\t\t'user_scheduled_count' => Posts::get( array( 'count' => 1, 'content_type' => Post::type( 'any' ), 'status' => Post::status( 'scheduled' ), 'user_id' => $user->id ) ),\n\t\t);\n\n\t\t$this->fetch_dashboard_modules();\n\n\t\t// check for first run\n\t\t$u = User::identify();\n\t\tif ( ! isset( $u->info->experience_level ) ) {\n\t\t\t$this->theme->first_run = true;\n\t\t\t$u->info->experience_level = 'user';\n\t\t\t$u->info->commit();\n\t\t}\n\t\telse {\n\t\t\t$this->theme->first_run = false;\n\t\t}\n\n\t\t$this->display( 'dashboard' );\n\t}", "title": "" }, { "docid": "08c49d3fd7719061e06e82684a11fcf4", "score": "0.52993715", "text": "public function statistics(StatisticsAttendanceRequest $request): JsonResponse\n {\n $user = $request->user();\n $numberOfWeeks = intval($request->input('range', '52'));\n $startDay = now()->subWeeks($numberOfWeeks)->startOfDay();\n $endDay = now();\n\n // Get average attendance by day of week from the range given. Selects the weekday number and the weekday name\n // so it can be sorted more easily; the number is trimmed out in the map method\n $attendanceByDay = Attendance::whereBetween('created_at', [$startDay, $endDay])\n ->where('attendable_type', \\App\\Team::class)\n ->selectRaw('date_format(created_at, \\'%w%W\\') as day, count(gtid) as aggregate')\n ->groupBy('day')\n ->orderBy('day', 'asc')\n ->get()\n ->mapWithKeys(static function (object $item) use ($numberOfWeeks): array {\n return [substr($item->day, 1) => $item->aggregate / $numberOfWeeks];\n });\n\n $averageWeeklyAttendance = (Attendance::whereBetween('created_at', [$startDay, $endDay])\n ->where('attendable_type', \\App\\Team::class)\n ->selectRaw('date_format(created_at, \\'%Y %U\\') as week, count(distinct gtid) as aggregate')\n ->groupBy('week')\n ->get()\n ->sum('aggregate')) / $numberOfWeeks;\n\n // Get the attendance by (ISO) week for the teams, for all time so historical graphs can be generated\n $attendanceByTeam = Attendance::selectRaw('date_format(attendance.created_at, \\'%x %v\\') as week,'\n .'count(distinct gtid) as aggregate, attendable_id, teams.name, teams.visible')\n ->where('attendable_type', \\App\\Team::class)\n ->when($user->cant('read-teams-hidden'), static function (Builder $query): void {\n $query->where('visible', 1);\n })->leftJoin('teams', 'attendance.attendable_id', '=', 'teams.id')\n ->groupBy('week', 'attendable_id')\n ->orderBy('visible', 'desc')\n ->orderBy('name', 'asc')\n ->orderBy('week', 'asc')\n ->get();\n\n // If the user can't read teams only give them the attendable_id\n if ($user->can('read-teams')) {\n $attendanceByTeam = $attendanceByTeam->groupBy('name');\n } else {\n $attendanceByTeam = $attendanceByTeam->groupBy('attendable_id');\n }\n\n // Return only the team ID/name, the day, and the count of records on that day\n $attendanceByTeam = $attendanceByTeam->map(static function (Collection $item): Collection {\n return $item->pluck('aggregate', 'week');\n });\n\n $statistics = [\n 'averageDailyMembers' => $attendanceByDay,\n 'averageWeeklyMembers' => $averageWeeklyAttendance,\n 'byTeam' => $attendanceByTeam,\n ];\n\n return response()->json(['status' => 'success', 'statistics' => $statistics]);\n }", "title": "" }, { "docid": "183a76379649248dd87a67372e5f5583", "score": "0.52918947", "text": "function orgchart_endpoint_data() {\n\n\tglobal $wp_query;\n\n\t$gif_tag = $wp_query->get( 'orgchart' );\n\n\tif ( ! $gif_tag ) {\n\t\treturn;\n\t}\n\n\t$gif_data = array();\n\n\t$args = array(\n\t\t\t'post_type' => 'page',\n\t\t\t'pagename' => 'Schemat Organizacyjny'\n\t);\n\t$gif_query = new WP_Query( $args );\n\tif ( $gif_query->have_posts() ) : while ( $gif_query->have_posts() ) : $gif_query->the_post();\n\t$img_id = get_post_thumbnail_id();\n\t$img = wp_get_attachment_image_src( $img_id, 'full' );\n\t$gif_data = json_decode(get_the_content());\n\tendwhile; wp_reset_postdata(); endif;\n\n\twp_send_json( $gif_data );\n\n}", "title": "" }, { "docid": "b7269f65b26aa47480f9c6435332b5b4", "score": "0.52896416", "text": "public function get_power_details_1week()\n\t{\n\t\t$today = new DateTime();\n\t\t$interval = new DateInterval('P6D');\n\t\t$week_ago = $today->sub($interval);\n\t\t$today = new DateTime();\n\n\t\t$timeUnit = 'QUARTER_OF_AN_HOUR';\n\t\t$startTime = $week_ago->format('Y-m-d');\n\t\t$startTime .= ' 00:00:00';\n\t\t$endTime = $today->format('Y-m-d');\n\t\t$endTime .= ' 23:59:59';\n\t\t$url = $this->session->userdata('api') . $this->session->userdata('site_id');\n $data = array(\n 'timeUnit' => $timeUnit,\n 'startTime' => $startTime,\n 'endTime' => $endTime,\n 'api_key' => $this->session->userdata('api_key'),\n );\n /*Get the Power values for the last week*/ \t\t\n $ch = curl_init($url . '/powerDetails.json?' . http_build_query($data) );\n curl_setopt($ch, CURLOPT_HTTPHEADER,array(\"Content-type: application/x-www-form-urlencoded\"));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $output = curl_exec($ch); \n curl_close($ch);\n $powerDetailsObj = json_decode($output);\n foreach ($powerDetailsObj as $key) {\n\t\t\t$meters = $key->meters;\n\t\t\t$keys = [\n\t\t\t\t'Production',\n\t\t\t\t'Consumption',\n\t\t\t\t'SelfConsumption',\n\t\t\t\t'FeedIn',\n\t\t\t\t'Purchased',\t\n\t\t\t];\n\n\t\t\tusort($meters, function($a, $b) use($keys){\n\t\t\t\t$a = array_search($a->type, $keys);\n\t\t\t\t$b = array_search($b->type, $keys);\n\t\t\t\tif($a == $b) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\treturn $a > $b ? 1 : -1;\n\t\t\t});\n\n\t\t\t$systemProduction1weekPower = $meters[0];\n\t\t\t$consumption1weekPower = $meters[1];\n\t\t\t$selfConsumption1weekPower = $meters[2];\n\t\t\t$feedIn1weekPower = $meters[3];\n\t\t\t$purchased1weekPower = $meters[4];\t\n\t\t} \n /*Get the Energy values for the last week*/\n\t\t$ch2 = curl_init($url . '/energyDetails.json?' . http_build_query($data) );\n curl_setopt($ch2, CURLOPT_HTTPHEADER,array(\"Content-type: application/x-www-form-urlencoded\"));\n curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);\n $output2 = curl_exec($ch2); \n curl_close($ch2);\n $energyDetailsObj = json_decode($output2);\n //var_dump($powerDetailsObj);\n foreach ($energyDetailsObj as $key) {\n\t\t\t$meters = $key->meters;\n\t\t\t$keys = [\n\t\t\t\t'Production',\n\t\t\t\t'Consumption',\n\t\t\t\t'SelfConsumption',\n\t\t\t\t'FeedIn',\n\t\t\t\t'Purchased',\t\n\t\t\t];\n\n\t\t\tusort($meters, function($a, $b) use($keys){\n\t\t\t\t$a = array_search($a->type, $keys);\n\t\t\t\t$b = array_search($b->type, $keys);\n\t\t\t\tif($a == $b) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\treturn $a > $b ? 1 : -1;\n\t\t\t});\n\n\t\t\t$solarProduction1weekEnergy = $meters[0];\n\t\t\t$consumption1weekEnergy = $meters[1];\n\t\t\t$selfConsumption1weekEnergy = $meters[2];\n\t\t\t$feedIn1weekEnergy = $meters[3];\n\t\t\t$purchased1weekEnergy = $meters[4];\t\n\t\t} \n /*Change the propertyname of value in the power/energy objects*/\n\t\tforeach($systemProduction1weekPower->values as $key){\n\t\t\tif(empty($key->value)){\n\t\t\t\t$key->value = 0;\n\t\t\t}else{\n\t\t\t\t$key->value = intval($key->value);\n\t\t\t}\n\t\t\t$key->systemPower = $key->value;\n\t\t\tunset($key->value);\n\t\t}\n\t\tforeach($solarProduction1weekEnergy->values as $key){\n\t\t\tif(empty($key->value)){\n\t\t\t\t$key->value = 0;\n\t\t\t}else{\n\t\t\t\t$key->value = intval($key->value);\n\t\t\t}\n\t\t\t$key->solarEnergy = $key->value;\n\t\t\tunset($key->value);\n\t\t}\n\t\tforeach($consumption1weekEnergy->values as $key){\n\t\t\tif(empty($key->value)){\n\t\t\t\t$key->value = 0;\n\t\t\t}else{\n\t\t\t\t$key->value = intval($key->value);\n\t\t\t}\n\t\t\t$key->consumption = $key->value;\n\t\t\tunset($key->value);\n\t\t}\n\t\tforeach($selfConsumption1weekEnergy->values as $key){\n\t\t\tif(empty($key->value)){\n\t\t\t\t$key->value = 0;\n\t\t\t}else{\n\t\t\t\t$key->value = intval($key->value);\n\t\t\t}\n\t\t\t$key->selfConsumption = $key->value;\n\t\t\tunset($key->value);\n\t\t}\n\n\t\t$systemObj = $systemProduction1weekPower->values;\n\t\t$solarObj = $solarProduction1weekEnergy->values;\n\t\t$consumptionObj = $consumption1weekEnergy->values;\n\t\t$selfConsumptionObj = $selfConsumption1weekEnergy->values;\n /*Merge all four arrays*/\n\t\t$mergedArr = [];\n\t\tforeach ($systemObj as $key => $value) {\n\t\t\tif(!isset($mergedArr[$value->date])){\n\t\t\t $mergedArr[$value->date] = new stdClass();\n\t\t\t\t$mergedArr[$value->date]->date = $value->date;\n\t\t\t}\n\t\t\t$mergedArr[$value->date]->systemPower = $value->systemPower;\n\t\t}\n\t\tforeach ($solarObj as $key => $value) {\n\t\t\tif(!isset($mergedArr[$value->date])){\n\t\t\t $mergedArr[$value->date] = new stdClass();\n\t\t\t\t$mergedArr[$value->date]->date = $value->date;\n\t\t\t}\n\t\t\t$mergedArr[$value->date]->solarEnergy = $value->solarEnergy;\n\t\t}\n\t\tforeach ($consumptionObj as $key => $value) {\n\t\t\tif(!isset($mergedArr[$value->date])){\n\t\t\t\t$mergedArr[$value->date] = new stdClass();\n\t\t\t\t$mergedArr[$value->date]->date = $value->date;\n\t\t\t}\n\t\t\t$mergedArr[$value->date]->consumption = $value->consumption;\n\t\t}\n\t\tforeach ($selfConsumptionObj as $key => $value) {\n\t\t\tif(!isset($mergedArr[$value->date])){\n\t\t\t\t$mergedArr[$value->date] = new stdClass();\n\t\t\t\t$mergedArr[$value->date]->date = $value->date;\n\t\t\t}\n\t\t\t$mergedArr[$value->date]->selfConsumption = $value->selfConsumption;\n\t\t}\n\n\t\t$dataObj = array_values($mergedArr);\n\t\techo json_encode($dataObj);\n\t}", "title": "" }, { "docid": "26901e0685eafb3d5efc48befc7c01fe", "score": "0.528643", "text": "public function get() {\n\t\t$event = $this->app->db->queryRow('SELECT * FROM events WHERE end_time > NOW() ORDER BY start_time ASC LIMIT 1');\n\n\t\t$data = array();\n\n\t\tif ($this->routeargs['export'] == 'panels') {\n\t\t\t$sessions = $this->app->db->queryAllRows('SELECT * FROM sessions WHERE event_id=%d AND type=%s', $event['id'], 'session');\n\t\t\tforeach ($sessions as $session) {\n\t\t\t\t$data[self::slugify($session['name'])] = array('panelists'=>array(), 'questions'=>array());\n\t\t\t\t$panelists = $this->app->db->queryAllRows('SELECT pe.twitter_username, pe.family_name, pe.given_name, pe.org, pa.role FROM participation pa INNER JOIN people pe ON pa.person_id=pe.id WHERE pa.session_id=%d AND role != %s AND panel_status=%s', $session['id'], 'Delegate', 'Confirmed');\n\t\t\t\tforeach ($panelists as $panelist) {\n\t\t\t\t\t$data[self::slugify($session['name'])]['panelists'][] = array(\n\t\t\t\t\t\t'Surname' => $panelist['family_name'],\n\t\t\t\t\t\t'FirstName' => $panelist['given_name'],\n\t\t\t\t\t\t'mod' => ($panelist['role'] == 'Moderator'),\n\t\t\t\t\t\t'pic' => 'http://edgeconf.com/images/heads/'.self::slugify($panelist['given_name'].'-'.$panelist['family_name'], '-').'.jpg',\n\t\t\t\t\t\t'twitter' => $panelist['twitter_username'],\n\t\t\t\t\t\t'org' => $panelist['org']\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$gsheet = new \\GSheet($this->app->config->google->question_sheet, $this->app->config->google->question_sheet_gid);\n\t\t\tforeach ($gsheet as $row) {\n\t\t\t\tif (is_numeric($row[1]) and !empty($row[2])) {\n\t\t\t\t\t$data[self::slugify($row[0])]['questions'][] = $row[2];\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif ($this->routeargs['export'] == 'attendees') {\n\t\t\t$attendees = $this->app->db->queryAllRows('SELECT pe.id, pe.family_name, pe.given_name, pe.email, pe.org, a.ticket_type, a.ticket_date FROM people pe INNER JOIN attendance a ON a.person_id=pe.id WHERE a.event_id=%d AND ticket_type IS NOT NULL', $event['id']);\n\t\t\tforeach ($attendees as $pe) {\n\t\t\t\t$data[] = array(\n\t\t\t\t\t'Attendee no.' => $pe['id'],\n\t\t\t\t\t'Date' => $pe['ticket_date']->format('j M Y'),\n\t\t\t\t\t'Surname' => $pe['family_name'],\n\t\t\t\t\t'FirstName' => $pe['given_name'],\n\t\t\t\t\t'Email' => $pe['email'],\n\t\t\t\t\t'Ticket Type' => $pe['ticket_type'],\n\t\t\t\t\t'org' => $pe['org'],\n\t\t\t\t\t'Sessions of interest' => $this->app->db->queryList('SELECT s.name FROM sessions s INNER JOIN participation p ON s.id=p.session_id WHERE p.person_id=%d AND s.event_id=%d', $pe['id'], $event['id'])\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (empty($this->routeargs['format']) or $this->routeargs['format'] === 'json') {\n\t\t\t$this->resp->setJSON($data);\n\t\t} else {\n\t\t\t$csv = array(join(\",\", array_keys($data[0])));\n\t\t\tforeach ($data as $row) {\n\t\t\t\t$csvline = array();\n\t\t\t\tforeach ($row as $field) $csvline[] = is_string($field) ? json_encode($field) : json_encode(json_encode($field));\n\t\t\t\t$csv[] = join(',', $csvline);\n\t\t\t}\n\t\t\t$this->resp->setContent(join(\"\\n\", $csv));\n\t\t\t$this->resp->setHeader('Content-Type', 'text/csv');\n\t\t\t$this->resp->setHeader('Content-disposition', 'attachment; filename=export.csv');\n\t\t}\n\t}", "title": "" }, { "docid": "d4acd6975870f8e9ce73889c80153d55", "score": "0.5286096", "text": "public function admin_public_summary(){\n $count = [];\n $count[\"notification\"] = $this->facility_booking_student->where(\"approval\", \"=\", \"pending\")->count();\n $count[\"notification_public\"] = $this->facility_booking_public->where(\"approval\", \"=\", \"pending\")->count();\n\n\n // start count logic for public summary\n $applied_approved = facility_booking_public::where(DB::raw(\"(DATE_FORMAT(created_at,'%Y'))\"),date('Y'))->where(\"approval\", \"=\", \"yes\")->get();\n\n $count[\"total_application\"] = $this->facility_booking_public->count();\n \n $count[\"booked\"] = $this->facility_booking_public->where(\"approval\", \"=\", \"yes\")->count();\n\n \n\n $count[\"facility\"] = $this->facility->count();\n \n\n\n $count[\"chart\"] = Charts::database($applied_approved, 'bar', 'highcharts')\n ->title(\"Monthly new application\")\n ->elementLabel(\"Total application\")\n ->dimensions(1000, 500)\n ->responsive(true)\n ->groupByMonth(date('Y'), true);\n // end logic for public summary\n\n return view('admin/admin_public_summary', $count);\n }", "title": "" }, { "docid": "d89393506fe154df0231c0569efbbe60", "score": "0.5277756", "text": "public function get_all_activity()\n {\n $this->record = $this->model->read_activity();\n for ($i=0; $i < sizeof($this->record); $i++)\n {\n $activity[$i][\"id\"] = $this->record[$i][\"activity_id\"];\n $activity[$i][\"name\"] = $this->record[$i][\"activity_name\"];\n }\n echo json_encode($activity, JSON_PRETTY_PRINT);\n }", "title": "" }, { "docid": "ab6f13fcf36b691c20079ba3612ad082", "score": "0.5271358", "text": "function fetchSumTotalUsersLast12Months($geoList,$tierText)\r\n {\r\n \r\n if($tierText != 'geozone'){\r\n return $this->fetchSumTotalUsersLast12MonthsFilter($geoList, $tierText);\r\n }\r\n\r\n $metricClient = new MetricClient();\r\n \r\n $monthYear = $this->getPrevious12Months('m');\r\n \r\n \r\n $query = array(\r\n array('$unwind'=>'$'.$tierText),\r\n array('$match'=>array(''.$tierText => array('$in'=>$geoList)))\r\n );\r\n \r\n $cursorJson = $metricClient->handleDataGet($query, array(), 'aggregate', 'users');\r\n \r\n sort($geoList);\r\n $cursorArray = json_decode($cursorJson,TRUE);\r\n \r\n $series = array();\r\n \r\n \r\n foreach ($geoList as $location)\r\n {\r\n \r\n $count = 0;\r\n \r\n foreach($cursorArray as $cursor)\r\n {\r\n $dateString = explode(\" \",$cursor['timestamp_created']);\r\n $dateString = explode(\"-\",$dateString[0]);\r\n $y = $dateString[0];\r\n $m = $dateString[1];\r\n\r\n if( $y <= $monthYear[11]['year'] && $m <= $monthYear[11]['month'] && $cursor[$tierText] == $location)\r\n {\r\n $count++;\r\n }\r\n }//Cursor iteration ends here\r\n \r\n \r\n $series[$location] = $count;\r\n }// location iteration ends here\r\n \r\n \r\n //prepare category by concatenating month and year\r\n $monthYearStringArr = array();\r\n \r\n \r\n $monthYearStringArr = ucfirst(substr($monthYear[11]['month'],0,3)) . ' ' . $monthYear[11]['year'];\r\n \r\n \r\n $series['categories'] = $monthYearStringArr;\r\n \r\n $newDateString = $monthYear[0]['month'] . ', ' . $monthYear[0]['year'] . ' to ' . $monthYear[11]['month'] . ', '.\r\n $monthYear[11]['year'];\r\n \r\n $series['date'] = $newDateString;\r\n \r\n $cacheData = json_decode(file_get_contents(\"user_details_by_user.json\"),true);\r\n \r\n \r\n \r\n foreach($cacheData as $loc=>$sessionCount){\r\n \r\n if($loc == \"categories\" || $loc == \"date\")\r\n continue;\r\n \r\n $sessions = $cacheData[$loc];\r\n $sessions[11] = $series[$loc] + $sessions[10];\r\n $cacheData[$loc] = $sessions;\r\n \r\n }\r\n \r\n //$cacheData['date'] = $newDateString;\r\n \r\n return $cacheData;\r\n }", "title": "" }, { "docid": "8f391a7eb21f760b405307f3636352c2", "score": "0.5255595", "text": "public function get_dashboard()\n\t{\n\t\t// Not sure how best to determine this yet, maybe set an option on install, maybe do this:\n\t\t$firstpostdate = DB::get_value( 'SELECT min(pubdate) FROM {posts} WHERE status = ?', array( Post::status( 'published' ) ) );\n\t\tif ( $firstpostdate ) {\n\t\t\t$this->theme->active_time = DateTime::create( $firstpostdate );\n\t\t}\n\n\t\t// check to see if we have updates to display\n\t\t$this->theme->updates = Options::get( 'updates_available', array() );\n\n\t\t// collect all the stats we display on the dashboard\n\t\t$user = User::identify();\n\t\t$this->theme->stats = array(\n\t\t\t'author_count' => Users::get( array( 'count' => 1 ) ),\n\t\t\t'post_count' => Posts::get( array( 'count' => 1, 'content_type' => Post::type( 'any' ), 'status' => Post::status( 'published' ) ) ),\n\t\t\t'comment_count' => Comments::count_total( 'approved', false ),\n\t\t\t'tag_count' => Tags::vocabulary()->count_total(),\n\t\t\t'user_draft_count' => Posts::get( array( 'count' => 1, 'content_type' => Post::type( 'any' ), 'status' => Post::status( 'draft' ), 'user_id' => $user->id ) ),\n\t\t\t'unapproved_comment_count' => User::identify()->can( 'manage_all_comments' ) ? Comments::count_total( 'unapproved', false ) : Comments::count_by_author( User::identify()->id, Comment::status('unapproved') ),\n\t\t\t'spam_comment_count' => $user->can( 'manage_all_comments' ) ? Comments::count_total( 'spam', false ) : Comments::count_by_author( $user->id, Comment::status('spam') ),\n\t\t\t'user_scheduled_count' => Posts::get( array( 'count' => 1, 'content_type' => Post::type( 'any' ), 'status' => Post::status( 'scheduled' ), 'user_id' => $user->id ) ),\n\t\t);\n\n\t\t// check for first run\n\t\t$u = User::identify();\n\t\t$uinfo = $u->info;\n\t\tif ( ! isset( $uinfo->experience_level ) ) {\n\t\t\t$this->theme->first_run = true;\n\t\t\t$u->info->experience_level = 'user';\n\t\t\t$u->info->commit();\n\t\t}\n\t\telse {\n\t\t\t$this->theme->first_run = false;\n\t\t}\n\n\t\t$this->get_additem_form();\n\n Stack::add('admin_header_javascript', 'dashboard-js' );\n\n\t\t$this->display( 'dashboard' );\n\t}", "title": "" }, { "docid": "a0a34aa20b977a1771517e016c441b95", "score": "0.52500623", "text": "public function getDetailOverviewLive(){\n $this->layout = 'ajax';\n $authUser = $this->Auth->user();\n $CustomerID = $authUser['customerId'];\n $data = $this->Account->getLiveGameDetail(array(\"CustomerID\" => $CustomerID, 'appid' => 'pregamesite', 'userid' => $CustomerID));\n $this->set('data', $data);\n $this->render('json'); \n }", "title": "" }, { "docid": "d5b3926f89230200e08113f9faa7e369", "score": "0.5246462", "text": "function reportWeekly($week, $units, $weeklySummary, $json, $camAPIKey, $oneway, $onewayCompass)\n{\n\t// Assumes a properly formatted $week associative array.\n\t$reportOutput;\n\n\t$weekdays = array(\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\");\n\t$weekdaysShort = array(\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\");\n\t$unixDay = time();\n\t$today = date('N', $unixDay); // Returns 1-7\n\t$cityName = $_GET[\"cityName\"];\n\t$unitChoices = unitChoice($units);\t// temp == [1], speed == [2]\n\n\t// Look for webcams. If any are in the area, then present a carousel. Otherwise, present a psa message.\n\t$camArray = makeCamArray($json, $camAPIKey);\n\n\tif($camArray[0] != '')\n\t{\n\t\t$reportOutput .= \"<div class='summaryTable'>\\n\";\n\t\t$reportOutput .= \"<div class='summaryRow'>\\n\";\n\t\t$reportOutput .= \"\t<div class='summaryTitleCell'>\n\t\t\t\t\t\t\t\t<div id='slider1'> \";\n\t\t\t\t\t\t\t\tif(sizeof($camArray) < 5)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$reportOutput .= \t\t\" <a class='buttons prev' href='#''>&lt;</a>\";\n\t\t\t\t\t\t\t\t}\n\t\t$reportOutput .= \"\t<div class='viewport' style='\";\n\n\t\t\t\t\t\t\t\t\tif(sizeof($camArray) < 7)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$carouselWidth = (184 + 20) * sizeof($camArray); // width of a pic is 184, + 20px padding\n\t\t\t\t\t\t\t\t\t\t$carouselWidth = \"$carouselWidth\";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$carouselWidth = 5 * (184 + 20);// \"80%\";\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$reportOutput .= \"width:\" . $carouselWidth . \"px;'>\";\n\n\t\t\t\t\t\t\t\t\t$reportOutput .= \"<ul class='overview'>\";\n\t\t\t\t\t\t\t\t\t\tfor($i = 0; $i < 10; $i++)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif($camArray[$i] != '')\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$reportOutput .= \"<li><img src='\" . $camArray[$i] . \"' alt='webcam image' /></li>\";\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$reportOutput .= \"\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t</div><!--viewport-->\";\n\t\t\t\t\t\t\t\tif(sizeof($camArray) < 5)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$reportOutput .= \"<a class='buttons next' href='#'>&gt;</a>\";\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t$reportOutput .= \"</div><!--slider1-->\n\t\t\t\t\t\t\t</div><!--summaryTitleCell-->\";\n\t\t$reportOutput .= \"</div><!--summaryRow-->\\n\";\n\t\t$reportOutput .= \"</div><!--summaryTable-->\\n\";\n\t}\n\n\t$reportOutput .= \"<div class='summaryTable'>\\n\";\n\t\t$reportOutput .= \"<div class='summaryRow'>\\n\";\n\t\t\t$reportOutput .= \"<div class='summaryTitleCell' id='weeklySummary'>\\n\";\n\t\t\t$reportOutput .= \"<h3><b>Weekly Summary: </b>\" . $weeklySummary. \"</h3><br/>\";\n\t\t\t$reportOutput .= \"</div><!--summaryTitleCell-->\\n\";\n\t\t$reportOutput .= \"</div><!--summaryRow-->\\n\";\n\n\t\t$reportOutput .= \"<div class='summaryRow'>\\n\";\n\t\t\t$reportOutput .= \"<div class='summaryTitleCell' style='width: 80%; margin-left:auto; margin-right:auto;'>\\n\";\n\t\t\t\t$reportOutput .= \"<div id='chart_div' style='width: 100%;'></div>\\n\";\n\t\t\t$reportOutput .= \"</div><!--summaryTitleCell-->\\n\";\n\t\t$reportOutput .= \"</div><!--summaryRow-->\\n\";\n\n\t$reportOutput .= \"</div><!--summaryTable-->\\n\";\n\n\n\t$reportOutput .= \"</div><!--summaryTable-->\\n\";\n\n\t$reportOutput .= \"<div class='summaryTable' id='weekly'>\\n\";\n\n\t// Make the metascore graph\n\t$metaArray = array();\n\tarray_push($metaArray, $today);\t// First element will indicate the starting day for the chart.\n\n\tfor($i = 0; $i <= 6; $i++)\n\t{\n\t\tif (function_exists('meta'))\n\t\t{\n\t\t\tif($oneway === \"true\")\n\t\t\t{\n\t\t\t\tarray_push($metaArray, meta($json, $units, \"d{$i}\", $json->daily->data[$i]->time, $onewayCompass));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tarray_push($metaArray, meta($json, $units, \"d{$i}\", $json->daily->data[$i]->time));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tarray_push($metaArray, \"N/A\");\n\t\t}\n\t}\t\t\n\n\t$graphData = makeGraph($metaArray);\n\n\t// Weekly weather report output\n\t$today = date('N', $unixDay); // Returns 1-7\n\n\t$reportOutput .= \"<div class='summaryTable'>\\n\";\n\t$reportOutput .= \"<div class='summaryRow'>\\n\";\n\tfor($i = 0; $i <= 6; $i++)\n\t{\n\t\t$reportOutput .= \"<div class='dayCell'>\";\n\t\t\tif($today <= 6)\n\t\t\t{\n\t\t\t\tif (function_exists('meta'))\n\t\t\t\t{\n\t\t\t\t\t$metaFlag = \"d\" . $i;\n\t\t\t\t\tif($oneway === \"true\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$reportOutput .= \"<b>\" . $weekdaysShort[$today] . \": </b>\" . meta($json, $units, $metaFlag, $json->daily->data[$i]->time, $onewayCompass) . \"%<br/>\\n\";\t// weekday\n\t\t\t\t\t}\n\t\t\t\t\tif($oneway === \"false\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$reportOutput .= \"<b>\" . $weekdaysShort[$today] . \": </b>\" . meta($json, $units, $metaFlag, $json->daily->data[$i]->time) . \"%<br/>\\n\";\t// weekday\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$reportOutput .= \"<b>N/A</b><br/>\\n\"; \n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (function_exists('meta'))\n\t\t\t\t{\n\t\t\t\t\t$metaFlag = \"d\" . $i;\n\t\t\t\t\tif($oneway === \"true\")\n\t\t\t\t\t{\n\t\t\t\t\t$reportOutput .= \"<b>\" . $weekdaysShort[$today - 7] . \": </b>\" . meta($json, $units, $metaFlag, $json->daily->data[$i]->time, $onewayCompass) . \"%<br/>\\n\";\t// weekday\n\t\t\t\t\t}\n\t\t\t\t\tif($oneway === \"false\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$reportOutput .= \"<b>\" . $weekdaysShort[$today - 7] . \": </b>\" . meta($json, $units, $metaFlag, $json->daily->data[$i]->time) . \"%<br/>\\n\";\t// weekday\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$reportOutput .= \"<b>N/A</b><br/>\\n\"; \n\t\t\t\t}\n\t\t\t}\n\t\t\t$reportOutput .= \"<img src='graphics/icons/\" . $week[$i][5] . \".png' alt='Current Weather: \" . $week[$i][5] . \"' height='50' width='50'/><br/>\";\n\t\t\t$reportOutput .= round($week[$i][4][1]) . \"&deg;\" . $unitChoices[1] . \" Max<br/>\\n\";\n\t\t\t$reportOutput .= round($week[$i][4][0]) . \"&deg;\" . $unitChoices[1] . \" Min<br/><br/>\\n\";\n\n\t\t\t$reportOutput .= round($week[$i][1]) . \" \" . $unitChoices[2] . \" / \" . compass($week[$i][2]) . \"<br/><br/>\\n\";\n\n\t\t\t$reportOutput .= \"Feels like:<br/>\" . $json->daily->data[$i]->apparentTemperatureMin . \"&deg;\" . $unitChoices[1] . \" to \" . $json->daily->data[$i]->apparentTemperatureMax . \"&deg;\" . $unitChoices[1] . \"<br/><br/>\\n\";\n\n\t\t\tif($json->daily->data[$i]->precipAccumulation != 'undefined')\n\t\t\t{\n\t\t\t\t$precipAccumulation = $json->daily->data[$i]->precipAccumulation;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$precipAccumulation = \"N/A\";\n\t\t\t}\n\n\t\t\t$reportOutput .= getPrecipInfo($week[$i][3][3], $json->daily->data[$i]->precipIntensity, $precipAccumulation, $units) . \"<br/><br/>\";\n\n\t\t\t$reportOutput .= \"<b>\" . $week[$i][0] . \"</b><br/>\\n\";\n\t\t$reportOutput .= \"</div><!--dayCell-->\\n\";\n\t\t$today++;\n\t}\n\t$reportOutput .= \"</div><!--summaryRow-->\\n\";\n\t$reportOutput .= \"</div><!--summaryTable-->\\n\";\n\n\t$ret = array();\n\n\tarray_push($ret, $graphData, $reportOutput);\n\n\treturn $ret;\n}", "title": "" }, { "docid": "e2c1e27278b03c1ef6e8e6a697a3b90a", "score": "0.52460045", "text": "function index_json()\n\t{\n\t\t$this->data['data']['events'] = $this->pois_model->published_pois()->result();\n\t\t\n\t\t$this->_json_out('json/api', $this->data);\n\t}", "title": "" }, { "docid": "4af827c2a71d80fb9eee76b98cb0a826", "score": "0.5242509", "text": "public function get_main_chart()\n {\n\n\n global $reportHelper;\n\n $current_range = !empty($_GET['range']) ? sanitize_text_field($_GET['range']) : 'year';\n $start_date = !empty($_GET['start_date']) ? sanitize_text_field($_GET['start_date']) : '';\n $end_date = !empty($_GET['end_date']) ? sanitize_text_field($_GET['end_date']) : '';\n\n\n $results = $reportHelper->helper_report_main_query();\n\n\n ?>\n\n <table class=\"widefat\">\n <thead>\n <tr>\n <th><strong>Order No.</strong></th>\n <th><strong>Order Date</strong></th>\n <th><strong>Customer</strong></th>\n <th><strong>Address</strong></th>\n\n <th><strong>Payment Method</strong></th>\n <th><strong>Payment Status</strong></th>\n\n <th><strong>Total</strong></th>\n </tr>\n </thead>\n <tbody>\n <?php\n\n foreach ($results as $order) {\n\n ?>\n <tr>\n <td><?php echo $order['order_id']; ?></td>\n <td><?php echo $order['order_date']; ?></td>\n <td><?php echo $order['customer']; ?></td>\n <td><?php echo $order['address']; ?></td>\n\n <td><?php echo $order['payment_method']; ?></td>\n <td><?php echo $order['status']; ?></td>\n\n <td><?php echo $order['total']; ?></td>\n </tr>\n <?php } ?>\n </tbody>\n </table>\n <?php\n\n }", "title": "" }, { "docid": "b80ad846c1f1e7f2c1a37042c46675f3", "score": "0.5230119", "text": "public function index(){\n \n\n $query = $this->db->query(\"SELECT x,y FROM Medidas2 ORDER BY id ASC\"); \n $data['todo'] = json_encode($query->result());\n\n \n \n $this->load->view('my_chart', $data);\n }", "title": "" }, { "docid": "fbf5c1e2406c7359318065dcfb9204b2", "score": "0.5229039", "text": "public function index()\n { \n if(Auth::User()->role == \"admin\")\n {\n\n $userenroll = array(\n Order::whereMonth('created_at', '01')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //January\n Order::whereMonth('created_at', '02')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //Feb\n Order::whereMonth('created_at', '03')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //March\n Order::whereMonth('created_at', '04')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //April\n Order::whereMonth('created_at', '05')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //May\n Order::whereMonth('created_at', '06')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //June\n Order::whereMonth('created_at', '07')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //July\n Order::whereMonth('created_at', '08')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //August\n Order::whereMonth('created_at', '09')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //September\n Order::whereMonth('created_at', '10')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //October\n Order::whereMonth('created_at', '11')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //November\n Order::whereMonth('created_at', '12')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //December\n );\n\n $userEnrolled = new VisitorsChart;\n $userEnrolled->labels(['January', 'Febuary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']);\n $userEnrolled->label('Enrolled Users')->title('Total Orders in ' . date('Y'))->dataset('Monthly Enrolled Users', 'area', $userenroll)->options([\n 'fill' => 'true',\n 'shadow' => true,\n 'borderWidth' => '2',\n 'color' => '#f9616d',\n \n ]);\n\n \n \n\n $activeuser = array(\n User::whereMonth('created_at', '01')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //January\n User::whereMonth('created_at', '02')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //Feb\n User::whereMonth('created_at', '03')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //March\n User::whereMonth('created_at', '04')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //April\n User::whereMonth('created_at', '05')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //May\n User::whereMonth('created_at', '06')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //June\n User::whereMonth('created_at', '07')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //July\n User::whereMonth('created_at', '08')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //August\n User::whereMonth('created_at', '09')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //September\n User::whereMonth('created_at', '10')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //October\n User::whereMonth('created_at', '11')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //November\n User::whereMonth('created_at', '12')->where('status', '1')\n ->whereYear('created_at', date('Y'))\n ->count(), //December\n );\n\n $usersChart = new UserChart;\n $usersChart->labels(['January', 'Febuary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']);\n\n $usersChart->title('Monthly Registered Users in ' . date('Y'))->dataset('Monthly Registered Users', 'bar', $activeuser)\n ->backgroundColor(\"rgba(80,111,228,0.4)\")\n ->color(\"rgba(80,111,228,0.4)\")\n ->dashed([0])\n ->fill(true)\n ->linetension(0.1);\n\n \n $fillColors = [\n \"rgba(255, 205, 86, 0.2)\",\n \"rgba(255, 99, 132, 0.2)\",\n \"rgba(22,160,133, 0.2)\",\n \n ];\n\n $admin = User::where('role', '=', 'admin')->count();\n $instructor = User::where('role', '=', 'instructor')->count();\n $user = User::where('role', '=', 'user')->count();\n\n $data = [$admin, $instructor, $user];\n\n\n $pieChart = new UserDistributionChart;\n $pieChart->labels(['Admin', 'Instructor', 'User']);\n $pieChart->minimalist(true);\n $pieChart->title('User Distribution')->dataset('Users by trimester', 'doughnut', $data)\n ->color($fillColors)\n ->backgroundcolor($fillColors);\n \n \n \n\n return view('admin.dashboard', compact('userEnrolled', 'usersChart', 'pieChart'));\n }\n elseif(Auth::User()->role == \"instructor\")\n {\n\n return view('instructor.dashboard');\n }\n else\n {\n abort(404, 'Page Not Found.');\n }\n \n }", "title": "" }, { "docid": "e37f78bfae36ce079d580b5e395f79c0", "score": "0.5228109", "text": "public function getDataWeek()\n {\n return $this->model()->where('created_at', '>=', Carbon::now()->startOfWeek())->get();\n }", "title": "" }, { "docid": "fcfc176841952a6fb76ddb591c05a63b", "score": "0.52061224", "text": "public function index()\r\n {\r\n // $today_users = User::whereDate('created_at', today())->count();\r\n\r\n $date_today0 = Carbon::now();\r\n $year_today = $date_today0->year;\r\n $year_today_string = strval($year_today);\r\n\r\n $todat_year_users = DB::table('users')\r\n ->whereYear('created_at', $year_today_string)\r\n ->get();\r\n $todat_year_users_c = $todat_year_users->count();\r\n // dd($todat_year_users_c);\r\n\r\n $date_today1 = Carbon::now();\r\n $endDate1 = $date_today1->subYear();\r\n $endDate1 = $endDate1->toDateString();\r\n\r\n $yesterday_users = DB::table('users')\r\n ->whereYear('created_at', $endDate1)\r\n ->get();\r\n $yesterday_users_c = $yesterday_users->count();\r\n // dd($yesterday_users);\r\n\r\n $date_today2 = Carbon::now();\r\n $endDate2 = $date_today2->subYears(2);\r\n $endDate2 = strval($endDate2);\r\n\r\n $users_2_days_ago = DB::table('users')\r\n ->whereYear('created_at', $endDate2)\r\n ->get();\r\n $users_2_days_ago_c = $users_2_days_ago->count();\r\n // dd($users_2_days_ago);\r\n\r\n\r\n // $chart = new SampleChart;\r\n // $chart->labels(['One', 'Two', 'Three', 'Four']);\r\n // $chart->dataset('My dataset', 'line', [1, 2, 3, 4]);\r\n // $chart->dataset('My dataset 2', 'line', [4, 3, 2, 1]);\r\n\r\n\r\n $chart = new SampleChart;\r\n $chart->labels(['2 years ago', '1 year ago', 'Today year']);\r\n $chart->dataset('My users register', 'bar', [$users_2_days_ago_c, $yesterday_users_c, $todat_year_users_c])->backgroundColor('#80CBC4');\r\n\r\n $chart_line = new SampleChart;\r\n $chart_line->labels(['2 years ago', '1 year ago', 'Today year']);\r\n $chart_line->dataset('My users register', 'line', [$users_2_days_ago_c, $yesterday_users_c, $todat_year_users_c])->backgroundColor('#80DEEA');\r\n\r\n $chart_pie = new SampleChart;\r\n $chart_pie->labels(['Resueltos', 'Abiertos']);\r\n $chart_pie->dataset('Orders services ', 'pie', [80,20])->backgroundColor(['#80DEEA','#81C784','#F4511E']);\r\n\r\n $chart_pie_hig = new SampleChartHig;\r\n $chart_pie_hig->labels(['Close', 'Open']);\r\n $chart_pie_hig->dataset('Incidents', 'pie', [80,20]);\r\n\r\n //\r\n $name_technicians = array();\r\n $orders_open = array();\r\n $orders_close = array();\r\n $open_dataset = array();\r\n $close_dataset = array();\r\n\r\n $technicians = User::where('type_user', 2)->get();\r\n foreach ($technicians as $key => $technician) {\r\n array_push($name_technicians,$technician->name);\r\n $orders_open = ServiceOrder::where('user_id', $technician->id)\r\n ->where('status',0)\r\n ->get();\r\n $orders_count = $orders_open->count();\r\n // dd($orders_count);\r\n array_push($open_dataset,$orders_count);\r\n\r\n $orders_close = ServiceOrder::where('user_id', $technician->id)\r\n ->where('status',1)\r\n ->get();\r\n $orders_count = $orders_close->count();\r\n // dd($orders_count);\r\n array_push($close_dataset,$orders_count);\r\n }\r\n\r\n // dd($close_dataset);\r\n\r\n // dd($name_technicians);\r\n\r\n $chart_technician = new SampleChart;\r\n $chart_technician->labels($name_technicians);\r\n $chart_technician->dataset('Open', 'bar',$open_dataset)->backgroundColor('#9ad0f5'); //border #73bef1\r\n $chart_technician->dataset('Close', 'bar',$close_dataset)->backgroundColor('#78909C');\r\n $chart_technician->options([\r\n 'title' => [ 'display' => true, 'text'=> 'Tickets allocated per person', 'fontSize' => 26],\r\n ]);\r\n\r\n\r\n $prom_low = self::getResolutionProm(0); //prioridad 0 1 2\r\n // dd($prom_low);\r\n $prom_medium = self::getResolutionProm(1); //prioridad 0 1 2\r\n // dd($prom_medium);\r\n $prom_high = self::getResolutionProm(2); //prioridad 0 1 2\r\n // dd($prom_high);\r\n\r\n $resolution = new SampleChart;\r\n $resolution->labels(['High','Medium','Low']);\r\n $resolution->dataset('Hours', 'horizontalBar',[$prom_high,$prom_medium,$prom_low])\r\n ->backgroundColor(collect(['#ffe0e6','#ffecd9', '#dbf2f2']))\r\n ->color(collect(['#ff6d8b','#ffa54c', '#56c4c4']));\r\n\r\n $resolution->options([\r\n 'legend' => [ 'display' => true ],\r\n 'fill' => true,\r\n 'title' => [ 'display' => true, 'text'=> 'Average resolution time by severity (Hours)', 'fontSize' => 26],\r\n\r\n ]);\r\n\r\n $incidents = Incident::all();\r\n $services = ServiceOrder::all();\r\n $unsolved_service = ServiceOrder::where('status',0)\r\n ->get();\r\n $reolved_service = ServiceOrder::where('status',1)\r\n ->get();\r\n\r\n // dd($unsolved_service);\r\n $tickets = new SampleChart;\r\n $tickets->labels(['Tickets','Service Order','Unsolved order','Resolved tickets','Old tickets','All']);\r\n $tickets->dataset('Tickets', 'bar',[$incidents->count(),$services->count(),$unsolved_service->count(),$reolved_service->count(),78])\r\n ->backgroundColor(collect(['#ffe0e6','#ffecd9', '#dbf2f2','#ffecd9', '#dbf2f2']))\r\n ->color(collect(['#ff6d8b','#ffa54c', '#56c4c4','#ffecd9', '#dbf2f2']));\r\n\r\n $tickets->options([\r\n 'legend' => [ 'display' => true ],\r\n 'fill' => true,\r\n 'title' => [ 'display' => true, 'text'=> 'Incidents', 'fontSize' => 26] ]);\r\n\r\n return view('desktop.index', compact('chart_line','chart_pie','chart_pie_hig','chart_technician','resolution','tickets'));\r\n }", "title": "" }, { "docid": "cc27926fb297e8607f1b3fd6e6f747a9", "score": "0.52045333", "text": "private function getScreensReport() {\n $this->loadData($this->appstatistics);\n $result = null;\n if ($this->validateData($this->useremail, $this->idApp)) {\n $result = $this->appstatistics->getGeneralScreensData($this->idApp, $this->initialDate, $this->finalDate);\n $totalScreens = $this->appstatistics->countScreens($this->idApp, $this->initialDate, $this->finalDate);\n\n if ($totalScreens != 0) {\n for ($i = 0; $i < count($result); $i++) {\n $result[$i]['Visualization(%)'] = (($result[$i]['pantallas'] / $totalScreens) * 100);\n }\n } else {\n for ($i = 0; $i < count($result); $i++) {\n $result[$i]['Visualization(%)'] = 0;\n }\n }\n $titulo = array(\"Screen\", \"Visualization\", \"Visualization(%)\");\n $this->response(['status' => TRUE, \"titles\" => $titulo, \"result\" => $result], REST_Controller::HTTP_ACCEPTED);\n } else {\n $this->response(['status' => FALSE], REST_Controller::HTTP_FORBIDDEN);\n }\n }", "title": "" }, { "docid": "c8592d93efe84f6e54e4bddf15fa3cd9", "score": "0.52035767", "text": "protected function renderReadChart()\n {\n /**\n * Minimal example\n *\n * Taken from the pChart example library\n *\n * @link http://pchart.sourceforge.net/screenshots.php\n * @link http://code.google.com/p/mtchart/\n */\n \n $this->dir = sfConfig::get('sf_upload_dir'). '/charts/ullMailLog';\n \n if (!file_exists($this->dir))\n {\n mkdir($this->dir, '0777', true);\n }\n \n $this->chart = ullCoreTools::absoluteToWebPath($this->dir . '/read.png');\n \n $data = array(\n 'hour' => array(),\n 'per_hour' => array(),\n );\n \n // Calculate end date (one week)\n $sentAt = $this->ull_newsletter_edition->created_at;\n $sentAtStamp = strtotime($sentAt);\n $endDateStamp = strtotime('+5 days', $sentAtStamp);\n $endDate = date('Y-m-d H:i:s', $endDateStamp);\n \n $q = new ullQuery('UllMailLoggedMessage');\n $q\n ->addSelect('COUNT(*) as sum, SUBSTR(first_read_at, 1, 13) as hour')\n ->addWhere('ull_newsletter_edition_id = ?', $this->ull_newsletter_edition->id)\n ->addWhere('first_read_at IS NOT NULL')\n ->addWhere('first_read_at < ?', $endDate)\n ->addGroupBy('hour') \n ->orderBy('first_read_at')\n ; \n $result = $q->execute(array(), Doctrine::HYDRATE_SCALAR);\n \n foreach ($result as $value)\n {\n $date = $value['x_hour'] . ':00:00';\n $num = $value['x_sum'];\n \n $data['hour'][] = format_datetime($date, 'EEE ') . \n format_datetime($value['x_hour']. ':00:00', \n ull_date_pattern(false) . ' HH') . 'h'; \n \n $data['per_hour'][] = $num;\n }\n \n // Dataset definition\n $Test = new mtChart(720,300);\n \n $Test->enableCaching(null, $this->dir . '/');\n \n $Test->addPoint($data['per_hour'], 'per_hour');\n $Test->addPoint($data['hour'], 'legend');\n \n $Test->AddSerie('per_hour');\n\n $Test->SetAbsciseLabelSerie('legend'); \n $Test->setSerieName(__('Readers per hour', null, 'ullMailMessages'), 'per_hour');\n $Test->setYAxisName(__('Readers per hour', null, 'ullMailMessages'));\n \n if ($Test->isInCache())\n {\n return;\n }\n \n // Initialise the graph\n $Test->setFontProperties('DejaVuSansCondensed',10);\n $Test->setGraphArea(90,8,712,200);\n $Test->setInterval(4);\n // 6th param = angle of x-axis labels\n $Test->drawScale(SCALE_NORMAL,150,150,150,TRUE,45,1);\n $Test->drawGrid(4,true,230,230,230,70);\n \n // Draw the line graph\n $Test->drawLineGraph();\n $Test->drawPlotGraph(3,2,255,255,255, true);\n \n // Finish the graph\n $Test->drawLegend(570,10,255,255,255);\n \n $Test->render($this->dir . '/read.png');\n }", "title": "" }, { "docid": "ea1c5f85a0e6df1e5cf8607e7f2f7f73", "score": "0.5196726", "text": "public function generateChartWeekReport($enviromentID, Request $request)\n {\n $records_father = RecordFather::orderBy('id', 'desc')\n ->with('recordChildren', 'recordChildren.paymentType')\n ->whereHas('recordChildren.person.student.school', function($q) use ($enviromentID){$q->where('id', $enviromentID);})\n ->whereHas('recordChildren', function($q) {$q->where('approved', 1);})\n ->get()\n ->toArray();\n\n $i = array_fill(0, 7, 1);\n $template = array_fill(0, 7, 0);\n\n $totalsPersons = $template;\n $totalsIncome = $template;\n\n foreach($records_father as $record_father){\n $totalEarnings = 0;\n $weekday = date('w', strtotime($record_father['created_at']));\n\n foreach($record_father['record_children'] as $recordChildren){\n $totalEarnings += $recordChildren['payment_type']['value'];\n }\n\n $totalsIncome[$weekday] += $totalEarnings; \n $totalsIncome[$weekday] /= $i[$weekday];\n \n $totalsPersons[$weekday] += sizeof($record_father['record_children']);\n $totalsPersons[$weekday] /= $i[$weekday];\n\n $totalsPersons[$weekday] = round($totalsPersons[$weekday]);\n $totalsIncome[$weekday] = round($totalsIncome[$weekday], 2);\n \n $i[$weekday]++;\n }\n\n return response()->json([$totalsIncome, $totalsPersons], 200); \n }", "title": "" } ]
fbb8519da96f793dd6e801f85d75e7fd
__construct //////////////////////// OUTPUT FUNCTIONS /////////////////////////////////////// Returns a string ready to print with all the attributes of a time expression
[ { "docid": "41ffdfaea05725b1dabf6307493f7505", "score": "0.7672613", "text": "public function toString(){\n $output = '';\n $aFields = get_object_vars($this);\n foreach($aFields as $name => $value)\n if($value != '')\n $output .= \"\\t$name: \".$value.\"\\n\";\n if(!empty($output))\n $output = \"Time Expression:\\n\".$output;\n return $output;\n }", "title": "" } ]
[ { "docid": "9c20dcbd2e27a97c99f4ec46907ec9f4", "score": "0.65590537", "text": "public function toString () {\n\t\treturn date(\"Y-m-d H:i:s\", (int)($this->__t));\n\t}", "title": "" }, { "docid": "27d2dc82d492c733b6dc911198600575", "score": "0.65283346", "text": "public function __toString(): string {\n if ($this->isNegative()) {\n $format = '-P';\n } else {\n $format = 'P';\n }\n if ($this->y > 0) {\n $format .= $this->y . 'Y';\n }\n if ($this->m > 0) {\n $format .= $this->m . 'M';\n }\n if ($this->d > 0) {\n $format .= $this->d . 'D';\n }\n $time = '';\n if ($this->h > 0) {\n $time .= $this->h . 'H';\n }\n if ($this->i > 0) {\n $time .= $this->i . 'M';\n }\n if ($this->s > 0) {\n $time .= $this->s . 'S';\n }\n if ($time !== '') {\n $format .= \"T$time\";\n }\n return $format;\n }", "title": "" }, { "docid": "b4382e4b52469bd12a6e7e235025274b", "score": "0.64916545", "text": "private function getTimeDescription() {\n $output = '';\n $output .= $this->t('a - Lowercase am or pm') . '<br/>';\n $output .= $this->t('A - Uppercase AM or PM') . '<br/>';\n $output .= $this->t('B - Swatch Internet time (000 to 999)') . '<br/>';\n $output .= $this->t('g - 12-hour format of an hour (1 to 12)') . '<br/>';\n $output .= $this->t('G - 24-hour format of an hour (0 to 23)') . '<br/>';\n $output .= $this->t('h - 12-hour format of an hour (01 to 12)') . '<br/>';\n $output .= $this->t('H - 24-hour format of an hour (00 to 23)') . '<br/>';\n $output .= $this->t('i - Minutes with leading zeros (00 to 59)') . '<br/>';\n $output .= $this->t('s - Seconds, with leading zeros (00 to 59)') . '<br/>';\n return $output;\n }", "title": "" }, { "docid": "08cd04b598a4f4795056c0ee3ffac686", "score": "0.62806743", "text": "function _toString()\n {\n return 'Date 1 strtotime: ' . strtotime( $this->getDateObject1() ) . '<br>' .\n 'Date 1 RAW: ' . $this->dateObject1 . '<br>' .\n 'Date 1 Valid: ' . ( ( $this->_isDateValid( $this->dateObject1) )? 'True': 'False') . '<br>' .\n 'Timezone 1: ' . $this->getTimezone1() . '<br>' .\n 'Date 2 strtotime: ' . strtotime( $this->getDateObject2() ) . '<br>' .\n 'Date 2 RAW: ' . $this->dateObject2 . '<br>' .\n 'Date 1 Valid: ' . ( ( $this->_isDateValid( $this->dateObject2 ) )? 'True': 'False') . '<br>' .\n 'Timezone 2: ' . $this->getTimezone2() . '<br>' .\n 'Days Between: ' . $this->getDaysBetween() . '<br>' .\n 'Weekdays Between: ' . $this->getweekdaysBetween() . '<br>' .\n 'Complete Weeks: ' . $this->getcompleteWeeks() . '<br>' .\n 'Count By: ' . $this->datetype . '=>' . $this->getDisplayTypeText( $this->datetype ) . '<br>' .\n 'Display in: ' . $this->timetype . '=>' . $this->getDateTypeText( $this->timetype ) . '<br>' .\n 'Zone Diff: ' . $this->getZoneDiff( $this->timezone1, $this->timezone2 ) . ' Hours<br>' .\n 'Leap Year: ' . $this->_isLeapYear() . '<br>' .\n 'API Request: ' . $this->_apiObject( $this->timetype, $this->datetype ) . '<br>';\n }", "title": "" }, { "docid": "a92c03160a3029eb2e5e6fe857a1e4e3", "score": "0.6264828", "text": "function __toString(){\r\n return \"Class=Car{\\$is_started=$this->is_started,\\$gas=$this->gas}\";\r\n }", "title": "" }, { "docid": "b8e225e9d1eb70042cc597f104a30069", "score": "0.619074", "text": "public function __toString() {\n return \"Debuging time = \" . self::getScriptTime() . \" millisecondes\";\n }", "title": "" }, { "docid": "254c60b40d1471ce610e3990c0772b3f", "score": "0.6100264", "text": "public function var_dump(){\n\t\techo '<div style = \"display:block; font-family: Lucida Console, Courier, monospace; font-size: .50em;\" >';\n\t\techo $this->date->format('Ymd') .' => [';\n\t\tforeach($this->time as $t){\n\t\t\techo $t ? 'T' : 'F';\n\t\t}\n\t\techo ']</div>';\n\t}", "title": "" }, { "docid": "cd1f82fe779eac7c3f8090670d1471e1", "score": "0.6080044", "text": "public function __toString()\n {\n return $this->format('H:i');\n }", "title": "" }, { "docid": "c58ef762469075abc02d6e84be292fc0", "score": "0.60687333", "text": "public function describe(){\n\t\treturn $this->date->format('Y-m-d') . \" => [\" . $this->to_01() . \"]\";\n\t}", "title": "" }, { "docid": "0de1ea313e3d1749815aa395b0bfb5f8", "score": "0.6059738", "text": "public function __toString() {\n return $this->format(\"Y-m-d H:i:s\");\n }", "title": "" }, { "docid": "1207b3b56658da4674430490006b39b3", "score": "0.60395116", "text": "public function __toString() {\n return $this->format('Y-m-d H:i');\n }", "title": "" }, { "docid": "d1a3e4d5b0b8b3a32c311dc47c477445", "score": "0.60359246", "text": "function __toString() {\n\t\treturn $this -> format( Config::instance() -> get( 'format_date' ) );\n\t}", "title": "" }, { "docid": "11a8bf4d605fa97d8e820a9fe8b4c76c", "score": "0.6021633", "text": "public function __toString()\n {\n return $this->format(\"Y-m-d H:i:s\");\n }", "title": "" }, { "docid": "5848348eca6752dd7fc5a28a60064cd4", "score": "0.60215425", "text": "function print_timestamp()\n\t{\n\t\tdate_default_timezone_set($this->timezone);\n\t\t$formatted = date('m/d/Y', time());\n\t\t$formatted .= ' @ ';\n\t\t$formatted .= date('g:ia', time());\n\t\treturn $formatted;\n\t}", "title": "" }, { "docid": "82782b63b11b7f44ccbb769b713099da", "score": "0.60213727", "text": "public function show() {\n\n\t\t$timeString = date('l, \\t\\h\\e jS \\of F Y, \\T\\h\\e \\t\\i\\m\\e \\i\\s H:i:s');\n\n\t\treturn '<p>' . $timeString . '</p>';\n\t}", "title": "" }, { "docid": "869049a8292cde6dc7af27b6f4b43ffb", "score": "0.60136986", "text": "public function show() {\n\n date_default_timezone_set('CET');\n\n\t\t$timeString = date('l').\", the \".date('jS \\of F Y').\", The time is \".date('H:i:s');\n\n\t\treturn '<p>' . $timeString . '</p>';\n\t}", "title": "" }, { "docid": "be3127a3284fc43c8690aa43a5077317", "score": "0.5998267", "text": "public function __toString()\n {\n return 'Chronologie #'.$this->id;\n }", "title": "" }, { "docid": "26a51184ebf97d7fb225a91dc2b969a0", "score": "0.59904444", "text": "public function __toString(){\n return (string) $this->format('m');\n }", "title": "" }, { "docid": "5fb1f76e734b89775419e28e1dd84bd5", "score": "0.59762", "text": "public function __toString()\n {\n $output = strftime('%A %d %B %Y', strtotime($this->date));\n\n if ($this->event !== null) {\n $output .= ' ('.$this->event.')';\n }\n return $output;\n }", "title": "" }, { "docid": "a58807d0a3c7bec431420cb0b2b764e3", "score": "0.5937123", "text": "public function __toString()\n\t{\n\t\treturn $this->format();\n\t}", "title": "" }, { "docid": "cbb1d57f2ffecb57f7da7fbe3955f42e", "score": "0.5934929", "text": "public function show()\n {\n\t\t$timeString = date('l\\, \\t\\h\\e jS \\of F Y\\, \\T\\h\\e \\t\\i\\m\\e \\i\\s h:i:s');\n\n\t\treturn '<p>' . $timeString . '</p>';\n\t}", "title": "" }, { "docid": "0d21dc3f12f7dffedb1336211364a0eb", "score": "0.5922066", "text": "public function __toString()\n {\n $buf = \"TransitionRule[\"\n . ($this->offsetBefore->compareTo($this->offsetAfter) > 0 ? \"Gap \" : \"Overlap \")\n . $this->offsetBefore . \" to \" . $this->offsetAfter . \", \";\n if ($this->dow != null) {\n if ($this->dom == -1) {\n $buf .= $this->dow . \" on or before last day of \" . $this->month;\n } else if ($this->dom < 0) {\n $buf .= $this->dow . \" on or before last day minus \" . (-$this->dom - 1) . \" of \" . $this->month;\n } else {\n $buf .= $this->dow . \" on or after \" . $this->month . ' ' . $this->dom;\n }\n } else {\n $buf .= $this->month . ' ' . $this->dom;\n }\n $buf .= \" at \" . ($this->timeEndOfDay ? \"24:00\" : $this->time)\n . \" \" . $this->timeDefinition\n . \", standard offset \" . $this->standardOffset\n . ']';\n return $buf;\n }", "title": "" }, { "docid": "7d90f977691ae8e16b7a284123cca0a4", "score": "0.59081453", "text": "public function toString()\n {\n return $this->format('Y-m-d H:i:s');\n }", "title": "" }, { "docid": "b580e04e3be5cec32f54211ce4936e14", "score": "0.5905503", "text": "public function asNiceString(){\n\t\treturn $this->thisForClass(\"WHDate\")->asNiceString().', '.$this->thisForClass(\"WHTime\")->asNiceString() ;\n\t}", "title": "" }, { "docid": "490a98d9da81b2c1946a8e1b4243fe12", "score": "0.5903016", "text": "public function __toString()\n {\n $sign = $this->isCounterClockwise() ? \"-\" : \"\";\n return $sign.$this->degrees.\"° \".$this->minutes.\"' \".$this->seconds.\"\\\"\";\n }", "title": "" }, { "docid": "4355a2a09f992c0a4bb26fc3d6512b9b", "score": "0.5902478", "text": "public function render()\n {\n // Always add this class\n $this->addClass('time');\n\n // Create HTML string\n $html = parent::render();\n\n // Convert the value to a mysql friendly format or leave null.\n $mysql_date = $this->value ?\n date(Library\\Utils\\Constants::MYSQL_TIME, strtotime($this->value)) :\n null;\n\n // Add a hidden field that will contain the mysql value, for storing in db\n $html .= HtmlInput::hidden($this->name, $mysql_date)->id($this->name);\n\n // Return the string\n return $html;\n }", "title": "" }, { "docid": "11998f7f30a8f5ab49726753df158c54", "score": "0.5878762", "text": "private function Timefield() {\n return '<input type=\"text\" size=\"' . ($this->DATELENGTH-4) . '\" name=\"' . $this->name . '\" value=\"' . $this->default_value . '\" />' . \"\\n\";\n }", "title": "" }, { "docid": "9b5e34f00d99a4122ee2d1e8a25bf164", "score": "0.58692706", "text": "public function __toString() {\n $time = $this->getUnixTime();\n if (self::isThisYear($time)) return date('F j', $time);\n else return date('F j, Y', $time);\n }", "title": "" }, { "docid": "bad6eebdbd5b366627cd43c89c84533d", "score": "0.58681166", "text": "public function AsString( ) {\n\n if ( $this->m_end_date == null ){\n $endday = $endmonth = $endyear = 0;\n } else {\n $endday = $this->m_end_date->Day();\n $endmonth = $this->m_end_date->Month();\n $endyear = $this->m_end_date->Year();\n }\n\n if ( $this->m_start_date == null ){\n $startday = $startmonth = $startyear = 0;\n } else {\n $startday = $this->m_start_date->Day();\n $startmonth = $this->m_start_date->Month();\n $startyear = $this->m_start_date->Year();\n }\n\n\n $on_last = $this->m_on_last_week ? 1 : 0;\n $on_any = $this->m_on_any_week ? 1 : 0;\n\n\t$this->GetFullWeekArray( $a_weeks );\n\t$str_weeks = implode( ':', $a_weeks );\n\n\t$this->GetFullWeekdayArray( $a_week_days );\n\t$str_week_days = implode( ':', $a_week_days );\n\n return sprintf( \"s5-%d:%d:%d:%d-(%d.%d.%d)-(%d.%d.%d)-{{$str_week_days}}-{{$str_weeks}:%d:%d}\",\n $this->m_directionOnSaturday, $this->m_directionOnSunday, $this->m_directionOnCelebrity,$this->m_directionOnHoliday,\n $startday, $startmonth, $startyear,\n $endday, $endmonth, $endyear, $on_last, $on_any\n );\n }", "title": "" }, { "docid": "99210db5dfbfaf5db8f0190dc725fe01", "score": "0.58661073", "text": "function __toString()\n\t{\n\t\treturn $this->stb . \"|\" . $this->title . \"|\" . $this->provider . \"|\" . $this->date . \"|\" . $this->rev . \"|\" . $this->viewtime;\n\t}", "title": "" }, { "docid": "e758f1146730182ca49cbcd6abe4907b", "score": "0.5817628", "text": "public function __toString()\n {\n return $this->toNativeDateTime()->format('G:i:s');\n }", "title": "" }, { "docid": "d9cc09c31ef495ce3a77a3b6874a7429", "score": "0.5814466", "text": "public function __toString()\n {\n return (string)$this->getSeconds();\n }", "title": "" }, { "docid": "d39996bbcee2f822729653293425fab5", "score": "0.5789399", "text": "public function toString() {\n return $this->datetime . \" | \" . \n $this->user . \" | \" . \n $this->url . \" | \" . \n \"[\" . $this->readable . \"] | \" . \n \"[\" . $this->source . \"]\" . PHP_EOL;\n }", "title": "" }, { "docid": "1d88fa17d0a56d1c0f1de4544200f974", "score": "0.5786133", "text": "public function __toString()\n {\n return $this->error()\n ? '0'\n : strval($this->getTimestamp());\n }", "title": "" }, { "docid": "4a9d30436df1f666f40e34d1fb6013ff", "score": "0.57559884", "text": "public function __toString(): string\n {\n return $this->formatComments() . $this->schedule . ' ' . $this->command . PHP_EOL;\n }", "title": "" }, { "docid": "722c269dd52773bebf3847760064d14c", "score": "0.5745607", "text": "public function __toString()\n {\n return $this->format();\n }", "title": "" }, { "docid": "722c269dd52773bebf3847760064d14c", "score": "0.5745607", "text": "public function __toString()\n {\n return $this->format();\n }", "title": "" }, { "docid": "8bfe46e1229ca844df72a62dba4594e7", "score": "0.574293", "text": "public function __toString() {\n return $this->format(self::FORMAT);\n }", "title": "" }, { "docid": "dfbff2918a16cbc2d7446c224f2c9f18", "score": "0.5734921", "text": "public function __toString() : string\n {\n return $this->format($this->dateFormat);\n }", "title": "" }, { "docid": "7ed4e88bfcbe88d1980b60e339e0325b", "score": "0.5723674", "text": "public function __toString() {\n $desc = $this->getName();\n $desc .= \" (age \" . $this->getAge() . \")\";\n return $desc;\n }", "title": "" }, { "docid": "095cc31c8928ba37204ebd0c412c9d19", "score": "0.5721338", "text": "protected function renderTimes_begin()\n {\n // @codingStandardsIgnoreEnd\n $times = (object) array(\n 'begin' => c::renderInterval($this->times_begin)\n );\n\n if ($this->times_end !== null) {\n $times->end = c::renderInterval($this->times_end);\n }\n\n return c::renderKeyValue(\n 'times',\n c::renderDictionary($times)\n );\n }", "title": "" }, { "docid": "e8cfd6c6cb45f62b6261f335c60da6b6", "score": "0.57056206", "text": "public function __toString(): string {\n return sprintf(\n '%s: (longitude: %.6f, age: %d)',\n $this->state,\n $this->longitude,\n $this->age\n );\n }", "title": "" }, { "docid": "77d0828b5ebf6336743ef30051761046", "score": "0.5701585", "text": "private function getLog() \n {\n return \n $this->format2Bold($this->getDateTime()).\n //$this->getStation().\n $this->getName().\n $this->getFormattedDeviceValue().\n $this->getOptionalMsg();\n }", "title": "" }, { "docid": "cafaa40debb36c19835ac5e1df0e5360", "score": "0.5689146", "text": "public function __toString() {\n\t\t$str = $this->getName() . ' on line ' . $this->line;\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "25a9296b2a5f62e4ff6302c184f0b75c", "score": "0.56830794", "text": "public function __construct($timeExp){\n $this->form = isset($timeExp['form']) ? $timeExp['form'] : '';\n $this->date = isset($timeExp['date']) ? $timeExp['date'] : '';\n $this->time = isset($timeExp['time']) ? $timeExp['time'] : '';\n $this->inip = isset($timeExp['inip']) ? $timeExp['inip'] : '';\n $this->endp = isset($timeExp['endp']) ? $timeExp['endp'] : '';\n }", "title": "" }, { "docid": "c970801ef0174efef2b4f358cc8bb7e3", "score": "0.56828064", "text": "public function getLifetime(): string\n {\n return 'PT' . $this->lifeTime . 'H';\n }", "title": "" }, { "docid": "59152c17848732cb8aa0707d1e3ccfd8", "score": "0.5676271", "text": "public function __toString() {\n $str = $this->timestamp . \" \" . $this->recipient . \" \" . $this->state;\n if ($this->state != \"OK\") {\n $str .= \" \" . $this->error;\n }\n $str .= \" \" . $this->description;\n \n return $str;\n }", "title": "" }, { "docid": "759c50a886748306925c61d4c83004e3", "score": "0.5667744", "text": "public function __toString()\n {\n // TODO: Implement __toString() method.\n return \"=> $this->nom $this->prenom | $this->datenaiss - $this->lieunaiss \\n\";\n }", "title": "" }, { "docid": "bcbc5bc77d52bf36ecebbb1ddbbf484f", "score": "0.5663685", "text": "public function __toString() {\n\t\treturn implode( '-', [ $this->get_last_date()->getTimestamp(), $this->get_last_id(), $this->get_last_count() ] );\n\t}", "title": "" }, { "docid": "6a141a1a47013fb46ef10ab4aac9bbfe", "score": "0.56524473", "text": "function toString() {\n $out = $this->getDaogenVersion();\n $out = $out.\"\\nclass Session, mapping to table teleprogramm_mir\\n\";\n $out = $out.\"Persistent attributes: \\n\"; \n $out = $out.\"sessionID = \".$this->sessionID.\"\\n\"; \n $out = $out.\"showID = \".$this->showID.\"\\n\"; \n $out = $out.\"sessionDateTime = \".$this->sessionDateTime.\"\\n\"; \n $out = $out.\"title = \".$this->title.\"\\n\"; \n return $out;\n }", "title": "" }, { "docid": "1eb371795b6102f52082c6b1b061a792", "score": "0.56429607", "text": "function __toString() {\n $str = get_class($this);\n foreach ($this->parameters as $name => $value) {\n $str .= \"\\n\".$name.': '.$value;\n }\n return $str;\n }", "title": "" }, { "docid": "bb32642e4a4cf6e7aefefe29b827ee8d", "score": "0.56307894", "text": "public function toLine()\n\t{\n\t\t// Property-name\n\t\t$line = $this->getName();\n\t\tif ($this->parameterCollection && $this->parameterCollection->hasParams()) \n\t\t{\n\t\t\t$line .= ';' . $this->parameterCollection->toString();\n\t\t}\n\t\t// Property value\n\t\t$line .= ':' . $this->value->getEscapedValue();\n\t\t//e.g. DTSTART;TZID=Asia/Kolkata:20170501T080000\n\t\treturn $line;\n\t}", "title": "" }, { "docid": "56799bfd821e7c68b03c0ba1b535b65e", "score": "0.5623457", "text": "function __toString()\r\n {\r\n return 'Take train ' . $this->getTrainNumber() . ' from ' . $this->getDepartureLocation() . ' to ' . $this->getArrivalLocation() . '. Sit in seat ' . $this->getSeatNumber() . '.';\r\n }", "title": "" }, { "docid": "dbbeab95691ff89921ff3b2b5342e021", "score": "0.56214124", "text": "public function toString()\n {\n return 'Attribute Update by Schedule message is present.';\n }", "title": "" }, { "docid": "5bb170733e1b436f35b1a3aef800a6e1", "score": "0.561921", "text": "public function toString() {\n $a= '';\n foreach ($this->attribute as $name => $value) {\n $a.= ' @'.$name.'= '.xp::stringOf($value);\n }\n $s= $this->getClassName().'('.$this->name.$a.') {';\n if (!$this->children) {\n $s.= NULL === $this->content ? ' ' : ' '.xp::stringOf($this->content).' ';\n } else {\n $s.= NULL === $this->content ? \"\\n\" : \"\\n \".xp::stringOf($this->content).\"\\n\";\n foreach ($this->children as $child) {\n $s.= ' '.xp::stringOf($child, ' ').\"\\n\";\n }\n }\n return $s.'}';\n }", "title": "" }, { "docid": "4750af9e314d4b916266b0a2c388f258", "score": "0.5618265", "text": "public function toString()\n {\n return $this->format('Y-m-d H:i:s').'|'.$this->getTimezone()->getName();\n }", "title": "" }, { "docid": "a3de7b285e8859245a9c580dad88095f", "score": "0.5614812", "text": "public function __toString()\r\n\t\t{\r\n\t\t\t//implode('-', $arr_data);\r\n\t\t\treturn $this->data[0] . '-' . $this->data[1] . '-' . $this->data[2]; // выведет дату в формате 'год-месяц-день'\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "86281a2edad2396c375d3191b0af3eeb", "score": "0.5613671", "text": "public function toString(){\n $output = '';\n $aFields = get_object_vars($this);\n foreach($aFields as $name => $value)\n if($value != '')\n $output .= \"\\t$name: \".$value.\"\\n\";\n if(!empty($output))\n $output = \"Quotation:\\n\".$output;\n return $output;\n }", "title": "" }, { "docid": "2ab786b90046a90ba35b5e913df4a9a6", "score": "0.5597749", "text": "function getTimeString() {\n $str_time = \"\";\n if ($this->getString(\"has_start_time\") == \"y\") {\n $startTimeStr = explode(\":\", $this->getString(\"start_time\"));\n if (CLOCK_TYPE == '24') {\n $start_time_hour = $startTimeStr[0];\n } elseif (CLOCK_TYPE == '12') {\n if ($startTimeStr[0] > \"12\") {\n $start_time_hour = $startTimeStr[0] - 12;\n $start_time_am_pm = \"pm\";\n } elseif ($startTimeStr[0] == \"12\") {\n $start_time_hour = 12;\n $start_time_am_pm = \"pm\";\n } elseif ($startTimeStr[0] == \"00\") {\n $start_time_hour = 12;\n $start_time_am_pm = \"am\";\n } else {\n $start_time_hour = $startTimeStr[0];\n $start_time_am_pm = \"am\";\n }\n }\n if ($start_time_hour < 10)\n $start_time_hour = \"0\" . ($start_time_hour + 0);\n $start_time_min = $startTimeStr[1];\n $str_time .= $start_time_hour . \":\" . $start_time_min . \" \" . $start_time_am_pm;\n } else {\n $str_time .= LANG_NA;\n }\n $str_time .= \" - \";\n if ($this->getString(\"has_end_time\") == \"y\") {\n $endTimeStr = explode(\":\", $this->getString(\"end_time\"));\n if (CLOCK_TYPE == '24') {\n $end_time_hour = $endTimeStr[0];\n } elseif (CLOCK_TYPE == '12') {\n if ($endTimeStr[0] > \"12\") {\n $end_time_hour = $endTimeStr[0] - 12;\n $end_time_am_pm = \"pm\";\n } elseif ($endTimeStr[0] == \"12\") {\n $end_time_hour = 12;\n $end_time_am_pm = \"pm\";\n } elseif ($endTimeStr[0] == \"00\") {\n $end_time_hour = 12;\n $end_time_am_pm = \"am\";\n } else {\n $end_time_hour = $endTimeStr[0];\n $end_time_am_pm = \"am\";\n }\n }\n if ($end_time_hour < 10)\n $end_time_hour = \"0\" . ($end_time_hour + 0);\n $end_time_min = $endTimeStr[1];\n $str_time .= $end_time_hour . \":\" . $end_time_min . \" \" . $end_time_am_pm;\n } else {\n $str_time .= LANG_NA;\n }\n if (($this->getString(\"has_start_time\") == \"n\") && ($this->getString(\"has_end_time\") == \"n\")) {\n $str_time = \"\";\n }\n return $str_time;\n }", "title": "" }, { "docid": "426deaa4a430dfd467471c77886d2ca3", "score": "0.55881274", "text": "public function __toString()\n {\n return $this->getTitle() . \" From \" . $this->getStartString() . ' to ' . $this->getEndString();\n }", "title": "" }, { "docid": "471065b9c69e93a054c090c638291d86", "score": "0.5584912", "text": "public function __toString(): string\n {\n return \"{$this->getName()} ({$this->getAge()} age)\";\n }", "title": "" }, { "docid": "c7ec73c5a6baa5608102eda404511b2e", "score": "0.55822176", "text": "public function describe()\n {\n return $this->name . \",\" . $this->age . \"years ago\";\n }", "title": "" }, { "docid": "32a208aeef919736c02e1ab49065f4f5", "score": "0.5573887", "text": "public function toString() {\n return $this->getClassName().'('.$this->name.' ttl '.$this->ttl.' '.$this->address->toString().')';\n }", "title": "" }, { "docid": "3d6cb24c4976539b4863382c710419a5", "score": "0.55722034", "text": "public function toISO8601String()\n {\n return $this->format('c');\n }", "title": "" }, { "docid": "b582ce76b6bb2908094d02f387b8e1dd", "score": "0.5571821", "text": "public function __toString(){\n\t\treturn $this->class_ . \"::$\" . $this->name;\n\t}", "title": "" }, { "docid": "25228cdce77bc5f3ce1ccda256d1dcda", "score": "0.5569314", "text": "public function time() : string\n {\n return $this->format('g:i');\n }", "title": "" }, { "docid": "48372be82629acf70caf3e6728330f84", "score": "0.55641305", "text": "public function __toString() {\n\n\t\treturn \"<strong>Name:</strong> \" . $this->NAME . \"<br/>\" .\n\t\t\t\t\"<strong>Navigation caption:</strong> \" . $this->NAVIGATIONCAPTION . \"<br/>\" .\n\t\t\t\t\"<strong>Description:</strong> \" . $this->DESCRIPTION . \"<br/>\" .\n\t\t\t\t\"<strong>Next allowed request time:</strong> \" . $this->NEXT_REQUEST_TIMESTAMP . \"<br/>\";\n\t}", "title": "" }, { "docid": "c766b7166ccdb85a91bfabe18960c7e2", "score": "0.5561737", "text": "function _createFormat() {\n $objectname = null;\n switch ($this->format) {\n case 'xcal':\n $objectname = ( isset($this->timezonetype)) ?\n strtolower($this->timezonetype) : strtolower($this->objName);\n $this->componentStart1 = $this->elementStart1 = '<';\n $this->componentStart2 = $this->elementStart2 = '>';\n $this->componentEnd1 = $this->elementEnd1 = '</';\n $this->componentEnd2 = $this->elementEnd2 = '>' . $this->nl;\n $this->intAttrDelimiter = '<!-- -->';\n $this->attributeDelimiter = $this->nl;\n $this->valueInit = null;\n break;\n default:\n $objectname = ( isset($this->timezonetype)) ?\n strtoupper($this->timezonetype) : strtoupper($this->objName);\n $this->componentStart1 = 'BEGIN:';\n $this->componentStart2 = null;\n $this->componentEnd1 = 'END:';\n $this->componentEnd2 = $this->nl;\n $this->elementStart1 = null;\n $this->elementStart2 = null;\n $this->elementEnd1 = null;\n $this->elementEnd2 = $this->nl;\n $this->intAttrDelimiter = '<!-- -->';\n $this->attributeDelimiter = ';';\n $this->valueInit = ':';\n break;\n }\n return $objectname;\n }", "title": "" }, { "docid": "75f807ced0e917235a3f1a918b246a4d", "score": "0.55589545", "text": "public function __toString()\n {\n return $this->compile();\n }", "title": "" }, { "docid": "75f807ced0e917235a3f1a918b246a4d", "score": "0.55589545", "text": "public function __toString()\n {\n return $this->compile();\n }", "title": "" }, { "docid": "5e083233419d29c34fc0745ffcd5bf26", "score": "0.55563504", "text": "public function toString() {\n return $this->getClassName().'('.\n 'id= '.$this->id.', name= '.$this->name.', department= '.$this->department.', years= '.$this->years.\n ')';\n }", "title": "" }, { "docid": "54c9a737f3ded3d55d6463aac5a39b89", "score": "0.55514675", "text": "public function __toString() {\n return $this->compile();\n }", "title": "" }, { "docid": "1db3fbbd3a2fbcaede42a9c5d2461a0a", "score": "0.5547245", "text": "function about()\n {\n return array('name' => Horde_Form_Translation::t(\"Time\"));\n }", "title": "" }, { "docid": "dab5460ebedb3ce69bfa9417a5ffc204", "score": "0.55349416", "text": "public function __toString() {\n $s = \"\";\n $s .= \"<table>\\n\";\n $s .= \"<tr><td colspan=2><hr></td></tr>\\n\";\n foreach (get_class_vars(get_class($this)) as $name => $value) {\n $s .= \"<tr><td>$name:</td><td>\" . $this->$name . \"</td></tr>\\n\";\n }\n $s .= \"<tr><td colspan=2><hr></td></tr>\\n\";\n $s .= \"</table>\\n\";\n return $s;\n }", "title": "" }, { "docid": "a732af7476172162821a7487c51bcc7c", "score": "0.55324996", "text": "protected function generate()\n {\n $this->description = 'Programmeursdag';\n\n if ($this->year >= 2002) {\n if ($this->year % 4 === 0) {\n $this->startDate = new \\DateTime($this->year . '-09-12');\n $this->endDate = new \\DateTime($this->year . '-09-12');\n } else {\n $this->startDate = new \\DateTime($this->year . '-09-13');\n $this->endDate = new \\DateTime($this->year . '-09-13');\n }\n\n $this->totalLength = 1;\n } else {\n $this->valid = false;\n }\n }", "title": "" }, { "docid": "c69d86737a4110b5d6442b17eff747ac", "score": "0.55217344", "text": "public function __toString(): string\n {\n $attrs = $this->makeAttrsOutput();\n return \\sprintf('<%s %s>', static::TAG_NAME, $attrs);\n }", "title": "" }, { "docid": "f4e8bda11d661b10b0e9d2e5427c5ce5", "score": "0.55096275", "text": "public function __construct() \n {\n if (func_num_args() == 1) {\n $this->_timestamp = func_get_arg(0);\n } else if (func_num_args() == 6) {\n $this->_timestamp = $this->mktime(\n func_get_arg(0), func_get_arg(1), func_get_arg(2), \n func_get_arg(3), func_get_arg(4), func_get_arg(5)\n );\n } else {\n $this->_timestamp = \\time();\n }\n $this->_date();\n }", "title": "" }, { "docid": "6ece003a9e504fad47bb863412cb063f", "score": "0.5509401", "text": "function toString($newLine = \"\\n\") {\n\t\t$string = '';\n\t\t$string .= \" ScheduleTypeID[$this->_ScheduleTypeID] $newLine\";\n\t\t$string .= \" Description[$this->_Description] $newLine\";\n\t\t$string .= \" TimeOffset[$this->_TimeOffset] $newLine\";\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "f2dc2ff0e7ae32b6cdd2701d9fc3857d", "score": "0.55092204", "text": "function getSummaryLine(){\n// $base .= $this->shopducerFirstName;\n $base = parent::getSummaryLine();////调用被复写方法\n $base .= \"playing time - $this->playLength\";\n return $base;\n }", "title": "" }, { "docid": "4f4963bb281e55481c76c1ffed431a66", "score": "0.55067444", "text": "public function __toString() {\n\t\treturn $this->debug();\n\t}", "title": "" }, { "docid": "eda6829d41bed2d9e4ce6e861a911682", "score": "0.5504949", "text": "public function timeCreation(){\n\t$dateTime = Zend_Date::now()->toString('yyyy-MM-dd HH:mm:ss');\n\treturn $dateTime;\n\t}", "title": "" }, { "docid": "6092629a4d002ddc44fec078f2482a9b", "score": "0.5503064", "text": "function qaSwitchFormat() {\n /* trial */\n global $logger;\n //$logger->debug(\"BirthDTO::qaSwitchFormat - summertime_offset = $this->m_summertime_offset\");\n //$logger->debug(\"BirthDTO::qaSwitchFormat - timezone_offset = $this->m_timezone_offset\");\n $qbStr = sprintf('-qb %d %d %d %d.%02d %s %s %s %s', $this->month, $this->day, $this->year, $this->hour, $this->minute, $this->m_summertime_offset, $this->m_timezone_offset, $this->parseCoords($this->longitude, true), $this->parseCoords($this->latitude, false));\n //$logger->debug(\"BirthDTO::qaSwitchFormat - $qbStr\");\n return $qbStr;\n }", "title": "" }, { "docid": "367c56a95755d0f15c02ec7c11707aa4", "score": "0.5498515", "text": "function constructTimeField($args)\n {\n $currentlySpecifiedTime = get_option('adb_homepage_planner_time');\n\n echo '<input type=\"datetime-local\" name=\"adb_homepage_planner_time\" step=\"1\" value=\"' . $currentlySpecifiedTime . '\">';\n }", "title": "" }, { "docid": "dc2349ba8152624a42d2612be6dadc97", "score": "0.54975814", "text": "function printPea() {\n\t\t$ret .=\"\\tprivate __attributes = array(\\n\";\n\t\treset ($this->attributes);\n\t\twhile ( list ($k,$v) = @each($this->attributes) ) {\n\t\t\tif ($v->complex) {\n\t\t\t$ret .= \"\\t'\".$v->name.\"'=>'\".$v->type.\"',\\n\";\n\t\t\t} else {\n\t\t\t$ret .= \"\\t'\".$v->name.\"'=>'\".$v->type.\"',\\n\";\n\t\t\t}\n\t\t}\n\t\t$ret = substr($ret,0,-2);\n\t\t$ret .= \");\\n\";\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "8982b8b313baa8d8904b8ac7267fbb0f", "score": "0.54945827", "text": "public function __toString() {\r\n\t\treturn $this->getPrint();\r\n\t}", "title": "" }, { "docid": "b41dc5ed06271507df68c7a317e942a3", "score": "0.54898983", "text": "public function __toString()\n\t {\n\t $utc = new DateTimeZone('UTC');\n\t $start = clone $this->start;\n\t $end = clone $this->end;\n\n\t return $start->setTimeZone($utc)->format(self::ISO8601) . '/' . $end->setTimeZone($utc)->format(self::ISO8601);\n\t }", "title": "" }, { "docid": "6ead5cc9d0b2f10300814d7361fae5f3", "score": "0.54891247", "text": "public function toString() {\n $fields= '';\n foreach (array_keys($this->fields) as $name) {\n $fields.= sprintf(\" [%-20s] %s\\n\", $name, xp::stringOf($this->fields[$name]));\n }\n return sprintf(\n \"%s@(name= %s) {\\n%s}\",\n $this->getClassName(),\n $this->className,\n $fields\n );\n }", "title": "" }, { "docid": "0ac96b64bccf79930d02d5f425ae0649", "score": "0.54864675", "text": "public function formatTimes()\n {\n $start = date_parse_from_format('H:i', $this->start_time);\n $end = date_parse_from_format('H:i', $this->end_time);\n $duration = date_parse_from_format('H:i', $this->duration);\n\n $this->start_time = $start['hour'] . \":\" . str_pad($start['minute'], 2, 0, STR_PAD_LEFT);\n $this->end_time = $end['hour'] . \":\" . str_pad($end['minute'], 2, 0, STR_PAD_LEFT);\n $this->duration = $duration['hour'] . \":\" . str_pad($duration['minute'], 2, 0, STR_PAD_LEFT);\n }", "title": "" }, { "docid": "dad293f39fddbd3bbd22f5f6fff3c13f", "score": "0.5474903", "text": "public function getTime(): string\n {\n return (new \\DateTimeImmutable('now'))->format('Y-m-d H:i:s a');\n }", "title": "" }, { "docid": "e3f4addb74f76f345136c8a876aabf68", "score": "0.54717225", "text": "public function __toString() {\n return $this->day;\n }", "title": "" }, { "docid": "766f2bc11b8c6f5e8f17cae884ee344e", "score": "0.5471161", "text": "public function __toString()\n {\n return (string) $this->format( $this->defaultFormat );\n }", "title": "" }, { "docid": "5774418354e0d032ded5024fb1a80b37", "score": "0.5466658", "text": "public function __construct() {\n// $format = 'Y-m-d H:i';\n// $this->outputDateFormat = $format;\n }", "title": "" }, { "docid": "2dd1f1a3d30cc1b7fb145974a479d8ab", "score": "0.5465302", "text": "public function __construct()\n {\n info(__METHOD__, [time()]);\n }", "title": "" }, { "docid": "df2a80337ab57bab749d822ef6e2da94", "score": "0.54640305", "text": "public function __toString() {\n\t\treturn $this->getPrint();\n\t}", "title": "" }, { "docid": "3a163f15bf2b75bb0103ceebf724b6d0", "score": "0.54635864", "text": "public function __toString()\n {\n return $this->month . \" mois - \" . ($this->interestRate * 100) . \"%\";\n }", "title": "" }, { "docid": "0ec9cbab2f49c1ef8330214f79ac8367", "score": "0.5462477", "text": "public function __toString()\n {\n return $this->name . \":\" . $this->value;\n }", "title": "" }, { "docid": "dfbbf2fe86b67945d50318f85deb6c35", "score": "0.5455838", "text": "public function __toString() {\r\n return \"ack: \" . $this->ack . \"\\n\" .\r\n \"timestamp: \" . $this->timestamp . \"\\n\";\r\n }", "title": "" }, { "docid": "38d775e4741d11566f58c13ca6ce53d8", "score": "0.5451107", "text": "public function __toString(): string\n {\n return $this->getDefaultDate();\n }", "title": "" }, { "docid": "1a40a2d52557a55898268bbd388f8e50", "score": "0.54506254", "text": "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Time\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Time\\ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "a268d56ccfdffdc41228fd8dd5e066ef", "score": "0.5449961", "text": "public function __toString()\n {\n if ($this->date !== null) {\n $date = $this->date->format(\"Y-m-d H:m:s\");\n } else {\n $date = \"\";\n }\n\n return \"<Commit date=\\\"$date\\\" id=\\\"$this->id\\\"/>\";\n }", "title": "" } ]
dc7884d1eb499c05cb3778f0f2e0026e
Fetches array of information for the xml body
[ { "docid": "a6ff5abf0d08f4b8c1bbdd113cc3fbd4", "score": "0.0", "text": "private function getBody(CasesEntity $cases, ErruRequestEntity $erruRequest)\n {\n return [\n 'name' => 'Body',\n 'attributes' => [\n 'businessCaseId' => $erruRequest->getNotificationNumber(),\n 'originatingAuthority' => $erruRequest->getOriginatingAuthority(),\n 'licensingAuthority' => $this->getAuthority(),\n 'responseDateTime' => $this->getResponseDateTime()\n ],\n 'nodes' => [\n 0 => [\n 'name' => 'TransportUndertaking',\n 'attributes' => [\n 'name' => $erruRequest->getTransportUndertakingName()\n ],\n 'nodes' => $this->formatPenalties($cases->getSeriousInfringements())\n ]\n ]\n ];\n }", "title": "" } ]
[ { "docid": "1f11acb4abe151866338961fb1eb9b1e", "score": "0.6241139", "text": "public function readBody();", "title": "" }, { "docid": "95459b02981d129fccd7996af47fdf5e", "score": "0.6230364", "text": "public function getBody() {}", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.62126094", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.62126094", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.62126094", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.62126094", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.62126094", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.62126094", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.62126094", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.62126094", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.62126094", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.62126094", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.62126094", "text": "public function getBody();", "title": "" }, { "docid": "5eba8306c1ff6ec783cac4a0c20c7b9c", "score": "0.61247134", "text": "function getBody(){\n \n $feedo = $this->getFeed();\n\n $ret_str = array();\n $ret_str[] = sprintf('%s?xml version=\"1.0\" encoding=\"%s\"?%s','<',$feedo->getCharset(),'>');\n $ret_str[] = '<feed xmlns=\"http://www.w3.org/2005/Atom\">';\n $ret_str[] = sprintf(' <title type=\"html\">%s</title>',$this->getSafe($feedo->getTitle()));\n $ret_str[] = sprintf(' <subtitle type=\"html\">%s</subtitle>',$this->getSafe($feedo->getDesc()));\n $ret_str[] = sprintf(' <link href=\"%s\" rel=\"alternate\"/>',$this->getSafe($feedo->getLink()));\n $ret_str[] = sprintf(' <id>%s</id>',$this->getSafe($feedo->getId()));\n $ret_str[] = sprintf(' <generator>%s</generator>',$this->getSafe($feedo->getName()));\n \n if($feedo->hasTimestamp()){\n $ret_str[] = sprintf(' <updated>%s</updated>',$this->getTimeStr($feedo->getTimestamp()));\n }//if\n \n if($feedo->hasAuthor()){\n $ret_str[] = ' <author>';\n \n $author_map = $feedo->getAuthor();\n if(!empty($author_map['name'])){\n $ret_str[] = sprintf(' <name>%s</name>',$this->getSafe($author_map['name']));\n }//if\n if(!empty($author_map['url'])){\n $ret_str[] = sprintf(' <uri>%s</uri>',$this->getSafe($author_map['url']));\n }//if\n if(!empty($author_map['email'])){\n $ret_str[] = sprintf(' <email>%s</email>',$this->getSafe($author_map['email']));\n }//if\n \n $ret_str[] = ' </author>';\n }//if\n \n foreach($feedo->getItems() as $feedo_item){\n \n $ret_str[] = ' <entry>';\n $ret_str[] = sprintf(' <title type=\"html\">%s</title>',$this->getSafe($feedo_item->getTitle()));\n \n if($feedo_item->hasLink()){\n $ret_str[] = sprintf(' <link rel=\"alternate\" href=\"%s\"/>',$this->getSafe($feedo_item->getLink()));\n }//if\n \n if($feedo_item->hasId()){\n $ret_str[] = sprintf(' <id>%s</id>',$this->getSafe($feedo_item->getId()));\n }//if\n \n $ret_str[] = sprintf(' <summary type=\"html\">%s</summary>',$this->getSafe($feedo_item->getDesc()));\n $ret_str[] = sprintf(' <updated>%s</updated>',$this->getTimeStr($feedo_item->getTimestamp()));\n \n if($feedo_item->hasAuthor()){\n $ret_str[] = ' <author>';\n $author_map = $feedo_item->getAuthor();\n if(!empty($author_map['name'])){\n $ret_str[] = sprintf(' <name>%s</name>',$this->getSafe($author_map['name']));\n }//if\n if(!empty($author_map['url'])){\n $ret_str[] = sprintf(' <uri>%s</uri>',$this->getSafe($author_map['url']));\n }//if\n if(!empty($author_map['email'])){\n $ret_str[] = sprintf(' <email>%s</email>',$this->getSafe($author_map['email']));\n }//if\n $ret_str[] = ' </author>';\n }//if\n \n if($feedo_item->hasTags()){\n foreach($feedo_item->getTags() as $tag_map){\n $ret_str[] = sprintf(\n ' <category scheme=\"%s\" term=\"%s\"/>',\n $this->getSafe($tag_map['url']),\n $this->getSafe($tag_map['tag'])\n );\n }//foreach\n }//if\n \n $ret_str[] = ' </entry>';\n \n }//foreach\n \n $ret_str[] = '</feed>';\n return join(\"\\n\",$ret_str);\n \n }", "title": "" }, { "docid": "f15420e62ef39af902568b795234d76b", "score": "0.6062356", "text": "public function getXmlBody()\n {\n return $this->_xml;\n }", "title": "" }, { "docid": "0b2d88493d1ef7d42dc2d47b7c70d535", "score": "0.6043177", "text": "abstract protected function getBody();", "title": "" }, { "docid": "f4858531fe38da071f418903527b9cd7", "score": "0.60349673", "text": "public abstract function getBody();", "title": "" }, { "docid": "2b4bcb9a658ab89c3d1ce8e7b5b70837", "score": "0.60100216", "text": "abstract public function getXml();", "title": "" }, { "docid": "60bba70258647693a93b3ead64dd3628", "score": "0.6002025", "text": "public function getParsedBody();", "title": "" }, { "docid": "ee47eca496b02fead66e91496554bd32", "score": "0.5972383", "text": "private function getData()\n {\n $dataarr = [];\n $data = $this->pullAndParseXML();\n if( !empty($data) )\n {\n foreach($data->events->event as $eventObject)\n {\n $dataarr[] = $eventObject;\n }\n }\n return $dataarr;\n }", "title": "" }, { "docid": "6ce5a3544311ecbe2c999ac698023899", "score": "0.5961777", "text": "public function getInfo(): array;", "title": "" }, { "docid": "e2a393ba516788332cab7c227465bba1", "score": "0.5958269", "text": "private function parse($body)\n {\n $xml = simplexml_load_string($body);\n $response = array();\n\n $response['receipt_id'] = (string) $xml->receipt->ReceiptId;\n $response['reference_num'] = (string) $xml->receipt->ReferenceNum;\n $response['response_code'] = (string) $xml->receipt->ResponseCode;\n $response['iso'] = (string) $xml->receipt->ISO;\n $response['auth_code'] = (string) $xml->receipt->AuthCode;\n $response['trans_time'] = (string) $xml->receipt->TransTime;\n $response['trans_date'] = (string) $xml->receipt->TransDate;\n $response['trans_type'] = (string) $xml->receipt->TransType;\n $response['complete'] = (string) $xml->receipt->Complete;\n $response['message'] = (string) $xml->receipt->Message;\n $response['trans_amount'] = (string) $xml->receipt->TransAmount;\n $cardtype = (string) $xml->receipt->CardType;\n $response['card_type'] = isset($this->credit_card_types[$cardtype])\n ? $this->credit_card_types[$cardtype]\n : null;\n $response['transaction_id'] = (string) $xml->receipt->TransID;\n $response['timed_out'] = (string) $xml->receipt->TimedOut;\n $response['bank_totals'] = (string) $xml->receipt->BankTotals;\n $response['ticket'] = (string) $xml->receipt->Ticket;\n $response['avs_result_code']= (string) $xml->receipt->AvsResultCode;\n $response['cvd_result_code']= (string) $xml->receipt->CvdResultCode;\n\n if ($response['avs_result_code'] == 'null') {\n $response['avs_result_code'] = null;\n }\n\n return $response;\n }", "title": "" }, { "docid": "3d82bd8bce4d3d613c410c6ea3b2858a", "score": "0.5930211", "text": "public function getBodysList(){\n return $this->_get(5);\n }", "title": "" }, { "docid": "2554852f795e2deb4b3a2d109c7ea6c2", "score": "0.5920104", "text": "public function fetchData () {\n\t\t\n\t\t$success\t\t\t\t\t\t =\ttrue;\n\t\t$data\t\t\t\t\t\t\t =\tfile_get_contents(self::URL);\n\t\t\n\t\tif ($data === FALSE) $success\t =\tfalse;\n\t\t\n\t\treturn [\n\t\t\t\"success\"\t\t\t\t\t =>\t$success,\n\t\t\t\"data\"\t\t\t\t\t\t =>\tsimplexml_load_string($data)\n\t\t];\n\t\t\n\t}", "title": "" }, { "docid": "0d518473f3d02e32fda1918a672afc5a", "score": "0.5915474", "text": "public function getBody()\n {\n }", "title": "" }, { "docid": "ed6f54981214d66bfd71739e7fc3752e", "score": "0.58964753", "text": "public function getRequestBody(): array\n {\n $res = [];\n $res['id'] = $this->id;\n $res['uid'] = $this->email;\n\n return $res;\n }", "title": "" }, { "docid": "32fd09aa1dbde1b6bfd51afd6b3ba5e3", "score": "0.58796215", "text": "public function getInnerContent(): array;", "title": "" }, { "docid": "9b8278e528198773a884aef5602c3568", "score": "0.5877423", "text": "public function body(): array\n {\n return $this->body;\n }", "title": "" }, { "docid": "f066a975747575d5dc8af6a7f920eca9", "score": "0.58642256", "text": "function getBody();", "title": "" }, { "docid": "c5e661cac25d6d5b62df28a83492bf9b", "score": "0.58516634", "text": "public function fetchData()\n {\n // TODO SOAP request, Handle params, Authentication etc...\n $data = new \\stdClass();\n $xmlResource = $this->endpoint;\n $xml = @simplexml_load_file($xmlResource) or API::error();\n foreach ((array)$xml->data[0] as $xmlItem => $xmlValue) {\n $data->$xmlItem = $this->handleXmlDataTypes($xmlValue);\n }\n return $data;\n }", "title": "" }, { "docid": "7978ce073203d36905d723b0a71e040b", "score": "0.5850587", "text": "public function getBodyXml()\n {\n $body = $this->getBody();\n\n return Xml::fromJsonObj($body, 'response', true);\n }", "title": "" }, { "docid": "58a49dc4a603578992101b23b144dc8d", "score": "0.5830728", "text": "public function getBodyParameters(): array;", "title": "" }, { "docid": "d4ac4ff9734b341d79f916cd2e2a77be", "score": "0.5818259", "text": "public function get()\r\n\t{\r\n\t\t$body_content = $this->query('//body/*');\r\n\t\t$output = '';\r\n\t\tforeach($body_content as $node) {\r\n\t\t\t$output .= $this->dom->saveXML($node->node);\r\n\t\t}\r\n\t\treturn $output;\r\n\t}", "title": "" }, { "docid": "ea89522712a30b4ed73c5f3f5ab70803", "score": "0.5817141", "text": "public function getBody()\n {\n\n }", "title": "" }, { "docid": "451f0b8e802b20575d5f5cad216a8d8b", "score": "0.58111477", "text": "public function getParsedBody()\n {\n switch ($this->getContentType()) {\n case 'text/xml':\n case 'application/xml':\n $backup = libxml_disable_entity_loader(true);\n $result = simplexml_load_string($this->getBody());\n libxml_disable_entity_loader($backup);\n return $result;\n case 'application/json':\n return json_decode($this->getBody(), true);\n default:\n return $this->getBody();\n }\n }", "title": "" }, { "docid": "a4f16c04d6aa4182a88365553451bb0f", "score": "0.5807959", "text": "function get_soapbody(){\n\t\treturn $this->soapresponse;\n\t}", "title": "" }, { "docid": "6a28789c4ad8cdf627240c08e824ff65", "score": "0.5787599", "text": "public function parseContent(): array\n {\n $tabObj = array();\n\n if ($this->requestMethod == 'curl') {\n\n $curl = new Request\\CurlClass();\n $curl->submit($this->url);\n\n if ($curl->isSuccess() === false) {\n Message::displayError($curl->getErrorCodes());\n } else {\n $content = $curl->getResponse();\n\n if (preg_match_all('#<item>(.*?)</item>#is', $content, $result)) {\n\n foreach ($result[0] as $item) {\n $xmlTitle = '';\n $xmlDescription = '';\n $xmlLink = '';\n $xmlPubDate = '';\n $xmlCreator = '';\n\n if (preg_match('#<title>(.*?)</title>#is', $item, $title)) {\n $xmlTitle = $title[1];\n $xmlTitle = html_entity_decode($xmlTitle);\n $xmlTitle = strip_tags($xmlTitle);\n }\n\n if (preg_match('#<description>(.*?)</description>#is', $item, $description)) {\n $xmlDescription = $description[1];\n $xmlDescription = html_entity_decode($xmlDescription);\n $xmlDescription = strip_tags($xmlDescription);\n //$xmlDescription = preg_replace(\"/<img[^>]+\\>/i\", \"\", $xmlDescription);\n }\n\n if (preg_match('#<link>(.*?)</link>#is', $item, $link)) {\n $xmlLink = $link[1];\n $xmlLink = html_entity_decode($xmlLink);\n $xmlLink = strip_tags($xmlLink);\n }\n\n if (preg_match('#<pubDate>(.*?)</pubDate>#is', $item, $pubDate)) {\n $xmlPubDate = $pubDate[1];\n $xmlPubDate = html_entity_decode($xmlPubDate);\n $xmlPubDate = strip_tags($xmlPubDate);\n $xmlPubDate = date(\"Y-m-d H:i:s\", strtotime($xmlPubDate));\n }\n\n if (preg_match('#<dc:creator>(.*?)</dc:creator>#is', $item, $creator)) {\n $xmlCreator = $creator[1];\n $xmlCreator = html_entity_decode($xmlCreator);\n $xmlCreator = strip_tags($xmlCreator);\n }\n\n $xml = new \\stdClass();\n $xml->title = $xmlTitle;\n $xml->description = $xmlDescription;\n $xml->link = $xmlLink;\n $xml->pubDate = $xmlPubDate;\n $xml->creator = $xmlCreator;\n\n $tabObj[] = $xml;\n }\n } else {\n \n }\n } //end if else isSuccess\n } // end if requestMethod == 'curl'\n\n return $tabObj;\n }", "title": "" }, { "docid": "242f5d45f3d0f5551c8bc836c01585b7", "score": "0.5777726", "text": "public function getBody()\n {\n return [\n 'meta' => [\n 'type' => $this->data->getResponseType(),\n 'paginated' => false\n ],\n 'data' => $this->data\n ];\n }", "title": "" }, { "docid": "4af37ff0c6a4f77461f14bb5baf606f7", "score": "0.5732378", "text": "public function parseXmlToArray();", "title": "" }, { "docid": "49f0e092ce2a421bc79dad519c1875dc", "score": "0.5713567", "text": "function getWholeArray(){\n$xml = new XMLReader();\n$xml->open('./XML/REASONS.XML');\n$finalArray = getReasons($xml);\n$xml->close();\nreturn $finalArray;\n}", "title": "" }, { "docid": "62842963795ee3f612fbfb8d3fd44a57", "score": "0.56904924", "text": "public function getInformationRequests()\n {\n return array();\n }", "title": "" }, { "docid": "699afa1eb757e90193bcc8e19c2def9e", "score": "0.56883", "text": "function getBody(){\r\n\r\n $feedo = $this->getFeed();\r\n\r\n $ret_str = array();\r\n $ret_str[] = sprintf('%s?xml version=\"1.0\" encoding=\"%s\"?%s','<',$feedo->getCharset(),'>');\r\n \r\n // build the rss declaration with all the namespaces we might use...\r\n $ret_str[] = '<rss version=\"2.0\"';\r\n \r\n if($feedo->hasNamespaces()){\r\n foreach($feedo->getNamespaces() as $namespace => $namespace_url){\r\n $ret_str[] = sprintf(' xmlns:%s=\"%s\"',$this->getSafe($namespace),$this->getSafe($namespace_url));\r\n }//foreach\r\n }//if\r\n \r\n $ret_str[] = ' xmlns:atom=\"http://www.w3.org/2005/Atom\"';\r\n $ret_str[] = ' xmlns:dc=\"http://purl.org/dc/elements/1.1/\"'; // http://en.wikipedia.org/wiki/Dublin_Core\r\n $ret_str[] = ' xmlns:dcterms=\"http://purl.org/dc/terms/\"';\r\n $ret_str[] = ' xmlns:georss=\"http://www.georss.org/georss\">';\r\n \r\n $ret_str[] = ' <channel>';\r\n $ret_str[] = sprintf(' <title>%s</title>',$this->getSafe($feedo->getTitle()));\r\n $ret_str[] = sprintf(' <link>%s</link>',$this->getSafe($feedo->getLink()));\r\n $ret_str[] = sprintf(' <description>%s</description>',$this->getSafe($feedo->getDesc()));\r\n $ret_str[] = sprintf(\r\n ' <atom:link href=\"%s\" rel=\"self\" type=\"%s\" />',\r\n $this->getSafe($feedo->getFeedLink()),\r\n $this->getContentType()\r\n );\r\n \r\n if($feedo->hasTimestamp()){\r\n $ret_str[] = sprintf(' <pubDate>%s</pubDate>',$this->getTimeStr($feedo->getTimestamp()));\r\n }//if\r\n \r\n $ret_str[] = sprintf(' <generator>%s</generator>',$this->getSafe($feedo->getName()));\r\n //<language>en-us</language>\r\n //<lastBuildDate>Tue, 10 Jun 2003 09:41:01 GMT</lastBuildDate>\r\n //<docs>http://blogs.law.harvard.edu/tech/rss</docs>\r\n \r\n if($feedo->hasAuthor()){\r\n $author_map = $feedo->getAuthor();\r\n if(!empty($author_map['name'])){\r\n $ret_str[] = sprintf(' <managingEditor>%s</managingEditor>',$this->getSafe($author_map['name']));\r\n }//if\r\n if(!empty($author_map['email'])){\r\n $ret_str[] = sprintf(' <webMaster>%s</webMaster>',$this->getSafe($author_map['email']));\r\n }//if\r\n }//if\r\n \r\n foreach($feedo->getItems() as $feedo_item){\r\n $ret_str[] = ' <item>';\r\n $ret_str[] = sprintf(' <title>%s</title>',$this->getCData($feedo_item->getTitle()));\r\n \r\n if($feedo_item->hasLink()){\r\n $ret_str[] = sprintf(' <link>%s</link>',$this->getSafe($feedo_item->getLink()));\r\n }//if\r\n \r\n $ret_str[] = sprintf(' <description>%s</description>',$this->getCData($feedo_item->getDesc()));\r\n $ret_str[] = sprintf(' <pubDate>%s</pubDate>',$this->getTimeStr($feedo_item->getTimestamp()));\r\n \r\n if($feedo_item->hasId()){\r\n $ret_str[] = sprintf(' <guid isPermaLink=\"false\">%s</guid>',$this->getSafe($feedo_item->getId()));\r\n }//if\r\n \r\n if($feedo_item->hasAuthor()){\r\n $author_map = $feedo_item->getAuthor();\r\n // author is only for email addresses, which we almost never want to be revealed\r\n ///$ret_str[] = sprintf(' <author>%s</author>',$this->getSafe($author_map['name']));\r\n // http://www.rssboard.org/rss-profile#namespace-elements-dublin-creator\r\n $ret_str[] = sprintf(' <dc:creator>%s</dc:creator>',$this->getSafe($author_map['name']));\r\n }//if\r\n \r\n // set the start and stop using the DC namespace...\r\n if($feedo_item->hasStart()){\r\n \r\n // I'm going to use the dcterms valid because it makes more sense overall...\r\n // http://web.resource.org/rss/1.0/modules/dcterms/#valid\r\n $ret_str[] = ' <dcterms:valid>';\r\n \r\n // can't use dc:date because it is too much like pubDate...\r\n // http://purl.org/dc/elements/1.1/coverage\r\n ///$ret_str[] = sprintf(' <dc:coverage>');\r\n \r\n // value is a DCMI period: http://dublincore.org/documents/dcmi-period/\r\n \r\n $ret_str[] = sprintf(' start=%s;',date(DATE_ISO8601,$feedo_item->getStart()));\r\n \r\n if($feedo_item->hasStop()){\r\n $ret_str[] = sprintf(' end=%s;',date(DATE_ISO8601,$feedo_item->getStop()));\r\n }//if\r\n \r\n $ret_str[] = ' scheme=W3C-DTF;';\r\n \r\n $ret_str[] = ' </dcterms:valid>';\r\n ///$ret_str[] = ' </dc:coverage>';\r\n \r\n }//if\r\n \r\n if($feedo_item->hasLocation()){\r\n \r\n // value is DCMI point: http://dublincore.org/documents/dcmi-point/\r\n \r\n $location_map = $feedo_item->getLocation();\r\n \r\n /* \r\n // @todo dc:coverage could totally be removed in favor of the georss:point\r\n $ret_str[] = ' <dc:coverage>';\r\n $ret_str[] = sprintf(' name=%s;',$this->getSafe($location_map['name']));\r\n \r\n if(!empty($location_map['point'])){\r\n \r\n $ret_str[] = sprintf(' north=%s;',(float)$location_map['point'][0]);\r\n $ret_str[] = sprintf(' east=%s;',(float)$location_map['point'][1]);\r\n \r\n }//if\r\n \r\n $ret_str[] = ' </dc:coverage>';\r\n */\r\n \r\n // use georss for the location stuff:\r\n // http://www.georss.org/simple\r\n if(!empty($location_map['point'])){\r\n $ret_str[] = sprintf(\r\n ' <georss:point>%s %s</georss:point>',\r\n (float)$location_map['point'][0],\r\n (float)$location_map['point'][1]\r\n );\r\n }//if\r\n \r\n $ret_str[] = sprintf(\r\n ' <georss:featureName>%s</georss:featureName>',\r\n $this->getSafe($location_map['name'])\r\n );\r\n\r\n }//if\r\n \r\n if($feedo_item->hasTags()){\r\n foreach($feedo_item->getTags() as $tag_map){\r\n $ret_str[] = sprintf(\r\n ' <category domain=\"%s\">%s</category>',\r\n $this->getSafe($tag_map['url']),\r\n $this->getCData($tag_map['tag'])\r\n );\r\n }//foreach\r\n }//if\r\n \r\n // add namespace fields...\r\n if($feedo_item->hasNamespaceFields()){\r\n \r\n foreach($feedo_item->getNamespaceFields() as $namespace => $namespace_field_list){\r\n \r\n $namespace = $this->getSafe($namespace);\r\n \r\n foreach($namespace_field_list as $namespace_key => $namespace_val){\r\n \r\n $namespace_key = $this->getSafe($namespace_key); \r\n $namespace_val = $this->getSafe($namespace_val);\r\n \r\n $ret_str[] = sprintf(\r\n ' <%s:%s>%s</%s:%s>',\r\n $namespace,\r\n $namespace_key,\r\n $namespace_val,\r\n $namespace,\r\n $namespace_key\r\n );\r\n \r\n }//foreach\r\n \r\n }//foreach\r\n \r\n }//if\r\n \r\n $ret_str[] = ' </item>';\r\n \r\n }//foreach\r\n \r\n $ret_str[] = ' </channel>';\r\n $ret_str[] = '</rss>';\r\n \r\n return join(\"\\n\",$ret_str);\r\n \r\n }", "title": "" }, { "docid": "ce153eadd1b25f969726af11eee69c4a", "score": "0.56764936", "text": "public function getAllInfo():array;", "title": "" }, { "docid": "b8de60f968a39e409a93c7ca18690f35", "score": "0.56642824", "text": "function xmlbody(){\n\n\t\t//\n\t\t// echo inputs\n\t\t//\n\t\n\n\t\t//\n\t\t// make up a tracking number, and a corresponding medcommons id if needed\n\t\t$tracking = $this->generate_tracking();\n\t\t\n\t\t// wld 102105 if we didn't get a good tracking nmber then return immediately\n\t\tif ($tracking=='') $this->xmlend(\"internal error - could not allocate tracking number\");\n\t\t\n\t\t//\n\t\t// return outputs\n\t\t//\n\t\t$this->xm($this->xmfield (\"outputs\",\n\t\t$this->xmfield(\"trackingNumber\",$tracking).\n\t\t$this->xmfield(\"status\",\"ok\")));\n\t}", "title": "" }, { "docid": "c7c5be1c421c15e3b75b29f0a960f601", "score": "0.5658884", "text": "private static function getBodyFromXml($xml) {\n $domDocument = new DOMDocument();\n $domDocument->loadXml($xml);\n\n return self::getBodyFromDomDocument($domDocument);\n }", "title": "" }, { "docid": "790cc640a01b29de5f5f003324f8efd5", "score": "0.5651855", "text": "public function getInfo(): ?array {\r\n\r\n if(null !== $this -> response) {\r\n return $this -> response -> getInfo();\r\n }\r\n\r\n return null;\r\n }", "title": "" }, { "docid": "3c9339f738b9e58bd3edbe32b99275d5", "score": "0.5634874", "text": "public function getInfo()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "0a3413afcfd04a67534ac5ba79497bc0", "score": "0.5634182", "text": "public function getSearchableBody();", "title": "" }, { "docid": "56c0d8d6a5805762e703f1e463f3c0ad", "score": "0.5631014", "text": "public function getInformation()\r\n {\r\n return [\r\n 'title' => $this->_name,\r\n 'endpoint' => $this->_path,\r\n 'token' => $this->_needToken,\r\n 'roles' => $this->_needRole,\r\n 'params' => $this->_typeParams,\r\n 'requests' => $this->_requests\r\n ];\r\n }", "title": "" }, { "docid": "cba6b2190cb678368467b7493b2755ed", "score": "0.56151545", "text": "function readXML()\n {\n $file = trailingslashit( ABSPATH ) . 'wp-content/uploads/feed/skroutz.xml' ;\n //Opening a reader\n $reader = new XMLReader();\n $date_created = '';\n\n\n if (!$reader->open($file)) {\n die(\"Failed to open 'skroutz.xml'\");\n }\n\n // Iterate through the XML nodes\n $productsCount = 1;\n while ($reader->read()) {\n if ($reader->name == 'name' && $reader->nodeType == XMLReader::ELEMENT) {\n $productsCount += 1;\n } elseif ($reader->name == 'created_at' && $reader->nodeType == XMLReader::ELEMENT) {\n $date_created = $reader->readString();\n }\n }\n //Closing the reader\n $reader->close();\n $format = 'Y-m-d H:i:s';\n $date = DateTime::createFromFormat($format, $date_created);\n return array($productsCount, $date->format('Y-m-d H:i:s'));\n }", "title": "" }, { "docid": "40734115ab982b8e30825598a3482308", "score": "0.56118613", "text": "private function doListRequest() {\r\n $source = parent::doRequest();\r\n\t\t\r\n\t\t/* Uncomment if ou want to display the XML content */\r\n\t\t//echo '<textarea>'.$source.'</textarea>';\r\n\t\t\r\n\t\t/* We make sure there is an XML answer and try to parse it */\r\n if($source !== false) {\r\n parent::parseResponse($source);\r\n\t \tif(count($this->respErrorsList) == 0) {\r\n\t\t\t\t\r\n\t\t\t\t/* The XML file is loaded, we now gather the datas */\r\n\t\t\t\t$points = $this->xpath->query(\"/points/point\");\r\n\t\t\t\tforeach($points as $pointIndex => $point){\r\n\t\t\t\t\t$pointInfo = array(\r\n\t\t\t\t\t\t'code' => $this->xpath->query('./code',$point)->item(0)->nodeValue,\r\n\t\t\t\t\t\t'name' => $this->xpath->query('./name',$point)->item(0)->nodeValue,\r\n\t\t\t\t\t\t'address' => $this->xpath->query('./address',$point)->item(0)->nodeValue,\r\n\t\t\t\t\t\t'city' => $this->xpath->query('./city',$point)->item(0)->nodeValue,\r\n\t\t\t\t\t\t'zipcode' => $this->xpath->query('./zipcode',$point)->item(0)->nodeValue,\r\n\t\t\t\t\t\t'country' => $this->xpath->query('./country',$point)->item(0)->nodeValue,\r\n\t\t\t\t\t\t'phone' => $this->xpath->query('./phone',$point)->item(0)->nodeValue,\r\n\t\t\t\t\t\t'description' => $this->xpath->query('./description',$point)->item(0)->nodeValue,\r\n\t\t\t\t\t\t'days' => array()\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t$days = $this->xpath->query('./schedule/day',$point);\r\n\t\t\t\t\tforeach($days as $dayIndex => $day){\r\n\t\t\t\t\t\t$pointInfo['days'][$dayIndex] = array(\r\n\t\t\t\t\t\t\t'weekday' => $this->xpath->query('./weekday',$day)->item(0)->nodeValue,\r\n\t\t\t\t\t\t\t'open_am' => $this->xpath->query('./open_am',$day)->item(0)->nodeValue,\r\n\t\t\t\t\t\t\t'close_am' => $this->xpath->query('./close_am',$day)->item(0)->nodeValue,\r\n\t\t\t\t\t\t\t'open_pm' => $this->xpath->query('./open_pm',$day)->item(0)->nodeValue,\r\n\t\t\t\t\t\t\t'close_pm' => $this->xpath->query('./close_pm',$day)->item(0)->nodeValue,\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->listPoints[$pointIndex] = $pointInfo;\r\n\t\t\t\t}\r\n }\r\n }\r\n }", "title": "" }, { "docid": "4a7652f0ed58da9f79ea07d60cbfa3cb", "score": "0.5599317", "text": "public function getBody()\n {\n\n $total = $this->paginator->count();\n $result = $this->paginator->getQuery()->getResult();\n $maxPages = ceil($total / $this->paginator->getQuery()->getMaxResults());\n\n return [\n 'meta' => [\n 'type' => $this->type,\n 'paginated' => true,\n 'total' => (int)$total,\n 'page' => (int)$this->page,\n 'pageSize' => count($result),\n 'totalPages' => (int)$maxPages\n ],\n 'data' => $result\n ];\n }", "title": "" }, { "docid": "1127d4fcf532aee4f78d9887b2a1f2bb", "score": "0.55755115", "text": "public function getBody()\n {\n return $this->data;\n }", "title": "" }, { "docid": "79b06d579360892db6332bdc10df74fd", "score": "0.55610853", "text": "public function asArray()\n {\n return $this->xmlToArray();\n }", "title": "" }, { "docid": "a59aa435ca7d959b18d29eb6a77aa3aa", "score": "0.5555148", "text": "public function getNews() {\n $methodName = \"news\";\n $params = array();\n\n $xmlResult = $this->call($methodName, $params);\n $result = array();\n\n foreach($xmlResult->children() as $item) {\n $files = $item->files;\n\n $imgName = \"\";\n if($files->file != null) {\n $imgName = $files->file['storageKey'];\n }\n\n $objNews = new News($item['id'], $imgName.\".jpg\", $item->title, $item->summary,$item->body);\n $objNews->setValidFrom($item->validFrom);\n $objNews->setValidTo($item->validTo);\n $result[] = $objNews;\n }\n return $result;\n }", "title": "" }, { "docid": "49243fe4ed29dbeb355b621982cfc5b1", "score": "0.5548404", "text": "public function getInfos()\n {\n return [];\n }", "title": "" }, { "docid": "f05ef971581c5d00c19737e6b533da84", "score": "0.55389017", "text": "public function NWDBInfo (): array {\n\t\t\t$infos = $this->dataBase->getElementsByTagName(\"Infos\")->item(0);\n\t\t\t$returnArray = array();\n\t\t\t$returnArray[\"Name\"] = $infos->getElementsByTagName(\"Name\")->item(0)->nodeValue;\n\t\t\t$returnArray[\"CreatedTime\"] = $infos->getElementsByTagName(\"CreatedTime\")->item(0)->nodeValue;\n\t\t\t$returnArray[\"LastEditedTime\"] = $infos->getElementsByTagName(\"LastEditedTime\")->item(0)->nodeValue;\n\t\t\t$returnArray[\"LastRecordID\"] = $infos->getElementsByTagName(\"LastRecordID\")->item(0)->nodeValue;\n\t\t\t$returnArray[\"LastColumnID\"] = $infos->getElementsByTagName(\"LastColumnID\")->item(0)->nodeValue;\n\t\t\t\n\t\t\treturn $returnArray;\n\t\t}", "title": "" }, { "docid": "77de0d6b0cd5111ca19942cce252f910", "score": "0.55263305", "text": "abstract function getInformation();", "title": "" }, { "docid": "57fa765807024a3e005c3ad4023bd82d", "score": "0.5506557", "text": "public function body()\n {\n return json_decode($this->httpResponse->getBody(), true) ?: [];\n }", "title": "" }, { "docid": "abee5191cb1feeec15ea2cbf463db959", "score": "0.5500363", "text": "public function getXMLData(){\n\t\t$file_name = \"file is missing\";\n\t\tif ($handle = opendir(\"/var/www/\")) {\n\t\t\twhile (false !== ($entry = readdir($handle))) {\n\t\t\t\tif ((strpos($entry, 'zwcfg_') !== false) && (strpos($entry, '.xml') !== false)){\n\t\t\t\t\t$file_name = $entry;\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\t\n\t\tif($file_name != \"file is missing\"){\n\t\t\t//load XML\n\t\t\t$nodes = simplexml_load_file(\"/var/www/\".$file_name);\n\t\t\t\n\t\t\t//output home id\n\t\t\techo \"Home ID: \" . $nodes['home_id'] . \"<br><br>\";\n\t\t\t\n\t\t\tforeach ($nodes as $node){\n\t\t\t\t$id=$node['id'];\n\t\t\t\t$manufacturerID=$node->Manufacturer['id'];\n\t\t\t\t$productType=$node->Manufacturer->Product['type'];\n\t\t\t\t$productID=$node->Manufacturer->Product['id'];\n\t\t\t\techo \"Node ID: \" . $id . \" | \" . \"Manufacturer ID: \" . $manufacturerID . \" | \" . \"Product Type: \" . $productType . \" | \" . \"Product ID: \" . $productID . \"<br>\";\n\t\t\t\t\n\t\t\t\t$commandClasses = $node->CommandClasses->CommandClass;\n\t\t\t\t\n\t\t\t\tforeach ($commandClasses as $commandClass){\n\t\t\t\t\techo \"------->\";\n\t\t\t\t\t$cmID = $commandClass['id'];\n\t\t\t\t\t$cmName = $commandClass['name'];\n\t\t\t\t\techo \"CommandClass ID: \" . $cmID . \" | Name: \" . $cmName . \"<br>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "121980c47ede3e8d909f2ae4b9bbc134", "score": "0.54518443", "text": "public function xmlToArray()\n {\n return XML2Array::createArray($this->tsResponse);\n }", "title": "" }, { "docid": "861fb31660f4e744c9c5996e2bbce802", "score": "0.5443467", "text": "public function getInfo()\n {\n return (Any::isArray($this->info) ? $this->info : []);\n }", "title": "" }, { "docid": "7f37273c58549f5e5b1a4291482021ae", "score": "0.54426485", "text": "public function getBodyHtmlParts(): array;", "title": "" }, { "docid": "80488334e7804254a84c37139b017956", "score": "0.54420865", "text": "public function readXML()\n {\n $this->log(\"readXML $this->url, $this->slug\");\n\n $this->readRaw();\n\n $this->xml = new SimpleXMLElement($this->raw_content);\n\n $this->log('readXML complete');\n }", "title": "" }, { "docid": "ad1c85ebf9bb2b4f88aec28b6ddd7dfb", "score": "0.54409105", "text": "public function getBody($autodetect = true);", "title": "" }, { "docid": "04cb8e0611eb27d2d39110423f253acc", "score": "0.5423662", "text": "public function get_details()\n\t{\n\t\treturn array(static::$call_count,static::$content);\n\t}", "title": "" }, { "docid": "baf9ea5f2eba1e5990128053c82002a0", "score": "0.5422544", "text": "function getClientes(){\n $tesoreria_xml = simplexml_load_file(\"data/tesoreria.xml\");\n $id;\n $nombre;\n $direccion;\n $telefono;\n $email;\n $clientes = array();\n $atributos = array();\n foreach ($tesoreria_xml->Clientes as $nclientes) \n {\n foreach ($nclientes->Cliente as $ncliente) {\n $cliente = array();\n $atributos = $ncliente->attributes();\n $id = $atributos[IdCliente];\n $nombre = $ncliente->Nombre;\n $direccion = $ncliente->Direccion;\n $telefono = $ncliente->Tel;\n $email = $ncliente->Email;\n //Agregamos a un Array de Tipos de cliente\n array_push($cliente,$id);\n array_push($cliente,$nombre);\n array_push($cliente,$direccion);\n array_push($cliente,$telefono);\n array_push($cliente,$email);\n //Agregamos cada cliente a clientes\n array_push($clientes,$cliente);\n $id = $nombre = $direccion = $telefono = $email = '';\n }\n }\n return $clientes;\n }", "title": "" }, { "docid": "661bfcbc8143d3dce8e7817b9979694f", "score": "0.5408854", "text": "public function get_user_details()\n {\n $url = $this->build_url(\"user_details\");\n\n $xml = simplexml_load_file($url);\n\n if ($xml->attributes()->status == \"ok\") {\n $result = [\n \"name\" => $xml->sc_data->name[0],\n \"email\" => $xml->sc_data->email[0],\n \"log_quota\" => $xml->sc_data->log_quota[0],\n ];\n\n return $result;\n }\n throw new Exception(\"XML error: Check your username and password.\");\n }", "title": "" }, { "docid": "c93160f8dbec403d02d75f74c67ec7a4", "score": "0.53948915", "text": "public function getArticleBody();", "title": "" }, { "docid": "1265f2b8591bbc7f4bfd6d9fee31f716", "score": "0.53830326", "text": "public function GetBody(){\n\t\treturn $this->body;\n\t}", "title": "" }, { "docid": "5e419d0fdd48e880e47e59f21075ecbc", "score": "0.5375368", "text": "public function getDetails() {\n if (!$this->response) {\n return array();\n }\n return $this->response->getDetails();\n }", "title": "" }, { "docid": "eb469d05dd1f394ceecbdb5c1a1c4c81", "score": "0.5374129", "text": "public function getInfo();", "title": "" }, { "docid": "eb469d05dd1f394ceecbdb5c1a1c4c81", "score": "0.5374129", "text": "public function getInfo();", "title": "" }, { "docid": "eb469d05dd1f394ceecbdb5c1a1c4c81", "score": "0.5374129", "text": "public function getInfo();", "title": "" }, { "docid": "eb469d05dd1f394ceecbdb5c1a1c4c81", "score": "0.5374129", "text": "public function getInfo();", "title": "" }, { "docid": "eb469d05dd1f394ceecbdb5c1a1c4c81", "score": "0.5374129", "text": "public function getInfo();", "title": "" }, { "docid": "269fa3cd17053f25df5c1588b7365693", "score": "0.5371197", "text": "public function getInfo(): array\n {\n return $this->get('/key/info');\n }", "title": "" }, { "docid": "8c348e2243e6df9fa4f9f20db75440b0", "score": "0.5370543", "text": "public function details(): array;", "title": "" }, { "docid": "078e9145f4e4684d032cb3cb324efb4c", "score": "0.5328623", "text": "public function getBody(): ?array\n {\n return $this->body;\n }", "title": "" }, { "docid": "078e9145f4e4684d032cb3cb324efb4c", "score": "0.5328623", "text": "public function getBody(): ?array\n {\n return $this->body;\n }", "title": "" }, { "docid": "2380b40fee00297641e5f0df65e3cc4d", "score": "0.5326003", "text": "private function getStructure(): void\n {\n $structure = mailparse_msg_get_structure($this->resource);\n\n foreach ($structure as $id) {\n $part = mailparse_msg_get_part($this->resource, $id);\n $this->parts[$id] = mailparse_msg_get_part_data($part);\n }\n $this->headers = $this->parts[1]['headers'];\n }", "title": "" }, { "docid": "a14d6caba4c64eea626a33a98ba47776", "score": "0.5323406", "text": "public function retrieveTILEXMLData(){\n\t\t// overwritten by child classes\n\t}", "title": "" }, { "docid": "c360e4155712e4b9a207356d85981339", "score": "0.53216666", "text": "public function parseInfoXML( $xmlContents )\n\t{\n\t\t//-----------------------------------------\n\t\t// XML\n\t\t//-----------------------------------------\n\n\t\trequire_once( IPS_KERNEL_PATH.'classXML.php' );/*noLibHook*/\n\t\t$xml = new classXML( IPS_DOC_CHAR_SET );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get information file\n\t\t//-----------------------------------------\n\t\t\n\t\t$xml->loadXML( $xmlContents );\n\n\t\tforeach( $xml->fetchElements( 'data' ) as $xmlelement )\n\t\t{\n\t\t\t$data = $xml->fetchElementsFromRecord( $xmlelement );\n\t\t}\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "197a03a1c2f13831be95fda35bdd6c9e", "score": "0.53104043", "text": "public function getInfos(){\n \t$infos = [\n \t'prenom' => $this->getPrenom(),\n 'age' => $this->getAge(),\n 'couleur' => $this->getCouleur(),\n 'race' => $this->getRace(),\n 'sexe' => $this->getSexe()\n ];\n\n return $infos;\n }", "title": "" }, { "docid": "b81a13cac4059e6bfff2f2466c609794", "score": "0.5304916", "text": "private function parseGetXML($xml){\n $result = array();\n $batch = $this->getBetweenXML($xml,\"batch\");\n if($batch!=\"\")\n {\n $reports = array();\n $param1 = $this->getBetweenXML($xml,\"param1\");\n $param2 = $this->getBetweenXML($xml,\"param2\");\n $reps = $this->getBetweenXML($xml,\"report\");\n \n // if more than one report was found\n if(!(is_array($reps))){\n $reports[0]=$reps;\n }\n else\n {\n $reports = $reps;\n }\n //print_r($reports);\n $i = 0;\n foreach($reports as $report) \n {\n $result[$i]['batch'] = $batch;\n $result[$i]['param1'] = $param1;\n $result[$i]['param2'] = $param2;\n $result[$i]['mobile'] = $this->getBetweenXML($report,\"mobile\");\n $result[$i]['code'] = $this->getBetweenXML($report,\"code\");\n $result[$i]['time'] = $this->getBetweenXML($report,\"time\");\n $result[$i]['credits'] = $this->getBetweenXML($report,\"credits\");\n $result[$i]['status'] = $this->getBetweenXML($report,\"status\");\n \n $i++; \n }\n }\n return $result;\n }", "title": "" }, { "docid": "9560cefa40b1f8493dbe5e39d29a0116", "score": "0.5299479", "text": "public function extractData( $body ) {\n\t\treturn parent::extractData( $body );\n\t}", "title": "" }, { "docid": "1a94a897e49320720cf5fccdb8a61ecb", "score": "0.52869797", "text": "public function getData(): array\n {\n $this->validate('card');\n $card = $this->getCard();\n\n $postdata = $this->getPostData($card);\n\n $requestData = $postdata->getRequestdata()->asXmlString();\n\n // $requestData2 = '<?xml version=\"1.0\" encoding=\"utf-8\"? >\n // <eftrequest xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\n // <merchant>\n // <merchantid>1000001577</merchantid>\n // <systemguid>F90974D4-704F-4A92-8123-6FDE9D86B748</systemguid>\n // </merchant>\n // <accountid>140015178</accountid>\n // <capturemethod>12</capturemethod>\n // <processingidentifier>1</processingidentifier>\n // <transactionvalue>10.00</transactionvalue>\n // <showorderconfirmation>false</showorderconfirmation>\n // <showpaymentresult>false</showpaymentresult>\n // <customer>\n // <email>[email protected]</email>\n // </customer>\n // <registertoken>false</registertoken>\n // </eftrequest>';\n\n // dd($requestData);\n\n if ($this->encryptionEnabled()) {\n //encryption data present so we use it to encrypt the content of\n // the request\n $requestData = $this->encrypt(\n $this->getKey(),\n $requestData\n );\n } else {\n $requestData = $this->sanitize(\n $requestData\n );\n }\n\n $postdata->setRequestdata(\n $requestData\n );\n\n $xml = $postdata->asXMLString();\n\n return [\n 'postdata' => $this->sanitize(\n $this->sanitize($xml)\n ),\n ];\n }", "title": "" }, { "docid": "1b1046b190cce89cc1ccf5dd5d2689cf", "score": "0.5281587", "text": "public function getRequestContent();", "title": "" }, { "docid": "21e84ed4233e26495637db8b48a5a398", "score": "0.52790725", "text": "function getSMSModuleManagerAllXML()\n {\n //! Message Loggin\n sms_message_log('Start of Function : '. __FUNCTION__);\n\n $data = array();\n\n global $sms_xml_file_path;\n\n $filename = \"sms_module_manager\";\n\n $path = @$sms_xml_file_path . \"xml/\";\n\n //! Xml File Path\n $xFile = $path . $filename . \".xml\";\n\n /*!\n * Check If the XML File exists\n */\n if(file_exists($xFile)) //! if yes -> Continue\n {\n //! Message Loggin\n sms_message_log(\"XML File Found. :: $xFile ::\");\n\n //! Create Xml Object\n $doc = simplexml_load_file($xFile);\n\n $cnt = count($doc->module);\n\n for($iii=0; $iii < $cnt ; $iii++)\n {\n $data[] = $doc->module[$iii];\n }\n\n //! Message Loggin\n sms_message_log('End of Function : '. __FUNCTION__);\n\n return $data;\n }\n else //! else -> Return File Not Found\n {\n //! Message Loggin\n sms_message_log(\"XML File Not Found. :: $xFile ::\");\n\n //! Message Loggin\n sms_message_log('End of Function : '. __FUNCTION__);\n\n return INVALID_XML_FILE;\n }\n }", "title": "" }, { "docid": "9018b3b710a28dc1bb6ce7ab3d8ef465", "score": "0.5262992", "text": "function getInfo(){\n\t\treturn $this->responseInfo;\n\t}", "title": "" }, { "docid": "b33f682462f19684da3746f100c0cc7c", "score": "0.52625835", "text": "public function getData() {\n $frontPageIds = self::getFrontPageIds();\n $paragraphIds = $this->paragraphHelper->getParagraphIds($frontPageIds, self::NODE_TYPE_INSPIRATION, TRUE);\n\n $data = [\n 'carousels' => $this->getCarousels($paragraphIds),\n 'themes' => $this->getThemes($paragraphIds),\n 'reviews' => $this->getReviews(),\n 'editor' => $this->getEditors($paragraphIds),\n 'videos' => $this->getVideos($paragraphIds),\n 'audio' => $this->getAudios($paragraphIds),\n ];\n\n return $data;\n }", "title": "" }, { "docid": "fd2347745eebdf9fd9d3c1ae5b00446b", "score": "0.526232", "text": "public function getXMLContent() {\r\n $xmls_full_content = array();\r\n if ($this->isDerectory()) {\r\n $dirTree = $this->getXMLPaths($this->_dir_path);\r\n foreach ($dirTree as $value) {\r\n $xml_content = simplexml_load_file($value);\r\n $xmls_full_content[] = $xml_content;\r\n }\r\n }\r\n return $xmls_full_content;\r\n }", "title": "" }, { "docid": "fba9a7565b5458a3f2966cb3334cdac3", "score": "0.52561915", "text": "public function read()\n {\n return array();\n }", "title": "" }, { "docid": "6baf776d430e7918d18a6512e5b87a24", "score": "0.5253471", "text": "private function buildBody() {\n $xml = new DOMDocument('1.0', 'UTF-8');\n\n $body = $xml->createElement('body');\n $xml->appendChild($body);\n\n $body->appendChild(self::getNewTextAttribute($xml, 'xmlns', self::XMLNS_BODY));\n $body->appendChild(self::getNewTextAttribute($xml, 'content', self::CONTENT_TYPE));\n $body->appendChild(self::getNewTextAttribute($xml, 'rid', $this->getAndIncrementRid()));\n $body->appendChild(self::getNewTextAttribute($xml, 'xml:lang', self::XML_LANG));\n\n if ($this->sid != '') {\n $body->appendChild(self::getNewTextAttribute($xml, 'sid', $this->sid));\n }\n\n return $xml;\n }", "title": "" }, { "docid": "3effd9725a92a63f9bc187a31787b986", "score": "0.5251903", "text": "public function getBody(): string;", "title": "" }, { "docid": "98c1846380216fc28c310b4a3979e48e", "score": "0.5247076", "text": "public function getInfo(){\n \n $response = $this->makeRequest('GET');\n \n return Factory::getGeneric($this, $response);\n\n }", "title": "" }, { "docid": "8c1167008794c9a8744cf919d50d3bd5", "score": "0.52456427", "text": "private function _getElements()\r\n\t{\r\n\t\t// Lets build the component first\r\n\t\t$data\t=\tarray(\r\n\t\t\t\t'com_jblesta'\t=>\t(object) array(\r\n\t\t\t\t\t\t'name' => 'J!WHMCS Integrator Component'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t);\r\n\t\t\r\n\t\t$path\t=\tJPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_jblesta' . DS . 'com_jblesta.xml';\r\n\t\t$xml\t=\tsimplexml_load_file( $path );\r\n\t\t\r\n\t\tif (! $xml ) {\r\n\t\t\treturn $data;\r\n\t\t}\r\n\t\t\r\n\t\t$additional\t=\t$xml->xpath( 'additional/*' );\r\n\t\t\r\n\t\tforeach ( $additional as $added ) {\r\n\t\t\t\r\n\t\t\t$object\t\t\t=\t(object) array(\r\n\t\t\t\t\t\t\t\t\t'name' => (string) $added\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\r\n\t\t\t$elem\t\t\t=\t(string) $added->attributes()->name;\r\n\t\t\t$data[$elem]\t=\t$object;\r\n\t\t}\r\n\t\t\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "d005f6a4304a8c93584883c540f72a91", "score": "0.52424335", "text": "public function read() {\n return array();\n }", "title": "" }, { "docid": "de632aad9c668c1d2159f1be541ecb9d", "score": "0.52424324", "text": "private function getInfoPart() : array {\n $info = $this->getInfo();\n\n if (null === $info) {\n throw new RuntimeException('The info part of the torrent is not set.');\n }\n\n return $info;\n }", "title": "" }, { "docid": "e81147fc58ff4cce9bd6f1763769e76f", "score": "0.52377063", "text": "public function info()\n {\n $corps = $this->tree();\n return $this->respond($corps);\n }", "title": "" }, { "docid": "50940b5471544e0b99385510c44c85bb", "score": "0.5234711", "text": "public function getBodyParts()\n {\n return $this->bodyParts;\n }", "title": "" } ]
38da791cb6506aff3baf90d93109903b
Unserializes the data property of loaded customer profiles.
[ { "docid": "2c3bb5a5e1bc619bf223e56cdfd05a4b", "score": "0.5653203", "text": "public function attachLoad(&$queried_profiles, $revision_id = FALSE) {\n foreach ($queried_profiles as $profile_id => &$profile) {\n $profile->data = unserialize($profile->data);\n }\n\n // Call the default attachLoad() method. This will add fields and call\n // hook_commerce_customer_profile_load().\n parent::attachLoad($queried_profiles, $revision_id);\n }", "title": "" } ]
[ { "docid": "9023533e8a7aac97a923bafec531671e", "score": "0.6139006", "text": "public function getCustomerProfileData(){\n $customerData=$this->getCustomerDetails();\n return $this->_customerProfile->load ( $customerData->getId(), 'customer_id' );\n }", "title": "" }, { "docid": "5cac810125b4f041929eca5ff03c84be", "score": "0.61354715", "text": "public function getCustomerProfileData(){\n $customerData=$this->getCustomerDetails();\n return $this->_customerProfile->load ( $customerData->getId(), 'customer_id' );\n }", "title": "" }, { "docid": "0cd5c0cdbe414922565a7f435e1bcaa8", "score": "0.5812739", "text": "public function getUserData()\n {\n $userData = array();\n \n if(!empty($this->user_profile_data))\n $userData=unserialize($this->user_profile_data);\n \n return $userData;\n }", "title": "" }, { "docid": "c58c390dbbb13b4168548e8d8f700db7", "score": "0.5764021", "text": "public function __unserialize(array $data): void;", "title": "" }, { "docid": "0309f27b75911c9ece4040f445c0ea9c", "score": "0.5542749", "text": "public final function __unserialize($dataArr) {\n\t\t$this->unserialize(null);\n\t}", "title": "" }, { "docid": "8dba17681228c1a118d097215b6b4920", "score": "0.549109", "text": "public function unserialize($data)\n {\n parent::unserialize($data);\n $this->_saveState();\n }", "title": "" }, { "docid": "6d310e7a6eeb6e2adf71c3f3c4c0d7fd", "score": "0.5479419", "text": "public function unserialize($data)\n {\n\n // unserialize the passed data\n $unserialized = unserialize($data);\n\n // restore the data\n $this->principals = $unserialized->principals;\n $this->readOnly = $unserialized->readOnly;\n\n // initialize the credentials (that are NOT serialized)\n $this->publicCredentials = new ArrayList();\n $this->privateCredentials = new ArrayList();\n }", "title": "" }, { "docid": "53a4bedce08019612b93873e53d2735b", "score": "0.5474716", "text": "public function loadFromData()\n {\n if (!isset($this->_attributes['profileData'])) {\n require_once 'Zend/Tool/Project/Exception.php';\n throw new Zend_Tool_Project_Exception('loadFromData() must have \"profileData\" set.');\n }\n\n $profileFileParser = new Zend_Tool_Project_Profile_FileParser_Xml();\n $profileFileParser->unserialize($this->_attributes['profileData'], $this);\n\n $this->rewind();\n }", "title": "" }, { "docid": "f08f6fda02069d57dd03524f42e8dcd2", "score": "0.54522", "text": "public function unserializer(mixed $data)\n {\n return Serializer::unCompress($data);\n }", "title": "" }, { "docid": "6205d2108f2e5d4147f870ceee3c04f0", "score": "0.54354614", "text": "public final function __unserialize($dataArr) {\n\t\t// shall always return nothing\n\t}", "title": "" }, { "docid": "6e3d8f9e38fde9d858a75cd5a0dc4e48", "score": "0.5410947", "text": "private function unserialize($data)\n {\n // For Magento 2.2+\n $objectManager = ObjectManager::getInstance();\n $serializer = $objectManager->create(SerializerInterface::class);\n return $serializer->unserialize($data);\n }", "title": "" }, { "docid": "c0af7e7a0ea714f624ffd7949f8b6d4f", "score": "0.54021037", "text": "public function restored(UsersProfiles $usersProfiles)\n {\n //\n }", "title": "" }, { "docid": "90cb3255e4cbf7348680c76756a53734", "score": "0.5400546", "text": "public function unserialize($data);", "title": "" }, { "docid": "af30d5c5a8553dc8fccd641ab17a9d1e", "score": "0.53662086", "text": "public function unserialize($data)\n {\n\n }", "title": "" }, { "docid": "2de9bfa387cd23a7c6fb9eb06a2d470a", "score": "0.5355316", "text": "public function unserialize($data)\n {\n $this->setData(\\Heystack\\Core\\unserialize($data));\n }", "title": "" }, { "docid": "4dad6d6c7a7b2e61ee502647c089b342", "score": "0.5291909", "text": "function unserialize($data)\r\n\t{\r\n\t\t$propvals = unserialize($data);\r\n\t\t$ro = new ReflectionObject($this);\r\n\r\n\t\tforeach ($ro->getProperties() as $rp )\r\n\t\t{\r\n\t\t\t$propname = $rp->name;\r\n\t\t\tif ( array_key_exists($propname,$propvals) )\r\n\t\t\t{\r\n\t\t\t\tif (method_exists($rp,\"setAccessible\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t$rp->setAccessible(true);\r\n\t\t\t\t\t$rp->setValue($this,$propvals[$propname]);\r\n\t\t\t\t}\r\n\t\t\t\telseif (!$rp->isPrivate())\r\n\t\t\t\t{\r\n\t\t\t\t\t// if < php 5.3 we can't serialize private vars\r\n\t\t\t\t\t$rp->setValue($this,$propvals[$propname]);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1a05c379520f8e7b4feb210218ccf5da", "score": "0.5285132", "text": "public function unloadData() {\n\t\t$this->data = array();\n\t}", "title": "" }, { "docid": "b04a3277d44be1ce0e45da08e24c9ec1", "score": "0.5274957", "text": "public function testUnserialize() {\n\t\t$this->person = Person::person(\"jim\", \"smith\", $this->getAddresses(), \"555-123-4567\");\n\t\t\n\t\t$sData = $this->person->serialize();\n\t\t$this->assertNotEquals($sData, \"\");\n\t\n\t\t$this->person->unserialize($sData);\n\t\t\n\t\t$this->assertEquals(\"jim\",$this->person->getFirstName());\n\t\t$this->assertEquals(\"smith\",$this->person->getLastName());\n\t\t\n\t\t$addArray = $this->person->getAddress();\n\t\t$this->assertEquals(\"1600 Penn Ave\",$addArray[1]->getAddress());\n\t\t$this->assertEquals(\"Pittsburgh\",$addArray[1]->getCity());\n\t\t$this->assertEquals(\"PA\",$addArray[1]->getState());\n\t\t$this->assertEquals(\"123456\",$addArray[1]->getZip());\n\t\t$this->assertNotEquals(\"\",$this->person->getID());\n\t\t\n\t\t$this->assertEquals(\"555-123-4567\",$this->person->getPhone());\n\t}", "title": "" }, { "docid": "58e094942d57c6734923e5986d9dcd4d", "score": "0.5249012", "text": "public function unserialize($data)\n\t{\n\t\t$data = json_decode($data, TRUE);\n\n\t\t$this->_meta = Jam::meta($this);\n\t\t$this->_loaded = isset($data['id']);\n\t\tif ($this->_loaded)\n\t\t{\n\t\t\t$this->_original = (array) $data;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_original = $this->meta()->defaults();\n\t\t\t$this->_changed = (array) $data;\n\t\t}\n\t}", "title": "" }, { "docid": "82a3356e9c2ad59e71204ae441f30a6b", "score": "0.5226461", "text": "public function updateProfiles(Copernica_MarketingSoftware_Model_Copernica_Profile_Customer $customer)\n {\n if ($customer->originalId() == false) {\n Mage::log('Identifier has type'.gettype($customer->id()).' and value '.($customer->id() ? 'true' : 'false'));\n Mage::log('Data is of type: '.get_class($customer));\n Mage::log('Data: '.print_r($data->toArray(), true));\n \n foreach (debug_backtrace() as $tr) {\n Mage::log(' '.$tr['file'].''.$tr['line']);\n }\n\n return;\n }\n\n $profileId = $this->getProfileId($customer);\n\n if ($profileId === false) {\n $this->_restRequest()->put(\n 'database/'.$this->getDatabaseId().'/profiles',\n $customer->toArray(),\n array (\n 'fields[]' => 'customer_id=='.$customer->originalId(),\n 'create' => 'true'\n )\n );\n } else {\n $this->_restRequest()->put(\n 'profile/'.$profileId.'/fields',\n $customer->toArray()\n );\n }\n }", "title": "" }, { "docid": "6f419bf12b029b129e5a03cae8a37aca", "score": "0.52211964", "text": "public function removeProfiles(Copernica_MarketingSoftware_Model_Copernica_Profile_Customer $customer)\n {\n if ($customer->getId() === false) {\n return false;\n }\n\n $output = $this->_restRequest()->get(\n 'database/'.$this->getDatabaseId().'/profiles',\n array (\n 'fields[]' => 'customer_id=='.$customer->originalId()\n )\n );\n\n if (!isset($output['data'])) {\n return;\n }\n\n foreach ($output['data'] as $profile) {\n $this->_restRequest()->delete('profile/'.$profile['ID']);\n }\n }", "title": "" }, { "docid": "1a9fa70ca1c147aac394d7a7cf1e42c4", "score": "0.5221085", "text": "function unserialize( $data )\n\t{\n\t\t$from_unserialize = unserialize( $data );\n\t\t\n\t\tforeach( $from_unserialize->fields as $f=>$v )\n\t\t{\n\t\t\t$this->f = $v;\n\t\t}\n\t\t$this->fields\t\t= $from_unserialize->fields;\n\t\t$this->table\t\t= $from_unserialize->table;\n\t\t$this->database\t\t= $from_unserialize->database;\n\t\t$this->fields_camel\t= $from_unserialize->fields_camel;\n\t}", "title": "" }, { "docid": "f48b0d41e033900f7f23dc24cbe3fede", "score": "0.5218153", "text": "public function __unserialize(array $data): void {\n\t\t$this->key = (string)$data['key'];\n\t\t$this->value = $data['value'];\n\t}", "title": "" }, { "docid": "c0cf4a77e8281c0af58de06881000570", "score": "0.5213824", "text": "public function unserialize($data)\n {\n $data = unserialize($data);\n $this->setData($data);\n }", "title": "" }, { "docid": "4276c8c3bb265047dd68fde642b79ea4", "score": "0.52045316", "text": "public function parseAttributes($data) {\n if (isset($data->profile)) {\n $this->profile = $data->profile;\n }\n return $data;\n }", "title": "" }, { "docid": "f3679701b965999e13731f61cada492b", "score": "0.52021176", "text": "public function unserialize($serialized) : void\n {\n [$this->accountId, $this->accountEmail] = json_decode($serialized);\n }", "title": "" }, { "docid": "972337fefe099e20d16ec5dd837f23b9", "score": "0.51750517", "text": "function wpcd_maybe_unserialize( $data ) {\n\t$output = $data;\n\tif ( is_serialized( $data ) && ! is_array( $data ) ) {\n\t\t$output = unserialize( $data );\n\t}\n\n\t/**\n\t * @BUG, @TODO Its weird but sometimes you have to check it three because the first couple of unserialize calls are failing.\n\t */\n\n\t/**\n\t * Maybe this just needs to be a recursive function until is_serialized returns false.\n\t*/\n\tif ( is_serialized( $output ) && ! is_array( $output ) ) {\n\t\t$output = unserialize( $output );\n\t}\n\tif ( is_serialized( $output ) && ! is_array( $output ) ) {\n\t\t$output = unserialize( $output );\n\t}\n\tif ( is_serialized( $output ) && ! is_array( $output ) ) {\n\t\t$output = unserialize( $output );\n\t}\n\n\treturn $output;\n}", "title": "" }, { "docid": "4669b1702e52d09944ecb9cbc54e511a", "score": "0.5165614", "text": "public function unserialize($data) {\n $this->__construct(unserialize($data));\n }", "title": "" }, { "docid": "d20192401fbebb19d204e2ef613f9d98", "score": "0.51462114", "text": "public function getProfile()\n {\n return $this->data;\n }", "title": "" }, { "docid": "11ab8441a6223c89b69ccd79fe53b9a3", "score": "0.5130417", "text": "public function setUnserializedData(array $data)\n {\n $reflector = new \\ReflectionClass($this);\n\n $properties = $reflector->getProperties();\n\n foreach ($properties as $property) {\n $key = $property->getName();\n if (array_key_exists($key, $data)) {\n $property->setAccessible(true);\n $property->setValue($this, $data[$key]);\n $property->setAccessible(false);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "a3fdcf57724d3943ff28acf6b9de6c9f", "score": "0.51266986", "text": "public function retrieveCimProfileData()\n {\n // Lookup customer in DB\n /** @var Mage_Customer_Model_Customer $model */\n $customer = Mage::getModel('customer/customer')->load($this->getData('customer_id'));\n // Get customer CIM profile id\n $customerProfileId = $customer->getData('cim_customer_profile_id');\n // Get payment profile id\n $paymentProfileId = $this->getData('cim_payment_profile_id');\n /** @var SFC_CimCore_Helper_Cim $cimHelper */\n $cimHelper = Mage::helper('sfc_cim_core/cim');\n $cimHelper->setConfigWebsite($customer->getData('website_id'));\n // Call out to Auth.net API to retrieve profile data\n $data = $cimHelper->retrievePaymentProfileAsData($customerProfileId, $paymentProfileId);\n // Now inject the CIM data into this model object\n $this->addData($data);\n }", "title": "" }, { "docid": "747496825c934bf57cb18f45bbaa8ee5", "score": "0.51251465", "text": "public static function unserializeData($data) {\n return unserialize(base64_decode($data));\n }", "title": "" }, { "docid": "b2f732a110cd207f1cf06a14517d507f", "score": "0.5106723", "text": "public static function unbox($data)\n {\n return ($data instanceof ObjectConfig) ? $data->toArray() : $data;\n }", "title": "" }, { "docid": "74434736ec7d06e9eb532978e2c2af47", "score": "0.5106303", "text": "public function deserialize($data);", "title": "" }, { "docid": "74434736ec7d06e9eb532978e2c2af47", "score": "0.5106303", "text": "public function deserialize($data);", "title": "" }, { "docid": "cdf4c602cac3f559de234e133fdcf557", "score": "0.51057637", "text": "public function jsonSerialize() {\n\t\t\t$fields = get_object_vars($this);\n\t\t\tunset($fields[\"profileHash , profileSalt\"]);\n\t\t\treturn($fields);\n\n\t\t// TODO: Implement jsonSerialize() method.\n\t}", "title": "" }, { "docid": "096b575e15f46993e8b94448adeea17d", "score": "0.50947696", "text": "public function decode($data)\n {\n return unserialize($data);\n }", "title": "" }, { "docid": "28796ed7f4b71df5e6c6e48cb2bf3b1d", "score": "0.50722826", "text": "public function getProfiles()\n {\n return $this->getDataItem('profiles');\n }", "title": "" }, { "docid": "7aae37105587f90c8081b801bc24bf9d", "score": "0.5071578", "text": "public function loadProfileData()\n {\n // charge les donnees du profil utilisateur\n if ($this->_Loggued === false) {\n return false;\n }\n \n $this->_ProfileName = 'Admin';\n $this->_Rights = 'all';\n }", "title": "" }, { "docid": "bfee03ae344b098b549d23cab3bc8be0", "score": "0.5054834", "text": "function __wakeup()\n {\n echo \"Unserializing the Data!\" . PHP_EOL;\n }", "title": "" }, { "docid": "bb1ed2d65f9c67a7a94b9e3a70ca437f", "score": "0.50444317", "text": "protected function after_load() {\n\t\t$properties = array_keys( $this->export() );\n\t\tforeach ( $properties as $prop ) {\n\t\t\t$this->$prop = maybe_unserialize( $this->$prop );\n\t\t\tif ( $prop == 'result' && ! is_array( $this->$prop ) ) {\n\t\t\t\t$this->$prop = array();\n\t\t\t}\n\t\t\t/*if ( is_array( $data = json_decode( $this->$prop, true ) ) ) {\n\t\t\t\t//$this->$prop = $data;\n\t\t\t}*/\n\t\t}\n\t}", "title": "" }, { "docid": "bfaea3bb2bcaba3e8595961954c80731", "score": "0.50424594", "text": "private function unserialize()\n {}", "title": "" }, { "docid": "34c3e672b3478488700d5b2d8b2d08ce", "score": "0.5039162", "text": "private function decode($data) {\n return unserialize( json_decode( $data ) );\n }", "title": "" }, { "docid": "6bfafc6458b306423f3724a6eb14845b", "score": "0.5035439", "text": "public function unserialize($data)\r\r\n {\r\r\n $data = json_decode($data, true);\r\r\n if (empty($data)) {\r\r\n $this->cookies = array();\r\r\n } else {\r\r\n $this->cookies = array_map(function (array $cookie) {\r\r\n return new Cookie($cookie);\r\r\n }, $data);\r\r\n }\r\r\n }", "title": "" }, { "docid": "7cbdc84773a90e656331a7677b746e00", "score": "0.5016376", "text": "public function getProfiles()\n\t{\n\t\treturn $this->profiles; \n\n\t}", "title": "" }, { "docid": "24e6d62128a3ab652ae0beef123d572d", "score": "0.50125605", "text": "public function getProfiles() {\n return $this->profiles;\n }", "title": "" }, { "docid": "1d25701e4bc2935c87bed43f1dd888a2", "score": "0.50032616", "text": "public function testUpdateCustomerProfilesV2()\n {\n }", "title": "" }, { "docid": "ed7d267734cf4513cc4628ba3bb39f0d", "score": "0.49976078", "text": "public function testGetCustomerDepersonalizeCustomerData()\n {\n $this->requestMock->expects($this->once())->method('isAjax')->will($this->returnValue(false));\n $this->layoutMock->expects($this->once())->method('isCacheable')->will($this->returnValue(true));\n $this->viewMock->expects($this->once())->method('isLayoutLoaded')->will($this->returnValue(true));\n $this->moduleManagerMock->expects($this->once())\n ->method('isEnabled')\n ->with($this->equalTo('Magento_PageCache'))\n ->will($this->returnValue(true));\n $this->customerSessionMock->expects($this->once())\n ->method('getCustomerGroupId')\n ->will($this->returnValue($this->customerGroupId));\n $this->customerInterfaceFactoryMock->expects($this->once())\n ->method('create')\n ->will($this->returnValue($this->customerDataMock));\n $this->customerDataMock->expects($this->once())\n ->method('setGroupId')\n ->with($this->equalTo($this->customerGroupId))\n ->will($this->returnSelf());\n $this->assertEquals($this->customerDataMock, $this->currentCustomer->getCustomer());\n }", "title": "" }, { "docid": "fea3809cf5b29c374faeaa4c31e2c4cd", "score": "0.4990515", "text": "public function unserialize($serialized)\n {\n $this->data = $this->load(unserialize($serialized));\n }", "title": "" }, { "docid": "b1106ae44c23c6703a28e815d4ca51bc", "score": "0.49736717", "text": "public static function getDataForStorage($data, $profiles = true)\n {\n if ($profiles) {\n $serializer = Xhgui_Config::read('save.handler.serializer', 'json');\n } else {\n $serializer = Xhgui_Config::read('save.handler.meta_serializer', 'php');\n }\n\n switch ($serializer) {\n case 'json':\n return json_encode($data);\n break;\n\n case 'igbinary_serialize':\n case 'igbinary_unserialize':\n case 'igbinary':\n return igbinary_serialize($data);\n break;\n\n case 'php':\n case 'var_export':\n return \"<?php \\n\".var_export($data, true);\n break;\n }\n }", "title": "" }, { "docid": "175316524590fb76a8d16db17546c046", "score": "0.49686885", "text": "public function getProfiles()\n {\n return $this->profiles;\n }", "title": "" }, { "docid": "175316524590fb76a8d16db17546c046", "score": "0.49686885", "text": "public function getProfiles()\n {\n return $this->profiles;\n }", "title": "" }, { "docid": "175316524590fb76a8d16db17546c046", "score": "0.49686885", "text": "public function getProfiles()\n {\n return $this->profiles;\n }", "title": "" }, { "docid": "86152218b36bd02dd22d514ce307b788", "score": "0.49568525", "text": "public function _unserialize($data)\n\t{\n\t\t$this->CI->load->helper('string');\n\n\t\t$data = @unserialize(strip_slashes($data));\n\n\t\tif (is_array($data))\n\t\t{\n\t\t\tforeach ($data as $key => $val)\n\t\t\t{\n\t\t\t\tif (is_string($val))\n\t\t\t\t{\n\t\t\t\t\t$data[$key] = str_replace('{{slash}}', '\\\\', $val);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $data;\n\t\t}\n\n\t\treturn (is_string($data)) ? str_replace('{{slash}}', '\\\\', $data) : $data;\n\t}", "title": "" }, { "docid": "f109d55809ae890158aff837ebfb4a9f", "score": "0.49550098", "text": "public function unserialize($data)\n {\n $injector = \\Injector::inst();\n\n $extraData = null;\n\n if (empty(self::$objectConstructorReflectionMethods[__CLASS__])) {\n self::$objectConstructorReflectionMethods[__CLASS__] = new \\ReflectionMethod(__CLASS__, '__construct');\n }\n\n if (empty(self::$classConfigs[__CLASS__])) {\n self::$classConfigs[__CLASS__] = $injector->getConfigLocator()->locateConfigFor(__CLASS__);\n }\n\n if ($this instanceof ExtraDataInterface) {\n $unserialized = \\Heystack\\Core\\unserialize($data);\n\n self::$objectConstructorReflectionMethods[__CLASS__]->invoke(\n $this,\n $unserialized[0]\n );\n\n $extraData = $unserialized[1];\n } else {\n self::$objectConstructorReflectionMethods[__CLASS__]->invoke(\n $this,\n \\Heystack\\Core\\unserialize($data)\n );\n }\n\n // Ensure that the spec is loaded for the class\n if (self::$classConfigs[__CLASS__]) {\n $injector->load([__CLASS__ => self::$classConfigs[__CLASS__]]);\n }\n \n $injector->inject($this, __CLASS__);\n \n if ($extraData) {\n $this->setExtraData($extraData);\n }\n }", "title": "" }, { "docid": "6bc2a9c1c9b0dfd47a3df0f5a783ece0", "score": "0.49548626", "text": "public function removePaymentProfile()\n {\n $paymentProfiles = $this->paymentProfiles;\n unset($paymentProfiles['profiles'][$this->paymentGateway]);\n $this->paymentProfiles = $paymentProfiles;\n $this->save();\n\n return $this->paymentProfiles;\n }", "title": "" }, { "docid": "f0387930ac83556eec43210fbdbd605f", "score": "0.4949305", "text": "protected function prepareForUnserialize($data)\n {\n try {\n return $this->encrypter->decrypt($data);\n } catch (DecryptException $e) {\n return serialize([]);\n }\n }", "title": "" }, { "docid": "ec319a3f46fb06bf4100a65131a904af", "score": "0.49369258", "text": "function getUnserializedData()\r\n {\r\n if ($this->_root === null ) {\r\n return $this->raiseError('No unserialized data available. Use XML_Unserializer::unserialize() first.', XML_UNSERIALIZER_ERROR_NO_UNSERIALIZATION);\r\n }\r\n return $this->_unserializedData;\r\n }", "title": "" }, { "docid": "09a487ad2924fbc7924e2f4664f44b5d", "score": "0.49276522", "text": "protected function loadProfile($profile)\n {\n $ar = unserialize(strval($profile));\n if (is_array($ar)) {\n $this->Profile = array_merge($this->Profile, $ar);\n }\n }", "title": "" }, { "docid": "2847b545c9f520f263df7d0b5278b2be", "score": "0.49209902", "text": "public function getProfiles()\n\t{\n\t\t$userProfiles = $this->get('profiles');\n\t\tif (empty($userProfiles)) {\n\t\t\t$privilegesModel = Users_Privileges_Model::getInstanceById($this->getId());\n\t\t\t$userProfiles = $privilegesModel->get('profiles');\n\t\t\t$this->set('profiles', $userProfiles);\n\t\t}\n\t\t$profiles = [];\n\t\tif (!empty($userProfiles)) {\n\t\t\tforeach ($userProfiles as $profile) {\n\t\t\t\t$profiles[$profile] = Settings_Profiles_Record_Model::getInstanceById($profile);\n\t\t\t}\n\t\t}\n\t\treturn $profiles;\n\t}", "title": "" }, { "docid": "43282b944dbb737e60adf221cfaa8677", "score": "0.4885769", "text": "public function unserialize($data)\n {\n $value = $this->fromData($data);\n foreach ($this->getFilters() as $filter) {\n $value = $filter->toValue($value);\n }\n\n return $value;\n }", "title": "" }, { "docid": "f85bddbba07485f2f057a8128a5dbf71", "score": "0.48855683", "text": "public function deserialize($data)\n {\n if ($data === null) {\n return null;\n }\n return $this->mapper->deserialize($data);\n }", "title": "" }, { "docid": "42845a8688cd687e61704561803b86d3", "score": "0.48623618", "text": "public function getData()\n {\n return $this->getPropertiesData([\n 'id',\n 'email',\n 'firstName',\n 'lastName',\n ]);\n }", "title": "" }, { "docid": "b7d6846f4f9ad46063586aef8ad6e289", "score": "0.4861335", "text": "public function hydrate( $data );", "title": "" }, { "docid": "bcfc9d4ecdb40b006bc1e701186fc15c", "score": "0.48510107", "text": "private function deserializeData($data)\n {\n $result = $this->get('jms_serializer')->deserialize(\n $data,\n $this->getTargetGroupRepository()->getClassName(),\n 'json',\n DeserializationContext::create()\n ->setSerializeNull(true)\n );\n\n return $result;\n }", "title": "" }, { "docid": "35ce1ecaa2010f59f0f032947c880cce", "score": "0.485095", "text": "function jig_ng_unserialize($serialized_value)\r\n\t\t{\r\n\t\t\t$unserialized = @unserialize($serialized_value);\r\n\t\t\tif($unserialized === false){\r\n\t\t\t\tif (is_string($serialized_value))\r\n\t\t\t\t{\r\n\t\t\t\t\t$unserialized = stripcslashes($serialized_value);\r\n\r\n\t\t\t\t\tif (strlen($serialized_value) > 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$unserialized = json_decode(base64_decode($unserialized), TRUE);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $unserialized;\r\n\t\t}", "title": "" }, { "docid": "1dd1ada6b55bf7cdc2617557779fa9bd", "score": "0.48416266", "text": "protected function decode($data) {\r\n\t\treturn CJSON::decode($data);\r\n\t}", "title": "" }, { "docid": "27135bb029be4c7f64df234b78930825", "score": "0.4839674", "text": "public function unserialize($serialized)\n {\n $this->setData(json_decode($serialized, true));\n }", "title": "" }, { "docid": "f4ed085ca978dcacf50bc5356309d757", "score": "0.48374695", "text": "final public function unserialize(string $data): void {}", "title": "" }, { "docid": "f4ed085ca978dcacf50bc5356309d757", "score": "0.48374695", "text": "final public function unserialize(string $data): void {}", "title": "" }, { "docid": "f4ed085ca978dcacf50bc5356309d757", "score": "0.48374695", "text": "final public function unserialize(string $data): void {}", "title": "" }, { "docid": "f4ed085ca978dcacf50bc5356309d757", "score": "0.48374695", "text": "final public function unserialize(string $data): void {}", "title": "" }, { "docid": "853e8b9afc63a42a65db725b1df5cbd4", "score": "0.48086172", "text": "public function __wakeup() {\n\t\t\t// Unserializing instances of the class is forbidden\n\t\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'affiliatewp-custom-affiliate-slugs' ), '1.0' );\n\t\t}", "title": "" }, { "docid": "eb56e499aa2cc07ac86968c8ba73092b", "score": "0.47994226", "text": "public function UnserialiseData( &$theElement )\t\t\t\t\t\t\t\t\t\t {}", "title": "" }, { "docid": "a8a3c4ebde6948f3028b914eab2fb5d0", "score": "0.47935212", "text": "public function getUsers() {\n return unserialize(file_get_contents($this->dataFile));\n }", "title": "" }, { "docid": "9b864876ba8f4a1125e197eb37665b22", "score": "0.47924957", "text": "public function __wakeup() {\r\n\t\t\t_doing_it_wrong( __FUNCTION__, __( 'Unserializing is forbidden!', 'be-table-ship' ), '4.0' );\r\n\t\t}", "title": "" }, { "docid": "66aa5c2a86d21dafa833d467bb8056c8", "score": "0.47915784", "text": "public function get_customer_profile_ids() {\n\t\t\treturn $this->build_request( 'getCustomerProfileIdsRequest' )->fetch();\n\t\t}", "title": "" }, { "docid": "5b940377851aa13e0f2eef7e7c8e9ec4", "score": "0.4786531", "text": "function getProfileData($user_id=null){\n\t\treturn $this->Product->getProfileData($user_id);\n\t}", "title": "" }, { "docid": "947a383ba007c8c18118b14e8b8e3020", "score": "0.47852385", "text": "public function __unserialize(array $data): void\n {\n $this->__construct($data['lower'], $data['upper'], $data['result']);\n }", "title": "" }, { "docid": "3388cf42aeeba7a61401bd47ce29755f", "score": "0.47813722", "text": "public function unserialize($serialized)\n {\n list($this->username, $this->password, $this->salt,\n $this->userRoles, $this->id) = \\json_decode(\n $serialized);\n }", "title": "" }, { "docid": "5abd1dab394f94463cf681187c1515ce", "score": "0.47681996", "text": "public function __unserialize(array $data): void\n {\n $this->multipleIterator = new MultipleIterator(\n MultipleIterator::MIT_NEED_ALL | MultipleIterator::MIT_KEYS_NUMERIC\n );\n\n $this->_iterators = $data;\n foreach ($this->_iterators as $it) {\n $this->multipleIterator->attachIterator($it);\n }\n }", "title": "" }, { "docid": "983dde41661770accedcac6c6abd99f7", "score": "0.4764461", "text": "protected function unmapAttributes(&$data)\n {\n foreach ($data as &$element) {\n foreach ($this->mapping as $attribute => $map) {\n if (isset($element[$map])) {\n $element[$attribute] = $element[$map];\n unset($element[$map]);\n }\n }\n }\n }", "title": "" }, { "docid": "e8f816a4bf49dfdbbd05a30fb3ccd955", "score": "0.47597873", "text": "public function deserialize($data): object;", "title": "" }, { "docid": "a82c8333b735fa7fff422d2e7ce89307", "score": "0.47563988", "text": "public function resetProfile()\n {\n unset($this->profile);\n }", "title": "" }, { "docid": "9733460e0374226ca146b52db8415153", "score": "0.47487745", "text": "public function reverseTransform($data)\n {\n if (null === $data) {\n return \"\";\n }\n return ArrayObject::arrayToObject(\"Mapbender\\WmsBundle\\Component\\VendorSpecific\", $data);\n }", "title": "" }, { "docid": "09054ed8e9722a567ae480dffaea281c", "score": "0.47468168", "text": "function unserialized_data($data, $data_key = false) {\n\tif (empty ( $data_key ) == true || md5 ( $data ) == $data_key) {\n\t\t$data = @unserialize ( base64_decode ( $data ) );\n\t\tif (valid_array ( $data ) != true) {\n\t\t\t$data = false;\n\t\t}\n\t} else {\n\t\t$data = false;\n\t}\n\treturn $data;\n}", "title": "" }, { "docid": "0997dcfeadb8e3525a151edba7ec7ce6", "score": "0.47339344", "text": "public static function unserialize($serialized_data) {\r\n\t\tself::getInstance($serialized_data);\r\n\t}", "title": "" }, { "docid": "5ffc957c10dce60a857a80c2cc61b1fe", "score": "0.47243384", "text": "public function getProfileData()\n {\n $data = json_encode([\n '_uuid' => $this->uuid,\n '_uid' => $this->username_id,\n '_csrftoken' => $this->token,\n ]);\n\n return $this->request('accounts/current_user/?edit=true', $this->generateSignature($data))[1];\n }", "title": "" }, { "docid": "9a94d19215ce3a10a2fe240d8fd2c3be", "score": "0.4713109", "text": "public function getPropertyData($serialize = true);", "title": "" }, { "docid": "3589d04969bb8f51c37a559afa58630d", "score": "0.4708003", "text": "public function getProfiles(){ }", "title": "" }, { "docid": "9d6266e48e30f3fbf95c0a6898411331", "score": "0.4703671", "text": "function parseProfileList(){\n\t\t$i = 0;\n\t\t$profiles = array();\n\t\t$profilesUrl = \"https://www.googleapis.com/analytics/v3/management/accounts/~all/webproperties/~all/profiles\";\n\t\t\t\n\t\t$profilesObj = $this->callApi($profilesUrl);\n\t\t\n\t\t//handle error in api request\n\t\tif(isset($profilesObj->error)){\n\t\t\t$profiles[0][\"error\"] = \"Gadata->parseProfileList: \".$profilesObj->error;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tforeach($profilesObj->items as $profile)\n\t\t\t\t{\n\t\t\t\t\t$profiles[$i] = array();\n\t\t\t\t\t$profiles[$i][\"name\"] = $profile->name;\n\t\t\t\t\t$profiles[$i][\"profileid\"] = $profile->id;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t}\n\t\t//unset profiles object, just good practice to free up memory\n\t\tunset($profilesObj);\n\t\treturn $profiles;\t\n\t}", "title": "" }, { "docid": "1b4c41b8b7344564396afa80aa4e7a74", "score": "0.46979615", "text": "public function getProfiles()\n {\n return $this->getProfileManager()->getProfiles();\n }", "title": "" }, { "docid": "26fc73dd07e4f3ecc70e68aa208e7b69", "score": "0.46914402", "text": "public function decode($data)\n {\n return unserialize(base64_decode($data));\n }", "title": "" }, { "docid": "c4512eeb2bc63c2ba23c9f0b6cddfcbc", "score": "0.4680414", "text": "public function jsonSerialize() {\n\t\t$fields = get_object_vars($this);\n\t\t$fields[\"profileId\"] = $this->profileId->toString();\n\t\tunset($fields[\"profileActivationToken\"]);\n\t\tunset($fields[\"profileHash\"]);\n\t\tunset($fields[\"profileSalt\"]);\n\t\treturn ($fields);\n\t}", "title": "" }, { "docid": "40825b9a9cf245f66cd162c1c83100f9", "score": "0.46795487", "text": "function MyApp_Handle_SU_Read_Datas()\n {\n $datas=array(\"ID\",\"Name\",\"Email\",);\n foreach (array_keys($this->Profiles) as $profile)\n {\n if (preg_match('/^(Public)$/',$profile)) { continue; }\n\n array_push($datas,\"Profile_\".$profile);\n }\n\n return $datas;\n }", "title": "" }, { "docid": "1f01a82c472aa68f09fd25e92587657d", "score": "0.46744773", "text": "public function getPaymentProfilesAttribute($value)\n {\n return !is_array($profiles = json_decode($value, true)) ? [] : $profiles;\n }", "title": "" }, { "docid": "dafa736ec2b8a2dbd325b83d0518de81", "score": "0.46720555", "text": "public function getAllProfiles(){\n return $this->allProfiles;\n }", "title": "" }, { "docid": "179eb628d0bc847ddde6e62aa45cd7db", "score": "0.46643284", "text": "public function getCustomerData(){\n $customerData=$this->getCustomerDetails();\n return $this->_customer->load ( $customerData->getId() );\n }", "title": "" }, { "docid": "700c61bda30ca343dfa43a32660ca02a", "score": "0.46642387", "text": "protected function doUnserialize(array $json) {\n\t\tparent::doUnserialize($json);\n\n\t\t$this->unserializeArrayEntities('pricingComponentValueChanges', Bf_PricingComponentValueChange::getClassName(), $json);\n\n\t\t$this->unserializeArrayEntities('pricingComponentValues', Bf_PricingComponentValue::getClassName(), $json);\n\t}", "title": "" }, { "docid": "786f53d91b12b0d94d467ee32f8d7e25", "score": "0.4655806", "text": "public function unserialize($serialized){\n list(\n $this->id,\n $this->email,\n $this->hashPassword\n ) = unserialize($serialized, ['allowed_class' => false]);\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "7d56ba702b0f53bfb287a0a271448f5e", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n //\n }", "title": "" } ]
[ { "docid": "3e3a565a181db6f795f079d1dfb01f75", "score": "0.7099585", "text": "public function update(Resource $resource, $id)\n {\n //\n }", "title": "" }, { "docid": "bde449baf550552e043ec18452e05f5c", "score": "0.69665116", "text": "function update($resource, $content)\n {\n }", "title": "" }, { "docid": "23bd42dc38bca65e850c1b8f771c0f0f", "score": "0.6837518", "text": "public function update(ResourceInterface $resource)\n {\n $this->_em->flush($resource);\n }", "title": "" }, { "docid": "fb65b4f4d55e024e7f1613af273a55f2", "score": "0.6775597", "text": "public function update(Request $request, Resource $resource)\n {\n //Validate request\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'url' => 'required|max:255',\n 'description' => 'required|max:10000',\n 'tags.*' => 'exists:tags,id',\n 'is_published' => 'required|boolean'\n ]);\n $resource_previous_unpublished = !$resource->is_published;\n //Create the resource\n $resource->update([\n 'name' => $request->name,\n 'url' => $request->url,\n 'description' => $request->description,\n 'is_published' => $request->is_published\n ]);\n //Drop the tags from the pivot table. Add the updated ones\n $resource->tags()->detach();\n //Add the tags for this resource to the pivot table\n $resource->tags()->attach($request->tags);\n $responseText = 'Resource updated';\n $responseText .= $resource_previous_unpublished && $request->is_published ? ' and published' : '';\n //Take them back to the resource form so they can add more resources\n return back()->with('success', $responseText);\n }", "title": "" }, { "docid": "61a34fcd66242862e9a967402e4ff514", "score": "0.6267246", "text": "private function updateResource($resource, $inputs )\n {\n \n // if(isset($inputs['category_id'])){\n // $model->categories()->sync($inputs['category_id']);\n // } else {\n // $model->categories()->sync([]);\n // }\n return $resource->update($inputs);\n\n }", "title": "" }, { "docid": "a4a8c199770b8cc35d56a67cd9297225", "score": "0.62659985", "text": "public function update($storageName, $key, array $data);", "title": "" }, { "docid": "4c22c400891589f8da5573f60cdc4ea0", "score": "0.61376035", "text": "public function update(Request $request, Resource $resource)\n {\n $validator = Validator::make($request->all(),[\n 'wbs' => 'required',\n 'tipo_recurso' => 'required',\n 'cantidad' => 'required',\n 'comentarios' => 'required',\n 'vision_estrategica' => 'required'\n\n ]);\n if ($validator->fails()) {\n return response()->json(['Error'],404);\n\n }else{\n $resource->wbs = $request->wbs;\n $resource->tipo_recurso = $request->tipo_recurso;\n $resource->cantidad = $request->cantidad;\n $resource->comentarios = $request->comentarios;\n $resource->vision_estrategica = $request->vision_estrategica;\n \n $resource->save();\n return response()->json($resource);\n }\n }", "title": "" }, { "docid": "cb421444658bf63523d9239cfdb2c091", "score": "0.6102644", "text": "public function update(StorageRequest $request, $id)\n {\n try {\n $this->service->updateStorage($request, $id);\n return $this->NoContent();\n } catch(EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "title": "" }, { "docid": "40c721acddd9f92cbdc47e322ae39955", "score": "0.60837495", "text": "public function update(Request $request, $id)\n {\n // dd($request->all());\n if($storage = Storage::find($id))\n {\n if( $storage->update( $request->all() ) )\n {\n if($request->storage_items)\n $storage->item()->sync($request->storage_items);\n else\n $storage->item()->sync([]);\n return redirect()->back();\n }\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "fae18446ab6ba766002815d7efd6d0f2", "score": "0.60153604", "text": "public function updateStream($resource)\n {\n return $this->filesystem->updateStream($this->path, $resource);\n }", "title": "" }, { "docid": "1b397375316ae1351b5a50f45f20bc46", "score": "0.6000568", "text": "public function update(Request $request, $id)\n {\n if($request->session()->exists('resources')){\n $resources = $request->session()->get('resources');\n $idInput = $request->input('id');\n $nameInput = $request->input('name');\n $priceInput = $request->input('price');\n \n if(isset($resources[$id]) && (isset($resources[$idInput])==false || $idInput==$id)){\n // $resource = $resources[$id];\n $resource = ['id' => $idInput, 'name' => $nameInput, 'price' => $priceInput];\n unset($resources[$id]);\n $resources[$idInput]=$resource;\n $request->session()->put('resources', $resources);\n \n return redirect('resource')->with('message', 'Se editado el elemento correctamente');\n }\n \n }\n return back()->withInput();\n }", "title": "" }, { "docid": "1342fca6bb741918e9de91960e422b72", "score": "0.59302443", "text": "public function dispatchOnPostUpdateResource($resource);", "title": "" }, { "docid": "4c33901004c334e4edd8b45955f45ed2", "score": "0.5906145", "text": "public function sliderUpdate(SliderUpdateRequest $request, $id)\n {\n\n $slider=Slider::find($id);\n /* dd($service); */\n $input= $request->all();\n\n if($request->hasFile('image')) {\n if($request->image==$slider->image){\n $input['image']=$slider->image;\n }else{\n $fileName=$request->file('image')->store('slider','public');\n\n $input['image'] =$fileName;\n \n @unlink('storage/'.$slider->image);\n }\n } else {\n\n $input['image']=$slider->image;\n\n }\n $slider->update([\n 'title'=>$request->title,\n 'image'=>$input['image'],\n ]);\n /* dd($service); */\n\n return new SliderResource($slider);\n }", "title": "" }, { "docid": "9645d8e1c1b4d32587e5589c88868755", "score": "0.5878462", "text": "public function update(Request $request, $id)\n {\n $resource = Resource::find($id);\n $resource->fill($request->all());\n $resource->save();\n\n $resource->tags()->sync($request->tags);\n\n $message = 'El recurso literario \"' . $resource->title . '\" fue modificado.';\n $class = 'warning';\n\n Session::flash('message', $message);\n Session::flash('class', $class);\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "70f839d67344487e3780c8ca780ec59c", "score": "0.5876995", "text": "public function store(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "cc850ce20ed7c56b132541ba822c9777", "score": "0.5832923", "text": "public function update(Request $request, $id)\n {\n //\n $data = $request->all();\n $request->validate([\n 'title' => 'required|max:255',\n 'description' => 'required',\n 'resource' => 'file|mimes:pdf,doc,docx,xls,xlm,xla,xlc,xlt,xlw,ppt,pps,pot'\n ]);\n\n $eLibrary = ELibrary::findOrFail($id);\n\n /*Photo*/\n if($request->hasFile('resource') && $request->file('resource')->isValid()){\n $file = $request->file('resource');\n $filename = $data['title'] . '_' . time().'.'.$file->extension();\n $path = $file->storePubliclyAs('public/uploads/eLibrary',$filename);\n if($eLibrary->path) {\n if (Storage::exists($eLibrary->path)) Storage::delete($eLibrary->path);\n }\n $data['path'] = $path;\n }\n if($eLibrary->update($data)){\n Session::flash('alert-success',\"The E-Library resource '$eLibrary->title' has been updated\");\n }else{\n Session::flash('alert-danger',\"The E-Library resource '$eLibrary->title' could not be updated. Please contact support.\");\n }\n return redirect('admin/eLibrary');\n }", "title": "" }, { "docid": "3ebf4ac6712058cf5111ea2fb1b3f69d", "score": "0.5789821", "text": "public function updateStream($path, $resource, Config $config)\n {\n $this->delete($path);\n\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "3ec7c5a8877f8c46b7760a665414271c", "score": "0.5738682", "text": "public function update(Request $request, int $id)\n {\n $data = $request->except(\"image\");\n $product = $this->product->findOrFail($id);\n if($request->hasFile(\"image\") && $request->image->isValid()){\n Storage::delete($product->image);\n $data[\"image\"] = $request->image->store(\"products/\".$request->name);\n }\n $product->update($data);\n return redirect()->route(\"products.index\");\n }", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "1a87e148e066a4886de60512f8e08a52", "score": "0.57288736", "text": "public function update(ShareRequest $request, $id)\n {\n $share = Share::find($id);\n $share->share_name = $request->get('share_name');\n $share->share_price = $request->get('share_price');\n $share->share_qty = $request->get('share_qty');\n $share->save();\n if ($share->image) {\n unlink(public_path('storage/') . $share->image);\n }\n $this->storeImage($share);\n return redirect('/shares')->with('success', 'Stock has been updated');\n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "d55f58a252de4e09d616136ab381ea2d", "score": "0.5689798", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'group_id'=>'exists:groups,id|integer',\n 'name'=>'required|min:1|max:16|unique:resources,name,'.$id,\n 'description'=> 'max:255'\n ]);\n\n $resource = Resource::find($id);\n $resource->group_id = $request->get('group_id');\n $resource->name = $request->get('name');\n $resource->description = $request->get('description');\n $resource->save();\n\n return redirect('/resources')->with('success', 'Resource has been updated');\n }", "title": "" }, { "docid": "09f959fbad30c2f941ea086cc7dad93f", "score": "0.56853646", "text": "public function update(ProductUpdateRequest $request, $id)\n {\n $product = Product::find($id);\n $product->fill($request->all())->save();\n if($request->file('image')){\n $path = Storage::disk('public')->put('image', $request->file('image'));\n $product->fill(['file' => asset($path)])->save();\n } \n return redirect()->route('products.edit', \n $product->id)->with('info', 'Info de product actualizada con éxito');\n }", "title": "" }, { "docid": "e6fb42d6286b3f4fe6f14fab49db4173", "score": "0.56730545", "text": "public function update(Request $request, $id)\n {\n if($request->has('new_image')) {\n\n $product = Product::where('id',$id)->first(); \n\n $old_image = $product->image;\n unlink($old_image);\n\n\n $file = $request->file('new_image');\n $name = Str::random(10);\n $url = \\Storage::putFileAs('images',$file, $name . '.' .$file->extension());\n\n $data = array();\n $data['name'] = $request->name;\n $data['price'] = $request->price;\n $data['image'] = $url;\n\n $update = DB::table('products')->where('id',$id)->update($data);\n\n\n\n } else {\n $product = Product::find($id);\n $product->update($request->only('name','price'));\n }\n\n return redirect()->back()->with(\"status\",\"Successfully Updated\");\n\n\n\n }", "title": "" }, { "docid": "97e4ce8ade6b1dc2b2b25f72334eb18d", "score": "0.5636433", "text": "public function dispatchOnPreUpdateResource($resource);", "title": "" }, { "docid": "bba4992ee37e44374ffa661fa659a09a", "score": "0.56323135", "text": "public function update (EntityInterface $entity);", "title": "" }, { "docid": "318b6ff187eaf08454a3d0857e9aca4d", "score": "0.56295455", "text": "public function updateStream($path, $resource, array $config)\r\n\t{\r\n\t\t$res = $this->cloudDrive->uploadStream($resource, $path, true);\r\n\r\n\t\treturn $res['success'];\r\n\t}", "title": "" }, { "docid": "072d1df8727e8fc01d135f9b601cd0cc", "score": "0.5626336", "text": "public function update(Request $request, int $resource_id)\n {\n $data = $request->all();\n $validatedData = $request->validate([\n \"name\" => \"required\"\n ]);\n $store = self::store($data, $resource_id);\n return response()->json(['status'=> 'ok', 'data'=> $store, 'msg'=> 'listing category updated successfully']);\n }", "title": "" }, { "docid": "8576d995f0ad5fb05e24f4249f91de06", "score": "0.56251395", "text": "public function update() {\n $this->save();\n }", "title": "" }, { "docid": "fef6f84766f65b55a5b2d09f06bbe894", "score": "0.56153053", "text": "public function update(model $acl_resource, array $info) {\n\n // Update record\n return parent::_update($acl_resource, $info);\n }", "title": "" }, { "docid": "ced4b17a4ea0a670f0d46db8e5a71e1f", "score": "0.5600381", "text": "function setResource($resource);", "title": "" }, { "docid": "a67ff3295306d457a45d5bfd402b9bbf", "score": "0.55851954", "text": "public function update(Request $request, $id)\n {\n $result=Slider::find($id);\n\n $result->name=$request->name;\n $result->desc=$request->desc;\n $result->price=$request->price;\n\n if ($request->hasFile('img')) {\n $file=$request->img->store('upload', 'public');\n $result->img=$file;\n }else{\n $errors=\"File not set\";\n return redirect()->back()\n ->withInput($request->input())\n ->with(\"msgError\", $errors);\n }\n\n $result->save();\n\n if ($result) {\n return redirect('show/slider')->with('message', 'Product updated successfully!');\n }\n else{\n return redirect()->back()->withInput($request->input())\n ->with('msgError', 'Record do not update in database!');\n }\n\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "aeb943a599e58a4bbe6bd7e228755660", "score": "0.55803686", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,\n [\n 'title'=>'required|max:50',\n 'price'=>'required',\n 'description'=>'required|max:100'\n ,\n 'imagePath'=>'required'\n ],[\n 'required'=>'El campo :attribute es obligatorio'\n ]\n );\n $product=Product::find($id);\n $product->title = $request->input('title');\n $product->price = $request->input('price');\n $product->description = $request->input('description');\n // $product->imagePath = $request->input('imagePath');\n\n $nombreImagen = str_slug($product->title) . '.' .request()->imagePath->extension();\n // storeAs recibe dos parametros el nombre de la carpeta y el nombre del archivo\n request()->imagePath->storeAs('public', $nombreImagen);\n $product->imagePath = $nombreImagen;\n \n $product->save();\n\n return redirect()->action('Admin\\ProductsController@index');\n\n }", "title": "" }, { "docid": "b9d5c9b5a3c8b34eb93904bd4bc5dfc1", "score": "0.55740935", "text": "public function update($id, StoreSliderRequest $request)\n {\n $slider = Slider::find($id);\n $input = $request->all();\n $slider->fill($input);\n\n if(Input::file('image')){\n $file = Input::file('image');\n $filename = time().'-'.$file->getClientOriginalName();\n $directory = $slider->getPath();\n $file->move($directory, $filename);\n $slider->image = $directory.$filename;\n #ImageCompress::tinifyImage($slider->image);\n }\n\n $slider->save();\n\n return redirect()->route('admin.slider.index');\n }", "title": "" }, { "docid": "6ec0972709d8081c8584eadfdebd73e3", "score": "0.55724585", "text": "public function put($resource, array $args = [], array $options = []) {\n return $this->do('PUT', $resource, $args, $options);\n }", "title": "" }, { "docid": "720aa13d6dd5abab4700c72fc5726f2f", "score": "0.55704945", "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->product_price = $request->product_price;\n $product->condition = $request->condition;\n $product->brand_id = $request->brand_id;\n $product->state_id = $request->state_id;\n $product->area_id = $request->area_id;\n // $product->category_id = $request->category_id;\n $product->subcategory_id = $request->subcategory_id;\n\n if ($request->hasFile('product_image')) {\n\n $path = $request->product_image->store('public/uploads');\n\n $product->product_image = $request->product_image->hashNAme();\n\n }\n\n $product->save();\n\n Alert::success('Product succesfully updated!')->autoclose(4000);\n\n // flash('Product succesfully updated')->overlay();\n\n return redirect()->route('admin.products.index');\n\n\n\n }", "title": "" }, { "docid": "e186357e6cd112ce0670460eed4e4946", "score": "0.55632365", "text": "public function update(UploadImageRequest $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n if ($request->hasFile('image')) {\n $filename = $request->file('image')->getClientOriginalName();\n $type = $request->file('image')->getClientOriginalExtension();\n $url = 'products/images/' . $product->id . '/' . $filename;\n\n $image = Image::make($request->file('image'))->resize(150, 150)->encode($type);\n Storage::disk('s3')->put($url, (string)$image, 'public');\n\n $product->update([\n 'image' => $url,\n ]);\n }\n $product->update([\n 'name' => $request->name,\n 'cost' => $request->cost,\n 'category_id' => $request->category,\n 'description' => $request->description,\n 'quantity' => $request->quantity,\n ]);\n $product->save();\n return redirect()->route('admin.product-administration.show', $product->id);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "392bdf3b4d83d7a822d671646207f552", "score": "0.55553967", "text": "public function update($request, int $id);", "title": "" }, { "docid": "39ec1d6074d8d2034e596ad13d30da68", "score": "0.55506486", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required',\n 'price' => 'required|min:1',\n 'image' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n 'quantity' => 'required|min:1',\n ]);\n\n $product = Product::find($id);\n $product->store_id = Auth::guard('store')->user()->id;\n $product->product_name = $request->get('name');\n $product->product_description = $request->get('description');\n $product->product_price = $request->get('price');\n $product->product_quantity = $request->get('quantity');\n $current_image = $product->product_image;\n $new_image = \"\";\n\n if ($request->has('subcategory')) {\n $product->subcategory_id = $request->get('subcategory');\n }\n if ($request->has('parameter')) {\n $product->product_parameter_id = $request->get('parameter');\n }\n if ($request->has('image')) {\n $new_image = $request->file('image');\n $extension = $new_image->getClientOriginalExtension();\n $filename = 'product-' . time() . '.' . $extension;\n $product->product_image = $filename;\n $new_image->storeAs('products', $filename, 'public');\n }\n $product->save();\n if (Storage::disk('public')->exists('products/' . $new_image)) {\n Storage::disk('public')->delete('products/' . $current_image);\n }\n return redirect()->route('products.index')->with('success', 'Product updated');\n }", "title": "" }, { "docid": "c6efa075535fbc725da4b180e4ec737b", "score": "0.55501103", "text": "public function update(Request $request, $id)\n {\n if ( Auth::user()->userrole != \"Admin\") {\n return abort(401, 'Access Denied');\n }\n\n $article = Product::where('id',$id)->first(); \n $article->name = request('name');\n $article->sub_title = request('sub_title');\n $article->title = request('title');\n $article->title1 = request('title1');\n $article->title2 = request('title2');\n $article->title3 = request('title3');\n $article->content1 = request('content1');\n $article->content2 = request('content2');\n $article->content3 = request('content3');\n $article->button_text = request('button_text');\n $article->button_link = request('button_link');\n $article->description = request('description');\n $article->slug = Str::slug(request('title'), '-'); \n $article->active = request('active');\n\n // Store uploaded file...\n if($request->hasFile('image')) { \n $file = $request->file('image'); \n $imageName = time().'-'.$file->getClientOriginalName();\n $request->image->storeAs('public/products', $imageName); \n $article->image = $imageName; \n }\n\n $article->save(); \n\n return redirect()->route('admin.product.index');\n }", "title": "" }, { "docid": "8333f02674e0537622e556ed30714d92", "score": "0.5541451", "text": "protected function put()\n {\n \\throw_if(!$this->request->isJson(), new RestfulException(RestfulErrorMessage::InvalidJsonHeader));\n if ($this->restfulRequest->resourceId) {\n $document = null;\n try {\n $document = $this->_get();\n } catch (\\Exception $e) {\n // ...\n }\n return \\response(\n $this->_repository->replace($document, $this->restfulRequest->resourceId, $this->request->json()->all())\n );\n }\n if ($this->payloadIsAttributeSet()) {\n return \\response(\n $this->_repository->batchReplace($this->getFindOption(), $this->request->json()->all())\n );\n }\n throw new RestfulException(RestfulErrorMessage::InvalidRequestPayload);\n }", "title": "" }, { "docid": "a4b00c57c46ebcebca149c23c5beb30a", "score": "0.55269605", "text": "public function update(Request $request, $id)\n {\n $item = Items::find($id);\n $item->fill($request->all());\n\n// if (Input::file()) {\n// $filename = $request->file('image')->store('public');\n// $path = substr($filename, 7);\n// $item->image = $path;\n// }\n\n $item->update();\n return redirect()->route('items.index');\n }", "title": "" }, { "docid": "2d0234add8ac70bdf3ff13a1dc54eddc", "score": "0.5521795", "text": "public function updateStockAction()\n {\n $this->checkAdmin();\n $inStockid = intval($this->route['id']);\n $quantity = intval($this->route['amount']);\n if ($quantity == 0)\n $this->model->deleteStockById($inStockid);\n else\n $this->model->updateStockById($inStockid, $quantity);\n }", "title": "" }, { "docid": "21ec885e595c2bf310bc026dbe22811d", "score": "0.5520187", "text": "public function update(Request $request, $id)\n {\n\n\n $contents = $request->data;\n\n if ($id === 'options') {\n\n Storage::put('options.json', json_encode($contents));\n\n }\n\n if ($id === 'templates') {\n\n Storage::put('templates.json', json_encode($contents));\n\n }\n\n if ($id === 'documentation') {\n\n Storage::put('documentation.json', json_encode($contents));\n\n }\n\n\n return response('', 200);\n }", "title": "" }, { "docid": "550e477a9a956b28304b535c2916ad5c", "score": "0.55201524", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n \"title\" => 'required',\n \"product_id\" => 'sometimes',\n \"button_text\" => 'sometimes',\n \"button_link\" => 'sometimes',\n \"priority\" => 'required',\n \"image\" => 'sometimes|file|image|max:3000',\n ]);\n $slider = Slider::find($id);\n $slider->title = $request->title;\n $slider->product_id = $request->product_id;\n $slider->button_text = $request->button_text;\n $slider->button_link = $request->button_link;\n $slider->priority = $request->priority;\n\n if (request()->hasFile('image')) {\n if (File::exists('storage/' . $slider->image)) {\n File::delete('storage/' . $slider->image);\n }\n\n $path = $request->file('image')->store('sliders', 'public');\n $slider->image = $path;\n }\n $slider->save();\n $sliders = Slider::all();\n session()->flash('flash_message_success', 'You have updated a slider successfully!');\n return redirect()->route('admin.sliders')\n ->with(compact('sliders'));\n\n }", "title": "" }, { "docid": "a66a502d0331860b0492d8521d8dc6fc", "score": "0.551738", "text": "public function update(Request $request, $id)\n {\n $slider = Slider::find($id);\n $data = $request->all();\n if ($request->hasFile('imagen')) {\n $data['imagen'] = $request->file('imagen')->store('slides','public');\n\n $exists = Storage::disk('sliders')->exists($slider->solo_imagen);\n if($exists)\n Storage::delete(\"/public/$slider->imagen\");\n\n }\n $slider->fill($data);\n $slider->save();\n return redirect()->route('admin.slider.index');\n\n }", "title": "" }, { "docid": "59cc7aa6a27c614e6dbea168303030cb", "score": "0.5510812", "text": "public function update(Request $request, Memory $memory)\n {\n //\n }", "title": "" }, { "docid": "b54270ca9c777eb769ba1aabcadc3d1e", "score": "0.55085415", "text": "public function update($object){\n \n }", "title": "" }, { "docid": "963320c6c8e6f19972872f0c66fe30e0", "score": "0.5508141", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('public/products');\n Storage::delete($product->image);\n }\n $product->name = $request->name;\n $product->description = $request->description;\n $product->image = $image;\n $product->price = $request->price;\n $product->additional_info = $request->additional_info;\n $product->category_id = $request->category;\n $product->subcategory_id = $request->subcategory;\n\n $product->save();\n\n return redirect()->route('product.index')->with('message', 'Successfully updated the product');\n }", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "60f3ddc323c30358e47d69e943e6dbaa", "score": "0.5501432", "text": "public function update(Request $request, $id)\n {\n\n extract($this->getResourceNames());\n\n $this->authorize('EDIT_' . $permissionKey);\n\n $item = $modelPath::findOrFail($id);\n\n $this->validateEditForm($request, $item);\n\n $item->update($request->all());\n\n $this->notify($resourceMultiple . '.edited');\n\n return redirect()->back();\n }", "title": "" }, { "docid": "f413999cfa6fd30cb481e60a58035e46", "score": "0.54997146", "text": "public function update(Request $request,$id)\n {\n $product=Product::find($id);\n $request->validate([\n \"name\"=>\"required\",\n \"category\"=>\"required\",\n \"description\"=>\"required\",\n \"price\"=>\"required|numeric\",\n \"stock\"=>\"required|numeric\",\n \"image\"=>\"required\"\n ]);\n if($request->hasFile('image')){\n $imgname=$request->image->getClientOriginalName(); \n if(Storage::exists($request->image)){\n $product->image=$imgname; \n }\n else{\n $request->image->storeAs('public',$imgname);\n $product->image=$imgname;\n }\n \n }\n $product->name=$request->name;\n $product->category_id=$request->category;\n $product->description=$request->description;\n $product->stock=$request->stock;\n $product->price=$request->price;\n $product->save();\n\n }", "title": "" }, { "docid": "8de839d3e9816fa894298a9064d231f4", "score": "0.5497475", "text": "function update($record) {\n\t\techo \"update called\";\n\t\t$this->rest->initialize(array('server' => REST_SERVER));\n\t\t$this->rest->option(CURLOPT_PORT, REST_PORT);\n\t\t$key = $record->{$this->_keyfield};\n\t\t$retrieved = $this->rest->put('/job/' . $key, $record);\n\t\t$this->load(); // because the \"database\" might have changed\n\t}", "title": "" }, { "docid": "01d7e90eb4d4834e12b31486f04ab3c2", "score": "0.5493121", "text": "public function update(Request $request)\n {\n $feature=Feature::find($request->id);\n if($request->hasFile('feature_icon')) {\n $file_name = time().'.'.$request->feature_icon->extension(); \n $path = $request->file('feature_icon')->storeAs('public/feature_icons',$file_name);\n $feature->feature_icon=$file_name;\n $Image = str_replace('/storage', '', $request->old_image);\n #Using storage\n if(Storage::exists('public/feature_icons/' . $Image)){\n $delete= Storage::delete('/public/feature_icons/' . $Image);\n }\n } \n $feature->feature_name=$request->feature_name;\n $feature->updated_at=date('Y-m-d H:m:s');\n $feature->update();\n alert::success('feature Updated Successfully');\n return redirect()->back();\n\n }", "title": "" }, { "docid": "f7f83699cca8c8d4920c525dc392587d", "score": "0.54910034", "text": "public function update(UpdateProductRequest $request, $id)\n {\n\n $data = $request->all();\n $product = Product::find($id);\n\n $path = null;\n if ($request->file('image')) {\n $path = $request->file('image')->store('public/products');\n // @unlink('storage/'. $product->image);\n $data['image'] = $path;\n }\n\n\n $product->update($data);\n\n return redirect('/product');\n }", "title": "" }, { "docid": "2160be914cd287b1f331b462c6097a00", "score": "0.54888636", "text": "public function update(Request $request, $id)\n {\n // $this->authorize('haveaccess','producto.edit');\n $datosProductos=request()->except(['_token','_method']);\n\n if ($request->hasFile('imagen')) {\n\n $producto= Producto::findOrFail($id);\n\n Storage::delete('public/'.$producto->imagen);\n\n $datosProductos['imagen']=$request->file('imagen')->store('uploads/producto','public');\n }\n\n Producto::where('id','=',$id)->update($datosProductos);\n $valores['concesionado']=Null;\n $producto= Producto::findOrFail($id);\n $producto->fill($valores);\n $producto->save();\n return view('supervisor.producto.edit',compact('producto'));\n }", "title": "" }, { "docid": "6cf2f968968fff04f96278a9288f5b34", "score": "0.54857856", "text": "public function update(Request $request, $id)\n {\n if ($this->checkRole()) {\n $product = Product::find($id);\n $product->brandName = $request->Input('brandName');\n $product->medicalName = $request->Input('medicalName');\n $product->price = $request->Input('price');\n $product->buying_price = $request->Input('buying_price');\n $product->reorder_level = $request->Input('reorder_level');\n if ($request->hasFile('image')) {\n $oldFilename = 'public/product_images/' . $product->image;\n $product->image = $this->filenameToStore($request);\n Storage::delete($oldFilename);\n }\n $product->save();\n $product->suppliers()->sync($request->suppliers);\n\n return redirect('/products')->with('success', 'Product Details Saved Successfully!');\n } else {\n return redirect()->route('home');\n }\n\n }", "title": "" }, { "docid": "57e8a233d0abf833c408dd0277ccd310", "score": "0.5483825", "text": "public function update($id)\n {\n\n //VALIDATE FIELDS\n $validator = Validator::make(request()->all(),\n [\n 'title' => 'required|max:255',\n 'slug' => 'required|max:255',\n ]);\n\n //IF INVALID\n if($validator->fails()){ \n return $this->respondInvalid('Error with validation.', $validator->errors());\n }\n\n //IF VALID\n else { \n try {\n //Update \n $data2 = [\n 'slug' => request('slug'), \n 'title' => request('title'), \n 'status' => request('status'),\n 'description' => request('description'),\n 'user_id' => Auth::user()->id, \n ];\n\n $data = [\n 'pages' => request('pages'), \n 'body' => request('body'),\n ];\n\n $resource = Article::find($id);\n //var_dump($resource);\n $tags = [];\n\n //If new tags then create and add for sync\n foreach(json_decode(request('tags')) as $tagK => $tagV){\n if(!empty($tagV->create) && $tagV->create){\n if($tag = Tag::firstOrCreate([\n 'title' => $tagV->value,\n 'slug' => str_slug($tagV->value),\n ]))\n {\n $tag->resources()->sync($id);\n $tags[] = $tag->id;\n }\n }\n else {\n $tags[] = $tagV->value;\n }\n }\n\n if($resource->update($data) && $resource->resource->update($data2) && $resource->resource->tags()->sync($tags)) \n {\n return $this->respondSuccess('Successful edit.');\n }\n }\n catch(\\Illuminate\\Database\\QueryException $e){\n $errorCode = $e->errorInfo[1];\n\n switch ($errorCode) {\n //1062 == Duplicate entry for unique MySQL\n case 1062: \n return $this->respondDuplicate('Duplicate Entry.', ['error'=>'This entry already exists.', 'message'=> $e]); \n break;\n default:\n return $this->respondError(null, ['error'=> $errorCode, 'message'=>$e]); \n break;\n }\n }\n }\n }", "title": "" }, { "docid": "69899e5cc810b430e81a78ef78bbb9aa", "score": "0.54833865", "text": "public function putAction()\n\t{\n\t\t$this->_connectionApi->put();\n\t}", "title": "" }, { "docid": "317ca96a233f05a742b57399bd2b3542", "score": "0.54833144", "text": "public function update(Request $r, $id)\n {\n $p = Product::find($id);\n $p->stock = $r->input('stock');\n $p->save();\n alert()->success('Success', 'Data successfully updated');\n return redirect()->route('emptyProduct.index');\n }", "title": "" }, { "docid": "f84f36825279804eeb3fa246acad7d33", "score": "0.5482953", "text": "public function update(Request $request, $id)\n {\n //\n $data = $request->all();\n unset($data['_token']);\n unset($data['_method']);\n unset($data['image']);\n $rs = Pr::find($id)->update($data);\n if($rs) {\n if($request->image){\n $prs = Pr::find($id);\n $image_u = $prs->media;\n $image_u = str_replace('/storage/app/', '', $image_u);\n $path = '/storage/app/'.@$request->file('image')->store('prs');\n $prs->image = $path;\n $prs->save();\n Storage::delete($image_u);\n }\n return redirect(route('prs.index'));\n }else{\n return back();\n }\n }", "title": "" }, { "docid": "a01ea56f337a0cca2a7f8b0fb86e58d0", "score": "0.54794407", "text": "public function update(Request $request, $id)\n {\n\t\t$product = Product::find($id);\n\n\t\t$this->valid($request);\n\n\t\t$field = [\n\t\t\t'uuid',\n\t\t\t'name',\n\t\t\t'price',\n\t\t\t'description',\n\t\t];\n\n\t\tif ($request->product_photo) {\n\t\t\t$request->request->add([\n\t\t\t\t'rule' => [\n\t\t\t\t\t'product_photo' =>\n\t\t\t\t \t'required|image|mimes:jpeg,png,jpg|max:2048',\n\t\t\t\t]\n\t\t\t]);\n\n\t\t\t$this->valid($request);\n\n\t\t\t$upload = $request->file('product_photo')->store('assets/img');\n\n\t\t\tif ($product->photo != '/assets/img/default.jpg') {\n\t\t\t\t@unlink(public_path().$product->photo);\n\t\t\t}\n\n\t\t\tarray_push($field, 'photo');\n\n\t\t\t$request->request->add([\n\t\t\t\t'photo' => '/'.$upload\n\t\t\t]);\n\t\t}\n\n\t\tProduct::where('id', $id)\n\t\t\t->update($request->only($field));\n\n\t\treturn redirect()->route('product.index')->with([\n\t\t\t'success' => 'Data Changed'\n\t\t]);\n }", "title": "" }, { "docid": "749485fd3edd17fca5d56cd2e62d0c66", "score": "0.547553", "text": "public function update(Request $request, $id)\n {\n $item = Item::find($id);\n\n $requestData = $request->all();\n\n if ($request->hasFile('image_url')) {\n\n $old_image = $item->image_url;\n $file = $request->file('image_url');\n $path = $this->fileUpload($file, 'items');\n $requestData['image_url'] = $path;\n File::delete(public_path() . $old_image);\n\n }\n\n $item->update($requestData);\n\n return redirect('/admin/items');\n }", "title": "" }, { "docid": "ba14e6d76f18913118873dc455ddf07e", "score": "0.547496", "text": "public function update(UpdateProductRequest $request, Product $product)\n {\n //\n try {\n $originImage= $product->image;\n $product->fill($request->except(['category', 'supplier']));\n $product->image = $originImage;\n if ($request->image) {\n $oldImage = $product->image;\n $imageEncodeBase64 = $request->image;\n $postion = strpos($imageEncodeBase64, ';');\n $ext = explode('/', substr($imageEncodeBase64, 0, $postion))[1];\n $fileName = Str::uuid() . '.' . $ext;\n $filePath = public_path('storage/product') . '/' . $fileName;\n Image::make($imageEncodeBase64)->resize(200, 240)->save($filePath);\n $product->image = \"product/$fileName\";\n $filePath = public_path('storage/'.$oldImage);\n if(file_exists($filePath)){\n unlink($filePath);\n }\n }\n $product->save();\n return response()->success(new ProductResource($product));\n } catch (\\Throwable $ex) {\n return response()->error($ex->getMessage());\n }\n }", "title": "" }, { "docid": "748d9e839dc1aa55917e22860bfd0666", "score": "0.54659873", "text": "public function update(Request $request, $id, $parent = null)\n {\n extract($this->getResourceNames());\n\n if(!is_null($parent))\n {\n $item = $modelPath::findOrFail($parent);\n $parent = $this->parentModelPath::findOrFail($id);\n } else {\n $item = $modelPath::findOrFail($id);\n }\n\n $validated = $this->resolveRequest('Update')->validated();\n\n $item->update($request->all());\n\n $this->notify($resourceMultiple . '.edited');\n\n return redirect()->back();\n }", "title": "" }, { "docid": "47bbce92661ab4fdf29441a5eabbeea2", "score": "0.5462897", "text": "public function update(Request $request, $id)\n {\n $update = Supplier::find($id);\n $update->name = $request->name;\n $update->slug = strtolower(str_replace(' ', '-',$request->name));\n $update->email = $request->email;\n $update->phone = $request->phone;\n $update->address = $request->address;\n $update->shop_name = $request->shop_name;\n\n if ($request->hasFile('photo')) {\n $image = $request->file('photo');\n $img = time() . '.'. $image->getClientOriginalExtension();\n $location = public_path('backend/assets/images/supplier/'.$img);\n Image::make($image)->resize(300,300)->save($location);\n $update->photo = $img;\n }\n $update->save();\n toast('Supplier Information Add Successfully','success');\n return redirect()->route('index.supplier');\n }", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.5460793", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "f684d143c5cb5e0fd840b77e6b10f6c8", "score": "0.5460385", "text": "public function update(Request $request, $id)\n { \n $product = Product::find($id);\n $product->name = $request->name;\n $product->name = $request->name;\n $product->description = $request->description;\n $product->save();\n if($request->hasFile('image')){\n $file = $request->file('image');\n $name = time().'.jpg';\n $file->move(public_path('//images//'), $name);\n $image = Image::find($id);\n $image->path = '/images/'.$name;\n $image->save();\n return response()->json(['message'=>'Producto Modificado Satisfactoriamente', $product ,'image'=>$image,]);\n }\n return response()->json(['message'=>'Producto Modificado Satisfactoriamente', $product]);\n }", "title": "" }, { "docid": "6bbf67d9e29ef7e592b60af7e38a778c", "score": "0.54592675", "text": "public function update($resource, $attributes, $exec = false)\n {\n if (!$exec) {\n return $this->beforeUpdate($resource, $attributes);\n }\n\n return DB::transaction(function () use ($resource, $attributes) {\n $attributes = $this->updateAttributes($attributes);\n\n /** @var Model $resource */\n $resource = $this->fill($resource, $attributes, true);\n $resource->save();\n\n return $this->afterUpdate($resource, $attributes);\n });\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "4360333bf1732261e8e76d77713982a2", "score": "0.54556817", "text": "private function updateEntity(Model\\BaseModel $entity, string $uri, string $resourceFieldKey): void {\n\t\t$tags = [];\n\t\tif ($entity instanceof Model\\TaggableInterface) {\n\t\t\t// Preserve the tags temporarily.\n\t\t\t// We'll sync them later.\n\t\t\t$tags = $entity->getTags();\n\t\t}\n\n\t\t$rawApiResponse = $this->communicator->put($uri, [], [\n\t\t\t$resourceFieldKey => $entity->export(),\n\t\t]);\n\n\t\t$newData = $rawApiResponse->getValue(sprintf('[%s]', $resourceFieldKey));\n\t\t$entity->hydrate($newData);\n\n\t\tif ($entity instanceof Model\\TaggableInterface) {\n\t\t\t// The requests (and hydration) above made us lose the tags,\n\t\t\t// since they're managed through another API.\n\t\t\t// Let's assign/de-assign tags now.\n\t\t\t$this->ensureTagsSynced($entity, $tags);\n\t\t}\n\t}", "title": "" }, { "docid": "f2d8cf4532904fd7bfbac2bd62a96a68", "score": "0.54469514", "text": "public function update(Request $request, $id)\n {\n $input = $request->all();\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required',\n ]);\n if ($request->hasFile('icon')) {\n $path = $request->icon->store('public/images');\n $input['icon'] = $path;\n }\n $block = FourBlock::find($id);\n $block->fill($input)->save();\n toastr()->success('Block has been updated successfully');\n return redirect()->route('fourblock.index');\n }", "title": "" }, { "docid": "0073ba64b443f80ace8779c23d638758", "score": "0.54424137", "text": "public function update(StorePoductRequest $request, Product $product, $id)\n {\n $updated_datas = $request->except(['_method','_token']);\n $prod_to_update = Product::where('id',$id);\n $updated = $prod_to_update->update($updated_datas);\n if($prod_to_update){\n return redirect('/admin/products')->with('status', 'A termék sikeresen frissítve!');\n }\n\n }", "title": "" }, { "docid": "7db59e65f55b9762d20b09aede45101b", "score": "0.54399514", "text": "public function update(Request $request, Product $product)\n {\n if($request['image']){\n $file = $request['image'];\n $image = $this->ImageUploader($file,'images/');\n// unlink($product->image);\n }else{\n $image = $product->image;\n }\n if($request['file']){\n $file = $request['image'];\n $val = $this->ImageUploader($file,'files/');\n// unlink($product->file);\n }else{\n $val = $product->file;\n }\n\n\n $data = $request->all();\n $product->tags()->sync($data['tag_id']);\n $data['image'] = $image;\n $data['file'] = $val;\n\n $product->update($data);\n return redirect(route('product.index'));\n }", "title": "" }, { "docid": "2b54bef0cb09abd830d8673bfdd3df4e", "score": "0.5435874", "text": "public function update(ProductRequest $request, $id)\n {\n $inputs = $request->except(['_method', '_token']);\n if ($request->hasFile('poster')) {\n $poster = $request->file('poster');\n $new_name = uniqid(mb_strimwidth($poster->getClientOriginalName(), 0, 3, '_')) . '.' . $poster->getClientOriginalExtension();\n\n $img = Image::make($poster);\n $img->insert(public_path().'/images/watermark.png', 'center');\n $img->save(public_path() . '/images/' . $new_name);\n\n File::delete('images/' . $inputs['old_poster']);\n $inputs['poster'] = $new_name;\n unset($inputs['old_poster']);\n } else {\n $inputs['poster'] = $inputs['old_poster'] ?? null;\n unset($inputs['old_poster']);\n }\n if ($inputs['available'] === 'yes') {\n $inputs['available'] = 1;\n } else {\n $inputs['available'] = 0;\n }\n $update_product = Product::find($id);\n $update_product->fill($inputs);\n if ($update_product->update()) {\n return redirect()->route('product.index')->with('status', 'Product successfully updated !!!');\n }\n }", "title": "" }, { "docid": "45006333af499b7a8ef5e992e8465995", "score": "0.54331666", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n\t\tself::storeOrUpdate($product, $request);\n\n\t\treturn redirect('/products')->with('edited', \"Product edited: $product->name\");\n }", "title": "" }, { "docid": "f71584ef2ac9d0aab6b54094e7b315c4", "score": "0.543238", "text": "public function update()\n {\n $this->executeActions(true);\n $this->saveData();\n $this->reset(); // reset pending changes\n }", "title": "" }, { "docid": "eaa583782a682873861569b9b98dc81c", "score": "0.5430323", "text": "public function updateEntity(Entity $entity);", "title": "" }, { "docid": "8fb9613a7e05f846bb10235d1d3c4c4b", "score": "0.54254407", "text": "public function update(Request $request, $id)\n {\n $validation=$request->validate([\n \"text\"=>\"required\",\n\n \n ]);\n $update=Slider::find($id);\n if (request()->hasFile(key:'img')) {\n $img=request()->file(key:'img')->hashName();\n request()->file(key:'img')->storeAs(path:'',name:$img);\n $update->img=$img;\n }\n $update->text=$request->text;\n $update->save();\n return redirect()->back();\n\n }", "title": "" }, { "docid": "9f31b47ab07ed8f7effea689ae758174", "score": "0.5420852", "text": "public function update()\n {\n $this->getDataBackend()->update();\n }", "title": "" }, { "docid": "336bb2ab11980d312dc3ebdfdf92ee79", "score": "0.5418655", "text": "public function update(Request $request, $id)\n {\n $validateData = $request->validate([\n 'al_desc'=>'required|string',\n 'tr_desc'=>'required|string',\n 'stock'=>'required',\n 'age'=>'required',\n 'pur_price'=>'required',\n 'sale_price'=>'required',\n 'image' => 'required|image|max:2048',\n ]);\n\n $article = Articles::where('id', $id)\n ->first();\n\n $image_path = public_path(\"images/{$article->image}\");\n\n if (File::exists($image_path)) {\n unlink($image_path);\n $image = $request->file('image');\n $filename = $image->getClientOriginalName();\n $image->move(public_path('images'), $filename);\n $article->image = $request->file('image')->getClientOriginalName();\n }\n\n $articleStock = $request->input('stock');\n $article->al_desc = $request->input('al_desc');\n $article->tr_desc = $request->input('tr_desc');\n $article->stock = $request->input('stock');\n $article->age=$request->input('age');\n $article->pur_price=$request->input('pur_price');\n $article->sale_price=$request->input('sale_price');\n $article->prime_stock +=$articleStock;\n $article->save();\n\n return redirect()->route('articles.index')->with('success','Article Updated Successfully');\n }", "title": "" }, { "docid": "cdb8493452b057388fcb678d2dccb96c", "score": "0.5417866", "text": "public function update($id, Request $request);", "title": "" }, { "docid": "9f4a5e931ad31bad773803c3dc4cda90", "score": "0.5416135", "text": "public function update(Request $request, $id)\n {\n if($request->hasFile('image')){\n\n $filename = $this->productImage($request->file('image'));\n \n }else{\n\n $recent = Product::findOrFail($id);\n $filename = $recent->image;\n }\n\n $product = new Product;\n Product::where('id', $id)->update($product->productData($request->toArray())+['status' => true, 'image' => $filename]);\n\n return redirect()->route('products.index')->with('success', 'product successfully updated');\n }", "title": "" }, { "docid": "daac94b3950e759691b202ac44ca7b18", "score": "0.54159683", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $product->update($request->only($this->product_fields));\n $this->move_image($product, $request->get('image'));\n }", "title": "" }, { "docid": "b55b4c2da5ca8dec48b36986ba4711ee", "score": "0.54155767", "text": "public function update(Request $request, Product $product)\n\n {\n\n $input = $request->all();\n\n\n\n $validator = Validator::make($input, [\n\n 'name' => 'required',\n\n 'price' => 'required',\n\n 'stock' => 'required',\n\n 'shortDesc' => 'required',\n\n 'description' => 'required'\n\n ]);\n\n\n\n\n\n if($validator->fails()){\n\n return $this->sendError('Validation Error.', $validator->errors());\n\n }\n\n\n\n $product->name = $input['name'];\n\n $product->price = $input['price'];\n\n $product->stock = $input['stock'];\n\n $product->shortDesc = $input['shortDesc'];\n\n $product->description = $input['description'];\n\n\n\n $product->save();\n\n\n\n return $this->sendResponse(new ProductResource($product), 'Product updated successfully.');\n\n }", "title": "" }, { "docid": "fa4d35fe272f742ecbc45d6ae01985ba", "score": "0.5411923", "text": "public function update(Request $request, $id)\n {\n \n $validator = Validator::make($request->all(),[\n 'name' => 'required|string|max:255',\n 'user_id' => 'required|exists:App\\Models\\User,id',\n 'category_id' => 'required|exists:App\\Models\\Category,id',\n 'description' => 'required',\n 'price' => 'required',\n 'photo' => 'image'\n\n ]);\n\n if($validator->fails()){\n return response()->json($validator->errors()); \n }\n \n $product = Product::find($id);\n $product -> name = $request['name'];\n $product -> user_id = $request['user_id'];\n $product -> category_id = $request['category_id'];\n $product -> description = $request['description'];\n $product -> price = $request['price'];\n\n if($request->hasFile('photo')){\n if(File::exists(public_path(\"storage/\").$product -> photo)){\n File::delete(public_path(\"storage/\").$product -> photo);\n }\n $product -> photo=$request->photo->store('photo');\n }\n\n $product -> save();\n\n return response()\n ->json(['success' => 1,'message' => 'Updated succesfully!']);\n }", "title": "" }, { "docid": "daa5dabd0608fa1791ffe3d1866a3e16", "score": "0.5410523", "text": "public function update(StoreUpdateProductRequest $request, $id)\n {\n \n $product = $this->repository->find($id);\n if(!$product){\n return redirect()->back();\n }\n\n $data = $request->all();\n\n // Upload de Imagem \n if($request->hasFile('image') && $request->image->isValid()){\n\n /** Verifica se o arquivo existe */\n if($product->image && Storage::exists($product->image)){\n /** Deleta o arquivo */\n Storage::delete($product->image);\n }\n // Salvando imagem e passando o caminho da imagem\n $imagePath = $request->image->store('products');\n\n // Passando o nome da imagem para armazenar no banco\n $data['image'] = $imagePath;\n }\n\n $product->update($data);\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "8cc682b417e81303d02cf6c27cfcadc5", "score": "0.540968", "text": "public function update(Request $request, $id)\n {\n $prds = Product::find($id);\n $prds->nombre = $request->input('nombre');\n if ($request->hasFile('foto')) {\n $file = time().'.'.$request->foto->extension();\n $request->foto->move(public_path('imgs'), $file);\n $prds->foto = \"imgs/\".$file;\n }\n $prds->directory_id = $request->input('directory_id');\n if($prds->save()) {\n return redirect('directories')\n ->with('status', 'La Noticia '.$prds->nombre.' se modifico con Exito!');\n }\n }", "title": "" }, { "docid": "51af550a7cfb8f966c66be0c2f793c3b", "score": "0.54074425", "text": "public function update($id, Request $request)\n\t{\n\t\t$content = Content::findOrFail($id);\n\t\t$data['name'] = $request->name;\n if($request['image-data'] != null){\n \t$image = $this->uploadAvatarAgent($request->image, $request['image-data']);\n \t$data['image'] = $image['url'];\n }\n\t\t$data['url'] = $request->url;\n\t\t$content->update($data); \n\t\treturn redirect()->route(config('quickadmin.route').'.content.index');\n\t}", "title": "" }, { "docid": "aa18b98fb17d4cb4052efc2798af1142", "score": "0.54064333", "text": "public function testUpdateStoreItem()\n {\n }", "title": "" }, { "docid": "0754ef21e342dbc988b4756156b2c0b9", "score": "0.5404135", "text": "public function update(Request $request, Product $product)\n {\n $data = $request->all();\n\n if($request->file('picturePath'))\n {\n $data['picturePath'] = $request->file('picturePath')->store('assets/product', 'public');\n }\n\n $product->update($data);\n\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" } ]
5c2208a5ffc1e6ca280deb7f6bbbb30f
Constructs a skeletal implementation of a Lists.
[ { "docid": "4a9656ea37ef59e702095c9766deb1ab", "score": "0.0", "text": "public function __construct (array $internalData) {\n\n\t\t$this->internalData = $internalData;\n\t}", "title": "" } ]
[ { "docid": "e66938abba5db89e9f5acc28293719e1", "score": "0.6876072", "text": "function lst($xs=null) {\n $cls = \\std\\_getclass('Lst');\n return new $cls($xs);\n}", "title": "" }, { "docid": "5d21dcdc51e868c132201a738fc1f69c", "score": "0.66152495", "text": "public function __construct(Lists $list)\n {\n $this->list = $list;\n }", "title": "" }, { "docid": "b4aa75819ddf233a4a6a20a07fdcffd1", "score": "0.6397659", "text": "abstract public function getLists();", "title": "" }, { "docid": "fc587691898429843aee3d4f788f6819", "score": "0.6355777", "text": "public function lists();", "title": "" }, { "docid": "fc587691898429843aee3d4f788f6819", "score": "0.6355777", "text": "public function lists();", "title": "" }, { "docid": "a1e1f4639e4adeef35c317514c507f5e", "score": "0.621276", "text": "function __construct()\n {\n $this->list = new UnOrderedList();\n }", "title": "" }, { "docid": "d3de333925731c4a4b7653ae559062c0", "score": "0.6064392", "text": "public function __construct(array $lists = array()) {\n\t\t$multi = new MultipleIterator(MultipleIterator::MIT_NEED_ANY);\n\n\t\t$items = [];\n\t\t/** @var SS_List $list */\n\t\tforeach ($lists as $list) {\n\t\t\t/** @var ArrayList|DataList $list */\n\t\t\t$list = is_array($list) ? new ArrayList($list) : $list;\n\n\t\t\t$multi->attachIterator($list->getIterator());\n\t\t}\n\t\tforeach ($multi as $list) {\n\t\t\tforeach ($list as $item) {\n\t\t\t\tif ($item) {\n\t\t\t\t\t$items[] = $item;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tparent::__construct($items);\n\t}", "title": "" }, { "docid": "7ab031c4620629b400e66a94dc11176e", "score": "0.5994895", "text": "static function get_list_table(){\n\t\tif(!class_exists('SeamlessDonationCodeLists')){\n\t\t\tinclude SDCODEMANIPLATION_DIR . '/classes/list-table.php';\n\t\t}\n\t\t\n\t\treturn new SeamlessDonationCodeLists();\n\t}", "title": "" }, { "docid": "8e5044593d1442c8c25e4098f3107043", "score": "0.593143", "text": "public function __construct($list) {\n $this->list = $list;\n }", "title": "" }, { "docid": "47eaff38ff07f562ceaa32e7dd843ae3", "score": "0.59283864", "text": "public function testElementListConstruction()\n\t{\n\t\t$template = new ElementList();\n\t\t\n\t\t$alpha = new ElementList(\"alpha\");\n\t\t$alpha->append((new Element(\"bravo\"))->required(true));\n\t\t$alpha->appendTo($template);\n\t\t\n\t\t$this->assertNotEmpty($template->children);\n\t\t\n\t\tforeach($template->children as $child)\n\t\t{\n\t\t\t$this->assertInstanceOf(ElementListInterface::class, $child);\n\t\t\t$this->assertNotEmpty($template->children);\n\t\t\t\n\t\t\tforeach($child->children as $grand_child)\n\t\t\t\t$this->assertInstanceOf(ElementInterface::class, $grand_child);\n\t\t}\n\t\t\n\t\treturn $template;\n\t}", "title": "" }, { "docid": "b83ea3b0bc51aeb77dfd84551ef9c5f3", "score": "0.59137917", "text": "function a() {\n $cls = \\std\\_getclass('Lst');\n return new $cls(func_get_args());\n}", "title": "" }, { "docid": "059493395dab7618e525fb7413bfe496", "score": "0.5884635", "text": "public function __construct()\n {\n $this->list = new SinglyLinkedList();\n }", "title": "" }, { "docid": "deaa381356aa2bfa39379bb739e82059", "score": "0.5857711", "text": "public function __construct () {\n\t\t#G:\\HaxeToolkit\\haxe\\std/haxe/ds/List.hx:45: characters 3-13\n\t\t$this->length = 0;\n\t}", "title": "" }, { "docid": "ef73a44ed416a1ffeef3bc835053d559", "score": "0.58534783", "text": "public function setList(SS_List $list) {\n\t\t$this->list = $list;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "973ce23b1570aa11325ce5a4a76d193c", "score": "0.57954246", "text": "public function lists(): Lists\n {\n return new Lists($this->credentials, $this->username);\n }", "title": "" }, { "docid": "e38bd6205e45d23a6d537317ed8a8982", "score": "0.57829386", "text": "public function __construct(array $list)\n {\n $this->list = $list;\n }", "title": "" }, { "docid": "333497764f6fe81d6512276c6566818c", "score": "0.5756818", "text": "function it_can_be_created_from_lists()\n {\n expect(ImmList(1,2,3)->iterator())->toHaveType(Iterator::class);\n }", "title": "" }, { "docid": "a0cad74f0c0b5f92511d0bc9d0bb1037", "score": "0.5755594", "text": "public function testCreateList()\n {\n $list = new Todo_List();\n $list->name = 'Test list';\n Test_Assert::assertEquals(true, $list->create());\n \n $this->lists[] = $list; // to have it deleted in tearDown\n $id = $list->id;\n $nlist = new Todo_List($id);\n Test_Assert::assertEquals($nlist->id, $id);\n }", "title": "" }, { "docid": "d879bd58b3832909da1b60cb35bff812", "score": "0.5707982", "text": "protected function initList() {\n\t\t$this->list = new static::$className();\n\t\t\n\t\t// Order by\n\t\t$this->list->sqlOrderBy .= $this->getSqlOrderBy();\n\t\t\n\t\t// SQL joins\n\t\t$sqlJoin = $this->getSqlJoins();\n\t\t$this->list->sqlJoins .= $sqlJoin['sql'];\n\t\t$this->list->getConditionBuilder()->add('', $sqlJoin['parameters']);\n\t\t\n\t\t// Add packageID condition\n\t\t$alias = call_user_func(array($this->list->className, 'getDatabaseTableAlias'));\n\t\t$this->list->getConditionBuilder()->add($alias . \".packageID = ?\", array($this->project->packageID));\n\t}", "title": "" }, { "docid": "11f043d0e963daa4efc3bc63f4c1f45c", "score": "0.56893593", "text": "function GetList(){}", "title": "" }, { "docid": "11f043d0e963daa4efc3bc63f4c1f45c", "score": "0.56893593", "text": "function GetList(){}", "title": "" }, { "docid": "09ef8c9e72f22867447953e7ca1b9f97", "score": "0.5687662", "text": "function make_list($_list1, $_list2) {\n\t\tif($GLOBALS['T3Q_VARS']['srt']=='yes') {\n\t\t\t$list1 = $_list1;\n\t\t\t$list2 = $_list2;\n\t\t} else {\n\t\t\t$list1 = $_list2;\n\t\t\t$list2 = $_list1;\n\t\t}\n\t\t\n\t\tif(is_array($list1)) {\n\t\t\twhile (list($key, $val) = each($list1)) {\n\t\t\t\t$list[$key] = $val;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(is_array($list2)) {\n\t\t\twhile (list($key, $val) = each($list2)) {\n\t\t\t\t$list[$key] = $val;\n\t\t\t}\n\t\t}\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "1a40e7cddcb7853d70785590437101da", "score": "0.5680989", "text": "public function createList(DataBackendInterface $dataBackend, ConfigurationBuilder $configurationBuilder, $resetList = false)\n {\n $list = new Lists();\n\n // We have to build headers here, as they are no longer created by data backend\n $listHeader = $this->listHeaderFactory->createInstance($configurationBuilder, $resetList);\n $list->setListHeader($listHeader);\n\n $list->setRendererChain($this->rendererChainFactory->getRendererChain($configurationBuilder->buildRendererChainConfiguration()));\n\n if ($configurationBuilder->buildListConfiguration()->getUseIterationListData()) {\n $list->setIterationListData($dataBackend->getIterationListData());\n $list->setUseIterationListData(true);\n } else {\n if ($resetList) {\n $dataBackend->resetListDataCache();\n }\n $list->setListData($dataBackend->getListData());\n }\n\n $list->setAggregateListData(self::buildAggregateListData($dataBackend, $configurationBuilder));\n\n return $list;\n }", "title": "" }, { "docid": "e088db24dee9f856e8c82b833b3db9fc", "score": "0.56687343", "text": "function NullList(){}", "title": "" }, { "docid": "9cbe6a42b04f5acde62aa47ccc674728", "score": "0.5662484", "text": "public function __construct()\n {\n if (3 == func_num_args()) {\n $this->isListed = func_get_arg(0);\n $this->lists = func_get_arg(1);\n $this->listCount = func_get_arg(2);\n }\n }", "title": "" }, { "docid": "eed6b5451a2a793821cbab54f8ad101f", "score": "0.56411666", "text": "public function populateListFromPost(): ListInterface\n {\n $listId = Craft::$app->getRequest()->getBodyParam('listId');\n\n if ($listId) {\n $list = Craft::$app->elements->getElementById($listId);\n } else {\n $list = new ListElement();\n }\n\n $list->type = get_class($this);\n $list->elementId = Craft::$app->getRequest()->getBodyParam('elementId');\n $list->name = Craft::$app->request->getRequiredBodyParam('name');\n $list->handle = Craft::$app->request->getBodyParam('handle');\n\n if ($list->handle === null) {\n $list->handle = StringHelper::toCamelCase($list->name);\n }\n\n return $list;\n }", "title": "" }, { "docid": "868c37a334ba96a2ec8be776017570d7", "score": "0.5629623", "text": "public function setup_list() {\n $this->_setup( 'list' );\n }", "title": "" }, { "docid": "3c7eb5f2a364adbda6fd505ca0571e6d", "score": "0.55818313", "text": "function isList() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "2995764e405cbc7f92b9dbe4fc911634", "score": "0.55530614", "text": "public function makeList($alias)\n {\n if (!$alias || !isset($this->listConfig[$alias]))\n $alias = $this->primaryAlias;\n\n $listConfig = $this->controller->getListConfig($alias);\n\n $modelClass = $listConfig['model'];\n $model = new $modelClass;\n unset($listConfig['model']);\n $model = $this->controller->listExtendModel($model, $alias);\n\n // Prep the list widget config\n $requiredConfig = [$alias];\n $configFile = $listConfig['configFile'];\n $modelConfig = $this->loadConfig($configFile, $requiredConfig, $alias);\n\n $columnConfig['bulkActions'] = $modelConfig['bulkActions'] ?? [];\n $columnConfig['columns'] = $modelConfig['columns'];\n $columnConfig['model'] = $model;\n $columnConfig['alias'] = $alias;\n\n $widget = $this->makeWidget('Admin\\Widgets\\Lists', array_merge($columnConfig, $listConfig));\n\n $widget->bindEvent('list.extendColumns', function () use ($widget) {\n $this->controller->listExtendColumns($widget);\n });\n\n $widget->bindEvent('list.extendQueryBefore', function ($query) use ($alias) {\n $this->controller->listExtendQueryBefore($query, $alias);\n });\n\n $widget->bindEvent('list.extendQuery', function ($query) use ($alias) {\n $this->controller->listExtendQuery($query, $alias);\n });\n\n $widget->bindEvent('list.extendRecords', function ($records) use ($alias) {\n return $this->controller->listExtendRecords($records, $alias);\n });\n\n $widget->bindEvent('list.overrideColumnValue', function ($record, $column, $value) use ($alias) {\n return $this->controller->listOverrideColumnValue($record, $column, $alias);\n });\n\n $widget->bindEvent('list.overrideHeaderValue', function ($column, $value) use ($alias) {\n return $this->controller->listOverrideHeaderValue($column, $alias);\n });\n\n $widget->bindToController();\n\n // Prep the optional toolbar widget\n if (isset($this->controller->widgets['toolbar']) && (isset($listConfig['toolbar']) || isset($modelConfig['toolbar']))) {\n $this->toolbarWidget[$alias] = clone $this->controller->widgets['toolbar'];\n if ($this->toolbarWidget[$alias] instanceof \\Admin\\Widgets\\Toolbar)\n $this->toolbarWidget[$alias]->reInitialize($listConfig['toolbar'] ?? $modelConfig['toolbar']);\n $this->toolbarWidget[$alias]->bindToController();\n }\n\n // Prep the optional filter widget\n if (array_get($modelConfig, 'filter')) {\n $filterConfig = $modelConfig['filter'];\n $filterConfig['alias'] = \"{$widget->alias}_filter\";\n $filterWidget = $this->makeWidget('Admin\\Widgets\\Filter', $filterConfig);\n $filterWidget->bindToController();\n\n if ($searchWidget = $filterWidget->getSearchWidget()) {\n $searchWidget->bindEvent('search.submit', function () use ($widget, $searchWidget) {\n $widget->setSearchTerm($searchWidget->getActiveTerm());\n\n return $widget->onRefresh();\n });\n\n $widget->setSearchOptions([\n 'mode' => $searchWidget->mode,\n 'scope' => $searchWidget->scope,\n ]);\n\n // Find predefined search term\n $widget->setSearchTerm($searchWidget->getActiveTerm());\n }\n\n $filterWidget->bindEvent('filter.submit', function () use ($widget) {\n return $widget->onRefresh();\n });\n\n $filterWidget->bindEvent('filter.extendScopesBefore', function () use ($filterWidget) {\n $this->controller->listFilterExtendScopesBefore($filterWidget);\n });\n\n $filterWidget->bindEvent('filter.extendScopes', function ($scopes) use ($filterWidget) {\n $this->controller->listFilterExtendScopes($filterWidget, $scopes);\n });\n\n $filterWidget->bindEvent('filter.extendQuery', function ($query, $scope) {\n $this->controller->listFilterExtendQuery($query, $scope);\n });\n\n // Apply predefined filter values\n $widget->addFilter([$filterWidget, 'applyAllScopesToQuery']);\n\n $this->filterWidgets[$alias] = $filterWidget;\n }\n\n return $widget;\n }", "title": "" }, { "docid": "17747dfceed11cb1fbfbe94abf01ba34", "score": "0.5533664", "text": "public function makeLists()\n {\n $this->listWidgets = [];\n\n foreach ($this->listConfig as $alias => $config) {\n $this->listWidgets[$alias] = $this->makeList($alias);\n }\n\n return $this->listWidgets;\n }", "title": "" }, { "docid": "40fe756af28afc912b06e7d5806173d3", "score": "0.55327994", "text": "function __construct()\t{\r\n\t\t$this->listA = array();\r\n\t}", "title": "" }, { "docid": "6d4cacdaefb61473823c02461fdbc3c3", "score": "0.55223423", "text": "public function __construct(string $listName, array $addresses, Config $config, OutputInterface $output);", "title": "" }, { "docid": "700cc791baf77c214068c59a9d73756d", "score": "0.5488791", "text": "public function setLists($lists)\n {\n if ($lists instanceof \\stdClass)\n {\n //fix for object to array cast\n //https://bugs.php.net/bug.php?id=45959\n $arg = $lists;\n $lists = array();\n foreach ($arg as $k => $v)\n {\n $lists[$k] = $v;\n }\n }\n $this->lists = $lists;\n return $this;\n }", "title": "" }, { "docid": "b9182a5a39005bccae03c366da25b6ac", "score": "0.5478426", "text": "public function __construct($name, $listitems, $special=false,\n $default='text', $fieldName='field'){\n //set the name\n $this->_formName = $name;\n \n //set the name of the field that the list data represents\n $this->_fieldname = $fieldName;\n \n // process special\n if(is_array($special) === false){$special = false;}\n \n // use list item construction function\n $this->_listItems = $this->makeItems($listitems, $special, $default);\n \n }", "title": "" }, { "docid": "39b28258c0a3ca860d0a0a1d59a1a7f3", "score": "0.5426369", "text": "public function createList($listName) {\n\t\t$lister = New Lister($this, \"\");\n\n\t\t$params = [\n\t\t\t\"Title\" => $listName,\n\t\t\t$this->coreValues,\n\t\t];\n\n\t\treturn $lister->create($params, $this->clientId);\n\t}", "title": "" }, { "docid": "3f65a8b486f61624b89805c2513dc02d", "score": "0.54217654", "text": "public function __construct(array $list, bool $enumerate = false) {\n // Define defaults\n $this->template = '@BobvLatex/Element/listing.tex.twig';\n $this->params = array(\n 'list' => $list,\n 'extra_commands' => array(),\n 'enumerate' => $enumerate,\n );\n }", "title": "" }, { "docid": "fcc886b16eaf84fdfe1efa133acf39b2", "score": "0.53957576", "text": "public function list($value): self\n {\n $this->list = $value;\n \n return $this;\n }", "title": "" }, { "docid": "cc5f7e07503fa1889f27a3333606b33b", "score": "0.53730893", "text": "public function setLists( $lists ){\n \n // set lists\n $this->lists = $lists;\n \n }", "title": "" }, { "docid": "9fef7be7120fc686726a20231ba9000a", "score": "0.53593206", "text": "public function create_list($params){\n\t\t$endpoint = 'lists';\n\n\t\ttry{\n\t\t\treturn json_decode($this->execute_JSON_post_request($this->get_request_url($endpoint,null),json_encode($params)));\n\t\t}\n\t\tcatch(HubSpot_Exception $e){\n\t\t\tprint_r(\"Unable to create list: \".$e);\n\t\t}\n\t}", "title": "" }, { "docid": "8a1994525b1960dc213c6d33d600d4e6", "score": "0.53553206", "text": "public function it_can_check_is_list()\n {\n $this->assertTrue(Util::isList([\n 5, 'nstaoush', []\n ]));\n\n $this->assertFalse(Util::isList([\n 5, 'nstaoush', [], 'bar' => 'baz'\n ]));\n }", "title": "" }, { "docid": "27a02d692b6b4f46ffeceecb98764d68", "score": "0.5340677", "text": "public function __construct(\n bool $list = false,\n bool $ordered = false,\n $vertical = false,\n bool $tabs = false,\n bool $pills = false,\n bool $fill = false,\n bool $justified = false\n ) {\n $this->list = $list;\n $this->ordered = $ordered;\n $this->vertical = $vertical;\n $this->tabs = $tabs;\n $this->pills = $pills;\n $this->fill = $fill;\n $this->justified = $justified;\n }", "title": "" }, { "docid": "17735ed2c27a626608dca41dd4c9e54f", "score": "0.5311829", "text": "public function __construct(\\StructType\\ListComponentArrayContainer $getComponentListsReturn = null)\n {\n $this\n ->setGetComponentListsReturn($getComponentListsReturn);\n }", "title": "" }, { "docid": "f4a9032ef43f93695bc1ae48d63224ac", "score": "0.5301987", "text": "function make_list($_list1, $_list2) {\t\t// make list of files\n\t$list = array();\n\n\tif($GLOBALS[\"srt\"]==\"yes\") {\n\t\t$list1 = $_list1;\n\t\t$list2 = $_list2;\n\t} else {\n\t\t$list1 = $_list2;\n\t\t$list2 = $_list1;\n\t}\n\t\n\tif(is_array($list1)) {\n\t\twhile (list($key, $val) = each($list1)) {\n\t\t\t$list[$key] = $val;\n\t\t}\n\t}\n\t\n\tif(is_array($list2)) {\n\t\twhile (list($key, $val) = each($list2)) {\n\t\t\t$list[$key] = $val;\n\t\t}\n\t}\n\t\n\treturn $list;\n}", "title": "" }, { "docid": "895fe04e89c1aca315ab2737845eb6e7", "score": "0.5301756", "text": "abstract protected function getList();", "title": "" }, { "docid": "6078331e1ca8aea05b9ac694a638edb4", "score": "0.53014207", "text": "public function __construct(array $list, $subject, $content, $from = false, $list_fields = false)\n\t{\n\t\t$this->list = $this->filter($list);\n\t\tif ( !$from ) {\n\t\t\t$this->from = getenv('SENDGRID_FROM');\n\t\t} else {\n\t\t\t$this->from = $from;\n\t\t}\n\t\t$this->subject = $subject;\n\t\t$this->content = $content;\n\t\tif ( $list_fields && is_array($list_fields) ) {\n\t\t\t$this->lists_fields = $list_fields;\n\t\t}\n\t}", "title": "" }, { "docid": "42a7a82d5e01a3db53e9cb5d09e9d56a", "score": "0.5296136", "text": "abstract public function getList();", "title": "" }, { "docid": "dbf3f2f1e8008fcef62498f80fe32497", "score": "0.52373904", "text": "public function setList($list = array())\n {\n $this->list = $list;\n }", "title": "" }, { "docid": "0741c38c98e7f28610de76528973ca64", "score": "0.5230001", "text": "static function initWithList(/** @noinspection PhpUnusedParameterInspection */\n $first = NULL) {\n return static:: callStaticMethodWithArray('initWith', func_get_args());\n }", "title": "" }, { "docid": "2e7596b2eb9e712a882af06c91ebbc61", "score": "0.5193664", "text": "function getType() {\n\t\treturn \"List\";\n\t}", "title": "" }, { "docid": "9083df7ddd6094291ca1b7f69bdee283", "score": "0.51928943", "text": "public function testTypedList() {\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "title": "" }, { "docid": "75a4a7a9b9e18b14e7a1880382b729a7", "score": "0.51886004", "text": "public function list(array $filter = []): Model\\Subject\\AbstractList\n {\n if (Model\\Subject\\Subject::CUSTOMER === $this->type) {\n return new Model\\Subject\\CustomerList($this->client, $filter);\n }\n\n return new Model\\Subject\\SupplierList($this->client, $filter);\n }", "title": "" }, { "docid": "2526d05aa02a70e197fc22ea6d9af639", "score": "0.51859045", "text": "protected function generate_list($listitems) {\n $list = \"\";\n $currentdepth = 1;\n $nextdepth = 1;\n $liststack = array();\n for ($lc = 0; $lc < count($listitems) && $nextdepth; $lc++) {\n $cli = $listitems[$lc];\n $nli = isset($listitems[$lc + 1]) ? $listitems[$lc + 1] : null;\n\n $text = $cli[1];\n\n $currentdepth = $nextdepth;\n $nextdepth = $nli ? $nli[0] : null;\n\n if ($nextdepth == $currentdepth || $nextdepth == null) {\n $list .= socialparser_utils::h('li', $text) . \"\\n\";\n } else if ($nextdepth > $currentdepth) {\n $nextdepth = $currentdepth + 1;\n\n $list .= \"<li>$text\\n\";\n $list .= \"<$nli[2]>\\n\";\n $liststack[] = $nli[2];\n } else {\n $list .= socialparser_utils::h('li', $text) . \"\\n\";\n\n for ($lv = $nextdepth; $lv < $currentdepth; $lv++) {\n $type = array_pop($liststack);\n $list .= \"</$type>\\n</li>\\n\";\n }\n }\n }\n\n for ($lv = 1; $lv < $currentdepth; $lv++) {\n $type = array_pop($liststack);\n $list .= \"</$type>\\n</li>\\n\";\n }\n\n return $list;\n }", "title": "" }, { "docid": "39a2a44b4b340f47384d16e38921e687", "score": "0.5166417", "text": "public static function ul($list, $attributes = array()){}", "title": "" }, { "docid": "36ded4088ffd7bfa6792cb5c404c8ae9", "score": "0.5103007", "text": "public function __construct($list = NULL, $fieldList = null, $data_dir = 'data') {\n\t\t$this->mm_data_dir = $data_dir;\n\t\t$this->list = $list;\n\t\t$this->fieldList = $fieldList;\n\t}", "title": "" }, { "docid": "8612702916ea41b037953daf67e76ade", "score": "0.5101167", "text": "function to_list(array $list, $optUl = array(), $optLi = array())\n{\n\t$listStr = '';\n\tforeach ($list as $item)\n\t{\n\t\t$listStr .= tag('li', $optLi, $item);\n\t}\n\treturn tag('ul', $optUl, $listStr);\n}", "title": "" }, { "docid": "9dfdf64a8da1b9ebf64abffdecd07db0", "score": "0.50933045", "text": "public function setList($list_id)\n {\n $this->list_id = $list_id;\n return $this;\n }", "title": "" }, { "docid": "8dda503b7276ae382bd1dd3ef0dd1eb3", "score": "0.50835335", "text": "public function setList(string $value):static {\n return $this->setAttribute('list', $value);\n }", "title": "" }, { "docid": "0237f7781781caca2f0f13a069fcbcb0", "score": "0.5068935", "text": "protected function createHTMLList() {\n\t\t$this->setTemplateId('servers_list', 'servers.tpl.html');\n\n\t\t// get servers from database\n\t\t$servers = $this->db->query(\n\t\t\t'SELECT '.\n\t\t\t\t'`server_id`, '.\n\t\t\t\t'`ip`, '.\n\t\t\t\t'`port`, '.\n\t\t\t\t'`type`, '.\n\t\t\t\t'`label`, '.\n\t\t\t\t'`status`, '.\n\t\t\t\t'`error`, '.\n\t\t\t\t'`rtime`, '.\n\t\t\t\t'IF('.\n\t\t\t\t\t'`last_check`=\\'0000-00-00 00:00:00\\', '.\n\t\t\t\t\t'\\'never\\', '.\n\t\t\t\t\t'DATE_FORMAT(`last_check`, \\'%d-%m-%y %H:%i\\') '.\n\t\t\t\t') AS `last_check`, '.\n\t\t\t\t'IF('.\n\t\t\t\t\t'`last_online`=\\'0000-00-00 00:00:00\\', '.\n\t\t\t\t\t'\\'never\\', '.\n\t\t\t\t\t'DATE_FORMAT(`last_online`, \\'%d-%m-%y %H:%i\\') '.\n\t\t\t\t') AS `last_online`, '.\n\t\t\t\t'`active`, '.\n\t\t\t\t'`email`, '.\n\t\t\t\t'`sms` '.\n\t\t\t'FROM `'.SM_DB_PREFIX.'servers` '.\n\t\t\t'ORDER BY `active` ASC, `status` DESC, `type` ASC, `label` ASC'\n\t\t);\n\n\t\t$server_count = count($servers);\n\n\t\tfor ($x = 0; $x < $server_count; $x++) {\n\t\t\t$servers[$x]['class'] = ($x & 1) ? 'odd' : 'even';\n\t\t\t$servers[$x]['rtime'] = round((float) $servers[$x]['rtime'], 4);\n\n\t\t\tif($servers[$x]['type'] == 'website') {\n\t\t\t\t// add link to label\n\t\t\t\t$servers[$x]['ip'] = '<a href=\"'.$servers[$x]['ip'].'\" target=\"_blank\">'.$servers[$x]['ip'].'</a>';\n\t\t\t}\n\t\t}\n\t\t// add servers to template\n\t\t$this->tpl->addTemplateDataRepeat($this->getTemplateId(), 'servers', $servers);\n\n\t\t// check if we need to add the auto refresh\n\t\t$auto_refresh = sm_get_conf('auto_refresh_servers');\n\t\tif(intval($auto_refresh) > 0) {\n\t\t\t// add it\n\t\t\t$this->tpl->newTemplate('main_auto_refresh', 'main.tpl.html');\n\t\t\t$this->tpl->addTemplateData('main_auto_refresh', array('seconds' => $auto_refresh));\n\t\t\t$this->tpl->addTemplateData('main', array('auto_refresh' => $this->tpl->getTemplate('main_auto_refresh')));\n\t\t}\n\n\t}", "title": "" }, { "docid": "558a1ff90bbd60f3068650d589a2252c", "score": "0.5058522", "text": "function createList () {\r\n createLists($_POST);\r\n render('main/listCreate');\r\n }", "title": "" }, { "docid": "a1b78f87defef5a6e6b777778d9c410c", "score": "0.50526035", "text": "public function getLists()\n\t{\n\t\t// sends $_SESSION['user']['id'] to the getLists function in Dashboard_model (model) and sets is to the $lists variable\n\t\t$lists = (array)$this->dashboard->getLists($_SESSION['user']['id']);\n\n\t\t// loops through all lists\n\t\tfor($i = 0; $i < count($lists); $i++)\n\t\t{\n\t\t\t// sets specific list to $list variable\n\t\t\t$list = (array)$lists[$i];\n\n\t\t\t// sends $list['id'] to the getItems function in Dashboard_model (model) and sets is to the $list['content'] variable\n\t\t\t$list['content'] = $this->dashboard->getItems($list['id']);\n\n\t\t\t// sets list to $list\n\t\t\t$lists[$i] = $list;\n\t\t}\n\t\techo json_encode($lists);\n\t}", "title": "" }, { "docid": "69974cca0613fb9c8ca0607ca8f1e228", "score": "0.50469303", "text": "function render_list($list) {\n $s = '<ul>';\n foreach($list as $i) {\n $s .= \"<li>$i</li>\";\n }\n $s .= '</ul>';\n return $s;\n }", "title": "" }, { "docid": "9673fad4d084ef7f9e541c8539ff46ac", "score": "0.5036106", "text": "public function testCreateImportedList()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "0dc3c89e6919c042fe5eb40569a31650", "score": "0.50265145", "text": "function getLists()\n {\n $comList[] = JHTML::_('select.option', '', JText::_('COM_SEF_ALL'));\n $comList[] = JHTML::_('select.option', '-', JText::_('COM_SEF_LOGS_EMPTY'));\n $rows = SEFTools::getInstalledComponents();\n foreach(array_keys($rows) as $i) {\n $row = &$rows[$i];\n $comList[] = JHTML::_('select.option', $row->option, $row->name );\n }\n $lists['comList'] = JHTML::_( 'select.genericlist', $comList, 'comFilter', \"class=\\\"inputbox\\\" onchange=\\\"document.adminForm.submit();\\\" size=\\\"1\\\"\", 'value', 'text', $this->filterComponent);\n \n // make the filter text boxes\n $lists['filterMessage'] = \"<input type=\\\"text\\\" name=\\\"filterMessage\\\" value=\\\"{$this->filterMessage}\\\" size=\\\"40\\\" maxlength=\\\"255\\\" onkeydown=\\\"return handleKeyDown(event);\\\" />\";\n $lists['filterPage'] = \"<input type=\\\"text\\\" name=\\\"filterPage\\\" value=\\\"{$this->filterPage}\\\" size=\\\"40\\\" maxlength=\\\"255\\\" onkeydown=\\\"return handleKeyDown(event);\\\" />\";\n $lists['filterUrl'] = \"<input type=\\\"text\\\" name=\\\"filterUrl\\\" value=\\\"{$this->filterUrl}\\\" size=\\\"40\\\" maxlength=\\\"255\\\" onkeydown=\\\"return handleKeyDown(event);\\\" />\";\n \n // Reset button\n $lists['filterReset'] = '<input type=\"button\" value=\"'.JText::_('COM_SEF_RESET').'\" onclick=\"resetFilters();\" />';\n \n // Ordering\n $lists['filter_order'] = $this->filterOrder;\n $lists['filter_order_Dir'] = $this->filterOrderDir;\n \n return $lists;\n }", "title": "" }, { "docid": "06b829a1b2e57037fe7833f8c14d1b25", "score": "0.50245464", "text": "public function setUp()\r\n {\r\n $this->list = new TechDivision_Collections_ArrayList();\r\n $this->list->add(\"Albert\");\r\n $this->list->add(\"Dodo\");\r\n $this->list->add(\"Franz\");\r\n\t\t$this->list->add(\"Adolf\");\r\n\t\t$this->list->add(\"Caesar\");\r\n\t\t$this->list->add(\"Zacharias\");\r\n\t\t$this->list->add(\"Julius\");\r\n }", "title": "" }, { "docid": "dd9eb6c74fa739ee786825fdcc4f3851", "score": "0.50226015", "text": "public function makeList($attributes): string {\n $settings = shortcode_atts([\n 'columns' => 'first,last',\n 'list' => ''\n ], $attributes);\n\n $members = json_decode($this->getOption('members', '[]'), true);\n $addMembers = explode(',', $this->getOption('additional', ''));\n $hasAddMembers = !empty($addMembers);\n if($hasAddMembers && !$addMembers[0]) {\n array_shift($addMembers);\n $hasAddMembers = count($addMembers) > 0;\n }\n if(empty($members) && !$hasAddMembers) {\n return '<p>Keine Mitglieder!</p>';\n }\n else if($hasAddMembers) {\n sort($addMembers);\n }\n\n $indexOffset = $this->getOption('admin', false) ? 1 : 0;\n\n $columns = array_map(function($i) {\n return trim($i);\n }, explode(',', $settings['columns']));\n if(empty($settings['list'])) {\n $html = '<table><thead>';\n foreach($columns as $c) {\n $html .= '<th>'.self::COLUMN_NAMES[$c].'</th>';\n }\n $html .= '</thead><tbody>';\n foreach($members as $m) {\n $html .= '<tr>';\n foreach($columns as $c) {\n $html .= '<td>'.$m[self::ATTR_TO_INDEX[$c] + $indexOffset].'</td>';\n }\n $html .= '</tr>';\n }\n $html .= '</tbody></table>';\n }\n else {\n $html = '<ul>';\n foreach($members as $m) {\n $val = '';\n foreach($columns as $c) {\n $val .= $m[self::ATTR_TO_INDEX[$c] + $indexOffset].' ';\n }\n if($hasAddMembers && strcmp($val, $addMembers[0]) > 0) {\n $html .= '<li>';\n $html .= array_shift($addMembers);\n $html .= '</li>';\n }\n $html .= '<li>';\n $html .= $val;\n $html .= '</li>';\n }\n }\n return $html;\n }", "title": "" }, { "docid": "8ce63b55a3669690ed70bfe951efb3cc", "score": "0.50175005", "text": "function factory($query, $rowsPerPage = 30, $listName = null, $debug = false, $class = null)\n { if(!$class)\n {\n // ----- EXTENSION POINT\n $class = rex_register_extension_point('REX_LIST_CLASSNAME', 'rex_xform_list',\n array(\n 'query' => $query,\n 'rowsPerPage' => $rowsPerPage,\n 'listName' => $listName,\n 'debug' => $debug\n )\n );\n }\n \n return new $class($query, $rowsPerPage, $listName, $debug);\n }", "title": "" }, { "docid": "7837c90d8247f56ef1dd2faf1ca49dbe", "score": "0.50156736", "text": "function makeList($array, $ulroot= 'root', $ulprefix= 'sub_', $type= '', $ordered= false, $tablevel= 0) {\n if (!is_array($array)) {\n return \"<ul><li>Bad list</li></ul>\";\n }\n if (!empty ($type)) {\n $typestr= \" style='list-style-type: $type'\";\n } else {\n $typestr= \"\";\n }\n $tabs= \"\";\n for ($i= 0; $i < $tablevel; $i++) {\n $tabs .= \"\\t\";\n }\n $listhtml= $ordered == true ? $tabs . \"<ol class='$ulroot'$typestr>\\n\" : $tabs . \"<ul class='$ulroot'$typestr>\\n\";\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n $listhtml .= $tabs . \"\\t<li>\" . $key . \"\\n\" . $this->makeList($value, $ulprefix . $ulroot, $ulprefix, $type, $ordered, $tablevel +2) . $tabs . \"\\t</li>\\n\";\n } else {\n $listhtml .= $tabs . \"\\t<li>\" . $value . \"</li>\\n\";\n }\n }\n $listhtml .= $ordered == true ? $tabs . \"</ol>\\n\" : $tabs . \"</ul>\\n\";\n return $listhtml;\n }", "title": "" }, { "docid": "bb101a95994e4f216ca908df05a623f9", "score": "0.500881", "text": "function show_list()\n\t{\n\t\t$this->tpl->set_var('list_headers', '');\n\t\t$this->tpl->set_var('list_rows', '');\n\n\t\t// get controls that will be present in the list\n\t\t$columns = array();\n\t\tfor ($i = 0; isset($this->controls[$i]); $i++)\n\t\t{\n\t\t\tif ($this->controls[$i]->list)\n\t\t\t{\n\t\t\t\t$columns[] = & $this->controls[$i];\n\t\t\t}\n\t\t}\n\n\t\t// generate headers row\n\t\tfor ($i = 0; isset($columns[$i]); $i++)\n\t\t{\n\n\t\t\t$this->tpl->set_var('name', $columns[$i]->get_header());\n\t\t\tif ($columns[$i]->order)\n\t\t\t{\n\t\t\t\t$this->tpl->set_var('order_up_str', $columns[$i]->order_desc);\n\t\t\t\t$this->tpl->process('order_up', 'order_up_block');\n\t\t\t\t$this->tpl->set_var('order_down_str', $columns[$i]->order_asc);\n\t\t\t\t$this->tpl->process('order_down', 'order_down_block');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->tpl->set_var('order_up', '');\n\t\t\t\t$this->tpl->set_var('order_down', '');\n\t\t\t}\n\t\t\t$this->tpl->set_var('header_params', $columns[$i]->get_header_params());\n\t\t\t$this->tpl->process('list_headers', 'list_header', 0, 0, 1);\n\t\t}\n\n\t\t// process rows\n\t\tfor ($index = 0; $row = $this->get_row($index); $index++)\n\t\t{\n\t\t\t$this->tpl->drop_var('list_cells');\n\n\t\t\t$this->tpl->set_var('style', $index % 2);\n\t\t\tfor ($i = 0; isset($columns[$i]); $i++)\n\t\t\t{\n\t\t\t\t$this->tpl->set_var('item', $columns[$i]->show_list());\n\t\t\t\t$this->tpl->set_var('list_params', $columns[$i]->get_list_params());\n\t\t\t\t$this->tpl->process('list_cells', 'list_cell', 0, 0, 1);\n\t\t\t}\n\n\t\t\t$this->tpl->process('list_rows', 'list_row', 0, 0, 1);\n\t\t}\n\t\t$this->tpl->set_var('navigator', $this->show_navigator());\n\t\t$this->tpl->set_var('list_actions', $this->show_action_list());\n\n\t\t$this->tpl->set_var('table_inner_name', get_class($this));\n\n\t\treturn $this->tpl->process('temp', 'list_form');\n\t}", "title": "" }, { "docid": "5f8505da6f57b7da8a75cd301ba23f0e", "score": "0.5006758", "text": "public function createList(Order $order, Cart $cart, $id_order_state, $product_list, $id_order_invoice = 0, $use_taxes = true, $id_warehouse = 0)\n {\n }", "title": "" }, { "docid": "df1eff4b01bae5d612d8d233f79b631e", "score": "0.49995112", "text": "function MakeList(array $data)\n{\n global $Status;\n $string = \"<ol>\";\n for ($I = 0; $I < count($data); $I++ )\n {\n $string .= \"<li> {$data[$I]}</li>\"; \n }\n $string .= \"</ul>\";\n $Status[\"list\"] =TRUE;\n return $string;\n\n}", "title": "" }, { "docid": "1388a15289d26c889b127ed6472932f0", "score": "0.49971706", "text": "public function construct()\r\n\t{\r\n\r\n\r\n\t\t$this->generateDCA('listItems', array\r\n\t\t(\r\n\t\t\t'inputType' \t=>\t'listWizard',\r\n\t\t\t'label'\t\t\t=>\tarray($this->label, $this->description),\r\n\t\t\t'eval'\t\t\t=>\tarray\r\n\t\t\t(\r\n\t\t\t\t'mandatory'\t\t=>\t($this->mandatory) ? true : false, \r\n\t\t\t\t'allowHtml'\t\t=>\ttrue,\r\n\t\t\t\t'tl_class'\t\t=>\t'clr'\r\n\t\t\t),\r\n\t\t\t'xlabel' => array\r\n\t\t\t(\r\n\t\t\t\tarray('tl_content', 'listImportWizard')\r\n\t\t\t),\r\n\r\n\t\t));\r\n\t\t\r\n\t}", "title": "" }, { "docid": "ac25d6a7d1ed62da2ad75161aa370d19", "score": "0.49823093", "text": "private function do_lists($text) {\n $less_than_tab = $this->tab_width - 1;\n\n // Re-usable patterns to match list item bullets and number markers\n $marker_ul_regex = '[*+-]';\n $marker_ol_regex = '\\d+[\\.]';\n\n $markers_relist = array(\n $marker_ul_regex => $marker_ol_regex,\n $marker_ol_regex => $marker_ul_regex,\n );\n\n foreach ($markers_relist as $marker_regex => $other_marker_regex) {\n // Re-usable pattern to match any entirel ul or ol list\n $whole_list_re = '\n ( # $1 = whole list\n ( # $2\n ([ ]{0,'.$less_than_tab.'}) # $3 = number of spaces\n ('.$marker_regex.') # $4 = first list item marker\n [ ]+\n )\n (?s:.+?)\n ( # $5\n \\z\n |\n \\n{2,}\n (?=\\S)\n (?! # Negative lookahead for another list item marker\n [ ]*\n '.$marker_regex.'[ ]+\n )\n |\n (?= # Lookahead for another kind of list\n \\n\n \\3 # Must have the same indentation\n '.$other_marker_regex.'[ ]+\n )\n )\n )\n '; // mx\n \n // We use a different prefix before nested lists than top-level lists.\n // See extended comment in process_list_items().\n\n if ($this->list_level) {\n $text = preg_replace_callback('{\n ^\n '.$whole_list_re.'\n }mx', \n // An anonymous function as callback from PHP 5.3.0\n // But $this can be used in anonymous functions from PHP 5.4.0\n // We have to use the old-fashioned callback here\n array($this, 'do_lists_callback'), \n $text\n );\n } else {\n $text = preg_replace_callback(\n '{\n (?:(?<=\\n)\\n|\\A\\n?) # Must eat the newline\n '.$whole_list_re.'\n }mx', \n // An anonymous function as callback from PHP 5.3.0\n // But $this can be used in anonymous functions from PHP 5.4.0\n // We have to use the old-fashioned callback here\n array($this, 'do_lists_callback'), \n $text\n );\n }\n }\n\n return $text;\n }", "title": "" }, { "docid": "d53a47ae59346c54aa796d9d8fb1da5b", "score": "0.4981417", "text": "public function __construct ($list_name, \\Thybag\\SharePointAPI $api) {\n\t\t$this->list_name = $list_name;\n\t\t$this->api = $api;\n\t}", "title": "" }, { "docid": "fdda3f50d3f086ac308c92d3c3f85b99", "score": "0.49745423", "text": "public function __construct(CheckList $checklist, $inputs = array())\n {\n $this->inputs = $inputs;\n $this->checklist = $checklist;\n }", "title": "" }, { "docid": "47e53b1510237211bb36792b0b56435d", "score": "0.4967681", "text": "function __construct() {\n parent::__construct();\n $this->setTagName('ul');\n }", "title": "" }, { "docid": "744768eb866f5ce79bed6a3a9bd3c2e4", "score": "0.49647176", "text": "public function getListOfModelsReturnsInstanceOfList() {\n\t\t$this->assertTrue(\n\t\t\t$this->subject->getListOfModels(array(array('uid' => 1)))\n\t\t\t\tinstanceof Tx_Oelib_List\n\t\t);\n\t}", "title": "" }, { "docid": "015efd4a2ec533d0e6b9483286c2ead8", "score": "0.49631122", "text": "public function getLists( )\n\t{\n\t\t//\tprint \"Hello from JoomoogalleryModelJoomoogallery::getLists()<br />\\n\";\n\n\t\t$this->_setupPageidFiltering( );\n\t\t$this->_setupCommentsFlagFiltering( );\n\t\t$this->_setupRatingFlagFiltering( );\n\t\tparent::getLists();\n\n\t\treturn $this->_lists;\n\t}", "title": "" }, { "docid": "ad0360b225311cde7d175871b3fd7ef6", "score": "0.49400273", "text": "public function isList(): bool;", "title": "" }, { "docid": "2de2af13451b6e97a9f4bd5a0e707902", "score": "0.4920561", "text": "public function created(Lists $lists)\n {\n //\n }", "title": "" }, { "docid": "2f5de0e663de0606aa84f0f0a99be994", "score": "0.49168912", "text": "static function list(array $items, callable $format_cb,\r\n\t\tstring $outer_tag='ul', string $list_class='',\r\n\t\tstring $item_class=''): string {\r\n\r\n\t\t// Get a string of <li> s\r\n\t\t$items_html = '';\r\n\t\tforeach($items as $item) {\r\n\t\t\t$items_html .= sprintf('<li class=\"%s\">%s</li>', $item_class,\r\n\t\t\t\tcall_user_func($format_cb, $item));\r\n\t\t}\r\n\r\n\t\t// Wrap them in an outer list\r\n\t\t$html = sprintf('<%1$s class=\"%2$s\">%3$s</%1$s>',\r\n\t\t\t$outer_tag, $list_class, $items_html);\r\n\r\n\t\treturn $html;\r\n\t}", "title": "" }, { "docid": "a52818d9d7adf840d7bb26f5aa13c781", "score": "0.49109587", "text": "public function create(\n string $listName,\n array $addresses,\n Config $config,\n OutputInterface $output\n ): MailingListInterface {\n return new $this->class($listName, $addresses, $config, $output);\n }", "title": "" }, { "docid": "fee49c20749aeb868e5e47560efe3c91", "score": "0.49064353", "text": "public function listIterator();", "title": "" }, { "docid": "425ccda2e45cd16e305ab6fafadb76a6", "score": "0.48980314", "text": "public static function sub_list(array $options) {\n global $indicia_templates;\n self::add_resource('sub_list');\n // Unique ID for all sublists.\n static $sub_list_idx = 0;\n // Checks essential options, uses fieldname as id default and loads\n // defaults if error or edit.\n $options = self::check_options($options);\n $options = array_merge([\n 'allowTermCreation' => FALSE,\n 'autocompleteControl' => 'autocomplete',\n 'subListAdd' => '',\n ], $options);\n if ($options['autocompleteControl'] !== 'species_autocomplete') {\n $options = array_merge([\n 'table' => 'termlists_term',\n 'captionField' => 'term',\n 'valueField' => 'id',\n ], $options);\n }\n // This control submits many values with the same control name so add [] to\n // fieldname so PHP puts multiple submitted values in an array.\n if (substr($options['fieldname'], -2) !== '[]') {\n $options['fieldname'] .= '[]';\n }\n if ($options['allowTermCreation'] && $options['table'] === 'termlists_term'\n && isset($options['extraParams']) && isset($options['extraParams']['termlist_id'])) {\n // Add a hidden input to store the language so new terms can be created.\n $lang = iform_lang_iso_639_2(hostsite_get_user_field('language'));\n $options['subListAdd'] = \"<input name=\\\"$options[id]:allowTermCreationLang\\\" type=\\\"hidden\\\" value=\\\"$lang\\\" />\";\n }\n // Prepare embedded search control for add bar panel.\n $ctrlOptions = $options;\n unset($ctrlOptions['helpText']);\n $ctrlOptions['id'] = \"$ctrlOptions[id]:search\";\n $ctrlOptions['fieldname'] = $ctrlOptions['id'];\n $ctrlOptions['default'] = '';\n $ctrlOptions['lockable'] = NULL;\n $ctrlOptions['label'] = NULL;\n $ctrlOptions['controlWrapTemplate'] = 'justControl';\n $ctrlOptions['afterControl'] = str_replace(\n [\n '{id}',\n '{title}',\n '{class}',\n '{caption}',\n ],\n [\n \"$options[id]:add\",\n lang::get('Add the chosen term to the list.'),\n \" class=\\\"$indicia_templates[buttonDefaultClass]\\\"\",\n lang::get('Add'),\n ],\n $indicia_templates['button']);\n\n '<input id=\"{id}:add\" type=\"button\" value=\"' . lang::get('add') . '\" />';\n if (!empty($options['selectMode']) && $options['selectMode']) {\n $ctrlOptions['selectMode'] = TRUE;\n }\n // Set up add panel.\n $control = $options['autocompleteControl'];\n $options['panel_control'] = self::$control($ctrlOptions);\n\n // Prepare other main control options.\n $options['inputId'] = \"$options[id]:$options[captionField]\";\n $options = array_merge([\n 'template' => 'sub_list',\n // Escape the ids for jQuery selectors.\n 'escaped_input_id' => self::jq_esc($options['inputId']),\n 'escaped_id' => self::jq_esc($options['id']),\n 'escaped_captionField' => self::jq_esc($options['captionField'])\n ], $options);\n $options['idx'] = $sub_list_idx;\n // Set up javascript.\n self::$javascript .= <<<JS\nindiciaFns.initSubList('$options[escaped_id]', '$options[escaped_captionField]',\n '$options[fieldname]', '$indicia_templates[sub_list_item]');\n\nJS;\n // Load any default values for list items into display and hidden lists.\n $items = \"\";\n $r = '';\n if (array_key_exists('default', $options) && is_array($options['default'])) {\n foreach ($options['default'] as $item) {\n $items .= str_replace(['{caption}', '{value}', '{fieldname}'],\n [$item['caption'], $item['default'], $item['fieldname']],\n $indicia_templates['sub_list_item']\n );\n // A hidden input to put a blank in the submission if it is deleted.\n $r .= \"<input type=\\\"hidden\\\" value=\\\"\\\" name=\\\"$item[fieldname]\\\">\";\n }\n }\n $options['items'] = $items;\n\n // Layout the control.\n $r .= self::apply_template($options['template'], $options);\n $sub_list_idx++;\n return $r;\n }", "title": "" }, { "docid": "50b4937f88d680c200d5ebb973e863e7", "score": "0.489174", "text": "public function listType($value = null)\n {\n if (null !== $value) {\n $this->setParam('ListType', (string) substr($value, 0, 10));\n\n return $this;\n }\n $this->getParam('ListType');\n }", "title": "" }, { "docid": "b42d34456a6e220e20434e9462209cb4", "score": "0.48796865", "text": "public function renderList() {\r\r\n if (!($this->fields_list && is_array($this->fields_list))) {\r\r\n return false;\r\r\n }\r\r\n $this->getList($this->context->language->id);\r\r\n\r\r\n $helper = new Inix2HelperList();\r\r\n\r\r\n // Empty list is ok\r\r\n if (!is_array($this->_list)) {\r\r\n $this->displayWarning($this->l(\r\r\n 'Bad SQL query', 'Helper'\r\r\n ) . '<br />' . htmlspecialchars($this->_list_error));\r\r\n\r\r\n return false;\r\r\n }\r\r\n\r\r\n $this->setHelperDisplay($helper);\r\r\n $helper->module = $this->module;\r\r\n if(isset($this->_default_pagination)){\r\r\n $helper->_default_pagination = $this->_default_pagination;\r\r\n } \r\r\n $helper->_pagination = $this->_pagination;\r\r\n\r\r\n $helper->tpl_vars = $this->tpl_list_vars;\r\r\n $helper->tpl_delete_link_vars = $this->tpl_delete_link_vars;\r\r\n\r\r\n // For compatibility reasons, we have to check standard actions in class attributes\r\r\n foreach ($this->actions_available as $action) {\r\r\n if (!in_array($action, $this->actions) && isset($this->$action) && $this->$action) {\r\r\n $this->actions[] = $action;\r\r\n }\r\r\n }\r\r\n $helper->is_cms = $this->is_cms;\r\r\n $list = $helper->generateList($this->_list, $this->fields_list);\r\r\n\r\r\n return $list;\r\r\n }", "title": "" }, { "docid": "11ebf09fd0031aa4949f2047347a362b", "score": "0.4879167", "text": "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"view\"\r\n\t\t$item = &$this->ListOptions->Add(\"view\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanView();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"edit\"\r\n\t\t$item = &$this->ListOptions->Add(\"edit\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanEdit();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"copy\"\r\n\t\t$item = &$this->ListOptions->Add(\"copy\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanAdd();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"delete\"\r\n\t\t$item = &$this->ListOptions->Add(\"delete\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanDelete();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "title": "" }, { "docid": "1b9f84f180c1ba1b0b9fda89cd1c6136", "score": "0.48772603", "text": "public function __construct()\n {\n $listings = new ArrayCollection();\n parent::__construct();\n\n }", "title": "" }, { "docid": "99da521a6c3e15e5d06affc67a2197c2", "score": "0.4876289", "text": "public function ToList()\n\t {\n\t \t\n\t }", "title": "" }, { "docid": "c37a8cfea99152744e744d4af4a86cb4", "score": "0.4855491", "text": "function WDF_Fundraisers_List() {\r\n\t\tparent::__construct( false, __('Fundraisers List','wdf'), array(\r\n\t\t\t'description' => __('Choose a list of simple fundraiser links you wish to display.','wdf')\r\n\t\t) );\r\n\t}", "title": "" }, { "docid": "a9daf845f26e53b51fff1ec57dfcc0c1", "score": "0.48435587", "text": "public function __construct($userID = null, $name = null, $listID = null) {\n if ($name) {\n \t $this->db = new Database();\n \t // Create list item\n $stmt = $this->db->prepare(\"INSERT INTO lists VALUES (NULL, :name)\");\n $stmt->bindValue(\":name\", $name, SQLITE3_TEXT);\n $stmt->execute();\n // Grab created list ID\n $listID = $this->db->lastRowID();\n // Now link it to the given userID\n $stmt = $this->db->prepare(\"INSERT INTO userlists VALUES (:userID, :listID)\");\n $stmt->bindValue(\":userID\", $userID, SQLITE3_INTEGER);\n $stmt->bindValue(\":listID\", $listID, SQLITE3_INTEGER);\n $stmt->execute();\n $this->listID = $listID;\n } else { // Assumes listID was given\n $this->db = new Database();\n $this->listID = $listID;\n }\n }", "title": "" }, { "docid": "f30e5a628040b65221ff737aff320a99", "score": "0.4840095", "text": "function ManageLists()\n\t{\n\t\t$session = &GetSession();\n\t\t$user = $session->Get('UserDetails');\n\t\t$perpage = $this->GetPerPage();\n\n\t\t$DisplayPage = $this->GetCurrentPage();\n\t\t$start = ($DisplayPage - 1) * $perpage;\n\n\t\t$sortinfo = $this->GetSortDetails();\n\n\t\t$all_lists = $user->GetLists();\n\t\t$check_lists = array_keys($all_lists);\n\n\t\t$listapi = $this->GetApi('Lists');\n\n\t\t$NumberOfLists = count($check_lists);\n\n\t\t// if we're a list admin, no point checking the lists - we have access to everything.\n\t\tif ($user->ListAdmin()) {\n\t\t\t$check_lists = null;\n\t\t}\n\n\t\t$mylists = $listapi->GetLists($check_lists, $sortinfo, false, $start, $perpage);\n\n\t\t$GLOBALS['Lists_AddButton'] = '';\n\n\t\tif ($user->CanCreateList() === true) {\n\t\t\t$GLOBALS['Lists_AddButton'] = $this->ParseTemplate('List_Create_Button', true, false);\n\t\t\t$GLOBALS['Lists_Heading'] = GetLang('Help_ListsManage_HasAccess');\n\t\t}\n\n\t\tif (!isset($GLOBALS['Message'])) {\n\t\t\t$GLOBALS['Message'] = '';\n\t\t}\n\n\t\tif ($NumberOfLists == 0) {\n\t\t\t$GLOBALS['Intro'] = GetLang('ListsManage');\n\t\t\tif ($user->CanCreateList() === true) {\n\t\t\t\t$GLOBALS['Message'] .= $this->PrintSuccess('NoLists', GetLang('ListCreate'));\n\t\t\t} else {\n\t\t\t\t$GLOBALS['Message'] .= $this->PrintSuccess('NoLists', GetLang('ListAssign'));\n\t\t\t}\n\t\t\t$this->ParseTemplate('Lists_Manage_Empty');\n\t\t\treturn;\n\t\t}\n\n\t\t$this->SetupPaging($NumberOfLists, $DisplayPage, $perpage);\n\t\t$GLOBALS['FormAction'] = 'Action=ProcessPaging';\n\t\t$paging = $this->ParseTemplate('Paging', true, false);\n\n\t\tif ($user->HasAccess('Lists', 'Delete')) {\n\t\t\t$GLOBALS['Option_DeleteList'] = '<option value=\"Delete\">' . GetLang('Delete') . '</option>';\n\t\t}\n\n\t\tif ($user->HasAccess('Subscribers', 'Delete')) {\n\t\t\t$GLOBALS['Option_DeleteSubscribers'] = '<option value=\"DeleteAllSubscribers\">' . GetLang('DeleteAllSubscribers') . '</option>';\n\t\t}\n\n\t\t$template = $this->ParseTemplate('Lists_Manage', true, false);\n\n\t\t$listdetails = '';\n\n\t\tforeach ($mylists as $pos => $listinfo) {\n\t\t\t$GLOBALS['Name'] = htmlspecialchars($listinfo['name'], ENT_QUOTES, SENDSTUDIO_CHARSET);\n\t\t\t$GLOBALS['Created'] = $this->PrintDate($listinfo['createdate']);\n\n\t\t\t$GLOBALS['SubscriberCount'] = $this->FormatNumber($listinfo['subscribecount']);\n\n\t\t\t$GLOBALS['ListAction'] = '';\n\n\t\t\tif ($user->HasAccess('Lists', 'Edit', $listinfo['listid'])) {\n\t\t\t\t$GLOBALS['EditListID'] = $listinfo['listid'];\n\t\t\t\t$GLOBALS['ListAction'] .= $this->ParseTemplate('Lists_Manage_EditLink', true, false);\n\t\t\t} else {\n\t\t\t\t$GLOBALS['ListAction'] .= $this->DisabledItem('Edit');\n\t\t\t}\n\n\t\t\t# this checks whether the user is an admin or list admin, so we don't need to.\n\t\t\t$create_list = $user->CanCreateList();\n\t\t\tif ($create_list === true) {\n\t\t\t\t$GLOBALS['CopyListID'] = $listinfo['listid'];\n\t\t\t\t$GLOBALS['ListAction'] .= $this->ParseTemplate('Lists_Manage_Copy', true, false);\n\t\t\t} else {\n\t\t\t\tif ($create_list === false) {\n\t\t\t\t\t$itemtitle = 'ListCopyDisabled';\n\t\t\t\t} else {\n\t\t\t\t\t$itemtitle = 'ListCopyDisabled_TooMany';\n\t\t\t\t}\n\t\t\t\t$GLOBALS['ListAction'] .= $this->DisabledItem('Copy', $itemtitle);\n\t\t\t}\n\n\t\t\tif ($user->HasAccess('Lists', 'Delete', $listinfo['listid'])) {\n\t\t\t\t$GLOBALS['DeleteListID'] = $listinfo['listid'];\n\t\t\t\t$GLOBALS['ListAction'] .= $this->ParseTemplate('Lists_Manage_DeleteLink', true, false);\n\t\t\t} else {\n\t\t\t\t$GLOBALS['ListAction'] .= $this->DisabledItem('Delete');\n\t\t\t}\n\n\t\t\t$GLOBALS['List'] = $listinfo['listid'];\n\n\t\t\t$listdetails .= $this->ParseTemplate('Lists_Manage_Row', true, false);\n\t\t}\n\t\t$template = str_replace('%%TPL_Lists_Manage_Row%%', $listdetails, $template);\n\t\t$template = str_replace('%%TPL_Paging%%', $paging, $template);\n\t\t$template = str_replace('%%TPL_Paging_Bottom%%', $GLOBALS['PagingBottom'], $template);\n\t\techo $template;\n\t}", "title": "" }, { "docid": "1392973f8ed22ef28c6b3c60b1b9e0d0", "score": "0.48398024", "text": "function setListName($list) {\n\t\t$this->_list =& $list;\n\t}", "title": "" }, { "docid": "27b28acd3d90fcb26e036379e039010b", "score": "0.48394418", "text": "abstract protected function printList();", "title": "" }, { "docid": "f095daaee05f22f61d4a95050343901f", "score": "0.4838878", "text": "function __construct() {\n\n\t\tparent::__construct(get_class());\n\n\n\t\t// itemtype database\n\t\t$this->db = SITE_DB.\".item_todolist\";\n\n\t\t// Name\n\t\t$this->addToModel(\"name\", array(\n\t\t\t\"type\" => \"string\",\n\t\t\t\"label\" => \"Name\",\n\t\t\t\"required\" => true,\n\t\t\t\"unique\" => $this->db,\n\t\t\t\"hint_message\" => \"Name of the list\", \n\t\t\t\"error_message\" => \"List name must be unique\"\n\t\t));\n\n\t\t// Class\n\t\t$this->addToModel(\"classname\", array(\n\t\t\t\"type\" => \"string\",\n\t\t\t\"label\" => \"CSS Class for list\",\n\t\t\t\"hint_message\" => \"CSS class for custom styling. If you don't know what this is, just leave it empty\"\n\t\t));\n\n\t\t// Description\n\t\t$this->addToModel(\"description\", array(\n\t\t\t\"type\" => \"text\",\n\t\t\t\"label\" => \"Short SEO description\",\n\t\t\t\"max\" => 155,\n\t\t\t\"hint_message\" => \"Write a short description of the TODO list for SEO and listings.\",\n\t\t\t\"error_message\" => \"Your TODO list needs a description – max 155 characters.\"\n\t\t));\n\n\t}", "title": "" }, { "docid": "22460eac1bc1c1b655d1eff51ac6a5d8", "score": "0.4834984", "text": "public function createList() {\n\n\t\t# check to see if we have the required fields\n\t\tif (!isset($_POST['listName'])) {\n\t\t\treturn apiErrorResponse('insufficientArguments');\n\t\t}\n\n\t\t# make the call to create the form\n\t\t$result = $this->mailer->createList($_POST['listName']);\n\n\t\t# if we get a successful response back from the Mail API\n\t\tif ($result->http_status_code == 201) {\n\t\t\treturn apiSuccessResponse('ok', ['listId' => $result->response]);\n\t\t}\n\n\t\t# otherwise its failed for some reason. So report it\n\t\treturn apiErrorResponse('unprocessable', [\n\t\t\t'furtherResponseCode' => $result->response->Code,\n\t\t\t'furtherResponseMsg' => $result->response->Message,\n\t\t]);\n\t}", "title": "" }, { "docid": "96118056b4ed12b5c03daffc966b7483", "score": "0.48338845", "text": "protected function makeItems($listitems, $special, $default){\n \n $temp_array = array();\n // loop though the list items\n foreach($listitems as $id => $value){\n \n // presume that the type is the default\n $item_type = $default;\n \n // test the above presumption-\n \n // if the special arg is not false.\n if($special){ \n // if this id also appears on the special array, use this value\n if(isset($special[$id])){ $item_type = $special[$id];}\n }\n \n // make the list item. This could be it's own thing, and should be for\n // strict OOP, but that's beyond the scope of this job\n \n if($item_type == 'text'){\n $cellName = $this->_formName . '[' . $id . ']['. $this->_fieldname .']';\n $list_item = new ListItem($cellName, $value);\n $list_item->addButton($this->_formName, $id, \"edit\", \"glyphicon-cog\",\n $text=false, $active=false, $this->_fieldname);\n }\n \n if($item_type == 'edit'){\n $cellName = $this->_formName . '[' . $id . ']['. $this->_fieldname .']';\n $list_item = new ListText($cellName, $value, $type=\"value\");\n $list_item->addButton($this->_formName, $id, \"drop\", \"Drop\",\n $text=true, $active=false, $this->_fieldname);\n }\n \n if($item_type == 'new') {\n $cellName = $this->_formName . '[' . $id . ']['. $this->_fieldname .']';\n $list_item = new ListText('blankItem', 'Add new item', $type=\"placeholder\");\n $list_item->disabled();\n $list_item->addButton($this->_formName, $id, \"add\", \"glyphicon-plus\",\n $text=false, $active=true, $this->_fieldname);\n }\n \n $temp_array[$id] = $list_item;\n }\n \n return $temp_array;\n }", "title": "" }, { "docid": "2a4cfb0dbd1121c7b1244b69a8201d3b", "score": "0.48284683", "text": "function op_LIST($value, &$stream, $stack, $memo, $debug, $mapper)\n\t\t{\n\t\t\t$stream->write($mapper->str2bin(\"LIST\"));\n\t\t\t\n\n\t\t}", "title": "" }, { "docid": "b68d514cdf9f845139c56d3cab99603f", "score": "0.4823863", "text": "public function create(): ContactListInterface;", "title": "" }, { "docid": "3727d0015223abc558724259d2fa007d", "score": "0.47984508", "text": "public function __construct($shoppingCartID = null, $creationDate = null, \\StructType\\BookingScList $bookingList = null, \\StructType\\AddonList $addonList = null, \\StructType\\CommentList $commentList = null)\n {\n $this\n ->setShoppingCartID($shoppingCartID)\n ->setCreationDate($creationDate)\n ->setBookingList($bookingList)\n ->setAddonList($addonList)\n ->setCommentList($commentList);\n }", "title": "" }, { "docid": "1ce3e7dc04756618ca583caa78e0f1b9", "score": "0.47958028", "text": "function __construct() {\n $this->head = new LinkedNode(0);\n $this->tail = $this->head->next;\n }", "title": "" }, { "docid": "c0d8a9089916b8c87209a34d8bf5720c", "score": "0.4795533", "text": "function ClearList(){}", "title": "" } ]
b1eb9f7c8fb2adf11abd695d05f2d706
Remove an item from the search index by type and id.
[ { "docid": "743bf215a00de7f98ee87de441a9ca9c", "score": "0.75537705", "text": "public function removeFromIndexByTypeAndId($type, $id)\n {\n $this->elasticsearch->delete(\n [\n 'index' => $this->indexName,\n 'type' => $type,\n 'id' => $id,\n ]\n );\n }", "title": "" } ]
[ { "docid": "60aebeb3f57451078d347f89f95effb4", "score": "0.7179084", "text": "public function remove($type, $id)\r\n {\r\n }", "title": "" }, { "docid": "31f9d1475c732e10a69e7026e7097c90", "score": "0.65388435", "text": "public function remove($item);", "title": "" }, { "docid": "ab81727fdd41d9cc2e7f5e275f26ddf0", "score": "0.6470963", "text": "public static function remove($id){\n $queryClass = self::class.'Query';\n $q = call_user_func(array($queryClass, 'create'));\n $item = $q->findPk($id);\n if(isset($item)){\n $item->delete(); \n }\n else{\n throw new \\cookbook\\NotFoundException(self::class, $id);\n }\n }", "title": "" }, { "docid": "d879586afb0190ffd59013ce90930aa7", "score": "0.6458497", "text": "abstract public function remove($id);", "title": "" }, { "docid": "d1e4e7411b1d6baa031496ad3fdff22e", "score": "0.6412579", "text": "public function removeitem($item);", "title": "" }, { "docid": "e512f13d3921c080c4f815e09bccd122", "score": "0.63310075", "text": "public function removeQueueItem($id, $type)\r\n\t{\r\n\t\t$query = 'DELETE FROM `cacheObjects`\r\n\t\t\tWHERE `id` = \"'.$this->_db->escape($id).'\" \r\n\t\t\t\tAND `type` = \"'.$this->_db->escape($type).'\"';\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$this->_db->query();\r\n\t}", "title": "" }, { "docid": "d42b7a0376cce8423fa6db882ff0f69d", "score": "0.63204044", "text": "public function remove(string $id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.6313245", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.6313245", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.6313245", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.6313245", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.6313245", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.6313245", "text": "public function remove($id);", "title": "" }, { "docid": "ad8df30dbb2317b24434bca65d4f95d2", "score": "0.62984407", "text": "public static function remove($id) {\n $item = Item::model()->find('id=:id', array(':id' => $id));\n $item->delete();\n }", "title": "" }, { "docid": "2afb7124ff906bcf2276fa026b0e66f6", "score": "0.62274957", "text": "public function removeAction(int $id);", "title": "" }, { "docid": "fbd716173957d995532e7a5839e6a5dc", "score": "0.6195128", "text": "public function rm($item);", "title": "" }, { "docid": "c3b1da4bd2f8a6c6266537ee4c3c459e", "score": "0.61752427", "text": "public function removeItemByKey($key);", "title": "" }, { "docid": "4b082fc77c2fc60f21b8b3f8a238b153", "score": "0.61508226", "text": "public function removeItem($key);", "title": "" }, { "docid": "d308e722418d9f5e265f2cd8d7b546d0", "score": "0.6125216", "text": "public function remove($item) {\n $index = self::IndexOf($item);\n self::RemoveAt($index);\n }", "title": "" }, { "docid": "54d435fa57dfab1a8c693e5904b024f7", "score": "0.6107511", "text": "public function remove($item) {\n unset($this->items[$item->id()]);\n }", "title": "" }, { "docid": "0991e67c9e0fdf87b3d236e5a45cc430", "score": "0.60688114", "text": "private function removeItem($id){\n $this->totalQty -= $this->items[$id]['qty'];\n $this->totalPrice -= $this->items[$id]['price'];\n unset($this->items[$id]);\n }", "title": "" }, { "docid": "e53313b0779320c75f55098e654e8593", "score": "0.60443646", "text": "public function removeItem($id) {\n\t\t$this->totalQty-=$this->items[$id]['qty'];\n\t\tunset($this->items[$id]);\n\t}", "title": "" }, { "docid": "9057f048e69e8a21f6d9ac555551b73b", "score": "0.60407627", "text": "abstract public function removeByIndex(int $index): mixed;", "title": "" }, { "docid": "b5d13906a9a4449815f828e34264d30d", "score": "0.6029407", "text": "public function delete($index, $type, $id)\n {\n $params = [\n 'index' => $index,\n 'type' => $type,\n 'id' => $id\n ];\n\n return $this->client->delete($params);\n }", "title": "" }, { "docid": "246504178d10032f992d514feb23365c", "score": "0.59685177", "text": "public function remove(string $id): void;", "title": "" }, { "docid": "989ca03a0ac651da22c09d50f6d37ce3", "score": "0.5968186", "text": "abstract function del ($item);", "title": "" }, { "docid": "9e5b87307f5a5f2a14f841e93a8c9b25", "score": "0.59508616", "text": "public function removeItem(int $itemId): bool;", "title": "" }, { "docid": "65b43c2b8d107d6111bc8eb740a28925", "score": "0.59002", "text": "public function remove(int $index);", "title": "" }, { "docid": "93af83560163087a98141b95c8eaa498", "score": "0.58835316", "text": "public function remove($id)\n\t{\n\t}", "title": "" }, { "docid": "f007bc9abd4bf6c8ea8b77f8091b4ef4", "score": "0.5859051", "text": "public function removeItem($type, $id)\n {\n if(Auth::check())\n {\n $userId = Auth::id(); // user id\n $userCart = Cart::userCart($userId); //finding cart object of this user\n $cartId = $userCart->id; // finding user's cart ID\n\n $item = Cartable::FindItem($cartId, $type, $id); //finding specified item in the cart\n\n switch($type)\n {\n case 'file':\n $result = $userCart->files()->detach($item->cartable_id);\n break;\n case 'episode':\n $result = $userCart->episodes()->detach($item->cartable_id);\n break;\n case 'plan':\n $result = $userCart->plans()->detach($item->cartable_id);\n break;\n }\n\n if($result)\n {\n $message = 'محصول موردنظر از سبد خرید حذف شد.';\n }\n else\n {\n $message = 'محصول موردنظر در سبد خرید موجود نیست.';\n }\n }\n else //if user is not logged in then remove item from session\n {\n $userCart = Session::get('cart');\n\n\n $oldCart = Session::has('cart') ? Session::get('cart') : null;\n $cart = new ShoppingCart($oldCart);\n $message = $cart->removeItem($type, $id);\n Session::put('cart', $cart);\n }\n\n return redirect()->route('shoppingCart')->with('message', $message);\n }", "title": "" }, { "docid": "73d4ff80f903ab067cdb7fc6afdd3c6a", "score": "0.5848357", "text": "function remove()\r\n {\r\n $log = FezLog::get();\r\n $db = DB_API::get();\r\n\r\n $stmt = \"DELETE FROM\r\n \" . APP_TABLE_PREFIX . \"search_key\r\n WHERE\r\n sek_id IN (\" . Misc::arrayToSQLBindStr($_POST[\"items\"]) . \")\";\r\n try {\r\n $db->query($stmt, $_POST[\"items\"]);\r\n }\r\n catch (Exception $ex) {\r\n $log->err($ex);\r\n return false;\r\n }\r\n\r\n if (function_exists('apc_clear_cache')) {\r\n apc_clear_cache('user');\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "74ab4335ca64604cb9958513eb1f862d", "score": "0.58428395", "text": "public function delete_by_id($id) {\n global $DB;\n $DB->delete_records('search_simpledb_index', array('docid' => $id));\n }", "title": "" }, { "docid": "e211c70c76fe25522c13d1a9bd34a5e0", "score": "0.5839471", "text": "public function deleteItem($key);", "title": "" }, { "docid": "e211c70c76fe25522c13d1a9bd34a5e0", "score": "0.5839471", "text": "public function deleteItem($key);", "title": "" }, { "docid": "0fc0b5651fe6f9e7a7a5a64093c90896", "score": "0.580756", "text": "public function deleteItem($id) {\n\t\t$sql = \"DELETE FROM my_simple_api \"\n\t\t\t .\"WHERE id = \".pg_escape_string($id).\" \";\n\t\tDatabase::getInstance()->query($sql);\n\t}", "title": "" }, { "docid": "887edf1e36bc1762eeef158640b206dd", "score": "0.577965", "text": "function removeTrackedItem($itemNum) {\n global $items;\n\n $items->remove(array('_id' => new MongoId($itemNum)));\n\n// echo \"\\nItem Removed\";\n}", "title": "" }, { "docid": "ed8e0be6f222293229dd79c0826b9976", "score": "0.57658315", "text": "public function remove($item)\n {\n if (($item instanceof \\Feather\\IObject) && $this->contains($item))\n {\n $this->_removeByHash(spl_object_hash($item));\n }\n elseif (is_array($item))\n {\n if (count($item) > 1)\n {\n // each array item is an object\n if (key($item) != spl_object_hash(current($item)))\n {\n foreach ($item as $key => $obj)\n {\n $this->_removeByHash(spl_object_hash($obj));\n }\n }\n }\n else\n {\n // key is hash, value is object\n foreach ($item as $key => $obj)\n {\n $this->_removeByHash($key);\n }\n }\n }\n else\n {\n if (!is_array($item) && !($item instanceof \\Feather\\IObject))\n {\n // assume just the hash was passed\n $this->_removeByHash($item);\n }\n }\n \n return $this;\n }", "title": "" }, { "docid": "2f4e6bdc0388bf7ed226eec89788a5ce", "score": "0.575907", "text": "function delete_item($id){\n\t\t$abc = ['J', 'K', 'L', 'M', 'N', 'O', 'P'];\n\t\t$catcol = $abc[($this->hier[\"Categories\"]-1)*2];\n\t\t$loccol = $abc[($this->hier[\"Locations\"]-1)*2];\n\t\t$clmcol = $abc[($this->hier[\"Claimgroups\"]-1)*2];\n\t\ttry{\n\t\t\t$this->api->sheets_put_range($this->sheet, \"Items\", \"A\".((int)$id+2), [\n\t\t\t\t[\"\", \"\", \"\", \"\", \"\", \"\", \"\", '', \"\", \"\", \"\", \"\", \"\", \"\", \"\"]\n\t\t\t], false);\n\t\t\t$this->api->sheets_put_range($this->sheet, \"Items\", $catcol.((int)$id+2), [\n\t\t\t\t[\"\"]\n\t\t\t], false);\n\t\t\t$this->api->sheets_put_range($this->sheet, \"Items\", $loccol.((int)$id+2), [\n\t\t\t\t[\"\"]\n\t\t\t], false);\n\t\t\t$this->api->sheets_put_range($this->sheet, \"Items\", $clmcol.((int)$id+2), [\n\t\t\t\t[\"\"]\n\t\t\t], false);\n\t\t}catch(Exception $e){\n\t\t\t$this->error(__FUNCTION__.\": \".$e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "44bbc9fc1a43fe664a3826f7d820eb24", "score": "0.5757938", "text": "public function removeItem($id) {\r\n\r\n\t\tif($id != null) {\r\n\t\t\tif($this->retail->remove($id)) {\r\n\r\n\t\t\t\tredirect('inventory/retail');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tshow_error('Invalid or no ID specified');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "eb82fc067566fc2ad6fc16119bf7844f", "score": "0.57371956", "text": "abstract public function deleteContentTypeFromIndex($type_name);", "title": "" }, { "docid": "0e3533e2965a44532031acf197eafa61", "score": "0.5729881", "text": "public function removeIndex()\n {\n if ($this->isEmpty()) {\n return false;\n }\n\n $params = array();\n\n foreach ($this->all() as $item) {\n $params['body'][] = array(\n 'delete' => array(\n '_index' => $item->getIndex(),\n '_type' => $item->getTypeName(),\n '_id' => $item->getKey()\n )\n );\n }\n\n return $this->getElasticClient()->bulk($params);\n }", "title": "" }, { "docid": "b8c39c59efe81680ea44887e184c5ac1", "score": "0.57054424", "text": "public function delete($id) {\n // Delete the item\n $this->getDb()->delete('t_items', array('it_id' => $id));\n }", "title": "" }, { "docid": "00397c08ffa2dd3cb2d555c60a99f08a", "score": "0.57041043", "text": "public function remove($index);", "title": "" }, { "docid": "ce67eb7d4cffd543d6e7a229f007bc03", "score": "0.5667535", "text": "function delete_metadata_by_mid($meta_type, $meta_id)\n {\n }", "title": "" }, { "docid": "208272b9febd58a54bd5f971f4e3202b", "score": "0.56644374", "text": "public function removeFromIndex(Searchable $subject)\n {\n $this->elasticsearch->delete(\n [\n 'index' => $this->indexName,\n 'type' => $subject->getSearchableType(),\n 'id' => $subject->getSearchableId(),\n ]\n );\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.56336045", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.56336045", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.56336045", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.56336045", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.56336045", "text": "public function remove();", "title": "" }, { "docid": "f8b6c716b7ace540f26637c2712e051e", "score": "0.562039", "text": "public function remove(Item $Item) : bool ;", "title": "" }, { "docid": "d2b0d9cc7702450b9b0d9e19b8e19ff2", "score": "0.56135315", "text": "public function removeAt($index);", "title": "" }, { "docid": "5dc4d065d134c19e6bc53811d93504f1", "score": "0.56112605", "text": "public function testDeleteSearchDocumentsByTypeIdDoNotDeleteNonMatchingDocuments()\n {\n $actualSearchDocumentCount = $this->getCountForSearchSpecs($this->tripod);\n\n \t$this->assertEquals(13, $actualSearchDocumentCount, \"Should have generated 13 search documents based on searchData.json\");\n\n \t$id = array('_id.r'=>'http://talisaspire.com/resources/doc1');\n\n \t$newData = array(\n \t\t\t\"rdf:type\"=>array(array(\"u\"=>\"resourcelist:List\"),array(\"u\"=>\"bibo:Book\")),\n \t\t\t\"spec:name\"=>array(\"l\"=>\"my list title\"),\n \t\t\t\"resourcelist:description\"=>array(\"l\"=>\"foo bar baz\"),\n \t);\n \t$this->getTripodCollection($this->tripod)->updateOne($id, array('$set'=> $newData));\n\n \t// reindex\n \t$this->indexer->generateAndIndexSearchDocuments('http://talisaspire.com/resources/doc1', 'http://talisaspire.com/', $this->tripod->getPodName());\n\n \t//assert that there are now 13 documents after adding new document to collection\n $updatedSearchDocumentCount = $this->getCountForSearchSpecs($this->tripod);\n\n \t$this->assertEquals(14, $updatedSearchDocumentCount, \"Should have generated 14 search documents after adding a new document to collection\");\n\n \t$mockSearchProvider = $this->getMock(\"\\Tripod\\Mongo\\MongoSearchProvider\", array('getSearchDocumentSpecification'), array($this->tripod));\n \t$mockSearchProvider->expects($this->once())\n\t\t\t\t \t->method('getSearchDocumentSpecification')\n\t\t\t\t \t->with('i_search_resource')\n\t\t\t\t \t->will($this->returnValue(array('i_search_resource' => array())));\n\n \t$mockSearchProvider->deleteSearchDocumentsByTypeId('i_search_resource');\n\n \t//search document count should be 1, since there is one document not matching the type id provided for delete\n $newSearchDocumentCount = $this->getCountForSearchSpecs($this->tripod);\n\n \t$this->assertEquals(1, $newSearchDocumentCount, \"Should have 1 search documents since there is one search document with 'i_search_list' type that does not match delete type.\");\n }", "title": "" }, { "docid": "908d538bff73a6b3bc20edfa37dedac6", "score": "0.56088686", "text": "function remove($id)\n {\n $this->quantity[$id] = 0;\n $this->items = array_diff($this->items, array($id));\n }", "title": "" }, { "docid": "cf2d2a8899e28c1f0f8f59cceeadbabc", "score": "0.5604489", "text": "public function destroy($id)\n {\n $r=Item::findorfail($id);\n $r->delete(); \n }", "title": "" }, { "docid": "1a252eb0d58a95e5d8e9ae6906a6f2db", "score": "0.56034213", "text": "public function removeRecordById(int $id);", "title": "" }, { "docid": "f50522ea6438ca39505ca0748e34d10b", "score": "0.55938286", "text": "public static function supprimerItem($id){\n $item = Item::where('id','=',$id)->first();\n $liste = Liste::where('no', '=', $item->liste_id)->first();\n $item->delete();\n\n $app = Slim::getInstance();\n $app->redirect($app->urlFor('modifier_une_liste', ['tokenModif'=>$liste->tokenModif]));\n }", "title": "" }, { "docid": "0b2a07c925f565d6ec1c9aa0870966ae", "score": "0.55576503", "text": "function remove_id_type($id_type_id = '')\n\t{\n\t\t$this->db->where('id_type_id', $id_type_id);\n\t\t$this->db->delete('id_type');\n\n\t\t$this->session->set_flashdata('success', 'ID type has been deleted successfully.');\n\n\t\tredirect(base_url() . 'id_type_settings', 'refresh');\n\t}", "title": "" }, { "docid": "ff2149218c6feca6f1336cf81e84bf32", "score": "0.5552229", "text": "public function query_remove($key) {\n\t\t\t\\uri\\query::remove($this->object, $key);\n\t\t}", "title": "" }, { "docid": "98b76c1e1802bd19997e7e7f12e1c16b", "score": "0.5547927", "text": "public static function Delete($id)\n {\n $class = get_called_class();\n if (!isset(self::$instance_master_list[$class]))\n {\n self::$instance_master_list[$class] = array();\n }\n // remove cached copy of the item\n if (isset(self::$instance_master_list[$class][$id]))\n {\n unset(self::$instance_master_list[$class][$id]);\n }\n // do a mysql query to remove the item from the table\n $query = \"DELETE FROM \".$class::TABLE_NAME.\" WHERE \".$class::TABLE_KEY.\"=\".$id;\n $class::GetQuery($query);\n }", "title": "" }, { "docid": "e5d6084311e6f1e8ff8172baabf471cc", "score": "0.5539702", "text": "public function eliminarPorId($id)\n {\n }", "title": "" }, { "docid": "8ac04cbbdaf987beddb4bcf06761cbaf", "score": "0.553064", "text": "public function removeAt($key);", "title": "" }, { "docid": "110d49ec244fd5f3bc4864b99286aaae", "score": "0.5521035", "text": "public function eliminar($id)\n {\n //\n }", "title": "" }, { "docid": "02cabe06aad0cd32d51433cbdee6e7f7", "score": "0.54977626", "text": "public function delete($id = null)\n {\n\t\t// set the model to the id that you want to work with.\n $this->Item->id = $id;\n \n\t\t// does the item exist? is it set?\n if(!$id || !$this->Item->exists())\n {\n throw new NotFoundException(__(\"ID was not set.\"));\n }\n \n\t\t// make sure the request came via post\n if($this->request->is('post'))\n {\n\t\t\t// if the delete was a success\n if($this->Item->delete())\n {\n\t\t\t\t// display a message for the user to see the results\n $this->Session->setFlash(__(\"The item was deleted.\"));\n }\n else\n {\n $this->Session->setFlash(__(\"The ites was not deleted.\"));\n }\n }\n \n\t\t// redirect the user to the correct results page after the deletion\n $this->redirect('index');\n }", "title": "" }, { "docid": "022ea7883ef8fea9041c8897323cd132", "score": "0.548522", "text": "public function eliminar($id)\n {\n }", "title": "" }, { "docid": "022ea7883ef8fea9041c8897323cd132", "score": "0.548522", "text": "public function eliminar($id)\n {\n }", "title": "" }, { "docid": "022ea7883ef8fea9041c8897323cd132", "score": "0.548522", "text": "public function eliminar($id)\n {\n }", "title": "" }, { "docid": "15de347765a667ab6430f6d048ff2af1", "score": "0.54843336", "text": "public function remove($id)\n {\n\t\t$item = $this->getItem($id);\n \t$cart = $this->session->get(self::SHOPPINGCART);\n $this->session->forget(self::SHOPPINGCART);\n for($i=0;$i<sizeof($cart);$i++)\n {\n if($cart[$i] == $item)\n {\n continue;\n }\n $this->session->push(self::SHOPPINGCART,$cart[$i]);\n }\n \n \tfor($i=0;$i<sizeof($this->items);$i++)\n {\n if($this->items[$i] == $item)\n {\n unset($this->items[$i]);\n }\n }\n }", "title": "" }, { "docid": "9d5192a09a63a2edfd40dd907e838659", "score": "0.54734755", "text": "public function remove(string $id): bool;", "title": "" }, { "docid": "c31adb33426c750dfbdb5c3574e08723", "score": "0.5473264", "text": "public function remove($id, $existCheck = false, $optimize = false) {\n if (!get_config('enable_indexing')) {\n return;\n }\n \n if ($existCheck) {\n $resource = $this->fetch($id);\n if (!$resource) {\n return;\n }\n }\n\n $docIds = $this->__index->termDocs($this->getTermForSingleResource($id));\n foreach ($docIds as $id) {\n $this->__index->delete($id);\n }\n\n try {\n $this->optimizeOrCommit($optimize);\n } catch (Zend_Search_Lucene_Exception $e) {\n $this->handleWriteErrors($e);\n }\n }", "title": "" }, { "docid": "a7402d5e8ff28686f13bab0fb1b60de4", "score": "0.5471609", "text": "function deleteItem($index)\r\n {\r\n $items = $this->_items;\r\n // reset the items\r\n $this->_items = array();\r\n foreach($items as $key => $item)\r\n {\r\n // add all except item at $index\r\n if ($key != $index)\r\n {\r\n $this->_items[] = $item;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "e156daf48cecbdc1399ec75f34f185e5", "score": "0.5468159", "text": "public function removeData($type, $id)\n { \n if($type == 'section'){\n Category_sections::destroy($id);\n }elseif($type == 'question'){\n Section_questions::destroy($id);\n }elseif($type == 'answer'){\n Question_answers::destroy($id);\n }\n \n return response()->json(['success' => 1]); \n \n }", "title": "" }, { "docid": "fee55244724e24e3c4b738e2d6737645", "score": "0.5468041", "text": "abstract public function remove();", "title": "" }, { "docid": "7af2a55649f87076310aad457c5528d3", "score": "0.54553306", "text": "public function delete($id) {\n // Delete the type\n $this->getDb()->delete('eventtype', array('num_ET' => $id));\n }", "title": "" }, { "docid": "e27b43d11479e363a70d201366a400c2", "score": "0.54544187", "text": "public function removeItem($key) {\r\n\t\tif (isset($this->items[$key])) unset($this->items[$key]);\r\n }", "title": "" }, { "docid": "435282090f724666ba07bf1015ccf9a2", "score": "0.5446539", "text": "protected function eliminar($id)\n {\n }", "title": "" }, { "docid": "18f8744658b94bb3af8a4f5d7e5b4512", "score": "0.5443983", "text": "public function remove(string $key);", "title": "" }, { "docid": "18f8744658b94bb3af8a4f5d7e5b4512", "score": "0.5443983", "text": "public function remove(string $key);", "title": "" }, { "docid": "379b3a45ae1ece05200577f46dedd810", "score": "0.54413754", "text": "public function deleteUserIndex($id){\n\t\t$index = \\Zend_Search_Lucene::open(APPLICATION_PATH . '/indexes/members');\r\n\t\t$query = 'user_id:\"'.$id.'\"';\r\n\n\t\t$hits = $index->find($query);\n\t\t\n\t\tforeach($hits as $h){\n\t\t\t$index->delete($h->id);\t\n\t\t\t//echo $h->id . ' has been deleted with name '.$h->name;\n\t\t}\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "e7a8dc3e324f6769bc41fa7776b3daa0", "score": "0.5440702", "text": "public function index_delete($id)\n {\n $this->db->delete('items', array('id'=>$id));\n \n $this->response(['Item deleted successfully.'], REST_Controller::HTTP_OK);\n }", "title": "" }, { "docid": "e7a8dc3e324f6769bc41fa7776b3daa0", "score": "0.5440702", "text": "public function index_delete($id)\n {\n $this->db->delete('items', array('id'=>$id));\n \n $this->response(['Item deleted successfully.'], REST_Controller::HTTP_OK);\n }", "title": "" }, { "docid": "7c4079785608d36ed608fef87db47d7b", "score": "0.5439949", "text": "public function destroy(ItemType $type)\n {\n //\n }", "title": "" }, { "docid": "b85f2e848c2959645156d2d442f50fad", "score": "0.5439634", "text": "public function testDeleteSearchDocumentsByTypeIdDeletesNothingWhenNoMatchFound()\n {\n $actualSearchDocumentCount = $this->getCountForSearchSpecs($this->tripod);\n\n \t$this->assertEquals(13, $actualSearchDocumentCount, \"Should have generated 12 search documents based on searchData.json\");\n\n /** @var \\Tripod\\Mongo\\MongoSearchProvider|PHPUnit_Framework_MockObject_MockObject $mockSearchProvider */\n \t$mockSearchProvider = $this->getMock(\"\\Tripod\\Mongo\\MongoSearchProvider\", array('getSearchDocumentSpecification'), array($this->tripod));\n \t$mockSearchProvider->expects($this->once())\n\t\t\t\t \t->method('getSearchDocumentSpecification')\n\t\t\t\t \t->with('i_some_type')\n\t\t\t\t \t->will($this->returnValue(array('i_some_type' => array())));\n try\n {\n \t $mockSearchProvider->deleteSearchDocumentsByTypeId('i_some_type');\n }\n catch(\\Tripod\\Exceptions\\ConfigException $e)\n {\n $this->assertEquals(\"Search document id 'i_some_type' not in configuration for store 'tripod_php_testing'\", $e->getMessage());\n }\n\n \t//search document count should remain same, because we expect that there was nothing to delete\n $newSearchDocumentCount = $this->getCountForSearchSpecs($this->tripod);\n\n \t$this->assertEquals(13, $newSearchDocumentCount, \"Should have generated 12 search documents, because there was no match to remove\");\n }", "title": "" }, { "docid": "0aa456c0c49bdc6bfabcf03a234423eb", "score": "0.54302806", "text": "public function remove(...$items);", "title": "" }, { "docid": "861b98f2f6c02104182d67ea8793e95e", "score": "0.5429445", "text": "public function delete ( mixed $id ){}", "title": "" }, { "docid": "aa71e7406f625007d45db6b7fa192032", "score": "0.54287565", "text": "public static function remove($id)\n {\n $db = Zend_Registry::get('dbAdapter');\n $db->delete('main', 'main. = ' . $id);\n }", "title": "" }, { "docid": "a3b22d8f5b494f4327611b13742c11a2", "score": "0.5428135", "text": "public static function delete_searchQuery($id)\r\n {\r\n global $wpdb;\r\n\r\n $wpdb->delete(\r\n \"{$wpdb->prefix}\",\r\n [ 'id' => $id ],\r\n [ '%d' ]\r\n );\r\n //@TODO finish delete action\r\n }", "title": "" }, { "docid": "0fc8b1431d0f2a3f631e2b7df2c5cf0c", "score": "0.5423081", "text": "protected function eliminar($id)\n {\n }", "title": "" }, { "docid": "c9b422a88e4bac829fddf5f80bef53a4", "score": "0.5418978", "text": "protected function removeItemsFromIndex($sids) {\n $sids = (array) $sids;\n\n // Remove items from our table in batches of 100, to avoid problems\n // with having too many placeholders in database queries.\n foreach (array_chunk($sids, 100) as $this_list) {\n $this->database->delete('help_search_items')\n ->condition('sid', $this_list, 'IN')\n ->execute();\n }\n // Remove items from the search tables individually, as there is no bulk\n // function to delete items from the search index.\n foreach ($sids as $sid) {\n $this->searchIndex->clear($this->getType(), $sid);\n }\n }", "title": "" }, { "docid": "54e9cb774c235ffafed9a6be40a48b90", "score": "0.54189533", "text": "public function deleteByIdType($id , $type) {\n\t\t// Delete the images directory for these types / links\n\t\t$base_path = Config::get('laravel-bootstrap::app.upload_base_path');\n\t\t$toDelete = base_path().'/'.$base_path.$type.'/'.$id;\n\t\tFile::deleteDirectory($toDelete);\n\n\t\t// Now return the result of deleting all the records that match\n\t\treturn $this->model->where('path','=',$type)->where('uploadable_id','=',$id)->delete();\n\t}", "title": "" }, { "docid": "9443a9bf6be6f0d672167b17e03849b1", "score": "0.5415013", "text": "public function deleteEntireModelFromIndex(Model|Searchable $model): void\n {\n $this->deleteIndex($model->searchableAs());\n }", "title": "" }, { "docid": "09e1b632d4adb92d68bd14f369de3615", "score": "0.5413643", "text": "public function destroy($type=null,$item_id,$id)\n {\n $item = Rating::find($id);\n $item->delete();\n return back()->with('danger', 'Rating removed successfully!');\n }", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.5411799", "text": "public function remove($entity);", "title": "" }, { "docid": "98e3f1c14ab072998e384f603fef765d", "score": "0.54042315", "text": "public function testDeleteIdsIdxObjectTypeObject(): void\n {\n $data = ['username' => 'hans'];\n $userSearch = 'username:hans';\n\n $index = $this->_createIndex();\n\n // Create the index, deleting it first if it already exists\n $index->create([], [\n 'recreate' => true,\n ]);\n\n // Adds 1 document to the index\n $doc = new Document(null, $data);\n $result = $index->addDocument($doc);\n\n // Refresh index\n $index->refresh();\n\n $resultData = $result->getData();\n $ids = [$resultData['_id']];\n\n // Check to make sure the document is in the index\n $resultSet = $index->search($userSearch);\n $totalHits = $resultSet->getTotalHits();\n $this->assertEquals(1, $totalHits);\n\n // Using the existing $index variable which is \\Elastica\\Index object\n $index->getClient()->deleteIds($ids, $index);\n\n // Refresh the index to clear out deleted ID information\n $index->refresh();\n\n // Research the index to verify that the items have been deleted\n $resultSet = $index->search($userSearch);\n $totalHits = $resultSet->getTotalHits();\n $this->assertEquals(0, $totalHits);\n }", "title": "" }, { "docid": "f4a6e20679b550cdd6fb97809e6d0be1", "score": "0.5391492", "text": "public static function remove(&$object, $key) {\n\t\t\t$qarray = \\uri\\generate::query_array($object);\n\t\t\tif (isset($qarray[$key])) {\n\t\t\t\tunset($qarray[$key]);\n\t\t\t\t\\uri\\actions::modify($object, 'replace', 'QUERY', self::build_query($qarray));\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c94a45fb7124b90cbeaf1fb4d3e684c2", "score": "0.5390691", "text": "function delete_product_item($id){\n $this->delete($id);\n }", "title": "" }, { "docid": "873530914b59a6a7cd60a6f06219dcf1", "score": "0.53841674", "text": "public function remove ( array $criteria = array() , array $options = array() ){}", "title": "" }, { "docid": "d748e956bb726bd6581c295e53f86ec2", "score": "0.5375121", "text": "public function removeNamedItem($name) { }", "title": "" }, { "docid": "e95fcad891d203d11cdf14a8865b5104", "score": "0.53714716", "text": "public function deleted($item)\n {\n $this->elastic->delete($item->getTable(), $item->id);\n }", "title": "" }, { "docid": "840d593549dbf767f0c958e2437ad13a", "score": "0.5369769", "text": "public function delete($id) {\r\n return $this->getItemDAO()->delete($id);\r\n }", "title": "" } ]
860caa94775bc3c8ff521df887dd2452
Admin Forum Flagged Answers
[ { "docid": "3cf16e06586509b4519de82eaad3c85c", "score": "0.7599174", "text": "public function actionAdminForumFlaggedA() \n\t{\n\t\t$viewData = array(\n\t\t\t'title' => 'Flagged Answers',\n\t\t\t'some_key' => 'Flagged Answers'\n\t\t);\n\n\t\treturn View::make('mockup.admin.forum.flagged-answers', $viewData);\n\t}", "title": "" } ]
[ { "docid": "348c15e6dc2978907ef1e0cbfbd7b998", "score": "0.7371638", "text": "public function actionAdminForumFlaggedQ() \n\t{\n\t\t$viewData = array(\n\t\t\t'title' => 'Flagged Questions',\n\t\t\t'some_key' => 'Flagged Answers'\n\t\t);\n\n\t\treturn View::make('mockup.admin.forum.flagged-questions', $viewData);\n\t}", "title": "" }, { "docid": "c058d2175f1295d2e93d2bcb05f89571", "score": "0.6148411", "text": "public function add_extra_reply_actions() {\n\t\t$topic_id = bbp_get_topic_id();\n\n\t\tif ( class_exists( 'WordPressdotorg\\Forums\\Topic_Resolution\\Plugin' ) ) :\n\t\t\t$topic_resolution_plugin = Topic_Resolution\\Plugin::get_instance();\n\n\t\t\tif (\n\t\t\t\t$topic_resolution_plugin->is_enabled_on_forum()\n\t\t\t&&\n\t\t\t\t$topic_resolution_plugin->user_can_resolve( get_current_user_id(), $topic_id )\n\t\t\t&&\n\t\t\t\t'yes' !== $topic_resolution_plugin->get_topic_resolution( array( 'id' => $topic_id ) )\n\t\t\t) : ?>\n\t\t\t\t<p>\n\t\t\t\t\t<input name=\"bbp_reply_mark_resolved\" id=\"bbp_reply_mark_resolved\" type=\"checkbox\" value=\"yes\" />\n\t\t\t\t\t<label for=\"bbp_reply_mark_resolved\"><?php esc_html_e( 'Reply and mark as resolved', 'wporg-forums' ); ?></label>\n\t\t\t\t</p>\n\t\t\t\t<?php\n\t\t\tendif;\n\t\tendif;\n\n\t\tif ( current_user_can( 'moderate', $topic_id ) && ! bbp_is_topic_closed( $topic_id ) ) : ?>\n\t\t\t<p>\n\t\t\t\t<input name=\"bbp_reply_close_topic\" id=\"bbp_reply_close_topic\" type=\"checkbox\" value=\"yes\" />\n\t\t\t\t<label for=\"bbp_reply_close_topic\"><?php esc_html_e( 'Reply and close the topic', 'wporg-forums' ); ?></label>\n\t\t\t</p>\n\t\t\t<?php\n\t\tendif;\n\t}", "title": "" }, { "docid": "a0896120903f91c9bb23dccdb157d3a5", "score": "0.6128682", "text": "function forum_moderation(&$objSrcUser, $posttype, $ids)\n{\n $arrStats = $objSrcUser->get_stats();\n\n // M: Strict moderation of alliance forums... only members of the alliance\n if ($posttype != 0)\n $strAlliance = '';\n else\n $strAlliance = \"poster_kd = {$arrStats[ALLIANCE]} AND\";\n\n if (isset($_POST['sticky']))\n {\n $sql =\"UPDATE forum SET sticky = 1 WHERE $strAlliance post_id IN ($ids)\";\n echo '<div class=\"center\"><br />' . \"The selected topics are now sticky topics.<br /></div>\";\n }\n elseif (isset($_POST['unsticky']))\n {\n $sql =\"UPDATE forum SET sticky = 0 WHERE $strAlliance post_id IN ($ids)\";\n echo '<div class=\"center\"><br />' . \"The selected topics aren't sticky anymore.<br /></div>\";\n }\n elseif (isset($_POST['close']))\n {\n $sql =\"UPDATE forum SET close_option = 1 WHERE $strAlliance post_id IN ($ids)\";\n echo '<div class=\"center\"><br />' . \"The selected topics are now closed for posting.<br /></div>\";\n }\n elseif (isset($_POST['open']))\n {\n $sql =\"UPDATE forum SET close_option = 0 WHERE $strAlliance post_id IN ($ids)\";\n echo '<div class=\"center\"><br />' . \"The selected topics are open again.<br /></div>\";\n }\n elseif (isset($_POST['delete']))\n {\n $sql = \"DELETE FROM forum WHERE $strAlliance ( post_id IN ($ids) OR parent_id IN ($ids) )\";\n echo '<div class=\"center\"><br />' . \"The selected topics or posts were deleted.<br /></div>\";\n }\n\n mysql_query($sql);\n}", "title": "" }, { "docid": "cbb28891ae0d1700ea7568888e0e1dea", "score": "0.5976113", "text": "function mysupport_postbit(&$post)\r\n{\r\n\tglobal $mybb;\r\n\t\r\n\tif($mybb->settings['enablemysupport'] != 1)\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\t\r\n\tglobal $db, $cache, $lang, $theme, $templates, $thread, $forum, $support_denial_reasons;\r\n\t\r\n\t$lang->load(\"mysupport\");\r\n\t\r\n\tif(mysupport_forum($forum['fid']))\r\n\t{\r\n\t\t$post['mysupport_bestanswer'] = \"\";\r\n\t\t$post['mysupport_bestanswer_highlight'] = \"\";\r\n\t\t$post['mysupport_staff_highlight'] = \"\";\r\n\t\tif($post['visible'] == 1)\r\n\t\t{\r\n\t\t\tif($mybb->settings['enablemysupportbestanswer'] == 1)\r\n\t\t\t{\r\n\t\t\t\tif($thread['bestanswer'] == $post['pid'])\r\n\t\t\t\t{\r\n\t\t\t\t\t$post['mysupport_bestanswer_highlight'] = \" mysupport_bestanswer_highlight\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif($mybb->user['uid'] == $thread['uid'])\r\n\t\t\t\t{\r\n\t\t\t\t\tif($thread['bestanswer'] == $post['pid'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$bestanswer_img = \"mysupport_bestanswer\";\r\n\t\t\t\t\t\t$bestanswer_alt = $lang->unbestanswer_img_alt;\r\n\t\t\t\t\t\t$bestanswer_title = $lang->unbestanswer_img_title;\r\n\t\t\t\t\t\t$bestanswer_desc = $lang->unbestanswer_img_alt;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$bestanswer_img = \"mysupport_unbestanswer\";\r\n\t\t\t\t\t\t$bestanswer_alt = $lang->bestanswer_img_alt;\r\n\t\t\t\t\t\t$bestanswer_title = $lang->bestanswer_img_title;\r\n\t\t\t\t\t\t$bestanswer_desc = $lang->bestanswer_img_alt;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\teval(\"\\$post['mysupport_bestanswer'] = \\\"\".$templates->get('mysupport_bestanswer').\"\\\";\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// we only want to do this if it's not been highlighted as the best answer; that takes priority over this\r\n\t\t\tif(empty($post['mysupport_bestanswer_highlight']))\r\n\t\t\t{\r\n\t\t\t\tif($mybb->settings['mysupporthighlightstaffposts'] == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t$post_groups = array_merge(array($post['usergroup']), explode(\",\", $post['additionalgroups']));\r\n\t\t\t\t\t// various checks to see if they should be considered staff or not\r\n\t\t\t\t\tif(mysupport_usergroup(\"canmarksolved\", $post_groups) || is_moderator($forum['fid'], \"\", $post['uid']))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$post['mysupport_staff_highlight'] = \" mysupport_staff_highlight\";\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\tif($mybb->settings['enablemysupportsupportdenial'] == 1)\r\n\t\t{\r\n\t\t\t$post['mysupport_deny_support_post'] = \"\";\r\n\t\t\t$denied_text = $denied_text_desc = \"\";\r\n\t\t\t\r\n\t\t\tif($post['deniedsupport'] == 1)\r\n\t\t\t{\r\n\t\t\t\t$denied_text = $lang->denied_support;\r\n\t\t\t\tif(mysupport_usergroup(\"canmanagesupportdenial\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t$denied_text_desc = $lang->sprintf($lang->revoke_from, htmlspecialchars_uni($post['username']));\r\n\t\t\t\t\tif(array_key_exists($post['deniedsupportreason'], $support_denial_reasons))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$denied_text .= \": \".htmlspecialchars_uni($support_denial_reasons[$post['deniedsupportreason']]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$denied_text .= \" \".$lang->denied_support_click_to_edit_revoke;\r\n\t\t\t\t\teval(\"\\$post['mysupport_deny_support_post'] = \\\"\".$templates->get('mysupport_deny_support_post_linked').\"\\\";\");\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$denied_text_desc = $lang->denied_support;\r\n\t\t\t\t\teval(\"\\$post['mysupport_deny_support_post'] = \\\"\".$templates->get('mysupport_deny_support_post').\"\\\";\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(mysupport_usergroup(\"canmanagesupportdenial\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t$post_groups = array_merge(array($post['usergroup']), explode(\",\", $post['additionalgroups']));\r\n\t\t\t\t\t// various checks to see if they should be considered staff or not - if they are, don't show this for this user\r\n\t\t\t\t\tif(!(mysupport_usergroup(\"canmarksolved\", $post_groups) || is_moderator($forum['fid'], \"\", $post['uid'])))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$denied_text_desc = $lang->sprintf($lang->deny_support_to, htmlspecialchars_uni($post['username']));\r\n\t\t\t\t\t\teval(\"\\$post['mysupport_deny_support_post'] = \\\"\".$templates->get('mysupport_deny_support_post_linked').\"\\\";\");\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\tif($thread['issupportthread'] == 1)\r\n\t\t{\r\n\t\t\t$post['mysupport_status'] = mysupport_get_display_status($thread['status'], $thread['onhold'], $thread['statustime'], $thread['uid']);\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "1d592c78c6f31fda056104d36cc65cd1", "score": "0.5960688", "text": "public function setAnswerWarning()\n {\n\n if (isset($_GET['comId']) AND isset($_GET['postId']) AND ($_GET['postId'] >= (int) 0) AND ($_GET['comId'] >= (int) 0) ) {\n $manager = new PostManager();\n $manager->Warning($_GET['comId'] , \"1\");\n\n $myView = new View('');\n $myView->redirect('reply.html?comId='.$_GET['postId']);\n } else {\n\n $myView = new View('error');\n $myView->build( array('chapters'=> null ,'comments'=>null,'warningList' => null,'HOST'=>HOST, 'adminLevel' => $_SESSION['adminLevel']));\n }\n\n\n }", "title": "" }, { "docid": "dd1c3a9418f60b18973e8dfb00135637", "score": "0.5929063", "text": "function dwqa_subscrible_enable_new_comment_answer_followers_notification(){\n\techo '<th>'.__( 'Enable?','dwqa' ).'</th><td><input type=\"checkbox\" '.checked( 1, get_option( 'dwqa_subscrible_enable_new_comment_answer_followers_notification', 1 ), false ).' value=\"1\" name=\"dwqa_subscrible_enable_new_comment_answer_followers_notification\" id=\"dwqa_subscrible_enable_new_comment_answer_followers_notification\" ><span class=\"description\">'.__( 'Enable notification for new comment of answer.', 'dwqa' ).'</span></td>';\n}", "title": "" }, { "docid": "4d0021f4eecd0234859ec2e3417f9cba", "score": "0.5905231", "text": "function dwqa_subscrible_enable_new_comment_answer_notification(){\n\techo '<th>'.__( 'Enable?','dwqa' ).'</th><td><input type=\"checkbox\" '.checked( 1, get_option( 'dwqa_subscrible_enable_new_comment_answer_notification', 1 ), false ).' value=\"1\" name=\"dwqa_subscrible_enable_new_comment_answer_notification\" id=\"dwqa_subscrible_enable_new_comment_answer_notification\" ><span class=\"description\">'.__( 'Enable notification for new comment of answer.', 'dwqa' ).'</span></td>';\n}", "title": "" }, { "docid": "1a64f69a505692bc8c15381c87b26972", "score": "0.580862", "text": "public function answer()\n\t\t{\n\t\t\t$data['user']=$this->auth->fetch_data2('neko_user_data');\n\t\t\t$data['ques']=$this->auth->fetch_data('neko_ques_data');\t\t\n\t\t\t$data['stats']=$this->auth->fetch_data_stats('neko_user_data',$_SESSION['user_email']);\n\t\t\t$this->load->view('layout/two-layer-header',$data);\n\t\t\t$this->load->view('answers',$data);\n\t\t\t$data['points']=$this->auth->fetch_data_highpoints('neko_user_data');\t\t\n\t\t\t$this->load->view('layout/side-bar',$data);\n\t\t\t$this->load->view('layout/footer');\n\t\t\n\t\t}", "title": "" }, { "docid": "3b6f352f4c5d9314c81974ba23fe579e", "score": "0.5786087", "text": "public function answer(){\n //p($_POST);\n $data['content']=$_POST['content'];\n $data['aid']=$_POST['aid'];\n $data['uid']=session('user_id');\n $data['time']=time();\n $result=M('answer')->add($data);\n if($result){\n M('user')->where('id='.session('user_id'))->setInc('coin',C('ANSWER'));\n M('user')->where('id='.session('user_id'))->setInc('experince',C('LV_ANSWER'));\n M('user')->where('id='.session('user_id'))->setInc('answer',1);\n M('ask')->where('id='.$data['aid'])->setInc('answer',1);\n\n $this->success(\"回答成功!\",$_SERVER['HTTP_REFERER']);\n }else{\n $this->error(\"回答失败!\");\n }\n }", "title": "" }, { "docid": "ff3fd05102ab5ab00749440c02a46065", "score": "0.57813007", "text": "function addreply() {\n\tglobal $fm;\n\tcheck_captcha();\n\t$allforums = $fm->_Read2Write($fp_allforums, FM_ALLFORUMS, false);\n\tif (( $topic_id = $fm->_Intval('topic') ) === 0 || ( $forum_id = $fm->_Intval('forum') ) === 0 || !isset( $allforums[$forum_id] )) {\n\t\t$fm->_Fclose($fp_allforums);\n\t\t$fm->_Message($fm->LANG['MainMsg'], $fm->LANG['CorrectPost']);\n\t}\n\n\t$list = $fm->_Read2Write($fp_list, 'forum' . $forum_id . '/list.php', false);\n\tif (!isset( $list[$topic_id] ) || !file_exists('forum' . $forum_id . '/' . $topic_id . '-thd.php')) {\n\t\t$fm->_FcloseAll();\n\t\t$fm->_Message($fm->LANG['MainMsg'], $fm->LANG['TopicMiss']);\n\t}\n\n\tif ($list[$topic_id]['state'] == 'closed' || $list[$topic_id]['state'] == 'moved') {\n\t\t$fm->_FcloseAll();\n\t\t$fm->_Message($fm->LANG['ReplyCreate'], $fm->LANG['TopicBlocked']);\n\t}\n\n\t$privateID = ChekPrivate($allforums[$forum_id]['private'], $forum_id);\n\t$fm->_GetModerators($forum_id, $allforums);\n\tCheckForumPerms($allforums[$forum_id]['strep'], 'Reply');\n\n\tCheckPostSize('inpost');\n\tif ($fm->exbb['flood_limit'] != 0 && $fm->_Moderator === false && isset( $_SESSION['lastposttime'] )) {\n\t\t$lastpost = $_SESSION['lastposttime'] + $fm->exbb['flood_limit'];\n\t\tif (( $_SESSION['lastposttime'] + $fm->exbb['flood_limit'] ) > $fm->_Nowtime) {\n\t\t\t$fm->_FcloseAll();\n\t\t\t$fm->_Message($fm->LANG['ReplyCreate'], sprintf($fm->LANG['FloodLimitNew'], $fm->exbb['flood_limit']));\n\t\t}\n\t}\n\n\t$upload = ( $fm->exbb['file_upload'] === true && $allforums[$forum_id]['upload'] !== 0 && ( $fm->user['upload'] === true || $fm->exbb['autoup'] === true && $fm->user['id'] ) ) ? $allforums[$forum_id]['upload'] : 0;\n\n\t$attach = false;\n\tif ($upload !== 0 && !empty( $_FILES['FILE_UPLOAD'] ) && ( $attach = $fm->Upload($allforums[$forum_id]['upload'], uniqid(\"att-\" . $forum_id . \"-\"), 'uploads/', 'file') ) !== false) {\n\t\tif (defined(\"UP_ERROR\")) {\n\t\t\t$fm->_FcloseAll();\n\t\t\t$fm->_WriteLog(UP_ERROR);\n\t\t\t$fm->_Message($fm->LANG['ReplyCreate'], UP_ERROR);\n\t\t}\n\n\t}\n\n\t$forumname = $allforums[$forum_id]['name'];\n\t$topicname = $list[$topic_id]['name'];\n\n\t$topic = $fm->_Read2Write($fp_topic, 'forum' . $forum_id . '/' . $topic_id . '-thd.php');\n\tksort($topic, SORT_NUMERIC);\n\tend($topic);\n\t@$last_key = key($topic);\n\n\t#Check double clicking :)\n\tif ($topic[$last_key]['post'] == $fm->input['inpost']) {\n\t\t$fm->_FcloseAll();\n\t\t$fm->_Message($fm->LANG['ReplyCreate'], $fm->LANG['ReplySavedAlredy']);\n\t}\n\n\t$fm->input['inpost'] = ( $fm->exbb['wordcensor'] === true ) ? $fm->bads_filter($fm->input['inpost']) : $fm->input['inpost'];\n\tif ($fm->user['id'] !== 0 && $topic[$last_key]['p_id'] == $fm->user['id'] && ( $fm->_Nowtime - $last_key ) < FM_SUBPOST_TIME && $attach === false) {\n\t\t$topic[$last_key]['post'] .= \"\\n[i]{$fm->LANG['SubAddingPost']}[/i]\\n\" . preg_replace(\"#(\\?|&amp;|;|&)PHPSESSID=([0-9a-zA-Z]){32}#i\", \"\", $fm->input['inpost']);\n\t\t$PostAdded = false;\n\t}\n\telse {\n\t\t$PostAdded = true;\n\t\t$fm->_SAVE_STATS(array( 'totalposts' => array( 1, 1 ) ));\n\n\t\tclearstatcache();\n\t\tif ($continueTopic = filesize('forum' . $forum_id . '/' . $topic_id . '-thd.php') >= FM_MAX_THREAD_SIZE) {\n\t\t\treset($topic);\n\t\t\t$first_key = key($topic);\n\t\t\tend($topic);\n\t\t\t$last_key = key($topic);\n\t\t\t$topic[$first_key]['state'] = 'closed';\n\n\t\t\t$list[$topic_id]['state'] = 'closed';\n\t\t\t$TopicNumber = ( isset( $list[$topic_id]['tnun'] ) ) ? $list[$topic_id]['tnun'] + 1 : 2;\n\t\t\t$NewTopicPost = sprintf($fm->LANG['TopicContinue'], $fm->exbb['boardurl'], $forum_id, $topic_id, $topicname . ( ( isset( $list[$topic_id]['tnun'] ) ) ? ' - ' . $list[$topic_id]['tnun'] : '' ));\n\n\t\t\t$newtopic_id = ( count($list) !== 0 ) ? max(array_keys($list)) + 1 : 1;\n\t\t\t$check_file = 'forum' . $forum_id . '/';\n\t\t\twhile (file_exists($check_file . $newtopic_id . '-thd.php')) {\n\t\t\t\t$newtopic_id++;\n\t\t\t}\n\n\t\t\t$topic[$last_key]['post'] .= sprintf($fm->LANG['TopicContinueEnd'], $fm->exbb['boardurl'], $forum_id, $newtopic_id, $topicname, $TopicNumber);\n\t\t\t$fm->_Write($fp_topic, $topic);\n\n\t\t\t$topic_id = $newtopic_id;\n\t\t\t$topic = $fm->_Read2Write($fp_topic, 'forum' . $forum_id . '/' . $topic_id . '-thd.php');\n\n\t\t\t$list[$topic_id]['name'] = $topicname;\n\t\t\t$list[$topic_id]['id'] = $topic_id;\n\t\t\t$list[$topic_id]['fid'] = $forum_id;\n\t\t\t$list[$topic_id]['desc'] = $fm->LANG['ContinueDesc'];\n\t\t\t$list[$topic_id]['state'] = 'open';\n\t\t\t$list[$topic_id]['pinned'] = false;\n\t\t\t$list[$topic_id]['posts'] = 0;\n\t\t\t$list[$topic_id]['author'] = GetName(FM_ADMIN_ID);\n\t\t\t$list[$topic_id]['a_id'] = FM_ADMIN_ID;\n\t\t\t$list[$topic_id]['date'] = $fm->_Nowtime;\n\t\t\t$list[$topic_id]['poster'] = '';\n\t\t\t$list[$topic_id]['p_id'] = '';\n\t\t\t$list[$topic_id]['postdate'] = '';\n\t\t\t$list[$topic_id]['postkey'] = '';\n\t\t\t$list[$topic_id]['poll'] = false;\n\t\t\t$list[$topic_id]['tnun'] = $TopicNumber;\n\n\t\t\t$topic[$fm->_Nowtime]['p_id'] = FM_ADMIN_ID;\n\t\t\t$topic[$fm->_Nowtime]['post'] = $NewTopicPost;\n\t\t\t$topic[$fm->_Nowtime]['ip'] = 'is forum bot';\n\t\t\t$topic[$fm->_Nowtime]['smiles'] = false;\n\t\t\t$topic[$fm->_Nowtime]['html'] = false;\n\t\t\t$topic[$fm->_Nowtime]['name'] = $topicname;\n\t\t\t$topic[$fm->_Nowtime]['desc'] = $fm->LANG['ContinueDesc'];\n\t\t\t$topic[$fm->_Nowtime]['state'] = 'open';\n\t\t\t$topic[$fm->_Nowtime]['pinned'] = false;\n\t\t\t$topic[$fm->_Nowtime]['tnun'] = $TopicNumber;\n\t\t\t$fm->_SAVE_STATS(array( 'totalthreads' => array( 1, 1 ) ));\n\n\t\t\tinclude( 'modules/belong/_newTopic.php' );\n\n\n\t\t\t$fm->_Nowtime = $fm->_Nowtime + 15;\n\t\t}\n\t\t$topic[$fm->_Nowtime]['p_id'] = $fm->user['id'];\n\t\t$topic[$fm->_Nowtime]['post'] = preg_replace(\"#(\\?|&amp;|;|&)PHPSESSID=([0-9a-zA-Z]){32}#i\", \"\", $fm->input['inpost']);\n\t\t$topic[$fm->_Nowtime]['ip'] = $fm->_IP;\n\t\t$topic[$fm->_Nowtime]['smiles'] = $fm->_Boolean($fm->input, 'showsmiles');\n\t\t$topic[$fm->_Nowtime]['html'] = ( defined('IS_ADMIN') && $fm->_Boolean($fm->input, 'html') === true ) ? true : false;\n\t\tif ($attach !== false) {\n\t\t\t$attach_id = add_attach($attach, $forum_id, $topic_id);\n\t\t\t$topic[$fm->_Nowtime]['attach_id'] = $attach_id;\n\t\t\t$topic[$fm->_Nowtime]['attach_file'] = $attach['NAME'];\n\t\t}\n\t\tunset( $attach );\n\t\t$last_key = $fm->_Nowtime;\n\n\t\t// Сохраним информацию о кол-ве просмотров на случай обнуления views.php\n\t\t$views = $fm->_Read('forum' . $forum_id . '/views.php');\n\t\tif (isset( $views[$topic_id] )) {\n\t\t\t$viewsArrayKeys = array_keys($topic);\n\t\t\t$topic[reset($viewsArrayKeys)]['views'] = $views[$topic_id];\n\t\t}\n\t}\n\n\t/* Сохраняем флокнутые файлы*/\n\t$fm->_Write($fp_topic, $topic);\n\n\t$TotalPosts = count($topic) - 1;\n\tunset( $allmessages );\n\n\tif ($PostAdded) {\n\t\t$allforums[$forum_id]['posts']++;\n\n\t\tif ($continueTopic) {\n\t\t\t$allforums[$forum_id]['topics']++;\n\t\t}\n\t}\n\n\t$allforums[$forum_id]['last_poster'] = $fm->user['name'];\n\t$allforums[$forum_id]['last_poster_id'] = $fm->user['id'];\n\t$allforums[$forum_id]['last_post'] = $list[$topic_id]['name'];\n\t$allforums[$forum_id]['last_post_id'] = $topic_id;\n\t$allforums[$forum_id]['last_key'] = $last_key;\n\t$allforums[$forum_id]['last_time'] = $fm->_Nowtime;\n\n\t/* Если ответ был в подфорум, то выведем инфу о ластпосте также в родительском форуме на главной */\n\t$pcatid = $allforums[$forum_id]['catid'];\n\t$pforum = ( stristr($pcatid, 'f') ) ? substr($pcatid, 1, strlen($pcatid) - 1) : 0;\n\tif ($pforum) {\n\t\tif ($PostAdded) {\n\t\t\t$allforums[$pforum]['posts']++;\n\t\t}\n\t\t$allforums[$pforum]['last_poster'] = $fm->user['name'];\n\t\t$allforums[$pforum]['last_poster_id'] = $fm->user['id'];\n\t\t$allforums[$pforum]['last_post'] = $list[$topic_id]['name'];\n\t\t$allforums[$pforum]['last_post_id'] = $topic_id;\n\t\t$allforums[$pforum]['last_key'] = $last_key;\n\t\t$allforums[$pforum]['last_time'] = $fm->_Nowtime;\n\t\t$allforums[$pforum]['last_sub'] = $forum_id;\n\t}\n\telse {\n\t\tunset( $allforums[$forum_id]['last_sub'] );\n\t}\n\n\t$fm->_Write($fp_allforums, $allforums);\n\n\t$list[$topic_id]['posts'] = $TotalPosts;\n\t$list[$topic_id]['poster'] = ( $fm->user['id'] === 0 ) ? false : $fm->user['name'];\n\t$list[$topic_id]['p_id'] = $fm->user['id'];\n\t$list[$topic_id]['postkey'] = $last_key;\n\t$list[$topic_id]['postdate'] = $fm->_Nowtime;\n\n\t// Удаление старого ключа views из list.php - пример работы конвертации на лету\n\tif (isset( $list[$topic_id]['views'] )) {\n\t\tunset( $list[$topic_id]['views'] );\n\t}\n\n\tuasort($list, 'sort_by_postdate');\n\t$fm->_Write($fp_list, $list);\n\n\tif ($fm->user['id'] !== 0 && $PostAdded === true) {\n\t\t/* Топ-лист пользователей */\n\t\tinclude( 'modules/userstop/post.php' );\n\t\t$user = $fm->_Read2Write($fp_user, 'members/' . $fm->user['id'] . '.php');\n\t\t$user['posts'] += 1 + $continueTopic;\n\t\tif ($allforums[$forum_id]['private'] === false) {\n\t\t\t$user['lastpost']['date'] = $fm->_Nowtime;\n\t\t\t$user['lastpost']['link'] = 'topic.php?forum=' . $forum_id . '&topic=' . $topic_id;\n\t\t\t$user['lastpost']['name'] = $topicname;\n\t\t}\n\t\t$user['posted'][$forum_id] = ( isset( $user['posted'][$forum_id] ) ) ? $user['posted'][$forum_id] + 1 + $continueTopic : 1;\n\t\t$fm->_Write($fp_user, $user);\n\t\t$allusers = $fm->_Read2Write($fp_allusers, FM_USERS, false);\n\t\t$allusers[$fm->user['id']]['p'] = $user['posts'];\n\t\t$fm->_Write($fp_allusers, $allusers);\n\t\tunset( $user );\n\t}\n\n\tif ($fm->exbb['emailfunctions'] === true && $fm->exbb['mail_posts'] === true) {\n\t\t$_t_track = $fm->_Read2Write($fp_t_track, 'forum' . $forum_id . '/_t_track.php');\n\n\t\tif ($fm->_Boolean($fm->input, 'notify') === true && $fm->user['id'] !== 0) {\n\t\t\t$_t_track[$topic_id][$fm->user['id']] = 1;\n\t\t\t$fm->_Write($fp_t_track, $_t_track);\n\t\t}\n\t\telse {\n\t\t\t$fm->_Fclose($fp_t_track);\n\t\t}\n\n\t\t$emailers = ( isset( $_t_track[$topic_id] ) ) ? $_t_track[$topic_id] : array();\n\t\tif (isset( $emailers[$fm->user['id']] )) {\n\t\t\tunset( $emailers[$fm->user['id']] );\n\t\t}\n\n\t\t/* Отправка всем подписавшимся на тему */\n\t\tif (count($emailers) !== 0 && $PostAdded === true) {\n\t\t\t$email = sprintf($fm->LANG['NewPostNotify'], $forumname, $fm->exbb['boardname'], $fm->user['name'], date(\"d-m-Y H:i:s\", $fm->_Nowtime), $fm->input['inpost'], $fm->exbb['boardurl'] . '/topic.php?forum=' . $forum_id . '&topic=' . $topic_id . '&postid=' . $last_key, $fm->exbb['boardurl'], $forum_id, $topic_id);\n\t\t\t$fm->_Mail($fm->exbb['boardname'], $fm->exbb['adminemail'], $emailers, $fm->LANG['NotifyNewPost'] . '\"' . strip_tags($forumname) . '\"', $email);\n\t\t\tunset( $emailers );\n\t\t}\n\t} # end email send.\n\tinclude( 'modules/belong/_addReply.php' );\n\n\t$_SESSION['lastposttime'] = $fm->_Nowtime - 10;\n\n\t$fm->_Message($fm->LANG['ReplyCreate'], $fm->LANG['ReplyAddedOk'], 'topic.php?forum=' . $forum_id . '&topic=' . $topic_id . '&postid=' . $last_key . '#' . $last_key);\n}", "title": "" }, { "docid": "9537f7dade5d3f330a755cd3c9664b45", "score": "0.57771796", "text": "function dwqa_subscrible_enable_new_answer_followers_notification(){\n\techo '<th>'.__( 'Enable?','dwqa' ).'</th><td><input type=\"checkbox\" value=\"1\" '.checked( 1, get_option( 'dwqa_subscrible_enable_new_answer_followers_notification', 1 ), false ).' name=\"dwqa_subscrible_enable_new_answer_followers_notification\" id=\"dwqa_subscrible_enable_new_answer_followers_notification\" ><span class=\"description\">'.__( 'Enable notification for new answer ( to Followers ).', 'dwqa' ).'</span></td>';\n}", "title": "" }, { "docid": "844c14ae6f388a927116fd936d3d485e", "score": "0.57714874", "text": "public function updateAnswerStatus()\n\t{\n\t\t$records = $this->post('records');\n\t\t\n\t\t$where_condtion_array = array('question_answer_id' => $records['question_answer_id']);\n\t\t$affected_rows = $this->Question_Management_Model->updateRecords($records,QUESTIONANSWERS,$where_condtion_array);\n\t\t\t\n\t\t\tif($affected_rows == 1) //&& (count($answers) == $affected_rows_child))\n\t\t\t{\n\t\t\t\t\t$data['dataStatus'] = true;\n\t\t\t\t\t$data['status'] = REST_Controller::HTTP_OK;\n\t\t\t\t\t$data['record'] = $affected_rows;\n\t\t\t\t\t$this->response($data,REST_Controller::HTTP_OK);\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\t$data['dataStatus'] = false;\n\t\t\t\t\t$data['status'] = REST_Controller::HTTP_NOT_MODIFIED;\n\t\t\t\t\t$this->response($data,REST_Controller::HTTP_OK);\n\t\t\t\n\t\t\t\n\t\t\t}\t\t\n\t}", "title": "" }, { "docid": "cb6b2e93b6d76f7cd6f6c7f906dc12df", "score": "0.572813", "text": "function dwqa_subscrible_enable_new_answer_notification(){\n\techo '<th>'.__( 'Enable?','dwqa' ).'</th><td><input type=\"checkbox\" value=\"1\" '.checked( 1, get_option( 'dwqa_subscrible_enable_new_answer_notification', 1 ), false ).' name=\"dwqa_subscrible_enable_new_answer_notification\" id=\"dwqa_subscrible_enable_new_answer_notification\" ><span class=\"description\">'.__( 'Enable notification for new answer.', 'dwqa' ).'</span></td>';\n}", "title": "" }, { "docid": "48096f22930d40bc26dec7df1f4fd18d", "score": "0.5707599", "text": "public function getAnsweredStatus();", "title": "" }, { "docid": "5f58f47e39d4fb51f501756c2e70ebad", "score": "0.57034236", "text": "function add_answer($DB, $ID_user){\n\n $query = \"UPDATE statistics SET nb_answer = (SELECT count(*) FROM message WHERE ID_user=\".$ID_user.\" AND ID_type_message = 2) WHERE ID_user='\" . $ID_user . \"'\";\n if($DB->updateDB($query)){\n if(update_point($DB, $ID_user))\n return true;\n }\n}", "title": "" }, { "docid": "e0fe9a90700e4834b4215fac69ab0317", "score": "0.56875664", "text": "function dwqa_subscrible_enable_new_comment_question_followers_notification(){\n\techo '<th>'.__( 'Enable?','dwqa' ).'</th><td><input type=\"checkbox\" '.checked( 1, get_option( 'dwqa_subscrible_enable_new_comment_question_followers_notify', 1 ), false ).' value=\"1\" name=\"dwqa_subscrible_enable_new_comment_question_followers_notify\" id=\"dwqa_subscrible_enable_new_comment_question_followers_notify\" ><span class=\"description\">'.__( 'Enable notification for new comment of question.', 'dwqa' ).'</span></td>';\n}", "title": "" }, { "docid": "ff8151b7bef7cdf8db3a4ea069895817", "score": "0.5629547", "text": "function AdminUI(){\r\n\r\n\r\nif(checkAdmin()==true){\r\n?>\r\n<b>FAQ Admin</b>\r\n<br>\r\n<form method=\"post\" action=\"?faqadmin=true\">\r\nQ:<input type=\"text\" name=\"QSub\" style=\"width: 500px\"><br>\r\nA:<textarea name=\"ASub\" style=\"width: 500px; height: 150px\"></textarea><br>\r\n<input type=\"submit\" value=\"Add\">\r\n</form>\r\n</div>\r\n<?php\r\n}else{\r\necho \"You are not authorized\";\r\n}\r\n\r\n}", "title": "" }, { "docid": "ec53317b0f32199b063c11ba870bd853", "score": "0.5593877", "text": "public function addAdminAnswer(){\n\n if (!$this->isUseAdmin()){\n return true;\n }\n\n $voteId = (integer)$this->InputFilter->getParameter(\"voteId\");\n $text = (string)$this->InputFilter->getParameter(\"text\");\n $answers = (string)$this->InputFilter->getParameter(\"answers\");\n $active = (integer)$this->InputFilter->getParameter(\"active\");\n $voteOrder = (integer)$this->InputFilter->getParameter(\"voteOrder\");\n\n $this->MySQL->query(\"INSERT INTO votes_answers (`vote_id`, `answers`, `active`, `vote_order`) VALUES( $voteId, '$answers', $active, $voteOrder)\");\n\n $answerId = $this->MySQL->insertedId();\n\n $this->MySQL->query(\"INSERT INTO votes_answers_languages (`answer_id`, `language_id`, `text`) VALUES( $answerId, {$this->languageId}, '$text')\");\n\n return true;\n\n }", "title": "" }, { "docid": "dfffe29bf7c311c97d3ed328b95a9528", "score": "0.5571139", "text": "function toggle_notifications_forum() // Type\n\t{\n\t\trequire_code('notifications2');\n\t\treturn notifications_ui_advanced('ocf_topic',do_lang_tempcode('NOW_ENABLED_NOTIFICATIONS_FORUM'),do_lang_tempcode('NOW_DISABLED_NOTIFICATIONS_FORUM'));\n\t}", "title": "" }, { "docid": "e78f661796d38944b574a28be64a3e2f", "score": "0.5563453", "text": "public function setAnswers(){\n\n $discussion_id = $this->input->post('id');\n $answer = $this->input->post('answer');\n $if_teacher = 1;\n if($this->session->userdata('user_details')->getUsertype()==='4'){\n $if_teacher = 1;\n }else{\n $if_teacher = 0;\n }\n $query = $this->DiscussionPortalManager_model->setAnswer($discussion_id,$if_teacher,$answer);\n echo json_encode($query);\n }", "title": "" }, { "docid": "a8324bcaaaa9367d4d7d08cd6aae30ce", "score": "0.5550446", "text": "function faq()\n{\n\t \t\t\t$where = array('faq_status' => '1');\n \t$data['faq'] =$this->login_model->get_data_where_condition('faq', $where);\n $this->load->view('newadmin/menu');\n $this->load->view('newadmin/header');\n $this->load->view('newadmin/listing/faq', $data);\n $this->load->view('newadmin/footer');\n}", "title": "" }, { "docid": "643378eafea96590a13976e144f66526", "score": "0.5549813", "text": "public static function update_feedback() : void {\n\t\t$post_id = $_POST['post_id'];\n\t\t$opts = get_option( 'itph_plugin_options' );\n\n\t\tif ( $opts['answer_set_type'] == 'standard' ) {\n\t\t\t$field_name = 'itph_sset_' . ( $_POST['value'] == 'positive' ? 'positive' : 'negative' );\n\t\t} elseif ( $opts['answer_set_type'] == 'custom' ) {\n\t\t\t$field_name = 'itph_cset_' . htmlspecialchars( $_POST['value'] );\n\t\t} elseif ( $opts['answer_set_type'] == 'stars' ) {\n\t\t\t$field_name = 'itph_star_' . $_POST['value'];\n\t\t}\n\n\t\t$current_value = (int) get_post_meta( $post_id, $field_name, true ) ?: 0;\n\t\tupdate_post_meta( $post_id, $field_name, $current_value + 1 );\n\t}", "title": "" }, { "docid": "be2ef5f693f7c341faae3904de445cb8", "score": "0.5549241", "text": "function mysupport_inline_thread_moderation()\r\n{\r\n\tglobal $mybb, $db, $cache, $lang, $templates, $foruminfo, $mysupport_inline_thread_moderation;\r\n\t\r\n\t$lang->load(\"mysupport\");\r\n\t\r\n\t$mysupport_solved = $mysupport_not_solved = $mysupport_solved_and_close = $mysupport_technical = $mysupport_not_technical = \"\";\r\n\tif(mysupport_usergroup(\"canmarksolved\"))\r\n\t{\r\n\t\t$mysupport_solved = \"<option value=\\\"mysupport_status_1\\\">-- \".$lang->solved.\"</option>\";\r\n\t\t$mysupport_not_solved = \"<option value=\\\"mysupport_status_0\\\">-- \".$lang->not_solved.\"</option>\";\r\n\t\tif($mybb->settings['mysupportclosewhensolved'] != \"never\")\r\n\t\t{\r\n\t\t\t$mysupport_solved_and_close = \"<option value=\\\"mysupport_status_3\\\">-- \".$lang->solved_close.\"</option>\";\r\n\t\t}\r\n\t}\r\n\tif($mybb->settings['enablemysupporttechnical'] == 1)\r\n\t{\r\n\t\tif(mysupport_usergroup(\"canmarktechnical\"))\r\n\t\t{\r\n\t\t\t$mysupport_technical = \"<option value=\\\"mysupport_status_2\\\">-- \".$lang->technical.\"</option>\";\r\n\t\t\t$mysupport_not_technical = \"<option value=\\\"mysupport_status_4\\\">-- \".$lang->not_technical.\"</option>\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t$mysupport_onhold = $mysupport_offhold = \"\";\r\n\tif($mybb->settings['enablemysupportonhold'] == 1)\r\n\t{\r\n\t\tif(mysupport_usergroup(\"canmarksolved\"))\r\n\t\t{\r\n\t\t\t$mysupport_onhold = \"<option value=\\\"mysupport_onhold_1\\\">-- \".$lang->hold_status_onhold.\"</option>\";\r\n\t\t\t$mysupport_offhold = \"<option value=\\\"mysupport_onhold_0\\\">-- \".$lang->hold_status_offhold.\"</option>\";\r\n\t\t}\r\n\t}\r\n\t\r\n\tif($mybb->settings['enablemysupportassign'] == 1)\r\n\t{\r\n\t\t$mysupport_assign = \"\";\r\n\t\t$assign_users = mysupport_get_assign_users();\r\n\t\t// only continue if there's one or more users that can be assigned threads\r\n\t\tif(!empty($assign_users))\r\n\t\t{\r\n\t\t\tforeach($assign_users as $assign_userid => $assign_username)\r\n\t\t\t{\r\n\t\t\t\t$mysupport_assign .= \"<option value=\\\"mysupport_assign_\".intval($assign_userid).\"\\\">-- \".htmlspecialchars_uni($assign_username).\"</option>\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tif($mybb->settings['enablemysupportpriorities'] == 1)\r\n\t{\r\n\t\t$mysupport_cache = $cache->read(\"mysupport\");\r\n\t\t$mysupport_priorities = \"\";\r\n\t\t// only continue if there's any priorities\r\n\t\tif(!empty($mysupport_cache['priorities']))\r\n\t\t{\r\n\t\t\tforeach($mysupport_cache['priorities'] as $priority)\r\n\t\t\t{\r\n\t\t\t\t$mysupport_priorities .= \"<option value=\\\"mysupport_priority_\".intval($priority['mid']).\"\\\">-- \".htmlspecialchars_uni($priority['name']).\"</option>\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t$mysupport_categories = \"\";\r\n\t$categories_users = mysupport_get_categories($foruminfo['fid']);\r\n\t// only continue if there's any priorities\r\n\tif(!empty($categories_users))\r\n\t{\r\n\t\tforeach($categories_users as $category_id => $category_name)\r\n\t\t{\r\n\t\t\t$mysupport_categories .= \"<option value=\\\"mysupport_priority_\".intval($category_id).\"\\\">-- \".htmlspecialchars_uni($category_name).\"</option>\\n\";\r\n\t\t}\r\n\t}\r\n\t\r\n\teval(\"\\$mysupport_inline_thread_moderation = \\\"\".$templates->get('mysupport_inline_thread_moderation').\"\\\";\");\r\n}", "title": "" }, { "docid": "1503678618a143e8dbd37b25bbf8c85e", "score": "0.5547904", "text": "public function replyEnquiryForm() {\n $enquiry = $this->enquiriesTable->retrieveRecord('id', $this->get['id'])[0];\n\n // Check if $enquiry is empty or has an answered value equal to 1. If so,\n // redirect the user back to /admin/enquiries.\n if (empty($enquiry) || $enquiry->answered == 1)\n header('Location: /admin/enquiries');\n\n return [\n 'layout' => 'sidebarlayout.html.php',\n 'template' => 'admin/reply.html.php',\n 'variables' => [\n 'enquiry' => $enquiry\n ],\n 'title' => 'Admin Panel - Enquiries - Reply'\n ]; \n }", "title": "" }, { "docid": "e188a5e8e810c9c86f1b29c27ad2345f", "score": "0.5546394", "text": "public function reply_action($id=0)\n {\n\n if($_POST)\n {\n $post=$_POST;\n foreach ($post as $key => $value) \n {\n $$key=$value;\n }\n }\n \n $data['ticket_reply_text'] = $ticket_reply_text;\n $data['user_id'] = $this->user_id;\n $data['reply_id'] = $id;\n\n if($this->basic->insert_data('fb_support_desk_reply',$data))\n {\n\n if($this->session->userdata(\"user_type\")==\"Member\")\n { \n $id= $id; \n $url = site_url().\"simplesupport/reply_support/\".$id;\n $url_final=\"<a href='\".$url.\"' target='_BLANK'>\".$url.\"</a>\";\n $message = \"<p>\".$this->lang->line(\"The customer has responded to the ticket\").\"</p>\n </br>\n </br>\n <p>\".$this->lang->line('hi').\" \".$this->lang->line('admin').\", </p>\n </br>\n </br>\n <p>\".$this->lang->line(word_limiter($data['ticket_reply_text'],50)).\" </p>\n </br>\n </br>\n <p>\".$this->lang->line(\"go to this url\").\":\".$url_final.\"</p>\n \";\n\n\n $from = $this->session->userdata(\"user_login_email\");\n $to = $this->config->item('institute_email');\n $subject = $this->config->item('product_name').\" | \".$this->lang->line(\"support ticket\");\n $mask = $subject;\n $html = 1;\n $this->_mail_sender($from, $to, $subject, $message, $mask, $html);\n $this->session->set_flashdata('success_message', 1);\n redirect('simplesupport/reply_support/'.$id.'', 'location'); \n }\n else\n {\n $id= $id; \n $url = site_url().\"simplesupport/reply_support/\".$id;\n $url_final=\"<a href='\".$url.\"' target='_BLANK'>\".$url.\"</a>\";\n $message = \"<p>\".$this->lang->line(\"Admin has responded to the your ticket\").\"</p>\n </br>\n </br>\n <p>\".$this->lang->line('hi').\" \".$this->lang->line('customer').\", </p>\n </br>\n </br>\n <p>\".$this->lang->line(word_limiter($data['ticket_reply_text'],50)).\" </p>\n </br>\n </br>\n <p>\".$this->lang->line(\"go to this url\").\":\".$url_final.\"</p>\n \";\n\n\n $from = $this->config->item('institute_email');\n if($this->session->userdata(\"user_type\")==\"Admin\")\n $where=array('where' => array('fb_simple_support_desk.id' => $id));\n else $where=array('where' => array('fb_support_desk_reply.reply_id' => $id));\n $table = \"fb_support_desk_reply\";\n $join = array(\n 'users' => 'fb_support_desk_reply.user_id=users.id,left',\n 'fb_simple_support_desk' => 'fb_support_desk_reply.user_id = fb_simple_support_desk.user_id,left'\n );\n $tomail = $this->basic->get_data($table,$where,$select='',$join);\n\n foreach($tomail as $key=>$value)\n { \n\n if(isset($value['user_type']) && $value['user_type'] == \"Member\")\n {\n $to = $value['email']; \n \n\n }\n \n \n }\n \n \n $subject = $this->config->item('product_name').\" | \".$this->lang->line(\"support ticket\");\n $mask = $subject;\n $html = 1;\n $this->_mail_sender($from, $to, $subject, $message, $mask, $html);\n $this->session->set_flashdata('success_message', 1);\n redirect('simplesupport/reply_support/'.$id.'', 'location'); \n }\n\n }\n \n\n \n\n \n\n\n }", "title": "" }, { "docid": "636b6d47c8bc0ba31fbf176f840e618b", "score": "0.554492", "text": "static function check_edit_post_request(){\n\t\t$postId = $_GET['post'];\n\t\t$current_user = wp_get_current_user();\n\t\tif(isset($_GET['qpa']) && $_GET['qpa'] == 'review' && isset($_GET['kid'])){\n\t\t\t$_SESSION['qonnector_plan_action'] = $_GET['qpa'];\n\t\t\t$_SESSION['qonnector_plan_keyword_id'] = $_GET['kid'];\n\t\t\t$_SESSION['qonnector_current_user_role'] = $current_user->roles[0];\n\t\t\t$_SESSION['qonnector_plan_user_id'] = $current_user->ID;\n\t\t\t$_SESSION['qonnector_post_status'] = 'pending';\n\t\t} else {\n\t\t\t$plan_user = get_post_meta($postId,'qonnector_plan_user_id',true);\n\t\t\t$post_status = get_post_meta($postId,'qonnector_post_status',true);\n\t\t\t$action = get_post_meta($postId,'qonnector_plan_action',true);\n\t\t\t$keywor_id = get_post_meta($postId,'qonnector_plan_keyword_id',true);\t\t\t\n\t\t\tif($plan_user == $current_user->ID && ($post_status == 'pending' || $post_status == 'completed') ){\n\t\t\t\t$_SESSION['qonnector_plan_action'] = $action;\n\t\t\t\t$_SESSION['qonnector_plan_keyword_id'] = $keywor_id;\n\t\t\t\t$_SESSION['qonnector_current_user_role'] = $current_user->roles[0];\n\t\t\t\t$_SESSION['qonnector_plan_user_id'] = $current_user->ID;\n\t\t\t\t$_SESSION['qonnector_post_status'] = $post_status;\n\t\t\t\t/*\n\t\t\t\tif($action=='write'){\n\t\t\t\t\t$current_user->set_role('contributor'); \n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t}\n\t\t}\t\n\t}", "title": "" }, { "docid": "86d6f2cd6776cb56836b00e288a71eec", "score": "0.5542314", "text": "public function reply_valid()\n{\n\tif($this->input->get('stat')==\"valued\")\n\t{\n\t$stat = array('value' => $this->input->get('stat')); \n$this->db->where('ID', $this->input->get('rid'));\n$this->db->update('reply_ques', $stat);\n\t$this->db->select('Userid');\n\t$this->db->where(\"Quesid=\",$this->input->get('qid'));\n\t$this->db->from('reply_ques');\n\t$uid=$this->db->get()->row()->Userid;\n\t$this->db->set('best_answers', 'best_answers + 1', FALSE);\n\t$this->db->where('id=',$uid);\n\t$this->db->update('neko_user_data');\n\t$this->db->set('user_points', 'user_points+15', FALSE);\n\t$this->db->where('id=',$uid);\n\t$this->db->update('neko_user_data');\n\t}\n\tif($this->input->get('stat')==\"undefined\")\n\t{\n\t$stat = array('value' => $this->input->get('stat')); \n$this->db->where('ID', $this->input->get('rid'));\n$this->db->update('reply_ques', $stat); \n$this->db->select('Userid');\n\t$this->db->where(\"Quesid=\",$this->input->get('qid'));\n\t$this->db->from('reply_ques');\n\t$uid=$this->db->get()->row()->Userid;\n\t$this->db->set('best_answers', 'best_answers - 1', FALSE);\n\t$this->db->where('id=',$uid);\n\t$this->db->update('neko_user_data');\n\t$this->db->set('user_points', 'user_points-15', FALSE);\n\t$this->db->where('id=',$uid);\n\t$this->db->update('neko_user_data');\n\t}\n\n\t$url=base_url('index.php/home/ques_open?id='.$this->input->get('qid'));\n\tredirect($url);\n\n}", "title": "" }, { "docid": "c81f5e292d44f2ce02041f6e73c3fa6d", "score": "0.5532083", "text": "function plugin_cclabel_faq()\n{\n global $_CONF, $LANG_FAQ_COMMON;\n\n if (SEC_hasRights ('faq.edit,faq.admin','OR')) {\n return array ($LANG_FAQ_COMMON['FAQ'],\n $_CONF['site_admin_url'] . '/plugins/faq/index.php',\n plugin_geticon_faq ());\n }\n\n return false;\n}", "title": "" }, { "docid": "47a03f0d9d998285c08c660e98febc1f", "score": "0.5516198", "text": "function dwqa_subscrible_enable_new_comment_question_notification(){\n\techo '<th>'.__( 'Enable?','dwqa' ).'</th><td><input type=\"checkbox\" '.checked( 1, get_option( 'dwqa_subscrible_enable_new_comment_question_notification', 1 ), false ).' value=\"1\" name=\"dwqa_subscrible_enable_new_comment_question_notification\" id=\"dwqa_subscrible_enable_new_comment_question_notification\" ><span class=\"description\">'.__( 'Enable notification for new comment of question.', 'dwqa' ).'</span></td>';\n}", "title": "" }, { "docid": "2cfb806499060ba46fc66cd8b275a529", "score": "0.5489229", "text": "public function newAnswer() //add a new asnwer\n {\n if ( (isset($_GET['postId'])) AND (isset($_GET['postId']) >= (int) 0)){\n if ( (isset($_GET['comId'])) AND (isset($_GET['comId'])>= (int) 0) AND (isset($_POST['author'])) AND (isset($_POST['answer'])) ){\n if ( (!(empty($_POST['author']) )) AND ((!empty($_POST['answer']))) ) {\n $manager = new PostManager();\n $values = array('Author' => $_POST['author'], 'Topic' => '', 'PostId' =>$_GET['postId'], 'Answ'=>$_POST['answer'] , 'AnswerId'=>$_GET['comId'], );\n //manager call to add answer in db\n $manager->addAnswer($values);\n //redirection to current post\n $myView = new View('');\n $myView->redirect('reply.html?comId='.$_GET['comId']);\n\n }else {\n $myView = new View('');\n $myView->redirect('reply.html?comId='.$_GET['comId']);\n }\n }else{\n $myView = new View('');\n $myView->redirect('post.html?postId=' . $_GET['postId']);\n }\n }else {\n $myView = new View('error');\n $myView->build( array('chapters'=> null ,'comments'=>null,'warningList' => null,'HOST'=>HOST, 'adminLevel' => $_SESSION['adminLevel']));\n }\n }", "title": "" }, { "docid": "fe78b881331dad0480b0b65f8d2cf02b", "score": "0.5469894", "text": "function news_mark()\n{\n global $mybb, $db, $errors;\n\n $nid = $_POST['nid'];\n if ($nid == '') {\n return;\n }\n\n if (!news_allowed($mybb->settings['news_canflag'], news_usergroups())) {\n $errorlist = '<li>' . $lang->news_no_permission . '</li>';\n $errors = eval($templates->render('error_inline'));\n return;\n }\n\n $db->update_query(\n 'news',\n array(\n 'important' => !((bool) $_POST['important']),\n ),\n 'nid = ' . $nid\n );\n}", "title": "" }, { "docid": "a3073b45906ad3aeb6547742d5987f87", "score": "0.5466893", "text": "function admin_forum_editform() {\n\tglobal $mybb, $lang, $form, $form_container, $forum_data;\n\n\t// Create the input fields\n\tif ($form_container->_title == $lang->additional_forum_options)\n\t{\n\t\t$forum_isic = array(\n\t\t\t\t$form->generate_check_box(\"icforum\", 1, \"Forum is used for in-character posts\", array(\"checked\" => $forum_data['icforum']))\n\t\t);\n\t\t$form_container->output_row(\"IC Forum\", \"\", \"<div class=\\\"forum_settings_bit\\\">\".implode(\"</div><div class=\\\"forum_settings_bit\\\">\", $forum_isic).\"</div>\");\n\t}\n}", "title": "" }, { "docid": "9de2b42c84715d43117fd7263393c26b", "score": "0.54533696", "text": "function makeFeUserStat($fe_user_uid)\t{\ndebug($fe_user_uid,1);\n\n\t\t\t// Counting thread starters\n\t\t$query=\"SELECT count(*) FROM tx_maillisttofaq_ml WHERE fe_user=\".intval($fe_user_uid).\n\t\t\t\t\" AND reply<=0\".\n\t\t\t\t$this->cObj->enableFields(\"tx_maillisttofaq_ml\");\n\t\t$res=mysql(TYPO3_db,$query);\n\t\tlist($count) = mysql_fetch_row($res);\ndebug(\"Qs:\".$count,1);\n\n\t\t\t// Counting answers\n\t\t$query=\"SELECT count(*) FROM tx_maillisttofaq_ml WHERE fe_user=\".intval($fe_user_uid).\n\t\t\t\t\" AND reply>0\".\n\t\t\t\t$this->cObj->enableFields(\"tx_maillisttofaq_ml\");\n\t\t$res=mysql(TYPO3_db,$query);\n\t\tlist($count) = mysql_fetch_row($res);\ndebug(\"As:\".$count,1);\n\n\t\t\t// Counting answers with stars\n\t\t$query=\"SELECT count(*) FROM tx_maillisttofaq_ml WHERE fe_user=\".intval($fe_user_uid).\n\t\t\t\t\" AND reply>0\".\n\t\t\t\t\" AND rating>0\".\n\t\t\t\t$this->cObj->enableFields(\"tx_maillisttofaq_ml\");\n\t\t$res=mysql(TYPO3_db,$query);\n\t\tlist($count) = mysql_fetch_row($res);\ndebug(\"Star-As:\".$count,1);\n\n\t\t\t// Managed threads\n\t\t$query=\"SELECT count(*) FROM tx_maillisttofaq_ml WHERE moderator_fe_user=\".intval($fe_user_uid).\n\t\t\t\t\" AND reply<=0\".\n\t\t\t\t$this->cObj->enableFields(\"tx_maillisttofaq_ml\");\n\t\t$res=mysql(TYPO3_db,$query);\n\t\tlist($count) = mysql_fetch_row($res);\ndebug(\"Mg:\".$count,1);\n\n\t\t\t// FULLY Managed threads\n\t\t$query=\"SELECT count(*) FROM tx_maillisttofaq_ml WHERE moderator_fe_user=\".intval($fe_user_uid).\n\t\t\t\t\" AND reply<=0\".\n\t\t\t\t\" AND moderator_status=1\".\n\t\t\t\t$this->cObj->enableFields(\"tx_maillisttofaq_ml\");\n\t\t$res=mysql(TYPO3_db,$query);\n\t\tlist($count) = mysql_fetch_row($res);\ndebug(\"Full-Mg:\".$count,1);\n\n\t\t\t// Counting FAQ items\n\t\t$query=\"SELECT count(*) FROM tx_maillisttofaq_faq WHERE fe_user=\".intval($fe_user_uid).\n\t\t\t\t$this->cObj->enableFields(\"tx_maillisttofaq_faq\");\n\t\t$res=mysql(TYPO3_db,$query);\n\t\tlist($count) = mysql_fetch_row($res);\ndebug(\"FAQs:\".$count,1);\n\n\n\n\t\t\t// Counting thread starters\n\t\t$query=\"SELECT fe_user,count(*) FROM tx_maillisttofaq_ml WHERE fe_user>0\".\n\t\t\t\t\" AND reply<=0\".\n\t\t\t\t$this->cObj->enableFields(\"tx_maillisttofaq_ml\").\n\t\t\t\t\" GROUP BY fe_user\";\n\t\t$res=mysql(TYPO3_db,$query);\n\t\t$items=array();\n\t\twhile($row=mysql_fetch_assoc($res))\t{\n\t\t\t$items[]=$row;\n\t\t}\ndebug(array(\"ALL_fe_users - thread starters\",$items));\n\n\t\t\t// Counting thread starters\n\t\t$query=\"SELECT fe_user,count(*) FROM tx_maillisttofaq_ml WHERE fe_user>0\".\n\t\t\t\t\" AND reply>0\".\n\t\t\t\t$this->cObj->enableFields(\"tx_maillisttofaq_ml\").\n\t\t\t\t\" GROUP BY fe_user\";\n\t\t$res=mysql(TYPO3_db,$query);\n\t\t$items=array();\n\t\twhile($row=mysql_fetch_assoc($res))\t{\n\t\t\t$items[]=$row;\n\t\t}\ndebug(array(\"ALL_fe_users - answers\",$items));\n\n\t}", "title": "" }, { "docid": "2e3ce5554ba57beb0b89ae938973ca7c", "score": "0.5438515", "text": "public function replyEnquirySubmit() {\n if (isset($this->post['submit'])) {\n $enquiry = $this->enquiriesTable->retrieveRecord('id', $this->get['id'])[0];\n\n $errors = [];\n\n if ($this->post['reply']['message'] == '')\n $errors[] = 'Your message cannot be blank.';\n \n if (count($errors) == 0) {\n $this->post['reply']['message'] = htmlspecialchars(strip_tags($this->post['reply']['message']), ENT_QUOTES, 'UTF-8');\n \n $this->enquiryRepliesTable->save($this->post['reply']);\n \n $enquiryValues = [\n 'id' => $enquiry->id,\n 'answered' => 1\n ];\n\n $this->enquiriesTable->save($enquiryValues);\n \n $template = 'admin/replysuccess.html.php';\n\n $variables = [\n 'enquiry' => $enquiry\n ];\n }\n else {\n $template = 'admin/reply.html.php';\n\n $variables = [\n 'errors' => $errors,\n 'enquiry' => $enquiry\n ]; \n }\n }\n\n return [\n 'layout' => 'sidebarlayout.html.php',\n 'template' => $template,\n 'variables' => $variables,\n 'title' => 'Admin Panel - Enquriries - Reply'\n ];\n }", "title": "" }, { "docid": "3bca11d133479c60347b8e3ffa74e8bc", "score": "0.54160833", "text": "function forumThreadsResponses()\n {\n return \"Moo's\";\n }", "title": "" }, { "docid": "febf315f844aa5641adc2dd748f5cb2f", "score": "0.5408843", "text": "public function doForumInteractions() {\n if ($this->newThreadView->userWantsToViewThreadCreation())\n $this->doCreateNewThread();\n else if ($this->threadView->userWantsToViewThread())\n $this->doDisplayThread();\n else if ($this->postView->userWantsToViewPost())\n $this->doDisplayPost();\n else\n $this->doDisplayThreads();\n }", "title": "" }, { "docid": "ee4f14de2aec09231729c1218d7bf826", "score": "0.53947914", "text": "function pnForum_user_moderateforum($args=array())\n{\n // get the input\n if(count($args)>0) {\n extract($args);\n unset($args);\n } else {\n $forum_id = (int)pnVarCleanFromInput('forum');\n $start = (int)pnVarCleanFromInput('start');\n $mode = pnVarCleanFromInput('mode');\n $submit = pnVarCleanFromInput('submit');\n\t\t$topic_ids= pnVarCleanFromInput('topic_id');\n $shadow = pnVarCleanFromInput('createshadowtopic');\n $moveto = pnVarCleanFromInput('moveto');\n $jointo = pnVarCleanFromInput('jointo');\n }\n $shadow = (empty($shadow)) ? false : true;\n\n list($last_visit, $last_visit_unix) = pnModAPIFunc('pnForum', 'user', 'setcookies');\n\n // Get the Forum for Display and Permission-Check\n $forum = pnModAPIFunc('pnForum', 'user', 'readforum',\n array('forum_id' => $forum_id,\n 'start' => $start,\n 'last_visit' => $last_visit,\n 'last_visit_unix' => $last_visit_unix));\n\n\tif(!allowedtomoderatecategoryandforum($forum['cat_id'], $forum['forum_id'])) {\n // user is not allowed to moderate this forum\n return showforumerror(getforumerror('auth_mod',$post['forum_id'], 'forum', _PNFORUM_NOAUTH_TOMODERATE), __FILE__, __LINE__);\n }\n\n\n // Submit isn't set'\n if(empty($submit)) {\n $pnr =& new pnRender('pnForum');\n $pnr->caching = false;\n $pnr->add_core_data();\n $pnr->assign('forum_id', $forum_id);\n $pnr->assign('mode',$mode);\n $pnr->assign('topic_ids', $topic_ids);\n $pnr->assign('last_visit', $last_visit);\n $pnr->assign('last_visit_unix', $last_visit_unix);\n $pnr->assign('forum',$forum);\n // For Movetopic\n $pnr->assign('forums', pnModAPIFunc('pnForum', 'user', 'readuserforums'));\n return $pnr->fetch('pnforum_user_moderateforum.html');\n\n } else {\n // submit is set\n \tif (!pnSecConfirmAuthKey()) {\n \treturn showforumerror(_BADAUTHKEY, __FILE__, __LINE__);\n }\n if(count($topic_ids)<>0) {\n \t switch($mode) {\n case 'del':\n case 'delete':\n \tforeach($topic_ids as $topic_id) {\n \t$forum_id = pnModAPIFunc('pnForum', 'user', 'deletetopic', array('topic_id'=>$topic_id));\n \t}\n break;\n case 'move':\n \tif(empty($moveto)) {\n \t\treturn showforumerror(_PNFORUM_NOMOVETO, __FILE__, __LINE__);\n \t}\n \tforeach ($topic_ids as $topic_id) {\n \tpnModAPIFunc('pnForum', 'user', 'movetopic', array('topic_id' => $topic_id,\n \t 'forum_id' => $moveto,\n \t 'shadow' => $shadow ));\n \t}\n break;\n case 'lock':\n case 'unlock':\n \tforeach($topic_ids as $topic_id) {\n \tpnModAPIFunc('pnForum', 'user', 'lockunlocktopic', array('topic_id'=> $topic_id, 'mode'=>$mode));\n \t}\n break;\n case 'sticky':\n case 'unsticky':\n \tforeach($topic_ids as $topic_id) {\n \tpnModAPIFunc('pnForum', 'user', 'stickyunstickytopic', array('topic_id'=> $topic_id, 'mode'=>$mode));\n \t}\n break;\n case 'join':\n if(empty($jointo)) {\n return showforumerror(_PNFORUM_NOJOINTO, __FILE__, __LINE__);\n }\n if(in_array($jointo, $topic_ids)) {\n // jointo, the target topic, is part of the topics to join\n // we remove this to avoid a loop\n $fliparray = array_flip($topic_ids);\n unset($fliparray[$jointo]);\n $topic_ids = array_flip($fliparray);\n }\n \tforeach($topic_ids as $to_topic_id) {\n pnModAPIFunc('pnForum', 'user', 'jointopics', array('from_topic_id' => $topic_id,\n 'to_topic_id' => $jointo));\n }\n break;\n default:\n }\n // Refresh Forum Info\n $forum = pnModAPIFunc('pnForum', 'user', 'readforum',\n array('forum_id' => $forum_id,\n 'start' => $start,\n 'last_visit' => $last_visit,\n 'last_visit_unix' => $last_visit_unix));\n }\n }\n return pnRedirect(pnModURL('pnForum', 'user', 'moderateforum', array('forum' => $forum_id)));\n}", "title": "" }, { "docid": "94cd39de33f97d3e89fad5953d18ab07", "score": "0.5386067", "text": "function add_question($DB, $ID_user){\n\n $query = \"UPDATE statistics SET nb_question = (SELECT count(*) FROM message WHERE ID_user=\".$ID_user.\" AND ID_type_message = 1) WHERE ID_user='\" . $ID_user . \"'\";\n if($DB->updateDB($query)){\n if(update_point($DB, $ID_user))\n return true;\n }\n}", "title": "" }, { "docid": "a24308ad5e2c7afb657d95ed42e6a0a0", "score": "0.53811014", "text": "function multi_edit_entries()\n \t{\n global $IN, $DB, $DSP, $FNS;\n \n \n $entries = array();\n foreach ($_POST as $key => $val)\n { \n if (strstr($key, 'toggle') AND ! is_array($val))\n {\n \t\t $entries[] = $DB->escape_str($val);\n }\n }\n \n if (sizeof($entries) == 0)\n {\n $FNS->redirect(BASE.AMP.'C=modules'.AMP.'M=twitter'.AMP.'P=view_entries');\n exit;\n }\n \n $action = $IN->GBL('action');\n \n if ($IN->GBL('action') == 'open')\n {\n \t$DB->query(\"UPDATE exp_twitter_messages SET status = 1\tWHERE message_id IN ('\".implode(\"','\", $entries).\"') \");\n }\n elseif ($IN->GBL('action') == 'close')\n {\n \t$DB->query(\"UPDATE exp_twitter_messages SET status = 0 WHERE message_id IN ('\".implode(\"','\", $entries).\"') \");\n }\n elseif ($IN->GBL('action') == 'delete')\n {\n \t$DB->query(\"DELETE FROM exp_twitter_messages WHERE message_id IN ('\".implode(\"','\", $entries).\"') \");\n }\n else\n {\n \t$action = '';\n }\n \n $FNS->redirect(BASE.AMP.'C=modules'.AMP.'M=twitter'.AMP.'P=view_entries'.AMP.'action='.$action);\n exit;\n \t}", "title": "" }, { "docid": "6bf5ef373ac4a2a504ee85cfefc9ae4b", "score": "0.5360377", "text": "public function answer() //display\n {\n if (isset($_GET['comId']) ) {\n if ( !empty((isset($_GET['comId'])) AND ($_GET['comId'] >= (int) 0)) ) {\n $manager = new PostManager();\n $commentTopic = $manager->findCom($_GET['comId']); // object of Topic\n\n $answers = $manager->findAnswersTopic($_GET['comId']); //array of Object of answer from a topic\n\n //$CommentsToDisplay = array();\n $CommentsToDisplay = [$commentTopic , $answers];\n\n\n $myView = new View('answer');\n $myView->build(array('chapters' => null, 'comments' => $CommentsToDisplay,'warningList' => null, 'HOST' => HOST, 'adminLevel' => $_SESSION['adminLevel']));\n\n }else {\n if ( (isset($_GET['postId'])) AND ($_GET['postId'] >= (int) 0)) {\n $myView = new View('');\n $myView->redirect('post.html?postId=' . $_GET['postId']);\n }else {\n $myView = new View('error');\n $myView->build( array('chapters'=> null ,'comments'=>null,'warningList' => null,'HOST'=>HOST, 'adminLevel' => $_SESSION['adminLevel']));\n }\n }\n } else {\n $myView = new View('error');\n $myView->build( array('chapters'=> null ,'comments'=>null,'warningList' => null,'HOST'=>HOST, 'adminLevel' => $_SESSION['adminLevel']));\n }\n }", "title": "" }, { "docid": "6d113a317b93e08e0562372ab6f4eab9", "score": "0.53540885", "text": "function actionFaq($userData)\n\t\t{\n\t\t\t//getting values of data\n\t\t\t$faqDetails = $this->manageContent->getValue_where('faq_info','*','id',$userData['id']);\n\t\t\tif($faqDetails[0]['status'] != $userData['action'])\n\t\t\t{\n\t\t\t\t//update action\n\t\t\t\t$upd = $this->manageContent->updateValueWhere('faq_info','status',$userData['action'],'id',$userData['id']);\n\t\t\t}\n\t\t\treturn $upd;\n\t\t}", "title": "" }, { "docid": "9284e7fe5e62cbf39180575694e12a1c", "score": "0.5347025", "text": "public function testUnreadFeedback() {\n\t\t\t$db_conn = $this->connectToDatabase();\n\t\n\t\t\t// First, add a piece of feedback we can unread\n\t\t\t$fid = $this->addFeedback(1, $db_conn);\n\t\t\t\n\t\t\t// Then test unanswering the question\n\t\t\t$this->sendTestValues($fid, \"F\", \"false\"); \t\t\t\n\t\n\t\t\t// Now run a query to ensure that the flag is set to false\n\t\t\t$query = \"SELECT isread FROM Feedback WHERE fid = \" . $fid . \";\";\n\t\t\t$results = mysql_query($query, $db_conn);\n\t\t\t\t\n\t\t\t// Error check\n\t\t\tif (!$results) {\n\t\t\t\tdie(\"Error: \" . mysql_error($db_conn));\n\t\t\t}\n\t\t\t\t\n\t\t\t$row = mysql_fetch_row($results);\n\t\t\t$this->assertEquals(0, (int)$row[0]);\n\t\t}", "title": "" }, { "docid": "6ac0fec811ea5722db97aaff88ab9079", "score": "0.5335618", "text": "public function confirmFlag()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "38cbc9db9ccc38984007c9ce7195fa72", "score": "0.5334606", "text": "function my_project_updated_send_email( $post_id, $post, $update ) {\n\tif ( wp_is_post_revision( $post_id ) )\n\t\treturn;\n $userid=$post->post_author;\n $post_name=$post->post_name;\n $post_type=$post->post_type;\n $today=date(\"Y-m-d\");\n\tif($post_type=='topic'){\n\t\tglobal $wpdb;\n\t\t$get_points = $wpdb->get_row( \"SELECT * FROM interactive_system where user_id='$userid'\" );\n $currentPoints=$get_points->points;\n $row8= $wpdb->get_row( \"SELECT * FROM point_editable WHERE id ='8'\");\n $threadcreated=$row8->points;\n $totalPoints= $currentPoints+$threadcreated;\n $allowed = $wpdb->query(\"UPDATE interactive_system SET points = '$totalPoints' WHERE user_id = '$userid'\");\n \t$data_array2 = array('user_id'=>$userid,'type'=>'post thread created on the forum','femail'=>$post_name,'points'=>$threadcreated,'date'=>$today);\n $point_insert= $wpdb->insert( 'free_points_details', $data_array2);\n\n\t}\n\n\n}", "title": "" }, { "docid": "65d0091b9701f0ecfdf0a68e23714c42", "score": "0.53332394", "text": "function _add_reply() // Type\n\t{\n\t\tif (addon_installed('captcha'))\n\t\t{\n\t\t\trequire_code('captcha');\n\t\t\tenforce_captcha();\n\t\t}\n\n\t\trequire_code('attachments2');\n\t\trequire_code('ocf_posts_action');\n\t\trequire_code('ocf_posts_action2');\n\n\t\t$invited_members=array();\n\n\t\t$topic_id=either_param_integer('topic_id',-1); // Posting into an existing topic?\n\t\t$forum_id=post_param_integer('forum_id',-1); // New topic in existing forum? (NB: -2 represents reported posts forum)\n\t\t$member_id=post_param_integer('member_id',-1); // Send TOPIC to specific member? Could be Private Topic (topic_id==-1, forum_id==-1), or personal post (topic_id!=-1, forum_id==-1)\n\t\t$parent_id=either_param_integer('parent_id',NULL);\n\t\tif ($member_id==-1)\n\t\t{\n\t\t\t$member_username=post_param('to_member_id_0','');\n\t\t\tif ($member_username!='')\n\t\t\t{\n\t\t\t\t$member_id=$GLOBALS['FORUM_DRIVER']->get_member_from_username($member_username);\n\t\t\t\tif (is_null($member_id)) warn_exit(do_lang_tempcode('_USER_NO_EXIST',$member_username));\n\t\t\t}\n\t\t\tforeach ($_POST as $key=>$_invited_member)\n\t\t\t{\n\t\t\t\tif (substr($key,0,13)!='to_member_id_') continue;\n\t\t\t\tif ($key=='to_member_id_0') continue;\n\t\t\t\tif ($_invited_member=='') continue;\n\n\t\t\t\tif (get_magic_quotes_gpc()) $_invited_member=stripslashes($_invited_member);\n\n\t\t\t\t$invited_member=$GLOBALS['FORUM_DRIVER']->get_member_from_username($_invited_member);\n\t\t\t\tif (is_null($invited_member))\n\t\t\t\t{\n\t\t\t\t\tattach_message(do_lang_tempcode('_USER_NO_EXIST',$_invited_member),'warn');\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$invited_members[]=intval($invited_member);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$validated=post_param_integer('validated',post_param_integer('_validated',0));\n\t\t$is_emphasised=post_param_integer('is_emphasised',0);\n\t\t$skip_sig=post_param_integer('skip_sig',0);\n\n\t\t$post=post_param('post');\n\t\t$title=post_param('title',NULL);\n\t\tif (is_null($title)) $title='';\n\n\t\t$check_permissions=true;\n\t\t$add_poll=post_param_integer('add_poll',0);\n\t\t$topic_validated=$validated;\n\t\tif ($validated==1) $topic_validated=1-$add_poll; // If a topic is gonna have a poll added, it starts unvalidated. Adding the poll will validate it.\n\n\t\t$anonymous=post_param_integer('anonymous',0);\n\t\t$poster_name_if_guest=post_param('poster_name_if_guest',NULL);\n\t\tif ($poster_name_if_guest=='') $poster_name_if_guest=NULL;\n\t\tif (!is_null($poster_name_if_guest))\n\t\t{\n\t\t\t$poster_name_if_guest=trim($poster_name_if_guest);\n\t\t\t$restricted_usernames=explode(',',get_option('restricted_usernames'));\n\t\t\t$restricted_usernames[]=do_lang('UNKNOWN');\n\t\t\t$restricted_usernames[]=do_lang('SYSTEM');\n\t\t\tif (!is_null($GLOBALS['FORUM_DRIVER']->get_member_from_username($poster_name_if_guest)))\n\t\t\t{\n\t\t\t\t$restricted_usernames[]=$poster_name_if_guest;\n\t\t\t}\n\t\t\tforeach ($restricted_usernames as $_restricted_username)\n\t\t\t{\n\t\t\t\t$restricted_username=trim($_restricted_username);\n\t\t\t\tif ($restricted_username=='') continue;\n\t\t\t\tif ($poster_name_if_guest==$restricted_username)\n\t\t\t\t{\n\t\t\t\t\t$poster_name_if_guest=$poster_name_if_guest.' ('.do_lang('GUEST').')';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$new_topic=($topic_id==-1);\n\n\t\tif (!$new_topic)\n\t\t{\n\t\t\t$_intended_solely_for=post_param('intended_solely_for','');\n\t\t\tif ($_intended_solely_for=='')\n\t\t\t{\n\t\t\t\t$intended_solely_for=NULL;\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$intended_solely_for=$GLOBALS['FORUM_DRIVER']->get_member_from_username($_intended_solely_for);\n\t\t\t\tif (is_null($intended_solely_for)) warn_exit(do_lang_tempcode('_USER_NO_EXIST',$_intended_solely_for));\n\t\t\t}\n\t\t} else $intended_solely_for=NULL;\n\n\t\trequire_code('ocf_topics_action');\n\t\trequire_code('ocf_topics_action2');\n\t\tif ($new_topic) // A new topic\n\t\t{\n\t\t\tocf_check_post($post);\n\n\t\t\tif ($title=='') warn_exit(do_lang_tempcode('NO_PARAMETER_SENT','title'));\n\n\t\t\t$sunk=post_param_integer('sunk',0);\n\t\t\t$topic_title=$title;\n\n\t\t\tif ($forum_id==-1) // New Private Topic\n\t\t\t{\n\t\t\t\trequire_code('ocf_members2');\n\t\t\t\tif (!ocf_may_whisper($member_id)) warn_exit(do_lang_tempcode('NO_PT_FROM_ALLOW'));\n\t\t\t\tcheck_specific_permission('use_pt');\n\n\t\t\t\t$topic_id=ocf_make_topic(NULL,post_param('description',''),post_param('emoticon',''),$topic_validated,post_param_integer('open',0),post_param_integer('pinned',0),$sunk,post_param_integer('cascading',0),get_member(),$member_id);\n\t\t\t\t$first_post=true;\n\t\t\t\t$_title=get_page_title('ADD_PERSONAL_TOPIC');\n\t\t\t}\n\t\t\telseif ($forum_id==-2) // New reported post topic\n\t\t\t{\n\t\t\t\t$forum_id=$GLOBALS['FORUM_DRIVER']->forum_id_from_name(get_option('reported_posts_forum'));\n\t\t\t\tif (is_null($forum_id)) warn_exit(do_lang_tempcode('NO_REPORTED_POST_FORUM'));\n\n\t\t\t\t// See if post already reported...\n\t\t\t\t$topic_id=$GLOBALS['FORUM_DB']->query_value_null_ok('f_topics t LEFT JOIN '.$GLOBALS['FORUM_DB']->get_table_prefix().'f_posts p ON p.id=t.t_cache_first_post_id','t.id',array('p.p_title'=>$title,'t.t_forum_id'=>$forum_id));\n\t\t\t\tif (!is_null($topic_id))\n\t\t\t\t{\n\t\t\t\t\t// Already a topic\n\t\t\t\t\t$first_post=false;\n\t\t\t\t} else // New topic\n\t\t\t\t{\n\t\t\t\t\t$topic_id=ocf_make_topic($forum_id,'','',1,1,0,0,0,NULL,NULL,false);\n\t\t\t\t\t$first_post=true;\n\t\t\t\t}\n\n\t\t\t\t$_title=get_page_title('REPORT_POST');\n\t\t\t\t$check_permissions=false;\n\n\t\t\t\tdecache('main_staff_checklist');\n\t\t\t} else // New topic\n\t\t\t{\n\t\t\t\t$topic_id=ocf_make_topic($forum_id,post_param('description',''),post_param('emoticon',''),$topic_validated,post_param_integer('open',0),post_param_integer('pinned',0),$sunk,post_param_integer('cascading',0));\n\t\t\t\t$first_post=true;\n\t\t\t\t$_title=get_page_title('ADD_TOPIC');\n\n\t\t\t\tif (addon_installed('awards'))\n\t\t\t\t{\n\t\t\t\t\trequire_code('awards');\n\t\t\t\t\thandle_award_setting('topic',strval($topic_id));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\trequire_code('fields');\n\t\t\tif (has_tied_catalogue('topic'))\n\t\t\t{\n\t\t\t\tsave_form_custom_fields('topic',strval($topic_id));\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\t$_title=get_page_title('ADD_POST');\n\t\t\t$first_post=false;\n\n\t\t\t$topic_info=$GLOBALS['FORUM_DB']->query_select('f_topics',array('t_cache_first_title','t_sunk','t_forum_id','t_is_open','t_description'),array('id'=>$topic_id),'',1);\n\t\t\tif (!array_key_exists(0,$topic_info)) warn_exit(do_lang_tempcode('MISSING_RESOURCE'));\n\t\t\t$forum_id=$topic_info[0]['t_forum_id'];\n\t\t\t$topic_title=$topic_info[0]['t_cache_first_title'];\n\t\t\t$sunk=$topic_info[0]['t_sunk'];\n\n\t\t\tif ($topic_info[0]['t_is_open']==0)\n\t\t\t{\n\t\t\t\t$may_moderate_forum=ocf_may_moderate_forum($forum_id);\n\t\t\t\tif (!$may_moderate_forum)\n\t\t\t\t{\n\t\t\t\t\twarn_exit(do_lang_tempcode('TOPIC_IS_CLOSED'));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Moderator reply\n\t\t\t$new_title=post_param('new_title',NULL);\n\t\t\tif ((!is_null($new_title)) && (!is_null($forum_id)) && (ocf_may_moderate_forum($forum_id,get_member())))\n\t\t\t{\n\t\t\t\t$cascading=post_param_integer('cascading',0);\n\t\t\t\t$pinned=post_param_integer('pinned',0);\n\t\t\t\t$sunk=post_param_integer('sunk',0);\n\t\t\t\t$open=post_param_integer('open',0);\n\t\t\t\t$topic_validated=post_param_integer('topic_validated',0);\n\t\t\t\t$to=post_param_integer('to',NULL);\n\t\t\t\t$schedule=get_input_date('schedule');\n\n\t\t\t\tif ((!is_null($schedule)) && (addon_installed('calendar')))\n\t\t\t\t{\n\t\t\t\t\t$_intended_solely_for=is_null($intended_solely_for)?'NULL':strval($intended_solely_for);\n\t\t\t\t\t$_postdetailser_name_if_guest=is_null($poster_name_if_guest)?'NULL':('\\''.addslashes($poster_name_if_guest).'\\'');\n\t\t\t\t\t$_first_post=$first_post?'true':'false';\n\t\t\t\t\t$__title=is_null($title)?'NULL':('\\''.str_replace(chr(10),'\\'.chr(10).\\'',addslashes($title)).'\\'');\n\t\t\t\t\t$_postdetails=is_null($post)?'NULL':('\\''.str_replace(chr(10),'\\'.chr(10).\\'',addslashes($post)).'\\'');\n\t\t\t\t\t$_new_title=is_null($new_title)?'NULL':('\\''.str_replace(chr(10),'\\'.chr(10).\\'',addslashes($new_title)).'\\'');\n\n$schedule_code=<<<END\n:require_code('ocf_topics_action2'); require_code('ocf_topics_action'); ocf_edit_topic($topic_id,NULL,NULL,$validated,$open,$pinned,$sunk,$cascading,'',$_new_title); if (($to!=$forum_id) && (!is_null($to))) ocf_move_topics($forum_id,$to,array($topic_id)); \\$post_id=ocf_make_post($topic_id,$__title,$_postdetails,$skip_sig,$_first_post,$validated,$is_emphasised,$_postdetailser_name_if_guest,NULL,NULL,NULL,$_intended_solely_for,NULL,NULL,false,true,NULL,true,$topic_title,$sunk,NULL,$anonymous==1); if (addon_installed('awards')) { require_code('awards'); handle_award_setting('post',strval(\\$post_id)); }\nEND;\n\t\t\t\t\trequire_code('calendar');\n\t\t\t\t\t$start_year=post_param_integer('schedule_year');\n\t\t\t\t\t$start_month=post_param_integer('schedule_month');\n\t\t\t\t\t$start_day=post_param_integer('schedule_day');\n\t\t\t\t\t$start_hour=post_param_integer('schedule_hour');\n\t\t\t\t\t$start_minute=post_param_integer('schedule_minute');\n\t\t\t\t\trequire_code('calendar2');\n\t\t\t\t\t$event_id=add_calendar_event(db_get_first_id(),'',NULL,0,do_lang('ADD_POST'),$schedule_code,3,0,$start_year,$start_month,$start_day,$start_hour,$start_minute);\n\t\t\t\t\tregenerate_event_reminder_jobs($event_id);\n\n\t\t\t\t\t$text=do_lang_tempcode('SUCCESS');\n\t\t\t\t\t$map=array('page'=>'topicview','id'=>$topic_id,'type'=>'first_unread');\n\t\t\t\t\t$test=get_param_integer('kfs'.(is_null($forum_id)?'':strval($forum_id)),-1);\n\t\t\t\t\tif (($test!=-1) && ($test!=0)) $map['kfs'.(is_null($forum_id)?'':strval($forum_id))]=$test;\n\t\t\t\t\t$test=get_param_integer('threaded',-1);\n\t\t\t\t\tif ($test!=-1) $map['threaded']=$test;\n\t\t\t\t\t$_url=build_url($map,get_module_zone('topicview'));\n\t\t\t\t\t$url=$_url->evaluate();\n\t\t\t\t\t$url.='#first_unread';\n\t\t\t\t\t$url=get_param('redirect',$url);\n\t\t\t\t\treturn redirect_screen($_title,$url,$text);\n\t\t\t\t}\n\n\t\t\t\tocf_edit_topic($topic_id,NULL,NULL,$topic_validated,$open,$pinned,$sunk,$cascading,'',($new_title=='')?NULL:$new_title);\n\t\t\t\tif (($to!=$forum_id) && (!is_null($to))) ocf_move_topics($forum_id,$to,array($topic_id));\n\t\t\t}\n\t\t}\n\n\t\t$post_id=ocf_make_post($topic_id,$title,$post,$skip_sig,$first_post,$validated,$is_emphasised,$poster_name_if_guest,NULL,NULL,NULL,$intended_solely_for,NULL,NULL,$check_permissions,true,NULL,true,$topic_title,$sunk,NULL,$anonymous==1,$forum_id==-1 || is_null($forum_id),$forum_id==-1 || is_null($forum_id),false,$parent_id);\n\n\t\tif (addon_installed('awards'))\n\t\t{\n\t\t\trequire_code('awards');\n\t\t\thandle_award_setting('post',strval($post_id));\n\t\t}\n\n\t\tif ((!is_null($forum_id)) && ($anonymous==0) && ($intended_solely_for===NULL))\n\t\t{\n\t\t\tif ((has_actual_page_access($GLOBALS['FORUM_DRIVER']->get_guest_id(),'forumview')) && (has_category_access($GLOBALS['FORUM_DRIVER']->get_guest_id(),'forums',strval($forum_id))))\n\t\t\t\tsyndicate_described_activity($first_post?'ocf:ACTIVITY_ADD_TOPIC':'ocf:ACTIVITY_ADD_POST_IN',$first_post?$title:$topic_title,'','','_SEARCH:topicview:misc:'.strval($topic_id).'#post_'.strval($post_id),'','','ocf_forum');\n\t\t}\n\n\t\trequire_code('fields');\n\t\tif (has_tied_catalogue('post'))\n\t\t{\n\t\t\tsave_form_custom_fields('post',strval($post_id));\n\t\t}\n\n\t\t$validated=$GLOBALS['FORUM_DB']->query_value('f_posts','p_validated',array('id'=>$post_id));\n\n\t\t$rep_post_id=post_param_integer('o_post_id',-1);\n\t\tif ($rep_post_id!=-1)\n\t\t{\n\t\t\t$map=array('page'=>'topicview','id'=>$rep_post_id,'type'=>'findpost');\n\t\t\t$_url=build_url($map,get_module_zone('topicview'));\n\t\t\t$url=$_url->evaluate();\n\t\t\t$url.='#post_'.strval($rep_post_id);\n\t\t} else\n\t\t{\n\t\t\t$map=array('page'=>'topicview','id'=>$post_id,'type'=>'findpost');\n\t\t\t$test=get_param_integer('kfs'.(is_null($forum_id)?'':strval($forum_id)),-1);\n\t\t\tif (($test!=-1) && ($test!=0)) $map['kfs'.(is_null($forum_id)?'':strval($forum_id))]=$test;\n\t\t\t$test=get_param_integer('threaded',-1);\n\t\t\tif ($test!=-1) $map['threaded']=$test;\n\t\t\t$_url=build_url($map,get_module_zone('topicview'));\n\t\t\t$url=$_url->evaluate();\n\t\t\tif ($validated!=0) $url.='#post_'.strval($post_id);\n\t\t}\n\n\t\tif ($forum_id>=0)\n\t\t{\n\t\t\t$topic_validated=$GLOBALS['FORUM_DB']->query_value('f_topics','t_validated',array('id'=>$topic_id));\n\t\t\tif (($topic_validated==0) && (!has_specific_permission(get_member(),'jump_to_unvalidated')))\n\t\t\t{\n\t\t\t\t$map=array('page'=>'forumview','id'=>$forum_id);\n\t\t\t\t$test=get_param_integer('kfs'.(is_null($forum_id)?'':strval($forum_id)),-1);\n\t\t\t\tif (($test!=-1) && ($test!=0)) $map['kfs'.(is_null($forum_id)?'':strval($forum_id))]=$test;\n\t\t\t\t$test=get_param_integer('threaded',-1);\n\t\t\t\tif ($test!=-1) $map['threaded']=$test;\n\t\t\t\t$_url=build_url($map,get_module_zone('forumview'));\n\t\t\t\t$url=$_url->evaluate();\n\t\t\t}\n\t\t}\n\n\t\tif (($new_topic) && ($forum_id==-1))\n\t\t{\n\t\t\trequire_code('notifications');\n\n\t\t\tenable_notifications('ocf_topic',strval($topic_id),get_member()); // from\n\t\t\tenable_notifications('ocf_topic',strval($topic_id),$member_id); // to\n\t\t\tforeach ($invited_members as $invited_member)\n\t\t\t{\n\t\t\t\tenable_notifications('ocf_topic',strval($topic_id),$invited_member);\n\n\t\t\t\tocf_invite_to_pt($invited_member,$topic_id);\n\t\t\t}\n\t\t}\n\n\t\tif ($anonymous==1)\n\t\t{\n\t\t\tlog_it('MAKE_ANONYMOUS_POST',strval($post_id),$title);\n\t\t}\n\n\t\tif (($forum_id==-1) && ($member_id!=-1))\n\t\t{\n\t\t\tsend_pt_notification($post_id,$title,$topic_id,$member_id,NULL,$post);\n\t\t}\n\n\t\tif ($add_poll==1)\n\t\t{\n\t\t\tif (post_param_integer('add_poll',0)==1)\n\t\t\t{\n\t\t\t\t// Show it worked / Refresh\n\t\t\t\t$_url=build_url(array('page'=>'_SELF','type'=>'add_poll','id'=>$topic_id,'try_validate'=>is_null(get_input_date('schedule'))?1:0),'_SELF');\n\t\t\t\treturn redirect_screen($_title,$_url,do_lang_tempcode('SUCCESS'));\n\t\t\t}\n\t\t}\n\n\t\tif ((!$new_topic) && ($forum_id!=-1) && ($member_id==-1))\n\t\t{\n\t\t\thandle_topic_ticket_reply($forum_id,$topic_id,$topic_title,$post);\n\t\t}\n\n\t\t$text=($validated==1)?do_lang_tempcode('SUCCESS'):do_lang_tempcode('SUBMIT_UNVALIDATED');\n\n\t\trequire_code('autosave');\n\t\tclear_ocp_autosave();\n\n\t\t// Show it worked / Refresh\n\t\t$url=get_param('redirect',$url);\n\t\treturn redirect_screen($_title,$url,$text);\n\t}", "title": "" }, { "docid": "3689e3f0717b69bc96a20390cb782682", "score": "0.53225446", "text": "public function acceptedAnswer(Request $request,$id)\n {\n \t\n $user = 1;//Auth::getUser()->id;\n $question = Answer::findOrFail($id);\n\n $answer = DB::table('wafutech_stackexchange_answers')\n ->join('wafutech_stackexchange_questions','wafutech_stackexchange_answers.question_id','wafutech_stackexchange_questions.id','wafutech_stackexchange_answers.question_id')\n ->first();\n\n if($user==$answer->user_id and $question->question_id==$answer->question_id)\n {\n \t//First the question already has accepted answer\n\n $alreadyAccepted = Answer::where('question_id',$question->question_id)->where('accepted',1);\n if($alreadyAccepted)\n {\n \treturn 'You already accepted an answer for this question';\n }\n \t//Then update the answer as accepted\n \tDB::update('update wafutech_stackexchange_answers set accepted=? where id =?',[1,$id]); \n \n\n //Fire some events to inform the author of the answer that has been accepted and has earned him some reputation points\n //Event::Fire(some event)\n return 'You accepted the answer, question closed! thank you for joining TechMix';\n\n }\n\n return 'Only the author of the question can mark answer as accepted';\n \n\n\n }", "title": "" }, { "docid": "b3558d5ede4f4cb11b7d83a455cb9c1a", "score": "0.5316829", "text": "public function quesUpdate(){\n\t\t echo '<pre>';\n\t\t\tprint_r($_REQUEST);\n\t\t\t $questionAnswers['qid']\t\t=\t$_REQUEST['qid'];\n $questionAnswers['question']\t=\t$_REQUEST['question'];\n\t\t\t $arrArgument=$this->loadModel('viewAllQuestion','quesUpdate',$questionAnswers);\n\t\t\t \n\t\t\t\t\t\t \n\t\t\t $questionAnswers = $_REQUEST['ans'];\n\t\t\t\t\t \n\t\t\n\t\t\t echo '-------->'.$arrArgument=$this->loadModel('viewAllQuestion','optionUpdate',$questionAnswers);\n\t\t\tif($arrArgument==1){\n\t\t\t\techo 'updated';\n\t\t\t}\n\t\t\n \n \n }", "title": "" }, { "docid": "3760dca2ae5c8a7037e1e3f283afd68b", "score": "0.53094894", "text": "public function isAnswered(): bool;", "title": "" }, { "docid": "46d6b5af1cd28393aae11896f474956f", "score": "0.5296072", "text": "function single_post_comment_ratings()\r\n{\r\n $tmpdata = get_option('templatic_settings');\r\n if($tmpdata['templatin_rating']=='yes'):\r\n\t\tadd_action( 'comment_form_logged_in_after', 'ratings_in_comments' );\r\n\t\tadd_action( 'comment_form_after_fields', 'ratings_in_comments' );\r\n\t\tadd_action( 'comment_text', 'display_rating_star' );\r\n endif;\t\r\n}", "title": "" }, { "docid": "0fd450c24b4ef0b19858216b13b2c5ed", "score": "0.5291362", "text": "public function setAsCurrStatus(){\n\t \n\t $post_id = isset($_POST['i']) ? (int) $this->test_input(b_decode($_POST['i'])) : '';\n\t $r = 0;\n\t \n\t if(!is_numeric($post_id) || $post_id <= 0)\n\t\t $r = 0;\n\t else {\n\t\t \n\t\t // check for status\n\t\t $check = count($this->query_select(\"select id from \".tbl_posts.\" where `id`='{$post_id}' and `userid`='{$this->userid}' limit 1\"));\n\t\t \n\t\t if($check){\n\t\t\t \n\t\t\t // unavailable curr status\n\t\t\t $update = $this->query_update(\"update \".tbl_posts.\" set `available`='no' where `available`='yes' and `userid`='{$this->userid}'\");\n\t\t\t // set available called status\n\t\t\t $update = $this->query_update(\"update \".tbl_posts.\" set `available`='yes' where `available`='no' and `userid`='{$this->userid}' and `id`='{$post_id}'\");\n\t\t\t \n\t\t\t if($update) $r = 1; else $r = 0;\n\t\t\t \n\t\t }\n\t\t \n\t\t \n\t }\n\t \n\t echo $r;\n\t \n }", "title": "" }, { "docid": "0eed7b0a45601d7ac4f3699a65d5c1cb", "score": "0.5282692", "text": "public function action_markreplies()\n\t{\n\t\tglobal $modSettings;\n\n\t\t// Make sure all the topics are integers!\n\t\t$topics = array_map('intval', explode('-', $this->_req->query->topics));\n\n\t\trequire_once(SUBSDIR . '/Topic.subs.php');\n\t\t$logged_topics = getLoggedTopics($this->user->id, $topics);\n\n\t\t$markRead = array();\n\t\tforeach ($topics as $id_topic)\n\t\t{\n\t\t\t$markRead[] = array($this->user->id, (int) $id_topic, $modSettings['maxMsgID'], (int) !empty($logged_topics[$id_topic]));\n\t\t}\n\n\t\tmarkTopicsRead($markRead, true);\n\n\t\tif (isset($_SESSION['topicseen_cache']))\n\t\t{\n\t\t\t$_SESSION['topicseen_cache'] = array();\n\t\t}\n\n\t\tif ($this->api)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\treturn redirectexit('action=unreadreplies');\n\t}", "title": "" }, { "docid": "f899c0f5f732578286b1b702d68b0b86", "score": "0.52816665", "text": "function template_control_quick_reply() {\n global $context, $settings, $options, $txt, $scripturl, $modSettings;\n \n //Autosize the editor\n $quickReply = '\n <script type=\"text/javascript\">\n $(function(){\n $(\".editor\").last().autosize();\n });';\n\n //Function to show or hide the quick reply form\n $quickReply .= '\n var toggleQuickReply = function() {\n if ($(\"#quick-reply\").is(\":visible\"))\n {\n $(\"#message\").blur();\n $(\"#quick-reply\").hide(); \n }\n else\n {\n $(\"#quick-reply\").show();\n $(\"#message\").focus();\n }\n setTopMargin();\n };';\n\n //Add the call to toggleQuickReply to the title\n $quickReply .= '\n var title = $(\".the-title\").last().get(0);\n title.onclick = function() { $(this).fadeTo(200 , 0.3).fadeTo(200 , 1.0); toggleQuickReply();};\n $(\".the-title\").addClass(\"quick-reply-title\");';\n\n //Function to call when submitting the post\n $quickReply .= '\n var submitForm = function() {\n submitonce(this);\n smc_saveEntities(\"postmodify\", [\"subject\", \"' . (isset($context['post_box_name']) ? $context['post_box_name'] : 'message') . '\", \"guestname\", \"evtitle\", \"question\"], \"options\");\n };\n </script>';\n\n //The quick reply form \n $quickReply.= '\n <div id=\"quick-reply\">\n <form data-ajax=\"false\" action=\"' . $scripturl . '?action=post2;' . (empty($context['current_board']) ? '' : 'board=') . $context['current_board'] . '.new#new\" method=\"post\" accept-charset=\"' . $context['character_set'] . '\" name=\"postmodify\" id=\"postmodify\" onsubmit=\"submitForm();\" enctype=\"multipart/form-data\" style=\"margin: 0;\">\n <div id=\"post-container\" class=\"input-container\" style=\"padding-bottom: 0;\">\n <div class=\"new-post\">\n <textarea class=\"editor\" name=\"message\" id=\"message\" rows=\"1\" cols=\"60\" tabindex=\"2\" style=\"width: 100%; height: 16px; overflow: hidden; word-wrap: break-word; resize: horizontal;\"></textarea>\n </div>\n </div>';\n \n //Guests have to put in their name and email\n if (!$context['user']['is_logged'] && isset($context['name']) && isset($context['email'])) {\n $quickReply.= '<div class=\"no-left-padding input-container pad-top\">';\n $quickReply.= '<span class=\"input-label\">' . $txt['username'] . '</span>';\n $quickReply.= '<input type=\"text\" name=\"guestname\" size=\"25\" value=\"' . $context['name'] . '\" tabindex=\"' . $context['tabindex']++ . '\" class=\"input_text\" />';\n $quickReply.= '<span id=\"smf_autov_username_div\" style=\"display: none;\">\n <a id=\"smf_autov_username_link\" href=\"#\">\n <img id=\"smf_autov_username_img\" src=\"' . $settings['images_url'] . '/icons/field_check.png\" alt=\"*\" />\n </a>\n </span>';\n $quickReply.= '</div>';\n \n if (empty($modSettings['guest_post_no_email'])) {\n $quickReply.= '<div class=\"no-left-padding input-container pad-top\">';\n $quickReply.= '<span class=\"input-label\">' . $txt['email'] . '</span>';\n $quickReply.= '<input type=\"text\" name=\"email\" size=\"25\" value=\"' . $context['email'] . '\" tabindex=\"' . $context['tabindex']++ . '\" class=\"input_text\" />';\n $quickReply.= '</div>';\n }\n }\n \n //Verification control\n if ($context['require_verification']) {\n $quickReply.= '<div class=\"no-left-padding input-container pad-top\">';\n $quickReply.= '<span class=\"input-label\">' . $txt['iCode'] . '</span>';\n $quickReply.= template_control_verification($context['visual_verification_id'], 'all');\n $quickReply.= '</div>';\n $quickReply.= '<div class=\"no-left-padding input-container pad-top\">';\n $quickReply.= '<span class=\"input-label\">' . $txt['iVerify'] . '</span>';\n $quickReply.= '<input type=\"text\" tabindex=\"' . $context['tabindex']++ . '\" name=\"post_vv[code]\" />';\n $quickReply.= '</div>';\n }\n \n //Submit button\n $quickReply.= '\n <div class=\"child buttons\">\n <button class=\"button\" type=\"submit\" onclick=\"$(\\'.ui-loader\\').loader(\\'show\\');\">' . $txt['iPost'] . '</button>\n </div>';\n\n //Inputs \n if (isset($context['num_replies'])) {\n $quickReply.= '\n <input type=\"hidden\" name=\"num_replies\" value=\"' . $context['num_replies'] . '\" />';\n }\n if (!empty($context['subject'])) {\n $quickReply.= '\n <input type=\"hidden\" name=\"subject\" value=\"' . $context['subject'] . '\" />';\n }\n $quickReply.= '\n <input type=\"hidden\" name=\"attach_del[]\" value=\"0\" />\n <input type=\"hidden\" name=\"additional_options\" value=\"' . (isset($context['show_additional_options']) && $context['show_additional_options'] ? 1 : 0) . '\" />\n <input type=\"hidden\" name=\"' . $context['session_var'] . '\" value=\"' . $context['session_id'] . '\" />\n <input type=\"hidden\" name=\"seqnum\" value=\"' . $context['form_sequence_number'] . '\" />\n <input type=\"hidden\" name=\"topic\" value=\"' . $context['current_topic'] . '\" />\n <input type=\"hidden\" name=\"' . $context['session_var'] . '\" value=\"' . $context['session_id'] . '\" /> \n <input type=\"hidden\" name=\"goback\" value=\"' . $options['return_to_post'] . '\" />\n <input type=\"hidden\" name=\"icon\" value=\"\">\n </form>';\n \n $quickReply.= '\n </div>';\n \n //Finally add the code to the topbar\n echo '<script type=\"text/javascript\">\n $(function() {\n $(\".topbar\").last().append(', json_encode($quickReply), ');\n });\n </script>';\n}", "title": "" }, { "docid": "66aa546324e47044a475272a9eb0610d", "score": "0.5277906", "text": "public function adminconfirm($mil) {\n\t\t\n\t\t$this->autoRender = false;\n\t\t$this->loadModel(\"User\") ; \n\t\t$comment = $_POST[\"comment\"]; \n\t\t\n\t\tif ($mil && $this->Auth->user ( \"id\" )) {\n\t\t\t$this->model->query ( \"UPDATE teamup_milestones SET closed = 1 WHERE id ='{$mil}' \" );\n\t\t\t$this->model->query ( \" DELETE FROM teamup_closed WHERE milestone ='{$mil}' \" );\n\t\t}\n\t\t\n\t\t\n\t\t$milestone = $this->model->query ( \"SELECT * FROM teamup_milestones WHERE id = '{$mil}' \" );\n\n\n // Set Milestone Back To Un Reported So we Can un REport them :\n $this->model->query(\"UPDATE teamup_milestones SET reported=0 WHERE id = '{$mil}' \");\n\n\n // TID :\n\t\t$tid = $milestone [0] [\"teamup_milestones\"] [\"teamup\"] ; \n\t\t$row = $this->model->find ( \"first\", array (\n\t\t\t\t\"conditions\" => array (\n\t\t\t\t\t\t\"id\" => $milestone [0] [\"teamup_milestones\"] [\"teamup\"] \n\t\t\t\t)\n\t\t) );\n\t\t\n\t\t $open = $this->model->query(\"SELECT COUNT(*) as c FROM teamup_milestones WHERE teamup='{$tid}' AND closed <> 1 \"); \n \n\t\t\tApp::import(\"model\", \"FeedbackFactory\") ;\n\n\n \t\t // Leave feedbakc For the users :\n \t\t if ($open[0][0][\"c\"]==0){ \n\t\t \t FeedbackFactory::addRequest( $row[\"Teamup\"][\"user_id\"], $row[\"Teamup\"][\"to_user\"] , $row[\"Teamup\"][\"job_id\"], LEAVE_FEEDBACK_EXPERT);\n\t\t \t FeedbackFactory::addRequest( $row[\"Teamup\"][\"to_user\"], $row[\"Teamup\"][\"user_id\"] , $row[\"Teamup\"][\"job_id\"] , LEAVE_FEEDBACK_LEADER);\n\t\t }\n\t\t \n\t $text = ADMIN_MILESTONE_CLOSED ; \n\t $text = str_replace ( \"{name}\", $milestone [0] [\"teamup_milestones\"] [\"title\"] , $text ); \n\t $text = str_replace ( \"{comment}\", $comment , $text ); \n\t $email = new CakeEmail ( 'gmail' );\n\t $email->template ( 'default', \"default\" );\n\t $email->emailFormat ( 'html' ); \n\t $user = $this->User->find ( \"first\", array (\n\t \t\t\"conditions\" => array (\n\t \t\t\t\t\"User.id\" => $this->Auth->user(\"id\")\n\t \t\t)\n\t ) );\n\t $team_up = $this->model->find ( \"first\", array (\n\t \t\t\"conditions\" => array (\n\t \t\t\t\t\"id\" => $milestone [0] [\"teamup_milestones\"] [\"teamup\"]\n\t \t\t)\n\t ) ); \n\t $to_user = $this->User->find ( \"first\", array (\n\t \t\t\"conditions\" => array (\n\t \t\t\t\t\"User.id\" => $team_up[\"Teamup\"][\"to_user\"]\n\t \t\t)\n\t ) ); \n\t $email->from ( $user [\"User\"] [\"email\"] );\n\t $email->to ( $to_user [\"User\"] [\"email\"] );\n\t $email->subject ( \" Milestone has been closed\" );\n\t $email->send ( $text ); \n\t $system = str_replace(\"{name}\", $milestone [0] [\"teamup_milestones\"] [\"title\"] , MILE_STONE_HAS_BEEN_CLOSED); \n\t SystemInbox::insert( $row[\"Teamup\"][\"to_user\"], $system , $row [\"Teamup\"] [\"job_id\"] ) ;\n\t $this->Session->setFlash ( __ ( ' Milestone was closed. ' ), 'default', array (\n\t \t\t\"class\" => \"success\"\n\t ) ); \n\t echo \"Confirm\";\n\t}", "title": "" }, { "docid": "0cbd1fcfd5594175b681ffe5752fd621", "score": "0.5275587", "text": "function gfs_topic_message() {\n\tglobal $current_user;\n\t$topic_id = bp_get_the_topic_id();\n\t\n\tif( $_POST[ 'gfs_unsubscribe' ] == '1') {\n\t\tgfs_bp_remove_user_favorite ( $current_user->id, $topic_id );\n\t}\n\t\n\tif( $_POST[ 'gfs_subscribe' ] == '1' ) {\n\t\tgfs_bp_add_user_favorite ( $current_user->id, $topic_id );\n\t}\n\t\n\t$topic_id = bp_get_the_topic_id();\n\t$user_faves = get_usermeta( $current_user->id, 'bb_favorites' );\n\t$user_faves = explode(',', $user_faves);\n\tif ( in_array ( $topic_id, $user_faves ) ) { ?>\n\t\t<p><?php _e( 'You are subscribed to this topic.', 'group_forum_subscription' ) ?> \n \t<input type=\"submit\" name=\"Submit\" value=\"<?php _e( 'Unsubscribe', 'group_forum_subscription' ) ?> &raquo;\" style=\"width: 150px;\" />\n <input type=\"hidden\" name=\"gfs_unsubscribe\" value=\"1\" />\n\t\t<br /><br />\n\t\t<?php\n\t\t\n\t\t\n\t} else { ?>\n\t\t<p><?php _e( 'You are not subscribed to this topic.', 'group_forum_subscription' ) ?>\n \t<input type=\"submit\" name=\"Submit\" value=\"<?php _e( 'Subscribe', 'group_forum_subscription' ) ?> &raquo;\" style=\"width: 150px;\" />\n <input type=\"hidden\" name=\"gfs_subscribe\" value=\"1\" />\n <br /><br />\n <?php\n\t}\n}", "title": "" }, { "docid": "fd730de76e949c377d80a1ed42fb314d", "score": "0.52730566", "text": "function esportz_update_comment_badge( $comment_id, $comment_approved, $commentdata ) {\r\n\r\n $user_id = $commentdata['user_id'];\r\n $comment_content = $commentdata['comment_content'];\r\n $reward = (int) get_option( 'esportz_redux' )['new-comment-exp'];\r\n\r\n if(class_exists('myCRED_Core'))\r\n mycred_add( 'comments', $user_id, $reward, 'Reward for post commenting', null, $comment_content, 'mycred_exp' );\r\n\r\n}", "title": "" }, { "docid": "be9e7fab9692267569bdae149d88df6e", "score": "0.5269531", "text": "public function hit_reply()\n\t{\n\t\t/* get order id first */\n\t\t$id = I ( \"param.id\" );\n\n\t\t/* updaye is_reply to order*/\n\t\t$data['is_reply']=1;\n\t\t$ok = updateRow('order', $id, $data) ;\n\t\tif ($ok)\n\t\t{\n\t\t\t$this->success ( \"处理成功\" );\n\t\t} else\n\t\t{\n\t\t\t$this->error ( \"处理失败\" );\n\t\t}\n\t}", "title": "" }, { "docid": "8e4bfde50fa007fcf720f60296f336cb", "score": "0.5266104", "text": "public function ques_count_add()\n{\n\t$this->db->set('ques_asked', 'ques_asked+1', FALSE);\n\t$this->db->where('user_mail', $_SESSION['user_email']);\n\t$this->db->update('neko_user_data');\n}", "title": "" }, { "docid": "74d1b48ef284e472d4cc6883312c3e7c", "score": "0.5265515", "text": "function addReplytoPost($app, $cleaned_parameters, $postid, $post_author ){\r\n\r\n $model = $app->getContainer()->get('forumModel');\r\n $model->setSqlQueries($app->getContainer()->get('sqlQueries'));\r\n $model->setDatabaseWrapper($app->getContainer()->get('databaseWrapper'));\r\n $model->setDatabaseConnectionSettings($app->getContainer()->get('settings')['pdo_settings']);\r\n\r\n $verification = $model->addReply($cleaned_parameters['sanitised_message'], $postid, $post_author);\r\n\r\n if($verification != true)\r\n {\r\n echo 'there was an issue adding a reply to your topic';\r\n }\r\n}", "title": "" }, { "docid": "94f51e5f6f4f19b06bdf86fc7ca237d8", "score": "0.5261156", "text": "public function post_reply()\n{\n\t$qid=$this->input->get('id');\n\t$reply_data=array(\n\t\t'Userid'=>$_SESSION['user_id'],\n\t\t'fname'=>\t$_SESSION['user_fname'],\n\t\t'lname'=>\t$_SESSION['user_lname'],\n\t\t'Quesid'=>$qid,\n\t\t'Reply'=>$this->input->post('reply')\n\t);\n\t$this->db->insert('reply_ques',$reply_data);\n\t$this->reply_count($qid);\n\t$this->answer_count_add($qid);\n\t$this->db->set('user_points', 'user_points+2', FALSE);\n\t$this->db->where('user_mail', $_SESSION['user_email']);\n\t$this->db->update('neko_user_data');\n\t$url=base_url('index.php/home/ques_open?id='.$qid);\n\tredirect($url);\t\n}", "title": "" }, { "docid": "8d504934f4284af44126feb450cfc156", "score": "0.52556556", "text": "public function removeAdminAnswer(){\n\n if (!$this->isUseAdmin()){\n return true;\n }\n\n $voteId = (integer)$this->InputFilter->getParameter(\"voteId\");\n\n $this->MySQL->query(\"DELETE FROM votes_answers where `id` = $voteId\");\n\n return true;\n\n }", "title": "" }, { "docid": "33621765f87ebf6f6809bffa94eed91a", "score": "0.5244854", "text": "function getAnnouncements($flag)\r\n{\r\n\tglobal $announcements_limit, $mysql_announcement_table, $a, $db, $lang_delete, $lang_edit;\r\n\tif($a == 1){\r\n\t\t$sql = \"select * from $mysql_announcement_table order by id desc\";\r\n\t}\r\n\telse{\r\n\t\t$sql = \"select * from $mysql_announcement_table order by id desc limit $announcements_limit\";\r\n\t}\r\n\r\n\t$result = $db->query($sql);\r\n\t$i=0;\r\n\r\n\tif($flag == 'user' || $flag == 'supporter'){\r\n\t\twhile($row = $db->fetch_row($result)){\r\n\t\t\techo \"\\n<td class=date><b>\".date(\"F d, Y\",$row[1]).\"</b>\";\r\n\r\n\t\t\tif($i == $announcements_limit-1){\r\n\t\t\t\techo \"<a name=place></a>\";\r\n\t\t\t}\r\n\r\n\t\t\techo \"\\n</td></tr>\";\r\n echo \"\\n<tr><td class=back2>&nbsp;&nbsp;&nbsp;&nbsp;\".nl2br(stripslashes($row[2])).\"\\n</td></tr>\";\r\n\t\t\t$i++;\r\n\t\t}\r\n\t}\r\n\r\n\tif($flag == 'admin'){\r\n\t\twhile($row = $db->fetch_row($result)){\r\n\t\t\techo \"<td class=date><b>\".date(\"F d, Y\",$row[1]).\"</b>\";\r\n\t\t\tif($i==$announcements_limit-1){\r\n\t\t\t\techo \"<a name=place></a>\";\r\n\t\t\t}\r\n\t\t\techo \"&nbsp;&nbsp;&nbsp;&nbsp; \";\r\n\t\t\techo \"<a href=\\\"index.php?t=delete&id=$row[0]\\\">$lang_delete</a>\";\r\n\r\n\t\t\techo \", <a href=\\\"index.php?m=update&id=$row[0]\\\">\";\r\n\t\t\techo \" $lang_edit</a>?\";\r\n\r\n\t\t\techo \"</td></tr>\";\r\n echo \"<tr><td class=back2>&nbsp;&nbsp;&nbsp;&nbsp;\".nl2br(stripslashes($row[2])).\"</td></tr>\";\r\n\t\t\t$i++;\r\n\t\t}\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "4c5d6e0ff58f155741a3ff690ccc99ae", "score": "0.5240981", "text": "function mysupport_showthread()\r\n{\r\n\tglobal $mybb;\r\n\t\r\n\tif($mybb->settings['enablemysupport'] != 1)\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\t\r\n\tglobal $db, $cache, $lang, $templates, $theme, $thread, $forum, $mysupport_status, $mysupport_options, $mysupport_js, $support_denial_reasons, $mod_log_action, $redirect;\r\n\t\r\n\t$lang->load(\"mysupport\");\r\n\r\n\t$tid = intval($thread['tid']);\r\n\t$fid = intval($thread['fid']);\r\n\t\r\n\tif(mysupport_forum($forum['fid']) && $mybb->input['action'] != \"mysupport\" && $mybb->input['action'] != \"bestanswer\")\r\n\t{\r\n\t\t// load the denied reasons so we can display them to staff if necessary\r\n\t\tif($mybb->settings['enablemysupportsupportdenial'] == 1 && mysupport_usergroup(\"canmanagesupportdenial\"))\r\n\t\t{\r\n\t\t\t$support_denial_reasons = array();\r\n\t\t\t$mysupport_cache = $cache->read(\"mysupport\");\r\n\t\t\tif(!empty($mysupport_cache['deniedreasons']))\r\n\t\t\t{\r\n\t\t\t\tforeach($mysupport_cache['deniedreasons'] as $deniedreasons)\r\n\t\t\t\t{\r\n\t\t\t\t\t$support_denial_reasons[$deniedreason['mid']] = htmlspecialchars_uni($deniedreason['name']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif($thread['issupportthread'] == 1)\r\n\t\t{\r\n\t\t\t$mysupport_options = \"\";\r\n\t\t\t$count = 0;\r\n\t\t\t$mysupport_solved = $mysupport_solved_and_close = $mysupport_technical = $mysupport_not_solved = $on_hold = $assigned_list = $priorities_list = $categories_list = $is_support_thread = \"\";\r\n\t\t\t// if it's not already solved\r\n\t\t\tif($thread['status'] != 1)\r\n\t\t\t{\r\n\t\t\t\t// can they mark as solved??\r\n\t\t\t\tif(mysupport_usergroup(\"canmarksolved\") || ($mybb->settings['mysupportauthor'] == 1 && $thread['uid'] == $mybb->user['uid']))\r\n\t\t\t\t{\r\n\t\t\t\t\t// closing when solved is either optional, or off\r\n\t\t\t\t\tif($mybb->settings['mysupportclosewhensolved'] != \"always\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($mybb->input['mysupport_full'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$mysupport_solved = \"<option value=\\\"1\\\">\".$lang->solved.\"</option>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$text = $lang->sprintf($lang->markas_link, $lang->solved);\r\n\t\t\t\t\t\t\t$class = \"mysupport_tab_solved\";\r\n\t\t\t\t\t\t\t$url = $mybb->settings['bburl'].\"/showthread.php?action=mysupport&amp;action=mysupport&amp;status=1&amp;tid={$tid}&amp;my_post_key={$mybb->post_code}\";\r\n\t\t\t\t\t\t\teval(\"\\$mysupport_options .= \\\"\".$templates->get('mysupport_tab').\"\\\";\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t++$count;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// is the ability to close turned on??\r\n\t\t\t\t\tif($mybb->settings['mysupportclosewhensolved'] != \"never\" && $thread['closed'] != 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// if the close setting isn't never, this option would show regardless of whether it's set to always or optional\r\n\t\t\t\t\t\tif($mybb->input['mysupport_full'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$mysupport_solved_and_close = \"<option value=\\\"3\\\">\".$lang->solved_close.\"</option>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$text = $lang->sprintf($lang->markas_link, $lang->solved_close);\r\n\t\t\t\t\t\t\t$class = \"mysupport_tab_solved\";\r\n\t\t\t\t\t\t\t$url = $mybb->settings['bburl'].\"/showthread.php?action=mysupport&amp;action=mysupport&amp;status=3&amp;tid={$tid}&amp;my_post_key={$mybb->post_code}\";\r\n\t\t\t\t\t\t\teval(\"\\$mysupport_options .= \\\"\".$templates->get('mysupport_tab').\"\\\";\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t++$count;\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// is the technical threads feature on??\r\n\t\t\t\tif($mybb->settings['enablemysupporttechnical'] == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t// can they mark as techincal??\r\n\t\t\t\t\tif(mysupport_usergroup(\"canmarktechnical\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($thread['status'] != 2)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// if it's not marked as technical, give an option to mark it as such\r\n\t\t\t\t\t\t\tif($mybb->input['mysupport_full'])\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$mysupport_technical = \"<option value=\\\"2\\\">\".$lang->technical.\"</option>\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$text = $lang->sprintf($lang->markas_link, $lang->technical);\r\n\t\t\t\t\t\t\t\t$class = \"mysupport_tab_technical\";\r\n\t\t\t\t\t\t\t\t$url = $mybb->settings['bburl'].\"/showthread.php?action=mysupport&amp;action=mysupport&amp;status=2&amp;tid={$tid}&amp;my_post_key={$mybb->post_code}\";\r\n\t\t\t\t\t\t\t\teval(\"\\$mysupport_options .= \\\"\".$templates->get('mysupport_tab').\"\\\";\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// if it's already marked as technical, have an option to put it back to normal\r\n\t\t\t\t\t\t\tif($mybb->input['mysupport_full'])\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$mysupport_technical = \"<option value=\\\"4\\\">\".$lang->not_technical.\"</option>\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$text = $lang->sprintf($lang->markas_link, $lang->not_technical);\r\n\t\t\t\t\t\t\t\t$class = \"mysupport_tab_technical\";\r\n\t\t\t\t\t\t\t\t$url = $mybb->settings['bburl'].\"/showthread.php?action=mysupport&amp;action=mysupport&amp;status=4&amp;tid={$tid}&amp;my_post_key={$mybb->post_code}\";\r\n\t\t\t\t\t\t\t\teval(\"\\$mysupport_options .= \\\"\".$templates->get('mysupport_tab').\"\\\";\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t++$count;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// if it's solved, all you can do is mark it as not solved\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// are they allowed to mark it as not solved if it's been marked solved already??\r\n\t\t\t\tif($mybb->settings['mysupportunsolve'] == 1 && (mysupport_usergroup(\"canmarksolved\") || ($mybb->settings['mysupportauthor'] == 1 && $thread['uid'] == $mybb->user['uid'])))\r\n\t\t\t\t{\r\n\t\t\t\t\tif($mybb->input['mysupport_full'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$mysupport_not_solved = \"<option value=\\\"0\\\">\".$lang->not_solved.\"</option>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$text = $lang->sprintf($lang->markas_link, $lang->not_solved);\r\n\t\t\t\t\t\t$class = \"mysupport_tab_not_solved\";\r\n\t\t\t\t\t\t$url = $mybb->settings['bburl'].\"/showthread.php?action=mysupport&amp;action=mysupport&amp;status=0&amp;tid={$tid}&amp;my_post_key={$mybb->post_code}\";\r\n\t\t\t\t\t\teval(\"\\$mysupport_options .= \\\"\".$templates->get('mysupport_tab').\"\\\";\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t++$count;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$status_list = \"\";\r\n\t\t\t// if the current count is more than 0 there's some status options to show\r\n\t\t\tif($count > 0)\r\n\t\t\t{\r\n\t\t\t\t$current_status = mysupport_get_friendly_status($thread['status']);\r\n\t\t\t\t$status_list .= \"<label for=\\\"status\\\">\".$lang->markas.\"</label> <select name=\\\"status\\\">\\n\";\r\n\t\t\t\t// show the current status but have the value as -1 so it's treated as not submitting a status\r\n\t\t\t\t// doing this because the assigning and priority menus show their current values, so do it here too for consistency\r\n\t\t\t\t$status_list .= \"<option value=\\\"-1\\\">\".htmlspecialchars_uni($current_status).\"</option>\\n\";\r\n\t\t\t\t// also show a blank option with a value of -1\r\n\t\t\t\t$status_list .= \"<option value=\\\"-1\\\"></option>\\n\";\r\n\t\t\t\t$status_list .= $mysupport_not_solved.\"\\n\";\r\n\t\t\t\t$status_list .= $mysupport_solved.\"\\n\";\r\n\t\t\t\t$status_list .= $mysupport_solved_and_close.\"\\n\";\r\n\t\t\t\t$status_list .= $mysupport_technical.\"\\n\";\r\n\t\t\t\t$status_list .= \"</select>\\n\";\r\n\t\t\t\tif($mybb->input['ajax'])\r\n\t\t\t\t{\r\n\t\t\t\t\t$status_list = \"<tr>\\n<td class=\\\"trow1\\\" align=\\\"center\\\">\".$status_list.\"\\n</td>\\n</tr>\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($mybb->settings['enablemysupportbestanswer'] == 1)\r\n\t\t\t{\r\n\t\t\t\t// this doesn't need to show when viewing the 'full' form, as only staff will be seeing that\r\n\t\t\t\tif($thread['bestanswer'] != 0 && !$mybb->input['mysupport_full'])\r\n\t\t\t\t{\r\n\t\t\t\t\t$post = intval($thread['bestanswer']);\r\n\t\t\t\t\t$text = $lang->jump_to_bestanswer_tab;\r\n\t\t\t\t\t$class = \"mysupport_tab_best_answer\";\r\n\t\t\t\t\t$url = $mybb->settings['bburl'].\"/\".get_post_link($post, $tid).\"#pid\".$post;\r\n\t\t\t\t\teval(\"\\$mysupport_options .= \\\"\".$templates->get('mysupport_tab').\"\\\";\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($thread['status'] != 1 && (mysupport_usergroup(\"canmarksolved\") || ($mybb->settings['mysupportauthor'] == 1 && $thread['uid'] == $mybb->user['uid'])))\r\n\t\t\t{\r\n\t\t\t\tif($mybb->settings['enablemysupportonhold'] == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($mybb->input['mysupport_full'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$checked = \"\";\r\n\t\t\t\t\t\tif($thread['onhold'] == 1)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$checked = \" checked=\\\"checked\\\"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$on_hold = \"<label for=\\\"onhold\\\">\".$lang->onhold_form.\"</label> <input type=\\\"checkbox\\\" name=\\\"onhold\\\" id=\\\"onhold\\\" value=\\\"1\\\"{$checked} />\";\r\n\t\t\t\t\t\tif($mybb->input['ajax'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$on_hold = \"<tr>\\n<td class=\\\"trow1\\\" align=\\\"center\\\">\".$on_hold.\"\\n</td>\\n</tr>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($thread['onhold'] == 1)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$text = $lang->hold_off;\r\n\t\t\t\t\t\t\t$class = \"mysupport_tab_hold\";\r\n\t\t\t\t\t\t\t$url = $mybb->settings['bburl'].\"/showthread.php?action=mysupport&amp;action=mysupport&amp;onhold=0&amp;tid={$tid}&amp;my_post_key={$mybb->post_code}\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$text = $lang->hold_on;\r\n\t\t\t\t\t\t\t$class = \"mysupport_tab_hold\";\r\n\t\t\t\t\t\t\t$url = $mybb->settings['bburl'].\"/showthread.php?action=mysupport&amp;action=mysupport&amp;onhold=1&amp;tid={$tid}&amp;my_post_key={$mybb->post_code}\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\teval(\"\\$mysupport_options .= \\\"\".$templates->get('mysupport_tab').\"\\\";\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// do we need to show the link to show the additional options??\r\n\t\t\t// for assigning users, and setting priorities and categories, check the permission; if we're requesting the information, show it, if not, set this to true\r\n\t\t\t$show_more_link = false;\r\n\t\t\t// check if assigning threads is enabled and make sure you can assign threads to people\r\n\t\t\t// also check if the thread is currently not solved, or if it's solved but you can unsolve it; if any of those are true, you may want to assign it\r\n\t\t\tif($mybb->settings['enablemysupportassign'] == 1 && mysupport_usergroup(\"canassign\") && ($thread['status'] != 1 || ($thread['status'] == 1 && $mybb->settings['mysupportunsolve'] == 1)))\r\n\t\t\t{\r\n\t\t\t\tif($mybb->input['mysupport_full'])\r\n\t\t\t\t{\r\n\t\t\t\t\t$assign_users = mysupport_get_assign_users();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// only continue if there's one or more users that can be assigned threads\r\n\t\t\t\t\tif(!empty($assign_users))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$assigned_list .= \"<label for=\\\"assign\\\">\".$lang->assign_to.\"</label> <select name=\\\"assign\\\">\\n\";\r\n\t\t\t\t\t\t$assigned_list .= \"<option value=\\\"0\\\"></option>\\n\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tforeach($assign_users as $assign_userid => $assign_username)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$selected = \"\";\r\n\t\t\t\t\t\t\tif($thread['assign'] == $assign_userid)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$selected = \" selected=\\\"selected\\\"\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$assigned_list .= \"<option value=\\\"\".intval($assign_userid).\"\\\"{$selected}>\".htmlspecialchars_uni($assign_username).\"</option>\\n\";\r\n\t\t\t\t\t\t\t++$count;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif($thread['assign'] != 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$assigned_list .= \"<option value=\\\"-1\\\">\".$lang->assign_to_nobody.\"</option>\\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$assigned_list .= \"</select>\\n\";\r\n\t\t\t\t\t\tif($mybb->input['ajax'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$assigned_list = \"<tr>\\n<td class=\\\"trow1\\\" align=\\\"center\\\">\".$assigned_list.\"\\n</td>\\n</tr>\";\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$show_more_link = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// are priorities enabled and can this user set priorities??\r\n\t\t\tif($mybb->settings['enablemysupportpriorities'] == 1 && mysupport_usergroup(\"cansetpriorities\"))\r\n\t\t\t{\r\n\t\t\t\tif($mybb->input['mysupport_full'])\r\n\t\t\t\t{\r\n\t\t\t\t\t$mysupport_cache = $cache->read(\"mysupport\");\r\n\t\t\t\t\tif(!empty($mysupport_cache['priorities']))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$priorities_list .= \"<label for=\\\"priority\\\">\".$lang->priority.\"</label> <select name=\\\"priority\\\">\\n\";\r\n\t\t\t\t\t\t$priorities_list .= \"<option value=\\\"0\\\"></option>\\n\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tforeach($mysupport_cache['priorities'] as $priority)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$option_style = \"\";\r\n\t\t\t\t\t\t\tif(!empty($priority['extra']))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$option_style = \" style=\\\"background: #\".htmlspecialchars_uni($priority['extra']).\"\\\"\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$selected = \"\";\r\n\t\t\t\t\t\t\tif($thread['priority'] == $priority['mid'])\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$selected = \" selected=\\\"selected\\\"\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$priorities_list .= \"<option value=\\\"\".intval($priority['mid']).\"\\\"{$option_style}{$selected}>\".htmlspecialchars_uni($priority['name']).\"</option>\\n\";\r\n\t\t\t\t\t\t\t++$count;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif($thread['priority'] != 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$priorities_list .= \"<option value=\\\"-1\\\">\".$lang->priority_none.\"</option>\\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$priorities_list .= \"</select>\\n\";\r\n\t\t\t\t\t\tif($mybb->input['ajax'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$priorities_list = \"<tr>\\n<td class=\\\"trow1\\\" align=\\\"center\\\">\".$priorities_list.\"\\n</td>\\n</tr>\";\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$show_more_link = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(mysupport_usergroup(\"canmarksolved\") || ($mybb->settings['mysupportauthor'] == 1 && $thread['uid'] == $mybb->user['uid']))\r\n\t\t\t{\r\n\t\t\t\tif($mybb->input['mysupport_full'])\r\n\t\t\t\t{\r\n\t\t\t\t\t$categories = mysupport_get_categories($forum);\r\n\t\t\t\t\tif(!empty($categories))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$categories_list .= \"<label for=\\\"category\\\">\".$lang->category.\"</label> <select name=\\\"category\\\">\\n\";\r\n\t\t\t\t\t\t$categories_list .= \"<option value=\\\"0\\\"></option>\\n\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tforeach($categories as $category_id => $category)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$selected = \"\";\r\n\t\t\t\t\t\t\tif($thread['prefix'] == $category_id)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$selected = \" selected=\\\"selected\\\"\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$categories_list .= \"<option value=\\\"\".intval($category_id).\"\\\"{$selected}>\".htmlspecialchars_uni($category).\"</option>\\n\";\r\n\t\t\t\t\t\t\t++$count;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif($thread['prefix'] != 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$categories_list .= \"<option value=\\\"-1\\\">\".$lang->category_none.\"</option>\\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$categories_list .= \"</select>\\n\";\r\n\t\t\t\t\t\tif($mybb->input['ajax'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$categories_list = \"<tr>\\n<td class=\\\"trow1\\\" align=\\\"center\\\">\".$categories_list.\"\\n</td>\\n</tr>\";\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$show_more_link = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(mysupport_usergroup(\"canmarksolved\") || ($mybb->settings['mysupportauthor'] == 1 && $thread['uid'] == $mybb->user['uid']) && $mybb->settings['enablemysupportnotsupportthread'] != 0)\r\n\t\t\t{\r\n\t\t\t\tif($mybb->input['mysupport_full'])\r\n\t\t\t\t{\r\n\t\t\t\t\t$checked = \"\";\r\n\t\t\t\t\tif($thread['issupportthread'] == 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$checked = \" checked=\\\"checked\\\"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$is_support_thread .= \"<label for=\\\"issupportthread\\\">\".$lang->issupportthread.\"</label>\\n\";\r\n\t\t\t\t\t$is_support_thread .= \"<input type=\\\"checkbox\\\" name=\\\"issupportthread\\\" id=\\\"issupportthread\\\"{$checked} value=\\\"1\\\" />\\n\";\r\n\t\t\t\t\tif($mybb->input['ajax'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$is_support_thread = \"<tr>\\n<td class=\\\"trow1\\\" align=\\\"center\\\">\".$is_support_thread.\"\\n</td>\\n</tr>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$show_more_link = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($show_more_link)\r\n\t\t\t{\r\n\t\t\t\t$mysupport_js = \"<div id=\\\"mysupport_showthread_more_box\\\" style=\\\"display: none;\\\"></div>\r\n<script type=\\\"text/javascript\\\">\r\nfunction mysupport_more_link()\r\n{\r\n\tvar url = '{$mybb->settings['bburl']}/showthread.php?tid={$tid}&mysupport_full=1';\r\n\t\r\n\tnew Ajax.Request(url+'&ajax=1', {\r\n\t\tmethod: 'get',\r\n\t\tonSuccess: function(data) {\r\n\t\t\tif(data.responseText != '')\r\n\t\t\t{\r\n\t\t\t\t$('mysupport_showthread_more_box').style.display = '';\r\n\t\t\t\t$('mysupport_showthread_more_box').innerHTML = data.responseText;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\twindow.location = url;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction mysupport_close_more_box()\r\n{\r\n\t$('mysupport_showthread_more_box').style.display = 'none';\r\n\t$('mysupport_showthread_more_box').innerHTML = '';\r\n}\r\n</script>\";\r\n\t\t\t\t\r\n\t\t\t\t$text = $lang->mysupport_tab_more;\r\n\t\t\t\t$class = \"mysupport_tab_misc\";\r\n\t\t\t\t$url = $mybb->settings['bburl'].\"/showthread.php?tid={$tid}&amp;mysupport_full=1\";\r\n\t\t\t\t$onclick = \" onclick=\\\"mysupport_more_link(); return false\\\"\";\r\n\t\t\t\teval(\"\\$mysupport_options .= \\\"\".$templates->get('mysupport_tab').\"\\\";\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$text = $lang->issupportthread_mark_as_support_thread;\r\n\t\t\t$class = \"mysupport_tab_misc\";\r\n\t\t\t$url = $mybb->settings['bburl'].\"/showthread.php?action=mysupport&amp;issupportthread=1&amp;tid={$tid}&amp;my_post_key={$mybb->post_code}\";\r\n\t\t\teval(\"\\$mysupport_options .= \\\"\".$templates->get('mysupport_tab').\"\\\";\");\r\n\t\t}\r\n\t\t\r\n\t\tif($mybb->input['mysupport_full'])\r\n\t\t{\r\n\t\t\t// are there actually any options to show for this user??\r\n\t\t\tif($count > 0)\r\n\t\t\t{\r\n\t\t\t\tif($mybb->input['ajax'] == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\teval(\"\\$mysupport_options = \\\"\".$templates->get('mysupport_form_ajax').\"\\\";\");\r\n\t\t\t\t\t// this is an AJAX request, echo and exit, GO GO GO\r\n\t\t\t\t\techo $mysupport_options;\r\n\t\t\t\t\texit;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\teval(\"\\$mysupport_options = \\\"\".$templates->get('mysupport_form').\"\\\";\");\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$mysupport_options = \"<br /><div class=\\\"mysupport_tabs\\\">{$mysupport_options}</div>\";\r\n\t\t}\r\n\t\t\r\n\t\tif($thread['issupportthread'] == 1)\r\n\t\t{\r\n\t\t\t$mysupport_status = mysupport_get_display_status($thread['status'], $thread['onhold'], $thread['statustime'], $thread['uid']);\r\n\t\t}\r\n\t}\r\n\t\r\n\tif($mybb->input['action'] == \"mysupport\")\r\n\t{\r\n\t\tverify_post_check($mybb->input['my_post_key']);\r\n\t\t$status = $db->escape_string($mybb->input['status']);\r\n\t\t$assign = $db->escape_string($mybb->input['assign']);\r\n\t\t$priority = $db->escape_string($mybb->input['priority']);\r\n\t\t$category = $db->escape_string($mybb->input['category']);\r\n\t\t$onhold = $db->escape_string($mybb->input['onhold']);\r\n\t\t$issupportthread = $db->escape_string($mybb->input['issupportthread']);\r\n\t\t$tid = intval($thread['tid']);\r\n\t\t$fid = intval($thread['fid']);\r\n\t\t$old_status = intval($thread['status']);\r\n\t\t$old_assign = intval($thread['assign']);\r\n\t\t$old_priority = intval($thread['priority']);\r\n\t\t$old_category = intval($thread['prefix']);\r\n\t\t$old_onhold = intval($thread['onhold']);\r\n\t\t$old_issupportthread = intval($thread['issupportthread']);\r\n\t\t\r\n\t\t// we need to make sure they haven't edited the form to try to perform an action they're not allowed to do\r\n\t\t// we check everything in the entire form, if any part of it is wrong, it won't do anything\r\n\t\tif(!mysupport_forum($fid))\r\n\t\t{\r\n\t\t\tmysupport_error($lang->error_not_mysupport_forum);\r\n\t\t\texit;\r\n\t\t}\r\n\t\t// are they trying to assign the same status it already has??\r\n\t\tif($status == $old_status && !isset($mybb->input['onhold']) && !isset($mybb->input['issupportthread']))\r\n\t\t{\r\n\t\t\t$duplicate_status = mysupport_get_friendly_status($status);\r\n\t\t\tmysupport_error($lang->sprintf($lang->error_same_status, $duplicate_status));\r\n\t\t\texit;\r\n\t\t}\r\n\t\telseif($status == 0)\r\n\t\t{\r\n\t\t\t// either the ability to unsolve is turned off,\r\n\t\t\t// they don't have permission to mark as not solved via group permissions, or they're not allowed to mark it as not solved even though they authored it\r\n\t\t\tif($mybb->settings['mysupportunsolve'] != 1 || (!mysupport_usergroup(\"canmarksolved\") && !($mybb->settings['mysupportauthor'] == 1 && $thread['uid'] == $mybb->user['uid'])))\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->no_permission_mark_notsolved);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$valid_action = true;\r\n\t\t}\r\n\t\telseif($status == 1)\r\n\t\t{\r\n\t\t\t// either they're not in a group that can mark as solved\r\n\t\t\t// or they're not allowed to mark it as solved even though they authored it\r\n\t\t\tif(!mysupport_usergroup(\"canmarksolved\") && !($mybb->settings['mysupportauthor'] == 1 && $thread['uid'] == $mybb->user['uid']))\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->no_permission_mark_solved);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$valid_action = true;\r\n\t\t}\r\n\t\telseif($status == 2)\r\n\t\t{\r\n\t\t\tif($mybb->settings['enablemysupporttechnical'] != 1)\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->technical_not_enabled);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// they don't have the ability to mark threads as technical\r\n\t\t\tif(!mysupport_usergroup(\"canmarktechnical\"))\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->no_permission_mark_technical);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$valid_action = true;\r\n\t\t}\r\n\t\telseif($status == 3)\r\n\t\t{\r\n\t\t\t// either closing of threads is turned off altogether\r\n\t\t\t// or it's on, but they're not in a group that can't mark as solved\r\n\t\t\tif($thread['closed'] == 1 || $mybb->settings['mysupportclosewhensolved'] == \"never\" || ($mybb->settings['mysupportclosewhensolved'] != \"never\" && (!mysupport_usergroup(\"canmarksolved\") && !($mybb->settings['mysupportauthor'] == 1 && $thread['uid'] == $mybb->user['uid']))))\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->no_permission_mark_solved_close);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$valid_action = true;\r\n\t\t}\r\n\t\telseif($status == 4)\r\n\t\t{\r\n\t\t\t// they don't have the ability to mark threads as not technical\r\n\t\t\tif(!mysupport_usergroup(\"canmarktechnical\"))\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->no_permission_mark_nottechnical);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$valid_action = true;\r\n\t\t}\r\n\t\t// check if the thread is being put on/taken off hold\r\n\t\t// check here is a bit weird as it'll be 1/-1 if coming from the tab link, and 1 or nothing if coming from the checkbox in the form\r\n\t\t// if it's coming from the form, check if it's being put on hold and wasn't on hold before (put on hold), or the box wasn't checked and it was on hold before (taken off hold)\r\n\t\t// or, if it's coming from the link, check if it's being put on hold and wasn't on hold before (put on hold), or it's being taken off hold and was on hold before\r\n\t\tif(($mybb->input['via_form'] == 1 && (($onhold == 1 && $old_onhold == 0) || (!$onhold && $old_onhold == 1))) || (!$mybb->input['via_form'] && (($onhold == 1 && $old_onhold == 0) || ($onhold == -1 && $old_onhold == 1))))\r\n\t\t{\r\n\t\t\tif($mybb->settings['enablemysupportonhold'] != 1)\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->onhold_not_enabled);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($thread['status'] == 1)\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->onhold_solved);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!mysupport_usergroup(\"canmarksolved\") && !($mybb->settings['mysupportauthor'] == 1 && $thread['uid'] == $mybb->user['uid']))\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->no_permission_thread_hold);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// we don't need to perform the big check above again, as if we're in here we know it's being changed\r\n\t\t\t// it'll either be 1, 0 or -1, if it's anything other than 1, we're taking it off hold\r\n\t\t\tif($onhold != 1)\r\n\t\t\t{\r\n\t\t\t\t$ohold = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$valid_action = true;\r\n\t\t}\r\n\t\tif(($mybb->input['via_form'] == 1 && (($issupportthread == 1 && $old_issupportthread == 0) || (!$issupportthread && $old_issupportthread == 1))))\r\n\t\t{\r\n\t\t\tif($mybb->settings['enablemysupportnotsupportthread'] != 1)\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->issupportthread_not_enabled);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!mysupport_usergroup(\"canmarksolved\") && !($mybb->settings['mysupportauthor'] == 1 && $thread['uid'] == $mybb->user['uid']))\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->no_permission_issupportthread);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// trying to assign a thread to someone\r\n\t\tif($assign != 0)\r\n\t\t{\r\n\t\t\tif($mybb->settings['enablemysupportassign'] != 1)\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->assign_not_enabled);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t// trying to assign a solved thread\r\n\t\t\t// this is needed to see if we're trying to assign a currently solved thread whilst at the same time changing the status of it\r\n\t\t\t// the option to assign will still be there if it's solved as you may want to unsolve it and assign it again, but we can't assign it if it's staying solved, we have to be unsolving it\r\n\t\t\tif($thread['status'] == 1 && $status != 0)\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->assign_solved);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!mysupport_usergroup(\"canassign\"))\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->assign_no_perms);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$assign_users = mysupport_get_assign_users();\r\n\t\t\t// -1 is what's used to unassign a thread so we need to exclude that\r\n\t\t\tif(!array_key_exists($assign, $assign_users) && $assign != \"-1\")\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->assign_invalid);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$valid_action = true;\r\n\t\t}\r\n\t\t// setting a priority\r\n\t\tif($priority != 0)\r\n\t\t{\r\n\t\t\tif($mybb->settings['enablemysupportpriorities'] != 1)\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->priority_not_enabled);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!mysupport_usergroup(\"cansetpriorities\"))\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->priority_no_perms);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($thread['status'] == 1 && $status != 0)\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->priority_solved);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$mysupport_cache = $cache->read(\"mysupport\");\r\n\t\t\t$mids = array();\r\n\t\t\tif(!empty($mysupport_cache['priorities']))\r\n\t\t\t{\r\n\t\t\t\tforeach($mysupport_cache['priorities'] as $priority_info)\r\n\t\t\t\t{\r\n\t\t\t\t\t$mids[] = intval($priority_info['mid']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!in_array($priority, $mids) && $priority != \"-1\")\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->priority_invalid);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$valid_action = true;\r\n\t\t}\r\n\t\t// setting a category\r\n\t\tif($category != 0)\r\n\t\t{\r\n\t\t\t$categories = mysupport_get_categories($forum);\r\n\t\t\tif(!array_key_exists($category, $categories) && $category != \"-1\")\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->category_invalid);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$valid_action = true;\r\n\t\t}\r\n\t\t// it didn't hit an error with any of the above, it's a valid action\r\n\t\tif($valid_action !== false)\r\n\t\t{\r\n\t\t\t// if you're choosing the same status or choosing none\r\n\t\t\t// and assigning the same user or assigning none (as in the empty option, not choosing 'Nobody' to remove an assignment)\r\n\t\t\t// and setting the same priority or setting none (as in the empty option, not choosing 'None' to remove a priority)\r\n\t\t\t// and setting the same hold status, and setting the same issupportthread status\r\n\t\t\t// then you're not actually doing anything, because you're either choosing the same stuff, or choosing nothing at all\r\n\t\t\tif(($status == $old_status || $status == \"-1\") && ($assign == $old_assign || $assign == 0) && ($priority == $old_priority || $priority == 0) && ($category == $old_category || $category == 0) && ($onhold == $old_onhold) && ($issupportthread == $old_issupportthread))\r\n\t\t\t{\r\n\t\t\t\tmysupport_error($lang->error_no_action);\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$mod_log_action = \"\";\r\n\t\t\t$redirect = \"\";\r\n\t\t\t\r\n\t\t\tif($issupportthread != $old_issupportthread)\r\n\t\t\t{\r\n\t\t\t\tmysupport_change_issupportthread($thread, $issupportthread);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// change the status and move/close\r\n\t\t\t\tif($status != $old_status && $status != \"-1\")\r\n\t\t\t\t{\r\n\t\t\t\t\tmysupport_change_status($thread, $status);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif($onhold != $old_onhold)\r\n\t\t\t\t{\r\n\t\t\t\t\tmysupport_change_hold($thread, $onhold);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// we need to see if the same user has been submitted so it doesn't run this for no reason\r\n\t\t\t\t// we also need to check if it's being marked as solved, if it is we don't need to do anything with assignments, it'll just be ignored\r\n\t\t\t\tif($assign != $old_assign && ($assign != 0 && $status != 1 && $status != 3))\r\n\t\t\t\t{\r\n\t\t\t\t\tmysupport_change_assign($thread, $assign);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// we need to see if the same priority has been submitted so it doesn't run this for no reason\r\n\t\t\t\t// we also need to check if it's being marked as solved, if it is we don't need to do anything with priorities, it'll just be ignored\r\n\t\t\t\tif($priority != $old_priority && ($priority != 0 && $status != 1))\r\n\t\t\t\t{\r\n\t\t\t\t\tmysupport_change_priority($thread, $priority);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// we need to see if the same category has been submitted so it doesn't run this for no reason\r\n\t\t\t\tif($category != $old_category && ($category != 0 && $status != 1))\r\n\t\t\t\t{\r\n\t\t\t\t\tmysupport_change_category($thread, $category);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!empty($mod_log_action))\r\n\t\t\t{\r\n\t\t\t\t$mod_log_data = array(\r\n\t\t\t\t\t\"fid\" => intval($fid),\r\n\t\t\t\t\t\"tid\" => intval($tid)\r\n\t\t\t\t);\r\n\t\t\t\tlog_moderator_action($mod_log_data, $mod_log_action);\r\n\t\t\t}\r\n\t\t\t// where should they go to afterwards??\r\n\t\t\t$thread_url = get_thread_link($tid);\r\n\t\t\tredirect($thread_url, $redirect);\r\n\t\t}\r\n\t}\r\n\telseif($mybb->input['action'] == \"bestanswer\")\r\n\t{\r\n\t\tverify_post_check($mybb->input['my_post_key']);\r\n\t\tif($mybb->settings['enablemysupportbestanswer'] != 1)\r\n\t\t{\r\n\t\t\tmysupport_error($lang->bestanswer_not_enabled);\r\n\t\t\texit;\r\n\t\t}\r\n\t\t\r\n\t\t$pid = intval($mybb->input['pid']);\r\n\t\t// we only have a pid so we need to get the tid, fid, uid, and mysupport information of the thread it belongs to\r\n\t\t$query = $db->query(\"\r\n\t\t\tSELECT t.fid, t.tid, t.uid AS author_uid, p.uid AS bestanswer_uid, t.status, t.bestanswer\r\n\t\t\tFROM \".TABLE_PREFIX.\"threads t\r\n\t\t\tINNER JOIN \".TABLE_PREFIX.\"forums f\r\n\t\t\tINNER JOIN \".TABLE_PREFIX.\"posts p\r\n\t\t\tON (t.tid = p.tid AND t.fid = f.fid AND p.pid = '\".$pid.\"')\r\n\t\t\");\r\n\t\t$post_info = $db->fetch_array($query);\r\n\t\t\r\n\t\t// is this post in a thread that isn't within an allowed forum??\r\n\t\tif(!mysupport_forum($post_info['fid']))\r\n\t\t{\r\n\t\t\tmysupport_error($lang->bestanswer_invalid_forum);\r\n\t\t\texit;\r\n\t\t}\r\n\t\t// did this user author this thread??\r\n\t\telseif($mybb->user['uid'] != $post_info['author_uid'])\r\n\t\t{\r\n\t\t\tmysupport_error($lang->bestanswer_not_author);\r\n\t\t\texit;\r\n\t\t}\r\n\t\t// is this post already the best answer??\r\n\t\telseif($pid == $post_info['bestanswer'])\r\n\t\t{\r\n\t\t\t// this will mark it as the best answer\r\n\t\t\t$status_update = array(\r\n\t\t\t\t\"bestanswer\" => 0\r\n\t\t\t);\r\n\t\t\t// update the bestanswer column for this thread with 0\r\n\t\t\t$db->update_query(\"threads\", $status_update, \"tid = '\".intval($post_info['tid']).\"'\");\r\n\t\t\t\r\n\t\t\t// are we removing points for this??\r\n\t\t\tif(mysupport_points_system_enabled())\r\n\t\t\t{\r\n\t\t\t\tif(!empty($mybb->settings['mysupportbestanswerpoints']) && $mybb->settings['mysupportbestanswerpoints'] != 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tmysupport_update_points($mybb->settings['mysupportbestanswerpoints'], $post_info['bestanswer_uid'], true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$redirect = \"\";\r\n\t\t\tmysupport_redirect_message($lang->unbestanswer_redirect);\r\n\t\t\t\r\n\t\t\t// where should they go to afterwards??\r\n\t\t\t$thread_url = get_thread_link($post_info['tid']);\r\n\t\t\tredirect($thread_url, $redirect);\r\n\t\t}\r\n\t\t// mark it as the best answer\r\n\t\telse\r\n\t\t{\r\n\t\t\t$status_update = array(\r\n\t\t\t\t\"bestanswer\" => intval($pid)\r\n\t\t\t);\r\n\t\t\t// update the bestanswer column for this thread with the pid of the best answer\r\n\t\t\t$db->update_query(\"threads\", $status_update, \"tid = '\".intval($post_info['tid']).\"'\");\r\n\t\t\t\r\n\t\t\t// are we adding points for this??\r\n\t\t\tif(mysupport_points_system_enabled())\r\n\t\t\t{\r\n\t\t\t\tif(!empty($mybb->settings['mysupportbestanswerpoints']) && $mybb->settings['mysupportbestanswerpoints'] != 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tmysupport_update_points($mybb->settings['mysupportbestanswerpoints'], $post_info['bestanswer_uid']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// if this thread isn't solved yet, do that too whilst we're here\r\n\t\t\t// if they're marking a post as the best answer, it must have solved the thread, so save them marking it as solved manually\r\n\t\t\tif($post_info['status'] != 1 && (mysupport_usergroup(\"canmarksolved\") || ($mybb->settings['mysupportauthor'] == 1 && $post_info['author_uid'] == $mybb->user['uid'])))\r\n\t\t\t{\r\n\t\t\t\t$mod_log_action = \"\";\r\n\t\t\t\t$redirect = \"\";\r\n\t\t\t\t\r\n\t\t\t\t// change the status\r\n\t\t\t\tmysupport_change_status($post_info, 1);\r\n\t\t\t\t\r\n\t\t\t\tif(!empty($mod_log_action))\r\n\t\t\t\t{\r\n\t\t\t\t\t$mod_log_data = array(\r\n\t\t\t\t\t\t\"fid\" => intval($post_info['fid']),\r\n\t\t\t\t\t\t\"tid\" => intval($post_info['tid'])\r\n\t\t\t\t\t);\r\n\t\t\t\t\tlog_moderator_action($mod_log_data, $mod_log_action);\r\n\t\t\t\t}\r\n\t\t\t\tmysupport_redirect_message($lang->bestanswer_redirect);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$redirect = \"\";\r\n\t\t\t\tmysupport_redirect_message($lang->bestanswer_redirect);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// where should they go to afterwards??\r\n\t\t\t$thread_url = get_thread_link($post_info['tid']);\r\n\t\t\tredirect($thread_url, $redirect);\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "c89709170b9ca738c1b4a0e127b47320", "score": "0.52383274", "text": "function forumThreadsForums()\n {\n return \"Mooo\";\n }", "title": "" }, { "docid": "983fe3d199d44f46bfd272e027218012", "score": "0.52300495", "text": "static function check_new_post_request(){\n\t\t\n\t\tif(isset($_GET['qpa']) && $_GET['qpa'] == 'write' && isset($_GET['kid'])){\n\t\t\t// Utente loggato\n\t\t\t$current_user = wp_get_current_user();\n\n\t\t\t// Salva il ruolo naturale dell'utente loggato\n\t\t\t$_SESSION['qonnector_current_user_role'] = $current_user->roles[0];\n\t\t\t$_SESSION['qonnector_plan_user_id'] = $current_user->ID;\n\t\t\t$_SESSION['qonnector_post_status'] = 'pending';\n\t\t\t// Salva keyword_plan_id nella sessione per non perderla al salvataggio\n\t\t\t$_SESSION['qonnector_plan_action'] = $_GET['qpa'];\n\t\t\t$_SESSION['qonnector_plan_keyword_id'] = $_GET['kid'];\n\t\t\t// Setta il ruolo dell'utente a COLLABORATORE \n\t\t\t//$current_user->set_role('contributor'); \n\t\t}\n\t}", "title": "" }, { "docid": "9699fb65d4d0de90be25c53bbb305afe", "score": "0.52279735", "text": "function actionForSurvey($userData)\n\t\t{\n\t\t\t$surveyData = $this->manageContent->getValue_where('survey_info','*','set_no',$userData['set_no']);\n\t\t\tif($surveyData[0]['status'] != $userData['action'])\n\t\t\t{\n\t\t\t\t//checking for activation or deactivation\n\t\t\t\tif($userData['action'] == 1)\n\t\t\t\t{\n\t\t\t\t\t//update all field to zero\n\t\t\t\t\t$updAll = $this->manageContent->updateValueWhere('survey_info','status',0,'status',1);\n\t\t\t\t\t//update the set no to active\n\t\t\t\t\t$upd = $this->manageContent->updateValueWhere('survey_info','status',1,'set_no',$userData['set_no']);\n\t\t\t\t}\n\t\t\t\telse if($userData['action'] == 0)\n\t\t\t\t{\n\t\t\t\t\t$upd = $this->manageContent->updateValueWhere('survey_info','status',0,'set_no',$userData['set_no']);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $upd;\n\t\t}", "title": "" }, { "docid": "bdea369f335cae72bbedce5b13c299d4", "score": "0.52265084", "text": "public function openAnswerForm() {\n\t\t\t$this->_testCase->click(\"forum_answer_\" . $this->_id);\n\t\t\t// waitForElementPresent ajax call\n\t\t\tfor ($second = 0; ; $second++) {\n\t\t\t\tif ($second >= 60) {\n\t\t\t\t\t$this->_testCase->fail(\"timeout\");\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tif ($this->_testCase->isElementPresent(\"css=.entry.reply\")) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t}\n\t\t\t\tsleep(1);\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "title": "" }, { "docid": "1b728619f90aab59a6c67754ed968bca", "score": "0.5219962", "text": "public function faq()\n {\n\t\t$this->loadModel('Faqs');\n\t\t$faqs = $this->Faqs->find('all')->where(['Faqs.status' => '1'])->toArray();\n\t\t$layoutTitle = 'StudyBuddy :: Faqs';\n $this->viewBuilder()->layout('innerPage');\n\t\t$this->set(compact('faqs', 'layoutTitle'));\n }", "title": "" }, { "docid": "bbf0767b47d6c8f9cc2affe2d7f9b26d", "score": "0.5217432", "text": "public function want_answers($q_id) {\n\n\t\t\t$message='';\n\t\t\t$stmt = $this->conn->prepare(\"SELECT * FROM likes WHERE question_id = ? ORDER BY time DESC LIMIT 10\");\n\t\t\t$stmt->execute(array($q_id));\n\t\t\tforeach($stmt->fetchAll(PDO::FETCH_ASSOC) as $ii) {\n\t\t\t\t$stmt = $this->conn->prepare(\"SELECT username, name, photo FROM users WHERE id = ?\");\n\t\t\t\t$stmt->execute(array($ii['user_id']));\n\t\t\t\t$iii = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t$message .= '<a class=\"question_want_answer\" href=\"'.$iii['username'].'\">';\n\t\t\t\tif(file_exists('../../media/images/users/tt_'.$iii['photo'].'')) {\n\t\t\t\t\t$message .= '<div class=\"img imgLiquid profile_photo_img\" style=\"width:22px; height:22px\"><img src=\"media/images/users/tt_'.$iii['photo'].'\" alt=\"'.$iii['name'].'\"></div>';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$message .= '<div class=\"img imgLiquid profile_photo_img\" style=\"width:22px; height:22px\"><img src=\"media/images/users/'.$iii['photo'].'\" alt=\"'.$iii['name'].'\"></div>';\n\t\t\t\t}\n\t\t\t\t$message .= '</a>';\n\t\t\t}\n\t\t\treturn $message;\n\t\t}", "title": "" }, { "docid": "cb5318ac22152cf4e1974f13a3d4cb00", "score": "0.52131104", "text": "public function reply()\n\t{\n\t\t$treeview = $this->treeview;\n\t\t$selection = $treeview->get_selection();\n\t\tlist($model, $iter) = $selection->get_selected();\n\t\tif ( !$iter )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif ($model->get_value($iter, 11) == 'direct' )\n\t\t{\n\t\t\t$this->updateentry->set_text( 'd ' . $model->get_value($iter, 3 ). ' ' );\n\t\t}\n\t\telse if ($model->get_value($iter, 11) == 'direct-sent' )\n\t\t{\n\t\t\t$this->updateentry->set_text( 'd ' . $model->get_value($iter, 3 ). ' ' );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->updateentry->set_text( '@' . $model->get_value($iter, 3 ). ' ' );\n\t\t}\n\t\t$this->updateentry->grab_focus();\n\t\t$this->updateentry->set_position( -1 );\n\t\t$this->replyToID = $model->get_value( $iter, 8 );\n\t}", "title": "" }, { "docid": "26bca6453592e3d16060abb17c56d8c5", "score": "0.5211806", "text": "public function unsetAnswerWarning()\n {\n if (isset($_GET['comId']) AND isset($_GET['postId'])AND isset($_GET['comIdWarning']) ) {\n $manager = new PostManager();\n $manager->Warning($_GET['comIdWarning'] , \"0\");\n\n $myView = new View('');\n $myView->redirect('reply.html?comId=' . $_GET['comId'].'&amp;postId='.$_GET['postId']);\n } else {\n\n $myView = new View('error');\n $myView->build( array('chapters'=> null ,'comments'=>null,'warningList' => null,'HOST'=>HOST, 'adminLevel' => $_SESSION['adminLevel']));\n }\n\n\n }", "title": "" }, { "docid": "f81f9ad45c3c03dbfe9dbd1bca679706", "score": "0.520395", "text": "function bibdk_favourite_add_favourite_message($form, $form_state) {\n $favourites = bibdk_favourite_get_favourites();\n if (empty($favourites)) {\n drupal_set_message(bibdk_favourite_remember_favourites_message());\n }\n}", "title": "" }, { "docid": "fc0c618c18fea73227cde7c2eb2ee77d", "score": "0.52038413", "text": "public function show_liked()\n\t{\n\t\t$this->get_db();\n\n\t\t$sql = \"UPDATE phpbb_config\n\t\t\tSET config_value = 1\n\t\t\tWHERE config_name = 'postlove_show_liked'\";\n\n\t\t$this->db->sql_query($sql);\n\n\t\t$this->purge_cache();\n\t}", "title": "" }, { "docid": "dc4bfbca38405df2ed3e5bb4512fa24b", "score": "0.5200032", "text": "function nodes_moderate_form_update_($Form,$table,$result,$where){\n\t\t$CI =& get_instance();\n\t\tif($Form->name == 'node_createdit' && acl('nodes_moderate') && $Form->data->aid != $CI->user->get('id') && isset($result['comment'])){\n\t\t\t$data = array(\n\t\t\t'to'=>$Form->data->aid,\n\t\t\t'subject' => t('!nodes_moderate pm_subject',$Form->data->name),\n\t\t\t'body' => $result['comment'].\"<br>\".' \n\t\t\t<a href=\"'.$CI->node->create_link($Form->data).'\">'.$Form->data->name.'</a>',\n\t\t\t);\n\t\t\t$CI->pm->send($data);\t\n\t\t}\n\t// ------------------------------------------------------------------------\n\t}", "title": "" }, { "docid": "636ce3ece7dc2ce0e58e6672da7d83b0", "score": "0.51975226", "text": "public function answer($q_id, $answer) {\n\n\t\t\t$bad_words = explode(', ', FILTER_WORDS);\n\t\t\tfor($i=0; $i<sizeof($bad_words); $i++) {\n\t\t\t\tif($bad_words[$i]!=' ' && $bad_words[$i]!='') {\n\t\t\t\t\t$answer = preg_replace('/\\b'.$bad_words[$i].'\\b/iu', FILTER_WORD, $answer);\n\t\t\t\t}\n\t\t }\n\n\t\t\t$answer = ucfirst(strip_tags($answer, '<p><a><b><hr><h2><h3><i><strong><em><span><blockquote><ol><ul><li><br><img>'));\n\t\t\tpreg_match_all('/(@\\w+)/', $answer, $mentions);\n\t\t\t$image = '';\n\t\t\tif((is_numeric($q_id)) && $q_id>0 && strlen($answer)>2) {\n\t\t\t\t$stmt = $this->conn->prepare(\"SELECT id, url, user_id, question FROM questions WHERE id = ?\");\n\t\t\t\t$stmt->execute(array($q_id));\n\t\t\t\tif($stmt->rowCount()!=0) {\n\t\t\t\t\tforeach($stmt->fetchAll(PDO::FETCH_ASSOC) as $ii) {\n\t\t\t\t\t\t$user_id = $ii['user_id'];\n\t\t\t\t\t\t$url = $ii['url'];\n\t\t\t\t\t\t$question = $ii['question'];\n\t\t\t\t\t}\n\t\t\t\t\t$status = 1;\n\t\t\t\t\t$stmt = $this->conn->prepare(\"INSERT INTO answers (question_id, answer, status, user_id, upvotes, time) VALUES (?, ?, ?, ?, ?, ?)\");\n\t\t\t\t\t$stmt->execute(array($q_id, $answer, $status, USER_ID, 0, time()));\n\t\t\t\t\tif($stmt->rowCount()!=0) {\n\t\t\t\t\t\t$stmt = $this->conn->prepare(\"UPDATE questions SET answers=answers+1, time=? WHERE id=?\");\n\t\t\t\t\t\t$stmt->execute(array(time(),$q_id));\n\t\t\t\t\t\t/* Notification */\n\t\t\t\t\t\tif($user_id!=USER_ID) {\n\t\t\t\t\t\t\t$stmt = $this->conn->prepare(\"SELECT id FROM answers WHERE question_id=? AND user_id=? ORDER BY time DESC LIMIT 1\");\n\t\t\t\t\t\t\t$stmt->execute(array($q_id,USER_ID));\n\t\t\t\t\t\t\t$iiii = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t\t\t\t$stmt = $this->conn->prepare(\"INSERT INTO notifications (to_user, type, user_id, n_id, time, viewed) VALUES (?, ?, ?, ?, ?, ?)\");\n\t\t\t\t\t\t\t$stmt->execute(array($user_id,'2',USER_ID,$iiii['id'],time(),'0'));\n\t\t\t\t\t\t\tif(engine::getuserdata($user_id, \"NOT_ANSWER\") == 1 && engine::getuserdata($user_id, \"ONLINE\") == 0) {\n\t\t\t\t\t\t\t\t$user_id_link = engine::get_user_name($user_id);\n\t\t\t\t\t\t\t\t$stmt = $this->conn->prepare(\"SELECT question FROM questions WHERE id=?\");\n\t\t\t\t\t\t\t\t$stmt->execute(array($q_id));\n\t\t\t\t\t\t\t\t$i = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t\t\t\t\t$theme = get_text(456,1).' '.SITE_NAME.' – '.SITE_DESCRIPTION;\n\t\t\t\t\t\t\t\t$body = get_text(83,1).' '.$user_id_link.',<br><br>'.get_text(242,1).' <a href=\"http://'.SITE_DOMAIN.'/'.USER_USERNAME.'\">'.USER_USERNAME.'</a> '.get_text(451,1).' - \"'.$question.'\". <a href=\"http://'.SITE_DOMAIN.'/q/'.$url.'\">'.get_text(252,1).'</a> '.get_text(453,1).'.<br>'.get_text(77,1).' '.SITE_NAME.'<br><br>'.get_text(78,1).',<br>'.SITE_NAME.' - '.SITE_DESCRIPTION.'<br><br><small>'.get_text(79,1).'.</small>';\n\t\t\t\t\t\t\t\t$to = engine::getuserdata($user_id,\"EMAIL\");\n\t\t\t\t\t\t\t\tengine::send_email($to,$theme,$body);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$total_mentions = count($mentions);\n\t\t\t\t\t\tif($total_mentions>0) {\n\t\t\t\t\t\t\tfor($i=0;$i<$total_mentions;$i++) {\n\t\t\t\t\t\t\t\t$mentioned = str_replace(\"@\",\"\",$mentions[0][$i]);\n\t\t\t\t\t\t\t\t$mentioned = str_replace(\" \",\"\",$mentioned);\n\t\t\t\t\t\t\t\tif($mentioned) {\n\t\t\t\t\t\t\t\t\t$stmtt = $this->conn->prepare(\"SELECT id FROM users WHERE username=?\");\n\t\t\t\t\t\t\t\t\t$stmtt->execute(array($mentioned));\n\t\t\t\t\t\t\t\t\tif($stmtt->rowCount() != 0) {\n\t\t\t\t\t\t\t\t\t\t$mentioned_user = $stmtt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t\t\t\t\t\t\t$stmt = $this->conn->prepare(\"SELECT id FROM answers WHERE question_id=? AND user_id=? ORDER BY time DESC LIMIT 1\");\n\t\t\t\t\t\t\t\t\t\t$stmt->execute(array($q_id,USER_ID));\n\t\t\t\t\t\t\t\t\t\t$iiii = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t\t\t\t\t\t\t$stmt = $this->conn->prepare(\"INSERT INTO notifications (to_user, type, user_id, n_id, time, viewed) VALUES (?, ?, ?, ?, ?, ?)\");\n\t\t\t\t\t\t\t\t\t\t$stmt->execute(array($mentioned_user['id'],'4',USER_ID,$iiii['id'],time(),'0'));\n\t\t\t\t\t\t\t\t\t\tif(engine::getuserdata($mentioned_user['id'], \"NOT_MENTION\") == 1 && engine::getuserdata($mentioned_user['id'], \"ONLINE\") == 0) {\n\t\t\t\t\t\t\t\t\t\t\t$user_id_link = engine::get_user_name($mentioned_user['id']);\n\t\t\t\t\t\t\t\t\t\t\t$theme = get_text(457,1).' '.SITE_NAME.' – '.SITE_DESCRIPTION;\n\t\t\t\t\t\t\t\t\t\t\t$answer = strip_tags($answer);\n\t\t\t\t\t\t\t\t\t\t\t$body = get_text(83,1).' '.$user_id_link.',<br><br>'.get_text(242,1).' <a href=\"http://'.SITE_DOMAIN.'/'.USER_USERNAME.'\">'.USER_USERNAME.'</a> '.get_text(177,1).' - \"'.$answer.'\". <a href=\"http://'.SITE_DOMAIN.'/q/'.$url.'\">'.get_text(252,1).'</a> '.get_text(453,1).'.<br>'.get_text(77,1).' '.SITE_NAME.'<br><br>'.get_text(78,1).',<br>'.SITE_NAME.' - '.SITE_DESCRIPTION.'<br><br><small>'.get_text(79,1).'.</small>';\n\t\t\t\t\t\t\t\t\t\t\t$to = engine::getuserdata($mentioned_user['id'],\"EMAIL\");\n\t\t\t\t\t\t\t\t\t\t\tengine::send_email($to,$theme,$body);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/* Notify all whom follow this question */\n\t\t\t\t\t\t$stmt = $this->conn->prepare(\"SELECT id FROM answers WHERE question_id=? AND user_id=? ORDER BY time DESC LIMIT 1\");\n\t\t\t\t\t\t$stmt->execute(array($q_id,USER_ID));\n\t\t\t\t\t\t$iiii = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t\t\t$stmt = $this->conn->prepare(\"SELECT user_id FROM likes WHERE question_id=?\");\n\t\t\t\t\t\t$stmt->bindValue(1, $q_id, PDO::PARAM_INT);\n\t\t\t\t\t\t$stmt->execute();\n\t\t\t\t if($stmt->rowCount()!=0) {\n\t\t\t\t\t\t\tforeach($stmt->fetchAll(PDO::FETCH_ASSOC) as $ii) {\n\t\t\t\t\t\t\t\tif($ii['user_id']!=USER_ID && $ii['user_id']!=$user_id) {\n\t\t\t\t\t\t\t\t\t$stmt = $this->conn->prepare(\"INSERT INTO notifications (to_user, type, user_id, n_id, time, viewed) VALUES (?, ?, ?, ?, ?, ?)\");\n\t\t\t\t\t\t\t\t\t$stmt->execute(array($ii['user_id'],'2',USER_ID,$iiii['id'],time(),'0'));\n\t\t\t\t\t\t\t\t\tif(engine::getuserdata($ii['user_id'], \"NOT_ANSWER\") == 1 && engine::getuserdata($ii['user_id'], \"ONLINE\") == 0) {\n\t\t\t\t\t\t\t\t\t\t$user_id_link = engine::get_user_name($ii['user_id']);\n\t\t\t\t\t\t\t\t\t\t$theme = get_text(456,1).' '.SITE_NAME.' – '.SITE_DESCRIPTION;\n\t\t\t\t\t\t\t\t\t\t$body = get_text(83,1).' '.$user_id_link.',<br><br>'.get_text(242,1).' <a href=\"http://'.SITE_DOMAIN.'/'.USER_USERNAME.'\">'.USER_USERNAME.'</a> '.get_text(451,1).' - \"'.$question.'\". <a href=\"http://'.SITE_DOMAIN.'/q/'.$url.'\">'.get_text(252,1).'</a> '.get_text(453,1).'.<br>'.get_text(77,1).' '.SITE_NAME.'<br><br>'.get_text(78,1).',<br>'.SITE_NAME.' - '.SITE_DESCRIPTION.'<br><br><small>'.get_text(79,1).'.</small>';\n\t\t\t\t\t\t\t\t\t\t$to = engine::getuserdata($ii['user_id'],\"EMAIL\");\n\t\t\t\t\t\t\t\t\t\tengine::send_email($to,$theme,$body);\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$_SESSION['msg'] = 1;\n\t\t\t\t\t\tengine::headerin('q/'.$url);\n\t\t\t\t\t\texit;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$_SESSION['msg'] = 0;\n\t\t\t\t\t\tengine::headerin('q/'.$url);\n\t\t\t\t\t\texit;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$_SESSION['msg'] = 0;\n\t\t\t\t\tengine::headerin('q/'.$url);\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$_SESSION['msg'] = 0;\n\t\t\t\tengine::headerin('q/'.$url);\n\t\t\t\texit;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "20e8a6f5c67cfe8f78d0a09589ad9c9e", "score": "0.5194666", "text": "function listFAQ_HOWTO()\t{\n\t\tif ($this->piVars['showUid'])\t{\t// If a single element should be displayed\n\t\t\t$therow = $this->pi_getRecord('tx_maillisttofaq_faq',$this->piVars['showUid']);\n\t\t\tif (is_array($therow))\t{\n\n\t\t\t\tif (!$this->isManager)\t{\t// Managers are not registered.\n\t\t\t\t\t$this->updateViewStat('faq',$therow['uid'],$therow['view_stat']);\n\t\t\t\t}\n\n\t\t\t\tif ($this->piVars['editFaqUid'])\t{\n\t\t\t\t\t$fullTable.=$this->renderFAQForm($therow,$therow['uid']);\n\t\t\t\t} else {\n\t\t\t\t\t\t// PRocessing in-data, possibly reloading root record.\n\t\t\t\t\t$status=$this->processingOfInData($therow['pid']);\n\t\t\t\t\tif ($status)\t{\n\t\t\t\t\t\tif ($status!=-1)\t{\n\t\t\t\t\t\t\t$fullTable.= '<p style=\"color:red; font-weight: bold;\">'.$status.'</p>';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$fullTable.= '<p>'.$this->pi_getLL('main_saved','').'</p>';\n\t\t\t\t\t\t\t$therow = $this->pi_getRecord('tx_maillisttofaq_faq',$this->piVars['showUid']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$fullTable.= '<div'.$this->pi_classParam('singleView').'>\n\t\t\t\t\t\t<p'.$this->pi_classParam('back').'>'.$this->pi_list_linkSingle($this->pi_getLL('main_back',''),0).'</p>\n\t\t\t\t\t\t'.$this->printSingleFaqItems($therow,1).'</div>';\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif ($this->piVars['editFaqUid']=='NEW') {\n\t\t\t$fullTable.=$this->renderFAQForm(array('howto'=>intval($this->piVars['mode']==5)),'NEW');\n\t\t} else {\n\t\t\t\t// SAVING new...\n\t\t\t$status=$this->processingOfInData($this->thisPID);\n\t\t\tif ($status)\t{\n\t\t\t\tif ($status!=-1)\t{\n\t\t\t\t\t$fullTable.= '<p style=\"color:red; font-weight: bold;\">'.$status.'</p>';\n\t\t\t\t} else {\n\t\t\t\t\t$fullTable.= '<p>'.$this->pi_getLL('listarchiv_saved','').'</p>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\t// LISTING faq/howto\n\t\t\t$this->internal['searchFieldList']='subject,question,question_pre,answer,pre';\n\t\t\t$this->internal['orderByList']='subject,crdate,cat,view_stat';\n\n\t\t\t\t// If the current value for 'orderBy' is not found in the orderBy list, then set it to the default value, which is order by 'crdate' for FAQ/HOWTO (and DESC, which will be inherited from the TypoScript defaults)\n\t\t\tif (!t3lib_div::inList($this->internal['orderByList'],$this->internal['orderBy']))\t{\n\t\t\t\t$this->internal['orderBy'] = 'crdate';\n\t\t\t}\n\n\n\t\t\t$addWhere = $this->piVars['mode']==4 ? ' AND howto=0' : ' AND howto=1';\n\t\t\tif (is_array($this->piVars['DATA']['selcat']))\t{\n\t\t\t\t$setCatInt=t3lib_div::intExplode(',',implode(',',$this->piVars['DATA']['selcat']));\n\t\t\t\t$addWhere.=' AND cat IN ('.implode(',',$setCatInt).')';\n\t\t\t}\n\n\t\t\t\t// Get number of records:\n\t\t\t$query = $this->pi_list_query('tx_maillisttofaq_faq',1,$addWhere);\n#debug($query);\n\t\t\t$res = mysql(TYPO3_db,$query);\n\t\t\tif (mysql_error())\tdebug(array(mysql_error(),$query));\n\t\t\tlist($this->internal['res_count']) = mysql_fetch_row($res);\n\n\t\t\t\t// Make listing query, pass query to MySQL:\n\t\t\t$query = $this->pi_list_query('tx_maillisttofaq_faq',0,$addWhere);\n\t\t\t$res = mysql(TYPO3_db,$query);\n\t\t\tif (mysql_error())\tdebug(array(mysql_error(),$query));\n\t\t\t$this->internal['currentTable'] = 'tx_maillisttofaq_faq';\n\n\t\t\t\t// Adds the search box:\n\t\t\t$fullTable.=$this->pi_list_searchBox();\n\n\t\t\t\t// Adds category box (possibly)\n\t\t\t$fullTable.= $this->conf['listView.']['catSelTop'] ? $this->categoryBox() : '';\n\n\t\t\t\t// Adds the result browser:\n\t\t\t$fullTable.=$this->pi_list_browseresults();\n\n\t\t\t\t// Adds the whole list table\n\t\t\t$fullTable.=$this->pi_list_makelist($res);\n\n\t\t\t\t// MAKE NEW\n\t\t\tif ($GLOBALS['TSFE']->loginUser)\t{\n\t\t\t\t$fullTable.='<p>'.$this->pi_linkTP_keepPIvars($this->pi_getLL('makenewfaq','Make a new FAQ or HOWTO item.'),array('editFaqUid'=>'NEW')).'</p>';\n\t\t\t}\n\t\t}\n\n\t\treturn $fullTable;\n\t}", "title": "" }, { "docid": "f28758270c3cd8ddeb77503bbf265d57", "score": "0.51912886", "text": "public function test_user_has_posted_reply() {\n global $DB;\n\n // Create several courses and forums. We only insert data into the final one.\n $course = $this->getDataGenerator()->create_course();\n $this->getDataGenerator()->create_module('forum', ['course' => $course->id]);\n $course = $this->getDataGenerator()->create_course();\n $this->getDataGenerator()->create_module('forum', ['course' => $course->id]);\n\n $course = $this->getDataGenerator()->create_course();\n $forum = $this->getDataGenerator()->create_module('forum', ['course' => $course->id]);\n list($user, $otheruser) = $this->helper_create_users($course, 2);\n // Post twice - only the second discussion should be included.\n list($discussion, $post) = $this->helper_post_to_forum($forum, $otheruser);\n list($otherdiscussion, $otherpost) = $this->helper_post_to_forum($forum, $otheruser);\n $cm = get_coursemodule_from_instance('forum', $forum->id);\n $context = \\context_module::instance($cm->id);\n\n // Post a reply to the other person's post.\n $reply = $this->helper_reply_to_post($post, $user);\n\n // Testing as user $user.\n $this->setUser($user);\n\n // Retrieve all contexts - only this context should be returned.\n $contextlist = $this->get_contexts_for_userid($user->id, 'mod_forum');\n $this->assertCount(1, $contextlist);\n $this->assertEquals($context, $contextlist->current());\n\n // Export all of the data for the context.\n $this->export_context_data_for_user($user->id, $context, 'mod_forum');\n $writer = \\core_privacy\\local\\request\\writer::with_context($context);\n $this->assertTrue($writer->has_any_data());\n\n // Refresh the discussions.\n $discussion = $DB->get_record('forum_discussions', ['id' => $discussion->id]);\n $otherdiscussion = $DB->get_record('forum_discussions', ['id' => $otherdiscussion->id]);\n\n // The other discussion should not have been returned as we did not post in it.\n $this->assertEmpty($writer->get_data($this->get_subcontext($forum, $otherdiscussion)));\n\n // Our discussion should have been returned as we did post in it.\n $data = $writer->get_data($this->get_subcontext($forum, $discussion));\n $this->assertNotEmpty($data);\n $this->assert_discussion_data($discussion, $data);\n\n // The reply will be included.\n $this->assert_post_data($reply, $writer->get_data($this->get_subcontext($forum, $discussion, $reply)), $writer);\n\n // Delete the data now.\n // Only the post by the user under test will be removed.\n $approvedcontextlist = new \\core_privacy\\tests\\request\\approved_contextlist(\n \\core_user::get_user($user->id),\n 'mod_forum',\n [$context->id]\n );\n provider::delete_data_for_user($approvedcontextlist);\n\n $reply = $DB->get_record('forum_posts', ['id' => $reply->id]);\n $this->assertEmpty($reply->subject);\n $this->assertEmpty($reply->message);\n $this->assertEquals(1, $reply->deleted);\n\n $post = $DB->get_record('forum_posts', ['id' => $post->id]);\n $this->assertNotEmpty($post->subject);\n $this->assertNotEmpty($post->message);\n $this->assertEquals(0, $post->deleted);\n }", "title": "" }, { "docid": "1dd7e52badb9f9e457a579784449ca6a", "score": "0.51893485", "text": "function set_identity_answering_status($telegram_id, $riddle_id) {\n return change_identity_status($telegram_id, IDENTITY_STATUS_ANSWERING, $riddle_id);\n}", "title": "" }, { "docid": "5b1bba278c71775b77e522e193849890", "score": "0.51887643", "text": "public function getAcceptanswer($aID, $qID, $uID){\n\n //return $aID. ' '. $qID;\n $answerToAccept = Answer::find($aID);\n $answerToAccept->status = 'accepted';\n $answerToAccept->save();\n\n $questionToUpdate = Question::find($qID);\n $questionToUpdate->status = 'solved';\n $questionToUpdate->save();\n\n $userToUpdate = User::find($uID);\n $reputation = $userToUpdate->reputation;\n $userToUpdate->reputation = $reputation + 15;\n $userToUpdate->save();\n\n $answerReputation = new Areputation();\n $answerReputation->user_id = $uID;\n $answerReputation->answer_id = $aID;\n $answerReputation->points = \"+15\";\n $answerReputation->action = \"accept\";\n $answerReputation->save();\n\n $authReputation = new Areputation();\n $authReputation->user_id = Auth::user()->id;\n $authReputation->answer_id = $aID;\n $authReputation->points = \"+2\";\n $authReputation->action = \"accept\";\n $authReputation->save();\n\n $userReputation = User::find(Auth::user()->id);\n $rep = $userReputation->reputation;\n $userReputation->reputation = $rep + 2;\n $userReputation->save();\n\n return Redirect::back();\n }", "title": "" }, { "docid": "253bd541909cde7f074d269f8f63dc99", "score": "0.5181921", "text": "function bbps_extend_forum_attributes_mb( $forum_id ) {\n\n\t$support_forum = edd_bbp_is_support_forum( $forum_id );\n\t?>\n\n\t<p>\n\t\t<strong>Support Forum:</strong>\n\t\t<input type=\"checkbox\" name=\"bbps-support-forum\" value=\"1\"<?php checked( true, $support_forum ); ?>/>\n\t</p>\n\n<?php\n}", "title": "" }, { "docid": "db1f6865f6e380477fcdca30be1ffc2d", "score": "0.5179989", "text": "function pnForum_user_report($args)\n{\n // get the input\n if(count($args)>0) {\n extract($args);\n unset($args);\n } else {\n list($post_id,\n $comment,\n $submit) = pnVarCleanFromInput('post',\n 'comment',\n 'submit');\n }\n\n $post = pnModAPIFunc('pnForum', 'user', 'readpost',\n array('post_id' => $post_id));\n\n if(!$submit) {\n $pnr =& new pnRender('pnForum');\n $pnr->caching = false;\n $pnr->add_core_data();\n $pnr->assign('post', $post);\n return $pnr->fetch('pnforum_user_notifymod.html');\n } else { // submit is set\n \tif (!pnSecConfirmAuthKey()) {\n \treturn showforumerror(_BADAUTHKEY, __FILE__, __LINE__);\n }\n pnModAPIFunc('pnForum', 'user', 'notify_moderator',\n array('post' => $post,\n 'comment' => $comment));\n $start = pnModAPIFunc('pnForum', 'user', 'get_page_from_topic_replies',\n array('topic_replies' => $post['topic_replies']));\n return pnRedirect(pnModURL('pnForum', 'user', 'viewtopic',\n array('topic' => $post['topic_id'],\n 'start' => $start)));\n }\n\n}", "title": "" }, { "docid": "66412e6ddb3bd3d56c9995c75c3f7b59", "score": "0.5169289", "text": "function LikeUnlike($p_id,$action_=\"like\",$uid=false){\r\n\r\n$post=$this->PostById($p_id);\r\n\r\nif($post){\r\n\r\n$uid=helpers::uid($uid);\r\n\r\n$likes=$post->likes;\r\n\r\n//add \"like\"\r\nif(!$action_ || $action_==\"like\"){\r\n\r\nif(!in_array($uid,$likes)){\r\n\r\n$likes[]=$uid;\r\n\r\n//Save like notification for owner of the post\r\n\r\n$notiController = helpers::get_controller(NOTIFICATION);\r\n\r\n$notiController->SaveNotification($p_id,\"like\",\"\",array(helpers::GetOwner($p_id)),\"\");\r\n\r\n}\r\n\r\n\r\n}\r\n\r\n//remove \"like\"\r\nelse {\r\n\r\nif(in_array($uid,$likes)){\r\n\r\n$likes=array_diff($likes,array($uid));\r\n\r\n//Delete like notification for owner of the post\r\n\r\n$notiController = helpers::get_controller(NOTIFICATION);\r\n\r\n$notiController->DeleteNotification($p_id,\"like\",helpers::uid());\r\n\r\n}\r\n\r\n}\r\n\r\n$post->likes=json_encode($likes);\r\n\r\n$post->save();\r\n\r\n\r\n\r\n\r\nreturn helpers::get_controller(POST_VOTE)->AddPostOptions($post);\r\n\r\n}\r\n\r\n}", "title": "" }, { "docid": "74249fdae78f5aaaf26b66f88e04552d", "score": "0.5168175", "text": "protected function _Update_Flags() {\n // If the action type is not right\n if ($_POST['_action'] != 'update_flags') { return; }\n // Retrieve the entry data\n $entry = $this->entry;\n // Retrieve the entry uuid\n $entry_uuid = $entry['store_entry']['uuid'];\n // If no entry or no entry uuid\n if (!$entry || !$entry_uuid) { return; }\n // Retrieve the selected action\n $selected_action = $_POST['flag_action'];\n // If there is no selected action, return out\n if (!$selected_action) { return; }\n // Get a list of the valid flags\n $flag_actions = $this->_Get_Flag_Actions();\n // If the flag does not have the action, move on\n if (!isset($flag_actions[$selected_action])) { return; }\n // Retrieve the selected flag action\n $flag_selected_action = $flag_actions[$selected_action];\n // Call the selected action\n call_user_func_array($flag_selected_action['_callback'],array($entry_uuid,$this));\n \n $this->Add_Alert('<strong>Entry Updated!</strong>','success');\n // Repopulate the entry\n $this->_Get_Entry();\n }", "title": "" }, { "docid": "5d24be09e1df1e06f819f9ee080cccbd", "score": "0.5163962", "text": "function gfs_user_set_default_forum_notification($user_id) {\t\t\n\tif ( get_option ('automatic-forum-subscription-default') == 'on' )\n\t\tupdate_usermeta($user_id, \"favorite_notification\", 1);\n}", "title": "" }, { "docid": "14928468629755ac81b1339c462750c8", "score": "0.5154936", "text": "public function hasAnswer();", "title": "" }, { "docid": "ea73340f31bdc0836b9909ba62f68a7c", "score": "0.51536864", "text": "public function add_article_answer($articleid, $bool)\n {\n $bool = (bool) $bool;\n\n $ip = $this->input->ip_address();\n\n $this->db->where('ip', $ip)->where('articleid', $articleid)->order_by('date', 'desc')->limit(1);\n $answer = $this->db->get(db_prefix() . 'hr_knowedge_base_article_feedback')->row();\n\n if ($answer) {\n $last_answer = strtotime($answer->date);\n $minus_24_hours = strtotime('-24 hours');\n if ($last_answer >= $minus_24_hours) {\n return [\n 'success' => false,\n 'message' => _l('clients_article_only_1_vote_today'),\n ];\n }\n }\n $this->db->insert(db_prefix() . 'hr_knowedge_base_article_feedback', [\n 'answer' => $bool,\n 'ip' => $ip,\n 'articleid' => $articleid,\n 'date' => date('Y-m-d H:i:s'),\n ]);\n $insert_id = $this->db->insert_id();\n\n if ($insert_id) {\n return [\n 'success' => true,\n 'message' => _l('clients_article_voted_thanks_for_feedback'),\n ];\n }\n\n return [\n 'success' => false,\n ];\n }", "title": "" }, { "docid": "cf7cd3559e663919d625006bad53b6c8", "score": "0.5150167", "text": "function faq()\n{\n $data = array();\n $q = Doctrine_Query::create()\n ->from('Faq u');\n if ($_COOKIE['lang'] == 'fr') {\n $q->select('u.id, u.question_fr as question, u.response_fr as response');\n } else {\n $q->select('u.id, u.question_en as question, u.response_en as response');\n }\n $data['faqs'] = $q->execute();\n return render('faq.tpl', $data);\n}", "title": "" }, { "docid": "cb8f2ff1594afd305e85f99170f6e015", "score": "0.5149397", "text": "function admin_forum_commit()\n{\n\tglobal $mybb, $db, $fid;\n\n\t$update_array = array(\n\t\t\t'icforum' => (int)$mybb->input['icforum']\n\t\t);\n\t$db->update_query(\"forums\", $update_array, \"fid='$fid'\");\n}", "title": "" }, { "docid": "4d9fa1818dbc76a3d3e763f0c7dcef0b", "score": "0.51361674", "text": "function faq()\n\t{\n\t $this->_template($data=NULL,$templatename='faq'); \n\t}", "title": "" }, { "docid": "8f1bbd2e4de1890d69a5d8b861f52e05", "score": "0.5130758", "text": "function attempted_questions()\n {\n $user = $_SESSION['ID'];\n $session = $_GET['ref_content'];\n if ($session != \"\" and $user != \"\") {\n $db = new db;\n $get = $db->get(\"SELECT questionID,answer,status FROM excercise WHERE user='$user' AND sessionID='$session' ORDER BY date DESC\");\n $num = number_rows($get);\n if ($num > 0) {\n\n $config = new config;\n\n echo ('<ul style=\"font-size:14px;margin:0;padding:0;text-align:left;\">');\n for ($x = 1; $x <= $num; $x++) {\n $row = record($get);\n $qn_details = $config->return_question($row['questionID']);\n\n\n echo ('<li style=\"color:gray;\">');\n echo '(' . ($x) . ') ';\n\n echo ucfirst($qn_details['question']);\n echo ('?');\n\n if (isset($_GET['qn_ans'])) {\n if ($qn_details['tag'] == $row['answer']) {\n echo ('<span style=\"color:green;float:right;\">Correct</span>');\n\n } elseif ($qn_details['tag'] != $row['answer']) {\n echo ('<span style=\"color:red; float:right;\">Wrong <strong>(' . ucfirst($row['answer']) .\n ')</strong></span>');\n }\n }\n\n\n echo ('<hr/></li>');\n }\n echo ('</ul>');\n end_get_records($get);\n } else {\n echo ('<span style=\"color:gray;\">No questions attempted</span>');\n }\n }\n }", "title": "" }, { "docid": "a5447c22cdea2a16c19959e3d2c5535c", "score": "0.51302946", "text": "public function postMarkRead()\n {\n $comment = Comment::find(\\Request::get('comment_id'));\n $comment->been_moderated = true;\n $comment->save();\n\n return response('Success');\n }", "title": "" }, { "docid": "2284f91347c4d243f0f1629b50e386f7", "score": "0.51262355", "text": "public function update_answer()\n {\n $answer = Answer::findOrFail($this->selected_answer_id);\n if ($answer->user_id == Auth::id() || $this->question->user_id == Auth::id() || Auth::user()->is_teacher())\n {\n $this->validate();\n\n $answer->answer_text = $this->answer_text;\n\n $answer->save();\n\n $this->answer_text = '';\n $this->selected_answer_id = null;\n $this->display_edit_answer_form = false;\n \n $this->emit('answer-updated');\n }\n }", "title": "" }, { "docid": "2a5ef8e8b0cc2ffc5aa8d0b6400fff05", "score": "0.5118205", "text": "public function formfaqAction()\r\n {\r\n }", "title": "" }, { "docid": "f3ccffa07ea73bf9cd21a53e237b4202", "score": "0.5117351", "text": "public function reply_support($id=0)\n {\n \n if($id==0) exit();if($this->session->userdata('license_type') != 'double') exit;\n $data['body'] = 'ticket_reply';\n $data['page_title'] = $this->lang->line('Reply Ticket');\n $join = array(\n 'fb_support_category' => 'fb_simple_support_desk.support_category=fb_support_category.id,left'\n );\n if($this->session->userdata(\"user_type\")==\"Admin\")\n $where=array('where' => array('fb_simple_support_desk.id' => $id));\n else $where=array('where' => array('fb_simple_support_desk.id' => $id,\"fb_simple_support_desk.user_id\"=>$this->user_id));\n\n $table = \"fb_simple_support_desk\";\n $info = $this->basic->get_data($table, $where, $select='fb_simple_support_desk.*,fb_support_category.category_name', $join);\n if(!isset($info[0])) exit();\n\n $data['ticket_info']=$info;\n\n $user=$info[0]['user_id'];\n $user_info = $this->basic->get_data('users',array('where'=>array('id'=>$user)));\n $data['user_info']=$user_info;\n $join = array(\n 'users' => 'fb_support_desk_reply.user_id=users.id,left'\n );\n\n $table = \"fb_support_desk_reply\";\n $ticket_replied = $this->basic->get_data($table,array(\"where\"=>array(\"reply_id\"=>$id)),$select='',$join);\n $data['ticket_replied'] = $ticket_replied;\n\n $this->_viewcontroller($data);\n }", "title": "" }, { "docid": "79c60497169fece6447da4488b0f0675", "score": "0.5116342", "text": "public function like_update($id){\n if(session::has('email')){\n $quid=\"ques_\".$id.\"lik_dislik_table\";\n $email=session::get('email');\n $user=DB::connection('mysql');\n try{\n\n\n //$qulk_dlk_info=DB::select(\"select * from \".$quid.\" where email='$email'\");\n \n\n \n if($qulk_dlk_info=DB::select(\"select * from \".$quid.\" where email='$email' and qus_or_ans='q'\")){\n \n \n\n \n\n if($qulk_dlk_info[0]->liked==\"1\" ){\n $dateTime=self::Date_Time();\n DB::update(\"update \".$quid.\" set liked='0',updated_at='$dateTime' where email='$email' and qus_or_ans='q'\");\n\n\n $question=new question;\n $question=question::where('id',$id)->first();\n\n $liked=intval($question->liked);\n \n $liked--;\n $question=question::find($id);\n $question->liked=$liked;\n $question->save();\n\n\n $email_find= DB::select(\"select email from questions where id=$id\");\n $qu_email=$email_find[0]->email;\n \n $rating= DB::select(\"select rating from sign_in_ups where email='$qu_email'\");\n $R_point=floatval($rating[0]->rating);\n $R_point=$R_point-0.0002;\n DB::update(\"update sign_in_ups set rating='$R_point' where email='$qu_email'\");\n\n return $liked;\n }\n else if($qulk_dlk_info[0]->liked==\"0\"){\n $dateTime=self::Date_Time();\n DB::update(\"update \".$quid.\" set liked='1',updated_at='$dateTime' where email='$email' and qus_or_ans='q'\");\n\n\n $question=new question;\n $question=question::where('id',$id)->first();\n\n $liked=intval($question->liked);\n \n $liked++;\n \n $question=question::find($id);\n $question->liked=$liked;\n $question->save();\n\n $email_find= DB::select(\"select email from questions where id=$id\");\n $qu_email=$email_find[0]->email;\n $rating= DB::select(\"select rating from sign_in_ups where email='$qu_email'\");\n $R_point=floatval($rating[0]->rating);\n $R_point=$R_point+0.0002;\n DB::update(\"update sign_in_ups set rating='$R_point' where email='$qu_email'\");\n return $liked;\n\n }\n\n }\n \n \n else{\n $dateTime=self::Date_Time();\n\n DB::insert(\"insert into \".$quid.\" (email,qus_or_ans,liked,disliked,created_at) values('$email','q','1','0','$dateTime')\");\n $question=new question;\n $question=question::where('id',$id)->first();\n\n $liked=intval($question->liked);\n \n $liked++;\n $question=question::find($id);\n $question->liked=$liked;\n $question->save();\n\n\n\n\n $email_find= DB::select(\"select email from questions where id=$id\");\n $qu_email=$email_find[0]->email;\n $rating= DB::select(\"select rating from sign_in_ups where email='$qu_email'\");\n $R_point=floatval($rating[0]->rating);\n $R_point=$R_point+0.0002;\n DB::update(\"update sign_in_ups set rating='$R_point' where email='$qu_email'\");\n return $liked;\n \n }\n \n \n\n }catch(Exception $e){\n\n\n }\n \n }\n\n }", "title": "" }, { "docid": "52d546139f3a442d1f71b13c0a885dab", "score": "0.5104768", "text": "public function step10()\n\t{\n\t\t\\IPS\\Db::i()->update( 'forums_posts', array( 'queued' => -1 ), 'queued=2' );\n\t\t\\IPS\\Db::i()->update( 'forums_posts', array( 'queued' => 2 ), array( 'topic_id IN(?)', \\IPS\\Db::i()->select( 'tid', 'forums_topics', 'approved=-1' ) ) );\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "5f778894339a6c502dfa558359bce20c", "score": "0.510018", "text": "function multidel() {\n\t\tglobal $tc_db, $smarty, $tpl_page, $bans_class;\n\t\t\n\t\t$multidel = TRUE;\n\t\t$_POST['seconds'] = 0;\n\t\t$multiban_query = 'WHERE `id` = \"0 \" ';\n\t\tforeach($_POST AS $TOAST) {\n\t\t\tif (ereg('POST*',$TOAST)){\n\t\t\t\t$_POST['boarddir'] = $_POST['board'];\n\t\t\t\t$_POST['delpostid'] = ereg_replace('POST','',$TOAST);\n\t\t\t\t$this->delposts($multidel);\n\t\t\t\tif (($_POST['multiban'])) { $multiban_query .= \"OR `id` = '\".mysql_real_escape_string($_POST['delpostid']).\"'\"; }\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (isset($_POST['multiban'])) {\n\t\t\t$this->ModeratorsOnly();\n\t\t\t$ban_globalban = '1';\n\t\t\t$_POST['seconds'] = '0';\n\t\t\t$ban_boards = '';\n\t\t\t\n\t\t\t$results = $tc_db->GetAll(\"SELECT HIGH_PRIORITY `ip` FROM `\".KU_DBPREFIX . \"posts_\".mysql_real_escape_string($_POST['board']).\"` \".$multiban_query);\n\t\t\tif (count($results) > 0) {\n\t\t\t\tforeach ($results as $line) {\n\t\t\t\t\t$ban_ip = md5_decrypt($line['ip'], KU_RANDOMSEED);\n\t\t\t\t\t$bans_class->BanUser($ban_ip, mysql_real_escape_string($_SESSION['manageusername']), $ban_globalban, 0, $ban_boards, mysql_real_escape_string($_POST['reason']), 0, 0, 1);\n\t\t\t\t\t$logentry = _gettext('Banned') . ' ' . $ban_ip . ' until ';\n\t\t\t\t\tif ($_POST['seconds'] == '0') {\n\t\t\t\t\t\t$logentry .= '<b>' . _gettext('Does not expire') . '</b>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$logentry .= date('F j, Y, g:i a', time() + $_POST['seconds']);\n\t\t\t\t\t}\n\t\t\t\t\t$logentry .= ' - ' . _gettext('Reason') . ': ' . $_POST['reason'] . ' - ' . _gettext('Banned from') . ': ';\n\t\t\t\t\tif ($ban_globalban == '1') {\n\t\t\t\t\t\t$logentry .= _gettext('All boards') . ' ';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$logentry .= '/' . implode('/, /', explode('|', $ban_boards)) . '/ ';\n\t\t\t\t\t}\n\t\t\t\t\tmanagement_addlogentry($logentry, 8);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$tpl_page .= _gettext('A post with that ID does not exist.') . '<hr>';\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4edd5b93e4d141a9e7f3852f5491a3e9", "score": "0.509745", "text": "public function setAnsweredStatus($answeredStatus);", "title": "" }, { "docid": "cdebf9c5b4994c3b1f73cf36bfd100e3", "score": "0.5095685", "text": "public function answer_count_add($id)\n{\n$this->db->select('*');\n$this->db->where('Quesid=',$id);\n$this->db->where('Userid=',$_SESSION['user_id']);\n$query=$this->db->get('reply_ques');\n$row= $query->num_rows();\nif($row==1)\n{\n$this->db->set('ques_answered', 'ques_answered + 1', FALSE);\t\n$this->db->where(\"ID=\",$_SESSION['user_id']);\n$this->db->update('neko_user_data');\n} else {}\n}", "title": "" }, { "docid": "01fb3c3c60ab1aeb1535a278715a61be", "score": "0.50947994", "text": "function addCorrect($db,$user){\n \t $db->query(\"UPDATE 368_users SET correct_answers = correct_answers + 1 WHERE user = '$user'\");\n }", "title": "" }, { "docid": "13b7d6502680e3c6c0bac754a4ad61ce", "score": "0.5092445", "text": "public function updateusernotification($not_upvote, $not_answer, $not_follower, $not_mention, $not_system) {\n\n\t\t\tif(SESSION_STATUS!=false) {\n\t\t\t\t$stmt = $this->conn->prepare(\"UPDATE users SET not_upvote = ?, not_answer = ?, not_follower = ?, not_mention = ?, not_system = ? WHERE id = ?\");\n\t\t\t\t$stmt->execute(array($not_upvote,$not_answer,$not_follower,$not_mention,$not_system,USER_ID));\n\t\t\t\tif($stmt->rowCount()!=0) {\n\t\t\t\t\t$_SESSION['msg'] = 1;\n\t\t\t\t}\n\t\t\t\tengine::headerin('site/notification');\n\t\t\t\t\texit; \n\t\t\t}\n\t\t}", "title": "" } ]
cdd6c2f3b84f4fc9c872756686b4bfdb
Deletes an existing SuscriptorHorario 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": "206d802bbf08274a12f2a3fab121008f", "score": "0.668451", "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": "4c602d64208e8eb86b27934e50fbb711", "score": "0.6544817", "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": "6cc623766a619ad8dd2c6b78ad1c4736", "score": "0.64494467", "text": "public function eliminaidiomaAction(){\n $this->_helper->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true); \n /* [PARAMETROS] */\n $id = $this->_getParam('id',0); \n /* [PROCESAR] */\n $idioma = new Default_Model_DbTable_Idioma();\n if($idioma->eliminar($id)){\n /* [EXITO] */\n $exito = new Zend_Session_Namespace(\"exito\");\n $exito->mensaje = true; \n /* [REDIRECCIONAR] */\n $this->_redirect('/mantenedor/idioma/'); \n }else{\n $this->view->error = true;\n }\n \n }", "title": "" }, { "docid": "565e07fa2e559a957842831e912d551f", "score": "0.643861", "text": "public function deleteAction(){\n $id = (int) $this->params()->fromRoute(\"id\", 0);\n \n if(!$id){\n $this->redirect()->toRoute(\"ejemplo\");\n }else{\n $delete = $this->getUsuariosTable()->deleteUsuario($id);\n if($delete){\n $this->flashMessenger()->setNamespace(\"add\")->addMessage(\"El usuario se ha borrado correctamente\");\n } else{\n $this->flashMessenger()->setNamespace(\"add_false\")->addMessage(\"El usuario NO se ha borrado!!!\");\n }\n }\n \n return $this->redirect()->toRoute(\"ejemplo\");\n }", "title": "" }, { "docid": "55163e404751d93208dbddd9ea8fe623", "score": "0.64145106", "text": "public function delete_horario()\r\n\t\t{\r\n\t\t\t$sql=\"DELETE FROM horario\r\n\t\t\t\t\tWHERE fecha < NOW()\";\r\n\t\t\t$this->query($sql);\r\n\r\n\t\t\t$res=$this->execute();\r\n\t\t}", "title": "" }, { "docid": "2cc2a9a4f1c57f84bcf8e314dd2c0f50", "score": "0.6396311", "text": "public function eliminarAlumnoController(){\n if (isset($_GET[\"idBorrar\"])) {\n $respuesta = Datos::eliminarRegistro($_GET[\"idBorrar\"],\"alumno\");\n\n if($respuesta==\"success\"){\n echo \"<script type=\\\"text/javascript\\\">alert(\\\"Se eliminó el alumno con exito!!\\\");</script>\"; \n $URL=\"index.php?action=mostrarAlumnos\";\n echo \"<script >document.location.href='{$URL}';</script>\";\n echo '<META HTTP-EQUIV=\"refresh\" content=\"0;URL=' . $URL . '\">';\n }else{\n\n echo \"<script type=\\\"text/javascript\\\">alert(\\\"Se presentó un problema al eliminar!!\\\");</script>\";\n }\n\n }\n }", "title": "" }, { "docid": "54915ab861a04c3d36ed00d1ca6e63df", "score": "0.63713175", "text": "public function eliminar(){\n $trabajador = Trabajador::find(request(\"id\"));\n Trabajador::where(\"ID\", $trabajador->ID)->delete();\n\n\n //Mostrar de nuevo la tabla con los datos\n $listaTrabajadores = Trabajador::simplePaginate(10);\n return view(\"tables\", [\"listaTrabajadores\"=>$listaTrabajadores]);\n }", "title": "" }, { "docid": "7be412586a0701adc0c22a71e25c9584", "score": "0.63655496", "text": "public function eliminausuariotipoAction(){\n $this->_helper->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true); \n /* [PARAMETROS] */\n $id = $this->_getParam('id',0); \n /* [PROCESAR] */\n $usuario = new Default_Model_DbTable_Usuario();\n if($usuario->eliminartipo($id)){\n /* [EXITO] */\n $exito = new Zend_Session_Namespace(\"exito\");\n $exito->mensaje = true; \n /* [REDIRECCIONAR] */\n $this->_redirect('/mantenedor/usuariotipo/'); \n }else{\n $this->view->error = true;\n }\n \n }", "title": "" }, { "docid": "125bd21be160dc86fad6fe00cd87cf0e", "score": "0.6331575", "text": "public function eliminarelacionAction(){\n $this->_helper->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true); \n /* [PARAMETROS] */\n $id = $this->_getParam('id',0); \n /* [PROCESAR] */\n $relacion = new Default_Model_DbTable_Relacion();\n if($relacion->eliminarelacion($id)){\n /* [EXITO] */\n $exito = new Zend_Session_Namespace(\"exito\");\n $exito->mensaje = true; \n /* [REDIRECCIONAR] */\n $this->_redirect('/mantenedor/relacion/'); \n }else{\n $this->view->error = true;\n }\n \n }", "title": "" }, { "docid": "17ae8b2018674ea927a57c487f623632", "score": "0.6326479", "text": "public function eliminarTutoriaController(){\n if (isset($_GET[\"idBorrar\"])) {\n $respuesta = Datos::eliminarRegistro($_GET[\"idBorrar\"],\"sesion_tutoria\");\n\n if($respuesta==\"success\"){\n echo \"<script type=\\\"text/javascript\\\">alert(\\\"Se eliminó la tutoria con exito!!\\\");</script>\"; \n $URL=\"index.php?action=mostrarTutorias\";\n echo \"<script >document.location.href='{$URL}';</script>\";\n echo '<META HTTP-EQUIV=\"refresh\" content=\"0;URL=' . $URL . '\">';\n }else{\n\n echo \"<script type=\\\"text/javascript\\\">alert(\\\"Se presentó un problema,no se pueden eliminar tutorias si tienen alumnos asignados!!\\\");</script>\";\n }\n }\n }", "title": "" }, { "docid": "f4a6895249898dba4a6053c7b778a763", "score": "0.6324198", "text": "public function eliminar() {\n\n if (!SesionIniciadaCheck()) {\n redirect(\"Error404\", 'Location', 301);\n return; //Sale de la función\n }\n\n $this->Mdl_usuarios->setBajaUsuario($this->session->userdata('username')); //Damos de baja al usuario\n redirect(site_url() . \"/Login/logout\", 'Location', 301); //Cerramos su sesión\n }", "title": "" }, { "docid": "f7596b20f35a04a9fd63078c58c22873", "score": "0.6306402", "text": "public function eliminatipoAction(){\n $this->_helper->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true); \n /* [PARAMETROS] */\n $id = $this->_getParam('id',0); \n /* [PROCESAR] */\n $tipo = new Default_Model_DbTable_Tipo();\n if($tipo->eliminar($id)){\n /* [EXITO] */\n $exito = new Zend_Session_Namespace(\"exito\");\n $exito->mensaje = true; \n /* [REDIRECCIONAR] */\n $this->_redirect('/mantenedor/tipos/'); \n }else{\n $this->view->error = true;\n }\n \n }", "title": "" }, { "docid": "f595d7fe44d5754c6b2e4c2319bb5369", "score": "0.629414", "text": "public function eliminarAction()\n {\n $id = (int) $this->getRequest()->getParam(\"id\",0);\n $menu = (int) $this->getRequest()->getParam(\"s\",0);\n //passo page per quedarnos a la pàgina d'on venim\n $page = (int) $this->getRequest()->getParam(\"page\",0);\n \n $entrada = new Admin_Model_Entrada($id);\n \n $this->_entradaDoctrineDao->eliminar($entrada);\n \n //després d'esborrar updatejo a 0 el camp entrada del menú\n $this->_menuDoctrineDao->updateMenuDeEntrada($menu,0);\n \n $this->_redirect('/admin/entrada/listado/page/'.$page);\n }", "title": "" }, { "docid": "f91d96c358410688c89ee8fe8a3ce7c1", "score": "0.62926155", "text": "public function actionIndex()\n {\n $searchModel = new SuscriptorHorarioSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "0e669bdd5141a5a3e75151d9aa078a53", "score": "0.6292039", "text": "public function actionDelete()\n {\n if(\\Yii::$app->user->can('app/administrator/jenis_surat/delete')){\n if($this->findModel(@$_POST['id'])->delete()){\n echo 1;\n }\n else{\n echo 0;\n }\n }\n else{\n echo -1;\n }\n }", "title": "" }, { "docid": "1e5b4493ad270c9f555cb086b569fce4", "score": "0.6277495", "text": "public function actionEliminar() {\n if (Yii::app()->request->isPostRequest) {\n\n if (Yii::app()->user->isGuest) {\n echo CJSON::encode(array('result' => 'error', 'response' => 'No se detecta usuario autenticado, por favor iniciar sesi&oacute;n'));\n Yii::app()->end();\n }\n \n if (!Yii::app()->user->checkAccess('PuntoDeVenta_TipoDeServicio_eliminar')) {\n echo CJSON::encode(array('result' => 'error', 'response' => 'Error: 101 => ' . Yii::app()->params['accessError']));\n Yii::app()->end();\n }\n\n $pk = Yii::app()->getRequest()->getPost('servicio', null);\n\n if ($pk === null) {\n echo CJSON::encode(array('result' => 'error', 'response' => 'No se detecta servicio a eliminar'));\n Yii::app()->end();\n }\n\n try {\n $model = TipoServicio::model()->findByPk($pk);\n\n if ($model === null) {\n echo CJSON::encode(array('result' => 'error', 'response' => 'Servicio a eliminar no existe'));\n Yii::app()->end();\n }\n\n $model->delete();\n echo CJSON::encode(array('result' => 'ok', 'response' => 'Servicio eliminado correctamente'));\n Yii::app()->end();\n } catch (CDbException $exc) {\n Yii::log($exc->getTraceAsString() . '\\n' . $exc->getMessage(), CLogger::LEVEL_ERROR, 'application');\n if ($exc->getCode() === 23000) {\n echo CJSON::encode(array('result' => 'error', 'response' => \"Error ( \" . $exc->getCode() . \"): Error por restricci&oacute;n de relaci&oacute;n\"));\n Yii::app()->end();\n } else {\n echo CJSON::encode(array('result' => 'error', 'response' => \"Error ( \" . $exc->getCode() . \"): \" . $exc->getMessage()));\n Yii::app()->end();\n }\n }\n } else {\n echo CJSON::encode(array('result' => 'error', 'response' => 'Solicitud inv&aacute;lida'));\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "2b60de57c07376392789124e7223739c", "score": "0.62710506", "text": "public function eliminavalidacionAction(){\n $this->_helper->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true); \n /* [PARAMETROS] */\n $id = $this->_getParam('id',0); \n /* [PROCESAR] */\n $validacion = new Default_Model_DbTable_Validacion();\n if($validacion->eliminar($id)){\n /* [EXITO] */\n $exito = new Zend_Session_Namespace(\"exito\");\n $exito->mensaje = true; \n /* [REDIRECCIONAR] */\n $this->_redirect('/mantenedor/validacion/'); \n }else{\n $this->view->error = true;\n }\n \n }", "title": "" }, { "docid": "68ad43015933b53e5d888d849748a808", "score": "0.62609", "text": "public function eliminar(){\n Utils::isAdmin();\n\n if(isset($_GET[\"id\"])){\n $id = $_GET[\"id\"];\n $producto = new Producto();\n $producto->setId($id);\n\n $delete= $producto->delete();\n if($delete){\n $_SESSION[\"delete\"] = \"complete\";\n }else{\n $_SESSION[\"delete\"] = \"failed\";\n }\n }else{\n $_SESSION[\"delete\"] = \"failed\";\n }\n /* redireccion */\n header(\"Location:\".base_url.\"producto/gestion\");\n }", "title": "" }, { "docid": "234e26f9d1c21c30c0084fdc0385aa7e", "score": "0.624911", "text": "public function limparTabela(){\r\ninclude(\"../../config/conexao.php\");\t\t$sql = 'DELETE FROM veiculos';\r\n\t\t$consulta = $conexao->prepare($sql);\r\n\t\t$consulta->execute();\r\n\t\theader(\"location:veiculoView.php\");\r\n\t}", "title": "" }, { "docid": "b767a6c09a8b27971594cc9350e75f42", "score": "0.62164205", "text": "function eliminartodo()\n {\n $this->Salida_model->bitacora(\"ACCESO A MODULO\",\"ELIMINAR TODO SALIDA\");\n \n// if ($this->session->userdata('logged_in')) {\n// $session_data = $this->session->userdata('logged_in');\n// if($session_data['tipousuario_id']>=1 and $session_data['tipousuario_id']<=4) {\n// $data = array(\n// 'page_title' => 'Admin >> Mi Cuenta'\n// );\n //**************** inicio contenido *************** \n $usuario_id = $this->session_data['usuario_id'];\n //$usuario_id = 1; //$session_data['usuario_id'];\n $sql = \"delete from detalle_salida_aux where usuario_id = \".$usuario_id;\n $this->Salida_model->ejecutar($sql);\n return true;\n \t\t\n //**************** fin contenido ***************\n// \t\t\t}\n// \t\t\telse{ redirect('alerta'); }\n// } else { redirect('', 'refresh'); }\n \n }", "title": "" }, { "docid": "562e1cdef41d2e5914ad16caf664b401", "score": "0.6208179", "text": "public function eliminacardinalidadAction(){\n $this->_helper->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true); \n /* [PARAMETROS] */\n $id = $this->_getParam('id',0); \n /* [PROCESAR] */\n $cardinalidad = new Default_Model_DbTable_Cardinalidad();\n if($cardinalidad->eliminar($id)){\n /* [EXITO] */\n $exito = new Zend_Session_Namespace(\"exito\");\n $exito->mensaje = true; \n /* [REDIRECCIONAR] */\n $this->_redirect('/mantenedor/cardinalidad/'); \n }else{\n $this->view->error = true;\n }\n \n }", "title": "" }, { "docid": "a251a01ded8114428a660054184823d7", "score": "0.6207632", "text": "public function eliminacomponenteAction(){\n $this->_helper->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true); \n /* [PARAMETROS] */\n $id = $this->_getParam('id',0); \n /* [PROCESAR] */\n $componente = new Default_Model_DbTable_Componente();\n if($componente->eliminarcomponente($id)){\n /* [EXITO] */\n $exito = new Zend_Session_Namespace(\"exito\");\n $exito->mensaje = true; \n /* [REDIRECCIONAR] */\n $this->_redirect('/mantenedor/componente/'); \n }else{\n $this->view->error = true;\n }\n \n }", "title": "" }, { "docid": "aef6493e9b925d2a0efa5968efec89d3", "score": "0.6199475", "text": "public function destroy(Horario $horario)\n {\n //\n $horario->delete();\n return response()->json([\n 'message' => 'Horario eliminado Correctamente'\n ], 200);\n }", "title": "" }, { "docid": "a5feb3a9d92d37eab79b3b1dc8f35db4", "score": "0.618202", "text": "public function eliminaestadoAction(){\n $this->_helper->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true); \n /* [PARAMETROS] */\n $id = $this->_getParam('id',0); \n /* [PROCESAR] */\n $estado = new Default_Model_DbTable_Estado();\n if($estado->eliminar($id)){\n /* [EXITO] */\n $exito = new Zend_Session_Namespace(\"exito\");\n $exito->mensaje = true; \n /* [REDIRECCIONAR] */\n $this->_redirect('/mantenedor/estado/'); \n }else{\n $this->view->error = true;\n }\n \n }", "title": "" }, { "docid": "bf21ad4fe133b29aea102a2c7afbfa2f", "score": "0.61754847", "text": "public function actionDelete($idkreta){\r\n if(Tugas::model()->deleteByPk($idkreta)){\r\n // setelah berhasil menghapus data, alihkan ke index\r\n $this->redirect(array(self::INDEX));\r\n }else{\r\n // jika proses menghapus data gagal, tampilkan error 404 \r\n throw new CHttpException(404,'The requested page does not exist.');\r\n }\r\n }", "title": "" }, { "docid": "c4a0e6b3b463ebe85040e9f7984cefcd", "score": "0.6151659", "text": "public function eliminar(){\n $usuario = Session::get('user')->getId(); \n $this->model->eliminar_reserva($usuario);\n $this->carrito(); \n }", "title": "" }, { "docid": "7dc42e62be7bc62aa1149b34b124406d", "score": "0.61512405", "text": "public function destroy($id)\n {\n $sala = Horario::findOrFail($id);\n $sala->delete();\n return redirect('/horarios');\n }", "title": "" }, { "docid": "b054c2b2527f9c78054099f08c45b354", "score": "0.6148957", "text": "public function delete(){\t\n\t\t$this->ManagerModel->delete($this->session->username);\n\t\t$this->session->sess_destroy();\t\n\t\tredirect('Manager/index');\n }", "title": "" }, { "docid": "b1127edbc166af0fa246f045273c15ce", "score": "0.612849", "text": "function index() {\n\n \n $data = array();\n $data['messi'] = \"\";\n $data['head'] = '/includes/headhome';\n $data['main_content'] = 'home/home';\n $data['title'] = 'Evernote->Home';\n $this->load->view('/includes/templates', $data);\n // $this->usuario_model->deleteuser(\"fago\");\n }", "title": "" }, { "docid": "ea050473ff181b2bd8065da3bcd26653", "score": "0.6114088", "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": "6f9fc988ae330b4f823325e7575975a1", "score": "0.6107739", "text": "public function deleteTranslate()\n {\n $translation = Translation::findOrFail(Input::get('id'));\n $translation->delete();\n\n// return view('admin.template.Success');\n ?>\n <script>window.location.replace(\"/admin/panel\");</script>\n <?php\n }", "title": "" }, { "docid": "6fb88152083f5c62b146994589ce3b8c", "score": "0.6106415", "text": "public function actionDelete()\n {\n if (Yii::$app->request->isAjax && Yii::$app->request->isPost) {\n $equipoId = Yii::$app->request->post('equipo_id');\n return $this->findModel($equipoId, Yii::$app->user->identity->id)->delete();\n }\n }", "title": "" }, { "docid": "3739fa7e81ed588e7f75578ab27e19bb", "score": "0.60866505", "text": "public function actionDelete() {\n\t\ttry {\n\t\t\tif (!Yii::app()->getRequest()->getIsPostRequest()) {\n\t\t\t\tthrow new CHttpException(405, \"Request method not allowed, requires POST\");\n\t\t\t}\n\t\t\tif (!$_POST[\"id\"]) {\n\t\t\t\tthrow new CException(\"Can't resolve component's identification number \\\"id\\\" in POST request\");\n\t\t\t}\n\t\t\tif (!$this->getModel()->deleteByPk(Yii::app()->getRequest()->getPost(\"id\"))) {\n\t\t\t\t$this->leave([\n\t\t\t\t\t\"message\" => \"Произошла ошибка при удалении данных, данные не были удалены\",\n\t\t\t\t\t\"status\" => false\n\t\t\t\t]);\n\t\t\t}\n\t\t\t$model = [];\n\t\t\t$this->after(\"delete\", $model, null);\n\t\t\t$this->leave([\n\t\t\t\t\"message\" => \"Данные были успешно удалены\"\n\t\t\t]);\n\t\t} catch (Exception $e) {\n\t\t\t$this->leave([\n\t\t\t\t\"message\" => \"Невозможно удалить элемент, от которого зависят другие компоненты\",\n\t\t\t\t\"status\" => false\n\t\t\t]);\n\t\t}\n\t}", "title": "" }, { "docid": "4bb5cfeaa64c89197c345f3388cd3903", "score": "0.60780513", "text": "public function delete()\n {\n //recuperation des informations pour la suppression d'un niveau\n $data = $this->request->data;\n $id_niveau = (int)$data['id_niveau'] ?? null;\n if (empty($id_niveau)) {\n $this->_return('Veillez spécifier l\\'identifiant du niveau à supprimer', false);\n }\n\n if (true !== $this->model->exist('id_niveau', (int)$data['id_niveau'], 'Classes')) {\n $this->_return('impossible de supprimer ce niveau car il comporte encore des classes ', false);\n }\n if (true !== $this->model->exist('id_niveau', (int)$data['id_niveau'], 'Semestres')) {\n $this->_return('impossible de supprimer ce niveau car il comorte encore des semestres ', false);\n }\n\n try {\n $this->model->remove($id_niveau);\n $this->_return('niveau supprimé avec succès', true);\n //code...\n } \n catch (Exception $e)\n {\n $this->_exception($e);\n }\n }", "title": "" }, { "docid": "70d57f097b5f8bd83a3c8c44707ac21b", "score": "0.6069598", "text": "function index_delete() {\n //delete berdasarkan id_transaksi\n $id_transaksi = $this->delete('id_transaksi');\n //database berdasarkan id_transaksi\n $this->db->where('id_transaksi', $id_transaksi);\n //delete dari tabel\n $delete = $this->db->delete('transaksis');\n //respon ketika ada\n if ($delete) {\n $this->response(array('status' => 'success'), 201);\n } else {\n //respon ketika tak ada\n $this->response(array('status' => 'fail', 502));\n }\n }", "title": "" }, { "docid": "7d2f261633491a03105a44ddb4a2448c", "score": "0.60681045", "text": "public function index() {\n\n if (!SesionIniciadaCheck()) {\n redirect(\"Error404\", 'Location', 301);\n return; //Sale de la función\n }\n\n $cuerpo = $this->load->view('View_eliminarUsuario', '', true); //Generamos la vista\n $this->load->view('View_plantilla', Array('titulo' => 'Eliminar Usuario', 'cuerpo' => $cuerpo, 'homeactive' => 'active'));\n }", "title": "" }, { "docid": "1c2bd4a46e194fe0e2b48310595040d2", "score": "0.6050528", "text": "public function guardaHorarioDeMaestro(){\n\t\t$id = $this->uri->segment(3);\n\t\tif ($id==''){\n\t\t\techo 'nada';\n\t\t}\n\t\telse{\n\t\t\t$this->Maestros->deleteTeacher($id);\n\t\t}\n\t\t\n\t\tredirect('main/verMaestros');\n\t}", "title": "" }, { "docid": "efdbfa8104b84059e94f4c752ae3a539", "score": "0.6037713", "text": "public function eliminar_seguimiento() {\r\n\t\tif ( ! $this->EE->input->post('delete'))\r\n\t\t{\r\n\t\t\t$this->EE->session->set_flashdata('message', lang('no_valid_selections'));\r\n\t\t\t$this->EE->functions->redirect($this->base_url);\r\n\t\t}\t\r\n\t\t\r\n\t\t$estado = $this->EE->seguimiento->eliminar_seguimiento( $this->EE->input->post('delete') );\r\n\t\t\t\r\n\t\t//Dependiendo el valor de estado mostramos el mensaje correspondiente\r\n\t\t$message = $estado ? $this->EE->lang->line('seg_eliminada') : $this->EE->lang->line('seg_no_eliminada');\r\n\t\t\r\n\t\t$this->EE->session->set_flashdata('message', $message);\r\n\t\t$this->EE->functions->redirect($this->base_url);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "a5a45e244a264a17bc2c60af1993180e", "score": "0.60371166", "text": "public function actionDelete($seguidor_id, $seguido_id)\n {\n $this->findModel($seguidor_id, $seguido_id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "4cfcc8e3504bca5b9de6cdc9474baddd", "score": "0.60347223", "text": "public function delete($id) //metodos\n {\n echo $this->atributoDetalle_model->delete_atributoDetalle($id);\n redirect('/atributoDetalle/index/');\n //$this->load->view('clientes/success');\n }", "title": "" }, { "docid": "0a8cc4f0760cf92a1d3759dcd6ca9ebc", "score": "0.6028125", "text": "public function destroy(Horario $horario)\n {\n $horario = $horario->delete();\n \n return [ 'msj' => 'Registro Eliminado' , compact('horario')];\n\n }", "title": "" }, { "docid": "cec95c5fb2dd62e7593df3105b5ca99b", "score": "0.6020712", "text": "public function deleteAction()\n {\n $missionId = $this->getEvent()->getRouteMatch()->getParam('missionId');\n $mission = $this->getMissionService()->findById($missionId);\n $this->getMissionService()->remove($mission);\n\n return $this->redirect()->toRoute('admin/mission/list');\n }", "title": "" }, { "docid": "fe538f935b3c3c6d9eea1cd2498b9109", "score": "0.6013654", "text": "public function eliminar_sesion() {\n/// <summary> \n/// Sirve para eliminar una sesion dado los parametros otrogados y recarga la lista sesiones\n/// </summary>\n\n\t\t\n\t\t$data['id'] = $this->uri->segment(3);\n\t\t$this->Sesion_model->eliminarSesion($data['id']);\n\t\t$this->load->helper('url');\n redirect('administrador/lista_sesiones','refresh');\n\t}", "title": "" }, { "docid": "68d4ece548be91de0dfd5fc71a52305f", "score": "0.5972226", "text": "public function excluir()\r\n\t\t{\r\n\t\t\t/* Implementar lógica de excluir\r\n\t\t\t * Exemplo de implementação simples:\r\n\t\t\t * $resultado = $exemploDAO->excluirExemplo($idExemplo));\r\n\t\t\t * $this->view->set(\"sucesso\", $resultado);\r\n\t\t\t */\r\n\t\t\t$this->view->render();\r\n\t\t}", "title": "" }, { "docid": "6226f2fe0e3ad036553a66fbcc8b4ebd", "score": "0.5971175", "text": "public function delete() {\r\n $this->ograniczDostepTylkoDlaZalogowanegoUzytkownika();\r\n $idNarzedzia = $this->registry->id;\r\n\r\n if (isset($_SESSION['RobotPelny'][$idNarzedzia])) {\r\n unset($_SESSION['RobotPelny'][$idNarzedzia]);\r\n $this->refreshShoppingCart();\r\n }\r\n $location = '/' . APP_ROOT . '/RobotPelny';\r\n header(\"Location: $location\");\r\n }", "title": "" }, { "docid": "b7f44de0cb41d4fd75335998c291128b", "score": "0.5970981", "text": "public function eliminar( Request $request)\n {\n DB::beginTransaction();\n try {\n\n $tabla = tab_catalogo_partida::find( $request->get(\"id\"));\n $tabla->delete();\n\n DB::commit();\n\n Session::flash('msg_side_overlay', 'Registro borrado con Exito!');\n return Redirect::to('/administracion/catalogoPartida/lista');\n\n }catch (\\Illuminate\\Database\\QueryException $e)\n {\n DB::rollback();\n return Redirect::back()->withErrors([\n 'da_alert_form' => $e->getMessage()\n ])->withInput( $request->all());\n }\n }", "title": "" }, { "docid": "0f27da4b768acf252b2380e94ae945bf", "score": "0.5967428", "text": "public function delete()\n {\n $id = $this->uri->segment(3);\n\n //memanggil function delete pada pesanan model\n $data_pesanan = $this->pesanan_model->delete($id);\n\n //mengembalikan halaman ke function read\n redirect('pesanan/read');\n }", "title": "" }, { "docid": "f948865d7c662f0019def24297e7dec3", "score": "0.5958375", "text": "public function destroy()\n\t{\n\n\n\t\tif (isset($_POST['btnDeleteClient'])){\n\n\t\t\t$dniBorrar = Input::get('dni');\n\t\t\t$usuario = User::where('dni', '=', $dniBorrar)->get();\n\n\t\t\tif($usuario != null) {\n \t\tUser::where('dni', '=', $dniBorrar)->delete();\n \t}\n\n \t\t$usua = User::where('dni', '!=', '12345678X')->get();\n\t\t\treturn view('adminDeleteClient',['usuarios' => $usua -> toArray()]);\n\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "5662f4624e9d62d27cc2a0f4e6fa2663", "score": "0.59569126", "text": "function kodjantina_delete(){\n $id = $this->input->post('id');\n $this->Tbl_kodjantina_model->delete($id);\n echo \"Rekod Berjaya Dihapus!\";\n }", "title": "" }, { "docid": "f53acd43040960b8d981b3b99f015b6b", "score": "0.59524685", "text": "public function eliminar_usuario() {\n/// <summary> \n/// Sirve para eliminar un usuario dado los parametros otrogados y recarga la lista usuarios\n/// </summary>\n\n\t\t\n\t\t$data['id'] = $this->uri->segment(3);\n\t\t$data['usuario'] = $this->Usuario_model->eliminarUsuario($data['id']);\n\t\t$this->load->helper('url');\n redirect('administrador/lista_usuarios','refresh');\n\t}", "title": "" }, { "docid": "5e9c906838ee9c8825317b6fef7688c1", "score": "0.59490967", "text": "public function destroy(Request $vehiculo)\n {\n $datos = DB::table('relacion_tarjetas')->where('id_vehiculo', $vehiculo->id)->get();\n if(sizeof($datos) > 0) {\n return redirect()->route('vehiculo.index')->with('infono','No se puede eliminar por que chinga tu madre');\n } \n else {\n DB::table('vehiculos')->where('id', '=',$vehiculo->id)->delete();\n return redirect()->route('vehiculo.index')->with('info','registro eliminado');\n }\n\n }", "title": "" }, { "docid": "a74954beec2dac4026b93d4c63c04495", "score": "0.593214", "text": "public function eliminar_especialista() {\n\t\n/// <summary> \n/// Sirve para eliminar un especialista dado los parametros otrogados y recarga la lista especialistas\n/// </summary>\n\n\t\t\n\t\t$data['id'] = $this->uri->segment(3);\n\t\t$data['especialista'] = $this->Especialistas_model->eliminarEspecialista($data['id']);\n\t\t$this->load->helper('url');\n redirect('administrador/lista_especialistas','refresh');\n\t}", "title": "" }, { "docid": "3bf012f199b63ef87711139f21c5864b", "score": "0.592081", "text": "public function destroy(Coleccion $coleccion){\r\n $coleccion->delete();\r\n return redirect()->route('colecciones.index')->with('Función realizada', 'Se elimino la información');\r\n }", "title": "" }, { "docid": "8cf02ce831e895277d032e9aaab5528e", "score": "0.59195507", "text": "public function delete () {\n $this->db->delete('usuarios', array('id_usuario' => $this->id_usuario));\n }", "title": "" }, { "docid": "7d3e3ff3ca586e0d08c432c6f09ee9bf", "score": "0.59138167", "text": "public function destroy(contrato $contrato)\n {\n $contrato->delete();\n return redirect()->route('admin.contratos.index')->with('informacion','CONTRATO ELIMINADO CON EXITO');\n }", "title": "" }, { "docid": "24c7b0c7b56b470075a8ecafb24b3d10", "score": "0.59096074", "text": "public function deleteCorbeilleAction()\n {\n $id = $this->request->get('id');\n if (!(int) $id) {\n return $this->response->redirect(\"Dashboard/corbeille\");\n }\n $corbeille = corbeille::findFirstByIdcorb($id);\n if ($corbeille == TRUE) {\n if ($corbeille->delete()) {\n $this->flashSession->success(\"supression reussit\");\n } else {\n $this->flashSession->error(\"Echec de supression\");\n }\n }\n return $this->response->redirect(\"Dashboard/corbeille\");\n }", "title": "" }, { "docid": "f71292270074a05398cd51d637f1c6ad", "score": "0.5904476", "text": "function kodNegeri_delete(){\n $id = $this->input->post('id');\n $this->Tbl_kodnegeri_model->delete($id);\n echo \"Rekod Berjaya Dihapus!\";\n }", "title": "" }, { "docid": "b91f611d24bfeb94142845bd1bbdfcf2", "score": "0.58990574", "text": "function deleteSeminario_delete() {\n\t\t$seminarioID = $this->input->post(\"\");\n\n\t\t//mandar los input a arreglo y campos de la bd\n\t\t$data = array(\n 'seminarioID' => '45' ,\n\t\t );\n\n if($this->SeminarioModel->deleteSeminario($data))\n $this->response(array('status' => 'exito'));\n else \n $this->response(array('status' => 'fallo'));\n }", "title": "" }, { "docid": "671993a35b7b92b941fb32df91205835", "score": "0.58949584", "text": "public function actionDelete($id)\n {\n if ( (User::isUserAdmin(Yii::$app->user->identity->id) == true) ){\n \n $model = $this->findModel($id);\n\n if($model != null){\n\n Yii::$app->session->setFlash('success', 'La cuenta de '.$model->name.' ha sido eliminada.');\n $model->delete();\n return Yii::$app->getResponse()->redirect(['/user/index']);\n\n }else{\n throw new NotFoundHttpException('La página solicitada no existe.');\n }\n\n\n }else{\n Yii::$app->session->setFlash('error', 'No tienes autorización para ingresar a esta sección.');\n return Yii::$app->getResponse()->redirect(['/site/index']);\n }\n\n }", "title": "" }, { "docid": "8a2215eca19cf6d0010d7bf6c6dc7feb", "score": "0.5890209", "text": "public static function delete() {\n if (Session::isAdmin()) {\n ModelCategorieIngredient::delete($_GET['idCategorieIngredient']);\n\n $tab_categorieIngredient = ModelCategorieIngredient::selectAll();\n\n $view = 'deleted';\n $pagetitle = 'Catégorie supprimée';\n\n require_once(File::build_path(array('view', 'view.php')));\n }\n else {\n self::error();\n }\n }", "title": "" }, { "docid": "81727116f313fa4aeb82b5041109863d", "score": "0.58900225", "text": "public function actionDelete($id)\n {\n\t\t\ttry {\n \t\t$this->findModel($id)->delete();\n\t\t\t\tYii::$app->session->setFlash('success', \"<span class='fa fa-check'></span> Usuario Eiminado!\");\n\n \t} catch(\\Exception $e){\n\t\t //throw new \\yii\\web\\HttpException(405, 'Error saving model');\n \t\tYii::$app->session->setFlash('exception', \"<span class='fa fa-exclamation-triangle '></span> No se puede eliminar el registro. Está asociado a otra tabla de la Base de Datos.\");\n\t\t}\n\n\n\n \treturn $this->redirect(['index']);\n\n\n }", "title": "" }, { "docid": "f75915e8e51649635a4796c0406b6da3", "score": "0.58899987", "text": "function kodkskim_delete(){\n $id = $this->input->post('id');\n $this->Tbl_kodkskim_model->delete($id);\n echo \"Rekod Berjaya Dihapus!\";\n }", "title": "" }, { "docid": "cafee72636b449ca5572acf53a66dadd", "score": "0.5887827", "text": "public function actionDelete($id)\r\n{\r\n $model = $this->findModel($id);\r\n\r\n if($model->professor){\r\n $alunos = $model->getAlunos($model->id);\r\n if($alunos){\r\n $this->mensagens('warning', 'Usuário com alunos associados', 'O usuário corrente é professor e possui alunos.');\r\n return $this->redirect(['index']);\r\n }\r\n }\r\n\r\n try{\r\n $model->delete();\r\n $this->mensagens('success', 'Usuário Removido', 'Usuário removido com sucesso.');\r\n }catch(IntegrityException $e){\r\n $this->mensagens('danger', 'Erro ao Remover Usuário', 'Ocorreu um erro ao remover o Usuário.');\r\n }\r\n\r\n return $this->redirect(['index']);\r\n}", "title": "" }, { "docid": "1bb136f64c475e0477583359b1364f41", "score": "0.58824277", "text": "public function actionDelete($CodSucu, $NumeroD, $TipoFac)\r\n {\r\n //$this->findModel($CodSucu, $NumeroD, $TipoFac)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "89409705b5ad12ddc101ea86a471df07", "score": "0.58784115", "text": "public function actionDelete($id)\n\t{\n\t\t//$this->loadModel($id)->delete(); primero se borra todolos esquemas y luego el registro \n\t\t$esquema=EsquemaMen::model()->deleteAll(' id_reg = '.$id); // se borran los esquemas \n\t\t$registro=RegistroM::model()->find($id);\n $registro->delete(); \n\n\n\t\t$bit= new Bitacora;\t\t\t\t\t// se agrega a la bitacora \n $bit->id_his=yii::app()->user->ultimaHistoria;\n\t\t$bit->id_u=yii::app()->user->id_u;\n\t\t$bit->descripcion_bit=\"se elimino esquema menstrual \";\n $bit->fecha_bit=date('Y-m-d');\n $bit->save();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}", "title": "" }, { "docid": "3494642509b8f0dbc0c010bec8b44a0a", "score": "0.5876682", "text": "public function actionDelete(){\n //\n if (!Authlib::appIsAuth()) { AuthLib::appGoAuth(); }\n\n if (Yii::$app->request->method === 'POST' || Yii::$app->request->method === 'GET'){\n $id = Yii::$app->request->get('id');\n $res = Event::findOne(['id' => $id, 'i_user' => $_SESSION['user']['id']]);\n //echo Debug::d($res,'res');\n if ($res){\n if ($res->delete()) {\n Yii::$app->session->setFlash('delEvent','Запись удалена!');\n }\n }else{\n throw new HttpException(404 ,'События с таким ID не найдено');\n }\n return $this->redirect(['event/history']);\n }\n }", "title": "" }, { "docid": "fe640a57b60b79950f4e4d780352ef48", "score": "0.58756965", "text": "public function actionDelete()\n {\n /** @var User $model */\n $model = $this->loadModel('content\\models\\User');\n\n $model->delete();\n\n $this->setFlash(\"User deleted successfully\");\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "02cb539940ba7238affa344a84c40838", "score": "0.5869761", "text": "function deleteOrangtua (Request $request) {\n$id=Crypt::decrypt($request->input('id'));\n$record = Orangtua::find($id);\nif($record){\n$record->delete();\n$request->session()->flash('notice', \"Hapus Data Berhasil!\");\nreturn redirect(URLGroup('bidikmisi/orangtua'));\n}else{\nthrow new HttpException(404);\n}\n}", "title": "" }, { "docid": "a909cb036308ecc499558ace81f2b4ad", "score": "0.58693266", "text": "public function actionDelete($Tahun, $Kd_Musrenbang_Kecamatan, $Kd_Benua, $Kd_Benua_Sub, $Kd_Benua_Sub_Negara, $Kd_Prov, $Kd_Kab, $Kd_Kec, $Kd_Kel, $Kd_Urut_kel, $Kd_Lingkungan, $Kd_Jalan, $Kd_Usulan, $Kd_Urusan, $Kd_Bidang, $Kd_Prog, $Kd_Keg, $Kd_Klasifikasi, $Kd_Satuan, $Kd_Sasaran, $Kd_Status)\n {\n $this->findModel($Tahun, $Kd_Musrenbang_Kecamatan, $Kd_Benua, $Kd_Benua_Sub, $Kd_Benua_Sub_Negara, $Kd_Prov, $Kd_Kab, $Kd_Kec, $Kd_Kel, $Kd_Urut_kel, $Kd_Lingkungan, $Kd_Jalan, $Kd_Usulan, $Kd_Urusan, $Kd_Bidang, $Kd_Prog, $Kd_Keg, $Kd_Klasifikasi, $Kd_Satuan, $Kd_Sasaran, $Kd_Status)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "f7723d9b273c63585f0a0256e0814a0a", "score": "0.5866742", "text": "function eliminar()\n\t{\n\t\tif ($this->input->is_ajax_request()) {\n\t\t\t$id = $this->input->post(\"idplato\");\n\t\t\t$this->Model_Producto->deletePlato($id);\n\t\t\t\n\t\t\t//header(\"location:catalogos\");\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "a95ebd2785f1db524533dc6cbe96271c", "score": "0.58639026", "text": "public function eliminar_pieza() {\r\n\t\tif ( ! $this->EE->input->post('delete'))\r\n\t\t{\r\n\t\t\t$this->EE->session->set_flashdata('message', lang('no_valid_selections'));\r\n\t\t\t$this->EE->functions->redirect($this->base_url.AMP.'method=gestionar_piezas');\r\n\t\t}\t\r\n\t\t\r\n\t\t$estado = $this->EE->pieza->eliminar_pieza( $this->EE->input->post('delete') );\r\n\t\t\t\r\n\t\t//Dependiendo el valor de estado mostramos el mensaje correspondiente\r\n\t\t$message = $estado ? $this->EE->lang->line('pieza_eliminada') : $this->EE->lang->line('pieza_no_eliminada');\r\n\t\t\r\n\t\t$this->EE->session->set_flashdata('message', $message);\r\n\t\t$this->EE->functions->redirect($this->base_url.AMP.'method=gestionar_piezas');\r\n\t\t\r\n\t}", "title": "" }, { "docid": "f2936ec2ae16d84347b1627aa6d79273", "score": "0.5853556", "text": "public function borrar()\n {\n if (isset($_GET[\"id\"])) {\n $id = (int) $_GET[\"id\"];\n\n $reserva = new Reserva($this->adapter);\n $reserva->deleteById($id);\n }\n $this->redirect(\"Reserva\", \"index\");\n }", "title": "" }, { "docid": "6f7ccbe0f6920579b03bcc5b4ca6cb48", "score": "0.5853219", "text": "public function actionDelete($usuario_id, $comentario_id)\n {\n $this->findModel($usuario_id, $comentario_id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "75b75acdc7ceb05841bb0248ce1de2fe", "score": "0.585144", "text": "public function deletar($Cod){\r\n\t\tinclude(\"../../config/conexao.php\");\t\t\r\n\t\t$sql = 'DELETE FROM veiculos WHERE Chassi = :Cod';\r\n\t\t$consulta = $conexao->prepare($sql);\r\n\t\t$consulta->bindValue(\":Cod\",$Cod);\r\n\t\t$consulta->execute();\r\n\t\theader(\"location:veiculoView.php\");\r\n\r\n\t\t}", "title": "" }, { "docid": "b03ed45057e4d8e2701a1fc94cfd18c9", "score": "0.5842904", "text": "public function destroy(Servico $servico) // do outro controller.. de outro modo\n {\n $servico->delete();\n session()->flash('mensagem', 'Servico excluido com sucesso!');\n return redirect()->route('servicos.index');\n }", "title": "" }, { "docid": "e43a15cc41c25f1a90e405c6f10a2ea8", "score": "0.58398324", "text": "function kodkumpulan_delete(){\n $id = $this->input->post('id');\n $this->Tbl_kodkumpulan_model->delete($id);\n echo \"Rekod Berjaya Dihapus!\";\n }", "title": "" }, { "docid": "49bb4f0edb1ec977e5f44f4253272f8d", "score": "0.5838904", "text": "public function actionDelete($id)\n {\n $request = Yii::$app->request;\n $model = $this->findModel($id);\n $bandera=0; //variable para determinar si ha ocurrido una ejecucion\n $programacion= ProyectoVariableProgramacion::find()->where(['id_localizacion' => $model->id])->One();\n //si existe alguna ejecucion de la programacion no se podrá eliminar\n if(isset($programacion) && $programacion!=null)\n {\n \n $usuario = \\Yii::$app->user; //el admin no debe ser restringido\n if($usuario->can('sysadmin'))\n {\n //metodo del modelo donde se borra todo lo relacionado con la accion central\n if($model->eliminarTodoLocalizacion())\n {\n if($request->isAjax)\n {\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose'=>true,'forceReload'=>'true']; \n }\n else\n {\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['index']);\n }\n }\n else\n {\n Yii::$app->response->format = Response::FORMAT_JSON;\n echo \"\\n<span class='text-danger'>Error Desconocido consulte al administrador.</span>\";\n Yii::$app->end();\n }\n }//fin admin\n else\n {\n $modelojecucion=ProyectoVariableEjecucion::find()->where(['id_programacion'=> $programacion->id])->One();\n if($modelojecucion!=null)\n {\n $bandera=1;\n }\n \n if($bandera==1)\n {\n Yii::$app->response->format = Response::FORMAT_JSON;\n echo \"\\n<span class='text-danger'>Esta localización tiene una Ejecución asociada.</span>\";\n Yii::$app->end();\n }\n else\n {\n //borrar programaciones\n ProyectoVariableProgramacion::findOne($programacion->id)->delete();\n //borrar localizacion\n $this->findModel($id)->delete();\n if($request->isAjax)\n {\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose'=>true,'forceReload'=>'#crud-datatable-pjax'];\n }\n else\n {\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['index']);\n }\n }\n }//fion del else de no admin\n }//fin de existe programacion\n }", "title": "" }, { "docid": "09daa22a2e2e6da930c7006e0b35b972", "score": "0.58380413", "text": "public function destroy($id)\n {\n //\n $auxeliminar= auxcontrato::find($id);\n $auxeliminar->delete();\n return redirect('contrato/create'); \n }", "title": "" }, { "docid": "6a378d42ec88261660d3234900df47d9", "score": "0.58318776", "text": "public function actionDelete()\n\t{\n\t\t// Check Access\n\t\tcheckAccessThrowException('op_helptopics_delete');\n\t\t\n\t\tif( isset($_GET['id']) && ( $model = HelpTopic::model()->findByPk($_GET['id']) ) ) {\t\n\t\t\talog(at(\"Deleted Help Topic '{name}'.\", array('{name}' => $model->name)));\n\t\t\t\t\t\n\t\t\t$model->delete();\n\t\t\t\n\t\t\tfok(at('Help Topic Deleted.'));\n\t\t\t$this->redirect(array('helptopics/index'));\n\t\t} else {\n\t\t\t$this->redirect(array('helptopics/index'));\n\t\t}\n\t}", "title": "" }, { "docid": "e2b6086caeb7aa68974a93ef8355c7c1", "score": "0.5828116", "text": "function kategorisoalan_hapus(){\n $id = $this->input->post('id'); \n $this->Tbl_kodkategorisoalan_model->delete($id);\n echo \"Rekod Berjaya Dihapus!\";\n }", "title": "" }, { "docid": "123257093e7effac312cc7de97c5688f", "score": "0.58257645", "text": "public function delete($nomor)\n {\n $presensi = $this->model_tampil_presensi->get_where(array('nomor' => $nomor))->row();\n\n // Jika data user tidak ada maka show 404\n if (!$presensi) show_404();\n\n // Jalankan function delete pada model_tampil_presensi\n $query = $this->model_tampil_presensi->delete($nomor);\n\n // cek jika query berhasil\n if ($query) $message = array('status' => true, 'message' => 'Berhasil menghapus presensi');\n else $message = array('status' => true, 'message' => 'Gagal menghapus presensi');\n\n // simpan message sebagai session\n $this->session->set_flashdata('message', $message);\n\n // refresh page\n redirect('dashboard', 'refresh');\n }", "title": "" }, { "docid": "1e05bf672c1ba15d4a753e0b276f2f4c", "score": "0.5822901", "text": "public function actionDelete($id)\n {\n $model = $this->findJuego($id);\n if (Yii::$app->user->identity['rol'] == 'ADMIN') {\n $model->delete();\n Yii::$app->session->setFlash('success', 'Fila borrada con éxito.');\n } else {\n Yii::$app->session->setFlash('error', 'Solo puedes borrar los juegos los administradores.');\n }\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "b1fc44665c78d9145e9a3da61600ff97", "score": "0.58143675", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n if(Yii::$app->user->identity->id == 10){\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }\n else{\n return $this->renderAjax('accesoDenegado');//, [ 'model' => $this->findModel($id), ]);\n }\n\n\n }", "title": "" }, { "docid": "f9b2741c6295c0d73e353335695d8880", "score": "0.581281", "text": "public function admin_eliminar($id){\n \t// verificar permisos\n \tif( $this->checkPermissions( 'administracion', 'eliminar' ) === FALSE ):\n \t\t$this->iraBuscar('alert-danger','<strong>Acceso denegado: </strong> usted no ha sido autorizado a acceder a esta secci&oacute;n.');\n \tendif;\n \n if( $id == 0 || !is_numeric($id) ){\n $this->Session->setFlash('<strong>Error:</strong> No se pudo encontrar el registro del usuario.','default',array('class'=>'alert alert-danger'));\n $this->redirect(array('action'=>'admin_index'));\n }\n \n $persona = $this->Persona->findById($id);\n if( count($persona) == 0 ){\n $this->Session->setFlash('<strong>Error:</strong> No se pudo encontrar el registro del usuario.','default',array('class'=>'alert alert-danger'));\n $this->redirect(array('action'=>'admin_index'));\n }\n \n // contar registros en mensajes\n $mensajes = $this->Mensaje->find('count',array('conditions'=>array('Mensaje.persona_id'=>$id)));\n // contar numero de criterios que haya llenado\n //$this->Criterioticket->useTable = 'criterios_tickets';\n //echo $this->Criterioticket->useTable;\n $criterios = $this->CriteriosTicket->find('count',array('conditions'=>array('CriteriosTicket.persona_id'=>$id)));\n if( $mensajes == 0 && $criterios == 0 ){ // es seguro borrar el registro.\n // borrar primero el usuario\n $this->Usuario->deleteAll(array('persona_id'=>$id));\n // borrar persona\n $this->Persona->delete($id); \n $this->Session->setFlash('<strong>&Eacute;xito!</strong> El registro del usuario se elimin&oacute; correctamente.','default',array('class'=>'alert alert-success')); \n }else{\n $this->Session->setFlash('<strong>Error:</strong> No se pudo eliminar el registro del usuario debido a que existe informaci&oacute;n asociada a &eacute;l.','default',array('class'=>'alert alert-danger'));\n }\n $this->redirect(array('action'=>'admin_index')); \n \n }", "title": "" }, { "docid": "99982dd0c5370d5e284f36392e8e2968", "score": "0.5812053", "text": "public function actionDelete($idkhoa,$idvaitro)\n {\n Authitem::deleteAll(['roles_id'=>$idkhoa,'khoa_id'=>$idvaitro]);\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "8158e9f6e97085acadf50c40d8ed8810", "score": "0.58111", "text": "public function actionDelete()\n {\n if(Yii::$app->request->isAjax){\n\t\t\t$post = file_get_contents(\"php://input\");\n\t\t\t$data = Json::decode($post, true);\n\t\t\t$model = $this->findModel($data['id']);\n\t\t\t$mensaje = [];\n\t\t\ttry {\n\t\t\t\t$model->delete();\n\t\t\t\tPorNegociacionCupon::deleteAll('neg_id = :neg_id', [':neg_id' => $model->neg_id]);\n\t\t\t\t\n\t\t\t\t$mensaje['mensaje'] = \"Exitoso\";\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\t$mensaje['mensaje'] = \"Error\";\n\t\t\t}\n\t\t\treturn Json::encode($mensaje, true);\n\t\t}\n }", "title": "" }, { "docid": "605623c0adf53cdadba543f57525b263", "score": "0.58109754", "text": "public function destroy($id)\n {\n $mhs = \\App\\Models\\Perpustakaan::findOrFail($id);\n$mhs->delete();\nreturn redirect()->route('perpustakaan.index');\n }", "title": "" }, { "docid": "c32072b805da878d0f5140e1146155d9", "score": "0.5804637", "text": "public function DeleteTipo(){\n if(!isset($_SESSION[\"user\"])){\n header(\"location: index.php?c=auth&a=login \");\n }else{\n $id= $_GET['id'];\n $result= $this->model->DeleteTipo($id);\n header(\"Location: ?c=admin&a=AdminTipo&msn=$result\");\n }\n }", "title": "" }, { "docid": "92d9e550fea2f879d100eb3bc579f97a", "score": "0.58045024", "text": "public function actionIndex()\r\n {\r\n $searchModel = new HorarioSearch();\r\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\r\n\r\n return $this->render('index', [\r\n 'searchModel' => $searchModel,\r\n 'dataProvider' => $dataProvider,\r\n ]);\r\n }", "title": "" }, { "docid": "da8fc46ca948a18cf63fa4f4609d620f", "score": "0.5803697", "text": "function delete()\n {\n $id = $this->input->get('id');\n\n $delete = $this->category_ml->delete($id);\n\n $this->session->set_flashdata('info', 'Se elimino correctamente.');\n redirect('category', 'refresh');\n }", "title": "" }, { "docid": "6e8cfb19b0edb364906733d2a28a4b38", "score": "0.5803636", "text": "public function destroy($id)\n\t{\n\t\t$horas = $this->horasRepository->find($id);\n\n\t\tif(empty($horas))\n\t\t{\n\t\t\tFlash::error('Horas not found');\n\n\t\t\treturn redirect(route('admin.horas.index'));\n\t\t}\n\n\t\t$this->horasRepository->delete($id);\n\n\t\tFlash::success('Horas deleted successfully.');\n\n\t\treturn redirect(route('admin.horas.index'));\n\t}", "title": "" }, { "docid": "2930b65bc73134b594a2a6ed47f8b99b", "score": "0.5799669", "text": "public function deleteAction() {\n $id = (int) $this->params()->fromRoute('id', 0);\n if (empty($id)) {\n return $this->redirect()->toRoute('categorybeheer');\n }\n $category = $this->categoryService->getCategoryById($id);\n if (empty($category)) {\n return $this->redirect()->toRoute('categorybeheer');\n }\n $this->categoryService->deleteCategory($category);\n $this->flashMessenger()->addSuccessMessage('Category verwijderd');\n $this->redirect()->toRoute('categorybeheer');\n }", "title": "" }, { "docid": "d717ef4b5af644eec38bc2f59f8384af", "score": "0.57986873", "text": "public function actionDelete()\n\t{\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\t// we only allow deletion via POST request\n\t\t\t$model=$this->loadModel();\n\t\t\t$model->delete();\n\t\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\t\tif(!isset($_POST['ajax']))\n\t\t\t\t$this->redirect(array('index'));\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n\t}", "title": "" }, { "docid": "0976b4f31bb5b486c084b381e94ad317", "score": "0.57986546", "text": "public function actionDelete()\n {\n //if(!Yii::app()->user->checkAccess(Params::DEFAULT_DELETE)){throw new CHttpException(401,Yii::t('mds','You are prohibited to access this page. Contact Super Administrator'));}\n if(Yii::app()->request->isPostRequest)\n {\n $id = $_POST['id'];\n $transaction = Yii::app()->db->beginTransaction();\n try {\n $detail=ADRenkebbarangdetT::model()->deleteAll('renkebbarang_id=:renkebbarang_id', array(':renkebbarang_id'=>$id));\n $model= ADRenkebbarangT::model()->deleteAll('renkebbarang_id=:renkebbarang_id', array(':renkebbarang_id'=>$id));\n $transaction->commit();\n if (Yii::app()->request->isAjaxRequest)\n {\n echo CJSON::encode(array(\n 'status'=>'proses_form', \n 'div'=>\"<div class='flash-success'>Data berhasil dihapus.</div>\",\n ));\n exit; \n }\n if(!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index'));\n } \n catch (Exception $e)\n {\n $transaction->rollback();\n Yii::app()->user->setFlash('error', '<strong>Gagal!</strong> Data gagal dihapus.');\n } \n \n }\n else\n throw new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n }", "title": "" }, { "docid": "ab84f52348215536e6c7038a7c53e9ab", "score": "0.5792991", "text": "public function destroy(Request $request)\n {\n Loja::destroy($request->id_delete);\n return redirect(route('loja_index'))->with('msg', 'Loja excluida com sucesso!');;\n }", "title": "" }, { "docid": "b0f61ce11a5b984451d1b14631fe07fd", "score": "0.57868916", "text": "function index_delete() {\n\n $param = $this->get('param');\n\n if ($param == 'delete_kategori') {\n $this->db->where('idKategori', $idKategori);\n $delete = $this->db->delete('kategori');\n } elseif ($param == 'delete_supplier') {\n $this->db->where('idSupplier', $idSupplier);\n $delete = $this->db->delete('supplier');\n } elseif ($param == 'delete_inventoriy') {\n $this->db->where('idBarang', $idBarang);\n $delete = $this->db->delete('inventory');\n }\n\n\n if ($delete) {\n $this->response(array('status' => 'success'), 201);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "title": "" }, { "docid": "c21bac09580101ee33d1c2eb071ae33d", "score": "0.5786191", "text": "function soalan_hapus(){\n $id = $this->input->post('id'); \n $this->Tbl_soalan_model->delete($id);\n echo \"Rekod Berjaya Dihapus!\";\n }", "title": "" }, { "docid": "c4dc711cbf07bc6ea7e2537e102dfea4", "score": "0.5784986", "text": "function eliminar_Productos(){\n $conexion = Conexion(); \n $sql = \"DELETE FROM tbl_productos WHERE sku = '$this->sku';\"; \n $conexion->query($sql);\n echo\"<script type=\\\"text/javascript\\\">alert('producto Eliminado'); window.location='../Vista/Productos.php'; </script>\";\n }", "title": "" }, { "docid": "dcd90997de393712997e92677b28715d", "score": "0.5783485", "text": "function eliminar(){\n\t\tif ($this->input->is_ajax_request()) {\n\t\t\t$id = $this->input->post(\"idempleado\");\n\t\t\t$this->Model_empleado->deleteEmpleado($id);\n\t\t}\n\t\t/*$datos = $this->input->post();\n\t\tif (isset($datos)) {\n\t\t$this->Model_empleado->deleteEmpleado($datos[\"idempleado\"]);\n\t\tredirect(base_url('empleados'));\n\t\t}*/\n\t}", "title": "" }, { "docid": "f7812164d349a76cf7e697f4f4bcad2e", "score": "0.57766664", "text": "public function eliminar_cliente() {\n\t\n/// <summary> \n/// Sirve para eliminar un cliente dado los parametros otrogados y recarga la lista clientes\n/// </summary> \t\n\t\t\n\t\t$data['id'] = $this->uri->segment(3);\n\t\t$data['cliente'] = $this->Cliente_model->eliminarCliente($data['id']);\n\t\t$this->load->helper('url');\n redirect('administrador/lista_clientes','refresh');\n\t}", "title": "" }, { "docid": "584808841243ed799d0024f256b0f0e3", "score": "0.5773554", "text": "function delete() {\n\t\t\t\t// DARI CONTROLLER\n\t\t\t\t// MENANGKAP NILAI NIK\n\t\t\t\t$nip\t\t\t= $_GET['nip'];\n\n\t\t\t\t$data = $this->pegawai->dataDelete($nip);\n\t\t\t\n\t\t\t\t/// DARI VIEW\n\t\t\t\t// MENGARAHKAN KE FILE VIEW/SELECT.PHP\n\t\t\t\t// JIKA HASIL PROSES DELETE BERHASIL\n\t\t\t\tif($data \t\t== TRUE) {\n\t\t\t\t\techo \"<script> \n\t\t\t\t\t\t window.location = 'index.php?controller=pegawai&method=select'; \n\t\t\t\t\t\t </script>\";\n\t\t\t\t\n\t\t\t\t} \n\t\t\t\t// MENGARAHKAN KE FILE VIEW/SELECT.PHP\n\t\t\t\t// JIKA HASIL PROSES DELETE GAGAL\n\t\t\t\telse {\n\t\t\t\t\techo \"<script>\n\t\t\t\t\t\t\talert('Proses Delete Gagal!'); \n\t\t\t\t\t\t window.location = 'index.php?controller=pegawai&method=select'; \n\t\t\t\t\t\t </script>\";\n\t\t\t\t}\n\t\t\t}", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "d3175ffb79c2165b3c36051acad5bdfd", "score": "0.0", "text": "public function update($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70568657", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "fc2720c817b984c257395f2aea7fba5c", "score": "0.6663445", "text": "public function update(Request $request, Resource $resource) {\n $data = $request->all();\n\n DB::transaction(function() use ($resource, $data) {\n Resource::find($resource->id)->update($data);\n });\n\n return redirect()->route('resource.index')->with('message', 'updating ok!');\n }", "title": "" }, { "docid": "c9d6b203d06123d9b08923c31e92bcaa", "score": "0.6613237", "text": "public function update(ResourceCreateRequest $request, Resource $resource)\n {\n if($resource->update($request->all()))\n {\n if ($request->hasFile('document')) {\n if(!empty($resource->document))\n {\n Storage::delete($resource->file);\n }\n $file = $request->document;\n $path = Storage::putFile('files/resources', $file);\n $resource->file = $path;\n $resource->save();\n }\n SweetAlert::success('Resource updated successfully', 'Resource Updated');\n }\n else\n {\n SweetAlert::error('Resource was not updated. Please correct your errors.', 'Oops!');\n return back();\n }\n return redirect('admin/resources');\n }", "title": "" }, { "docid": "7781196723789b64ec73cb4611e47f59", "score": "0.63969046", "text": "public function update($resource, $data = [])\n {\n if (is_array($data) && count($data) > 0) {\n $resource->fill($data);\n }\n\n $this->save($resource);\n\n return $resource;\n }", "title": "" }, { "docid": "0f032798d0e9c8e58a362a900a5df9d1", "score": "0.6362892", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'file' => 'required|max:2048',\n ]);\n\n $resources = Resources::find($id);\n\n if ($request->file()) {\n if ($resources->file != null) {\n unlink(public_path('' . $resources->file));\n }\n $fileName = time() . '_' . $request->file->getClientOriginalName();\n $filePath = $request->file('file')->storeAs('uploads', $fileName, 'public');\n $resources->file = '/storage/' . $filePath;\n } else {\n $resources->file = $resources->file;\n }\n $resources->title = $request->title;\n $update = $resources->save();\n if ($update) {\n return redirect()->route('resources.index');\n }\n }", "title": "" }, { "docid": "c36ab864eb8fe4e400b9bf654b24e104", "score": "0.6335197", "text": "public function updateStream($path, $resource, array $config = []);", "title": "" }, { "docid": "661eb6b724ed05cb34396082c333f011", "score": "0.6320559", "text": "public static function updateResource($path, $object, $resource = 'Resource')\n {\n if (is_array($object)) {\n $object = (object)$object;\n }\n \n $response = static::connection()->put(self::$api_path . $path, $object);\n \n return static::mapResource($resource, $response);\n }", "title": "" }, { "docid": "9ca5c8e9d8ce78bffbc615b16cc99a78", "score": "0.6315201", "text": "public function update(Request $request, Storage $storage)\n {\n $storage->update($request->all());\n return redirect()->route('shop.admin.storage.index.index');\n }", "title": "" }, { "docid": "11263a6537e0c7bea161f6d78a549cad", "score": "0.62384427", "text": "public function updateStream($path, $resource, Config $config);", "title": "" }, { "docid": "6409a18ba9f053100e088a1e3c95194e", "score": "0.61485934", "text": "public static function updateResource($path, $object = [])\n {\n if (is_array($object)) {\n $object = (object)$object;\n }\n\n return self::connection()->put(self::$api_path . $path, $object);\n }", "title": "" }, { "docid": "06dbf067b27a256f126060eaefd566f3", "score": "0.61347073", "text": "public function update($resourceId)\n {\n $exception = new Exception(\"CRUD0103\", __METHOD__);\n $exception->setHttpStatus(\"405\", \"You cannot update a family\");\n throw $exception;\n }", "title": "" }, { "docid": "285e7bad0931f662ad89d1b79ea0d179", "score": "0.60694486", "text": "public function update($resource, $data)\n {\n $json = false;\n $fs = unserialize($_SESSION['fs'][$this->getRoot()], ['allowed_classes' => false]);\n\n if (array_key_exists($resource, $fs)) {\n $fs[$resource]['name'] = $data->name;\n $fs[$resource]['mode'] = $data->mod;\n $fs[$resource]['parId'] = $data->parId;\n\n $_SESSION['fs'][$this->getRoot()] = serialize($fs);\n $json = json_encode($fs[$resource]);\n $json = preg_replace('/\"([\\d]+)\"/', '$1', $json);\n }\n\n return $json;\n }", "title": "" }, { "docid": "ebaac64c658e84ae50d01d89f70f8647", "score": "0.60265565", "text": "public function update(Request $request, $id)\n {\n //\n $action_code = 'storage_update';\n $message = usercan($action_code, Auth::user());\n if ($message) {\n return redirect()->back()->with('message', $message);\n } \n //Actual code to execute\n //Receives and updates new shop data\n $input = $request->all();\n //make sure the description is unique but \n //exclude the $id for the current shop\n $this->validate($request, [\n 'description' => 'required|unique:storages,description,'.$id.'id'\n ]);\n\n $storage = Storage::find($id);\n $storage->update($input);\n return redirect()->route('storages.index');\n }", "title": "" }, { "docid": "506be2b48359677c26ead5a3ed3a5bdb", "score": "0.60216236", "text": "public function update(Request $request, $id)\n {\n \n // Resource fields validation\n $this->validate($request,[\n\n 'category' => 'required',\n 'title' => 'required',\n 'file_type' => 'required',\n ]);\n\n\n // File upload\n if($request->hasFile('resource')){\n $filenameWithExt = $request->file('resource')->getClientOriginalName();\n \n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME); \n $extension = $request->file('resource')->getClientOriginalExtension();\n $fileNameToStore = $filename.'_'.time().'.'.$extension;\n\n $path = $request->file('resource')->move('uploads/images/resource', $fileNameToStore);\n\n\n // Delete Old File if New File Uploaded\n $files = DB::table('KOSM_RESOURCE')\n ->select('KOSM_RESOURCE.*')\n ->where('RESOURCE_ID', $id)\n ->get();\n\n foreach ($files as $file) {\n\n File::delete('uploads/images/resource/'.$file->RESOURCE_FILE_PATH);\n }\n\n\n\t\t\t// Update Database\n $update = DB::table('KOSM_RESOURCE')\n ->where('RESOURCE_ID', $id)\n ->update([\n 'RESOURCE_CATEGORY_ID' => $request->get('category'), \n 'PROGRAM_ID' => $request->get('program'),\n 'RESOURCE_NAME' => $request->get('title'), \n 'RESOURCE_DESC' => $request->get('content'), \n 'RESOURCE_FILE_TYPE' => $request->get('file_type'), \n 'ACTIVE_STATUS' => '1', \n 'RESOURCE_FILE_PATH' => $fileNameToStore,\n 'UPDATED_BY' => Auth::user()->USER_ID, // should be auth user\n 'UPDATE_TIMESTAMP' => Carbon::now()\n ]);\n }\n else{\n \n\t\t\t// Update Database\n $update = DB::table('KOSM_RESOURCE')\n ->where('RESOURCE_ID', $id)\n ->update([\n 'RESOURCE_CATEGORY_ID' => $request->get('category'), \n 'PROGRAM_ID' => $request->get('program'),\n 'RESOURCE_NAME' => $request->get('title'), \n 'RESOURCE_DESC' => $request->get('content'), \n 'RESOURCE_FILE_TYPE' => $request->get('file_type'), \n 'ACTIVE_STATUS' => '1', \n 'UPDATED_BY' => Auth::user()->USER_ID, // should be auth user\n 'UPDATE_TIMESTAMP' => Carbon::now()\n ]);\n }\n\n\n $resource_details = DB::table('KOSM_RESOURCE')\n ->join('KOSM_RESOURCE_CATEGORY', 'KOSM_RESOURCE.RESOURCE_CATEGORY_ID', 'KOSM_RESOURCE_CATEGORY.RESOURCE_CATEGORY_ID')\n ->join('KOSM_PROGRAM', 'KOSM_RESOURCE.PROGRAM_ID', 'KOSM_PROGRAM.PROGRAM_ID')\n ->select('KOSM_RESOURCE.*','KOSM_RESOURCE_CATEGORY.RESOURCE_CATEGORY_ID', 'KOSM_RESOURCE_CATEGORY.CATEGORY_NAME', 'KOSM_PROGRAM.PROGRAM_ID', 'KOSM_PROGRAM.PROGRAM_NAME')\n ->where('KOSM_RESOURCE.RESOURCE_ID',$id)\n -> get();\n\n\n return view('dashbord_resource_view')->with('status','Resource Updated Successfully')->with('resource_details',$resource_details);\n \n }", "title": "" }, { "docid": "46879e0b88cc7ad82dae92a140a81e62", "score": "0.59821016", "text": "public function update(Request $request, $id)\n {\n //\n $resource = \\App\\Resource::find($id);\n $resource->name = $request->name;\n $resource->description = $request->description;\n $resource->cost = $request->cost;\n\n $resource->save();\n }", "title": "" }, { "docid": "67ec547e30d9bf4d3f1912067759b832", "score": "0.59161115", "text": "public function update(Request $request, $id)\n {\n\n $resource = Resource::find($id);\n $resource->resourceName = $request->input('rname');\n $resource->type = $request->input('type');\n $resource->meterial = $request->input('meterial');\n $resource->max = $request->input('max');\n $resource->rate = $request->input('rate');\n $resource->ovt = $request->input('ovt');\n $resource->cost = $request->input('cost');\n $resource->save();\n return redirect('/dash/resource');\n }", "title": "" }, { "docid": "6ef8c4963f1441fe2abdd1d40d6894f0", "score": "0.5912172", "text": "public function update(Request $request, Qualification $resource)\n {\n $validator = validator($request->all(), [\n \"name\" => \"required|unique:qualifications,name,\".$request->id,\n ]); \n if ($validator->fails()) {\n return responseJson(0, $validator->errors()->first(), \"\");\n }\n try {\n $resource->update($request->all()); \n watch(\"edit qualification \" . $resource->name, \"fa fa-graduation-cap\");\n return responseJson(1, __('done'), $resource);\n } catch (\\Exception $th) {\n return responseJson(0, $th->getMessage()); \n }\n }", "title": "" }, { "docid": "7aeaf7a9215ac5029402d42bb31bd050", "score": "0.5907039", "text": "public function save($resource)\n {\n $attributes = $resource->getDirty();\n\n if (!empty($attributes)) {\n $resource->save();\n }\n else {\n $resource->touch();\n }\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5893703", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ff07e39754f41c744fcccca8e8b46d5e", "score": "0.5856624", "text": "public function update(HCResourceRequest $request, string $id): JsonResponse\n {\n /** @var HCResource $record */\n $record = $this->service->getRepository()->findOneBy(['id' => $id]);\n $record->update($request->getRecordData());\n $record->updateTranslations($request->getTranslations());\n $record->tags()->sync($request->getTags($this->resourceTagService->getRepository()));\n\n if ($record) {\n $record = $this->service->getRepository()->find($id);\n\n event(new HCResourceUpdated($record));\n }\n\n return $this->response->success('Updated', $record);\n }", "title": "" }, { "docid": "669b7ddba169492210e08b01f00468cc", "score": "0.58469194", "text": "public function put($data) {}", "title": "" }, { "docid": "6ea074f31f9f60102c9794f820ef4022", "score": "0.5836536", "text": "public function updateStream($path, $resource, \\League\\Flysystem\\Config $config) {\n\t\t\treturn $this->write($path, $resource, $config);\n\t\t}", "title": "" }, { "docid": "9b56bc7994357f250ca341a17f3d507e", "score": "0.5833223", "text": "public function updateStream($path, $resource, Config $config)\n {\n // TODO: Implement updateStream() method.\n }", "title": "" }, { "docid": "05110fc36adbe68898d1b2c053518df3", "score": "0.5827135", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::find($id);\n if($product->name == $request->name){\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'description' => 'required|max:500',\n 'item' => 'required|integer',\n 'price' => 'required|numeric',\n 'discount' => 'sometimes|integer',\n 'image' => 'required|image'\n ]);\n } else {\n $this->validate($request, [\n 'name' => 'required|max:255|unique:products,name',\n 'description' => 'required|max:500',\n 'item' => 'required|integer',\n 'price' => 'required|numeric',\n 'discount' => 'sometimes|integer',\n 'image' => 'required|image'\n ]);\n }\n \n \n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->discount = $request->discount;\n $product->item_id = $request->item;\n\n $oldImage = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image');\n $filename = strtolower($request->name) . '.' . $image->getClientOriginalExtension();\n\n $location = storage_path($filename);\n Storage::disk('local')->put('public/products/'.$filename, File::get($image));\n\n Storage::delete('public/product/'.$oldImage);\n\n $product->image = $filename;\n }\n\n $product->save();\n\n session()->flash('success', 'Stock Product has been created successfully!');\n return redirect()->back();\n }", "title": "" }, { "docid": "c016f684e585c1569cabe89ee9d8d292", "score": "0.58267677", "text": "public function update(ResourceInterface $resource)\n\t{\n $response = Redirect::back();\n $errors = new MessageBag();\n\n if(Auth::user()->can('edit',$resource)) {\n $resource->setName(Input::get('container'));\n if( $this->repository->save($resource) ) {\n $response->with('success', trans('roles::privlege.edit success'));\n } else {\n $errors->add('message', trans('roles::resource.edit failed'));\n }\n } else {\n $errors->add('error', trans('roles::resource.edit permission denied'));\n }\n\n $response->withErrors($errors);\n\n return $response;\n\t}", "title": "" }, { "docid": "12ace39fce04e22e2d2a8de85ad40de4", "score": "0.5807032", "text": "public function update(Request $request, $id)\n {\n $update = Projects::find($id); \n Storage::disk('public')->delete('img/'.$update->src);\n $update->src = $request->file('src')->hashName();\n $update->nom = $request->nom; \n $update->description = $request->description; \n $update->tags = $request->tags; \n\n $update->save(); \n $request->file('src')->storePublicly('img', 'public');\n\n return redirect()->back(); \n\n }", "title": "" }, { "docid": "d37e88ab74b407c61e3c69f469185f13", "score": "0.57959884", "text": "public function put() {\n $data = json_decode(file_get_contents(\"php://input\"), true);\n if (isset($data[\"id\"])) {\n $id = $data[\"id\"];\n $object = $this->service->get($id);\n if (is_null($object)) {\n GenericEndpoint::sendResponse(Constants::STATUS_CODE_200_OK, true, \"Object not found. No updates were made.\");\n } else {\n $object->fromMap($data);\n $this->service->update($object);\n GenericEndpoint::sendResponse(Constants::STATUS_CODE_200_OK, true, \"Updated.\", array(\"object\" => $object->toMap()));\n }\n } else {\n GenericEndpoint::sendResponse(Constants::STATUS_CODE_400_BAD_REQUEST, false, \"Missing the parameter ID.\");\n }\n }", "title": "" }, { "docid": "9ca2aec8f4f0753f5e35663545aacb10", "score": "0.5791258", "text": "public function update(PermissionStoreRequest $request, $id)\n {\n$Permission=Permission::get()->where('id',$id)->first();\n if($Permission->update($request->toArray())) {\n return new PermissionResource($Permission);\n }\n }", "title": "" }, { "docid": "076bffe17c1e45c18906caec71663984", "score": "0.57741183", "text": "public function put($resource, $id, $request, $response)\n {\n\t\t$DOName = $this->getDOName($resource);\n\t\tif (empty($DOName)) {\n\t\t\t$response->status(404);\n\t\t\t$response->body(\"Resource '$resource' is not found.\");\n\t\t\treturn;\n\t\t}\n\t\t$dataObj = BizSystem::getObject($DOName);\n\t\t$rec = $dataObj->fetchById($id);\n\t\tif (empty($rec)) {\n\t\t\t$response->status(400);\n\t\t\t$response->body(\"No data is found for $resource $id\");\n\t\t\treturn;\n\t\t}\n\t\t$dataRec = new DataRecord($rec, $dataObj);\n\t\t$inputRecord = json_decode($request->getBody());\n foreach ($inputRecord as $k => $v) {\n $dataRec[$k] = $v; // or $dataRec->$k = $v;\n\t\t}\n try {\n $dataRec->save();\n }\n catch (ValidationException $e) {\n $response->status(400);\n\t\t\t$errmsg = implode(\"\\n\",$e->m_Errors);\n\t\t\t$response->body($errmsg);\n\t\t\treturn;\n }\n catch (BDOException $e) {\n $response->status(400);\n\t\t\t$response->body($e->getMessage());\n\t\t\treturn;\n }\n\t\t\n\t\t$format = strtolower($request->params('format'));\n\t\t\n\t\t$response->status(200);\n\t\t$message = \"Successfully updated record of $resource $id\";\n\t\tif ($format == 'json') {\n\t\t\t$response['Content-Type'] = 'application/json';\n\t\t\t$response->body($message);\n\t\t}\n\t\telse {\n\t\t\t$response['Content-Type'] = \"text/xml; charset=utf-8\"; \n\t\t\t$response->body($message);\n\t\t}\n\t\treturn;\n }", "title": "" }, { "docid": "e0c2f12a0ad5a322c0fd075b209d0145", "score": "0.5771572", "text": "public function update(Request $request, $idx_storage)\n {\n $this->Storage->updatedata($request,$idx_storage);\n return redirect()->back();\n }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.5750728", "text": "public function update($entity);", "title": "" }, { "docid": "fe0e2729472f0471308979dce034251f", "score": "0.57444125", "text": "public function updateStorage($id) {\n\n\t\t$lagerobil = Storage::find($id);\n\t\treturn view('system/updatestorage', compact('lagerobil'));\n\t}", "title": "" }, { "docid": "5249ab9450bba5363a3ff6da7b2a7d65", "score": "0.57374513", "text": "public function update()\n {\n try {\n return $this->objectStorage->update($this);\n } catch (Exception $e) {\n $this->objectStorage->reloadAuthenticationData();\n return $this->objectStorage->update($this);\n }\n }", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.5736541", "text": "public function setResource($resource);", "title": "" }, { "docid": "68611877d8742448025a8506ebac8d13", "score": "0.5723664", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.569013", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.569013", "text": "public function update($object);", "title": "" }, { "docid": "0172d6613b8a8695d2b12022c56dc08d", "score": "0.5689887", "text": "public function update($id, Request $request) {\n $this->validate($request, isset($this->model->rules_update) ? $this->model->rules_update : $this->model->rules);\n\n ${$this->resource} = $this->model->findOrFail($id);\n\n $fillable_data = array_only($request->all(), $this->model->getFillable());\n\n if ($request->password) {\n $fillable_data['password'] = bcrypt($request->password);\n }\n\n App::setLocale(Helpers::getLang());\n\n ${$this->resource}->update($fillable_data);\n\n Admin::handleFileUpload('image', ${$this->resource}, 'image');\n\n return Redirect::route($this->view_path . '.index')->with('success', 'yeah');\n }", "title": "" }, { "docid": "a369bb70101af706cb2fcae703b7f3fe", "score": "0.56861293", "text": "public function update(Request $request, Resources $resources)\n {\n //\n }", "title": "" }, { "docid": "34d891616662eb4b771248f3c460bacd", "score": "0.56782675", "text": "public function update($id, Request $request)\n {\n $data = $this->getData($request);\n try {\n ServiceProvider::validateServiceProvider($request);\n\n $resource = Resource::findOrFail($id);\n $resource->update($data);\n if (isset($data['services'])) {\n $resource->services()->sync($data['services']);\n } else {\n $resource->services()->sync([]);\n }\n $log = new Log();\n $log->record('UPDATE', 'resource', $resource->id, $resource);\n return redirect()->route('office.index')\n ->with('success_message', 'Resource was successfully updated!');\n\n } catch (Exception $exception) {\n\n return back()->withInput()\n ->withErrors(['unexpected_error' => $exception->getMessage()]);\n }\n }", "title": "" }, { "docid": "8869fb6ad9a237978ea1c1f2f09bc13f", "score": "0.56760776", "text": "public function update(Request $request, Hizmet $hizmet,$id)\n {\n $data = Hizmet::find($id);\n $data->title = $request->input('title');\n $data->keywords = $request->input('keywords');\n $data->description = $request->input('description');\n $data->slug = $request->input('slug');\n $data->status = $request->input('status');\n $data->category_id= $request->input('category_id');\n $data->price= $request->input('price');\n $data->detail= $request->input('detail');\n if($request->file('image')!=null)\n {\n $data->image = Storage::putFile('images', $request->file('image'));//File Update\n }\n $data->save();\n return redirect()->route('admin_hizmetler');\n }", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5672888", "text": "public function update($data);", "title": "" }, { "docid": "720b5dfc78089b3c20a286f9b096340e", "score": "0.5658022", "text": "public function update(Request $request, $id)\n {\n \n $requestData = $request->all();\n if ($request->hasFile('photo')) {\n $requestData['photo'] = $request->file('photo')\n ->store('storage/uploads', 'public'); \n }\n\n $product = Product::findOrFail($id);\n $product->update($requestData);\n $category = Category::all(['id', 'category']);\n\n if (\\Auth::user()->role == 'admin') {\n return redirect('admin/stock')->with('flash_message', 'Product updated!');\n // or return route('routename');\n }\n \n return redirect('product')->with('flash_message', 'Product updated!');\n }", "title": "" }, { "docid": "8ade7edbd848cff62fa6b5544e87b51a", "score": "0.5656589", "text": "public function update()\n {\n return $this->client->requestWithResource($this, 'PUT', '', [\n 'headers' => ['X-Contentful-Version' => $this->getSystemProperties()->getVersion()],\n 'body' => $this->asRequestBody(),\n ]);\n }", "title": "" }, { "docid": "9e83f94d48c6e1e5960a24d14717222b", "score": "0.5654572", "text": "public function updateStream($path, $resource, Config $config)\n {\n $resource = $this->getSeekableStream($resource);\n $this->scanStream($resource, $path);\n return $this->backingAdapter->updateStream($path, $resource, $config);\n }", "title": "" }, { "docid": "7fb409b5b5066a88aa6f18544c1b53c1", "score": "0.5631075", "text": "public function update(Request $request, $id)\n {\n\n $this->validate($request, [\n 'name' => ['required', 'max:255'],\n 'description' => 'required',\n 'price' => ['required', 'numeric'],\n 'graduation' => ['required', 'numeric'],\n 'origin' => 'required',\n 'year' => ['required', 'integer'],\n 'volume' => ['required', 'numeric'],\n 'brand_id' => 'required',\n 'category_id' => 'required',\n 'stock' => ['required', 'integer'],\n 'image' => ['image', 'nullable']\n ], [\n 'required' => 'El campo :attribute es obligatorio',\n 'image' => 'Solo se admiten imagenes en formatos apropiados',\n 'numeric' => 'El campo :attribute debe ser numerico',\n 'integer' => 'el campo :attribute debe ser un entero',\n 'max' => 'El campo :attribute supera el maximo',\n ]);\n\n\n if ($request['image']) {\n\n $route = $request['image']->store('/public/images/Products');\n\n Product::find($id)->update([\n 'name' => $request->name,\n 'description' => $request->description,\n 'price' => $request->price,\n 'graduation' => $request->graduation,\n 'origin' => $request->origin,\n 'year' => $request->year,\n 'volume' => $request->volume,\n 'brand_id' => $request->brand_id,\n 'category_id' => $request->category_id,\n 'stock' => $request->stock,\n 'user_id' => $request->user_id,\n 'image' => basename($route)\n ]);\n } else {\n Product::find($id)->update([\n 'name' => $request->name,\n 'description' => $request->description,\n 'price' => $request->price,\n 'graduation' => $request->graduation,\n 'origin' => $request->origin,\n 'year' => $request->year,\n 'volume' => $request->volume,\n 'brand_id' => $request->brand_id,\n 'category_id' => $request->category_id,\n 'stock' => $request->stock,\n 'user_id' => $request->user_id\n ]);\n }\n\n $notify = notify()->success('Producto actualizado exitosamente', 'Felicitaciones', [\"closeButton\" => true, \"positionClass\" => \"toast-bottom-right\"]);\n\n return redirect()->route('users.edit', Auth::user()->id)->with($notify);\n }", "title": "" }, { "docid": "bc13604997c59c76687cad4994f40095", "score": "0.5621285", "text": "public static function updateResource($resource, $fields, $input)\n\t{\n\t\t$input = InputUtils::nullifyDefaults($input);\n\n\t\tforeach ($fields as $field) {\n\t\t\t$resource->$field = $input[$field];\n\t\t}\n\n\t\treturn $resource->save();\n\t}", "title": "" }, { "docid": "27406687d0f55c593182aecf764d1664", "score": "0.5619832", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $product->name = $request->inputName;\n $product->description = $request->inputDescription;\n $product->price = $request->inputPrice;\n if ($request->hasFile('image')) {\n $currentImage = $product->image;\n if ($currentImage) {\n Storage::delete('/public/' . $currentImage);\n }\n $image = $request->file('image');\n $path = $image->store('images', 'public');\n $product->image = $path;\n }\n $product->save();\n\n Session::flash('success', 'Update product success');\n return redirect()->route('products.list');\n }", "title": "" }, { "docid": "80daf43ddddea2e7e93ce8de6b0941cf", "score": "0.5617161", "text": "public function update()\n {\n $validator = Validator::make(Input::all(), Product::$rules);\n\n if ($validator->passes()) {\n $product = Product::find(Input::get('id'));\n\n $product->title = Input::get('title');\n $product->category_id = Input::get('category_id');\n $product->description = Input::get('description');\n $product->price = Input::get('price');\n $product->discount = Input::get('discount');\n $product->stock = Input::get('stock');\n $product->availability = Input::get('availability');\n \n $image = Input::file('image');\n if ($image) {\n $filename = date('Y-m-d-H-i-s') . \"-\" . $image->getClientOriginalName();\n $path = public_path('assets/images/products/' . $filename);\n\n // echo dd(is_writable(public_path('assets/images/products')));\n\n Image::make($image->getRealPath())->resize(200, 200)->save($path);\n \n $product->image = 'public/assets/images/products/' . $filename;\n }\n\n $product->save();\n\n return Redirect::back()\n -> withInput()\n -> with('message', 'Product ' . $product->title . ' updated.');\n }\n\n return Redirect::back()\n -> withInput()\n -> withErrors($validator);\n }", "title": "" }, { "docid": "53557c5325a62b4c66425d9c444650d1", "score": "0.5616488", "text": "public function update(Request $request, $id)\n {\n $resource = Resource::find($id);\n if (is_null($resource) || ($request->user()->id != $resource->author_id)) {\n return redirect()->route('resources.create');\n }\n $this->validate($request, Resource::getValidationRules());\n Resource::find($id)->update($request->all());\n return redirect()->route(\n 'resources.show',\n ['id' => $resource->id]\n );\n }", "title": "" }, { "docid": "b58be573e834c0f5153d7aecec3b4b8a", "score": "0.5601655", "text": "public function frontUpdate($id, Request $request)\n {\n $this->validate($request, Resource::rules());\n\n $unit = Unit::first();\n $resource = Resource::findOrFail($id);\n $resource->update($request->only('category_id', 'title'));\n\n // Address.\n $resource->address()->update($request->only(\n 'lat',\n 'lng',\n 'address',\n 'country_id',\n 'city_id'\n ));\n\n // Update base price.\n $resource->basePrice()->update($request->only('price', 'description'));\n\n // Create extra prices.\n if ($request->has('prices')) {\n $resource->extras()->delete();\n $this->addExtras($resource, $unit->id, $request->prices, $request->descriptions);\n }\n\n // Update features.\n if ($request->has('features')) {\n $resource->acquiredFeatures()->delete();\n $this->addFeatures($resource, $request->get('features'));\n }\n\n // Update cover photo.\n if ($request->hasFile('cover')) {\n if ($resource->photos()->whereCover(1)->first()) {\n $resource->photos()->whereCover(1)->first()->update(['cover' => 0]);\n }\n $this->addCover($resource, $request->file('cover'));\n }\n\n // Upload photos.\n if ($request->has('photos')) {\n $this->addPhotos($resource, $request->photos);\n }\n\n // Update availabilities.\n // Unavailable dates.\n if ($request->has('unavailableDates')) {\n $resource->availabilities()->whereType('unavailable')->delete();\n $this->setUnavailableDates($resource, $request->unavailableDates);\n }\n // Seasonal dates.\n if (count($request->get('from'))) {\n foreach ($resource->availabilities()->whereType('seasonal')->get() as $key => $avail) {\n $avail->seasonalPrice()->delete();\n $avail->delete();\n }\n $this->setAvailabilities(\n $resource,\n $request->get('from'),\n $request->get('to'),\n $request->get('seasonalPrice'),\n $unit->id\n );\n }\n\n return redirect('/resources')->with([\n 'success' => true,\n 'message' => 'Resource updated successfully'\n ]);\n }", "title": "" }, { "docid": "c9439863442183b5f606f02e1a5c0717", "score": "0.5582026", "text": "public function update($id, UpdateResourcesRequest $request)\n\t{\n\t\t$resources = $this->resourcesRepository->find($id);\n\n\t\tif(empty($resources))\n\t\t{\n\t\t\tFlash::error('Resources not found');\n\n\t\t\treturn redirect(route('resources.index'));\n\t\t}\n\n\t\t$input = $request->all();\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\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$this->resourcesRepository->updateRich($input, $id);\n\n\t\tFlash::success('Resources updated successfully.');\n\n\t\treturn redirect(route('resources.index'));\n\t}", "title": "" }, { "docid": "fc66fdd0dd96d318df58b9133de6559f", "score": "0.55720156", "text": "public function put(){}", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55670804", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55670804", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "41d37236a63f352c2aba4e6b5a99b2ae", "score": "0.556645", "text": "public function update(Request $request, $id)\n {\n if (auth()->user()->role->name == 'super admin') {\n $store = Store::find($id);\n\n if ($request->file('image')) {\n $filename = $this->globalclass->storeS3($request->file('image'), 'construction/store');\n $area = AreaThree::where('id', $request->area_three_id)->first();\n $store->update($request->except('image', 'area_two_id', 'area_one_id') + ['image' => $filename, 'area_one_id' => $area->area_one_id, 'area_two_id' => $area->area_two_id]);\n } else {\n\n $area = AreaThree::where('id', $request->area_three_id)->first();\n $store->update($request->except('area_two_id', 'area_one_id') + ['area_one_id' => $area->area_one_id, 'area_two_id' => $area->area_two_id]);\n }\n }\n return redirect()->route('stores.index');\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5558505", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5558505", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5558505", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.5558505", "text": "public function update($id, $data);", "title": "" }, { "docid": "fdbebe9cda7c0f7fac217e48d4a77fa4", "score": "0.55415195", "text": "public function update()\n {\n if(!isset($this->id))\n {\n throw new Exception(\"An object must exist in order to update it\");\n }\n $resp = self::call(static::$classUrl.'/'.$this->id, 'PUT', array(static::$classHandle => $this));\n $this->refresh($resp->{static::$classHandle});\n return $resp;\n }", "title": "" }, { "docid": "999651eff692b675afb82a78e9e83de9", "score": "0.5539115", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'description' => 'required'\n ]);\n $product = Product::find($id);\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n if ($request->input('rate') == '') {\n $product->rate = 0;\n } else {\n $product->rate = $request->input('rate');\n }\n $product->user_id = auth()->user()->id;\n\n if($request->hasFile('image')){\n $filenameWithExt = $request->file('image')->getClientOriginalName();\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n $extension = $request->file('image')->getClientOriginalExtension();\n $fileNameToStore = $filename.'_'.time().\".\".$extension;\n $path = $request->file('image')->storeAs('public/images', $fileNameToStore);\n $product->image = $fileNameToStore;\n }\n $product->save();\n return redirect('/products/'.$product->id)->with('success','Updated Successfully!!');\n }", "title": "" }, { "docid": "69cf4ebf2f81efee82842cf7faf08ad9", "score": "0.55336887", "text": "public function update(Request $request, $id)\n {\n $data = $request->all();\n $resource = Resource::with('category')->find($id);\n $resource->update($data);\n $resource->save();\n $resource->refresh();\n return response()->json(['message'=> 'Resource Updated Successfully','resource'=>$resource], 200);\n }", "title": "" }, { "docid": "e8f550f5481203c0e031c61be8e0224d", "score": "0.552845", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n if(!$product) throw new ModelNotFoundException;\n $product->fill($request->all());\n if($request->hasFile('img_default')) {\n // if(file_exists($product->img_default)) {\n // Storage::delete($product->img_default);\n // }\n $path = Storage::putFile('public/products', $request->file('img_default'));\n $product->img_default = str_replace('public/', '', $path);\n // $request->file('img_default')->move(public_path('/storage/products'), $product->code.'.jpg');\n // $product->img_default = 'products/'.$product->code.'.jpg';\n }\n $product->save();\n\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "54e222c65bb8a8636c7b63d18062c9fd", "score": "0.55261356", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'title' => 'required',\n 'description' => 'required',\n ]);\n\n Product::findOrFail($id)->update([\n 'title' => $request->title,\n 'description' => $request->description,\n ]);\n // Get photo name from databse\n $getcurrentphoto = Product::find($request->id)->photo;\n // If Current photo Will not do anything \n if($request->photo != $getcurrentphoto) {\n if($getcurrentphoto != 'default.png') {\n $delete_old_photo = base_path('public/uploads/product/' . $getcurrentphoto);\n unlink($delete_old_photo);\n }\n\n $getphoto = $request->photo;\n $image_parts = explode(\";base64,\", $getphoto);\n $image_type_aux = explode(\"image/\", $image_parts[0]);\n $image_type = $image_type_aux[1];\n $filename = $id . '.' . $image_type;\n Image::make($getphoto)->save(base_path('public/uploads/product/' . $filename), 90);\n // Save image file id name \n Product::findOrFail($id)->update([\n 'photo' => $filename,\n ]);\n }\n \n }", "title": "" }, { "docid": "4682e6d7cbf9d9105c4c3d7041ce4717", "score": "0.552252", "text": "public function update(Request $request, $id)\n {\n $user=User::find($id);\n if(! is_null($request->file('img_url'))){\n $img = $request->file('img_url');\n $file_route = time().'_'.$img->getClientOriginalName();\n Storage::disk('user')->put($file_route, file_get_contents( $img->getRealPath() ));\n Storage::disk('user')->delete($user->img_url);\n }\n\n else $file_route=$user->img_url;\n\n $user->name= $request->name;\n $user->email= $request->email;\n $user->img_url= $file_route;\n\n $user->update(); \n \n return redirect()->action('UsersController@index'); \n }", "title": "" }, { "docid": "6cab98cc9d679195c1bfc5f8b6821e3f", "score": "0.55126965", "text": "public function update(ProductPut $request, $_product_id) {\n $product_id = hash_decode($_product_id);\n if(!$product_id) {\n return back()->with('alert-danger', trans('product::product.invalid'));\n }\n $cover = $request->file('cover');\n\n $product = Product::find($product_id, [ 'id']);\n if(!$product) {\n return back()->with('alert-danger', trans('product.not.found'));\n }\n if($cover) {\n $_company_id = hash_encode(Auth::user()->company_id);\n $disk = Storage::disk('qiniu');\n $dir = \"{$_company_id}/product/cover\";\n $cover_url = $disk->put($dir, $cover);\n $product->cover = $cover_url;\n }\n $product->unit = $request->input('unit');\n $product->introduce = $request->input('intro', 0);\n $product->name = $request->input('name');\n $product->price = $request->input('price', 0);\n $product->old_price = $request->input('old_price', 0);\n if($product->save()) {\n \n return redirect()->route('product.product.list')->with('alert-success', trans('main.success'));\n } else {\n return back()->with('alert-danger', trans('main.operate.invalid'));\n }\n }", "title": "" }, { "docid": "23a57cf71fed7e7ad93e49d195fda86f", "score": "0.5511947", "text": "public function update(Product $product);", "title": "" }, { "docid": "af083c1effa4c92e4149fb07c4144240", "score": "0.5510473", "text": "public function update(Request $request, $id)\n {\n\n $art = Art::find($id);\n $imagePathRaw = explode('/', $art->image_url);\n $imagePath = $imagePathRaw[array_key_last($imagePathRaw)];\n\n $image = $request->file('file');\n\n if($image != '')\n {\n $request->validate([\n 'file' => 'image|max:2048',\n 'title' => 'required',\n 'description' => 'required',\n ]);\n\n # Удаляем старую картинку\n Storage::disk('public')\n ->delete($art->image_url);\n\n $imagePath = $image->storeAs('my-arts', $imagePath, 'public');\n\n }\n else\n {\n $request->validate([\n 'title' => 'required',\n 'description' => 'required'\n ]);\n }\n $formData = array(\n 'title' => $request->title,\n 'description' => $request->description,\n 'image_url' => $imagePath\n );\n\n #Обновляем запись в бд\n $art->update($formData);\n\n return redirect()\n ->route('admin.arts.index');\n\n }", "title": "" }, { "docid": "2dcf368af0a0b1784b9e9fd0b9db9945", "score": "0.5507702", "text": "public function update(Request $request,$id)\n {\n $article = Article::find($id);\n\n $img_name = time(). '.' .$request->image->getClientOriginalExtension();\n $article->news = request('news');\n $article->article = request('article');\n $article->image = $img_name;\n\n $article->save();\n\n\n $request->image->move(public_path('storage'),$img_name);\n\n $article->save();\n\n return redirect(route('display'));\n }", "title": "" }, { "docid": "3e2e1c15c3f9cfc55df746418e67a944", "score": "0.5507366", "text": "public function update(ValidateRequest $request, $id)\n {\n $item = Model::updateOrCreate(['id'=>$id],$request->validated());\n return (new Resource($item))\n ->additional(['meta' => [\n 'message' => 'Slider updated',\n ]]);\n ;\n }", "title": "" }, { "docid": "db18dd1a384918f806a17f09b15cc270", "score": "0.5507294", "text": "public function index()\n {\n Storage::put('file.jpg', $resource);\n }", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55067354", "text": "public function update($id, $input);", "title": "" }, { "docid": "880fbeef0429404b72575d4fa7e53068", "score": "0.5500986", "text": "public function update(Request $request, $id)\n {\n if (!$request->has('featured')) { // unfeature resource.\n $request['featured'] = false;\n }\n // Validations.\n // $this->validate($request, Resource::rules()); // tobe back when we add full functionality.\n $this->validate($request, [\n 'category_id' => 'required|integer',\n 'user_id' => 'required|integer',\n 'title' => 'required|string|max:255',\n 'featured' => 'boolean',\n 'address' => 'required|string|max:255',\n 'lat' => 'required|numeric',\n 'lng' => 'required|numeric'\n ]);\n\n $resource = Resource::findOrFail($id);\n $resource->update($request->input());\n\n $resource->address()->update([\n 'address' => $request->address,\n 'lat' => $request->lat,\n 'lng' => $request->lng\n ]);\n\n return redirect()->route('resources.show', $id);\n }", "title": "" }, { "docid": "17f170ad9ba2e20ec03a0c12131f0e27", "score": "0.5496886", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $product->fill([\n 'name' => $request->get('name'),\n 'description' => $request->get('description'),\n 'price' => $request->get('price'),\n ]);\n if ($request->hasFile('image')) {\n $image_url = $request->file('image')->store('public/products');\n $image_url = substr($image_url, 7);\n $product->fill([\n 'image_url' => $image_url\n ]);\n }\n $product->save();\n return redirect()->route('Product.index')->with('message', 'Le produit a bien été modifié !');\n }", "title": "" }, { "docid": "b54d1bdbd730178aa8d22d20c9cb5aea", "score": "0.5496768", "text": "public function update(Request $request, $id)\n {\n //\n $this->validate($request,[\n 'bookTitle'=>'required',\n 'bookAuthor'=>'required',\n 'bookPublisher'=>'required',\n 'bookReference'=>'required',\n 'bookDescription'=>'required',\n 'bookSupply'=>'required',\n 'bookImage'=>'image|nullable|max:1999'\n ]);\n\n if($request->hasfile('bookImage')){\n\n $filenamewithtext=$request->file('bookImage')->getClientOriginalName();\n\n $filename=pathinfo($filenamewithtext,PATHINFO_FILENAME);\n\n $extension=$request->file('bookImage')->getClientOriginalExtension();\n\n $filenametostore=$filename.'_'.time().'.'.$extension;\n\n $path=$request->file('bookImage')->storeAs('public/images',$filenametostore);\n \n }else{\n $filenametostore='noname.jpg';\n }\n\n $book=Books::find($id);\n $book->title=$request->input('bookTitle');\n $book->author=$request->input('bookAuthor');\n $book->publisher=$request->input('bookPublisher');\n $book->ref=$request->input('bookReference');\n $book->description=$request->input('bookDescription');\n $book->image=$filenametostore;\n $book->supply=$request->input('bookSupply');\n $book->save();\n\n return redirect('books')->with('success','Book '.$book->title.' has been updated');\n // return new BookResource($book);\n }", "title": "" }, { "docid": "d76f55fd8ef8c1661f437985beb01c28", "score": "0.5495572", "text": "public function update(Request $request, $id){\n //\n $product = Product::find($id);\n\n if ($request->file('avatar')){\n $image = $request->file('avatar'); \n $name_image = md5($image). '_' . time() . '.' . $image->getClientOriginalExtension(); \n $image_path = public_path() . '/img/products/';\n $image->move($image_path, $name_image); \n }else{\n $name_image = $product->avatar; \n }\n\n \n $product->title = ucwords(strtolower($request->title));\n $product->subtitle = $request->sub_title;\n $product->price = $request->price;\n $product->details = $request->details;;\n $product->more_info = $request->more_info;\n $product->avatar = $name_image;\n $product->available = $request->active;\n $product->stock_available = $request->stock_in;\n if ($product->save()) {\n return redirect()->back()->with('status', 'Se modifico el producto '.$product->title.' exitosamente.'); \n }\n }", "title": "" }, { "docid": "7e1321a25696b1492adea4e26596e49b", "score": "0.5495508", "text": "public function update(Request $request, $id)\n {\n $uploader = $this->uploader;\n $this->uploader->storeFile();\n $this->files->find($id)->update([\n 'name' => $uploader->getFileName(),\n 'slug' => $uploader->getFileSlug(),\n 'hash_name' => $uploader->getFileHashName(),\n ]);\n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54942036", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54942036", "text": "public function update($id);", "title": "" }, { "docid": "cd215568bf7e7830c41e6664fb29f289", "score": "0.54887944", "text": "public function updateStream($path, $resource, Config $config)\n {\n throw new \\Exception('Method updateStream() is not implemented.');\n }", "title": "" }, { "docid": "5d93df418f0bb8bad3a49356d3a4c2a8", "score": "0.5480436", "text": "public function put_update()\n {\n $id = Input::get('id');\n\n//\t\t$validation = Guitar::validate(Input::all());\n\n//\t\tif ($validation->passes()) {\n\t\t\tGuitar::update($id, array(\n\t\t\t\t'model'=> strtolower(Input::get('model')),\n 'model_friendly'=> Input::get('model_friendly'),\n\t\t\t\t'prod_id'=> Input::get('prod_id'),\n 'price'=> Input::get('price'),\n\t\t\t\t'short_desc'=> Input::get('short_desc')\n\t\t\t));\n\n return Redirect::to_route('guitars')->with('message', 'Guitar has been updated.');\n//\t\t} else {\n//\t\t\treturn Redirect::to_route('edit_guitar', $prod_id)->with_errors($validation);\n//\t\t}\n }", "title": "" }, { "docid": "2324689aacf5fb2ea9c1526725849cbf", "score": "0.547374", "text": "public function update(Request $request)\n {\n $product = Product::find($request->input('id'));\n $product->name = $request->input('name');\n $product->tittle = $request->input('tittle');\n $product->gender = $request->input('gender');\n $product->description = $request->input('description');\n $product->country = $request->input('country');\n $product->city = $request->input('city');\n $product->address = $request->input('address');\n $product->file = $request->input('file');\n $product->save(); //persist the data\n return redirect()->route('index')->with('info','Data Updated Successfully');\n }", "title": "" }, { "docid": "ddcc4ec6eda8fbc6b6e395568c3e9134", "score": "0.5469964", "text": "function item_put()\n {\n $key = $this->get('id');\n $record = array_merge(array('id' => $key), $this->_put_args);\n \n $dbRecord = $this->supply->get($key);\n \n $dbArray = json_decode(json_encode($dbRecord), True);\n \n $record['quantity'] += $dbArray['quantity'];\n \n $this->supply->update($record);\n $this->response(array('ok'), 200);\n }", "title": "" }, { "docid": "a531ba8ea5cfe036e2721df8cfaf8bfd", "score": "0.54668176", "text": "public function update(Request $request, $id)\n {\n $book = Book::find($id);\n $book->authors()->sync($request->edit_authors);\n $book->tags()->sync($request->edit_tags);\n $book->suppliers()->sync($request->edit_suppliers);\n $book->categories()->sync($request->edit_categories);\n $book->publisher_id = $request->edit_publisher;\n\n $book->name = $request->edit_name;\n $book->price = $request->edit_book_price;\n $book->description = $request->edit_book_description;\n $book->published_date = $request->edit_book_published_date;\n\n $file = file_get_contents($request->edit_image);\n $path = '/images/books/' . $id . \"/thumb_nail.png\";\n Storage::disk('public')->put($path, $file);\n\n $book->save();\n return response()->json(null, 200);\n }", "title": "" }, { "docid": "12f4eacbd7ce34b7674e0b93198e74f7", "score": "0.54667616", "text": "public function update(Request $r, $id) {\n\t\t$data = $this->validate(request(),\n\t\t\t[\n\t\t\t\t'country_name_ar' => 'required',\n\t\t\t\t'country_name_en' => 'required',\n\t\t\t\t'mob' => 'required',\n\t\t\t\t'code' => 'required',\n\t\t\t\t'logo' => 'sometimes|nullable|'.v_image(),\n\t\t\t], [], [\n\t\t\t\t'country_name_ar' => trans('admin.country_name_ar'),\n\t\t\t\t'country_name_en' => trans('admin.country_name_en'),\n\t\t\t\t'mob' => trans('admin.mob'),\n\t\t\t\t'code' => trans('admin.code'),\n\t\t\t\t'logo' => trans('admin.logo'),\n\t\t\t]);\n\t\tif (request()->hasFile('logo')) {\n\t\t\t$data['logo'] = up()->upload([\n\t\t\t\t\t'file' => 'logo',\n\t\t\t\t\t'path' => 'countries', ///folder name\n\t\t\t\t\t'upload_type' => 'single',\n\t\t\t\t\t'delete_file' => Country::find($id)->logo,\n\t\t\t\t]);\n\t\t}\n\t\tProduct::where('id', $id)->update($data);\n\t\tsession()->flash('success', trans('admin.updated_record'));\n\t\treturn redirect(aurl('/products'));\n\t}", "title": "" }, { "docid": "7c87c859b94eb72a06d5b587cd80e422", "score": "0.54595304", "text": "public function update(Request $request, $id)\n {\n $aliado = ally::findOrFail($id);\n if($request->hasFile('imagen')){\n $imagen = $request->file('imagen')->store('public');\n $resultado = str_replace(\"public\", \"storage\", $imagen);\n }else{\n $resultado = $aliado->imagen;\n }\n $aliado->nombre = $request->nombre;\n $aliado->personal = $request->personal;\n $aliado->imagen = $resultado;\n $aliado->horario = $request->horario;\n $aliado->direccion = $request->direccion;\n $aliado->redes = $request->redes;\n $aliado->telefono = $request->telefono;\n $aliado->promociones = $request->promociones;\n\n $aliado->save();\n return redirect('/aliados');\n\n\n }", "title": "" }, { "docid": "5ffe3b313405e461b578d1a3d51865a0", "score": "0.545875", "text": "public function update(Request $request, $id)\n {\n $resource = AclResource::find($id);\n\n if (!$resource) {\n return Redirect::back()->withErrors('记录不存在, 请先创建');\n }\n\n $this->validate($request, $resource->rules()['update']);\n\n $resource->update($request->only($resource->getFillable()));\n\n return Redirect::route('acl.resource.index')->with('message', '修改成功');\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.5457146", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.5457146", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "72d331190da1dd4fbf2c66ecff2d821d", "score": "0.545702", "text": "public function update(Request $request, $id)\n {\n $data = array();\n $data['name'] = $request->name;\n $data['code'] = $request->code;\n $data['root'] = $request->root;\n $data['purchase_price'] = $request->purchase_price;\n $data['retail_price'] = $request->retail_price;\n $data['wholesale_price'] = $request->wholesale_price;\n $data['purchase_date'] = $request->purchase_date;\n $data['quantity'] = $request->quantity;\n $data['category_id'] = $request->category_id;\n $data['supplier_id'] = $request->supplier_id;\n\n $photo = $request->new_image;\n\n if ($photo) {\n $position = strpos($photo, ';');\n $sub = substr($photo, 0, $position);\n $exist = explode('/', $sub)[1];\n\n\n $name = time().\".\".$exist;\n $image = Image::make($photo)->resize(240, 200);\n $upload_path = 'backend/employees/gallery/';\n $image_url = $upload_path.$name;\n\n $success = $image->save($image_url);\n\n if ($success) {\n $data['image'] = $image_url;\n $img = Product::where('id', $id)->first();\n $image_path = $img->image;\n unlink($image_path);\n $product = Product::where('id', $id)->update($data);\n }\n\n return $product;\n } else {\n $oldImage = $request->image;\n $data['image'] = $oldImage;\n $product = Product::where('id', $id)->update($data);\n return $product;\n }\n\n }", "title": "" }, { "docid": "8d37a00ab950d20e3c3391db0f734c2f", "score": "0.54526883", "text": "public function update(Request $request, Stock $stock, Product $product )\n {\n \n return $stock;\n // return $stock->products();\n // $product->update($request->all());\n // return response([\n // 'data' => new ProductResource($product)\n // ],Response::HTTP_CREATED);\n }", "title": "" }, { "docid": "7866059d59e3ac76fe1a71f510712109", "score": "0.54491675", "text": "public function putStream($path, $resource, array $config = []);", "title": "" }, { "docid": "5bfdd4a210a28f5211b79be838b4fbbe", "score": "0.5442507", "text": "public function update(Request $request, $id)\n {\n \n $Brands=Brand::find($id);\n \n if($request->hasFile('image')) {\n $file_name = time().'.'.$request->image->extension(); \n $path = $request->file('image')->storeAs('public/brands',$file_name);\n $Brands->image=$file_name;\n \n $Image = str_replace('/storage', '', $request->old_image);\n // dd($Image);\n #Using storage\n if(Storage::exists('public/brands/' . $Image)){\n\n $delete= Storage::delete('/public/brands/' . $Image);\n \n }\n } \n $Brands->brand_name=$request->brand_name;\n $Brands->description=$request->brand_desc;\n $Brands->meta_title=$request->meta_title;\n $Brands->meta_keywords=$request->meta_keyword;\n $Brands->meta_description=$request->meta_description;\n $Brands->slug=$request->brand_slug;\n $Brands->alt_image=$request->alt_image;\n $Brands->update();\n alert::success('Brand Updated Successfully');\n return redirect()->back();\n }", "title": "" }, { "docid": "317a27c122ad5b9e1b0c641b6d509e34", "score": "0.5441426", "text": "public function update(Request $request, Articulo $articulo)\n {\n // return $request->all();\n if($request->file){\n $file= $request->file('file');\n $name = Date('dmymsv').\"_\".$articulo->id.\".jpg\";\n\n\n \\Storage::disk('local')->put($name, \\File::get($file));\n $articulo->path=$name;\n }\n \n \n $articulo->categoria_id=$request->categoria_id; \n $articulo->articulo=$request->articulo;\n $articulo->descripcion=$request->descripcion;\n $articulo->codigo=$request->codigo;\n $articulo->tipoProducto=$request->tipoProducto;\n $articulo->stock=$request->stock;\n $articulo->stock=$request->stock;\n $articulo->save();\n\n\n Session::flash('msj-info','Articulo o Servicio Modificafo satisfactoriamente!');\n return redirect('articulos');\n }", "title": "" }, { "docid": "5d0bfcefd89bc76f371d6f30aae2d854", "score": "0.5440821", "text": "public function updateStored(): void\n {\n\n\n }", "title": "" }, { "docid": "8bf12aae58a29f6aec0d5f6c658ebb1c", "score": "0.5440277", "text": "public function update(Request $request, Product $product)\n {\n $product->title = $request->title;\n $product->price = $request->price;\n $product->description = $request->description;\n $product->save();\n\n if($request->hasFile('photo')) {\n foreach ($product->photos as $photo){\n if(file_exists($photo->path)){\n @unlink($photo->path);\n }\n\n }\n\n\n $image = $request->file('photo');\n $image_filename = $product->id.$image->getClientOriginalName();\n $image->move(public_path('uploads'), $image_filename);\n if(count($product->photos) > 0){\n $product->photos()->update(['path' => 'uploads/' . $image_filename]);\n }else{\n $product->photos()->create(['path' => 'uploads/' . $image_filename]);\n }\n\n\n }\n\n return redirect()->back();\n }", "title": "" }, { "docid": "7aa8cfd89b5dde197d80b375ae9ba8bd", "score": "0.5435059", "text": "public function put($resource, array $arguments = array()) {\n $client = new Client($this->_apiEndpoint);\n $request = $client->put($resource, null, $arguments);\n $request->addHeader('Accept', 'application/json');\n\n $this->_prepareQueryString($request);\n\n return new Response($request->send()->json());\n }", "title": "" }, { "docid": "aaa3ded6ab3e6e879c9ce8113f9ff734", "score": "0.54254526", "text": "public function updateResource( $id, $inputs )\n {\n $model = $this->model->find($id);\n return $model->update($inputs);\n\n }", "title": "" }, { "docid": "4b07cea30fbd5aef9bac5ac9b2c7d632", "score": "0.54251677", "text": "private function putResources()\n {\n try {\n $version = $this->storage->get('version');\n }\n catch (\\Exception $e) {\n $this->putVersion();\n $resources = $this->resources();\n $this->storage->put('resources', $resources);\n }\n }", "title": "" }, { "docid": "d0ee88236c578f6cf756c3d8131ebbcd", "score": "0.54198533", "text": "public function update(Request $request, $id)\n {\n $question = Questions::find($id);\n $question->question = $request->question;\n $question->categories_id = $request->category;\n if ($request->file('image') != null) {\n $path = $request->file('image')->store('images', 's3');\n Storage::disk('s3')->setVisibility($path, 'public');\n $question->image = Storage::disk('s3')->url($path);\n }\n $question->save();\n $question->AddOrUpdateTranslations($request->input('language'));\n return redirect()->back();\n }", "title": "" } ]
c3a41a0d31349ef6d938641d21ea630a
This function retrieves a skill proposal
[ { "docid": "29a4dbeb968357869859e8545bbdc647", "score": "0.6917208", "text": "public function read_skill_proposal($skill_proposal_id)\n {\n $query=$this->db->get_where('Skill_Proposal',array('skill_proposal_id'=>$skill_proposal_id));\n return $query->row_array();\n }", "title": "" } ]
[ { "docid": "775609ffad8cc54460af1e78aa67db5b", "score": "0.68187934", "text": "public function read_initial_skill_using_proposal_id($skill_proposal_id)\n {\n $query=$this->db->query(\n \"SELECT Skill.skill_id\n FROM Skill\n INNER JOIN User_Skill\n ON User_Skill.skill_id=Skill.skill_id \n INNER JOIN Initial_Skill\n ON Initial_Skill.user_skill_id=User_Skill.user_skill_id\n INNER JOIN Skill_Proposal\n ON Skill_Proposal.initial_skill_id=Initial_Skill.initial_skill_id\n WHERE Skill_Proposal.skill_proposal_id=\".$skill_proposal_id);\n \n if($skill_id=$query->row(0)->skill_id)\n {\n return $skill_id=$query->row(0)->skill_id;\n }\n\n return FALSE;\n }", "title": "" }, { "docid": "15a39e0c86280b285b10c107cf3d3f7b", "score": "0.64958155", "text": "public function read_proposal_as_initial_skill_owner($user_id,$skill_proposal_id=FALSE,$limit=5,$offset=0)\n {\n //Read specific proposal using user_id and proposal_id where the user owns the initial skill\n if($skill_proposal_id)\n {\n $query=$this->db->query(\"SELECT Skill_Proposal.skill_proposal_id,Skill_Proposal.offer_skill_id,Skill.skill_id,Skill.name,Skill_Proposal.status,Skill_Proposal.accepted_date\n FROM Skill \n INNER JOIN User_Skill \n ON Skill.skill_id=User_Skill.skill_id \n INNER JOIN Initial_Skill\n ON User_Skill.user_skill_id=Initial_Skill.user_skill_id\n INNER JOIN Skill_Proposal\n ON Initial_Skill.initial_skill_id=Skill_Proposal.initial_skill_id \n WHERE User_Skill.user_id=\".$user_id.\" AND Skill_Proposal.skill_proposal_id=\".$skill_proposal_id);\n \n if(!$result=$query->row_array()) //no results found\n {\n return FALSE;\n }\n \n //Read the offer skill\n $offer_skill=$this->initialoffer_model->read_offer_skill($result['offer_skill_id']);\n\n //Build array using the inital skill from first query and offer skill in second query \n $proposals=array(\n 'skill_proposal_id'=>$result['skill_proposal_id'],\n 'skill_id'=>$result['skill_id'],\n 'name'=>$result['name'],\n 'status'=>$result['status'],\n 'accepted_date'=>$result['accepted_date'],\n 'offer_skill_id'=>$offer_skill['skill_id'],\n 'offered_skill'=>$offer_skill['name'],\n 'user_id'=>$offer_skill['user_id'],\n 'username'=>$offer_skill['username'],\n 'mobile'=>$offer_skill['mobile'],\n 'pic'=>$this->gravatar->get($offer_skill['email'],$size=128,$default_image ='mm'));\n \n return $proposals; //Return proposal\n\n }\n else //No proposal_id so get all the proposals the user is involved in as the inital skill owner using their user_id\n {\n $query=$this->db->query(\"SELECT Skill_Proposal.skill_proposal_id,Skill_Proposal.offer_skill_id,Skill.skill_id,Skill.name,Skill_Proposal.status\n FROM Skill \n INNER JOIN User_Skill \n ON Skill.skill_id=User_Skill.skill_id \n INNER JOIN Initial_Skill\n ON User_Skill.user_skill_id=Initial_Skill.user_skill_id\n INNER JOIN Skill_Proposal\n ON Initial_Skill.initial_skill_id=Skill_Proposal.initial_skill_id \n WHERE User_Skill.user_id=\".$user_id.\" AND Skill_Proposal.status !='complete'\".\n \" LIMIT \".$offset.\",\".$limit); \n\n }\n\n if(!$all_proposals_as_initial_skill_owner=$query->result_array())\n {\n return FALSE;\n }\n\n $count=0;\n foreach ($all_proposals_as_initial_skill_owner as $proposal) \n {\n $offer_skill=$this->initialoffer_model->read_offer_skill($proposal['offer_skill_id']); \n\n $proposals[$count]=array(\n 'skill_proposal_id'=>$proposal['skill_proposal_id'],\n 'skill_id'=>$proposal['skill_id'],\n 'name'=>$proposal['name'],\n 'status'=>$proposal['status'],\n 'offer_skill_id'=>$offer_skill['skill_id'],\n 'offered_skill'=>$offer_skill['name'],\n 'user_id'=>$offer_skill['user_id'],\n 'username'=>$offer_skill['username'],\n 'email'=>$offer_skill['email'],\n 'mobile'=>$offer_skill['mobile'] );\n\n $count++;\n\n }\n \n return $proposals;\n\n }", "title": "" }, { "docid": "652f64fbc67160cab42f93fca49ef5f7", "score": "0.6438099", "text": "public function getSkills();", "title": "" }, { "docid": "0713e8687096c2d324f9fcb17f9872cb", "score": "0.62747437", "text": "public function read_proposal_as_offerer($user_id,$skill_proposal_id=FALSE,$limit=5,$offset=0)\n {\n if($skill_proposal_id)\n {\n $query=$this->db->query(\"SELECT Skill_Proposal.skill_proposal_id,Skill_Proposal.initial_skill_id,Skill.skill_id,Skill.name,Skill_Proposal.status,Skill_Proposal.accepted_date\n FROM Skill \n INNER JOIN User_Skill \n ON Skill.skill_id=User_Skill.skill_id \n INNER JOIN Offer_Skill\n ON User_Skill.user_skill_id=Offer_Skill.user_skill_id\n INNER JOIN Skill_Proposal\n ON Offer_Skill.offer_skill_id=Skill_Proposal.offer_skill_id \n WHERE User_Skill.user_id=\".$user_id.\" AND Skill_Proposal.skill_proposal_id=\".$skill_proposal_id);\n \n $result=$query->row_array();\n $initial_skill=$this->initialoffer_model->read_initial_skill($result['initial_skill_id']);\n \n $proposals=array(\n 'skill_proposal_id'=>$result['skill_proposal_id'],\n 'skill_id'=>$result['skill_id'],\n 'name'=>$result['name'],\n 'status'=>$result['status'],\n 'accepted_date'=>$result['accepted_date'],\n 'user_id'=>$initial_skill['user_id'],\n 'username'=>$initial_skill['username'],\n 'email'=>$initial_skill['email'],\n 'mobile'=>$initial_skill['mobile']);\n \n return $proposals;\n \n }\n else\n {\n $query=$this->db->query(\"SELECT Skill_Proposal.skill_proposal_id,Skill_Proposal.initial_skill_id,Skill.skill_id,Skill.name,Skill_Proposal.status\n FROM Skill \n INNER JOIN User_Skill \n ON Skill.skill_id=User_Skill.skill_id \n INNER JOIN Offer_Skill\n ON User_Skill.user_skill_id=Offer_Skill.user_skill_id\n INNER JOIN Skill_Proposal\n ON Offer_Skill.offer_skill_id=Skill_Proposal.offer_skill_id \n WHERE User_Skill.user_id=\".$user_id.\" AND Skill_Proposal.status !='complete'\".\n \" LIMIT \".$offset.\",\".$limit); \n \n }\n \n $result=$query->result_array();\n\n $count=0;\n if($result)\n {\n foreach ($result as $r)\n {\n $initial_skill=$this->initialoffer_model->read_initial_skill($r['initial_skill_id']);\n $proposals[$count]=array(\n 'skill_proposal_id'=>$r['skill_proposal_id'],\n 'skill_id'=>$r['skill_id'],\n 'name'=>$r['name'],\n 'status'=>$r['status'],\n 'initial_skill_id'=>$initial_skill['skill_id'],\n 'initial_skill'=>$initial_skill['name'],\n 'user_id'=>$initial_skill['user_id'],\n 'username'=>$initial_skill['username'],\n 'email'=>$initial_skill['email'],\n 'mobile'=>$initial_skill['mobile'] );\n\n $count++;\n }\n }\n else\n {\n return FALSE;\n }\n \n return $proposals;\n \n }", "title": "" }, { "docid": "f9615f6c12e3fd20f102b59607cf67da", "score": "0.62220806", "text": "function getSkillById($skill_id)\n{\n\t$skill_info = new Skill($skill_id);\n\t$skill_info->get();\n\t$skill_info_out = (array) $skill_info;\n\treturn $skill_info_out;\n}", "title": "" }, { "docid": "b782ee11e29caefb9cf980c72d1c9f24", "score": "0.61782676", "text": "public function GetSkills() {\n\t\t$db = new DB_Action();\n\t\t$sql = 'SELECT * FROM skills ORDER BY id ASC';\n\t\treturn $db->getQuery($sql);\n }", "title": "" }, { "docid": "65ffa3021dc6da9206d3d19f946b2ca0", "score": "0.6170857", "text": "public function getSkill()\n {\n return $this->hasOne(Skill::className(), ['id' => 'skillId']);\n }", "title": "" }, { "docid": "12e908e534887dac7503154b80335840", "score": "0.6073995", "text": "public function getSkillExperience($skill_name) {\n\t\treturn $this->skills[$skill_name]['experience'];\n\t}", "title": "" }, { "docid": "d2f81c0d229942ba43d730e075734269", "score": "0.5978742", "text": "function _getSkillInfo() \n \t{\n\t\t\tglobal $roster, $addon;\n\n\t\t\t$skills = $this->apidata['professions'];\n\t\t\t$o = 0;\n\t\t\tforeach ($skills['primary'] as $id =>$skil) \n\t\t\t{\n\n\t\t\t\tif ( isset($skil['name']) )\n\t\t\t\t{ \t\t\t\n\t\t\t\t\t$this->data[\"Skills\"][\"Professions\"][''.$skil['name'].''] = \"\".$skil['rank'].\":\".$skil['max'].\"\";\n\t\t\t\t\t$this->data[\"Skills\"][\"Professions\"][\"Order\"] = $o;\n\t\t\t\t\t$this->status['skillInfo'] += 1;\n\t\t\t\t\t$o++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->status['skillInfo'] = '0';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ($skills['secondary'] as $id =>$skil) \n\t\t\t{\n\t\t\t\tif ( isset($skil['name']) )\n\t\t\t\t{ \t\t\t\n\t\t\t\t\t$this->data[\"Skills\"][\"Secondary Skills\"][''.$skil['name'].''] = \"\".$skil['rank'].\":\".$skil['max'].\"\";\n\t\t\t\t\t$this->data[\"Skills\"][\"Secondary Skills\"][\"Order\"] = $o;\n\t\t\t\t\t$this->status['skillInfo'] += 1;\n\t\t\t\t\t$o++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->status['skillInfo'] = $this->status['skillInfo'];\n\t\t\t\t}\n\t\t\t} \t\t\n\t\t\t$this->_debug( 1, true, 'Parsed skill info', 'OK' );\n\t}", "title": "" }, { "docid": "bc134059d6e1bf286accf7c0c1b8f008", "score": "0.5952538", "text": "public function getProposal(){\n return $this->hasOne(MgfProposal::className(), ['id' => 'proposal_id']);\n }", "title": "" }, { "docid": "798597ea2871aaba131fda2bae8da7e4", "score": "0.59218836", "text": "private function getItem()\n\t{\n\t\tif ($this->proposalObject instanceof Item)\n\t\t{\n\t\t\t$item = $this->proposalObject;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$records = $this->proposalObject->getRecords();\n\t\t\tif (count($records) > 0)\n\t\t\t{\n\t\t\t\t$item = current($records);\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$item = NULL;\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $item;\n\t}", "title": "" }, { "docid": "eecc4379c46256df6779226920860858", "score": "0.5781117", "text": "public function read_if_user_offered_proposal($current_user_id,$skill_proposal_id)\n {\n \n $query=$this->db->query(\"SELECT User_Skill.user_skill_id\n FROM User_Skill\n INNER JOIN Offer_Skill\n ON User_Skill.user_skill_id=Offer_Skill.user_skill_id\n INNER JOIN Skill_Proposal\n ON Offer_Skill.offer_skill_id=Skill_Proposal.offer_skill_id \n WHERE User_Skill.user_id=\".$current_user_id.\" AND Skill_Proposal.skill_proposal_id=\".$skill_proposal_id);\n \n if ($result=$query->row_array())\n {\n return TRUE; \n }\n\n return FALSE;\n }", "title": "" }, { "docid": "88c37fbcf263edc337adb0983541d044", "score": "0.57296306", "text": "public function get_skill()\n {\n $sql = \"SELECT count(id_skill) as id FROM tbl_skill\";\n $result = $this->db->query($sql);\n return $result->row()->id;\n }", "title": "" }, { "docid": "0ead654d7ab2f65f80ca0c553c5db346", "score": "0.56439984", "text": "public function proposal($mixed = null) {\n\t\t$validParameters = array(\n\t\t\t\"(proposalRequest)\",\n\t\t);\n\t\t$args = func_get_args();\n\t\t$this->_checkArguments($args, $validParameters);\n\t\treturn $this->__soapCall(\"proposal\", $args);\n\t}", "title": "" }, { "docid": "55fe90b205cf7b6bd6b6f166920d142b", "score": "0.56210464", "text": "function getSkillsList()\n {\n $q = $this->db->get('qm_skills');\n return $q->result();\n }", "title": "" }, { "docid": "6818d1b7e7963969856fffef50dc1a45", "score": "0.56116545", "text": "public function proposal()\n {\n return $this->belongsTo('App\\Proposal');\n }", "title": "" }, { "docid": "e5c023ea5372b5e412a99ee06e35558e", "score": "0.56057507", "text": "public function getSkill($id) {\n try {\n $id = (int) $id;\n $row = $this->fetchRow('id = ' . $id);\n if ($row) {\n $skillRow = $row->toArray();\n $skillEntity = new Base_Model_ObtorLib_App_Core_Qualification_Entity_Skill();\n $skillEntity->setId($skillRow['id']);\n $skillEntity->setTitle($skillRow['title']);\n $skillEntity->setYearsOfExperience($skillRow['years_of_experience']);\n $skillEntity->setComments($skillRow['comment']);\n $skillEntity->setRelId($skillRow['rel_id']);\n $skillEntity->setRelObject($skillRow['rel_object']);\n return $skillEntity;\n } else {\n return null;\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Qualification_Exception($ex);\n }\n }", "title": "" }, { "docid": "06a76755f032c327e1fcff0a9073bba9", "score": "0.5575311", "text": "public function getSkills()\n {\n return $this->skills;\n }", "title": "" }, { "docid": "5235fcaa581431feab7a106f637082dd", "score": "0.55425805", "text": "public function edit(Proposal $proposal)\n {\n return $proposal;\n }", "title": "" }, { "docid": "2d242b7986a40be1878e70b9145b1a8b", "score": "0.55097777", "text": "public function get_userSkills(){\n\n\t\t\t$user_id=$this->session->userdata('user_id');\n\t\t\t$profile_type=$this->session->userdata('profile_type');\n\n\t\t\tif(($this->session->userdata('selected_profile_type'))!=''){\n\t\t\t\t$profile_type=$this->session->userdata('selected_profile_type');\n\t\t\t}\n\t\t//Connection establishment, processing of data and response from REST API\n\t\t\t$path=base_url();\n\t\t\t$url = $path.'api/Dashboard_api/get_userSkills?user_id='.$user_id.'&profile_type='.$profile_type;\t\n\t\t\t$ch = curl_init($url);\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPGET, true);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\t$response_json = curl_exec($ch);\n\t\t\tcurl_close($ch);\n\t\t\t$response=json_decode($response_json, true);\n\t\t\treturn $response;\t\n\t\t}", "title": "" }, { "docid": "7f04c6e39576075fa606782f9f4e8198", "score": "0.54936713", "text": "public function getProposalById($id)\n\t\t{\n\t\t\ttry {\n\t\t\t\t$strSql = \"SELECT CONCAT(u.name,' ', u.last_name) as student, ct.candidatetype_name, c.id as id_candidato, p.proposal_tittle,p.proposal_description, p.id as pId FROM users u \n\t\t\t\t\tINNER JOIN student_listing sl ON sl.user_idfk=u.id \n\t\t\t\t\tINNER JOIN candidacies c ON c.studentlist_idfk=sl.id \n\t\t\t\t\tINNER JOIN candidate_types ct ON ct.id=c.candidatetype_idfk \n\t\t\t\t\tINNER JOIN proposals p ON p.candidacy_idfk=c.id \n\t\t\t\t\tWHERE c.id = :id\";\n\t\t\t\t$arrayData = ['id' => $id];\n\t\t\t\t$query = $this->pdo->select($strSql, $arrayData);\n\t\t\t\t//if (empty($query)) {\n\t\t\t\t//\t$condicion = true;\n\t\t\t\t//}else{\n\t\t\t\t\t//$condicion = false;\n\t\t\t\t//}\n\t\t\t\t//return $condicion;\n\t\t\t\t//var_dump($query);\n\t\t\t\t//echo $condicion;\n\t\t\t\t//die();\n\t\t\t\treturn $query; \n\t\t\t} catch(PDOException $e) {\n\t\t\t\tdie($e->getMessage());\n\t\t\t}\t\n\t\t}", "title": "" }, { "docid": "2174a5e9ba0d153bedf45a2ad94c805e", "score": "0.54787755", "text": "public function skill( \\WP_REST_Request $request ) {\n\t\t$settings = get_option( 'hello_alexa_settings' );\n\t\t$app_id = $settings['skill_ID'];\n\n\t\tif ( ! $app_id ) {\n\t\t\treturn new \\WP_Rest_Response( __( 'Could not find the skill ID. Check your settings.', 'hello-alexa' ) );\n\t\t}\n\n\t\t// Allows us to leverage the core plugin to handle the grunt work.\n\t\t$voicewp_instance = \\Voicewp::get_instance();\n\n\t\t// Validates that the request is coming from Alexa.\n\t\t// Gets the Alexa Request and Response objects for us to use in our skill.\n\t\tlist( $request, $response ) = $voicewp_instance->voicewp_get_request_response_objects( $request, $app_id );\n\n\t\t// This is the main functionality of your skill,\n\t\t// it formats the response that will be sent.\n\t\t$this->request_response( $request, $response );\n\n\t\t// Send the result to the user.\n\t\treturn new \\WP_REST_Response( $response->render() );\n\t}", "title": "" }, { "docid": "76db558ea4a90d006ad756fa2cfe156d", "score": "0.54741484", "text": "public function addSkill() {\n try {\n if (!($this->skill instanceof Base_Model_ObtorLib_App_Core_Qualification_Entity_Skill)) {\n throw new Base_Model_ObtorLib_App_Core_Qualification_Exception(\" Skill Entity not initialized\");\n } else {\n $data = array(\n 'title' => $this->skill->getTitle(),\n 'years_of_experience' => $this->skill->getYearsOfExperience(),\n 'comment' => $this->skill->getComments(),\n 'rel_id' => $this->skill->getRelId(),\n 'rel_object' => $this->skill->getRelObject());\n $last_inserted_id = $this->insert($data);\n return $last_inserted_id;\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Qualification_Exception($ex);\n }\n }", "title": "" }, { "docid": "ab5e2d60b3c82efa6f6136b3e81a17b7", "score": "0.5473527", "text": "function getSkills()\n {\n global $dbName;\n $conn = getDatabaseConnection($dbName);\n \n try\n {\n // calling stored procedure command\n $sql = 'CALL sp_GetSkills()';\n \n // prepare for execution of the stored procedure\n $stmt = $conn->prepare($sql);\n\n // execute the stored procedure\n $stmt->execute();\n $records = $stmt->fetchAll(PDO::FETCH_ASSOC);\n \n return $records;\n }\n catch (PDOException $e)\n {\n die(\"Error occurred:\" . $e->getMessage());\n }\n return null;\n }", "title": "" }, { "docid": "53fec7fa6764574e5ebf6f5021330ea2", "score": "0.54630387", "text": "function getSkill($skill_name, &$data) {\n global $conn;\n\n $sql = \"SELECT * FROM skills WHERE name = ?;\";\n\n if ($stmt = $conn->prepare($sql)) {\n $stmt->bind_param(\"s\", $param_name);\n $param_name = $skill_name;\n\n if ($stmt->execute()) {\n $result = $stmt->get_result();\n\n $id = 0;\n if ($result->num_rows > 0) {\n while ($row = $result->fetch_assoc()) {\n $id = $row['skill_id'];\n }\n } else {\n $id = createSkill($skill_name);\n }\n\n $stmt->close();\n $data[$id] = $skill_name;\n return $id;\n } else {\n die(\"Database error: {$stmt->error}\");\n }\n } else {\n die(\"Database error: {$conn->error}\");\n }\n }", "title": "" }, { "docid": "96bc74ff28c1f24a46503dc2ad79b534", "score": "0.5462555", "text": "public function getSkillList()\n {\n return $this->skills;\n }", "title": "" }, { "docid": "14fa816ff76028f9f061047913a64d11", "score": "0.5461201", "text": "function list_proposals() {\n\tglobal $db;\n\t// this variable contains the PM\n\tglobal $message;\n\tglobal $mybb;\n\tglobal $pm;\n\t$query = $db->simple_select(\"exploit_proposals\", \"*\", \"uid=\" . (int)$pm['fromid']);\n $proposals = array();\n while($proposal = $db->fetch_array($query)) {\n $proposal['additional_info'] = my_unserialize($proposal['additional_info']);\n \n // resolve the buyer's ID to a username\n if (array_key_exists(\"sold_to\", $proposal[\"additional_info\"])) {\n $user_query = $db->simple_select(\"users\", \"username\", \"uid=\" . $proposal[\"additional_info\"]['sold_to']);\n $buyer = $db->fetch_array($user_query);\n $proposal[\"buyer\"] = $buyer[\"username\"];\n }\n\n array_push($proposals, $proposal);\n }\n\tif (count($proposals) > 0) {\n\t\t$message .= \"<b>Their exploit proposals:</b><br />\";\n\t}\n\n\tforeach($proposals as $proposal) {\n\t\t$message .= \"<hr />\";\n\t\tforeach($proposal as $field => $value) {\n\t\t\tif (is_array($value)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$message .= \"<b>\" . htmlspecialchars($field) . \": </b>\";\n\t\t\t$message .= \"<i>\" . htmlspecialchars($value) . \" </i>\";\n\t\t}\n\t}\t\n}", "title": "" }, { "docid": "621af8c350589b385ac993d0dc1b5653", "score": "0.5426917", "text": "public function getProposals()\n {\n $input = Request::all();\n\n $validator = Validator::make($input, $this->dateRules);\n\n if ($validator->fails()) {\n return ApiResponse::validation($validator);\n }\n\n $data = $this->proposals->get($input);\n\n return ApiResponse::success($data);\n }", "title": "" }, { "docid": "7e3454673c3e8c5a2b1083dae90b4efa", "score": "0.5424789", "text": "public function getSkills()\r\n {\r\n // Receiving user input data\r\n $inputUserData = \\Input::all();\r\n $response = $this->userGateway->getSkills($inputUserData);\r\n return \\Response::json($response);\r\n }", "title": "" }, { "docid": "e6b0b31606364f57d2d85a0f1b53d303", "score": "0.54173255", "text": "public function show(Skill $skill)\n {\n //\n }", "title": "" }, { "docid": "5775d949c8d28c49f0d8d1c11e39906d", "score": "0.5407007", "text": "public function getHeroSkill($skill) : Skills{\n $skillNames = $this->hero->getSkillsNames();\n\n if(!in_array($skill, $skillNames)){\n echo 'wrong skill name';\n }\n\n $skills = $this->hero->getSkills();\n\n return $skills[$skill];\n }", "title": "" }, { "docid": "64dd188f6f2d9e0cd01ce27990e8df7b", "score": "0.53861", "text": "public function getName()\n {\n return 'proposal';\n }", "title": "" }, { "docid": "6be5cfe802e0cf9ff58a4155fe8e0c68", "score": "0.53754395", "text": "public function cancel_proposal($skill_proposal_id)\n {\n return $query=$this->db->query(\"DELETE Skill_Proposal,Initial_Skill,Offer_Skill\n FROM Skill_Proposal\n INNER JOIN Initial_Skill\n ON Skill_Proposal.initial_skill_id=Initial_Skill.initial_skill_id\n INNER JOIN Offer_Skill\n ON Offer_Skill.offer_skill_id=Skill_Proposal.offer_skill_id\n WHERE Skill_Proposal.skill_proposal_id=\".$skill_proposal_id);\n \n }", "title": "" }, { "docid": "be5c3e4e852187525dbd42c1d4097098", "score": "0.53496206", "text": "public function getSkill() : AlterableResultIterator\n {\n return $this->retrieveManyToOneRelationshipsStorage('skill', 'fk_skill_user', 'skill', ['skill.user_id' => $this->get('id', 'user')]);\n }", "title": "" }, { "docid": "4074f7b5069248c5ce011cca4fd3a5c5", "score": "0.5349322", "text": "public function getIdSkill()\n {\n return $this->idSkill;\n }", "title": "" }, { "docid": "cc2cfabcfb57914e85b1e4dd1d206378", "score": "0.53464216", "text": "public function skills()\n {\n return $this->hasOne(Skills::class);\n }", "title": "" }, { "docid": "e241d8e4215e457f1358e52f974d247a", "score": "0.5315799", "text": "public function getSkill(): ActiveQuery\n {\n return $this->hasOne(Skill::className(), ['id' => 'skill_id']);\n }", "title": "" }, { "docid": "243cb9cba1374359fa5fbd3c3a17e0e1", "score": "0.5314611", "text": "public function getTampilNimProposal()\n {\n $data = $this->uri->segment(3);\n \n $query =\"SELECT * FROM `trans_prop`\n WHERE `nim` = $data\n \";\n return $this->db->query($query)->result_array();\n }", "title": "" }, { "docid": "56bac694f50e2cd9168f27c4e88a39ee", "score": "0.5310871", "text": "public function getPptByLessonId(){\r\n\t\t$post = $this->input->post('x');\r\n\t\t$ppt = $this->main->retrieveActivePpt($post);\r\n\t\techo json_encode(['data' => $ppt]);\r\n\t}", "title": "" }, { "docid": "3c2ca885071537335be2f82d4222a36b", "score": "0.52980584", "text": "public function show($id)\n {\n $skill = Skill::find($id);\n return $skill;\n }", "title": "" }, { "docid": "94f84589cdea011e0e61e788bac49e44", "score": "0.5282272", "text": "public function read_if_user_involved_in_proposal($user_id,$skill_proposal_id,$check_skill_owner=FALSE)\n {\n \n $query=$this->db->query(\"SELECT User.user_id\n FROM User\n INNER JOIN User_Skill\n ON User_Skill.user_id=User.user_id \n INNER JOIN Initial_Skill\n ON Initial_Skill.user_skill_id=User_Skill.user_skill_id\n INNER JOIN Skill_Proposal\n ON Skill_Proposal.initial_skill_id=Initial_Skill.initial_skill_id\n WHERE Skill_Proposal.skill_proposal_id=\".$skill_proposal_id);\n\n $read_initial_user_id= $query->row_array();\n \n if(!is_null($read_initial_user_id))\n {\n if($read_initial_user_id['user_id'] == $user_id)\n {\n return TRUE;\n }\n }\n\n if($check_skill_owner) \n {\n return FALSE;\n }\n \n $query2=$this->db->query(\"SELECT User.user_id\n FROM User\n INNER JOIN User_Skill\n ON User_Skill.user_id=User.user_id \n INNER JOIN Offer_Skill\n ON Offer_Skill.user_skill_id=Offer_Skill.user_skill_id\n INNER JOIN Skill_Proposal\n ON Skill_Proposal.offer_skill_id=Offer_Skill.offer_skill_id\n WHERE Skill_Proposal.skill_proposal_id=\".$skill_proposal_id);\n\n $read_offer_user_id= $query2->row_array();\n \n if(!is_null($read_offer_user_id))\n {\n if($read_offer_user_id['user_id'] == $user_id)\n {\n return TRUE;\n }\n }\n \n return FALSE; \n }", "title": "" }, { "docid": "9cecc5f371f1350b61cb6e60c85f944e", "score": "0.5269072", "text": "private function readSkills() {\n //skills I currently have, plus skills I might learn in the future. Not a conclusive list. 0 is backend, 1 is frontend, 2 is other.\n $skillsArr = array(\n \"php\" => 0,\n \"mysql\" => 0,\n \"mongodb\" => 0,\n \"sql\" => 0,\n \"html\" => 1,\n \"css\" => 1,\n \"scss\" => 1,\n \"javascript\" => 1,\n \"node\" => 0,\n \"react\" => 1,\n \"mvc\" => 2,\n \"git\" => 2,\n \"photoshop\" => 2,\n \"wordpress\" => 2,\n \"laravel\" => 0,\n \"angular\" => 1,\n \"vue\" => 1,\n \"express\" => 0,\n \"jquery\" => 1,\n \"es6\" => 1,\n \"asp.net\" => 0,\n \"meteorjs\" => 2,\n \"cakephp\" => 0,\n \"rubyonrails\" => 0,\n \"bootstrap\" => 1,\n \"sass\" => 1,\n \"less\" => 1,\n \"typescript\" => 2,\n \"npm\" => 0,\n \"jest\" => 2,\n \"jasmine\" => 2,\n \"enzyme\" => 2,\n \"flux\" => 1,\n \"redux\" => 1,\n \"mobx\" => 1,\n \"webpack\" => 2,\n \"svg\" => 1,\n \"d3\" => 1,\n \"python\" => 0,\n \"symfony\" => 0,\n \"c#\" => 0,\n \".net\" => 0,\n \"go\" => 0,\n \"oracle\" => 0,\n \"mariadb\" => 0,\n \"oracle\" => 0,\n \"redis\" => 0,\n );\n $conn = new mysqli(\"localhost\", \"root\", \"\", \"projects\");\n if($conn->connect_error) {\n die(\"connection failed: \" . $conn->connect_error);\n }\n \n $sql = \"SELECT skills FROM projects\";\n $res = $conn->query($sql);\n if($res->num_rows > 0) {\n while($row = $res->fetch_assoc()) {\n $skills = explode(\",\", $row['skills']);\n foreach($skills as $skill) {\n \n \n $skill = trim(strtolower($skill));\n if(array_key_exists($skill, $this->skills)) {\n $this->skills[$skill] += 1;\n if($this->skills[$skill] > $this->maxSkillCount) {\n $this->skills[$skill] = $this->maxSkillCount;\n }\n } else {\n $this->skills[$skill] = 1;\n }\n switch($skillsArr[$skill]) {\n case 0:\n if(array_key_exists($skill, $this->backendSkills)) {\n $this->backendSkills[$skill] += 1;\n if($this->backendSkills[$skill] > $this->maxSkillCount) {\n $this->backendSkills[$skill] = $this->maxSkillCount;\n }\n } else {\n $this->backendSkills[$skill] = 1;\n }\n break;\n case 1:\n if(array_key_exists($skill, $this->frontendSkills)) {\n $this->frontendSkills[$skill] += 1;\n if($this->frontendSkills[$skill] > $this->maxSkillCount) {\n $this->maxSkillCount = $this->frontendSkills[$skill];\n }\n } else {\n $this->frontendSkills[$skill] = 1;\n }\n break;\n case 2:\n default:\n if(array_key_exists($skill, $this->otherSkills)) {\n $this->otherSkills[$skill] += 1;\n if($this->otherSkills[$skill] > $this->maxSkillCount) {\n $this->otherSkills[$skill] = $this->maxSkillCount;\n }\n } else {\n $this->otherSkills[$skill] = 1;\n }\n break;\n }\n \n }\n }\n } \n }", "title": "" }, { "docid": "d04d3bcc456227c5082813953c119775", "score": "0.5268306", "text": "public function getQuestion();", "title": "" }, { "docid": "06be6820647cfe9bd4385d267b283d7f", "score": "0.52492243", "text": "public function getSkills_v2()\r\n {\r\n // Receiving user input data\r\n $inputUserData = \\Input::all();\r\n $response = $this->userGateway->getSkills_v2($inputUserData);\r\n return \\Response::json($response);\r\n }", "title": "" }, { "docid": "a5a7fdf45b08073b9c7bcf317cc19bdf", "score": "0.51645094", "text": "public function create_proposal($initial_skill,$offer_skill,$proposed_dates,$read_id=FALSE)\n {\n $this->db->trans_start();//start transaction\n\n $initial_user_skill_id=$this->skill_model->read_user_skill_id($initial_skill); //read skill ids\n $offer_user_skill_id=$this->skill_model->read_user_skill_id($offer_skill);\n\n $initial_skill_id=$this->initialoffer_model->create_initial_skill($initial_user_skill_id); //create entries in initial/offer tables\n $offer_skill_id=$this->initialoffer_model->create_offer_skill($offer_user_skill_id);\n\n $data=array('skill_proposal_id'=>NULL,\n 'initial_skill_id'=>$initial_skill_id,\n 'offer_skill_id'=>$offer_skill_id,\n 'status'=>\"pending approval\",\n 'proposal_time'=>NULL,\n 'proposed_date'=>$proposed_dates);\n\n $this->db->insert('Skill_Proposal',$data);//insert into proposal table\n $id=$this->db->insert_id();\n $this->db->trans_complete();\n\n if($read_id && $this->db->trans_status()) //if insert successful and read_id flag true return id\n {\n return $id;\n }\n\n return $this->db->trans_status();\n }", "title": "" }, { "docid": "0cebe30a5a0e0cb6e81bd0df9c6b8b1c", "score": "0.51521534", "text": "public function getAllSkillInfo() {\n\t\treturn $this->skills;\n\t}", "title": "" }, { "docid": "02651c9f8045e7e7868769abcedc9014", "score": "0.51463276", "text": "public function getUserSkillRecommendation(){\n \tif (@$this->userInfo['users']['id']) {\n\t\t\t\n\t\t\t$uid = @$this->userInfo['users']['id'];\n\t\t\tif (!empty($uid)) {\n\t\t\t\t$recommend_Users_for_skill = ClassRegistry::init('skill_recommendations')->find('all',array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'fields'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'DISTINCT skill_recommendations.recommends'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'limit'=>2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'order'=>'skill_recommendations.id DESC',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'skill_recommendations.user_id='.$uid.'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND skill_recommendations.recommendation=1'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)));\n\t\n\t\t\t\tforeach ($recommend_Users_for_skill as $skill_users_record) {\n\t\t\t\t\t$recommends_Resultant_Array[] .=$skill_users_record['skill_recommendations']['recommends'];\n\t\t\t\t}\n\t\t\t\tif ($recommends_Resultant_Array) {\n\t\t\t\t\tif (sizeof($recommends_Resultant_Array)>1) {\n\t\t\t\t\t\t$recommends_Resultant_Array = @implode(',',$recommends_Resultant_Array);\n\t\t\t\t\t\tif ($recommends_Resultant_Array) {\n\t\t \t\t\t\t$skills_Recommended_for_User = ClassRegistry::init('skill_recommendations')->find('all',array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'fields' =>array('users_profiles.photo, \t\t\t\t\t\t\t\t\t\t\t\t users_profiles.firstname,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.lastname,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skills.title, skill_recommendations.skill_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skill_recommendations.recommendation, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skill_recommendations.start_date'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'limit'=>2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'order'=>'skill_recommendations.id DESC',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'joins' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array('alias' => 'skills',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'table' => 'skills',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'foreignKey' => false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'skill_recommendations.skill_id = skills.id')),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('alias' => 'users_profiles',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t 'table' => 'users_profiles',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t 'foreignKey' => false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t 'conditions' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'skill_recommendations.recommends = users_profiles.user_id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t))),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'conditions'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('skill_recommendations.recommends IN ('.$recommends_Resultant_Array.')'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'skill_recommendations.recommendation'=>1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )));\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$skills_Recommended_for_User = ClassRegistry::init('skill_recommendations')->find('all', array('fields' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array('users_profiles.photo,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.firstname, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t users_profiles.lastname, skills.title, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skill_recommendations.skill_id, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skill_recommendations.recommendation, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skill_recommendations.start_date' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'limit'=>2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'order'=>'skill_recommendations.id DESC',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'joins' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array('alias' => 'skills',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'table' => 'skills',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'foreignKey' => false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'skill_recommendations.skill_id = skills.id')),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array('alias' => 'users_profiles',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'table' => 'users_profiles',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'foreignKey' => false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'conditions' => array( \t \n 'skill_recommendations.recommends = users_profiles.user_id'))),\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t'conditions'=>array('skill_recommendations.recommends='.$recommends_Resultant_Array[0].' AND skill_recommendations.recommendation=1')));\t\n\t\t \t\t}\n\t\t\t}\n\t\t}\n\t }\n\treturn $skills_Recommended_for_User;\n\t}", "title": "" }, { "docid": "cb24f1bae9c2a71fa767adb2a1802cef", "score": "0.5094233", "text": "public function get_professor()\n {\n // loads the associated object\n if (empty($this->professor))\n $this->professor = new professor($this->professor_id);\n \n // returns the associated object\n return $this->professor;\n }", "title": "" }, { "docid": "3bd1c398e15da6e2d98b38e43bd0ccbc", "score": "0.5079841", "text": "function get_proposal_by_id(){\n global $wpdb;\n\n $table_name = $wpdb->prefix.'imit_event_proposals';\n if(wp_verify_nonce($_POST['nonce'], 'imit_single_proposal_show')){\n $proposal_id = sanitize_text_field($_POST['proposal_id']);\n\n $proposal = $wpdb->get_results(\"SELECT * FROM {$table_name} WHERE id = '{$proposal_id}'\");\n\n echo json_encode($proposal);\n }\n die();\n}", "title": "" }, { "docid": "0e9ab8026d2f666719a8db263ce99312", "score": "0.50776404", "text": "public function skill() {\n return $this->belongsTo('Rockit\\Models\\Skill')->withTrashed();\n }", "title": "" }, { "docid": "722db98b13c4414645cbadfb0737d3b3", "score": "0.5075259", "text": "public function edit($id)\n {\n $skill = Skill::find($id);\n return $skill;\n }", "title": "" }, { "docid": "21b1cbbc3fbb50910b046734dd258fba", "score": "0.50747824", "text": "public function get_userSkills(){\n\n $user_id=$this->session->userdata('user_id');\n $profile_type=$this->session->userdata('profile_type');\n \n if(($this->session->userdata('selected_profile_type'))!=''){\n $profile_type=$this->session->userdata('selected_profile_type');\n }\n\t\t//Connection establishment, processing of data and response from REST API\n $path=base_url();\n $url = $path.'api/Dashboard_api/get_userSkills?user_id='.$user_id.'&profile_type='.$profile_type;\t\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_HTTPGET, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $response_json = curl_exec($ch);\n curl_close($ch);\n $response=json_decode($response_json, true);\n return ($response);\t\n}", "title": "" }, { "docid": "2f9a6c9a6e47022220fb76905946d2fc", "score": "0.50544125", "text": "public function __get($pro_name)\n {\n if (isset($this->$pro_name)) {\n return $this->$pro_name;\n } else {\n return '$this->' . $pro_name . ' !!!该属性不存在!!!';\n }\n }", "title": "" }, { "docid": "4a1f32e605ec3ddfc5740cba5aabf71a", "score": "0.5052237", "text": "function get($id){\n $query = $this->database->prepare('SELECT * FROM professions WHERE id=?');\n $query->execute([$id]);\n $profession = $query->fetch(PDO::FETCH_OBJ);\n return $profession;\n }", "title": "" }, { "docid": "1cd135434fafb101dd222f4bbfd68d54", "score": "0.50505054", "text": "function getSkillsParameters()\n{\n session_start();\n //Check if you have obtained a token\n if($_SESSION[\"access_token\"]!=\"\")\n {\n\n $api_URL=\"services/{version}/skills/parameters\";\n\n //Creating the endpoint for the request\n //Appending api uri with the base uri obtained from the successful token request\n $endpoint=$_SESSION[\"resource_server_base_uri\"].$api_URL;\n\n //Creating a HTTP GET request to the api\n $handle = curl_init($endpoint);\n curl_setopt($handle, CURLOPT_HEADER, true);\n\n //Set to TRUE to return the output of curl_exec as a string \n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); \n\n //By default, cURL is setup to not trust any CAs\n //Hence does not support any server's certificate\n //Here we configure cURL to accept any server(peer) certificate\n //Does not verify if the CA is trusted\n //For more security\n //Set the CURLOPT_CAINFO parameter to a CA certificate that cURL should trust\n //curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, true);\n //curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, 2);\n //curl_setopt($handle, CURLOPT_CAINFO, getcwd().\"/cert/certificate.crt\");\n curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);\n\n //Setting necessary header options\n $headers=array();\n $headers[] = 'Content-type: application/x-www-form-urlencoded; charset=utf-8';\n $headers[] = 'Authorization: bearer '.$_SESSION[\"access_token\"];\n $headers[] = 'Accept: application/json, text/javascript, */*; q=0.01';\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n // Make the request \n $response = curl_exec($handle); \n\n //Handling valid response\n if($response!=FALSE)\n {\n $http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n echo \"Status Code of the Response:\".$http_code;\n\t\n //Parsing the response\n //Each property in header is a line by itself.\n //The header and the web page content sent together are separated by \\r\\n\\r\\n\n $parts = explode(\"\\r\\n\\r\\nHTTP/\", $response);\n //For HTTP status code 100 interim responses exists before the final response\n //Getting the final response header using array_pop\n $parts = (count($parts) > 1 ? 'HTTP/' : '').array_pop($parts);\n list($response_headers, $response_body) = explode(\"\\r\\n\\r\\n\", $parts, 2); \n echo \"<br>\"; \n echo \"Response Header:\".$response_headers;\n echo \"<br>\";\n if (!empty($response_body))\n {\n //The Response from the api is in JSON\n //Parsing the json response\n echo \"Response Body:\"; \n //json_decode converts a json string to a PHP variable\n $parsed_json=json_decode($response_body); //Use the response data\n print_r($parsed_json);\n }\n }\n\n // Close the curl session \n curl_close($handle);\n\n //Report all PHP errors (notices, errors, warnings, etc.) \n error_reporting(E_ALL);\n }\n else\n // No token - get one or handle error\n echo \"No access Token\";\n\t}", "title": "" }, { "docid": "348e984bc124e836fd0211ba0782ea3f", "score": "0.5031715", "text": "function getSkills(){\n if($_SESSION[\"access_token\"]!=\"\")\n {\n $api_URL=\"/services/v13.0/skills\";\n //Creating the endpoint for the request\n //Appending api uri with the base uri obtained from the successful token request\n $endpoint=$_SESSION[\"resource_server_base_uri\"].$api_URL;\n //Creating a HTTP GET request to the api\n $handle = curl_init($endpoint);\n curl_setopt($handle, CURLOPT_HEADER, true);\n //Set to TRUE to return the output of curl_exec as a string \n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); \n //By default, cURL is setup to not trust any CAs\n //Hence does not support any server's certificate\n //Here we configure cURL to accept any server(peer) certificate\n //Does not verify if the CA is trusted\n //For more security\n //Set the CURLOPT_CAINFO parameter to a CA certificate that cURL should trust\n //curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, true);\n //curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, 2);\n //curl_setopt($handle, CURLOPT_CAINFO, getcwd().\"/cert/certificate.crt\");\n curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);\n //Setting necessary header options\n $headers=array();\n $headers[] = 'Content-type: application/x-www-form-urlencoded; charset=utf-8';\n $headers[] = 'Authorization: bearer '.$_SESSION[\"access_token\"];\n $headers[] = 'Accept: application/json, text/javascript, */*; q=0.01';\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n // Make the request \n $response = curl_exec($handle); \n //Handling valid response\n if($response!=FALSE)\n {\n $http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n //echo \"Status Code of the Response:\".$http_code;\n\t\n //Parsing the response\n //Each property in header is a line by itself.\n //The header and the web page content sent together are separated by \\r\\n\\r\\n\n $parts = explode(\"\\r\\n\\r\\nHTTP/\", $response);\n //For HTTP status code 100 interim responses exists before the final response\n //Getting the final response header using array_pop\n $parts = (count($parts) > 1 ? 'HTTP/' : '').array_pop($parts);\n list($response_headers, $response_body) = explode(\"\\r\\n\\r\\n\", $parts, 2); \n //echo \"<br>\"; \n //echo \"Response Header:\".$response_headers;\n //echo \"<br>\";\n //echo \"<br>\";\n if (!empty($response_body))\n {\n //The Response from the api is in JSON\n //Parsing the json response\n //echo \"Response Body:\"; \n //json_decode converts a json string to a PHP variable\n $parsed_json=json_decode($response_body); \n //Use the response data\n //print_r($parsed_json);\n\t\tConstructArray('Admin','Skills','GET /skills','v13.0',curl_getinfo($handle, CURLINFO_HTTP_CODE) );\n }\n }\n // Close the curl session \n curl_close($handle);\n //Report all PHP errors (notices, errors, warnings, etc.) \n error_reporting(E_ALL);\n }\n else\n // No token - get one or handle error\n //echo \"No access Token\";\n\tConstructArray('Admin','Skills','GET /skills','v13.0','No access Token');\n}", "title": "" }, { "docid": "7453ba51d090481346f71a231623d0d0", "score": "0.5027637", "text": "public function getExperienceInstructor()\n {\n\t\t$user_session = $this->session->userdata('logged_in');\n\t\t$data['user_session'] = $user_session;\n\t\t$userId = $user_session['user_id'];\n //get logged in User data by instructorAllDetails API \n\t\t$url = base_url().'/instructorApi/getExperienceInstructor/id/'.$userId;\n\t\t$result = curlGet($url);\n\t\t$getUserData = json_decode($result, true);\n\t\treturn $getUserData;\n }", "title": "" }, { "docid": "6b96affb7b70fab7d8698c1fcd64b421", "score": "0.5025266", "text": "function GetSkillInTraining()\n{\n global $cms;\n if($cms->CurrentUser()->IsGuest) return \"\";\n $raw = $cms->APIQuery(\"http://api.eve-online.com/char/SkillInTraining.xml.aspx\");\n if($raw == FALSE) return array(-1, 0, \"\", 0, \"\", \"\");\n \n $xml = new SimpleXMLElement($raw);\n \n if ((int)$xml->error['code'] > 0) return array(-2, $xml->error['code'], $xml->error, 0, \"\", \"\");\n \n $training = ($xml->result->skillInTraining == 1) ? true : false;\n $starttime = $xml->result->trainingStartTime;\n $endtime = $xml->result->trainingEndTime;\n $skillid = $xml->result->trainingTypeID;\n $tolevel = (int)$xml->result->trainingToLevel;\n $cacheduntil = $xml->cachedUntil;\n\n if($training && (strtotime($endtime) - strtotime($cms->GMTTime()) > 0))\n {\n $result = $cms->EveSQL(\"SELECT typeName FROM invTypes WHERE typeID=\".$skillid);\n if(mysql_num_rows($result) == 0) \n $skillname = \"Unknown Skill (TypeID = \".$skillid.\")\";\n else\n $skillname = mysql_result($result, 0);\n \n $seconds = strtotime($endtime) - strtotime($cms->GMTTime());\n return array(1, $seconds, $skillname, $tolevel, $cms->GMTToLocal($endtime), $cms->GMTToLocal($cacheduntil));\n }\n else\n return array(0, 0, \"\", 0, \"\", $cms->GMTToLocal($cacheduntil));\n}", "title": "" }, { "docid": "fb1088c804c318a5a31fc89d91c2ed3b", "score": "0.50227016", "text": "function getSkillsSkillIdParameters($skillId)\n{\n session_start();\n //Check if you have obtained a token\n if($_SESSION[\"access_token\"]!=\"\")\n {\n\n $api_URL='services/{version}/skills/'.$skillId.'/parameters';\n\n //Creating the endpoint for the request\n //Appending api uri with the base uri obtained from the successful token request\n $endpoint=$_SESSION[\"resource_server_base_uri\"].$api_URL;\n\n //Creating a HTTP GET request to the api\n $handle = curl_init($endpoint);\n curl_setopt($handle, CURLOPT_HEADER, true);\n\n //Set to TRUE to return the output of curl_exec as a string \n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); \n\n //By default, cURL is setup to not trust any CAs\n //Hence does not support any server's certificate\n //Here we configure cURL to accept any server(peer) certificate\n //Does not verify if the CA is trusted\n //For more security\n //Set the CURLOPT_CAINFO parameter to a CA certificate that cURL should trust\n //curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, true);\n //curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, 2);\n //curl_setopt($handle, CURLOPT_CAINFO, getcwd().\"/cert/certificate.crt\");\n curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);\n\n //Setting necessary header options\n $headers=array();\n $headers[] = 'Content-type: application/x-www-form-urlencoded; charset=utf-8';\n $headers[] = 'Authorization: bearer '.$_SESSION[\"access_token\"];\n $headers[] = 'Accept: application/json, text/javascript, */*; q=0.01';\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n // Make the request \n $response = curl_exec($handle); \n\n //Handling valid response\n if($response!=FALSE)\n {\n $http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n echo \"Status Code of the Response:\".$http_code;\n\t\n //Parsing the response\n //Each property in header is a line by itself.\n //The header and the web page content sent together are separated by \\r\\n\\r\\n\n $parts = explode(\"\\r\\n\\r\\nHTTP/\", $response);\n //For HTTP status code 100 interim responses exists before the final response\n //Getting the final response header using array_pop\n $parts = (count($parts) > 1 ? 'HTTP/' : '').array_pop($parts);\n list($response_headers, $response_body) = explode(\"\\r\\n\\r\\n\", $parts, 2); \n echo \"<br>\"; \n echo \"Response Header:\".$response_headers;\n echo \"<br>\";\n if (!empty($response_body))\n {\n //The Response from the api is in JSON\n //Parsing the json response\n echo \"Response Body:\"; \n //json_decode converts a json string to a PHP variable\n $parsed_json=json_decode($response_body); //Use the response data\n print_r($parsed_json);\n }\n }\n\n // Close the curl session \n curl_close($handle);\n\n //Report all PHP errors (notices, errors, warnings, etc.) \n error_reporting(E_ALL);\n }\n else\n // No token - get one or handle error\n echo \"No access Token\";\n\t}", "title": "" }, { "docid": "e93ef6de88d3564eb8f44c7964397129", "score": "0.4985141", "text": "public function get_quest($quest_url)\t{\r\n\t\treturn Model_Quest::get_user_quest($this->id, $quest_url);\r\n\t}", "title": "" }, { "docid": "62d2b8566820c46cba5070074d8fec0b", "score": "0.49721536", "text": "protected function getSkill()\n {\n $names = [\n 'PHP',\n 'Java',\n 'JavaScript',\n ];\n $subnames = [\n 'PHP 7.4',\n 'JDK 12',\n 'JS V8',\n ];\n $index = random_int(0, count($names) - 1);\n return [\n 'name_en' => $names[$index] . ' '.\\Str::random(2),\n 'name_fr' => $names[$index]. ' '.\\Str::random(2),\n 'subname_en' => $subnames[$index],\n 'subname_fr' => $subnames[$index],\n ];\n }", "title": "" }, { "docid": "b42a974c14b550f9de954f40a41a57f6", "score": "0.49650347", "text": "public function skills() {\r\n $data['header']['title'] = 'Skills Information';\r\n $data['footer']['scripts']['homescript.js'] = 'home';\r\n $data['user'] = $this->flexi_auth->get_user_by_identity_row_array();\r\n $data['content'] = 'profile/skills_add_view';\r\n $data['view_data']['people_skills'] = $this->Profile_model->get_people_skills($this->session->userdata('id_number'));\r\n $data['view_data']['data_skills'] = $this->Profile_model->get_data_skills($this->session->userdata('id_number'));\r\n $data['view_data']['transferable_skills'] = $this->Profile_model->get_transferable_skills($this->session->userdata('id_number'));\r\n $data['view_data']['word_skills'] = $this->Profile_model->get_word_skills($this->session->userdata('id_number'));\r\n $data['view_data']['artistic_skills'] = $this->Profile_model->get_artistic_skills($this->session->userdata('id_number'));\r\n $data['view_data']['other_skills'] = $this->Profile_model->get_other_skills($this->session->userdata('id_number'));\r\n $data['view_data']['leadership_skills'] = $this->Profile_model->get_leadership_skills($this->session->userdata('id_number'));\r\n\r\n $this->load->view('layout/layout', $data);\r\n }", "title": "" }, { "docid": "379c1bcc5249cd833016a54f972fb8df", "score": "0.49592242", "text": "private function get_params($skills) {\n // 3 skills indentifiers\n $X1 = new SkillStats(false, 1, 1);\n $X2 = new SkillStats(false, 2, 1);\n $X3 = new SkillStats(false, 3, 0);\n \n foreach($skills as $skill) {\n $skill_identifier = $skill->dmg_multiplier();\n\n $operation = $skill_identifier->get_operation();\n $quantity = $skill_identifier->get_quantity();\n \n if ($operation == 1) {\n $X1->set_qunatity($X1->get_quantity() * $quantity);\n }\n\n if ($operation == 2) {\n $X2->set_qunatity($X2->get_quantity() * $quantity);\n }\n\n if ($operation == 3) {\n $X3->set_qunatity($X3->get_quantity() + $quantity);\n }\n }\n\n return array($X1, $X2, $X3);\n \n }", "title": "" }, { "docid": "7c891278b8d5e54a4e23f8505b4c3fa2", "score": "0.49547789", "text": "public function adviceSlip(): string\n {\n $advice = Cache::get($this->cacheKey);\n if (is_null($advice)) {\n $client = new Client();\n $response = null;\n try {\n $response = $client->get($this->adviceSlipUrl);\n } catch (ConnectException $exception) {\n Log::warning(\n 'Could not connect to advice slip api.',\n ['eMessage' => $exception->getMessage()]\n );\n } catch (\\Exception $exception) {\n Log::error(\n 'Failed connection to advice slip api',\n ['eMessage' => $exception->getMessage()]\n );\n }\n if (! is_null($response)) {\n $advice = $this->parseResponse($response);\n }\n }\n\n return is_string($advice) ? $advice : '';\n }", "title": "" }, { "docid": "58a814986f3b9d11c865049ecfb04ed2", "score": "0.49492952", "text": "function _samples() {\n if (!$this->has_arg('prop')) $this->_error('No proposal specified');\n \n $args = array($this->proposalid);\n $where = 'pr.proposalid=:1';\n $having = '';\n $join = '';\n \n # For a specific project\n if ($this->has_arg('pjid')) {\n $args = array($this->arg('pjid'));\n $where = '(pj.projectid=:'.sizeof($args).')';\n $join = ' LEFT OUTER JOIN ispyb4a_db.project_has_blsample pj ON pj.blsampleid=b.blsampleid';\n \n if (!$this->staff) {\n $join .= \" INNER JOIN ispyb4a_db.blsession ses ON ses.proposalid = p.proposalid INNER JOIN investigation@DICAT_RO i ON lower(i.visit_id) LIKE p.proposalcode || p.proposalnumber || '-' || ses.visit_number INNER JOIN investigationuser@DICAT_RO iu on i.id = iu.investigation_id inner join user_@DICAT_RO u on u.id = iu.user_id\";\n $where .= \" AND u.name=:\".(sizeof($args)+1);\n array_push($args, phpCAS::getUser());\n }\n \n if ($this->has_arg('imp')) {\n if ($this->arg('imp')) {\n array_push($args, $this->arg('pjid'));\n $join .= ' LEFT OUTER JOIN ispyb4a_db.project_has_protein pji ON pji.proteinid=pr.proteinid';\n $where = preg_replace('/\\(pj/', '(pji.projectid=:'.sizeof($args).' OR pj', $where);\n }\n }\n }\n \n # For a specific protein\n if ($this->has_arg('pid')) {\n $where .= ' AND pr.proteinid=:'.(sizeof($args)+1);\n array_push($args, $this->arg('pid'));\n }\n \n # For a specific container\n if ($this->has_arg('cid')) {\n $where .= ' AND c.containerid=:'.(sizeof($args)+1);\n array_push($args, $this->arg('cid'));\n }\n \n # For a particular sample\n if ($this->has_arg('sid')) {\n $where .= ' AND b.blsampleid=:'.(sizeof($args)+1);\n array_push($args, $this->arg('sid')); \n }\n \n \n # For a visit\n if ($this->has_arg('visit')) {\n $info = $this->db->pq(\"SELECT s.beamlinename as bl FROM ispyb4a_db.blsession s INNER JOIN ispyb4a_db.proposal p ON p.proposalid = s.proposalid WHERE p.proposalcode || p.proposalnumber || '-' || s.visit_number LIKE :1\", array($this->arg('visit')));\n \n if (!sizeof($info)) $this->_error('No such visit');\n else $info = $info[0];\n \n $where .= \" AND d.dewarstatus='processing' AND c.beamlinelocation LIKE :\".(sizeof($args)+1).\" AND c.samplechangerlocation is NOT NULL\";\n array_push($args, $info['BL']);\n }\n \n $sta = $this->has_arg('iDisplayStart') ? $this->arg('iDisplayStart') : 0;\n $len = $this->has_arg('iDisplayLength') ? $this->arg('iDisplayLength') : 20;\n \n $tot = $this->db->pq(\"SELECT count(distinct b.blsampleid) as tot FROM ispyb4a_db.blsample b INNER JOIN ispyb4a_db.crystal cr ON cr.crystalid = b.crystalid INNER JOIN ispyb4a_db.protein pr ON pr.proteinid = cr.proteinid INNER JOIN ispyb4a_db.proposal p ON p.proposalid = pr.proposalid INNER JOIN ispyb4a_db.container c ON c.containerid = b.containerid INNER JOIN ispyb4a_db.dewar d ON d.dewarid = c.dewarid $join WHERE $where\", $args);\n $tot = $tot[0]['TOT'];\n \n \n // Search\n if ($this->has_arg('sSearch')) {\n $st = sizeof($args) + 1;\n $where .= \" AND (lower(b.name) LIKE lower('%'||:\".$st.\"||'%') OR lower(pr.acronym) LIKE lower('%'||:\".($st+1).\"||'%') OR lower(b.comments) LIKE lower('%'||:\".($st+2).\"||'%'))\";\n for ($i = 0; $i < 3; $i++) array_push($args, $this->arg('sSearch'));\n }\n \n \n // Filter by sample status\n if ($this->has_arg('t')) {\n //$this->db->set_debug(true);\n $types = array('R' => 'count(distinct r.robotactionid)',\n 'SC' => 'count(distinct dc.datacollectionid)',\n 'AI' => 'count(distinct so.screeningid)',\n 'DC' => 'count(distinct dc2.datacollectionid)',\n 'AP' => 'count(distinct ap.autoprocintegrationid)');\n if (array_key_exists($this->arg('t'), $types)) {\n $having .= \" HAVING \".$types[$this->arg('t')].\" > 0\";\n }\n }\n \n \n #SELECT count(distinct b.blsampleid) as tot \n $flt = $this->db->pq(\"SELECT count(blsampleid) as tot FROM (SELECT b.blsampleid, count(distinct dc.datacollectionid) as sc, count(distinct dc2.datacollectionid) as dc, count(distinct so.screeningid) as ai, count(distinct ap.autoprocintegrationid) as ap, count(distinct r.robotactionid) as r FROM ispyb4a_db.blsample b INNER JOIN ispyb4a_db.crystal cr ON cr.crystalid = b.crystalid INNER JOIN ispyb4a_db.protein pr ON pr.proteinid = cr.proteinid INNER JOIN ispyb4a_db.proposal p ON p.proposalid = pr.proposalid INNER JOIN ispyb4a_db.container c ON c.containerid = b.containerid INNER JOIN ispyb4a_db.dewar d ON d.dewarid = c.dewarid $join LEFT OUTER JOIN ispyb4a_db.datacollection dc ON b.blsampleid = dc.blsampleid AND dc.overlap != 0 LEFT OUTER JOIN ispyb4a_db.screening sc ON dc.datacollectionid = sc.datacollectionid LEFT OUTER JOIN ispyb4a_db.screeningoutput so ON sc.screeningid = so.screeningid LEFT OUTER JOIN ispyb4a_db.datacollection dc2 ON b.blsampleid = dc2.blsampleid AND dc2.overlap = 0 AND dc2.axisrange > 0 LEFT OUTER JOIN ispyb4a_db.autoprocintegration ap ON ap.datacollectionid = dc2.datacollectionid LEFT OUTER JOIN ispyb4a_db.robotaction r ON r.blsampleid = b.blsampleid AND r.actiontype = 'LOAD' WHERE $where GROUP BY b.blsampleid $having)\", $args);\n \n #print_r(array(sizeof($flt), $flt));\n $flt = $flt[0]['TOT'];\n \n $st = sizeof($args) + 1;\n array_push($args, $sta);\n array_push($args, $sta+$len);\n \n $order = 'b.blsampleid DESC';\n \n \n if ($this->has_arg('iSortCol_0')) {\n $cols = array('b.blsampleid', 'b.name', 'pr.acronym', 'cr.spacegroup', 'b.comments', 'shipment', 'dewar', 'container', 'b.blsampleid', 'sc', 'scresolution', 'ap', 'dcresolution', 'TO_NUMBER(location)');\n $dir = $this->has_arg('sSortDir_0') ? ($this->arg('sSortDir_0') == 'asc' ? 'ASC' : 'DESC') : 'ASC';\n if ($this->arg('iSortCol_0') < sizeof($cols)) $order = $cols[$this->arg('iSortCol_0')].' '.$dir;\n }\n \n if ($this->has_arg('sort_by')) {\n $order = $this->arg('sort_by') .' '.($this->has_arg('order') ? $this->arg('order') : 'asc');\n }\n \n $rows = $this->db->pq(\"SELECT outer.* FROM (SELECT ROWNUM rn, inner.* FROM (\n SELECT distinct b.blsampleid, b.code, b.location, pr.acronym, pr.proteinid, cr.spacegroup,b.comments,b.name,s.shippingname as shipment,s.shippingid,d.dewarid,d.code as dewar, c.code as container, c.containerid, c.samplechangerlocation as sclocation, count(distinct dc.datacollectionid) as sc, count(distinct dc2.datacollectionid) as dc, count(distinct so.screeningid) as ai, count(distinct ap.autoprocintegrationid) as ap, count(distinct r.robotactionid) as r, min(st.rankingresolution) as scresolution, max(ssw.completeness) as sccompleteness, min(dc.datacollectionid) as scid, min(dc2.datacollectionid) as dcid, min(apss.resolutionlimithigh) as dcresolution, max(apss.completeness) as dccompleteness\n \n \n FROM ispyb4a_db.blsample b\n INNER JOIN ispyb4a_db.crystal cr ON cr.crystalid = b.crystalid\n INNER JOIN ispyb4a_db.protein pr ON pr.proteinid = cr.proteinid\n INNER JOIN ispyb4a_db.container c ON b.containerid = c.containerid\n INNER JOIN ispyb4a_db.dewar d ON d.dewarid = c.dewarid\n INNER JOIN ispyb4a_db.shipping s ON s.shippingid = d.shippingid\n INNER JOIN ispyb4a_db.proposal p ON p.proposalid = pr.proposalid\n $join\n \n LEFT OUTER JOIN ispyb4a_db.datacollection dc ON b.blsampleid = dc.blsampleid AND dc.overlap != 0\n LEFT OUTER JOIN ispyb4a_db.screening sc ON dc.datacollectionid = sc.datacollectionid\n LEFT OUTER JOIN ispyb4a_db.screeningoutput so ON sc.screeningid = so.screeningid\n \n LEFT OUTER JOIN ispyb4a_db.screeningstrategy st ON st.screeningoutputid = so.screeningoutputid AND sc.shortcomments LIKE '%EDNA%'\n LEFT OUTER JOIN ispyb4a_db.screeningstrategywedge ssw ON ssw.screeningstrategyid = st.screeningstrategyid\n \n \n LEFT OUTER JOIN ispyb4a_db.datacollection dc2 ON b.blsampleid = dc2.blsampleid AND dc2.overlap = 0 AND dc2.axisrange > 0\n LEFT OUTER JOIN ispyb4a_db.autoprocintegration ap ON ap.datacollectionid = dc2.datacollectionid\n \n LEFT OUTER JOIN ispyb4a_db.autoprocscaling_has_int aph ON aph.autoprocintegrationid = ap.autoprocintegrationid\n LEFT OUTER JOIN ispyb4a_db.autoprocscalingstatistics apss ON apss.autoprocscalingid = aph.autoprocscalingid\n \n \n LEFT OUTER JOIN ispyb4a_db.robotaction r ON r.blsampleid = b.blsampleid AND r.actiontype = 'LOAD'\n \n WHERE $where\n \n GROUP BY b.blsampleid, b.code, b.location, pr.acronym, pr.proteinid, cr.spacegroup,b.comments,b.name,s.shippingname,s.shippingid,d.dewarid,d.code, c.code, c.containerid, c.samplechangerlocation\n \n $having\n \n ORDER BY $order\n ) inner) outer WHERE outer.rn > :$st AND outer.rn <= :\".($st+1), $args);\n \n $data = array();\n foreach ($rows as &$r) {\n $snap = '';\n if ($r['DCID'] || $r['SCID']) {\n $id = $r['DCID'] ? $r['DCID'] : $r['SCID'];\n $snap = '<a href=\"/dc/id/'.$id.'\"><image class=\"img\" src=\"/image/id/'.$id.'\" title=\"Crystal Snapshot 1\" /><image class=\"img\" src=\"/image/n/2/id/'.$id.'\" title=\"Crystal Snapshot 2\" /></a>';\n }\n\n $st = '';\n foreach (array('R', 'SC', 'AI', 'DC', 'AP') as $t) {\n if ($r[$t] > 0) $st = $t;\n }\n \n if ($st) $st = '<ul class=\"status\"><li class=\"'.$st.'\"></li></ul>';\n \n array_push($data, array($r['BLSAMPLEID'], $r['NAME'], '<a href=\"/sample/proteins/pid/'.$r['PROTEINID'].'\">'.$r['ACRONYM'].'</a>', $r['SPACEGROUP'], $r['COMMENTS'], '<a href=\"/shipment/sid/'.$r['SHIPPINGID'].'\">'.$r['SHIPMENT'].'</a>', $r['DEWAR'], '<a href=\"/shipment/cid/'.$r['CONTAINERID'].'\">'.$r['CONTAINER'].'</a>', $snap, $r['SC'], $r['SCRESOLUTION'], $r['DC'], $r['DCRESOLUTION'], $st,'<a class=\"view\" title=\"View Sample\" href=\"/sample/sid/'.$r['BLSAMPLEID'].'\">View Sample</a> <button class=\"atp\" ty=\"sample\" iid=\"'.$r['BLSAMPLEID'].'\" name=\"'.$r['NAME'].'\">Add to Project</button>'));\n }\n \n if ($this->has_arg('sid')) {\n if (sizeof($rows))$this->_output($rows[0]);\n else $this->_error('No such sample');\n } else $this->_output(array('iTotalRecords' => $tot,\n 'iTotalDisplayRecords' => $flt,\n 'aaData' => $this->has_arg('array') ? $rows : $data,\n )); \n }", "title": "" }, { "docid": "126d26473be4ad88539b6b3dfe725c53", "score": "0.49375296", "text": "public function getObjective()\n {\n return $this->objective;\n }", "title": "" }, { "docid": "b1d26b576a1b66d9f494a6cdc3c1bfe9", "score": "0.49235594", "text": "public function edit(Skill $skill)\n {\n //\n }", "title": "" }, { "docid": "9d632421368729784511f402a89cdaac", "score": "0.4919429", "text": "function consultar_skills(){\n\t\t//Conectar a la BD\n\t\tglobal $mysqli;\n\t\t//Realizar consulta\n\t\t$sql = \"SELECT * FROM skills\";\n\t\t$rsl = $mysqli->query($sql);\n\t\t$array = [];\n\t\twhile ($row = mysqli_fetch_array($rsl)) {\n\t\t\tarray_push($array, $row);\n\t\t}\n\t\techo json_encode($array); //Imprime Json encodeado\t\t\n\t}", "title": "" }, { "docid": "7e047d6303bac3c0962839effbcf8d0c", "score": "0.49192253", "text": "function getSkillId($getId,$tableName,$attribute,$attribueValue) // select id from user where skill='c';\n\t\t{\n\t\t\t\t\t$query = \"SELECT * FROM $tableName WHERE $attribute='$attribueValue'\";\n\t\t\t\t\t//echo $query;\n\t\t\tif($result=$GLOBALS['dbms_obj']->query($query))\n\t\t\t{\n\t\t\t\t$row = $result->fetch_assoc();\n\t\t\t\t\t\t////skillId\n\t\t\t\tif($row[\"$getId\"])\n\t\t\t\t{\n\t\t\t\t\t\t\t\t//skillId\t\n\t\t\t\t\treturn $row[\"$getId\"];\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "9c8716baf0783941c12795ccfad9566b", "score": "0.4907468", "text": "public function getAutocompletePropietario()\n {\n $options = array(\n 'repository' => \"SistemaPerroEncontradoBundle:Propietario\",\n 'field' => \"id\",\n );\n $response = parent::getAutocompleteFormsMwsAction($options);\n\n return $response;\n }", "title": "" }, { "docid": "eeb7df8f4f274014e45da6b1d2217dbf", "score": "0.49037054", "text": "public function edit(Proposal $proposal)\n {\n //\n }", "title": "" }, { "docid": "909f4d39b637e89180a3443fe08ca070", "score": "0.4898923", "text": "function _proteins() {\n if (!$this->has_arg('prop')) $this->_error('No proposal specified');\n \n $args = array($this->proposalid);\n $where = 'pr.proposalid=:1';\n $join = '';\n \n if ($this->has_arg('pjid')) {\n $args = array($this->arg('pjid'));\n $where = 'pj.projectid=:'.sizeof($args);\n $join .= ' INNER JOIN ispyb4a_db.project_has_protein pj ON pj.proteinid=pr.proteinid';\n \n if (!$this->staff) {\n $join .= \" INNER JOIN ispyb4a_db.proposal p ON p.proposalid = pr.proposalid INNER JOIN ispyb4a_db.blsession s ON s.proposalid = p.proposalid INNER JOIN investigation@DICAT_RO i ON lower(i.visit_id) LIKE p.proposalcode || p.proposalnumber || '-' || s.visit_number INNER JOIN investigationuser@DICAT_RO iu on i.id = iu.investigation_id inner join user_@DICAT_RO u on u.id = iu.user_id \";\n $where .= \" AND u.name=:\".(sizeof($args)+1);\n array_push($args, phpCAS::getUser());\n }\n }\n \n if ($this->has_arg('pid')) {\n $where .= ' AND pr.proteinid=:'.(sizeof($args)+1);\n array_push($args, $this->arg('pid'));\n }\n \n $sta = $this->has_arg('iDisplayStart') ? $this->arg('iDisplayStart') : 0;\n $len = $this->has_arg('iDisplayLength') ? $this->arg('iDisplayLength') : 20;\n \n $tot = $this->db->pq(\"SELECT count(distinct pr.proteinid) as tot FROM ispyb4a_db.protein pr $join WHERE $where\", $args);\n $tot = $tot[0]['TOT'];\n\n if ($this->has_arg('sSearch')) {\n $st = sizeof($args) + 1;\n $where .= \" AND (lower(pr.name) LIKE lower('%'||:\".$st.\"||'%') OR lower(pr.acronym) LIKE lower('%'||:\".($st+1).\"||'%'))\";\n for ($i = 0; $i < 2; $i++) array_push($args, $this->arg('sSearch'));\n }\n \n $flt = $this->db->pq(\"SELECT count(distinct pr.proteinid) as tot FROM ispyb4a_db.protein pr $join WHERE $where\", $args);\n $flt = $flt[0]['TOT'];\n\n \n $st = sizeof($args) + 1;\n array_push($args, $sta);\n array_push($args, $sta+$len);\n \n $order = 'pr.proteinid DESC';\n \n \n if ($this->has_arg('iSortCol_0')) {\n $cols = array('pr.name', 'pr.acronym', 'pr.molecularmass', 'DBMS_LOB.SUBSTR(pr.sequence,255,1)');\n $dir = $this->has_arg('sSortDir_0') ? ($this->arg('sSortDir_0') == 'asc' ? 'ASC' : 'DESC') : 'ASC';\n if ($this->arg('iSortCol_0') < sizeof($cols)) $order = $cols[$this->arg('iSortCol_0')].' '.$dir;\n }\n \n $rows = $this->db->pq(\"SELECT outer.* FROM (SELECT ROWNUM rn, inner.* FROM (\n SELECT distinct DBMS_LOB.SUBSTR(pr.sequence,255,1) as sequence, pr.proteinid,pr.name,pr.acronym,pr.molecularmass/*, count(distinct b.blsampleid) as scount, count(distinct dc.datacollectionid) as dcount*/ FROM ispyb4a_db.protein pr\n /*LEFT OUTER JOIN ispyb4a_db.crystal cr ON cr.proteinid = pr.proteinid\n LEFT OUTER JOIN ispyb4a_db.blsample b ON b.crystalid = cr.crystalid\n LEFT OUTER JOIN ispyb4a_db.datacollection dc ON b.blsampleid = dc.blsampleid*/\n $join\n WHERE $where\n GROUP BY pr.proteinid,pr.name,pr.acronym,pr.molecularmass, DBMS_LOB.SUBSTR(pr.sequence,255,1)\n ORDER BY $order\n ) inner) outer WHERE outer.rn > :$st AND outer.rn <= :\".($st+1), $args);\n \n $ids = array();\n $wcs = array();\n foreach ($rows as $r) {\n array_push($ids, $r['PROTEINID']);\n array_push($wcs, 'pr.proteinid=:'.sizeof($ids));\n }\n \n $dcs = array();\n $scs = array();\n \n if (sizeof($ids)) {\n $dcst = $this->db->pq('SELECT pr.proteinid, count(dc.datacollectionid) as dcount FROM datacollection dc INNER JOIN ispyb4a_db.blsample s ON s.blsampleid=dc.blsampleid INNER JOIN ispyb4a_db.crystal cr ON cr.crystalid = s.crystalid INNER JOIN ispyb4a_db.protein pr ON pr.proteinid = cr.proteinid WHERE '.implode(' OR ', $wcs).' GROUP BY pr.proteinid', $ids);\n\n \n foreach ($dcst as $d) {\n $dcs[$d['PROTEINID']] = $d['DCOUNT'];\n }\n\n $scst = $this->db->pq('SELECT pr.proteinid, count(s.blsampleid) as scount FROM ispyb4a_db.blsample s INNER JOIN ispyb4a_db.crystal cr ON cr.crystalid = s.crystalid INNER JOIN ispyb4a_db.protein pr ON pr.proteinid = cr.proteinid WHERE '.implode(' OR ', $wcs).' GROUP BY pr.proteinid', $ids);\n\n foreach ($scst as $d) {\n $scs[$d['PROTEINID']] = $d['SCOUNT'];\n }\n }\n \n $data = array();\n foreach ($rows as &$r) {\n $dcount = array_key_exists($r['PROTEINID'], $dcs) ? $dcs[$r['PROTEINID']] : 0;\n $r['DCOUNT'] = $dcount;\n $scount = array_key_exists($r['PROTEINID'], $scs) ? $scs[$r['PROTEINID']] : 0;\n $r['SCOUNT'] = $scount;\n array_push($data, array('<span class=\"id\" value=\"'.$r['PROTEINID'].'\"></span>'.$r['NAME'], $r['ACRONYM'], $r['MOLECULARMASS'], $r['SEQUENCE'] ? 'Yes' : 'No', $scount, $dcount, '<a class=\"view\" title=\"View Protein Details\" href=\"/sample/proteins/pid/'.$r['PROTEINID'].'\">View Protein</a> <button class=\"atp\" ty=\"protein\" iid=\"'.$r['PROTEINID'].'\" name=\"'.$r['NAME'].'\">Add to Project</button>'));\n }\n \n if ($this->has_arg('pid')) {\n if (sizeof($rows))$this->_output($rows[0]);\n else $this->_error('No such protein');\n } else $this->_output(array('iTotalRecords' => $tot,\n 'iTotalDisplayRecords' => $flt,\n 'aaData' => $this->has_arg('array') ? $rows : $data,\n )); \n }", "title": "" }, { "docid": "ae360d225d34f9d80d39abb35b2020ea", "score": "0.48923555", "text": "public function getSkills() {\n $skills = array();\n foreach ($this->skillType as $skillType) {\n $skills = array_merge($skills, $skillType->getSkills());\n }\n return $skills;\n }", "title": "" }, { "docid": "3799d05e049fe3edbe6010cf3030625e", "score": "0.48919693", "text": "function retrieveTarget($id){\n $query = \"SELECT related_id, related_type FROM prospect_lists_prospects WHERE id = '\".$this->db->quote($id).\"'\";\n $result = $this->db->query($query);\n if(($row = $this->db->fetchByAssoc($result))){\n return BeanFactory::retrieveBean($row['related_type'], $row['related_id']);\n }else{\n return null;\n }\n }", "title": "" }, { "docid": "a02cbec7fed43bc7367fb34f3f474078", "score": "0.48830298", "text": "function getSkillForLevelId($a_level_id)\n\t{\n\t\tglobal $ilDB;\n\n\t\t$set = $ilDB->query(\"SELECT * FROM skl_level WHERE \".\n\t\t\t\" id = \".$ilDB->quote($a_level_id, \"integer\")\n\t\t\t);\n\t\t$skill = null;\n\t\tif ($rec = $ilDB->fetchAssoc($set))\n\t\t{\n\t\t\tif (ilSkillTreeNode::isInTree($rec[\"skill_id\"]))\n\t\t\t{\n\t\t\t\t$skill = new ilBasicSkill($rec[\"skill_id\"]);\n\t\t\t}\n\t\t}\n\t\treturn $skill;\n\t}", "title": "" }, { "docid": "2815368bf121d9cda774601e17fe30a9", "score": "0.4877975", "text": "public function read_proposal_count($user_id,$as_proposer=FALSE)\n {\n if($as_proposer)\n {\n $query=$this->db->query(\"SELECT COUNT(*)\n FROM Skill \n INNER JOIN User_Skill \n ON Skill.skill_id=User_Skill.skill_id \n INNER JOIN Offer_Skill\n ON User_Skill.user_skill_id=Offer_Skill.user_skill_id\n INNER JOIN Skill_Proposal\n ON Offer_Skill.Offer_skill_id=Skill_Proposal.offer_skill_id \n WHERE User_Skill.user_id=\".$user_id); \n \n \n $proposal_count_as_offerer=$query->result_array();\n \n return $proposal_count_as_offerer[0]['COUNT(*)']; \n }\n \n\n $query=$this->db->query(\"SELECT COUNT(*)\n FROM Skill \n INNER JOIN User_Skill \n ON Skill.skill_id=User_Skill.skill_id \n INNER JOIN Initial_Skill\n ON User_Skill.user_skill_id=Initial_Skill.user_skill_id\n INNER JOIN Skill_Proposal\n ON Initial_Skill.initial_skill_id=Skill_Proposal.initial_skill_id \n WHERE User_Skill.user_id=\".$user_id); \n\n \n $proposal_count_as_initiator=$query->result_array();\n return $proposal_count_as_initiator[0]['COUNT(*)'];\n }", "title": "" }, { "docid": "93b03c5521ba9f7408b1cfb6029df3d3", "score": "0.48779434", "text": "public function getSkillList() {\n\t\treturn $this->Skills()->sort('SortOrder');\n\t}", "title": "" }, { "docid": "6e7275c3cc9b4987320f3a60a080ea90", "score": "0.48753682", "text": "public function getPolicyText();", "title": "" }, { "docid": "b415cda3a6a19118b91f841c6f480ae2", "score": "0.48735997", "text": "function getQuestion() {\n\t\treturn $this->getQuestionRelatedByQuestionId();\n\t}", "title": "" }, { "docid": "b9b04b18b2e73e7aad53c55423d6456f", "score": "0.48685622", "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": "2704edcc552ebddb2e70476c9988bcdf", "score": "0.48561507", "text": "function get_skills(){\n $skill_array = array();\n \n $sql = \"SELECT * FROM Skill\";\n $res = mysql_query($sql);\n while($data = mysql_fetch_assoc($res)){\n $skill_name = $data['name'];\n $skill_array[] = $skill_name;\n }\n // so either the array's not getting updated or it's not being printed properly\n return $skill_array;\n}", "title": "" }, { "docid": "068ab6f947614184027fe97029ec3737", "score": "0.48360214", "text": "public function show(Proposal $proposal)\n {\n //\n if( (Auth::user()->id != $proposal->user_id) && (Auth::user()->id == $proposal->project->user_id) ){\n\n $data['seen'] = \"yes\";\n\n $proposal->update($data);\n }\n\n $jobInstance = $proposal;\n return view('layouts.regusers.proposal.show', compact('jobInstance'));\n }", "title": "" }, { "docid": "9cd5bc64ea567254d9590c9b627b7435", "score": "0.4834408", "text": "private function get_skills_that_have_chance($skills) {\n $res = array();\n $skills_string = \"\";\n foreach($skills as &$skill) {\n if($this->get_chance_to_hit() <= $skill->get_chance()) {\n $skills_string = $skills_string . $skill->get_name() . \"; \";\n array_push($res, $skill);\n }\n }\n if ($skills_string != \"\") {\n echo \"<h4 style='color:brown'> Orderus uses this round: \" . $skills_string . ' </h4> </br>';\n }\n return $res;\n }", "title": "" }, { "docid": "631d05df64760ac863940fb49c5ed8a9", "score": "0.48301592", "text": "function getByName($name){\n $query = $this->database->prepare('SELECT * FROM professions WHERE profesion=?');\n $query->execute([$name]);\n $profession = $query->fetch(PDO::FETCH_OBJ);\n return $profession;\n }", "title": "" }, { "docid": "06f0b3d9f53d0478806b95dbce38951f", "score": "0.48248252", "text": "public function getById($quest_id);", "title": "" }, { "docid": "cebc531193c87419dfc85642bc9ee105", "score": "0.4819569", "text": "public function getResearchExperienceAttribute()\n {\n return $this->getAttributeFromArray($this->researchExperienceKey());\n }", "title": "" }, { "docid": "1ba1b8ba57b152d955034e1586081754", "score": "0.48178855", "text": "public function addProposal($data){\n\n $proposal = new Proposals();\n $proposal->city_id =$data['parentId'];\n $proposal->author = $data['author'];\n $proposal->name = $data['name'] ;\n $proposal->position = new Point($data['lat'], $data['lng']);\n $proposal->atli = $data['atli'];\n $proposal->save();\n\n return $proposal;\n\n\n }", "title": "" }, { "docid": "2311728cce6b5f18aed84a2ba60fb9ae", "score": "0.4817203", "text": "public function retrieveExperience($id)\n {\n MyLogger2::info(\"Entering ExperienceBusinessService.retrieveExperience()\");\n $servername = config(\"database.connections.mysql.host\");\n $port = config(\"database.connections.mysql.port\");\n $username = config(\"database.connections.mysql.username\");\n $password = config(\"database.connections.mysql.password\");\n $dbname = config(\"database.connections.mysql.database\");\n \n $db = new PDO(\"mysql:host=$servername;port=$port;dbname=$dbname\", $username, $password);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \n $dbService = new ExperienceDataService($db);\n $profileInfo = $dbService->read($id);\n //in PDO you \"close\" the database connection by setting the PDO object to null\n $db = null;\n MyLogger2::info(\"Exiting ExperienceBusinessService.retrieveExperience()\");\n return $profileInfo;\n }", "title": "" }, { "docid": "43db6f80717cf2a7f0e211a846e76190", "score": "0.48112032", "text": "public function showDetails($id){\n\n return response(Proposal::select(\n 'proposals.id_proposal', 'proposals.name', 'schools.name AS school_name', 'proposals.description',\n 'proposals.professional_family', 'proposals.category', 'proposals.created_at', 'proposals.limit_date', 'proposals.id_author',\n 'proposals.updated_at', 'users.username', 'users.logo_entity', 'proposals.status'\n )\n ->join('users', 'users.id', '=', 'proposals.id_author')\n ->join('school_users', 'school_users.id_user', '=', 'users.id')\n ->join('schools', 'schools.id_school', '=', 'school_users.id_school')\n ->where('proposals.id_proposal', $id)\n ->get()\n ->jsonSerialize());\n }", "title": "" }, { "docid": "137181f5bd30bccbed3ebc13e38599c1", "score": "0.48104522", "text": "public function update_proposal_status_as_complete($skill_proposal_id)\n {\n $data = array(\n 'status' => 'complete');\n \n $this->db->where('skill_proposal_id', $skill_proposal_id);\n return $this->db->update('Skill_Proposal', $data);\n }", "title": "" }, { "docid": "35365d63ef2e42167c7fc716e2d8fe1f", "score": "0.47943044", "text": "public function getRecommendation()\n\t{\n\n\t\t$this->load->model('college_model');\n\t\t$college = htmlspecialchars($this->input->post('college'));\n\t\t$data = $this->college_model->generateRecommendation($college);\t//Array of College Names\n\t\t$result = array();\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t{\n\t\t\t$this->db->where('COLL_NAME',$data[$i]);\n\t\t\t$query = $this->db->get('college')->result();\n\t\t\tif(isset($query[0]))\n\t\t\t{\n\t\t\t\tarray_push($result,$query[0]);\n\t\t\t}\n\t\t}\n\t\t$result = json_encode($result);\n\t\techo $result;\n\t}", "title": "" }, { "docid": "f101480f036e8d509bc5eebbc1dd57e9", "score": "0.47929072", "text": "public function testGetSkillWithSkillCode() {\n\n $empNumber = 1;\n $skillCode = 2;\n\n $skill = $this->employeeDao->getEmployeeSkills($empNumber, $skillCode);\n $this->assertTrue($skill instanceof EmployeeSkill);\n }", "title": "" }, { "docid": "d1afa081ed17724f8262fb36ac04a337", "score": "0.47905514", "text": "public function get_staff_announcement($prp){\n $q = $this->db->select('announcement')->where('propNumber', $prp)->get('istaff.globals');\n return $q->row('announcement');\n}", "title": "" }, { "docid": "e6c19c59492c1d477fa19e2f114d3523", "score": "0.47877118", "text": "public function index(Proposal $proposal) {\n\n\n $UserId = Auth::id();\n $User = User::find($UserId);\n $User->load('proposals');\n\n return view('apply.becomePartner',compact('User'));\n\n }", "title": "" }, { "docid": "0d90d3dbb52ba9389143d64086bbbf85", "score": "0.47835082", "text": "public function get_item_by_id(Request $request)\n {\n if($request->id != null){\n\n $item = ProposalsItem::find($request->id);\n $item->setAttribute('group_name', (!empty($item->customer_group) ? $item->customer_group->name : null));\n $item->setAttribute('taxname' , (!empty($item->taxes) ? $item->taxes->name : null));\n $item->setAttribute('taxrate' , (!empty($item->taxes) ? $item->taxes->rate_percent : null));\n $item->setAttribute('description' , strip_tags($item->description));\n \n return response()->json($item, Response::HTTP_CREATED);\n }else{\n \n return response()->json(null,500); \n }\n }", "title": "" }, { "docid": "78adc1e69be000130777cee700a8080d", "score": "0.47812968", "text": "public function get_allSkills(){\n\n\t\t//Connection establishment, processing of data and response from REST API\n\t\t\t$path=base_url();\n\t\t\t$url = $path.'api/Dashboard_api/get_allSkills';\t\t\n\t\t\t$ch = curl_init($url);\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPGET, true);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\t$response_json = curl_exec($ch);\n\t\t\tcurl_close($ch);\n\t\t\t$response=json_decode($response_json, true);\n\t\t\treturn $response;\t\n\t\t}", "title": "" }, { "docid": "ac99127bbfb36f3df1ce0a3f4e060718", "score": "0.4760284", "text": "public function proposals()\n {\n return $this->hasMany(MarketplaceProposal::class, 'marketplace_id');\n }", "title": "" }, { "docid": "f743bd6ace64822bba2b25d9a1581485", "score": "0.47587362", "text": "function om_flowsheet_completed_proposals_all()\n{\n\t$output = \"\";\n\t$query = db_select('om_flowsheet_proposal');\n\t$query->fields('om_flowsheet_proposal');\n\t$query->condition('approval_status', 3);\n\t$query->orderBy('actual_completion_date', 'DESC');\n\t$result = $query->execute();\n\tif ($result->rowCount() == 0)\n\t{\n\t\t$output .= \"Work has been completed for the following flow sheets. We welcome your contributions. For more details, please visit \".l(\"https://om.fossee.in/chemical/flowsheeting-project\",\"https://om.fossee.in/chemical/flowsheeting-project\", array('attributes' => array('target' => '_blank'))).\"<hr>\";\n\n\t} //$result->rowCount() == 0\n\telse\n\t{\n\t\t$output .= \"Work has been completed for the following flow sheets. We welcome your contributions. For more details, please visit \".l(\"https://om.fossee.in/chemical/flowsheeting-project\",\"https://om.fossee.in/chemical/flowsheeting-project\", array('attributes' => array('target' => '_blank'))).\"<hr>\";\n\t\t$preference_rows = array();\n\t\t$i = $result->rowCount();\n\t\twhile ($row = $result->fetchObject())\n\t\t{\n\t\t\t$completion_date = date(\"Y\", $row->actual_completion_date);\n\t\t\t$preference_rows[] = array(\n\t\t\t\t$i,\n\t\t\t\tl($row->project_title, \"chemical/flowsheeting-project/om-flowsheet-run/\" . $row->id, array('attributes' => array('title' => 'This is a zip file containing a pdf (abstract) and a mo file which is the OpenModelica flowsheet which is to be viewed by right clicking on the file and opening with OpenModelica.'))),\n\t\t\t\t$row->contributor_name,\n\t\t\t\t$row->university,\n\t\t\t\t$completion_date\n\t\t\t);\n\t\t\t$i--;\n\t\t} //$row = $result->fetchObject()\n\t\t$preference_header = array(\n\t\t\t'No',\n\t\t\t'Flowsheet Project',\n\t\t\t'Contributor Name',\n\t\t\t'University / Institute',\n\t\t\t'Year of Completion'\n\t\t);\n\t\t$output .= theme('table', array(\n\t\t\t'header' => $preference_header,\n\t\t\t'rows' => $preference_rows\n\t\t));\n\t}\n\treturn $output;\n}", "title": "" }, { "docid": "f3f1fdcc7ea4247b7f0218f8c2a40de6", "score": "0.47306135", "text": "public function visibleSkills()\n {\n return $this->skills()->where('hidden', '0');\n }", "title": "" }, { "docid": "de14a14f5e7e88cacbc58780dde157e1", "score": "0.47272295", "text": "public function getQuestion($quote, $requestParams) {}", "title": "" } ]
4fb1477e1d9436732655b45e115d9d2c
line 1344 "Parser.php" line 242 "Parser.y"
[ { "docid": "e32a21200dc3b868c9b59922fa967b30", "score": "0.0", "text": "function yy_r49(){\n\t$this->_retvalue = new Syntax\\Hash($this->yystack[$this->yyidx + -1]->minor ?: [], $this->line);\n }", "title": "" } ]
[ { "docid": "62635d3f7f6f89fd9a48253c84fb7e6f", "score": "0.6685332", "text": "function yy_r16(){\n $this->strip = false;\n }", "title": "" }, { "docid": "6a4447f51f963f706d4aafd6cdba1d61", "score": "0.66727656", "text": "function yy_r164(){ return; }", "title": "" }, { "docid": "ecefcd82ff6bb2e03248a74ed6475ce8", "score": "0.6645206", "text": "function yy_r137(){ return; }", "title": "" }, { "docid": "390e930817d1b79f5f51f2cfb325a2f8", "score": "0.6624659", "text": "function yy_r110(){return; }", "title": "" }, { "docid": "cece894a0fdf37dba7c94df1d5b0e2a9", "score": "0.64591366", "text": "function yy_r15(){\n $this->strip = true;\n }", "title": "" }, { "docid": "2542e128ddf62c1ca4064f7ea2528ca0", "score": "0.6329263", "text": "function yy_r1(){\n }", "title": "" }, { "docid": "cf6e004b9dfbdfc44b5f2edd0e1a5fa9", "score": "0.6243113", "text": "function yy_r112(){\n return;\n }", "title": "" }, { "docid": "5a1b81d22e4984c51733a69ca970a7cb", "score": "0.6235381", "text": "function yy_r131(){ $this->_retvalue = '->'.$this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "6922083659a29b39d02ca300b75e11f3", "score": "0.6219792", "text": "function yy_r10(){if ($this->lex->strip) {\n $this->_retvalue = preg_replace('![\\t ]*[\\r\\n]+[\\t ]*!', '', $this->yystack[$this->yyidx + 0]->minor);\t\n } else {\n $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;\t\n }\n }", "title": "" }, { "docid": "37f52e7b71acc168e20b5b31d5b01672", "score": "0.61894697", "text": "function yy_syntax_error($yymajor, $TOKEN)\n {\n#line 4 \"Parser.y\"\n\n\tthrow new Exception(\\XF::string([\n\t\t\\XF::phrase('line_x', ['line' => $this->line]), ': ', \\XF::phrase('syntax_error')\n\t]));\n#line 1477 \"Parser.php\"\n }", "title": "" }, { "docid": "eca387863379b363d9243daa56df0feb", "score": "0.61683434", "text": "function yy_r113(){ $this->_retvalue = \"['\". $this->yystack[$this->yyidx + 0]->minor .\"']\"; }", "title": "" }, { "docid": "d216d2a2758020b56970954e726f85c1", "score": "0.61543566", "text": "function yy_r55(){\n $this->_retvalue = \"'\".$this->yystack[$this->yyidx + 0]->minor.\"'\";\n }", "title": "" }, { "docid": "06a7839d448d029c1b4b6e4984a7634f", "score": "0.6143398", "text": "function yy_r52(){\n $this->_retvalue = array();\n }", "title": "" }, { "docid": "140d624b5dc1d929865a5c8bdb0d44b8", "score": "0.61408246", "text": "function yy_r8(){if ($this->lex->strip) {\n $this->_retvalue = preg_replace('![\\$this->yystack[$this->yyidx + 0]->minor ]*[\\r\\n]+[\\$this->yystack[$this->yyidx + 0]->minor ]*!', '', self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor));\t\n } else {\n $this->_retvalue = self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor);\t\n }\n }", "title": "" }, { "docid": "1592afa2441239de9248f3ef6ccac964", "score": "0.6132819", "text": "function yy_r144(){ $this->_retvalue = '$'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "d9b2ef81c16da49c59da9e6f35e207da", "score": "0.6112823", "text": "function yy_r127(){ $this->_retvalue = '->'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "9807e5b78b27689dee2b65bc8ee8adcd", "score": "0.6104529", "text": "function yy_r163(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "01c5851d6c5158c3c5815962f95c8e2d", "score": "0.60888433", "text": "function yy_r115(){\n $this->_retvalue = \"['\". $this->yystack[$this->yyidx + 0]->minor .\"']\";\n }", "title": "" }, { "docid": "7c624e1d4c59f910148d51678ab372cd", "score": "0.60875046", "text": "function yy_r154(){$this->_retvalue = '<='; }", "title": "" }, { "docid": "7dab9843ae717ce74334e49dbe3e7ac6", "score": "0.6087296", "text": "function yy_r97(){ $this->_retvalue = \"(\". $this->yystack[$this->yyidx + -1]->minor .\")\"; }", "title": "" }, { "docid": "45cce086b51fed9ff1c8a591606cff24", "score": "0.6072201", "text": "function yy_r123(){$this->_retvalue = '('.$this->yystack[$this->yyidx + -1]->minor.')'; }", "title": "" }, { "docid": "508094b2946054fb5bd8c38504d5525b", "score": "0.60670245", "text": "abstract public function parse();", "title": "" }, { "docid": "46de42879c4b73cad9ca7eda096b4036", "score": "0.606011", "text": "function yy_r135(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.\",\".$this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "eacfd4222e40ccb485b2ced4da14479d", "score": "0.6052228", "text": "function yy_r143(){ $this->_retvalue = '$'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "63a5ffe6168b77c55536f592ce6d4903", "score": "0.60497975", "text": "function yy_r135(){\n $this->_retvalue = '->'.$this->yystack[$this->yyidx + 0]->minor;\n }", "title": "" }, { "docid": "5f0bfb1713e062200280f383c7e3420d", "score": "0.60428345", "text": "function yy_r165(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'=>'.$this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "c0c8fa0e752a7656e3eedd31e229d51a", "score": "0.6040815", "text": "function yy_r121(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "9677cd6b7ecd82d46d6d4646fbe4304d", "score": "0.60340893", "text": "function yy_r54(){\n $this->_retvalue = array(trim($this->yystack[$this->yyidx + -1]->minor,\" =\\n\\r\\t\")=>$this->yystack[$this->yyidx + 0]->minor);\n }", "title": "" }, { "docid": "f57b56db5efa183714dace683984f2e6", "score": "0.60214484", "text": "function yy_r56(){ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor); }", "title": "" }, { "docid": "34fa083c08bcd5281c56350921029bdd", "score": "0.6018059", "text": "function yy_r39(){ $this->_retvalue = '='.$this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "8c17752bdab0ab0cd9c6b23248edfe7e", "score": "0.5991471", "text": "function yy_r154(){\n $this->_retvalue = '$'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor;\n }", "title": "" }, { "docid": "94d8334c0e65d6d49883aacfdcc11264", "score": "0.5989857", "text": "function yy_r115(){ $this->_retvalue = \"[\". $this->yystack[$this->yyidx + -1]->minor .\"]\"; }", "title": "" }, { "docid": "2e7942ad9ee1c04a7ad212822586f8a6", "score": "0.5989482", "text": "function yy_r153(){\n $this->_retvalue = '$'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor;\n }", "title": "" }, { "docid": "fc854e1bf753cb3ad630715e4d194dce", "score": "0.59818906", "text": "function yy_r133(){ $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . \"(\". $this->yystack[$this->yyidx + -1]->minor .\")\"; }", "title": "" }, { "docid": "a37f1b5f186efe92e3f181339d121e19", "score": "0.59644324", "text": "function yy_r122(){\n $this->_retvalue = '::'.$this->yystack[$this->yyidx + 0]->minor;\n }", "title": "" }, { "docid": "8ecfef80437a544637bfa943516c8393", "score": "0.59566116", "text": "function yy_r157(){\n $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor;\n }", "title": "" }, { "docid": "275dc52869bfbf9cac63818cde434c70", "score": "0.59320635", "text": "function yy_r159(){\n $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'=>'.$this->yystack[$this->yyidx + 0]->minor;\n }", "title": "" }, { "docid": "2564484bcbab6946b297d133278c1edd", "score": "0.59305817", "text": "function yy_r52(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; $this->_retvalue[key($this->yystack[$this->yyidx + 0]->minor)] = $this->yystack[$this->yyidx + 0]->minor[key($this->yystack[$this->yyidx + 0]->minor)]; }", "title": "" }, { "docid": "93508905ca5f30361e410ef2bfeae211", "score": "0.5928736", "text": "public function parse(): void {\n\t}", "title": "" }, { "docid": "0a009f77ad2aa36f007488e0ebc3ca8b", "score": "0.59258413", "text": "function yy_r66(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor . trim($this->yystack[$this->yyidx + -1]->minor) . $this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "8eaa40ad1d713b154b44d6f5806e01ad", "score": "0.59219825", "text": "function yy_r12(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; }", "title": "" }, { "docid": "94153d8dd1f22060c256adf3ad2a1dd9", "score": "0.5916752", "text": "function yy_r21(){\n $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;\n }", "title": "" }, { "docid": "dac56d53b5ca135bb98e1711d3098939", "score": "0.59129924", "text": "function yy_r54(){ $this->_retvalue = array(); }", "title": "" }, { "docid": "176c4555a560799549f0884625f48d56", "score": "0.59096444", "text": "public function parse();", "title": "" }, { "docid": "176c4555a560799549f0884625f48d56", "score": "0.59096444", "text": "public function parse();", "title": "" }, { "docid": "176c4555a560799549f0884625f48d56", "score": "0.59096444", "text": "public function parse();", "title": "" }, { "docid": "176c4555a560799549f0884625f48d56", "score": "0.59096444", "text": "public function parse();", "title": "" }, { "docid": "176c4555a560799549f0884625f48d56", "score": "0.59096444", "text": "public function parse();", "title": "" }, { "docid": "176c4555a560799549f0884625f48d56", "score": "0.59096444", "text": "public function parse();", "title": "" }, { "docid": "216fd1ed3be7fccbca7b3ee79a154744", "score": "0.5907602", "text": "function yy_r69(){$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "1d1d7c3820828c9f0d5f68b63e7b801e", "score": "0.5903024", "text": "function yy_r71(){$this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "88920a32cf0147d8f64d3f7fffc94813", "score": "0.5891757", "text": "function yy_r58(){\n $this->yystack[$this->yyidx + -2]->minor[]=$this->yystack[$this->yyidx + 0]->minor;\n $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor;\n }", "title": "" }, { "docid": "685195af7c45137806442e1bf55b5220", "score": "0.5883253", "text": "function yy_r125(){$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "c12befeb3cb1d4759d9c7ac37564fa55", "score": "0.58687717", "text": "function yy_r11(){ $this->_retvalue = ''; }", "title": "" }, { "docid": "21ce747649c1351716b0410d6a03a353", "score": "0.5867082", "text": "function yy_r62(){ $this->yystack[$this->yyidx + -2]->minor[]=$this->yystack[$this->yyidx + 0]->minor; $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; }", "title": "" }, { "docid": "16fb90e3b21ea58a65555509538a0aeb", "score": "0.58611166", "text": "function yy_r53(){\n\t$this->_retvalue = [0 => $this->yystack[$this->yyidx + -2]->minor, 1 => $this->yystack[$this->yyidx + 0]->minor];\n }", "title": "" }, { "docid": "6b2dacf79254815a10c00f3df7e89ca8", "score": "0.5857554", "text": "function yy_r40(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "84a0a0b0660fe1589f3837cc42735d48", "score": "0.5853026", "text": "function yy_r152(){$this->_retvalue = '<'; }", "title": "" }, { "docid": "c2f708341c8874f1906d3fbf94b1a5d4", "score": "0.5852478", "text": "function yy_r138(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "8c11285925484db7d67a25efc5efb8c7", "score": "0.5850972", "text": "function yy_r117(){\n $this->_retvalue = \"[\". $this->yystack[$this->yyidx + 0]->minor .\"]\";\n }", "title": "" }, { "docid": "91d40b92c62d469b95c43ae233ca33fc", "score": "0.5846406", "text": "function yy_r25(){\n\tif (!$this->yystack[$this->yyidx + 0]->minor->parts)\n\t{\n\t\t$this->_retvalue = new Syntax\\Str('', $this->line);\n\t}\n\telse if (count($this->yystack[$this->yyidx + 0]->minor->parts) == 1)\n\t{\n\t\t$this->_retvalue = reset($this->yystack[$this->yyidx + 0]->minor->parts);\n\t}\n\telse\n\t{\n\t\t$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;\n\t}\n }", "title": "" }, { "docid": "f970c610264fce6399206f83d1b3aedb", "score": "0.5841894", "text": "function yyparse()\n{\n global $buffer, $token, $toktype, $yyaction, $yybase, $yycheck, $yydebug,\n $yydebug, $yydefault, $yygbase, $yygcheck, $yygdefault, $yygoto, $yylen,\n $yylhs, $yylval, $yyproduction, $yyterminals, $yytranslate;\n\n $yyastk = array();\n $yysstk = array();\n\n $yyn = $yyl = 0;\n $yystate = 0;\n $yychar = -1;\n\n $yysp = 0;\n $yysstk[$yysp] = 0;\n $yyerrflag = 0;\n while (true) {\n YYTRACE_NEWSTATE($yystate, $yychar);\n if ($yybase[$yystate] == 0)\n $yyn = $yydefault[$yystate];\n else {\n if ($yychar < 0) {\n if (($yychar = yylex()) <= 0) $yychar = 0;\n $yychar = $yychar < YYMAXLEX ? $yytranslate[$yychar] : YYBADCH;\n YYTRACE_READ($yychar);\n }\n\n if ((($yyn = $yybase[$yystate] + $yychar) >= 0\n && $yyn < YYLAST && $yycheck[$yyn] == $yychar\n || ($yystate < YY2TBLSTATE\n && ($yyn = $yybase[$yystate + YYNLSTATES] + $yychar) >= 0\n && $yyn < YYLAST && $yycheck[$yyn] == $yychar))\n && ($yyn = $yyaction[$yyn]) != YYDEFAULT) {\n /*\n * >= YYNLSTATE: shift and reduce\n * > 0: shift\n * = 0: accept\n * < 0: reduce\n * = -YYUNEXPECTED: error\n */\n if ($yyn > 0) {\n /* shift */\n YYTRACE_SHIFT($yychar);\n $yysp++;\n\n $yysstk[$yysp] = $yystate = $yyn;\n $yyastk[$yysp] = $yylval;\n $yychar = -1;\n\n if ($yyerrflag > 0)\n $yyerrflag--;\n if ($yyn < YYNLSTATES)\n continue;\n\n /* $yyn >= YYNLSTATES means shift-and-reduce */\n $yyn -= YYNLSTATES;\n } else\n $yyn = -$yyn;\n } else\n $yyn = $yydefault[$yystate];\n }\n\n while (true) {\n /* reduce/error */\n if ($yyn == 0) {\n /* accept */\n YYTRACE_ACCEPT();\n yyflush();\n return 0;\n }\n else if ($yyn != YYUNEXPECTED) {\n /* reduce */\n $yyl = $yylen[$yyn];\n $n = $yysp-$yyl+1;\n $yyval = isset($yyastk[$n]) ? $yyastk[$n] : null;\n YYTRACE_REDUCE($yyn);\n /* Following line will be replaced by reduce actions */\n switch($yyn) {\n case 1:\n { exit(0); } break;\n @endreduce\n }\n /* Goto - shift nonterminal */\n $yysp -= $yyl;\n $yyn = $yylhs[$yyn];\n if (($yyp = $yygbase[$yyn] + $yysstk[$yysp]) >= 0 && $yyp < YYGLAST\n && $yygcheck[$yyp] == $yyn)\n $yystate = $yygoto[$yyp];\n else\n $yystate = $yygdefault[$yyn];\n\n $yysp++;\n\n $yysstk[$yysp] = $yystate;\n $yyastk[$yysp] = $yyval;\n }\n else {\n /* error */\n switch ($yyerrflag) {\n case 0:\n yyerror(\"syntax error\");\n case 1:\n case 2:\n $yyerrflag = 3;\n /* Pop until error-expecting state uncovered */\n\n while (!(($yyn = $yybase[$yystate] + YYINTERRTOK) >= 0\n && $yyn < YYLAST && $yycheck[$yyn] == YYINTERRTOK\n || ($yystate < YY2TBLSTATE\n && ($yyn = $yybase[$yystate + YYNLSTATES] + YYINTERRTOK) >= 0\n && $yyn < YYLAST && $yycheck[$yyn] == YYINTERRTOK))) {\n if ($yysp <= 0) {\n yyflush();\n return 1;\n }\n $yystate = $yysstk[--$yysp];\n @if -t\n YYTRACE_POP($yystate);\n@endif\n }\n $yyn = $yyaction[$yyn];\n @if -t\n YYTRACE_SHIFT(YYINTERRTOK);\n@endif\n $yysstk[++$yysp] = $yystate = $yyn;\n break;\n\n case 3:\n @if -t\n YYTRACE_DISCARD($yychar);\n@endif\n if ($yychar == 0) {\n yyflush();\n return 1;\n }\n $yychar = -1;\n break;\n }\n }\n\n if ($yystate < YYNLSTATES)\n break;\n /* >= YYNLSTATES means shift-and-reduce */\n $yyn = $yystate - YYNLSTATES;\n }\n }\n}", "title": "" }, { "docid": "79ce649499a1121752b395058e0c1c9c", "score": "0.58372355", "text": "function yy_r60(){$this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor); }", "title": "" }, { "docid": "c652c5f920fc986849a27337030d8f24", "score": "0.5832905", "text": "function yy_r129(){ $this->_retvalue = '->{'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}'; }", "title": "" }, { "docid": "a9cc2b0afbe84a0641fffbe129c4be83", "score": "0.58273906", "text": "abstract function parse();", "title": "" }, { "docid": "826579108b5bf2a06a97f79089974cd0", "score": "0.58264035", "text": "function yy_r17(){\n $this->_retvalue = '';\n }", "title": "" }, { "docid": "15f42e1939d71d8b06fd4d8e9bb89d96", "score": "0.5824759", "text": "function yy_r4(){ $this->_retvalue = ''; }", "title": "" }, { "docid": "72b93510c8b9cb849220125bfe3bcf5f", "score": "0.58233297", "text": "function yy_r94(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "1810e9b2fb871966b7432371c958d107", "score": "0.58145165", "text": "function yy_r119(){$this->_retvalue = ''; }", "title": "" }, { "docid": "32aee5480eef6f3f2e2b2adb93691abc", "score": "0.5803629", "text": "function yy_r13(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "1fe322f3cfc5f43ebc9d09dd8a88db4e", "score": "0.5801443", "text": "function yy_r81(){\n $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor;\n }", "title": "" }, { "docid": "a70f1223e71b4bd89444e856715f2fc0", "score": "0.57977694", "text": "function yy_r18(){\n $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor;\n }", "title": "" }, { "docid": "636ae40b989710cac9d3b4ff5a6f36d7", "score": "0.57949394", "text": "function yy_r130(){ $this->_retvalue = '->{\\''.$this->yystack[$this->yyidx + -4]->minor.'\\'.'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}'; }", "title": "" }, { "docid": "75ea24164ced3095ffa2be452b5e0ade", "score": "0.5785893", "text": "function yy_r109(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "54eaa4679eb1d86394eb2ac327a7e21b", "score": "0.5784961", "text": "function yy_r150(){$this->_retvalue = '!='; }", "title": "" }, { "docid": "dcd701f533fd101103e076c08f0eff96", "score": "0.57834375", "text": "function yy_r20(){\n\t$this->_retvalue = new Syntax\\NullValue($this->line);\n }", "title": "" }, { "docid": "e6a31d56fe6213b2ff732ed10ac8f9b8", "score": "0.5783197", "text": "function yy_r120(){\n $this->_retvalue = \"[\". $this->yystack[$this->yyidx + -1]->minor .\"]\";\n }", "title": "" }, { "docid": "4de8799878847533ca3053799d4008e1", "score": "0.5773087", "text": "function yy_r116(){\n $this->_retvalue = \"[\". implode('][', explode('.', $this->yystack[$this->yyidx + 0]->minor)) .\"]\";\n }", "title": "" }, { "docid": "368bb31e801d681128ffd10c449d3927", "score": "0.57311475", "text": "function yy_r126(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "1996c53b91490ce2a530b7605f41736e", "score": "0.57234335", "text": "function yy_r51(){\n $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor);\n }", "title": "" }, { "docid": "3df63679312a953d86ff68828e6a410c", "score": "0.57211953", "text": "abstract protected function parse() : bool;", "title": "" }, { "docid": "c8b17abae19dfecbc04d4fe809bbc176", "score": "0.5714783", "text": "function yy_r21(){\n\t$this->_retvalue = new Syntax\\Number($this->yystack[$this->yyidx + 0]->minor, $this->line);\n }", "title": "" }, { "docid": "977542fd8df6c73f4bd4d10ae16f5bce", "score": "0.57076967", "text": "function yy_r145(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "0167cb1c32640d4a0cec792a5eb5b268", "score": "0.5702841", "text": "function yy_r146(){\n $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor);\n }", "title": "" }, { "docid": "6dc99e763fad287b85e6a463a0da050b", "score": "0.5702462", "text": "function yy_r12(){\n\t$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;\n }", "title": "" }, { "docid": "a3918793dce93a24cec035327f52d9e9", "score": "0.56831956", "text": "function yy_r114(){ $this->_retvalue = \"[\". $this->yystack[$this->yyidx + 0]->minor .\"]\"; }", "title": "" }, { "docid": "15bdf8364671e7f6e7768d979436ef64", "score": "0.5683025", "text": "function yy_r53(){\n if (preg_match('~^true$~i', $this->yystack[$this->yyidx + 0]->minor)) {\n $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'true');\n } elseif (preg_match('~^false$~i', $this->yystack[$this->yyidx + 0]->minor)) {\n $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'false');\n } elseif (preg_match('~^null$~i', $this->yystack[$this->yyidx + 0]->minor)) {\n $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'null');\n } else {\n $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>\"'\".$this->yystack[$this->yyidx + 0]->minor.\"'\");\n }\n }", "title": "" }, { "docid": "0ee1db1863e8d2fa9dc3038fbc3085ed", "score": "0.56753653", "text": "public function isValidParser();", "title": "" }, { "docid": "2aa4824704789cccc210acfed374fc46", "score": "0.5655918", "text": "function yy_r161(){ $this->_retvalue = 'array('.$this->yystack[$this->yyidx + -1]->minor.')'; }", "title": "" }, { "docid": "d70f5201b1ca6be1fb5696af41dea14b", "score": "0.5654156", "text": "function yy_r2(){if ($this->template->extract_code == false) {\n $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor;\n } else {\n // store code in extract buffer\n $this->template->extracted_compiled_code .= $this->yystack[$this->yyidx + 0]->minor;\n $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor;\n } \n }", "title": "" }, { "docid": "9a402a3558154d7967f0dc9d5c6ac8e7", "score": "0.56505376", "text": "function yy_r61(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); }", "title": "" }, { "docid": "14eb749504c2481f1165fd50a8b1d984", "score": "0.56504023", "text": "function yy_r147(){$this->_retvalue = ','.$this->yystack[$this->yyidx + 0]->minor; }", "title": "" }, { "docid": "a2566a8c0f7ee574b9904a3834fd5816", "score": "0.56341004", "text": "function yy_r1(){\n\t$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor ?: [];\n\t$this->_retvalue[] = new Syntax\\Str($this->yystack[$this->yyidx + 0]->minor, $this->line);\n }", "title": "" }, { "docid": "1284dc4da9c512c3e2cde1fe7c3fe12a", "score": "0.5630953", "text": "function yy_r121(){\n $this->_retvalue = '[]';\n }", "title": "" }, { "docid": "7faad7247fecd2291b0644d08168f210", "score": "0.56255454", "text": "function yy_r164(){\n if ($this->yystack[$this->yyidx + 0]->minor === false) {\n $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor;\n } else {\n $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor. '.' . $this->yystack[$this->yyidx + 0]->minor;\n }\n }", "title": "" }, { "docid": "701cf54ed2e6930ef4729cbe944be928", "score": "0.56147295", "text": "function yy_r134(){\n if ($this->security) {\n $this->compiler->error (self::Err2);\n }\n $this->_retvalue = '->{\\''.$this->yystack[$this->yyidx + -2]->minor.'\\'.'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor.'}';\n }", "title": "" }, { "docid": "a671cf0c713f8ccf0cd70bc8b6d8b5a9", "score": "0.56132054", "text": "function yy_r32(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor,array()); }", "title": "" }, { "docid": "20f19f3f02bb5f063dca7a030120228a", "score": "0.5608341", "text": "function yy_r95(){\n $this->_retvalue = \"(\". $this->yystack[$this->yyidx + -1]->minor .\")\";\n }", "title": "" }, { "docid": "65bbe2f07f2e449146835f5b76cd5e4e", "score": "0.56066203", "text": "function yy_r125(){\n $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor;\n }", "title": "" }, { "docid": "96f6ddae7d6f22c9433dfeb83c19fae8", "score": "0.5605795", "text": "function yy_r44(){\n\t$this->_retvalue = [$this->yystack[$this->yyidx + 0]->minor];\n }", "title": "" }, { "docid": "02b32dbc47bd37aff5ab78c03358b077", "score": "0.56042564", "text": "function yy_r11(){\n\t$this->_retvalue = new Syntax\\Str($this->yystack[$this->yyidx + 0]->minor, $this->line);\n }", "title": "" } ]
facb6282158ba7a56fb3539e769bc294
Clear the Quotation Quote from the session.
[ { "docid": "2cdc590fcb8e847b6d458660e18700e8", "score": "0.0", "text": "public function fullSessionClear()\n {\n return $this->traitFullSessionClear();\n }", "title": "" } ]
[ { "docid": "a433c851c3f92fcd921b3a18c75444b0", "score": "0.75702965", "text": "public function clearQuote()\n {\n return $this->traitClearQuote();\n }", "title": "" }, { "docid": "8f04954c819b759225d64b72556fdbab", "score": "0.63710845", "text": "public static function clear()\r\n {\r\n $_SESSION['speaker'] = '';\r\n $_SESSION['sentence'] = '';\r\n $_SESSION['sentenceResult'] = '';\r\n }", "title": "" }, { "docid": "2a6a0082f595e9a06e5259e1d2a07986", "score": "0.61873674", "text": "protected function cleanQuoteDetailsDonation()\n {\n $this->getCurrentSession()->setMageworxDonationDetails(null);\n }", "title": "" }, { "docid": "e279ac181096da2c7286d6af0c7479dd", "score": "0.60730153", "text": "public function deleteDonationFromQuote()\n {\n $this->cleanQuoteDetailsDonation();\n $this->getCurrentSession()->setTotalsCollectedFlag(false)->getQuote()->collectTotals();\n }", "title": "" }, { "docid": "55a4685bd57b7302757f0b7afb14add8", "score": "0.60604835", "text": "public static function clear(): void\n {\n Session::getInstance()->remove(self::SESSION_KEY);\n }", "title": "" }, { "docid": "78fe6a76bdcbfd713b684f585836a987", "score": "0.60162276", "text": "public function clear()\n {\n if (isset($_SESSION[self::SESSION_KEY])) {\n unset($_SESSION[self::SESSION_KEY]);\n }\n }", "title": "" }, { "docid": "493d3d2c949939b7be8400078c5fd0d9", "score": "0.5948505", "text": "public function clear()\n {\n\n $this->sessionInterface->remove('cart');\n }", "title": "" }, { "docid": "ecbf02a5a8500d52bf577a59d255d40a", "score": "0.59455615", "text": "public function clean() {\n\t\t$this->session->set($this->sessionKey, NULL);\n\t}", "title": "" }, { "docid": "162e81e4781c5b6188537b27ce82e94a", "score": "0.589137", "text": "public function clear() {\r\n\r\n\t\t# Clear existing\r\n\t\tsession_destroy();\r\n\r\n\t\t# Unset existing variables\r\n\t\t$_SESSION = array();\r\n\t\t$this->name = false;\r\n\r\n\t\t# Restart session\r\n\t\tsession_start();\r\n\r\n\t}", "title": "" }, { "docid": "2d742a97447a9c2199c3803ed15adfd4", "score": "0.58442974", "text": "public function BorrarSesion() {\n session_unset();\n session_destroy();\n }", "title": "" }, { "docid": "b9b6c441a3e2ad1ba76744b8b173bc30", "score": "0.5836702", "text": "function clearSession() {\n global $GLOBAL_YAHOO_SESSION;\n setrawcookie(\"yosdk_rt\", \"\", time() - 600);\n setrawcookie(\"yosdk_at\", \"\", time() - 600);\n $GLOBAL_YAHOO_SESSION = NULL;\n }", "title": "" }, { "docid": "0dd34744761712d51527e89526935164", "score": "0.58312273", "text": "public function clearSession() {\n unset($_SESSION[self::ACCESS_TOKEN]);\n unset($_SESSION[self::PARSE_QUERY]);\n unset($_SESSION[self::EXPIRATION_TIMESTAMP]);\n unset($_SESSION[self::STATE]);\n }", "title": "" }, { "docid": "99008dc1dadae439e71ad525658e36f4", "score": "0.582017", "text": "public function clear()\n {\n $_SESSION = [];\n }", "title": "" }, { "docid": "b9ffbb6d5f18aa71d8709977d1c6da38", "score": "0.5816168", "text": "public function reset(): void\n {\n $this->session->forget('math-captcha.first');\n $this->session->forget('math-captcha.second');\n $this->session->forget('math-captcha.operand');\n }", "title": "" }, { "docid": "6baa807c167f5b859c8c0e34284c04e7", "score": "0.57722455", "text": "public function destroy(){\n \n $this->curent_values = array();\n $this->curent_values['_d'] = '.';\n \n $this->set_session_values();\n }", "title": "" }, { "docid": "51ab238c05cb6f1cd5cded35f3d49224", "score": "0.5702802", "text": "public function clearAction()\n\t{\n\t\tMage::helper('react')->clearSession();\n\t}", "title": "" }, { "docid": "f83b9db0ff8647ea66a07880c73965b1", "score": "0.56905687", "text": "public function clearCurrentOrderId()\n {\n $this->forgetSession('id');\n }", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.5688989", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.5688989", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.5688989", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.5688989", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.5688989", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.5688989", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.5688989", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.5688989", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.5688989", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.5688989", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.5688989", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.5688989", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.5688989", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "27790bd261e6a1749147ade0b54bdad1", "score": "0.5685617", "text": "public function clearResults()\n {\n $_SESSION[$this->sessionKey] = null;\n }", "title": "" }, { "docid": "7ac91e1134fb413c5929b8090e712e74", "score": "0.567764", "text": "public function clearRaw($scope = 'raw') {\n\t\tunset($_SESSION[$scope]);\n\t}", "title": "" }, { "docid": "6dd5eda5dfe92cf8469e08799d6e5726", "score": "0.5675449", "text": "public function actionClear()\n {\n $order = Order::getOrderForUID($_SESSION['uid']);\n $order->deleteItems();\n echo $this->_ajaxShoppingCartInfo($order);\n }", "title": "" }, { "docid": "2dee3e52f2f6681f171ea4fc98a084c8", "score": "0.5659791", "text": "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "title": "" }, { "docid": "2dee3e52f2f6681f171ea4fc98a084c8", "score": "0.5659791", "text": "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "title": "" }, { "docid": "2dee3e52f2f6681f171ea4fc98a084c8", "score": "0.5659791", "text": "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "title": "" }, { "docid": "2dee3e52f2f6681f171ea4fc98a084c8", "score": "0.5659791", "text": "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "title": "" }, { "docid": "79596292941676232599f3f60830d0cf", "score": "0.5629463", "text": "private function clearSession() { \t\t\n \t\tGroupBuyingMasterUser::clearSession();\n \t}", "title": "" }, { "docid": "47f34f57366ef30b8f7fe6079710424d", "score": "0.56267345", "text": "public function clear()\n {\n $this->out = \"\";\n }", "title": "" }, { "docid": "57fa0ee7f0944ed19b0d10e1e2a80874", "score": "0.56246984", "text": "public function clearTaxes()\n {\n $this->session->put(\n $this->sessionKeyTaxes,\n array()\n );\n }", "title": "" }, { "docid": "80d1607f486579e45993fc06d753ae00", "score": "0.56178004", "text": "public function clearAction(){\n unset($_SESSION['cart']);\n unset($_SESSION['cart.sum']);\n unset($_SESSION['cart.qty']);\n unset($_SESSION['cart.currency']);\n $this->loadView('cart_modal');\n }", "title": "" }, { "docid": "f5e3c5188741ae135ef7dd40710bb8c2", "score": "0.5608972", "text": "public function empty_car() {\n unset($_SESSION[\"cart\"]);\n }", "title": "" }, { "docid": "5cfa7255b948e24535bce88f42b2471b", "score": "0.56052893", "text": "private function clearMollomSession() {\n\t\tSession::clear('mollom_session_id');\n\t\tSession::clear('mollom_captcha_requested');\n\t}", "title": "" }, { "docid": "f499e1902227186eb768954d1205fa5e", "score": "0.56039405", "text": "public function ClearCookie(){\n $this->CurrentCookie['name'] = '';\n $this->CurrentCookie['value'] = '';\n $this->CurrentCookie['Expires'] = '';\n $this->CurrentCookie['Max-Age'] = '';\n $this->CurrentCookie['Domain'] = '';\n $this->CurrentCookie['Path'] = '';\n $this->CurrentCookie['HttpOnly'] = false;\n $this->CurrentCookie['Secure'] = false;\n }", "title": "" }, { "docid": "ddd8063482f1ac570965dc06559ff990", "score": "0.5564246", "text": "public function logout() {\n\t\t$this->user = null;\n\t\t$this->isLoggedIn = false;\n\t\t$this->level = null;\n\n\t\tunset($_SESSION['sq-level']);\n\t\tunset($_SESSION['sq-username']);\n\n\t\t// Clear the cookie\n\t\tsetcookie('sq-auth', null, time() - 10, '/');\n\t}", "title": "" }, { "docid": "7dafba6aa54eed3d8367571f7b6f21f1", "score": "0.55444366", "text": "public function setQuote($var)\n {\n GPBUtil::checkString($var, True);\n $this->quote = $var;\n\n return $this;\n }", "title": "" }, { "docid": "4db0a5c9bc1702d3d5571ca02ecb6ef3", "score": "0.5542572", "text": "public function clear() {\n foreach (array_keys($_SESSION) as $key) {\n unset($_SESSION[$key]);\n }\n }", "title": "" }, { "docid": "2d60e38479e27f85913cbc28abaaf320", "score": "0.5540191", "text": "public function clearCredentials() {\r\n self::$myUsername = '';\r\n self::$myPassword = '';\r\n self::$ticket = '';\r\n $_SESSION['AlfrescoTicket'] = '';\r\n }", "title": "" }, { "docid": "4a08e9959779b3f2006eb26b687c6ddd", "score": "0.55340654", "text": "public function clear()\n {\n if ($this->resumeSession()) {\n $_SESSION[$this->name] = [];\n }\n }", "title": "" }, { "docid": "1fc78a45a18a00bca3e701528507fd4a", "score": "0.5532036", "text": "public function clear($name)\n {\n unset($_SESSION[$name]);\n }", "title": "" }, { "docid": "525af759df8de8ff83b2ad126cb6cad4", "score": "0.55206674", "text": "public function clear()\n {\n $_SESSION['basecamp'] = [];\n }", "title": "" }, { "docid": "dbe225d1f5bfaa82b93a2fc00de639a8", "score": "0.5508597", "text": "public function clear()\n {\n $this->write(chr(27) . '[2J' . chr(27) . '[;H');\n }", "title": "" }, { "docid": "c2f2e396e64f07ce4497f85cd0898716", "score": "0.54837257", "text": "public function clearQuery()\n {\n $this->query = null;\n }", "title": "" }, { "docid": "6b2afc43a1afac65cee91158764785e2", "score": "0.54808795", "text": "public function clear()\n\t{\n\t\t$this->engine->clear();\n\t}", "title": "" }, { "docid": "5429539b490af34d952a9d67fea4c30a", "score": "0.54786205", "text": "public function clear()\n {\n $this->storage->forget('cart');\n }", "title": "" }, { "docid": "321c825735a8c7a81ede0c0c28b0db20", "score": "0.54615736", "text": "static function clear_magic_quotes()\n\t{\n\t\tif ((function_exists(\"get_magic_quotes_gpc\") && get_magic_quotes_gpc()) || (ini_get('magic_quotes_sybase') && (strtolower(ini_get('magic_quotes_sybase')) != \"off\")) ){\n\t\t\tself::stripslashes_deep($_GET);\n\t\t\tself::stripslashes_deep($_POST);\n\t\t\tself::stripslashes_deep($_COOKIE);\n\t\t}\n\t}", "title": "" }, { "docid": "aeab1f44bb6fa905b7325ff5e73c1cd7", "score": "0.5459876", "text": "public function clearInfo() {\n $this->session->setSessionData(self::SESSION_NAME, '');\n }", "title": "" }, { "docid": "e2a8f26edd056b8a30f390d602019486", "score": "0.5450513", "text": "public function clearAction()\n {\n if( $this->getRequest()->getParam('id') > 0 ) {\n try {\n\t\t\t\t$idval = $this->getRequest()->getParam('id');\n\t\t\t\t\n\t\t\t\t$quoteItems = Mage::getModel('checkout/cart')->getQuote()\n\t\t\t\t\t\t\t\t->getCollection()\n\t\t\t\t\t\t\t\t->addFieldToFilter('entity_id',$idval);\t\t\n\t\t\t\t$quoteItems->walk(\"delete\");\t\t\t\t\t\t\t\n\t\t\t\t \n Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Cart was successfully cleared.'));\n $this->_redirect('*/*/');\n\t\t\t\t} catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n\t\t\t\t}\n }\n $this->_redirect('*/*/');\n }", "title": "" }, { "docid": "a536639f2aa192a87622bc6a6ac34bf2", "score": "0.54299223", "text": "protected function clearQuery()\r\n {\r\n $this->setPending();\r\n $this->clearKeyInfo();\r\n }", "title": "" }, { "docid": "9775914b98e675361cf1505316852bd5", "score": "0.54052216", "text": "public function clearQuery()\n {\n $this->firstCall = true;\n $this->query = null;\n $this->htmlMethodProcessor->clearQuery();\n }", "title": "" }, { "docid": "0cfe082bd49d1a478bb4b962b21a2011", "score": "0.5396385", "text": "public static function clear_token()\n {\n $_SESSION['sec_token'] = null;\n unset($_SESSION['sec_token']);\n }", "title": "" }, { "docid": "d888ae220a9176dbe2caa593c30effef", "score": "0.53910387", "text": "public function clear(): SessionInterface;", "title": "" }, { "docid": "794f2694ebadc1aeedd9a37dfb6a557b", "score": "0.539061", "text": "public static function unset() {\n session_unset();\n }", "title": "" }, { "docid": "d5a184561421490c0444c96a0d637d5c", "score": "0.53884804", "text": "public function emptyCart(){\n unset($_SESSION['cart']);\n $_SESSION['cart'] = array();\n }", "title": "" }, { "docid": "d2f865af98a02bb23bbc6e481032a5ab", "score": "0.5380591", "text": "public function clear()\n {\n return $this->phpfunc->session_unset();\n }", "title": "" }, { "docid": "cef9a9ed31f093fe1070e8cd846645ec", "score": "0.5380244", "text": "public function clearSession(BaseWidget $widget): void\n {\n $this->requestStack->getSession()->remove($this->getSessionKey($widget));\n }", "title": "" }, { "docid": "793905037092e8d50178e0a1fb870760", "score": "0.5374863", "text": "public function clear()\n {\n $this->getBasket()->clear();\n $this->name = NULL;\n $this->phone = NULL;\n $this->email = NULL;\n }", "title": "" }, { "docid": "dc84257d2f2028cb75e04456e1f1e843", "score": "0.53632116", "text": "public function clearCart(): void\n {\n Cart::clear();\n $this->updateCart();\n }", "title": "" }, { "docid": "f84ef938c39908ce8d44f55e583876d3", "score": "0.53582346", "text": "public function clearCookies()\n {\n $this->sessionDelete('/cookie');\n }", "title": "" }, { "docid": "d5a3c52074002781214a8e4b5dadeb11", "score": "0.5340954", "text": "protected function _getQuote()\n {\n return $this->_checkoutSession->getQuote();\n }", "title": "" }, { "docid": "ffefe65a5b2930590c202bba54aa6109", "score": "0.5339695", "text": "public function clear() {}", "title": "" }, { "docid": "ffefe65a5b2930590c202bba54aa6109", "score": "0.5339695", "text": "public function clear() {}", "title": "" }, { "docid": "2a6e027d49dfb3fd76d2fce7bfb8aae9", "score": "0.5332716", "text": "public function clearCart()\n {\n $query = \"DELETE FROM carts_items WHERE user_id=:user_id\";\n\n $stmt = $this->conn->prepare( $query );\n $stmt->bindParam(\":user_id\", $this->userID);\n $stmt->execute();\n }", "title": "" }, { "docid": "842faaeeaeb9790040dc0ab6c2c25533", "score": "0.532933", "text": "public function restoreQuote()\n {\n $session = $this->getSession();\n $order = $session->getLastRealOrder();\n if ($order->getId()) {\n $quote = $this->getQuoteById($order->getQuoteId());\n if ($quote->getId()) {\n return $session->restoreQuote();\n }\n }\n return false;\n }", "title": "" }, { "docid": "e239e52e8d4f164f59cb3b30c5250de9", "score": "0.53286856", "text": "protected function _getQuote()\n {\n if ($this->_quote == null) {\n $this->_quote = $this->helper('breadcheckout/Quote')->getSessionQuote();\n }\n\n return $this->_quote;\n }", "title": "" }, { "docid": "0d0045ac64d60f928698652c42963dad", "score": "0.53274673", "text": "public function clear () {}", "title": "" }, { "docid": "2edaa77d244c9af8ae3ea2df692894ac", "score": "0.5324671", "text": "public function getQuote()\n {\n return $this->quote;\n }", "title": "" }, { "docid": "2dbbf82bbd82c81c8735472b47636663", "score": "0.5317372", "text": "function ClearInlineMode() {\n\t\tglobal $password;\n\t\t$password->setKey(\"id\", \"\"); // Clear inline edit key\n\t\t$password->CurrentAction = \"\"; // Clear action\n\t\t$_SESSION[EW_SESSION_INLINE_MODE] = \"\"; // Clear inline mode\n\t}", "title": "" }, { "docid": "33ec04113d6ec5836615d5e55f9388bc", "score": "0.53153825", "text": "public function clear() {\n $custom_lifetime = 15; \n // extending memory limit\n ini_set(\"memory_limit\", \"2000M\");\n $now = new \\DateTime(\"now\");\n $now->sub(new DateInterval(\"P0DT0H{$custom_lifetime}M0S\"));\n $lifetimes = Mage::getConfig()->getStoresConfigByPath('checkout/cart/delete_quote_after');\n foreach ($lifetimes as $storeId => $lifetime) {\n $quotes = Mage::getModel('sales/quote')->getCollection();\n /* @var $quotes Mage_Sales_Model_Mysql4_Quote_Collection */\n $quotes->addFieldToFilter('store_id', $storeId);\n $quotes->addFieldToFilter('updated_at', array('to' => $now->format(\"Y-m-d H:i:s\")));\n $quotes->addFieldToFilter('is_active', 1);\n $collection = $quotes->load();\n foreach ($collection as $quote ){\n $now = new \\DateTime(\"now\");\n $log = Mage::getModel(\"carttimer/log\");\n $log->setData(\"created_at\",$now->format(\"Y-m-d H:i:s\"));\n $log->setData(\"quote_id\" , $quote->getId());\n $log->setData(\"store_id\",$storeId);\n $log->save();\n $quote->setData(\"is_active\" , 0 );\n $quote->save();\n unset($log);\n unset($quote);\n }\n }\n return true;\n }", "title": "" }, { "docid": "0d3d789ae708310d95d37bc08724c6a8", "score": "0.5312967", "text": "public static function forget()\n {\n\t if(self::exists()) {\n\t session()->forget('order_id');\n\t session()->forget('shipping_id');\n\t session()->forget('payment_id');\n }\n }", "title": "" }, { "docid": "fd572c9e6b973873bf48bbc0192d52a3", "score": "0.53119236", "text": "public function clearCartConditions()\n {\n $this->session->put(\n $this->sessionKeyCartConditions,\n array()\n );\n }", "title": "" }, { "docid": "f88c99975b9784736bf946aa4cc7981f", "score": "0.53063875", "text": "public function destroy()\n {\n // Suppression du cookie\n $this->clearCookie();\n\n // Suppression de la session en base\n $this->getDb()->handle()->delete(\n [\n 'session_key' => $this->getSession('session_key'),\n ]\n );\n\n // Réinitialisation des variables de classe\n $this->sessionArgs = [];\n $this->attributes = [];\n $this->changed = false;\n }", "title": "" }, { "docid": "24b39a3981f3c40e713a4116216e73ac", "score": "0.5303646", "text": "public function clear(): void\n {\n \\call_user_func($this->clear);\n }", "title": "" }, { "docid": "16de55eb4101bb7455e48e1c8dc3cd24", "score": "0.5299087", "text": "public function clearCart()\n {\n $this->items = [];\n }", "title": "" }, { "docid": "70758b1c3f5e914d9352e2178beb8f2d", "score": "0.52986044", "text": "public function clearQuery()\n {\n unset($this->where);\n unset($this->cols);\n unset($this->table);\n unset($this->type);\n unset($this->values);\n unset($this->join);\n unset($this->limit);\n unset($this->orderBy);\n unset($this->groupBy);\n }", "title": "" }, { "docid": "110ff3865d2e81431cdff83506685527", "score": "0.5297515", "text": "public function clear()\n {\n $this->clearQuery();\n $this->clearPreparedStatement();\n }", "title": "" }, { "docid": "23cd7b86401b66fe7a153cb0811cfb6b", "score": "0.5296403", "text": "public function clearSessionData()\n {\n foreach ($this->options['session_namespaces'] as $v)\n {\n $this->storage->remove($v);\n }\n\n // remove attribtues\n $this->attributeHolder->clear();\n }", "title": "" }, { "docid": "bd9fc6c4ef6cef7e6a928a2767b0457f", "score": "0.52622473", "text": "public function clear() : void {}", "title": "" }, { "docid": "bd9fc6c4ef6cef7e6a928a2767b0457f", "score": "0.526026", "text": "public function clear() : void {}", "title": "" }, { "docid": "b2cce0b1767d95981a13c4cf4fb93bdd", "score": "0.5249746", "text": "public function getQuotationQuote()\n {\n return $this->traitGetQuotationQuote();\n }", "title": "" }, { "docid": "75225dcbdfdb32acffe9f511bf678400", "score": "0.52467096", "text": "public function clear() {\n }", "title": "" }, { "docid": "0b3914722d370b61a0dc3c11231f49d1", "score": "0.5246295", "text": "public static function clearCart()\r\n { if(isset($_SESSION['products']))\r\n unset($_SESSION['products']);\r\n //header(\"Location: \".$_SERVER['HTTP_REFERER']);\r\n }", "title": "" }, { "docid": "5f3aa58aeda8e4cf352ec794e9fa40f0", "score": "0.5238499", "text": "function clear_session() {\n\t\n\t// Remove Any Stripe Transaction Data\n\tif (isset ( $_SESSION ['stripe'] ))\n\t\tunset ( $_SESSION ['stripe'] );\n\t\n\t// Build 826 - Better Error Handling\n\tif(!isset($_SESSION ['qs']))\n\t\treturn;\n\t\n\tif(!isset($_SESSION['entry_key_demo']))\n\t\treturn;\n\t\n\tif(!isset($_SESSION ['qs'] [\"{$_SESSION['entry_key_demo']}\"]))\n\t\treturn;\n\t\t\n\t\t// Remove all singleton session data fields (selected items etc)\n\t$named_sesison_vars = array_keys ( $_SESSION ['qs'] [\"{$_SESSION['entry_key_demo']}\"] );\n\tforeach ( $named_sesison_vars as $var ) {\n\t\t// fields\n\t\tunset ( $_SESSION [\"{\\$var}\"] );\n\t\t// isset\n\t\tunset ( $_SESSION [\"{\\$var}_is\"] );\n\t\t// _processed\n\t\tunset ( $_SESSION [\"{\\$var}_processed\"] );\n\t}\n\t\n\tif (isset ( $_SESSION ['qs'] [\"{$_SESSION['entry_key_demo']}\"] )) {\n\t\tforeach ( $_SESSION ['qs'] [\"{$_SESSION['entry_key_demo']}\"] as $key => $value ) {\n\t\t\tunset ( $_SESSION [$key] );\n\t\t}\n\t}\n\t\n\tif (isset ( $_SESSION ['fb_ecomm'] )) {\n\t\tunset ( $_SESSION ['fb_ecomm'] );\n\t}\n\t\n\tif (isset ( $_SESSION ['qs'] [\"{$_SESSION['entry_key_demo']}\"] ['signatures'] )) {\n\t\tunset ( $_SESSION ['qs'] [\"{$_SESSION['entry_key_demo']}\"] ['signatures'] );\n\t}\n\t\n\tunset ( $_SESSION ['pages'] );\n\tunset ( $_SESSION ['pages-passed'] [\"{$_SESSION['entry_key_demo']}\"] );\n\t\n\tclean_output_location ( 'tmp' );\n\tclean_output_location ( 'lib/jquery-upload/server/php/files/' . $_SESSION['entry_key_demo'] ); // Build 860\n\t\n\tif (isset ( $_SESSION ['qs'] [\"{$_SESSION['entry_key_demo']}\"] )) {\n\t\tunset ( $_SESSION ['qs'] [\"{$_SESSION['entry_key_demo']}\"] );\n\t}\n\tif (isset ( $_SESSION ['qs-label'] [\"{$_SESSION['entry_key_demo']}\"] )) {\n\t\tunset ( $_SESSION ['qs-label'] [\"{$_SESSION['entry_key_demo']}\"] );\n\t}\n\tif (isset ( $_SESSION['entry_key_demo'] )) {\n\t\tunset ( $_SESSION['entry_key_demo'] );\n\t}\n\t\n\tif (isset ( $_SESSION ['fielded_data_array'] )) {\n\t\tunset ( $_SESSION ['fielded_data_array'] );\n\t}\n\t\n\t// Unset main indentifiers, which is trnasformed at build time to specific element for this form.\n\tunset ( $_SESSION['entry_key_demo'] );\n\t\n\t// Build 836\n\tif(isset($_SESSION['fb_entry_id_auto']))\n\t\tunset($_SESSION['fb_entry_id_auto']);\n}", "title": "" }, { "docid": "9326cbe92cdf5be393510d3c93ecaa9d", "score": "0.5238006", "text": "public function clear()\n\t{\n\t\t$this->page = preg_replace('`{{.*}}`','',$this->page);\n\t\t$this->clear = true;\n\t}", "title": "" }, { "docid": "4088860478bafe6d1c37eb4a4a0172c7", "score": "0.5235991", "text": "public static function clearMessage(): void{\n $_SESSION['message'] = [];\n }", "title": "" }, { "docid": "26eb149154992a6e09aa19919482af10", "score": "0.5229813", "text": "private static function clearSessionData()\n {\n $_SESSION['tiUserId'] = null;\n $_SESSION['tiRealUserId'] = null;\n $_SESSION['tiNonce'] = null;\n }", "title": "" }, { "docid": "96500d0003be70f16daf45ec9d9b85db", "score": "0.5229467", "text": "public function clear()\n {\n $this->delete();\n }", "title": "" }, { "docid": "166f888f592132517e2a1c71afe10746", "score": "0.52265435", "text": "function clearSM(){\n\t\tif(isset($_SESSION[\"message\"])){\n\t\t\t$_SESSION[\"message\"] = null;\n\t\t}\n\t}", "title": "" }, { "docid": "745f38ced833dd815e4573a70daf110f", "score": "0.522239", "text": "public function clear()\n {\n $this->reset();\n }", "title": "" }, { "docid": "ebcc886b188de6bc003b33c81708dc87", "score": "0.5219542", "text": "function ClearSessionSelection($parm) {\n\t$_SESSION[\"sel_SalaryNewReportsmry_$parm\"] = \"\";\n\t$_SESSION[\"rf_SalaryNewReportsmry_$parm\"] = \"\";\n\t$_SESSION[\"rt_SalaryNewReportsmry_$parm\"] = \"\";\n}", "title": "" }, { "docid": "f872b8ec621b81a678fa841c74b4a611", "score": "0.5218718", "text": "public static function clear() {\n $_SESSION = array();\n\n setcookie(\"JWTSession\", '', 1, '/');\n }", "title": "" } ]
007cd74927af78f95e1820981f9b821d
Show the roles create page
[ { "docid": "22e35ad9ba98bc6c08f6fc2f60274c3c", "score": "0.0", "text": "public function edit($id)\n {\n $role = Role::findOrFail($id);\n $data = [\n 'title' => 'Edit',\n 'role' => $role,\n 'all_permissions' => PermissionService::buildPermissionsList(User::$types[User::ADMINISTRATOR_ID]['route']),\n 'role_permissions' => $role->permissions->pluck('id')->toArray()\n\n ];\n return view('content.admin.administrator-roles.create-edit', $data);\n }", "title": "" } ]
[ { "docid": "0d87853f857ab8379bc3cb9934176a24", "score": "0.8566547", "text": "public\n\tfunction create() {\n\t\treturn view('roles::create');\n\t}", "title": "" }, { "docid": "49eaa9fc45bb94bd05ad2280e91c17f1", "score": "0.8474046", "text": "public function create()\n\t{\n\t\t//\n\t\treturn view('auth.roles.create');\n\t}", "title": "" }, { "docid": "879d6782d2eb8969571cd37e57cbc897", "score": "0.84514827", "text": "public function create()\n {\n return view(\"backend.roles.create\");\n }", "title": "" }, { "docid": "e17e370b47d9c32b5bc863427c605c3d", "score": "0.84394217", "text": "public function create()\n {\n return view(\"mbober-admin::roles.create\");\n }", "title": "" }, { "docid": "8938a89b30df418a512ff8fe867fa056", "score": "0.84260374", "text": "public function create()\n\t{\n\t\treturn view('dashboard.roles.create');\n\t}", "title": "" }, { "docid": "6d0c1a5fb79e169816910355ff7bb8a5", "score": "0.8355912", "text": "public function create()\n {\n //\n return view ('roles/create');\n }", "title": "" }, { "docid": "17f45e33133f3f9b816a2a2c878acfa2", "score": "0.83433276", "text": "public function create()\n {\n return view ('admin.roles.create');\n }", "title": "" }, { "docid": "709f60813aced598241b76f446fdd8ef", "score": "0.82699704", "text": "public function create()\n {\n return view('acl.roles.create');\n }", "title": "" }, { "docid": "f2cd532c5c62fb57874f4ea1d8e27ca5", "score": "0.8265545", "text": "public function create()\n {\n return view('user::admin.roles.create');\n }", "title": "" }, { "docid": "7d64184e52d7517393acab489717b07b", "score": "0.8258326", "text": "public function create()\n {\n //Redirect the creation page\n return view('roles.create');\n }", "title": "" }, { "docid": "847485b3ba13b2bfed30d0636afb08eb", "score": "0.825339", "text": "public function create()\n {\n $this->middleware('permission:roles.create');\n\n $breadcrumbs[] = ['link' => trans('routes.admin'), 'text' => trans('common.admin')];\n $breadcrumbs[] = ['link' => trans('routes.admin') . '/' . trans('routes.roles'), 'text' => trans_choice('roles.roles', 2)];\n $breadcrumbs[] = ['link' => trans('routes.admin') . '/' . trans('routes.roles') . '/' . trans('routes.create'), 'text' => trans('common.create')];\n\n return view('roles.create', compact(\n 'breadcrumbs'\n ));\n }", "title": "" }, { "docid": "71d6bf61a141dead8c1c096fda9018ea", "score": "0.82522416", "text": "public function create()\n {\n return view('admin::roles.create',compact('data'));\n }", "title": "" }, { "docid": "14395e4b6abb2ecc59fdc0517259e6a4", "score": "0.8250774", "text": "public function create()\n {\n return view('admin.roles.create');\n }", "title": "" }, { "docid": "206b1e19413e92550bd77e1bb46c4d75", "score": "0.822641", "text": "public function create()\n {\n if (Gate::denies('create-roles'))\n return abort(403, 'Access Denied');\n return view('admin.roles.create');\n }", "title": "" }, { "docid": "86f7e3bf129a23e4bc8fd076c4bdec7e", "score": "0.8211019", "text": "public function create()\n {\n return view('roles.role_create');\n }", "title": "" }, { "docid": "70f3cbd7abca585c6c60f42a0f9f0560", "score": "0.82024866", "text": "public function create()\n {\n return view('dashboard.accounts.roles.create');\n }", "title": "" }, { "docid": "1c335531cab07ff1f4b7bcacfe48e2e6", "score": "0.81965065", "text": "public function create()\n {\n return view('roles.create');\n }", "title": "" }, { "docid": "1c335531cab07ff1f4b7bcacfe48e2e6", "score": "0.81965065", "text": "public function create()\n {\n return view('roles.create');\n }", "title": "" }, { "docid": "1c335531cab07ff1f4b7bcacfe48e2e6", "score": "0.81965065", "text": "public function create()\n {\n return view('roles.create');\n }", "title": "" }, { "docid": "1c335531cab07ff1f4b7bcacfe48e2e6", "score": "0.81965065", "text": "public function create()\n {\n return view('roles.create');\n }", "title": "" }, { "docid": "1c335531cab07ff1f4b7bcacfe48e2e6", "score": "0.81965065", "text": "public function create()\n {\n return view('roles.create');\n }", "title": "" }, { "docid": "b00543be3c62d8b69b8962e3feb18f76", "score": "0.81961197", "text": "public function create()\n {\n return view('Admin.Roles.create');\n }", "title": "" }, { "docid": "b8f359033a2ebca6eca5ee8959201fed", "score": "0.81889987", "text": "public function create()\n {\n //\n return view('Roles.createRoles');\n }", "title": "" }, { "docid": "512e672395232bccbdf08a4218f31560", "score": "0.8187958", "text": "public function create()\n {\n $this->help->checkPermission(Auth::user()->id, \"roles-manage\");\n $data['permissionsInfo'] = Permission::all();\n return view('admin.roles.create', $data);\n }", "title": "" }, { "docid": "07cf8fc37a8d922cbd9a4fb50c15f23c", "score": "0.81775886", "text": "public function create()\n {\n return view('backend.users.roles.createRole');\n }", "title": "" }, { "docid": "22fb61be905593293b3a2464daff930d", "score": "0.8159746", "text": "public function create()\n {\n //\n $permissions = Permission::all();\n $role=new Role;\n $params = [\n 'title' => 'Create Roles',\n 'permissions' => $permissions,\n 'role' => $role,\n 'action_template' => $this->action_template,\n 'nest_permissions' =>$this->getCustomNestedPermission()\n ];\n \\Debugbar::info($params);\n return view('admin.roles.roles_create')->with($params);\n }", "title": "" }, { "docid": "48a5604476461ae3bae381b0741da5fb", "score": "0.81388557", "text": "public function index()\n {\n return view('role.create_role');\n }", "title": "" }, { "docid": "2f84ac6738a4cff7af82be900593fc25", "score": "0.8128946", "text": "public function create() {\n //\n return view('admin.role.create');\n }", "title": "" }, { "docid": "42ca93b57ecd06a13f95abb07320d201", "score": "0.811581", "text": "public function create()\n {\n //\n\t\treturn view('masters.role.create');\n }", "title": "" }, { "docid": "f62c5e36852eeb229f117d404526baea", "score": "0.8111902", "text": "public function create()\n {\n //显示角色添加页面\n return view(\"Admin.Role.add\");\n }", "title": "" }, { "docid": "87c68464f578e15f3ba268e2af2c300a", "score": "0.81100804", "text": "public function create()\n {\n $perms = Role::getPermsTree();\n return view('admin.role.create',compact('perms'));\n }", "title": "" }, { "docid": "bde381e6daff476901461527cb9520c5", "score": "0.81040937", "text": "public function create()\n {\n return View::make('backend.roles.create');\n }", "title": "" }, { "docid": "3e82222ad34ea7cf5529199553539a60", "score": "0.8102675", "text": "public function create()\n {\n if(!Permission::check('role', 'true'))\n {\n return view('permission.index');\n }\n return view('roles.create');\n }", "title": "" }, { "docid": "835851db29092b2012e089c59e091833", "score": "0.80913264", "text": "public function create()\n {\n $menus = Menu::get(['id', 'name', 'is_verify', 'parent_id']);\n return view('admin.role.create', compact('menus'));\n }", "title": "" }, { "docid": "09ce5cbacb81fe1e8ec306c90fe792bf", "score": "0.8071844", "text": "public function create()\n {\n $this->authorize('rolecreate', auth()->user()->type->roles->admintype_create);\n return view('panel.admin_roles.create');\n }", "title": "" }, { "docid": "0c31388169b31fb3386ea418852671ba", "score": "0.8065651", "text": "public function create()\n {\n if (!Gate::allows('admin-role-create')) {\n return abort(401);\n }\n\n return view('admin.roles.create');\n }", "title": "" }, { "docid": "c6d6a1eef29c8d9f9f7ad8836af28307", "score": "0.80540705", "text": "public function create()\n {\n // Get all the available permissions\n $permissions = $this->permission->all();\n\n // Title\n $title = \"Administrador de roles del sistema\";\n\n //Título de sección:\n $title_section = \"Administrador de roles. \";\n\n //Subtítulo de sección:\n $subtitle_section = \"Crear, modificar, asignar permisos.\";\n\n //Todos los roles\n $roles = Role::all();\n\n $role = $this->role;\n // Show the page\n return View::make('admin/role/create', compact('roles', 'role', 'permissions', 'selectedPermissions', 'title', 'title_section', 'subtitle_section'));\n }", "title": "" }, { "docid": "dfb51aba414161296da81bd5129fa749", "score": "0.80512565", "text": "public function create()\n {\n return view('administracion.roles.create');\n }", "title": "" }, { "docid": "763a1484a66ae420b6adfc5e4721947c", "score": "0.80481714", "text": "public function create()\n {\n return view('admin.role.role_add');\n }", "title": "" }, { "docid": "0b3c7f72b76f6e330a39240119dcf058", "score": "0.8045369", "text": "public function create()\n {\n //\n return view('admin.role.add');\n }", "title": "" }, { "docid": "4ad48a8881b513fee75268bdda6c2e30", "score": "0.80328953", "text": "public function create()\n {\n $roles = Role::all();\n return view('adminmodule::admins.create',compact('roles'));\n }", "title": "" }, { "docid": "174241787b055a139d4d6182b447add7", "score": "0.80311567", "text": "public function create()\n {\n return view('backend.role.create');\n }", "title": "" }, { "docid": "7302281576f4ea9eeafc194c151b84fe", "score": "0.8028175", "text": "public function create()\n {\n //加载模板\n\t\treturn view('Admin.Rolelist.add');\n }", "title": "" }, { "docid": "2dd97bc35164fdad89491acac33301b1", "score": "0.80279", "text": "public function create()\n {\n return view('userroles.create');\n }", "title": "" }, { "docid": "42c8228611bcf2bfa185d7b445fbe2d5", "score": "0.80264103", "text": "public function create()\n {\n return view('role/create');\n }", "title": "" }, { "docid": "35b3762aca05fb05f402069e52f2c43d", "score": "0.80216503", "text": "public function create()\n {\n //\n return view ('admin.form_role');\n }", "title": "" }, { "docid": "7340e87897ac712fe832bb137ca6bc6f", "score": "0.80138224", "text": "public function create()\n {\n return view('admin.roles.form');\n }", "title": "" }, { "docid": "f8480d4cd793d2f6e63ce19be47f2008", "score": "0.800152", "text": "public function create()\n {\n return view('admin.roles.create', [\n 'roleRoutes' => RoleRoute::get()\n ]);\n }", "title": "" }, { "docid": "53bcfd58f445de0f30809c9466e926dd", "score": "0.7994651", "text": "public function create()\n {\n\t\t$privileges = Privileges ::all();\n\t\t$permissions = Permissions ::all();\n\t\t\n\t\t\t $url = env('API_URL').\"roles\";\n\t\t\t $result = $this->httpGet($url);\n\t\t\t //echo '<pre>';\t\tprint_r($result);exit;\n\t\t\t $results = json_decode($result,false);\n\t\t\t $list = $results->data;\n\t\t\t \t\n\t\t\t\t\t \n return view('roles.create')->with('privileges',$privileges)->with('permissions',$permissions)->with('rolelist',$list);\n }", "title": "" }, { "docid": "0e94c156b9ac06c711d6cd57ec4e3b58", "score": "0.79840064", "text": "public function create()\n {\n return view('role::create');\n }", "title": "" }, { "docid": "c8f51038286520be3437c216d156908e", "score": "0.7983442", "text": "public function create()\n {\n return view('roles.i_roles');\n }", "title": "" }, { "docid": "1c4583ddd6813d7f01a123c7ae7657af", "score": "0.79786026", "text": "public function create()\n {\n $roles = Role::pluck('display_name','id')->all();\n return view('admin/users-mgmt/create',compact('roles'));\n \n }", "title": "" }, { "docid": "7ee603b091a0c5c40fc12c35ea776ce2", "score": "0.7971071", "text": "public function index()\n {\n //\n $roles = Role::latest()->get();\n\n return view('admin.pages.roles.create',compact('roles'));\n }", "title": "" }, { "docid": "fb826352cbc37d242293bcf5f771ce44", "score": "0.7968046", "text": "public function create() {\n\t\t$permissions = Permission::all();\n\t\treturn view('multiauth::admin.role.create', compact('permissions'));\n\t}", "title": "" }, { "docid": "99a96431c8c00035c456809bb9e440af", "score": "0.79514503", "text": "public function create()\n {\n return view('backend.admin.menu.create', compact('roles'));\n }", "title": "" }, { "docid": "a2427e6dff178af96e91e57d69ebf013", "score": "0.79318357", "text": "public function create()\n {\n $distinct_permissions = Permission::distinct()->get(['for_w'])->toArray();\n $permissions = Permission::all();\n \n return view('admin.roles.add', compact('distinct_permissions', 'permissions'));\n }", "title": "" }, { "docid": "bf2e597c0cdd428a9ecb3db64a33bfb8", "score": "0.7929121", "text": "public function create()\n {\n $roles = Role::all();\n return view('admin.create',compact('roles'));\n }", "title": "" }, { "docid": "49495e73771a49f80328dc90bd7a3ef5", "score": "0.79275364", "text": "public function create()\n {\n return view('admin.acl.role.create')->withRole(new Role);\n }", "title": "" }, { "docid": "6a40d74588f1aa147de78af021205556", "score": "0.7924933", "text": "public function create()\n {\n //\n return view('role.create');\n }", "title": "" }, { "docid": "2ed5f4c88d357b01a47dfe95694568ef", "score": "0.79148084", "text": "public function create()\n {\n $modulos=modulos::all();\n $widget=widget::all();\n return view('Roles.create',compact('modulos','widget'));\n }", "title": "" }, { "docid": "eafbf967d2265fd4eb2d922db1123222", "score": "0.79061854", "text": "public function create()\n {\n return view('role.create');\n }", "title": "" }, { "docid": "5b45c7cbf958429df667df4a109e171c", "score": "0.7906", "text": "public function create()\n {\n $permissions = Permission::all();\n return view('admin.roles.create',compact('permissions'));\n }", "title": "" }, { "docid": "2e6c68181c3c430fc9d17234c0900419", "score": "0.7902303", "text": "public function create()\n {\n //\n $roles = Role::all();\n return view('menu.create', compact('roles'));\n }", "title": "" }, { "docid": "b93639854c2c6936db3122abe6d9d7c1", "score": "0.78964454", "text": "public function create() {\n $title = \"Role\";\n\n $privileges = Privilege::orderBy('module_id', 'ASC')->get();\n\t\t\n\t\t//echo'<pre>';print_r($privileges);die;\n return view('user.role.create', compact('title', 'privileges'));\n }", "title": "" }, { "docid": "57fa942f0b0543ab11985c2da35ad837", "score": "0.78944343", "text": "public function create()\n {\n //添加权限跳转\n return view(\"Admin.Role.add\");\n }", "title": "" }, { "docid": "d648c26e691dae94012a487365dae323", "score": "0.7889881", "text": "public function create() {\n try {\n if (!Sentinel::hasAccess('users.roles')) {\n Flash::warning(\"Permission Denied\");\n return redirect('/');\n }\n\n $data = array();\n $permissions = Permission::where('parent_id', 0)->get();\n foreach ($permissions as $permission) {\n array_push($data, $permission);\n $subs = Permission::where('parent_id', $permission->id)->get();\n foreach ($subs as $sub) {\n array_push($data, $sub);\n }\n }\n return view('admin.users.roles.create', compact('data'));\n } catch (Exception $ex) {\n Flash::warning($ex->getMessage());\n return redirect()->back()->withInput();\n }\n }", "title": "" }, { "docid": "7d5d92a608264c0969b60fa84986a5a9", "score": "0.7880192", "text": "public function create()\n {\n if(is_null($this->admin) || !$this->admin->can('admin.create')) {\n abort(403, 'Sorry, You are unauthorized to access this action !!');\n }\n $roles = Role::all();\n return view('admin.pages.admin.create', compact('roles'));\n }", "title": "" }, { "docid": "d4c3267e6edc7d8bb192cc9c4e80af9b", "score": "0.7869324", "text": "public function create()\n {\n $roles = Role::orderBy('id', 'desc')->pluck('role', 'id');\n //dd($roles);\n return view('admin.user.create', compact('roles'));\n }", "title": "" }, { "docid": "68afb2215a5d54adbce065b5bd27ea3d", "score": "0.785194", "text": "public function create()\n {\n\n // 获取所有的角色\n $roles_data = DB::table('roles')->get();\n // 加载添加页面\n return view('admin.adminusers.create',['roles_data'=>$roles_data]);\n }", "title": "" }, { "docid": "684db028fcf5729624876774290baf62", "score": "0.7845455", "text": "public function create()\n {\n $title = 'Nuevo rol';\n $rol = new Role();\n $form_data = ['route' => 'rol.store','class' => 'form-horizontal'];\n $permissions = Permission::all()->lists('display_name','id');\n $mypermissions = [];\n\n return view('rol.form')->with(compact('title','rol','form_data','permissions','mypermissions'));\n }", "title": "" }, { "docid": "dc1bb98ced54690a8bf412dfecbdcb0b", "score": "0.7841488", "text": "public function create()\n {\n $permissions = $this->getPermissions();\n return view('backend.role.create', compact('permissions'));\n }", "title": "" }, { "docid": "1af9312df02b30de27d5978d03a28885", "score": "0.78405595", "text": "public function create()\n {\n if (\\Auth::user()->hasPermissionTo('Roles.Create')) {\n return view('manage.roles.create');\n } else {\n return redirect()->back()->with('error', 'Unauthorized');\n }\n }", "title": "" }, { "docid": "838525217352ec8864307bc323684c5e", "score": "0.7835432", "text": "public function create()\n {\n\n return view('role.role.create');\n }", "title": "" }, { "docid": "a3195e8bee55c2449e9eb0513d44c3ca", "score": "0.7824304", "text": "public function create()\n {\n //\n return view('Admin.AdminRole.add');\n }", "title": "" }, { "docid": "0f420f38a6b6a1812d53f2f6d952392a", "score": "0.7822392", "text": "public function create()\n {\n return view('admin.roles.create', [\n 'permissions' => $this->permsRepo->all(),\n ]);\n }", "title": "" }, { "docid": "06529e4113a857ec7e3383959f827d1c", "score": "0.78202426", "text": "public function create()\n {\n return View('role.create');\n }", "title": "" }, { "docid": "4c64c3fd684d8bad00e8973331423b2c", "score": "0.78195316", "text": "public function create()\n {\n $title = \"Agregar rol\";\n return view('add_role', compact('title'));\n }", "title": "" }, { "docid": "10711e3f0a45403dabcba65e906dac8c", "score": "0.781504", "text": "public function create()\n {\n $rolemang = cms_role::all();\n return view('usermanagement.create', compact('rolemang'));\n }", "title": "" }, { "docid": "6387f0bbb8c573377b06618437c6ad4f", "score": "0.7812947", "text": "public function create()\n {\n $roles = Role::orderBy('display_name')->get();\n\n return view('auth.roles.create_user', ['roles' => $roles]);\n\n }", "title": "" }, { "docid": "96997fc3a6e9d23d19189a9f89ad4762", "score": "0.77997714", "text": "public function create()\n\t{\n\t\t$roles = Role::where('id', '!=', '1')->where('id', '!=', '2')->get(); //developing it soon \n\t\treturn view('backend.users.create', compact('roles'));\t\n\t}", "title": "" }, { "docid": "a6d4b9008bee0017bc584917d804a5d7", "score": "0.77967423", "text": "public function index()\n {\n $roles = ErpRole::all();\n return view('backEnd.roles.create', compact('roles'));\n }", "title": "" }, { "docid": "ba501ad519ea053a2dab56dd0939bacb", "score": "0.7796272", "text": "public function actionCreate()\n {\n $form = new RoleForm();\n $form->setScenario('create');\n\n if ($form->load(Yii::$app->request->post()) && $form->validate())\n {\n $form->createRole();\n Yii::$app->session->setFlash(\"success\", \"角色添加成功,现在你可以为角色分配权限了\");\n return $this->redirect(['permissions', 'id' => $form->name]);\n }\n\n return $this->render('create', [\n 'form' => $form,\n ]);\n }", "title": "" }, { "docid": "dba1c3db95bef5eaa04303a74c67eb69", "score": "0.7793298", "text": "public function create()\n {\n $roles = Role::get()->pluck('name', 'id');\n return view('admins.create', compact('roles'));\n }", "title": "" }, { "docid": "e1436f2e71e7f8794129f700f86165f4", "score": "0.77895206", "text": "public function create()\n {\n $title = $this->title;\n $modules = getModules();\n\n return view('admin.account.roles_and_permission.create', compact('title', 'modules'));\n }", "title": "" }, { "docid": "34e7dd6b9733f70d282e063154c28f8d", "score": "0.77851415", "text": "public function create()\n {\n $permission = $this->permissionRepository->all();\n\n return view('core::roles.create', compact('permission'));\n }", "title": "" }, { "docid": "a93d30c94e22db380237ea5fa646c897", "score": "0.7784067", "text": "public function create()\n {\n if ( !Gate::allows( 'users_manage' ) ) {\n return abort( 401 );\n }\n $abilities = Ability::get()->pluck( 'name', 'name' );\n\n return view( 'admin.roles.create', compact( 'abilities' ) );\n }", "title": "" }, { "docid": "fb5d2fae66ada64323c5c5b4f5e326df", "score": "0.77779067", "text": "public function create()\n {\n $this->checkuserRole(['admin','super-admin'],''); \n $permissions = Permission::get();\n\n return view('backend.manage.role.role-create', [\n 'permissions' => $permissions\n ]);\n\n }", "title": "" }, { "docid": "d746a282c9a4c59ecf718d22593454e8", "score": "0.77570033", "text": "public function create()\n {\n //Getting roles/create view with permissions\n $permissions = Permission::all();\n return view('roles/create', ['permissions' => $permissions]);\n }", "title": "" }, { "docid": "c31c5176f82681218fbcc17a8c59bfc6", "score": "0.7750139", "text": "public function create()\n {\n $permissions = Permission::orderBy('sort')->get();\n return view( 'admin/role/create', compact('permissions') );\n }", "title": "" }, { "docid": "f71f81800db98694e6fda0b56f559038", "score": "0.7745107", "text": "public function create()\n {\n $roles = Role::pluck('name', 'id')->all();\n return view('admin.users.create', compact('roles')); \n }", "title": "" }, { "docid": "744ade729010c39b0e913cce326337d8", "score": "0.7739537", "text": "public function create()\n\t{\n\t\tif(!User::hasPermTo(MODULE,'create'))return Redirect::to('admin/error/show/403');\n\t\t$roles = Role::all();\n\t\treturn View::make('backend.admin.user.add',compact('roles'));\n\t}", "title": "" }, { "docid": "0aa2955fa89d1524395da22bfff795df", "score": "0.7735458", "text": "public function create()\n {\n $roles = Role::all()->pluck(\"name\");\n return view('pages.user.create', compact(\"roles\"));\n }", "title": "" }, { "docid": "bcc67fe1bcc2f79ca41603c9f36a063d", "score": "0.77294654", "text": "public function create()\n { $role = new Role();\n $collection = Route::getRoutes();\n $routes = [];\n foreach ($collection as $key => $route) {\n $routes[] = $route->getName();\n }\n $match_key = array_search('/', $routes);\n if ($match_key)\n $routes = array_slice($routes, $match_key);\n $route_tree = [];\n foreach ($routes as $key => $item) {\n if(strpos($item,'.')){\n $route = substr($item,0,strpos($item,'.'));\n $value = substr($item,strpos($item,'.')+1,strlen($item));\n $route_tree[$route][]=$value;\n \n }else{\n $route_tree[$item]= $item;\n }\n\n }\n\n $this->createPermission($routes);\n return view('roles.create', compact('role', 'route_tree'));\n }", "title": "" }, { "docid": "b151646fb31a94d3da9fab814ba8cfd0", "score": "0.7728698", "text": "public function create()\n {\n //\n return view('backend.users.form',['roles'=>Role::getAllRoles()]);\n }", "title": "" }, { "docid": "2b1f327699758ebabdec4b83d46e5efc", "score": "0.77245027", "text": "public function create()\n {\n //\n $roles = Role::pluck('name','id')->all();\n return view('admin.users.create',compact('roles'));\n }", "title": "" }, { "docid": "1c8e3b2d2563f2407476302fd103d105", "score": "0.7723403", "text": "public function create()\n {\n $roles = Role::all();\n return view('admin::user.add', compact('roles'));\n }", "title": "" }, { "docid": "52de3e45fe25982e7154c6da7d0e3893", "score": "0.7722466", "text": "public function create()\n {\n $data['model'] = new Role;\n\n return view('role::backend/v1/role/create', $data);\n }", "title": "" }, { "docid": "4d1748303174ac7425f7fde46e44ed72", "score": "0.7721311", "text": "public function create()\n {\n $roles =Role::pluck('name','id')->all();\n return view('admin.users.create',compact('roles'));\n }", "title": "" }, { "docid": "b62ea83e9956699140593592ee147a49", "score": "0.7718799", "text": "public function create()\n\t{\n\t\t$usuario = Auth::user();\n\t\treturn view('roles.create')->with('usuario',$usuario);\n\t}", "title": "" }, { "docid": "fea85018ce55c49f59e077b0c6f86ec9", "score": "0.77031016", "text": "public function createAction() {\n if (!$this->request->isPost()) {\n return $this->dispatcher->forward(array(\n \"controller\" => \"roles\",\n \"action\" => \"index\"\n ));\n }\n\n $role = new Roles();\n\n $role->name = $this->request->getPost(\"name\");\n $role->active = 1;\n $allowMenu = filter_var($this->request->getPost('menu'), FILTER_VALIDATE_BOOLEAN);\n $allowPublish = filter_var($this->request->getPost('publish'), FILTER_VALIDATE_BOOLEAN);\n $allowUser = filter_var($this->request->getPost('user'), FILTER_VALIDATE_BOOLEAN);\n $allowBook = filter_var($this->request->getPost('book'), FILTER_VALIDATE_BOOLEAN);\n\n $role->allowMenu = $allowMenu;\n $role->allowPublish = $allowPublish;\n $role->allowUser = $allowUser;\n $role->allowBook = $allowBook;\n\n if (!$role->save()) {\n foreach ($role->getMessages() as $message) {\n $this->flash->error($message);\n }\n return $this->dispatcher->forward(array(\n \"controller\" => \"roles\",\n \"action\" => \"new\"\n ));\n } else {\n $this->flash->success(\"Role was saved successfully\");\n return $this->dispatcher->forward(array(\n \"controller\" => \"roles\",\n \"action\" => \"index\"\n ));\n }\n\n }", "title": "" }, { "docid": "6d9f48d5eb6adc974a2496c579c7dfd2", "score": "0.77014446", "text": "public function create()\r\n {\r\n $permissions = Permission::all();\r\n return view('admin::role.create', compact('permissions'));\r\n }", "title": "" } ]
ae7d09d3385e692c46e55e137aa892d4
Get il y a plusieurs user possible pour plusieurs relations
[ { "docid": "1f1f8b8e6d32c562f96ac9987ded0db3", "score": "0.0", "text": "public function getUser2()\n {\n return $this->user2;\n }", "title": "" } ]
[ { "docid": "24be97e9e4bc62a405c35de25a970671", "score": "0.64588094", "text": "public function user()\n {\n \t// belongsTo(RelatedModel, foreignKey = user_id, keyOnRelatedModel = id)\n \treturn $this->belongsTo(User::class,'id_usuario');\n }", "title": "" }, { "docid": "e2797ddccd44810bc0ab1a110eeb8ab0", "score": "0.63436776", "text": "public function relUsers(){\n return $this->hasOne('App\\Models\\User', 'id', 'id_user');\n }", "title": "" }, { "docid": "e242ec62de6b265d270ba0754514368d", "score": "0.6269754", "text": "public function devuelveUser()\n {\n $this->db->query(\"SELECT * FROM dato_persona as dato\n INNER JOIN tipo_documento as tipo ON dato.fk_tipo_documento= tipo.id_tipo_documento\n INNER JOIN rol ON dato.documento = rol.fk_documento\n INNER JOIN tipo_rol ON tipo_rol.id_tipo_rol = rol.fk_tipo_rol\n INNER JOIN ficha ON ficha.codigo_ficha = dato.fk_ficha \n INNER JOIN estado as esta ON esta.id_estado = dato.fk_estado\n \");\n $this->db->execute();\n return $this->db->objetos();\n }", "title": "" }, { "docid": "9a33f4c88cf41f4e94aa19d795a033dd", "score": "0.62370294", "text": "public function userReferrar()\n {\n return $this->has('App\\userReferrar', 'user_id', 'id');\n }", "title": "" }, { "docid": "d98176e435bfb70ba6843b2e12d3e420", "score": "0.6199874", "text": "public function user()\n {\n return $this->morphedByMany(User::class, 'favoritable');\n }", "title": "" }, { "docid": "21c2d1551b5e48ca5151b204db4568f1", "score": "0.6187575", "text": "public function getOroUser(User $user);", "title": "" }, { "docid": "58a8c39b3ffe6782debeb49628207501", "score": "0.61680704", "text": "public function getUserRelationship()\n {\n return $this->userRelationship;\n }", "title": "" }, { "docid": "28f927a9f8c8fdd199ca1ed828d4746a", "score": "0.61592174", "text": "public function user() {\n\t\treturn $this->has_many_and_belongs_to('User', 'department_members');\n\t}", "title": "" }, { "docid": "969f84479e1e1e0a7107a973e4f53f3a", "score": "0.61439383", "text": "public function getUser() {\n \t$lien = Appartient::getBy('id_client', $this->getId_client());\n if (is_array($lien)){\n array_pop($lien);\n foreach($lien as $value) {\n $user[] = User::getById($value->getId_user());\n }\n return $this->user = $user;\n }\n if ($lien)\n return User::getById($lien->getId_user());\n else\n return false;\n\n }", "title": "" }, { "docid": "cd2cffbe73b00f0f76752f937a6e0398", "score": "0.6131904", "text": "public function getUserRelationship($id);", "title": "" }, { "docid": "5fc581986022d85ada7f993fad720af2", "score": "0.61230475", "text": "public function getUser()\n {\n $select = $this->select()\n ->order('id');//Ordinate per id\n return $this->fetchAll($select); //Metodo predefinito che prende in input una SELECT e\n // restituisce tutte le tuple della tabella che soddisfano le condizioni(filtrate)\n }", "title": "" }, { "docid": "c458fdc5a755a1b63de820e83eb40874", "score": "0.61093223", "text": "public function getUser()\n {\n return $this->hasOne(Users::className(), ['id' => 'id_user']);\n }", "title": "" }, { "docid": "1f2a0b1246efde777ce63870e5cb18a0", "score": "0.6108191", "text": "public function returnLikeUser(){\n $userInformation = auth('api')->user();\n $user_id = $userInformation->id;\n\n $userHasManyToManyForms = User::findOrFail($user_id)->usersHaveManyToManyForms;\n foreach ($userHasManyToManyForms as $value) {}\n $existingPivotDataTable = $value->id;\n $foreignKeyId = $value->user_id;\n $users = ManyToManyForms::all()->where('user_id', '=', $foreignKeyId);\n return $users;\n\n }", "title": "" }, { "docid": "44184f85b854a935276d9f6ffbb77ee3", "score": "0.60958683", "text": "public function user(){\n // return $this->belongsTo(\"App\\Gejala\", 'diagnosa', 'user');\n return $this->belongsTo(\"App\\User\", 'id_user', 'id');\n }", "title": "" }, { "docid": "2dffea6bb5db1c4d7df75a1bf6473a12", "score": "0.60905224", "text": "public function getByUser()\n {\n return $this->hasOne(Account::className(), ['id' => 'by_user']);\n }", "title": "" }, { "docid": "0c2b3b4e644b7ef330c10e313306b766", "score": "0.60881543", "text": "public function relation()\n {\n return $this->belongsTo('SocialGraph\\User\\Models\\User', 'relation_id', 'id');\n }", "title": "" }, { "docid": "44b32cd406bcfee2e2ca1b6e991b9554", "score": "0.6071037", "text": "public function getUsuario()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id'])->inverseOf('notificaciones');\n }", "title": "" }, { "docid": "600ecc42ee49105bffc2bbe6f0697894", "score": "0.60660344", "text": "public function user(){\n return $this->belongsTo(User::class, 'roullotes_id', 'id'); // Matos: the roullotes_id from User::class belongsTo id from Roullote::class\n }", "title": "" }, { "docid": "3bf6937a33fd009893f29bc03cbc30fc", "score": "0.60521096", "text": "public function getOnwer() {\n // no need to check whether exist because of database constrain\n return User::getUserById($this->user_id);\n }", "title": "" }, { "docid": "65fde4b0ee38c2d446051369e5b87ba1", "score": "0.6050077", "text": "public function relUsers(){\n return $this->hasMany('App\\User', 'id', 'users_id' );\n }", "title": "" }, { "docid": "bf4dd7336409d13f2171382ab2bf0f65", "score": "0.60435236", "text": "public function getUser()\n {\n return $this->hasOne(Users::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "bf4dd7336409d13f2171382ab2bf0f65", "score": "0.60435236", "text": "public function getUser()\n {\n return $this->hasOne(Users::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "bf4dd7336409d13f2171382ab2bf0f65", "score": "0.60435236", "text": "public function getUser()\n {\n return $this->hasOne(Users::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "bf4dd7336409d13f2171382ab2bf0f65", "score": "0.60435236", "text": "public function getUser()\n {\n return $this->hasOne(Users::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "48beb0d2fa785b4d683577f0e5bc3039", "score": "0.6036279", "text": "public function languageUser() {\n return $this->belongsToMany('App\\User', 'user_language', 'language_id', 'user_id');\n }", "title": "" }, { "docid": "9830a601535dc2fb8cf341b561975856", "score": "0.603546", "text": "public function getUser()\r\n {\r\n return $this->hasOne(User::className(), ['id' => 'user_id']);\r\n }", "title": "" }, { "docid": "01c898f452a75f8d0027d932c98e656e", "score": "0.603221", "text": "public function utilisateur()\n {\n return $this->belongsTo(Utilisateurs::class);\n }", "title": "" }, { "docid": "73cbbf32cb371212276a42468d3c1e08", "score": "0.6025994", "text": "public function users()\n {\n return $this->belongsToMany(User::class,'user_complejo','user_id','complejo_id');\n }", "title": "" }, { "docid": "70ec32743508ca4343d73038ae2a7cdf", "score": "0.60229236", "text": "public function user()\n {\n return $this->belongsToMany(self::$ci->dbModel->User);\n }", "title": "" }, { "docid": "56dd1838647f18416d196ee28dbd9854", "score": "0.6018732", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'id_user']);\n }", "title": "" }, { "docid": "56dd1838647f18416d196ee28dbd9854", "score": "0.6018732", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'id_user']);\n }", "title": "" }, { "docid": "658c6344f126ca0d7112df029a7f04c6", "score": "0.6011518", "text": "public function getPersonUser()\r\n {\r\n return User::find()\r\n ->person()\r\n ->andWhere(['or', ['username'=>$this->username], ['mobile'=>$this->username]])\r\n ->one();\r\n }", "title": "" }, { "docid": "0d86d7e1dfd7affc6c07b5cc163254ce", "score": "0.60087186", "text": "public function getUsers()\n {\n return $this->hasOne(Users::class, ['id' => 'users_id'])->inverseOf('dislikes');\n }", "title": "" }, { "docid": "09969ca93ad7ffc8551721c687d6d00d", "score": "0.6008373", "text": "public function user()\n {\n \t// belongsTo(RelatedModel, foreignKey = user_id, keyOnRelatedModel = id)\n \treturn $this->belongsTo(User::class);\n }", "title": "" }, { "docid": "dfa87e546cf5f30d5f1c9714377b6704", "score": "0.6002981", "text": "public function relacionUsuario()\n {\n return $this->hasOne(Usuarios::class, 'PK_User_Codigo', 'FK_User_Codigo');\n }", "title": "" }, { "docid": "1590c910144ae159c8f8013c49e1dcb4", "score": "0.5982999", "text": "public function getUsers()\n {\n return $this->hasMany(User::className(), ['id' => 'user_id'])->viaTable('{{%user_friendship}}', ['friend_user_id' => 'id']);\n }", "title": "" }, { "docid": "525afa44c4f5b615670d5ca59b04f0c9", "score": "0.5971782", "text": "public function getCounterUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id'])\n ->viaTable(ChatMember::tableName(), ['id' => 'member_id']);\n }", "title": "" }, { "docid": "f164749685f19bce07524e2ecbcc27e6", "score": "0.59710664", "text": "public function users(){\n return $this->morphedByMany(User::class, 'usersectoryables');\n }", "title": "" }, { "docid": "a5ff87d31ad67f17062d840bb64e2611", "score": "0.59680146", "text": "public function getUser()\n {\n return $this->hasOne(Users::className(), ['uid' => 'user_id']);\n }", "title": "" }, { "docid": "a5ff87d31ad67f17062d840bb64e2611", "score": "0.59680146", "text": "public function getUser()\n {\n return $this->hasOne(Users::className(), ['uid' => 'user_id']);\n }", "title": "" }, { "docid": "498b97a6962f5bfc47878a65a53e3975", "score": "0.5965932", "text": "public function getUsers()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "498b97a6962f5bfc47878a65a53e3975", "score": "0.5965932", "text": "public function getUsers()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "ad0cd23f7a95c820b0aa07951fc8ee59", "score": "0.5965385", "text": "function user()\n {\n \t// belongsTo(RelatedModel, foreignKey = users_id, keyOnRelatedModel = id)\n \treturn $this->belongsTo('App\\User');\n }", "title": "" }, { "docid": "4d04dca0a0f1cc162e4bf703fbd4ed8c", "score": "0.5961421", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "4d04dca0a0f1cc162e4bf703fbd4ed8c", "score": "0.5961421", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "4d04dca0a0f1cc162e4bf703fbd4ed8c", "score": "0.5961421", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "4d04dca0a0f1cc162e4bf703fbd4ed8c", "score": "0.5961421", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "4d04dca0a0f1cc162e4bf703fbd4ed8c", "score": "0.5961421", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "4d04dca0a0f1cc162e4bf703fbd4ed8c", "score": "0.5961421", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "4d04dca0a0f1cc162e4bf703fbd4ed8c", "score": "0.5961421", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "4d04dca0a0f1cc162e4bf703fbd4ed8c", "score": "0.5961421", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "4d04dca0a0f1cc162e4bf703fbd4ed8c", "score": "0.5961421", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "4d04dca0a0f1cc162e4bf703fbd4ed8c", "score": "0.5961421", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "4d04dca0a0f1cc162e4bf703fbd4ed8c", "score": "0.5961421", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "4d04dca0a0f1cc162e4bf703fbd4ed8c", "score": "0.5961421", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "4d04dca0a0f1cc162e4bf703fbd4ed8c", "score": "0.5961421", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "4d04dca0a0f1cc162e4bf703fbd4ed8c", "score": "0.5961421", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "1bd6900d282d56094e0acf074e8ac009", "score": "0.5955884", "text": "public function getMembersAsUser(){\n return $this->hasMany('App\\Models\\RoomsMembersModel', 'room_id', 'id')\n ->get()\n ->map(function (RoomsMembersModel $member){\n return User::find($member->user_id);\n })->reject(function ($member) {\n return empty($member);\n })->all();\n }", "title": "" }, { "docid": "fa0754357ed93c50e34f937e8abddc31", "score": "0.5955826", "text": "public function users()\n {\n return $this->belongsToMany(Guardian::getUserClass(), Guardian::getUsersRolesTable(), 'role_id', 'user_id')\n ->withTimestamps();\n }", "title": "" }, { "docid": "6c66e6c9db9258720ab824ab123ed64d", "score": "0.5950013", "text": "public function user(): Relation\n {\n return $this->belongsTo(config(\"auth.providers.users.model\"));\n }", "title": "" }, { "docid": "ecd8c05b7dbcc329257a5dc4d1a54293", "score": "0.5943972", "text": "public function getUser()\n {\n return static::hasOne(User::className(), ['user_id' => 'id']);\n }", "title": "" }, { "docid": "4254f34ac59fcb5b664ddc066df4bfda", "score": "0.5941909", "text": "function getRelationActividades($user) {\n\t\t$this->db->select('AM.*, V.*');\n\t\t$this->db->join('Valor V','AM.valor = V.id','LEFT OUTER');\n\t\t$this->db->where('AM.usuario',$user);\n $this->db->where('V.active', 1);\n\t\t//$this->db->order_by('mes');\n\t\t\n\t\treturn $this->db->get('Actividad_Mes AM')->result();\n\t}", "title": "" }, { "docid": "12978720435b8b649ccfa93c0e68e85a", "score": "0.5937102", "text": "public function users()\n {\n return $this->belongsToMany('App\\User', 'legionnaire_user');\n }", "title": "" }, { "docid": "82714a7188823175e53d91412841abda", "score": "0.593613", "text": "public function getallRelationOfUser($_id_user)\n {\n $request = 'SELECT * FROM ' . self::TAB_RELATION . ' WHERE id_user = :value ';\n $arr = array(\n array(\n \":value\",\n $_id_user\n )\n );\n $aRes = parent::reqPrepaExecSEl($request, $arr);\n return $aRes;\n }", "title": "" }, { "docid": "b75b12313038764b924820f2d60ca17a", "score": "0.5935582", "text": "public function user()\n {\n return $this->belongsTo(User::class);\n // Si por algun motivo la relacion no toma efecto se puede indicar manual mente sobre que campo se hará.\n // return $this->belongsTo(User::class, 'user_id');\n }", "title": "" }, { "docid": "8525f5d5abe1449609d8c981169ae394", "score": "0.59351987", "text": "public function getUserByRequerimiento()\n {\n $users = collect([]);\n\n $centro = $this->centro()->firstOrFail();\n $centroUser = $centro->users()->firstOrFail();\n $users->push($centroUser);\n\n $empresa = $centro->empresa()->firstOrFail();\n $empresaUser = $empresa->users()->firstOrFail();\n $users->push($empresaUser);\n\n $compassUsers = \\App\\User::whereHasMorph(\n 'userable',\n ['App\\CompassRole'],\n function ($query) {\n $query->where('name', 'like', 'Compras')->orWhere('name', 'like', 'Despacho');\n }\n )->get();\n foreach ($compassUsers as $user) {\n $users->push($user);\n }\n\n return $users;\n }", "title": "" }, { "docid": "c39c424f5bf2e19cefa16a518a7d8617", "score": "0.5931661", "text": "public function relUser()\n {\n return $this->belongsTo('User', 'id_user');\n }", "title": "" }, { "docid": "c39c424f5bf2e19cefa16a518a7d8617", "score": "0.5931661", "text": "public function relUser()\n {\n return $this->belongsTo('User', 'id_user');\n }", "title": "" }, { "docid": "2d49f1053ca3dd672b9c40269b51cbae", "score": "0.5929445", "text": "public function getDiamanteUser(User $user);", "title": "" }, { "docid": "bb87cbfbb15ca18f063ef76d98215352", "score": "0.5924256", "text": "public function getUsuario()\n {\n return $this->hasOne(User::className(), ['id' => 'id_usuario']);\n }", "title": "" }, { "docid": "74c83f112a25e9f496fd499c4639fed1", "score": "0.5924231", "text": "public function users()\n\t{\n\t\treturn $this->belongsToMany(config('auth.model'), Auth::getTableName('user_permissions'))\n\t\t\t->orderBy('username');\n\t}", "title": "" }, { "docid": "85ae587a2e09725bb34772daf20df5db", "score": "0.59111637", "text": "public function getAluno()\n {\n return $this->hasOne(User::className(), ['id' => 'aluno_id']);\n }", "title": "" }, { "docid": "3d761dfab73d88d3cfcd9fd4e0b531bd", "score": "0.5906125", "text": "public function getUser()\n {\n return $this->hasOne(MPUsers::className(), ['id' => 'id_user']);\n }", "title": "" }, { "docid": "bacd97cefc100b4035da86a6d022fcfe", "score": "0.5905919", "text": "public function user() {\n \n return $this->hasMany('App\\Models\\UserReg');\n }", "title": "" }, { "docid": "0658bb853e2359f647dcc8b71e27334e", "score": "0.59029084", "text": "public function users()\n {\n return $this->belongsToMany('App\\User', 'eula_user', 'eula_id', 'user_id')\n ->withPivot('user_id', 'eula_id', 'signature', 'accepted_at', 'created_by', 'updated_by')\n ->withTimestamps();\n }", "title": "" }, { "docid": "ce11da3ef60afc2cddfce8d03a4760a9", "score": "0.5900268", "text": "public function usuarios()\n {\n return $this->hasMany('App\\User');\n }", "title": "" }, { "docid": "d89d3b38b795c5677b48c5cd6d83add7", "score": "0.5894678", "text": "public function getFriendUsers()\n {\n return $this->hasMany(User::className(), ['id' => 'friend_user_id'])->viaTable('{{%user_friendship}}', ['user_id' => 'id']);\n }", "title": "" }, { "docid": "85b16758abdd2809570effd2e926c963", "score": "0.58909935", "text": "public function users()\n {\n // belongsTo(RelatedModel, foreignKey = _id, keyOnRelatedModel = id)\n return $this->belongsTo(User::class, 'id_user', 'id');\n }", "title": "" }, { "docid": "66bf94d33d13389a64daed15d5c88fe5", "score": "0.5882492", "text": "public function getUser()\n {\n return $this->hasOne(UserName::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "cc7dce61c2f780d8296b2de79d50f15f", "score": "0.58795995", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['user_id' => 'user_id']);\n }", "title": "" }, { "docid": "0fd400a0b3a1f28e50c71d31523e1b0c", "score": "0.58782977", "text": "public function user()\n {\n return $this->belongsToMany('App\\Models\\Users', 'user_id');\n }", "title": "" }, { "docid": "2aab6282bb106cd0bf801fa6c6559011", "score": "0.5874866", "text": "public function userKnow(\\App\\User $user)\n {\n return \\App\\Repositories\\UserFriendshipRepository::getFriendsOf($user);\n // return $user->select('users.id','email', 'firstname', 'lastname')\n // ->leftJoin('orders',function($join){\n // $join->on('orders.buyer_id','=','users.id')\n // ->orOn('orders.owner_id','=','users.id');\n // })\n // ->leftJoin('houses',function($join){\n // $join->on('houses.buyer_id','=','users.id')\n // ->orOn('houses.owner_id','=','users.id');\n // })\n // ->where('users.id','<>',$user->id)\n // ->where(function ($query) use ($user) {\n // $query->where('parent_id',$user->id)\n // ->orWhere('users.id',$user->parent_id)\n // ->orwhere('orders.owner_id',$user->id)\n // ->orWhere('orders.buyer_id',$user->id)\n // ->orwhere('houses.owner_id',$user->id)\n // ->orWhere('houses.buyer_id',$user->id);\n // })\n // ->get()\n // ->unique();\n }", "title": "" }, { "docid": "4efe74a2262ca53f935cdb5a5d6ed345", "score": "0.5867048", "text": "public function getFkuser0()\n {\n return $this->hasOne(Usuario::className(), ['id' => 'fkuser']);\n }", "title": "" }, { "docid": "efe3e8dab0da70019a9c77a811b6897b", "score": "0.5863231", "text": "public function users()\r\n {\r\n return $this->belnogsToMany('App\\User');\r\n }", "title": "" }, { "docid": "932b02c9c604811f0cd6dc8353f4de04", "score": "0.58629334", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'userId']);\n }", "title": "" }, { "docid": "932b02c9c604811f0cd6dc8353f4de04", "score": "0.58629334", "text": "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'userId']);\n }", "title": "" }, { "docid": "21fb8c0657ec1b4e8cc2e0a3b7c77006", "score": "0.58575314", "text": "public function getUser2()\n {\n return $this->hasOne(User::class, ['id' => 'user_id2']);\n }", "title": "" }, { "docid": "0d3d9d2d8a950ef88809635993d74905", "score": "0.585669", "text": "public function getFkIdUser()\n {\n return $this->hasOne(User::className(), ['id' => 'fk_IdUser']);\n }", "title": "" }, { "docid": "3b5ee0b949f37b3edcc8566293082469", "score": "0.58443993", "text": "public function requestFriendsUsers()\n {\n return $this->hasmanyThrough('App\\Eloquent\\User', 'App\\Eloquent\\Friends', 'friend_id', 'id', 'id', 'user_id');\n }", "title": "" }, { "docid": "c8ff23d504990962f83a6ff16a6de5b3", "score": "0.5841096", "text": "static function getMotcuaUser(){\r\n\t\t$sql = \"\r\n\t\tselect g_u.ID_U , CONCAT(emp.FIRSTNAME,emp.LASTNAME) as FULLNAME \r\n\t\tfrom\r\n\t\t(SELECT fk_u_g.ID_U\r\n\t\tfrom `qtht_groups` gr \r\n\t\tinner join `fk_users_groups` fk_u_g on gr.ID_G = fk_u_g.ID_G\r\n\t\twhere gr.CODE='NMC'\r\n\t\t) g_u\r\n\t\tinner join qtht_users u on u.ID_U = g_u.ID_U\r\n\t\tinner join qtht_employees emp on emp.ID_EMP = u.ID_EMP\r\n\t\t\";\r\n\t\t$dbAdapter = Zend_Db_Table::getDefaultAdapter();\r\n\t\t$query = $dbAdapter->query($sql);\r\n\t\t$re = $query->fetchAll();\r\n\t\treturn $re;\r\n\t}", "title": "" }, { "docid": "ce44a92d6b1833611dd592845603ea15", "score": "0.5841058", "text": "public function getIngresoconconcursomeritosuser()\n {\n return $this->ingresoconconcursomeritosuser;\n }", "title": "" }, { "docid": "42866cf6be43f21f765e0057bc8a02d7", "score": "0.5832001", "text": "public function users()\n {\n return $this->hasMany('User', 'referral_level_id', 'id');\n }", "title": "" }, { "docid": "dbe876d8ad65a349e8e8e7c3f2661eb9", "score": "0.58268946", "text": "public function user()\n {\n return $this->belongsTo(User::class);\n // model = user\n // table = users\n // id = id\n // lets look at myself, and see if i have a user_id\n // oh i do have a user_id = 31\n // lets go find that user! with id 31\n // oh i found it! lets return it.\n // return $user\n //return $this->hasMany('App\\Model\\User');\n }", "title": "" }, { "docid": "3832208286a0acc7b1c9e4662e826a19", "score": "0.582397", "text": "public function getUser()\n {\n return $this->hasOne(Admin::className(), ['id' => 'user_id']);\n }", "title": "" }, { "docid": "311e083435b94648f8745934e8b7f479", "score": "0.5822937", "text": "public function getFollowingUsers($user){\n\t\t$em = $this->getEntityManager();\n // Cargo el repositorio de seguidores a partir de la entidad\n\t\t$following_repo = $em->getRepository('BackendBundle:Following');\n // Filtro el repositorio según los follows que hacemos\n\t\t$following = $following_repo->findBy(array('user' => $user));\n // Creo el array con la búsqueda\n\t\t$following_array = array();\n\t\tforeach($following as $follow){\n\t\t\t$following_array[] = $follow->getFollowed();\n\t\t}\n\t\t$user_repo = $em->getRepository('BackendBundle:User');\n // 'u' represntará a la tabla de usuarios\n\t\t$users = $user_repo->createQueryBuilder('u')\n /*\n * extraer cuando : el usuario sea distinto al logeado\n * y coincida con el listado de following\n */\n\t\t\t->where(\"u.id != :user AND u.id IN (:following)\")\n // indicamos los valores de la búsqueda 'user' y 'following'\n\t\t\t->setParameter('user', $user->getId())\n\t\t\t->setParameter('following', $following_array)\n // indicamos el orden\n /* ORDENAMOS POR APELLIDO\n ->orderBy('u.surname', 'DESC');\n */\n ->orderBy('u.id', 'DESC');\n // Regresamos el listado con la búsqueda.\n\t\treturn $users;\n\t}", "title": "" }, { "docid": "ff02928b0a66f8a8138e0dda20e69352", "score": "0.5818018", "text": "public function relation()\n {\n return $this->belongsTo($this->getRelationClass('Streams\\Model\\UserModel'));\n }", "title": "" }, { "docid": "05b1f832410f59320302fc3af00b531a", "score": "0.581631", "text": "public function user() {\n # Define an inverse one-to-many relationship.\n return $this->belongsTo('\\LMG\\User');\n }", "title": "" }, { "docid": "84b265884c8158531d4aa62328163e37", "score": "0.58149284", "text": "public function user()\n {\n \treturn $this->belongsTo('Chatty\\Plus\\Users\\User', 'user_id');\n }", "title": "" }, { "docid": "0f8dc67e4ffb1b0722ea57908caae308", "score": "0.5813917", "text": "public function user()\n {\n return $this->belongsTo('App\\Models\\User','usu_mod_id','id');\n }", "title": "" }, { "docid": "0f8dc67e4ffb1b0722ea57908caae308", "score": "0.5813917", "text": "public function user()\n {\n return $this->belongsTo('App\\Models\\User','usu_mod_id','id');\n }", "title": "" }, { "docid": "0f8dc67e4ffb1b0722ea57908caae308", "score": "0.5813917", "text": "public function user()\n {\n return $this->belongsTo('App\\Models\\User','usu_mod_id','id');\n }", "title": "" } ]
d3cfa78789e431712d81a251a90849e7
add tags to the cached list
[ { "docid": "f54c2fd8773f79ade0f45f47e2f2e592", "score": "0.58206457", "text": "public function addTags($tag){\r\n \tif (is_array($tag))\r\n \t\t$this->_tags = array_merge($this->_tags, $tag);\r\n \telse\r\n\t \t$this->_tags[] = $tag;\r\n }", "title": "" } ]
[ { "docid": "dc2ecd24b5251144dca689a93d571059", "score": "0.6922168", "text": "function addTag($tag) {\r\n\t\tstatic $addedTags = array();\r\n\t\tif (!in_array($tag, $addedTags)) {\r\n\t\t\t$addedTags[] = $tag;\r\n\t\t\t$GLOBALS['TSFE']->addCacheTags(array($tag));\r\n\t\t}\t\r\n\t}", "title": "" }, { "docid": "2bbe5def89e86fda07feefc5a63281ef", "score": "0.6907748", "text": "protected function registerTags()\n {\n $this->getCacheContext()->registerTags(\n [\n \\Magento\\Catalog\\Model\\Category::CACHE_TAG,\n \\Magento\\Catalog\\Model\\Product::CACHE_TAG\n ]\n );\n }", "title": "" }, { "docid": "92ef9e74af553059ea8181beab7ed392", "score": "0.68417823", "text": "public static function addCacheTag($tag)\n\t{\n\t\tif (is_array($tag)) {\n\t\t\tself::$cacheTags = array_merge(self::$cacheTags, $tag);\n\t\t}\n\t\telse {\n\t\t\tself::$cacheTags[] = $tag;\n\t\t}\n\t}", "title": "" }, { "docid": "88aa4037e63368df2bc4d7b1be495ed4", "score": "0.6813548", "text": "public function poisontags($tags = ['default'])\n {\n\twhile(list($key, $tag) = each($tags))\n\t{\n\t $fetch = parent::get($this->tags_key_prefix.$tag);\n\t if (strlen($fetch) == 0)\n\t\tparent::add($this->tags_key_prefix.$tag, 0, false, $this->cache_timeout_tag); // no this tag. Just reset to zero\n\t else\n\t\tparent::increment($this->tags_key_prefix.$tag, 1); // this tag exist in cache. just add +1 \n\t}\n }", "title": "" }, { "docid": "cef6feffe667fe2d1eb7c7c947b9c52f", "score": "0.6177033", "text": "public function getCacheTags() {\n if ($node = \\Drupal::routeMatch()->getParameter('node')) {\n //if there is node add its cachetag\n return Cache::mergeTags(parent::getCacheTags(), array('node:' . $node->id()));\n } else {\n //Return default tags instead.\n return parent::getCacheTags();\n }\n }", "title": "" }, { "docid": "d5c86d879344ffede2246ccc620b3b74", "score": "0.61469513", "text": "public function getCacheTags()\n {\n return array_merge(parent::getCacheTags(), $this->getCurrentCategory()->getCacheIdTags());\n }", "title": "" }, { "docid": "8131f81e9ffb140ce211fda2c8990352", "score": "0.6089795", "text": "public\n\tfunction getCacheTags() {\n\t\tif ( $node = \\Drupal::routeMatch()->getParameter( 'node' ) ) {\n\t\t\t//if there is node add its cachetag\n\t\t\treturn Cache::mergeTags( parent::getCacheTags(), array( 'node:' . $node->id() ) );\n\t\t} else {\n\t\t\t//Return default tags instead.\n\t\t\treturn parent::getCacheTags();\n\t\t}\n\t}", "title": "" }, { "docid": "7f69dd56140f934d8a647f1050133b9c", "score": "0.5911582", "text": "public function add($key, $value, $flags = false, $timeout = 0, $tags = [])\n {\n\tif (empty($tags))\n\t return parent::add($key, $value, $flags, $timeout);\n \n\t$tags_ver = $this->cacheTagsInsert($tags);\n\t$to_cache['tagsver'] = $tags_ver;\n\t$to_cache['data'] = $value;\n\tif (!$timeout)\n\t $to_cache['valid_ts'] = time() + 100500; // look like 27 hours\n\telse\n\t $to_cache['valid_ts'] = time() + $timeout;\n\t$fetch = parent::get($key);\n\tif (empty($fetch))\n\t parent::add($key, $to_cache, $flags, $timeout);\n\telse\n\t parent::replace($key, $to_cache, $flags, $timeout);\n }", "title": "" }, { "docid": "733a1c2caad43bfc80b208e771496777", "score": "0.5911239", "text": "public function getCacheTags()\n {\n return Cache::mergeTags(parent::getCacheTags(), ['jobs_sites_block']);\n }", "title": "" }, { "docid": "292fa16c041ef1856231f8bde6e9105a", "score": "0.5816209", "text": "public function loadTags() {\n\t\t\n\t\t\t$sql = \"SELECT tag FROM tray_tag WHERE tray_id='$trayID'\";\n\t\t\t\n\t\t\t$rawResult = $gremlin->query($sql);\n\t\t\t\n\t\t\tforeach($rawResult as $newTag) {\n\t\t\t\n\t\t\t\t$this->tags[] = new Tag($tag);\n\t\t\t}\n\t\t\n\t\t}", "title": "" }, { "docid": "a6b5364c3897e7339056f37bb63c9356", "score": "0.57975054", "text": "protected function addTags($list, &$tags) {\n //loop on the tags to see if they are already added. \n foreach ($tags as $name => $val) {\n if (isset($this->{$list}['tags'][$name])) { // found it\n $this->{$list}['tags'][$name]['count']++; // count another stumble with tag in it\n $this->{$list}['tags'][$name]['value'] += $val; // add value to tag\n }\n else { // new tag, add it\n $this->{$list}['tags'][$name] = array ('count' => 1, 'value' =>$val);\n }\n }\n }", "title": "" }, { "docid": "ef1c9cc45e5176b0a6d36de25cc3ad39", "score": "0.5751746", "text": "function get_tags()\r\n\t{\r\n\t\t$this->tag_list = array_map('strtolower', $this->tag_dictionary->get_tag_list());\r\n\t}", "title": "" }, { "docid": "64bbd4240d5a67982bb8055cceda92c2", "score": "0.5739904", "text": "public function getCacheIdTags()\n {\n $tags = parent::getCacheIdTags();\n if ($this->getCategoryId()) {\n $tags[] = Mage_Catalog_Model_Category::CACHE_TAG . '_' . $this->getCategoryId();\n }\n return $tags;\n }", "title": "" }, { "docid": "264095bc1f44e007dfc2728b4a6228a6", "score": "0.5729113", "text": "function makeCache($force=false) {\n\t\t# Check for already existent cache.\n\t\tif(!empty($this->widgetCache) && !$force) {\n\t\t\treturn $this->widgetCache;\n\t\t}\n\t\tif(file_exists(CACHE_DIR.'tag-widget.tmp') && !$force) {\n\t\t\tinclude CACHE_DIR.'tag-widget.tmp';\n\t\t\t$this->widgetCache=$cache;\n\t\t\treturn $this->widgetCache;\n\t\t}\n\n\t\t// Otherwise we make a new cache!\n\t\t# List tags\n\t\t$lister=new tag_lister();\n\t\t$tags=$lister->makeTagList();\n\t\tif(!count($tags)) {\n\t\t\treturn array();\n\t\t}\n\n\t\tarsort($tags);\n\t\t$max=count(max($tags));\n\n\t\t$cache=array();\n\t\tforeach($tags as $tag=>$entries) {\n\t\t\t$cache[$tag]=array(\n\t\t\t\t'r'=>count($entries)/$max,\n\t\t\t\t'a'=>count($entries)\n\t\t\t);\n\t\t}\n\n\t\t# Save the cache and return it\n\t\tsystem_save(CACHE_DIR.'tag-widget.tmp', array('cache'=>$cache));\n\t\treturn $cache;\n\t}", "title": "" }, { "docid": "13b5843c2321d9494eed9e774b8039bf", "score": "0.5647143", "text": "public function tags(Request $request)\n {\n // store items by tag\n if (!Cache::tags(['people', 'artists'])->has('user1')) { // check if exist and is not null\n Cache::tags(['people', 'artists'])->put('user1', 'tagged_value', 10);\n }\n\n if (!Cache::tags(['people', 'artists'])->has('user1')) { // check if exist and is not null\n Cache::tags(['people', 'artists'])->put('user1', 'tagged_value', 10);\n }\n \n $user1 = Cache::tags(['people', 'artists'])->get('user1');\n\n // remove items\n //Cache::tags(['people', 'authors'])->flush();\n //Cache::tags(['people', 'artists'])->forget('user2');\n //Cache::tags('people')->flush();\n\n return [\n 'user1' => $user1,\n ];\n }", "title": "" }, { "docid": "0b80daca6ceb8f2cfa462543bcae586a", "score": "0.5638969", "text": "public function removeAllTags() {\n\t\t$this->tags = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n\t}", "title": "" }, { "docid": "dc5a288ac97f12e557889a4d873a9f33", "score": "0.5623265", "text": "function getTags() {}", "title": "" }, { "docid": "f1565f84de42d3568e50f12f26ff7547", "score": "0.55691504", "text": "private function getAllTags() {\n\n foreach ($this->xmlfile->{'policy-tag-list'}->children() as $tag) {\n $this->allTags[$tag->name->__toString()] = new WatchGuardTag($tag);\n }\n\n }", "title": "" }, { "docid": "e1067ddf402f16d68981dbf534b50fe2", "score": "0.55200535", "text": "private function addToCache($data)\n {\n $this->m_cache[] = $data;\n }", "title": "" }, { "docid": "da418504965539a07c8e5e32dcfaed00", "score": "0.5516705", "text": "private function emulateTags()\n {\n $this->storage = new TaggedStorage($this->cache);\n\n $this->cache->shouldReceive('tags')->with('tymon.jwt')->once()->andReturn(Mockery::self());\n }", "title": "" }, { "docid": "545b0d315fdca4c7623a47b328f7261d", "score": "0.5465082", "text": "public function getCacheTagsToInvalidateOnUpdate(): array\n {\n return [\n 'recurring_quotes',\n ];\n }", "title": "" }, { "docid": "83b46b48242e8fd42ecc5abac34d203d", "score": "0.5458479", "text": "public function addTag($tag)\n {\n $this->tagsToRemove = array_remove($this->tagsToRemove, $tag);\n $this->tags = array_insert($this->tags, $tag);\n }", "title": "" }, { "docid": "a468bb42237e6ff6e91db0a9dd545fb6", "score": "0.54375243", "text": "public static function onListDefinedTags( &$tags ) {\n\t\t$tags[] = 'wikilove';\n\t}", "title": "" }, { "docid": "8e9d30873d35e4eefa50d34adb94399c", "score": "0.5426262", "text": "function isCacheable()\n\t{\n\t\t\n\t\t/*\n\t\t\tif(eregi(\"^if\", $this->_weTag)) {\n\t\t\t\t$this->lifeTime = 0;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t*/\n\t\t\n\t\tif ($this->lifeTime < 1) {\n\t\t\treturn false;\n\t\t\n\t\t}\n\t\t\n\t\t// the following tags are cacheable, to add a cacheable tag, only\n\t\t// put the tagname to this array\n\t\t$cacheableTags = array(\n\t\t\t\n\t\t\t\t'a', \n\t\t\t\t'author', \n\t\t\t\t'banner', \n\t\t\t\t'bannerSelect', \n\t\t\t\t'calculate', \n\t\t\t\t'category', \n\t\t\t\t'categorySelect', \n\t\t\t\t'charset', \n\t\t\t\t'checkForm', \n\t\t\t\t'colorChooser', \n\t\t\t\t'css', \n\t\t\t\t'date', \n\t\t\t\t'dateSelect', \n\t\t\t\t'description', \n\t\t\t\t'DID', \n\t\t\t\t'docType', \n\t\t\t\t'flashmovie', \n\t\t\t\t'formfield', \n\t\t\t\t'href', \n\t\t\t\t'icon', \n\t\t\t\t'img', \n\t\t\t\t'input', \n\t\t\t\t'js', \n\t\t\t\t'keywords', \n\t\t\t\t'link', \n\t\t\t\t'listdir', \n\t\t\t\t'navigation', \n\t\t\t\t'navigationEntries', \n\t\t\t\t'navigationEntry', \n\t\t\t\t'navigationField', \n\t\t\t\t'navigationWrite', \n\t\t\t\t'path', \n\t\t\t\t'printVersion', \n\t\t\t\t'quicktime', \n\t\t\t\t'registeredUser', \n\t\t\t\t'returnPage', \n\t\t\t\t'search', \n\t\t\t\t'select', \n\t\t\t\t'shopVat', \n\t\t\t\t'subscribe', \n\t\t\t\t'sum', \n\t\t\t\t'target', \n\t\t\t\t'textarea', \n\t\t\t\t'title', \n\t\t\t\t'url', \n\t\t\t\t'userInput', \n\t\t\t\t'var', \n\t\t\t\t'xmlfeed', \n\t\t\t\t\n\t\t\t\t// the following tags could be chached but we don't have to do so\n\t\t\t\t'addPercent', \n\t\t\t\t'back', \n\t\t\t\t'bannerSum', \n\t\t\t\t'category', \n\t\t\t\t'controlElement', \n\t\t\t\t'field', \n\t\t\t\t'hidePages', \n\t\t\t\t'listviewEnd', \n\t\t\t\t'listviewPageNr', \n\t\t\t\t'listviewPages', \n\t\t\t\t'listviewRows', \n\t\t\t\t'listviewStart', \n\t\t\t\t'position', \n\t\t\t\t'postlink', \n\t\t\t\t'prelink', \n\t\t\t\t'sendMail'\n\t\t);\n\t\t\n\t\t// check if the tag is cacheable\n\t\tif (in_array($this->_weTag, $cacheableTags)) {\n\t\t\treturn true;\n\t\t\n\t\t}\n\t\t\n\t\t// some tags have specific types which couldn't be cached. The following\n\t\t// array specifies which of these tags could be cached.\n\t\t// the first dimension specifies the tagname nad the second dimension which\n\t\t// type attribute of this tag is cacheable\n\t\t$cacheableTypeTags = array(\n\t\t\t\n\t\t\t\t'hidden' => array(\n\t\t\t\t\t'', 'request'\n\t\t\t\t), \n\t\t\t\t'pagelogger' => array(\n\t\t\t\t\t'standard', 'fileseerver', 'download'\n\t\t\t\t), \n\t\t\t\t'var' => array(\n\t\t\t\t\t\n\t\t\t\t\t\t'date', \n\t\t\t\t\t\t'document', \n\t\t\t\t\t\t'href', \n\t\t\t\t\t\t'img', \n\t\t\t\t\t\t'link', \n\t\t\t\t\t\t'multiobject', \n\t\t\t\t\t\t'property', \n\t\t\t\t\t\t'request', \n\t\t\t\t\t\t'select', \n\t\t\t\t\t\t'shopVat'\n\t\t\t\t)\n\t\t);\n\t\t\n\t\t// check if the tag with the give type-attribute is cacheable\n\t\tif (array_key_exists($this->_weTag, $cacheableTypeTags)) {\n\t\t\t$type = isset($this->_params['type']) ? $this->_params['type'] : '';\n\t\t\treturn in_array($type, $cacheableTypeTags[$this->_weTag]);\n\t\t\n\t\t}\n\t\t\n\t\tif ($this->_weTag == \"setVar\" && isset($this->_params['from']) && $this->_params['from'] == \"listview\") {\n\t\t\treturn true;\n\t\t\n\t\t}\n\t\t\n\t\treturn false;\n\t\n\t}", "title": "" }, { "docid": "4daaf49267c4d24cff6caca3a7009001", "score": "0.5423034", "text": "abstract public function buildCacheTags($block);", "title": "" }, { "docid": "1506324eaa03d4588db4d18f9bc33c1d", "score": "0.54181486", "text": "public static function registerTagsToRemove($tags){\n self::$tagsToRemove[]=$tags;\n }", "title": "" }, { "docid": "2503f23385bba7bbda77e1ae250be89f", "score": "0.54175824", "text": "private function tag($tags)\n {\n $this->initialize();\n\n if (!is_array($tags)) {\n $tags = [$tags];\n }\n foreach ($tags as $tag) {\n if (!is_string($tag)) {\n throw new InvalidArgumentException(sprintf('Cache tag must be string, \"%s\" given', is_object($tag) ? get_class($tag) : gettype($tag)));\n }\n if (isset($this->tags[$tag])) {\n continue;\n }\n if (!isset($tag[0])) {\n throw new InvalidArgumentException('Cache tag length must be greater than zero');\n }\n if (isset($tag[strcspn($tag, '{}()/\\@:')])) {\n throw new InvalidArgumentException(sprintf('Cache tag \"%s\" contains reserved characters {}()/\\@:', $tag));\n }\n $this->tags[$tag] = $tag;\n }\n\n return $this;\n }", "title": "" }, { "docid": "85055f2a88a734f22f25ed82637efbe0", "score": "0.54123133", "text": "public function getCacheTags($data, $tags = array())\r\n {\r\n return $tags;\r\n }", "title": "" }, { "docid": "a68a7111901623a94d2b5d2ebfa2f057", "score": "0.53926545", "text": "public static function addActiveTags($tags){\n //xxxxxxxxxxxxxxxNOTE that this block is not neccessasry and can be savely be removed if it is causing problem. It tries to avoid adding parents and duplicatesxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n foreach(self::$activeTags as $at){//\n \n if(starts_with($at,$tags))return;//Basically if the one that is already in starts with the new one we are trying to add, then the new one is a parent and we do not need to add it.\n }\n //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n self::$activeTags[]=$tags;\n \n }", "title": "" }, { "docid": "ba88b97cc78c529b6e77b66d9358af44", "score": "0.53877336", "text": "public function listTags();", "title": "" }, { "docid": "fcf52aa1b815e2c28a035c52c62ba43b", "score": "0.5375991", "text": "public static function getAll(){\n\t\t$tags = array();\n\t\t$dir = CACHE_ROOT.'/tags';\n\n\t\tif(is_dir($dir)){\n\t\t\t//echo 'is a dir';\n\t\t\tif ($dh = opendir($dir)) {\n\t\t while (($file = readdir($dh)) !== false) {\n\t\t \t//echo \"filename: $file : filetype: \" . filetype($dir.'/' . $file) . \"\\n\";\n\t\t\t\t\tif(\n\t\t\t\t\t\t(filetype($dir.'/'.$file) == 'file') && (substr($file, 0, 1) != \".\")\n\t\t\t\t\t){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// for each file found\n\t\t\t\t\t\t$arr = explode(\".\", $file);\n\t\t\t\t\t\t$ext = end($arr);\n\t\t\t\t\t\t$ext = strtolower($ext);\n\t\t\t\t\t\t//die($ext);\n\t\t\t\t\t\tif($ext == 'json'){\n\t\t\t\t\t\t\t//try {\n\t\t\t\t\t\t\t\t$tag = new eatStaticTag;\n\t\t\t\t\t\t\t\t$tag->file_name = $file;\n\t\t\t\t\t\t\t\t$tag->loadFromFileName();\n\t\t\t\t\t\t\t\t$tags[] = $tag;\n\t\t\t\t\t\t\t//} catch (Exception $e) {\n\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//die('not file or started with a dot?');\n\t\t\t\t\t}\n\t\t }\n\t\t closedir($dh);\n\t\t }\n\t\t}\n\t\t\n\t\treturn $tags;\n\t}", "title": "" }, { "docid": "732d67789b2857cfb3f8302f58be49fe", "score": "0.5372766", "text": "protected function _clearCache()\n {\n $allTags = $this->_getTags();\n $firstTag = $allTags[0];\n $this->_getCacheInstance()->flushByTag($firstTag);\n }", "title": "" }, { "docid": "d6375d1774400cfe4885d2f53748eb41", "score": "0.5371341", "text": "function do_add_tag($data){\n\t\tglobal $db;\n\t\t\n\t\t/*\n\t\t* logic\n\t\t* first get the list of all existing tags for this content in the system\n\t\t* now match the new tag list with the old\n\t\t* get a set of tags which already exists..\n\t\t* we need not modify them\n\t\t* for the rest we need to either add or delete their assignment for this content\n\t\t* check in the system for the tag name and check if its already asigned ... if so then remove its assignment\n\t\t* if it does not exists add it to the system\n\t\t*/\n\t\t\n\t\t//get the list of all tags\n\t\t$oldTags = $this->get_tagList_for_content();\n\t\t$newTags = $data;\n\t\t\n\t\tif (!$oldTags)\n\t\t\t{\n\t\t\t//it means only new tags are there so\n\t\t\t//add these tags\n\t\t\t$newTags = explode(',',$newTags);\n\t\t\t\n\t\t\t$this->add_tag_array = $newTags;\n\t\t\t//add these to the database\n\t\t\t$result = $this->add_tag();\n\t\t\tif ($result)\n\t\t\t\t{\n\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t\t}\t\t\n\t\t\t} else {\n\t\t\t\t//we need to delete the tags\n\t\t\t\t//reassign relations\n\t\t\t\t//add new tags\n\t\t\t\t$addResult = true;\n\t\t\t\t$remResult = true;\n\n\t\t\t\t\n\t\t\t\t$newTags = explode(',',$newTags);\n\t\t\t\t$oldTags = explode(',',$oldTags);\n\t\t\t\t\n\t\t\t\t$tag_intersect= array_intersect($newTags,$oldTags);\n\t\t\t\n\t\t\t\t//get the array of tags to be added\n\t\t\t\t$addTag = array_diff($newTags,$tag_intersect);\n\t\t\t\t//get the array of tags to be removed\n\t\t\t\t$remTag = array_diff($oldTags,$tag_intersect);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$this->add_tag_array = explode(',',implode(',',$addTag));\t\t\t\t\n\t\t\t\t$addResult = $this->add_tag();\n\t\t\t\tif ($remTag)\n\t\t\t\t\t{\n\t\t\t\t\t$this->delete_tag_array = $remTag;\n\t\t\t\t\t$remResult = $this->remove_tag_relation();\n\t\t\t\t\t}\n\t\t\t\tif ($addResult && $remResult)\n\t\t\t\t\t{\n\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\t}\n\t\t\t\texit;\n\t\t\t\n\t\t\t\t}\n\t}", "title": "" }, { "docid": "a0047e8811cf6a0f4b9b27b81dc4a7de", "score": "0.53668725", "text": "public function tags($tags)\n {\n if ($this->cache->driver()->getStore() instanceof \\Illuminate\\Cache\\TaggableStore) {\n return $this->cache->tags($tags);\n }\n return $this->cache;\n }", "title": "" }, { "docid": "03f329946e988903de737bcff3a06172", "score": "0.5361286", "text": "function &get_token_replace_tokens_cache() {\n static $cache;\n return $cache;\n }", "title": "" }, { "docid": "ea2baedb638f3cf63c5e0e1f4fe91358", "score": "0.5361132", "text": "public function addTag($tag)\n {\n $this->tags[] = strtolower($tag);\n }", "title": "" }, { "docid": "a1f36f2672097f6c62b8a58c2b155262", "score": "0.53549016", "text": "public function addTag($tag)\n {\n $tag = strtolower($tag);\n if(!in_array($tag, $this->tagsArray))\n $this->tagsArray[] = $tag;\n }", "title": "" }, { "docid": "44a4a06aa5fe9182e7c56d53c744f4e7", "score": "0.5354474", "text": "private function _getTags(){\r\n\r\n\t\t/* Prepare */\r\n\t\t$tags_cacheObjectID = $this->_cacheObjectID . '_tags';\r\n\t\t$query = \"SELECT t.tagName AS `tag`\r\n\t\t\tFROM `tags` AS `t`\r\n\t\t\t\tLEFT JOIN `articleTags` `at` ON at.tagId = t.tagId\r\n\t\t\tWHERE at.articleId = \" . $this->id;\r\n\r\n\t\t/* Get tags */\r\n\t\t$records = $this->_fetch($query, $tags_cacheObjectID, null, null, false);\r\n\r\n\t\t/* Format */\r\n\t\t$tags = array();\r\n\t\tforeach($records as $record){\r\n\t\t\t$tags[] = $record['tag'];\r\n\t\t}\r\n\r\n\t\t/* Return */\r\n\t\treturn $tags;\r\n\r\n\t}", "title": "" }, { "docid": "35b8caa7ee0739884f5aacabb537898b", "score": "0.5354087", "text": "private function _getTags(){\r\n\r\n\t\t/* Prepare */\r\n\t\t$tags_cacheObjectID = $this->_cacheObjectID . '_tags';\r\n\t\t$query = \"SELECT t.tagName AS `tag`\r\n\t\t\tFROM `tags` AS `t`\r\n\t\t\t\tLEFT JOIN `articleTags` `at` ON at.tagId = t.tagId\r\n\t\t\tWHERE at.articleId = \".$this->id;\r\n\r\n\t\t/* Get */\r\n\t\t$records = $this->_fetch($query, $tags_cacheObjectID, null, null, false);\r\n\r\n\t\t/* Format */\r\n\t\t$tags = array();\r\n\t\tforeach($records as $record){\r\n\t\t\t$tags[] = $record['tag'];\r\n\t\t}\r\n\r\n\t\t/* Return */\r\n\t\treturn $tags;\r\n\r\n\t}", "title": "" }, { "docid": "b5ac400e14aefd87eee3f923af66caff", "score": "0.5341252", "text": "function tag_item($id, $tags){\n tags::add_tag('items', $id, $tags);\n items::update_mtime($id);\n return 0;\n }", "title": "" }, { "docid": "f53a3a2c34593112e863262e35deaa25", "score": "0.5306314", "text": "public function loadTags() {\n $this->query = self::LOAD_TAGS;\n return $this->setQueryParams($this->getSyncDate())->load();\n }", "title": "" }, { "docid": "6cd733985e0aac5123bed479348fc486", "score": "0.5288699", "text": "public function getCacheTags()\n {\n if (!$this->hasData('cache_tags')) {\n $tags = array();\n } else {\n $tags = $this->getData('cache_tags');\n }\n\n $tags[] = self::CACHE_GROUP;\n\n return $tags;\n }", "title": "" }, { "docid": "7c9521d7fdaf7f8d88d4be3146fc974c", "score": "0.52815044", "text": "public function autoTag()\n {\n $tags = Tag::string2array($this->tags);\n \n $tags[] = $this->name;\n $tags[] = $this->city;\n $tags[] = $this->state;\n $tags[] = UnitedStatesNames::getName($this->state);\n \n $this->tags = Tag::array2string(array_unique($tags));\n }", "title": "" }, { "docid": "0b95cfed8829a493d885c78b98020d0b", "score": "0.52766585", "text": "function add_tags_with_restaurant($tags, $restaurant_id)\n\t{\n\t\tforeach ($tags as $key => $value) {\n\t\t\t// store all tags one by one\n\t\t\t$restaurantTagData = array(\n\t\t\t\t'restaurant_id' => $restaurant_id,\n\t\t\t\t'tag_id' => $tags[$key],\n\t\t\t);\n\t\t\t// store tag through tag model\n\t\t\t$this->restaurant_model->add_tags_with_restaurant($restaurantTagData);\n\t\t}\n\t}", "title": "" }, { "docid": "b82f3cd05dc6e387e6d3256bc40b1ab0", "score": "0.5261694", "text": "public function cleanCachedProductTagsForTags(Varien_Event_Observer $observer)\n\t{\n\t\tif (!$this->isCacheEnabled()) {\n\t\t\treturn;\n\t\t}\n\n\t\t/** @var $tagModel Mage_Tag_Model_Tag */\n\t\t$tagModel = $observer->getEvent()->getDataObject();\n\t\t$productCollection = $tagModel->getEntityCollection()\n\t\t\t->addTagFilter($tagModel->getId());\n\n\t\t/** @var $product Mage_Catalog_Model_Product */\n\t\tforeach ($productCollection as $product) {\n\t\t\t$this->_cacheInstance->clean($product->getCacheTags());\n\t\t}\n\t}", "title": "" }, { "docid": "3130424652c7c28dca0cfd07d254cd66", "score": "0.526087", "text": "function getTags();", "title": "" }, { "docid": "d5969674693a055ca16338980e9f32c4", "score": "0.52391416", "text": "public function addToCacheableElementsList($elements)\n {\n $elements['animated_elements'] = __('Animated Elements', 'optimizepress-plus-pack');\n\n return $elements;\n }", "title": "" }, { "docid": "0bfbebf11230f6b3022e3503796eaac3", "score": "0.520288", "text": "public function flushCachesByTag($tag)\n {\n $this->routeCache->flushByTag($tag);\n $this->resolveCache->flushByTag($tag);\n }", "title": "" }, { "docid": "a6e9127403c5e26b96401261bcf5598f", "score": "0.5202676", "text": "function tag_set_add($record_type, $record_id, $tag) {\n\n $new_tags = array();\n foreach( tag_get_tags($record_type, $record_id) as $current_tag ) {\n $new_tags[] = $current_tag->rawname;\n }\n $new_tags[] = $tag;\n\n return tag_set($record_type, $record_id, $new_tags);\n}", "title": "" }, { "docid": "f70c2a5d216de03ec3a26114e12a5ebb", "score": "0.51902175", "text": "public function getATags() {\n\t\t// $this->loadDom();\n\t\t$tags_array = array();\n\t\t\n\t\t$matches = $this->domDoc->getElementsByTagName(\"a\");\n\t\tforeach ($matches as $tag) {\n\t\t\t$tag_code = $this->domDoc->saveHTML($tag);\n\t\t\t// $img_tag = $this->getImgTagFromNode($tag_code);\n\t\t\t$img_tag = $this->getImgTagFromNode($tag);\n\t\t\t$href = trim($tag->getAttribute('href'));\n\t\t\tif ( $href == \"\" || substr($href, 0, 4) == \"http\" ) {\n\t\t\t\t$href_rebuilt = $href;\n\t\t\t} else {\n\t\t\t\t// CakeLog::write('smf', \"href: $href\");\n\t\t\t\t$href_rebuilt = $this->rebuildUrl($href);\n\t\t\t\t// CakeLog::write('smf', \"href_rebuilt: $href_rebuilt\");\n\t\t\t\t// CakeLog::write('smf', \"current_directory: $this->current_directory\");\n\t\t\t}\n\t\t\t\n\t\t\tif ( $href_rebuilt !== \"\" ) {\n\t\t\t\t$this->urlsList[] = $href_rebuilt;\n\t\t\t}\n\t\t\t$this->tagsList[$tag_code] = $href_rebuilt;\n\n\t\t\t// $href_rebuilt = $this->rebuildUrl($tag)\n\t\t\t$meta_attributes = $this->getElementAttributes($tag);\n\t\t\t// $meta_attribs = $this->getMetaTagAttributes(\"a\", $tag, false);\n\n\t\t\t$tags_array[] = array(\n\t\t\t\t'tag_code' \t\t\t=> $tag_code,\n\t\t\t\t'href'\t\t\t\t=> $href,\n\t\t\t\t'href_rebuilt'\t\t=> $href_rebuilt,\n\t\t\t\t'a_tag_text'\t\t=> trim($tag->nodeValue),\n\t\t\t\t'a_tag_text_code' \t=> $this->innerHTML($tag),\n\t\t\t\t'img_tag'\t\t\t=> $img_tag,\n\t\t\t\t'meta_attributes'\t=> $meta_attributes );\n\t\t}\n\n\t\treturn $tags_array;\n\t}", "title": "" }, { "docid": "48ef374171a21813c174b76e75b99149", "score": "0.51865834", "text": "public function cache();", "title": "" }, { "docid": "3be3f1f245f027c567997b0065ad3dca", "score": "0.51846707", "text": "protected function flushByTags(array $tags) {\n\t\tforeach ($tags as $tag) {\n\t\t\t$this->webServiceCache->flushByTag($tag);\n\t\t}\n\t}", "title": "" }, { "docid": "1863a956cd894940bdd135966104d4b3", "score": "0.51843035", "text": "public function update(): void\n {\n if (! $this->getCacheStore()) {\n return;\n }\n\n $repository = $this->resolveCacheRepository();\n if (! $repository) {\n return;\n }\n\n $keyName = $this->getNameToStore();\n\n $this->putValue(\n $repository,\n $this->getTags(),\n $keyName,\n $this->getTimeToLive(),\n $this->analyst->get($this->methodName, $this->parameters)\n );\n }", "title": "" }, { "docid": "b9959a6ad02aedffeae0151851824ef5", "score": "0.51500916", "text": "public function addTag($tag)\n {\n $this->tags[] = (string) $tag;\n return $this;\n }", "title": "" }, { "docid": "b9959a6ad02aedffeae0151851824ef5", "score": "0.51500916", "text": "public function addTag($tag)\n {\n $this->tags[] = (string) $tag;\n return $this;\n }", "title": "" }, { "docid": "ac557a7c58f281f168ece99e3a78fb43", "score": "0.5149244", "text": "function TAG_saveTagToList($tag) {\n\tglobal $_TABLES;\n\n\t$tag = trim($tag);\n\n\tif (($tag !== '') AND (TAG_getTagId($tag) === false)) {\n\t\t$sql = \"INSERT INTO {$_TABLES['tag_list']} (tag) \"\n\t\t\t . \" VALUES ('\" . DB_escapeString($tag) . \"')\";\n\t\tDB_query($sql);\n\t}\n}", "title": "" }, { "docid": "432cc14f27fdae64fe58614e083b1b0f", "score": "0.51477075", "text": "public function tags()\n\t{\n\t\t// the passed URL path segments in the request.\n\t\t$tags = $this->request->params['pass'];\n\t\n\t\t// Use the BookmarksTable to find tagged bookmarks.\n\t\t$bookmarks = $this->Bookmarks->find('tagged', [\n\t\t\t'tags' => $tags\n\t\t]);\n\t\n\t\t// Pass variables into the view template context.\n\t\t$this->set([\n\t\t\t'bookmarks' => $bookmarks,\n\t\t\t'tags' => $tags\n\t\t]);\n\t}", "title": "" }, { "docid": "afa65f9b416257dff70d0902ae163188", "score": "0.51444757", "text": "function tags($tag = null)\r\n\t{\r\n\t\t$this->Auth->check();\r\n\t\t\r\n\t\t$this->Mindmap->Tag->contain();\r\n\t\t$tags = $this->Mindmap->Tag->findAllByUserId($this->Session->read('User.id'));\r\n\t\t$this->set('tags', $tags);\r\n\r\n\t\tif(!empty($tag))\r\n\t\t{\r\n\t\t \t$this->Mindmap->Tag->contain('Mindmap');\r\n\t\t\t$tag = $this->Mindmap->Tag->findByTextAndUserId($tag, $this->Session->read('User.id'));\r\n\t\t\t$this->set('tag', $tag);\t\t\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->set('tag', false);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9a6299628481b8b08af70673248c40ad", "score": "0.514122", "text": "public function test_get_cache_tags() \n\t{\n $instance = self::get_instance();\n $tags = array();\n\n if(method_exists($instance, 'add_cache_tag')){\n $instance->add_cache_tag($tags);\n }\n\t\t$array = $instance->get_cache_tags();\n\n if(count($array) > 0){\n\t\t $this->assertNotEmpty($array);\n }\n else\n {\n $this->assertEmpty($array);\n }\n\t}", "title": "" }, { "docid": "f0cc8fa83ce50474972d731a58d0a2ca", "score": "0.51391345", "text": "protected function collectTag($tag) {\n\t\t$tag = trim($tag);\n\t\t$key = strtolower($tag);\n\t\tif (isset($this->tagArray[$key])) {\n\t\t\t$this->tagArray[$key]['count']++;\n\t\t}\n\t\telse {\n\t\t\t$this->tagArray[$tag] = array(\n\t\t\t\t'tag' => $tag,\n\t\t\t\t'count' => 1,\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "c5dbf97e6c11e89590a9b525bb6de9b2", "score": "0.5134874", "text": "private function cache()\n\t{\n\t\ttry {\n\t\t\tCache::put($this->url, $this->raw, now()->addDays($this->ttl));\n\t\t\tCache::put($this->url . '_age', now(), now()->addDays($this->ttl));\n\t\t} catch (InvalidArgumentException $e) {\n\t\t\tLogs::error(\n\t\t\t\t__METHOD__,\n\t\t\t\t__LINE__,\n\t\t\t\t'Could not set in the cache'\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "3e8216cb08aefda71cc7c54a262ba2c5", "score": "0.5129166", "text": "public function resetListCache() {\n $this->findByPrefixCache = [];\n }", "title": "" }, { "docid": "a7b1675d3537062b896e0a82dcefe44f", "score": "0.5111826", "text": "private function setTags($tags)\r\n {\r\n $knowledgeID = $this->getProperty('knowledgeID');\r\n\r\n //Remove any existing Tags\r\n $sql = sprintf(\"DELETE FROM `tags` WHERE `knowledgeID` = %s;\", $knowledgeID);\r\n self::$_databaseHandle->exec($sql);\r\n\r\n //Clean and trim tags\r\n $tags = explode(',', $tags);\r\n $tags = array_map('trim', $tags);\r\n $tags = array_map('strtoupper', $tags);\r\n $tagIDs = array();\r\n\r\n $sql = sprintf(\"SELECT * from `tag` WHERE `tagName` IN ('%s');\", implode('\\',\\'', $tags));\r\n\r\n $results = self::$_databaseHandle->prepare($sql);\r\n $results->execute();\r\n\r\n //Fetch any existing TagIDs\r\n foreach ($results->fetchAll(PDO::FETCH_ASSOC) as $result) {\r\n if (($key = array_search($result['tagName'], $tags)) !== false) {\r\n unset($tags[$key]);\r\n array_push($tagIDs, $result['tagID']);\r\n }\r\n }\r\n //Clean the existing tags from the new\r\n $sql = sprintf(\"INSERT INTO `tag` (`tagName`) VALUES (?);\");\r\n $query = self::$_databaseHandle->prepare($sql);\r\n foreach ($tags as $tag) {\r\n $query->execute(array($tag));\r\n array_push($tagIDs, self::$_databaseHandle->lastInsertId());\r\n }\r\n //Insert all the tag ID references\r\n $sql = sprintf(\"INSERT INTO `tags` (`tagID`,`knowledgeID`) VALUES (?,?);\");\r\n $query = self::$_databaseHandle->prepare($sql);\r\n foreach ($tagIDs as $tag) {\r\n $query->execute(array($tag, $knowledgeID));\r\n $query->fetchAll();\r\n }\r\n }", "title": "" }, { "docid": "1ee2afa8d36e66e1bd7910b85809ffb3", "score": "0.51064295", "text": "public function tags()\n {\n // the passed URL path segments in the request.\n $tags = $this->request->getParam(\"pass\");\n // Use the ArticlesTable to find tagged articles.\n $articles = $this->Articles->find(\"tagged\", [\n \"tags\" => $tags\n ]);\n // Pass variables into the view template context.\n $this->set([\n \"articles\" => $articles,\n \"tags\" => $tags\n ]);\n }", "title": "" }, { "docid": "e80e93c4de8c15f616ea3bed3a53842a", "score": "0.5101966", "text": "function tagyun() {\r\n\t\t$tags = get_tag_arr('article_tag');\r\n\t\t$this->assign('_list', $tags);\r\n\t\t$list = $this->fetch('Widget:tagyun');\r\n\t\techo $list;\r\n\t}", "title": "" }, { "docid": "b433b468621b6454e60d715f23a05b55", "score": "0.5082392", "text": "public function clearTags()\n {\n $this->tags = [];\n }", "title": "" }, { "docid": "65b200d1a30aefc6c5a60bf6b8784f30", "score": "0.5081612", "text": "public function cache()\n {\n $bbcode = new BBCode();\n\n $rendered = $bbcode->render($this->text);\n $rendered = emojis($rendered);\n\n Cache::put(self::CACHE_KEY.$this->id, $rendered, 60 * 60);\n }", "title": "" }, { "docid": "d6611953c91daa2e74d12a6db089335b", "score": "0.5076105", "text": "function add_tags() {\n\tinclude 'inc/dbconnection.php';\n\t// Gets ID of most recent entry entered added to the dbase\n\t$id = get_last_entry();\n\t// Assigns returned id, which is an associative array & converts the ID from a str to an int\n\t$entry_id = intval($id['id']); \n\tforeach ($_POST['tags'] as $tag) {\n\t\t$tag_id = intval($tag);\n\t\ttry {\n\t\t\t$results = $db->prepare(\"INSERT INTO entry_tag (entry_id, tag_id) VALUES(?, ?)\");\n\t\t\t$results->bindValue(1, $entry_id, PDO::PARAM_STR);\n\t\t\t$results->bindValue(2, $tag_id, PDO::PARAM_STR);\n\t\t\t$results->execute();\n\t\t} catch(Exception $e) {\n\t\t\t\t$e->getMessage();\n\t\t\t\treturn array();\n\t\t\t}\t\n\t}\n\treturn $results->fetchAll(PDO::FETCH_ASSOC);\n}", "title": "" }, { "docid": "5ef042e96042066323a3daf757b76495", "score": "0.50734395", "text": "public function setTags (array $tags)\n {\n $this->getHolder()->clear();\n $this->getHolder()->add($tags);\n }", "title": "" }, { "docid": "89c89c91e6dc78067c9d3b97d3840929", "score": "0.50718105", "text": "public function storeStaffListInCache()\n {\n $staff = Staff::all('id', 'name');\n Cache::put('staffList', $staff, Carbon::now()->addMinutes(60));\n }", "title": "" }, { "docid": "fc5223c8f9d4742982b0339591c68b89", "score": "0.50650287", "text": "public function cache(): void;", "title": "" }, { "docid": "f736b86505bc9f2e042d307d01d24564", "score": "0.5062704", "text": "protected function _meta_tags( ) { }", "title": "" }, { "docid": "758eab2f5248350b388d328642e30ba6", "score": "0.50595576", "text": "public function getTags()\n {\n }", "title": "" }, { "docid": "db5c009a58dcc56e39d11fa3bc5bf4d3", "score": "0.504548", "text": "public function getTags(): TagsCollection;", "title": "" }, { "docid": "149d4f459dc7d01a32e0081efa62a4e1", "score": "0.5045183", "text": "private function get_tags()\n\t{\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}", "title": "" }, { "docid": "149d4f459dc7d01a32e0081efa62a4e1", "score": "0.5045183", "text": "private function get_tags()\n\t{\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}", "title": "" }, { "docid": "b2da658983d389aa0eb7269fb8b09849", "score": "0.50400037", "text": "public function updateCache() {\n\n\t\tforeach ($this->sources as $source) {\n\t\t\t$source->updateCache();\n\t\t}\n\n\t\t$this->updateCachedMetadata();\n\t}", "title": "" }, { "docid": "b86caad8572defebbe726caad4df43bf", "score": "0.5033795", "text": "public function getTags();", "title": "" }, { "docid": "b86caad8572defebbe726caad4df43bf", "score": "0.5033795", "text": "public function getTags();", "title": "" }, { "docid": "b86caad8572defebbe726caad4df43bf", "score": "0.5033795", "text": "public function getTags();", "title": "" }, { "docid": "b86caad8572defebbe726caad4df43bf", "score": "0.5033795", "text": "public function getTags();", "title": "" }, { "docid": "b86caad8572defebbe726caad4df43bf", "score": "0.5033795", "text": "public function getTags();", "title": "" }, { "docid": "915c919698ae43e5f5ae2e99a7a0d647", "score": "0.50337386", "text": "function get_tagList(){\n $DBtags = selectQuery(TAB_TAGS, \"\", \"id DESC\");\n $tags = array();\n foreach($DBtags as $tag){\n $id = $tag['id'];\n\n $tag_elem = array();\n $tag_elem['id'] = $id;\n $tag_elem['label'] = $tag['label'];\n $tag_elem['description'] = $tag['description'];\n $categories = selectJoin(TAB_TAG_CAT, TAB_CATEGORIES, \"category = id\", \"tag = $id\");\n if(count($categories) > 1){\n $tag_elem['categories'] = \"More\";\n }else{\n $tag_elem['categories'] = $categories[0]['name'];\n }\n $tags[] = $tag_elem;\n }\n return $tags;\n}", "title": "" }, { "docid": "5cce88dee445803365e1b15bbee5f4b8", "score": "0.50320363", "text": "private function addPostTags() {\n $isOk = false;\n $data = false;\n $tags_ids = [];\n $new_tags = [];\n $new_tags_ids = [];\n $rem_tags_ids = [];\n\n // Get tags already assigned to publications before editing\n $existing_tags = $this->getTags($this->id, true);\n $existing_tags_ids = ArrayHelper::getColumn($existing_tags, 'id', false);\n\n if (is_string($this->tags) && JsonValidator::isValid($this->tags))\n $data = Json::decode($this->tags);\n elseif (is_array($this->tags))\n $data = $this->tags;\n\n // Retrieving the tag IDs that were added when editing the publication\n if (is_countable($data)) {\n foreach ($data as $key => $tag) {\n // Тег уже есть в базе данных, нужно лишь получить его ИД\n if (preg_match('/tag_id:(\\d+)/', $key, $matches)) {\n if ($tag_id = $matches[1]) {\n $tags_ids[] = intval($tag_id);\n if (is_array($existing_tags_ids)) {\n if (!in_array($tag_id, $existing_tags_ids)) {\n $new_tags_ids[] = intval($tag_id);\n }\n }\n }\n } else { // then this is a new tag that is represented by a string\n $new_tags[] = trim($tag);\n }\n }\n }\n\n\n // Add new tags and get their ID\n foreach ($new_tags as $tag_name) {\n $tag = new Tags();\n $tag->name = $tag_name;\n $tag->locale = (isset($this->locale)) ? $this->locale : null;\n\n if ($tag->save()) {\n $new_tags_ids[] = intval($tag->id);\n } else {\n $tag->errors;\n }\n }\n\n // Checking Which Tags Have Been Excluded from Publication\n if (is_array($existing_tags_ids)) {\n foreach ($existing_tags_ids as $key => $tag_id) {\n if (!in_array($tag_id, $tags_ids))\n $rem_tags_ids[] = intval($tag_id);\n }\n }\n\n // Add taxonomy for new tags\n foreach ($new_tags_ids as $tag_id) {\n\n $taxonomy = new Taxonomy();\n $taxonomy->post_id = $this->id;\n $taxonomy->taxonomy_id = $tag_id;\n $taxonomy->type = self::TAXONOMY_TAGS;\n\n if (!$taxonomy->save())\n $isOk = false;\n\n }\n\n // Delete taxonomy for excluded tags\n if (!empty($rem_tags_ids) && is_array($rem_tags_ids)) {\n $taxonomy = new Taxonomy();\n $taxonomy->deleteAll(['post_id' => $this->id, 'taxonomy_id' => $rem_tags_ids, 'type' => self::TAXONOMY_TAGS]);\n }\n\n return $isOk;\n }", "title": "" }, { "docid": "50da8442030eb6aec88aca8f4b00faae", "score": "0.5030981", "text": "public function getTaggedCache()\n {\n if ($this->taggedCache == null) {\n $this->taggedCache = new TaggedCache();\n }\n\n return $this->taggedCache;\n }", "title": "" }, { "docid": "3fb713ab8417079fe7a225e9236d72af", "score": "0.5024923", "text": "public function update_cache(){\n\t\t//\n\t}", "title": "" }, { "docid": "1e26c68d0346a6541c90b256f40b5758", "score": "0.5015156", "text": "function tag_set_flag($tagids) {\n global $DB;\n\n $tagids = (array)$tagids;\n foreach ($tagids as $tagid) {\n $tag = $DB->get_record('tag', array('id'=>$tagid), 'id, flag');\n $tag->flag++;\n $tag->timemodified = time();\n $DB->update_record('tag', $tag);\n }\n}", "title": "" }, { "docid": "407e9b815a0cb2c55944c8ac3e7fd031", "score": "0.5000981", "text": "function cache() {\n if ($this->ready) {\n return;\n }\n\n $this->ready = TRUE;\n\n // Simple replacement for head\n $this->head = str_replace($this->head, '', drupal_set_html_head());\n\n // Slightly less simple for CSS:\n $css = drupal_add_css();\n $start = $this->css;\n $this->css = array();\n\n foreach ($css as $media => $medias) {\n foreach ($medias as $type => $types) {\n foreach ($types as $path => $preprocess) {\n if (!isset($start[$media][$type][$path])) {\n $this->css[] = array($path, $type, $media, $preprocess);\n }\n }\n }\n }\n\n $js = array();\n // A little less simple for js\n foreach (array('header', 'footer') as $scope) {\n $js[$scope] = drupal_add_js(NULL, NULL, $scope);\n }\n\n $start = $this->js;\n $this->js = array();\n\n foreach ($js as $scope => $scopes) {\n foreach ($scopes as $type => $types) {\n foreach ($types as $id => $info) {\n if (!isset($start[$scope][$type][$id])) {\n switch ($type) {\n case 'setting':\n $this->js[] = array($info, $type, $scope);\n break;\n\n case 'inline':\n $this->js[] = array($info['code'], $type, $scope, $info['defer']);\n break;\n\n default:\n $this->js[] = array($id, $type, $scope, $info['defer'], $info['cache']);\n }\n }\n }\n }\n }\n\n // And for tokens:\n $tokens = ctools_set_page_token();\n foreach ($this->tokens as $token => $argument) {\n if (isset($tokens[$token])) {\n unset($tokens);\n }\n }\n\n $this->tokens = $tokens;\n }", "title": "" }, { "docid": "6130002fe75e73a952b78bacd45dc920", "score": "0.49915642", "text": "function fusedesk_casetags($forceRefresh = false) {\n if(!$forceRefresh\n && ($caseTags = fusedesk_cacheGet('casetags'))\n ) {\n return $caseTags;\n }\n\n if(($caseTags = fusedesk_apicall('casetags'))\n && is_array($caseTags)\n ) {\n // Clean our case tags to just ID/Name\n $tagsSimple = [];\n foreach($caseTags as $caseTag) {\n $tagsSimple[$caseTag->id] = $caseTag->tagname;\n }\n\n return fusedesk_cacheSet('casetags', $tagsSimple);\n } else {\n return [];\n }\n}", "title": "" }, { "docid": "c198c71b170d6eab559bcfceec9c45d8", "score": "0.49769884", "text": "public function addToCache($str) {\n\t\t$str = trim($str);\n\t\tif($this->cacheAccessible && strlen($str)) {\n\t\t\t// if there is no history then just cache it\n\t\t\tif(!count($this->history)) {\n\t\t\t\tarray_push($this->history, $str);\n\t\t\t} else {\n\t\t\t\t// find out if this str is already part of the history\n\t\t\t\t$foundIndex = -1;\n\t\t\t\tfor($i = 0; $i < count($this->history); $i++) {\n\t\t\t\t\tif($this->history[$i] == $str) {\n\t\t\t\t\t\t$foundIndex = $i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($foundIndex > -1 &&count($this->history) > 0) {\n\t\t\t\t\t// if it already exists in the cache bring it to the front of the history\n\t\t\t\t\tarray_splice($this->history, $foundIndex, 1);\n\t\t\t\t\tarray_unshift($this->history, $str);\n\t\t\t\t} else {\n\t\t\t\t\t// otherwise just prepend it to the history\n\t\t\t\t\tarray_unshift($this->history, $str);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// ensure that the history is the right length\n\t\t\t\twhile(count($this->history) > $this->historySize) {\n\t\t\t\t\tarray_pop($this->history);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->saveCache();\n\t\t}\n\t}", "title": "" }, { "docid": "00fff9345067a510be32bedb1d41b2ff", "score": "0.4973729", "text": "public static function saveAllCountsCache()\n {\n Yii::$app->cache->set(self::CACHE_KEY, static::$_countsArticlesCache);\n }", "title": "" }, { "docid": "7c13c51db8f08582a21bdfb8dbb6bcdc", "score": "0.4958885", "text": "public function removeTag($tag)\n {\n if(!$this->isCached)\n {\n $this->tagsToRemove = array_insert($this->tagsToRemove, $tag);\n }\n\n $this->tags = array_remove($this->tags, $tag);\n }", "title": "" }, { "docid": "4ef2857698dd926e2cd734f39e454a2e", "score": "0.49536258", "text": "function getUsedTags() {\n\t\t\t$q = sqlquery(\"SELECT DISTINCT bigtree_tags.* FROM bigtree_tags JOIN bigtree_tags_rel ON bigtree_tags.id = bigtree_tags_rel.tag WHERE bigtree_tags_rel.`table` = 'btx_dogwood_posts' AND (publish_date IS NULL OR publish_date <= '\".date(\"Y-m-d\").\"') ORDER BY bigtree_tags.tag ASC\");\n\t\t\t$tags = array();\n\t\t\twhile ($f = sqlfetch($q)) {\n\t\t\t\t$tags[] = $f;\n\t\t\t}\n\t\t\treturn $tags;\n\t\t}", "title": "" }, { "docid": "2f7a7f5f20ecb62a3ab179d4cc79fdee", "score": "0.494971", "text": "public function getCacheTagsToInvalidateOnUpdate(): array\n {\n return [\n 'cases',\n ];\n }", "title": "" }, { "docid": "a73ad828cc9e84195969f64440224676", "score": "0.49459574", "text": "function TAG_getTaggedItems($tag) {\n\tglobal $_CONF, $_TABLES, $_PLUGINS, $_TAG_CONF, $LANG09;\n\n\t$retval = '';\n\n\t$sql = \"SELECT type, sid \"\n\t\t . \" FROM {$_TABLES['tag_map']} \"\n\t\t . \"WHERE (tag_id = '\" . DB_escapeString(TAG_getTagId($tag)) . \"')\";\n\t$result = DB_query($sql);\n\n\tif (DB_error()) {\n\t\treturn $retval;\n\t}\n\n\t$list = array();\n\n\twhile (($A = DB_fetchArray($result)) !== false) {\n\t\t$list[] = $A;\n\t}\n\n\t$T = new Template($_CONF['path'] . 'plugins/tag/templates');\n\t$T->set_file('item', 'tagged_item.thtml');\n\n\tforeach ($list as $L) {\n\t\t$num_rows = 0;\n\t\t\n\t\tif ($L['type'] === 'article') {\n\t\t\t$sql = \"SELECT title, introtext, bodytext \"\n\t\t\t\t . \" FROM {$_TABLES['stories']} \"\n\t\t\t\t . \"WHERE (sid = '\" . DB_escapeString($L['sid']) . \"') \"\n\t\t\t\t . \" AND (draft_flag = 0) AND (date <= NOW()) \"\n\t\t\t\t . COM_getPermSQL('AND');\n\t\t\t$result = DB_query($sql);\n\t\t\t$num_rows = (int) DB_numRows($result);\n\n\t\t\tif ($num_rows > 0) {\n\t\t\t\t$A = DB_fetchArray($result);\n\t\t\t\t$title = TAG_escape(stripslashes($A['title']));\n\t\t\t\t$body = stripslashes($A['introtext']) . '<br' . XHTML . '>'\n\t\t\t\t\t . stripslashes($A['bodytext']);\n\t\t\t\t$all_tags = TAG_scanTag($body);\n\t\t\t\t$url = COM_buildURL(\n\t\t\t\t\t$_CONF['site_url'] . '/article.php?story=' . $L['sid']\n\t\t\t\t);\n\t\t\t\t$type_name = $LANG09[6];\n\t\t\t}\n\t\t} else {\n\t\t\tif (TAG_checkValidType($L['type']) == true) {\n\t\t\t\t$function = 'plugin_tag_gettaggeditems_' . $L['type'];\n\t\t\t\t$item = $function($L['sid']);\n\t\t\t\t\n\t\t\t\tif (!empty($item)) {\n\t\t\t\t\t$num_rows = 1;\n\t\t\t\t\t$title = TAG_escape($item['title']);\n\t\t\t\t\t$all_tags = $item['all_tags'];\n\t\t\t\t\t$url = $item['url'];\n\t\t\t\t\t$type_name = $item['type_name'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($num_rows > 0) {\n\t\t\t$T->set_var('title', $title);\n\t\t\t$T->set_var('url', $url);\n\t\t\t$T->set_var('tag', TAG_escape($tag));\n\t\t\t$T->set_var('related', TAG_str('related'));\n\t\t\t$T->set_var('related_tags', TAG_formatRelatedTags($all_tags, $tag));\n\t\t\t$T->set_var('lang_type', $LANG09[5]);\n\t\t\t$T->set_var('val_type', $type_name);\n\t\t\t$T->parse('output', 'item');\n\t\t\t$retval .= $T->finish($T->get_var('output'));\n\t\t}\n\t}\n\n\treturn $retval;\n}", "title": "" }, { "docid": "8a718e5ebb71b4f575891b05d4762eb1", "score": "0.4941841", "text": "protected function addToCache($data) {\n\t\ttry {\n\t\t\tif (is_bool(AbstractRecord::$isCacheOnTempSwitch) && (!AbstractRecord::$isCacheOnTempSwitch)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!$this->isCacheOn()) return;\n//var_dump(\"pridavam do cache \". $this->getCacheFileName() . \" $id\");\n\t\t\t$itemType \t\t\t\t\t= $this->getClassVar(\"itemType\");\n\t\t\t$idColName \t\t\t\t= eval(\"return $itemType::\\$idColName;\");\n\t\t\t$id\t\t\t\t\t\t\t= $this->cacheLastKeyStored+1;\n\t\t\tLBoxCacheAbstractRecord::getInstance($this->getTableName(), $this->getSQL(), self::getCacheGroup())->$id\t= $data;\n\t\t\t$this->isCacheSynchronized\t= false;\n\t\t\t$this->cacheLastKeyStored\t++;\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "title": "" }, { "docid": "168896554e0580449ab2f94414e7bc8c", "score": "0.49362722", "text": "function TAG_increaseHitCount($tag_id) {\n\tglobal $_TABLES;\n\n\t$sql = \"UPDATE {$_TABLES['tag_list']} \"\n\t\t . \" SET hits = hits + 1 \"\n\t\t . \" WHERE (tag_id = '\" . DB_escapeString($tag_id) . \"')\";\n\tDB_query($sql);\n}", "title": "" }, { "docid": "cbdf055ff7e51fd99fb7af6ecd7deaf2", "score": "0.4935139", "text": "function push_tag_list($tags, $delimiter) {\n\t\t$tags = explode($delimiter, $tags); // Explode the list to make it an array\n\t\t\n\t\t$this->push_tag_array($tags);\n\t\t\n\t}", "title": "" }, { "docid": "0cf34f9aa657167bc9c851af39b7ab21", "score": "0.49328494", "text": "public function getTags(){\n //TODO: Redesign this, having to loop through JSON arrays and filter out unique tags seemed great at first but is alot of work and a large amount of overhead when this could be handled much more easily with two additional DB tables.\n //Wouldn't even need both tables for this particular function either, could just SELECT * FROM search_tags WHERE active IS NOT FALSE and then add any chosen tags to the search function below.\n $query = \"\n SELECT tags FROM content\n \";\n\n $stmt = $this->db->prepare($query);\n $stmt->execute();\n $tags = $stmt->fetchAll(PDO::FETCH_ASSOC);\n \n //Organise tags into a list of unique words.\n $fullTagArray = []; \n foreach($tags as $tagArray){\n $fullTagArray += json_decode($tagArray['tags']);\n }\n dd($fullTagArray);\n\n return $tags;\n }", "title": "" }, { "docid": "7a65e6df8f9612a82e6c0adb0c3dc77c", "score": "0.49283364", "text": "public function addTags($tags) {\n foreach ($tags as $tag) {\n // Add to the tag table\n $this->Article->Tag->create();\n $data = array('article_id' => $this->Article->id, 'value' => $tag);\n $this->Article->Tag->save($data);\n }\n }", "title": "" } ]
b9b8c42b841ed71e9342c71e7c430e45
GLIP glip is a Git Library In PHP. It allows you to access bare git repositories from PHP scripts, even without having git installed. The project's homepage is located at < slightly modified for use with the open qoob framework. added is_ascii function to attempt to detect if a blob is a string or binary file. and archive function to zip/tar a tree of objects from a repo. released opensource under the GNU Lesser General Public License version 2 see <
[ { "docid": "88b6ba3897aa9608a3857e6be1c7b616", "score": "0.0", "text": "function sha1_bin($hex)\r\n{\r\n return pack('H40', $hex);\r\n}", "title": "" } ]
[ { "docid": "5de5e788d922faa9d65eecaff2f2c85b", "score": "0.53475475", "text": "function write_plain($repos) {\n $repo = get_repo_path($_GET['p'], $repos);\n $hash = $_GET['h'];\n header(\"Content-Type: text/plain\");\n $str = system(\"GIT_DIR=$repo/.git git cat-file blob $hash\");\n echo $str;\n die();\n}", "title": "" }, { "docid": "a45402ed95d70121a8142d0a985eaba7", "score": "0.5229226", "text": "function html_browse($proj, $repos) {\n\n if (isset($_GET['b'])) {\n html_blob($proj, $_GET['b'], $repos);\n } else {\n // Get the tree, otherwise default to HEAD\n if (isset($_GET['t'])) {\n $tree = $_GET['t'];\n } else {\n $tree = \"HEAD\";\n }\n html_tree($proj, $tree, $repos);\n }\n}", "title": "" }, { "docid": "c1133b3d3bc9d8f8a4ea5d9b8357fd1e", "score": "0.5189217", "text": "function _xgit_load_object($object) {\n global $xgit;\n if (!isset($xgit['objects'][$object]['log'])) {\n $allowed_types = array(\n 'commit',\n 'tag',\n );\n _xgit_assert_type(array($object => $allowed_types));\n\n $command = 'git --git-dir=\"%s\" show --name-status --pretty=short --date=iso8601 %s';\n $command = sprintf($command, $xgit['git_dir'], escapeshellarg($object));\n $result = trim(shell_exec($command));\n $result = preg_split('/\\n/', $result, -1, PREG_SPLIT_NO_EMPTY);\n $xgit['objects'][$object]['log'] = $result;\n }\n\n return $xgit['objects'][$object]['log'];\n}", "title": "" }, { "docid": "5ef9ad713ddb9b8429f8d0a5541ffb01", "score": "0.5111026", "text": "protected function LoadData()\n\t{\n\t\t$commit = $this->GetProject()->GetCommit($this->params['hashbase']);\n\t\t$this->tpl->assign('commit', $commit);\n\n\t\t$tree = $commit->GetTree();\n\t\t$this->tpl->assign('tree', $commit->GetTree());\n\n\t\tif ((!isset($this->params['hash'])) && (isset($this->params['file']))) {\n\t\t\t$this->params['hash'] = $tree->PathToHash($this->params['file']);\n\t\t\tif (empty($this->params['hash']))\n\t\t\t\tthrow new GitPHP_FileNotFoundException($this->params['file']);\n\t\t}\n\n\t\t$blob = $this->GetProject()->GetObjectManager()->GetBlob($this->params['hash']);\n\t\tif (!empty($this->params['file']))\n\t\t\t$blob->SetPath($this->params['file']);\n\t\t$blob->SetCommit($commit);\n\t\t$this->tpl->assign('blob', $blob);\n\n\t\tif ($this->Plain()) {\n\t\t\treturn;\n\t\t}\n\n\t\t$head = $this->GetProject()->GetHeadCommit();\n\t\t$this->tpl->assign('head', $head);\n\n\t\tif ($this->config->GetValue('filemimetype')) {\n\t\t\t$mimeReader = new GitPHP_FileMimeTypeReader($blob, $this->GetMimeStrategy());\n\t\t\t$mimetype = $mimeReader->GetMimeType(true);\n\t\t\tif ($mimetype == 'image') {\n\t\t\t\t$this->tpl->assign('datatag', true);\n\t\t\t\t$this->tpl->assign('mime', $mimeReader->GetMimeType());\n\t\t\t\t$this->tpl->assign('data', base64_encode($blob->GetData()));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ($this->config->GetValue('geshi')) {\n\t\t\tinclude_once(GITPHP_GESHIDIR . \"geshi.php\");\n\t\t\tif (class_exists('GeSHi')) {\n\t\t\t\t$geshi = new GeSHi(\"\",'php');\n\t\t\t\tif ($geshi) {\n\t\t\t\t\t$lang = GitPHP_Util::GeshiFilenameToLanguage($blob->GetName());\n\t\t\t\t\tif (empty($lang)) {\n\t\t\t\t\t\t$lang = $geshi->get_language_name_from_extension(substr(strrchr($blob->GetName(),'.'),1));\n\t\t\t\t\t}\n\t\t\t\t\tif (!empty($lang)) {\n\t\t\t\t\t\t$geshi->enable_classes();\n\t\t\t\t\t\t$geshi->enable_strict_mode(GESHI_MAYBE);\n\t\t\t\t\t\t$geshi->set_source($blob->GetData());\n\t\t\t\t\t\t$geshi->set_language($lang);\n\t\t\t\t\t\t$geshi->set_header_type(GESHI_HEADER_PRE_TABLE);\n\t\t\t\t\t\t$geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);\n\t\t\t\t\t\t$geshi->set_overall_id('blobData');\n\t\t\t\t\t\t$this->tpl->assign('geshiout', $geshi->parse_code());\n\t\t\t\t\t\t$this->tpl->assign('geshicss', $geshi->get_stylesheet());\n\t\t\t\t\t\t$this->tpl->assign('geshi', true);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->tpl->assign('bloblines', $blob->GetData(true));\n\t}", "title": "" }, { "docid": "0b047d0a9e5c1dc61d169c05c0682b43", "score": "0.5083964", "text": "function html_tree($proj, $tree, $repos) {\n $t = git_ls_tree(get_repo_path($proj, $repos), $tree);\n\n echo '<div class=\"gitbrowse\"><table>';\n\n foreach ($t as $t) {\n $plain = \"\";\n $perm = permissions_string($t['perm']);\n if ($t['type'] == 'tree')\n $objlink = \"<a href=\\\"\" . sanitized_url() . \"p=$proj&t={$t['hash']}\\\">{$t['file']}</a>\";\n else if ($t['type'] == 'blob') {\n $plain = \"<a href=\\\"\" . sanitized_url() . \"p=$proj&dl=plain&h={$t['hash']}\\\">plain</a>\";\n $objlink = \"<a class=\\\"blob\\\" href=\\\"\" . sanitized_url() . \"p=$proj&b={$t['hash']}\\\">{$t['file']}</a>\";\n }\n\n echo \"<tr><td>$perm</td><td>$objlink</td><td>$plain</td></tr>\";\n }\n echo '</table></div>';\n}", "title": "" }, { "docid": "0b18f6306a7ca541df015b59607d8fc7", "score": "0.48385388", "text": "function xgit_get_type($object) {\n global $xgit;\n if ($object != VERSIONCONTROL_GIT_EMPTY_REF && !xgit_is_valid($object)) {\n throw new Exception(\"Object '$object' is not valid in this repository\");\n }\n if (!isset($xgit['objects'][$object]['type'])) {\n\n if ($object == VERSIONCONTROL_GIT_EMPTY_REF) {\n $xgit['objects'][$object]['type'] = 'empty';\n } else {\n $command = 'git --git-dir=\"%s\" cat-file -t %s';\n $command = sprintf($command, $xgit['git_dir'], escapeshellarg($object));\n $xgit['objects'][$object]['type'] = trim(shell_exec($command));\n }\n $xgit['objects'][$object]['valid'] = TRUE;\n }\n\n return $xgit['objects'][$object]['type'];\n}", "title": "" }, { "docid": "03ab2dca7594884099043aa1eb4736a5", "score": "0.4812116", "text": "function git($args) {\n\t$params = implode(' ', $args);\n\t$output = `git $params`;\n\treturn $output;\n}", "title": "" }, { "docid": "214b4d4ec49a9984a4f3fb14246d2c21", "score": "0.4803494", "text": "public function getGitUrl();", "title": "" }, { "docid": "d3eea874ffdcf75cbb1d52ed243c7349", "score": "0.4803413", "text": "function POOL_makeRepository($poolName, $archivPath=\"archivs/\", $addCmds=\"\")\n{\n\t$poolDir=POOL_getDir($poolName);\n\t$serverIP=getServerIP();\n\t$release=POOL_getProperty($poolName,\"release\");\n\n\t//write sources list for this pool\n\t$sourceslist=\"#mirror: http://$serverIP/pool/$poolName\ndeb http://$serverIP/pool/$poolName/ $release main non-free contrib\\n\";\n\n\tPOOL_setProperty($poolName,\"sourceslist\",$sourceslist);\n\n\t//making links from the existing distr directory to all known releases\n\tinclude_once(\"/m23/inc/distr/debian/clientConfig.php\"); //needed for CLCFG_getDebianReleasesGeneric\n\t$linkReleases=\"\";\n\tforeach (CLCFG_getDebianReleasesGeneric(\"debian\") as $linkRelease)\n\t\t$linkReleases.=\"echo 'ln -s `sudo find $poolDir/dists -maxdepth 1 -mindepth 1 -type d` $poolDir/dists/$linkRelease'\\n\";\n\n\t$cmds=\"\n\tcd $poolDir\n\techo \\\"cd $poolDir\\\"\n\trm -f /m23/tmp/makePoolPackages.log\n\tfind $archivPath/ -type f | grep deb\\$ | awk '{system(\\\"reprepro -Vb . includedeb $release \\\"$0\\\" 2>&1 | tee -a /m23/tmp/makePoolPackages.log\\\")}'\n\tfind /mdk/m23Debs/debs -type f | grep deb\\$ | grep -v woody | awk '{system(\\\"reprepro -Vb . includedeb $release \\\"$0\\\" 2>&1 | tee -a /m23/tmp/makePoolPackages.log\\\")}'\n\tsudo rm -f archivs/*\n\t$linkReleases\n\n\t#Fix the Packages files\n\tfor pfile in `find \\\"$poolDir\\\" | grep \\\"/Packages\\$\\\"`\n\tdo\n\t\t#e.g. /m23/data+scripts/pool/mb/dists/etch/main/binary-i386\n\t\tdir=`dirname \\$pfile`\n\t\tcd \\\"\\$dir\\\"\n\t\techo \\\"dir: \\$dir\\\"\n\t\t\n\t\t#remove all empty Depends lines from Packages\n\t\tsed '/Depends: \\$/d' Packages > Packages2\n\t\t\n\t\t#Check if there were lines removed\n\t\tdiff -q Packages Packages2\n\t\tif [ \\$? -eq 0 ]\n\t\tthen\n\t\t\techo \\\"No changes in \\$dir\\\"\n\t\t\tcontinue\n\t\tfi\n\t\n\t\t#move Packages\n\t\tcat Packages2 > Packages\n\t\trm Packages.gz Packages2\n\t\n\t\t#Create compressed version\n\t\tgzip -c Packages > Packages.gz\n\t\n\t\t#calculate sizes and MD5 sums of Packages and the compressed Packages.gz\n\t\tm=`md5sum Packages | cut -d' ' -f1`\n\t\ts=`find Packages -printf \\\"%s\\\"`\n\t\tmgz=`md5sum Packages.gz | cut -d' ' -f1`\n\t\tsgz=`find Packages.gz -printf \\\"%s\\\"`\n\t\n\t\t#jump to the directory that stores the global Releases file with sizes and hashes\n\t\t#e.g. /m23/data+scripts/pool/mb/dists/etch\n\t\tcd ..\n\t\tcd ..\n\t\treleaseDir=`pwd`\n\t\techo \\\"releaseDir: \\$releaseDir\\\"\n\t\n\t\t#Remove the release directory from the complete path\n\t\t# e.g. main/binary-i386\n\t\tstrippedReleaseDir=`echo \\$dir | sed \\\"s*\\$releaseDir**g\\\" | sed \\\"s*/**\\\"`\n\t\techo \\\"strippedReleaseDir: \\$strippedReleaseDir\\\"\n\t\n\t\t#convert / to \\/ for sed's syntax\n\t\tstrippedReleaseDirSED=`echo \\$strippedReleaseDir | sed 's#\\/#\\\\\\/#g'`\n\t\n\t\t#remove the lines that contain the Packages and Packages.gz entries for \n\t\tsed \\\"/\\$strippedReleaseDirSED/d\\\" Release > /tmp/Release\n\t\techo \\\" \\$m \\$s \\$strippedReleaseDir/Packages\\\" >> /tmp/Release\n\t\techo \\\" \\$mgz \\$sgz \\$strippedReleaseDir/Packages.gz\\\" >> /tmp/Release\n\t\n\t\tcat /tmp/Release > Release\n\t\trm /tmp/Release\n\tdone\n\n\t#fixing code to correct Release files that are missing the information stored in conf/distributions\n\tfor releasefile in `find \\\"$poolDir\\\" | grep Release | grep \\\"/dists/\\\"`\n\tdo\n\t\tif [ `grep -c Origin: \\\"\\$releasefile\\\"` -eq 0 ]\n\t\tthen\n\t\t\techo \\\"fixing: \\$releasefile\\\"\n\t\t\tcat \\\"$poolDir/conf/distributions\\\" > /tmp/fixedRelease\n\t\t\techo \\\"MD5Sum:\\\" >> /tmp/fixedRelease\n\t\t\tcat \\\"\\$releasefile\\\" >> /tmp/fixedRelease\n\t\t\tcat /tmp/fixedRelease > \\\"\\$releasefile\\\"\n\t\t\t#rm /tmp/fixedRelease\n\t\tfi\n\tdone\n\n\t$addCmds\n\t\";\n\n\tSERVER_runInBackground(\"m23poolBuilder\",$cmds,HELPER_getApacheUser(),true);\n}", "title": "" }, { "docid": "e1b5f0cf78c3587091a1b6730e998dbc", "score": "0.47493047", "text": "function do_clone_or_pull($key, $url, $path, $operation) {\n // Already a git repo there. Do a pull.\n if ((is_dir($path)) && (file_exists($path . \"/.git\"))) {\n\tif($operation==\"TAG\"){\n\t\treturn do_fetch($key,$url,$path);\n\t}\n\telse{\n\t\treturn do_pull($key,$url,$path);\n\t}\n }\n \n // Try a clone\n $out = do_clone($key,$url,$path);\n if (!is_dir($path)) {\n $out .= \"\\nClone appeared to fail.\\n\";\n }\n return $out;\n}", "title": "" }, { "docid": "68f5ad880f168a1b107f30faecfd9660", "score": "0.4742019", "text": "function core_github_com($url, $prefix='api'){\n\t$fp = fsockopen(\"ssl://\".$prefix.\".github.com\", 443, $errno, $errstr, 30);\n\tif (!$fp){ echo 'Could not connect to Github'; return false; }\n\t$out = \"GET /\".$url.\" HTTP/1.1\\r\\n\";\n\t$out .= \"Host: \".$prefix.\".github.com\\r\\n\";\n\t$out .= \"Connection: Close\\r\\n\\r\\n\";\n\tfwrite($fp, $out);\n\t$buffer = '';\n\twhile (!feof($fp)) {\n\t\t$buffer .= fgets($fp, 128);\n\t}\n\tfclose($fp);\n\tpreg_match(\"/^content-length:\\s*(\\d+)\\s*$/mi\", $buffer, $matches);\n\t$length = $matches[1];\t\n\t$content = substr($buffer, $length*-1, $length);\n\tswitch($prefix){\n\t\tcase \"api\":\n\t\t\treturn json_decode($content);\n\t\t\tbreak;\n\t\tcase \"raw\":\n\t\t\treturn $content;\n\t\t\tbreak;\n\t}\t\t\n}", "title": "" }, { "docid": "c429864cb1d60ab276c5458c748d707d", "score": "0.47349304", "text": "function html_desc($repo, $proj) {\n\n // Check if the git repo has a description file\n if(file_exists(\"$repo/.git/description\")){\n $desc = short_desc(file_get_contents(\"$repo/.git/description\"));\n }else{\n $desc = \"No description\";\n }\n $owner = get_file_owner($repo);\n $last = get_last($repo);\n $git_clone_url = 'http://'.$_SERVER['HTTP_HOST'].'/git/'.$proj;\n \n echo \"<table>\";\n echo \"<tr><td>description</td><td>$desc</td></tr>\";\n echo \"<tr><td>owner</td><td>$owner</td></tr>\";\n echo \"<tr><td>last change</td><td>$last</td></tr>\";\n echo \"<tr><td>URL</td><td>$git_clone_url</td></tr>\";\n echo \"</table>\";\n}", "title": "" }, { "docid": "8299fb59b36687504f3f077cc5df1af7", "score": "0.4730189", "text": "public static function determineGit($arg, &$matches)\n {\n $reg0 = '#^\n (?:git|https|http|ssh|rsync|file?)(://|@).*?(/|\\:)\n (?P<package>[a-zA-Z0-9\\-_]+)\n (?:\n (?:\\.git|)\n (?:\\#(?P<reference>.*?)|)\n )?\n $#x';\n\n return self::match([$reg0], $arg, $matches);\n }", "title": "" }, { "docid": "d67f2f92bed885739939a7bae1e27547", "score": "0.47239417", "text": "function clone_from_git_to_server($returnJson,$DebuugerRoot,$gitUrl,$startGit,$userProjectRoot,$gitName,$relativeToUserRoot,$amirGit){\n\t\tpclose(popen($startGit.\" \".$gitUrl.\" \".$userProjectRoot.$gitName.\" 2>\".$relativeToUserRoot.\"\\\\proj.log\", \"w\"));\n\t\tpclose(popen($startGit.\" \".$amirGit.\" \".$DebuugerRoot.\"Debugger 2>\".$relativeToUserRoot.\"\\\\Debugger.log\", \"w\"));\n\t\tfile_put_contents($relativeToUserRoot.\"/goD.sh\", \"#!/bin/bash\\n tail -n 1 Debugger.log\");\n\t\tfile_put_contents($relativeToUserRoot.\"/goG.sh\", \"#!/bin/bash\\n tail -n 1 proj.log\");\n\t\treturn json_return($returnJson,0,\"wait 5 minites and check clone\");\n\t}", "title": "" }, { "docid": "113017145fdcdcbc557c3bcff7451c0a", "score": "0.47129148", "text": "function git_ls_tree($repo, $tree) {\n $ary = array();\n\n $out = array();\n //Have to strip the \\t between hash and file\n exec(\"GIT_DIR=$repo/.git git ls-tree $tree | sed -e 's/\\t/ /g'\", $out);\n\n foreach ($out as $line) {\n $entry = array();\n $arr = explode(\" \", $line);\n $entry['perm'] = $arr[0];\n $entry['type'] = $arr[1];\n $entry['hash'] = $arr[2];\n $entry['file'] = $arr[3];\n $ary[] = $entry;\n }\n return $ary;\n}", "title": "" }, { "docid": "8b83f37588cad241ff02126b885c2120", "score": "0.46953914", "text": "abstract function is_org_repo_compliant();", "title": "" }, { "docid": "c9e0a55f10cc9ba5cab21cf0e2ed39cd", "score": "0.46860853", "text": "function PMBP_getln($path, $close=false, $org_path=false) {\n if (!isset($GLOBALS['lnFile'])) $GLOBALS['lnFile']=null;\n if (!$org_path) $org_path=$path; else $org_path=PMBP_EXPORT_DIR.$org_path;\n \n // gz file\n if(PMBP_file_info(\"gzip\",$org_path)==\"gz\") { \n \tif (!$close) {\n\t if ($GLOBALS['lnFile']==null) {\n\t $GLOBALS['lnFile']=gzopen($path, \"r\");\n\t }\n\n\t if (!gzeof($GLOBALS['lnFile'])) {\n\t return gzgets($GLOBALS['lnFile']);\n\t } else {\n\t $close=true;\n\t }\n \t}\n\n if ($close) {\n\t\t\t// remove the file handler\n\t\t\t@gzclose($GLOBALS['lnFile']);\n $GLOBALS['lnFile']=null;\n return null;\n }\n\n // zip file\n } elseif(PMBP_file_info(\"zip\",$org_path)==\"zip\"){\n\t\tif (!$close) {\n\t\t\tif ($GLOBALS['lnFile']==null) {\n\t\t\t\t// try to guess the filename of the packed file\n\t\t\t\t// known problem: ZIP file xyz.sql.zip contains file abc.sql which already exists with different content! \n\t\t\t\tif(!file_exists(substr($org_path,0,strlen($org_path)-4))) {\n\t\t\t\t\t// extract the file\n\t\t\t\t\tinclude_once(\"pclzip.lib.php\");\n\t\t\t\t\t$pclzip = new PclZip($path);\n\t\t\t\t\t$extracted_file=$pclzip->extract(PMBP_EXPORT_DIR,\"\");\n\t\t\t \n\t\t\t if ($pclzip->error_code!=0) {\n\t\t\t \t// print pclzip error message\n\t\t\t \techo addOutput(\"pclzip: \".$pclzip->error_string.\"<br>\".BI_BROKEN_ZIP.\"!\",\"red\");\n\t\t\t\t return false;\n\t\t\t } else {\n\t\t\t\t\t\tunset($pclzip);\n\t\t\t }\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// read the extracted file\n\t\t\t$line=PMBP_getln(substr($org_path,0,strlen($org_path)-4));\n\t\t\tif ($line==null) $close=true;\n\t\t\t\telse return $line;\n \t}\n\n\t\t// remove the temporary file\n \tif ($close) {\n \t\t@fclose($GLOBALS['lnFile']);\n \t\t$GLOBALS['lnFile']=null;\n \t\t@unlink(substr($org_path,0,strlen($org_path)-4));\n \t\treturn null;\n \t}\n\t\t\n // sql file\n } else {\n\t\tif (!$close) {\n\t if ($GLOBALS['lnFile']==null) {\n\t $GLOBALS['lnFile']=fopen($path, \"r\");\n\t }\n\t \n\t if (!feof($GLOBALS['lnFile'])) {\n\t return fgets($GLOBALS['lnFile']);\n\t } else {\n\t $close=true;\n\t }\n\t\t}\n\t\t\n\t\tif ($close) {\n\t\t\t// remove the file handler\n\t\t\t@fclose($GLOBALS['lnFile']);\n $GLOBALS['lnFile']=null;\n return null;\n }\n }\n}", "title": "" }, { "docid": "1418a7253f1049945b1bb12a6bdd1879", "score": "0.4670208", "text": "static function load( $p_id ) {\n\t\t$t_repo_table = plugin_table( 'repository', 'Source' );\n\n\t\t$t_query = \"SELECT * FROM $t_repo_table WHERE id=\" . db_param();\n\t\t$t_result = db_query( $t_query, array( (int) $p_id ) );\n\n\t\tif ( db_num_rows( $t_result ) < 1 ) {\n\t\t\terror_parameters( $p_id );\n\t\t\tplugin_error( SourcePlugin::ERROR_REPO_MISSING );\n\t\t}\n\n\t\t$t_row = db_fetch_array( $t_result );\n\n\t\t$t_repo = new SourceRepo( $t_row['type'], $t_row['name'], $t_row['url'], $t_row['info'] );\n\t\t$t_repo->id = $t_row['id'];\n\n\t\treturn $t_repo;\n\t}", "title": "" }, { "docid": "5d1cb0f831db9a2c9822e565073a5448", "score": "0.46645156", "text": "public function getGit()\n {\n return $this->readOneof(3);\n }", "title": "" }, { "docid": "867c249d010348d6ca5c398f0a91fa49", "score": "0.4656035", "text": "public function getAllPacks($id_org) //DATO QUEMADO HASTA UTILIZAR FRONT END\n{\n $gestionPaquetes = new PackServiceRepository;\n $packs = $gestionPaquetes->getAllPacks($id_org);\n<<<<<<< HEAD\n=======\n\n>>>>>>> kv-branch-bkd\n if (count($packs) == 0) {\n // no hay Datos\n return $this->sendError('No existen registros', 'Ningun registro insertado en esta tabla.');\n } else {\n return $this->sendResponse($packs, 'Todos los paquetes');\n }\n}", "title": "" }, { "docid": "eff40da98b1972971f4cdea1df3bdcc5", "score": "0.4651916", "text": "protected static function getGitWrapper() {\n\t\t$dir = self::getGitDir();\n\t\tif ( !self::$git ) {\n\t\t\tself::$git = new GitWrapper();\n\n\t\t\t$extDir = MediaWikiServices::getInstance()->getMainConfig()->get( \"ExtensionDirectory\" );\n\t\t\tself::$git->setEnvVar( \"PERL5LIB\", \"$extDir/MABS/lib/mediawiki-git-remote/lib:\"\n\t\t\t\t\t\t\t\t . \"$extDir/MABS/lib/mediawiki-git-remote/localcpan\" );\n\t\t\tself::$git->setEnvVar( \"GIT_EXEC_PATH\", \"$extDir/MABS/lib/mediawiki-git-remote:\"\n\t\t\t\t\t\t\t\t . \"/usr/lib/git-core\" );\n\t\t\tself::$git->setEnvVar( \"GIT_MW_DEBUG\", \"1\" );\n\t\t\tself::$git->setEnvVar( \"GIT_TRACE\", \"0\" );\n\t\t\tif ( !chdir( $dir ) ) {\n\t\t\t\tthrow new ErrorPageError( \"mabs-system-error\", \"mabs-no-chdir\", $dir );\n\t\t\t}\n\t\t}\n\t\treturn self::$git->workingCopy( $dir );\n\t}", "title": "" }, { "docid": "faf2087369bcf72b79629bdc2b937d8d", "score": "0.46231818", "text": "function GIFEncoder($GIF_src, $GIF_dly, $GIF_lop, $GIF_dis, $GIF_red, $GIF_grn, $GIF_blu, $GIF_mod) {\n if (!is_array($GIF_src) && !is_array($GIF_tim)) {\n printf(\"%s: %s\", $this->VER, $this->ERR['ERR00']);\n exit(0);\n }\n $this->LOP = ($GIF_lop > - 1) ? $GIF_lop : 0;\n $this->DIS = ($GIF_dis > - 1) ? (($GIF_dis < 3) ? $GIF_dis : 3) : 2;\n $this->COL = ($GIF_red > - 1 && $GIF_grn > - 1 && $GIF_blu > - 1) ? ($GIF_red | ($GIF_grn << 8) | ($GIF_blu << 16)) : -1;\n \n for ($i = 0;$i < count($GIF_src);$i++) {\n if (strToLower($GIF_mod) == \"url\") {\n $this->BUF[] = fread(fopen($GIF_src[$i], \"rb\") , filesize($GIF_src[$i]));\n } else if (strToLower($GIF_mod) == \"bin\") {\n $this->BUF[] = $GIF_src[$i];\n } else {\n printf(\"%s: %s ( %s )!\", $this->VER, $this->ERR['ERR02'], $GIF_mod);\n exit(0);\n }\n if (substr($this->BUF[$i], 0, 6) != \"GIF87a\" && substr($this->BUF[$i], 0, 6) != \"GIF89a\") {\n printf(\"%s: %d %s\", $this->VER, $i, $this->ERR['ERR01']);\n exit(0);\n }\n for ($j = (13 + 3 * (2 << (ord($this->BUF[$i] {\n 10\n }) & 0x07))) , $k = TRUE;$k;$j++) {\n switch ($this->BUF[$i] {\n $j\n }) {\n case \"!\":\n if ((substr($this->BUF[$i], ($j + 3) , 8)) == \"NETSCAPE\") {\n printf(\"%s: %s ( %s source )!\", $this->VER, $this->ERR['ERR03'], ($i + 1));\n exit(0);\n }\n break;\n case \";\":\n $k = FALSE;\n break;\n }\n }\n }\n GIFEncoder::GIFAddHeader();\n for ($i = 0;$i < count($this->BUF);$i++) {\n GIFEncoder::GIFAddFrames($i, $GIF_dly[$i]);\n }\n GIFEncoder::GIFAddFooter();\n }", "title": "" }, { "docid": "ece16b0e2ed16e50a8596f9f4abb9a8f", "score": "0.45769936", "text": "private function _fetchGitRepository($url, $ref = 'master')\n\t{\n\t\t// Create a Git repository object within the system tmp folder for the url.\n\t\t$root = sys_get_temp_dir() . md5($url);\n\n\t\t// If the folder doesn't exist attempt to create it.\n\t\tif (!is_dir($root))\n\t\t{\n\t\t\tmkdir($root, 0777, true);\n\t\t}\n\n\t\t// Instantiate the repository object.\n\t\t$repo = new PackagerGitRepository($root);\n\n\t\t// Only clone the repository if it doesn't exist.\n\t\tif (!$repo->exists())\n\t\t{\n\t\t\t$repo->create();\n\t\t}\n\n\t\t// Get a clean checkout of the branch/tag required.\n\t\t$repo->fetch()\n\t\t\t->branchCheckout($ref)\n\t\t\t->clean();\n\n\t\treturn $root;\n\t}", "title": "" }, { "docid": "f43d92b549eb74b1b247d35898dfe73d", "score": "0.45745167", "text": "function OGSPlugin_Traitement_Galaxyraw(){\r\n\r\n\tglobal $db, $fp, $is_ogsplugin, $pub_galaxy, $pub_system, $pub_content, $pub_who, $who, $pub_what, $what, $ogspy_server_version, $log_ogsgalview, $system, $galaxy;\r\n\t$lines = stripslashes(utf8_decode($pub_content));\r\n\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"galaxyraw: \".$lines.\"\\n\");\r\n\t$lines = explode(chr(10), $lines);\r\n\t$system_added = galaxy_system($lines);\r\n\t// voir majs stats galaxy\r\n\t//log_(\"load_system\", array($galaxy, $system));\r\n\t//log_plugin_(\"load_system\",$num_spyadded);\r\n\tif (isset($system_added[0]) && $system_added[0]!=\"\" && isset($system_added[1]) && $system_added[1]!=\"\") {\r\n\t\tif ($log_ogsgalview==true)\r\n\t\t\tlog_plugin_(\"load_system_OGS\", array($galaxy.\":\".$system. \"(\".$system_added[0].\":\".$system_added[1].\")\", /*$system_added[0].\":\".$system_added[1]*/(((int)$system_added[0]==$galaxy && (int)$system_added[1]==$system)? 15:0 ) ));\r\n\t\tSendHttpStatusCode(\"701\");\r\n\t}\r\n\tSendHttpStatusCode(\"702\");\r\n}", "title": "" }, { "docid": "e9fcbccf80dd0f1ac61d59c9771dd882", "score": "0.45405668", "text": "function git_tree($gitdir, $tree) {\n\n $out = array();\n $command = \"GIT_DIR=$gitdir/.git git ls-tree --name-only $tree\";\n exec($command, $out);\n}", "title": "" }, { "docid": "60b2132eb31e5f5ce2d6d1e696d23b59", "score": "0.45168498", "text": "function core_github_init($obj, $prefix='api'){\n\t$options = $obj->options;\n\t\n\tif(empty($options->resource)){ echo 'No Resource Set.'; return false; }\n\tif(empty($options->user)){ echo 'No User Set.'; return false; }\n\tif(empty($options->repo)){ echo 'No Repository Set.'; return false; }\n\t\n\tswitch($options->resource){\n\t\tcase \"tags\":\n\t\t\t$url = 'repos/'.$options->user.'/'.$options->repo.'/git/refs/tags';\n\t\t\tbreak;\n\t\t\n\t\tcase \"blob\":\n\t\t\t$url = $options->user.'/'.$options->repo.'/'.$options->path; //Path should be a relative path including the branch: master/admin/index.php\n\t\t\t$prefix = 'raw'; //Query the raw.github.com\n\t\t\tbreak;\n\t}\n\t\n\t$response = core_github_com($url, $prefix);\n\tif($response === false){ return false; }\n\t\n\techo '<div class=\"core-github main-wrapper '.$options->class.'\">';\n\tcore_github_process($response, $options->resource, $options);\n\techo '</div>';\n}", "title": "" }, { "docid": "0d43ec489c5379bbfab982424d06f8b3", "score": "0.4507756", "text": "function pf_setup($argv) {\n if (!has_bin('git')) {\n failure(\"You need to install git before continuing!\");\n failure(\"After installing git run this setup in a new terminal window.\");\n\n return true;\n }\n\n # Check if ssh-kegen is installed\n if (!has_bin('ssh-keygen')) {\n failure(\"You need to install ssh before continuing!\");\n\n return true;\n }\n\n # Test Connection to PHPFog API\n $phpfog = new PHPFog();\n try {\n $has_api = $phpfog->login();\n } catch (PestJSON_Unauthorized $e) {\n failure(\"Invalid username or password. Please try again.\");\n exit(1);\n } catch (Exception $e) {\n failure(\"Error: {$e->getMessage()}\");\n exit(1);\n }\n if (!isset($has_api) || !$has_api) {\n die(failure('Failed to log in.'));\n }\n\n $ssh_identifier = preg_replace(\"/[^A-Za-z0-9-]/\", '-', $phpfog->username());\n\n # Create an ssh key\n $ssh_real_path = HOME.\"/.ssh/\".$ssh_identifier;\n if (!file_exists($ssh_real_path)) {\n $exit_code = execute(\"ssh-keygen -q -t rsa -b 2048 -f \".$ssh_real_path);\n if (0 != $exit_code) {\n die(failure('Failed to generate ssh key'));\n }\n }\n\n # Add ssh to config\n $ssh_config_path = HOME.\"/.ssh/config\";\n $config_host_line = \"Host \".$ssh_identifier;\n if (strpos(@file_get_contents($ssh_config_path), $config_host_line) === false) {\n $fh = @fopen($ssh_config_path, 'a') or die(failure(\"Can't open file: \".$ssh_config_path));\n fwrite($fh, PHP_EOL.wrap($config_host_line));\n fwrite($fh, wrap(\" HostName git01.phpfog.com\"));\n fwrite($fh, wrap(\" User git\"));\n fwrite($fh, wrap(\" IdentityFile \".HOME.\"/.ssh/\".$ssh_identifier).PHP_EOL);\n fclose($fh);\n } else {\n info(\"Config is already set up.\");\n }\n\n $pubkey = file_get_contents($ssh_real_path.\".pub\");\n\n try {\n $phpfog->new_sshkey('', $pubkey);\n success(\"Successfully installed ssh key.\");\n } catch (PestJSON_ClientError $e) {\n $resp = $phpfog->last_response();\n $body = json_decode($resp['body']);\n $message = $body->message;\n failure(\"Error: \".$message);\n }\n\n ewrap(bwhite(\"To clone an app use the following steps:\"));\n ewrap(\"1. List your apps: \".bwhite(\"pf list apps\"));\n ewrap(\"2. To fetch your application code: \".bwhite(\"pf clone <app_id>\"));\n ewrap(\"3. Make your changes\");\n ewrap(\"4. Stage changes in your local repo: \".bwhite(\"git add -A\"));\n ewrap(\"5. Commit changes: \".bwhite(\"git commit -m 'My first commit'\"));\n ewrap(\"6. Deploy to PHP Fog: \".bwhite(\"pf push\"));\n ewrap(\"For more information visit: \".bwhite(\"http://dev.appfog.com/features/article/pf_command_line_tool\"));\n\n return true;\n}", "title": "" }, { "docid": "acdeebd1d5eefd8760c51fdb7b14ee7b", "score": "0.45048133", "text": "function _versioncontrol_git_get_source_item_helper($repository, $revision, $filename, $branches) {\n $branch_names = array();\n foreach ($branches as $branch) {\n $branch_names[] = $branch['name'];\n }\n $constraints = array(\n 'vcs' => array('git'),\n 'repo_ids' => array($repository['repo_id']),\n 'types' => array(VERSIONCONTROL_OPERATION_COMMIT),\n 'paths' => array($filename),\n 'branches' => $branch_names\n );\n $commit_op = versioncontrol_get_operations($constraints);\n ksort($commit_op);\n $commit_op = array_pop($commit_op);\n $op_items = versioncontrol_get_operation_items($commit_op);\n $type = $op_items[$filename]['type'] ? $op_items[$filename]['type'] : VERSIONCONTROL_ITEM_FILE;\n // ['action'] not needed for source items :)\n return array(\n 'path' => $filename,\n 'type' => $type,\n 'revision' => $op_items[$filename]['revision'],\n );\n}", "title": "" }, { "docid": "5fdcd934d082db513f88a5979f5ad226", "score": "0.4502556", "text": "public static function git_commit() {\r\n\t\tcheck_admin_referer('plugin-name-action_wpidenonce'); \r\n\t\tif ( !is_super_admin() )\r\n\t\t\twp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');\r\n\t\t\r\n error_reporting(E_ALL);\r\n ini_set(\"display_errors\", 1);\r\n \r\n require_once('git/autoload.php.dist');\r\n //use TQ\\Git\\Cli\\Binary;\r\n //use TQ\\Git\\Repository\\Repository;\r\n \r\n $root = apply_filters( 'wpide_filesystem_root', WP_CONTENT_DIR ) . \"/\"; \r\n \r\n //check repo path entered or die\r\n if ( !strlen($_POST['gitpath']) ) \r\n die(\"Error: Path to your git repository is required!\");\r\n \r\n \r\n $repo_path = $root . sanitize_text_field( $_POST['gitpath'] );\r\n $gitbinary = sanitize_text_field( stripslashes($_POST['gitbinary']) );\r\n \r\n if ( $gitbinary===\"I'll guess..\" ){ //the binary path\r\n \r\n $thebinary = TQ\\Git\\Cli\\Binary::locateBinary();\r\n $git = TQ\\Git\\Repository\\Repository::open($repo_path, new TQ\\Git\\Cli\\Binary( $thebinary ) );\r\n \r\n }else{\r\n \r\n $git = TQ\\Git\\Repository\\Repository::open($repo_path, new TQ\\Git\\Cli\\Binary( $_POST['gitbinary'] ) );\r\n \r\n }\r\n \r\n $files = array();\r\n foreach ($_POST['files'] as $file){\r\n $files[] = base64_decode( $file );\r\n }\r\n \r\n //get the current user to be used for the commit\r\n $current_user = wp_get_current_user();\r\n \r\n $git->add( $files );\r\n $git->commit( sanitize_text_field($_POST['gitmessage']) , $files, \"{$current_user->user_firstname} {$current_user->user_lastname} <{$current_user->user_email}>\");\r\n\r\n wpide::show_changed_files();\r\n \r\n\t\tdie(); // this is required to return a proper result\r\n\t}", "title": "" }, { "docid": "5d78fac08154127eef710da2c480170b", "score": "0.44994307", "text": "function _versioncontrol_git_get_source_item($repository, $filename, $parents, $branches, $commit_rev) {\n $ret = array();\n if (count($parents) == 1) {\n $filenameg = substr($filename, 1);\n $filenameg = escapeshellarg($filenameg);\n $commit_rev = escapeshellarg($commit_rev);\n $exec = \"git rev-list -n 1 \". $commit_rev .\"^ -- $filenameg\";\n $logs = _versioncontrol_git_log_exec($exec); // Query tags.\n $revision = next($logs);\n $ret = array(\n array(\n 'path' => $filename,\n 'type' => VERSIONCONTROL_ITEM_FILE,\n 'revision' => $revision\n )\n );\n }\n else {\n foreach ($parents as $rev) {\n $ret[] = _versioncontrol_git_get_source_item_helper($repository, $rev, $filename, $branches);\n }\n }\n return $ret;\n}", "title": "" }, { "docid": "f65282ce3e1d096d984525f50c8bf00f", "score": "0.4493887", "text": "public function testHtmlContentTypeGitCommitFileAndGeoIp()\n {\n $ip_address = '192.168.4.1';\n\n $request = Request::createFromEnvironmentBuilder(\n EnvironmentBuilder::create()->addHeader('Accept', 'text/html')\n );\n\n // FYI, these attributes can be added via the `Serato\\SwsApp\\Slim\\Middleware\\GeoIpLookup` middleware\n $request = $request\n ->withAttribute(GeoIpLookup::IP_ADDRESS, $ip_address)\n ->withAttribute(GeoIpLookup::GEOIP_RECORD, new City([]));\n\n $response = $this->executeControllerTest(\n new StatusController($this->getDebugLogger(), __DIR__ . '/../../../resources/git_commit.txt'),\n $request\n );\n\n $this->assertEquals($response->getStatusCode(), 200);\n $html = (string)$response->getBody();\n\n $this->assertRegExp('/\\<html\\>/', $html);\n $this->assertRegExp('/\\<\\/html\\>/', $html);\n $this->assertRegExp('/\\<body\\>/', $html);\n $this->assertRegExp('/\\<\\/body\\>/', $html);\n $this->assertRegExp('/Application Status/', $html);\n $this->assertRegExp('/Remote IP address/', $html);\n $this->assertRegExp('/' . $ip_address . '/', $html);\n $this->assertRegExp('/Location:/', $html);\n }", "title": "" }, { "docid": "c62e7ebb353431d13f8422f327c1aefb", "score": "0.44892776", "text": "function cvs_add_repository($cvs_user, $cvs_pass, $cvs_project) {\r\n global $cvs_root, $cvs_cmd;\r\n\r\n $cvs_dir = $cvs_root.\"/\".$cvs_project;\r\n\r\n exec($cvs_cmd.\" -d \".$cvs_dir.\" init\");\r\n\r\n cvs_add_user($cvs_user, $cvs_pass, $cvs_project);\r\n}", "title": "" }, { "docid": "4b52f9e18112aa6dad50ee5a48582ff7", "score": "0.448609", "text": "function git_commit($repo, $cid) {\n $out = array();\n $commit = array();\n\n if (strlen($cid) <= 0) {\n return 0;\n }\n exec(\"GIT_DIR=$repo/.git git rev-list --header --max-count=1 $cid\", $out);\n\n\n if (!empty($out)) {\n\n $commit[\"commit_id\"] = $out[0];\n\n\n $g = explode(\" \", $out[1]);\n\n $commit[\"tree\"] = $g[1];\n\n\n\n\n $g = explode(\" \", $out[2]);\n $commit[\"parent\"] = $g[1];\n\n\n\n\n $g = explode(\" \", $out[3]);\n\n if (isset($g[3])) {\n\n\n // $commit['author'] = $g[1].' '.$g[2];\n /* variable number of strings for the name */\n /*\n for ($i = 0; $g[$i][0] != '<' && $i < 5; $i++) {\n // $commit[\"author\"] = $g[1];\n\n $commit[\"author\"] = \" $g[$i] \";\n }\n */\n\n for ($i = 1; $g[$i][0] != '<' && $i < 5; $i++) {\n\n\n $commit[\"author\"] = $g[1];\n $commit[\"author\"] .= ' ' . $g[2];\n // $commit[\"author\"] = \"\";\n // $commit[\"author\"] .= \" $g[$i] \";\n }\n\n // $commit['author'] = $g[1].' '.$g[2];\n\n\n\n /* add the email */\n\n $commit[\"date\"] = \"{$g[++$i]} {$g[++$i]}\";\n // $commit[\"date\"] = $g[5];s\n $commit[\"message\"] = \"\";\n $size = count($out);\n\n\n\n for (; $i < $size - 1; $i++) {\n $commit[\"message\"] .= $out[$i];\n }\n return $commit;\n }\n }\n}", "title": "" }, { "docid": "007642f5e3e46509c6257568bf225bc5", "score": "0.44663402", "text": "public function compile_core($vars)\n{ \n\n // Compile\n $client = new package();\n $destdir = $client->compile_core();\n\n // Debug\n debug::add(4, \"CLI: Compiled core Apex framework\", 'info');\n\n // Return\n return \"Successfully compiled the core Apex framework, and it is located at $destdir\\n\\n\";\n\n}", "title": "" }, { "docid": "1ff533aecb44d4ddb1bcb9317312f735", "score": "0.44617212", "text": "function spiplistes_corrige_img_pack ($img) {\n\tif(preg_match(\",^<img src='dist/images,\", $img)) {\n\t\t$img = preg_replace(\",^<img src='dist/images,\", \"<img src='../dist/images\", $img);\n\t}\n\treturn($img);\n}", "title": "" }, { "docid": "0f9c797bf459fdd7749473590542400b", "score": "0.44509235", "text": "function handle_blob_command($command) {\n $mark = $this->checkAndGet($command, 'mark', FALSE);\n $data = $this->checkAndGet($command, 'data');\n $output = \"blob\\n\";\n $output .= $this->handleMark($mark);\n $output .= $this->handleData($data);\n return $output;\n }", "title": "" }, { "docid": "b2578a2a03aa89fedd41740b77f07586", "score": "0.444148", "text": "function xgit_ref_type($ref) {\n switch ($ref) {\n case (strpos($ref, 'refs/tags') === 0):\n $ret = 'tags';\n break;\n case (strpos($ref, 'refs/heads') === 0):\n $ret = 'heads';\n break;\n case (strpos($ref, 'refs/remotes') === 0):\n $ret = 'remotes';\n break;\n default:\n $ret = FALSE;\n break;\n }\n return $ret;\n}", "title": "" }, { "docid": "b3a6dcc50e16e1a960d5e8ac134ca53c", "score": "0.44368824", "text": "function html_diff($proj, $commit, $parent, $repos) {\n $repo = get_repo_path($proj, $repos);\n $out = array();\n exec(\"GIT_DIR=$repo/.git git diff $parent $commit\", $out);\n\n echo '<div class=\"gitcode\">';\n echo '<b>diff</b><br>';\n echo highlight_code(implode(\"\\n\", $out));\n echo '</div><br>';\n}", "title": "" }, { "docid": "6cec3e869217b5792f6b2989794780d8", "score": "0.44045874", "text": "public function getGitWebUrl();", "title": "" }, { "docid": "4ff7dfa01d88067e96f2c31543d02a37", "score": "0.43874484", "text": "function do_fetch($key,$url,$path) {\n $cmd = \"ssh-agent bash -c 'cd $path; ssh-add $key; git fetch' 2>&1\";\n _log(\"Exec command: $cmd\\n\");\n return shell_exec($cmd);\n}", "title": "" }, { "docid": "86a27be992373bf94dd0c796f6e7c769", "score": "0.4370543", "text": "public function crear_LOB()\n {\n return $this->pgsqlLOBCreate($this->connection);\n }", "title": "" }, { "docid": "55101ea2bf5d9c8c5b5736c139ab2f48", "score": "0.4365753", "text": "function thg($what = '.') {\n\t\ttry {\n\t\t\t$repo = $this->getRepoByName($what);\n\t\t\t$repo->thg();\n\t\t} catch (\\Exception $e) {\n\t\t\techo $e->getMessage(), BR;\n\t\t}\n\t}", "title": "" }, { "docid": "083404390d4cd66d97a89d3dfc804836", "score": "0.43596342", "text": "public function init($path){\n\n $wrapper = new GitWrapper();\n $wrapper->streamOutput();\n $wrapper->clone($this->app->source_url, $path, array('bare' => TRUE));\n chdir($path);\n $wrapper->git('branch');\n }", "title": "" }, { "docid": "11f123a8091bffc1a65cf1ae9bad033e", "score": "0.43589425", "text": "public function get_remote_api_info( $git, $request ) {\n\t\t$response = $this->response[ $this->type->slug ] ?? false;\n\n\t\tif ( ! $response ) {\n\t\t\tself::$method = 'file';\n\t\t\t$response = $this->api( $request );\n\t\t\t$response = $this->decode_response( $git, $response );\n\t\t}\n\n\t\tif ( $response && is_string( $response ) && ! is_wp_error( $response ) ) {\n\t\t\t$response = $this->get_file_headers( $response, $this->type->type );\n\t\t\t$this->set_repo_cache( $this->type->slug, $response );\n\t\t\t$this->set_repo_cache( 'repo', $this->type->slug );\n\t\t}\n\n\t\tif ( ! is_array( $response ) || $this->validate_response( $response ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$response['dot_org'] = $this->get_dot_org_data();\n\t\t$this->set_file_info( $response );\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "11ad5a61c54245b825eb9ae574a40f8c", "score": "0.43515852", "text": "public function pull( $args, $assoc_args ) {\n\t\tif ( ! function_exists( 'get_plugins' ) ) {\n\t\t\trequire_once ABSPATH . 'wp-admin/includes/plugin.php';\n\t\t}\n\t\t$cur_dir = rtrim( getcwd(), ' /' );\n\t\tif ( !is_dir( \"$cur_dir/.git\" ) ) {\n\t\t\tWP_CLI::error( \"'$cur_dir' is not a git repository.\" );\n\t\t}\n\t\t$all_plugins = get_plugins();\n\t\tforeach ( array_keys( $all_plugins ) as $plugin_file ) {\n\t\t\t$full_path = rtrim( plugin_dir_path( WP_PLUGIN_DIR.'/'.$plugin_file ), ' /' );\n\t\t\t// WP_CLI::log( \"$full_path <> $cur_dir\" );\n\t\t\tif ( $full_path == $cur_dir ) {\n\t\t\t\t$blmd_git_updater = BLMD_Git_Updater();\n\t\t\t\t$_REQUEST['plugin_file'] = addslashes( $plugin_file );\n\t\t\t\t$blmd_git_updater->git_updater();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b367c633b3e6bef69c725927eff6af77", "score": "0.43485576", "text": "abstract protected function getRepoReleaseInfo();", "title": "" }, { "docid": "a836c33e9bec39b297d5bcc0897ea058", "score": "0.43369704", "text": "function changeBranch(){\r\n\t\t// $gitpss = isset($_COOKIE['gitpss']) ? $_COOKIE['gitpss'] : '';\r\n\t\t// $repo = 'https://'.$gitusr.':'.$gitpss.'@github.com/nelsoft/nelsoft_inventory.git';\r\n\t\tchdir($_POST['path']);\r\n\t\texec('git clean -df');\r\n\t\texec('git checkout -- .');\r\n\t\t// exec('git fetch '.$repo);\r\n\t\texec('git checkout '.$_POST['branch'], $data);\r\n\t\t// exec('git pull '.$repo.' '.$_POST['branch'], $data);\r\n\r\n\t\t$return['version'] = '0.00';\r\n\t\t$return['version'] = getversion($_POST['path'], 'version');\t\r\n\t\t$return['data'] = $data;\r\n\r\n\t\tjdie($return);\r\n}", "title": "" }, { "docid": "ac87f83fe609c2a673c73d965cd840b3", "score": "0.43334982", "text": "function POOL_createExtendedPackageIndex($poolName)\n{\n\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\n\t/**if (file_exists(\"/m23/tmp/makePoolPackages.sh\"))\n\t\treturn(false);*/\n\t\t\n\tif (SERVER_runningInBackground(\"m23poolBuilder\"))\n\t\treturn(false);\n\n\t$poolDir=POOL_getDir($poolName);\n\t\n\t//set correct permissions, remove old log file and copy m23 packages\n\texec(\"sudo chmod 755 $poolDir -R\n\trm -f /m23/tmp/makePoolPackages.log\n\tsudo rm -f -r $poolDir/pool/main/m23\n\tcp /mdk/m23Debs/debs $poolDir/pool/main/m23 -r 2>&1 | tee -a /m23/tmp/makePoolPackages.log\n\t\");\n\n\t//open the pool builder script file, executing this file will produce the necessary Packages files\n\t/**$pbfile=fopen(\"/m23/tmp/makePoolPackages.sh\",\"w\");*/\n\n\t$serverIP=getServerIP();\n\t//write sources list for this pool\n\t$sourceslist=\"#mirror: http://$serverIP/pool/$poolName\\n\";\n\n\t//write BASH header and set the user to the Apache user after the script start\n\t$cmds=\"\n\techo \\\"$I18N_packageIndexCreationStarted\\\" 2>&1 | tee -a /m23/tmp/makePoolPackages.log\n\t\";\n\n\t//get the releases (woody, sarge, sid)\n\t$pin = popen(\"cd $poolDir\t\n\tfind dists/ -type d -maxdepth 2 | cut -d'/' -f2 | sort -u\",\"r\");\n\twhile ($release = fgets($pin))\n\t{\n\t\t$release=trim($release);\n\t\tif (empty($release))\n\t\t\tcontinue;\n\t\t\n\t\t//all branches seperated by a blank\n\t\t$branches=\"\";\n\n\t\t//get the branches for a release (main, contrib, ...)\n\t\t$pin2 = popen(\"cd $poolDir\n\t\tfind dists/$release/ -type d -maxdepth 2 | cut -d'/' -f3 | sort -u\",\"r\");\n\t\twhile ($branch = fgets($pin2))\n\t\t{\n\t\t\t$branch=trim($branch);\n\t\t\tif (empty($branch))\n\t\t\t\tcontinue;\n\n\t\t\t$branches.=\"$branch \";\n\n\t\t\t//directory that stores the Debian packages\n\t\t\t$debDir=\"pool/$branch\";\n\t\t\t//directory that will store Packages*\n\t\t\t$listDir=\"dists/$release/$branch/binary-i386\";\n\n\t\t\t//write the script for one release + branch\n\t\t\t$cmds.=\"cd $poolDir\n\t\t\tfor from in `find | grep '%'`\n\t\t\tdo\n\t\t\t\tto=`echo \\$from | sed 's/%3a/./g'`\n\t\t\t\tmv -f \\$from \\$to\n\t\t\tdone\n\t\t\trm tempmkpackages -f\n\t\t\ttouch tempmkpackages 2>&1 | tee -a /m23/tmp/makePoolPackages.log\n\t\t\tmkdir -p $listDir\n\t\t\tchmod 755 $listDir\n\t\t\trm $listDir/Packages.bz2 -f 2>&1 | tee -a /m23/tmp/makePoolPackages.log\n\t\t\tdpkg-scanpackages $debDir tempmkpackages | grep -v \\\"Depends: $\\\" > $listDir/Packages 2>&1 | tee -a /m23/tmp/makePoolPackages.log\n\t\t\tgzip -c $listDir/Packages > $listDir/Packages.gz 2>&1 | tee -a /m23/tmp/makePoolPackages.log\n\t\t\tbzip2 -k $listDir/Packages 2>&1 | tee -a /m23/tmp/makePoolPackages.log\n\t\t\trm tempmkpackages -f\n\t\t\t\";\n\t\t};\n\n\t\t//write sources.list entry for this release and with all braches\n\t\t$sourceslist.=\"deb http://$serverIP/pool/$poolName/ $release $branches\\n\";\n\n\t\tpclose($pin2);\n\t};\n\n\tpclose($pin);\n\n\t//delete the script after execution\n\t$cmds.=\"\n\techo \\\"$I18N_packageIndexCreationFinished\\\" 2>&1 | tee -a /m23/tmp/makePoolPackages.log\n\trm -f /m23/tmp/makePoolPackages.sh\\n\";\n\n\tPOOL_setProperty($poolName,\"sourceslist\",$sourceslist);\n\n\t/**\n\t//execute the script in a screen. screen is started as \"root\", but the script is executed as the Apache user\n\texec(\"chmod +x /m23/tmp/makePoolPackages.sh\n\tsudo screen -dmS m23poolBuilder su \".HELPER_getApacheUser().\" -c /m23/tmp/makePoolPackages.sh\");\n\t*/\n\n\tSERVER_runInBackground(\"m23poolBuilder\",$cmds,HELPER_getApacheUser(),true);\n}", "title": "" }, { "docid": "572b45502dc22ce7db0bb01bea3963d1", "score": "0.4332155", "text": "abstract function gemir();", "title": "" }, { "docid": "e115870a6ff7171acddc074964c98af7", "score": "0.43188548", "text": "private function get_repo()\n{ \n\n // Check number of repos\n $count = db::get_field(\"SELECT count(*) FROM internal_repos WHERE is_active = 1\");\n if ($count == 0) { \n throw new RepoException('no_repos_exist');\n }\n\n // Ask to select repo\n if ($count > 1) { \n\n // List repos\n echo \"\\nAvailable Repositories:\\n\";\n $rows = db::query(\"SELECT * FROM internal_repos WHERE is_active = 1 ORDER BY id\");\n foreach ($rows as $row) { \n echo \"\\t[\" . $row['id'] . \"] $row[name] ($row[host])\\n\";\n }\n echo \"\\nWhich repository to save package on? \";\n $repo_id = trim(readline());\n\n // Get the only available repo\n } else { \n $repo_id = db::get_field(\"SELECT id FROM internal_repos WHERE is_active = 1\");\n }\n\n // Ensure repo exists\n if (!$row = db::get_idrow('internal_repos', $repo_id)) { \n throw new RepoException('not_exists', $repo_id);\n }\n\n // Return\n return (int) $repo_id;\n\n}", "title": "" }, { "docid": "fa05e40aba745e9dbb029049444e2d35", "score": "0.43180156", "text": "function xgit_check_commit_access($commit, $label) {\n global $xgit;\n // Construct basic common array. It will be the same across all cases.\n $operation = array();\n $operation['repo_id'] = $xgit['repo_id'];\n $item_paths = xgit_get_commit_files($commit);\n $operation['type'] = xgit_operation_type($ref);\n $operation['labels'][] = $label;\n\n // Set the uid to GIT_DRUPAL_UID if that user has an account on this\n // repository.\n $operation['uid'] = 0;\n $result = db_query(\"SELECT uid, repo_id\n FROM {versioncontrol_accounts}\n WHERE uid = %d AND repo_id = %d\",\n $xgit['uid'], $xgit['repo_id']);\n if (db_fetch_object($result)) {\n $operation['uid'] = $xgit['uid'];\n }\n\n // Set the $operation_items array from the item path and status.\n foreach ($item_paths as $path => $properties) {\n $item = xgit_get_operation_item($path, $properties);\n $operation_items[$path] = $item;\n }\n return versioncontrol_has_write_access($operation, $operation_items);\n}", "title": "" }, { "docid": "2e127679e1620c44759cea67fc3f4f67", "score": "0.43154293", "text": "function xgit_is_valid($object) {\n global $xgit;\n if (!isset($xgit['objects'][$object]['valid'])) {\n $command = 'git --git-dir=\"%s\" cat-file -t %s';\n $command = sprintf($command, $xgit['git_dir'], escapeshellarg($object));\n $type = exec($command, $empty, $ret_val);\n $xgit['objects'][$object]['valid'] = $ret_val === 0;\n $xgit['objects'][$object]['type'] = trim($type);\n }\n\n return $xgit['objects'][$object]['valid'];\n}", "title": "" }, { "docid": "3c8c60ec4da61c3f5cbbeed9f9e6a136", "score": "0.43092155", "text": "public function getGitData()\n\t{\n\t\treturn $this->getData('gitData');\n\t}", "title": "" }, { "docid": "94417696ebe6215f1bc12f978a83f249", "score": "0.43034688", "text": "function do_clone($key,$url,$path) {\n $cmd = \"ssh-agent bash -c 'ssh-add $key; git clone $url $path' 2>&1\";\n _log(\"Exec command: $cmd\\n\");\n return shell_exec($cmd);\n}", "title": "" }, { "docid": "22c3f14b70532b8e9d3e7f31578a2562", "score": "0.4303262", "text": "function OGSPlugin_Traitement_Galaxie(){\r\n\tglobal $db, $fp, $is_ogsplugin, $pub_galaxy, $pub_system, $pub_content, $pub_who, $who, $pub_what, $what, $plug_handlegalaxyviews, $ogspy_server_version, $log_logogsgalview, $system, $galaxy;\r\n\tglobal $ogs_set_system;\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"galaxyview...\\n\"); // ligne débug , commentaire si pas utile\r\n\t\t//\r\n\t\t/////////////////////////////////////////\r\n\t\t// VERIFICATION DROIT IMPORTER GALAXIE //\r\n\t\t/////////////////////////////////////////\r\n\t\t//\r\n\t\t//if (!OGSplugin_controle_droit('system')) SendHttpStatusCode(\"704\"); // ligne chapodepay\r\n\t\tif (!$ogs_set_system) SendHttpStatusCode(\"704\");\r\n\t\t// test handle galaxy view on server - mod option\r\n\t\tif (!$plug_handlegalaxyviews) SendHttpStatusCode(\"780\");\r\n\t\t//\r\n\t\t/////////////////\r\n\t\t// GALAXY VIEW //\r\n\t\t/////////////////\r\n\t\t//\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"données de galaxy en traitement\\n\");\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"données brutes: \".$pub_content.\"\\n\");\r\n\t\t//\r\n\t\t$galaxy = (int)$pub_galaxy;\r\n\t\t$system = (int)$pub_system;\r\n\t\t$galaxies_array = explode(\"<==||==>\",utf8_decode($pub_content));\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"\\n______________________________________________________________________________\\n\");\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"\\n==>Split tampon galaxies en \".count($galaxies_array).\" éléments\\n\");\r\n\t\t$numbuffer_iter = 0;\r\n\t\tforeach($galaxies_array as $curr_gal_buf) { // découpage du tampon\r\n\t\t\t//\r\n\t\t\t$gv_source = str_replace(\"&nbsp;\",\" \",stripslashes($curr_gal_buf));\r\n\t\t\t$gv_array = explode(\"\\n\",$gv_source);\r\n\t\t\t$solarstring = $gv_array[0];\r\n\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\"))\r\n\t\t\t\tfwrite($fp,\"\\n=>chaîne brute système solaire: \".$solarstring.\"\\n\");\r\n\t\t\tif (preg_match(\"#.*?\\s([0-9]):([0-9]{1,3})#\", $solarstring, $solarstring_array)){\r\n\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"parse ss: \".$solarstring_array[1].\"-\".$solarstring_array[2].\"\\n\");\r\n\t\t\t $galaxy = (int)$solarstring_array[1];\r\n\t\t\t $system = (int)$solarstring_array[2];\r\n\t\t\t}\r\n\t\t\tunset ($gv_array[1]);\r\n\t\t\tunset ($gv_array[0]);\r\n\t\t\t//\r\n\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\"))\r\n\t\t\t\tfwrite($fp,\"array count: \".count($gv_array).\"...\\n\"); // ligne débug , commentaire si pas utile\r\n\t\t\t//\r\n\t\t\t//===========================================================================================\r\n\t\t\t// Enregistrement des données de champ de ruine - test de l'existence des champs cible\r\n\t\t\t$ruincols_exist = OGSPlugin_DoDBColumnExists(TABLE_UNIVERSE, 'ruin_metal');\r\n\t\t\t$res_sql_error = $db->sql_error();\r\n\r\n\t\t\tif ($ruincols_exist) {\r\n\r\n\t\t\t if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"Res test colone `ruin_metal` TABLE_UNIVERSE OK! (\".$res_sql_error[\"code\"].\")\\n\");\r\n\t\t\t} else {\r\n if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"Res test colone `ruin_metal` TABLE_UNIVERSE échoué! (\".$res_sql_error[\"code\"].\")\\n\");\r\n\t\t\t}\r\n\t\t\t//===========================================================================================\r\n\t\t\t//\r\n\t\t\t$totalinserted = 0;\r\n\t\t\t$totalupdated = 0;\r\n\t\t\t$galcdr_num = $galcdr_added = 0; // vars champs de ruine\r\n\t\t\tforeach ($gv_array as $gv_row) {\r\n\t\t\t\t$gv_entries = explode(\"|\",$gv_row);\r\n\t\t\t\t// determine moonsize\r\n\t\t\t\t$moon = ($gv_entries[2] > 0) ? 1 : 0;\r\n\t\t\t\t//\r\n\t\t\t\t$playerstatus = $gv_entries[6];\r\n\t\t\t\t//\r\n\t\t\t\tif ($gv_entries[0] > 0 && $gv_entries[0] < 16)\t{\r\n\t\t\t\t\t//\r\n\t\t\t\t\t/////////////////////////////\r\n\t\t\t\t\t// PREPARATION DES DONNEES //\r\n\t\t\t\t\t/////////////////////////////\r\n\t\t\t\t\t//\r\n $position = (int)$gv_entries[0];\r\n\r\n // préparation données pour envoie vers ogs::galaxy_add_system(includes...)\r\n\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,$galaxy.\":\".$system.\":\".$position.\"||\".date(\"Y-m-d\").\" \".date(\"H:i:s\").\"||\".$planetname.\"||\".$moon.\"||\".$playername.\"||\".$allyname.\"<|>\".\"\\n\");\r\n\t\t\t\t\t//\r\n\t\t\t\t\t// CONCATENATION SOUS FORME DE BLOC\r\n\t\t\t\t\t// vérification ligne / pb conflit foxgame\r\n\t\t\t\t\tif ((trim($playername)!='') && (trim($planetname)=='')) {\r\n\t\t\t\t\t\t// send http header -> partial update\r\n\t\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\"))\tfwrite($fp,\"foxgame conflict...\\n\"); // ligne débug , commentaire si pas utile\r\n\t\t\t\t\t\tSendHttpStatusCode(\"792\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//\r\n\t\t\t\t\t$timestamp = mktime(); // utilisation date et heure en cours // fonction ogs\r\n\t\t\t\t\t//\r\n\t\t\t\t\t//////////////////////////////////////////\r\n\t\t\t\t\t// INSERTION LIGNE DANS BASE DE DONNEES //\r\n\t\t\t\t\t//////////////////////////////////////////\r\n\t\t\t\t\t//\r\n\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"juste avant galaxy_add_system...\\n\");\r\n\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"=> vars galaxy_add_system: gal:\".$galaxy.\"-sys:\".$system.\"-pos:\".$position.\"-moon:\". $moon.\"-planetname:\". $planetname.\"-\". $allyname.\"-\". $playername.\"-stats\". $playerstats.\"-\". $timestamp.\"\\n\");\r\n\t\t\t\t\t// au cas où\r\n\t\t\t\t\t// SendHttpStatusCode(\"702\", true, false);\r\n\t\t\t\t\t//\r\n\t\t\t\t\t\r\n \t\t\t// test existence champ moon dans table universe : si non -> unispy\r\n \t\t\t$testcolmoon = OGSPlugin_DoDBColumnExists(TABLE_UNIVERSE, 'moon');\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($testcolmoon) {\r\n \t\t\t\t\t// utf8_decode des champs $gv_entries[1] mis en début de fonction sur $pub_content\r\n \t\t\t\t\t$result = galaxy_add_system ($galaxy, $system, $gv_entries[0], $moon, trim($gv_entries[1]), trim($gv_entries[7]),trim($gv_entries[5]), $playerstatus, $timestamp, true);\r\n\t\t\t\t\t} else { // unispy\r\n\t\t\t\t\t $result = galaxy_add_system ($galaxy, $system, $gv_entries[0], trim($gv_entries[1]), trim($gv_entries[7]),trim($gv_entries[5]), $playerstatus, $timestamp, true);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//\r\n\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"retour func galaxy_add_system \\n\");\r\n\t\t\t\t\tif (isset($result)) { // pas forcément que des insertions, sinon des mises à jour !!!\r\n\t\t\t\t\t\tlist($inserted, $updated, $canceled) = $result; // $result -> gas_result test\r\n\t\t\t\t\t\tif ($inserted) $totalinserted++;\r\n\t\t\t\t\t\tif ($updated) $totalupdated++;\r\n\t\t\t\t\t\tif ($canceled) $totalcanceled++;\r\n\t\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"-> ajout ligne réussie : totalinserted: \".$totalinserted.\"(inserted: \".$inserted.\"-updated: \".$updated.\"- canceled\".$canceled.\"\\n\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$totalfailed++;\r\n\t\t\t\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"-> ajout ligner annulé\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n // on vérifie que le module champ de ruine existe\r\n $ruin_metal = ($gv_entries[3] != '' ? intval($gv_entries[3]): 0); // 0 par défaut si champ vide (pas de champ de ruine)\r\n $ruin_cristal = ($gv_entries[4] != '' ? intval($gv_entries[4]): 0); // 0 par défaut si champ vide (pas de champ de ruine)\r\n\r\n if ($ruincols_exist) {\r\n if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"=> Demande de mise à jour des champs de ruine\\n\");\r\n if (OGSPlugin_MajChampdeRuine($galaxy, $system, $gv_entries[0], $ruin_metal, $ruin_cristal)==false) {\r\n if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"-> mise à jour des champs de ruine réussie\\n\");\r\n }\r\n \r\n }\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t} // fin test valeur position\r\n\t\t\t}// FIn foreach()\r\n\t\t\t//log_plugin_(\"load_system_OGS\", array($totalplanet, $totalinserted, $totalupdated, $totalcanceled, $totalfailed, $totaltime));\r\n\r\n // mise à jour des alliances et des status joueurs\r\n galaxy_add_system_ally();\r\n\r\n // Enregistrement dans le journal\r\n if ($log_logogsgalview=='1')\r\n\t\t\t\t log_plugin_(\"load_system_OGS\".($cdr_maj==true? \"_cdr\":\"\"), array($galaxy.\":\".$system, ($totalinserted+$totalupdated)));\r\n\t\t\t $numbuffer_iter++;\r\n \t\t} // fin foreach\r\n\t\t//\r\n\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"all entries finished... ->\".$totalinserted.\"+\".$totalupdated.\"\\n\");\r\n\t\tif (($totalinserted+$updated) > 0) {\r\n\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"numinserted+updated: \".$totalinserted.\"+\".$totalupdated.\"\\n\");\r\n\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"gv updated...\\n\"); // ligne débug , commentaire si pas utile\r\n\t\t\tif (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"______________________________________________________\\n\");\r\n\t\t\t//\r\n\t\t\t// send http header\r\n\t\t\tif ($numbuffer_iter>1) SendHttpStatusCode(\"705\");\r\n\t\t\telse SendHttpStatusCode(\"701\");\r\n\t\t} else {\r\n\t\t\tif ($numbuffer_iter>1) SendHttpStatusCode(\"706\");\r\n\t\t\t SendHttpStatusCode(\"702\");\r\n\t\t}\r\n\t\t/* if (defined(\"OGS_PLUGIN_DEBUG\")) fwrite($fp,\"positions wrong...\\n\");\r\n\t\tob_end_clean();\r\n\t\t// send http header\r\n\t\theader(\"HTTP/1.0 602 no update\");\r\n\t\texit(); */\r\n}", "title": "" }, { "docid": "ba59bf57406c935035f933f5af42bb34", "score": "0.43024036", "text": "public static function blob() {}", "title": "" }, { "docid": "649a6157b349e2b902b7aafe8b419d04", "score": "0.4301028", "text": "function getLocalBranches();", "title": "" }, { "docid": "201889f6023138094c1cfe2b03fc0941", "score": "0.4285998", "text": "function svn_repos_recover($path)\n{\n}", "title": "" }, { "docid": "1604521279715d713b32043e5d854699", "score": "0.4277654", "text": "function _versioncontrol_git_get_tag_operations($repository, $tags) {\n $tag_ops = array();\n $tag_string = '';\n if (empty($tags)) {\n return array();\n }\n foreach ($tags as $tag) {\n $tag_string .= escapeshellarg(\"refs/tags/$tag\") .' ';\n }\n $format = \"%(objecttype)\\n%(objectname)\\n%(refname)\\n%(taggername) %(taggeremail)\\n%(taggerdate)\\n%(contents)\\nENDOFGITTAGOUTPUTMESAGEHERE\";\n $exec = \"git for-each-ref --format=\\\"$format\\\" $tag_string\";\n $logs_tag_msg = _versioncontrol_git_log_exec($exec);\n $exec = \"git show-ref -d $tag_string\";\n $logs_tag_commits = _versioncontrol_git_log_exec($exec);\n $tag_commits = array();\n foreach ($logs_tag_commits as $line) {\n if (substr($line, -3, 3) == '^{}') {\n $commit = substr($line, 0, 40);\n $tag = substr($line, 41);\n $tag = substr(substr($line, 41, strlen($tag) -3), 10);\n $tag_commits[$tag] = $commit;\n }\n }\n do {\n $ret = _versioncontrol_git_log_parse_tag_info($repository, $logs_tag_msg, $tag_commits);\n if ($ret !== FALSE) {\n $tag_ops[] = $ret;\n }\n }while ($ret !== FALSE);\n return $tag_ops;\n}", "title": "" }, { "docid": "e740c73d40748e9989cbfdecb4a680b0", "score": "0.4277617", "text": "static function load_from_name( $p_name ) {\n\t\t$p_name = trim($p_name);\n\t\t$t_repo_table = plugin_table( 'repository', 'Source' );\n\n\t\t$t_query = \"SELECT * FROM $t_repo_table WHERE name LIKE \" . db_param();\n\t\t$t_result = db_query( $t_query, array( $p_name ) );\n\n\t\tif ( db_num_rows( $t_result ) < 1 ) {\n\t\t\terror_parameters( $p_name );\n\t\t\tplugin_error( SourcePlugin::ERROR_REPO_MISSING );\n\t\t}\n\n\t\t$t_row = db_fetch_array( $t_result );\n\n\t\t$t_repo = new SourceRepo( $t_row['type'], $t_row['name'], $t_row['url'], $t_row['info'] );\n\t\t$t_repo->id = $t_row['id'];\n\n\t\treturn $t_repo;\n\t}", "title": "" }, { "docid": "6fcbcc66287e1779364d673bce4f49ab", "score": "0.42733034", "text": "function xgit_operation_type($ref) {\n switch (xgit_ref_type($ref)) {\n case 'heads':\n case 'remotes':\n return VERSIONCONTROL_OPERATION_BRANCH;\n break;\n case 'tags':\n return VERSIONCONTROL_OPERATION_TAG;\n break;\n default:\n throw new Exception(\"Unexpected operation type '$ref' received.\");\n break;\n }\n}", "title": "" }, { "docid": "eb3753b60f288184d72143851734cb5a", "score": "0.42693898", "text": "function get_github_file_structure($list) {\n $result = array();\n foreach ($list as $key => $value) {\n $path_segment = explode('/', $value['path']);\n // read the \"content\" directory\n if ((count($path_segment) >= 2) && (reset($path_segment) == 'content')) {\n // debug('value', $value);\n $path_segment = array_slice($path_segment, 1);\n // debug('path_segment', $path_segment);\n if ($value['type'] == 'tree') {\n if (count($path_segment) == 1) {\n // add the directory in the first level of the repository as chapters\n $result[$path_segment[0]] = array (\n 'item' => array(),\n );\n }\n } elseif ($value['type'] == 'blob') {\n $pathinfo = pathinfo(implode('/', $path_segment));\n // debug('pathinfo', $pathinfo);\n if ($pathinfo['filename'] == 'README') {\n } else {\n // get the main chapter files\n if (count($path_segment) == 2) {\n // debug('content file path_segment', $path_segment);\n $pathinfo = pathinfo($path_segment[1]);\n // debug('pathinfo', $pathinfo);\n if ($pathinfo['extension'] == 'md') { // TODO: accept also other extensions\n $fileinfo = explode('-', $pathinfo['filename']);\n // debug('fileinfo', $fileinfo);\n $language_code = end($fileinfo);\n $key = implode('-', array_slice($fileinfo, 0, -1));\n if (strlen($language_code) == 2) {\n // debug('key', $key);\n if (array_key_exists($key, $result)) {\n $result[$key]['item'][$language_code] = $value;\n }\n }\n }\n }\n }\n\n }\n }\n }\n // debug('result', $result);\n return $result;\n}", "title": "" }, { "docid": "75a6821b20f369279ab959e5ab16e4f6", "score": "0.42692134", "text": "public function gist()\n {\n return Gist::i();\n }", "title": "" }, { "docid": "9d72783fc994fb0fd46f83cde067d536", "score": "0.42682248", "text": "public function getName()\n\t{\n\t\treturn 'git';\n\t}", "title": "" }, { "docid": "8d43036fddb529054adc298bf8178b8f", "score": "0.4256824", "text": "public function show_changed_files() {\r\n\t\tcheck_admin_referer('plugin-name-action_wpidenonce'); \r\n\t\tif ( !is_super_admin() )\r\n\t\t\twp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');\r\n\t\t\r\n error_reporting(E_ALL);\r\n ini_set(\"display_errors\", 1);\r\n \r\n require_once('git/autoload.php.dist');\r\n //use TQ\\Git\\Cli\\Binary;\r\n //use TQ\\Git\\Repository\\Repository;\r\n \r\n $root = apply_filters( 'wpide_filesystem_root', WP_CONTENT_DIR ) . \"/\"; \r\n \r\n //check repo path entered or die\r\n if ( !strlen($_POST['gitpath']) ) \r\n die(\"Error: Path to your git repository is required!\");\r\n \r\n \r\n $repo_path = $root . sanitize_text_field( $_POST['gitpath'] );\r\n $gitbinary = sanitize_text_field( stripslashes($_POST['gitbinary']) );\r\n \r\n if ( $gitbinary===\"I'll guess..\" ){ //the binary path\r\n \r\n $thebinary = TQ\\Git\\Cli\\Binary::locateBinary();\r\n $git = TQ\\Git\\Repository\\Repository::open($repo_path, new TQ\\Git\\Cli\\Binary( $thebinary ) );\r\n \r\n }else{\r\n \r\n $git = TQ\\Git\\Repository\\Repository::open($repo_path, new TQ\\Git\\Cli\\Binary( $_POST['gitbinary'] ) );\r\n \r\n }\r\n\r\n //echo branch\r\n $branch = $git->getCurrentBranch();\r\n echo \"<p><strong>Current branch:</strong> \" . $branch . \"</p>\";\r\n \r\n // [0] => Array\r\n //(\r\n // [file] => WPide.php\r\n // [x] => \r\n // [y] => M\r\n // [renamed] => \r\n //)\r\n $status = $git->getStatus();\r\n $i=0;//row counter\r\n if ( count($status) ){\r\n \r\n //echo out rows of staged files \r\n foreach ($status as $item){\r\n echo \"<div class='gitfilerow \". ($i % 2 != 0 ? \"light\" : \"\") .\"'><span class='filename'>{$item['file']}</span> <input type='checkbox' name='\". str_replace(\"=\", '_', base64_encode($item['file']) ) .\"' value='\". base64_encode($item['file']) .\"' checked /> \r\n <a href='\". base64_encode($item['file']) .\"' class='viewdiff'>[view diff]</a> <div class='gitdivdiff \". str_replace(\"=\", '_', base64_encode($item['file']) ) .\"'></div> </div>\";\r\n $i++;\r\n }\r\n }else{\r\n echo \"<p class='red'>No changed files in this repo so nothing to commit.</p>\";\r\n }\r\n \r\n //output the commit message box\r\n echo \"<div id='gitdivcommit'><label>Commit message</label><br /><input type='text' id='gitmessage' name='message' class='message' />\r\n <p><a href='#' class='button-primary'>Commit the staged chanages</a></p></div>\";\r\n \r\n //echo $thebinary;\r\n \r\n //$git = Repository::open($repo_path, new Binary('/var/www/siddtes/wpsites.co.uk/git') );\r\n //echo $git->getFileCreationMode().\" ----- \";\r\n // get status of working directory\r\n //$branch = $git->getCurrentBranch();\r\n //echo \"current branch: \" . $branch;\r\n \r\n \r\n //print_r($_POST);\r\n \r\n\t\tdie(); // this is required to return a proper result\r\n\t}", "title": "" }, { "docid": "fc1738465abb42357d7e6e3c4330a01e", "score": "0.42497107", "text": "function SVNRepoManager() {\n\tloadTemplate('SVNRepoManager');\n}", "title": "" }, { "docid": "a980ecd60db7e8917e5086f091dd4ab3", "score": "0.4239731", "text": "function get_local_file_list($manual_id) {\n $result = array(\n \"sha\" => \"local\",\n \"url\" => \"whatever\",\n \"tree\" => array(),\n );\n $queue = array(MANUAL_LOCAL_PATH);\n while (!empty($queue)) {\n $path = array_shift($queue);\n // debug('path', $path);\n // debug('queue', $queue);\n if ($handle = opendir($path)) {\n while (false !== ($filename = readdir($handle))) {\n if ($filename != \".\" && $filename != \"..\" && $filename != \".git\") {\n $item = array (\n \"mode\" => 0,\n \"type\" => \"blob\",\n \"sha\" => \"\",\n \"path\" => substr($path, strlen(MANUAL_LOCAL_PATH), strlen($path)).$filename,\n \"size\" => 0,\n \"url\" => \"\",\n );\n if (is_dir($path.$filename)) {\n $item[\"type\"] = \"tree\";\n $queue[] = $path.$filename.'/';\n }\n // debug('filename', $filename);\n $result['tree'][] = $item;\n }\n }\n closedir($handle);\n }\n } // while queue\n // debug('result', $result);\n return $result;\n}", "title": "" }, { "docid": "9d30b0f6be2193372d74a51779335347", "score": "0.4236863", "text": "function nggpanoPano($pid, $gid = \"\", $hfov = \"\", $vfov = \"\", $voffset = \"\") {\r\n \r\n global $ngg, $nggpano_options;\r\n \r\n //Get default options of the plugin\r\n if(!$nggpano_options)\r\n $nggpano_options = get_option('nggpano_options');\r\n \r\n \t//initialize variables\r\n $this->pid = $pid;\r\n $this->gid = $gid;\r\n \r\n $this->errmsg = '';\r\n $this->error = false;\r\n $this->hfov = $hfov;\r\n $this->vfov = $vfov;\r\n $this->voffset = $voffset;\r\n \r\n \r\n $Image = nggdb::find_image( $this->pid );\r\n \r\n //find gallerypath by Image\r\n if($Image) {\r\n // Input Image\r\n $this->galleryFolder = $Image->path;\r\n $this->imageInputPath = $Image->imagePath;\r\n \r\n $this->title = html_entity_decode( stripslashes(nggPanoramic::i18n($Image->alttext, 'pano_' . $Image->pid . '_alttext')) );\r\n $this->description = html_entity_decode( stripslashes(nggPanoramic::i18n($Image->description, 'pano_' . $Image->pid . '_description')) );\r\n \r\n $this->thumbURL = $Image->thumbURL;\r\n \r\n $this->ImageCustomURL = trailingslashit( home_url() ) . 'index.php?callback=image&amp;pid='.$this->pid;\t\r\n\r\n //Gallery id\r\n $this->gid = $Image->galleryid;\r\n \r\n $filename = $this->imageInputPath;\r\n //check to see if file exists\r\n if(!file_exists($filename)) {\r\n $this->errmsg = 'File not found';\r\n $this->error = true;\r\n }\r\n //check to see if file is readable\r\n elseif(!is_readable($filename)) {\r\n $this->errmsg = 'File is not readable';\r\n $this->error = true;\r\n }\r\n } else {\r\n //find gallerypath by Gallery\r\n $Gallery = nggdb::find_gallery($this->gid);\r\n $this->galleryFolder = $Gallery->path;\r\n //$this->imageInputPath = $Gallery->path;\r\n }\r\n \r\n /*\r\n * init panoFolder for generation\r\n */\r\n // Relative Path where panogeneration will be store\r\n $this->panoFolder = $this->galleryFolder . $this->panoSubFolder . $this->panoPrefix . $this->pid;\r\n $this->setpanoFolderPath();\r\n\r\n \r\n //Relative Path to xml\r\n $this->xmlKrpano\t= $this->panoFolder . \"/\" . $this->panoPrefix . $this->pid.\".xml\";\r\n //URL path to xml\r\n $this->xmlKrpanoURL\t= site_url() . '/' . $this->xmlKrpano;\r\n //Absolute path to xml path\r\n $this->xmlKrpanoPath\t= NGGPANOWINABSPATH . $this->xmlKrpano;\r\n \r\n \r\n //Check configuration\r\n $this->loadConfig();\r\n \r\n// if($this->error == false) {\r\n// //Throw an error if a file doesn't exist\r\n// //VIEWER\r\n// //check to see if krpano viewer file exists\r\n// if(!file_exists(trailingslashit($this->krpanoFolderPath) . $this->krpanoSWF)) {\r\n// $this->errmsg = $this->krpanoSWF .' file not found in ' . $this->krpanoFolder;\r\n// $this->error = true;\r\n// }\r\n// //check to see if Skin file exists\r\n// if(!file_exists($this->viewerTemplatePath)) {\r\n// $this->errmsg = 'Template file '. $this->viewerTemplate .' not found';\r\n// $this->error = true;\r\n// }\r\n// //TOOLS\r\n// //check to see if kmakemultires\r\n// elseif(!file_exists(trailingslashit($this->kmakemultiresFolderPath) . $this->kmakemultiresFile)) {\r\n// $this->errmsg = 'Krpanotool - ' . $this->kmakemultiresFile .' file not found in ' . $this->kmakemultiresFolder;\r\n// $this->error = true;\r\n// }\r\n// //check to see if file is executable\r\n// elseif(!is_executable (trailingslashit($this->kmakemultiresFolderPath) . $this->kmakemultiresFile)) {\r\n// $this->errmsg = 'Krpanotool - ' . $this->kmakemultiresFile .' not executable';\r\n// $this->error = true;\r\n// }\r\n// //check to see if krpanotool config file exists\r\n// elseif(!file_exists($this->toolConfigFilePath)) {\r\n// $this->errmsg = 'Krpanotool - Config File '. $this->toolConfigFile . ' not found';\r\n// $this->error = true;\r\n// }\r\n// //check to see if krpanotool XML config file exists\r\n// elseif(!file_exists($this->kmakemultiresXMLConfigPath)) {\r\n// $this->errmsg = 'Krpanotool - XML Config File '. $this->kmakemultiresXMLConfig . ' not found';\r\n// $this->error = true;\r\n// }\r\n// \r\n// }\r\n\r\n //return null if an error is detected\r\n if($this->error == true) {\r\n return;\r\n }\r\n }", "title": "" }, { "docid": "9ee4f2c27720ace17471faca304f9da4", "score": "0.42234907", "text": "function getfoldercontent($folder, &$dir_array, &$pic_array, &$expic_array)\r\n{\r\n global $xoopsModuleConfig;\r\n\r\n $dir = opendir(XOOPS_ROOT_PATH.\"/modules/xcgal/\".$xoopsModuleConfig['fullpath'].$folder);\r\n while($file = readdir($dir)){\r\n if(is_dir(XOOPS_ROOT_PATH.\"/modules/xcgal/\".$xoopsModuleConfig['fullpath'].$folder.$file)) {\r\n if ($file != \".\" && $file != \"..\")\r\n $dir_array[] = $file;\r\n }\r\n if(is_file(XOOPS_ROOT_PATH.\"/modules/xcgal/\".$xoopsModuleConfig['fullpath'].$folder.$file)) {\r\n if(strncmp($file, $xoopsModuleConfig['thumb_pfx'], strlen($xoopsModuleConfig['thumb_pfx'])) != 0\r\n && strncmp($file, $xoopsModuleConfig['normal_pfx'], strlen($xoopsModuleConfig['normal_pfx'])) != 0)\r\n $pic_array[] = $file;\r\n }\r\n }\r\n closedir($dir);\r\n\r\n natcasesort($dir_array);\r\n natcasesort($pic_array);\r\n}", "title": "" }, { "docid": "9555444848bdc5e4744cb5b8632b65fb", "score": "0.42184478", "text": "function makeIPL($url) {\n\t\t\t$command = explode(\"/\",rtrim(str_replace(WWW_ROOT,\"\",$url),\"/\"));\n\t\t\t// Check for resource link\n\t\t\tif ($command[0] == \"files\" && $command[1] == \"resources\") {\n\t\t\t\t$resource = $this->getResourceByFile($url);\n\t\t\t\tif ($resource) {\n\t\t\t\t\t$this->IRLsCreated[] = $resource[\"id\"];\n\t\t\t\t\treturn \"irl://\".$resource[\"id\"].\"//\".$resource[\"prefix\"];\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check for page link\n\t\t\tlist($navid,$commands) = $this->getPageIDForPath($command);\n\t\t\tif (!$navid) {\n\t\t\t\treturn $this->replaceHardRoots($url);\n\t\t\t}\n\t\t\treturn \"ipl://\".$navid.\"//\".base64_encode(json_encode($commands));\n\t\t}", "title": "" }, { "docid": "077973a93862024fb9f9e4f5e2ef5e0a", "score": "0.42117763", "text": "static function load_all() {\n\t\t$t_repo_table = plugin_table( 'repository', 'Source' );\n\n\t\t$t_query = \"SELECT * FROM $t_repo_table ORDER BY name\";\n\t\t$t_result = db_query( $t_query );\n\n\t\t$t_repos = array();\n\n\t\twhile ( $t_row = db_fetch_array( $t_result ) ) {\n\t\t\t$t_repo = new SourceRepo( $t_row['type'], $t_row['name'], $t_row['url'], $t_row['info'] );\n\t\t\t$t_repo->id = $t_row['id'];\n\n\t\t\t$t_repos[] = $t_repo;\n\t\t}\n\n\t\treturn $t_repos;\n\t}", "title": "" }, { "docid": "66aece5b4f11dae5d24de3a995db7cb3", "score": "0.42014858", "text": "public function fetchGitTemplate($template_id, PFUser $user, Project $project) {\n try {\n $template = $this->template_factory->getTemplate($template_id);\n $this->checkTemplateIsAccessible($template, $project, $user);\n } catch (Exception $e) {\n $GLOBALS['Response']->addFeedback(Feedback::ERROR, get_class($e).$e->getTraceAsString());\n $GLOBALS['Response']->sendStatusCode($e->getCode());\n return;\n }\n\n echo $template->getContent();\n }", "title": "" }, { "docid": "89fb3d2ccd88562ae425dd99bb99d4b9", "score": "0.41978684", "text": "function ogr2ogr_gmlas() {\n\t\t# For Logging add: . ' >> /var/www/logs/ogr_' . $gml_id . '.log 2>> /var/www/logs/ogr_' . $gml_id . '.err'\n\t\t# escape for passwords with shell \n\t\t#$cmd = $this->docker_gdal_cmd . ' ' . OGR_BINPATH_GDAL . 'ogr2ogr -f \"PostgreSQL\" PG:\"' . $this->pgdatabase->get_connection_string_p() . ' SCHEMAS=' . $this->gmlas_schema .'\" GMLAS:' . $this->gml_location . ' -oo REMOVE_UNUSED_LAYERS=YES -oo XSD=' . $this->xsd_location;\n\t\t#echo $cmd;\n\t\t#exec($cmd, $output, $error_code);\n\t\t#echo '<pre>'; print_r($output); echo '</pre>';\n\t\t#echo 'Error-Code:' . $error_code;\n\t\t\n\t\t$gdal_container_connect = 'gdalcmdserver:8080/t/?tool=ogr2ogr&param=';\n\t\t$param_1 = urlencode('-f \"PostgreSQL\" PG:');\n\t\t$connection_string = urlencode('\"' . $this->pgdatabase->get_connection_string() . ' SCHEMAS=' . $this->gmlas_schema . '\" ');\n\t\t$param_2 = urlencode('GMLAS:' . \"'\" . $this->gml_location . \"'\" . ' -oo REMOVE_UNUSED_LAYERS=YES -oo XSD=' . $this->xsd_location); \n#\t\t$param_2 = urlencode('GMLAS:' . \"'\" . $this->gml_location . \"'\" . ' -oo REMOVE_UNUSED_LAYERS=YES');\n\n\t\t$url = $gdal_container_connect . $param_1 . $connection_string . $param_2;\t\n\n\t\t$ch = curl_init();\n\t\t#$url = curl_escape($ch, $url);\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch,CURLOPT_CONNECTTIMEOUT,300);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t$output = curl_exec($ch);\n\t\tcurl_close($ch);\n\n\t\t$success = strpos($output, 'ERROR') === false;\n\t\t$result = json_decode($output);\n\t\treturn array(\n\t\t\t'success' => $success,\n\t\t\t'msg' => ($success ? $result->stdout : $result->err . $result->stderr),\n\t\t\t'url' => str_replace($this->pgdatabase->get_credentials($this->pgdatabase->connection_id)['password'], 'secret', $url)\n\t\t);\n\t}", "title": "" }, { "docid": "8e7be20596ba38e99fb53c5d2e65f96b", "score": "0.41970533", "text": "public function process(Payload $payload) {\n\t\t$sha1 = $payload->getHead()->getId();\n\t\t$tag = substr($payload->getRef(), strlen(self::PATTERN_TAG_HEAD));\n\t\t$this->validateVersionNumber($tag);\n\n\t\t// additional settings not requiring validation.\n\t\t$url = $this->getSettingValue(self::OPTION_URL, $payload->getRepository()->resolveApiUrl(Repository::API_URL_CLONE));\n\t\t// look for an upload comment in settings; if not found there, use Payload HEAD's message body\n\t\t$comment = $this->getSettingValue(self::OPTION_COMMENT, $payload->getHead()->getMessage());\n\n\t\t// validation: credentials file and local directory path.\n\t\t$directory = $this->getSettingValue(self::OPTION_DIRECTORY);\n\t\t$directory = rtrim($directory, '/') . '/';\n\t\t$directory .= $sha1 . '/' . $this->getWorkingDirectoryName($payload);\n\t\t$credentialsFile = $this->getSettingValue(self::OPTION_CREDENTIALSFILE, GIZZLE_HOME . self::CREDENTIALS_FILE);\n\t\t$this->validateCredentialsFile($credentialsFile);\n\t\tlist ($username, $password) = $this->readUploadCredentials($credentialsFile);\n\n\t\t// initializing build directory and cloning source\n\t\t$clone = $this->getGitClonePlugin();\n\t\t$clonePluginSettings = $this->getSubPluginSettings('\\NamelessCoder\\GizzleGitPlugins\\GizzlePlugins\\ClonePlugin', array(\n\t\t\tClonePlugin::OPTION_GITCOMMAND => $this->getSettingValue(self::OPTION_GITCOMMAND, ClonePlugin::DEFAULT_GITCOMMAND),\n\t\t\tClonePlugin::OPTION_DIRECTORY => $directory,\n\t\t\tClonePlugin::OPTION_SINGLE => TRUE,\n\t\t\tClonePlugin::OPTION_BRANCH => $tag,\n\t\t\tClonePlugin::OPTION_DEPTH => 1\n\t\t));\n\t\t$clone->initialize($clonePluginSettings);\n\t\t$this->createWorkingDirectory($directory);\n\t\t$this->validateDirectory($directory);\n\t\t$clone->process($payload);\n\n\t\t// a large, properly formatted data file.\n\t\t$comment = sprintf($comment, $url);\n\t\ttry {\n\t\t\t$output = $this->getUploader()->upload($directory, $username, $password, $comment);\n\t\t} catch (\\SoapFault $error) {\n\t\t\tthrow new \\RuntimeException($error->getMessage(), $error->getCode());\n\t\t}\n\n\t\t// cleanup and messages\n\t\tif (TRUE === (boolean) $this->getSettingValue(self::OPTION_REMOVEBUILD, FALSE)) {\n\t\t\t$this->removeWorkingDirectory($this->getSettingValue(self::OPTION_DIRECTORY), $sha1);\n\t\t}\n\t\t$payload->getResponse()->addOutputFromPlugin($this, $output);\n\t}", "title": "" }, { "docid": "2694ebad2324f4dc59e5f09f008108b0", "score": "0.4196307", "text": "function _versioncontrol_git_log_get_tags() {\n //TODO: incorporate a --dereference and parse better, saves one git call for tags\n $logs = _versioncontrol_git_log_exec('git show-ref --tags'); // Query tags.\n $tags = _versioncontrol_git_log_parse_tags($logs); // Parse output.\n return $tags;\n}", "title": "" }, { "docid": "2b6bdd364db31a755c34b2cb170ccd97", "score": "0.41958952", "text": "function _versioncontrol_git_log_get_branches() {\n $logs = _versioncontrol_git_log_exec('git show-ref --heads'); // Query branches.\n $branches = _versioncontrol_git_log_parse_branches($logs); // Parse output.\n return $branches;\n}", "title": "" }, { "docid": "168a34a1eec895c7419e48acc2a21d98", "score": "0.41952544", "text": "function gog_rc($rapport)\r\n{\r\n global $db, $table_prefix, $user_data, $config;\r\n $xtense_version=\"2.3.0\";\r\n //$raw = stripslashes($rapport[\"content\"]);\r\n //$raw = str_replace(\"\\'\",\"'\",$raw);\r\n //Compatibilité UNIX/Windows\r\n //$raw = str_replace(\"\\r\\n\",\"\\n\",$raw);\r\n //$raw = str_replace(\" \\n\",\"\\n\",$raw);\r\n //Compatibilité IE/Firefox\r\n //$raw = str_replace(\"\\t\",' ',$raw);\r\n // Mise en forme du rapport, nettoyage des codes html et autres \r\n //$rapport = remo_htm($raw);\r\n /*$handle=fopen(\"gog.txt\",\"w\");\r\n fwrite($handle,$raw);\r\n fwrite($handle,\"--------\\n\");\r\n\tfwrite($handle,$rapport);\r\n //fwrite($handle,\"\\r\\n\");\r\n //fwrite($handle,$config[defenseur]);\r\n //fwrite($handle,\"\\r\\n\"); */\r\n \r\n//\tforeach($rapport['n'] as $n){\r\n//\t\tif ($n['type'] == \"A\"){\r\n//\t\t\t$query = $db->sql_query(\"SELECT count(planet_id) FROM \".TABLE_USER_BUILDING.\" WHERE user_id = '\".$user_data['user_id'].\"' AND coordinates = '\".$n['coords'].\"'\");\r\n//\t\t\tlist($check) = $db->sql_fetch_row($query);\r\n//\t\t\tif($check != 0){\r\n//\t\t\t\t$attaquant = $n['player'];\r\n//\t\t\t\t$coord_att = $n['coords'];\r\n//\t\t\t\tbreak;\r\n//\t\t\t}\r\n//\t\t}\r\n//\t}\r\n//\t\r\n//\tforeach($rapport['n'] as $n){\r\n//\t\tif ($n['type'] == \"D\"){\r\n//\t\t\t$defenseur = $n['player'];\r\n//\t\t\t$coord_def = $n['coords'];\r\n//\t\t\tbreak;\r\n//\t\t}\r\n//\t}\r\n //Definition des tables de gOg\r\n define('TABLE_GAME',$table_prefix.'game');\r\n //récupération des paramètres de config\r\n\t$query = \"SELECT value FROM `\".TABLE_MOD_CFG.\"` WHERE `mod`='gameOgame' and `config`='config'\";\r\n\t$result = $db->sql_query($query);\r\n\t$config = mysql_fetch_row($result);\r\n\t$gog_config = unserialize($config[0]);\r\n\t\r\n // Vérifie que c'est bien un RC valide\r\n if (!$rapport['date'])\r\n {\r\n echo 'Rapport de combat invalide';\r\n return FALSE;\r\n }\r\n else\r\n {\r\n //récupère le pseudo de l'attaquant\r\n $attaquant = $rapport['n']['0']['player'];\r\n //preg_match('#Attaquant\\s(.{3,50})\\s\\(#',$rapport,$attaquant);\r\n //récupère les coordonnées de l'attaquant\r\n $coord_att = $rapport['n']['0']['coords'];\r\n //preg_match('#Attaquant\\s.{3,110}\\[(.{5,8})]#',$rapport,$coord_att);\r\n //On regarde dans les coordonnées de l'espace personnel du joueur qui insère les données via le plugin si les coordonnées de l'attaquant correspondent à une de ses planètes\r\n \t$query = \"SELECT coordinates FROM \".TABLE_USER_BUILDING.\" WHERE user_id='\".$user_data['user_id'].\"'\";\r\n \t$result = $db->sql_query($query);\r\n\t\t$attaqu = 0;\r\n \twhile(list($coordinates) = mysql_fetch_row($result))\r\n\t\t{\r\n\t\t\tif($coordinates == $coord_att) $attaqu = 1;\r\n\t\t}\r\n \tif ($attaqu == 0)\r\n \t{\r\n \t\t// Vous n'êtes pas l'attaquant, je sors !!\r\n \t\treturn FALSE;\r\n \t} \r\n \t//récupère le pseudo du défenseur\r\n \t$defenseur = $rapport['n']['1']['player'];\r\n //preg_match('#Défenseur\\s(.{3,50})\\s\\(#',$rapport,$defenseur);\r\n //récupère les coordonnées du défenseur\r\n $coord_def = $rapport['n']['1']['coords'];\r\n //preg_match('#Défenseur\\s.{3,110}\\[(.{5,8})]#',$rapport,$coord_def);\r\n // Récupère les pertes de l'attaquant et du défenseur\r\n $pertesA = $rapport['result']['a_lost'];\r\n $pertesD = $rapport['result']['d_lost'];\r\n //preg_match('#attaquant\\sa\\sperdu\\sau\\stotal\\s(\\d*)\\sunités#',$rapport,$pertesA);\r\n //preg_match('#Le\\sdéfenseur\\sa\\sperdu\\sau\\stotal\\s(\\d*)\\sunités#',$rapport,$pertesD);\r\n //preg_match('#(\\d*)\\sunités\\sde\\smétal,\\s(\\d*)\\sunités\\sde\\scristal\\set\\s(\\d*)\\sunités\\sde\\sdeutérium#',$rapport,$ressources);\r\n \t$ressources=Array(0,0,0,0);\r\n if ($rapport['win'] == 'A') {\r\n\t\t\t$winmetal=isset($rapport['result']['win_metal']) ? $rapport['result']['win_metal'] : 0;\r\n\t\t\t$wincristal=isset($rapport['result']['win_cristal']) ? $rapport['result']['win_cristal'] : 0;\r\n\t\t\t$windeut=isset($rapport['result']['win_deut']) ? $rapport['result']['win_deut'] : 0;\r\n\t\t\t$ressources=Array(0,$winmetal,$wincristal,$windeut);\r\n\t\t}\r\n\r\n //if (!preg_match('#(\\d*)\\sunités\\sde\\smétal,\\s(\\d*)\\sunités\\sde\\scristal\\set\\s(\\d*)\\sunités\\sde\\sdeutérium#',$rapport,$ressources)) $ressources=Array(0,0,0,0);\r\n // Debris\r\n $debmetal=isset($rapport['result']['deb_metal']) ? $rapport['result']['deb_metal'] : 0;\r\n $debcristal=isset($rapport['result']['deb_cristal']) ? $rapport['result']['deb_cristal'] : 0;\r\n $recyclage = Array(0,$debmetal,$debcristal);\r\n //if (!preg_match('#Un\\schamp\\sde\\sdébris\\scontenant\\s(\\d*)\\sunités\\sde\\smétal\\set\\s(\\d*)\\sunités\\sde\\scristal\\sse\\sforme\\sdans\\sl\\'orbite\\sde\\scette\\splanète#',$rapport,$recyclage)) $recyclage[1]=$recyclage[2]=0;\r\n // Probabilite de lune\r\n $plune[1] = isset($rapport['moonprob']) ? $rapport['moonprob'] : 0;\r\n $lune = isset($rapport['moon']) ? $rapport['moon'] : 0;\r\n // calcul la date et l'heure du rapport\r\n $date = $rapport['date'];//mktime($date[3],$date[4],$date[5],$date[1],$date[2],date('Y'));\r\n //Calcul des points en fonction des coeficients\r\n $points = ceil(($ressources[1]+$ressources[2]+$ressources[3])/100000*$gog_config['pillage'] + $pertesA/100000*$gog_config['pertes'] + $pertesD/100000*$gog_config['degats'] + $lune*$gog_config['clune']);\r\n //On vérifie que cette attaque n'a pas déja été enregistrée\r\n $query = \"SELECT id FROM \".TABLE_GAME.\" WHERE sender='\".$user_data['user_id'].\"' AND date='\".$date.\"' AND attaquant='\".$attaquant.\"' \";\r\n $result = $db->sql_query($query);\r\n $nb = mysql_num_rows($result);\r\n // Si le RC existe déjà on sort\r\n if ($nb != 0) return FALSE;\r\n //Insert dans la base de données\r\n $query = 'INSERT INTO '.TABLE_GAME.' (id,sender,date,attaquant,coord_att,defenseur,coord_def,pertesA,pertesD,lune,`%lune`,pillageM,pillageC,pillageD,recyclageM,recyclageC,recycleM,recycleC,points,rawdata) VALUES (\\'\\',\\''.$user_data['user_id'].'\\',\\''.$date.'\\',\\''.mysql_real_escape_string($attaquant).'\\',\\''.mysql_real_escape_string($coord_att).'\\',\\''.mysql_real_escape_string($defenseur).'\\',\\''.mysql_real_escape_string($coord_def).'\\',\\''.$pertesA.'\\',\\''.$pertesD.'\\',\\''.$lune.'\\',\\''.$plune[1].'\\',\\''.$ressources[1].'\\',\\''.$ressources[2].'\\',\\''.$ressources[3].'\\',\\''.$recyclage[1].'\\',\\''.$recyclage[2].'\\',\\'0\\',\\'0\\',\\''.$points.'\\',\\''.mysql_real_escape_string($rapport['rawdata']).'\\')';//'.mysql_real_escape_string($rapport).'\r\n $db->sql_query($query);\r\n \r\n \r\n /////////////////////////////////////////////\r\n // Test enregistrement des rounds du combats\r\n /////////////////////////////////////////////\r\n// \t\t$exist = $db->sql_fetch_row($db->sql_query(\"SELECT id_rc FROM \".TABLE_GAME_PARSEDRC.\" WHERE dateRC = '\".$pub_date.\"'\"));\r\n//\t\t\tif(!$exist[0]){\r\n//\t\t\t\t$db->sql_query(\"INSERT INTO \".TABLE_GAME_PARSEDRC.\" (\r\n//\t\t\t\t\t\t`dateRC`, `nb_rounds`, `victoire`, `pertes_A`, `pertes_D`, `gain_M`, `gain_C`, `gain_D`, `debris_M`, `debris_C`, `lune`\r\n//\t\t\t\t\t) VALUES (\r\n//\t\t\t\t\t '{$rapport['date']}', '{$rapport['count']}', '{$rapport['win']}', '\".$rapport['result']['a_lost'].\"', '\".$rapport['result']['d_lost'].\"', '\".$rapport['result']['win_metal'].\"', '\".$rapport['result']['win_cristal'].\"', '\".$rapport['result']['win_deut'].\"', '\".$rapport['result']['deb_metal'].\"', '\".$rapport['result']['deb_cristal'].\"', '{$rapport['moon']}'\r\n//\t\t\t\t\t)\"\r\n//\t\t\t\t);\r\n//\t\t\t\t$id_rc = $db->sql_insertid();\r\n//\t\t\t\t\r\n//\t\t\t\tforeach($rapport['rounds'] as $i => $round){\r\n//\t\t\t\t\t$db->sql_query(\"INSERT INTO \".TABLE_GAME_PARSEDRCROUND.\" (\r\n//\t\t\t\t\t\t\t`id_rc`, `numround`, `attaque_tir`, `attaque_puissance`, `defense_bouclier`, `attaque_bouclier`, `defense_tir`, `defense_puissance`\r\n//\t\t\t\t\t\t) VALUE (\r\n//\t\t\t\t\t\t\t'{$id_rc}', '{$i}', '\".$round['a_nb'].\"', '\".$round['a_shoot'].\"', '\".$round['d_bcl'].\"', '\".$round['a_bcl'].\"', '\".$round['d_nb'].\"', '\".$round['d_shoot'].\"'\r\n//\t\t\t\t\t\t)\"\r\n//\t\t\t\t\t);\r\n//\t\t\t\t\t$id_rcround[$i] = $db->sql_insertid();\r\n//\t\t\t\t}\r\n//\t\t\t\t\r\n//\t\t\t\tforeach ($rapport['n'] as $i => $n){\r\n//\t\t\t\t\t$fields = '';\r\n//\t\t\t\t\t$values = '';\r\n//\t\t\t\t\t$j = 1;\r\n//\t\t\t\t\t\r\n//\t\t\t\t\tforeach ($n['content'] as $field => $value){\r\n//\t\t\t\t\t\t$fields .= \", `{$field}`\";\r\n//\t\t\t\t\t\t$values .= \", '{$value}'\";\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\t\r\n//\t\t\t\t\t$db->sql_query(\"INSERT INTO \".(($n['type'] == \"D\") ? TABLE_GAME_ROUND_DEFENSE : TABLE_GAME_ROUND_ATTACK).\" (\r\n//\t\t\t\t\t\t\t`id_rcround`, `player`, `coordinates`, `Armes`, `Bouclier`, `Protection`\".$fields.\"\r\n//\t\t\t\t\t\t) VALUE (\r\n//\t\t\t\t\t\t\t'\".$id_rcround[$j].\"', '\".$n['player'].\"', '\".$n['coords'].\"', '\".$n['weapons']['arm'].\"', '\".$n['weapons']['bcl'].\"', '\".$n['weapons']['coq'].\"'\".$values.\"\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\tif($n['type'] == \"D\"){\r\n//\t\t\t\t\t\tif(!isset($update))\r\n//\t\t\t\t\t\t\t$update = $db->sql_query(\"UPDATE \".TABLE_GAME_PARSEDRC.\" SET coordinates = '\".$n['coords'].\"' WHERE id_rc = '{$id_rc}'\");\r\n//\t\t\t\t\t\t$j++;\r\n//\t\t\t\t\t}\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n }\r\n return TRUE;\r\n}", "title": "" }, { "docid": "a0dc82ccb19fe33ec3d39efae9c1a993", "score": "0.41921845", "text": "function lightboxgallery_get_file_info($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename) {\n global $CFG;\n\n if ($filearea === 'gallery_images') {\n $fs = get_file_storage();\n\n $filepath = is_null($filepath) ? '/' : $filepath;\n $filename = is_null($filename) ? '.' : $filename;\n if (!$storedfile = $fs->get_file($context->id, 'mod_lightboxgallery', 'gallery_images', 0, $filepath, $filename)) {\n if ($filepath === '/' and $filename === '.') {\n $storedfile = new virtual_root_file($context->id, 'mod_lightboxgallery', 'gallery_images', 0);\n } else {\n // Not found.\n return null;\n }\n }\n\n require_once(\"$CFG->dirroot/mod/lightboxgallery/locallib.php\");\n $urlbase = $CFG->wwwroot.'/pluginfile.php';\n\n return new lightboxgallery_content_file_info($browser, $context, $storedfile, $urlbase, $areas[$filearea],\n true, true, false, false);\n }\n\n // Note: folder_intro handled in file_browser automatically.\n\n return null;\n}", "title": "" }, { "docid": "348979fa4f08029f49c31f04b45b7863", "score": "0.41920897", "text": "protected function ReadData()\n\t{\n\t\t$this->dataRead = true;\n\n\t\t$exe = new GitPHP_GitExe($this->project);\n\n\t\t/* get data from tag object */\n\t\t$args = array();\n\t\t$args[] = 'tag';\n\t\t$args[] = $this->GetHash();\n\t\t$ret = $exe->Execute(GIT_CAT_FILE, $args);\n\t\tunset($exe);\n\n\t\t$lines = explode(\"\\n\", $ret);\n\n\t\tif (!isset($lines[0]))\n\t\t\treturn;\n\n\t\t$readInitialData = false;\n\t\tforeach ($lines as $i => $line) {\n\t\t\tif (!$readInitialData) {\n\t\t\t\tif (preg_match('/^object ([0-9a-fA-F]{40})$/', $line, $regs)) {\n\t\t\t\t\t$this->objectHash = $regs[1];\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (preg_match('/^type (.+)$/', $line, $regs)) {\n\t\t\t\t\t// Ignore this, because it's determined by GetType of the object\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (preg_match('/^tag (.+)$/', $line, $regs)) {\n\t\t\t\t\t$this->tagName = $regs[1];\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (preg_match('/^tagger (.*) ([0-9]+) (.*)$/', $line, $regs)) {\n\t\t\t\t\t$this->tagger = $regs[1];\n\t\t\t\t\t$this->taggerEpoch = $regs[2];\n\t\t\t\t\t$this->taggerTimezone = $regs[3];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$trimmed = trim($line);\n\n\t\t\tif ((strlen($trimmed) > 0) || ($readInitialData === true)) {\n\t\t\t\t$this->comment[] = $line;\n\t\t\t}\n\t\t\t$readInitialData = true;\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "97d09e5158634fcddeef724e6b858ce7", "score": "0.41855496", "text": "function getProjectList() {\n\n\t$outFileNew = \"/var/www/html/projectList.new\";\n\t$outFileOrig = \"/var/www/html/projectList.txt\";\n\t$repos = array();\n\t$lodRE = '/br_[0-9]+.[0-9]+.[0-9]+/';\n\t$github_repos_url = 'https://github.com/api/v2/json/repos/show/CanoeVentures'; \n\t$curlResponse = curlRequest($github_repos_url);\n\n\tif (empty($curlResponse)) {\n\t\tprint \"Sorry - no data was returned.<p>\";\n\t}\n\telse {\n\t\t$jsonResult = json_decode($curlResponse);\t\t\n\t\tforeach($jsonResult->repositories as $r) {\n\t\t\t$repos[] = $r->name;\t\n\t\t}\n\t}\n\tsort($repos);\n\t$valid_branch = \" \";\n $valid_tag = \" \";\n\t$fileHandle = fopen($outFileNew, 'w') or die(\"cannot open file \" . $outFileNew);\n\tforeach ($repos as $repo) {\n\t\t$curlResponse = curlRequest($github_repos_url . '/' . $repo . '/branches');\t\t\n\t\t$jsonResult = json_decode($curlResponse);\n\t\tsleep(2);\n\t\t\n\t\tforeach($jsonResult->branches as $key => $val) {\n\t\t\tif (preg_match($lodRE, $key)) {\n\t\t\t\t$valid_branch = \"true\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$valid_branch = \"false\";\n\t\t\t}\n\t\t}\n\t\tif ($valid_branch == \"true\") {\n\t\t\tfwrite($fileHandle, $repo . \"=enabled\\n\");\n\t\t\t$valid_branch = \"false\";\n\t\t}\n\t\telse {\n\t\t\tfwrite($fileHandle, $repo . \"=disabled\\n\");\n\t\t}\t\t\n\t}\n\tfclose($fileHandle);\n\t// may need to put in a semaphore here\n\tcopy($outFileNew, $outFileOrig);\n}", "title": "" }, { "docid": "4a9abe38cae6ce4dda2fbca1a9da1ee5", "score": "0.41838664", "text": "function upload_GenLicenceMod(){\n\n\tif(!extension_loaded('php_fidelylic'))\n\t\t//dl('php_fidelylic.dll');\n\t$module = 'php_fidelylic';\n\tif (extension_loaded($module))\n\t\t $str = \"module loaded\";\n\telse\n\t\t$str = \"Module $module is not compiled into PHP\";\n\n}", "title": "" }, { "docid": "034e5781afa9999023004ca7d5a4de2d", "score": "0.4179354", "text": "abstract public function repository();", "title": "" }, { "docid": "034e5781afa9999023004ca7d5a4de2d", "score": "0.4179354", "text": "abstract public function repository();", "title": "" }, { "docid": "aee48c795a9a8aa8a7f46688f90c1f69", "score": "0.41781402", "text": "public function get_repo_data(){\n\n\t\t\treturn $this->get_repo();\n\n\t\t}", "title": "" }, { "docid": "2acecce8e4f3f26ed38246a4bf6d4b21", "score": "0.41765946", "text": "public function gpgauth(){\n\t\tinclude TEMPLATE_PATH.\"gpgauth.php\";\n\t}", "title": "" }, { "docid": "3df46869f94c3df28071fc54597e21a6", "score": "0.41706282", "text": "function xgit_label_for($ref, $old_obj, $new_obj) {\n $label = array();\n $label['name'] = $ref;\n $label['type'] = xgit_operation_type($ref);\n $label['action'] = xgit_action($old_obj, $new_obj, TRUE);\n\n return $label;\n}", "title": "" }, { "docid": "043f178ffc6bd97d678e5dfbc5733004", "score": "0.41645214", "text": "public function __construct(&$git)\n {\n $this->git = & $git;\n }", "title": "" }, { "docid": "47286473364de8e7e654d6a1f057beb2", "score": "0.4163168", "text": "function getBranches();", "title": "" }, { "docid": "873f583a98f373cbc34397cdd7e07a3c", "score": "0.4156838", "text": "public function get_description()\n {\n return 'Synchronise Wiki+ with disk directories and git.';\n }", "title": "" }, { "docid": "0c50227eb39dcf2f1263114e03de4e78", "score": "0.41549462", "text": "public function gitCloneRepositories() {\n\t\t$count = 0;\n\n\t\t$packages = $this->Package->find('list');\n\t\tforeach ($packages as $id => $name) {\n\t\t\t$this->out(sprintf(__(\"* Downloading package %s\"), $name));\n\t\t\tif ($this->Package->setupRepository($id)); {\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\t\t$this->out(sprintf(__('* Downloaded %s of %s repositories'), $count, count($packages)));\n\t}", "title": "" }, { "docid": "0ce37df94d3a726d1b17890970ce64f6", "score": "0.41524512", "text": "public static function jnews_grc() {\n\t\t$code = [ 'status' ];\n\t\t$request = wp_remote_get( 'https://' . $code[0] . '.' . strtolower( self::$package ) . '.io/', [ 'timeout' => 20 ] );\n\n\t\tif ( ! is_wp_error( $request ) || 200 === wp_remote_retrieve_response_code( $request ) ) {\n\t\t\treturn wp_remote_retrieve_body( $request );\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "27458aa3407fd80790fe0d9367b087d7", "score": "0.41490924", "text": "function parseGF( $ast ) {\n assert_ast_type( $ast, [ NodeType::GF, NodeType::REFERENCE ] );\n\n $type = ast_node_type($ast);\n $data = ast_node_data($ast);\n $source = ast_node_source($ast);\n\n switch( $type ) {\n case NodeType::GF:\n $name = ast_get($data, NodeKey::NAME);\n $t_args = parseTemplateArgs(ast_get($data, NodeKey::TARGS));\n $alias = ast_has($data, NodeKey::ALIAS) ? null : parseIdentifier(ast_get($data, NodeKey::ALIAS));\n\n return new GF_Spec( $source, $name, $t_args, $alias );\n break;\n case NodeType::REFERENCE:\n $info = parseReference($ast);\n grokit_assert( $info->isGF(),\n 'Tried to look up reference as a GF, got a ' . $info->kind() .\n 'instead ' . $source );\n\n return $info;\n break;\n }\n}", "title": "" }, { "docid": "51c1b83d23d2f6de79332c82e200fa1b", "score": "0.41436717", "text": "function make_download_git($name, $download, $download_location) {\n $tmp_path = make_tmp();\n $wc = drush_get_option('working-copy');\n\n // If no download URL specified, assume anonymous clone from git.drupal.org.\n $download['url'] = isset($download['url']) ? $download['url'] : \"git://git.drupal.org/project/$name.git\";\n // If no working-copy download URL specified, assume it is the same.\n $download['wc_url'] = isset($download['wc_url']) ? $download['wc_url'] : $download['url'];\n\n // Use working-copy download URL if --working-copy specified.\n $url = $wc ? $download['wc_url'] : $download['url'];\n\n $tmp_location = drush_tempdir() . '/' . basename($download_location);\n\n // Before we can checkout anything, we need to clone the repository.\n if (!drush_shell_exec(\"git clone %s %s\", $url, $tmp_location)) {\n make_error('DOWNLOAD_ERROR', dt('Unable to clone @project from @url.', array('@project' => $name, '@url' => $url)));\n return FALSE;\n }\n\n drush_log(dt('@project cloned from @url.', array('@project' => $name, '@url' => $url)), 'ok');\n\n // Get the current directory (so we can move back later).\n $cwd = getcwd();\n // Change into the working copy of the cloned repo.\n chdir($tmp_location);\n\n // Now that we've got a clone, we can checkout what the .make file says.\n // We want to use the most specific target possible, so first try a tag.\n if (!empty($download['tag'])) {\n // @TODO: change checkout to refs path\n if (drush_shell_exec(\"git checkout %s\", 'refs/tags/' . $download['tag'])) {\n drush_log(dt(\"Checked out tag @tag.\", array('@tag' => $download['tag'])), 'ok');\n }\n else {\n make_error('DOWNLOAD_ERROR', dt(\"Unable to check out tag @tag.\", array('@tag' => $download['tag'])));\n }\n }\n\n // If there wasn't a tag, try a specific revision hash.\n elseif (!empty($download['revision'])) {\n if (drush_shell_exec(\"git checkout %s\", $download['revision'])) {\n drush_log(dt(\"Checked out revision @revision.\", array('@revision' => $download['revision'])), 'ok');\n }\n else {\n make_error('DOWNLOAD_ERROR', dt(\"Unable to checkout revision @revision\", array('@revision' => $download['revision'])));\n }\n }\n\n // If not, see if we at least have a branch.\n elseif (!empty($download['branch'])) {\n if (drush_shell_exec(\"git checkout %s\", $download['branch'])) {\n drush_log(dt(\"Checked out branch @branch.\", array('@branch' => $download['branch'])), 'ok');\n }\n elseif (drush_shell_exec(\"git checkout -b %s %s\", $download['branch'], 'origin/' . $download['branch'])) {\n drush_log(dt('Checked out branch origin/@branch.', array('@branch' => $download['branch'])), 'ok');\n }\n else {\n make_error('DOWNLOAD_ERROR', dt('Unable to check out branch @branch.', array('@branch' => $download['branch'])));\n }\n }\n\n if (!empty($download['submodule'])) {\n $command = 'git submodule update';\n foreach ($download['submodule'] as $option) {\n $command .= ' --%s';\n }\n if (call_user_func_array('drush_shell_exec', array_merge(array($command), $download['submodule']))) {\n drush_log(dt('Initialized registered submodules.'), 'ok');\n }\n else {\n make_error('DOWNLOAD_ERROR', dt('Unable to initialize submodules.'));\n }\n }\n\n // move back to last current directory (first line)\n chdir($cwd);\n\n // Handle .info file re-writing (if so desired).\n if (!drush_get_option('no-gitinfofile', FALSE)) {\n // Figure out the proper version string to use based on the .make file.\n // Best case is the .make file author told us directly.\n if (!empty($download['full_version'])) {\n $full_version = $download['full_version'];\n }\n // Next best is if we have a tag, since those are identical to versions.\n elseif (!empty($download['tag'])) {\n $full_version = $download['tag'];\n }\n // If we have a branch, append '-dev'.\n elseif (!empty($download['branch'])) {\n $full_version = $download['branch'] . '-dev';\n }\n // Ugh. Not sure what else we can do in this case.\n elseif (!empty($download['revision'])) {\n $full_version = $download['revision'];\n }\n // Probably can never reach this case.\n else {\n $full_version = 'unknown';\n }\n\n // If the version string ends in '.x-dev' do the Git magic to figure out\n // the appropriate 'rebuild version' string, e.g. '7.x-1.2+7-dev'.\n $matches = array();\n if (preg_match('/^(.+).x-dev$/', $full_version, $matches)) {\n require_once dirname(__FILE__) . '/../pm/package_handler/git_drupalorg.inc';\n $full_version = drush_pm_git_drupalorg_compute_rebuild_version($tmp_location, $matches[1]);\n }\n require_once dirname(__FILE__) . '/../pm/pm.drush.inc';\n drush_pm_inject_info_file_metadata($tmp_location, $name, $full_version);\n }\n\n // Remove .git/ directory if working-copy flag was not specified.\n if (!$wc && file_exists($tmp_location . '/.git')) {\n drush_shell_exec(\"rm -rf %s\", $tmp_location . '/.git');\n }\n\n // Move the directory into the final resting location.\n drush_shell_exec('cp -Rf %s %s', $tmp_location, dirname($download_location));\n\n return dirname($tmp_location);\n}", "title": "" }, { "docid": "f46fd8ebe9e2aac02af338c434b787ee", "score": "0.41406858", "text": "function pkg_build_repo_list() {\n\t$repos = pkg_list_repos();\n\t$list = array();\n\n\tforeach ($repos as $repo) {\n\t\t$list[$repo['name']] = $repo['descr'];\n\t}\n\n\treturn($list);\n}", "title": "" }, { "docid": "35da94914d07918956ed18206b146c1b", "score": "0.4139584", "text": "public function pull_my_git_real_fast() {\n\t\t@file_put_contents(TMP.'pull_my_git_real_fast', '');\n\t\tdie('OK');\n\t}", "title": "" }, { "docid": "f20916e9061c6d118ec5fd47891ac4d6", "score": "0.41332418", "text": "function analyze_hierarchy( &$vin, &$pin, &$commit, &$coord, &$parents, &$nr, &$childs ){\n if( in_array($commit,$pin,true) ){\n $coord[$nr] = array_search( $commit,$pin,true ); // take reserved coordinate\n $pin[$coord[$nr]] = \".\"; // free the reserved coordinate\n $childs[$coord[$nr]] = \".\";\n }else{\n // this commit appears to be a head\n if( ! in_array( \".\", $pin, true ) ){ // make empty coord plce\n $pin[] = \".\";\n $vin[] = \".\";\n $childs[] = \".\";\n }\n $coord[$nr] = array_search( \".\", $pin, true ); // take the first unused coordinate\n // do not allocate this place in array as this is already freed place\n }\n //reserve place for parents\n $pc=0;\n foreach( $parents as $p ){ \n if( in_array( $p, $pin, true ) ){ \n // the parent alredy has place\n $childs[array_search( $p, $pin, true )] = $commit; // register child\n $pc++; \n continue; \n } \n if( $pc == 0 ){ \n // try to keep the head straigth\n $pin[$coord[$nr]] = $p; \n $childs[$coord[$nr]] = $commit;\n $pc++; \n continue; \n }\n if( in_array( \".\", $pin, true ) ){ \n // 1. find nearest free place in the left side\n $i = -1;\n for( $i = $coord[$nr]-1; $pin[$i] != \".\" && $i >= 0; $i-- );\n // 2. find neares free place in the right side\n if( $i < 0 ) for( $i = $coord[$nr]; $pin[$i] != \".\"; $i++ );\n //$x = array_search( \".\", $pin, true );\n $pin[$i] = $p;\n $childs[$i] = $commit;\n }else{ // allcate new place into array\n $pin[] = $p;\n $vin[] = \".\";\n $childs[] = $commit;\n }\n }\n //reduce image width if possible\n while( count($pin) > ($coord[$nr]+1) )\n {\n $valpin = array_pop($pin);\n $valvin = array_pop($vin);\n $valchi = array_pop($childs);\n if( $valpin == \".\" && $valvin == \".\" ) continue;\n $pin[] = $valpin;\n $vin[] = $valvin;\n $childs[] = $valchi;\n break;\n }\n}", "title": "" }, { "docid": "d94156115d1a91861b300696ab0c4dad", "score": "0.41301286", "text": "function platform_composer_git_register_autoload() {\n static $loaded = FALSE;\n if (!$loaded) {\n $loaded = TRUE;\n provision_autoload_register_prefix('Provision_', dirname(__FILE__));\n }\n}", "title": "" }, { "docid": "2fcc643a029ca01d921926e388ea5564", "score": "0.41240007", "text": "function http($url, $args = array()) {\n\n\t\tglobal $CONFIG;\n\n\t\t$userAgent = '(Elgg ' . $CONFIG->release . ')';\n\n\t\t$ch = curl_init();\n\t\t//curl_setopt($ch, CURLOPT_HTTPHEADER, \"Host: api.dropbox.com\");\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, $userAgent);\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_FAILONERROR, true);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\t\tcurl_setopt($ch, CURLOPT_AUTOREFERER, true);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 20);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, true);\n\t\t\n\t\t/**\n\t\t * This is needed to remove problems with certificate \n\t\t * authentication against the dropbox server. \n\t\t */\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\t\n\t\tif (!empty($args['username']) && !empty($args['password'])) {\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);\n\t\t\tcurl_setopt($ch, CURLOPT_USERPWD, $args['username'] . ':' . $args['password']);\n\t\t}\n\n\t\tif (!empty($args['post'])) {\n\t\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $args['data']);\n\t\t}\n\n\t\tif (!empty($args['headers'])) {\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $args['headers']);\n\t\t}\n\n\t\t$html = curl_exec($ch);\n\t\t\n\t\t$rc = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\t\t$info = curl_getinfo($ch);\n\t\t$err = curl_error($ch);\n\t\t$errno = curl_errno($ch);\n\n\t\tcurl_close($ch);\n\t\t\n\t\treturn array('rc' => $rc, \n\t\t\t 'html' => $html, \n\t\t\t 'errno' => $errno,\n\t\t\t 'err' => $err,\n\t\t\t 'info' => $info);\n\t}", "title": "" }, { "docid": "0461f812022e1c1c2166a1a1fb9a07a2", "score": "0.4121811", "text": "public function getgiftpackagelistAction()\n {\n \t$uid = $this->uid;\n\n \t$result = Hapyfish2_Island_Bll_GiftPackage::getList($uid);\n \t$this->echoResult($result);\n }", "title": "" }, { "docid": "a8e59099e2742140a8ebf383c8db1fda", "score": "0.41074142", "text": "function xgit_merge_info($object) {\n global $xgit;\n if(!isset($xgit['objects'][$object]['merge'])) {\n $lines = _xgit_load_object($object);\n $merge = FALSE;\n foreach ($lines as $line) {\n if (preg_match('/^Merge\\:/ (.+)', $line, $matches) === 0) {\n $merge = preg_split('/\\s+/', trim($matches[1]));\n $merge = preg_replace('/\\.+/', '', $merge);\n break;\n }\n\n // Headers end with an empty line; prevent any non-header information from\n // being mistaken as a merge specification.\n if (strlen($line) === 0) {\n break;\n }\n }\n\n $xgit['objects'][$object]['merge'] = $merge;\n }\n\n return $xgit['objects'][$object]['merge'];\n}", "title": "" }, { "docid": "2e00d26c4b46bb7f41b07384bd628290", "score": "0.41072693", "text": "public static function gist( $id ) {\n \n // Embed Gist.\n return (new HTML('script', [\n 'src' => \"https://gist.github.com/{$id}.js\"\n ]))->html();\n \n }", "title": "" } ]
7aa62033a920f34d100e6419bc5681b3
Get Title and meta description / keywords ofr each page
[ { "docid": "723428b27e2e82c119d888cc9b72383b", "score": "0.5695739", "text": "function GetTitleAndTags ($module, $action, $param1)\r\n{\r\n\tglobal $db;\r\n\tglobal $modules;\r\n\tglobal $conf;\r\n\r\n\t$get_tags_n_title = array();\r\n\tswitch ($module)\r\n\t{\r\n\t\tdefault ://all modules and pages\r\n\t\t\t$section = $module;\r\n\t\t\t//print_r($modules);\r\n\t\t\tif (isset($modules->module[$section])&& count($modules->module[$section]) >0)\r\n\t\t\t{\r\n\t\t\t\r\n\t\t\t\t$get_tags_n_title['title'] = $modules->module[$section]['name'];\r\n\t\t\t\t$get_tags_n_title['description'] = $modules->module[$section]['meta_description'];\r\n\t\t\t\t$get_tags_n_title['keywords'] = $modules->module[$section]['meta_keywords'];\r\n\t\t\t\t$get_tags_n_title['content'] = $modules->module[$section]['content'];\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\t$query = \"SELECT name, meta_keywords, meta_description FROM pages\r\n\t\t\t\t\t\t\t\t\tWHERE link = '\".$section.\"'\";\r\n\t\t\t\t$db->query($query);\r\n\t\t\t\t$db->next_record();\r\n\t\t\t\t$get_tags_n_title['title'] = $db->f('name');\r\n\t\t\t\t$get_tags_n_title['description'] = $db->f('meta_description');\r\n\t\t\t\t$get_tags_n_title['keywords'] = $db->f('meta_keywords');\r\n\t\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\tcase 'reviews':\r\n\t\t\t$get_tags_n_title['title'] = \"Impresii DentistOnline, pareri, reviews\";\r\n\t\t\t$get_tags_n_title['description'] = $modules->module[$section]['meta_description'];\r\n\t\t\t$get_tags_n_title['keywords'] = $modules->module[$section]['meta_keywords'];\r\n\t\tbreak;\r\n\r\n\t\tcase 'cabinete':\r\n\t\t\tswitch ($action)\r\n\t\t\t{\r\n\t\t\t\tdefault :\r\n\t\t\t\t\t#get the name of the parent module\r\n\t\t\t\t\t$link = $module.'.'.$action;\r\n\t\t\t\t\t$section = $link;\r\n\t\t\t\t\t$get_tags_n_title['title'] = $modules->module[$section]['name'];\r\n\t\t\t\t\t$get_tags_n_title['description'] = $modules->module[$section]['meta_description'];\r\n\t\t\t\t\t$get_tags_n_title['keywords'] = $modules->module[$section]['meta_keywords'];\r\n\t\t\t\t\t$get_tags_n_title['content'] = $modules->module[$section]['content'];\r\n\t\t\t\t\t#get the name of the category, if there is one\r\n\t\t\t\t\tif ($param1 != \"\" && intval($param1))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$query = \"SELECT cat_name,meta_description,meta_keywords FROM cabinete_categories\r\n\t\t\t\t\t\t\t\t\t\t\tWHERE id_cat = '\".intval($param1).\"'\";\r\n\t\t\t\t\t\t$db->query($query);\r\n\t\t\t\t\t\t$db->next_record();\r\n\t\t\t\t\t\tif($db->f('meta_description')!=\"\")\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$get_tags_n_title['description'] = $db->f('meta_description');\r\n\t\t\t\t\t\t\t$get_tags_n_title['keywords'] = $db->f('meta_keywords');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$array_jud_res =array (\"Sfantu Gheorghe\"=>\"Covasna\" ,\"Focsani\"=>\"Vrancea\",\"Oradea\"=>\"Bihor\",\"Timisoara\"=>\"Timis\",\"Resita\"=>\"Caras-Severin\",\"Drobeta turnu Severin\"=>\"Mehedinti\",\"Zalau\"=>\"Salaj\",\"Baia Mare\"=>\"Maramures\",\"Miercurea Ciuc\"=>\"Harghita\",\"Tragoviste\"=>\"Dambovita\",\"Tragu Jiu\"=>\"Gorj\",\"Craiova\"=>\"Dolj\",\"Slatina\"=>\"Olt\",\"Pitesti\"=>\"Arges\",\"Alexandria\"=>\"Teleorman\",\"Ploiesti\"=>\"Prahova\",\"Slobozia\"=>\"Ialomita\");\r\n\t\t\t\t\t\tif(in_array($db->f('cat_name'),$array_jud_res))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$resedinta = array_keys($array_jud_res, $db->f('cat_name')); \r\n\t\t\t\t\t\t\t$res = $resedinta[0];\r\n\t\t\t\t\t\t\t$get_tags_n_title['title'] = $get_tags_n_title['title'].' '.$res.' - '.$db->f('cat_name');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$get_tags_n_title['title'] = $get_tags_n_title['title'].' '.$db->f('cat_name');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'detalii':\r\n\t\t\t\t\t\r\n\t\t\t\t\t$query = \"SELECT nume_firma, meta_keywords, meta_description,category_id,judet,nume_loc_sector\r\n\t\t\t\t\t\t\t\t\t\tFROM cabinete WHERE id = '\".intval($param1).\"'\";\r\n\t\t\t\t\t$db->query($query);\r\n\t\t\t\t\t$db->next_record();\r\n\t\t\t\t\t$nume_firma = ucfirst($db->f('nume_firma'));\r\n\t\t\t\t\t$id_category = $db->f('category_id');\r\n\t\t\t\t\t$get_tags_n_title['description'] = $db->f('meta_description');\r\n\t\t\t\t\t$get_tags_n_title['keywords'] = $db->f('meta_keywords');\r\n\t\t\t\t\t$bigcat_id = $db->f('category_id');\r\n\t\t\t\t\t$localitate_id = $db->f('nume_loc_sector');\r\n\t\t\t\t\t$judet = GetJudetName($db->f('judet'));\r\n\t\t\t\t\t$localitate_name = GetLocalitate($localitate_id );\r\n\t\t\t\t\t$loc_name = $localitate_name['name'];\r\n\t\t\t\t\tif(strtolower($judet)!=strtolower($loc_name ))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$judet = $loc_name.\"- \".$judet;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\t$section = 'cabinete.'.intval($bigcat_id);\r\n\t\t\t\t\t$big_catname = $modules->module[$section]['name'];\r\n\r\n\t\t\t\t\tswitch($id_category )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase '1':\r\n\t\t\t\t\t\t$part_of_title=\", Cabinet Stomatologic\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase '5':\r\n\t\t\t\t\t\t\t$part_of_title=\", Clinica Stomatologica\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase '2':\r\n\t\t\t\t\t\t\t$part_of_title=\", Laborator tehnica dentara\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase '4':\r\n\t\t\t\t\t\t\t$part_of_title=\", Distribuitor materiale\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase '3':\r\n\t\t\t\t\t\t\t$part_of_title=\", Laborator Radiologie dentara \";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(stripos($nume_firma,$big_catname)!==FALSE)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$get_tags_n_title['title'] = $nume_firma.$part_of_title.\" \".$judet;\r\n\t\t\t\t\t} \r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$get_tags_n_title['title'] = $nume_firma.$part_of_title.\" \".$judet;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tbreak;\r\n\t\tcase 'articole-medicale':\r\n\t\t\tswitch ($action)\r\n\t\t\t{\r\n\t\t\t\tdefault :\r\n\t\t\t\t\t$section = $module;\r\n\t\t\t\t\t$get_tags_n_title['title'] = $modules->module[$section]['name'];\r\n\t\t\t\t\t$get_tags_n_title['description'] = $modules->module[$section]['meta_description'];\r\n\t\t\t\t\t$get_tags_n_title['keywords'] = $modules->module[$section]['meta_keywords'];\r\n\t\t\t\t\t$get_tags_n_title['content'] = $modules->module[$section]['content'];\r\n\t\t\t\t\t#get the name of the category, if there is one\r\n\t\t\t\t\tif ($param1 != \"\" && intval($param1))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$query = \"SELECT cat_name,meta_description,meta_keywords FROM articles_categories\r\n\t\t\t\t\t\t\t\t\t\t\tWHERE id_cat = '\".intval($param1).\"'\";\r\n\t\t\t\t\t\t$db->query($query);\r\n\t\t\t\t\t\t$db->next_record();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$get_tags_n_title['description'] = $db->f('meta_description');\r\n\t\t\t\t\t$get_tags_n_title['keywords'] = $db->f('meta_keywords');\r\n\t\t\t\t\t$get_tags_n_title['title'] = $db->f('cat_name').'- '.$get_tags_n_title['title'];\r\n\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'detalii':\r\n\t\t\t\t\t\r\n\t\t\t\t\t$query = \"SELECT titlu, meta_keywords, meta_description \r\n\t\t\t\t\t\t\t\t\t\tFROM articles WHERE id = '\".intval($param1).\"'\";\r\n\t\t\t\t\t$db->query($query);\r\n\t\t\t\t\t$db->next_record();\r\n\t\t\t\t\t$nume_firma = ucfirst($db->f('titlu'));\r\n\t\t\t\t\t$id_category = $db->f('bigcat_id');\r\n\t\t\t\t\t$get_tags_n_title['description'] = $db->f('meta_description');\r\n\t\t\t\t\t$get_tags_n_title['keywords'] = $db->f('meta_keywords');\r\n\t\t\t\t\t$get_tags_n_title['title'] = $nume_firma;\r\n\t\t\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tbreak;\r\n\r\n\t\tcase 'links':\r\n\t\t\t\t\t$section = $module.'.'.$action;\r\n\t\t\t\t\t$get_tags_n_title['title'] = $modules->module[$section]['name'];\r\n\t\t\t\t\t$get_tags_n_title['description'] = $modules->module[$section]['meta_description'];\r\n\t\t\t\t\t$get_tags_n_title['keywords'] = $modules->module[$section]['meta_keywords'];\r\n\t\t\t\t\t$get_tags_n_title['content'] = $modules->module[$section]['content'];\r\n\t\tbreak;\r\n\t\r\n\t\tcase 'pagina':\r\n\t\t\t$section = $module.'.'.$action;\r\n\t\t\t$get_tags_n_title['title'] = $modules->module[$section]['name'];\r\n\t\t\t$get_tags_n_title['description'] = $modules->module[$section]['meta_description'];\r\n\t\t\t$get_tags_n_title['keywords'] = $modules->module[$section]['meta_keywords'];\r\n\t\t\t$get_tags_n_title['content'] = $modules->module[$section]['content'];\r\n\t\tbreak;\r\n\t\r\n\tcase 'anunturi':\r\n\t\tswitch ($action)\r\n\t\t\t{\r\n\t\t\t\tdefault :\r\n\t\t\t\t\t#get the name of the parent module\r\n\t\t\t\t\t$link = $module;\r\n\t\t\t\t\tif(isset($action)&&($action!=\"\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$link = $module.'.'.$action;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$section = $link;\r\n\t\t\t\t\t//echo $section;\r\n\t\t\t\t\t$get_tags_n_title['title'] = ucwords($modules->module[$section]['name']);\r\n\t\t\t\t\t$get_tags_n_title['description'] = $modules->module[$section]['meta_description'];\r\n\t\t\t\t\t$get_tags_n_title['keywords'] = $modules->module[$section]['meta_keywords'];\r\n\t\t\t\t\t$get_tags_n_title['content'] = $modules->module[$section]['content'];\r\n\t\t\t\t\t#get the name of the category, if there is one\r\n\t\t\t\t\tif ($param1 != \"\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$get_tags_n_title['title'] = ucwords($get_tags_n_title['title'].' '.GetJudetName($param1));\r\n\t\t\t\t\t\t$get_tags_n_title['description'] = $get_tags_n_title['description'].\" \".GetJudetName($param1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($action==\"trimitemail\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$get_tags_n_title['title'] = ucfirst($module).' - '.\"Trimite email\";\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'detalii':\r\n\t\t\t\t\t$query = \"SELECT titlu, meta_keywords, meta_description\r\n\t\t\t\t\t\t\t\t\t\tFROM anunturi WHERE id = '\".intval($param1).\"'\";\r\n\t\t\t\t\t$db->query($query);\r\n\t\t\t\t\t$db->next_record();\r\n\t\t\t\t\t$get_tags_n_title['title'] = ucfirst($db->f('titlu'));\r\n\t\t\t\t\t$get_tags_n_title['description'] = $db->f('meta_description');\r\n\t\t\t\t\t$get_tags_n_title['keywords'] = $db->f('meta_keywords');\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\tbreak;\r\n\t\r\n\t\r\n\t\tcase 'dictionar_stomatologic':\r\n\t\t\t\r\n\t\tswitch($action)\r\n\t\t{\r\n\t\t\tdefault:\r\n\t\t\t\t\t$section = $module;\r\n\t\t\t\t\t$get_tags_n_title['title'] = $modules->module[$section]['name'];\r\n\t\t\t\t\t$get_tags_n_title['description'] = $modules->module[$section]['meta_description'];\r\n\t\t\t\t\t$get_tags_n_title['keywords'] = $modules->module[$section]['meta_keywords'];\r\n\t\t\t\t\t$get_tags_n_title['content'] = $modules->module[$section]['content'];\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'litera':\r\n\t\t\t$param1 = substr($param1,-1);\t\t\r\n\t\t\t$query = \"SELECT cat_name, meta_keywords, meta_description\r\n\t\t\t\t\t\t\t\t\t\tFROM dictionary_categories WHERE alias = '\".$param1.\"'\";\r\n\t\t\t\t\t$db->query($query);\r\n\t\t\t\t\t$db->next_record();\r\n\t\t\t\t\t$get_tags_n_title['title'] = \"Termeni medicali litera \".ucfirst($db->f('cat_name')).\", definitii, explicatii stomatologice\";\r\n\t\t\t\t\t$get_tags_n_title['description'] = $db->f('meta_description');\r\n\t\t\t\t\t$get_tags_n_title['keywords'] = $db->f('meta_keywords');\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 'term_details':\r\n\t\t\t\t$query = \"SELECT titlu, meta_keywords, meta_description\r\n\t\t\t\t\t\t\t\t\t\tFROM dictionary WHERE id = '\".$param1.\"'\";\r\n\t\t\t\t\t$db->query($query);\r\n\t\t\t\t\t$db->next_record();\r\n\t\t\t\t\t$get_tags_n_title['title'] = ucfirst($db->f('titlu')).\", termen medical, definitii, explicatii\";\r\n\t\t\t\t\t$get_tags_n_title['description'] = $db->f('meta_description');\r\n\t\t\t\t\t$get_tags_n_title['keywords'] = $db->f('meta_keywords');\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tbreak;\r\n\r\n\t\t\r\n\t\t\tcase 'news':\r\n\t\t\t\t\tif(!isset($action)||($action==''))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$section = $module;\r\n\t\t\t\t\t\t\t$get_tags_n_title['title'] = $modules->module[$section]['name'];\r\n\t\t\t\t\t\t\t$get_tags_n_title['description'] = $modules->module[$section]['meta_description'];\r\n\t\t\t\t\t\t\t$get_tags_n_title['keywords'] = $modules->module[$section]['meta_keywords'];\r\n\t\t\t\t\t\t\t$get_tags_n_title['content'] = $modules->module[$section]['content'];\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$query = \"SELECT title, meta_keywords, meta_description\r\n\t\t\t\t\t\t\t\t\t\t\tFROM news WHERE id = '\".$param1.\"'\";\r\n\t\t\t\t\t\t$db->query($query);\r\n\t\t\t\t\t\t$db->next_record();\r\n\t\t\t\t\t\t$get_tags_n_title['title'] = ucfirst($db->f('title'));\r\n\t\t\t\t\t\t$get_tags_n_title['description'] = $db->f('meta_description');\r\n\t\t\t\t \t$get_tags_n_title['keywords'] = $db->f('meta_keywords');\r\n\t\t\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n\t\r\n\treturn $get_tags_n_title;\r\n}", "title": "" } ]
[ { "docid": "16d5a52ff46fedff00d399eb92a829c8", "score": "0.71852684", "text": "function getPageTitleAndMetaData()\n\t {\n\t \t$data['page_title'] \t\t\t= $this->config->item('site_title');\n\t\t$data['meta_keywords']\t\t\t= 'Outsource your projects to freelance programmers and designers at cheap prices. ';\n\t\t$data['meta_description']\t\t= 'Outsource your projects to freelance programmers and designers at cheap prices. Freelancers will compete for your business. Get programming done for your site in php, mysql, xml, perl/cgi, javascript, asp, plus web design, search engine optimization, marketing, writing, job listings and so much more.';\t\n\t\t\n\t\treturn $data;\n\t }", "title": "" }, { "docid": "7924846972e557964c6559b534b387a1", "score": "0.7136247", "text": "public static function getMetaData($pageTitle) {\n $split_pageTitle = explode(' - ', $pageTitle);\n $split_pageTitle2 = explode(' ', $split_pageTitle[1]);\n $split_pageTitle2[0];\n\n if ($split_pageTitle2[0] == 'home') {\n $desc = 'this is home page..';\n $keyword = \"\";\n }\n \n $data['desc'] = $desc;\n $data['keyword'] = $keyword;\n return $data;\n }", "title": "" }, { "docid": "c1542d95ad7f752be4b65455a6dfd1c5", "score": "0.67432034", "text": "protected function setMetaTags($pageUrl = '', $title = '', $description = '', $keywords = '') {\n\n if (!empty($pageUrl)) {\n\n $this->setPageUrl($pageUrl);\n\n // getting list of api custom data (url, metatags, etc.)\n $arrCustomData = $this->getCustomUrlTitles();\n }\n\n // setting the title of section (page)\n if (!empty($title)) {\n\n // get title from request?\n $this->title = urldecode($title);\n\n\n if ($this->charset != Yii::app()->charset) {\n\n // 24-04-2013 Korepanova add //IGNORE to avoiid FALSE result og iconv\n $this->title = iconv($this->charset, Yii::app()->charset . \"//IGNORE\", $this->title);\n }\n } elseif ($arrCustomData) {\n\n // get title from api by page url?\n $this->title = $arrCustomData[0]['title'];\n }\n\n // setting the keywords (SEO) of section (page)\n if (!empty($keywords)) {\n\n // get keywords from request?\n $this->keywords = urldecode($keywords);\n\n if ($this->charset != Yii::app()->charset) {\n\n // 24-04-2013 Korepanova add //IGNORE to avoiid FALSE result og iconv\n $this->keywords = iconv($this->charset, Yii::app()->charset . \"//IGNORE\", $this->keywords);\n }\n } elseif ($arrCustomData) {\n\n // get keywords from api by page url?\n $seoKeywords = $arrCustomData[0]['keywords'];\n }\n\n // setting the description (SEO) of section (page)\n if (!empty($description)) {\n\n // get description from request?\n $this->description = urldecode($description);\n\n if ($this->charset != Yii::app()->charset) {\n\n // 24-04-2013 Korepanova add //IGNORE to avoiid FALSE result og iconv\n $this->description = iconv($charset, Yii::app()->charset . \"//IGNORE\", $this->description);\n }\n } elseif ($arrCustomData) {\n // get description from api by page url?\n $this->description = $arrCustomData[0]['description'];\n }\n }", "title": "" }, { "docid": "3a425cbf525bfab4d170d3562f9f8f6a", "score": "0.6685955", "text": "public function getPageDescription();", "title": "" }, { "docid": "412a264db8f56471d6f56a4fa77a91c3", "score": "0.6680682", "text": "private function parsePage()\n {\n if (!class_exists('DOMDocument')) {\n return;\n }\n\n $html = $this->getURL($this->__url);\n $metadata = array();\n\n // parsing begins here\n if ($this->__encoding == null || $this->__encoding == 'utf8') {\n $html = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8');\n }\n\n $doc = new DOMDocument();\n if (!@$doc->loadHTML($html)) {\n return;\n }\n $nodes = $doc->getElementsByTagName('title');\n\n // get title & other meta\n $metadata['title'] = $nodes->item(0)->nodeValue;\n $metas = $doc->getElementsByTagName('meta');\n\n for ($i = 0; $i < $metas->length; $i++) {\n $meta = $metas->item($i);\n\n if ($meta->getAttribute('name') == 'description') {\n $metadata['description'] = $meta->getAttribute('content');\n }\n\n if ($this->__encoding === null\n && strtolower($meta->getAttribute('http-equiv')) == 'content-type'\n && $this->processContentType($meta->getAttribute('content'))\n ) {\n return $this->parsePage();\n }\n }\n\n array_walk($metadata, array($this, 'stripStr'));\n\n $this->title = ($metadata['title'] !== null) ? $metadata['title'] : null;\n $this->description = (isset($metadata['description']) && $metadata['description'] !== null)\n ? $metadata['description'] : null;\n }", "title": "" }, { "docid": "6b5d7c365cafc37ce8af04bdbb9926ac", "score": "0.6429899", "text": "private function getMeta() {\n $metadata = array(\n 'title' => 'Explore', \n 'desc' => 'Request URL: ' . Config::get('app.api_url'), \n 'meta' => array( \n 'title' => 'Explore | Seeties', \n 'description' => 'Sample meta description' \n ),\n 'sidebar' => View::make('explore.sidebar')\n );\n\n return $metadata;\n }", "title": "" }, { "docid": "732da39a2a39b09270f302351367518b", "score": "0.63510394", "text": "public function PageKeywords()\n {\n return $this->app['cms']->page_keywords(false);\n }", "title": "" }, { "docid": "1e965955e104db4924e4c9f73dbaff6f", "score": "0.6332753", "text": "protected function get_general_metadata() {\n\t\treturn \\the_seo_framework()->the_description();\n\t}", "title": "" }, { "docid": "8362e8d70e5bf9d1fb5f66b792b850f7", "score": "0.6322651", "text": "protected function getMetaTags(){\n\t\tglobal $metatags, $pageobject, $settings;\n\t\t$tags = '<title>'.$metatags->title.'</title>'.PHP_EOL;\n\t\t$tags .= '<meta name=\"description\" content=\"'.$metatags->description.'\" />'.PHP_EOL;\n\t\t$tags .= '<meta name=\"keywords\" content=\"'.$metatags->keywords.'\" />'.PHP_EOL;\n\t\t$tags .= '<meta property=\"og:title\" content=\"'.$metatags->title.'\" />'.PHP_EOL;\n\t\t$tags .= '<meta property=\"og:type\" content=\"website\" />'.PHP_EOL;\n\t\tif(!empty($settings->fbsitelogo)) $tags .= '<meta property=\"og:image\" content=\"'.$metatags->fbsitelogo.'\" />'.PHP_EOL;\n\t\t$tags .= '<meta property=\"og:site_name\" content=\"'.$settings->sitename.'\" />'.PHP_EOL;\n\t\tif(!empty($settings->fbappid)) $tags .= '<meta property=\"fb:app_id\" content=\"'.$settings->fbappid.'\" />'.PHP_EOL;\n\t\tif($settings->islivesite){\n\t\t\t$tags = '<meta name=\"robots\" content=\"index, follow, all\" />'.PHP_EOL;\n\t\t\tif(!empty($settings->googleverification)) $tags .= '<meta name=\"google-site-verification\" content=\"'.$settings->googleverification.'\" />'.PHP_EOL;\n\t\t\tif(!empty($settings->bingverification)) $tags .= '<meta name=\"msvalidate.01\" content=\"'.$settings->bingverification.'\" />'.PHP_EOL;\n\t\t}else{\n\t\t\t$tags .= '<meta name=\"robots\" content=\"noindex, nofollow\" />'.PHP_EOL;\n\t\t}\n\t\treturn $tags;\n\t}", "title": "" }, { "docid": "f016ed24fba684140306dfa361298905", "score": "0.62993944", "text": "function getMetaDetails($url)\n\t{\n\t\t$ch = curl_init(); //Initializing Curl\n\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\n\t\t$html = curl_exec($ch); //Executing CURL\n\t\tcurl_close($ch); // Closing Curl\n\t\t\n\t\t// Starting of Parsing \n\t\t$doc = new DOMDocument(); //creating New Dom Document\n\t\t@$doc->loadHTML($html); // Loading HTML Source in docs\n\t\t$nodes = $doc->getElementsByTagName('title'); // Fetching the attributes of Title Tags \n\t\t$metaDetails = [];\n\t\t//Putting Details into a variable\n\t\t$metaDetails['title'] = $nodes->item(0)->nodeValue; // Fetching title \n\t\t\n\t\t$metas = $doc->getElementsByTagName('meta'); //getting Elements with the tags meta\n\t\t// Seperating meta description and meta keyword with each other with running a loop.\n\t\tfor ($i = 0; $i < $metas->length; $i++) \n\t\t{\n\t\t\t$meta = $metas->item($i);\n\t\t\tif($meta->getAttribute('name') == 'description') //Fetching description Attribute\n\t\t\t$metaDetails['description'] = $meta->getAttribute('content'); //Fetching meta description\n\t\t\tif($meta->getAttribute('name') == 'keywords') //Fetching attributes with the Attribute \"keywords\" \n\t\t\t$metaDetails['keywords'] = $meta->getAttribute('content'); // Loading keyword content into a variable\n\t\t}\n\t\t\n\t\treturn $metaDetails; // Returning meta detail array\n\t}", "title": "" }, { "docid": "d2056edf8a9bbfa294c0b97c29b489b9", "score": "0.62907416", "text": "function getSiteMeta($grabbedHTML){\n\t\t\n\t\t$html = new DOMDocument();\n\t\tlibxml_use_internal_errors(true);\n\t\t$html->loadHTML($grabbedHTML);\n\t\tlibxml_use_internal_errors(false);\n\t\t$xpath = new DOMXPath( $html );\n\t\t$htmlInfo = array();\n\t\t$langs = $xpath->query( '//html' );\n\t\tforeach ($langs as $lang) {\n\t\t\t$htmlInfo['language'] = $lang->getAttribute('lang');\n\t\t}\n\t\t$metas = $xpath->query( '//meta' );\t\t\n\t\tforeach ($metas as $meta) {\n\t\t\tif ($meta->getAttribute('name')){\n\t\t\t\t$htmlInfo[$meta->getAttribute('name')] = $meta->getAttribute('content');\n\t\t\t}\n\t\t}\n\t\t\n\t\t$favicon = $xpath->query(\"//link[@rel='shortcut icon']\");\n\t\tif(!empty($favicon)){\n\t\t\tforeach($favicon as $fav){\n\t\t\t\t$htmlInfo[$fav->getAttribute(\"rel\")] = $fav->getAttribute(\"href\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t$title = $xpath->query(\"//title\");\n\t\tforeach ($title as $tit){\n\t\t\t$htmlInfo[\"titleText\"] = $tit->textContent;\n\t\t}\n\t\t\n\t\t$htmlInfo = array_change_key_case($htmlInfo, CASE_LOWER);\n\t\t\n\t\t$onlyText = $this->stripHtmlTags($grabbedHTML);\n\t\t\n\t\tif(!empty($onlyText)){\n\t\t\t$onlyText = array(trim($onlyText));\n\t\t\t\n\t\t\t$count = $this->getWordCounts($onlyText);\n\t\t\t\n\t\t\t$grammar = array(\"a\"=>\"\", \"an\"=>\"\", \"the\"=>\"\", \"shall\"=>\"\", \"should\"=>\"\", \"can\"=>\"\", \"could\"=>\"\",\n\t\t\t\t\t\"will\"=>\"\", \"would\"=>\"\", \"am\"=>\"\", \"is\"=>\"\", \"are\"=>\"\", \"we\"=>\"\", \"us\"=>\"\", \"has\"=>\"\",\n\t\t\t\t\t\"have\"=>\"\", \"had\"=>\"\", \"not\"=>\"\", \"yes\"=>\"\", \"no\"=>\"\", \"true\"=>\"\", \"false\"=>\"\", \"with\"=>\"\",\n\t\t\t\t\t\"to\"=>\"\", \"your\"=>\"\", \"more\"=>\"\", \"and\"=>\"\", \"in\"=>\"\", \"out\"=>\"\", \"login\"=>\"\", \"logout\"=>\"\",\n\t\t\t\t\t\"sign\"=>\"\", \"up\"=>\"\", \"coming\"=>\"\", \"going\"=>\"\", \"now\"=>\"\", \"then\"=>\"\", \"about\"=>\"\",\n\t\t\t\t\t\"contact\"=>\"\", \"my\"=>\"\", \"you\"=>\"\", \"go\"=>\"\", \"close\"=>\"\", \"\"=>\"\", \"of\"=>\"\", \"our\"=>\"\");\n\t\t\t\n\t\t\t$count = array_diff_key($count, $grammar);\n\t\t\t\n\t\t\tarsort($count, SORT_DESC | SORT_NUMERIC);\n\t\t\t\n\t\t\t$htmlInfo[\"wordCount\"] = $count;\n\t\t\t$htmlInfo[\"wordCountMax\"] = array_slice($count, 0, 5, true);\n\t\t}\n\t\t\n\t\tif(!empty($htmlInfo[\"wordCount\"]) && !empty($htmlInfo[\"keywords\"])){\n\t\t\t$htmlInfo[\"compareMetaKeywords\"] = $this->compareMetaWithContent(array_keys($htmlInfo[\"wordCount\"]), $htmlInfo[\"keywords\"]);\n\t\t}\n\t\t\n\t\t$h1headings = $xpath->query(\"//h1\");\n\t\t$index = 0;\n\t\tforeach ($h1headings as $h1h){\n\t\t\t$htmlInfo[\"h1\"][$index] = trim(strip_tags($h1h->textContent));\n\t\t\t$index++;\n\t\t}\n\t\t\n\t\t$h2headings = $xpath->query(\"//h2\");\n\t\t$index = 0;\n\t\tforeach ($h2headings as $h2h){\n\t\t\t$htmlInfo[\"h2\"][$index] = trim(strip_tags($h2h->textContent));\n\t\t\t$index++;\n\t\t}\n\t\t\n\t\t$htmlInfo[\"robots\"] = $this->checkForFiles(\"robots.txt\");\n\t\t$htmlInfo[\"sitemap\"] = $this->checkForFiles(\"sitemap.xml\");\n\t\t\n\t\t$htmlInfo[\"brokenLinkCount\"] = 0;\n\t\t$anchors = $xpath->query(\"//a\");\n\t\tif(!empty($anchors)){\n// \t\t\t$htmlInfo[\"brokenLinkCount\"] = $this->getBrokenLinkCount($anchors);\n\t\t}\n\t\t\n\t\t$htmlInfo[\"images\"] = array();\n\t\t$imgs = $xpath->query(\"//img\");\n\t\tif(!empty($imgs)){\n\t\t\t$htmlInfo[\"images\"] = $this->imageAltText($imgs);\n\t\t}\n\t\t\n\t\t$htmlInfo[\"googleAnalytics\"] = $this->findGoogleAnalytics($grabbedHTML);\n\t\t\n\t\t$htmlInfo[\"pageLoadTime\"] = $this->getPageLoadTime();\n\t\t\n\t\t$htmlInfo[\"flashTest\"] = FALSE;\n\t\t$flashExists = $xpath->query(\"//embed[@type='application/x-shockwave-flash']\");\n\t\tif($flashExists->length !== 0){\n\t\t\t$htmlInfo[\"flashTest\"] = TRUE;\n\t\t}\n\t\t\n\t\t$htmlInfo[\"frameTest\"] = FALSE;\n\t\t$frameExists = $xpath->query(\"//frameset\");\n\t\tif($frameExists->length !== 0){\n\t\t\t$htmlInfo[\"frameTest\"] = TRUE;\n\t\t}\n\t\t\n\t\t$htmlInfo[\"css\"] = array();\n\t\t$cssExists = $xpath->query(\"//link[@rel='stylesheet']\");\n\t\t$htmlInfo[\"css\"] = array_merge ($htmlInfo[\"css\"], $this->cssFinder($cssExists));\n\t\t\n\t\t$htmlInfo[\"js\"] = array();\n\t\t$jsExists = $xpath->query(\"//script[contains(@src, '.js')]\");\n\t\t$htmlInfo[\"js\"] = array_merge ($htmlInfo[\"js\"], $this->jsFinder($jsExists));\n\t\t\n\t\treturn $htmlInfo;\n\t}", "title": "" }, { "docid": "70f70b1772ebd20d920b1fbf4ddddadd", "score": "0.62418085", "text": "function metadata(){\r\n\t\tglobal $mainframe;\r\n\t\t$mainframe->setPageTitle( ' '. $this->gallery->get('name') );\r\n\t\t$mainframe->appendMetaTag( 'description', $this->gallery->get('description') );\r\n\t}", "title": "" }, { "docid": "6e46546da92546ac97613a5e6756d77b", "score": "0.62198734", "text": "public function getTitles();", "title": "" }, { "docid": "a94d6d3a9905e2befc7da63897f52176", "score": "0.6217427", "text": "function getpages(){\n \t\n }", "title": "" }, { "docid": "4c1b427a1f6b0034f30fd395f5637709", "score": "0.6197555", "text": "public function getMetaTitle();", "title": "" }, { "docid": "df04ba2e54d4424ec1c327662699642f", "score": "0.6189023", "text": "function extract_keywords ($page)\n{\n\t$page = strtolower($page); // make lowercase\n\t$page = str_replace('\t',' ',$page); // change tabs to spaces\n\t$page = str_replace(' ',' ',$page); // change two spaces to one\n\t$page = str_replace(\"'\",'\"',$page); //change single quotes to dubl\n\t$page = str_replace(\tarray(\t'< ',' >',' =','= ','\" ',' \"'),\n\tarray('<','>','=','=','\"','\"'),\n\t$page); // squeeze out crufty stuff\n\t$pos = 0; $len = strlen($page); $keywords = '';\n\twhile ($pos<$len)\n\t{\n\t\t//echo \"$pos $len <br>\";\n\t\t$mpos = strpos ($page,'<meta ',$pos);\n\t\tif ($mpos===false) break;\n\t\t$mpos += strlen('<meta ');\n\t\t$epos = strpos ($page,'>',$mpos);\n\t\tif ($epos===false) break;\n\t\t$metatag = substr($page,$mpos,$epos-$mpos);\n\t\t$npos1 = strpos ($metatag,'name=\"');\n\t\t$npos2 = strpos ($metatag,'\"',$npos1+strlen('name=\"'));\n\t\tif (($npos1!==false)&&($npos2!==false))\n\t\t{\n\t\t\t$npos1 += strlen('name=\"');\n\t\t\t$cpos1 = strpos ($metatag,'content=\"',$npos2);\n\t\t\t$cpos2 = strpos ($metatag, '\"',$cpos1+strlen('content=\"'));\n\t\t\tif (($cpos1!==false)&&($cpos2!==false))\n\t\t\t{\n\t\t\t\t$cpos1 += strlen('content=\"');\n\t\t\t\t$nameval = substr($metatag,$npos1,$npos2-$npos1);\n\t\t\t\t$contentval = substr($metatag,$cpos1,$cpos2-$cpos1);\n\t\t\t\tif ($nameval=='keywords') $keywords .= \"$contentval,\";\n\t\t\t\tif ($nameval=='dc.subject.mesh') {\n\t\t\t\t\t// add this mesh if its not already there\n\t\t\t\t\tif (strpos($keywords,$contentval)===false)\n\t\t\t\t\t$keywords.=\"$contentval,\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//echo \"$metatag <br>\";\n\t\t$pos = $epos + 1;\n\t}\n\t$keywords .= 'medcommons, personal health records, phr';\n\treturn $keywords;\n}", "title": "" }, { "docid": "652e50dc79aa9e77b8379655a2f4cea0", "score": "0.6157759", "text": "abstract public function get_title_detailed();", "title": "" }, { "docid": "7ba3e337211c52804bf951ce093cf883", "score": "0.61549085", "text": "public function preparePageInformation()\n {\n $helper = Mage::helper('digitaldata');\n\n // Get head block in order to get page title\n $name = false;\n $headBlock = $this->getLayout()->getBlock('head');\n if ($headBlock) {\n if ($headBlock->getTitle()) {\n $name = $headBlock->getTitle();\n }\n }\n\n // if page is a cms one, retrieve page identifier\n $pageId = false;\n $currentCmsPage = Mage::getSingleton('cms/page');\n if ($currentCmsPage) {\n $pageId = $currentCmsPage->getIdentifier();\n }\n\n // prepare useful page information\n $this->_page = array();\n $this->_page['pageInfo'] = array(\n 'pageID' => $pageId ? $pageId : null,\n 'pageName' => $name ? $name : null,\n 'destinationURL' => $this->getPageInstanceId(),\n 'referringURL' => Mage::helper('core/http')->getHttpReferer(),\n 'breadCrumbs' => $helper->getPageBreadcrumb(),\n 'language' => Mage::app()->getLocale()->getLocaleCode(),\n 'geoRegion' => Mage::getStoreConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_COUNTRY),\n\n // this part is specific to SmartFocus Advisor product\n 'contentOrigin' => self::CONTENT_ORIGIN, // Magento store\n 'stores' => Mage::app()->getStore()->getId(), // store where user is now\n 'version' => $this->getMageVersion(), // Magento version\n );\n\n // retrieve all category information\n $this->_page['category'] = $this->getProductCategories();\n // page type\n $this->_page['category']['pageType'] = $helper->getPageType();\n }", "title": "" }, { "docid": "9fdd8a30cd5749cb488b9d5778a83338", "score": "0.6154842", "text": "public function pageTitle();", "title": "" }, { "docid": "2a8d48816b51a76999060107b679289d", "score": "0.61406165", "text": "public function getPageTitle();", "title": "" }, { "docid": "756788f77c5ef94d4de24c9a5e6ef62d", "score": "0.61135286", "text": "abstract public function getMetaTags ();", "title": "" }, { "docid": "aa12c1b57fb0ce8ad9824e4e5febc0e3", "score": "0.61021507", "text": "function setMetas($pageTitle = '', $metaDescription = '', $metaKeywords = '')\r\n\t{\r\n\t\tglobal $xoTheme, $xoTheme, $xoopsTpl;\r\n\t\t$xoopsTpl->assign('xoops_pagetitle', $pageTitle);\r\n\t\tif(isset($xoTheme) && is_object($xoTheme)) {\r\n\t\t\tif(!empty($metaKeywords)) {\r\n\t\t\t\t$xoTheme->addMeta( 'meta', 'keywords', $metaKeywords);\r\n\t\t\t}\r\n\t\t\tif(!empty($metaDescription)) {\r\n\t\t\t\t$xoTheme->addMeta( 'meta', 'description', $metaDescription);\r\n\t\t\t}\r\n\t\t} elseif(isset($xoopsTpl) && is_object($xoopsTpl)) {\t// Compatibility for old Xoops versions\r\n\t\t\tif(!empty($metaKeywords)) {\r\n\t\t\t\t$xoopsTpl->assign('xoops_meta_keywords', $metaKeywords);\r\n\t\t\t}\r\n\t\t\tif(!empty($metaDescription)) {\r\n\t\t\t\t$xoopsTpl->assign('xoops_meta_description', $metaDescription);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "757dd8654daa3640989dbb73e723d09b", "score": "0.609554", "text": "public function initMetaTags() {\n if ($this->metaTagsIsInited) {\n return;\n }\n\n $this->metaTagsIsInited = true;\n $page = $this->getActivePage();\n if (!$page) {\n return;\n }\n\n $keywords = $page->getKeywords();\n if (!empty($keywords)) {\n \\yii::$app->view->registerMetaTag([\n 'name' => 'keywords',\n 'content' => implode(', ', $keywords)\n ]);\n }\n\n $title = $page->getTitle();\n if (!empty($title)) {\n \\yii::$app->view->title = $title;\n }\n\n $description = $page->getDescription();\n if (!empty($description)) {\n \\yii::$app->view->registerMetaTag(['name' => 'description', 'content' => $description]);\n }\n\n if ($page->getNoIndex()) {\n \\yii::$app->view->registerMetaTag([\n 'name' => 'robots',\n 'content' => 'noindex,nofollow'\n ]);\n }\n }", "title": "" }, { "docid": "eaa88f879a93d27c49a57f912dd789e6", "score": "0.60939276", "text": "public function getMetaKeywords(){\n \t//Setup Meta Class\n \treturn $this->meta->getKeywords();\n }", "title": "" }, { "docid": "d9987137664b3adbef126add23eb13fe", "score": "0.60930973", "text": "protected abstract function getPageContent();", "title": "" }, { "docid": "c9c6bb224f0c36908cfabc7300220e32", "score": "0.6074322", "text": "protected function getPageTitle() {}", "title": "" }, { "docid": "69c6bef94d0b63a781f0bd38ccba6691", "score": "0.60691106", "text": "public function _init_meta()\n {\n //genera variables META para pagina actual\n $val['descripcion'] = \"iSalas\";\n $val['keywords'] = \"Sala Virtual\";\n $meta = init_meta($val);\n return $meta; \n }", "title": "" }, { "docid": "57bcaa3ad9c44670a65d32e58fee4ad3", "score": "0.60641897", "text": "function crawl_details($url){\r\n //context options\r\n $options = array('http'=>array('method'=>\"GET\", 'headers'=>\"User-Agent: janstaffa.cz\"));\r\n $context = stream_context_create($options);\r\n \r\n //create DOMDocument from url(seed)\r\n $doc = new DOMDocument();\r\n @$doc->loadHTML(@file_get_contents($url, false, $context));\r\n \r\n //get the value of 'title'\r\n $title = $doc->getElementsByTagName(\"title\");\r\n $title = $title->item(0)->nodeValue;\r\n \r\n //get description, keywords from metas\r\n $description = \"\";\r\n $keywords = \"\";\r\n $metas = $doc->getElementsByTagName(\"meta\");\r\n for($i=0;$i<$metas->length;$i++){\r\n $meta = $metas->item($i);\r\n \r\n if($meta->getAttribute(\"name\") == strtolower(\"description\")){\r\n $description = $meta->getAttribute(\"content\");\r\n }\r\n if($meta->getAttribute(\"name\") == strtolower(\"keywords\")){\r\n $keywords = $meta->getAttribute(\"content\");\r\n }\r\n }\r\n \r\n //return object with values\r\n return '{\"Title\": \"'.str_replace(\"\\n\", \"\", $title).'\", \"Description\": \"'.str_replace(\"\\n\", \"\", $description).'\", \"Keywords\": \"'.str_replace(\"\\n\", \"\", $keywords).'\", \"URL\": \"'.$url.'\"}';\r\n }", "title": "" }, { "docid": "156cfcffe130adb6b2009895ea714d7e", "score": "0.60637623", "text": "function fetchMeta($url = '')\n{\n if (!$url) return false;\n\n // check whether we have http at the zero position of the string\n if (strpos($url, 'http://') !== 0 && strpos($url, 'https://') !== 0) $url = 'http://' . $url; \n\n $fp = @fopen( $url, 'r' );\n\n if (!$fp) return false;\n\n $content = '';\n\n while( !feof( $fp ) ) {\n $buffer = trim( fgets( $fp, 4096 ) );\n $content .= $buffer;\n }\n\n $start = '<title>';\n $end = '<\\/title>';\n\n preg_match( \"/$start(.*)$end/s\", $content, $match );\n $title = isset($match) ? $match[1] : ''; \n\n $metatagarray = get_meta_tags( $url );\n\n $keywords = isset($metatagarray[ \"keywords\" ]) ? $metatagarray[ \"keywords\" ] : '';\n $description = isset($metatagarray[ \"description\" ]) ? $metatagarray[ \"description\" ] : '';\n\n return array('title' => $title, 'keywords' => $keywords, 'description' => $description);\n}", "title": "" }, { "docid": "4b16820a042103a8e262484b812099c3", "score": "0.6062799", "text": "public function meta()\n {\n // Start out with our defaults\n $title = $this->_config[\"store\"][$this->site_id][\"meta_title\"];\n $keywords = $this->_config[\"store\"][$this->site_id][\"meta_keywords\"];\n $descr = $this->_config[\"store\"][$this->site_id][\"meta_descr\"];\n $canonical_url = FALSE;\n // Check for settings on this page\n if($meta = $this->_get_meta_info()){\n $title = ($meta[\"title\"] != '') ? $meta[\"title\"] : $title;\n $keywords = ($meta[\"keywords\"] != '') ? $meta[\"keywords\"] : $keywords;\n $descr = ($meta[\"descr\"] != '') ? $meta[\"descr\"] : $descr;\n $canonical_url = $meta[\"canonical_url\"];\n }\n\n $output = '<title>'.$title.'</title>\n <meta name=\"description\" content=\"'.$descr.'\" />\n <meta name=\"keywords\" content=\"'.$keywords.'\" />';\n // Is it a canonical url?\n if($canonical_url !== FALSE){\n $output .= '<link rel=\"canonical\" href=\"'.$canonical_url.'\" />';\n }\n return $output;\n }", "title": "" }, { "docid": "8014ed3933f3f5c53bf1abefa63d430b", "score": "0.6040988", "text": "public function meta() {\n\t\treturn [\n\t\t\t'name' => 'FAQ Extra2 page',\n\t\t\t'description' => 'This is a faq extra2 page',\n\t\t\t'template' => 'pages/faq-extra2-page.php'\n\t\t];\n\t}", "title": "" }, { "docid": "14e4541e12625cef080acb55c66de574", "score": "0.6037795", "text": "public function getPages();", "title": "" }, { "docid": "a4607585e67c61533a64a88f6e1020a4", "score": "0.6017853", "text": "private function _GetPageTitle()\r\n\t{\r\n\t\t$page_title = 'TShirtShop: ' . 'Demo Product Catalog from Beginning PHP and MySQL E-Commerce';\r\n\t\t\r\n\t\tif (isset($_GET['DepartmentId']) && isset($_GET['CategoryId']))\r\n\t\t{\r\n\t\t\t$page_title = 'TShirtShop: ' . Catalog::GetDepartmentName($_GET['DepartmentId']) . ' - ' . Catalog::GetCategoryName($_GET['CategoryId']);\r\n\t\t\t\r\n\t\t\tif (isset($_GET['Page']) && ((int)$_GET['Page']) > 1)\r\n\t\t\t\t$page_title .= ' - Page ' . ((int)$_GET['Page']);\r\n\t\t}\r\n\t\telseif (isset($_GET['DepartmentId']))\r\n\t\t{\r\n\t\t\t$page_title = 'TShirtShop: ' . Catalog::GetDepartmentName($_GET['DepartmentId']);\r\n\t\t\t\r\n\t\t\tif (isset($_GET['Page']) && ((int)$_GET['Page']) > 1)\r\n\t\t\t\t$page_title .= ' - Page ' . ((int)$_GET['Page']);\r\n\t\t}\r\n\t\telseif (isset($_GET['ProductId']))\r\n\t\t{\r\n\t\t\t$page_title = 'TShirtShop: ' . Catalog::GetProductName($_GET['ProductId']);\r\n\t\t}\r\n\t\telseif (isset($_GET['SearchResults']))\r\n\t\t{\r\n\t\t\t$page_title = 'TShirtShop: \"';\r\n\t\t\t\r\n\t\t\t// Display the search string\r\n\t\t\t$page_title .= trim(str_replace('-', ' ', $_GET['SearchString'])) . '\" (';\r\n\r\n\t\t\t// Display \"all-words search \" or \"any-words search\"\r\n\t\t\t$all_words = isset($_GET['AllWords']) ? $_GET['AllWords'] : 'off';\r\n\t\t\t\r\n\t\t\t$page_title .= ($all_words == 'on') ? 'all' : 'any' . '-words search';\r\n\t\t\t\r\n\t\t\t// Display page number\r\n\t\t\tif (isset($_GET['Page']) && ((int)$_GET['Page']) > 1)\r\n\t\t\t\t$page_title .= ', page ' . ((int)$_GET['Page']);\r\n\t\t\t\r\n\t\t\t$page_title .= ')';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (isset($_GET['Page']) && ((int)$_GET['Page']) > 1)\r\n\t\t\t\t$page_title .= ' - Page ' . ((int)$_GET['Page']);\r\n\t\t}\r\n\t\t\r\n\t\treturn $page_title;\r\n\t}", "title": "" }, { "docid": "3d98fadc4ec0f316eeda82d070041a7c", "score": "0.6005993", "text": "protected function _setupMetaData()\n {\n $this\n ->_assignMeta('page_title')\n ->_assignMeta('meta_keywords')\n ->_assignMeta('meta_description');\n }", "title": "" }, { "docid": "8a35bbd386bcff8cc6e484f9f8473d9f", "score": "0.60041404", "text": "function pageMeta($modid, $def){\n if($def){\n $this->page_title = $def;\n } else {\n $this->page_title = 'Ekklesia 360'; // We <3 fallbacks\n }\n\n //get wildcard\n $ifdetail = explode(\"://\",$_GET['wildcard']);\n\n //debug text output of wildcard\n //$this->debug = $ifdetail;\n\n //if page/module uses display:auto will return $ifdetail[1] else just display page.\n if($ifdetail[1]!==\"\"){\n if(strtolower($modid) == \"page\" || strtolower($modid) == \"pages\" || strtolower($modid) == \"index\"){\n $pmeta = getContent(\n \"page\",\n \"display:detail\",\n \"find:\".$_GET['nav'],\n \"show:__title__\",\n \"show:|~\",\n \"show:__description__\",\n \"show:|~\",\n \"show:__tags__\",\n \"show:|~\",\n \"show:__group__\",\n \"noecho\"\n );\n $this->assignMeta($pmeta,$modid,$def);\n }else if(strtolower($modid) == \"blog\" || strtolower($modid) == \"blogs\"){\n //blogs\n $pmeta = getContent(\n \"blog\",\n \"display:auto\",\n \"before_show_postlist:__blogtitle__\",\n \"before_show_postlist:|~\",\n \"before_show_postlist:__blogtitle__\",\n \"before_show_postlist:|~\",\n \"before_show_postlist:__blogdescription__\",\n \"before_show_postlist:|~\",\n \"before_show_postlist:__group__\",\n \"before_show_postlist:|~\",\n \"before_show_postlist:__blogrss__\",\n \"show_detail:__blogtitle__\",\n \"show_detail:|~\",\n \"show_detail:__blogtitle__ - __blogposttitle__\",\n \"show_detail:|~\",\n \"show_detail:__blogsummary__\",\n \"show_detail:|~\",\n \"show_detail:__group__\",\n \"show_detail:|~\",\n \"show_detail:__blogrss__\",\n \"show_detail:|~\",\n \"show_detail:__tags__\",\n \"noecho\"\n );\n $this->assignBlogMeta($pmeta);\n }else if(strtolower($modid) == \"article\" || strtolower($modid) == \"articles\"){\n //articles\n $pmeta = getContent(\n \"article\",\n \"display:detail\",\n \"find:\".$_GET['sermonslug'],\n \"show:__title__\",\n \"show:|~\",\n \"show:__summary__\",\n \"show:|~\",\n \"show:__tags__\",\n \"show:|~\",\n \"show:__group__\",\n \"noecho\"\n );\n $this->assignMeta($pmeta,$modid,$def);\n }else if(strtolower($modid) == \"event\" || strtolower($modid) == \"events\"){\n $pmeta = getContent(\n \"event\",\n \"display:detail\",\n \"find:\".$_GET['slug'],\n \"show:__title__\",\n \"show:|~\",\n \"show:__summary__\",\n \"show:|~\",\n \"show:__category__\",\n \"show:|~\",\n \"show:__group__\",\n \"noecho\"\n );\n $this->assignMeta($pmeta,$modid,$def);\n }else if(strtolower($modid) == \"product\" || strtolower($modid) == \"products\"){\n $pmeta = getContent(\n \"products\",\n \"display:auto\",\n \"before_show_productlist:__familytitle__\",\n \"show_detail:__familytitle__ - __producttitle__\",\n \"show_detail:|~\",\n \"show_detail:__productdescription__\",\n \"show_detail:|~\",\n \"show_detail:__producttags__\",\n \"show_detail:|~\",\n \"show_detail:__group__\",\n \"noecho\"\n );\n $this->assignMeta($pmeta,$modid,$def);\n }else if(strtolower($modid) == \"sermon\" || strtolower($modid) == \"sermons\"){\n $pmeta = getContent(\n \"sermon\",\n \"display:auto\",\n \"find:\".$_GET['sermonslug'],\n \"show_detail:__title__\",\n \"show_detail:|~\",\n \"show_detail:__summary__\",\n \"show_detail:|~\",\n \"show_detail:__tags__\",\n \"show_detail:|~\",\n \"show_detail:__group__\",\n \"noecho\"\n );\n $this->assignMeta($pmeta,$modid,$def);\n }\n } else {\n $pmeta = getContent(\n \"page\",\n \"display:detail\",\n \"find:\".$_GET['nav'],\n \"show:__title__\",\n \"show:|~\",\n \"show:__description__\",\n \"show:|~\",\n \"show:__tags__\",\n \"show:|~\",\n \"show:__group__\",\n \"noecho\"\n );\n $this->assignMeta($pmeta,$modid,$def);\n }\n }", "title": "" }, { "docid": "a99321995909c30d83e97a382f53e6f2", "score": "0.60041386", "text": "function return_meta($title = NULL, $keywords = NULL, $description = NULL)\n{\n\tif(is_null($title))\n\t{\n\t\t$title = \"PHP Web Development, Usability, and Interface Design\";\n\t}\n\n\t$meta = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n\t<title>'.$title.'</title>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t<meta name=\"keywords\" content=\"'.$keywords.'\" />\n\t<meta name=\"description\" content=\"'.$description.'\" />\n\t<meta name=\"language\" content=\"en-us\" />\n\t<meta name=\"robots\" content=\"index,follow\" />\n\t<meta name=\"googlebot\" content=\"index,follow\" />\n\t<meta name=\"msnbot\" content=\"index,follow\" />\n\t<meta name=\"revisit-after\" content=\"7 Days\" />\n\t<meta name=\"url\" content=\"'.SITE_BASE.'\" />\n\t<meta name=\"copyright\" content=\"Copyright '.date(\"Y\").' Your site name here. All rights reserved.\" />\n\t<meta name=\"author\" content=\"Your site name here\" />\n\t<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"images/favicon.ico\" />\n\t<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"'.SITE_BASE.'/includes/styles/styles.css\" />\n\t<script language=\"JavaScript\" type=\"text/javascript\" src=\"'.SITE_BASE.'/includes/js/jquery.validate.js\"></script>\n\n\t<link href=\"'.SITE_BASE.'/includes/css/bootstrap.css\" rel=\"stylesheet\">\n\t<link href=\"'.SITE_BASE.'/includes/css/bootstrap-responsive.css\" rel=\"stylesheet\">\n\t<script src=\"'.SITE_BASE.'/includes/js/jquery-2.0.3.js\"></script>\n\t<script src=\"'.SITE_BASE.'/includes/js/sorttable.js\"></script>\n\t<script src=\"'.SITE_BASE.'/includes/js/validate.js\"></script>\n\t<script src=\"'.SITE_BASE.'/includes/js/bootstrap.min.js\"></script>\n <link href=\"'.SITE_BASE.'/includes/css/bootstrap-editable.css\" rel=\"stylesheet\">\n <script src=\"'.SITE_BASE.'/includes/js/battleship.js\"></script>\n <script src=\"'.SITE_BASE.'/includes/js/animate.js\"></script>\n\t<script src=\"'.SITE_BASE.'/includes/js/bootstrap-editable.js\"></script>';\n\t\t\n\techo $meta;\n}", "title": "" }, { "docid": "3fda4c1fe80c0de3a3fd1bd18f94bd03", "score": "0.59990203", "text": "function head_meta() {\n\tinclude (LIBPATH.'get_theme_options.php');\n\n\t$default_blog_desc = ($sf_settings['sf_blog_desc']) ? $sf_settings['sf_blog_desc'] : '';\n\t$default_blog_kw = ($sf_settings['sf_blog_kw']) ? $sf_settings['sf_blog_kw'] : '';\n\n\t$post_desc_length = ($sf_settings['sf_blog_desc_len']) ? $sf_settings['sf_blog_desc_len'] : 20; // description length in # words for post/Page\n\t$post_use_excerpt = ($sf_settings['sf_blog_desc_exc']) ? $sf_settings['sf_blog_desc_exc'] : 0; // 0 (zero) to force content as description for post/Page\n\t$custom_desc_key = 'description'; // custom field key; if used, overrides excerpt/content\n\t$custom_kw_key = 'keywords'; // custom field key; if used, overrides excerpt/content\n\n\tglobal $cat, $cache_categories, $wp_query, $wp_version;\n\n\tif (is_single() || is_page()) {\n\t\t$post = $wp_query->post;\n\t\t$post_custom = get_post_custom($post->ID);\n\t\t$custom_desc_value = $post_custom[\"$custom_desc_key\"][0];\n\t\t$custom_kw_value = $post_custom[\"$custom_kw_key\"][0];\n\n\t\tif ($custom_kw_value) {\n\t\t\t$keywords = $custom_kw_value;\n\t\t} else {\n\t\t\t$posttags = get_the_tags();\n\t\t\tif ($posttags) {\n\t\t\t\tforeach ($posttags as $tag) {\n\t\t\t\t\t$keywords .= $tag->name.',';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($custom_desc_value) {\n\t\t\t$text = $custom_desc_value;\n\t\t} elseif ($post_use_excerpt) {\n\t\t\t$text = strip_shortcodes($post->post_excerpt);\n\t\t} else {\n\t\t\t$text = strip_shortcodes($post->post_content);\n\t\t}\n\n\t\t$text = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \" \"), \" \", $text);\n\t\t$text = str_replace(array(\"\\\"\"), \"\", $text);\n\t\t$text = trim(strip_tags($text));\n\t\t$text = explode(' ', $text);\n\n\t\tif (count($text) > $post_desc_length) {\n\t\t\t$l = $post_desc_length;\n\t\t\t$ellipsis = '...';\n\t\t} else {\n\t\t\t$l = count($text);\n\t\t\t$ellipsis = '';\n\t\t}\n\n\t\t$description = '';\n\n\t\tfor ($i=0; $i<$l; $i++)\n\t\t\t$description .= $text[$i] . ' ';\n\n\t\t$description .= $ellipsis;\n\t} elseif (is_category()) {\n\t\t$category = $wp_query->get_queried_object();\n\t\t$description = trim(strip_tags($category->category_description));\n\t} else {\n\t\t$description = (empty($default_blog_desc)) ? trim(strip_tags(get_bloginfo('description'))) : $default_blog_desc;\n\t\t$keywords = $default_blog_kw;\n\t}\n\n\tglobal $post;\n\n\t$url = get_permalink();\n\t$title = get_the_title();\n\t$imageArr = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID),'single-post-thumbnail');\n\t$image = $imageArr[0];\n\n\techo \"<!-- Meta tags built by Solo-Frame -->\\n\";\n\n\techo \"<meta property=\\\"og:url\\\" content=\\\"$url\\\" />\\n\";\n\techo \"<meta property=\\\"og:title\\\" content=\\\"$title\\\" />\\n\";\n\n\tif ($image)\n\t\techo \"<meta property=\\\"og:image\\\" content=\\\"$image\\\"/>\\n\";\n\n\tif ($keywords)\n\t\techo \"<meta name=\\\"keywords\\\" content=\\\"$keywords\\\" />\\n\";\n\n\tif ($description) {\n\t\techo \"<meta name=\\\"description\\\" content=\\\"$description\\\" />\\n\";\n\t\techo \"<meta property=\\\"og:description\\\" content=\\\"$description\\\" />\\n\";\n\t}\n}", "title": "" }, { "docid": "686f5848773e215d50b761b2999fba00", "score": "0.5997986", "text": "public function wpseo_metadesc()\n {\n }", "title": "" }, { "docid": "dd424b2911a2e09b16b0d982ab480561", "score": "0.59946173", "text": "public function meta() {\n\t\treturn [\n\t\t\t'name' => 'Any page',\n\t\t\t'description' => 'This is a any page',\n\t\t\t'template' => 'pages/any-page.php',\n\t\t\t'post_type' => 'any'\n\t\t];\n\t}", "title": "" }, { "docid": "06b8156d00e3e117c9f151b8223efb59", "score": "0.5985604", "text": "function listNavPage(){\n\n \t$qpage = $this->db->query(\"SELECT * FROM cm_post WHERE post_type = 'page' AND publish = '1' \");\n \tforeach($qpage->result_array() as $r){\n \t\t$title = str_replace($this->strUrlReplace, \"-\", strtolower($r['post_title']) ) . \".html\";\n\n \t\t$record['id'] = $r['id']; \n \t\t$record['post_title'] = $r['post_title']; \n \t\t$record['post_content'] = $r['post_content']; \n \t\t$record['meta_title'] = $r['meta_title']; \n \t\t$record['meta_description'] = $r['meta_description']; \n \t\t$record['meta_keyword'] = $r['meta_keyword']; \n \t\t$record['uri_page'] = base_url().'page/view/'.$r['id'] .'/'.$title; \n \t\t$page[] = $record;\n \t}\n\n \treturn $page;\n }", "title": "" }, { "docid": "2b5a14383fd41831b1966ba78071faa6", "score": "0.5981896", "text": "function page_getContent(){\n if(isset($_GET[\"page\"]))\n\t\t $page = $_GET[\"page\"];\t\t//Get current Page\n else\n $page = \"home\";\n\t\t\n\t\tswitch ($page) {\n\t\t\tcase 'home':\n\t\t\t\treturn page_getHome();\n\t\t\t\tbreak;\n\t\t\tcase 'detailedHouse':\n\t\t\t\treturn page_getDetailedHouse();\n\t\t\t break;\n\t\t\tcase 'orders':\n\t\t\t\treturn page_getOrders();\n\t\t\t\tbreak;\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "9dbcee8903349da62ac00407c85ff1a7", "score": "0.5970394", "text": "public function displayAdditionalMetaTags() {\r\n $this->displayStaticAdditionalMetaTags(array('title' => $this->pageName));\r\n }", "title": "" }, { "docid": "d551076b976d7696648b9e1e3647e3ec", "score": "0.5963209", "text": "public function getPages() {}", "title": "" }, { "docid": "6dec3d0ad1eca0fce82fa993a764625b", "score": "0.59397334", "text": "protected function getPageTitle() : array {}", "title": "" }, { "docid": "8aa34c08e8ca6c29d7d12bded05e6f8d", "score": "0.59348834", "text": "function basic_wp_seo() {\n\tglobal $page, $paged, $post;\n\t$default_keywords = 'some, words, here'; // customize\n\t$output = '';\n\n\t// description\n\t$seo_desc = get_post_meta($post->ID, 'mm_seo_desc', true);\n\t$description = get_bloginfo('description', 'display');\n\t$pagedata = get_post($post->ID);\n\tif (is_singular()) {\n\t\tif (!empty($seo_desc)) {\n\t\t\t$content = $seo_desc;\n\t\t} else if (!empty($pagedata)) {\n\t\t\t$content = apply_filters('the_excerpt_rss', $pagedata->post_content);\n\t\t\t$content = substr(trim(strip_tags($content)), 0, 155);\n\t\t\t$content = preg_replace('#\\n#', ' ', $content);\n\t\t\t$content = preg_replace('#\\s{2,}#', ' ', $content);\n\t\t\t$content = trim($content);\n\t\t}\n\t} else {\n\t\t$content = $description;\n\t}\n\t$output .= '<meta name=\"description\" content=\"' . esc_attr($content) . '\">' . \"\\n\";\n\n\t// keywords\n\t$keys = get_post_meta($post->ID, 'mm_seo_keywords', true);\n\t$cats = get_the_category();\n\t$tags = get_the_tags();\n\tif (empty($keys)) {\n\t\tif (!empty($cats)) foreach($cats as $cat) $keys .= $cat->name . ', ';\n\t\tif (!empty($tags)) foreach($tags as $tag) $keys .= $tag->name . ', ';\n\t\t$keys .= $default_keywords;\n\t}\n\t$output .= \"\\t\\t\" . '<meta name=\"keywords\" content=\"' . esc_attr($keys) . '\">' . \"\\n\";\n\n\t// robots\n\tif (is_category() || is_tag()) {\n\t\t$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;\n\t\tif ($paged > 1) {\n\t\t\t$output .= \"\\t\\t\" . '<meta name=\"robots\" content=\"noindex,follow\">' . \"\\n\";\n\t\t} else {\n\t\t\t$output .= \"\\t\\t\" . '<meta name=\"robots\" content=\"index,follow\">' . \"\\n\";\n\t\t}\n\t} else if (is_home() || is_singular()) {\n\t\t$output .= \"\\t\\t\" . '<meta name=\"robots\" content=\"index,follow\">' . \"\\n\";\n\t} else {\n\t\t$output .= \"\\t\\t\" . '<meta name=\"robots\" content=\"noindex,follow\">' . \"\\n\";\n\t}\n\n\t// title\n\t$title_custom = get_post_meta($post->ID, 'mm_seo_title', true);\n\t$url = ltrim(esc_url($_SERVER['REQUEST_URI']), '/');\n\t$name = get_bloginfo('name', 'display');\n\t$title = trim(wp_title('', false));\n\t$cat = single_cat_title('', false);\n\t$tag = single_tag_title('', false);\n\t$search = get_search_query();\n\n\tif (!empty($title_custom)) $title = $title_custom;\n\tif ($paged >= 2 || $page >= 2) $page_number = ' | ' . sprintf('Page %s', max($paged, $page));\n\telse $page_number = '';\n\n\tif (is_home() || is_front_page()) $seo_title = $name . ' | ' . $description;\n\telseif (is_singular()) $seo_title = $title . ' | ' . $name;\n\telseif (is_tag()) $seo_title = 'Tag Archive: ' . $tag . ' | ' . $name;\n\telseif (is_category()) $seo_title = 'Category Archive: ' . $cat . ' | ' . $name;\n\t//elseif (is_archive()) $seo_title = 'Archive: ' . $title . ' | ' . $name;\n\telseif (is_archive()) $seo_title = '' . $title . ' | ' . $name;\n\telseif (is_search()) $seo_title = 'Search: ' . $search . ' | ' . $name;\n\telseif (is_404()) $seo_title = '404 - Not Found: ' . $url . ' | ' . $name;\n\telse $seo_title = $name . ' | ' . $description;\n\n\t$output .= \"\\t\\t\" . '<title>' . esc_attr($seo_title . $page_number) . '</title>' . \"\\n\";\n\n\treturn $output;\n}", "title": "" }, { "docid": "40f0a527799b1e70df40f78a29861cec", "score": "0.5914964", "text": "public function index()\n {\n $pages = ['homepage','hotel', 'aboutus','investment','csr','gcg','contact','reward'];\n foreach($pages as $key){\n $seo[$key]['title'] = @Seo::where('slug',$key)->where('meta','title')->first()->value;\n $seo[$key]['description'] = @Seo::where('slug',$key)->where('meta','description')->first()->value;\n $seo[$key]['keyword'] = @Seo::where('slug',$key)->where('meta','keyword')->first()->value;\n }\n return view('content::page')->withTitle('Pages')->withSeo($seo);\n }", "title": "" }, { "docid": "c1a18948bed37f561ff2070118caf43a", "score": "0.58994997", "text": "public function add_page_seo_data() {\n\n $res = Array();\n $current_url = $GLOBALS['inside4']['translate']['uri_prefix'].$GLOBALS['inside4']['main']['clear_uri'];\n\n foreach ($this->seo_data as $row) {\n if ($row['page_url'] == $current_url) $res = $row;\n }\n\n if (!isset($res['seo_title'])) $res['seo_title'] = $current_url;\n if (!isset($res['seo_description'])) $res['seo_description'] = $current_url;\n if (!isset($res['seo_keywords'])) $res['seo_keywords'] = $current_url;\n\n return $res;\n\n }", "title": "" }, { "docid": "a0ef7fb0d7575aabd7a6d0b76ccf619b", "score": "0.58993745", "text": "public function getMeta();", "title": "" }, { "docid": "a0ef7fb0d7575aabd7a6d0b76ccf619b", "score": "0.58993745", "text": "public function getMeta();", "title": "" }, { "docid": "e5765239f20dd93dfa36ffed9083613a", "score": "0.5892334", "text": "public function getPage();", "title": "" }, { "docid": "e5765239f20dd93dfa36ffed9083613a", "score": "0.5892334", "text": "public function getPage();", "title": "" }, { "docid": "89910355f8dd20a72b5e495d90920e4b", "score": "0.58904195", "text": "protected abstract function getPageTitle();", "title": "" }, { "docid": "89910355f8dd20a72b5e495d90920e4b", "score": "0.58904195", "text": "protected abstract function getPageTitle();", "title": "" }, { "docid": "1a2d914b84de4198342bd266705b70e0", "score": "0.58859026", "text": "protected function extractMeta()\n {\n if (extension_loaded('xml')) {\n // If libxml is available, use a much more reliable DOM parser to extract the title and table of contents.\n\n libxml_use_internal_errors(true);\n\n $dom = new \\DOMDocument('1.0', 'utf-8');\n $dom->loadHTML($this->content);\n $body = $dom->getElementsByTagName('body');\n\n if ($body->length >= 1) {\n $body = $body->item(0);\n } else {\n throw new ApplicationException('Documentation file has no body content.');\n }\n\n if (!count(libxml_get_errors())) {\n /**\n * One of the following must be true to get both the title and TOC:\n * - The first element must be a <ul> or <ol> (the TOC), followed by a <h1-6> (the title)\n * or\n * - The first element must be a <h1-6> (the title), followed by a <ul> or <ol>\n */\n $validFirstElement = false;\n $firstTag = strtolower($body->firstChild->nodeName);\n\n if (in_array($firstTag, ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'])) {\n $this->title = $body->firstChild->textContent;\n $validFirstElement = 'title';\n } elseif (in_array($firstTag, ['ul', 'ol'])) {\n $this->chapters = $this->parseTableOfContents($body->firstChild);\n $validFirstElement = 'toc';\n }\n\n if ($validFirstElement) {\n $body->removeChild($body->firstChild);\n\n if ($body->hasChildNodes()) {\n foreach ($body->childNodes as $child) {\n $childTag = strtolower($child->nodeName);\n\n // Allow break tags between title and TOC\n if ($childTag === 'br') {\n continue;\n }\n\n // Allow empty paragraphs between title and TOC\n if ($childTag === 'p' && trim($child->textContent) === '') {\n continue;\n }\n\n // Allow text\n if ($child instanceof \\DOMText) {\n continue;\n }\n\n if (\n in_array($childTag, ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'])\n && $validFirstElement === 'toc'\n ) {\n $this->title = $child->textContent;\n $body->removeChild($child);\n } elseif (\n in_array($childTag, ['ul', 'ol'])\n && $validFirstElement === 'title'\n ) {\n $this->chapters = $this->parseTableOfContents($child);\n $body->removeChild($child);\n }\n break;\n }\n }\n\n $this->content = $dom->saveHTML($body);\n $this->tidyStartOfContent();\n return;\n }\n }\n }\n\n // Otherwise, use a basic (hacky) regex to extract the title. We won't attempt to extract the table of contents.\n preg_match('/^[\\s\\n\\r]*<h1>([^<]+)<\\/h1>[\\n\\r\\s]+(.*?)$/ims', $this->content, $matches);\n $this->title = $matches[1] ?? null;\n $this->content = $matches[2] ?? null;\n }", "title": "" }, { "docid": "d6de8191435d6b4b465a4796ea5c2eb3", "score": "0.58858365", "text": "public function get_content($page_data);", "title": "" }, { "docid": "269c25af5f80fea0b1ec85417b7f5d7f", "score": "0.5878186", "text": "function idxgcMetaTitle() {\n \n $pageMetaTitle = \"\";\n $pageTemplate = basename(get_page_template());\n \n if ($pageTemplate == \"idxgc-listing.php\") {\n global $idxClient;\n \n $mlsNumber = $idxClient->getMlsNumberFromCurrentUrl();\n \n try {\n $listing = $idxClient->getListing($mlsNumber);\n \n $community = $listing->community;\n if ($community == \"\" || $community == NULL) \n $community = $listing->state;\n $pageMetaTitle = $community . ' | ' . \n $listing->address_1 . ', ' . \n $listing->city . ', ' . \n $listing->state . ' ' . \n $listing->zip; \n }\n catch(Exception $e) {\n $pageMetaTitle = \"Listing not found\";\n }\n }\n else {\n $pageMetaTitle = idxgcCmsMetaTitle();\n }\n return $pageMetaTitle;\n}", "title": "" }, { "docid": "8c25a86044f18c2852c07a36d47678e7", "score": "0.5864076", "text": "public function get_pages()\n {\n }", "title": "" }, { "docid": "1f1b91a62a882944b283a3b001ba1e98", "score": "0.5849764", "text": "function get_pages() {\n $pages = get_pages();\n $pages_options = array();\n if ( $pages ) {\n foreach ( $pages as $page ) {\n $pages_options[ $page->ID ] = $page->post_title;\n }\n }\n\n return $pages_options;\n }", "title": "" }, { "docid": "922f7a3728ab8d050aab54c5982ef8ab", "score": "0.58456916", "text": "function get_page_by_title($page_title, $output = \\OBJECT, $post_type = 'page')\n{\n}", "title": "" }, { "docid": "85c95618a11173e7610104f89c049013", "score": "0.5823148", "text": "public function echo_seo_tags()\n\t{\n\t\t?>\n<title><?php echo $this->page_title; ?></title>\n<meta name=\"keywords\" content=\"<?php echo $this->page_keywords; ?>\" />\n<meta name=\"description\" content=\"<?php echo $this->page_description; ?>\" />\n<?php if($this->show_og_code){ ?>\n<meta property=\"og:title\" content=\"<?php echo strip_tags($this->strip_string_word($this->og_title,150)); ?>\" />\n<meta property=\"og:type\" content=\"<?php echo strip_tags($this->strip_string_word($this->og_type,150)); ?>\" />\n<meta property=\"og:url\" content=\"<?php echo strip_tags($this->og_url); ?>\" />\n<meta property=\"og:image\" content=\"<?php echo strip_tags($this->og_image); ?>\" />\n<meta property=\"og:description\" content=\"<?php echo strip_tags($this->strip_string_word($this->og_desctiption,250)); ?>\" /><?php } \n}", "title": "" }, { "docid": "5ad83e1d7e33a6506e4a0ec2fac2075f", "score": "0.5821792", "text": "function pageContent()\r\n\t\t{\r\n\t\t}", "title": "" }, { "docid": "e57ae1f67914cbb2712a4077e203c0b8", "score": "0.58183295", "text": "function get_pages() {\n $pages = get_pages();\n $pages_options = array();\n if ( $pages ) {\n foreach ($pages as $page) {\n $pages_options[$page->ID] = $page->post_title;\n }\n }\n\n return $pages_options;\n }", "title": "" }, { "docid": "e57ae1f67914cbb2712a4077e203c0b8", "score": "0.58183295", "text": "function get_pages() {\n $pages = get_pages();\n $pages_options = array();\n if ( $pages ) {\n foreach ($pages as $page) {\n $pages_options[$page->ID] = $page->post_title;\n }\n }\n\n return $pages_options;\n }", "title": "" }, { "docid": "369d0f66eeae7ed6db2449debd4395ba", "score": "0.5813385", "text": "private function setMetaTags() {\n $this->set('pageTitle', 'URL shortener');\n $this->set('metaDescription', 'Gets short URLs for your long URLs');\n }", "title": "" }, { "docid": "c1c6b6127985e51ee7bd61197099bd98", "score": "0.57944655", "text": "function get_pages() {\r\n $pages = get_pages();\r\n $pages_options = array();\r\n if ( $pages ) {\r\n foreach ($pages as $page) {\r\n $pages_options[$page->ID] = $page->post_title;\r\n }\r\n }\r\n\r\n return $pages_options;\r\n }", "title": "" }, { "docid": "161dd914471902258b011a2d12adcc86", "score": "0.5793192", "text": "protected function getKeywords() {}", "title": "" }, { "docid": "4c615ed3004705fdfeb9f745ba31c92c", "score": "0.57926697", "text": "function srch_get_pages() {\n\n // Build query for posts\n $query = new WP_Query(array(\n 'post_type' => 'page',\n 'post_status' => 'publish',\n 'posts_per_page' => -1,\n 'cache_results' => false,\n 'no_found_rows' => true,\n// 'meta_key'\t\t=> 'exclude_from_search',\n// 'meta_value'\t=> '0',\n ));\n $mypages = (array) $query->posts;\n\n\n // Loop through posts\n foreach ( $mypages as $mypage ) {\n $post_id = $mypage->ID;\n $label = '';\n $alt_list = '';\n $srch_cat = '';\n $exclude = get_field('exclude_from_search', $post_id);\n\n\n // if page is not marked to be excluded, add to search:\n if( $exclude == '0' || $exclude == ''):\n\n //Page label based on page template\n $template_file = get_post_meta( $post_id, '_wp_page_template', TRUE );\n if ($template_file == 'template-career-single.php'):\n $label = 'career profile';//generate alternate titles list\n $srch_cat = 'career';\n if( have_rows('alternate_titles', $post_id) ):\n while( have_rows('alternate_titles', $post_id) ): the_row();\n $alt_titles = get_sub_field('title');\n $alt_list .= $alt_titles . \", \";\n endwhile;\n endif;\n elseif ($template_file == 'template-career-landing.php'):\n $label = 'page';\n $srch_cat = 'career';\n elseif ($template_file == 'template-career-category.php'):\n $label = 'career category';\n $srch_cat = 'career';\n elseif ($template_file == 'template-career-category-index.php'):\n $label = 'career category index';\n $srch_cat = 'career';\n elseif ($template_file == 'template-blog-category-index.php'):\n $label = 'blog topic index';\n $srch_cat = 'blog';\n elseif ($template_file == 'template-music-schools-landing.php'):\n $label = 'schools page';\n $srch_cat = 'page';\n elseif ($template_file == 'template-setting.php'):\n $label = 'schools page';\n $srch_cat = 'page';\n elseif ($template_file == 'template-state-schools.php'):\n $label = 'schools page';\n $srch_cat = 'page';\n elseif ($template_file == 'template-area-of-study.php'):\n $label = 'schools page';\n $srch_cat = 'page';\n elseif ($template_file == 'category.php'):\n $label = 'blog topic';\n else:\n $label = 'page';\n $srch_cat = 'page';\n endif;\n\n $view_count = (int) get_field('trend_period_views', $post_id);\n\n if ($view_count == '' || !$view_count):\n $view_count = 0;\n endif;\n //Values for database\n $params = array (\n 'srch_title' => clean_title(get_the_title($post_id)),\n 'srch_post_type' => get_post_type($post_id),\n 'srch_link' => get_the_permalink($post_id),\n 'srch_cat' => $srch_cat,\n 'srch_post_id' => $post_id,\n 'srch_view_count' => $view_count,\n 'srch_alt_title' => $alt_list,\n 'srch_label' => $label\n );\n\n // Pass to db\n srch_insert_row($params);\n\n endif;\n }\n}", "title": "" }, { "docid": "8decca9fee285556efce96140786059b", "score": "0.5789319", "text": "function gettitleDetails($domain_id,$page_id)\r\n\t\t{\r\n\t\t\tglobal $CFG,$objSmarty;\r\n\t\t\t\r\n\t\t\t$sqlsel = \"SELECT fb,twitter,linkedin,mail FROM \".$CFG['table']['social_plugins']. \" WHERE domain_id = '\".$this->filterInput($domain_id).\"' AND page_id = '\".$this->filterInput($page_id).\"'\";\r\n\t\t\t$sqlres = $this->ExecuteQuery($sqlsel,'select');\r\n\t\t\t$objSmarty->assign(\"socialpagelist\", $sqlres);\r\n\t\t}", "title": "" }, { "docid": "fdc285539b6adb630b0c76960e12966e", "score": "0.57624197", "text": "function metaTags() {\n if (strpos($_SERVER['REQUEST_URI'], 'closet') !== false) {\n $url = explode(\"/\", $_SERVER['REQUEST_URI']);\n $username = end($url);\n // get closet info\n $user = database_fetch(\"user\", \"username\", $username);\n $item = database_order_fetch(\"item\", \"userid\", $user['userid'], \"\", \"\", \"time\");\n $itemObj = returnItem($item['itemid']);\n echo \"<meta name='description' content='hueclues, where style and color come to play'> \n <meta property='og:image' content='\" . $itemObj->image_link . \"'/>\n <meta property='og:title' content=\\\"\" . $itemObj->owner_username . \"'s Closet\\\" />\n <meta property='og:site_name' content='hueclues'/>\n <meta property='og:type' content='website'/>\";\n } else {\n echo \"<meta name='description' content='hueclues, where style and color come to play'> \n<meta property='og:image' content='http://hueclues.com/img/hc_icon_new.png'/>\n <meta property='og:title' content='Hueclues'/>\n <meta property='og:site_name' content='hueclues'/>\n <meta property='og:type' content=''/>\";\n }\n}", "title": "" }, { "docid": "ce269cb04d75815c603c42a8b933ab5d", "score": "0.57540536", "text": "public function getMetaData()\n {\n $url = urldecode($this->url);\n\n// $code = Helpers\\Helper::getHttpResponseCode_using_curl($url);\n// dd($code);\n\n $validity = Helpers\\Helper::isValidUrl($url);\n\n if ($validity === true) {\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36');\n curl_setopt($ch, CURLOPT_AUTOREFERER, true);\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n\n $data = curl_exec($ch);\n\n// dd($data);\n// echo $data;\n// dd();\n\n curl_close($ch);\n\n $page_content = $data;\n $title = null;\n $description = null;\n $image = null;\n// $icon = null;\n $dom_obj = new \\DOMDocument();\n @$dom_obj->loadHTML($page_content);\n// dd($dom_obj);\n $meta_val = null;\n\n// $title = $dom_obj->getElementsByTagName('title')->item(0);\n if ($dom_obj->getElementsByTagName('title')->item(0) == null) {\n $title = 'TITLE NOT FOUND';\n } else {\n $title = $dom_obj->getElementsByTagName('title')->item(0)->textContent;\n }\n// $title = $dom_obj->getElementsByTagName('title');\n// dd($title);\n\n foreach ($dom_obj->getElementsByTagName('meta') as $meta) {\n if ($meta->getAttribute('property') == 'og:description') {\n $meta_val = $meta->getAttribute('content');\n $description = $meta_val;\n }\n if ($meta->getAttribute('property') == 'og:image') {\n $meta_val = $meta->getAttribute('content');\n $image = $meta_val;\n }\n }\n// foreach ($dom_obj->getElementsByTagName('link') as $link) {\n// if ($link->getAttribute('rel') == 'shortcut icon') {\n// $icon = $link->getAttribute('href');\n// }\n// }\n\n\n if ($title != null) {\n $this->title = $title;\n }\n if ($description != null) {\n $this->description = $description;\n }\n\n if ($image != null) {\n $this->image = $image;\n }\n// if ($icon != null) {\n// $this->icon = $icon;\n// }\n } else {\n $this->title = $validity;\n }\n }", "title": "" }, { "docid": "41a763a948e0c300552d652591c05c54", "score": "0.5753505", "text": "protected function getPage() {}", "title": "" }, { "docid": "3a3ba8cdca0d8b3bf813c903bab77c94", "score": "0.57524973", "text": "public function getPage () {}", "title": "" }, { "docid": "41a763a948e0c300552d652591c05c54", "score": "0.57520825", "text": "protected function getPage() {}", "title": "" }, { "docid": "bdc57dec66212b688eb1d782a4c70642", "score": "0.5749024", "text": "function sed_htmlmetas($description = '', $keywords = '', $contenttype = 'text/html')\n\t{\n\tglobal $cfg, $sys;\n\t\n\t$description = (empty($description)) ? $cfg['subtitle'] : htmlspecialchars($description);\n\t$keywords = (empty($keywords)) ? $cfg['metakeywords'] : htmlspecialchars($keywords);\n\t\n\t$result = \"\n\t\t<base href=\\\"\".$sys['abs_url'].\"\\\" />\n\t\t<meta http-equiv=\\\"content-type\\\" content=\\\"\".$contenttype.\"; charset=\".$cfg['charset'].\"\\\" />\n\t\t<meta name=\\\"description\\\" content=\\\"\".$description.\"\\\" />\n\t\t<meta name=\\\"keywords\\\" content=\\\"\".$keywords.\"\\\" />\n\t\t<meta name=\\\"generator\\\" content=\\\"Seditio by Neocrome & Seditio Team https://seditio.org\\\" />\n\t\t<meta http-equiv=\\\"pragma\\\" content=\\\"no-cache\\\" />\n\t\t<meta http-equiv=\\\"cache-control\\\" content=\\\"no-cache\\\" />\n\t\t<meta http-equiv=\\\"last-modified\\\" content=\\\"\".gmdate(\"D, d M Y H:i:s\").\" GMT\\\" />\n\t\t<link rel=\\\"shortcut icon\\\" href=\\\"favicon.ico\\\" />\";\n\treturn ($result);\n\t}", "title": "" }, { "docid": "8ba401f13bd308e8d02e36d7bb33b3e7", "score": "0.5744893", "text": "public function provides()\n\t{\n return ['PageTitle'];\n\t}", "title": "" }, { "docid": "45c08d36d35b52d604be3a92f04f182a", "score": "0.5743813", "text": "function homepage() {\r\n\t\t$results = array();\r\n\t\t$data = Article::getList(100000);\r\n\t\t$results['articles'] = $data['results'];\r\n\t\t$results['totalRows'] = $data['totalRows'];\r\n\t\t$results['tagidattributes'] = array();\r\n\t\t$data = Tags::getAllTags();\r\n\t\t$results['alltags'] = $data['results'];\r\n\r\n\t\tforeach ( $results['articles'] as $article){\r\n\t\t\r\n\t\t\t$data = Comment::getByArticleId(10000, (int)$article->id );\r\n\t\t\t$results['commentRows'][$article->id] = $data['totalRows'];\r\n\t\t\t$results['comments'][$article->id] = $data['results'];\r\n\r\n\t\t\tforeach($results['comments'][$article->id] as $comment){\r\n\t\t\t\t$results['commentuser'][$comment->id] = User::getByUserId((int)$comment->userid);\r\n\t\t\t}\r\n\r\n\t\t\t$data = User::getByUserId((int)$article->userid);\r\n\t\t\t$results['useridattributes'][$article->id] = $data;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tforeach($results['alltags'] as $tagidattributes){\t\t\r\n\t\t\t$results['tagidattributes'][] = $tagidattributes;\t\r\n\t\t}\r\n\r\n\t\t$data = Category::getList();\r\n\t\t$results['categories'] = array();\r\n\t\tforeach ( $data['results'] as $category ) $results['categories'][$category->id] = $category;\r\n\t\t$results['pageTitle'] = \"Hyderabad Urban Lab - Homepage\";\r\n\t\t\r\n\t\trequire( TEMPLATE_PATH . \"/homepage.php\" );\r\n\t}", "title": "" }, { "docid": "0e0a46292e10798034d82a831dcd0ad9", "score": "0.5742564", "text": "public function getPage() {}", "title": "" }, { "docid": "d11b651d2ae2d3cdd77074fcbe14c31b", "score": "0.5740388", "text": "public static function headDescription()\n\t{\n\t\tglobal $Site;\n\t\tglobal $WHERE_AM_I;\n\t\tglobal $page;\n\n\t\t$description = $Site->description();\n\n\t\tif( $WHERE_AM_I=='page' ) {\n\t\t\t$description = $page->description();\n\t\t}\n\n\t\treturn '<meta name=\"description\" content=\"'.$description.'\">'.PHP_EOL;\n\t}", "title": "" }, { "docid": "373a33e9d24ee5c201877c6d4186b66a", "score": "0.57279056", "text": "public function getPageTitles(): array\n {\n return [];\n }", "title": "" }, { "docid": "ea104450714a42707b0a2dd703e0d02d", "score": "0.5726405", "text": "abstract protected function getNewsPage();", "title": "" }, { "docid": "da9d26fa9bd266940a97e8db62a4345a", "score": "0.571475", "text": "function extractContents($page)\n{\n extractHeadAndTitle($page);\n extractBody($page);\n}", "title": "" }, { "docid": "89c653bdaa580997d838c4d3050ddf7b", "score": "0.5711425", "text": "protected function init() {\n // the idea of this function is to set some values,\n // such as page title, meta keyword, meta description\n }", "title": "" }, { "docid": "82d0996c1eaaa6837bc73d263651582a", "score": "0.570576", "text": "function onesie_pro_get_pages() {\n\n $pages = get_pages();\n $terms = array();\n\n $terms['']['name'] = '';\n $terms['']['title'] = __( '-- Choose One --', 'gpp' );\n\n foreach ( $pages as $tt ) {\n $terms[$tt->ID]['name'] = $tt->ID;\n $terms[$tt->ID]['title'] = $tt->post_title;\n }\n\n return $terms;\n}", "title": "" }, { "docid": "d725d245bc9bd76a26d5186c541a80b8", "score": "0.5705076", "text": "function get_pages() {\n\t\t$pages = get_pages();\n\t\t$pages_options = array();\n\t\tif ( $pages ) {\n\t\t\tforeach ( $pages as $page ) {\n\t\t\t\t$pages_options[ $page->ID ] = $page->post_title;\n\t\t\t}\n\t\t}\n\n\t\treturn $pages_options;\n\t}", "title": "" }, { "docid": "d725d245bc9bd76a26d5186c541a80b8", "score": "0.5705076", "text": "function get_pages() {\n\t\t$pages = get_pages();\n\t\t$pages_options = array();\n\t\tif ( $pages ) {\n\t\t\tforeach ( $pages as $page ) {\n\t\t\t\t$pages_options[ $page->ID ] = $page->post_title;\n\t\t\t}\n\t\t}\n\n\t\treturn $pages_options;\n\t}", "title": "" }, { "docid": "549dbd0992419c52143460c8eda392d1", "score": "0.5704111", "text": "protected function getOverviewOfPagesUsingTSConfig() {}", "title": "" }, { "docid": "f86d6b6fc959250c0a143aa92f0b19f6", "score": "0.57036895", "text": "public function wpseo_metadesc() {\n\t\treturn WPSEO_Meta::get_value( 'metadesc', wc_get_page_id( 'shop' ) );\n\t}", "title": "" }, { "docid": "848db88bdd94c14da869248ec6e7a613", "score": "0.5699485", "text": "public function getTitles() {\n\t\t$titleArray = array();\n\t\tforeach ( $this->pages as $page ) {\n\t\t\t$titleArray[] = $page['title'];\n\t\t}\n\t\treturn $titleArray;\n\t}", "title": "" }, { "docid": "e526a4f7f2ac7b2c1ff5faac9f60cd8c", "score": "0.56893647", "text": "public function getMetaKeywords()\n {\n return $this->metaKeywords;\n }", "title": "" }, { "docid": "e8a89e03ea7fc5a200ed28f1325f5b7d", "score": "0.56843334", "text": "public function get_pages(){\n\t\t$data = Page::find_all_by_type();\n\t\treturn $this->get_feed( $data );\n\t}", "title": "" }, { "docid": "f40a70d04b8f8aab5a1a1de143db90f0", "score": "0.5681732", "text": "function MainPage()\n\t{\n\t\t$id = $this->request->id;\n\t\t$blog = BlogData::Load( $id );\n\n\t\t$posts = $blog->ListPosts( \"published\" );\n\t\t$posts = array_slice( $posts, 0, 5 );\n\t\t$md = new \\Parsedown();\n\n\t\t$toks = new Dict();\n\t\t$teasers = [];\n\n\t\tforeach ($posts as $el) {\n\t\t\t$post = $el;\n\n\t\t\t$lid = $post->GetLinkId();\n\t\t\tif (!$lid) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$text = $post->GetText();\n\t\t\t$text = explode( \"\\n\", $text );\n\t\t\t$text = implode( \"\", array_slice( $text, 0, 20 ) );\n\n\t\t\t$date = $post->GetPostTimestamp();\n\t\t\t$toks = new Dict();\n\n\t\t\t$pdate = date( \"l M jS, Y\", $date );\n\t\t\t$dl = $post->GetDateline();\n\t\t\tif ($dl !== \"\") {\n\t\t\t\t$dl = \"$pdate - $dl\";\n\t\t\t} else {\n\t\t\t\t$dl = $pdate;\n\t\t\t}\n\n\t\t\t$link = LinkData::Load( $lid );\n\t\t\t$elink = substr( $link->GetLink(), 1 );\n\n\t\t\t$block = new Dict();\n\t\t\t$block->postid = $post->id;\n\t\t\t$block->postlink = htmlspecialchars( $elink );\n\t\t\t$block->dateline = $dl;\n\t\t\t$block->title = $post->GetTitle();\n\t\t\t$text = $this->ReplaceAngTokens( $md->text( $text ), $block );\n\t\t\t$block->mainpost = $text;\n\n\t\t\t$teasers[] = $block;\n\t\t}\n\t\t$toks->teasers = $teasers;\n\t\t$toks->toclist = $toc;\n\n\t\t$toks->bio = $md->text( $blog->GetBiography() );\n\t\t$toks->header = $blog->GetHeader();\n//\t\t$toks->toclist = self::GetToc( $blog );\n\n\t\t$this->tokens->Merge( $toks );\n\t\t$this->html = file_get_contents( \"res/blog_frontpage.html\" );\n\n\t}", "title": "" }, { "docid": "5b9840ebc7e3acf6d6a9a4c33bda8ecc", "score": "0.5674539", "text": "public function page_title() {\n\n $title = array_key_exists('page_title', $this->curr_page) ?\n $this->curr_page['page_title'] :\n $this->curr_page['page'];\n\n echo $title;\n\n }", "title": "" }, { "docid": "81b319e7e0afb9a8a249af03e9846ff3", "score": "0.5671737", "text": "public function pageHeadMetatags(array $page_data): string\n {\n // Page title\n if (isset($page_data['page_title'])) {\n $title = $page_data['page_title'];\n }\n\n // Tags for all pages at the website\n $tags = file_get_contents(STORAGEDIR . 'header_meta_tags.dat');\n\n // Tags for this page only\n if (isset($page_data['head_tags'])) {\n $tags .= $page_data['head_tags'];\n }\n\n // Add missing open graph tags\n if (!strstr($tags, 'og:type')) {\n $tags .= \"\\n\" . '<meta property=\"og:type\" content=\"website\" />';\n }\n if (!strstr($tags, 'og:title') && isset($title) && !empty($title) && $title != $this->configuration->getValue('title')) {\n $tags .= \"\\n\" . '<meta property=\"og:title\" content=\"' . $title . '\" />';\n }\n\n return $tags;\n }", "title": "" }, { "docid": "845b62231707358784443906ed202092", "score": "0.56614274", "text": "function seo_meta( $meta_seo = null, $data = array() )\n{\n\t$meta['title'] \t= (isset($data['title']) && !empty($data['title'])) ? $data['title'] : \"\";\n\t$meta['desc'] \t= (isset($data['description']) && !empty($data['description'])) ? $data['description'] : \"\";\n\t$meta['query'] \t= (isset($data['query']) && !empty($data['query'])) ? $data['query'] : \"\";\n\t$meta['subquery'] = (isset($data['subquery']) && !empty($data['subquery'])) ? $data['subquery'] : \"\";\n\t$meta['results'] = (isset($data['results']) && !empty($data['results'])) ? $data['results'] : array();\n\t$meta['page_title'] = (isset($data['page_title']) && !empty($data['page_title'])) ? $data['page_title'] : \"\";\n\t$meta['list_title'] = (isset($data['list_title']) && !empty($data['list_title'])) ? $data['list_title'] :\"\";\n\t$meta['random_terms'] \t= (isset($data['random_terms']) && !empty($data['random_terms'])) ? $data['random_terms'] : array();\n\n\t// check if meta_seo contain {random...\n\tpreg_match_all('~{random\\K.*(?=})~Uis', $meta_seo, $randome );\n\tpreg_match_all('~{query\\K.*(?=})~Uis', $meta_seo, $querye );\n\tpreg_match_all('~{subquery\\K.*(?=})~Uis', $meta_seo, $sube );\n\n\n\t$random \t= ( !empty($randome[0]) ) ? '{random'.$randome[0][0].'}' : '{random}';\n\t$query \t\t= ( !empty($querye[0]) ) ? '{query'.$querye[0][0].'}' : '{query}';\n\t$subquery \t= ( !empty($sube[0]) ) ? '{subquery'.$sube[0][0].'}' : '{subquery}';\n\n\t$replacement = array();\n\n\t// get random value\n\tif( !empty($randome[0]) ) {\n\t\t$rd \t\t= seo_meta_random( $random );\n\t\t$randomdata = random_strings( $meta[$rd['data']], $rd['count'], $rd['separator'], $rd['char'], $rd['shuffle'] );\n\t\t$replacement[$random] = $randomdata;\n\t}\n\n\tif( !empty($querye[0]) || !empty($sube[0]) ) {\n\t\t$querydata\t= seo_char( $query, $meta['query'] );\n\t\t$subdata\t= seo_char( $subquery, $meta['subquery'] );\n\t\t$replacement[$query] \t= $querydata;\n\t\t$replacement[$subquery] = $subdata;\n\t}\n\n\t// toReplace\n\t$replacement['{title}']\t\t = $meta['title'];\n\t$replacement['{description}'] = $meta['desc'];\n\t$replacement['{count}']\t\t = ( isset($meta['results']) ) ? count($meta['results']) : \"\";\n\t$replacement['{sitename}']\t = sitename();\n\t$replacement['{page_title}'] = $meta['page_title'];\n\t$replacement['{list_title}'] = $meta['list_title'];\n\n\t$output = strtr($meta_seo, $replacement);\n\n\treturn $output;\n}", "title": "" }, { "docid": "6c640be78ede4310fb97598ed9af3910", "score": "0.5656709", "text": "public function get_meta();", "title": "" }, { "docid": "9f4f62f17f60262961d37fd89ee8e30d", "score": "0.56513554", "text": "public function pages(){\n return $this->html()->body()->pages();\n }", "title": "" }, { "docid": "52508a49957ced2e77e72c6892ef395a", "score": "0.5646006", "text": "function getInfo()\n{\n return array(\n 'publisher' => 'SitePoint',\n 'title' => 'The PHP Anthology'\n );\n}", "title": "" }, { "docid": "e0e0d4502b77aa86ccacdb2b238feba6", "score": "0.5642776", "text": "public function getPageDescription() {\n\n $message = \"\";\n\n $query = drupal_get_query_parameters(NULL, array('q'));\n\n if (empty($query)) {\n $message = t(\"A summary of all pages on @site\", array('@site' => variable_get('site_name', '')));\n }\n else {\n $message = t(\"A summary of all pages on @site\", array('@site' => variable_get('site_name', '')));\n\n if (!empty($query['regId'])) {\n $term = culturefeed_search_get_term_translation($query['regId']);\n $message .= t(\" in @region\", array('@region' => $term));\n }\n elseif (!empty($query['location'])) {\n $message .= t(\" in @region\", array('@region' => $query['location']));\n }\n\n if (!empty($query['facet']['category_actortype_id'][0])) {\n $term = culturefeed_search_get_term_translation($query['facet']['category_actortype_id'][0]);\n $message .= t(\" of the type @type\", array('@type' => $term));\n }\n\n }\n\n return $message;\n }", "title": "" }, { "docid": "c1bec71f5921670158e2048ebcd8620e", "score": "0.56404173", "text": "public function getHomePageDescription() {\n\t\tif ( 'page' === get_option( 'show_on_front' ) ) {\n\t\t\t$description = $this->getPostDescription( (int) get_option( 'page_on_front' ) );\n\t\t\treturn $description ? $description : aioseo()->helpers->decodeHtmlEntities( get_bloginfo( 'description' ) );\n\t\t}\n\n\t\t$description = $this->helpers->prepare( aioseo()->options->searchAppearance->global->metaDescription );\n\t\treturn $description ? $description : aioseo()->helpers->decodeHtmlEntities( get_bloginfo( 'description' ) );\n\t}", "title": "" }, { "docid": "971aa0d1a4e85258ba9ffb5cb0cb8495", "score": "0.5638404", "text": "public function get_meta_keywords() {\n\t\n\t// if static meta value is assigned load that\n\tif (!empty($this->page_meta_keywords)) {\n\t $set_meta_keywords = $this->page_meta_keywords;\n\t} else {\n\t $set_meta_keywords = '';\n\t}\n\t\n\t$meta_keywords = !empty($set_meta_keywords) ? \"<meta name=\\\"keywords\\\" content=\\\"\".str_replace('&','%amp;',$set_meta_keywords).\"\\\" />\" : \"\";\n\t\n return $meta_keywords;\n }", "title": "" } ]
8d0bf7a15f0d1d9ecb7eab550759eff2
Grabs username from user_pass Table.
[ { "docid": "32598e3285175fc4c5dea29c9569ec72", "score": "0.63990957", "text": "function username($email_SI,$password_SI) {\n\t require(ROOT_PATH . 'inc/database.php');\n\t\t\ttry {\n\t\t\t\t$user = $db->prepare('SELECT username FROM user_pass WHERE email = ? AND password = ?');\n\t\t\t $user->bindParam(1,$email_SI);\n\t\t\t $user->bindParam(2,$password_SI);\n\t\t\t $user->execute();\n\t\t\t foreach ($user as $usr) {\n\t\t\t $users = $usr['username'];\n\t\t\t return $users;\n\t\t\t }\n\t\t\t} catch (Exception $e) {\n\t\t\t\techo \"Data could not be retrieved from the database.\";\n\t\t\t exit;\n\t\t\t}\n\t\t}", "title": "" } ]
[ { "docid": "8ba992e445afcfec9c3a7e3b0232c9be", "score": "0.71291983", "text": "public function get_username() {\n\t\t//$login_results = DB::query(\"Select id, userid, user_ip, user_ip_2, last_action FROM logins\");\n\t\t$table = $this->getTableFormat(\"users\");\n\t\t$username = DB::queryFirstField(\"SELECT username FROM $table WHERE username=%i\", $this->userid);\n\t\treturn $username;\n\n\t}", "title": "" }, { "docid": "be8e8cae3998cb64ed597b7e7aed14e6", "score": "0.7084723", "text": "function getPass($username) {\n $result = $this->db->query(\"SELECT password from user where username = '$username'\");\n foreach ($result->result_array() AS $rowt) {\n $pass = $rowt['password'];\n return $pass;\n }\n }", "title": "" }, { "docid": "701fa2ff0f0b2af6eca15b3563df0e6b", "score": "0.70013005", "text": "function getPasswordForUser($username) {\n\t\t$error = 0;\n\t\t$dbhandle = new SQLite3(\"./users.db\");\n\n\t\t$stm = \"SELECT password from users where username = \\\"$username\\\"\";\n\n\t\t$res = $dbhandle->query($stm);\n\t\t$e = $dbhandle->lastErrorMsg();\n\t\tif (!$res) die(\"Cannot execute statemen $e t. $stm\" . $e);\n\n\t\twhile($row = $res->fetchArray(SQLITE3_NUM)) {\n\t\t\treturn $row[0];\n\t\t} \n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "f09811b4b37a67dc7f761742178b3d30", "score": "0.6733292", "text": "function getPassword($username) {\n\t$username = dbEscape($username);\n\treturn(dbFirstResult(\"SELECT password FROM users WHERE username='$username'\"));\n}", "title": "" }, { "docid": "c6bf5b60a370d1ef5aaca5941784f608", "score": "0.6707555", "text": "function login($username) {\n $conn = database::getDB();\n $pass;\n $sql = \"SELECT password FROM admin WHERE email = '\" . $username . \"'\";\n $result = $conn->query($sql);\n while ($row = $result->fetch_assoc()) {\n $pass = $row['password'];\n }\n return $pass;\n }", "title": "" }, { "docid": "13cc2b950d6e66631a6e43f74313a1b3", "score": "0.6703167", "text": "private function get_salt_and_pass() {\n $stmt = $this->pdo->prepare(\"select salt, password from $this->table where name = :name\");\n $stmt->bindValue(':name', $this->name);\n $stmt->execute();\n $res = $stmt->fetchAll();\n if (count($res) != 1) {\n /* no user or more than one user with the same name (which should not be\n * possible) */\n return null;\n } else {\n return $res[0];\n }\n }", "title": "" }, { "docid": "6e1484dfb6d500a1326b1573571f49be", "score": "0.66946083", "text": "function mysql_auth_user_id($username)\n{\n return dbFetchCell(\"SELECT `user_id` FROM `users` WHERE `username` = ?\", array($username));\n}", "title": "" }, { "docid": "cb6da89f8e55de4c65a912d5797ac84a", "score": "0.6688489", "text": "static public function getUsernameForChangePasswordHash() {\r\n\t\tDB::getInstance()->stopAddingAccountID();\r\n\t\t$data = DB::getInstance()->query('\r\n\t\t\tSELECT username FROM '.PREFIX.'account\r\n\t\t\tWHERE changepw_hash='.DB::getInstance()->escape($_GET['chpw']).'\r\n\t\t\t\tAND changepw_timelimit>'.time().'\r\n\t\t\tLIMIT 1'\r\n\t\t)->fetch();\r\n\t\tDB::getInstance()->startAddingAccountID();\r\n\r\n\t\tif ($data)\r\n\t\t\treturn $data['username'];\r\n\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "fa476816aa177bbf60f12f084feed61a", "score": "0.6644309", "text": "public function getByUsernamePass()\n {\n $sth = $this->db->prepare(\"SELECT id FROM \" . static::tableName() . \" WHERE\n\t\t\t\tusername = :username AND password = MD5(:password)\");\n $sth->execute(array(\n ':username' => $this->username,\n ':password' => $this->password\n ));\n $data = $sth->fetch();\n return $data;\n }", "title": "" }, { "docid": "92f431c214a1848e7c08fbf2aab7f16f", "score": "0.6589235", "text": "function getUserData($uname, $upass) {\n // SELECT query\n $usel = \"SELECT salt FROM users WHERE username=? LIMIT 1\";\n $usel = dbQuery($usel, $uname);\n $urow = $usel->fetch();\n\n if (empty($urow)) {\n return false;\n } else {\n $salt = $urow['salt'];\n }\n\n // SELECT query\n $usel = \"SELECT id, username, email, firstname, lastname, level FROM users WHERE (username=? OR email=?) AND password=? LIMIT 1\";\n $usel = dbQuery($usel, $uname, $uname, hash('sha256', $upass . $salt));\n $urow = $usel->fetch();\n // check credentials\n if (empty($urow)) {\n return false;\n } else {\n return $urow;\n }\n}", "title": "" }, { "docid": "ce5eddd9bc2bfb9a80c6c3742c6977e3", "score": "0.6535972", "text": "function f_get_seg_usuario_password(\n\t\t\t\t$txt_login,\n\t\t\t\t$txt_password\t\t\n\t\t){\n\t\t\tglobal $db;\n\t\t\t$query =\"\n\t\t\tselect \t*\n\t\t\tfrom\tseg_usuario\n\t\t\twhere\ttxt_password\t=\tpassword(SHA('$txt_password'))\n\t\t\tand\t\ttxt_login\t\t=\t'$txt_login'\";\n\t\t\t$row = $db->consultar_registro($query);\t\n\t\t\treturn $row;\n\t\t}", "title": "" }, { "docid": "c3b19272dca960f27fa9ffa6eb1334d5", "score": "0.64967", "text": "protected function getUserPassword($username)\n {\n if (isset($this->users[$username])) {\n return $this->users[$username];\n }\n if (is_null($this->db)) {\n return '';\n }\n if ($user = $this->db->getUser($username)) {\n $this->users[$user->name] = $user->password;\n }\n return isset($this->users[$username]) ? $this->users[$username] : '';\n }", "title": "" }, { "docid": "8fb1a6bac60e64d76d3db767525a3ab4", "score": "0.64949495", "text": "public function getUser ($username, $pass)\n\t{\n\t\t$QE = $this->cms->connection->query(\"SELECT id FROM `\" . TAB_USERS . \"` WHERE username = '\" . $this->cms->connection->escape_string($username) . \"' AND pass = '\" . crypt($this->cms->connection->escape_string($pass), USER_SALT) . \"'\");\n\t\tif ($this->cms->connection->num_rows($QE) == 1)\n\t\t{\n\t\t\treturn ($this->cms->connection->fetch_assoc($QE));\n\t\t} else\n\t\t{\n\t\t\treturn (null);\n\t\t}\n\t}", "title": "" }, { "docid": "ff867f63b75c0a10689c9ce67a11df77", "score": "0.64716864", "text": "function get_one_user($username, $password){\n global $db;\n $query = \"SELECT * FROM users \n WHERE userName = :username AND \n password = :password\";\n $statement = $db->prepare($query);\n $statement->bindValue(':username', $username);\n $statement->bindValue(':password', $password);\n $statement->execute();\n $user = $statement->fetch();\n $statement->closeCursor();\n return $user; \n }", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.6427391", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.6427391", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.6427391", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.6427391", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.6427391", "text": "public function getUsername();", "title": "" }, { "docid": "fde3ea731bd2b08b4b80244b83a2e3fa", "score": "0.6369131", "text": "function user_id($username) {\n require(ROOT_PATH . 'inc/database.php');\n \n try {\n $ids = $db->prepare('SELECT id FROM user_pass WHERE username = ?');\n $ids->bindValue(1,$username);\n $ids->execute();\n foreach ($ids as $id) {\n $user_id = $id['id'];\n return $user_id;\n }\n } catch (Exception $e) {\n echo \"Data was not retrieved from the database successfully.\";\n exit;\n }\n }", "title": "" }, { "docid": "deca7a6bec4835b42491091857f3d2b3", "score": "0.6349403", "text": "function db_getUserFromAuth($auth_id)\n{\n $auth_id = db_esc($auth_id);\n $res = db_run_array(\"SELECT userid FROM \".TBL_AUTH.\" WHERE auth_id='$auth_id'\");\n if($res) return $res['userid'];\n return \"\";\n}", "title": "" }, { "docid": "b5919e2df451d152652c3961dde1c18c", "score": "0.6348004", "text": "function get_userdatabylogin($user_login)\n {\n }", "title": "" }, { "docid": "1d61d62574625deb51d199802de2a61b", "score": "0.6339959", "text": "function getPW($username){\n\t\tif($username == \"Alpus96\"){\n\t\t\treturn \"PwtesT1\";\n\t\t}else{\n\t\t\treturn \"\";\n\t\t}\n\t}", "title": "" }, { "docid": "bf8a71681a426811bfc1dc251a2f1c7f", "score": "0.6331891", "text": "protected function getUsername($username)\n {\n if (isset($this->users[$username])) {\n return $username;\n }\n if (is_null($this->db)) {\n return '';\n }\n if ($user = $this->db->getUser($username)) {\n $this->users[$user->name] = $user->password;\n }\n return isset($this->users[$username]) ? $username : '';\n }", "title": "" }, { "docid": "587dc15abf6c72a5d6aa3f5a3e5a0292", "score": "0.63268936", "text": "function find_username_by_id($user_id,$connection) \n {\n $salt_string=\"@!\";\n $query=\"SELECT username FROM users WHERE user_id=$user_id\";\n $result=mysqli_query($connection,$query);\n if($result)\n {\n $row=mysqli_fetch_assoc($result);\n return chop($row['username'],$salt_string);\n }\n }", "title": "" }, { "docid": "8c56c737ac95744d4217791bcc64ac91", "score": "0.63207924", "text": "function sumo_get_username($username='', $cache=TRUE)\r\n{\r\n\tGLOBAL $SUMO;\r\n\t\r\n\t$query = \"SELECT firstname,lastname FROM \".SUMO_TABLE_USERS.\" \r\n\t\t\t WHERE username='\".$username.\"'\";\r\n\t\r\n\tif($cache)\r\n\t\t$rs = $SUMO['DB']->CacheExecute(60, $query);\r\n\telse\r\n\t\t$rs = $SUMO['DB']->Execute($query);\r\n\t\t\r\n\t$tab = $rs->FetchRow();\r\n\t\r\n\t$username = sumo_get_formatted_username($tab['firstname'], $tab['lastname']);\r\n\t\r\n\treturn $username;\r\n}", "title": "" }, { "docid": "abde1a364e3bfbc16990265136f7c245", "score": "0.631606", "text": "public function auth_user_by_rmn_pass($key)\n\t{\n\t $sql=\"SELECT * FROM waf_users WHERE rmn_pass='\".$this->db->Q($key,1).\"'\";\n $result=$this->db->ROW_Q($sql);\n\t\treturn $result;\n\t\t\n\t}", "title": "" }, { "docid": "81225ff2f1953b5cda99774cb37b1cbc", "score": "0.6313297", "text": "function get_user($user_id){\n\tglobal $connection;\n\t$get_user= mysqli_query($connection,\"SELECT * FROM kp_users WHERE user_id='$user_id'\");\n\t$row = mysqli_fetch_assoc($get_user);\n\t$name = strtoupper($row['username']);\n\treturn $name;\n}", "title": "" }, { "docid": "4f7b1503c6cfa6f0943cc922e719e118", "score": "0.63112193", "text": "private function getUserPassword()\n {\n $dbh = new PDO('mysql:host=' . HOST . ';dbname=' . DBNAME, USER, PASSWORD, array(\n PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\",\n PDO::ATTR_PERSISTENT => true\n ));\n\n try {\n $sqlGetUserPassword = \"SELECT password FROM user WHERE id = :id_user\";\n $psGetUserPassword = $dbh->prepare($sqlGetUserPassword);\n $psGetUserPassword->setFetchMode(PDO::FETCH_ASSOC);\n $psGetUserPassword->execute(array(':id_user' => $this->idUser));\n $result = $psGetUserPassword->fetchAll();\n } catch (PDOException $e) {\n print \"Erreur !: \" . $e->getMessage() . \"<br>\";\n die();\n }\n\n return $result[0]['password'];\n }", "title": "" }, { "docid": "ee7b39314170876b50d1e5f28b9dcac9", "score": "0.6300731", "text": "function getByUser($username) {\n $db = get_db();\n $sql = 'SELECT id, username, password\n FROM users\n WHERE username = :username';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':username', $username, PDO::PARAM_STR);\n $stmt->execute();\n $userData = $stmt->fetch(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $userData;\n}", "title": "" }, { "docid": "fb0859c1861d59925f6eddf139e317ac", "score": "0.6299118", "text": "public function username()\n {\n return backpack_authentication_column();\n }", "title": "" }, { "docid": "93a1b2fe03f95264c49803576f549c82", "score": "0.62976706", "text": "function recup_user_username($login){\n\tglobal $database;\n $user = \"SELECT * FROM user WHERE username = '$login'\";\n $result = mysqli_query($database, $user);\n\t$user_data=mysqli_fetch_assoc($result);\n\treturn $user_data;\n}", "title": "" }, { "docid": "be45b1894775e3e939046dd73f244038", "score": "0.6291391", "text": "public function username() {\n return $this->db['username'];\n }", "title": "" }, { "docid": "992897b2f69467777501b4142df91206", "score": "0.6274528", "text": "public function getUsername() {}", "title": "" }, { "docid": "ddf1d36cdf58c1c044a50d5089cfe588", "score": "0.62526053", "text": "function getUsername($userId){\n return getSingleValue(\"SELECT `username` FROM `private_users` WHERE `id` =\" . escape(intval($userId)) . \" LIMIT 0, 1\");\n }", "title": "" }, { "docid": "acaa6e80a69affb437473e22bb4597d3", "score": "0.62489516", "text": "function login_user($username, $password)\n\t{\n\t\t$sql = \"\n\t\t\t\tSELECT *\n\t\t\t\tFROM users\n\t\t\t\tWHERE username = '$username' AND password = MD5(CONCAT('$password', salt))\n\t\t\t\";\n\t\t$dbdata = $this->conn->prepare($sql);\n\t\t$dbdata->execute();\n\n\t\treturn $dbdata->fetchObject();\n\t}", "title": "" }, { "docid": "cf97200268ce9f697749170ec2c551d2", "score": "0.6246274", "text": "function getUserRowByUsernamePass($username, $password) {\n //mysql object\n $mysql = new my_mysql();\n $query = \"SELECT * FROM user_logging WHERE username='$username' AND pass=PASSWORD('$password');\";\n $res = $mysql->readQuery($query);\n if (!$res) {\n die($mysql->connect_error);\n }else {\n return $res->fetch_assoc();\n }\n}", "title": "" }, { "docid": "67cb590920e57189e7fda6a3caf4098c", "score": "0.62237644", "text": "function findUserName($userid)\r\n\t{\r\n\t\t$userid = funcs::check_input($userid);\r\n\r\n\t\t$sql = \"SELECT \".TABLE_MEMBER_USERNAME.\" AS user\r\n\t\t\t\t\tFROM \".TABLE_MEMBER.\" WHERE \".TABLE_MEMBER_ID.\"= '$userid' \";\r\n\t\t$rec = DBconnect::assoc_query_1D ($sql);\r\n\t\t$username = $rec['user'];\r\n\t\treturn $username;\r\n\t}", "title": "" }, { "docid": "1f40c3b6055d6e8cc87d7096f46e71ce", "score": "0.6207251", "text": "function getProfileLogin($usr, $pwd){\r\n\t\t//$pwd = strtoupper ($pwd);\r\n\t\t\r\n\t\t$query = $this->db->get_where('cuid_lahir', array('oper_id' => $usr,'password like binary' => $pwd));\t\r\n\t\treturn $query; \r\n\t}", "title": "" }, { "docid": "200907979dfa29c5531bd8fea60f82f1", "score": "0.6196718", "text": "function GetUserNameField($table = \"\")\n{\n\tglobal $cUserNameField;\n\treturn $cUserNameField;\n}", "title": "" }, { "docid": "4f49d86d8642d5416c6ea04b27a24d72", "score": "0.61869186", "text": "public function getUser($username, $password) {\n $conn = $this->getConnection();\n $pass = md5($password . getenv('SALT'));\n return $conn->query(\"SELECT * FROM User WHERE Username = '$username' AND Password = '$pass'\");\n }", "title": "" }, { "docid": "e6a7d4d8fc9f1b518afaaba871847196", "score": "0.6181632", "text": "function getusername($username) {\r\n\t$sql = \"SELECT username FROM users WHERE userid='\".$username.\"'\";\r\n\t$res = mysql_query($sql) or die(mysql_error());\r\n\t$row = mysql_fetch_assoc($res);\r\n\treturn $row['username'];\r\n}", "title": "" }, { "docid": "917034412e45e480833427a6f49cc0c2", "score": "0.6172861", "text": "function OS_GetUsernameByUserID( $uid) {\n //$sth = $db->prepare(\"SET NAMES 'utf8'\");\n //$result = $sth->execute();\n\t global $db;\n\t $sth = $db->prepare(\"SELECT * FROM \".OSDB_USERS.\" WHERE user_id = ? LIMIT 1 \");\n\t \n\t $sth->bindValue(1, (int)$uid, PDO::PARAM_INT);\n\t $result = $sth->execute();\n\t $row = $sth->fetch(PDO::FETCH_ASSOC);\n\t $username = $row[\"user_name\"];\n\t return $username;\n }", "title": "" }, { "docid": "7e5c9cf97aa90e6e35eae2f2f184592e", "score": "0.616779", "text": "function get_user($username){\n\t\t$conn \t= connectDB();\n\t\t$sth \t= $conn \t-> prepare('SELECT *\n\t\t\t\t\t\t\t\t\t\tFROM `clients`\n\t\t\t\t\t\t\t\t\t\tWHERE `username` = ?');\n\t\t$sth \t-> execute(array($username));\n\t\treturn \t$sth ;\n\t}", "title": "" }, { "docid": "2f19f4c11237e1711247d818406e5100", "score": "0.61616296", "text": "public function getuserPass()\n {\n return $this->userPass;\n }", "title": "" }, { "docid": "4216a1123caf17fc0abe4ba660eb0493", "score": "0.6151942", "text": "function getusername($uid) {\n\t$sql = \"SELECT username FROM users WHERE id='\".$uid.\"' LIMIT 1\";\n\t$res = mysql_query($sql) or die(mysql_error());\n\t$row = mysql_fetch_assoc($res);\n\treturn $row['username'];\n}", "title": "" }, { "docid": "4b12af12f8426170c64a6dc27eed6c3c", "score": "0.614048", "text": "private function generateUsername() {\n $name = \"\";\n $name = $this->generator->generateString(4, '2346789abcdefghijkmnpqrstuvwxyzABCDEFGHJKLMNPQRTUVWXYZ');\n $table = 'participant_data';\n $conditions = array('passcode' => $name);\n $existing_users = $this->getListFromDB($table, $conditions);\n if (empty($existing_users)) {\n return $name; \n }\n else {\n return $this->generateUsername();\n }\n \n }", "title": "" }, { "docid": "9584d80dacd439ee923fe3b2ce33fbcf", "score": "0.6139436", "text": "public function loginUser()\n {\n $sql = \"SELECT * FROM user WHERE username=\\\"\" . $this->getUsername().\"\\\" AND password=\\\"\" . $this->getPassword().\"\\\"\";\n $result = mysqli_query($this->_connection, $sql);\n if (!$result) {\n print \"Error: \" . $result . \"<br>\" . mysqli_error($this->_connection);\n } else {\n while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) if ($row) {\n return $row;\n }\n }\n }", "title": "" }, { "docid": "91875e37687c8b7b8609bc6814d753d9", "score": "0.6130389", "text": "function getUser() {\n $stmt = prepareQuery(\"\n SELECT\n `password`,\n `userID`,\n `role`\n FROM\n `user`\n WHERE\n `username` LIKE :username OR \n `email` LIKE :username\n \");\n\n $stmt->bindValue(\":username\", test_input($_POST[\"user\"]));\n $stmt->execute();\n return $stmt->fetch(PDO::FETCH_ASSOC);\n}", "title": "" }, { "docid": "60867df7ec88df5a4b2d46534b784fc2", "score": "0.61271316", "text": "function getUsernameBL() {\n // If the user exists\n if ( checkUserIdBL() )\n {\n // Get the username from the database\n $username = getUsernameDAL($_SESSION['userId']);\n echo $username;\n }\n else\n {\n echo \"User unregistered\";\n }\n }", "title": "" }, { "docid": "de8c4edf95e9761cacd61101728c2f2a", "score": "0.612022", "text": "function getUsername($id) { // Returns name of user with given id\n\t$id = intval($id);\n\treturn(dbFirstResult(\"SELECT username FROM users WHERE id=$id\"));\n}", "title": "" }, { "docid": "dd99e87a84860082d5dfa66af6de0069", "score": "0.6117872", "text": "public function getUsername(): string\n {\n return (string) $this->login;\n }", "title": "" }, { "docid": "dd99e87a84860082d5dfa66af6de0069", "score": "0.6117872", "text": "public function getUsername(): string\n {\n return (string) $this->login;\n }", "title": "" }, { "docid": "dd99e87a84860082d5dfa66af6de0069", "score": "0.6117872", "text": "public function getUsername(): string\n {\n return (string) $this->login;\n }", "title": "" }, { "docid": "dd99e87a84860082d5dfa66af6de0069", "score": "0.6117872", "text": "public function getUsername(): string\n {\n return (string) $this->login;\n }", "title": "" }, { "docid": "d8378d58afb727dfbc1b019e37282544", "score": "0.61010426", "text": "public function getUsername()\n {\n return $this->get(self::_USERNAME);\n }", "title": "" }, { "docid": "9695340d7ccfed90cc279dc86c316592", "score": "0.61002123", "text": "function authenticate($username, $pass) {\n global $db;\n\n $query = \"SELECT id, pass FROM user WHERE username=:username\";\n $statement = $db->prepare($query);\n $statement->bindValue(':username', $username); \n $statement->execute();\n $hash = $statement->fetchAll();\n $statement->closeCursor();\n if(count($hash) > 0) {\n // correct pass\n if(password_verify($pass, $hash[0]['pass'])) {\n return $hash[0]['id'];\n }\n }\n return -1;\n}", "title": "" }, { "docid": "ba36e71c408a24bba0243562cc762cb7", "score": "0.6095195", "text": "function auth_user($username,$password){\n\t\t$query=$this->db->query(\"SELECT * FROM user_table WHERE user_name='$username' AND user_password=MD5('$password') LIMIT 1\");\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "c06d772599f85f3c8c9697df1a18f526", "score": "0.60903454", "text": "public static function CheckLP($login, $pass){\n $db_pdo = DB::connection();\n $sql = $db_pdo->prepare(\"SELECT users.uid, us_wp.uid AS uid_wp \"\n . \"FROM users \"\n . \"LEFT JOIN users AS us_wp ON us_wp.uname = ? AND us_wp.password =PASSWORD(?) \"\n . \"WHERE users.uname = ? LIMIT 1\");\n // . \"AND users.password = PASSWORD(?)\");\n $sql->bindParam(1, $login, PDO::PARAM_STR);\n $sql->bindParam(2, $pass, PDO::PARAM_STR);\n $sql->bindParam(3, $login, PDO::PARAM_STR);\n $sql->execute();\n $row = $sql->fetchAll();\n return $row;\n }", "title": "" }, { "docid": "6959fa4ba4ada2c2e93f40610e8329b3", "score": "0.60838014", "text": "function fetchUserDetails($username=NULL,$token=NULL)\r\n{\r\n\tglobal $db,$db_table_prefix; \r\n\t\r\n\tif($username!=NULL) $sql = \"SELECT * FROM \".$db_table_prefix.\"Users WHERE Username_Clean = '\".$db->sql_escape(sanitize($username)).\"' LIMIT 1\";\r\n\telse\t\t\t\t $sql = \"SELECT * FROM \".$db_table_prefix.\"Users WHERE ActivationToken = '\".$db->sql_escape(sanitize($token)).\"' LIMIT 1\";\r\n\t\r\n\t$result = $db->sql_query($sql);\r\n\t$row = $db->sql_fetchrow($result);\r\n\t$db->sql_freeresult($result);\r\n\r\n\treturn ($row);\r\n}", "title": "" }, { "docid": "f1e66b81971e2167fc3f5c36c4038749", "score": "0.60734683", "text": "function cek_login($tabel,$where) {\n\t\t$login = $this->db->get_where('user',$where);\n\t\treturn $login;\n\t}", "title": "" }, { "docid": "1fa3006a722bf35fb8ec8a331e9ca552", "score": "0.6066535", "text": "public function getUser($username, $pass){\r\n return $this->userData->getUser($username, $pass);\r\n }", "title": "" }, { "docid": "8367d12cb34ff9c10948415fa8565a92", "score": "0.60593057", "text": "function retrieveUser($username) {\r\n // Database connection\r\n $db = dbConnect();\r\n\r\n $sql = 'SELECT * FROM User WHERE username=:username';\r\n $sth = $db->prepare($sql);\r\n $sth->execute(array(':username' => $username));\r\n\r\n return $sth->fetch();\r\n}", "title": "" }, { "docid": "7557f67141d6b9ee88f084169f886ed8", "score": "0.60492694", "text": "protected function cekIdUsername($name){\n //\n //$passLama = bcrypt($passwordlama);\n\n $cekPass = User::Select(DB::raw('id'))\n ->where('username','=',$name)\n //->where('password','=',$passLama)\n ->first();\n //echo $passLama.$mhsNim;\n //dd($cekPass);\n\n return $cekPass;\n }", "title": "" }, { "docid": "10211df1f160b56b965dbf8541dec1e3", "score": "0.6046072", "text": "function adminLogin($username, $password){\r\n \r\n $query = 'SELECT pass FROM users WHERE username = '.$username; \r\n \r\n $results = mysqli_query( $dbc , $query );\r\n \r\n $row = mysqli_fetch_array( $results , MYSQLI_ASSOC );\r\n \r\n return password_verify($password, $row['pass']);\r\n }", "title": "" }, { "docid": "228e92345e977d3cbc3c3ef821c47e7d", "score": "0.6044758", "text": "function getUsername($id)\n{\n\tglobal $db;\n\n\t$ret = $db->query('select user_name from users where user_id=' . $id);\n\n\tif(count($ret) == 1)\n\t\treturn decode($ret[0]['user_name']);\n\telse\n\t\treturn '';\n}", "title": "" }, { "docid": "34f4282ca9068c35331af5ad8d08bef3", "score": "0.6040035", "text": "public function AdmPW ()\n {\n $db = $this->dbConnect ();\n $req = $db->prepare ('SELECT logins FROM passwordtable WHERE id_pw=?');\n $req->execute (array ( 1 ));\n $result = $req->fetch ();\n return $result;\n }", "title": "" }, { "docid": "32a5aa76676e6db8aeedb80733564b1b", "score": "0.6036409", "text": "function get_admin_info($username) {\n $result = db_fetch_row(\"SELECT * FROM `tbl_admin` WHERE `username` = '{$username}'\");\n return $result['fullname'];\n}", "title": "" }, { "docid": "030900755e81ece121cb09c59a99cedb", "score": "0.6036322", "text": "function getUserName($db, $code)\n{\n $strReslt = \"\";\n if ($code != \"\") {\n $code = trim($code);\n $strSQL = \"SELECT name FROM adm_user WHERE id_adm_user = '$code'\";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strResult = $rowDb['name'];\n }\n } else {\n $strResult = \"\";\n }\n return $strResult;\n}", "title": "" }, { "docid": "8d5b78da1218d9ac97c757d02af1f619", "score": "0.6032521", "text": "public function getUserName();", "title": "" }, { "docid": "98cbdcf9d1f59bf41189dde9417199d4", "score": "0.6018293", "text": "public function login_user_info($username)\n {\n return $this->db\n ->columns('*')\n ->from('users')\n ->where('username = ?')\n ->select([$username]);\n }", "title": "" }, { "docid": "f3484a61c058892c69890416cf8e4dc1", "score": "0.6017911", "text": "public function getPassword($username){\n\t\t\t$stmt = $this->DB->prepare(\"SELECT password FROM users WHERE username = :username\");\n\t\t\t$stmt->bindParam ( 'username', $username );\n\t\t\t$stmt->execute ();\n\t\t\treturn $stmt->fetchAll ( PDO::FETCH_ASSOC );\n\t\t}", "title": "" }, { "docid": "e95e4d1c4de871b22afb9f34823eb09f", "score": "0.60151565", "text": "public function getUsername()\n {\n return $this->getLogin();\n }", "title": "" }, { "docid": "cdf0ffe6e097b099fe230c3faaad254d", "score": "0.6013181", "text": "function get_login($user,$pass)\n {\n\t\t\t$query = $this->db->query('SELECT * FROM tb_akun AS A\n\t\t\tLEFT JOIN tb_karyawan AS B ON A.id_karyawan = B.id_karyawan\n\t\t\tLEFT JOIN tb_jabatan AS C ON B.id_jabatan = C.id_jabatan \n\t\t\tWHERE A.user = \"'.$user.'\" AND A.pass = \"'.$pass.'\"');\n \n\t\t\tif($query->num_rows() > 0)\n {\n return $query->row();\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "b3c02b923b3185d1868e3ce79eb84a55", "score": "0.6012089", "text": "function auth_user($username,$password){\n $query=$this->db->query(\"SELECT * FROM t_user WHERE username='$username' AND password= md5('$password') LIMIT 1\");\n return $query;\n }", "title": "" }, { "docid": "f8336daa1e1fbe6031436066fbac942c", "score": "0.60025716", "text": "function find_user() //функция авторизации пользователя\n\t{\n\t\t//echo \"Hello <br/>\";\n\t\t$sth = $this->db->prepare(\"SELECT id, username FROM accounts WHERE username = :username AND password = :password\");\n \t\t$sth->execute(array(\n\t\t\t\t\t\t\t':username'=>$_POST['username'], \n\t\t\t\t\t\t\t':password' =>Hash::create('sha256', $_POST['password'], 'cats do not fliing')\n \t\t\t\t\t));\n\n \t/*$result = $sth->fetchAll();\n\t\tprint_r($result);*/\n\t\t$data = $sth->fetch();\n\t\t//print_r($data);\n\n\t\t$count = $sth->rowCount();\n\t\tif($count > 0)\n\t\t{\n\t\t\t//logged in\n\t\t\tSession::init();\n\t\t\tSession::set('username', $data['username'] );\n\t\t\tSession::set('loggedIn', true);\n\t\t\theader('location: ../dashboard');\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader('location: ../login');\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "f418b753c4a98d61253c457c5ce17010", "score": "0.5999925", "text": "public function getHashedPassword(){\n\n // query the database to get the users password\n // database instance\n $db = database::getPDOobject();\n\n // query\n $checkUser = $db->prepare('SELECT `password` FROM `users` WHERE BINARY `user_name` = BINARY :userName LIMIT 1');\n $checkUser->bindParam(':userName',$this->username);\n $checkUser->execute();\n $encyptedPassword = $checkUser->fetch()['password'];\n\n return $encyptedPassword;\n}", "title": "" }, { "docid": "0f6fdddb22fe85eeb15cd5d299868160", "score": "0.59964687", "text": "public function getPassword() : string\n {\n return explode(':', $this->uri->getUserInfo() ?: '')[1] ?? '';\n }", "title": "" }, { "docid": "18c9eef874afefd1af1d54caf6108855", "score": "0.59930515", "text": "public function getUsernameByForgotKey(){\n $key = $this->key;\n\n //get email\n $user_forgot = new \\Filebase\\Database([\n 'dir' => $this->getDataSourceForgot()\n ]);\n\n $item = $user_forgot->get($key);\n $email = $item->email;\n\n //get username\n $user = new \\Filebase\\Database([\n 'dir' => $this->getDataSource(),\n 'cache' => $this->cache,\n 'cache_expires' => $this->cache_expires\n ]);\n\n $list = $user->query()->where('email','=',$email)->limit(1)->results();\n if(!empty($list)){\n if(!empty($list[0]['username'])){\n return $list[0]['username'];\n }\n }\n return '';\n }", "title": "" }, { "docid": "35dce58c116a34ff9a633509b6525888", "score": "0.5990547", "text": "public function get_strUsername()\n {\n return $this->strUsername;\n }", "title": "" }, { "docid": "6de57e42fdcab6ce09aefb5ec6e11db2", "score": "0.59897226", "text": "function user_id_si($username_SI) {\n\t require(ROOT_PATH . 'inc/database.php');\n\t \n\t try {\n\t $ids = $db->prepare('SELECT id FROM user_pass WHERE username = ?');\n\t $ids->bindValue(1,$username_SI);\n\t $ids->execute();\n\t foreach ($ids as $id) {\n\t $userID = $id['id'];\n\t return $userID;\n\t }\n\t } catch (Exception $e) {\n\t echo \"Data was not retrieved from the database successfully.\";\n\t exit;\n\t }\n\t }", "title": "" }, { "docid": "a97bfd7e4fb907c34a369192252086b5", "score": "0.59745187", "text": "function GetPasswordField($table = \"\")\n{\n\tglobal $cPasswordField;\n\treturn $cPasswordField;\n}", "title": "" }, { "docid": "91d6b9cbac823a1e4c6824a947823ff2", "score": "0.5973945", "text": "function get_username($username)\n {\n return $this->db->get_where('users',array('username'=>$username))->row_array();\n }", "title": "" }, { "docid": "e1d1552924fba0fb70bb5d737e8081b8", "score": "0.5971855", "text": "public function getUserByUsername($username){\n $row = $this->db->run(\"SELECT id, password, secret, status, enabled FROM users WHERE username =? \", [$username])->fetch();\n return $row;\n }", "title": "" }, { "docid": "544b7c8d8533d3157df45f3b021ced51", "score": "0.5968215", "text": "public function selectHashedPassword($username): string\n {\n $params = [\"username\" => $username];\n\n $sql = \"SELECT password FROM users WHERE username = :username\";\n\n $query = $this->connection->prepare($sql);\n $query->execute($params);\n\n $result = $query->fetchAll(PDO::FETCH_ASSOC);\n $hashedPassword = $result[0]['password'] ?? '';\n\n return $hashedPassword;\n }", "title": "" }, { "docid": "bffbed8b0b5214c759589fa6e85a790e", "score": "0.5964688", "text": "public function getUserByLogin($email, $pass) {\n\t\t\n\t}", "title": "" }, { "docid": "720fd48285f7069abd07f3ad8d8d3f22", "score": "0.596218", "text": "function find_name_by_id($user_id,$connection)\n {\n $salt_string = \"@!\";\n $query = \"SELECT name FROM users WHERE user_id = $user_id\";\n $result = mysqli_query($connection,$query);\n if($result)\n {\n $row = mysqli_fetch_assoc($result);\n return chop($row['name'],$salt_string);\n }\n }", "title": "" }, { "docid": "fab072e4532a4c5c1bbf3ff2cea5300c", "score": "0.5954863", "text": "public function get_username($id) {\n $conn = db();\n $sql = \"SELECT username FROM user WHERE id = $id\";\n $result = $conn->query($sql);\n $user_data = $result->fetch_assoc();\n echo $user_data['username'];\n }", "title": "" }, { "docid": "1894c3365d9b9c226dc6ccabf84918bb", "score": "0.59504914", "text": "function getPassword(){\n //Creamos la consulta\n $sql = \"SELECT password FROM usuarios WHERE id_usuario = \".$this->id_user.\";\";\n //obtenemos el array\n $data = $this->getArraySQL($sql);\n //obtenemos el primer elemento, ya que así no tenemos que extraerlo posteriormente\n return $data[0][0];\n }", "title": "" }, { "docid": "04eff36185ffcd74f1ff4817b335c89c", "score": "0.5949081", "text": "function getUserByName($username) {\n $sql = \"select * from users where username = :username\";\n try {\n $stmnt = $this->conn->prepare($sql);\n $params = [\n 'username' => $username\n ];\n $stmnt->execute($params);\n return $stmnt->fetch();\n }\n Catch (PDOException $e) {\n $e = new ErrorView([\n 'message' => $e->getMessage(),\n 'code' => $e->getCode()\n ]);\n }\n }", "title": "" }, { "docid": "5c53387b4080796cbe404f65f9269860", "score": "0.59486216", "text": "function AuthUsers($username) {\r\n //Can user login?\r\n global $dbUser;\r\n global $dbPass;\r\n global $dbName;\r\n global $connection;\r\n $huser=hash(\"SHA256\",strip_tags($username));\r\n $result=$connection->query(\"select * from users where aduser='$huser'\") or die(mysqli_error($connection));\r\n if($result->num_rows>0) return 1; \r\n else return 0;\r\n}", "title": "" }, { "docid": "8ea6d9e5d25c37218d40e4e5a9d3fb93", "score": "0.59485924", "text": "function getUsername($id){\n return sqlSelectOne(\"SELECT * FROM users WHERE user_id={$id}\", 'user_username');\n}", "title": "" }, { "docid": "77f6319dd5ed373ff6e557af23e2a3d4", "score": "0.5946972", "text": "public function getUsername() {\n // TODO: Implement getUsername() method.\n return $this->getLogin();\n }", "title": "" }, { "docid": "c71900bd5b4eaecf3f8a72cfd0ee0f09", "score": "0.59397227", "text": "function username($id) {\n db::pdo()->query('SELECT * FROM `users` WHERE `id` = :id LIMIT 1');\n db::pdo()->bind(array(':id' => $id));\n db::pdo()->execute();\n if(db::pdo()->count() > 0):\n foreach(db::pdo()->result() as $user):\n return sanitize($user->username);\n endforeach;\n endif;\n }", "title": "" }, { "docid": "fe7e559a63b9fa142f5ac8293678a1b4", "score": "0.5938557", "text": "function getUser($username,$password){\n $str_query = \"Select * from users where username='$username' AND password='$password'\";\n return $this->query ($str_query);\n }", "title": "" }, { "docid": "2da5ad331add2fe28ebbcbcdd46d6d8d", "score": "0.5937968", "text": "function get_password($usrid){\r\n\t\r\n}", "title": "" }, { "docid": "de3f523c99d7c5d3288cb187a5d655ea", "score": "0.5936451", "text": "function findUser($acc,$pass){\n\t\tUtilidades::_log(\"findUser($acc,***)\");\n\t\t$db=DB::conectar();\n\t\t$select=$db->prepare('SELECT * FROM user WHERE account=:account');\n\t\t$select->bindValue('account',$acc);\n\t\t$select->execute();\n\t\t$row=$select->fetch();\n\t\t$user = null;\n\t\t//Verifica si la clave es correcta\n\t\tif (password_verify($pass, $row['pass'])){\n\t\t\t//Si es correcta\n\t\t\t$user=new UserDAO($row);\n\t\t\tUtilidades::_log('pass Correcta');\n\t\t}\n\t\tUtilidades::_log('id: '.$row['id']);\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "cd5764975d70af705e1b67a1d40423dd", "score": "0.59272075", "text": "function auth($uname, $upass) {\n // SELECT query\n $usel = \"SELECT salt FROM users WHERE username=? LIMIT 1\";\n $usel = dbQuery($usel, $uname);\n $urow = $usel->fetch();\n\n if (empty($urow)) {\n return false;\n } else {\n $salt = $urow['salt'];\n }\n\n // SELECT query\n $usel = \"SELECT id FROM users WHERE (username=? OR email=?) AND password=? LIMIT 1\";\n $usel = dbQuery($usel, $uname, $uname, hash('sha256', $upass . $salt));\n $urow = $usel->fetch();\n // check credentials\n if (empty($urow)) {\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "cf4608ad1219954410304774ce11663f", "score": "0.59188896", "text": "public function get_username($colum, $table){\n\t\t$this->runQuery('SELECT ' . $column . ' FROM ' . $table . ' WHERE pkID = \"' . $_SESSION['userID'] . '\"');\n\t\t$row = $this->getResult();\n\t\t$this->name = $row['' . $column. ''];\n\t\treturn $this;\n\t\t\n\t}", "title": "" }, { "docid": "77e4341df8e371faf76f7d4483897325", "score": "0.59146386", "text": "private function usernameGet($id)\n {\n $this->db->select('username');\n //where $id = GUID\n $this->db->where('GUID', $id);\n //from the users table\n $query = $this->db->get('users');\n\n foreach ($query->result() as $row) \n {\n $username = $row->username;\n }\n return $username;\n }", "title": "" } ]
f92e2b2465057ea69e5ae7c46171425e
The value does not match another field in $data.
[ { "docid": "72145650b7d671b63e9e1831036822dc", "score": "0.0", "text": "public function differs($str, string $field, array $data): bool\n {\n if (! is_string($str)) {\n return false;\n }\n\n return $this->nonStrictRules->differs($str, $field, $data);\n }", "title": "" } ]
[ { "docid": "42e2e9d9fc5f600b927e10915ce1fe2f", "score": "0.59146214", "text": "public function testNoDataMatcheds()\n {\n $this->cv2avs->set('NO DATA MATCHES');\n\n $this->checkValues(true, false, false, false);\n }", "title": "" }, { "docid": "85b51df745418bbac0f659448c3f069d", "score": "0.5723994", "text": "function checkFieldData($fieldData) {\n return !empty( $_GET[ $fieldData ]) ? $_GET[ $fieldData ] : \"Valeur non trouvée, réessayez svp !\";\n }", "title": "" }, { "docid": "4f7e2325173a4f1cf34838bd860437e2", "score": "0.5662891", "text": "function validation($data, $files) {\n $errors = parent::validation($data, $files);\n\n preg_match_all('|([\\d.-]+)|', $data['searchvalues'], $matches);\n if (empty($matches[1])) {\n $errors['searchvalues'] = get_string('invalidsearchvalues', 'local_relationship');\n }\n\n return $errors;\n }", "title": "" }, { "docid": "062ea433ed745e9af663ece8a449f520", "score": "0.5622897", "text": "function preventDuplicates($data, $value) {\n\t//\t\t\tIt is NOT specific to any particular field !\n\t$alreadyExists = false;\n\tforeach ($data as $row => $rowArray) {\n\t\tforeach ($rowArray as $field => $fieldValue) {\n\t\t\tif ($fieldValue != $value) {\n\t\t\t\t//leave boolean false\n\t\t\t} else {\n\t\t\t\t//set flag\n\t\t\t\t$alreadyExists = true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $alreadyExists;\n}", "title": "" }, { "docid": "712ad5bb1907d9808174228ebc4a28f7", "score": "0.5578468", "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": "1a1d30cc9aaeeebb5551d6a41f3b5319", "score": "0.5576234", "text": "public function testBadData()\n {\n $token = $this->getTokenForUser($this->user('[email protected]'));\n $response = $this->json('PUT', 'api/updateprofile', ['name2'=>'Jack Smith', 'email2'=>'[email protected]', 'password2'=>'aaa', 'rol2e'=>'old'], ['Authorization' =>'Bearer '.$token, 'Secret'=>$this->secret]);\n $response->assertStatus(422)\n ->assertJsonStructure([\n 'message',\n ]);\n }", "title": "" }, { "docid": "66affc5c8dd7ccf015f142138873deb3", "score": "0.55314815", "text": "function testRetrieveSingleTestDataFieldThrowsExceptionIfFieldIsInvalid() {\n\t\t$this->setExpectedException('ErrorException');\n\t\t$this->_testFix->getField('bid');\n\t}", "title": "" }, { "docid": "edba1c04cc16b23761fd5eca6e0a9197", "score": "0.5413954", "text": "function checkData($formdata) {\n $field = $this->_name;\n $operator = $field . '_op';\n $profile_field = $field . '_fld';\n $this->_value = (string)@$formdata->$field;\n $this->_operator = (int)@$formdata->$operator;\n $this->_profile_field = (int)@$formdata->$profile_field;\n }", "title": "" }, { "docid": "6a788f16cd974f5f86540c25a942dc2f", "score": "0.5360048", "text": "public function validateData($data) {\r\n $errorMsg = \"Wartość $data nie istnieje w zbiorze wartości.\";\r\n $errors = parent::validateData($data);\r\n if ($data != '') {\r\n if (!in_array($data, $this->data)) {\r\n if (!is_array($errors))\r\n $errors = array($errorMsg);\r\n else\r\n $errors[] = $errorMsg;\r\n }\r\n }\r\n return $errors;\r\n }", "title": "" }, { "docid": "7decd16962da554fddea0e4ff128ab33", "score": "0.5339679", "text": "public function testSelectBioFromResultsFailureUnrelatedKey()\n {\n $expected = \"error\";\n $example = [\"foo\" => \"bar\"];\n $case = selectBioFromResults($example);\n $this->assertEquals($case, $expected);\n }", "title": "" }, { "docid": "ec0f12cb279e50bae21c8edebfc5c188", "score": "0.5338477", "text": "function checkUnique($data, $fields) { \n if (!is_array($fields)) { \n $fields = array($fields); \n } \n foreach($fields as $key) { \n $tmp[$key] = $this->data[$this->name][$key]; \n } \n if (isset($this->data[$this->name][$this->primaryKey])) { \n $tmp[$this->primaryKey] = \"<>\".$this->data[$this->name][$this->primaryKey]; \n } \n return $this->isUnique($tmp, false); \n }", "title": "" }, { "docid": "4e9768a61ec0f9cf241875e6a35c8495", "score": "0.5329467", "text": "public function checkPostFieldData($data, &$message, $entry_id=null)\n {\n return self::__OK__;\n }", "title": "" }, { "docid": "bd7c27109e359718c66132e2aa66b3e8", "score": "0.52754194", "text": "abstract protected function checkData();", "title": "" }, { "docid": "d3c218cf696d56f63081c63472f53f37", "score": "0.5273121", "text": "public static function cannot_found_data()\r\n\t\t{\r\n\t\t\texit('can not found data!');\r\n\t\t}", "title": "" }, { "docid": "2d76d6d3d62f89eb1c79cee74edb435e", "score": "0.5261971", "text": "private function _dataChecker(){\n if($this->_data == 'data'){\n $retCode = \"01\";\n $message = \"Required fields are missing or no value.\";\n $data = $this->_requiredFields;\n $this->_returnResponse($retCode, $message, $data);\n }else{\n foreach($this->_data as $key => $val) {\n array_push($this->_fields, $key);\n }\n sort($this->_fields);\n sort($this->_requiredFields);\n if (array_diff($this->_fields, $this->_requiredFields)){\n $diff = array_diff($this->_requiredFields, $this->_fields);\n $retCode = \"01\";\n $message = \"Required fields are missing or no value.\";\n $data = $diff;\n $this->_returnResponse($retCode, $message, $data);\n }else{\n $completeValues = 1;\n $missingFields = array();\n for($i = 0; $i < count($this->_requiredFields); $i++){\n if(empty($this->_data[$this->_requiredFields[$i]])){\n $completeValues = 0;\n array_push($missingFields, $this->_requiredFields[$i]);\n }else{\n // do nothing;\n }\n }\n if ($completeValues == 1){\n $this->_otp = @$this->_data['otp'];\n $this->_contactNumber = @$this->_data['contactNumber'];\n $this->validateOTP();\n }else{\n $retCode = \"01\";\n $message = \"Required fields are missing or no value.\";\n $data = $missingFields;\n $this->_returnResponse($retCode, $message, $data);\n }\n }\n }\n }", "title": "" }, { "docid": "1894d0f91cb0dc6d854a744ac4c675c8", "score": "0.525569", "text": "public function testSelectQualificationsFromResultsFailureUnrelatedKey()\n {\n $expected = \"error\";\n $example = [\"foo\" => \"bar\"];\n $case = selectBioFromResults($example);\n $this->assertEquals($case, $expected);\n }", "title": "" }, { "docid": "4592107fa369d1d4a45ba4cf4f6b4316", "score": "0.52409196", "text": "public function testUpdateFailsIfDataIsInvalid()\n {\n $item = $this->getTestItem();\n $data = $this->getTestItemData();\n\n $this->form->expects($this->once())->method('getObject')->willReturn($item);\n $this->form->expects($this->once())->method('setData')->with($data);\n $this->repository->expects($this->once())->method('getClassName')->willReturn('Order\\Entity\\Item');\n\n // The form says the data is invalid\n $this->form->expects($this->once())->method('isValid')->willReturn(false);\n\n $successful = $this->service->update($data);\n\n $this->assertFalse($successful);\n }", "title": "" }, { "docid": "4d37f6d74667d43319dd745b12dad02c", "score": "0.5210062", "text": "protected function matches_rule($data, $field) {\n if (isset($this->data[$field])) {\n return $data === $this->data[$field];\n }\n }", "title": "" }, { "docid": "b2894dbcf60b172fc190f19c9ec39389", "score": "0.5166081", "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": "5092a4d1c41f73f931710894ffc589f0", "score": "0.51624715", "text": "protected function compare() {\n\t\t\tif ($this->data !== $this->compare) {\n\t\t\t\t$this->error = $this->title .\" does not match\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "69ffb89bb82c46f3acc5f8c132de2a1b", "score": "0.5158975", "text": "public function validateUniqueness($value, $data, $formField) {\n\n $modelClass = $this->modelClass;\n $idName = to_id($modelClass);\n $id = isset($data[$idName]) ? $data[$idName] : null;\n\n $value = trim($value);\n if (!$value) return true;\n\n $criteria = array(\n $this->getFieldName() => $value\n );\n\n if ($id !== null) $criteria['id !='] = $id;\n\n $dummy = new $modelClass();\n $existing = $dummy->_get($criteria);\n\n if ($existing) return humanize($this->getFieldName()) . ' must be unique.';\n\n return true;\n }", "title": "" }, { "docid": "95a2f767b5fdc9243dff4dd231f189a5", "score": "0.5141864", "text": "private function validateData( $data ) {\n // validate that required fields (depending on anonymous or personal transfer) are present\n foreach ( array_merge( array( 'salt', 'timestamp' ), $this->isAnononymous ? array() : self::PERSONAL_DATA_FIELDS ) as $fieldName ) {\n if ( ! isset( $data[$fieldName] ) ) {\n throw new \\Exception( sprintf( \"Required field '%s' is missing\", $fieldName ) );\n }\n }\n\n if ( ! ( is_int ( $data['timestamp'] ) && $data['timestamp'] > 0 && $data['timestamp'] <= PHP_INT_MAX ) ) {\n throw new \\Exception( \"Invalid format for 'timestamp': This must be a unix timestamp\" );\n }\n\n if ( empty( $data['salt'] ) ) {\n throw new \\Exception( \"Field 'salt' must not be empty\" );\n }\n\n if ( !preg_match( '/^[ABCDEF0-9]{32}$/', $data['salt'] ) ) {\n throw new \\Exception( \"Invalid format for 'salt': This must be an uppercase 128-bit hex string with a fixed width of 32 chars\" );\n }\n }", "title": "" }, { "docid": "b18df9de9c6dc2b3e94e87b2fadc1637", "score": "0.5139373", "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": "a837929ee7f86f7a22f5216f1c168152", "score": "0.5133928", "text": "protected function onInvalid(Blackbox_Data $data, Blackbox_IStateData $state_data) {}", "title": "" }, { "docid": "21af6013563c2d92d8c14d182e37f40a", "score": "0.5129857", "text": "public function testInvalidRecord()\n {\n $record = new Tinebase_Record_DummyRecord(array('string' => '123'), true);\n $this->assertEquals(false, $record->isValid());\n }", "title": "" }, { "docid": "2cdad130241e2f8ae9f703214d4c5733", "score": "0.51289696", "text": "private function _validData($data){\n\t\t$columnsLen = array(\n\t\t\t'cod_contable' => 20,\n\t\t\t'identificacion_proveedor' => 5,\n\t\t\t'cod_ice' => 39,\n\t\t\t'nombre' => 4,\n\t\t\t'capacidad_ml' => 1,\n\t\t\t'cantidad_x_caja' => 1,\n\t\t\t'grado_alcoholico' => 1,\n\t\t\t'costo_unidad' => 1,\n\t\t\t'estado' => 1,\n\t\t\t'custodia_doble' => 1,\n\t\t\t'comentarios' => 0,\n\t\t\t'id_user' => 1\n\t\t);\n\t\treturn $this->_checkColumnsData($columnsLen, $data);\n\t}", "title": "" }, { "docid": "f1296399c1c57c93ac66f65fa2600bcc", "score": "0.5124522", "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": "6d885082ca082146e3fbeb380630eb04", "score": "0.51132977", "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": "93d34467e7e498ada788c0649bd2dc3f", "score": "0.51099956", "text": "public function differs_array_from_another_array($value, $other_field)\n {\n list($other_field, $model, $column) = explode('.', $other_field);\n\n if (isset($this->_field_data[$other_field]))//accessing the protected attribute in CI_Validation\n {\n if ($this->_field_data[$other_field]['postdata'])\n {\n foreach ($this->_field_data[$other_field]['postdata'] as $v)\n {\n if (in_array($v, array($value)))\n {\n $this->CI->load->model($model);\n $column_value = $this->CI->$model->get((int) $value)->$column;\n $msg = '(' . $column_value . ') has already selected in ' .\n $this->_field_data[$other_field]['label'] .\n ' field and must differ.';\n $this->CI->form_validation->set_message('differs_array_from_another_array', $msg);\n return FALSE; //there a similar value.\n }\n }\n }\n }\n return TRUE;\n }", "title": "" }, { "docid": "dc54ecd927e44739ca88ce7ac890f04e", "score": "0.5093644", "text": "public function testSelectInterestsFromResultsFailureUnrelatedKey()\n {\n $expected = \"error\";\n $example = [\"foo\" => \"bar\"];\n $case = selectBioFromResults($example);\n $this->assertEquals($case, $expected);\n }", "title": "" }, { "docid": "f5bb8eb6f9ab75a170bc14d73a29f6c8", "score": "0.50914913", "text": "public function checkExpectedFields(array $data, array $expected) {\n foreach ($expected as $key => $value) {\n $passedValue = isset($data[$key]) ? $data[$key] : null;\n if ($passedValue != $value) {\n throw new WebToPayException(\n sprintf('Field %s is not as expected (expected %s, got %s)', $key, $value, $passedValue)\n );\n }\n }\n }", "title": "" }, { "docid": "45598cb9d0de253c38fade03895d8059", "score": "0.5078185", "text": "private function validateFieldMapperData()\n {\n # Get field mapper data.\n $fieldMapperData = $this->getFieldMapperData();\n # Check if all the keys on field mapper data are exist on the source entity.\n if (count(array_diff($fieldMapperData, array_keys($this->getSourceEntityObject()->getFields()))) !== 0) {\n throw new \\Bridge\\Components\\Exporter\\ExporterException('Some field mapper not found on source entity');\n }\n # Check if all the keys on field mapper data are exist on the target entity.\n if (count(array_diff_key($fieldMapperData, $this->getTargetEntityObject()->getFields())) !== 0) {\n throw new \\Bridge\\Components\\Exporter\\ExporterException('Some field mapper not found on target entity');\n }\n # Return true if field mapper data is valid.\n return true;\n }", "title": "" }, { "docid": "f7787e419f1d02420ca3faeb87c0cb52", "score": "0.50753945", "text": "public function testWithInvalidData($data)\n {\n $bc = new \\Loom\\Breadcrumbs();\n $this->assertEmpty($bc->get());\n\n $bc->set($data);\n $this->assertEmpty($bc->get());\n }", "title": "" }, { "docid": "a40ec3e88d5e81b677a22f885604a28c", "score": "0.50746566", "text": "private function checkData() {\n if (in_array('', $this->Data)):\n $this->Error = [\"Existem campos em branco. Favor preencha todos os campos!\", WS_ALERT];\n $this->Result = false;\n else:\n $this->Result = true;\n endif;\n }", "title": "" }, { "docid": "f802dbe4942a5890538c5862729e6673", "score": "0.50733286", "text": "protected function checkData($data)\r\n {\r\n if (\\preg_match('/^4[59]/', $data)) {\r\n return parent::checkData($data);\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "70b6aa8eb869861c3249ac95c9f3bdb8", "score": "0.5071613", "text": "public function testFormDataHandlerFailure()\n {\n $formData = [10, 41, 3259703498, '345'];\n $formDataHandler = new GRUB\\Ingredient\\FormDataHandler();\n $validation = $formDataHandler->processData($formData);\n $expected = ['', '1', '2', '3'];\n $this->assertEquals($validation, $expected);\n }", "title": "" }, { "docid": "b79983d8aa776ab8e4d12a3d55d19309", "score": "0.50684905", "text": "public function testValidatePaymentInputDataUnknownPayment()\n {\n $aDynvalue = array();\n $oValidator = oxNew('oxinputvalidator');\n $this->assertTrue($oValidator->validatePaymentInputData('xxx', $aDynvalue));\n }", "title": "" }, { "docid": "8cba446efa8c6a92830c2579c0a1538b", "score": "0.503904", "text": "public function testInvalidValue(): void\n {\n $this->assert\n ->exception(function () {\n (new \\Recurrence\\Rrule\\Extractor\\CountExtractor())->extract('FREQ=MONTHLY;DTSTART=20170520;COUNT=WRONG');\n })\n ->isInstanceOf(InvalidRruleException::class)\n ->hasMessage('Invalid RRULE [COUNT] option : [WRONG]')\n ;\n }", "title": "" }, { "docid": "dae912e50da1f168fc29ccf5fa8c83c4", "score": "0.5032293", "text": "public function testUpdateUserInvalidData()\n {\n $data = [\n ];\n $response = $this->withHeaders($this->headers)->put($this->url.'/users/2', $data, $this->headers);\n\n $response->assertJson([\n 'errors' => true,\n 'status_code' => 422,\n ])\n ->assertJsonStructure([\n 'message',\n 'data',\n 'status_code',\n ])\n ->assertStatus(422);\n }", "title": "" }, { "docid": "b1e7ee6c15f4dc6875dfdf3c09cfea4f", "score": "0.50211924", "text": "public function testFailedEditRegisterRandomInvalidValue()\n\t{\n\t\t//The register properties to put\n\t\t$id = self::$createdRegisters[0];\n\t\t$start_date = '2017-09-01T00:00:00+00:00';\n\t\t$end_date = '2017-09-01T23:00:00+00:00';\n\t\t// THIS IS THE INVALID FIELD\n\t\t$type = 'werk';\n\t\t$remark = 'EDITED BY TEST 1';\n\t\t$features = 2;\n\t\t$breakDuration = 60;\n\t\t$kilometers = 15.50;\n\t\t$employee = '{\"id\" : 68}';\n\t\t$department = '{\"id\" : 57}';\n\t\t$assignment = '{\"id\" : 102387}';\n\n\t\t$contentString = '[{\n \"id\": '.$id.',\n \"remark\": \"'.$remark.'\",\n \"type\": \"'.$type.'\",\n \"break_duration\": '.$breakDuration.',\n \"employee\": '.$employee.'\n }]';\n\n\t\t$headers = array(\n\t\t\t'HTTP_AUTHORIZATION' => HttpHeader::BEARER.' '.self::$token,\n\t\t);\n\n\t\t// HTTP client\n\t\t$client = static::createClient();\n\t\t$client->request(\n\t\t\tRequest::METHOD_PUT,\n\t\t\t'/api/v1/registers',\n\t\t\tarray(),\n\t\t\tarray(),\n\t\t\t$headers,\n\t\t\t$contentString\n\t\t);\n\n\t\t/** @var Response $response */\n\t\t$response = $client->getResponse();\n\n\t\t// Test if response is PRECONDITION FAILED 412\n\t\t$this->assertSame(Response::HTTP_PRECONDITION_FAILED, $response->getStatusCode());\n\t}", "title": "" }, { "docid": "7109132810aec3f1b408895192ee63a7", "score": "0.5005848", "text": "protected function filterExisting($data) {\n $returnData = array();\n foreach ($data as $field => $value) {\n if (in_array($field, $this->fields)) {\n $returnData[$field] = $value;\n }\n }\n return $returnData;\n }", "title": "" }, { "docid": "ae10f8625edcefa79c32b77eeb581561", "score": "0.5002489", "text": "function testRetrieveSingleTestDataFieldThrowsExceptionIfFieldNameIsNotAString() {\n\t\t$this->setExpectedException('ErrorException');\n\t\t$this->_testFix->getField(array());\n\t}", "title": "" }, { "docid": "d9c3dc3e12e6c12aa82d1a0dbd88f679", "score": "0.49881577", "text": "public function validate_data($entity, $attribute, $data) {\n\n $validar = mysql_result($this->query(\"SELECT $attribute FROM $entity WHERE $attribute = '$data' \"), 0);\n\n if ($validar != NULL) {\n return \"1\";\n } else {\n return \"0\";\n }\n }", "title": "" }, { "docid": "571ca28160faf57a5526d80c61657655", "score": "0.4978279", "text": "public function testNoDatafoundByField()\n {\n $response = self::$client->get('/emojis/search?field=category&name=johndoeslimguy');\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertEquals('application/json', $response->getHeaderLine('content-type'));\n }", "title": "" }, { "docid": "47c3d1a36cc8d62373f98a674b46e901", "score": "0.49755287", "text": "static function validateFieldsPresent(array $data): void\n {\n if (!isset($data['id']))\n throw new Exception(\"Id not provided\");\n if (!isset($data['name']))\n throw new Exception(\"Name not provided\");\n if (!isset($data['year']))\n throw new Exception(\"Year not provided\");\n if (!isset($data['timeslot']))\n throw new Exception(\"Timeslot not provided\");\n if (!isset($data['duration']))\n throw new Exception(\"Duration not provided\");\n if (!isset($data['active']))\n throw new Exception(\"Active not provided\");\n }", "title": "" }, { "docid": "df44853187ce56df7e3498e55c4793c8", "score": "0.4973209", "text": "public function checkValueExists(oModel &$model, $data = array()){\n\n // check for type of the field\n if ($model->getModelFields()[$data['field']]['custom']){\n\n $fc = $this->_p->Service('oForms')->AddParams(array(\n 'multilang' => $model->getIsMultilang(),\n ));\n //$status = $fc->checkCustomField(array_merge($data, array('link_id' => $data['adm_app_id'])));\n $status = $fc->checkCustomField(array_merge($data, array('model' => $model->getModelName())));\n unset($fc);\n\n } else {\n\n $conditions = array('where' => array());\n if (isset($data['exclude'])){\n\n if (is_array($data['exclude']))\n $conditions['where'][$model->getPrimaryKey()] = array('op' => 'not in', 'value' => $data['exclude']);\n else\n $conditions['where'][$model->getPrimaryKey()] = array('op' => '<>', 'value' => $data['exclude']);\n\n }\n\n if (isset($data['params']) && !empty($data['params'])){\n foreach ($data['params'] as $k => $v){\n $conditions['where'][$k] = $v;\n }\n }\n\n $conditions['where'][$data['field']] = $data['value'];\n $conditions['limit'] = 1;\n\n $sql = $this->_p->db->getQueryBuilder($model->getModelStorage())->compile($model, $conditions);\n\n $res = $this->_p->db->select($sql, $model->getModelStorage());\n\n $status = $res ? true : false;\n\n unset($conditions);\n\n }\n\n return $status;\n }", "title": "" }, { "docid": "29c5db69d003ad193e2c47682934b26b", "score": "0.4973073", "text": "public function testGetItemsByValueNotFound()\n {\n $this->addFixture(new UserData);\n $this->addFixture(new ProductData);\n $this->executeFixtures();\n $client = $this->getLoggedInTestClient();\n \n $crawler = $client->request('GET', '/search/get_items_by_value/xxxxx-xxx');\n $this->assertEquals(404, $client->getResponse()->getStatusCode());\n }", "title": "" }, { "docid": "3f4b17d7e573579c4c636217dbbfba32", "score": "0.49571192", "text": "function checkData () {\n\t\n\t}", "title": "" }, { "docid": "7039b3f874a7978d1586b1be2fb2b8dd", "score": "0.4956805", "text": "public function testValueInvalidDate() {\n $this->assertEquals('VALIDATION.INVALID_DATE', $this->getValidator()->validate('1991-02-31')[0]['__CODE'] );\n }", "title": "" }, { "docid": "22c53d06ec83eb3fa84c6090c5052691", "score": "0.4955075", "text": "function content_data_changed($old_data, $new_data)\n{\n foreach ($new_data as $field => $value) {\n if ($value != $old_data[$field]) {\n return true;\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "e72365298869344f69c12a62ac12ec86", "score": "0.49531314", "text": "function checkData(){\r\n $errMsg = array();\r\n if (empty($this->vorname)){\r\n $errMsg['vorname'] = \"Vorname ist leer.\";\r\n }\r\n if (empty($this->name)){\r\n $errMsg['name'] = \"Nachname ist leer.\";\r\n }\r\n if (!preg_match(\"/^[a-z|\\.|-]+@[a-z|\\.|-]+\\.[a-z]+$/\",$this->email)){\r\n $errMsg['email'] = \"E-mail Adresse fehlerhaft (z.B. [email protected]).\"; \r\n }\r\n return $errMsg;\r\n }", "title": "" }, { "docid": "4995c4c760b06faa3bce52a048340ca7", "score": "0.49498284", "text": "public function otherFailureResponse($responseData);", "title": "" }, { "docid": "369e805dc3122d8e6e29fecbec408f64", "score": "0.4948358", "text": "function validation($data) {\n $this->errors = array();\n\n // enforce unique constraints on fields in this table\n if ($this->dbc->exists('evidence', array('name', 'candidate_id'), $data)) {\n $this->errors['name'] = get_string('notunique', 'block_assmgr', 'name');\n }\n\n // now add fields specific to this type of evidence\n $this->specific_validation($data);\n\n return $this->errors;\n }", "title": "" }, { "docid": "ef2d728f6a0c94eef1b49a3fc05dfe8d", "score": "0.49458024", "text": "protected function checkDataValidity(array $data)\n {\n $requiredFields = array('type', 'sku');\n\n foreach ($requiredFields as $field) {\n if (!array_key_exists($this->getMappedField($field), $data)) {\n throw new \\RuntimeException(\n sprintf(\n 'Unable to find the column with name \"%s\". It is required to set product %s',\n $this->getMappedField($field),\n $field\n )\n );\n }\n }\n }", "title": "" }, { "docid": "a725e018d76030152785824bc8e3e8ee", "score": "0.49257055", "text": "abstract public function validateData();", "title": "" }, { "docid": "7a13a92fc38025c194ece4f7239ab413", "score": "0.49188855", "text": "private function differs($label, $posted_value, $target_field) {\n $got_error = false;\n\n $target_value = $_POST[$target_field];\n\n if (($posted_value == $target_value)) {\n $got_error = true;\n }\n\n if (isset($this->posted_fields[$target_field])) {\n $target_field = $this->posted_fields[$target_field];\n }\n\n if ($got_error == true) {\n $this->form_submission_errors[] = 'The '.$label.' field must not match the '.$target_field.' field.'; \n }\n\n }", "title": "" }, { "docid": "375bc14753fbe972a5115fbff6c63797", "score": "0.49152148", "text": "public function match($data);", "title": "" }, { "docid": "628cc6ea69497a8c1026b3eeea75307c", "score": "0.49090463", "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": "09b23f1676cb10bc2f2c4fdc4d30aa54", "score": "0.49061045", "text": "private static function __check_dont_exist($fieldname, $values, $params)\n {\n $fields = [$params['db_fieldname'] => $values[$fieldname]];\n $row = $params['model']->select_by_fields($fields, 'all');\n\n if ($row && (!array_key_exists('id', $values) || $row['id'] != $values['id'])) {\n static::$__errors[$fieldname] = strpos($fieldname, 'mail') !== false ? \"Cet email est déjà utilisé !\" : \"Cette valeur est déjà utilisée !\";\n }\n }", "title": "" }, { "docid": "c3b19112db179bd53c7e77fc7e7a2d17", "score": "0.49055275", "text": "public function testSelectError_ReturnTrue(): void\n {\n $testObject = $this->turkey->select(['Antalyaa'])->get();\n $this->assertEquals($this->error_message, $testObject[0]['error']['message']);\n }", "title": "" }, { "docid": "d7aebc490eaf0a205a31ddb679e953ce", "score": "0.4904583", "text": "private function invalidPayload($data)\n\t{\n\t\treturn ! is_array($data) || ! isset($data['nonce']) || ! isset($data['ciphertext']);\n\t}", "title": "" }, { "docid": "705a5f7c78649c6bfe8d8c7d753d072a", "score": "0.4889686", "text": "public function testInvalidMobile()\n {\n $exampleRow = $this->faker->rockTheVoteReportRow([\n 'Phone' => '000-000-0000',\n 'Opt-in to Partner SMS/robocall' => 'Yes',\n ]);\n\n $record = new RockTheVoteRecord($exampleRow);\n\n $this->assertEquals($record->userData['mobile'], null);\n $this->assertFalse(isset($record->userData['sms_status']));\n $this->assertFalse(isset($record->userData['sms_subscription_topics']));\n }", "title": "" }, { "docid": "e9df34be6bd40b99158468f05dee9ddd", "score": "0.4884382", "text": "private function _checkFieldExist($field_name,$value,$message,&$error,$user_id = '') {\n $is_exists = $this->muser->checkFieldExist($field_name,$value,$user_id);\n if ($is_exists == TRUE ){\n $error[] = $message;\n }\n }", "title": "" }, { "docid": "e2f83ad3b43c284e89f124b9bc449ab3", "score": "0.4883391", "text": "public function testDataExist() {\n $data = $this->getDataJson();\n $this->assertNotEmpty($data);\n }", "title": "" }, { "docid": "0d344cde1831b69d2f8d8fb607f28186", "score": "0.48680973", "text": "protected function invalidPayload($data)\n {\n return ! is_array($data) || ! isset($data['iv']) || ! isset($data['value']) || ! isset($data['mac']);\n }", "title": "" }, { "docid": "dd9344863dc664ed2d67bf6332877067", "score": "0.48679", "text": "public function testGetInvalidVenueByVenueZip() {\n\t\t// grab a venue by searching for zip that does not exist\n\t\t$venue = Venue::getVenueByVenueZip($this->getPDO(), \"imaginary venue zip, dummy\");\n\t\t$this->assertCount(0, $venue);\n\t}", "title": "" }, { "docid": "c7eaaaf8646d6646057a99ec4ba8efd3", "score": "0.48665127", "text": "public function testItemDataField()\n {\n $items = $this->testResponse->getItems();\n \n $this->assertEquals(1,count($items));\n $ItemField = $items[0];\n \n $this->assertInstanceOf(ItemField::class, $ItemField);\n \n $ItemDataField = $ItemField->getItemData('location');\n \n $this->assertInstanceOf(ItemDataField::class, $ItemDataField[0]);\n $this->assertEquals('Main', $ItemDataField[0]->attr('code'));\n $this->assertEquals('2', $ItemDataField[0]->attr('id'));\n\n }", "title": "" }, { "docid": "163c27188632b4fd34bd8b4bd924f40b", "score": "0.4860813", "text": "public function testDataNotChecked()\n {\n $this->cv2avs->set('DATA NOT CHECKED');\n\n $this->checkValues(false, false, false, false);\n }", "title": "" }, { "docid": "8b75e05dcc6b4eef820d55d25bdd2bf5", "score": "0.48570433", "text": "public function test_multivalue_field_reports_first_error() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/core/lib/data/customfield.class.php');\n\n $this->create_custom_field(CONTEXT_ELIS_USER, 'menu', array('options' => '1'));\n // Create mapping record.\n $this->create_mapping_record('user', 'testfieldshortname', 'customtestfieldshortname');\n $DB->execute(\"UPDATE {\".field::TABLE.\"} SET multivalued = 1\");\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' => '1/2/3'\n );\n\n $message = '[user.csv line 2] User with username \"testuserusername\", email \"[email protected]\", ';\n $message .= 'idnumber \"testuseridnumber\" could not be created. \"2\" is not one of the available options for menu of ';\n $message .= 'choices custom field \"customtestfieldshortname\".'.\"\\n\";\n $this->assert_data_produces_error($data, $message, 'user');\n }", "title": "" }, { "docid": "8ef6a57d0b594790046470c7e01f4ac4", "score": "0.48495063", "text": "private function checkNotEqualValuesErrors($value, $formValue, $key)\n {\n /**\n * It is needed because sorting in db begins from 1, but when selenium driver gets value from form it starts\n * calculate from 0. So this operation checks this case\n */\n if ((int)$value === (int)$formValue + 1) {\n return '';\n }\n if (is_array($value)) {\n $value = $this->arrayToString($value);\n }\n if (is_array($formValue)) {\n $formValue = $this->arrayToString($formValue);\n }\n return sprintf('- %s: \"%s\" instead of \"%s\"', $key, $formValue, $value);\n }", "title": "" }, { "docid": "f9374e944695f1aede8f52fefcf9d68f", "score": "0.48428777", "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": "89d12b695ac2b735add9ed7edd1b46f2", "score": "0.48426488", "text": "public function cannot_update_product_with_invalid_data()\n {\n $this->signIn();\n\n $this->post(route('product.update',$this->product),$this->invalidProductData)\n\n ->assertStatus(302)\n\n ->assertSessionHasErrors();\n }", "title": "" }, { "docid": "2ba31bfabd2531e73c6b89530a8ded0d", "score": "0.48401695", "text": "private function vaildateMailField($data)\n {\n $error = [];\n $error_flag = false;\n\n if ($this->commons->validateText($data['to'])) {\n $error_flag = true;\n $error['to'] = 'Email!';\n }\n\n if ($this->commons->validateText($data['subject'])) {\n $error_flag = true;\n $error['subject'] = 'Subject!';\n }\n\n if ($this->commons->validateText($data['message'])) {\n $error_flag = true;\n $error['message'] = 'Message!';\n }\n\n if ($error_flag) {\n return $error;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "8ef85ad5feff0a231fb405dd37e41a7b", "score": "0.4838418", "text": "public function testAuditWithInvalidProperty()\n {\n \t$helderkruin_suburb = Suburb::where('name', 'like', 'Helderkruin')->first();\n \t$old_area = Area::find($helderkruin_suburb->area_id);\n \t$new_area = Area::find($helderkruin_suburb->area_id + 1);\n \t$attribute_name = 'area_id';\n \t$old_attribute_value = $old_area->id;\n \t$new_attribute_value = $new_area->id;\n \t/* Create the $data array */\n \t$data = $this->getData($attribute_name, $old_attribute_value, $new_attribute_value, $helderkruin_suburb);\n \t/* Prepare transformations */\n \t$transformations = [\n \t\t\t'area_id' => array(ModelTypeConstants::AREA, array('invalid')), //The invalid property\n \t];\n \t/* Call method tested */\n \t$model_transform_auditor = new ModelTransformAuditor();\n \t$data = $model_transform_auditor->audit($data, $transformations);\n \t/* Validate not null */\n \t$this->assertNotNull($data);\n \t/* Validate the transformation of the old area id */\n \t$new_array = $data['new'];\n \t$new_value = $new_array[$attribute_name];\n \t$this->assertEquals($new_attribute_value, trim($new_value));\n }", "title": "" }, { "docid": "c3c019a36bb817cbf9c4ebfa85ae1bfc", "score": "0.48353884", "text": "function testAddTestThrowsExceptionsIfTestDataDoesNotMatchPreExistingTestDataStructure() {\n\t\t$testData[] = $this->_testFix->get('id',1);\n\t\t$this->setExpectedException('ErrorException');\n\t\t$invalidData[] = array('id' => 7, 'appl_id' => 8, 'color' => 'Some wierd color', 'name' => 'Some odd color', 'created' => '2006-12-25 05:34:21', 'date' => '2006-12-25', 'modified' => '2006-12-25 05:34:21');\n\t\t$this->_basicFix->add($testData);\n\t\t$this->_basicFix->add($invalidData);\n\t}", "title": "" }, { "docid": "a24ff20b8159d055a9f74f5cc475414c", "score": "0.4829686", "text": "function data_validate() {\n\t\tglobal $DATA;\n\n\t\t$err = [];\n\n\t\tif (!val_validate($DATA, 'd', REGEX_DOMAIN)) {\n\t\t\t$err['d'] = 'invalid domain name';\n\t\t}\n\n\t\tif (!val_validate($DATA, 'e', REGEX_EMAIL)) {\n\t\t\t$err['e'] = 'invalid address';\n\t\t}\n\n\t\tif (!val_validate($DATA, 'c', REGEX_COUNTRY)) {\n\t\t\t$err['c'] = 'invalid country, use 2 chars code';\n\t\t}\n\n\t\tif (!val_validate($DATA, 's', null)) {\n\t\t\t$err['s'] = 'invalid state';\n\t\t}\n\n\t\tif (!val_validate($DATA, 'l', null)) {\n\t\t\t$err['l'] = 'invalid locality';\n\t\t}\n\n\t\tif (!val_validate($DATA, 'o', null)) {\n\t\t\t$err['o'] = 'invalid organization';\n\t\t}\n\n\t\tif (!val_validate($DATA, 'ou', null)) {\n\t\t\t$err['ou'] = 'invalid organization unit';\n\t\t}\n\n\t\tif (count($err) === 0) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn $err;\n\t}", "title": "" }, { "docid": "69a9cf15584ebf2f035ddfcfac5312e4", "score": "0.48249948", "text": "public function validateKlarnaUserData()\n {\n $fieldNamesToCheck = array('country', 'given_name', 'family_name');\n foreach ($fieldNamesToCheck as $fName) {\n if ($this->_aUserData['billing_address'][$fName] !== $this->_aUserData['shipping_address'][$fName]) {\n $this->addErrorMessage('TCKLARNA_KP_MATCH_ERROR');\n break;\n }\n }\n if ($this->_aUserData['billing_address']['organization_name'] && !$this->b2bAllowed) { // oxid fieldName invadr[oxuser__oxcompany]\n $this->addErrorMessage('KP_AVAILABLE_FOR_PRIVATE_ONLY');\n }\n\n if (empty($this->_aUserData['billing_address']['organization_name']) && !$this->b2cAllowed) { // oxid fieldName invadr[oxuser__oxcompany]\n $this->addErrorMessage('KP_AVAILABLE_FOR_COMPANIES_ONLY');\n }\n }", "title": "" }, { "docid": "99c485911957eaf8d0e888530466c9bf", "score": "0.4809152", "text": "public function testFlashmsgPostDataInvalid() {\n\t\t$this->setAjaxRequest();\n\t\t$opt = [\n\t\t\t'data' => [\n\t\t\t\t'bad_key' => 'tst',\n\t\t\t],\n\t\t\t'method' => 'POST',\n\t\t\t'return' => 'contents'\n\t\t];\n\t\t$result = $this->testAction('/cake_theme/flash/flashmsg.json', $opt);\n\t\t$result = json_decode($result, true);\n\t\t$expected = [\n\t\t\t[\n\t\t\t\t'result' => false,\n\t\t\t\t'key' => null,\n\t\t\t\t'messages' => [],\n\t\t\t]\n\t\t];\n\t\t$this->assertData($expected, $result);\n\t\t$this->resetAjaxRequest();\n\t}", "title": "" }, { "docid": "cb0b82789fab8db638869c6a429a7770", "score": "0.48031002", "text": "function json_verify()\r\n\t\t{\r\n\t\t\t$id = $this->GeneralLedger->field('id', array('general_ledger_code' => $this->params['form']['code']));\r\n\t\t\t$this->set('json', array('exists' => $id !== false));\r\n\t\t}", "title": "" }, { "docid": "fcf1bcd3af489896069a8f7fc9ae6140", "score": "0.48024535", "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": "e014b0f440831f692fa26e2680994ece", "score": "0.48015693", "text": "public function _check_data()\n\t{\n\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "7536a242d6cca8fddc88228b015e1c6a", "score": "0.4797911", "text": "public function testPostBad()\n {\n $dataLoader = $this->getDataLoader();\n $data = $dataLoader->createInvalid();\n $this->badPostTest($data);\n }", "title": "" }, { "docid": "f863304d3b252f7dd5d2b48e6d708cf7", "score": "0.4796662", "text": "abstract protected function getValueToValidate();", "title": "" }, { "docid": "d418c29f6d1870e59b034cf815a857ff", "score": "0.47964305", "text": "public function testCreateNewFailsWhenDataIsInvalid()\n {\n $data = $this->getTestItemData();\n\n $this->form->expects($this->once())->method('setData')->with($data)->willReturn(null);\n\n // The form says the data is invalid\n $this->form->expects($this->once())->method('isValid')->willReturn(false);\n\n $successful = $this->service->createNew($data);\n\n $this->assertFalse($successful);\n }", "title": "" }, { "docid": "eb31195ac23e24d5838862596e440ab0", "score": "0.47931272", "text": "private function checkFields(int $id, array $data)\n {\n try {\n $event = $this->model->find($id);\n foreach ($data as $key => $value) {\n if (in_array($key, ['hrinicio', 'dtprevista', 'endereco', 'numero', 'bairro', 'complemento'])) {\n if ($value !== $event->{$key}) {\n return true;\n }\n }\n }\n return false;\n } catch (\\Exception $e) {\n throw new \\Exception($e->getMessage());\n }\n }", "title": "" }, { "docid": "4d5c5a41c7f0a56cac23f4f84d8d6d3b", "score": "0.4784467", "text": "public function test_pin_exists_invalid_no_field() {\n global $DB;\n $this->resetAfterTest();\n $pinexists = self::getMethod('pin_exists');\n\n $DB->delete_records('user_info_field', array('shortname' => 'amazonalexaskillpin'));\n\n $actual = $pinexists->invokeArgs(null, array());\n $this->assertFalse($actual);\n }", "title": "" }, { "docid": "6e2c560355b9dde3020f997f5c4aa1ea", "score": "0.47805712", "text": "public function test_register_with_not_matching_password()\n {\n $badUserData = [\n 'name' => $this->faker->name,\n 'username' => $this->faker->unique()->userName,\n 'email' => $this->faker->safeEmail,\n 'password' => $this->faker->password(8, 20),\n 'password_confirmation' => $this->faker->password(8, 20), //diff from the first one\n ];\n //Send post request\n $response = $this->json('POST', route('api.register'), $badUserData);\n if ($response->status() !== 422) {\n dump($response->getContent());\n }\n //Assert that it is NOT successful, because the password confirmation does not match\n $response->assertStatus(422);\n }", "title": "" }, { "docid": "0168a071028de244ec53163d0cf5cfc1", "score": "0.47781798", "text": "private function validateLine($data)\n { \n if(strpos($data,'to=')){\n return $data; }\n\n }", "title": "" }, { "docid": "f01c21a7d518132c922343b2d160d143", "score": "0.4771401", "text": "public function gifNotMatch() {\n if (strlen(trim($this->gif_response_json))) {\n $gif_response_json_obj = CJSON::decode($this->gif_response_json, false);\n\n if (strtoupper($gif_response_json_obj->respuesta->brand) !== strtoupper($this->brand)) {\n Yii::log('GIF_DICTIONARY brand: ' . $gif_response_json_obj->respuesta->brand . ' model: ' . $gif_response_json_obj->respuesta->model . ' | USER SELECTION brand: ' . $this->brand . ' model: ' . $this->model, CLogger::LEVEL_WARNING, 'gif_not_match');\n return;\n }\n\n if (strtoupper($gif_response_json_obj->respuesta->model) !== strtoupper($this->model)) {\n Yii::log('GIF_DICTIONARY brand: ' . $gif_response_json_obj->respuesta->brand . ' model: ' . $gif_response_json_obj->respuesta->model . ' | USER SELECTION brand: ' . $this->brand . ' model: ' . $this->model, CLogger::LEVEL_WARNING, 'gif_not_match');\n return;\n }\n }\n }", "title": "" }, { "docid": "971943dddc68f03d623fb51dd84fc794", "score": "0.47713387", "text": "public function testErrorsPassword()\n {\n $badData = $this->goodData;\n $user = $this->Users->newEntity();\n\n $badData['password'] = '';\n $user = $this->Users->patchEntity($user, $badData);\n $this->assertFalse($this->Users->save($user), 'Empty password implies non saving');\n\n $badData = $this->goodData;\n unset($badData['password']);\n $user = $this->Users->patchEntity($user, $badData);\n $this->assertFalse($this->Users->save($user), 'No password implies non saving');\n\n $badData = $this->goodData;\n $badData['password'] = 'abc';\n $user = $this->Users->patchEntity($user, $badData);\n $this->assertFalse($this->Users->save($user), 'Too small password implies non saving');\n\n $badData = $this->goodData;\n $badData['password'] = str_repeat('a', 21);\n $user = $this->Users->patchEntity($user, $badData);\n $this->assertFalse($this->Users->save($user), 'Too lonog password implies non saving');\n\n }", "title": "" }, { "docid": "6d1916884012f4545d5f6b329fc0f0b0", "score": "0.476826", "text": "protected function checkDuplicate($fieldname,$fieldvalue) {\n\t\t$strQuery = \"select id from tbl_admin where \".$fieldname.\" = '\".$fieldvalue.\"' \";\t\t\n\t\tif(!empty($_GET['id']) ){\n\t\t\t$strQuery .= \" AND \".$this->_keyId.\"!=\".$_GET['id'].\" \" ;\n\t\t}\n\t\t$queryData = $this->db->getResult($strQuery);\t\t\n\t\tif(is_array($queryData) ){ \n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "7e0d97d7f96675ebd729d55c2e4d5fbe", "score": "0.4766913", "text": "public function dataCheck($data) {\r\n $errors = array();\r\n \r\n if ($data['corp'] === '' ){\r\n $errors[] = 'No Corporation Name ';\r\n }\r\n if ($data['incorp_dt'] === '' ){\r\n $errors[] = 'No Incorporation Date ';\r\n }\r\n if ($data['email'] === '' ){\r\n $errors[] = 'No Email ';\r\n }\r\n if ($data['owner'] === '' ){\r\n $errors[] = 'No Owner ';\r\n }\r\n if ($data['phone'] === '' ){\r\n $errors[] = 'No Phone ';\r\n }\r\n if ($data['location'] === '' ){\r\n $errors[] = 'No Location';\r\n }\r\n if (count($errors) > 0)\r\n {\r\n throw new Exception('Form not fully filled');\r\n }\r\n else{\r\n return true;\r\n }\r\n \r\n }", "title": "" }, { "docid": "e67c218eff9c6a08b4f542c43d747de1", "score": "0.47655752", "text": "private function arg_value($data) {\n if (isset($data[$field]) && count($data) == 1 && is_array($data[$field])) {\n return $data[$field];\n }\n return $data;\n }", "title": "" }, { "docid": "965eb75219f754ee7225a10c3a1bde6a", "score": "0.47643888", "text": "public function test(Data $row)\n {\n $value = $row->get($this->key);\n return preg_match($this->comparitor, $value);\n }", "title": "" }, { "docid": "641b512699ae23c6f1320bf0d068ae2c", "score": "0.47607443", "text": "public function testField_data0()\n{\n\n // Traversed conditions\n // for (...) == false (line 94)\n\n $actual = $this->cI_DB_ibase_result->field_data();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "ec112969148c9cfb751a120d744c6a98", "score": "0.47582853", "text": "function testSetFieldsThrowExceptionIfDataTypeIsNotOfTheCorrectType() {\n\t\t$this->setExpectedException('ErrorException');\n\t\t$this->_basicFix->setFields(array('id' => array('type' => 'type')));\n\t}", "title": "" }, { "docid": "e08466adffd7745399449a015d35d7fc", "score": "0.47551632", "text": "public function testValueInvalidMonth() {\n $this->assertEquals('VALIDATION.INVALID_MONTH', $this->getValidator()->validate('1992-222-1')[0]['__CODE'] );\n }", "title": "" }, { "docid": "ca54496b967d0f6e2acaec2bb79c3025", "score": "0.47548994", "text": "function validate_data($data) {\n if($this->path == 0) {\n $this->errors['mentors'] = get_string('person_error_please', \n 'block_student_gradeviewer');\n return false;\n }\n if(!isset($this->mentors[$this->path])) {\n $this->errors['mentors'] = get_string('person_error_exists', \n 'block_student_gradeviewer');\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "3e0cf871813b53a8127247e0a587a2a3", "score": "0.47509667", "text": "public static function validate($data){\n\n\t}", "title": "" }, { "docid": "a9dfb97cd10e0c676c81f19fa1407f76", "score": "0.47496727", "text": "function validation($data, $files) {\n $this->errors = array();\n \n //check that the field label does not already exist in this report\n if ($this->dbc->label_exists($data['label'],$data['report_id'],$data['id']))\t{\n \t$this->errors['label']\t=\tget_string('labelexistserror','block_ilp',$data);\n } \n \n // now add fields specific to this type of evidence\n $this->specific_validation($data);\n\n return $this->errors;\n }", "title": "" }, { "docid": "8cf7979aa3ed443e7c722708b07b7a0c", "score": "0.4749488", "text": "function testInvalidPropertyGet() {\n\t\t$o = new \\Scrivo\\Page(self::$context);\n\t\t$data = $o->sabicasElRey;\n\t}", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "6704ebcca43610cf434c1e97c47a7b85", "score": "0.0", "text": "public function update(Request $request)\n {\n //\n date_default_timezone_set('Asia/Singapore');\n $date = date(\"Y-m-d H:i:s\");\n\n $out = '';\n $update = Attend::where('contact', $request->get('contactNo'));\n\n if($update->get()->Count())\n {\n // update\n $updatef = $update->first();\n $updatef->pax = $request->get('noOfPax');\n $updatef->babyChair = $request->get('babyChair');\n $updatef->halalFood = $request->get('halalFood');\n $updatef->message = $request->get('contactMessage');\n\n $updatef->save();\n $out = 'Update Success';\n\n //send email\n $data = array(\n 'title' => 'Your info was successfully update!',\n 'name' => $request->get('contactName'),\n 'email' => $request->get('contactEmail'),\n 'contact' => $request->get('contactNo'),\n 'noOfPax' => $request->get('noOfPax'),\n 'babyChair' => $request->get('babyChair'),\n 'halalFood' => $request->get('halalFood'),\n //'message' => (string)$request->get('contactMessage'),\n );\n\n }\n else\n {\n // insert\n $add = new Attend();\n\n $add->name = $request->get('contactName');\n $add->email = $request->get('contactEmail');\n $add->contact = $request->get('contactNo');\n $add->pax = $request->get('noOfPax');\n $add->babyChair = $request->get('babyChair');\n $add->halalFood = $request->get('halalFood');\n $add->message = $request->get('contactMessage');\n\n $add->save();\n $out = 'Insert Success';\n\n $data = array(\n 'title' => 'Your message was successfully sent!',\n 'name' => $request->get('contactName'),\n 'email' => $request->get('contactEmail'),\n 'contact' => $request->get('contactNo'),\n 'noOfPax' => $request->get('noOfPax'),\n 'babyChair' => $request->get('babyChair'),\n 'halalFood' => $request->get('halalFood'),\n //'message' => (string)$request->get('contactMessage'),\n );\n\n }\n\n $to_mail = $request->get('contactEmail');\n $bcc_mail = ['[email protected]'];\n\n Mail::send('email_template', $data, function ($message) use ($to_mail, $bcc_mail) {\n $message->from('[email protected]', 'clejacWeds');\n\n $message->to($to_mail)->subject('Thanks for your RSVP with #clejacweds');\n $message->bcc($bcc_mail)->subject('Pss.. Someone has RSVP with us!');\n\n });\n\n return $out;\n }", "title": "" } ]
[ { "docid": "995ba0c8f03901b2d9d4e3a2b71aed6a", "score": "0.7192627", "text": "public function put($resource);", "title": "" }, { "docid": "191338cd6ef896bff360364575acf011", "score": "0.67335975", "text": "function update( $resource ){\n\n\n\n}", "title": "" }, { "docid": "718f7d64347dbb970d3af2645ff41b28", "score": "0.6624096", "text": "public function update(Request $request, Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "82d962f8a232812e11e659906a06c4bf", "score": "0.64792234", "text": "abstract function updateResource(array $resource): array;", "title": "" }, { "docid": "3e0f043be946ab7842b0af2e1d74c916", "score": "0.6411816", "text": "protected function _update ()\n {\n $storage = $this->_make_storage ();\n $storage->update_object ($this);\n }", "title": "" }, { "docid": "94019d08a7f8811e4983869c0f46c3d1", "score": "0.63963556", "text": "public function update(ResourceRequest $request, Resource $resource)\n {\n $data = $request->validated();\n\n $status = $resource->fill($data)->save();\n\n if($status) {\n return redirect()->route('resource.index')->with('success', 'Обновлено успешно');\n }\n\n return back()->withInput();\n }", "title": "" }, { "docid": "f3a644eac430ac72a35e4e871bd91db8", "score": "0.6383551", "text": "public function update(Request $request, $id, $resource='typeProduct')\n {\n //\n }", "title": "" }, { "docid": "4f3179762365be3e1ddb7c5eec12dffb", "score": "0.6367317", "text": "public function update($id)\n\t{\n\t\t$inputs = Input::all();\n\t\t$validator = Validator::make($inputs , \\App\\Resource::$rules_edit);\n\t\tif($validator->passes()){\n\n\n\t\t\t$resource = \\App\\Resource::find($id);\n\n\t\t\tif(isset($inputs['image'])){\n\n\t\t\t\t$file = $resource->image;\n\n\t\t\t\tunlink('pictures/' . $file);\n\n\t\t\t\t$destinationPath = 'pictures/'; // upload path\n\t\t\t\t$extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n\t\t\t\t$fileName = rand(11111,99999). '_' . time() . '.'.$extension; // renameing image\n\t\t\t\tImage::make(Input::file('image')->getRealPath())->resize(300, null,function($constrain){\n\t\t\t\t\t$constrain->aspectRatio();\n\t\t\t\t})->save($destinationPath . $fileName);\n\t\t\t\t// Input::file('image')->move($destinationPath, $fileName); // uploading file to given path\n\t\t\t\t$inputs['image'] = $fileName;\n\t\t\t}\n\n\t\t\t$resource->update($inputs);\n\t\t\treturn Redirect::to('/');\n\n\t\t}\n\n\t\treturn Redirect::back()\n\t\t\t->withInput(Input::all())\n\t\t\t->withErrors($validator);\n\t}", "title": "" }, { "docid": "c36ab864eb8fe4e400b9bf654b24e104", "score": "0.6334678", "text": "public function updateStream($path, $resource, array $config = []);", "title": "" }, { "docid": "8c18bfa316f6f5346468923c884b7854", "score": "0.62746567", "text": "public function update(ResourceRequest $request, $id)\n {\n $resource = $this->resources->findOrFail($id);\n\n $this->resources->update($resource, $request->only([\n 'author_id',\n 'category_id',\n 'title',\n 'body',\n 'description',\n 'meta_description',\n 'status',\n ]));\n\n if ($request->hasFile('mini_image')) {\n $uploadedFile = $request->file('mini_image');\n\n if ($resource->mini_image) {\n Storage::delete('public/' . $resource->mini_image);\n }\n\n $pathFile = $uploadedFile->store($this->resources->makeImagePath(), 'public');\n $resource->update(['mini_image' => $pathFile]);\n }\n\n if ($request->hasFile('featured_image')) {\n $uploadedFile = $request->file('featured_image');\n\n if ($resource->featured_image) {\n Storage::delete('public/' . $resource->featured_image);\n }\n\n $pathFile = $uploadedFile->store($this->resources->makeImagePath(), 'public');\n $resource->update(['featured_image' => $pathFile]);\n }\n\n if ($resource->category->isCaseStudies()) {\n return redirect()->route('spark.kiosk.resources.case-studies.edit', ['id' => $id])\n ->with('alert.success', __('Updated successfully!'));\n }\n\n return redirect()->route('spark.kiosk.resources.edit', ['id' => $id])\n ->with('alert.success', __('Updated successfully!'));\n }", "title": "" }, { "docid": "125e988ea4b035f1db7a8b5327bfb780", "score": "0.61922735", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n \"file_upload\" => \"required\",\n \"title\" => \"required|min:1|max:30\",\n \"credit\" => \"required|integer\",\n ]);\n\n $res = Resource::find($id);\n $res->owner_user_id = Auth::id();\n $res->access_role = implode('|', $request->access_role);\n $res->description = $request->description;\n $res->credit = $request->credit;\n // $res->file_upload = FileHelper::saveResourceFile($request->file_upload);\n $res->file_upload = $request->file_upload; // as url\n // $res->type = ($request.file_upload)->getClientOriginalExtension();\n $res->type = \"url\";\n if(!empty($request->book_id) and Book::find($requst->book_id))\n $res->owner_book_id = $request->book_id;\n $res->update();\n \n Session::flash('success', '资源信息修改成功');\n\n return redirect()->route('resource.show', $res->id);\n }", "title": "" }, { "docid": "2faaf8ddd37fb3a3dd00d2067935e627", "score": "0.618546", "text": "public function update(UpdateResourceArticleRequest $request, Resource $resource): JsonResponse\n {\n\n if ($request->hasFile('url')) {\n Storage::disk('article')->delete($resource->url);\n $resource->url = $request->url->store('articles', 'article');\n }\n\n if ($resource->isClean()) {\n return $this->errorResponse('Se debe especificar al menos un valor diferente para actualizar', 422);\n }\n\n $resource->save();\n return $this->api_success([\n 'data' => new ResourceArticleResource($resource),\n 'message' => __('pages.responses.updated'),\n 'code' => 200\n ]);\n }", "title": "" }, { "docid": "41d9c906adb39164a3ea97f83f0d6b4c", "score": "0.6004039", "text": "public function update(Request $request, $id) {\n //\n $resource = Resource::find($id);\n if($request->resourceislink == \"No\"){\n if($resource->external_link == \"Yes\"){\n $validator = Validator::make($request->all(), [\n 'resource_name' => 'required',\n 'file' => 'required|mimes:pdf,xls,xlsm,xlsx,doc,docx,ppt,pptm,pptx,jpeg,bmp,png,bmp,gif,svg',\n ]);\n }else{\n $validator = Validator::make($request->all(), [\n 'resource_name' => 'required',\n ]);\n }\n }else{\n $validator = Validator::make($request->all(), [\n 'resource_name' => 'required',\n 'file' => 'required|url',\n ]);\n }\n\n if ($validator->fails()) {\n $access_log = new AccessLog;\n $access_log->user = Auth::user()->username;\n $access_log->link_accessed = str_replace(url('/'),\"\",url()->current());\n $access_log->action_taken = \"Edit \".$resource->resource_type.\" Resource\";\n $access_log->action_details = \"Editing of \".$resource->resource_type.\" Resource interrupted due to validation errors\";\n $access_log->action_status = \"Failed\";\n $access_log->save();\n\n return back()->withErrors($validator)->withInput()->with('editresource',$resource);\n }else{\n if($request->resourceislink == \"No\"){\n if($request->file){\n //Upload the resource file in storage/app/public/resources folder \n $file_name = (string) ($request->file->store('public/resources'));\n $file_name = str_replace('public/', '', $file_name);\n \n $edit_resource = Resource::find($id);\n $edit_resource->resource_name = $request->resource_name;\n $edit_resource->resource_location = $file_name;\n $edit_resource->external_link = $request->resourceislink;\n $edit_resource->subfolder_id = $request->subfolder_id;\n $edit_resource->save();\n }else{\n $edit_resource = Resource::find($id);\n $edit_resource->resource_name = $request->resource_name;\n $edit_resource->external_link = $request->resourceislink;\n $edit_resource->subfolder_id = $request->subfolder_id;\n $edit_resource->save();\n }\n }else{\n $edit_resource = Resource::find($id);\n $edit_resource->resource_name = $request->resource_name;\n $edit_resource->resource_location = $request->file;\n $edit_resource->external_link = $request->resourceislink;\n $edit_resource->subfolder_id = $request->subfolder_id;\n $edit_resource->save();\n } \n \n return back()->with('resouce','Resource was succesfully uploaded')->with('resoucetype',$resource->resource_type);\n }\n }", "title": "" }, { "docid": "dd769c108800c8271a7f2c99245c843e", "score": "0.597514", "text": "public function updateStream($path, $resource, Config $config)\n {\n\n }", "title": "" }, { "docid": "eaee54943a52f02e9d836bade5ff0c75", "score": "0.59377414", "text": "public function updateStream($path, $resource, Config $config)\n {\n }", "title": "" }, { "docid": "98fadc36fd3a4194a25023de21dae9ff", "score": "0.59242314", "text": "public function save($resource);", "title": "" }, { "docid": "c94044d21c7dac20d5d21a469d63f195", "score": "0.59235406", "text": "public function testItShouldUpdateSpecifiedResource()\n {\n $this->json('PUT', $this->base_url . $this->getId(), $this->data, $this->getHeaders())\n ->assertStatus(200)\n ->assertJsonStructure($this->json);\n }", "title": "" }, { "docid": "48a6e00b66b63cd7ac857215e12bb74f", "score": "0.58948725", "text": "public function update_($resource, ...$id) {\n\t\t$this->_checkResource ( $resource, function () use ($id) {\n\t\t\tif (! $this->hasErrors ()) {\n\t\t\t\tparent::_update ( ...$id );\n\t\t\t} else {\n\t\t\t\techo $this->displayErrors ();\n\t\t\t}\n\t\t} );\n\t}", "title": "" }, { "docid": "630a533750db7d2a089a96d2e8e1e2d0", "score": "0.5843074", "text": "public function update(Request $request, $id)\n\t{\n\t\t$accessLevel = $request->user()->hasAccessTo('storage', 'edit', 0);\n\t\tif ($accessLevel < 1) {\n\t\t\tthrow new AccessDeniedHttpException('You don\\'t have permission to access this page');\n\t\t}\n\n\t\t$this->validate($request, [\n\t\t\t'title' => 'required'\n\t\t]);\n\n\t\t$storage = storage::where('organization_id', $request->user()->organization_id)->where('storage_id', $id)->first();\n\t\tif (is_null($storage)) {\n\t\t\treturn 'No such storage';\n\t\t}\n\n\t\t$storage->title = $request->title;\n\t\t$storage->type = $request->type;\n\t\t$storage->description = $request->description;\n\t\t$storage->organization_id = $request->user()->organization_id;\n\n\t\t$storage->save();\n\n\t\tSession::flash('success', 'Новый склад успешно сохранен!');\n\n\t\treturn redirect()->route('storage.show', $storage->storage_id);\n\t}", "title": "" }, { "docid": "a6fd2ebf36845fedc38da71edc963161", "score": "0.58306503", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->available_colors = $request->available_colors;\n $product->available_sizes = $request->available_sizes;\n $product->discount = $request->discount;\n $product->image = $request->image;\n $product->stock = $request->stock;\n $product->save();\n\n return new ProductResource($product);\n }", "title": "" }, { "docid": "4bc6a6b46ecee85bd6f0b6a0548271b3", "score": "0.582811", "text": "public function update(Request $request, $resource, $id)\n {\n return $this->repository->update($id, $request->all());\n }", "title": "" }, { "docid": "f0482e3ac4ae9626608914e5608b9630", "score": "0.58134246", "text": "public function updateStream($path, $resource, array $config = [])\n {\n $result = parent::updateStream($path, $resource, $config);\n\n if ($result && $resource = $this->get($path)) {\n return $this->dispatch(new SyncFile($resource));\n }\n\n return $result;\n }", "title": "" }, { "docid": "44b2a146d07735a49eec32f23fe41df0", "score": "0.5792586", "text": "public function updateById();", "title": "" }, { "docid": "f67879fb9debb5940a340430c2ce7193", "score": "0.5784806", "text": "public function update(Request $request, Problem $problem, Storage $storage)\n {\n if ($storage->name !== $request->name) {\n $isExists = $problem->storages()->where('name', $request->name)->exists();\n if ($isExists) {\n dd(\"storage `\" . $request->name . \"` is already exists\");\n }\n }\n $storage->fill($request->all());\n $storage->save();\n return redirect(route('problems.show', [\n 'problem' => $problem,\n ]));\n }", "title": "" }, { "docid": "3042155ddc4627ea088faa7fbe4fcbfd", "score": "0.57552326", "text": "public function update($id, Request $request)\n\t{\n\n\t\t$entity = $this->manager->getRepository()->findResource($id);\n\n\t\tif (empty($entity))\n\t\t\tabort(404);\n\n\t\t$params = $request->all();\n\t\t$params = array_merge($params, ['resource_container' => $entity, 'user' => $this->getUser()]);\n\n\t\t$entity = $this->manager->updateOrCreate([\n\t\t\t'resource_container_id' => $entity->id,\n\t\t\t'user_id' => $this->getUser()->id\n\t\t], $params);\n\t\t\n\t\treturn $this->success([\n\t\t\t'message' => 'ok',\n\t\t\t'data' => [\n\t\t\t\t'resource' => $this->serialize($entity)\n\t\t\t]\n\t\t]);\n\n\n\t}", "title": "" }, { "docid": "9aebab206cbd3cb1ae7fc60ffdd5c17a", "score": "0.5754308", "text": "public function updateSingle($request, $response, $args){\n\t\t$response = $this->gateway($this->getNeededCap(__FUNCTION__), $response);\n\t\tif ( $response->getStatusCode() != 200 ){\n\t \t\treturn $response;\n\t \t}\n\t\t//TODO check data type & id against resource > via middleware, serve 409 error on mismatch\n\t \t$resource_model_class = $this->resource_model_class;\n\t \t$resource_slug = $resource_model_class::getResourceSlug();\n \t\t$resource = $args[$resource_slug];\n\t\t$input = $request->getParsedBody()['data'];\n \t\t$return = $this->validateAndSave($resource,$input);\n \t\treturn $response->withJsonAPI($return['to_json'],$return['code']);\n\t}", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747208", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "6b5928bfd8cfb173f6ff973bf5da429a", "score": "0.5725117", "text": "public function update(Request $request)\n {\n //\n\n $item = $request->id;\n if ($request->hasFile('thumb')) {\n $thumb = $request->file('thumb');\n $thumb_file = $this->uploadImage($thumb, '');\n $data['image'] = $thumb_file;\n\n }\n $data = $request->all();\n\n\n $slug = \\Illuminate\\Support\\Str::slug($data['name']);\n $data['slug'] = $slug;\n\n\n $product = Product::find($item);\n\n $product->fill($data);\n\n if ($product->save()) {\n return redirect()->back()->with('success', 'Product updated Successfully');\n }\n\n }", "title": "" }, { "docid": "9002704608400a526dfa928357d65ebf", "score": "0.57221955", "text": "public function update(Request $request)\n {\n\n $product = Products::find($request->id);\n\n $product->update([\n 'name' => $request->name,\n 'stock' => $request->stock,\n 'id_user' => Auth::user()->id\n ]);\n\n if($request->file('imagen')){\n $imagename = $request->file('imagen')->getClientOriginalName();\n $request->file('imagen')->storeAs('public/image', $imagename);\n // $path = Storage::disk('public')->put('image', $request->file('imagen')->getClientOriginalName());\n $product->fill(['imagen' => 'storage/image/'.$imagename])->save();\n }\n\n return $product;\n }", "title": "" }, { "docid": "cd5df57c2c83d7637ab39eb4c24ca282", "score": "0.5718714", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $this->validate($request, [\n 'category_id' => 'required',\n 'unit_id' => 'required',\n 'name' => [\n 'required',\n Rule::unique('products')->ignore($product->id),\n ],\n 'purchase_price' => 'required',\n 'sell_price' => 'required',\n 'quantity' => 'required',\n ]);\n\n $product->category_id = $request->category_id;\n $product->unit_id = $request->unit_id;\n $product->name = $request->name;\n $product->sku = Helpers::getSKUProduct($request->name, $request->id);\n $product->barcode = Helpers::getBarcodeProduct($request->name);\n $product->description = $request->description;\n //TODO: update image in storage path\n $product->image = $request->image;\n $product->quantity = $request->quantity;\n $product->quantity_alert = $request->quantity_alert;\n $product->cost_price = Helpers::calculateCostPrice($product->purchase_price, $product->quantity, $request->purchase_price, $request->quantity);\n $product->purchase_price = $request->purchase_price;\n $product->sell_price = $request->sell_price;\n $product->status = $request->status;\n\n $product->update();\n\n return new ProductResource($product);\n }", "title": "" }, { "docid": "72e37fd6c46c81cc34e4aad069244d7f", "score": "0.5696679", "text": "abstract function put($path, $data);", "title": "" }, { "docid": "615ba40be5a0af225501e371af76c0b2", "score": "0.5691626", "text": "public function update(Request $request, $id)\n {\n \n $social = Social::find($id);\n $this->validate(request(), [\n 'name' => 'required',\n 'link' => 'required',\n 'icon' => 'required'\n ]);\n\n Storage::Delete('public/social/'.$social->icon);\n\n if ($request->hasFile('icon')) {\n $filename=$request->icon->getClientOriginalName();\n $request->icon->storeAs('public/social',$filename);\n $social->icon=$filename;\n $social->name = $request->get('name');\n $social->link = $request->get('link');\n $social->save();\n return redirect('/admin/social')->with('success','Social has been updated');\n \n }\n\n\n\n }", "title": "" }, { "docid": "8759752add8b6db67fed4d69cb0208e8", "score": "0.5683185", "text": "public function update()\n\t{\n\t\tparent::update();\n\t\t$this->write();\n\t}", "title": "" }, { "docid": "b867c63b8317ab70317f7b53e3441ded", "score": "0.56789744", "text": "public function update(ProductUpdateRequest $request, $id)\n {\n $product = Product::findOrFail($id);\n $product->update($request->all());\n return (new ProductResource($product->loadMissing('imageable')))-> response()->setStatusCode(200);\n }", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "ea54f106887794c3110ad39c81f775dc", "score": "0.5674029", "text": "public function update($record, ResourceObjectInterface $resource, EncodingParametersInterface $params);", "title": "" }, { "docid": "8c2162a8e7fe286f725a1d03ccd562a3", "score": "0.5662784", "text": "public function update(Request $request, $id)\n {\n $update = HomeT::find($id); \n Storage::disk('public')->delete('img/avatar/'.$update->src);\n $update->src = $request->file('src')->hashName();\n $update->temoignage = $request->temoignage; \n $update->nom = $request->nom; \n $update->prenom = $request->prenom; \n $update->fonction = $request->fonction; \n\n $update->save(); \n $request->file('src')->storePublicly('img/avatar/', 'public');\n\n return redirect()->back(); \n }", "title": "" }, { "docid": "c0268fd89d504e7e3334bdc92717f035", "score": "0.5641325", "text": "public function update() {\n\t\t\n\t\t$mods = $this->_data_modified[$this->_data_position];\n\t\tif (count($mods) < 1) return true; // no changes.\n\t\t\t\n\t\t// Build data\n\t\t$changes = [];\n\t\tforeach ($mods as $mod) $changes[$mod] = $this->__get($mod);\n\t\t\n\t\t// Build URL\n\t\t$url = \"table/\".$this->_table_name.\"/\".$this->__get(\"sys_id\");\n\t\t\n\t\t// Use GlideAccess to run the PUT command \n\t\t// Throw a GlideAccessException or a GlideAuthenticationException on error \n\t\t$result = $this->_access->put($url, json_encode($changes));\n\t\t\t\n\t\t// Clear out the pending updates for this record\n\t\t$this->_data_modified[$this->_data_position] = [];\n\t}", "title": "" }, { "docid": "194348e8143807f54599362cf6318737", "score": "0.5635772", "text": "public function update (object $entity);", "title": "" }, { "docid": "3f82a5c4e0e6d64fd1809d61189f5d3d", "score": "0.56336915", "text": "public function update(Request $request)\n {\n $slider=Slider::find($request->id);\n if($request->hasFile('image')) {\n $file = $request->file('image');\n $file_name = $file->getClientOriginalName();\n $path = $request->file('image')->storeAs('public/slider',$file_name);\n $slider->image=$file_name;\n $Image = str_replace('/storage', '', $request->old_image);\n #Using storage\n if(Storage::exists('public/slider/' . $Image)){\n $delete= Storage::delete('/public/slider/' . $Image);\n }\n } \n $slider->title=$request->title;\n $slider->updated_at=date('Y-m-d H:m:s');\n $slider->update();\n alert::success('Slider Updated Successfully');\n return redirect()->back();\n }", "title": "" }, { "docid": "7afe1f5b389ba43a34c655b4630cdebb", "score": "0.56085145", "text": "public function update (Request $request, $id)\n {\n// $product = Product::find($id);\n//\n// $product->name='foo';\n//\n// $product->save();\n }", "title": "" }, { "docid": "b7bac3ceb1b9b8584ebd61b08fa09788", "score": "0.5604227", "text": "public function putAction()\n {\n /** XXX **/\n\n $this->view->message = sprintf('Resource #%s Updated', $id);\n $this->_response->ok();\n }", "title": "" }, { "docid": "b7bac3ceb1b9b8584ebd61b08fa09788", "score": "0.5604227", "text": "public function putAction()\n {\n /** XXX **/\n\n $this->view->message = sprintf('Resource #%s Updated', $id);\n $this->_response->ok();\n }", "title": "" }, { "docid": "861587caf58c3f620dbafce99fe22615", "score": "0.56020206", "text": "public function update($id, $request);", "title": "" }, { "docid": "c5d23e5b9877982ada89cdd5d607b6f1", "score": "0.5595249", "text": "public function put($path);", "title": "" }, { "docid": "2617ce73a1286e2959b6286b9cbb5cdc", "score": "0.55937576", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required|max:30|unique:sizes,name,'.$id \n ]);\n\n $size = Size::findOrFail($id);\n $size->name = $request->name; \n $size->save();\n\n return new SizeResource($size);\n }", "title": "" }, { "docid": "828dbd6951736580bd5869c57009736a", "score": "0.559071", "text": "public function update(int $resourceId): JsonResponse\n {\n $resource = static::resource();\n $resource = $resource::findOrFail($resourceId);\n\n $request = app(static::resourceFormRequest());\n\n $resource = $resource->fill($request->validated());\n\n DB::transaction(function () use ($resource, $request) {\n $this->authorize('isAdmin');\n $resource->save();\n });\n\n return $this->sendResponse($resource, 'Record Updated Successfully');\n }", "title": "" }, { "docid": "222e617c89991e0979d369309504472e", "score": "0.55868655", "text": "function put($resource, $payload = array(), $headers = array())\n {\n $result = $this->client->put($this->build_url($resource), [\n 'headers' => array_merge([\n 'Content-Type' => $this->getContentType(),\n 'Authorization' => $this->getBearer(),\n 'Content-Length' => (!count($payload)) ? 0 : strlen(json_encode($payload)),\n ], $headers),\n 'body' => json_encode($payload)\n ]);\n\n return $result;\n }", "title": "" }, { "docid": "cc73a907b4a48e339742b8c2bd070415", "score": "0.5572921", "text": "public function update(Request $request, $id) {\n $resource = static::$resource::findOrFail($id);\n \n $data = $request->validate(static::$validation);\n\n $resource->update($data);\n\n foreach($data as $key => $value) {\n if(is_array($value) && method_exists($resource, $key)) {\n call_user_func([$resource, $key])->sync($value);\n }\n }\n\n return redirect($this->getUrl())->with('success', $this->getResourceName(false) . ' updated successfully');\n }", "title": "" }, { "docid": "3220bb444c54147e54b8e439712c9f11", "score": "0.55686116", "text": "public function update(Request $request, $id)\n\t{\n ob_start(); // not needed if output_buffering is on in php.ini\n ob_implicit_flush(); // implicitly calls flush() after every ob_flush()\n\n $product = Product::findOrFail($id);\n $this->validate($request,\n [\n 'dish' => 'required|min:5',\n 'menu_category_id' => 'required|Integer',\n 'price' => 'required'\n ]\n );\n\n \n $product->update($request->all());\n\n if($request->file('image')) {\n\n // get product id and sku and use it to identify image\n $imageName = $product->sku . '-' . $product->id . '.' . \n $request->file('image')->getClientOriginalExtension();\n\n // save the new image\n $request->file('image')->move(\n base_path() . '/public/images/', $imageName\n );\n $product->image = $imageName;\n\n // update product with new image name\n $product->update();\n //flush();\n ob_clean();\n ob_flush();\n //clearstatcache ();\n $products = Product::all();\n\n } // if updated image was submitted\n \n return redirect('products_admin');\n }", "title": "" }, { "docid": "c270afb4bf92903f6af7a541b2310395", "score": "0.55680007", "text": "public function update(Request $request, $id)\n {\n $product = Product::where('slug', $id)->first();\n $product->name = $request->name;\n $product->slug = str_slug($request->name);\n $product->category_id = $request->category_id;\n $product->price = $request->price;\n $product->old_price = $request->old_price;\n $product->min_order = $request->min_order;\n $product->description = $request->description;\n\n if(!$request->has('in_stock')){\n $product->in_stock = false;\n }else{\n $product->in_stock = true;\n }\n\n if(!$request->has('is_featured')){\n $product->featured = false;\n }else{\n $product->featured = true;\n }\n\n if($request->hasFile('image')){\n $path = storage_path('app/public/products');\n \\File::isDirectory($path) or \\File::makeDirectory($path, 0777, true, true);\n\n $image = $request->file('image');\n $filename = time().'.'.$image->getClientOriginalExtension();\n $image->move($path,$filename);\n $oldfile = $product->photo;\n $product->photo = $filename;\n \\File::delete($path.'/'.$oldfile);\n }\n\n $product->update();\n \\Session::flash('success', 'Product was successfully updated');\n return back();\n }", "title": "" }, { "docid": "9b0a1be95f266f1629ffadd26d65152d", "score": "0.55679286", "text": "protected function updateResource($resource, $id, array $data, $message = null)\n {\n $resource = $resource->findOrFail($id);\n\n $resource->update($data);\n\n return $resource;\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": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\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": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "a262aa354909e0f60e98829ffd019274", "score": "0.5557795", "text": "public function update(Request $request, $id)\n {\n $instrument = Instruments::find($id);\n if(isset($request->path)){\n $path = $request->file('path')->store('uploads', 'public');\n } else {\n $path = $instrument->path;\n }\n\n $instrument->update([\n 'name' => $request->name,\n 'href' => $request->href,\n 'description' => $request->content,\n 'photo' => $path\n ]);\n session()->flash('success','Инструмент успешно обновлен');\n return redirect()->route('instrument.index');\n }", "title": "" }, { "docid": "ffe74e555ccf4883e40a207b843213c6", "score": "0.5553755", "text": "public function update($id, EditResourceImageRequest $request)\n {\n $resourcecenterImage = ResourceCenterImage::findOrFail($id);\n $this->setUpdatedModelValues($request, $resourcecenterImage);\n // if file, we have additional requirements before saving\n if ($this->newFileIsUploaded()) {\n $this->deleteExistingImages($resourcecenterImage);\n $this->setNewFileExtension($request, $resourcecenterImage);\n }\n\n $resourcecenterImage->update([\n 'book_name' => $request->input('book_name'),\n 'category_name' => $request->input('category_name')\n ]); \n\n $resourcecenterImage->save();\n// check for file, if new file, overwrite existing file\n if ($this->newFileIsUploaded()){\n $file = $this->getUploadedFile();\n $this->saveImageFiles($file, $resourcecenterImage);\n }\n $thumbnailPath = $this->thumbnailPath;\n $imagePath = $this->imagePath;\n alert()->success('Congrats!', 'image edited!');\n return view('resourcecenter-image.view', compact('resourcecenterImage',\n 'thumbnailPath',\n 'imagePath'));\n }", "title": "" }, { "docid": "3cc3c8178bfb516c83781b7b045205b3", "score": "0.5553084", "text": "public function update()\n\t{\n\t\t$this->reset_error_msg();\n\t\t$result = ajax::asset_update(\n\t\t\t\t\t\t$this->schema->folder_id,\n\t\t\t\t\t\t$this->schema->view_name,\n\t\t\t\t\t\t$this->fields,\n\t\t\t\t\t\t$this->id\n\t\t);\n\t\tif (!is_int($result)) {\n\t\t\t$this->set_error_msg($result);\n\t\t}\t\n\t}", "title": "" }, { "docid": "b2529b99a7a37449008d06dce086f0aa", "score": "0.55367374", "text": "public function update(Request $request, $id)\n {\n $validateData = $request->validate([\n 'image' => ['max:1024','nullable'],\n 'link' => ['url','nullable']\n ]);\n\n $store = Promotionalslider::find($id);\n $store->link = $request->link;\n if($request->hasfile('image')){\n\n $imagePath = $store->image;\n\n if(File::Exists($imagePath)){\n File::delete($imagePath);\n }\n\n $filename = str_replace(' ','-', $request->image->getClientOriginalName());\n $request->image->move(public_path('media/promotional_slider/'),$filename);\n $store->image ='public/media/promotional_slider/'.$filename;\n }\n \n\n if($store->save()){\n $notification = array(\n 'message'=>'Successfully Promotional Slider Updated',\n 'alert-type'=>'success'\n );\n\n return redirect()->route('promotional-slider')->with($notification);\n }else{\n $notification = array(\n 'message'=>'Something Went Wrong',\n 'alert-type'=>'error'\n );\n\n return redirect()->route('promotional-slider')->with($notification);\n }\n }", "title": "" }, { "docid": "91039ce0cfc444382b037c86ba4ab01d", "score": "0.55300915", "text": "public function update( $data );", "title": "" }, { "docid": "e8f2a79f2bd8c3eb405e389cd50395bf", "score": "0.5526578", "text": "public abstract function update($data);", "title": "" }, { "docid": "ac2aad33da58e5ad706eece6ab1eea86", "score": "0.55200577", "text": "public function update(Request $request, $id): \\Illuminate\\Http\\RedirectResponse\n {\n $request->validate([\n 'name' => 'required',\n ]);\n $br = BaseResources::find($id);\n $br->name = $request->name;\n $br->save();\n return redirect()->route('bases.index')\n ->with('success','Base Resource has been updated successfully');\n }", "title": "" }, { "docid": "8f3102dfb73015454da2f2685b058666", "score": "0.5517063", "text": "public function update(Request $request, $id)\n {\n // $request->validate([\n // 'title' => 'required',\n // 'price' => 'required',\n // 'description' => 'required|numeric',\n // 'image' => 'required|image|mimes:jpeg,png,jpg,gif',\n // ]);\n\n\n $product = Product::find($id);\n $product->title = $request->get('Title');\n $product->description = $request->get('Description');\n //$product->image = $request->get();\n $product->price = $request->get('Price');\n if($request->hasFile('Image')){\n $file = $request->file('Image');\n $filename = time().'.'.$file->getClientOriginalExtension();\n $location = public_path('/images');\n $file->move($location,$filename);\n $oldImage = $product->image;\n \\Storage::delete($oldImage);\n $product->image = $filename;\n\n }\n $product->save();\n return back()->withInfo('product successfully update');\n }", "title": "" }, { "docid": "b5d2b22e695863a96f5a335c883dea91", "score": "0.55156153", "text": "public function update($item);", "title": "" }, { "docid": "59cc7aa6a27c614e6dbea168303030cb", "score": "0.5510812", "text": "public function update(Request $request, Memory $memory)\n {\n //\n }", "title": "" }, { "docid": "550e526ae84b71f87da655893d62fd3e", "score": "0.55022335", "text": "public function update(Request $request, $id)\n {\n $productPic = $this->productRepo->find($id);\n $product = $request->except('_token', 'photo', '_method', 'product_categ', 'ar', 'en', 'volume', 'measure', 'num_of_item', 'item_cost');\n $product_categ = $request->get('product_categ');\n\n $activeLangCode = \\LanguageHelper::getLangCode();\n\n $product_trans = $request->only($activeLangCode);\n\n if ($request->hasFile('photo')) {\n // Delete old image first.\n $thumbnail_path = public_path() . '/images/products/thumb/' . $productPic->photo;\n File::delete($thumbnail_path);\n\n // Save the new one.\n $image = $request->file('photo');\n $imageName = $this->upload($image, 'products', true);\n $product['photo'] = $imageName;\n }\n\n $this->productRepo->update($id, $product, $product_trans, $product_categ);\n\n return redirect('/admin-panel/product')->with('updated', 'updated');\n }", "title": "" }, { "docid": "a43ab06ada401992dd7f3fdb88d45bfc", "score": "0.5498034", "text": "public function update(Model $acl_resource, array $info) {\n\n // Update record\n return parent::_update($acl_resource, $info);\n }", "title": "" }, { "docid": "2a1018c32a03eb53bdc4e273d245eb4b", "score": "0.5497446", "text": "function updateProduct() {\n\n $params = [\n 'name' => $this->product\n ];\n \n $response = getResponse(getConfigVar(\"api_url\"), \"products\", $params, [],'body');\n \n $this->qty = $response[\"results\"][0][\"qty\"];\n $this->price = $response[\"results\"][0][\"price\"];\n \n $product = get_page_by_title( $this->product, OBJECT, 'product' );\n \n $productID = $product->ID;\n \n update_post_meta( $productID, \"_stock\", $this->qty );\n update_post_meta( $productID, \"_price\", $this->price );\n }", "title": "" }, { "docid": "e12ba95416c234deaa01e27943c5b363", "score": "0.5497075", "text": "public function update(ProductStoreRequest $request, $id)\n {\n //\n $product = Product::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->category_id = $request->category_id;\n $product->price = $request->price;\n $product->image_path = $product->image_path;\n\n \n if($product->save()) {\n if($request->hasFile('image_path')) {\n $extension = $request->file('image_path')->getClientOriginalExtension();\n\n $filename = $product->id . '.' . $extension;\n\n $path = $request->file('image_path')->storeAs('products', $filename);\n $product->image_path = $filename;\n $product->save();\n }\n }\n\n return redirect()->route('products.index')->with('success', 'Product has been updated');\n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "807c599f788606e6432d3e0633f87027", "score": "0.5494425", "text": "public function update(Request $request,$id)\n {\n $product = Product::find($id);\n if ($request->updateimage) {\n $position = strpos($request->updateimage, ';');\n $sub=substr($request->updateimage, 0 ,$position);\n $ext=explode('/', $sub)[1];\n $name=time().\".\".$ext;\n $img=Image::make($request->updateimage)->resize(240,200);\n $upload_path='product/';\n $image_url=$upload_path.$name;\n $img->save($image_url);\n $product->image = $image_url;\n }\n $product->title = $request->title;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n return response()->json($product);\n\n }", "title": "" }, { "docid": "5e25fde2b05dc8aa69161eca66edd608", "score": "0.5493595", "text": "public function update()\n\t\t{\n\t\t\t// with an insert instead.\n\t\t\t$this->save();\n\t\t}", "title": "" }, { "docid": "97425bf86b91309c01997fb129746a78", "score": "0.5489399", "text": "public function testUpdate() {\n\n $book = $this->bookFactory->generate(1, TRUE);\n $book->set('name', 'Changed name');\n $res = $this->patch('/api/books' . $book->getId(), $this->toJson($book->getValues(TRUE)));\n $this->assertEquals(204, $res->getStatusCode());\n $book = $this->bookStorage->find($book->getId());\n $this->assertEquals('Changed name', $book->get('name'));\n }", "title": "" }, { "docid": "85714b33bdb1da52c9f3c38b3fb0e4fd", "score": "0.54882276", "text": "abstract public function update($id);", "title": "" }, { "docid": "684d005a26a2cb523ebddd9952606e58", "score": "0.54879177", "text": "public function update(Request $request, Product $product)\n {\n //\n \n $product=Product::find($request->input('id'));\n $filename=$product->image;\n if($request->hasFile('img')){\n Storage::delete($filename);\n $filename=Storage::put('public/products', $request->file('img'));\n }\n $product->name=$request->input('name');\n $product->image=$filename;\n $update=$product->save();\n if($update){\n return redirect()->route('product.show',['product'=>$product])->with(['scucess' => 'Sucessfully updated']);\n }\n }", "title": "" }, { "docid": "2e6523045766c061920aeea9222af1fe", "score": "0.54858494", "text": "public function edit(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "73aed3f2cb201636304e3d5dda73a09e", "score": "0.54824626", "text": "public function markAsChanged(ResolvedResource $resource);", "title": "" }, { "docid": "c583b303a0fc1fb0c4ff1107b3e09e10", "score": "0.5479377", "text": "public function update(StoreSlide $request, $id)\n {\n $slide = Slide::find($id);\n $slide->url = $request->input('url');\n\n if ($request->hasFile('cover')) {\n // upload and rsize image\n $file_handler = new CarouselFiles($slide, $request);\n $image = $file_handler->save();\n\n $slide->image = $image;\n }\n\n $slide->save();\n\n return redirect()->route('admin_carousel_edit', ['slide' => $id]);\n }", "title": "" }, { "docid": "9597f2dbc4718b9f333e4446e6945f31", "score": "0.5478411", "text": "public function update($data) {\n }", "title": "" }, { "docid": "9f003d2b5bf2d688d40ed0c072d56402", "score": "0.5468303", "text": "public function update(Request $request, $id)\n {\n Auth::User()->authorizeRoles(['admin']);\n $this->validate($request, [\n 'title' =>'required',\n 'description' =>'required',\n 'isbn' =>'required',\n 'quantity' =>'required',\n 'price' =>'required',\n 'author' =>'required',\n 'genre' =>'required',\n 'image' =>'image|nullable|max:1999'\n ]);\n\n $item = Catalog::find($id);\n if ($request->hasFile('image')) {\n $path = $request->file('image')->store('catalog_images', 's3');\n if ($item->image != 'catalog_images/noimage.jpg') {\n Storage::disk('s3')->delete($item->image);\n }\n $item->image=$path;\n }\n $item->title=$request->input('title');\n $item->description=$request->input('description');\n $item->isbn=$request->input('isbn');\n $item->quantity=$request->input('quantity');\n $item->price=$request->input('price');\n $item->authorId=$request->input('author');\n $item->genreId=$request->input('genre');\n $item->save();\n return redirect('/catalog/'.$id)->with('success', 'Item updated');\n }", "title": "" }, { "docid": "dbac649412e8591fc3a2a2615f2f7767", "score": "0.5468077", "text": "abstract protected function update($entity);", "title": "" }, { "docid": "6555dceeb8fb592d28c1c54627f3087e", "score": "0.5467873", "text": "public static function updateResource($path, $object, $email)\n {\n if (is_array($object)) {\n $object = (object)$object;\n }\n self::connection()->addHeader('X-BEHALF-KEY', $email);\n return self::connection()->put(self::$api_path . $path, $object);\n }", "title": "" }, { "docid": "6dbe9a80c3cc7c4c7214a73b919cb78b", "score": "0.54670787", "text": "public function update($request);", "title": "" }, { "docid": "d6605be9a7cd37fa11f95b43e9749bd9", "score": "0.54651225", "text": "public function update($path, $time = null);", "title": "" }, { "docid": "fff4ed84e179c6d810f4109953693135", "score": "0.5464452", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "7866059d59e3ac76fe1a71f510712109", "score": "0.54483366", "text": "public function putStream($path, $resource, array $config = []);", "title": "" }, { "docid": "95ec1039e714eda8d36c46e04fc2aeae", "score": "0.54446787", "text": "public function updateResource(Resources $resources) {\n $preparedStmt = \"UPDATE \" . $resources->getTableName() . \" SET title=?, categoryName=?, linkResource=? WHERE resourceID=?\";\n $resources->setSql($preparedStmt);\n $response = $this->connection->update($resources);\n return $response;\n }", "title": "" }, { "docid": "80ec716f79dfea9cd0d35ec83acd6fad", "score": "0.54376215", "text": "public function update(Request $request, $id)\n {\n $input = $request->all();\n \t\n \tif(isset($input['image']))\n\t \t$input['image'] = $this->upload ($input['image']);\n \t\n \tItem::findOrFail($id)->update($input);\n \t\n \treturn redirect()->back();\n }", "title": "" }, { "docid": "90bfecb108e2227ad224fef4f176d822", "score": "0.54288775", "text": "public function update(ProductRequest $r, $id)\n {\n $r->validate([\n 'picture' => ['mimes:jpg,png,jpeg'], \n ]);\n\n $oldProduct = Product::findOrFail($id);\n\n if($r->hasFile('picture')) {\n \\Storage::disk('public')->delete('images/products/' . $oldProduct->picture);\n $file = $r->file('picture');\n $extension = $file->extension();\n $imgName = \\Str::slug($r->product_name) . '-' . time() . '.' . $extension;\n $file->storeAs('/images/products/', $imgName, 'public');\n } else {\n $imgName = $oldProduct->picture;\n }\n\n $oldProduct->update([\n 'product_name' => $r->product_name,\n 'picture' => $imgName,\n 'price' => $r->price,\n 'description' => $r->description,\n 'status' => $r->status,\n ]);\n\n return redirect()->route('admin.products.index')->with('success', 'Product Updated Successfully.');\n }", "title": "" }, { "docid": "2ff7fd3eab671b99901b6f6734766160", "score": "0.54233396", "text": "abstract public function update($entity);", "title": "" }, { "docid": "2fa0754ebc118bc9b4b721eefefed641", "score": "0.542287", "text": "public function update(StoreEditPartenaire $request, $id)\n {\n $partenaire = Partenaire::find($id);\n $partenaire->name = $request->name;\n $partenaire->url = $request->url;\n if($request->image != null){\n $partenaire->image = $request->image->store('','imgPartenaire');\n }\n $partenaire->save();\n return redirect()->route('partenaires.index',['partenaire'=> $partenaire->id]);\n \n }", "title": "" }, { "docid": "f34a06d4191c968bf71a45ea518e7ed0", "score": "0.54212976", "text": "public function updateObject( $id, $acl = null, $metadata = null, \n\t\t$extent = null, $data = null, $mimeType = null, $checksum = null );", "title": "" }, { "docid": "4d95f134a6e85e43f3f6f5bbc5cc2d52", "score": "0.54208726", "text": "public function update(Request $request, $id)\n {\n $nombre = $request->input('nombre');\n $imagen = $request->file('imagen');\n $descripcion = $request->input('descripcion');\n\n $ruta = \"-\";\n if($imagen){\n $ruta = $imagen->store('public'); \n $ruta = str_replace('public','storage',$ruta);\n }\n\n $categoria = Categoria::findOrFail($id);\n\n if($ruta!==\"-\"){\n $img = str_replace(\"storage/\", \"public/\", $categoria->imagen);\n $img = \"storage/\".$img;\n Storage::delete(asset('/storage/9yBlOG6KxNwaRoIrAKNpbBRr16q5PQyohbflIDcp.png'));\n }else{\n $ruta = $categoria->imagen;\n }\n\n $categoria->nombre = $nombre;\n $categoria->descripcion = $descripcion;\n $categoria->imagen = $ruta;\n $categoria->update();\n\n return redirect()->route('categoria.index');\n }", "title": "" }, { "docid": "b67a35c68f5872515b02fce609275aaa", "score": "0.54202235", "text": "public function update(Request $request, $id)\n {\n\n $product = \\App\\Product::find($id);\n\n if ($request->hasFile('image')) {\n $file = $request->file('image');\n\n $destinationPath = 'uploads/products/images'; // upload path\n $extension = $file->getClientOriginalExtension(); // getting image extension\n $fileName = rand(11111,99999).'.'.$extension; // renameing image\n\n $imageName = $destinationPath . '/' . $fileName;\n\n $file->move($destinationPath, $fileName); // uploading file to given path \n\n $picPath = $imageName;\n\n }else{\n $picPath = $product->pic;\n }\n \n $name = $request->get('product_name') ?: $product->name;\n $desc = $request->get('product_desc') ?: $product->desc;\n $price = $request->get('product_price') ?: $product->price; \n\n $product = \\App\\Product::find($id)->update([\n 'name' => $name,\n 'desc' => $desc,\n 'price' => $price,\n 'pic' => $picPath\n ]);\n\n return redirect('/admin/viewProducts');\n }", "title": "" }, { "docid": "da442d850bd93b9639b8f4a0480b48ea", "score": "0.5417181", "text": "public function update(ProductUpdateRequest $request, $id)\n {\n\n\n $data = $request->except('_token','image');\n $products = $this->products->find($id);\n if($request->file('image')){\n $image= $request->file('image');\n $fileName = time().$image->getClientOriginalName();\n $this->storage->put($this->upload_path. $fileName, file_get_contents($image->getRealPath()));\n $data['image'] = 'products/'.$fileName;\n Storage::disk('public')->delete($products->image);\n\n }\n if($this->products->update( $products->id,$data)){\n\n\n return redirect()->to('/products')->with('success','products updated successfully');\n }\n return redirect()->back()->with('errors','products cannot updated Successfully');\n }", "title": "" }, { "docid": "392ef1012a052c32a33aad61b5e08c8c", "score": "0.54169065", "text": "public function update(CreateProductRequest $request, Product $product)\n {\n $this->authorize('update', $product);\n $validated = $request->validated();\n\n $file = $request->file('img_path');\n $filename = time().$file->getClientOriginalName();\n $file->storeAs('public/images', $filename);\n\n $validated['img_path'] = 'storage/images/'.$filename;\n\n\n\n\n $product->update($validated);\n\n return redirect('/products');\n }", "title": "" } ]
5c4a7dee315b00ad2d7e694d5a40d60b
Gets tariffs by their cost based on yearly consumption
[ { "docid": "78d8b13641707edc4895d5cf7f8e668b", "score": "0.63634646", "text": "public function getTariffs(float $yearlyConsumption): array\n {\n $tariffs = $this->mapper->fetchAll();\n return $this->sortTariffsByYearlyCost($tariffs, $yearlyConsumption);\n }", "title": "" } ]
[ { "docid": "f831321660f2ccaa65d630c78c7e7d07", "score": "0.6468031", "text": "private function sortTariffsByYearlyCost(array $tariffs, float $yearlyConsumption): array\n {\n $results = [];\n foreach ($tariffs as $tariff) {\n $results[] = [\n 'name' => $tariff->getName(),\n 'yearlyCost' => $this->calculateTotalCostOfTariff($tariff->getPrice(), $yearlyConsumption),\n ];\n }\n\n usort($results, function ($a, $b) {\n return $a['yearlyCost'] <=> $b['yearlyCost'];\n });\n\n return $results;\n }", "title": "" }, { "docid": "2190a7d5bb8c1fb1844ab884e1d938e5", "score": "0.54576504", "text": "private function computesConsumptionForTargetYear()\r\n\r\n {\r\n $coeffToUse = $this->computesRatesByEnergy();\r\n\r\n for ($i = 0; $i < sizeof($this->consumptionRetrieved); $i++) {\r\n //i retrieve a day\r\n $currentDay = $this->consumptionRetrieved[$i];\r\n\r\n $current = $currentDay;\r\n $current->setQuarters(array());\r\n $currentDayQuarters = $currentDay->getgetQuarters();\r\n\r\n for ($j = 0; $j < sizeof($currentDayQuarters); $j++) {\r\n\r\n $currentQuarter = $currentDayQuarters[$j];\r\n $currentQuarter = $this->updateQuarter($currentQuarter, $coeffToUse);\r\n array_push($current, $currentQuarter);\r\n }\r\n\r\n\r\n array_push($consumptionComputedTargetYear, $current);\r\n\r\n }\r\n\r\n\r\n }", "title": "" }, { "docid": "81ee07ef9018564b31934ac3329a3cab", "score": "0.5328268", "text": "public function sumHTPerYear($year) {\n $query = $this->connexion->prepare(\"SELECT nb_heure,prix_unitaire,date_creation_facture, tva FROM factures WHERE date_creation_facture BETWEEN ? AND ?\");\n $query->bindValue(1, mktime(0, 0, 0, 1, 1, $year), PDO::PARAM_INT);\n $query->bindValue(2, mktime(0, 0, 0, 12, 31, $year), PDO::PARAM_INT);\n $query->execute();\n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "b62577a692a9800d73e6f5b3f0858a3d", "score": "0.52024126", "text": "public function getBranchesYearlySales($year)\n\t{\n\t\t\n\t\t//echo 'paso 0';\n\t\t\n\t\ttry{\n\t\t\n\t\t\t$token=getBearerToken();\n\t\t\t$api= new JWTPropio;\n\t\t\t$payload= $api->decode($token,'test123',['HS256']);\n\t\t\t\t\n\t\t}\n\t\tcatch(Exception $err)\n\t\t{\n\t\t\treturn '{\"error\":{\"message\":\"'.$err->getMessage().'\"}}';\t\n\t\t}\n\t\t\n\t\t//\t\techo 'paso 1';\n\n\n\t\t$sumaTotal=0.00;\n\t\t\n\t\t$mysqli = new mysqli($this->servername, $this->usernameServer, $this->password, \"parrotweb\");\n\t\t$mysqli->query(\"SET NAMES 'utf8'\");\n\n\t\t\n\t\t$query=\"select b.restId,cli.nombre,cli.sucursal,date_format(createTime,'%Y-%m-%dT%H%i%sZ') as created_at,\"; \n\t\t\t\t$query=$query.\" sum(total) as 'amount'\";\n\t\t\t\t$query=$query.\" from bills b, s3menudt.clientes cli\"; \n\t\t\t\t$query=$query.\" where b.restId=cli.restaurant_id and b.restId in(37,143,241)\";\n\t\t\t\tif($fechaInicio!='')\n\t\t\t\t\t$query=$query.\" and createTime>='\". $fechaInicio.\"'\"; \n\t\t\t\tif($fechaFin!='')\n\t\t\t\t\t$query=$query.\" and createTime<='\". $fechaFin.\"'\"; \n\t\t\t\tif($year!='')\n\t\t\t\t\t$query=$query.\" and year(createTime)=\". $year.\"\"; \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t$query=$query.\" group by b.restId,year(createTime),month(createTime) \"; \n\t\t\t\t$query=$query.\" order by year(createTime) desc,month(createTime);\";\n\n\t\t\t\t//echo $query;\n\t\t\t\t\t\t\t\t\n\t\t\t\t$result = $mysqli->query($query);\n\n\n\t\t\t\t$sumaTotal=0.00;\n\t\t\t\t$arrDatos= array();\n\t\t\t\twhile ($row = $result->fetch_array(MYSQLI_ASSOC)) \n\t\t\t\t{\n\t\t\t\t\t$sumaTotal=$sumaTotal + $row[\"amount\"];\n\t\t\t\t\t$arrDatos[]=$row;\n\n\t\t\t\t}\n\t\n\t\t\t\t\t\t\t\t\n\t\n\t\t\t\t$arrDatosEnviar= array();\n\t\t\t\t//$arrDatosSuma=\"total_sales\"=>\"$sumaTotal\";\n\t\t\t\t//$arrDatosEnviar=[\"sales\"=>$arrDatos,\"meta\"=>\"$sumaTotal\"];\n\t\t\t\t//$message=json_encode($arrDatosEnviar);\n\t\t\t\t$message='{\"sales\":[';\n\t\t\t\tforeach($arrDatos as $row)\n\t\t\t\t{\n\t\t\t\t\t$message=$message.'{\"restId\":'.$row[\"restId\"].',\"restName\":\"'.$row[\"nombre\"].' '.$row[\"sucursal\"].'\"created_at\":\"'.$row[\"created_at\"].'\",\"amount\":'.$row[\"amount\"].'},';\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t$message=substr($message,0,strlen($message)-1);\n\t\t\t\t\t\t\n\t\t\t\t$message=$message.'],';\n\t\t\t\t$message=$message.'\"meta\":{\"total_sales\":'.$sumaTotal.'}}';\n\t\t\t\treturn $message;\n\t\t\t\t\n\t}", "title": "" }, { "docid": "dda5bdfc9937aa7025ff45357fc7fd65", "score": "0.50600654", "text": "public function get_expense_list($year) {\n for ($i = 1; $i <= 12; $i++) { // query for months\n if ($i >= 1 && $i <= 9) { // if i<=9 concate with Mysql.becuase on Mysql query fast in two digit like 01.\n $start_date = $year . \"-\" . '0' . $i . '-' . '01';\n $end_date = $year . \"-\" . '0' . $i . '-' . '31';\n } else {\n $start_date = $year . \"-\" . $i . '-' . '01';\n $end_date = $year . \"-\" . $i . '-' . '31';\n }\n $get_expense_list[$i] = $this->admin_model->get_expense_list_by_date($start_date, $end_date); // get all report by start date and in date \n }\n return $get_expense_list; // return the result\n }", "title": "" }, { "docid": "2ae94845765bddcb1bee9aa675bc43ff", "score": "0.4957913", "text": "public function index()\n {\n $year = date('Y');\n $rates = [];\n $rates['jan'] = UserRate::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-01-%')\n ->first()['cost'];\n $rates['feb'] = UserRate::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-02-%')\n ->first()['cost'];\n $rates['mar'] = UserRate::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-03-%')\n ->first()['cost'];\n $rates['apr'] = UserRate::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-04-%')\n ->first()['cost'];\n $rates['mai'] = UserRate::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-05-%')\n ->first()['cost'];\n $rates['jun'] = UserRate::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-06-%')\n ->first()['cost'];\n $rates['jul'] = UserRate::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-07-%')\n ->first()['cost'];\n $rates['aug'] = UserRate::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-08-%')\n ->first()['cost'];\n $rates['sep'] = UserRate::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-09-%')\n ->first()['cost'];\n $rates['oct'] = UserRate::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-10-%')\n ->first()['cost'];\n $rates['nov'] = UserRate::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-11-%')\n ->first()['cost'];\n $rates['dec'] = UserRate::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-12-%')\n ->first()['cost'];\n \n $profits = [];\n $profits['jan'] = ReferralProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-01-%')\n ->first()['cost'];\n $profits['feb'] = ReferralProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-02-%')\n ->first()['cost'];\n $profits['mar'] = ReferralProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-03-%')\n ->first()['cost'];\n $profits['apr'] = ReferralProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-04-%')\n ->first()['cost'];\n $profits['mai'] = ReferralProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-05-%')\n ->first()['cost'];\n $profits['jun'] = ReferralProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-06-%')\n ->first()['cost'];\n $profits['jul'] = ReferralProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-07-%')\n ->first()['cost'];\n $profits['aug'] = ReferralProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-08-%')\n ->first()['cost'];\n $profits['sep'] = ReferralProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-09-%')\n ->first()['cost'];\n $profits['oct'] = ReferralProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-10-%')\n ->first()['cost'];\n $profits['nov'] = ReferralProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-11-%')\n ->first()['cost'];\n $profits['dec'] = ReferralProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-12-%')\n ->first()['cost'];\n\n $profits['jan'] += InvestmentProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-01-%')\n ->first()['cost'];\n $profits['feb'] += InvestmentProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-02-%')\n ->first()['cost'];\n $profits['mar'] += InvestmentProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-03-%')\n ->first()['cost'];\n $profits['apr'] += InvestmentProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-04-%')\n ->first()['cost'];\n $profits['mai'] += InvestmentProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-05-%')\n ->first()['cost'];\n $profits['jun'] += InvestmentProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-06-%')\n ->first()['cost'];\n $profits['jul'] += InvestmentProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-07-%')\n ->first()['cost'];\n $profits['aug'] += InvestmentProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-08-%')\n ->first()['cost'];\n $profits['sep'] += InvestmentProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-09-%')\n ->first()['cost'];\n $profits['oct'] += InvestmentProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-10-%')\n ->first()['cost'];\n $profits['nov'] += InvestmentProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-11-%')\n ->first()['cost'];\n $profits['dec'] += InvestmentProfit::select(DB::raw('SUM(cost) as cost'))\n ->where('created_at','LIKE', $year.'-12-%')\n ->first()['cost'];\n \n\n $components = [\n 'year' => $year,\n 'rates' => $rates,\n 'profits' => $profits,\n ];\n return view('adminpanel.index', $components);\n }", "title": "" }, { "docid": "f83e2acf082b0759b5221f8a51ff4e1c", "score": "0.49446696", "text": "private function listSpentCostsForCurrentYear(int $groupId){\n $group = Group::find($groupId); //TODO add filtering by user and sum row at bottom\n $currentYearBeginning = today()->format('y') . '-01-00';\n $currentYearEnding = today()->format('y') . '-12-30'; //TODO replace with a switch-case for 31 or 29 days monthes\n $membersIds = $group->members()->get()->isEmpty() ? $group->admin()->get(\"id\") :\n $group->members()->get(['id'])->merge($group->admin()->get(\"id\"));//to fix error when members are null\n $thisYearCosts = collect();\n foreach ($membersIds as $memberId){\n $memberId = $memberId->id;\n $temp = Cost::where('user_id',$memberId)->where('group_id', $groupId)->where('costs.created_at','<',\n $currentYearEnding)->where('costs.created_at','>', $currentYearBeginning)->join('users', 'costs.user_id', '=',\n 'users.id')->get(['name', 'cost_amount', 'costs.created_at', 'description']);\n foreach ($temp as $t){\n $thisYearCosts->push($t);\n }\n }\n return $thisYearCosts;\n }", "title": "" }, { "docid": "e913c40753fa809bbadbbc0db5b1a148", "score": "0.4876237", "text": "public static function getPlan($year)\n {\n $allPlan = PlanLearning::all();\n $nowPlan = array();\n foreach ($allPlan as $ap) {\n $checkYear = (int)date('Y', strtotime($ap->start));\n if ($checkYear == $year) {\n $nowPlan[] = $ap;\n }\n }\n return $nowPlan;\n }", "title": "" }, { "docid": "d9804cc1fe72f7dd7eb43dcbc324164c", "score": "0.4875705", "text": "public function getYearStats()\r\n {\r\n $iCurrentYear = date('Y');\r\n $aStatsByYear = array(\r\n ($iCurrentYear - 2) => array(\r\n 'nb_devis_crees' => 0,\r\n 'nb_devis_crees_et_acceptes' => 0,\r\n 'nb_devis_acceptes' => 0,\r\n 'chiffre_facture' => 0,\r\n ),\r\n ($iCurrentYear - 1) => array(\r\n 'nb_devis_crees' => 0,\r\n 'nb_devis_crees_et_acceptes' => 0,\r\n 'nb_devis_acceptes' => 0,\r\n 'chiffre_facture' => 0,\r\n ),\r\n ($iCurrentYear) => array(\r\n 'nb_devis_crees' => 0,\r\n 'nb_devis_crees_et_acceptes' => 0,\r\n 'nb_devis_acceptes' => 0,\r\n 'chiffre_facture' => 0,\r\n ),\r\n );\r\n\r\n // Generalizes the treatment (View to check => key to modify in the stats table)\r\n $aRequests = array(\r\n 'View_Client_Stats_NbDevisCrees' => 'nb_devis_crees',\r\n 'View_Client_Stats_NbDevisCreesEtAcceptes' => 'nb_devis_crees_et_acceptes',\r\n 'View_Client_Stats_NbDevisAcceptes' => 'nb_devis_acceptes',\r\n 'View_Client_Stats_ChiffreFacture' => 'chiffre_facture'\r\n );\r\n\r\n foreach ($aRequests as $sView => $sKeyToUpdate) {\r\n $oZendDbSelect = new Zend_Db_Select(Zend_Db_Table::getDefaultAdapter());\r\n $aData = $oZendDbSelect->from($sView)\r\n ->where('cl_id = ?', $this->getClId())\r\n ->where('(year = ' . ($iCurrentYear) . ' OR year = ' . ($iCurrentYear - 1) . ' OR year = ' . ($iCurrentYear - 2) . ')')\r\n ->query()->fetchAll();\r\n\r\n // For each year (N, N-1, N-2), retrieve the data if it is present\r\n foreach ($aData as $aRow) {\r\n $aStatsByYear[$aRow['year']][$sKeyToUpdate] = $aRow[$sKeyToUpdate];\r\n }\r\n }\r\n\r\n return $aStatsByYear;\r\n }", "title": "" }, { "docid": "ab29ff143bc70562a258c4063b429938", "score": "0.4833606", "text": "public function index()\n { $sum = Cost::sum('amount');\n $costs = Cost::paginate(4);\n $years = Cost::selectRaw('year(added_on) as year')->distinct()->get();\n return view('costs')->with(compact('costs', 'sum', 'years'));\n }", "title": "" }, { "docid": "dd09b593e2a7c4558230ca4eda1ca424", "score": "0.479668", "text": "protected function getDiscountForSwitchToYearly()\n {\n $amount = 0;\n foreach ($this->braintree_subscription->discounts as $discount) {\n if ($discount->id == 'plan-credit') {\n $amount += (float) $discount->amount * $discount->numberOfBillingCycles;\n }\n }\n return (object) [\n 'amount' => $amount,\n 'numberOfBillingCycles' => 1,\n ];\n }", "title": "" }, { "docid": "62e186299285c7df7ebb38e58f98e782", "score": "0.47501034", "text": "public static function getYearData($year)\n {\n $yearData = DB::table('meteo')\n ->whereYear('created_at', $year)\n ->get();\n\n $sortedData = new \\stdClass();\n $sortedData->temperature = [];\n $sortedData->wind = [];\n $sortedData->time = [];\n\n $allMonthsTemperatures = [];\n\n foreach ($yearData as $meteo) {\n $parsedTime = Carbon::parse($meteo->created_at);\n\n $allMonthsTemperatures[$parsedTime->englishMonth]['t'][] = $meteo->temperature;\n $allMonthsTemperatures[$parsedTime->englishMonth]['w'][] = $meteo->wind;\n }\n\n foreach ($allMonthsTemperatures as $month => $params) {\n $sortedData->temperature[] = array_sum($params['t'])/count($params['t']);\n $sortedData->wind[] = array_sum($params['w'])/count($params['w']);\n $sortedData->time[] = $month;\n }\n\n if ($sortedData) {\n return json_encode($sortedData);\n }\n\n Log::error('There is no any data for the chose period');\n\n return false;\n }", "title": "" }, { "docid": "988ee5ca974ff0f97a136beb7a4cda24", "score": "0.470495", "text": "private function getContributions($year)\n {\n // return the cached file if we have one\n $path = plugins_path(\"bedard/bedard/fixtures/contributions/{$year}.json\");\n\n if (file_exists($path)) {\n return json_decode(file_get_contents($path), true);\n }\n\n // and if not, time to scrape github\n $contents = file_get_contents(\"https://github.com/users/scottbedard/contributions?from={$year}-12-01&to={$year}-12-31\");\n\n preg_match_all('/data-count=\"(\\d+)\" data-date=\"([\\d\\-]+)\"/', $contents, $data);\n\n $contributions = array_combine($data[2], array_map('intval', $data[1]));\n\n return array_filter($contributions, function ($key) use ($year) {\n return Str::startsWith($key, $year);\n }, ARRAY_FILTER_USE_KEY);\n }", "title": "" }, { "docid": "4fd9390180b7710863037541d4e90ead", "score": "0.4669869", "text": "public function getTaxRates($amount)\n {\n $maxTaxNum = 2;\n $addedTaxes = [];\n $compoundTaxes = [];\n $ignoredPriorities = [];\n\n /*\n * Loop each rate and compound if necessary.\n */\n for ($index = 1; $index <= $maxTaxNum; $index++) {\n\n $taxInfo = $this->getRate($ignoredPriorities);\n if (!$taxInfo) {\n break;\n }\n\n if (!$taxInfo->compound) {\n $addedTaxes[] = $taxInfo;\n }\n else {\n $compoundTaxes[] = $taxInfo;\n }\n\n $ignoredPriorities[] = $taxInfo->priority;\n }\n\n $addedResult = $amount;\n $result = [];\n\n foreach ($addedTaxes as $addedTax) {\n $taxInfo = [];\n $taxInfo['name'] = $addedTax->name;\n $taxInfo['tax_rate'] = $addedTax->rate / 100;\n $addedResult += $taxInfo['rate'] = round($amount * ($addedTax->rate / 100), 2);\n $taxInfo['total'] = $taxInfo['rate'];\n $taxInfo['added_tax'] = true;\n $taxInfo['compound_tax'] = false;\n $result[] = (object) $taxInfo;\n }\n\n foreach ($compoundTaxes as $compoundTax) {\n $taxInfo = [];\n $taxInfo['name'] = $compoundTax->name;\n $taxInfo['tax_rate'] = $compoundTax->rate / 100;\n $taxInfo['rate'] = round($addedResult * ($compoundTax->rate / 100), 2);\n $taxInfo['total'] = $taxInfo['rate'];\n $taxInfo['compound_tax'] = true;\n $taxInfo['added_tax'] = false;\n $result[] = (object) $taxInfo;\n }\n\n return $result;\n }", "title": "" }, { "docid": "88ff7f7f5360c7a1dc5b1d9fc3e36ef6", "score": "0.4634748", "text": "function getAllLibraryDownloadsYear($libraryID, $date, $territory){\n \n $arr_all_library_downloads = array();\n $all_Ids = '';\n\t\t$sql = \"SELECT id, library_name from libraries where library_territory = '\".$territory.\"' ORDER BY library_name ASC\";\n\t\t$result = mysql_query($sql);\n\t\twhile ($row = mysql_fetch_assoc($result)) {\n\n $date_arr = explode(\"/\", $date);\n $startDate = date('Y-m-d', mktime(0, 0, 0, 1, 1, $date_arr[2])).\" 00:00:00\";\n $endDate = date('Y-m-d', mktime(0, 0, 0, 12, 31, $date_arr[2])).\" 23:59:59\";\n \n $libraryID = $row[\"id\"]; \n $libraryName = $row[\"library_name\"]; \n\n $lib_condition = \"and library_id = '\".$libraryID.\"'\";\n $conditions = array('created BETWEEN \"'.$startDate.'\" and \"'.$endDate.'\" '.$lib_condition.\"\");\n \n $count = $this->find(\n 'count', \n array(\n 'conditions' => $conditions,\n 'recursive' => -1\n )\n );\n \n $arr_all_library_downloads[$libraryName] = $count;\n \n }\n \n return $arr_all_library_downloads;\n \n }", "title": "" }, { "docid": "a889584340d47f376273307bdb714fdf", "score": "0.45769137", "text": "public function getYearContractAmount($year);", "title": "" }, { "docid": "ae2d69245c4f80d861f0bf66fcce04b0", "score": "0.45710054", "text": "public function getPercentByYear ( $year ) {\n\t\t$percent = get_option( 'jwa_car_listing' )['term_and_percent'];\n\n\t\t$carrent_year = date( 'Y' );\n\t\tswitch ( $year ) {\n\t\t\tcase ( $year > $carrent_year && ! empty( $percent['new']['percent'] ) ):\n\t\t\t\treturn $percent['new']['percent'];\n\t\t\t\tbreak;\n\t\t\tcase ( $carrent_year - 2 <= $year && ! empty( $percent['new']['percent'] ) ):\n\t\t\t\treturn $percent['two_year']['percent'];\n\t\t\t\tbreak;\n\t\t\tcase ( $carrent_year - 4 <= $year && ! empty( $percent['new']['percent'] ) ):\n\t\t\t\treturn $percent['three_year']['percent'];\n\t\t\t\tbreak;\n\t\t\tcase ( $carrent_year - 6 <= $year && ! empty( $percent['new']['percent'] ) ):\n\t\t\t\treturn $percent['four']['percent'];\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn $percent['default']['percent'];\n\t\t}\n\t}", "title": "" }, { "docid": "704732b6fb9e733f6bda20a4d096e8bc", "score": "0.4562239", "text": "public function getCost();", "title": "" }, { "docid": "704732b6fb9e733f6bda20a4d096e8bc", "score": "0.4562239", "text": "public function getCost();", "title": "" }, { "docid": "704732b6fb9e733f6bda20a4d096e8bc", "score": "0.4562239", "text": "public function getCost();", "title": "" }, { "docid": "9ebec38f88737f452a31dac207b87644", "score": "0.45352876", "text": "function getCompleteSum($itax_year) {\r\n \t$sql = 'SELECT\r\n\t\t\t\t d.name, d.address1, d.address2, d.city, d.state, d.zipcode,\r\n \t \t\t\td.phone, d.email, d.company_name, SUM(p.amount) amount\r\n\t\t\t\tFROM\r\n\t\t\t\t\tdonator d\r\n\t\t\t\t\tinner join payment p on d.id =p.donator_id\r\n\t\t\t\tWHERE\r\n \t \t\t\tyear(p.payment_date) = ?\r\n \t\t\tGROUP BY\r\n \t\t\t\td.id\r\n \t \t\tORDER BY\r\n\t\t\t\t\td.name, p.payment_date';\r\n \t$stmt = $this->conn->prepare($sql);\r\n \t$this->db->checkError();\r\n \t$stmt->bind_param('i', $itax_year);\r\n \t$this->db->checkError();\r\n \t$stmt->execute();\r\n \t$this->db->checkError();\r\n\r\n \t$reports = array();\r\n \t$stmt->bind_result($name, $address1, $address2, $city, $state, $zipcode,\r\n \t\t\t$phone, $email, $company_name, $amount);\r\n \twhile ($stmt->fetch()) {\r\n \t\t$reports[] = array('name' => $name, 'address1' => $address1,\r\n \t\t\t\t'address2' => $address2, 'city' => $city, 'state' => $state,\r\n \t\t\t\t'zipcode' => $zipcode, 'phone' => $phone, 'email' => $email,\r\n \t\t\t\t'company_name' => $company_name,\r\n \t\t\t\t'amount' => $amount);\r\n \t}\r\n \t$stmt->close();\r\n\r\n \treturn $reports;\r\n }", "title": "" }, { "docid": "592cd7f1aa793a6ef604bf13d27ebfb4", "score": "0.45225576", "text": "public function findBestFortuneInYear() {\n $query = $this->find();\n $query->select(['fortune_id'\n ,'rank'\n ,'fortunes.name'\n ,'fortunes.price'\n ,'fortunes.price'\n ,'fortunes.avatar'\n ,'fortunes.start_time'\n ,'fortunes.experience_history'])\n ->where(['fortune_kind_name' => self::KIND_YEAR])\n ->where(['FortuneRanking.delete_flg' => 0])\n ->contain(['Fortunes'])\n ->group(['fortune_id'])\n ->order(['rank' => 'asc']);\n return $query;\n }", "title": "" }, { "docid": "437304a9a0426854104f08281edd2701", "score": "0.4509233", "text": "private function make_request($to_index, $weight, $cost)\n {\n $curl = curl_init();\n $request = sprintf(\"http://tariff.russianpost.ru/tariff/v1/calculate?json&typ=4&cat=2&weight=%d&sumoc=%d&from=%d&to=%d&isavia=0&closed=1\",\n $weight, $cost, self::FROM_INDEX, $to_index);\n\n curl_setopt($curl, CURLOPT_URL, $request);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n $data = curl_exec($curl);\n\n curl_close($curl);\n\n if ($data === false) {\n return ['error' => 'server respond with errors'];\n }\n\n $data = json_decode($data, $assoc = true);\n\n if (isset($data['error'])) {\n return $data;\n }\n\n if (isset($data['paynds'])) {\n return [\n 'delivery_cost' => $data['paynds'] / 100, #paynds come in kopecks\n ];\n }\n }", "title": "" }, { "docid": "6054ad673f0d822ab7f18631c1373101", "score": "0.4497707", "text": "function YTDExpenseTotal()\r\n\r\n{\r\n//Set Current Year\r\n\t$year = date(\"Y\");\r\n\tfor ($counter = 0; $counter <=11; $counter +=1)\r\n\r\n\t{\r\n\t\t$x = $x + 1;\r\n\t\t$YTDExpense = $YTDExpense + yearExpenseTotal($x, $year);\r\n\t}\r\n\r\nreturn $YTDExpense;\r\n\r\n}", "title": "" }, { "docid": "042da94dc18d393a6f2e3ae0838e31be", "score": "0.44708836", "text": "public function getYearlySales($year)\n\t{\n\t\ttry{\n\t\t\n\t\t\t$token=getBearerToken();\n\t\t\t$api= new JWTPropio;\n\t\t\t$payload= $api->decode($token,'test123',['HS256']);\n\t\t\t\t\n\t\t}\n\t\tcatch(Exception $err)\n\t\t{\n\t\t\treturn '{\"error\":{\"message\":\"'.$err->getMessage().'\"}}';\n\t\t\t//exit;\n\t\t\t\t\t//echo '{\"error:{\"message\":\"'.$err->getMessage().'\"}};\n\t\t}\n\t\t\n\n\t\t$mysqli = new mysqli($this->servername, $this->usernameServer, $this->password, \"parrotweb\");\n\t\t$mysqli->query(\"SET NAMES 'utf8'\");\n\n\t\t\n\t\t$query=\"select date_format(createTime,'%Y-%m-%dT%H%i%sZ') as created_at,\"; \n\t\t$query=$query.\" sum(total) as 'amount'\";\n\t\t$query=$query.\" from bills \"; \n\t\t$query=$query.\" where restId=37\"; \n\t\tif($fechaInicio!='')\n\t\t\t$query=$query.\" and createTime>='\". $fechaInicio.\"'\"; \n\t\tif($fechaFin!='')\n\t\t\t$query=$query.\" and createTime<='\". $fechaFin.\"'\"; \n\t\tif($year!='')\n\t\t\t$query=$query.\" and year(createTime)=\". $year.\"\"; \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t$query=$query.\" group by year(createTime),month(createTime) \"; \n\t\t$query=$query.\" order by year(createTime) desc,month(createTime);\";\n\n\t\t$result = $mysqli->query($query);\n\n\n\t\t$sumaTotal=0.00;\n\t\t$arrDatos= array();\n\t\twhile ($row = $result->fetch_array(MYSQLI_ASSOC)) \n\t\t{\n\t\t\t$sumaTotal=$sumaTotal + $row[\"amount\"];\n\t\t\t$arrDatos[]=$row;\n\n\t\t}\n\t\n\t\t\t\t\t\t\t\t\n\t\n\t\t$arrDatosEnviar= array();\n\t\t//$arrDatosSuma=\"total_sales\"=>\"$sumaTotal\";\n\t\t//$arrDatosEnviar=[\"sales\"=>$arrDatos,\"meta\"=>\"$sumaTotal\"];\n\t\t//$message=json_encode($arrDatosEnviar);\n\t\t$message='{\"sales\":[';\n\t\tforeach($arrDatos as $row)\n\t\t{\n\t\t\t$message=$message.'{\"created_at\":\"'.$row[\"created_at\"].'\",\"amount\":'.$row[\"amount\"].'},';\n\t\t}\n\t\t\t\t\t\t\n\t\t$message=substr($message,0,strlen($message)-1);\n\t\t\t\t\t\t\n\t\t$message=$message.'],';\n\t\t$message=$message.'\"meta\":{\"total_sales\":'.$sumaTotal.'}}';\n\t\treturn $message;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t}", "title": "" }, { "docid": "e13ae1ffb7db15259382bb62cba6b7c1", "score": "0.446963", "text": "public function getJSONCarsFilteredAction(Request $request){\n\n\n\t\t$datum = $request->request->get('startTime');\n\t\t// Search database for all transfers\n\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t$autos = $em->getRepository('FahrzeugdatenblattBundle:Fahrzeugdatenblatt')\n\t\t\t->anfrageFilterCars($datum);\n\n\t\t// Set new transfer\n\n\t\t$startDestination = $request->request->get('startDestination');\n\t\t$finishDestination = $request->request->get('finishDestination');\n\t\t$customerStartTime = new \\DateTime($request->request->get('startTime'));\n\t\t$customerEndTime = $request->request->get('endTime');\n\t\t$distance = $request->request->get('distance');\n\t\t$duration = $request->request->get('duration');\n\n\t\t$neueFahrt = new Transferfahrten();\n\t\t$neueFahrt->setStartTime($customerStartTime);\n\t\t//$neueFahrt->setEndTime($customerEndTime);\n\t\t$neueFahrt->setStartDestination($startDestination);\n\t\t$neueFahrt->setFinishDestination($finishDestination);\n\t\t$neueFahrt->setDuration($duration);\n\t\t$neueFahrt->setDistance($distance);\n\t\t$neueFahrt->setIsPublished(1);\n\n\t\t$em->persist($neueFahrt);\n\t\t$em->flush();\n\t\t$insertedTransferID = $neueFahrt->getId();\n\n\t\t// Generate JSON Structure\n\t\t$jsonData = [];\n\n\t\t/** @var Fahrzeugdatenblatt $auto */\n\n\t\tforeach($autos as $auto){\n\t\t\t$transfersComplete = $auto->getTransferfahrten();\n\t\t\t$transfersArray = [];\n\n\t\t\t/** @var Transferfahrten $transfer */\n\n\t\t\tforeach($transfersComplete as $transfer){\n\t\t\t\t$transfersArray[] = $transfer->getStartDestination();\n\t\t\t}\n\t\t\t$jsonData[] = [\n\t\t\t\t'id' => $insertedTransferID,\n\t\t\t\t'transfers' => $transfersArray\n\n\t\t\t];\n\t\t}\n\t\t//dump($jsonData);die;\n\n\t\treturn New JsonResponse($jsonData);\n\t\t//return New Response(json_encode($jsonData));\n\t}", "title": "" }, { "docid": "19cc843344e3fdfb6b550a052ac9ea22", "score": "0.44636586", "text": "function specific_date_transport_cost_calculation( $start, $end )\n\t\t{\n\t\t\t$query = $this -> db -> select_sum( 'expense_amount' )\n\t\t\t\t\t\t\t\t -> from('expense_info')\n\t\t\t\t\t\t\t\t -> where('expense_doc >= \"'.$start.'\"')\n\t\t\t\t\t\t\t\t -> where('expense_doc <= \"'.$end.'\"')\n\t\t\t\t\t\t\t\t -> where('expense_type = \"Transport Cost For Purchase\"')\n\t\t\t\t\t\t\t\t -> where('hotel_id', $this->tank_auth->get_hotel_id())\n\t\t\t\t\t\t\t\t -> get();\n\t\t\tforeach($query -> result() as $result):\n\t\t\t\t\t$total_expense = $result -> expense_amount;\n\t\t\tendforeach;\n\t\t\treturn $total_expense;\n\t\t}", "title": "" }, { "docid": "8d6824dceea46cb5c854474f299ecb2e", "score": "0.44370043", "text": "public function getCalories();", "title": "" }, { "docid": "b7c1bd0a96b4431fe5ac1e6d6cedd16a", "score": "0.44163418", "text": "public function getTransportCosts(PackageDataCollection $packages): TransportCostCollection;", "title": "" }, { "docid": "5916f0a6c56d5c677f21b2a97f817540", "score": "0.4409683", "text": "public static function networthYearCalculationCategory() {\n global $database;\n \n $year = '2022';\n \n // $month = '03';\n // $day = '31';\n \n // $month = '06';\n // $day = '30';\n \n // $month = '09';\n // $day = '30';\n \n $month = '12';\n $day = '31';\n \n \n \n $statement = $database->prepare(\"select $year as year, $month as month, $day as day, `category_type`, ROUND(SUM(`category_value` - `category_ liabilities`),2) AS money_value from net_worth where MONTH(date) = $month and YEAR(date) = $year group by category_type\");\n \n $statement->execute();\n if ($statement->rowCount() <= 0) {\n return;\n }\n\n $data = $statement->fetchAll(\\PDO::FETCH_ASSOC);\n return $data;\n }", "title": "" }, { "docid": "f15f2c77f17d565d0c5e32c448cb6f4e", "score": "0.44076478", "text": "function prices($kind)\n{\n\t$sql = '\n\t\tSELECT\n\t\t\tfood,\n\t\t\twood,\n\t\t\trock,\n\t\t\tiron,\n\t\t\tpaper,\n\t\t\tkoku\n\t\tFROM dw_costs_b\n\t\tWHERE kind = '.\\util\\mysql\\sqlval($kind).'\n\t';\n\treturn \\util\\mysql\\query($sql);\n}", "title": "" }, { "docid": "0a8c0c6dcc6d06ce1d7d4449bba6aed9", "score": "0.43985036", "text": "public function calculate( int $year ): DateTime;", "title": "" }, { "docid": "1a3b576dfb5e30bf3c91b277c61fc604", "score": "0.43961596", "text": "function getMonthlyExpense($month, $getYear)\n{\n\n global $con;\n $totalExpense = 0;\n $year = $getYear;\n $shop_id = $_SESSION['shop_id'];\n\n\n\n $sql = \"SELECT * FROM expense WHERE shop_id=$shop_id AND MONTH(STR_TO_DATE(expense_date,'%Y-%m-%d')) = '$month' AND YEAR(STR_TO_DATE(expense_date,'%Y-%m-%d')) = '$year'\";\n\n $result = mysqli_query($con, $sql);\n\n while ($row = mysqli_fetch_array($result)) {\n $cost = floatval($row['expense_amount']);\n $totalExpense = $totalExpense + $cost;\n }\n\n return $totalExpense;\n\n}", "title": "" }, { "docid": "72427cb2833da5321e7316ba7356f1c4", "score": "0.43820548", "text": "function TreasuryYields()\n{\n // create the XML URL for today's month and year\n\n // this one picks the last (more than) 5,000 entries (25+ years?)\n // $url = 'http://data.treasury.gov/feed.svc/DailyTreasuryYieldCurveRateData';\n $url_part1 = 'http://data.treasury.gov/feed.svc/DailyTreasuryYieldCurveRateData?$filter=month(NEW_DATE)%20eq%20';\n $url_this_month = date(\"m\");\n $url_part2 = '%20and%20year(NEW_DATE)%20eq%20';\n $url_this_year = date(\"Y\");\n\n $url = $url_part1 . $url_this_month . $url_part2 . $url_this_year;\n $xml = simplexml_load_file($url);\n $number_of_entries = count($xml->entry);\n\n // test for no entries (first day of the month on a Saturday, for example, has no entries for this month)\n if ($number_of_entries == 0)\n {\n $last_month = date('Y-m-d', strtotime(date('Y-m-d').\" -1 month\"));\n $url_this_month = substr($last_month, 5, 2);\n $url_this_year = substr($last_month, 0, 4);\n\n $url = $url_part1 . $url_this_month . $url_part2 . $url_this_year;\n $xml = simplexml_load_file($url);\n $number_of_entries = count($xml->entry);\n }\n\n // pull out all the yields for the last (most-recent) entry\n $counter = 0;\n foreach ($xml->entry as $entry)\n {\n if (++$counter < $number_of_entries) continue;\n foreach ($entry->content->children(\"m\", true)->properties->children(\"d\", true) as $label => $value)\n {\n $yields[$label] = (string)$value;\n }\n }\n return $yields;\n}", "title": "" }, { "docid": "49eba180587327f53d77bd57d325a333", "score": "0.43672243", "text": "public function getTrendingData($startDateTime, $endDateTime)\n {\n $shops = Source::where('user_id', auth()->user()->user_id)->with([\"products.priceEntries\"])\n ->whereHas('products.priceEntries')\n ->get();\n $shops = $shops->map(function ($shop, $key) use ($startDateTime, $endDateTime) {\n $products = $shop->products->map(function ($product) use ($startDateTime, $endDateTime, $shop) {\n $recentProductPrice = 0;\n $previousProductEntry = 0;\n if ($product->priceEntries->count()) {\n $recentProductPrice = $product->priceEntries->whereBetween('fetched_at', [$startDateTime, $endDateTime])->first();\n $recentProductPrice = $recentProductPrice ? $recentProductPrice->amount * 100 : $product->amount * 100;\n $previousProductEntry = $product->priceEntries->where('fetched_at', '<', $startDateTime)->sortByDesc('fetched_at')->first();\n $previousProductEntry = $previousProductEntry ? $previousProductEntry->amount * 100 : $recentProductPrice;\n $priceDifference = $recentProductPrice - $previousProductEntry;\n }\n\n if ($recentProductPrice != 0 && $previousProductEntry != 0 && $priceDifference != 0) {\n $pricePercentageDifference = round(($priceDifference / $previousProductEntry) * 100, 2);\n $temp = [\n 'id' => $product->id,\n 'name' => $shop->name,\n \"product_name\" => $product->name,\n 'price_difference' => $pricePercentageDifference,\n ];\n if ($recentProductPrice < $previousProductEntry) {\n $temp['option'] = 'dec';\n } else {\n $temp['option'] = 'inc';\n }\n return $temp;\n } else {\n return false;\n }\n });\n return $products->filter();\n });\n $productsArray = $shops->collapse()->sortByDesc('price_difference')->groupBy('option');\n return $productsArray;\n }", "title": "" }, { "docid": "5a201c917522e35141d66c42cb7e78ea", "score": "0.43657625", "text": "function list_purchase_inv_item_get_cost($kode ='', $all=0, $act=''){\n\t\t$dbpdo = DB::create();\n\t\t\t \t\n\t\t$where = \" where a.active=1 \";\n\t\t\n\t\tif ( $kode != \"\") {\n\t\t\tif ($where == \"\") {\n\t\t\t\t$where = \" where a.syscode = '$kode' \";\n\t\t\t} else {\n\t\t\t\t$where = $where . \" and a.syscode = '$kode' \";\n\t\t\t}\t\t\t\t\t\t\t\t\n\t\t}\n\t\t\n $sqlstr=\"select a.syscode, a.code, a.old_code, a.name, a.uom_code_stock, a.uom_code_sales, a.uom_code_purchase, (select current_cost from set_item_cost where item_code=a.syscode and uom_code=a.uom_code_sales order by date_of_record desc limit 1) current_cost from item a \" . $where . \" order by a.code\";\n $sql=$dbpdo->prepare($sqlstr);\n\t\t$sql->execute();\n\t\t\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "1516e60e3ae33fc6fdf40eec5e53b8a6", "score": "0.4361903", "text": "public static function getAllCosts($filters) {\n\n // Get variables from the filters array\n extract($filters);\n\n // Get search criteria\n $customPaymentsCriteria = self::getDatesCriteria(\"`ucp`.`created_at`\", $fromDate, $toDate);\n $userJobsPaymentsCriteria = self::getDatesCriteria(\"`finish_date`\", $fromDate, $toDate);\n $WIPCriteria = self::getDatesCriteria(\"`pj`.`due_date`\", $fromDate, $toDate);\n \n // Get search criteria for user\n if(!empty($search)){\n $user_criteria = User::getUserSearchCondition($search, 'u');\n $customPaymentsCriteria->addCondition($user_criteria);\n $userJobsPaymentsCriteria->addCondition($user_criteria);\n $WIPCriteria->addCondition($user_criteria);\n }\n \n // If searching by payment method\n if(!empty($payment_method)){\n $customPaymentsCriteria->addCondition(\"upm.payment_method = '\".$payment_method.\"'\");\n $userJobsPaymentsCriteria->addCondition(\"upm.payment_method = '\".$payment_method.\"'\");\n $WIPCriteria->addCondition(\"upm.payment_method = '\".$payment_method.\"'\");\n }\n\n // Get custom payments data\n $customPayments = self::getCustomPayments($customPaymentsCriteria);\n\n // Get jobs payments data\n $userJobPayments = self::getJobsPayments($userJobsPaymentsCriteria);\n \n // Get search criteria for user\n if(!empty($search)){\n $user_criteria = User::getUserSearchCondition($search, 'u');\n $customPaymentsCriteria->addCondition($user_criteria);\n $userJobsPaymentsCriteria->addCondition($user_criteria);\n }\n \n // If searching by payment method\n if(!empty($payment_method)){\n $customPaymentsCriteria->addCondition(\"upm.payment_method = '\".$payment_method.\"'\");\n $userJobsPaymentsCriteria->addCondition(\"upm.payment_method = '\".$payment_method.\"'\");\n }\n\n // Get all payments statuses\n $statuses = UserJobPayment::getStatuses();\n\n // For each user job payment\n foreach ($userJobPayments AS $userJobPayment) {\n //echo \"<pre>\"; print_r($userJobPayment); exit;\n // If the job is WIP or has no payment generated for it\n if (empty($userJobPayment['status'])) {\n\n // If the job is finished\n if ($userJobPayment['job_status'] == UserJob::STATUS_SUCCESS) {\n $status = \"No payment\";\n\n // If it's WIP\n } else {\n $status = \"WIP\";\n $WIPCriteria = new CDbCriteria();\n $WIPCriteria->compare(\"uj.id\", $userJobPayment['id']);\n $userJobPayment['amount'] = self::getWipCost($WIPCriteria);\n }\n\n // If we have a payment status\n } else {\n $status = $statuses[$userJobPayment['status']];\n }\n\n $return[] = array(\n \"id\" => $userJobPayment['id'],\n \"project_id\" => $userJobPayment['project_id'],\n \"project_name\" => $userJobPayment['project_name'],\n \"client_name\" => $userJobPayment['client_name'],\n \"user_name\" => $userJobPayment['user_name'],\n \"language\" => $userJobPayment['language'],\n \"job_type\" => $userJobPayment['job_type'],\n \"finish_date\" => $userJobPayment['finish_date'],\n \"payment_status\" => $status,\n \"amount\" => $userJobPayment['payable'],\n );\n }\n\n // For each custom payment\n foreach ($customPayments AS $customPayment) {\n //echo \"<pre>\"; print_r($customPayment); exit;\n\n $status = $statuses[$customPayment['status']];\n $return[] = array(\n \"id\" => $customPayment['id'],\n \"project_id\" => $customPayment['project_id'],\n \"project_name\" => $customPayment['project_name'],\n \"client_name\" => $customPayment['client_name'],\n \"user_name\" => $customPayment['user_name'],\n \"payment_status\" => $status,\n \"amount\" => $customPayment['payable'],\n );\n }\n\n // Return data\n return (!empty($return)) ? $return : array();\n }", "title": "" }, { "docid": "b1cdd0dc8b54f860ee8da8129ccfa24f", "score": "0.4341575", "text": "public function getAvailableDates(?int $year = null): JsonResponse\n {\n $result = [];\n\n if (is_null($year)) {\n $min = Statistic::min('created_at');\n $max = Statistic::max('created_at');\n\n if (!is_null($min)) {\n $startYear = Carbon::createFromTimeString($min)->year;\n $endYear = Carbon::createFromTimeString($max)->year;\n\n for ($i = $startYear; $i <= $endYear; $i++) {\n $result[] = $i;\n }\n\n if ($startYear !== $endYear) {\n $result[] = $endYear;\n }\n }\n } else {\n $startDate = Carbon::createFromDate($year, 1, 1);\n $endDate = Carbon::createFromDate($year, 12, 31);\n\n $min = Statistic::whereBetween('created_at', [$startDate, $endDate])->min('created_at');\n $max = Statistic::whereBetween('created_at', [$startDate, $endDate])->max('created_at');\n\n if (!is_null($min)) {\n $startMonth = Carbon::createFromTimeString($min)->month;\n $endMonth = Carbon::createFromTimeString($max)->month;\n\n for ($i = $startMonth; $i <= $endMonth; $i++) {\n $result[] = $i;\n }\n }\n }\n\n return response()->json([\n 'data' => $result\n ]);\n }", "title": "" }, { "docid": "141e6fc4ad2bc7593b8bd16236f38b79", "score": "0.43364295", "text": "public function getNeoBestYearDataAction(request $request){\n $hazardous = $request->get('hazardous');\n if($hazardous == 'true'){\n $hzval = \"1\";\n }else{\n $hzval = \"\";\n }\n $yearArray = array();\n $expr = new \\Solution\\MongoAggregation\\Pipeline\\Operators\\Expr;\n $resulty = $this->get('doctrine_mongodb.odm.default_aggregation_query')\n ->getCollection('AppBundle:NeoRecords')->createAggregateQuery()\n ->match(['isHazardous' => $hzval])\n ->group(['_id' => ['year' => $expr->year('$date')], 'count' => $expr->sum(1)])\n ->sort(['count' => -1])\n ->limit(1)\n ->getQuery()->aggregate()->toArray(); \n\n if(is_array($resulty)){\n\t\t\t$yearArray = $resulty[0];\n }\n $output = array(\n 'data' => $yearArray,\n 'message' => 'Year with most ateroids',\n 'status' => 'success',\n 'statusCode' => '200'\n );\n $serializedEntity = $this->container->get('serializer')->serialize($output, 'json');\n return new Response($serializedEntity); \n }", "title": "" }, { "docid": "e0fa1555b93698542c70695f6c379ffd", "score": "0.4331248", "text": "private function calculateTotalCostOfTariff(Price $price, float $yearlyConsumption): float\n {\n if (!in_array($price->getMode(), Price::ACCEPTED_MODES)) {\n throw new Exception(\"Invalid price mode provided\");\n }\n\n $yearlyConsumption -= ($price->getAllocatedKwh() * $price->getMode());\n $fixedPrice = ($price->getFixed() * $price->getMode());\n\n if ($yearlyConsumption <= 0) {\n return $fixedPrice;\n }\n\n return $fixedPrice + $price->getCostPerKwh() * $yearlyConsumption;\n\n\n }", "title": "" }, { "docid": "45e5e005a45c2c2da71cc504346afced", "score": "0.432421", "text": "public function salesTransactionSummaryYear() {\n\t\t\tif (Auth::validToken($this->db,$this->token)){\n $newyear = Validation::integerOnly($this->year);\n $newusername = strtolower($this->username);\n $newbranchid = strtolower(Util::getUserBranchID($this->db,$newusername));\n\t\t\t\t$roles = Auth::getRoleID($this->db,$this->token);\n\t\t\t\tif($roles != 5){\n\t\t\t\t\t$sql = \"SELECT \n (SELECT count(x.Waybill) FROM transaction_waybill x WHERE x.StatusID='41' AND x.BranchID=:branchid AND year(x.Created_at)=:newyear) AS 'success',\n (SELECT count(x.Waybill) FROM transaction_waybill x WHERE x.StatusID='29' AND x.BranchID=:branchid AND year(x.Created_at)=:newyear) AS 'on_process',\n (SELECT count(x.Waybill) FROM transaction_waybill x WHERE x.StatusID='19' AND x.BranchID=:branchid AND year(x.Created_at)=:newyear) AS 'failed',\n (SELECT count(x.Waybill) FROM transaction_waybill x WHERE x.StatusID='53' AND x.BranchID=:branchid AND year(x.Created_at)=:newyear) AS 'returned',\n (SELECT count(x.Waybill) FROM transaction_waybill x WHERE x.StatusID='47' AND x.BranchID=:branchid AND year(x.Created_at)=:newyear) AS 'void',\n (SELECT count(x.Waybill) FROM transaction_waybill x WHERE x.BranchID=:branchid AND year(x.Created_at)=:newyear) AS 'total',\n IFNULL((SELECT sum(x.Shipping_cost_total) FROM transaction_waybill x WHERE x.BranchID=:branchid AND year(x.Created_at)=:newyear AND x.StatusID<>'47'),0) AS 'gross_profit',\n IFNULL(round((((SELECT total) - ((SELECT on_process)+(SELECT failed)+(SELECT returned)+(SELECT void)))/(SELECT total))*100),0) AS 'percent_up',\n IFNULL((100 - (SELECT percent_up)),0) AS 'percent_down';\";\n $stmt = $this->db->prepare($sql);\n $stmt->bindParam(':newyear', $newyear, PDO::PARAM_STR);\n $stmt->bindParam(':branchid', $newbranchid, PDO::PARAM_STR);\n\n if ($stmt->execute()) {\t\n if ($stmt->rowCount() > 0){\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $data = [\n 'result' => $results, \n 'status' => 'success', \n 'code' => 'RS501',\n 'message' => CustomHandlers::getreSlimMessage('RS501',$this->lang)\n ];\n } else {\n $data = [\n 'status' => 'error',\n 'code' => 'RS601',\n 'message' => CustomHandlers::getreSlimMessage('RS601',$this->lang)\n ];\n }\n } else {\n $data = [\n 'status' => 'error',\n 'code' => 'RS202',\n 'message' => CustomHandlers::getreSlimMessage('RS202',$this->lang)\n ];\n }\n\t\t\t\t} else {\n $data = [\n 'status' => 'error',\n 'code' => 'RS404',\n 'message' => CustomHandlers::getreSlimMessage('RS404',$this->lang)\n ];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$data = [\n \t \t\t'status' => 'error',\n\t\t\t\t\t'code' => 'RS401',\n\t \t 'message' => CustomHandlers::getreSlimMessage('RS401',$this->lang)\n\t\t\t\t];\n\t\t\t}\n \n\t\t\treturn JSON::encode($data,true);\n\t $this->db= null;\n\t\t}", "title": "" }, { "docid": "3889312fe33ca4cf26291bdb0d4b9d37", "score": "0.43136793", "text": "public function testGetSubscriptionCost() {\n\n $this->markTestSkipped('Needs a mock');\n\n $options = [\n 'gb' => 'monthly_cost',\n 'fr' => 'annual_cost',\n ];\n\n $response = $this->http->request('GET', 'api/v1/plans/costs/' . json_encode($options));\n\n $costs = json_decode($response->getBody(true), true);\n\n $this->assertArrayHasKey('total', $costs);\n\n $this->assertEquals($costs['total'], 70);\n\n }", "title": "" }, { "docid": "a5eb767814deced84369d6ce23263013", "score": "0.43045762", "text": "function getYearsDownloadInformation($libraryID, $date, $territory) {\n if($libraryID == \"all\") {\n\t\t $all_Ids = '';\n\t\t $sql = \"SELECT id from libraries where library_territory = '\".$territory.\"'\";\n\t\t $result = mysql_query($sql);\n\t\t while ($row = mysql_fetch_assoc($result)) {\n\t\t\t\t$all_Ids = $all_Ids.$row[\"id\"].\",\";\n\t\t\t}\n $lib_condition = \"and library_id IN (\".rtrim($all_Ids,\",\").\")\";\n }\n else {\n $lib_condition = \"and library_id = \".$libraryID;\n }\n $date_arr = explode(\"/\", $date);\n $startDate = date('Y-m-d', mktime(0, 0, 0, 1, 1, $date_arr[2])).\" 00:00:00\";\n $endDate = date('Y-m-d', mktime(0, 0, 0, 12, 31, $date_arr[2])).\" 23:59:59\";\n $conditions = array(\n 'created BETWEEN \"'.$startDate.'\" and \"'.$endDate.'\" '.$lib_condition.\" AND 1 = 1 GROUP BY id ORDER BY created ASC\"\n );\n return $this->find('all', array('conditions'=>$conditions, 'fields'=>array('Download.id','Download.library_id','Download.patron_id','Download.artist','Download.track_title','Download.email','Download.created'),'recursive' => -1));\n }", "title": "" }, { "docid": "79cdb37325d7f989976d00b1d80ea859", "score": "0.43023992", "text": "public function cost_of_purchase_orders_analysis(){\n $this->load->model('currencies_model');\n $year_report = $this->input->post('year');\n $currency = $this->currencies_model->get_base_currency();\n $currency_name = '';\n $currency_unit = '';\n if($currency){\n $currency_name = $currency->name;\n $currency_unit = $currency->symbol;\n }\n echo json_encode([\n 'data' => $this->purchase_model->cost_of_purchase_orders_analysis($year_report),\n 'unit' => $currency_unit,\n 'name' => $currency_name,\n ]);\n die();\n }", "title": "" }, { "docid": "8bc5a69ea729b400f5eecbf8171315a5", "score": "0.42897668", "text": "public function getOverview(string $carrier): PackageCollection;", "title": "" }, { "docid": "ef5e8b7a075e6a79578035bde1b4a464", "score": "0.4271016", "text": "function getRacePrices($races){\n\t\t\t\n\t\t\t\n\t\t\tif(isset($races['venueName'])){\n\t\t\t\t\n\t\t\t\t$races = array($races);\n\t\t\t}\n\t\t\t\n\t\t\t$urls = array();\n\t\t\tforeach( $races as $raceIndex=>&$race ){\n\t\t\t\t\n\t\t\t\t//If the race is tomorrow, then the date needs to the prepended to the event name\n\t\t\t\tif($race['time'] > (new DateTime('midnight +24 hours'))){\n\t\t\t\t\t\n\t\t\t\t\t$race['venueName'] = (new DateTime('midnight +24 hours'))->format('Y-m-d').\" \".$race['venueName'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Reaplce spaces with dashes\n\t\t\t\t$race['venueName'] = str_replace(\" \", \"-\", $race['venueName']);\n\t\t\t\t\n\t\t\t\t$world = \"\";\n\t\t\t\t\n\t\t\t\tif($race['country']!=\"IE\" && $race['country']!=\"GB\" && $race['country']!=\"AE\" ){\n\t\t\t\t\t\n\t\t\t\t\t$world=\"world/\";\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t$urls[$raceIndex]='http://www.oddschecker.com/horse-racing/'.$world.$race['venueName'].'/'.$race['time']->format('H:i').'/winner';\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\t\t\t\n\t\t\t//Retrieve html from race page(s)\n\t\t\t$raceHtml = $this->multiRequest($urls);\n\t\t\t\t\n\t\t\tforeach($races as $raceIndex=>&$race){\n\t\t\t\t\n\t\t\t\t$html = $raceHtml[$raceIndex];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Need to get bookmakers, after \"view form\" text.\n\t\t\t\t$bookmakerHtml = explode(\"View Form\", $html);\n\n\t\t\t\t$bookmakerHtml = $bookmakerHtml[count($bookmakerHtml)-1];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$bookmakerCodes = explode(\"<td data-bk=\\\"\", $bookmakerHtml);\n\t\t\t\t\n\t\t\t\t$bookmakerCodesArray = array();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tforeach( $bookmakerCodes as $index=>$code){\n\n\t\t\t\t\t//Ignore first element\n\t\t\t\t\tif( $index != 0){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$code = substr($code, 0,2);\n\n\t\t\t\t\t\tif( !in_array($code, $bookmakerCodesArray) ){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$bookmakerCodesArray[] = $code;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Need to get each runner now..\n\t\t\t\t$runners = explode(\"data-bname=\\\"\", $html);\n\t\t\t\t$horses = array();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tforeach ($runners as $index=>$runner){\n\t\t\t\t\t\n\t\t\t\t\tif( $index != 0){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$horseHtml = explode(\"\\\"\", $runner);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Need to get each runner now..\n\t\t\t\t\t\t$prices = explode(\"data-odig=\\\"\", $runner);\n\t\t\t\t\t\t$priceArray = array();\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach ($prices as $index2=>$price){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( $index2 != 0){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$price = explode(\"\\\"\", $price);\n\t\t\t\t\t\t\t\t$priceArray[] = $price[0];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$newHorse = new stdClass;\n\t\t\t\t\t\t$newHorse->name = $horseHtml[0];\n\t\t\t\t\t\t$newHorse->prices = $priceArray;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$horses[] = $newHorse;\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//Now have all prices, horse names and bookmakers\n\t\t\t\t//Need to find the best prices and corresponding bookmakers\n\t\t\t\tforeach( $horses as $horseIndex => &$horse ){\n\t\t\t\t\t\n\t\t\t\t\t$bestPrice = 0;\n\t\t\t\t\t$bestBookmakers = array();\n\t\t\t\t\t\n\t\t\t\t\tforeach( $horse->prices as $index=> $price ){\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( $price >= $bestPrice && isset($this->approvedBookmakers[$bookmakerCodesArray[$index]]) ){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($price > $bestPrice){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//reset array\n\t\t\t\t\t\t\t\t$bestBookmakers = array();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$bestBookmakers[$bookmakerCodesArray[$index]] = $this->approvedBookmakers[$bookmakerCodesArray[$index]];\n\t\t\t\t\t\t\t$bestPrice = $price;\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$horse->bestPrice = $bestPrice;\n\t\t\t\t\t$horse->bestBookmakers = $bestBookmakers;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$race['horses'] = $horses;\n\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $races;\n\t\t}", "title": "" }, { "docid": "77703cb981a3b13582910cb60f1b2bb5", "score": "0.42677295", "text": "public function getMovieByYear(int $year)\n {\n }", "title": "" }, { "docid": "5a528c217a9b5d977205fb60483741dd", "score": "0.42594722", "text": "function prepare_year_archive($array, $year){\n\n // indexing of new array\n $index = 0;\n\n // first select the entries that occured in $year and copy them completely to $newarray\n $newarray = array();\n if (is_array($array) && sizeof($array)>0) {\n foreach (array_keys($array) as $key) {\n if (array_key_exists($year, $array[$key]['attendences'])) $newarray[$index++] = $array[$key];\n }\n }\n\n // indexing of final array\n $index = 0;\n\n // select from $newarray those entries according to package priority and append to $finalarray\n $finalarray = array();\n if (is_array($newarray) && sizeof($newarray)>0) {\n foreach (array('platinum','gold','silver','base') as $package) {\n foreach (array_keys($newarray) as $key) {\n if ($newarray[$key]['attendences'][$year] == $package) $finalarray[$index++] = $newarray[$key];\n }\n }\n }\n\n // return newly sorted array\n return $finalarray;\n}", "title": "" }, { "docid": "f443966cff734e0e3d6d3a951989d0b3", "score": "0.42455444", "text": "public function getRatesForView()\n {\n return [\n 'restrictedHeavyGoodsFirst' => $this->getFirstVehicleRate(\n Licence::LICENCE_TYPE_RESTRICTED,\n Licence::LICENCE_CATEGORY_GOODS_VEHICLE,\n FinancialStandingRate::VEHICLE_TYPE_NOT_APPLICABLE\n ),\n 'restrictedHeavyGoodsAdditional' => $this->getAdditionalVehicleRate(\n Licence::LICENCE_TYPE_RESTRICTED,\n Licence::LICENCE_CATEGORY_GOODS_VEHICLE,\n FinancialStandingRate::VEHICLE_TYPE_NOT_APPLICABLE\n ),\n 'restrictedPassengerServiceFirst' => $this->getFirstVehicleRate(\n Licence::LICENCE_TYPE_RESTRICTED,\n Licence::LICENCE_CATEGORY_PSV,\n FinancialStandingRate::VEHICLE_TYPE_NOT_APPLICABLE\n ),\n 'restrictedPassengerServiceAdditional' => $this->getAdditionalVehicleRate(\n Licence::LICENCE_TYPE_RESTRICTED,\n Licence::LICENCE_CATEGORY_PSV,\n FinancialStandingRate::VEHICLE_TYPE_NOT_APPLICABLE\n ),\n 'standardNationalHeavyGoodsFirst' => $this->getFirstVehicleRate(\n Licence::LICENCE_TYPE_STANDARD_NATIONAL,\n Licence::LICENCE_CATEGORY_GOODS_VEHICLE,\n FinancialStandingRate::VEHICLE_TYPE_NOT_APPLICABLE\n ),\n 'standardNationalHeavyGoodsAdditional' => $this->getAdditionalVehicleRate(\n Licence::LICENCE_TYPE_STANDARD_NATIONAL,\n Licence::LICENCE_CATEGORY_GOODS_VEHICLE,\n FinancialStandingRate::VEHICLE_TYPE_NOT_APPLICABLE\n ),\n 'standardNationalPassengerServiceFirst' => $this->getFirstVehicleRate(\n Licence::LICENCE_TYPE_STANDARD_NATIONAL,\n Licence::LICENCE_CATEGORY_PSV,\n FinancialStandingRate::VEHICLE_TYPE_NOT_APPLICABLE\n ),\n 'standardNationalPassengerServiceAdditional' => $this->getAdditionalVehicleRate(\n Licence::LICENCE_TYPE_STANDARD_NATIONAL,\n Licence::LICENCE_CATEGORY_PSV,\n FinancialStandingRate::VEHICLE_TYPE_NOT_APPLICABLE\n ),\n 'standardInternationalHeavyGoodsFirst' => $this->getFirstVehicleRate(\n Licence::LICENCE_TYPE_STANDARD_INTERNATIONAL,\n Licence::LICENCE_CATEGORY_GOODS_VEHICLE,\n FinancialStandingRate::VEHICLE_TYPE_HGV\n ),\n 'standardInternationalHeavyGoodsAdditional' => $this->getAdditionalVehicleRate(\n Licence::LICENCE_TYPE_STANDARD_INTERNATIONAL,\n Licence::LICENCE_CATEGORY_GOODS_VEHICLE,\n FinancialStandingRate::VEHICLE_TYPE_HGV\n ),\n 'standardInternationalLightGoodsFirst' => $this->getFirstVehicleRate(\n Licence::LICENCE_TYPE_STANDARD_INTERNATIONAL,\n Licence::LICENCE_CATEGORY_GOODS_VEHICLE,\n FinancialStandingRate::VEHICLE_TYPE_LGV\n ),\n 'standardInternationalLightGoodsAdditional' => $this->getAdditionalVehicleRate(\n Licence::LICENCE_TYPE_STANDARD_INTERNATIONAL,\n Licence::LICENCE_CATEGORY_GOODS_VEHICLE,\n FinancialStandingRate::VEHICLE_TYPE_LGV\n ),\n 'standardInternationalPassengerServiceFirst' => $this->getFirstVehicleRate(\n Licence::LICENCE_TYPE_STANDARD_INTERNATIONAL,\n Licence::LICENCE_CATEGORY_PSV,\n FinancialStandingRate::VEHICLE_TYPE_NOT_APPLICABLE\n ),\n 'standardInternationalPassengerServiceAdditional' => $this->getAdditionalVehicleRate(\n Licence::LICENCE_TYPE_STANDARD_INTERNATIONAL,\n Licence::LICENCE_CATEGORY_PSV,\n FinancialStandingRate::VEHICLE_TYPE_NOT_APPLICABLE\n ),\n ];\n }", "title": "" }, { "docid": "b2dae68751a59f95d032ebd5e088185f", "score": "0.4241512", "text": "public static function getAllCostsSummary($filters) {\n\n // Get variables from the filters array\n extract($filters);\n\n // Get search criteria\n $customPaymentsCriteria = self::getDatesCriteria(\"`ucp`.`created_at`\", $fromDate, $toDate);\n $userJobsPaymentsCriteria = self::getDatesCriteria(\"`finish_date`\", $fromDate, $toDate);\n $WIPCriteria = self::getDatesCriteria(\"`pj`.`due_date`\", $fromDate, $toDate);\n $agingCustomPaymentsCriteria = self::getDatesCriteria(\"`ucp`.`created_at`\", \"2000-01-01\", $fromDate);\n $agingUserJobsPaymentsCriteria = self::getDatesCriteria(\"`finish_date`\", \"2000-01-01\", $fromDate);\n \n // Get search criteria for user\n if(!empty($search)){\n $user_criteria = User::getUserSearchCondition($search, 'u');\n $customPaymentsCriteria->addCondition($user_criteria);\n $userJobsPaymentsCriteria->addCondition($user_criteria);\n $WIPCriteria->addCondition($user_criteria);\n $agingCustomPaymentsCriteria->addCondition($user_criteria);\n $agingUserJobsPaymentsCriteria->addCondition($user_criteria);\n }\n \n // If searching by payment method\n if(!empty($payment_method)){\n $customPaymentsCriteria->addCondition(\"upm.payment_method = '\".$payment_method.\"'\");\n $userJobsPaymentsCriteria->addCondition(\"upm.payment_method = '\".$payment_method.\"'\");\n $WIPCriteria->addCondition(\"upm.payment_method = '\".$payment_method.\"'\");\n $agingCustomPaymentsCriteria->addCondition(\"upm.payment_method = '\".$payment_method.\"'\");\n $agingUserJobsPaymentsCriteria->addCondition(\"upm.payment_method = '\".$payment_method.\"'\");\n }\n\n // Get custom payments data\n $customPayments = self::getCustomPayments($customPaymentsCriteria);\n\n // Get jobs payments data\n $userJobPayments = self::getJobsPayments($userJobsPaymentsCriteria);\n\n // Return arrays\n $total = array(\"amount\" => 0, \"count\" => 0);\n $custom = array(\"amount\" => 0, \"count\" => 0);\n $jobs = array(\"amount\" => 0, \"count\" => 0);\n\n // For each custom payment\n foreach ($customPayments AS $customPayment) {\n\n // Check for empty keys\n if (!isset($total['total']))\n $total['total'] = array(\"amount\" => 0, \"count\" => 0);\n if (!isset($total[$customPayment['status']]))\n $total[$customPayment['status']] = array(\"amount\" => 0, \"count\" => 0);\n if (!isset($custom['total']))\n $custom['total'] = array(\"amount\" => 0, \"count\" => 0);\n if (!isset($custom[$customPayment['status']]))\n $custom[$customPayment['status']] = array(\"amount\" => 0, \"count\" => 0);\n\n // Totals\n $total['amount'] += $customPayment['payable'];\n $total['count'] += 1;\n $total[$customPayment['status']]['amount'] += $customPayment['payable'];\n $total[$customPayment['status']]['count'] += 1;\n\n // Separated\n $custom[$customPayment['status']]['amount'] += $customPayment['payable'];\n $custom[$customPayment['status']]['count'] += 1;\n $custom['amount'] += $customPayment['payable'];\n $custom['count'] += 1;\n }\n\n // For each job payment\n foreach ($userJobPayments AS $userJobPayment) {\n\n // Check for empty keys\n if (!isset($total['total']))\n $total['total'] = array(\"amount\" => 0, \"count\" => 0);\n if (!isset($total[$userJobPayment['status']]))\n $total[$userJobPayment['status']] = array(\"amount\" => 0, \"count\" => 0);\n if (!isset($jobs['total']))\n $jobs['total'] = array(\"amount\" => 0, \"count\" => 0);\n if (!isset($jobs[$userJobPayment['status']]))\n $jobs[$userJobPayment['status']] = array(\"amount\" => 0, \"count\" => 0);\n\n // Totals\n $total['amount'] += $userJobPayment['payable'];\n $total['count'] += 1;\n $total[$userJobPayment['status']]['amount'] += $userJobPayment['payable'];\n $total[$userJobPayment['status']]['count'] += 1;\n\n // Separated\n $jobs[$userJobPayment['status']]['amount'] += $userJobPayment['payable'];\n $jobs[$userJobPayment['status']]['count'] += 1;\n $jobs['amount'] += $userJobPayment['payable'];\n $jobs['count'] += 1;\n }\n\n // Get estimated value that is not paid yet, but will be probably if not changed manually (removing project or etc.)\n $estimated = WipComponent::getCost($WIPCriteria);\n\n // Get aging payments\n $agingCustomPaymentsCriteria->addNotInCondition(\"ucp.status\", array(UserCustomPayment::STATUS_PAID, UserCustomPayment::STATUS_PENDING));\n $agingUserJobsPaymentsCriteria->addNotInCondition(\"ujp.status\", array(UserCustomPayment::STATUS_PAID, UserCustomPayment::STATUS_PENDING));\n $agingCustomPayments = self::getCustomPayments($agingCustomPaymentsCriteria);\n $agingJobPayments = self::getJobsPayments($agingUserJobsPaymentsCriteria);\n \n // For each custom payment\n foreach ($agingCustomPayments AS $customPayment) {\n \n // Check for empty keys\n if (!isset($total['total']))\n $total['total'] = array(\"amount\" => 0, \"count\" => 0);\n if (!isset($total['aging']))\n $total['aging'] = array(\"amount\" => 0, \"count\" => 0);\n if (!isset($custom['aging']))\n $custom['aging'] = array(\"amount\" => 0, \"count\" => 0);\n \n // Totals\n $total['aging']['amount'] += $customPayment['payable'];\n $total['aging']['count'] += 1;\n\n // Separated\n $custom['aging']['amount'] += $customPayment['payable'];\n $custom['aging']['count'] += 1;\n }\n\n // For each job payment\n foreach ($agingJobPayments AS $userJobPayment) {\n \n // Check for empty keys\n if (!isset($total['total']))\n $total['total'] = array(\"amount\" => 0, \"count\" => 0);\n if (!isset($total['aging']))\n $total['aging'] = array(\"amount\" => 0, \"count\" => 0);\n if (!isset($jobs['aging']))\n $jobs['aging'] = array(\"amount\" => 0, \"count\" => 0);\n\n // Totals\n $total['aging']['amount'] += $userJobPayment['payable'];\n $total['aging']['count'] += 1;\n\n // Separated\n $jobs['aging']['amount'] += $userJobPayment['payable'];\n $jobs['aging']['count'] += 1;\n }\n \n\n // Return data\n return array(\n \"total\" => $total,\n \"custom\" => $custom,\n \"jobs\" => $jobs,\n \"estimated\" => $estimated,\n );\n }", "title": "" }, { "docid": "42017cf6e55db4cb2015d0df315226b5", "score": "0.42405593", "text": "public function getTrades($currencies = []) {\n $success = false;\n $trades = [];\n\n if (empty($currencies)) {\n // default currency pair if nothing was filtered\n $currencies[] = 'USDCAD';\n } else {\n // remove backslash - it appears forefactory.com does not like backslash in the string\n foreach ($currencies as &$currency) {\n $currency = str_replace('/', '', $currency);\n }\n }\n\n // url to retrieve forexfactory trades\n $url = \"https://www.forexfactory.com/flex.php?more=0\";\n\n // post data - mimicing what's from the network call\n $postData = [\n 's' => '',\n 'securitytoken' => 'guest',\n 'do' => 'saveoptions',\n 'setdefault' => 'no',\n 'ignoreinput' => 'no',\n 'flex' => [\n 'Trades/Activity_tradesActivity' => [\n 'idSuffix' => '',\n '_flexForm_' => 'flexForm',\n 'modelData' => $this->getModelData(),\n 'trades/tradetype' => 'all',\n 'trades/accounttype' => 'live',\n 'mirs' => 0,\n 'trades/instruments' => $currencies\n ]\n ]\n ];\n\n // curl configuration\n $curlConfig = [\n 'CURLOPT_POSTFIELDS' => $postData,\n 'CURLOPT_PORT' => 443,\n ];\n\n // execute the crawl and obtain the history id\n $historyId = $this->crawl($url, $curlConfig);\n\n if ($this->curlInfo[$historyId]['http_code'] == 200) {\n // if everything goes well, http code will return 200\n $success = true;\n\n // initiate a new DOMDocument object\n $dom = new \\DOMDocument;\n\n // load HTML from the curl response string\n @$dom->loadHTML($this->response[$historyId]);\n\n // base on the html returns from curl, there are multiple tables and only one we're interested ie. table with trades_activity__table class\n $tables = $dom->getElementsByTagName('table');\n\n foreach ($tables as $table) {\n $classes = $table->getAttribute('class');\n\n // only start the translation when correct table is iterated\n if ($classes == 'activity trades_activity__table') {\n // every tr tag here represents each trade/activity/ticket\n $trs = $table->getElementsByTagName('tr');\n\n // iterate through the tr tags\n foreach ($trs as $tr) {\n // tr's id consisted of trader id, ticket id and transaction id\n $tag_tr_attribute_id = $tr->getAttribute('id');\n \n if ($tag_tr_attribute_id == '') continue;\n\n // 0 => flexActivity, 1 => trader id, 2 => trade id, 3 => transaction id\n $tag_tr_attribute_id_exploded = explode('_', $tag_tr_attribute_id);\n\n // each td represent block of information about this trade\n // 0 => trade, 1 => trader, 2 => return, 3 => pips\n $tds = $tr->getElementsByTagName('td');\n\n // initiate a new ticket\n $trade = new Trade;\n $trade->setId($tag_tr_attribute_id_exploded[2]);\n $trade->setTransaction($tag_tr_attribute_id_exploded[3]);\n\n foreach ($tds as $index => $d) {\n if ($index == 0) {\n // trade information\n $str = str_replace([\"\\n\", \" \"], \" \", trim($d->nodeValue));\n $raw = explode(' ', $str);\n\n $trade->setCurrency($raw[0]);\n $trade->setAction($raw[1]);\n $trade->setValue($raw[2]);\n $trade->setCaption(trim($raw[4]) . \" \" . trim($raw[5]));\n\n \n \n if (!in_array($raw[8], ['hr', 'min'])) {\n // it is a date\n $timeString = $raw[7] . ' ' . $raw[8] . ' ' . $raw[9];\n } else {\n // it is a time\n $time_value = str_replace('~', '', $raw[7]);\n\n $timeString = '- ' . $time_value . ' ' . ($raw[8] ? 'hours' : 'minutes');\n\n if (isset($raw[10]) && $raw[10] == 'min') {\n $timeString .= ' ' . $raw[9] . ' minutes';\n }\n } \n\n $trade->setTime($timeString);\n } elseif ($index == 1) {\n // trader information\n $imgs = $d->getElementsByTagName('img');\n\n // initiate trader object\n $trader = new Trader([\n 'id' => $tag_tr_attribute_id_exploded[1], \n 'avatar' => $imgs[0]->getAttribute('src'), \n 'username' => trim($d->nodeValue)]\n );\n $trade->setTrader($trader);\n } elseif ($index == 2) {\n // return information - requires some clean up (explode and trim) in order to retrieve the return value\n $return = '';\n\n $raw = str_replace(\"\\n\", '', trim($d->nodeValue));\n\n if (strstr($raw, 'MTM')) {\n $mtm = explode(\"MTM\", trim($raw));\n\n if (count($mtm) > 1) {\n $return = trim($mtm[count($mtm) - 2]) . \"MTM\";\n } else {\n $return = $raw;\n }\n } else {\n $raw = explode(' ', str_replace('%', '% ', str_replace(\" \", '', $raw)));\n $return = trim($raw[count($raw)-2]);\n }\n\n $trade->setReturn($return);\n } elseif ($index == 3) {\n // pips information - requires some clean up (explode and trim) in order to retrieve the pips value\n $pips = '';\n\n if (strstr($d->nodeValue, 'MTM')) {\n $mtm = explode(\"MTM\", trim($d->nodeValue));\n\n if (count($mtm) > 1) {\n $pips = trim($mtm[count($mtm) - 2]) . \"MTM\";\n } else {\n $pips = $raw;\n }\n } else {\n $raw = explode(\"\\n\", trim($d->nodeValue));\n $pips = (count($raw) == 1 ? $raw[0] : trim(array_pop($raw)));\n }\n\n $trade->setPips($pips);\n }\n }\n\n // add the trade into trades array\n $trades[] = $trade;\n }\n\n // we can break out of the table iteration since we have accomplished the scraping of data at this point.\n break;\n }\n }\n }\n\n return ['success' => $success, 'trades' => $trades];\n }", "title": "" }, { "docid": "f8f6524a08db47cbd1eaea033ba7fdc5", "score": "0.4237651", "text": "function get_detailsFilter($fromYear, $toYear)\n {\n $CoID = $this->session->userdata('CoID');\n $WorkYear = $this->session->userdata('WorkYear');\n\n $sql = \" \n SELECT \n DISTINCT IDNumber,\n CollectDate,\n sum(ChequeAmt) As ChequeAmt,\n sum(CashAmt) As CashAmt\n FROM Collection\n Where CoID = '$CoID'\n And WorkYear = '$WorkYear'\n AND CollectDate BETWEEN '$fromYear' AND '$toYear'\n Group by IDNumber\n order by CollectDate DESC \n \";\n $result = $this->db->query($sql)->result_array();\n\n if (empty($result)) {\n $emptyArray = array(\"empty\");\n return array($emptyArray, $fromYear, $toYear);\n }\n\n return array($result, $fromYear, $toYear);\n }", "title": "" }, { "docid": "a3d536699588f8e95f29848068957224", "score": "0.42290133", "text": "public static function get_sum_usd(){\n $Stage = Stage::get(Option::get('stage'));\n $additions = Journal::where(\"(type='usd_to_tok' OR type='usd_to_2tok') AND date >='{$Stage['start']}'\");\n //echo \"(type='usd_to_tok' OR type='usd_to_2tok') AND date >='{$Stage['start']}'\";exit;\n $usd_sum = 0.0;\n foreach ($additions as $key => $value) {\n $usd_sum += $value['sum']*$value['rate'];\n }\n return $usd_sum;\n }", "title": "" }, { "docid": "ab99229877aa3a5285f1df73896c7a06", "score": "0.4227282", "text": "public function expensesYearly($id){\n return Order::where('order_by', Auth::user()->id)\n ->where('status', 'DONE')\n ->whereRaw('YEAR(created_at) = ?',[date('Y')])\n ->sum('total');\n }", "title": "" }, { "docid": "8b581f6405200b6f890a3f2bc35d972d", "score": "0.4222352", "text": "public function getCurrentYearChartDataByMonth() \n {\n $mit = collect(); // Monthly Invoice Total\n $mot = collect(); // Monthly Order Total\n $mct = collect(); // Monthly Collection Total\n $monthArr = ['01','02','03','04','05','06','07','08','09','10','11','12']; // Array of twelve months.\n /*\n * Bug Note: ('order_date', '>=', Carbon::now()->startOfYear()) \n * does not select day 1 month 1 of the year.\n */\n //$orders = Order::all()->where('order_date', '>=', Carbon::now()->startOfYear());\n $orders = Order::whereRaw('year(`order_date`) = ?', array(date('Y')))->get();\n //$invoices = Invoice::all()->where('invoice_date', '>=', Carbon::now()->startOfYear());\n $invoices = Invoice::whereRaw('year(`invoice_date`) = ?', array(date('Y')))->get();\n //$collections = MoneyReceipt::all()->where('mr_date', '>=', Carbon::now()->startOfYear());\n $collections = MoneyReceipt::whereRaw('year(`mr_date`) = ?', array(date('Y')))->get();\n \n /*\n * Following gets an associative array of month and total\n * Month formated \"01\" as key and\n * total as regular number value. \n */\n $monthlyOrderTotal = $orders->groupBy( function($date){ return Carbon::parse($date->order_date)->format('m'); })\n ->map(function ($item) { return $item->sum('order_total'); });\n\n $monthlyInvoiceTotal = $invoices->groupBy( function($date){ return Carbon::parse($date->invoice_date)->format('m'); })\n ->map(function ($item) { return $item->sum('invoice_total'); });\n\n $monthlyCollectionTotal = $collections->groupBy( function($date){ return Carbon::parse($date->mr_date)->format('m'); })\n ->map(function ($item) { return $item->sum('amount'); });\n\n foreach ($monthlyOrderTotal as $key => $value){\n $mot->add(['month' => $key, 'total' => $value]);\n }\n \n foreach ($monthlyInvoiceTotal as $key => $value){\n $mit->add(['month' => $key, 'total' => $value]);\n }\n \n foreach ($monthlyCollectionTotal as $key => $value){\n $mct->add(['month' => $key, 'total' => $value]);\n }\n \n foreach ($monthArr as $key => $value){\n if(!in_array($value, $mot->pluck('month')->toArray()))\n {\n $mot->add(['month' => $value, 'total' => 0]);\n }\n \n if(!in_array($value, $mit->pluck('month')->toArray()))\n {\n $mit->add(['month' => $value, 'total' => 0]);\n }\n \n if(!in_array($value, $mct->pluck('month')->toArray()))\n {\n $mct->add(['month' => $value, 'total' => 0]);\n }\n }\n \n $oData = $mot->sortBy('month')->pluck('total');\n $iData = $mit->sortBy('month')->pluck('total');\n $cData = $mct->sortBy('month')->pluck('total');\n \n //return response()->json($invoices);\n \n return response()->json(['mot' => $oData, 'mit' => $iData, 'mct' => $cData]);\n \n }", "title": "" }, { "docid": "c00299ad53514ddd1aaece19ca922406", "score": "0.42167133", "text": "function YTDIncomeTotal()\r\n{\r\n//Set Current Year\r\n\t$year = date(\"Y\");\r\n\tfor ($counter = 0; $counter <=11; $counter +=1)\r\n\r\n\t{\r\n\t\t$x = $x + 1;\r\n\t\t$YTDIncome = $YTDIncome + yearIncomeTotal($x, $year);\r\n\t}\r\n\r\nreturn $YTDIncome;\r\n\r\n}", "title": "" }, { "docid": "e6d1b9911fc0339479c38cb0990b5014", "score": "0.42161927", "text": "public function treasuryData();", "title": "" }, { "docid": "6d8883ff7ca981ed7fc66c9934384008", "score": "0.4214845", "text": "public function get_growth_data($year = NULL, $month = NULL) {\n\n\t\tini_set(\"memory_limit\", \"128M\");\n\n $response = array();\n\n if ($year == NULL || $month == NULL) {\n\n $year = date(\"Y\");\n\n $month = date(\"m\");\n\n }\n\n // retrieve seatizen total in a month.\n\n $this->load->model(\"vacantsea_model\", \"vacantsea\");\n\n $total_vacantsea_in_month = $this->vacantsea->get_total_vacantsea_in_a_month($year, $month);\n\n $growth_data = array();\n\n $counter = 1;\n\n\n $end = date(\"t\", strtotime($year .\"-\". $month .\"-01 00:00:00\")); // get total day in given month\n\n $active_day = (int) date(\"d\");\n\n\n $trailing_value = NULL;\n\n if ($year == date(\"Y\") && $month < date(\"m\")) {\n\n $trailing_value = 0;\n\n $active_day = $end;\n\n } else if ($year < date(\"Y\")) {\n\n $trailing_value = 0;\n\n $active_day = $end;\n\n }\n\n\n\n\n\n $total_view_in_month = 0;\n\n\n\n // repack the seatizen creation date\n\n foreach ($total_vacantsea_in_month as $total_in_day) {\n\n\n\n // fill the empty days.\n\n while ($total_in_day[\"day\"] != $counter) {\n\n\n\n $element = new stdClass();\n\n $element->posted = 0;\n\n $element->date = date(\"Y-m-d\", strtotime($year .\"-\". $month .\"-\". $counter .\" 00:00:00\"));\n\n $growth_data[] = $element;\n\n\n\n $counter++;\n\n }\n\n\n\n // fill existing days\n\n $element = new stdClass();\n\n $element->posted = $total_in_day[\"total\"];\n\n $total_view_in_month += $total_in_day[\"total\"];\n\n $element->date = date(\"Y-m-d\", strtotime($year .\"-\". $month .\"-\". $total_in_day[\"day\"] .\" 00:00:00\"));\n\n $growth_data[] = $element;\n\n\n\n $counter++;\n\n }\n\n\n\n // fill trailing empty days\n\n while ($counter <= $end) {\n\n\n\n $element = new stdClass();\n\n\n\n // for current month display.\n\n if ($year == date(\"Y\") && $month == date(\"m\") && $counter <= date(\"d\")) {\n\n $element->posted = 0;\n\n } else {\n\n $element->posted = $trailing_value;\n\n }\n\n\n\n\n\n $element->date = date(\"Y-m-d\", strtotime($year .\"-\". $month .\"-\". $counter .\" 00:00:00\"));\n\n $growth_data[] = $element;\n\n $counter++;\n\n }\n\n\n\n $response[\"growth_data\"] = $growth_data;\n\n $response[\"average_view\"] = (float) $total_view_in_month / (float) $active_day;\n\n\n\n\n\n $this->output->set_content_type(\"application/json\");\n\n $this->output->set_status_header(200);\n\n $this->output->set_output(json_encode($response));\n\n }", "title": "" }, { "docid": "dd53042eb586f56726be800159dc2e76", "score": "0.4208232", "text": "function showUsage($systemid, $year, $col)\n{\n\t$sql = (\"SELECT DATE_FORMAT(`date`, '%m-%Y'), SUM($col) FROM readings \n\t\t\tWHERE `systemid` = '$systemid' \n\t\t\tAND YEAR(`date`) = '$year'\n\t\t\tGROUP BY MONTH(`date`), YEAR(`date`)\");\n\treturn $sql;\n}", "title": "" }, { "docid": "b29808fda75658581f506bb95ff1fd7e", "score": "0.41935292", "text": "function get_bc23_tax($car, $kode_trader = 1)\n {\n \t// \t\t\t\t\t->join('t_bc23fas as FAS', function($join){\n \t// \t\t\t\t\t\t$join->on('DTL.KODE_TRADER', '=', 'FAS.KODE_TRADER');\n \t// \t\t\t\t\t\t$join->on('DTL.CAR', '=', 'FAS.CAR');\n \t// \t\t\t\t\t\t$join->on('DTL.SERIAL', '=', 'FAS.SERIAL');\n \t// \t\t\t\t\t})\n \t// \t\t\t\t\t->leftjoin('t_bc23trf as TRF', function($join){\n \t// \t\t\t\t\t\t$join->on('DTL.KODE_TRADER', '=', 'TRF.KODE_TRADER');\n \t// \t\t\t\t\t\t$join->on('DTL.CAR', '=', 'TRF.CAR');\n \t// \t\t\t\t\t\t$join->on('DTL.NOHS', '=', 'TRF.NOHS');\n \t// \t\t\t\t\t\t$join->on('DTL.SERITRP', '=', 'TRF.SERITRP');\n \t// \t\t\t\t\t})\n \t// \t\t\t\t\t->where('DTL.KODE_TRADER', '=', $kode_trader)\n \t// \t\t\t\t\t->where('DTL.CAR', '=', $car)\n \t// \t\t\t\t\t->get();\n\n \t$sqlDtl = \"SELECT *, GROUP_CONCAT(DTLDOK.KDFASDTL) as KDFASDTLDOK\n\t\t\t \tFROM T_BC23DTL AS DTL\n\t\t\t \tLEFT JOIN T_BC23FAS AS FAS ON DTL.KODE_TRADER = FAS.KODE_TRADER AND DTL.CAR = FAS.CAR AND DTL.SERIAL = FAS.SERIAL\n\t\t\t \tLEFT JOIN T_BC23TRF AS TRF ON DTL.KODE_TRADER = TRF.KODE_TRADER AND DTL.CAR = TRF.CAR AND DTL.NOHS = TRF.NOHS AND DTL.SERITRP = TRF.SERITRP\n\t\t\t \tWHERE DTL.CAR = '\".$car.\"'\n\t\t\t \tGROUP BY DTL.SERIAL\";\n \t\n \t$arrDataDtl = getResult($sqlDtl);\n\n \t/*HITUNG DETAIL*/\n \t$jmlDtl = count($arrDataDtl);\n\n \tif($jmlDtl > 0)\n \t{\n\t \t/*DECLARE VARIABLE DTL*/\n\t \t// $CAR \t\t\t= null;\n\t \t$SERI \t\t\t= null;\n\t\t\t$DCIF \t\t\t= null;\n\t\t\t$SATBMJM \t\t= null;\n\t\t\t$KDFASDTL \t\t= null;\n\t\t\t$SATCUKJM \t\t= null;\n\n\t\t\t/*DECLARE VARIABLE HDR*/\n\t\t\t$NDPBM \t\t\t= null;\n\n\t\t\t/*DECLARE VARIABLE TRF*/\n\t\t\t$KDTRPBM \t\t= null;\n\t\t\t$KDSATBM \t\t= null;\n\t\t\t$KDCUK \t\t\t= null;\n\t\t\t$KDTRPCUK \t\t= null;\n\t\t\t$KDSATCUK \t\t= null;\n\t\t\t$TRPBM \t\t\t= null;\n\t\t\t$TRPCUK \t\t= null;\n\t\t\t$TRPPPN \t\t= null;\n\t\t\t$TRPPBM \t\t= null;\n\t\t\t$TRPPPH \t\t= null;\n\n\t\t\t/*DECLARE VARIABLE FAS*/\n\t\t\t$KDFASBM \t\t= null;\n\t\t\t$KDFASCUK \t\t= null;\n\t\t\t$KDFASPPN \t\t= null;\n\t\t\t$KDFASPPH \t\t= null;\n\t\t\t$KDFASPBM \t\t= null;\n\t\t\t$FASBM \t\t\t= null;\n\t\t\t$FASCUK \t\t= null;\n\t\t\t$FASPPN \t\t= null;\n\t\t\t$FASPPH \t\t= null;\n\t\t\t$FASPBM \t\t= null;\n\t\t\t$DCIFRP \t\t= null;\n\n\t\t\t/*DECLARE VARIABLE OTHER*/\n\t\t\t$BM \t\t\t= null;\n\t\t\t$VAL \t\t\t= null;\n\t\t\t$VAL_SPECT \t\t= null;\n\t\t\t$TOTALCUK \t\t= null;\n\t\t\t$BMBEBAS_A \t\t= null;\n\t\t\t$CKBEBAS_A \t\t= null;\n\t\t\t$TOTCUKPLTPITA\t= null;\n\t\t\t$TOTCUKTDKDPGT\t= null;\n\n\t\t\t/*VALUE BM*/\t\t\n\t\t\t$BMBAYAR\t\t= null;\n\t\t\t$BMDITGPEM\t\t= null;\n\t\t\t$BMTANGGUH\t\t= null;\n\t\t\t$BMBERKALA\t\t= null;\n\t\t\t$BMBEBAS\t\t= null;\n\n\t\t\t/*VALUE CT*/\n\t\t\t$CTBAYAR\t\t= null;\n\t\t\t$CTDITGPEM\t\t= null;\n\t\t\t$CTTANGGUH\t\t= null;\n\t\t\t$CTBERKALA\t\t= null;\n\t\t\t$CTBEBAS\t\t= null;\n\n\t\t\t/*VALUE CMMAE*/\n\t\t\t$CMEBAYAR\t\t= null;\n\t\t\t$CMEDITGPEM \t= null;\n\t\t\t$CMETANGGUH \t= null;\n\t\t\t$CMEBERKALA \t= null;\n\t\t\t$CMEBEBAS \t\t= null;\n\n\t\t\t/*VALUE ETHIL ALKOHOL*/\n\t\t\t$CEABAYAR\t\t= null;\n\t\t\t$CEADITGPEM \t= null;\n\t\t\t$CEATANGGUH \t= null;\n\t\t\t$CEABERKALA \t= null;\n\t\t\t$CEABEBAS\t \t= null;\n\n\t\t\t/*PPN*/\t\n\t\t\t$PPNBAYAR\t\t= null;\n\t\t\t$PPNDITGPEM \t= null;\n\t\t\t$PPNTANGGUH \t= null;\n\t\t\t$PPNBERKALA \t= null;\n\t\t\t$PPNBEBAS\t\t= null;\n\n\t\t\t/*PPNBM*/\t\n\t\t\t$PBMBAYAR\t\t= null;\n\t\t\t$PBMDITGPEM \t= null;\n\t\t\t$PBMTANGGUH \t= null;\n\t\t\t$PBMBERKALA \t= null;\n\t\t\t$PBMBEBAS\t\t= null;\n\n\t\t\t/*PPH*/\t\n\t\t\t$PPHBAYAR\t\t= null;\n\t\t\t$PPHDITGPEM \t= null;\n\t\t\t$PPHTANGGUH \t= null;\n\t\t\t$PPHBERKALA \t= null;\n\t\t\t$PPHBEBAS\t\t= null;\n\n\t\t\t/*PNBP*/\n\t\t\t$PNBPBAYAR\t\t= null;\n\t\t\t$PNBPDITGPEM\t= null;\n\t\t\t$PNBPTANGGUH\t= null;\n\t\t\t$PNBPBERKALA\t= null;\n\t\t\t$PNBPBEBAS\t\t= null;\n\n\n\n\t\t\t/*SET KURS*/\n\t \t$sql = \"SELECT NDPBM FROM T_BC23HDR WHERE CAR = '\".$car.\"'\";\n\t \t$NDPBM = getResult($sql)[0]['NDPBM'];\n\n\n\t \t/*KOSONGKAN PUNGUTAN*/\n\t \t$sql = \"SELECT COUNT(*) JMPGT FROM T_BC20PGT WHERE CAR = '\".$car.\"'\";\n\t \t$cekPgt = getResult($sql)[0]['JMPGT'];\n\n\t \tif($cekPgt > 0)\n\t \t{\n\t \t\t$sql = \"DELETE FROM T_BC20PGT WHERE CAR = \".$car;\n\t \t\tdelete($sql);\n\t \t}\n\n\t \tif($cekPgt > 0)\n\t \t{\t \t\t\n\t \t\t$dataPNBP = \"SELECT * FROM T_BC23PGT WHERE CAR = \".$car.\" AND KDBEBAN = 8\";\n\t \t\t$dataPNBP = getResult($sql)[0];\n\n\t\t\t\tforeach($dataPNBP as $data)\n\t\t \t{\n\t\t \t\t$data = (object)$data;\n\t\t \t\tif($data->KDFASIL == '0') { $PNBPBAYAR\t\t= $data->NILBEBAN; }\n\t\t\t\t\tif($data->KDFASIL == '1') { $PNBPDITGPEM\t= $data->NILBEBAN; }\n\t\t\t\t\tif($data->KDFASIL == '2') { $PNBPTANGGUH\t= $data->NILBEBAN; }\n\t\t\t\t\tif($data->KDFASIL == '3') { $PNBPBERKALA\t= $data->NILBEBAN; }\n\t\t\t\t\tif($data->KDFASIL == '4') { $PNBPBEBAS\t\t= $data->NILBEBAN; }\n\t\t \t}\n\t\t\t\t\n\t\t\t\t$sql = \"DELETE FROM T_BC23PGT WHERE CAR = \".$car;\n\t \t\tdelete($sql);\n\t \t}\n\n\t\t\t/*SET PUNGUTAN*/\n\t \tforeach ($arrDataDtl as $dataDtl)\n\t \t{\n\t \t\t$dataDtl = (object)$dataDtl;\n\n\t\t\t\t/*DETAIL*/\n\t\t\t\t$CAR \t\t= $dataDtl->CAR;\t\t\t\t$SERI \t\t= $dataDtl->SERIAL; \n\t\t\t\t$DCIF \t\t= $dataDtl->DCIF; \t\t\t\t$SATBMJM \t= $dataDtl->SATBMJM; \n\t\t\t\t$KDFASDTL \t= $dataDtl->KDFASDTL; \t\t\t$SATCUKJM \t= $dataDtl->SATCUKJM;\n\n\t\t\t\t/*FASILITAS*/\n\t\t\t\t$KDFASBM \t= $dataDtl->KDFASBM; \t\t\t$KDFASCUK \t= $dataDtl->KDFASCUK; \n\t\t\t\t$KDFASPPN \t= $dataDtl->KDFASPPN; \t\t\t$KDFASPPH \t= $dataDtl->KDFASPPH; \n\t\t\t\t$KDFASPBM \t= $dataDtl->KDFASPBM; \t\t\t$FASBM \t\t= $dataDtl->FASBM; \n\t\t\t\t$FASCUK \t= $dataDtl->FASCUK; \t\t\t$FASPPN \t= $dataDtl->FASPPN; \n\t\t\t\t$FASPPH \t= $dataDtl->FASPPH; \t\t\t$FASPBM \t= $dataDtl->FASPBM;\n\t\t\t\t\n\t\t\t\t/*TARIF*/\n\t\t\t\t$KDTRPBM\t= $dataDtl->KDTRPBM; \t\t\t$KDSATBM\t= $dataDtl->KDSATBM;\n\t\t\t\t$KDCUK\t\t= $dataDtl->KDCUK; \t\t\t\t$KDTRPCUK\t= $dataDtl->KDTRPCUK; \n\t\t\t\t$KDSATCUK\t= $dataDtl->KDSATCUK; \t\t\t$TRPBM\t\t= $dataDtl->TRPBM; \n\t\t\t\t$TRPCUK\t\t= $dataDtl->TRPCUK; \t\t\t$TRPPPN\t\t= $dataDtl->TRPPPN; \n\t\t\t\t$TRPPBM\t\t= $dataDtl->TRPPBM; \t\t\t$TRPPPH\t\t= $dataDtl->TRPPPH;\n\n\t\t\t\t/*START RESET VARIABLE*/\n\t\t\t\t/*HEADER*/\n\t\t\t\t$DCIFRP\t= ROUND($DCIF, 2) * $NDPBM;\n\n\t\t\t $BM\t \t\t\t= 0;\n\t\t\t $BMBAYAR_A \t\t= 0;\n\t\t\t $BMDITGPEM_A \t= 0;\n\t\t\t $BMTANGGUH_A \t= 0;\n\t\t\t $BMBERKALA_A \t= 0;\n\t\t\t $BMBEBAS_A\t\t= 0;\n\n\t\t\t $CTDITGPEM_A\t= 0;\n\t\t\t\t$CTTANGGUH_A\t= 0;\n\t\t\t\t$CTBERKALA_A\t= 0;\n\t\t\t\t$CTBEBAS_A\t\t= 0;\n\t\t\t\t$CTBAYAR_A\t\t= 0;\n\t\t\t\t$CMEDITGPEM_A\t= 0;\n\t\t\t\t$CMETANGGUH_A\t= 0;\n\t\t\t\t$CMEBERKALA_A\t= 0;\n\t\t\t\t$CMEBEBAS_A\t\t= 0;\n\t\t\t\t$CMEBAYAR_A\t\t= 0;\n\t\t\t\t$CEADITGPEM_A\t= 0;\n\t\t\t\t$CEATANGGUH_A\t= 0;\n\t\t\t\t$CEABERKALA_A\t= 0;\n\t\t\t\t$CEABEBAS_A\t\t= 0;\n\t\t\t\t$CEABAYAR_A\t\t= 0;\n\t\t\t $CUKAIBAYAR \t= 0;\n\t\t\t $TOTALCUK \t\t= 0;\n\t\t\t $CKBEBAS_A \t\t= 0;\n\t\t\t // return $DCIFRP;\n\t\t\t\t/*END RESET VARIABLE*/\n\n\t\t\t\t/*JENIS TARIF BM*/\n\t\t\t\t($KDTRPBM \t== '1') ? $BM \t= $DCIFRP * $TRPBM \t / 100 : $BM = $SATBMJM * $TRPBM;\n\n\t\t\t\t/*BM*/\n\t\t\t\t// DCIF * TRPBM\n\t\t\t\t$VAL = ($BM * $FASBM / 100);\n\t\t\t\tif($KDFASBM == '1')\n\t\t\t\t{\n\t\t\t\t\t$BMDITGPEM \t = $BMDITGPEM + ROUND($VAL,2);\n\t\t\t\t\t$BMDITGPEM_A = ROUND($VAL,2);\n\t\t\t\t}\n\t\t\t\telseif($KDFASBM == '2')\n\t\t\t\t{\n\t\t\t\t\t$BMTANGGUH \t = $BMTANGGUH + ROUND($VAL,2);\n\t\t\t\t\t$BMTANGGUH_A = ROUND($VAL,2);\n\t\t\t\t}\n\t\t\t\telseif($KDFASBM == '3')\n\t\t\t\t{\n\t\t\t\t\t$BMBERKALA \t = $BMBERKALA + ROUND($VAL,2);\n\t\t\t\t\t$BMBERKALA_A = ROUND($VAL,2);\n\t\t\t\t}\n\t\t\t\telseif($KDFASBM == '4')\n\t\t\t\t{\n\t\t\t\t\t$BMBEBAS = $BMBEBAS + ROUND($VAL,2);\n\t\t\t\t\t$BMBEBAS_A = ROUND($VAL,2);\n\t\t\t\t}\n\n\t\t\t\t$BMBAYAR = $BMBAYAR + ROUND(($BM - $VAL),2);\n\t\t\t\t$BMBAYAR_A = ROUND(($BM - $VAL),2);\n\t\t\n\t\t\t\t$BMTOTAL = $BMBAYAR_A + $BMTANGGUH_A + $BMBERKALA_A;\n\n\t\t\t\t/*CUKAI*/\n\t\t\t\t// (DCIF + BMBAYAR) * TRPCUK\n\t\t\t\tif($KDTRPCUK == '1')\n\t\t\t\t{\n\t\t\t\t\t$VAL \t\t= ($DCIFRP + $BMTOTAL) * ($TRPCUK / 100) * ($FASCUK / 100);\n\t\t\t\t\t$VAL_SPECT\t= ($DCIFRP + $BMTOTAL) * ($TRPCUK / 100);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$VAL \t\t= $TRPCUK * $SATCUKJM * ($FASCUK / 100);\n\t\t\t\t\t$VAL_SPECT\t= $TRPCUK * $SATCUKJM;\n\t\t\t\t}\n\n\t\t\t\tif($KDCUK == '1')\n\t\t\t\t{\n\t\t\t\t\tif($KDFASCUK == '1') \n\t\t\t\t\t{ \n\t\t\t\t\t\t$CTDITGPEM\t\t= $CTDITGPEM + ROUND($VAL,2);\n\t\t\t\t\t\t$CTDITGPEM_A\t= ROUND($VAL,2);\n\t\t\t\t\t}\n\t\t\t\t\tif($KDFASCUK == '2') \n\t\t\t\t\t{ \n\t\t\t\t\t\t$CTTANGGUH\t\t= $CTTANGGUH + ROUND($VAL,2);\n\t\t\t\t\t\t$CTTANGGUH_A\t= ROUND($VAL,2);\n\t\t\t\t\t}\n\t\t\t\t\tif($KDFASCUK == '3') \n\t\t\t\t\t{ \n\t\t\t\t\t\t$CTBERKALA\t\t= $CTBERKALA + ROUND($VAL,2);\n\t\t\t\t\t\t$CTBERKALA_A\t= ROUND($VAL,2);\n\t\t\t\t\t}\n\t\t\t\t\tif($KDFASCUK == '4') \n\t\t\t\t\t{ \n\t\t\t\t\t\t$CTBEBAS\t\t= $CTBEBAS + ROUND($VAL,2);\n\t\t\t\t\t\t$CTBEBAS_A\t\t= ROUND($VAL,2);\n\t\t\t\t\t}\n\n\t\t\t\t\t$CTBAYAR \t= $CTBAYAR + ROUND($VAL_SPECT - $VAL,2);\n\t\t\t\t\t$CTBAYAR_A \t= ROUND($VAL_SPECT - $VAL,2);\n\t\t\t\t}\n\t\t\t\telseif($KDCUK == '2')\n\t\t\t\t{\n\t\t\t\t\tif($KDFASCUK == '1') \n\t\t\t\t\t{ \n\t\t\t\t\t\t$CMEDITGPEM\t\t= $CMEDITGPEM + ROUND($VAL,2);\n\t\t\t\t\t\t$CMEDITGPEM_A\t= ROUND($VAL,2);\n\t\t\t\t\t}\n\t\t\t\t\tif($KDFASCUK == '2') \n\t\t\t\t\t{ \n\t\t\t\t\t\t$CMETANGGUH\t\t= $CMETANGGUH + ROUND($VAL,2);\n\t\t\t\t\t\t$CMETANGGUH_A\t= ROUND($VAL,2);\n\t\t\t\t\t}\n\t\t\t\t\tif($KDFASCUK == '3') \n\t\t\t\t\t{ \n\t\t\t\t\t\t$CMEBERKALA\t\t= $CMEBERKALA + ROUND($VAL,2);\n\t\t\t\t\t\t$CMEBERKALA_A\t= ROUND($VAL,2);\n\t\t\t\t\t}\n\t\t\t\t\tif($KDFASCUK == '4') \n\t\t\t\t\t{ \n\t\t\t\t\t\t$CMEBEBAS\t\t= $CMEBEBAS + ROUND($VAL,2);\n\t\t\t\t\t\t$CMEBEBAS_A\t\t= ROUND($VAL,2);\n\t\t\t\t\t}\n\t\t \n\t\t $CMEBAYAR \t= $CMEBAYAR + ROUND($VAL_SPECT - $VAL,2);\n\t\t $CMEBAYAR_A = ROUND($VAL_SPECT - $VAL,2);\n\t\t\t\t}\n\t\t\t\telseif($KDCUK == '3')\n\t\t\t\t{\n\t \tif($KDFASCUK == '1') \n\t \t{ \n\t \t\t$CEADITGPEM\t\t= $CEADITGPEM + ROUND($VAL,2);\n\t \t\t$CEADITGPEM_A\t= ROUND($VAL,2);\n\t \t}\n\t\t\t\t\tif($KDFASCUK == '2') \n\t\t\t\t\t{ \n\t\t\t\t\t\t$CEATANGGUH\t\t= $CEATANGGUH + ROUND($VAL,2);\n\t\t\t\t\t\t$CEATANGGUH_A\t= ROUND($VAL,2);\n\t\t\t\t\t}\n\t\t\t\t\tif($KDFASCUK == '3') \n\t\t\t\t\t{ \n\t\t\t\t\t\t$CEABERKALA\t\t= $CEABERKALA + ROUND($VAL,2);\n\t\t\t\t\t\t$CEABERKALA_A\t= ROUND($VAL,2);\n\t\t\t\t\t}\n\t\t\t\t\tif($KDFASCUK == '4') \n\t\t\t\t\t{ \n\t\t\t\t\t\t$CEABEBAS\t\t= $CEABEBAS + ROUND($VAL,2);\n\t\t\t\t\t\t$CEABEBAS_A\t\t= ROUND($VAL,2);\n\t\t\t\t\t}\n\t \t\n\t \t$CEABAYAR \t= $CEABAYAR + ROUND($VAL_SPECT - $VAL,2);\n\t \t$CEABAYAR_A = ROUND($VAL_SPECT - $VAL,2);\n\t\t\t\t}\n\t\t\t\t/*END CUKAI*/\n\n\t\t\t\t$CUKAIBAYAR = $CTBAYAR_A + $CMEBAYAR_A + $CEABAYAR_A;\n\t\t\t\t// $CUKAIBAYAR_A[] = $CTBAYAR_A + $CMEBAYAR_A + $CEABAYAR_A;\n\t\t\t\t// $CTBAYAR_B[] = $CTBAYAR_A;\n\n\t\t\t\t/*PPN*/\n\t\t\t\t// (DCIF + BM + CUKAI) * TRPPPN\n\t\t\t\t$VAL = ($DCIFRP + $BMTOTAL + $CUKAIBAYAR) * ($TRPPPN / 100) * ($FASPPN / 100);\n\t\t\t if($KDFASPPN == '1') { $PPNDITGPEM = $PPNDITGPEM + ROUND($VAL,2); }\n\t\t \tif($KDFASPPN == '2') { $PPNTANGGUH = $PPNTANGGUH + ROUND($VAL,2); }\n\t\t \tif($KDFASPPN == '3') { $PPNBERKALA = $PPNBERKALA + ROUND($VAL,2); }\n\t\t \tif($KDFASPPN == '4') { $PPNBEBAS = $PPNBEBAS + ROUND($VAL,2); }\n\t\t\t // $PPNBAYAR_A[] = ROUND((($DCIFRP + $BMBAYAR_A + $CUKAIBAYAR) * ($TRPPPN / 100)) - $VAL,2);\n\t\t\t $PPNBAYAR = $PPNBAYAR + ROUND((($DCIFRP + $BMTOTAL + $CUKAIBAYAR) * ($TRPPPN / 100)) - $VAL,2);\n\t\t\t \n\t\t\t /*PPNBM*/\n\t\t\t // (DCIF + BM + CUKAI) * TRPPPNBM\n\t\t\t $VAL = ($DCIFRP + $BMTOTAL + $CUKAIBAYAR) * ($TRPPBM / 100) * ($FASPBM / 100);\n\t\t\t if($KDFASPBM == '1') { $PBMDITGPEM = $PBMDITGPEM + ROUND($VAL,2); }\n\t\t \tif($KDFASPBM == '2') { $PBMTANGGUH = $PBMTANGGUH + ROUND($VAL,2); }\n\t\t \tif($KDFASPBM == '3') { $PBMBERKALA = $PBMBERKALA + ROUND($VAL,2); }\n\t\t \tif($KDFASPBM == '4') { $PBMBEBAS = $PBMBEBAS + ROUND($VAL,2); }\n\t\t\t $PBMBAYAR = $PBMBAYAR + ROUND((($DCIFRP + $BMTOTAL + $CUKAIBAYAR) * ($TRPPBM / 100)) - $VAL,2);\n\t\t\t \n\t\t\t /*PPH*/\n\t\t\t // (DCIF + BM + CUKAI) * TRPPPH\n\t\t\t $VAL = ($DCIFRP + $BMTOTAL + $CUKAIBAYAR) * ($TRPPPH / 100) * ($FASPPH / 100);\n\t\t\t // dd($VAL);\n\t\t\t if($KDFASPPH == '1') { $PPHDITGPEM = $PPHDITGPEM + ROUND($VAL,2); }\n\t\t\t if($KDFASPPH == '2') { $PPHTANGGUH = $PPHTANGGUH + ROUND($VAL,2); }\n\t\t\t if($KDFASPPH == '3') { $PPHBERKALA = $PPHBERKALA + ROUND($VAL,2); }\n\t\t\t if($KDFASPPH == '4') { $PPHBEBAS = $PPHBEBAS + ROUND($VAL,2); }\n\t\t\t $PPHBAYAR = $PPHBAYAR + ROUND((($DCIFRP + $BMTOTAL + $CUKAIBAYAR) * ($TRPPPH / 100)) - $VAL,2);\n\n\t \t}\n\n\t \t/*END FOREACH*/\n\t\t\t // dd($CUKAIBAYAR_A, $CTBAYAR_B);\n\n\t \t/*BULATKAN KE RIBUAN*/\n\t \t$BMBAYAR \t\t= ceiling($BMBAYAR,1000);\n\t \t$BMDITGPEM \t\t= ceiling($BMDITGPEM,1000);\t\t\t\t$BMTANGGUH \t\t= ceiling($BMTANGGUH,1000);\n\t \t$BMBERKALA \t\t= ceiling($BMBERKALA,1000);\t\t\t\t$BMBEBAS \t\t= ceiling($BMBEBAS,1000);\n\n\t\t\t#========================================================\n\n\t \t$PPNBAYAR \t\t= ceiling($PPNBAYAR,1000);\n\t \t$PPNDITGPEM \t= ceiling($PPNDITGPEM,1000);\t\t\t$PPNTANGGUH \t= ceiling($PPNTANGGUH,1000);\n\t \t$PPNBERKALA \t= ceiling($PPNBERKALA,1000);\t\t\t$PPNBEBAS \t\t= ceiling($PPNBEBAS,1000);\n\n\t \t$PPHBAYAR \t\t= ceiling($PPHBAYAR,1000);\n\t \t$PPHDITGPEM \t= ceiling($PPHDITGPEM,1000);\t\t\t$PPHTANGGUH \t= ceiling($PPHTANGGUH,1000);\n\t \t$PPHBERKALA \t= ceiling($PPHBERKALA,1000);\t\t\t$PPHBEBAS \t\t= ceiling($PPHBEBAS,1000);\n\n\t \t$CEABAYAR\t\t= ceiling($CEABAYAR,1000);\n\t \t$CEADITGPEM\t\t= ceiling($CEADITGPEM,1000);\n\t \t$CEATANGGUH\t\t= ceiling($CEATANGGUH,1000);\n\t \t$CEABERKALA\t\t= ceiling($CEABERKALA,1000);\n\t \t$CEABEBAS\t\t= ceiling($CEABEBAS,1000);\n\n\t \t$CMEBAYAR\t\t= ceiling($CMEBAYAR,1000);\n\t \t$CMEDITGPEM\t\t= ceiling($CMEDITGPEM,1000);\n\t \t$CMETANGGUH\t\t= ceiling($CMETANGGUH,1000);\n\t \t$CMEBERKALA\t\t= ceiling($CMEBERKALA,1000);\n\t \t$CMEBEBAS\t\t= ceiling($CMEBEBAS,1000);\n\n\t \t$CTBAYAR\t\t= ceiling($CTBAYAR,1000);\n\t \t$CTDITGPEM\t\t= ceiling($CTDITGPEM,1000);\n\t \t$CTTANGGUH\t\t= ceiling($CTTANGGUH,1000);\n\t \t$CTBERKALA\t\t= ceiling($CTBERKALA,1000);\n\t \t$CTBEBAS\t\t= ceiling($CTBEBAS,1000);\n\n\t\t\t#========================================================\n\t\t\t$TOTALCUK\t\t= $CEABAYAR + $CMEBAYAR + $CTBAYAR;\n\t\t\t$TOTCUKDITGPEM \t= $CEADITGPEM + $CMEDITGPEM + $CTDITGPEM;\n\t\t\t$TOTCUKTANGGUH \t= $CEATANGGUH + $CMETANGGUH + $CTTANGGUH;\n\t\t\t$TOTCUKBERKALA \t= $CEABERKALA + $CMEBERKALA + $CTBERKALA;\n\t\t\t$TOTCUKBEBAS \t= $CEABEBAS + $CMEBEBAS + $CTBEBAS;\n\n\t \t$TOTALCUK\t\t= ceiling($TOTALCUK,1000);\n\t \t$TOTCUKDITGPEM \t= ceiling($TOTCUKDITGPEM,1000);\n\t \t$TOTCUKTANGGUH \t= ceiling($TOTCUKTANGGUH,1000);\n\t \t$TOTCUKBERKALA \t= ceiling($TOTCUKBERKALA,1000);\n\t \t$TOTCUKBEBAS \t= ceiling($TOTCUKBEBAS,1000);\n\t \t#========================================================\n\n\t\t\t// return array($PPHBAYAR, $PPNBAYAR, $TOTCUKTDKDPGT);\n\n\t \t/*INSERT INTO DB*/\n\t \t/*INSERT BM*/\n\t\t if($BMBAYAR\t\t\t> 0){ insertRefernce('T_BC20PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '1','KDFASIL' => '0','NILBEBAN' => $BMBAYAR]); }\n\t\t if($BMBAYAR\t\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '1','KDFASIL' => '0','NILBEBAN' => $BMBAYAR]); }\n\t\t if($BMDITGPEM\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '1','KDFASIL' => '1','NILBEBAN' => $BMDITGPEM]); }\n\t\t if($BMTANGGUH\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '1','KDFASIL' => '2','NILBEBAN' => $BMTANGGUH]); }\n\t\t if($BMBERKALA\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '1','KDFASIL' => '3','NILBEBAN' => $BMBERKALA]); }\n\t\t if($BMBEBAS\t\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '1','KDFASIL' => '4','NILBEBAN' => $BMBEBAS]); }\n\n\t\t /*INSERT CEA*/\n\t\t if($CEABAYAR\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '7','KDFASIL' => '0','NILBEBAN' => $CEABAYAR]); }\n\t\t if($CEADITGPEM\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '7','KDFASIL' => '1','NILBEBAN' => $CEADITGPEM]); }\n\t\t if($CEATANGGUH\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '7','KDFASIL' => '2','NILBEBAN' => $CEATANGGUH]); }\n\t\t if($CEABERKALA\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '7','KDFASIL' => '3','NILBEBAN' => $CEABERKALA]); }\n\t\t if($CEABEBAS\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '7','KDFASIL' => '4','NILBEBAN' => $CEABEBAS]); }\n\n\t\t /*INSERT CME*/\n\t\t if($CMEBAYAR\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '6','KDFASIL' => '0','NILBEBAN' => $CMEBAYAR]); }\n\t\t if($CMEDITGPEM\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '6','KDFASIL' => '1','NILBEBAN' => $CMEDITGPEM]); }\n\t\t if($CMETANGGUH\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '6','KDFASIL' => '2','NILBEBAN' => $CMETANGGUH]); }\n\t\t if($CMEBERKALA\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '6','KDFASIL' => '3','NILBEBAN' => $CMEBERKALA]); }\n\t\t if($CMEBEBAS\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '6','KDFASIL' => '4','NILBEBAN' => $CMEBEBAS]); }\n\n\t\t /*INSERT CEA*/\n\t\t if($CTBAYAR\t\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '5','KDFASIL' => '0','NILBEBAN' => $CTBAYAR]); }\n\t\t if($CTDITGPEM\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '5','KDFASIL' => '1','NILBEBAN' => $CTDITGPEM]); }\n\t\t if($CTTANGGUH\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '5','KDFASIL' => '2','NILBEBAN' => $CTTANGGUH]); }\n\t\t if($CTBERKALA\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '5','KDFASIL' => '3','NILBEBAN' => $CTBERKALA]); }\n\t\t if($CTBEBAS\t\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '5','KDFASIL' => '4','NILBEBAN' => $CTBEBAS]); }\n\n\t\t /*INSERT PPN*/\n\t\t if($PPNBAYAR\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '2','KDFASIL' => '0','NILBEBAN' => $PPNBAYAR]); }\n\t\t if($PPNDITGPEM\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '2','KDFASIL' => '1','NILBEBAN' => $PPNDITGPEM]); }\n\t\t if($PPNTANGGUH\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '2','KDFASIL' => '2','NILBEBAN' => $PPNTANGGUH]); }\n\t\t if($PPNBERKALA\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '2','KDFASIL' => '3','NILBEBAN' => $PPNBERKALA]); }\n\t\t if($PPNBEBAS\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '2','KDFASIL' => '4','NILBEBAN' => $PPNBEBAS]); }\n\n\t\t /*INSERT PPNBM*/\n\t\t if($PBMBAYAR\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '3','KDFASIL' => '0','NILBEBAN' => $PBMBAYAR]); }\n\t\t if($PBMDITGPEM\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '3','KDFASIL' => '1','NILBEBAN' => $PBMDITGPEM]); }\n\t\t if($PBMTANGGUH\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '3','KDFASIL' => '2','NILBEBAN' => $PBMTANGGUH]); }\n\t\t if($PBMBERKALA\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '3','KDFASIL' => '3','NILBEBAN' => $PBMBERKALA]); }\n\t\t if($PBMBEBAS\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '3','KDFASIL' => '4','NILBEBAN' => $PBMBEBAS]); }\n\n\t\t /*INSERT PPH*/\n\t\t if($PPHBAYAR\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '4','KDFASIL' => '0','NILBEBAN' => $PPHBAYAR]); }\n\t\t if($PPHDITGPEM\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '4','KDFASIL' => '1','NILBEBAN' => $PPHDITGPEM]); }\n\t\t if($PPHTANGGUH\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '4','KDFASIL' => '2','NILBEBAN' => $PPHTANGGUH]); }\n\t\t if($PPHBERKALA\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '4','KDFASIL' => '3','NILBEBAN' => $PPHBERKALA]); }\n\t\t if($PPHBEBAS\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '4','KDFASIL' => '4','NILBEBAN' => $PPHBEBAS]); }\n\n\t\t /*INSERT PNBP*/\n\t\t if($PNBPBAYAR\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '8','KDFASIL' => '0','NILBEBAN' => $PNBPBAYAR]); }\n\t\t if($PNBPDITGPEM\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '8','KDFASIL' => '1','NILBEBAN' => $PNBPDITGPEM]); }\n\t\t if($PNBPTANGGUH\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '8','KDFASIL' => '2','NILBEBAN' => $PNBPTANGGUH]); }\n\t\t if($PNBPBERKALA\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '8','KDFASIL' => '3','NILBEBAN' => $PNBPBERKALA]); }\n\t\t if($PNBPBEBAS\t\t> 0){ insertRefernce('T_BC23PGT', ['KODE_TRADER' => $kode_trader,'CAR' => $car,'KDBEBAN' => '8','KDFASIL' => '4','NILBEBAN' => $PNBPBEBAS]); }\n\n\t \treturn \"success\";\n\t }\n\t else\n\t {\n\t \treturn \"failed\";\n\t }\n\t \n }", "title": "" }, { "docid": "64db73ef6421c39acb4f27b8d9ba498a", "score": "0.4192197", "text": "function getConsortiumYearsDownloadInformation($libraryID, $date) {\n\t$lib_condition = \"and library_id IN (\".$libraryID.\")\";\n\t$date_arr = explode(\"/\", $date);\n $startDate = date('Y-m-d', mktime(0, 0, 0, 1, 1, $date_arr[2])).\" 00:00:00\";\n $endDate = date('Y-m-d', mktime(0, 0, 0, 12, 31, $date_arr[2])).\" 23:59:59\";\n $conditions = array(\n 'created BETWEEN \"'.$startDate.'\" and \"'.$endDate.'\" '.$lib_condition.\" AND 1 = 1 GROUP BY id ORDER BY created ASC\"\n );\n return array($this->find('all', compact('conditions')), $this->find('all', array('conditions' => array('created BETWEEN \"'.$startDate.'\" and \"'.$endDate.'\" '.$lib_condition, '1 = 1 GROUP BY patron_id, library_id'), 'fields' => array('patron_id', 'library_id','email' , 'COUNT(patron_id) AS totalDownloads'), 'order' => 'patron_id DESC','recursive' => -1)), $this->find('all', array('conditions' => array('created BETWEEN \"'.$startDate.'\" and \"'.$endDate.'\" '.$lib_condition), 'group' => array('Genre.Genre'), 'fields' => array('Genre.Genre', 'COUNT(DISTINCT Download.id) AS totalProds'), 'order' => 'Genre.Genre')));\n }", "title": "" }, { "docid": "ee751baab82e0085d34045ff7ef4cf8d", "score": "0.41845506", "text": "private function calculateConsumptionPerMonth()\r\n {\r\n // Lets calculate the quantity of wood used per month \r\n $sql = \"SELECT YEAR(Datum) AS y, MONTH(Datum) AS m, COUNT(*) AS nb_minutes_of_worm_drive\r\n FROM data\r\n WHERE PE1MotorRA = 1\r\n GROUP BY YEAR(Datum), MONTH(Datum)\r\n ORDER BY y ASC, m ASC\";\r\n \r\n $result = mysql_query($sql);\r\n $minutes_per_month = array();\r\n\r\n $this->quantity_per_month_year = array();\r\n while ($row = mysql_fetch_assoc($result))\r\n {\r\n $year = $row['y'];\r\n $month = $row['m'];\r\n $minutes = $row['nb_minutes_of_worm_drive'];\r\n if (empty($this->quantity_per_month_year[$year][$month]))\r\n $this->quantity_per_month_year[$year][$month] = $minutes * $this->quantity_per_minute;\r\n }\r\n\r\n\r\n $sql = \"SELECT YEAR(Datum) AS y, MONTH(Datum) AS m, COUNT(*) AS nb_minutes_of_ww_pumpe\r\n FROM data\r\n WHERE WW1Pumpe = 1\r\n GROUP BY YEAR(Datum), MONTH(Datum)\r\n ORDER BY y ASC, m ASC\";\r\n \r\n $result = mysql_query($sql);\r\n $minutes_per_month = array();\r\n\r\n\t\t$max = 0;\r\n\r\n $this->hot_water_per_month_year = array();\r\n while ($row = mysql_fetch_assoc($result))\r\n {\r\n $year = $row['y'];\r\n $month = $row['m'];\r\n $minutes = $row['nb_minutes_of_ww_pumpe'];\r\n if (empty($this->hot_water_per_month_year[$year][$month]))\r\n $this->hot_water_per_month_year[$year][$month] = $minutes;\r\n \r\n if ($max < $minutes)\r\n \t$max = $minutes;\r\n }\r\n\r\n\t\t$this->percentize($this->hot_water_per_month_year, $max);\r\n\r\n $sql = \"SELECT YEAR(Datum) AS y, MONTH(Datum) AS m, COUNT(*) AS nb_minutes_of_hk_pumpe\r\n FROM data\r\n WHERE HK1Pumpe = 1\r\n GROUP BY YEAR(Datum), MONTH(Datum)\r\n ORDER BY y ASC, m ASC\";\r\n \r\n $result = mysql_query($sql);\r\n $minutes_per_month = array();\r\n\t\t$max = 0;\r\n\r\n $this->heating_per_month_year = array();\r\n while ($row = mysql_fetch_assoc($result))\r\n {\r\n $year = $row['y'];\r\n $month = $row['m'];\r\n $minutes = $row['nb_minutes_of_hk_pumpe'];\r\n if (empty($this->heating_per_month_year[$year][$month]))\r\n $this->heating_per_month_year[$year][$month] = $minutes;\r\n \r\n if ($max < $minutes)\r\n \t$max = $minutes; \r\n }\r\n\t\t$this->percentize($this->heating_per_month_year, $max);\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "20aabd1955aecce430c4db8ad18c115a", "score": "0.41781846", "text": "public function health_fertility_rate_by_age_and_residence(){\n \t$data = DB::table('health_fertility_rate_by_age_and_residence')->get();\n\t\t\t\t \n $year = array();\n\t\t\t$year['name'] = 'year';\n $series1 = array();\n\t\t\t$series1['name'] = 'fertility rate';\n\t\t\t$series2 = array();\n\t\t\t$series2['name'] = 'age group';\n\t\t\t$series3 = array();\n\t\t\t$series3['name'] = 'residence';\n\t\t\t \n\t\t\tforeach ($data as $row)\n\t\t\t{\n\t\t\t$year['data'][] = $row->year;\n\t\t\t$series1['data'][] = $row->fertility_rate;\n\t\t\t$series2['data'][] = $row->age_group;\n\t\t\t$series3['data'][] = $row->residence;\n\t\t\t}\n\t\t\t \n\t\t\t$result = array();\n\t\t\tarray_push($result,$year);\n\t\t\tarray_push($result,$series1);\n\t\t\tarray_push($result,$series2);\n\t\t\tarray_push($result,$series3);\n\t\t\t\t\t\n\t\t\tprint json_encode($result, JSON_NUMERIC_CHECK);\n }", "title": "" }, { "docid": "6819588df744541be64939ae726c7dbb", "score": "0.41773528", "text": "public function index()\n {\n $total_sales = DB::raw('SUM(receipts.total) as totalSales');\n $year_receipt_created = DB::raw('YEAR(receipts.created_at) as year');\n\n //Raw MyQSL Queries for Cost of Goods Sold\n<<<<<<< HEAD\n $total_cost = DB::raw('(SUM(qty * cost)) as totalCosts');\n=======\n $total_cost = DB::raw('(SUM(qty * cost)) as totalCost');\n>>>>>>> 558c21e6c26f9043810d916b07f52d9311b946c3\n $year_sold = DB::raw('YEAR(created_at) as year');\n\n //Gross Profit for Retailer\n if(SystemSetting::first()->system_mode == 'Retailer')\n {\n $sales = DB::table('receipts')\n<<<<<<< HEAD\n ->where('status', 'paid')\n=======\n ->where('status', 'served')\n>>>>>>> 558c21e6c26f9043810d916b07f52d9311b946c3\n ->where('mode', 'retailer')\n ->select($total_sales, $year_receipt_created)\n ->groupBy('year')\n ->get();\n\n $costs = DB::table('purchases')\n<<<<<<< HEAD\n ->where('status', 'paid')\n=======\n ->where('status', 'served')\n>>>>>>> 558c21e6c26f9043810d916b07f52d9311b946c3\n ->select($total_cost, $year_sold)\n ->groupBy('year')\n ->get();\n\n $gross_profit = 0;\n<<<<<<< HEAD\n }\n\n //Gross Profit for Restaurant\n else if(SystemSetting::first()->system_mode == 'Restaurant')\n {\n $sales = DB::table('receipts')\n ->where('status', 'paid')\n ->where('mode', 'restaurant')\n ->select($total_sales, $year_receipt_created)\n ->groupBy('year')\n ->get();\n\n $costs = DB::table('orders')\n ->where('status', 'served')\n ->select($total_cost, $year_sold)\n ->groupBy('year')\n ->get();\n\n $gross_profit = 0;\n }\n\n //Gross Profit for Fastfood\n else\n {\n $sales = DB::table('receipts')\n ->where('status', 'paid')\n ->where('mode', 'fastfood')\n ->select($total_sales, $year_receipt_created)\n ->groupBy('year')\n ->limit(1)\n=======\n\n foreach ($sales as $sale) \n {\n $gross_profit += $sale->totalSales;\n }\n\n foreach ($costs as $cost) \n {\n $gross_profit -= $cost->totalCost;\n }\n }\n\n //Gross Profit for Restaurant\n else\n {\n $sales = DB::table('receipts')\n ->where('status', 'served')\n ->where('mode', 'restaurant')\n ->select($total_sales, $year_receipt_created)\n ->groupBy('year')\n>>>>>>> 558c21e6c26f9043810d916b07f52d9311b946c3\n ->get();\n\n $costs = DB::table('orders')\n ->where('status', 'served')\n ->select($total_cost, $year_sold)\n ->groupBy('year')\n<<<<<<< HEAD\n ->limit(1)\n ->get();\n\n $gross_profit = 0;\n }\n\n $totalSales = 0;\n $totalCosts = 0;\n\n //Computation for Gross Profit\n foreach ($sales as $sale) \n {\n $gross_profit += $sale->totalSales;\n }\n\n foreach ($costs as $cost) \n {\n $gross_profit -= $cost->totalCosts;\n }\n\n //Computation for Total Sales\n foreach ($sales as $sale)\n {\n $totalSales = $sale->totalSales;\n }\n\n //Computation for Total Costs\n foreach ($costs as $cost)\n {\n $totalCosts = $cost->totalCosts;\n }\n\n\n return view('salesreports.grossprofits.index', compact('gross_profit', 'totalSales', 'totalCosts'));\n=======\n ->get();\n\n $gross_profit = 0;\n\n foreach ($sales as $sale) \n {\n $gross_profit += $sale->totalSales;\n }\n\n foreach ($costs as $cost) \n {\n $gross_profit -= $cost->totalCost;\n }\n }", "title": "" }, { "docid": "8a903a03f334b603962a72a223457a0b", "score": "0.41712207", "text": "function ciniki_customers_seasonGet(&$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 'season_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Price Point'), \n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n\n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'private', 'checkAccess');\n $rc = ciniki_customers_checkAccess($ciniki, $args['tnid'], 'ciniki.customers.seasonGet', 0); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'users', 'private', 'dateFormat');\n $date_format = ciniki_users_dateFormat($ciniki);\n\n //\n // Get the details about a tax\n //\n $strsql = \"SELECT id, name, \"\n . \"DATE_FORMAT(start_date, '\" . ciniki_core_dbQuote($ciniki, $date_format) . \"') AS start_date, \"\n . \"DATE_FORMAT(end_date, '\" . ciniki_core_dbQuote($ciniki, $date_format) . \"') AS end_date, \"\n . \"flags \"\n . \"FROM ciniki_customer_seasons \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $args['season_id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryTree');\n $rc = ciniki_core_dbHashQueryTree($ciniki, $strsql, 'ciniki.customers', array(\n array('container'=>'seasons', 'fname'=>'id', 'name'=>'season',\n 'fields'=>array('id', 'name', 'start_date', 'end_date', 'flags')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['seasons']) || !isset($rc['seasons'][0]['season']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.141', 'msg'=>'Unable to find the season'));\n }\n $season = $rc['seasons'][0]['season'];\n\n return array('stat'=>'ok', 'season'=>$season);\n}", "title": "" }, { "docid": "a849efdf98e5dc2871ab929023bf0d3b", "score": "0.41643554", "text": "function getTierOne()\n{\n\t\n\t$sql=\"SELECT DISTINCT pages.date FROM pages, thumbnails WHERE pages.thumbnailID = thumbnails.thumbnailID AND userID=2 ORDER BY pages.date DESC\"; \n\t$result=mysql_query($sql); \n\n\t$options=\"\"; \n\t$y=array();\n\n\twhile ($row=mysql_fetch_array($result)) { \n \t$date=$row[\"date\"]; \n\t\t$year = date(\"Y\",strtotime($date));\n\t\n\t\tif (!in_array($year, $y)){ \n\t\t\t$y[] = $year;\n\t\t\t$options.=\"<OPTION VALUE=\".$year.\">\".$year; echo'</OPTION>'; \n\t\t}\n\n\t} \n\techo $options;\n\n}", "title": "" }, { "docid": "a3b0533dad96704e1ece7f3e65b0751c", "score": "0.4164297", "text": "function getStorefront(){\r\n return array(\r\n array(\r\n \"display\"=>\"Lucky You - Speaker\",\r\n \"item\"=>3,\r\n \"img\"=>\"https://172.16.8.242/Development\\Apps\\Accounts\\Accounts\\\\273549.png\",\r\n \"payType\"=>\"count\",\r\n \"price\"=>5,\r\n \"id\"=>3\r\n ),\r\n\r\n array(\r\n \"display\"=>\"Name Your Card - Corn Hole\",\r\n \"item\"=>4,\r\n \"img\"=>\"https://172.16.8.242/Development\\Apps\\Accounts\\Accounts\\\\273549.png\",\r\n \"payType\"=>\"count\",\r\n \"price\"=>10,\r\n \"id\"=>4\r\n ),\r\n\r\n array(\r\n \"display\"=>\"Card Raffle - Brew-Ha-Ha\",\r\n \"item\"=>5,\r\n \"img\"=>\"https://172.16.8.242/Development\\Apps\\Accounts\\Accounts\\\\273549.png\",\r\n \"payType\"=>\"count\",\r\n \"price\"=>10,\r\n \"id\"=>5\r\n ),\r\n\r\n array(\r\n \"display\"=>\"Cooler of Libations - Raffle\",\r\n \"item\"=>6,\r\n \"img\"=>\"https://172.16.8.242/Development\\Apps\\Accounts\\Accounts\\\\273549.png\",\r\n \"payType\"=>\"drop\",\r\n \"payLevels\"=>array(\r\n array(\"desc\"=>\"2 For $10.00\", \"price\"=>10, \"id\"=>6),\r\n array(\"desc\"=>\"5 For $20.00 \", \"price\"=>20, \"id\"=>7)\r\n )\r\n ),\r\n\r\n array(\r\n \"display\"=>\"Mystery Mania\",\r\n \"item\"=>7,\r\n \"img\"=>\"https://172.16.8.242/Development\\Apps\\Accounts\\Accounts\\\\273549.png\",\r\n \"payType\"=>\"count\",\r\n \"price\"=>5,\r\n \"id\"=>8\r\n ),\r\n\r\n array(\r\n \"display\"=>\"Team Savannah Gear\",\r\n \"item\"=>8,\r\n \"img\"=>\"https://172.16.8.242/Development\\Apps\\Accounts\\Accounts\\\\273549.png\",\r\n \"payType\"=>\"drop\",\r\n \"payLevels\"=>array(\r\n array(\"desc\"=>\"Button - $1.00\", \"price\"=>1, \"id\"=>9),\r\n array(\"desc\"=>\"Hat - $10.00 \", \"price\"=>10, \"id\"=>10)\r\n )\r\n )\r\n // array(//:0\r\n // \"display\"=>\"Mystery Machine\",\r\n // \"item\"=>2,\r\n // \"img\"=>\"https://172.16.8.242/Development\\Apps\\Accounts\\Accounts\\\\724433.png\",\r\n // \"payType\"=>\"drop\",\r\n // \"payLevels\"=>array(\r\n // array(\"desc\"=>\"1 for $20,000\", \"price\"=>25000, \"id\"=>4),\r\n // array(\"desc\"=>\"2 for $35,000\", \"price\"=>35000, \"id\"=>5)\r\n // )\r\n // ),\r\n\r\n /*array(//:1\r\n \"display\"=>\"Scooby Snacks\"\r\n \"item\"=>NULL,\r\n \"img\"=>\"https://172.16.8.242/Development\\Apps\\Accounts\\Accounts\\\\273549.png\",\r\n \"payType\"=>\"radio\",\r\n \"payLevels\"=>array(\r\n array(\"desc\"=>\"Two for $3\", \"price\"=>3),\r\n array(\"desc\"=>\"Three for $5\", \"price\"=>5)\r\n )\r\n ),*/\r\n\r\n // array(//:2\r\n // \"display\"=>\"Fruit Snacks\",\r\n // \"item\"=>4,\r\n // \"img\"=>\"https://172.16.8.242/Development\\Apps\\Accounts\\Accounts\\\\273549.png\",\r\n // \"payType\"=>\"custom\",\r\n // \"id\"=>7\r\n // ),\r\n\r\n\r\n );\r\n }", "title": "" }, { "docid": "92920d947d0397acbfa2cbfdaf341195", "score": "0.4157356", "text": "public function getCost()\n {\n $this->html('#' . $this->get('sTargetId'), Phpfox::getService('core.currency')->getCurrency($this->get('fCost')));\n\t\t$this->call(\"$('#\" . $this->get('sTargetId') . \"').show();\");\n\t}", "title": "" }, { "docid": "dea1b9e85e9e590dfee5387fe2efa9d0", "score": "0.41571152", "text": "public function companiesByVatNumber($vatNumber);", "title": "" }, { "docid": "df159a7d1b2ff39fd8417701b0f4662e", "score": "0.41568977", "text": "public function cards(Request $request)\n { \n return $this->reportQuery($request)\n ->with('percapita.resource')\n ->whereDate('target_date', '>=', now()->subMonths(12))\n ->get()\n ->groupBy('percapita_id')\n ->flatMap(function($reports) {\n return $this->newLineCharts($reports);\n })\n ->values()\n ->all(); \n }", "title": "" }, { "docid": "28085b37da5c17b45d2acfca8525d27d", "score": "0.41548306", "text": "public function special($cost)\n {\n $customers = Customer::select('customers.*', DB::raw('SUM(orders.cost) as cost'), DB::raw('SUM(orders.cost_after_discount) as cost_after_discount'))\n ->join('orders', 'customers.id', '=', 'orders.customer_id')\n ->where('cost', '>=', (int)$cost)\n ->groupBy('customers.id', 'customers.name', 'customers.phone', 'customers.evaluation', 'customers.total_cost')->get();\n\n // return response\n return response()->json($customers, 200);\n }", "title": "" }, { "docid": "e69acb7755eb00e9e9178afcb31dc57d", "score": "0.41501686", "text": "protected function getData()\n {\n $occupancies = (new RoomOccupancyRepository)->byMonth($this->year);\n\n $incomes = (new BillItemRepository)->sumByMonthType($this->year);\n\n $expenses = (new ExpenseRepository)->sumByMonthCategory($this->year);\n\n $nights = (new BookingRepository)->byAverageNights($this->year);\n\n $paxs = (new BookingRepository)->byAveragePax($this->year);\n\n $tents = (new BookingRepository)->averageTentsByMonth($this->year);\n\n // $maintenances = (new ResourceMaintenanceRepository)->getInYear($this->year);\n\n // foreach($maintenances as $maintenance) {\n \n // }\n\n foreach ($incomes as $income) {\n\n if (isset($this->income_arr[$income->mth])) {\n $this->income_arr[$income->mth] = $this->income_arr[$income->mth] + $income->total;\n } else {\n $this->income_arr[$income->mth] = $income->total;\n }\n\n }\n\n foreach ($expenses as $expense) {\n\n if (isset($this->expense_arr[$expense->mth])) {\n $this->expense_arr[$expense->mth] = $this->expense_arr[$expense->mth] + $expense->total;\n } else {\n $this->expense_arr[$expense->mth] = $expense->total;\n }\n\n } \n\n foreach ($occupancies as $occupancy) {\n\n $this->occ_arr[$occupancy->mth] = $occupancy->counter;\n\n }\n\n foreach ($tents as $tent) {\n\n $this->tent_arr[$tent->mth] = $tent->counter;\n\n }\n\n foreach ($nights as $night) {\n\n $this->avg_night_arr[$night->mth] = $night->nights;\n\n }\n\n foreach ($paxs as $pax) {\n\n $this->avg_pax_arr[$pax->mth] = $pax->pax;\n\n }\n\n // foreach ($spendings as $spending) {\n //\n // $this->avg_spend_arr[$spending->mth] = $spending->avg_gross;\n //\n // }\n\n }", "title": "" }, { "docid": "acb8ef21b261468efaae171932e1aec7", "score": "0.4146221", "text": "public function show(int $year)\n {\n $rentabloApi = App::make('RentabloApi');\n if (is_null($rentabloApi)) {\n return [];\n }\n $data = $rentabloApi->dividendsPerMonthDataAndInvestment($year);\n\n $categories = [\n 1,2,3,4,5,6,7,8,9,10,11,12\n ];\n\n natsort($data['investments']);\n\n $series = [];\n foreach ($data['investments'] as $isin => $name) {\n $series[] = [\n 'name' => $name,\n 'data' => array_values($data['dividends'][$isin]),\n 'type' => 'column',\n 'yAxis' => 0,\n ];\n }\n\n $series[] = [\n 'name' => 'Durchschnitt',\n 'data' => array_fill(0, 12, $data['statistics']['avg_per_month']),\n 'type' => 'spline',\n 'yAxis' => 0,\n ];\n\n $series[] = [\n 'name' => '1. Ziel',\n 'data' => array_fill(0, 12, 500),\n 'type' => 'spline',\n 'yAxis' => 0,\n ];\n\n\n return [\n 'categories' => $categories,\n 'series' => $series,\n 'title' => [\n 'text' => 'Dividenden in ' . $year,\n ],\n 'statistics' => $data['statistics'],\n 'investments' => $data['investments'],\n ];\n }", "title": "" }, { "docid": "b0cf4626ea95fbae25683267679ca39e", "score": "0.41418165", "text": "function myTotalSupplyOf6Months($code){\n\t\t$resarr=array();\n\t\t$curyear=substr($formateddate,0,4);\n\t\t$curmonth=substr($formateddate,5,7);\n\t\t$lstrunningmonth=substr($formateddate,5,7);\n\t\tfor($i=1;$i<7;$i++){\n\t\t\t$lstrunningmonth=$curmonth-$i;\n\t\t\t$m=($curmonth-$i);\n\t\t\tif($lstrunningmonth==\"0\"){\n\t\t\t\t$curyear=$curyear-1;\n\t\t\t\t$m=(12+($curmonth-$i));\n\t\t\t}\t\t\t\n\t\t\tif($lstrunningmonth<0){\n\t\t\t\t$m=(12+($curmonth-$i));\n\t\t\t}\n\t\t\tif(strlen($m)==1){\n\t\t\t\t$m=\"0\".$m;\n\t\t\t}\n\t\t\t$startday=$curyear.\"-\".$m.\"-01\"; \n\t\t\t$enddate=$curyear.\"-\".$m.\"-31\";\n\t\t\t\n\t\t\t$condition=\"SELECT *FROM daily_supply WHERE supplier_code='\".$code.\"' AND date BETWEEN '\".$startday.\"' AND '\".$enddate.\"'\";\n\t\t\t$getdata = Supplier::runQuery($sql);\n\t\t\t$getdata->execute();\n\t\t\t\n\t\t\t$total=0;\t\t\n\t\t\tif($getdata->rowCount() > 0){\n\t\t\t\twhile($row=$getdata->FETCH(PDO::FETCH_ASSOC)){\n\t\t\t\t\t$total=$total+$row['approved_kgs'];\n\t\t\t\t}\n\t\t\t\t$resarr[$i-1]=$total;\n\t\t\t}else{\n\t\t\t\t$resarr[$i-1]=0;\n\t\t\t}\t\t\n\t\t}\n\t\treturn $resarr;\t\t\n\t}", "title": "" }, { "docid": "758cd634b9724e855b5d60f7314cd4ad", "score": "0.41358694", "text": "private function getVtbRates($bankRateLink, $currencies)\r\n {\r\n\r\n try {\r\n $data = array();\r\n $content = $this->bankCurlInit($bankRateLink);\r\n\r\n $html = HtmlDomParser::str_get_html($content);\r\n $searchResults = $html->find('table.tbl-01', 0);\r\n\r\n $fstIndex = 3;\r\n $secIndex = 4;\r\n $buy = \"buy\";\r\n $sell = \"sell\";\r\n\r\n for ($i = 0 ; $i < 2 ;$i ++) {\r\n\r\n foreach ($searchResults->find('tr') as $element) {\r\n\r\n $currentCurrencyId = null;\r\n\r\n $col1 = trim(@$element->find('td')[1]->plaintext);\r\n $col1 = str_replace(\"/AMD\", \"\", strip_tags($col1));\r\n\r\n $col2 = trim(@$element->find('td')[$fstIndex]->plaintext);\r\n $col3 = trim(@$element->find('td')[$secIndex]->plaintext);\r\n\r\n if($col1 == \"GBP*\") {\r\n $col1 = \"GBP\";\r\n }\r\n\r\n foreach ($currencies as $curerncy) {\r\n if ($col1 == $curerncy->getCurrencySymbol()) {\r\n $currentCurrencyId = $curerncy->getCurrencyId();\r\n }\r\n }\r\n\r\n if ($currentCurrencyId !== null) {\r\n $data[$currentCurrencyId][$buy] = (float)floatval(str_replace(\",\", \".\", $col2));\r\n $data[$currentCurrencyId][$sell] = (float)floatval(str_replace(\",\", \".\", $col3));\r\n }\r\n }\r\n\r\n $fstIndex = 5;\r\n $secIndex = 6;\r\n $buy = \"buyNonCash\";\r\n $sell = \"sellNonCash\";\r\n }\r\n\r\n return $data;\r\n }catch (\\Exception $e) {\r\n $data = [];\r\n return $data;\r\n }\r\n }", "title": "" }, { "docid": "68ce8642c38cde4d351de3a7ebb3fdfb", "score": "0.413521", "text": "public function getBranchesDailySales($year,$month,$day)\n\t{\n\t\t\n\t\t//echo 'paso 0';\n\t\ttry{\n\t\t\n\t\t\t$token=getBearerToken();\n\t\t\t$api= new JWTPropio;\n\t\t\t$payload= $api->decode($token,'test123',['HS256']);\n\t\t\t\t\n\t\t}\n\t\tcatch(Exception $err)\n\t\t{\n\t\t\treturn '{\"error\":{\"message\":\"'.$err->getMessage().'\"}}';\t\n\t\t}\n\t\t\n\t\t//\t\techo 'paso 1';\n\n\n\t\t$sumaTotal=0.00;\n\t\t\n\t\t$mysqli = new mysqli($this->servername, $this->usernameServer, $this->password, \"parrotweb\");\n\t\t$mysqli->query(\"SET NAMES 'utf8'\");\n\n\t\t\n\t\t$query=\"select DATE_FORMAT( createTime, '%Y-%m-%d %H:%i:%s') as fecha from bills where restId=37 order by id asc limit 1\";\n\t\t\t\t//echo $query;\n\t\t\t\t\t\t\n\t\t\t\t$result = $mysqli->query($query);\n\t\t\t\tif($row = $result->fetch_array(MYSQLI_ASSOC)) \n\t\t\t\t{\n\t\t\t\t\t$fechaInicial=$row[\"fecha\"];\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t//echo 'fechaInicial:'.$fechaInicial;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t$query=\"select datediff(NOW(), '\".$fechaInicial.\"') as dias\";\n\t\t\t\t\t\t\n\t\t\t\t$result = $mysqli->query($query);\n\t\t\t\tif($row = $result->fetch_array(MYSQLI_ASSOC)) \n\t\t\t\t{\n\t\t\t\t\t$diasAtras=$row[\"dias\"];\n\t\t\t\t}\n\n\t\t\t\t//echo 'Dias Atras: '.$diasAtras;\n\n\t\t\t\t//echo 'DIARIO';\n\t\t\t\t\t\t\n\t\t\t\t//$query=\"select date_format(createTime,'%M') as mes,date_format(createTime,'%Y') as ano,date_format(createTime,'%d') as dia,\";\n\t\t\t\t$query=\"select b.restId,cli.nombre,cli.sucursal,date_format(createTime,'%Y-%m-%dT%H:%i:%sZ') as created_at,\";\n\t\t\t\t$query=$query.\" sum(total) as 'amount'\";\n\t\t\t\t$query=$query.\" from bills b, s3menudt.clientes cli\"; \n\t\t\t\t$query=$query.\" where b.restId=cli.restaurant_id and b.restId in(37,143,241)\";\n\t\t\t\t\n\t\t\t\tif($year!='' && $month!='' && $day!='')\n\t\t\t\t\t$query=$query.\" and year(createTime)=\".$year.\" and month(createTime)=\".$month.\" and day(createTime)=\".$day;\n\t\t\t\t$query=$query.\" group by b.restId, year(createTime), month(createTime),day(createTime),hour(createTime)\"; \n\t\t\t\t$query=$query.\" order by year(createTime) desc, month(createTime) desc,day(createTime) desc,hour(createTime) limit 50\";\n\t\t\t\t\n\t\t\t\t//echo $query;\n\t\t\t\t\n\t\t\t\t$result = $mysqli->query($query);\n\n\n\t\t\t\t$sumaTotal=0.00;\n\t\t\t\t$arrDatos= array();\n\t\t\t\twhile ($row = $result->fetch_array(MYSQLI_ASSOC)) \n\t\t\t\t{\n\t\t\t\t\t$sumaTotal=$sumaTotal + $row[\"amount\"];\n\t\t\t\t\t$arrDatos[]=$row;\n\t\t\t\t}\n\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t$message='{\"sales\":[';\n\t\t\t\tforeach($arrDatos as $row)\n\t\t\t\t{\n\t\t\t\t\t$message=$message.'{\"restId\":'.$row[\"restId\"].',\"restName\":\"'.$row[\"nombre\"].' '.$row[\"sucursal\"].'\",\"created_at\":\"'.$row[\"created_at\"].'\",\"amount\":'.$row[\"amount\"].'},';\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t$message=substr($message,0,strlen($message)-1);\t\t\n\t\t\t\t$message=$message.'],';\n\t\t\t\t$message=$message.'\"meta\":{\"total_sales\":'.$sumaTotal.'}}';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn $message;\n\n\t\t\n\t}", "title": "" }, { "docid": "ecd823f74453a74d8759932736923691", "score": "0.4130443", "text": "function yearExpenseTotal($sMonth, $sYear)\r\n\r\n{\r\ninclude 'config.php';\r\ninclude 'opendb.php';\r\n$sqlYearMonthTotal = \"SELECT * FROM `bbudget_ex` WHERE `date` LIKE '$sMonth-%-$sYear'\";\r\n\r\n$prevYearMonthlyTotal = mysql_query($sqlYearMonthTotal);\r\n\r\nwhile ($rowMonthly = mysql_fetch_array($prevYearMonthlyTotal)) \r\n{\r\n\r\n$yearTotalExpense = $yearTotalExpense + $rowMonthly[5];\r\n\r\n} \r\n\r\nmysql_close($conn);\r\n\r\n\r\n\r\nreturn $yearTotalExpense;\r\n\r\n\r\n}", "title": "" }, { "docid": "75762ac7935a8dc836ae347380bfc17b", "score": "0.41303954", "text": "public static function listar($filters){\n if(!array_key_exists('ano',$filters)) $filters['ano'] = Date('Y');\n $intervalo = [\n 'inicio' => $filters['ano'] . '-01-01',\n 'fim' => $filters['ano'] . '-12-31'\n ];\n $defesas = Posgraduacao::listarDefesas($intervalo);\n\n # 2. Filter by codcur\n $defesas = collect($defesas);\n if(array_key_exists('codcur',$filters) && !empty($filters['codcur'])) {\n $defesas = $defesas->where('codcur',$filters['codcur'])->all();\n }\n\n # 3. Dados que serão de fato retornados\n $aux = [];\n foreach ($defesas as $defesa) {\n $data = Carbon::createFromFormat('Y-m-d H:i:s', $defesa['dtadfapgm'])->format('d/m/Y');\n $aux[] = [\n 'discente_id' => Generic::crazyHash($defesa['codpes']),\n 'defesa_id' => md5($defesa['codpes'] + $defesa['codare'] + $defesa['codcur'] + str_replace('/','',$data)),\n 'nome' => $defesa['nompes'],\n 'nivel' => $defesa['nivpgm'],\n 'codare' => $defesa['codare'],\n 'codcur' => $defesa['codcur'],\n 'nomcur' => $defesa['nomcur'],\n 'nomare' => $defesa['nomare'],\n 'titulo_html' => html_entity_decode($defesa['tittrb'], ENT_QUOTES, 'UTF-8'),\n 'titulo' => strip_tags(html_entity_decode($defesa['tittrb'], ENT_QUOTES, 'UTF-8')),\n 'data' => $data\n ];\n }\n $defesas = $aux;\n\n # Convertendo tudo para collection\n $defesas = collect($defesas)->map(function ($item) {\n return (object) $item;\n });\n\n return collect($defesas)->paginate(10);\n }", "title": "" }, { "docid": "f60798b3141b735df2c5291aa6b69fe1", "score": "0.41236073", "text": "public function calculateAnnualUsage($year = null) {\r\n\t\t//\tsetting default year\r\n\t\tif ($year === null) {\r\n\t\t\t$year = date('Y');\r\n\t\t}\r\n\r\n\t\t$query = \"SELECT sum( m.voc ) total_usage \" .\r\n\t\t\t\"FROM \".TB_DEPARTMENT.\" d, \".TB_USAGE.\" m \" .\r\n\t\t\t\"WHERE m.department_id = d.department_id \" .\r\n\t\t\t\"AND d.facility_id = \".$this->facilityID.\" \" .\r\n\t\t\t\"AND YEAR(m.creation_time) = \".$year.\" \";\r\n\r\n\t\t$this->db->query($query);\r\n\r\n\t\t$this->annualUsage[$year] = $this->db->fetch(0);\r\n\r\n\t\treturn $this->annualUsage[$year];\r\n\t}", "title": "" }, { "docid": "b359b402b6eea707dce3361df4579cd1", "score": "0.41168463", "text": "function list_purchase_invoice_before_last_cost($item_code='', $uom_code='', $date=''){\n\t\t$dbpdo = DB::create();\n\t\t\n\t\t$where = \"\";\n\t\t\n\t\tif ( $date != \"\") {\n\t\t\t\n\t\t\t$date = date(\"Y-m-d\", strtotime($date));\n\t\t\t\n\t\t\tif ($where == \"\") {\n\t\t\t\t$where = \" where b.date < '$date' \";\n\t\t\t} else {\n\t\t\t\t$where = $where . \" and b.date < '$date' \";\n\t\t\t}\t\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\tif ( $item_code != \"\") {\n\t\t\tif ($where == \"\") {\n\t\t\t\t$where = \" where a.item_code = '$item_code' \";\n\t\t\t} else {\n\t\t\t\t$where = $where . \" and a.item_code = '$item_code' \";\n\t\t\t}\t\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\tif ( $uom_code != \"\") {\n\t\t\tif ($where == \"\") {\n\t\t\t\t$where = \" where a.uom_code = '$uom_code' \";\n\t\t\t} else {\n\t\t\t\t$where = $where . \" and a.uom_code = '$uom_code' \";\n\t\t\t}\t\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t$sqlstr=\"select a.ref, b.date, a.item_code, a.uom_code, a.qty, (ifnull(a.unit_cost,0)-ifnull(a.discount,0)) + (ifnull(b.tax_rate,0) * ifnull(a.unit_cost,0))/100 unit_cost, a.amount, a.line_item_po, a.line, b.dlu from purchase_invoice_detail a left join purchase_invoice b on a.ref=b.ref \" . $where . \" order by b.dlu desc, a.line desc limit 1 \";\n\t\t$sql=$dbpdo->prepare($sqlstr);\n\t\t$sql->execute();\t\t\t\n\t\t$data = $sql->fetch(PDO::FETCH_OBJ);\n\t\t$current_cost = $data->unit_cost;\n\t\t\n\t\tif($current_cost == 0) {\n\t\t\t$where = \"\";\n\t\t\t\n\t\t\tif ( $date != \"\") {\n\t\t\t\n\t\t\t\t$date = date(\"Y-m-d\", strtotime($date));\n\t\t\t\t\n\t\t\t\tif ($where == \"\") {\n\t\t\t\t\t$where = \" where a.date < '$date' \";\n\t\t\t\t} else {\n\t\t\t\t\t$where = $where . \" and a.date < '$date' \";\n\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif ( $item_code != \"\") {\n\t\t\t\tif ($where == \"\") {\n\t\t\t\t\t$where = \" where a.item_code = '$item_code' \";\n\t\t\t\t} else {\n\t\t\t\t\t$where = $where . \" and a.item_code = '$item_code' \";\n\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif ( $uom_code != \"\") {\n\t\t\t\tif ($where == \"\") {\n\t\t\t\t\t$where = \" where a.uom_code = '$uom_code' \";\n\t\t\t\t} else {\n\t\t\t\t\t$where = $where . \" and a.uom_code = '$uom_code' \";\n\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$sqlstr = \"select ifnull(a.current_cost,0) current_cost from set_item_cost a \" . $where . \" order by a.date_of_record desc limit 1\";\n\t\t\t$sql=$dbpdo->prepare($sqlstr);\n\t\t\t$sql->execute();\n\t\t\t$data = $sql->fetch(PDO::FETCH_OBJ);\n\t\t\t$current_cost = $data->current_cost;\n\t\t}\n\t\t\n\t\t\n\t\treturn $current_cost;\n\t}", "title": "" }, { "docid": "3cd02b4c191f636cd19b65e6e061c7f3", "score": "0.4114802", "text": "public function getTotalCost($units);", "title": "" }, { "docid": "eec68552526e96d4d6541bb5a6f3ae28", "score": "0.4097103", "text": "function get_sales_year_analytics(){\n\t\t$sql = \"SELECT YEAR(date_of_payment) as year,SUM(txn_amt) as total FROM agency_mentor_sales GROUP BY YEAR(date_of_payment)\";\n\t\t$query = mysql_query ($sql);\n\t\t$result = array();\n\t\twhile ($row = @mysql_fetch_assoc ($query)) {\n\t\t\t$result[] = $row;\n\t\t\t// echo '<td colspan=\"4\">message removed</td>';\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "d0818864643ea59d403b77d0f85d7362", "score": "0.40908846", "text": "public function getBranchesMonthlySales($year,$month)\n\t{\n\t\t\n\t\t//echo 'paso 0';\n\t\t\n\t\ttry{\n\t\t\n\t\t\t$token=getBearerToken();\n\t\t\t$api= new JWTPropio;\n\t\t\t$payload= $api->decode($token,'test123',['HS256']);\n\t\t\t\t\n\t\t}\n\t\tcatch(Exception $err)\n\t\t{\n\t\t\treturn '{\"error\":{\"message\":\"'.$err->getMessage().'\"}}';\t\n\t\t}\n\t\t\n\t\t//\t\techo 'paso 1';\n\n\n\t\t$sumaTotal=0.00;\n\t\t\n\t\t$mysqli = new mysqli($this->servername, $this->usernameServer, $this->password, \"parrotweb\");\n\t\t$mysqli->query(\"SET NAMES 'utf8'\");\n\n\t\t\n\t\t$query=\"select b.restId,cli.nombre,cli.sucursal,date_format(createTime,'%Y-%m-%dT%H:%i:%sZ') as created_at,\"; \n\t\t\t\t$query=$query.\" sum(total) as 'amount'\";\n\t\t\t\t$query=$query.\" from bills b, s3menudt.clientes cli\"; \n\t\t\t\t$query=$query.\" where b.restId=cli.restaurant_id and b.restId in(37,143,241)\";\n\t\t\t\tif($year!='' && $month!='')\n\t\t\t\t\t$query=$query.\" and year(createTime)=\".$year.\" and month(createTime)=\".$month;\n\t\t\t\t\t\t\n\t\t\t\t$query=$query.\" group by b.restId,year(createTime), month(createTime),day(createTime) \"; \n\t\t\t\t$query=$query.\"order by year(createTime) desc, month(createTime),day(createTime) desc limit 50 \";\n\t\t\t\t\t\t\n\t\t\t\t//echo $query .'<br>';\n\t\t\t\t$result = $mysqli->query($query);\n\n\n\t\t\t\t$sumaTotal=0.00;\n\t\t\t\t$arrDatos= array();\n\t\t\t\twhile ($row = $result->fetch_array(MYSQLI_ASSOC)) \n\t\t\t\t{\n\t\t\t\t\t$sumaTotal=$sumaTotal + $row[\"amount\"];\n\t\t\t\t\t$arrDatos[]=$row;\n\n\t\t\t\t}\n\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t$arrDatosEnviar= array();\n\t\t\t\t$arrDatosEnviar=[\"sales\"=>$arrDatos,\"meta\"=>\"$sumaTotal\"];\n\t\t\t\t$message=json_encode($arrDatosEnviar);\n\t\t\t\techo $message;\n*/\n\t\t\t\t$message='{\"sales\":[';\n\t\t\t\tforeach($arrDatos as $row)\n\t\t\t\t{\n\t\t\t\t\t$message=$message.'{\"restId\":'.$row[\"restId\"].',\"restName\":\"'.$row[\"nombre\"].' '.$row[\"sucursal\"].'\"created_at\":\"'.$row[\"created_at\"].'\",\"amount\":'.$row[\"amount\"].'},';\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t$message=substr($message,0,strlen($message)-1);\n\t\t\t\t\t\t\n\t\t\t\t$message=$message.'],';\n\t\t\t\t$message=$message.'\"meta\":{\"total_sales\":'.$sumaTotal.'}}';\n\t\t\t\treturn $message;\n\t\t\n\t}", "title": "" }, { "docid": "93a514c510b51210c9744585e725ef65", "score": "0.4079574", "text": "private function getAraratRates($bankRateLink, $currencies)\r\n {\r\n\r\n try {\r\n\r\n\r\n $data = array();\r\n\r\n $htmlString = file_get_contents($bankRateLink, false, stream_context_create(array(\r\n \"ssl\" => array(\r\n \"verify_peer\" => false,\r\n \"verify_peer_name\" => false,\r\n )\r\n )));\r\n\r\n\r\n $html = HtmlDomParser::str_get_html($htmlString);\r\n\r\n $currencyMapping = array('USD', 'EUR', 'RUB', 'GBP', 'CHF', 'GEL', 'CAD', 'AUD');\r\n $cc = 0;\r\n $rc = 0;\r\n\r\n $searchResults = $html->find('table.exchange__table');\r\n $indexx = 0;\r\n\r\n foreach ($searchResults as $table) {\r\n\r\n if($indexx == 2)break;\r\n\r\n foreach ($table->find('tr') as $element) {\r\n\r\n $currentCurrencyId = null;\r\n\r\n if ($rc !== 0) {\r\n\r\n $col1 = trim(strip_tags($element->find('td')[0]->plaintext));\r\n $col2 = trim(strip_tags($element->find('td')[1]->plaintext));\r\n\r\n $col1 = explode(' ',$col1);\r\n $col1 = $col1[count($col1)-1];\r\n\r\n\r\n foreach ($currencies as $curerncy) {\r\n if ($currencyMapping[$cc] == $curerncy->getCurrencySymbol()) {\r\n $currentCurrencyId = $curerncy->getCurrencyId();\r\n }\r\n }\r\n\r\n\r\n if($indexx == 0) {\r\n $data[$currentCurrencyId]['buyNonCash'] = (float)floatval(str_replace(\",\", \".\", $col1));\r\n $data[$currentCurrencyId]['sellNonCash'] = (float)floatval(str_replace(\",\", \".\", $col2));\r\n }\r\n\r\n if($indexx == 1) {\r\n $data[$currentCurrencyId]['buy'] = (float)floatval(str_replace(\",\", \".\", $col1));\r\n $data[$currentCurrencyId]['sell'] = (float)floatval(str_replace(\",\", \".\", $col2));\r\n }\r\n\r\n $cc++;\r\n\r\n }\r\n\r\n $rc++;\r\n }\r\n\r\n $indexx++;\r\n $rc = 0;\r\n $cc = 0;\r\n }\r\n\r\n\r\n return $data;\r\n }catch (\\Exception $e) {\r\n $data = [];\r\n return $data;\r\n }\r\n }", "title": "" }, { "docid": "b4ada86b7adabdb2e6df34addc5f1f24", "score": "0.40784723", "text": "function sortByPrice($x, $y)\r\n{\r\n return $y['metal_price'] - $x['metal_price'];\r\n}", "title": "" }, { "docid": "7214b36bbad360afc685068c132c1452", "score": "0.40776044", "text": "public function all($year): Collection\n {\n $new_year_day = $this->newYearDay($year);\n $christmas_day = $this->christmasDay($year);\n $sovereignity_day = $this->sovereigntyDay($year);\n $easter_holiday = $this->orthodoxEaster($year);\n $labor_day = $this->laborDay($year);\n $armistice_day = $this->armisticeDay($year);\n\n return $new_year_day->concat($christmas_day)->concat($sovereignity_day)\n ->concat($easter_holiday)->concat($labor_day)->concat($armistice_day);\n }", "title": "" }, { "docid": "4ebe5d3cd6298f48b901e588facfceea", "score": "0.40766206", "text": "function getYearlyPledgeTypeSumList() {\r\n\t\t$sql = \"select\r\n\t\t\tyear(pa.payment_date) year, sum(pa.amount) amount,\r\n\t\t\tsum(case when e.pledge_type_id is null then pa.amount else 0 end) no,\r\n\t\t\tsum(case when e.pledge_type_id = '1' then pa.amount else 0 end) operation,\r\n\t\t\tsum(case when e.pledge_type_id = '2' then pa.amount else 0 end) newmasjid,\r\n\t\t\tsum(case when e.pledge_type_id = '3' then pa.amount else 0 end) zakath,\r\n\t\t\tsum(case when e.pledge_type_id = '4' then pa.amount else 0 end) transportation,\r\n\t\t\tsum(case when e.pledge_type_id = '5' then pa.amount else 0 end) funeral,\r\n\t\t\tsum(case when e.pledge_type_id = '6' then pa.amount else 0 end) school\r\n\t\tfrom\r\n\t\t\tpayment pa\r\n\t\t\tleft join pledge pl on pl.id = pa.pledge_id\r\n\t\t\tleft join event e on e.id = pl.event_id\r\n\t\t\tleft join pledge_type pt on pt.id = e.pledge_type_id\r\n\t\tgroup by\r\n\t\t\tyear(pa.payment_date) desc\";\r\n\t\t//echo $sql;\r\n\t\t$stmt = $this->conn->prepare($sql);\r\n\t\t$this->db->checkError();\r\n\t\t$stmt->execute();\r\n\t\t$this->db->checkError();\r\n\r\n\t\t$reports = array();\r\n\t\t$stmt->bind_result($year, $amount, $no, $operation, $newmasjid, $zakath,\r\n\t\t\t$transportation, $funeral, $school);\r\n\t\twhile ($stmt->fetch()) {\r\n\t\t\t$reports[] = array('year' => $year, 'amount' => $amount,\r\n\t\t\t\t\t'no' => $no, 'operation' => $operation, 'newmasjid' => $newmasjid,\r\n\t\t\t\t\t'zakath' => $zakath, 'transportation' => $transportation,\r\n\t\t\t\t\t'funeral' => $funeral, 'school' => $school);\r\n\t\t}\r\n\t\t$stmt->close();\r\n\r\n\t\treturn $reports;\r\n }", "title": "" }, { "docid": "f6576778f9f6e3ad7a63f90b15baf3db", "score": "0.40765643", "text": "private function getArtsakhRates($bankRateLink, $currencies)\r\n {\r\n\r\n try {\r\n $data = array();\r\n $content = $this->bankCurlInit($bankRateLink);\r\n\r\n $html = HtmlDomParser::str_get_html($content);\r\n $selectorName = \"table#cash_rate tr\";\r\n $buy = \"buy\";\r\n $sell = \"sell\";\r\n\r\n for($i = 0 ; $i < 2; $i ++){\r\n\r\n foreach ($html->find($selectorName) as $element) {\r\n\r\n $currentCurrencyId = null;\r\n\r\n $col1 = trim(@$element->find('td')[0]->plaintext);\r\n $col2 = trim(@$element->find('td')[1]->plaintext);\r\n $col3 = trim(@$element->find('td')[2]->plaintext);\r\n\r\n foreach ($currencies as $curerncy) {\r\n if ($col1 == $curerncy->getCurrencySymbol()) {\r\n $currentCurrencyId = $curerncy->getCurrencyId();\r\n }\r\n }\r\n\r\n if ($currentCurrencyId !== null) {\r\n $data[$currentCurrencyId][$buy] = (float)floatval(str_replace(\",\", \".\", $col2));\r\n $data[$currentCurrencyId][$sell] = (float)floatval(str_replace(\",\", \".\", $col3));\r\n }\r\n\r\n }\r\n\r\n $buy = \"buyNonCash\";\r\n $sell = \"sellNonCash\";\r\n $selectorName = \"table#clearing_rate tr\";\r\n }\r\n\r\n return $data;\r\n }catch (\\Exception $e) {\r\n $data = [];\r\n return $data;\r\n }\r\n\r\n }", "title": "" }, { "docid": "210acebaa04e4ea37e81511896dc5aa8", "score": "0.40734956", "text": "function getFinancialYearsByPluck()\n {\n return $this::orderby('year', 'asc')\n ->pluck('year', 'id');\n }", "title": "" }, { "docid": "37999b034f78d6a00880102d21c4a7ab", "score": "0.40691242", "text": "function getPaymentMethodSum($year) {\r\n\t\t$sql = 'select\r\n\t\t\t\t\tpm.payment_method, sum(p.amount) amount\r\n\t\t\t\tfrom\r\n\t\t\t\t\tpayment p\r\n\t\t\t\t\tinner join donator d on d.id = p.donator_id\r\n\t\t\t\t\tinner join payment_method pm on pm.id = p.payment_method_id\r\n\t\t\t\twhere\r\n\t\t\t\t\tyear(p.payment_date) = ?\r\n\t\t\t\tgroup by\r\n\t\t\t\t\t pm.id';\r\n\t\t$stmt = $this->conn->prepare($sql);\r\n\t\t$this->db->checkError();\r\n\t\t$stmt->bind_param('i',$year);\r\n\t\t$this->db->checkError();\r\n\t\t$stmt->execute();\r\n\t\t$this->db->checkError();\r\n\r\n\t\t$reports = array();\r\n\t\t$stmt->bind_result($payment_method, $amount);\r\n\t\twhile ($stmt->fetch()) {\r\n\t\t\t$reports[] = array('payment_method' => $payment_method,\r\n\t\t\t\t\t'amount' => $amount);\r\n\t\t}\r\n\t\t$stmt->close();\r\n\r\n\t\treturn $reports;\r\n }", "title": "" }, { "docid": "e71d7dba98d05e042835ea7771631c61", "score": "0.4065022", "text": "public function getTiers();", "title": "" }, { "docid": "3595f1828f82e5f559378732a4d0d5e4", "score": "0.405646", "text": "public function pull($day, $month, $year)\n {\n// echo \"<br /> month = $month\";\n// echo \"<br /> day = $day\";\n \n $url = \"http://www.nse-india.com/content/historical/EQUITIES/$year/$month/cm$day$month${year}bhav.csv.zip\";\n \n// echo \"<br /> URL = $url\";\n // Get cURL resource\n \n if (! $this->url_exists($url)) {\n echo \"<br /> The file cm$day$month${year}bhav.csv.zip does not exist on the server yet! \";\n exit();\n }\n \n $curl = curl_init();\n $tempFile = \"/tmp/cm$day$month${year}bhav.csv.zip\";\n $fp = fopen($tempFile, \"w\");\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_FILE, $fp);\n curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');\n \n curl_exec($curl);\n curl_close($curl);\n \n \n $filter = new Decompress(array(\n 'adapter' => 'Zip',\n 'options' => array(\n 'target' => '/tmp/',\n )\n ));\n $decompressed = $filter->filter($tempFile);\n // Returns true on success and decompresses the archive file\n // into the given target directory\n if ($decompressed) {\n// echo '<br /> Extraction Completed!';\n } else {\n echo '<br /> EXTRACTION FAILED';\n }\n }", "title": "" }, { "docid": "21b66784a2a4d433b553f665c6eff358", "score": "0.4054969", "text": "function fetchData ($year, $mon, $day)\n{\n global $DOMAINS ;\n global $POLLUTANTS ;\n\n $data = [] ;\n\n foreach ($DOMAINS as $dom)\n {\n foreach ($POLLUTANTS as $pol)\n {\n foreach (fetchSheet ($year, $mon, $day, $dom, $pol)\n as $station => $conc)\n {\n $data [$dom.'.'.$station] [$pol] = $conc ;\n }\n }\n }\n\n return $data ;\n}", "title": "" }, { "docid": "6e28b9667db5093e95b361b42d2d2659", "score": "0.40521002", "text": "public function getAvailableCurrenciesRate(): object\n {\n return DB::table('currencies')\n ->latest('created_at')\n ->paginate(10);\n }", "title": "" }, { "docid": "fee7f22b20b922f8dfe9f270c887deb5", "score": "0.4048965", "text": "public static function getSumAllCarteiges(){ //получаем сумму всех картриджей(доставленных и замененных) по запросу ниже\n \n /*SELECT c.name as Имя, sum(aC.value) as Сумма FROM actionsCartriges aC\n INNER JOIN cartriges c ON aC.id_cartriges = c.id\n GROUP BY c.name;*/\n \n $sql = \"SELECT c.name as name, sum(aC.value) as value FROM actionsCartriges aC\n INNER JOIN cartriges c ON aC.id_cartriges = c.id\n GROUP BY c.name;\";\n \n return arr();\n }", "title": "" }, { "docid": "9d3508cd1fd6573c9787d2140b4d61d0", "score": "0.40484253", "text": "private function calculateRates() {}", "title": "" }, { "docid": "03a4a877b66735c86f0e13a6c5218f07", "score": "0.40463868", "text": "public function getTitulos(){\n $client = new Client([\n 'verify' => false\n ]);\n $r = $client->request('GET', self::URL);\n \n\n\n $jsonTitulos = \\GuzzleHttp\\json_decode($r->getBody()->getContents());\n\n $arrayTitulos = $jsonTitulos->response->TrsrBdTradgList;\n\n\n\n\n $tickers = [];\n\n foreach($arrayTitulos as $tituloTD){\n $titulo = new Titulo();\n $titulo->setTitulo($tituloTD->TrsrBd->nm);\n $titulo->setVencimento(new \\DateTime($tituloTD->TrsrBd->mtrtyDt));\n $titulo->setPrecoCompra($tituloTD->TrsrBd->untrInvstmtVal);\n $titulo->setPrecoVenda($tituloTD->TrsrBd->untrRedVal);\n $titulo->setRentabilidade($tituloTD->TrsrBd->anulInvstmtRate);\n $titulo->setRentabilidadeResgate($tituloTD->TrsrBd->anulRedRate);\n\n $tickers[$tituloTD->TrsrBd->nm] = $titulo;\n\n }\n\n return $tickers;\n\n }", "title": "" }, { "docid": "e50ddb153010a77815a05091c2a3b3d3", "score": "0.40441203", "text": "function monthlySales($year){\n global $db;\n $sql = \"SELECT s.qty,\";\n $sql .= \" DATE_FORMAT(s.date, '%Y-%m-%e') AS date,p.name,\";\n $sql .= \"SUM(p.sale_price * s.qty) AS total_saleing_price\";\n $sql .= \" FROM sales s\";\n $sql .= \" LEFT JOIN products p ON s.product_id = p.id\";\n $sql .= \" WHERE DATE_FORMAT(s.date, '%Y' ) = '{$year}'\";\n $sql .= \" GROUP BY DATE_FORMAT( s.date, '%c' ),s.product_id\";\n $sql .= \" ORDER BY date_format(s.date, '%c' ) ASC\";\n return find_by_sql($sql);\n}", "title": "" }, { "docid": "bea7600414b6c203ef185289b85e81c3", "score": "0.40432128", "text": "public static function fullYearReview($body){\n if ($body['year'] == \"\" || $body['year'] == null ) {\n $year = '2020';\n } else {\n $year = $body['year'];\n } \n global $database;\n $statement = $database->prepare(\"SELECT budget_months.month, budget_months.year, budget_months.category, ROUND(budget_months.c_money, 2) as c_money, ROUND(trans_sql.MONEY,2) AS MONEY, ROUND((budget_months.c_money - trans_sql.MONEY),2) as money_difference, CASE WHEN (budget_months.c_money - trans_sql.MONEY) < 0 THEN 'TRUE' ELSE 'FALSE' END AS NEGATIVE from (SELECT SUM(money) AS 'MONEY', YEAR(date) AS 'YEAR', category AS 'CAT', MONTH(date) AS 'MONTH' from trans where YEAR(date) = $year group by category, MONTH(date)) as trans_sql inner join budget_months on trans_sql.MONTH = budget_months.month_id and trans_sql.CAT = budget_months.category where budget_months.year = $year order by year,month_id, category\");\n $statement->execute();\n if ($statement->rowCount() <= 0) {\n return;\n }\n\n $data = $statement->fetchAll(\\PDO::FETCH_ASSOC);\n return $data;\n }", "title": "" }, { "docid": "94dd3c84bde9ab543e4f92d54a7ac446", "score": "0.40390828", "text": "private function getHsbcRates($bankRateLink, $currencies)\r\n {\r\n\r\n try {\r\n $data = array();\r\n $html1 = file_get_contents($bankRateLink);\r\n $html = HtmlDomParser::str_get_html($html1);\r\n $dataTable = $html->find('table.rb tr');\r\n\r\n $currencyMapping = array('USD', 'RUB', 'EUR', 'GBP');\r\n\r\n foreach ($dataTable as $element) {\r\n $col2 = trim(@$element->find('td')[1]->plaintext);\r\n\r\n if ($col2 == \"HSBC Bank Armenia\") {\r\n $col6 = trim(@$element->find('td')[5]->plaintext);\r\n $col7 = trim(@$element->find('td')[6]->plaintext);\r\n $col8 = trim(@$element->find('td')[7]->plaintext);\r\n $col9 = trim(@$element->find('td')[8]->plaintext);\r\n $col10 = trim(@$element->find('td')[9]->plaintext);\r\n $col11 = trim(@$element->find('td')[10]->plaintext);\r\n $col12 = trim(@$element->find('td')[11]->plaintext);\r\n $col13 = trim(@$element->find('td')[12]->plaintext);\r\n $hsbcCurrency = $col6 . \"/\" . $col7 . \"/\" . $col8 . \"/\" . $col9 . \"/\" . $col10 . \"/\" . $col11 . \"/\" . $col12 . \"/\" . $col13;\r\n $arrayOfCurrency = explode('/', $hsbcCurrency);\r\n $currentCurrencyId = array();\r\n $index = 0;\r\n foreach ($currencies as $curerncy) {\r\n foreach ($currencyMapping as $currentCurrency) {\r\n if ($currentCurrency == $curerncy->getCurrencySymbol()) {\r\n array_push($currentCurrencyId, $curerncy->getCurrencyId());\r\n }\r\n }\r\n }\r\n for ($i = 0; $i < count($currentCurrencyId); $i++) {\r\n $data[$currentCurrencyId[$i]]['buy'] = (float)floatval(str_replace(\",\", \".\", $arrayOfCurrency[$index]));\r\n $data[$currentCurrencyId[$i]]['sell'] = (float)floatval(str_replace(\",\", \".\", $arrayOfCurrency[$index + 1]));\r\n $index += 2;\r\n }\r\n\r\n\r\n break;\r\n }\r\n }\r\n\r\n $bankRateLink = \"http://www.rate.am/en/armenian-dram-exchange-rates/banks/non-cash\";\r\n $html1 = file_get_contents($bankRateLink);\r\n $html = HtmlDomParser::str_get_html($html1);\r\n $dataTable = $html->find('table.rb tr');\r\n $currencyMapping = array('USD', 'RUB', 'EUR', 'GBP');\r\n\r\n foreach ($dataTable as $element) {\r\n $col2 = trim(@$element->find('td')[1]->plaintext);\r\n\r\n if ($col2 == \"HSBC Bank Armenia\") {\r\n $col6 = trim(@$element->find('td')[5]->plaintext);\r\n $col7 = trim(@$element->find('td')[6]->plaintext);\r\n $col8 = trim(@$element->find('td')[7]->plaintext);\r\n $col9 = trim(@$element->find('td')[8]->plaintext);\r\n $col10 = trim(@$element->find('td')[9]->plaintext);\r\n $col11 = trim(@$element->find('td')[10]->plaintext);\r\n $col12 = trim(@$element->find('td')[11]->plaintext);\r\n $col13 = trim(@$element->find('td')[12]->plaintext);\r\n\r\n\r\n $hsbcCurrency = $col6 . \"/\" . $col7 . \"/\" . $col8 . \"/\" . $col9 . \"/\" . $col10 . \"/\" . $col11 . \"/\" . $col12 . \"/\" . $col13;\r\n $arrayOfCurrency = explode('/', $hsbcCurrency);\r\n $currentCurrencyId = array();\r\n $index = 0;\r\n foreach ($currencies as $curerncy) {\r\n foreach ($currencyMapping as $currentCurrency) {\r\n if ($currentCurrency == $curerncy->getCurrencySymbol()) {\r\n array_push($currentCurrencyId, $curerncy->getCurrencyId());\r\n }\r\n }\r\n }\r\n for ($i = 0; $i < count($currentCurrencyId); $i++) {\r\n $data[$currentCurrencyId[$i]]['buyNonCash'] = (float)floatval(str_replace(\",\", \".\", $arrayOfCurrency[$index]));\r\n $data[$currentCurrencyId[$i]]['sellNonCash'] = (float)floatval(str_replace(\",\", \".\", $arrayOfCurrency[$index + 1]));\r\n $index += 2;\r\n }\r\n break;\r\n }\r\n }\r\n\r\n $buffer = $data[2];\r\n $data[2] = $data[10];\r\n $data[10] = $buffer;\r\n\r\n $buffer = $data[2];\r\n $data[2] = $data[51];\r\n $data[51] = $buffer;\r\n\r\n\r\n return $data;\r\n }catch (\\Exception $e) {\r\n $data = [];\r\n return $data;\r\n }\r\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "a93e0b2d903b4744ec46b15d48512473", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n //\n $nv = Nhanvien::find($id);\n $nv->nv_taiKhoan = $request->input('nv_taiKhoan');\n $nv->nv_matKhau = bcrypt('123456');\n $nv->nv_hoTen = $request->input('nv_hoTen');\n $nv->nv_gioiTinh = $request->input('nv_gioiTinh');\n $nv->nv_email = $request->input('nv_email');\n $nv->nv_ngaySinh = $request->input('nv_ngaySinh');\n $nv->nv_diaChi = $request->input('nv_diaChi');\n $nv->nv_dienThoai = $request->input('nv_dienThoai');\n $nv->nv_taoMoi = $request->input('nv_taoMoi');\n $nv->nv_capNhat = $request->input('nv_capNhat');\n $nv->nv_trangThai = $request->input('nv_trangThai');\n $nv->q_ma = $request->input('q_ma');\n\n $nv->save();\n\n Session::flash('alert-warning', 'Cập nhật thành công ^^~!!!');\n return redirect()->route('backend.nhanvien.index');\n }", "title": "" } ]
[ { "docid": "3e3a565a181db6f795f079d1dfb01f75", "score": "0.7099585", "text": "public function update(Resource $resource, $id)\n {\n //\n }", "title": "" }, { "docid": "fb65b4f4d55e024e7f1613af273a55f2", "score": "0.6775597", "text": "public function update(Request $request, Resource $resource)\n {\n //Validate request\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'url' => 'required|max:255',\n 'description' => 'required|max:10000',\n 'tags.*' => 'exists:tags,id',\n 'is_published' => 'required|boolean'\n ]);\n $resource_previous_unpublished = !$resource->is_published;\n //Create the resource\n $resource->update([\n 'name' => $request->name,\n 'url' => $request->url,\n 'description' => $request->description,\n 'is_published' => $request->is_published\n ]);\n //Drop the tags from the pivot table. Add the updated ones\n $resource->tags()->detach();\n //Add the tags for this resource to the pivot table\n $resource->tags()->attach($request->tags);\n $responseText = 'Resource updated';\n $responseText .= $resource_previous_unpublished && $request->is_published ? ' and published' : '';\n //Take them back to the resource form so they can add more resources\n return back()->with('success', $responseText);\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": "61a34fcd66242862e9a967402e4ff514", "score": "0.6267246", "text": "private function updateResource($resource, $inputs )\n {\n \n // if(isset($inputs['category_id'])){\n // $model->categories()->sync($inputs['category_id']);\n // } else {\n // $model->categories()->sync([]);\n // }\n return $resource->update($inputs);\n\n }", "title": "" }, { "docid": "a4a8c199770b8cc35d56a67cd9297225", "score": "0.62659985", "text": "public function update($storageName, $key, array $data);", "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": "4c22c400891589f8da5573f60cdc4ea0", "score": "0.61376035", "text": "public function update(Request $request, Resource $resource)\n {\n $validator = Validator::make($request->all(),[\n 'wbs' => 'required',\n 'tipo_recurso' => 'required',\n 'cantidad' => 'required',\n 'comentarios' => 'required',\n 'vision_estrategica' => 'required'\n\n ]);\n if ($validator->fails()) {\n return response()->json(['Error'],404);\n\n }else{\n $resource->wbs = $request->wbs;\n $resource->tipo_recurso = $request->tipo_recurso;\n $resource->cantidad = $request->cantidad;\n $resource->comentarios = $request->comentarios;\n $resource->vision_estrategica = $request->vision_estrategica;\n \n $resource->save();\n return response()->json($resource);\n }\n }", "title": "" }, { "docid": "cb421444658bf63523d9239cfdb2c091", "score": "0.6102644", "text": "public function update(StorageRequest $request, $id)\n {\n try {\n $this->service->updateStorage($request, $id);\n return $this->NoContent();\n } catch(EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "title": "" }, { "docid": "40c721acddd9f92cbdc47e322ae39955", "score": "0.60837495", "text": "public function update(Request $request, $id)\n {\n // dd($request->all());\n if($storage = Storage::find($id))\n {\n if( $storage->update( $request->all() ) )\n {\n if($request->storage_items)\n $storage->item()->sync($request->storage_items);\n else\n $storage->item()->sync([]);\n return redirect()->back();\n }\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "fae18446ab6ba766002815d7efd6d0f2", "score": "0.60153604", "text": "public function updateStream($resource)\n {\n return $this->filesystem->updateStream($this->path, $resource);\n }", "title": "" }, { "docid": "1342fca6bb741918e9de91960e422b72", "score": "0.59302443", "text": "public function dispatchOnPostUpdateResource($resource);", "title": "" }, { "docid": "4c33901004c334e4edd8b45955f45ed2", "score": "0.5906145", "text": "public function sliderUpdate(SliderUpdateRequest $request, $id)\n {\n\n $slider=Slider::find($id);\n /* dd($service); */\n $input= $request->all();\n\n if($request->hasFile('image')) {\n if($request->image==$slider->image){\n $input['image']=$slider->image;\n }else{\n $fileName=$request->file('image')->store('slider','public');\n\n $input['image'] =$fileName;\n \n @unlink('storage/'.$slider->image);\n }\n } else {\n\n $input['image']=$slider->image;\n\n }\n $slider->update([\n 'title'=>$request->title,\n 'image'=>$input['image'],\n ]);\n /* dd($service); */\n\n return new SliderResource($slider);\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "70f839d67344487e3780c8ca780ec59c", "score": "0.5876995", "text": "public function store(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "cc850ce20ed7c56b132541ba822c9777", "score": "0.5832923", "text": "public function update(Request $request, $id)\n {\n //\n $data = $request->all();\n $request->validate([\n 'title' => 'required|max:255',\n 'description' => 'required',\n 'resource' => 'file|mimes:pdf,doc,docx,xls,xlm,xla,xlc,xlt,xlw,ppt,pps,pot'\n ]);\n\n $eLibrary = ELibrary::findOrFail($id);\n\n /*Photo*/\n if($request->hasFile('resource') && $request->file('resource')->isValid()){\n $file = $request->file('resource');\n $filename = $data['title'] . '_' . time().'.'.$file->extension();\n $path = $file->storePubliclyAs('public/uploads/eLibrary',$filename);\n if($eLibrary->path) {\n if (Storage::exists($eLibrary->path)) Storage::delete($eLibrary->path);\n }\n $data['path'] = $path;\n }\n if($eLibrary->update($data)){\n Session::flash('alert-success',\"The E-Library resource '$eLibrary->title' has been updated\");\n }else{\n Session::flash('alert-danger',\"The E-Library resource '$eLibrary->title' could not be updated. Please contact support.\");\n }\n return redirect('admin/eLibrary');\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": "5a86878bd33a53b3ba502d5fdbe620c5", "score": "0.5785152", "text": "public function update(Request $request, $id)\n {\n $image= Image::find($id);\n\n $image->nom=$request->nom;\n $image->src=$request->file('src')->hashName();\n $image->tag_id=$request->tag_id;\n \n\n $image->save();\n\n Storage::disk('public')->delete('img/' . $image->src);\n\n $request->file('src')->storePublicly('img','public');\n\n return redirect()->back();\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": "13371e530c9d042503b3d48fe48307cc", "score": "0.57676524", "text": "private function update()\n {\n Cache::put(static::class . $this->uuid, $this->data(), 30);\n }", "title": "" }, { "docid": "ee990a961940ba1d9bcbdf2c6d36091f", "score": "0.57527846", "text": "function update_instance($resource) {\n $this->_postprocess($resource);\n return parent::update_instance($resource);\n }", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "1a87e148e066a4886de60512f8e08a52", "score": "0.57288736", "text": "public function update(ShareRequest $request, $id)\n {\n $share = Share::find($id);\n $share->share_name = $request->get('share_name');\n $share->share_price = $request->get('share_price');\n $share->share_qty = $request->get('share_qty');\n $share->save();\n if ($share->image) {\n unlink(public_path('storage/') . $share->image);\n }\n $this->storeImage($share);\n return redirect('/shares')->with('success', 'Stock has been updated');\n }", "title": "" }, { "docid": "b8fe0c7f15bb7a13ab10f71ffcd06156", "score": "0.5697465", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n \n $product->stocks = $request->stock;\n \n $product->save();\n \n return redirect()->route('inventory.index'); \n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e6fb42d6286b3f4fe6f14fab49db4173", "score": "0.56730545", "text": "public function update(Request $request, $id)\n {\n if($request->has('new_image')) {\n\n $product = Product::where('id',$id)->first(); \n\n $old_image = $product->image;\n unlink($old_image);\n\n\n $file = $request->file('new_image');\n $name = Str::random(10);\n $url = \\Storage::putFileAs('images',$file, $name . '.' .$file->extension());\n\n $data = array();\n $data['name'] = $request->name;\n $data['price'] = $request->price;\n $data['image'] = $url;\n\n $update = DB::table('products')->where('id',$id)->update($data);\n\n\n\n } else {\n $product = Product::find($id);\n $product->update($request->only('name','price'));\n }\n\n return redirect()->back()->with(\"status\",\"Successfully Updated\");\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": "97e4ce8ade6b1dc2b2b25f72334eb18d", "score": "0.5636433", "text": "public function dispatchOnPreUpdateResource($resource);", "title": "" }, { "docid": "318b6ff187eaf08454a3d0857e9aca4d", "score": "0.56295455", "text": "public function updateStream($path, $resource, array $config)\r\n\t{\r\n\t\t$res = $this->cloudDrive->uploadStream($resource, $path, true);\r\n\r\n\t\treturn $res['success'];\r\n\t}", "title": "" }, { "docid": "8576d995f0ad5fb05e24f4249f91de06", "score": "0.56251395", "text": "public function update() {\n $this->save();\n }", "title": "" }, { "docid": "fef6f84766f65b55a5b2d09f06bbe894", "score": "0.56153053", "text": "public function update(model $acl_resource, array $info) {\n\n // Update record\n return parent::_update($acl_resource, $info);\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": "a67ff3295306d457a45d5bfd402b9bbf", "score": "0.55851954", "text": "public function update(Request $request, $id)\n {\n $result=Slider::find($id);\n\n $result->name=$request->name;\n $result->desc=$request->desc;\n $result->price=$request->price;\n\n if ($request->hasFile('img')) {\n $file=$request->img->store('upload', 'public');\n $result->img=$file;\n }else{\n $errors=\"File not set\";\n return redirect()->back()\n ->withInput($request->input())\n ->with(\"msgError\", $errors);\n }\n\n $result->save();\n\n if ($result) {\n return redirect('show/slider')->with('message', 'Product updated successfully!');\n }\n else{\n return redirect()->back()->withInput($request->input())\n ->with('msgError', 'Record do not update in database!');\n }\n\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "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": "b9d5c9b5a3c8b34eb93904bd4bc5dfc1", "score": "0.55740935", "text": "public function update($id, StoreSliderRequest $request)\n {\n $slider = Slider::find($id);\n $input = $request->all();\n $slider->fill($input);\n\n if(Input::file('image')){\n $file = Input::file('image');\n $filename = time().'-'.$file->getClientOriginalName();\n $directory = $slider->getPath();\n $file->move($directory, $filename);\n $slider->image = $directory.$filename;\n #ImageCompress::tinifyImage($slider->image);\n }\n\n $slider->save();\n\n return redirect()->route('admin.slider.index');\n }", "title": "" }, { "docid": "6ec0972709d8081c8584eadfdebd73e3", "score": "0.55724585", "text": "public function put($resource, array $args = [], array $options = []) {\n return $this->do('PUT', $resource, $args, $options);\n }", "title": "" }, { "docid": "720aa13d6dd5abab4700c72fc5726f2f", "score": "0.55704945", "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->product_price = $request->product_price;\n $product->condition = $request->condition;\n $product->brand_id = $request->brand_id;\n $product->state_id = $request->state_id;\n $product->area_id = $request->area_id;\n // $product->category_id = $request->category_id;\n $product->subcategory_id = $request->subcategory_id;\n\n if ($request->hasFile('product_image')) {\n\n $path = $request->product_image->store('public/uploads');\n\n $product->product_image = $request->product_image->hashNAme();\n\n }\n\n $product->save();\n\n Alert::success('Product succesfully updated!')->autoclose(4000);\n\n // flash('Product succesfully updated')->overlay();\n\n return redirect()->route('admin.products.index');\n\n\n\n }", "title": "" }, { "docid": "e186357e6cd112ce0670460eed4e4946", "score": "0.55632365", "text": "public function update(UploadImageRequest $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n if ($request->hasFile('image')) {\n $filename = $request->file('image')->getClientOriginalName();\n $type = $request->file('image')->getClientOriginalExtension();\n $url = 'products/images/' . $product->id . '/' . $filename;\n\n $image = Image::make($request->file('image'))->resize(150, 150)->encode($type);\n Storage::disk('s3')->put($url, (string)$image, 'public');\n\n $product->update([\n 'image' => $url,\n ]);\n }\n $product->update([\n 'name' => $request->name,\n 'cost' => $request->cost,\n 'category_id' => $request->category,\n 'description' => $request->description,\n 'quantity' => $request->quantity,\n ]);\n $product->save();\n return redirect()->route('admin.product-administration.show', $product->id);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "c6efa075535fbc725da4b180e4ec737b", "score": "0.55501103", "text": "public function update(Request $request, $id)\n {\n if ( Auth::user()->userrole != \"Admin\") {\n return abort(401, 'Access Denied');\n }\n\n $article = Product::where('id',$id)->first(); \n $article->name = request('name');\n $article->sub_title = request('sub_title');\n $article->title = request('title');\n $article->title1 = request('title1');\n $article->title2 = request('title2');\n $article->title3 = request('title3');\n $article->content1 = request('content1');\n $article->content2 = request('content2');\n $article->content3 = request('content3');\n $article->button_text = request('button_text');\n $article->button_link = request('button_link');\n $article->description = request('description');\n $article->slug = Str::slug(request('title'), '-'); \n $article->active = request('active');\n\n // Store uploaded file...\n if($request->hasFile('image')) { \n $file = $request->file('image'); \n $imageName = time().'-'.$file->getClientOriginalName();\n $request->image->storeAs('public/products', $imageName); \n $article->image = $imageName; \n }\n\n $article->save(); \n\n return redirect()->route('admin.product.index');\n }", "title": "" }, { "docid": "8333f02674e0537622e556ed30714d92", "score": "0.5541451", "text": "protected function put()\n {\n \\throw_if(!$this->request->isJson(), new RestfulException(RestfulErrorMessage::InvalidJsonHeader));\n if ($this->restfulRequest->resourceId) {\n $document = null;\n try {\n $document = $this->_get();\n } catch (\\Exception $e) {\n // ...\n }\n return \\response(\n $this->_repository->replace($document, $this->restfulRequest->resourceId, $this->request->json()->all())\n );\n }\n if ($this->payloadIsAttributeSet()) {\n return \\response(\n $this->_repository->batchReplace($this->getFindOption(), $this->request->json()->all())\n );\n }\n throw new RestfulException(RestfulErrorMessage::InvalidRequestPayload);\n }", "title": "" }, { "docid": "a4b00c57c46ebcebca149c23c5beb30a", "score": "0.55269605", "text": "public function update(Request $request, $id)\n {\n $item = Items::find($id);\n $item->fill($request->all());\n\n// if (Input::file()) {\n// $filename = $request->file('image')->store('public');\n// $path = substr($filename, 7);\n// $item->image = $path;\n// }\n\n $item->update();\n return redirect()->route('items.index');\n }", "title": "" }, { "docid": "2d0234add8ac70bdf3ff13a1dc54eddc", "score": "0.5521795", "text": "public function updateStockAction()\n {\n $this->checkAdmin();\n $inStockid = intval($this->route['id']);\n $quantity = intval($this->route['amount']);\n if ($quantity == 0)\n $this->model->deleteStockById($inStockid);\n else\n $this->model->updateStockById($inStockid, $quantity);\n }", "title": "" }, { "docid": "550e477a9a956b28304b535c2916ad5c", "score": "0.55201524", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n \"title\" => 'required',\n \"product_id\" => 'sometimes',\n \"button_text\" => 'sometimes',\n \"button_link\" => 'sometimes',\n \"priority\" => 'required',\n \"image\" => 'sometimes|file|image|max:3000',\n ]);\n $slider = Slider::find($id);\n $slider->title = $request->title;\n $slider->product_id = $request->product_id;\n $slider->button_text = $request->button_text;\n $slider->button_link = $request->button_link;\n $slider->priority = $request->priority;\n\n if (request()->hasFile('image')) {\n if (File::exists('storage/' . $slider->image)) {\n File::delete('storage/' . $slider->image);\n }\n\n $path = $request->file('image')->store('sliders', 'public');\n $slider->image = $path;\n }\n $slider->save();\n $sliders = Slider::all();\n session()->flash('flash_message_success', 'You have updated a slider successfully!');\n return redirect()->route('admin.sliders')\n ->with(compact('sliders'));\n\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": "a66a502d0331860b0492d8521d8dc6fc", "score": "0.551738", "text": "public function update(Request $request, $id)\n {\n $slider = Slider::find($id);\n $data = $request->all();\n if ($request->hasFile('imagen')) {\n $data['imagen'] = $request->file('imagen')->store('slides','public');\n\n $exists = Storage::disk('sliders')->exists($slider->solo_imagen);\n if($exists)\n Storage::delete(\"/public/$slider->imagen\");\n\n }\n $slider->fill($data);\n $slider->save();\n return redirect()->route('admin.slider.index');\n\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": "59cc7aa6a27c614e6dbea168303030cb", "score": "0.5510812", "text": "public function update(Request $request, Memory $memory)\n {\n //\n }", "title": "" }, { "docid": "963320c6c8e6f19972872f0c66fe30e0", "score": "0.5508141", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('public/products');\n Storage::delete($product->image);\n }\n $product->name = $request->name;\n $product->description = $request->description;\n $product->image = $image;\n $product->price = $request->price;\n $product->additional_info = $request->additional_info;\n $product->category_id = $request->category;\n $product->subcategory_id = $request->subcategory;\n\n $product->save();\n\n return redirect()->route('product.index')->with('message', 'Successfully updated the product');\n }", "title": "" }, { "docid": "60f3ddc323c30358e47d69e943e6dbaa", "score": "0.5501432", "text": "public function update(Request $request, $id)\n {\n\n extract($this->getResourceNames());\n\n $this->authorize('EDIT_' . $permissionKey);\n\n $item = $modelPath::findOrFail($id);\n\n $this->validateEditForm($request, $item);\n\n $item->update($request->all());\n\n $this->notify($resourceMultiple . '.edited');\n\n return redirect()->back();\n }", "title": "" }, { "docid": "f413999cfa6fd30cb481e60a58035e46", "score": "0.54997146", "text": "public function update(Request $request,$id)\n {\n $product=Product::find($id);\n $request->validate([\n \"name\"=>\"required\",\n \"category\"=>\"required\",\n \"description\"=>\"required\",\n \"price\"=>\"required|numeric\",\n \"stock\"=>\"required|numeric\",\n \"image\"=>\"required\"\n ]);\n if($request->hasFile('image')){\n $imgname=$request->image->getClientOriginalName(); \n if(Storage::exists($request->image)){\n $product->image=$imgname; \n }\n else{\n $request->image->storeAs('public',$imgname);\n $product->image=$imgname;\n }\n \n }\n $product->name=$request->name;\n $product->category_id=$request->category;\n $product->description=$request->description;\n $product->stock=$request->stock;\n $product->price=$request->price;\n $product->save();\n\n }", "title": "" }, { "docid": "8de839d3e9816fa894298a9064d231f4", "score": "0.5497475", "text": "function update($record) {\n\t\techo \"update called\";\n\t\t$this->rest->initialize(array('server' => REST_SERVER));\n\t\t$this->rest->option(CURLOPT_PORT, REST_PORT);\n\t\t$key = $record->{$this->_keyfield};\n\t\t$retrieved = $this->rest->put('/job/' . $key, $record);\n\t\t$this->load(); // because the \"database\" might have changed\n\t}", "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": "01d7e90eb4d4834e12b31486f04ab3c2", "score": "0.5493121", "text": "public function update(Request $request)\n {\n $feature=Feature::find($request->id);\n if($request->hasFile('feature_icon')) {\n $file_name = time().'.'.$request->feature_icon->extension(); \n $path = $request->file('feature_icon')->storeAs('public/feature_icons',$file_name);\n $feature->feature_icon=$file_name;\n $Image = str_replace('/storage', '', $request->old_image);\n #Using storage\n if(Storage::exists('public/feature_icons/' . $Image)){\n $delete= Storage::delete('/public/feature_icons/' . $Image);\n }\n } \n $feature->feature_name=$request->feature_name;\n $feature->updated_at=date('Y-m-d H:m:s');\n $feature->update();\n alert::success('feature Updated Successfully');\n return redirect()->back();\n\n }", "title": "" }, { "docid": "f7f83699cca8c8d4920c525dc392587d", "score": "0.54910034", "text": "public function update(UpdateProductRequest $request, $id)\n {\n\n $data = $request->all();\n $product = Product::find($id);\n\n $path = null;\n if ($request->file('image')) {\n $path = $request->file('image')->store('public/products');\n // @unlink('storage/'. $product->image);\n $data['image'] = $path;\n }\n\n\n $product->update($data);\n\n return redirect('/product');\n }", "title": "" }, { "docid": "2160be914cd287b1f331b462c6097a00", "score": "0.54888636", "text": "public function update(Request $request, $id)\n {\n // $this->authorize('haveaccess','producto.edit');\n $datosProductos=request()->except(['_token','_method']);\n\n if ($request->hasFile('imagen')) {\n\n $producto= Producto::findOrFail($id);\n\n Storage::delete('public/'.$producto->imagen);\n\n $datosProductos['imagen']=$request->file('imagen')->store('uploads/producto','public');\n }\n\n Producto::where('id','=',$id)->update($datosProductos);\n $valores['concesionado']=Null;\n $producto= Producto::findOrFail($id);\n $producto->fill($valores);\n $producto->save();\n return view('supervisor.producto.edit',compact('producto'));\n }", "title": "" }, { "docid": "b7260400d51b81b18b18934a92080461", "score": "0.5486164", "text": "public function update($id)\n\t{\n\t\t$powerful = Powerful::findOrFail($id);\n\n\t\t$rules = array(\n\t\t\t'name' => 'required',\n\t\t\t'icon' => 'image'\n\t\t);\n\t\t$validator = Validator::make($data = Input::all(), $rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\t//upload powerful icon\n\t\tif( Input::hasFile('icon') ) {\n\t\t\t//delete old icon\n\t\t\tif( File::exists($powerful->icon) ) File::delete($powerful->icon);\n\t\t\t//create new icon\n\t\t\t$name = md5(time() . Input::file('icon')->getClientOriginalName()) . '.' . Input::file('icon')->getClientOriginalExtension();;\n\t\t\t$folder = \"public/uploads/powerful\";\n\t\t\tInput::file('icon')->move($folder, $name);\n\t\t\t$path = $folder . '/' . $name;\n\n\t\t\t//update new path\n\t\t\t$data['icon'] = $path;\n\t\t} else {\n\t\t\tunset($data['icon']);\n\t\t}\n\n\t\t$powerful->update($data);\n\n\t\treturn Redirect::route('admin.powerful.index')->with('message', 'Item had updated!');\n\t}", "title": "" }, { "docid": "6cf2f968968fff04f96278a9288f5b34", "score": "0.54857856", "text": "public function update(Request $request, $id)\n {\n if ($this->checkRole()) {\n $product = Product::find($id);\n $product->brandName = $request->Input('brandName');\n $product->medicalName = $request->Input('medicalName');\n $product->price = $request->Input('price');\n $product->buying_price = $request->Input('buying_price');\n $product->reorder_level = $request->Input('reorder_level');\n if ($request->hasFile('image')) {\n $oldFilename = 'public/product_images/' . $product->image;\n $product->image = $this->filenameToStore($request);\n Storage::delete($oldFilename);\n }\n $product->save();\n $product->suppliers()->sync($request->suppliers);\n\n return redirect('/products')->with('success', 'Product Details Saved Successfully!');\n } else {\n return redirect()->route('home');\n }\n\n }", "title": "" }, { "docid": "57e8a233d0abf833c408dd0277ccd310", "score": "0.5483825", "text": "public function update($id)\n {\n\n //VALIDATE FIELDS\n $validator = Validator::make(request()->all(),\n [\n 'title' => 'required|max:255',\n 'slug' => 'required|max:255',\n ]);\n\n //IF INVALID\n if($validator->fails()){ \n return $this->respondInvalid('Error with validation.', $validator->errors());\n }\n\n //IF VALID\n else { \n try {\n //Update \n $data2 = [\n 'slug' => request('slug'), \n 'title' => request('title'), \n 'status' => request('status'),\n 'description' => request('description'),\n 'user_id' => Auth::user()->id, \n ];\n\n $data = [\n 'pages' => request('pages'), \n 'body' => request('body'),\n ];\n\n $resource = Article::find($id);\n //var_dump($resource);\n $tags = [];\n\n //If new tags then create and add for sync\n foreach(json_decode(request('tags')) as $tagK => $tagV){\n if(!empty($tagV->create) && $tagV->create){\n if($tag = Tag::firstOrCreate([\n 'title' => $tagV->value,\n 'slug' => str_slug($tagV->value),\n ]))\n {\n $tag->resources()->sync($id);\n $tags[] = $tag->id;\n }\n }\n else {\n $tags[] = $tagV->value;\n }\n }\n\n if($resource->update($data) && $resource->resource->update($data2) && $resource->resource->tags()->sync($tags)) \n {\n return $this->respondSuccess('Successful edit.');\n }\n }\n catch(\\Illuminate\\Database\\QueryException $e){\n $errorCode = $e->errorInfo[1];\n\n switch ($errorCode) {\n //1062 == Duplicate entry for unique MySQL\n case 1062: \n return $this->respondDuplicate('Duplicate Entry.', ['error'=>'This entry already exists.', 'message'=> $e]); \n break;\n default:\n return $this->respondError(null, ['error'=> $errorCode, 'message'=>$e]); \n break;\n }\n }\n }\n }", "title": "" }, { "docid": "317ca96a233f05a742b57399bd2b3542", "score": "0.54833144", "text": "public function update(Request $r, $id)\n {\n $p = Product::find($id);\n $p->stock = $r->input('stock');\n $p->save();\n alert()->success('Success', 'Data successfully updated');\n return redirect()->route('emptyProduct.index');\n }", "title": "" }, { "docid": "23ad4f3da087bda842fa1ac21c33815f", "score": "0.5481742", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->quantity = $request->quantity;\n\n $image = $request->file('image');\n if ($image) {\n if (File::exists($product->image)) {\n File::delete($product->image);\n }\n }\n\n $imagename = $image->getClientOriginalName();\n $imagesize = $image->getClientSize();\n $ext = $image->getClientOriginalExtension();\n\n $image_title = uniqid().time().'.'.$ext;\n $image->move('images/products/', $image_title);\n $product->image = \"images/products/\".$image_title;\n\n $product->save();\n\n session()->flash('success', 'Product updated successfully');\n return redirect()->route('supplier.home');\n }", "title": "" }, { "docid": "a01ea56f337a0cca2a7f8b0fb86e58d0", "score": "0.54794407", "text": "public function update(Request $request, $id)\n {\n\t\t$product = Product::find($id);\n\n\t\t$this->valid($request);\n\n\t\t$field = [\n\t\t\t'uuid',\n\t\t\t'name',\n\t\t\t'price',\n\t\t\t'description',\n\t\t];\n\n\t\tif ($request->product_photo) {\n\t\t\t$request->request->add([\n\t\t\t\t'rule' => [\n\t\t\t\t\t'product_photo' =>\n\t\t\t\t \t'required|image|mimes:jpeg,png,jpg|max:2048',\n\t\t\t\t]\n\t\t\t]);\n\n\t\t\t$this->valid($request);\n\n\t\t\t$upload = $request->file('product_photo')->store('assets/img');\n\n\t\t\tif ($product->photo != '/assets/img/default.jpg') {\n\t\t\t\t@unlink(public_path().$product->photo);\n\t\t\t}\n\n\t\t\tarray_push($field, 'photo');\n\n\t\t\t$request->request->add([\n\t\t\t\t'photo' => '/'.$upload\n\t\t\t]);\n\t\t}\n\n\t\tProduct::where('id', $id)\n\t\t\t->update($request->only($field));\n\n\t\treturn redirect()->route('product.index')->with([\n\t\t\t'success' => 'Data Changed'\n\t\t]);\n }", "title": "" }, { "docid": "ba14e6d76f18913118873dc455ddf07e", "score": "0.547496", "text": "public function update(UpdateProductRequest $request, Product $product)\n {\n //\n try {\n $originImage= $product->image;\n $product->fill($request->except(['category', 'supplier']));\n $product->image = $originImage;\n if ($request->image) {\n $oldImage = $product->image;\n $imageEncodeBase64 = $request->image;\n $postion = strpos($imageEncodeBase64, ';');\n $ext = explode('/', substr($imageEncodeBase64, 0, $postion))[1];\n $fileName = Str::uuid() . '.' . $ext;\n $filePath = public_path('storage/product') . '/' . $fileName;\n Image::make($imageEncodeBase64)->resize(200, 240)->save($filePath);\n $product->image = \"product/$fileName\";\n $filePath = public_path('storage/'.$oldImage);\n if(file_exists($filePath)){\n unlink($filePath);\n }\n }\n $product->save();\n return response()->success(new ProductResource($product));\n } catch (\\Throwable $ex) {\n return response()->error($ex->getMessage());\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": "748d9e839dc1aa55917e22860bfd0666", "score": "0.54659873", "text": "public function update(Request $request, $id, $parent = null)\n {\n extract($this->getResourceNames());\n\n if(!is_null($parent))\n {\n $item = $modelPath::findOrFail($parent);\n $parent = $this->parentModelPath::findOrFail($id);\n } else {\n $item = $modelPath::findOrFail($id);\n }\n\n $validated = $this->resolveRequest('Update')->validated();\n\n $item->update($request->all());\n\n $this->notify($resourceMultiple . '.edited');\n\n return redirect()->back();\n }", "title": "" }, { "docid": "47bbce92661ab4fdf29441a5eabbeea2", "score": "0.5462897", "text": "public function update(Request $request, $id)\n {\n $update = Supplier::find($id);\n $update->name = $request->name;\n $update->slug = strtolower(str_replace(' ', '-',$request->name));\n $update->email = $request->email;\n $update->phone = $request->phone;\n $update->address = $request->address;\n $update->shop_name = $request->shop_name;\n\n if ($request->hasFile('photo')) {\n $image = $request->file('photo');\n $img = time() . '.'. $image->getClientOriginalExtension();\n $location = public_path('backend/assets/images/supplier/'.$img);\n Image::make($image)->resize(300,300)->save($location);\n $update->photo = $img;\n }\n $update->save();\n toast('Supplier Information Add Successfully','success');\n return redirect()->route('index.supplier');\n }", "title": "" }, { "docid": "e69ca8d6b4021523c67416bb5a8e3871", "score": "0.54627603", "text": "public function update($newpaht){}", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.5460793", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "f684d143c5cb5e0fd840b77e6b10f6c8", "score": "0.5460385", "text": "public function update(Request $request, $id)\n { \n $product = Product::find($id);\n $product->name = $request->name;\n $product->name = $request->name;\n $product->description = $request->description;\n $product->save();\n if($request->hasFile('image')){\n $file = $request->file('image');\n $name = time().'.jpg';\n $file->move(public_path('//images//'), $name);\n $image = Image::find($id);\n $image->path = '/images/'.$name;\n $image->save();\n return response()->json(['message'=>'Producto Modificado Satisfactoriamente', $product ,'image'=>$image,]);\n }\n return response()->json(['message'=>'Producto Modificado Satisfactoriamente', $product]);\n }", "title": "" }, { "docid": "6bbf67d9e29ef7e592b60af7e38a778c", "score": "0.54592675", "text": "public function update($resource, $attributes, $exec = false)\n {\n if (!$exec) {\n return $this->beforeUpdate($resource, $attributes);\n }\n\n return DB::transaction(function () use ($resource, $attributes) {\n $attributes = $this->updateAttributes($attributes);\n\n /** @var Model $resource */\n $resource = $this->fill($resource, $attributes, true);\n $resource->save();\n\n return $this->afterUpdate($resource, $attributes);\n });\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "dfb253684824fdc309f2bee7ce671811", "score": "0.5456903", "text": "public function update(Request $request, $id)\n {\n $imagenes=new Imagen();\n $imagenes=Imagen::findOrFail($id);\n $imagenes->descripcion=$request->input('descripcion');\n $imagenes->precio=$request->input('precio');\n $imagenes->categoria=$request->input('categoria');\n $foto=$request->file('foto');\n if($foto){\n $image_path=$foto->getClientOriginalName();\n Storage::disk('s3')->put($image_path,\\File::get($foto));\n $imagenes->foto=$image_path;\n }\n $imagenes->update();\n return redirect()->route('welcome');\n }", "title": "" }, { "docid": "6c0c4f37dc5881fde1e7b8d7f270ec97", "score": "0.544714", "text": "public function update($id) {\n\n }", "title": "" }, { "docid": "f2d8cf4532904fd7bfbac2bd62a96a68", "score": "0.54469514", "text": "public function update(Request $request, $id)\n {\n $input = $request->all();\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required',\n ]);\n if ($request->hasFile('icon')) {\n $path = $request->icon->store('public/images');\n $input['icon'] = $path;\n }\n $block = FourBlock::find($id);\n $block->fill($input)->save();\n toastr()->success('Block has been updated successfully');\n return redirect()->route('fourblock.index');\n }", "title": "" }, { "docid": "24ebeddd4ada07f9b5b94ce822155042", "score": "0.5442551", "text": "public function update(Request $request, $id)\n {\n $product= Product::find($id);\n $this->authorize('update',$product);\n $product->fill($request->all());\n $product->save();\n return redirect('productos');\n }", "title": "" }, { "docid": "0073ba64b443f80ace8779c23d638758", "score": "0.54424137", "text": "public function update(StorePoductRequest $request, Product $product, $id)\n {\n $updated_datas = $request->except(['_method','_token']);\n $prod_to_update = Product::where('id',$id);\n $updated = $prod_to_update->update($updated_datas);\n if($prod_to_update){\n return redirect('/admin/products')->with('status', 'A termék sikeresen frissítve!');\n }\n\n }", "title": "" }, { "docid": "a3e811a8bb8418f3ddeffce2fb72454a", "score": "0.5440816", "text": "public function testUpdateEndpoint()\n {\n $product = factory(Product::class)->create();\n $data = $product->toArray();\n $data['name'] = \"{$product->name} 2\";\n $user = factory(User::class)->create();\n $user->assignRole('admin');\n\n $response = $this->actingAs($user)\n ->putJson(\n \"/api/admin/products/{$product->uuid}\",\n $data\n );\n $response->assertStatus(200);\n $response->assertJsonFragment([\n 'name' => $data['name'],\n 'uuid' => $product->uuid,\n ]);\n }", "title": "" }, { "docid": "2b54bef0cb09abd830d8673bfdd3df4e", "score": "0.5435874", "text": "public function update(ProductRequest $request, $id)\n {\n $inputs = $request->except(['_method', '_token']);\n if ($request->hasFile('poster')) {\n $poster = $request->file('poster');\n $new_name = uniqid(mb_strimwidth($poster->getClientOriginalName(), 0, 3, '_')) . '.' . $poster->getClientOriginalExtension();\n\n $img = Image::make($poster);\n $img->insert(public_path().'/images/watermark.png', 'center');\n $img->save(public_path() . '/images/' . $new_name);\n\n File::delete('images/' . $inputs['old_poster']);\n $inputs['poster'] = $new_name;\n unset($inputs['old_poster']);\n } else {\n $inputs['poster'] = $inputs['old_poster'] ?? null;\n unset($inputs['old_poster']);\n }\n if ($inputs['available'] === 'yes') {\n $inputs['available'] = 1;\n } else {\n $inputs['available'] = 0;\n }\n $update_product = Product::find($id);\n $update_product->fill($inputs);\n if ($update_product->update()) {\n return redirect()->route('product.index')->with('status', 'Product successfully updated !!!');\n }\n }", "title": "" }, { "docid": "f71584ef2ac9d0aab6b54094e7b315c4", "score": "0.543238", "text": "public function update()\n {\n $this->executeActions(true);\n $this->saveData();\n $this->reset(); // reset pending changes\n }", "title": "" }, { "docid": "c46d525d33c8870edde305d0ee17d4ed", "score": "0.54304767", "text": "public function update(Request $request, $id)\n {\n\n\n $request->validate([\n 'name' => 'required',\n 'description' => 'required',\n 'price' => 'required',\n 'id_category' => 'required',\n 'strok' => 'required',\n 'img' => 'required|image|max:2044',\n\n ]);\n\n\n\n $product = Product::findOrFail($id);\n $product->fill($request->all());\n\n //pregunta si la imagen ya exite\n if ($request->hasFile('img')) {\n\n //elimina la imagen\n Storage::delete($product->img);\n\n $image = $request->file('img')->storeAs('public/img', $product->name . '2'.'.jpg');\n\n\n }\n\n $img = Storage::url($image);\n\n $rows = DB::table('products')\n ->where('id', $request->id)\n ->update([\n 'name' => $request->name,\n 'description' => $request->description,\n 'price' => $request->price,\n 'id_category' => $request->id_category,\n 'stock' => $request->stock,\n 'img' => $img,\n\n ]);\n return back()->with('mensaje', '¡Producto editado con exito!');\n }", "title": "" }, { "docid": "eaa583782a682873861569b9b98dc81c", "score": "0.5430323", "text": "public function updateEntity(Entity $entity);", "title": "" }, { "docid": "c0f0939bd5f8a0a097229e2d80aa0d31", "score": "0.54244024", "text": "public function update( $id, $name, $identifier );", "title": "" }, { "docid": "fd04bb969b17f620907a080e9e26f6ab", "score": "0.5421991", "text": "public function update(Request $request, $id)\n {\n //\n if($request->get('file') != '' ){\n $img = str_replace('data:image/jpeg;base64,','',$request->get('file'));\n $img = str_replace(' ','+',$img);\n echo file_put_contents(storage_path().$request->get('img_product'), base64_decode($img));\n } \n\n $product = Product::find($id); \n $product->name_product = $request->get('name_product');\n $product->cost_product = $request->get('cost_product');\n $product->price_product = $request->get('price_product');\n \n $product->save();\n return $product;\n\n }", "title": "" }, { "docid": "9f31b47ab07ed8f7effea689ae758174", "score": "0.5420852", "text": "public function update()\n {\n $this->getDataBackend()->update();\n }", "title": "" }, { "docid": "336bb2ab11980d312dc3ebdfdf92ee79", "score": "0.5418655", "text": "public function update(Request $request, $id)\n {\n $validateData = $request->validate([\n 'al_desc'=>'required|string',\n 'tr_desc'=>'required|string',\n 'stock'=>'required',\n 'age'=>'required',\n 'pur_price'=>'required',\n 'sale_price'=>'required',\n 'image' => 'required|image|max:2048',\n ]);\n\n $article = Articles::where('id', $id)\n ->first();\n\n $image_path = public_path(\"images/{$article->image}\");\n\n if (File::exists($image_path)) {\n unlink($image_path);\n $image = $request->file('image');\n $filename = $image->getClientOriginalName();\n $image->move(public_path('images'), $filename);\n $article->image = $request->file('image')->getClientOriginalName();\n }\n\n $articleStock = $request->input('stock');\n $article->al_desc = $request->input('al_desc');\n $article->tr_desc = $request->input('tr_desc');\n $article->stock = $request->input('stock');\n $article->age=$request->input('age');\n $article->pur_price=$request->input('pur_price');\n $article->sale_price=$request->input('sale_price');\n $article->prime_stock +=$articleStock;\n $article->save();\n\n return redirect()->route('articles.index')->with('success','Article Updated Successfully');\n }", "title": "" }, { "docid": "9f4a5e931ad31bad773803c3dc4cda90", "score": "0.5416135", "text": "public function update(Request $request, $id)\n {\n if($request->hasFile('image')){\n\n $filename = $this->productImage($request->file('image'));\n \n }else{\n\n $recent = Product::findOrFail($id);\n $filename = $recent->image;\n }\n\n $product = new Product;\n Product::where('id', $id)->update($product->productData($request->toArray())+['status' => true, 'image' => $filename]);\n\n return redirect()->route('products.index')->with('success', 'product successfully updated');\n }", "title": "" }, { "docid": "b55b4c2da5ca8dec48b36986ba4711ee", "score": "0.54155767", "text": "public function update(Request $request, Product $product)\n\n {\n\n $input = $request->all();\n\n\n\n $validator = Validator::make($input, [\n\n 'name' => 'required',\n\n 'price' => 'required',\n\n 'stock' => 'required',\n\n 'shortDesc' => 'required',\n\n 'description' => 'required'\n\n ]);\n\n\n\n\n\n if($validator->fails()){\n\n return $this->sendError('Validation Error.', $validator->errors());\n\n }\n\n\n\n $product->name = $input['name'];\n\n $product->price = $input['price'];\n\n $product->stock = $input['stock'];\n\n $product->shortDesc = $input['shortDesc'];\n\n $product->description = $input['description'];\n\n\n\n $product->save();\n\n\n\n return $this->sendResponse(new ProductResource($product), 'Product updated successfully.');\n\n }", "title": "" }, { "docid": "fa4d35fe272f742ecbc45d6ae01985ba", "score": "0.5411923", "text": "public function update(Request $request, $id)\n {\n \n $validator = Validator::make($request->all(),[\n 'name' => 'required|string|max:255',\n 'user_id' => 'required|exists:App\\Models\\User,id',\n 'category_id' => 'required|exists:App\\Models\\Category,id',\n 'description' => 'required',\n 'price' => 'required',\n 'photo' => 'image'\n\n ]);\n\n if($validator->fails()){\n return response()->json($validator->errors()); \n }\n \n $product = Product::find($id);\n $product -> name = $request['name'];\n $product -> user_id = $request['user_id'];\n $product -> category_id = $request['category_id'];\n $product -> description = $request['description'];\n $product -> price = $request['price'];\n\n if($request->hasFile('photo')){\n if(File::exists(public_path(\"storage/\").$product -> photo)){\n File::delete(public_path(\"storage/\").$product -> photo);\n }\n $product -> photo=$request->photo->store('photo');\n }\n\n $product -> save();\n\n return response()\n ->json(['success' => 1,'message' => 'Updated succesfully!']);\n }", "title": "" }, { "docid": "89da7206a99a87abc155c6008d48f6f4", "score": "0.5410531", "text": "public function _update() {\n\t\t$this->_data['_rev'] = $this->_adapter->save($this, Zend_Http_Client::PUT);\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "daa5dabd0608fa1791ffe3d1866a3e16", "score": "0.5410523", "text": "public function update(StoreUpdateProductRequest $request, $id)\n {\n \n $product = $this->repository->find($id);\n if(!$product){\n return redirect()->back();\n }\n\n $data = $request->all();\n\n // Upload de Imagem \n if($request->hasFile('image') && $request->image->isValid()){\n\n /** Verifica se o arquivo existe */\n if($product->image && Storage::exists($product->image)){\n /** Deleta o arquivo */\n Storage::delete($product->image);\n }\n // Salvando imagem e passando o caminho da imagem\n $imagePath = $request->image->store('products');\n\n // Passando o nome da imagem para armazenar no banco\n $data['image'] = $imagePath;\n }\n\n $product->update($data);\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "8cc682b417e81303d02cf6c27cfcadc5", "score": "0.540968", "text": "public function update(Request $request, $id)\n {\n $prds = Product::find($id);\n $prds->nombre = $request->input('nombre');\n if ($request->hasFile('foto')) {\n $file = time().'.'.$request->foto->extension();\n $request->foto->move(public_path('imgs'), $file);\n $prds->foto = \"imgs/\".$file;\n }\n $prds->directory_id = $request->input('directory_id');\n if($prds->save()) {\n return redirect('directories')\n ->with('status', 'La Noticia '.$prds->nombre.' se modifico con Exito!');\n }\n }", "title": "" }, { "docid": "a44c6c541eae25f18bc1eedd4d260d74", "score": "0.54082763", "text": "public function update($name, $object)\n {\n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" } ]
6c5ddd7425ba6a5098f8ca5ec81c19b2
Adds a directory to those that are searched for classes
[ { "docid": "8c64c9a6dc6adab5eff7e9d17d45cb19", "score": "0.634382", "text": "public static function addSearchPath($dir)\n\t{\n\t\t// resolve real paths, and get rid of any that are bad\n\t\t$paths = func_get_args();\n\t\t$paths = array_filter(array_map('realpath', $paths));\n\n\t\tif ($paths)\n\t\t{\n\t\t\tset_include_path(get_include_path().':'.implode(':', $paths));\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "be44c6d4dd956fb77848164df42d72e2", "score": "0.67212564", "text": "public function addDir($dir);", "title": "" }, { "docid": "1d5366abefba1dbfa9792f1d965a1b47", "score": "0.6405296", "text": "public static function add_autoload_directory($dirname)\n {\n if (substr($dirname, -1) != DIRECTORY_SEPARATOR) {\n $dirname .= DIRECTORY_SEPARATOR;\n }\n\n ob_start();\n $dirs = array_diff(scandir($dirname), array('..', '.'));\n ob_end_clean();\n\n if(is_array($dirs) && count($dirs)) {\n foreach ($dirs as $dir) {\n $path = $dirname . $dir;\n if (!is_dir($path)) {\n continue;\n }\n\n PeepSo::add_autoload_directory($path);\n }\n }\n\n self::$_autoload_paths[] = $dirname;\n }", "title": "" }, { "docid": "5457596436d94a2adb863bfa493b2372", "score": "0.62889963", "text": "function getClassPaths($directory, $recursive = FALSE) {\r\n\tglobal $classes;\r\n\r\n\t$dir = opendir($directory);\r\n\twhile ($entry = readdir($dir)) {\r\n\t\tif ($entry != \".\" && $entry != \"..\" && !(strstr($entry, '.svn') > -1)) {\r\n\t\t\t$file = $directory . '/' . $entry;\r\n\t\t\tif (is_dir($file) && $recursive) {\r\n\t\t\t\tgetClassPaths($file, $recursive);\r\n\t\t\t} elseif (is_file($file) && (substr($file, strlen($file) - 4, 4) == '.php')) {\r\n\t\t\t\t$classes[$entry] = $directory . '/' . $entry;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "ca01797ba95269114cbeacb093963e10", "score": "0.6218006", "text": "private function include_classes($dir)\n {\n //Refresh the include path\n $this->set_new_include_path();\n\n //Open path\n $searchDir = opendir($dir);\n\n //read path\n while($file = readdir($searchDir)) {\n\n //Subfolder including\n if(is_dir( str_replace('//', '/',$this->loadPath.\"/\".$file))\n && $file != '.'\n && $file != '..')\n {\n //Through creating a new instance of itself the\n //recursive folder including is enabled\n new Class_Auto_Load($this->loadPath.\"/\".$file);\n }\n //Checks if its a php file\n if(preg_match('/(.*).php/i',$file)) {\n //Checks if its a class in it (may not 100% accurate)\n if(preg_match('/(.*)class [\\w](.*)/i',\n file_get_contents(\n str_replace('//', '/', $dir . '/' . $file)\n ))) {\n //include the file and make the class finally ready to\n //be instanciated\n require_once $file;\n }\n }\n }\n }", "title": "" }, { "docid": "4ca7f0d31b35d86825cde47b93b91890", "score": "0.62040293", "text": "public function testLoaderClassSearchDirs()\n {\n $dirs = array();\n foreach (array('_testDir1', '_testDir2') as $dir) {\n $dirs[] = implode(array(__DIR__, '_files', $dir), DIRECTORY_SEPARATOR);\n }\n\n // throws exception on failure\n Loader::loadClass('Class1', $dirs);\n Loader::loadClass('Class2', $dirs);\n }", "title": "" }, { "docid": "4d2cb9cb89e4e28998070c60566cdc79", "score": "0.6158597", "text": "function addDirectory($dir = null){\n\t\n\t\t$dir = str_replace('\\\\', '/', $dir);\n\t\t\n\t\tif(empty($dir) || !is_dir($dir)){\n\t\t\t\n\t\t\t$this->error[] .= JSON_ARCHIVE_INVALID_DIRECTORY;\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Thanks to php.net\n\t\t// http://php.net/manual/en/class.recursivedirectoryiterator.php\n\t\t$dir_object = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir), RecursiveIteratorIterator::SELF_FIRST);\n\t\t\n\t\tforeach($dir_object as $name => $object){\n\t\t\t\n\t\t\t$name = str_replace(\"\\\\\", \"/\", $name);\n\t\t\t// Uncomment the next line to exclude hidden and or damaged files.\n\t\t\t//if(is_readable($name))\n\t\t\t\t$this->add($name);\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "e2e7dd2ceb1b9fbd6a1078d22275520d", "score": "0.6146033", "text": "public static function registerDirectory($dirName) {\n\n $di = new DirectoryIterator($dirName);\n foreach ($di as $file) {\n\n if ($file->isDir() && !$file->isLink() && !$file->isDot()) {\n // recurse into directories other than a few special ones\n self::registerDirectory($file->getPathname());\n }\n else {\n if (substr($file->getFilename(), -4) === '.php' && substr($file->getFilename(), 0, 6) === 'class.') {\n // save the class name / path of a .php file found\n $className = str_replace(array('class.', '.php'), '', $file->getFilename());\n self::registerClass($className, $file->getPathname());\n }\n }\n }\n }", "title": "" }, { "docid": "7d40c9969e2d775c91927858c6e8e732", "score": "0.6014014", "text": "abstract function addfolder();", "title": "" }, { "docid": "6b54960d4ce256e0d5c8bf62e4a3a083", "score": "0.5969878", "text": "function autoload_multiple_directory($class_name)\n{\n $base = \"/var/www/html/m_v_c/\";\n $array_directories = [\n $base.'core/',\n $base.'core/controllers/',\n $base.'core/models/'\n// '../core/models/database/',\n// '../core/views/',\n// '../app/',\n// '../app/controllers/',\n// '../app/models/',\n// '../app/views/',\n// '../public/',\n// '../vendors/',\n ];\n\n $parts = explode('\\\\', $class_name);\n //print_r($parts);\n $file_name = end($parts).'.php';\n\n foreach($array_directories as $path_directory){\n $recursive_directory = new RecursiveDirectoryIterator($path_directory);\n foreach (new RecursiveIteratorIterator($recursive_directory) as $filename => $file) {\n if(file_exists(\"/var/www/html/m_v_c/.{$file->getPath()}\".\"/\".$file_name)) {\n include \"/var/www/html/m_v_c/.{$file->getPath()}\".\"/\".$file_name;\n echo \"<br>\";\n }\n\n }\n }\n}", "title": "" }, { "docid": "e261d1f83728a3ede1be8abf85b7c41a", "score": "0.58924496", "text": "public function getClassesPath();", "title": "" }, { "docid": "92b9ba30896dc64d874c8aaec7c83515", "score": "0.5891026", "text": "public function addTestDirectory($directory = '.') {\n\t\t$files = new DirectoryIterator($directory);\n\n\t\tforeach ($files as $file) {\n\t\t\tif (!$file->isFile()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$file = $file->getRealPath();\n\t\t\t$this->addTestFile($file);\n\t\t}\n\t}", "title": "" }, { "docid": "d9c1130a47b4d13b54ba9e99fe92ccbe", "score": "0.58861464", "text": "private function _mapFilesAndDirectories() {\n \n $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->_dir),\n RecursiveIteratorIterator::CHILD_FIRST);\n foreach ($iterator as $path) {\n if ($path->isDir()) {\n // add to Directory array\n \n // don't pass any svn folders\n if(!strstr($path->__toString(), '.svn')){\n $this->_dirArray[] = $path->__toString();\n }\n \n } else {\n // add to File array\n $this->_OriginalFileArray[] = $path->__toString();\n }\n }\n \n \n // this is needed because of the order by which the directories\n // are mapped, children are higher than parents, which means that\n // children are never created\n $this->_dirArray = array_reverse($this->_dirArray);\n \n\n }", "title": "" }, { "docid": "a4fa278a6c93f1f8ae74d44c4d8756e3", "score": "0.5851493", "text": "public function scanDirForClasses(ClassDirInterface $class_dir, $skip_abstract = false, $skip_non_descendant = false): array;", "title": "" }, { "docid": "1f863fa2668db6995c08a43d0ef913c3", "score": "0.58510345", "text": "public function addDirectory($dir)\n {\n $this->getLoader()->addPrefixPath(\"\", $dir);\n }", "title": "" }, { "docid": "87ee59b82ec8d30a2c31d6a719789a0a", "score": "0.58075243", "text": "public function scanDirsForInstances(array $class_dirs, callable $with_found_instance, array $constructor_arguments = []);", "title": "" }, { "docid": "a9a5c004c010aa4eac76529d71fec3c8", "score": "0.57842463", "text": "public function addFiles($base, $class = null)\n {\n $map = Solar::factory('Solar_Class_Map');\n $map->setBase($base);\n $source = $map->fetch($class);\n foreach ($source as $class => $file) {\n require_once($file);\n $this->addClass($class, $file);\n }\n }", "title": "" }, { "docid": "83466267d8f5039ed8f32f1b58abc5a5", "score": "0.57490426", "text": "public function addDirectory($dir)\n\t{\n\t\tif(is_array($dir))\n\t\t{\n\t\t\tforeach($dir as $cur)\n\t\t\t\t$this->addDirectory($cur);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($dir[strlen($dir)-1] == DIRECTORY_SEPARATOR)\n\t\t\t\t$dir = substr($dir, 0, -1);\n\t\t\tarray_push($this->_directories, $dir);\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "71b0efa79a368443c6aaad3066a44611", "score": "0.56928426", "text": "public function testDirectoryToScan()\n {\n new MultipleDirectoriesAggregateSourceLocator([$this->directoryToScan, $this->directoryToScan]);\n }", "title": "" }, { "docid": "e10a30d4f765ad589e5c5dc772a21d29", "score": "0.5685316", "text": "public function addPath($type, $dir)\n\t{\n\t\t// no surrounding spaces allowed!\n\t\t$dir = trim($dir);\n\t\t\n\t\t// add trailing separators as needed\n\t\tif (strpos($dir, '://') && substr($dir, -1) != '/') {\n\t\t\t// stream\n\t\t\t$dir .= '/';\n\t\t} elseif (substr($dir, -1) != DIRECTORY_SEPARATOR) {\n\t\t\t// directory\n\t\t\t$dir .= DIRECTORY_SEPARATOR;\n\t\t}\n\t\t\n\t\t// add to the top of the search dirs\n\t\t$path =& $this->conf($type . '_path');\n\t\tarray_unshift($path, $dir);\n\t}", "title": "" }, { "docid": "19cf596e1abfae6dd29f846c883e7777", "score": "0.5683539", "text": "protected function discoverFiles()\n {\n foreach ($this->sources as $source) {\n $objects = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($source), \\RecursiveIteratorIterator::SELF_FIRST\n );\n foreach ($objects as $fileInfo) {\n if (($fileInfo->getFilename() != '.') && ($fileInfo->getFilename() != '..')) {\n $f = null;\n if (!$fileInfo->isDir()) {\n $f = realpath($fileInfo->getPathname());\n }\n if (($f !== false) && (null !== $f) && (substr(strtolower($f), -4) == '.php')) {\n $this->files[] = $f;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "9be91eacec4a8f5d5c85dc633a25f9a2", "score": "0.56833196", "text": "public function addExcludedDir($dir);", "title": "" }, { "docid": "a476d0d3aa5078da595358cc75a6c227", "score": "0.5680238", "text": "private function process_class_loader_path() {\n\t\t$i = $this->search_array();\n\t\tif ( false !== $i ) {\n\t\t\tif ( 'Postmedia' === $this->process_path[ $i + 1 ] ) {\n\t\t\t\t$i++;\n\t\t\t\t$cnt = count( $this->process_path );\n\t\t\t\tfor ( $i; $i <= $cnt; $i++ ) {\n\t\t\t\t\t// trim off each library directory, end trimming at the base directory\n\t\t\t\t\tarray_pop( $this->process_path );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c3c3e0a156aaa1a6bbc9119e1b16937c", "score": "0.5679698", "text": "public function addDirectory(String $directory): void\n {\n $this->directories[] = $directory;\n }", "title": "" }, { "docid": "e6ef7f518c1d8b4c257dd5b89c57cefd", "score": "0.5626396", "text": "public static function addDirectory($dir /* $..., */, $checkDir = true) {\r\n\t\t\r\n\t\t$dirs = func_get_args();\r\n\t\tif(is_bool(end($dirs))) $checkDir = array_pop($dirs);\r\n\t\tforeach($dirs as $key => &$dir) {\r\n\t\t\tif(!is_dir($dir) or !is_readable($dir)) {\r\n\t\t\t\tif($checkDir) throw new MissingDirectoryException($dir);\r\n\t\t\t\tunset($dirs[$key]);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t$dir = realpath($dir) . DIRECTORY_SEPARATOR;\r\n\t\t}\r\n\t\tself::$directories = array_merge(self::$directories, $dirs);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "7d95ea1af490845e6aff2b19b91f6eaf", "score": "0.56094503", "text": "private function loadClasses(){\n\n $classesDir = __DIR__.'/../framework/classes';\n foreach (glob($classesDir.'/*.php') as $filename)\n {\n if ($filename === '.' || $filename === '..') continue;\n require_once $filename;\n }\n\n }", "title": "" }, { "docid": "96e48193ebe7d3e4965a07cd43a9fc9c", "score": "0.5606024", "text": "public static function addNewFolders() {\n $newFolders = self::findNewFolders();\n foreach($newFolders as $folder) {\n self::addNewFolder($folder);\n }\n }", "title": "" }, { "docid": "c44500c3980b28f3b8520a8d95c55ef2", "score": "0.55762345", "text": "protected static function addDir ( PHPUnit_Framework_TestSuite $suite, $dir )\n {\n // Add the files in this directory\n foreach ( new DirectoryIterator($dir) AS $path ) {\n\n if ( $path->isFile() && !$path->isDot() ) {\n $suite->addTest(\n new PHPUnit_Include_Framework_TestCase(\n \"testInclude\",\n array( $path->getPathName() ),\n \"Include File\"\n )\n );\n }\n }\n\n // Now go back and add the subdirectories\n foreach ( new DirectoryIterator($dir) AS $path ) {\n if ( $path->isDir() && !$path->isDot() )\n self::addDir( $suite, $path->getPathName() );\n }\n }", "title": "" }, { "docid": "b35be75fd1e8eee47d7399276851d726", "score": "0.55586946", "text": "public function testLoaderClassSearchSubDirs()\n {\n $dirs = array();\n foreach (array('_testDir1', '_testDir2') as $dir) {\n $dirs[] = implode(array(__DIR__, '_files', $dir), DIRECTORY_SEPARATOR);\n }\n\n // throws exception on failure\n Loader::loadClass('Class1_Subclass2', $dirs);\n }", "title": "" }, { "docid": "068abf279ed03d7188aa742b9e5121f9", "score": "0.5548932", "text": "private function createDirectories()\r\n {\r\n $info = $this->getModuleInfo();\r\n\r\n $directories = $this->getDirectories($info);\r\n\r\n $this->createDirectoriesFromArray($directories, $this->basePath);\r\n }", "title": "" }, { "docid": "61bfc6c521020f0ff9047c09867048d0", "score": "0.5527085", "text": "public function addPath($path)\n {\n // just force to array\n settype($path, 'array');\n\n // loop through the path directories\n foreach ($path as $dir) {\n // no surrounding spaces allowed!\n $dir = trim($dir);\n\n // remove trailing slash\n if (substr($dir, -1) == DIRECTORY_SEPARATOR) {\n $dir = substr_replace($dir, '', -1);\n }\n\n // add to the top of the search dirs\n array_unshift($this->_paths, $dir);\n }\n }", "title": "" }, { "docid": "490a2c201931186954d3eeaf7a4194d4", "score": "0.5501421", "text": "function add_dir() {\r\n\t$old_paths = get_option ( 'wt_paths' );\r\n\tif (is_dir ( $_POST [\"path\"] )) {\r\n\t\t$old_paths .= ';' . $_POST [\"path\"];\r\n\t\tupdate_option ( 'wt_paths', $old_paths );\r\n\t}\r\n\texit ();\r\n}", "title": "" }, { "docid": "1ceed3e3f3eb8ffedfaf82d050db5788", "score": "0.5495744", "text": "public function directoryProvider() {\n\t\treturn [['folder']];\n\t}", "title": "" }, { "docid": "d8eba22b6fb6dc7f4f8adf4fbbdf0369", "score": "0.54878944", "text": "protected function dirs_set(){\n // this jobs are move durong import (import), and where\n // the results are saved (jobs)\n $ar = array('upload'=>'uploads','jobs'=>'jobs'); // ,'imp'=>'import'\n foreach($ar as $ck=>$cv){\n $tmp = 'dir_' . $ck; \n $this->$tmp = $this->tool->dir($cv);\n }\n $this->dir_imp = $this->ftp . '/new/';\n }", "title": "" }, { "docid": "f3aa01e77f222dc1e2881522317f5627", "score": "0.5486984", "text": "public function addTestDirectoryRecursive($directory = '.') {\n\t\t$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory));\n\n\t\tforeach ($files as $file) {\n\t\t\tif (!$file->isFile()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$file = $file->getRealPath();\n\t\t\t$this->addTestFile($file);\n\t\t}\n\t}", "title": "" }, { "docid": "37496a7e886593ef95b05405da8c4e58", "score": "0.54456717", "text": "private function setupDirectories()\n {\n // Check if the internal directory is present\n if(!file_exists($dir = Config::get('assetprocessor::cache.directory')))\n {\n // It doesn't, so make the folder\n mkdir($dir, 0777, true);\n }\n\n // Check if the external directory is available\n if(!file_exists($dir = Config::get('assetprocessor::cache.external', Config::get('assetprocessor::cache.directory'))))\n {\n // It doesn't, so make the folder\n mkdir($dir, 0777, true);\n }\n\n // Check if the external directory is available (CSS)\n if(!file_exists($dir = Config::get('assetprocessor::cache.external', Config::get('assetprocessor::cache.directory')) . '/css'))\n {\n // It doesn't, so make the folder\n mkdir($dir, 0777, true);\n }\n\n // Check if the external directory is available (JavaScript)\n if(!file_exists($dir = Config::get('assetprocessor::cache.external', Config::get('assetprocessor::cache.directory')) . '/js'))\n {\n // It doesn't, so make the folder\n mkdir($dir, 0777, true);\n }\n }", "title": "" }, { "docid": "d9e291675a0004212a6baf225dc3e6a9", "score": "0.54455227", "text": "private function _renameDirectories(){\n\n $search = $this->_getPathToChangeByFileType();\n $replace = $search . $this->_version . '/';\n \n $newArr = array();\n // save in the original array\n foreach($this->_dirArray as $dir){\n // rename directories to the new version \n $newArr[] = str_replace($search, $replace, $dir);\n }\n \n $this->_dirArray = $newArr;\n \n }", "title": "" }, { "docid": "d82d92fa9bf3da4dd9391e8365379338", "score": "0.54441035", "text": "public function scanDirForInstances(ClassDirInterface $class_dir, callable $with_found_instance, array $constructor_arguments = []);", "title": "" }, { "docid": "71052da4780313a3da1462cda521e915", "score": "0.5432836", "text": "public function AddSearchFolder($folderPath){\r\n\t\t$this->_searchFolders[] = $folderPath;\r\n\t}", "title": "" }, { "docid": "d8726b33ad9da9a15b183622d9b7ee66", "score": "0.5414755", "text": "public function addPath(string $directory, string $accessName = '__main__'): void;", "title": "" }, { "docid": "7a5180c73b3232d4b1b38aa42f6afd12", "score": "0.54129416", "text": "public function addToClass($class) {\n\n }", "title": "" }, { "docid": "5644d7433870429bf78a6cb4f57056a9", "score": "0.54040724", "text": "protected static function createDirectories()\n {\n static::createLessDirectory();\n File::makeDirectory(public_path('assets'));\n File::makeDirectory(public_path('assets/js'));\n File::makeDirectory(public_path('assets/css'));\n }", "title": "" }, { "docid": "c6d389591c3941a5e71928a351190e60", "score": "0.5390114", "text": "private function directory($dir_name)\n\t{\n\t\tif (!$dir = opendir($dir_name))\n\t\t{\n\t\t\ttrigger_error(\"Directory $dir_name does not exists\", E_USER_ERROR);\n\t\t}\n\n\t\twhile ($entry = readdir($dir))\n\t\t{\n\t\t\tif ($entry != '.' && $entry != '..')\n\t\t\t{\n\t\t\t\tif (preg_match('#([a-zA-Z0-9_-]*)\\.(class|helper|model)\\.php#', $entry, $m))\n\t\t\t\t{ \n\t\t\t\t\tif ($m[2] == 'class')\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->library($m[1]);\n\t\t\t\t\t}\n\t\t\t\t\telse if ($m2[2] == 'model')\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->model($m[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$this->helper($m[2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tclosedir($dir); \n\t}", "title": "" }, { "docid": "99c07f6dad8440bad9918584d7ea7057", "score": "0.5387368", "text": "function autoloadClasses($class)\r\n{\r\n $class = str_replace('_', DIRECTORY_SEPARATOR, $class);\r\n require $class . \".php\";\r\n}", "title": "" }, { "docid": "3afb40c7c452d7a0d3ff4f40dc87be1c", "score": "0.5373234", "text": "public function AddDirectory($directory)\r\n {\r\n if (!is_dir($directory)) {\r\n throw new \\Exception(sprintf(\r\n 'Directory: \\'%s\\' is not a directory or doesn\\'t exists',\r\n $directory\r\n ));\r\n }\r\n $directory = realpath($directory);\r\n\r\n $files = new \\RecursiveIteratorIterator(\r\n new \\RecursiveDirectoryIterator($directory), \r\n \\RecursiveIteratorIterator::SELF_FIRST\r\n );\r\n foreach ($files as $file) {\r\n\r\n if (in_array(substr($file, strrpos($file, '/') + 1), array('.', '..'))) {\r\n continue;\r\n }\r\n \r\n $file = realpath($file);\r\n if (is_dir($file) === true) {\r\n $rel_file = (str_replace($directory . DIRECTORY_SEPARATOR, '', $file));\r\n $this->addEmptyDir($rel_file);\r\n } else if (is_file($file) === true) {\r\n $rel_file = (str_replace($directory . DIRECTORY_SEPARATOR, '', $file));\r\n $this->addFromString($rel_file, file_get_contents($file));\r\n }\r\n }\r\n }", "title": "" }, { "docid": "53b4abafa17ae258aa5f38fe228b3756", "score": "0.5371537", "text": "public function addToWhiteList()\n {\n if ($this->_listenStarted) {\n\n return false;\n } else {\n foreach ($this->whiteList as $dir) {\n $this->phpCC->filter()->addDirectoryToWhitelist($_SERVER['DOCUMENT_ROOT'] . $dir);\n }\n }\n }", "title": "" }, { "docid": "b294951bf3ed38fe4751ea8023cdc0dc", "score": "0.53711325", "text": "public function makeDirectory()\n {\n if (!file_exists(config('library.scanner.folder')))\n mkdir(config('library.scanner.folder'), 0755, true);\n }", "title": "" }, { "docid": "b51fcd374c55c4664becd64357dbd264", "score": "0.5349769", "text": "static function addClassPath($path)\r\n\t{\r\n\t\tif (self::$_classPath === null)\r\n\t\t\tself::setDefaultClassPath();\r\n\t\t\t\r\n\t\tself::$_classPath[] = $path;\r\n\t}", "title": "" }, { "docid": "0cd80ce7b72da6e7ba12dc80dae59ab6", "score": "0.534197", "text": "public function addAllJobsInDirectory($directory){\n $directory = rtrim($directory, DIRECTORY_SEPARATOR);\n\n foreach (glob($directory.'/*.php') as $filename) {\n $job = include $filename;\n $this->addJob($job);\n }\n\n foreach (glob($directory.'/**/*.php') as $filename) {\n $job = include $filename;\n $this->addJob($job);\n }\n }", "title": "" }, { "docid": "3c7e740c3984a53420c8b92b13f5e89e", "score": "0.5336389", "text": "public function getDirectories(): self {\n $assets = \\array_filter(\n $this->assets,\n static fn ($asset): bool => $asset instanceof Directory,\n );\n return new self($assets);\n }", "title": "" }, { "docid": "49104d96fbcf21eba0e6ca2aac901f65", "score": "0.533223", "text": "public function testDirectoryScan()\n {\n $group = new PhroccoGroup([\"i\"=>__DIR__]);\n $group->process();\n\n $this->assertEquals(count($group->sources),3);\n foreach($group->group as $file=>$handler) {\n $this->assertInstanceOf(\"Phrocco\\\\Phrocco\", $handler);\n }\n }", "title": "" }, { "docid": "bd463e378b0eaf43d89dd14ac143e1a5", "score": "0.53272074", "text": "public static function search_directory(){\n\t\tglobal $file_dir; /* global used by update_database to locate config.php, effectively looking in the same directory */\n\t\treturn array($file_dir);\n\t}", "title": "" }, { "docid": "294b7b001dfc79eddb6e91ffcdc212b0", "score": "0.5314875", "text": "private function _autoload_directory( $layer, $dir = '/', $load_class = true ) {\r\n\r\n\t\t$directory = get_template_directory() . '/wproto/' . $layer . $dir;\r\n\t\t$handle = opendir( $directory );\r\n\r\n\t\twhile ( false !== ( $file = readdir( $handle))) {\r\n\t\t\t\r\n\t\t\tif ( is_file( $directory . $file)) {\r\n\t\t\t\t// Figure out class name from file name\r\n\t\t\t\t$class = str_replace('.php', '', $file);\r\n\t\t\t\t\r\n\t\t\t\t$class = 'wplab_unicum_' . str_replace('-', '_', $class ) . '';\r\n\t\t\t\t$shortClass = str_replace( 'wplab_unicum_', '', $class );\r\n\t\t\t\t$shortClass = str_replace( '_' . $layer, '', $shortClass);\r\n\r\n\t\t\t\tif( $load_class ) {\r\n\t\t\t\t\t// Avoid recursion\r\n\t\t\t\t\tif ( $class != get_class( $this) ) {\r\n\t\t\t\t\t\t// Include and instantiate class\r\n\t\t\t\t\t\trequire_once $directory . $file;\r\n\t\t\t\t\t\t$this->$layer->$shortClass = new $class();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\trequire_once $directory . $file;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "940079fe458ed0c7d902a5d11ca3b650", "score": "0.53103316", "text": "function register_elements_dir( $dirs ){\r\n\r\n\t\t$dirs[] = array(\r\n\t\t\t'url' => trailingslashit( $this->url .'elements' ),\r\n\t\t\t'path' => trailingslashit( $this->path .'elements' ),\r\n\t\t);\r\n\r\n\t\treturn $dirs;\r\n\t}", "title": "" }, { "docid": "648bc7ab1fccebcbf2a2ca9acd565744", "score": "0.53078", "text": "public static function loadClasses($dir)\n {\n if (is_array($dir)) {\n $files = [];\n\n foreach ($dir as $directory) {\n $files[] = self::getDirectoryFiles($directory, true, true);\n }\n\n $files = self::collapseArray($files, true);\n } else {\n $files = self::getDirectoryFiles($dir, true, true);\n }\n\n foreach ($files as $key => $file) {\n $file_name = explode('.', $file);\n $extension = end($file_name);\n\n if ($extension === 'php') {\n include_once $file;\n } else {\n unset($files[$key]);\n }\n }\n\n return $files;\n }", "title": "" }, { "docid": "8e8db78d904e2c32d4aa623b73c6b3f0", "score": "0.52951664", "text": "public function addTemplateDirectories( $dirs );", "title": "" }, { "docid": "1be9c43fc36b56121b08414a51e1d7c7", "score": "0.5295107", "text": "function load_directory( $directory, $skip_ignores=false ) { \n $current_directory = scandir( $directory );\n foreach( $current_directory as $file ) {\n // skip the default system files\n if( 0 === strpos( $file, '.' ) ) {\n continue;\n }\n\n // skip current and parent directory references\n if( should_ignore_file( $file ) && !$skip_ignores ) {\n continue;\n }\n // if it's a directory, recursivley load it in\n if( is_dir( \"{$directory}/{$file}\" ) ) {\n load_directory( \"{$directory}/{$file}\", $skip_ignores );\n } else {\n $include_path = \"{$directory}/{$file}\";\n include $include_path;\n }\n }\n}", "title": "" }, { "docid": "7ab3c1cdfa73a8cffb7c739d5d783967", "score": "0.5287755", "text": "protected function resolveLaramoreClasses(string $dir)\n {\n $namespace = \\str_replace('/', '\\\\', Str::title($dir));\n $path = base_path($dir);\n\n $classes = \\array_map(function ($file) use ($path, $namespace) {\n return \\str_replace(\n [$path, '/', '.php'],\n [$namespace, '\\\\', ''],\n $file->getRealPath()\n );\n }, File::allFiles($path));\n\n return \\array_filter($classes, function ($class) {\n return \\is_subclass_of($class, BaseModel::class) && !(new ReflectionClass($class))->isAbstract();\n });\n }", "title": "" }, { "docid": "72d62f9b867abc513a056f699c343477", "score": "0.5281248", "text": "function scan_dir($subdir='')\n{\n global $response, $games, $extensions, $SYSTEM_PATH, $svr_dir;\n\n $path = '';\n if ($subdir)\n {\n $path = $subdir.'/';\n }\n\n // scan for files with matching extensions\n foreach( glob($path.$extensions, GLOB_BRACE) as $filename)\n {\n $shortpath = simplify_path($filename, $SYSTEM_PATH.'/');\n\n // already in gamelist.xml?\n if (!isset($games[strtolower($shortpath)]))\n {\n array_push($response['game'],\n array(\n 'name' => pathinfo($filename, PATHINFO_FILENAME),\n 'path' => './'.$filename,\n 'shortpath' => $shortpath,\n 'size' => filesize($filename),\n 'human_size' => human_filesize($size),\n 'mtime' => filemtime($filename),\n 'new' => 1 // flag as a new rom\n ));\n }\n }\n\n // scan for subdirectories\n foreach(glob($path.'*', GLOB_ONLYDIR) as $filename)\n {\n // already in gamelist.xml?\n if (!isset($games[strtolower($filename)]))\n {\n array_push($response['game'],\n array(\n 'name' => substr($filename,strlen($path)),\n 'path' => $filename,\n 'isDir' => 1,\n 'new' => 1 // flag as a new directory\n ));\n }\n\n // recurse into directory\n scan_dir($path.$filename);\n }\n}", "title": "" }, { "docid": "a7b06b50343545a675a23590f76d08b2", "score": "0.52801216", "text": "private function scan_class($path,$namespace = null){\n\t\t$classes = array();\n\t\t//check realpath for vfsStream mockup compatibility\n\t\t$path = (file_exists($path) && ($realpath = realpath($path) !== false)) ? $realpath : $path;\n\n\t\tif(is_file($path) \n\t\t\t&& in_array(pathinfo($path,PATHINFO_EXTENSION),$this->extensions)){\n\n\t\t\t$key = (empty($namespace)? '' : $namespace.'\\\\').pathinfo($path,PATHINFO_FILENAME);\n\t\t\t$classes[$key] = $path;\n\t\t\t\n\t\t}\n\t\telse if(is_dir($path)){\n\t\t\tforeach (scandir($path) as $k => $file)\n\t\t\t{\t\n\t\t\t\tif(\t $file != \".\" \n\t\t\t\t\t&& $file != \"..\" \n\t\t\t\t){\n\t\t\t\t\t//ensure that is ending by a a directory separator\n\t\t\t\t\t$path = rtrim($path,'\\\\/').'/'; \n\t\t\t\t\t$classes = array_merge($classes,$this->scan_class($path.$file,$namespace));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $classes;\n\t}", "title": "" }, { "docid": "6dfff21a492509998299ec2aba03e147", "score": "0.5276919", "text": "private function scandirExtended($directory){\n $original = array_diff(scandir($directory), ['.','..']);\n $directories = [];\n $files = [];\n\n foreach ($original as $item){\n $path = realpath($directory.DIRECTORY_SEPARATOR.$item);\n if (is_dir($path)){\n array_push($directories, $path);\n }\n else{\n array_push($files, $path);\n }\n }\n return $directories+$files;\n }", "title": "" }, { "docid": "8231d2c626c274ca40e238305d7430cc", "score": "0.52726007", "text": "protected function getClassesFromDir($path)\n {\n $classes = array();\n $rootDir = $this->root_dir;\n\n foreach (scandir($rootDir.$path) as $file) {\n if ($file[0] != '.') {\n if (is_dir($rootDir.$path.$file)) {\n $classes = array_merge($classes, $this->getClassesFromDir($path.$file.'/', $hostMode));\n } elseif (substr($file, -4) == '.php') {\n $content = file_get_contents($rootDir.$path.$file);\n\n $namespacePattern = '[\\\\a-z0-9_]*[\\\\]';\n $pattern = '#\\W((abstract\\s+)?class|interface)\\s+(?P<classname>'.basename($file, '.php').'(?:Core)?)'\n .'(?:\\s+extends\\s+'.$namespacePattern.'[a-z][a-z0-9_]*)?(?:\\s+implements\\s+'.$namespacePattern.'[a-z][\\\\a-z0-9_]*(?:\\s*,\\s*'.$namespacePattern.'[a-z][\\\\a-z0-9_]*)*)?\\s*\\{#i';\n\n\n if (preg_match($pattern, $content, $m)) {\n $classes[$m['classname']] = array(\n 'path' => $path.$file,\n 'type' => trim($m[1])\n );\n }\n }\n }\n }\n\n return $classes;\n }", "title": "" }, { "docid": "1dc9486d59aaa353a1e5f87bc974a227", "score": "0.52661335", "text": "function doDirectories($ser_func){\n if(!is_array($this->directories)) $this->directories = explode(',', $this->directories);\n for($i=0; $i<count($this->directories); $i++){\n $dh = opendir($this->directories[$i]);\n while($file = readdir($dh)){\n if($file == '.' OR $file == '..') continue;\n\n if(is_dir($this->directories[$i].$file) == TRUE){\n if($this->include_subdir == 1){\n $this->directories[] = $this->directories[$i].$file.'/';\n continue;\n }else{\n continue;\n }\n }\n\n $newfile = $this->$ser_func($this->directories[$i].$file);\n if(is_array($newfile) == TRUE){\n $this->writeout($this->directories[$i].$file, $newfile[1]);\n $this->occurences += $newfile[0];\n }\n }\n }\n }", "title": "" }, { "docid": "0ebe33d5e8aad43fd818c274f8437ad9", "score": "0.5258732", "text": "public function classes() {\n\t\trequire_once($this->get_filepath('classes').'classes-loader.php');\n\t}", "title": "" }, { "docid": "c40a8052d0783d92d38b393d35bd9a16", "score": "0.5258194", "text": "public function addDirectory( $dir )\n\t{\n\t\t//-----------------------------------\n\t\t// Got dir?\n\t\t//-----------------------------------\n\t\t\n\t\tif ( ! is_dir($dir) )\n\t\t{\n\t\t\tthrow new Exception( \"FILE_OR_DIR_NOT_EXISTS\" );\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$dir = rtrim( $dir, '/' );\n\t\t\n\t\t//-----------------------------------\n\t\t// Populate this->workfiles\n\t\t//-----------------------------------\n\t\t\n\t\t$this->_workFiles = array();\n\t\t$this->_getDirContents( $dir );\n\t\t\n\t\t//-----------------------------------\n\t\t// Add them into the file array\n\t\t//-----------------------------------\n\t\t\n\t\tforeach ( $this->_workFiles as $f )\n\t\t{\n\t\t\t$this->addFile( $f );\n\t\t}\n\t\t\n\t\t$this->_workFiles = array();\n\t}", "title": "" }, { "docid": "856bcce3d040c4306eee34fc95278280", "score": "0.5257031", "text": "function scanFolderItem($directory, $item, $globalData) {\n // Resolve path to support symlinks.\n if (is_dir(realpath($directory) . '/' . $item)) {\n $this->wjs->extensionAdd($this->type, $item, $directory . $item);\n }\n }", "title": "" }, { "docid": "49f38c1dc0fa62167f5b54da64f1c317", "score": "0.52482325", "text": "private function scanDirectory()\n\t{\n\t\t$raw_directory_contents = scandir($this->path);\n\t\t$this->directory_contents = array_diff($raw_directory_contents, array('..', '.'));\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "c31919d0ea95daf1b3421e411dc2b2e1", "score": "0.5244247", "text": "protected function handle_directory($path, METSPackageSingle &$package, $parent){\n $this->folderCount++;\n \n $currentID = 'uuid_' . hash('sha1', $path . $this->folderCount);\n $parsedPath = explode('/', $path);\n \n // Add a div for the current directory\n $currentDiv = $this->builder->build_div(NULL, $currentID, \n 'directory', $parsedPath[sizeof($parsedPath) -1], NULL);\n \n $package->add($currentDiv, $parent);\n \n $contents = scandir($path);\n $contents = array_diff($contents, $this->excludes);\n \n // If the content item is a file, create a div containing a \n // file object pointer that refers to a file object within this mets document. \n // If it's a directory make a recusrive call.\n foreach ($contents as $item) {\n if (is_file($path . '/' . $item)) {\n $trimPath = rtrim($path, '/');\n $this->handle_file($trimPath, $item, $package, $currentID);\n } else if (is_dir($path . '/' . $item)) {\n $this->handle_directory($path . '/' . $item, $package, $currentID);\n }\n }\n \n }", "title": "" }, { "docid": "97a676c04451c0867a7f5ba6167a62f8", "score": "0.5238197", "text": "function addModuleDir( $moduleType, $dir )\n\t{\n\t\tif( !isset( $this->_moduleDirs[$moduleType] ) )\n\t\t\t$this->_moduleDirs[$moduleType]\t=\tarray();\n\t\tif( is_array( $dir ) )\n\t\t\t$this->_moduleDirs[$moduleType] = array_merge( $this->_moduleDirs[$moduleType], $dir );\n\t\telse\n\t\t\tarray_push( $this->_moduleDirs[$moduleType], $dir );\n\t}", "title": "" }, { "docid": "3d92907a0b035884a4af974226abb7eb", "score": "0.5237916", "text": "private function addCssDir($dir, $file) {\n\t\tif (!isset($this->moduleDirs[$dir])) return; // no modules in this directory\n\t\t\n\t\tforeach ($this->moduleDirs as $moduleDir => $modules) {\n\t\t\tif (substr($moduleDir, 0, strlen($dir)) !== $dir) continue;\n\t\t\t\n\t\t\tforeach ($modules as $module) {\n\t\t\t\t$this->moduleMap[$module]['css'][] = $file;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4bf5c19a1cdf74ef4b059131dbd6fecc", "score": "0.52291816", "text": "function scan ( $path )\r\n\t\t{\r\n\t\t\t$thisdir = array();\r\n\t\t\t$folders = array();\r\n\t\t\t$files = array();\r\n\t\t\tif ($handle = opendir($path))\r\n\t\t\t{\r\n\t\t\t\t//\tRead all directory entries\r\n\t\t\t\twhile ($filename = readdir($handle))\r\n\t\t\t\t{\r\n\t\t\t\t\t//\tExclude Files with a leading '.' (. / .. / .htaccess ...)\r\n\t\t\t\t\tif (substr($filename, 0, 1) != \".\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//\tStore Folders and Files in different arrays (for sort purpose)\r\n\t\t\t\t\t\tif (is_dir(\"$path/$filename\"))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$folders[] = $filename;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$files[] = $filename;\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\tclosedir($handle);\r\n\t\t\t\t//\tAdd Directories to the Output List\r\n\t\t\t\tif ($this->include_folders)\r\n\t\t\t\t{\r\n\t\t\t\t\tsort($folders);\r\n\t\t\t\t\tforeach ($folders as $filename)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($this->recursive)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$thisdir[] = $this->scan( \"$path/$filename\" );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$thisdir[] = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"NAME\"\t\t=>\t$filename,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"TYPE\"\t\t=>\t'Folder',\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//\tAdd Files to the Output List\r\n\t\t\t\tif ($this->include_files)\r\n\t\t\t\t{\r\n\t\t\t\t\tsort($files);\r\n\t\t\t\t\tforeach ($files as $filename)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$extension = strtolower(substr( strrchr($filename, '.') , 1));\r\n\t\t\t\t\t\tif (!empty($this->include_extensions))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$include = in_array($extension, $this->include_extensions);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telseif (!empty($this->exclude_extensions))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$include = !in_array($extension, $this->exclude_extensions);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$include = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ($include)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$mtime = filemtime(\"$path/$filename\");\r\n\t\t\t\t\t\t\t$size = filesize(\"$path/$filename\");\r\n\t\t\t\t\t\t\t$thisdir[] = array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"NAME\"\t\t=>\t$filename,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"EXT\"\t\t=>\t$extension,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"TYPE\"\t\t=>\t'File',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"BYTE\"\t\t=>\t$size,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"KB\"\t\t=>\tceil($size/1024),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"SIZE\"\t\t=>\tceil($size/1024) . ' KB',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"MTIME\"\t\t=>\t$mtime,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"CHANGED\"\t=>\tdate('d.m.Y H:i', $mtime),\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $thisdir;\r\n\t\t}", "title": "" }, { "docid": "72fdbf54d1718c9653011d8c34a74f91", "score": "0.521493", "text": "private function setDirectory() {\n\t\t\tif(!is_null($this->folder)) {\n\t\t\t\tif(!file_exists($this->targetDir.$this->folder)) {\n\t\t\t\t\tif(!mkdir($this->targetDir.$this->folder, 0777)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->targetDir .= $this->folder.'/';\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "719912b33e8d1193c6ac305ce3396541", "score": "0.5208929", "text": "private function recursive_directory_search($dir){\n\n\t\t$iterator = new DirectoryIterator($dir);\n\n\t\tforeach ($iterator as $item) {\n\n\t\t\tif ($item->isDir() && !$item->isDot()){ // Ignore dots and anything that is not a directory\n\t\n\t\t\t\t// We only care about the path after Genome\n\t\t\t\t$trimmed_path = explode(\"Genome/\",$item->getPathname());\n\n\t\t\t\t// Check for valid gene paths\n\t\t\t\t$gene = explode(\"/\",end($trimmed_path));\n\n\t\t\t\tif (count($gene) == 3){\n\n\t\t\t\t\t$this->genes[] = [\n\t\t\t\t\t\t\n\t\t\t\t\t\t'iso_code'=> $gene[0],\n\t\t\t\t\t\t'state' => $gene[1],\n\t\t\t\t\t\t'name' => end($trimmed_path)\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Iterate over only valid paths\n\t\t\t\tif ($gene[0] != '.git'){\n\n\t\t\t\t\t$this->recursive_directory_search(\"$dir/$item\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c5f06774f2ee0fe6aa487d50b2998848", "score": "0.5205475", "text": "protected function findFileLookup($class)\r\n\t{\r\n\t\tif (false !== $pos = strrpos($class, '\\\\')) {\r\n\t\t\t// namespaced class name\r\n\t\t\t//$classPath = str_replace('\\\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)) . DIRECTORY_SEPARATOR;\r\n\t\t\t//$className = substr($class, $pos + 1);\r\n\r\n\t\t\t// TODO: optimize this path search using partial hashing\r\n\t\t\t// AppTogether\\Core\\ImageProvider ->\r\n\t\t\t// AppTogether\r\n\t\t\t// AppTogether\\Core\r\n\t\t\t// grab all the namespace parts:\r\n\t\t\t// $parts = explode $class into [AppTogether, AppTogether\\Core]\r\n\t\t\t// then go backwards from the longest path to the shortest\r\n\t\t\t// to find the MOST-fitting prefix\r\n\t\t\t// if(isset($this->paths[$parts[0]]))\r\n\t\t\t// this should minimize amount of file_exists and other heavy system-calls\r\n\r\n\t\t\t// all this works makes it just 20% faster\r\n\t\t\t// the file_exists() call is probably optimized away well enough without my help\r\n\t\t\t$namespace = substr($class, 0, $pos);\r\n\t\t\t$namespace = trim($namespace, '\\\\');\r\n\t\t\t$pathFragments = explode('\\\\', $namespace);\r\n\t\t\t$possiblePrefixes = [];\r\n\t\t\t$pathBuilder = \"\";\r\n\t\t\tforeach($pathFragments as $fragment)\r\n\t\t\t{\r\n\t\t\t\t$pathBuilder .= '\\\\' . $fragment;\r\n\t\t\t\t$possiblePrefixes []= $pathBuilder;\r\n\t\t\t}\r\n\t\t\t$possiblePrefixes = array_reverse($possiblePrefixes);\r\n\r\n\t\t\t//var_dump($possiblePrefixes);\r\n\t\t\t//var_dump($this->paths);\r\n\r\n\t\t\tforeach($possiblePrefixes as $possiblePrefix)\r\n\t\t\t{\r\n\t\t\t\tif(isset($this->paths[$possiblePrefix]))\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach($this->paths[$possiblePrefix] as $path)\r\n\t\t\t\t\t{ // for each possible folder\r\n\r\n\t\t\t\t\t\t// normalize paths\r\n\t\t\t\t\t\t$path = rtrim($path, DIRECTORY_SEPARATOR);\r\n\t\t\t\t\t\t$prefix = trim($possiblePrefix, '\\\\') . '\\\\';\r\n\r\n\t\t\t\t\t\t// get the partial namespace/class path trimming the prefix portion\r\n\t\t\t\t\t\t$partialNamespace = str_replace($prefix, '', $class) . '.php';\r\n\t\t\t\t\t\t$partialPath = str_replace('\\\\', DIRECTORY_SEPARATOR, $partialNamespace);\r\n\t\t\t\t\t\t$possibleFilePath = $path . DIRECTORY_SEPARATOR . $partialPath;\r\n\r\n\t\t\t\t\t\t//var_dump(\"search: $class -> $possibleFilePath\");\r\n\r\n\t\t\t\t\t\tif(file_exists($possibleFilePath))\r\n\t\t\t\t\t\t\treturn $possibleFilePath;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "611a349cd14445b5da5eb6cb53f01fc2", "score": "0.51951873", "text": "public static function addDirectories($directories)\n {\n static::$directories = array_merge(static::$directories, (array) $directories);\n static::$directories = array_unique(static::$directories);\n }", "title": "" }, { "docid": "6985683606a10e71b763edcc53a56632", "score": "0.5191844", "text": "public function addDefaultFolders(){}", "title": "" }, { "docid": "fe756e24e40ef26519e904c2be398e0b", "score": "0.5180057", "text": "public static function addConfigsFromDir($dir)\n\t{\n\t\t$file_list = array_diff(scandir($dir), ['.', '..']);\n\n\t\tforeach ($file_list as $file) {\n\t\t\tstatic::addConfig($file);\n\t\t}\n\t}", "title": "" }, { "docid": "eda83843d7a2cc761051166ee0912f1d", "score": "0.5170791", "text": "function incDir(string $dir) {\n $res = PATH_SEPARATOR . $dir;\n $list = scandir($dir);\n array_shift($list);\n array_shift($list);\n foreach ($list as $l) {\n $file = $dir . '/' . $l;\n if (is_dir($file)) {\n $res .= incDir($file);\n }\n }\n return $res;\n}", "title": "" }, { "docid": "8974ff5c98bdab6e7fc9c9d858155176", "score": "0.51581335", "text": "function autoload($clase, $dir=null){\r\n if(is_null($dir)){\r\n $dir = realpath(dirname(__FILE__));\r\n }\r\n \r\n //Escaneo en busca de la clase de forma recursiva\r\n foreach (scandir($dir) as $file) {\r\n //Si es un directorio (y no es de sistema), busco la clase dentro de él\r\n if (is_dir($dir.\"/\".$file) AND substr($file, 0, 1 ) !== '.'){\r\n autoload($clase, $dir.\"/\".$file);\r\n }\r\n //Si es archivo y el nombre coincide con la clase\r\n else if (is_file($dir.\"/\".$file) AND $file == $clase.\".php\"){\r\n require($dir.\"/\".$file);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "97c34813a77788935a3d94922ddd648b", "score": "0.51518214", "text": "public function getDirectory();", "title": "" }, { "docid": "8e7935e1dbdfb2177cf9e6256e2539c6", "score": "0.51372063", "text": "private static function preloadFrameworkClasses(): void\n {\n $dir = new RecursiveDirectoryIterator(__DIR__, RecursiveDirectoryIterator::KEY_AS_PATHNAME);\n\n /** @var \\SplFileInfo[] $iterator */\n $iterator = new RecursiveIteratorIterator($dir, RecursiveIteratorIterator::SELF_FIRST);\n foreach ($iterator as $fileInfo) {\n if (!$fileInfo->isFile()) {\n continue;\n }\n\n include_once $fileInfo->getPathname();\n }\n }", "title": "" }, { "docid": "cba0f66c0147f66ba40d41092593db80", "score": "0.5132086", "text": "public function getClassesNamespaceEntryPath();", "title": "" }, { "docid": "0291c08c21f3c70522f2564efaaf9c97", "score": "0.5130128", "text": "public function testCrawlDir() {\n $config = Repoman::load_config(dirname(dirname(__FILE__)));\n $Repoman = new Repoman(self::$modx,$config);\n $objects = $Repoman->crawl_dir(dirname(__FILE__).'/pkg7/seeddata/');\n\n $this->assertTrue(isset($objects['modMenu']), 'modMenu should have been detected in directory.');\n $this->assertTrue(isset($objects['modResource']), 'modResource should have been detected in directory.');\n foreach ($objects as $classname => $info) {\n foreach ($info as $k => $Obj) {\n if ($classname == 'modMenu') {\n $this->assertTrue($Obj->get('description') == '88CQMLEZMS', 'Menu description incorrect.'); \n }\n if ($classname == 'modResource') {\n $this->assertTrue($Obj->get('description') == 'ZHD5I3KWRN', 'Page description incorrect.'); \n }\n }\n }\n }", "title": "" }, { "docid": "5d71df37c552ebfed9bcc91ff5466a02", "score": "0.5116515", "text": "public function allDirectories($directory = null)\n {\n // TODO: Implement allDirectories() method.\n }", "title": "" }, { "docid": "ecbbe37d820417d508b11cf916e107a1", "score": "0.51098704", "text": "public static function searchDirectories($searchString, $startingDirectory = __DIR__) {\n list($files, $directories) = static::search($searchString, [], $startingDirectory);\n return $directories;\n }", "title": "" }, { "docid": "f735a5311555eb6b2d8e4e675f4aff78", "score": "0.51058537", "text": "function loadClasses() {\n\t\t$this->parsers = $this->_loadClasses($this->config['dirs']['parsers'], 'Parser');\n\t\t$this->renderers = $this->_loadClasses($this->config['dirs']['renderers'], 'Renderer');\n\t\t$this->modules = $this->_loadClasses($this->config['dirs']['modules'], 'Module');\n\n\t\tforeach ($this->callbacks as $callback) {\n\t\t\tkrsort($callback);\n\t\t}\n\t}", "title": "" }, { "docid": "0a72851bdfebd70d60c63aa505bda8a3", "score": "0.5103247", "text": "public function addDir(Finder $dir)\n {\n $this->resources[] = $dir;\n return $this;\n }", "title": "" }, { "docid": "3c193fbcabea8eb11f8ace8f9d37accc", "score": "0.5096067", "text": "function AllFile($dir, &$results = array()){\r\n $files = scandir($dir);\r\n\r\n foreach($files as $key => $value){\r\n $path = realpath($dir.DIRECTORY_SEPARATOR.$value);\r\n if(!is_dir($path)) {\r\n $results[] = $path;\r\n } else if($value != \".\" && $value != \"..\") {\r\n AllFile($path, $results);\r\n $results[] = $path;\r\n }\r\n }\r\n\r\n return $results;\r\n}", "title": "" }, { "docid": "9ea7307f690170c4233a301e4612c4af", "score": "0.5091756", "text": "public function directory() {\n\n\t\t// load the database and model\n\t\t$this->load->model('users_model');\n\n\t\t// set the page data\n\t\t$data = array(\n\t\t\t'users'\t\t=> $this->users_model->all_users()\n\t\t);\n\n\t\t// build the page\n\t\t$this->build('directory', $data);\n\n\t}", "title": "" }, { "docid": "24fd091b7758d4d8edd3d5358e37504c", "score": "0.5091388", "text": "function scanDirInDir(string $dir) : array\n\t{\n\t\t$dirContents = array_diff(dirScanner($dir), ['.', '..']);\n\t\t$newDirs = [];\n\t\tif (empty($dirContents)) return [];\n\t\tforeach ($dirContents as $dirContent):\n\t\t\t$newDir = $dir.$dirContent.getConstant('DS', TRUE);\n\t\t\tif (is_dir($newDir)):\n\t\t\t\t$newDirs[] = $newDir;\n\t\t\t\t$result = scanDirInDir($newDir);\n\t\t\t\t$newDirs = array_merge($result, $newDirs);\n\t\t\tendif;\n\t\tendforeach;\n\t\treturn $newDirs;\n\t}", "title": "" }, { "docid": "4174eba2e1130967eaba6067047029c4", "score": "0.50855696", "text": "function find_files_with_dir($dir, &$dir_array)\n{\n $files = scandir($dir);\n \n if(is_array($files))\n {\n foreach($files as $val)\n {\n // Skip home and previous listings\n if($val == '.' || $val == '..')\n continue;\n \n // If directory then dive deeper, else add file to directory key\n if(is_dir($dir.'/'.$val))\n {\n // Add value to current array, dir or file\n $dir_array[$dir][] = $val;\n \n find_files($dir.'/'.$val, $dir_array);\n }\n else\n {\n $dir_array[$dir][] = $val;\n }\n }\n }\n ksort($dir_array);\n}", "title": "" }, { "docid": "5ca171659becc37ba24bc91d7c4e516f", "score": "0.50836796", "text": "public function loadDirectory($path)\n {\n if (! is_dir($path)) { return; }\n \n foreach(new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($path)) as $file) {\n\n if ($file->isFile() && preg_match('/.php$/', $file->getFilename())) {\n $pathname = $file->getPathname();\n $this->_files[] = $pathname;\n require_once $pathname;\n } \n }\n }", "title": "" }, { "docid": "1636b6b561414f18472aec11b50f05b8", "score": "0.5081296", "text": "function process_dir( $dir )\r\n {\r\n $count = 0;\r\n $files = scandir($dir);\r\n\r\n foreach ($files as $r) {\r\n\r\n\t // parse the path and determine the type of file\r\n\t $parts = pathinfo( $r );\r\n\t $b = $parts['basename'];\r\n\t $e = $parts['extension'];\r\n\t $f = $parts['filename'];\r\n\r\n if ($r === '.' or $r === '..') continue;\r\n \r\n // Ignore the raw directory for now ...\r\n if ( $r == 'raw') continue;\r\n\r\n // Ignore index.html\r\n if ( $r == 'index.html' ) continue;\r\n\r\n\t // XXX Need to fix filenames with & in them\r\n\t if ( $i = strchr( $r, '&' ) ) {\r\n\t\t$old = $dir . '/' . $r;\r\n\t\t$r = str_replace( '&', '+', $r);\r\n\t\t$new = $dir . '/' . $r;\r\n\t\trename ( $old, $new );\r\n\t }\r\n\r\n // Reasemble the path name\r\n $r = $dir . '/' . $r;\r\n\r\n // If it is a directory place it on a directory stack\r\n if ( is_dir( $r ) ) {\r\n self::$dirs[] = $r;\r\n continue;\r\n }\r\n\r\n // Stash the file into the appropraite array\r\n if ( $e == 'csv') {\r\n self::$csvfiles[] = $r;\r\n } elseif ( $e == 'html' ) {\r\n self::add_html_file( $r, $parts );\r\n } else {\r\n self::$unknownfiles[] = $r;\r\n }\r\n }\r\n \r\n self::$logs[] .= \" processed $count files, finished<br/>\";\r\n }", "title": "" }, { "docid": "062570ef470af427291e29357ef89a6e", "score": "0.50700593", "text": "public static function setupDirectories()\n\t{\n\t\tforeach (self::$required_directories as $dir) {\n\t\t\t// self::log(self::LOG_DEBUG, \"Checking directory \" . $dir);\n\t\t\tif (!file_exists($dir)) {\n\t\t\t\tif (!mkdir($dir)) {\n\t\t\t\t\tthrow new \\Exception(\"Couldn't make directory: {$dir}\");\n\t\t\t\t}\n\t\t\t\t// self::log(self::LOG_INFO, \"Made directory \" . $dir);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9ce4363406e00fc898bbecd8473936f9", "score": "0.50698864", "text": "public function getClassFiles();", "title": "" }, { "docid": "02a2974d78d7e2db8769afa162596c90", "score": "0.5059175", "text": "public function discoverServices()\n {\n $servicesPath = __DIR__ . '/' . self::SERVICES_NAMESPACE;\n $dirContents = scandir($servicesPath);\n\n // Getting self namespace\n $reflectionClass = new ReflectionClass($this);\n $servicesNamespace = $reflectionClass->getNamespaceName() . '\\\\' . self::SERVICES_NAMESPACE;\n foreach ($dirContents as $item) {\n // Only valable for classes\n if (is_file($servicesPath . '/' . $item) && strpos($item, '.php') === strlen($item) - 4) {\n $className = $servicesNamespace . '\\\\' . substr($item, 0, -4);\n $serviceName = $className::getServiceName();\n\n if (!empty($serviceName) && !isset($this->services[$serviceName])) {\n $this->services[$serviceName] = new $className($this);\n }\n }\n }\n }", "title": "" }, { "docid": "f2dd5a61eee030ce3c4e6ba6aeafc2b7", "score": "0.5054704", "text": "public static function getClasses($dir)\n {\n if (is_array($dir)) {\n $files = [];\n\n foreach ($dir as $directory) {\n $files[] = self::getDirectoryFiles($directory, true, true);\n }\n\n $files = self::collapseArray($files, true);\n } else {\n $files = self::getDirectoryFiles($dir, true, true);\n }\n\n foreach ($files as $key => $file) {\n $file_name = explode(DIRECTORY_SEPARATOR, $file);\n $file_name = end($file_name);\n\n $extension = explode('.', $file_name);\n $extension = end($extension);\n\n if ($extension == !'php' || !is_file($file) || substr($file_name, 0, 1) == '.') {\n unset($files[$key]);\n }\n }\n\n return $files;\n }", "title": "" }, { "docid": "c9dbf511a3d3e29858add331f7b41462", "score": "0.50500995", "text": "private function classWizard($class) {\r\n\t\t$class = str_replace('\\\\','/',$class);\r\n $classParts = explode(\"/\", $class);\r\n\r\n\t\t$path = ROOT_DIR;\r\n if(array_key_exists($classParts[0], $this->areas)) {\r\n\t\t\t$path .= $this->areas[$classParts[0]];\r\n\t\t\t$path .= ucfirst(str_replace($classParts[0] .'/', '/', $class));\r\n\r\n } elseif (array_key_exists($classParts[1], $this->areas)) {\r\n\t\t\t$path .= $this->areas[$classParts[1]];\r\n\t\t\t$path .= '/'. ucfirst($classParts[2]);\r\n\r\n\r\n\t\t} else $path .= $class;\r\n\r\n\t\treturn $path . '.php';\r\n }", "title": "" }, { "docid": "c7bf5f65751de81170558befc1121d5d", "score": "0.5045843", "text": "private function directoryScan($dir) {\n\t\t\n\t\t// check for the validity of input / working directory\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tdie(\"'$dir' is not a directory.\".LE);\n\t\t}\n\t\t\n\t\t// listing directory contents\n\t\t\n\t\t$result = [];\n\t\t\n\t\t$root = scandir($dir);\n\t\tforeach($root as $value)\n\t\t{\n\t\t\t// removing dots & output directory\n\t\t\t\n\t\t\tif($value === '.' || $value === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// listing only files\n\t\t\t\n\t\t\tif(is_file(\"$dir\".DS.\"$value\")) {\n\t\t\t\t$result[$value]=\"$dir\".DS.\"$value\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// recursive call to self(this method) so we can get files listing recursively\n\t\t\t\n\t\t\tforeach($this->directoryScan(\"$dir\".DS.\"$value\") as $value1)\n\t\t\t{\n\t\t\t\t$result[basename($value1)]=$value1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "93c1cda686170a6df72829d070ba49eb", "score": "0.50355726", "text": "private function registerDirs(Loader $loader, Config $config)\r\n\t{\r\n\t\t// register common directories for all apps\t\t\r\n\t\t$loader->registerDirs($this->commonDirs($config),true);\r\n\t\t// check if there is a directory method for the current app\r\n\t\tif (method_exists($this,$this->appName . 'Dirs')) {\r\n\t\t\t// register the directories for the current app\r\n\t\t\t$loader->registerDirs($this->{$this->appName . 'Dirs'}($config),true);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "55e8e03193c2e31397060effc9abb0e2", "score": "0.5031197", "text": "public function processDirectory($dir)\n {\n $dh = opendir($dir);\n if (!$dh) { print \"Can't open directory $dir\\n\"; return; }\n\n while ($file = readdir($dh)) {\n if ($file{0} == '.') { // skip hidden files and directories\n continue;\n }\n if (is_dir($dir . $file)) {\n $this->processDirectory($dir . $file . '/');\n } else {\n if (filesize($dir . $file) > $this->sizeThreshold) {\n print \"File $dir$file is bigger than threshold set ({$this->sizeThreshold} bytes)\\n\";\n continue;\n }\n\n $extension = pathinfo($file, PATHINFO_EXTENSION);\n if (empty($this->allowedExtensions) or in_array($extension, $this->allowedExtensions)) {\n if (!is_readable($dir . $file) or !is_writeable($dir . $file)) {\n print \"Can't read/write file $dir$file\\n\";\n continue;\n }\n $contents = file_get_contents($dir . $file);\n if (is_null($this->pattern)) {\n if (strpos($contents, $this->search) !== false) {\n $contents = str_replace($this->search, '', $contents);\n file_put_contents($dir . $file, $contents);\n $this->counter++;\n } else {\n }\n } else {\n if (preg_match('/' . $this->pattern . '/Uim', $contents, $match)) {\n $contents = str_replace($match[0], '', $contents);\n file_put_contents($dir . $file, $contents);\n $this->counter++;\n } else {\n }\n }\n\n }\n }\n }\n }", "title": "" } ]
e82f663a0a6a2a65a81cfe78246a7702
/ compute how many records from the original_records does the root exists
[ { "docid": "38fbd78204a885de73cbcb4c8e4f86f9", "score": "0.0", "text": "private function roots_lessthan_15percent_removal_step($original_records, $all_roots, $final_from_main)\n {\n foreach($original_records as $page_id) {\n $ancestries[] = self::get_ancestry_via_DH($page_id);\n }\n foreach($all_roots as $root) {\n if(!isset($final[$root])) $final[$root] = 0;\n foreach($ancestries as $anc) {\n if(in_array($root, $anc)) @$final[$root]++;\n }\n }\n // print_r($final); //good debug\n /* get those that are < 15% */\n $remove = array();\n foreach($final as $root => $count) {\n $percentage = ($count/count($original_records))*100;\n $final2['roots % in original records'][$root] = $percentage;\n if($percentage < 15) $remove[] = $root;\n }\n if($GLOBALS['ENV_DEBUG']) print_r($final2);\n // echo \"\\nremove: \"; print_r($remove);\n if($remove) {\n /* remove from $final_from_main those with roots that are < 15% coverage in $original_records */\n foreach($final_from_main as $page_id => $ancestry) {\n if($ancestry) {\n $orig_ancestry = $ancestry;\n $root = array_pop($ancestry); //the last rec from an array\n if(in_array($root, $remove)) {}\n else $final3[$page_id] = $orig_ancestry;\n }\n else $final3[$page_id] = $ancestry;\n }\n // echo \"\\nwent here 01\\n\";\n return $final3;\n }\n else {\n // echo \"\\nwent here 02\\n\";\n return $final_from_main;\n }\n }", "title": "" } ]
[ { "docid": "c5396f636d794b05c3e51b53d4b57013", "score": "0.61125994", "text": "public function totalParents() {\n $data = array();\n $query = $this->db->get('parents_info');\n foreach ($query->result_array() as $row) {\n $data[] = $row;\n }return count($data);\n }", "title": "" }, { "docid": "a0565c756c49f17352a3f8d9f024f784", "score": "0.600195", "text": "public function getChildCount() {}", "title": "" }, { "docid": "36d2c093b0a653ac11aea7bda489187d", "score": "0.5836114", "text": "public function count()\n {\n $arr = $this->applyFilters();\n if (count($this->group)>0)\n $arr = $this->applyGroup($arr);\n if (count($this->tree)>0)\n $arr = $this->applyTree($arr);\n $this->reset();\n return count($arr);\n }", "title": "" }, { "docid": "516a18ac7f9e3973894da7ef276afd61", "score": "0.57700884", "text": "function countSubRecords($uid,$where='')\t{\r\n\t\t$row = $this->getSubRecords ($uid,'COUNT(*)',$where,false);\r\n\t\t\r\n\t\treset($row);\r\n\t\t$row = current($row);\r\n\t\t$rc = intval($row['COUNT(*)']);\r\n\r\n\t\treturn $rc;\r\n\t}", "title": "" }, { "docid": "f261cf618dfee12dbc534accdef1fdb7", "score": "0.5768128", "text": "public function count()\n\t{\n\t\tif ($this->root)\n\t\t{\n\t\t\treturn count($this->root);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "6d6a1717d0c3bb3b776430d25d194fe9", "score": "0.57230574", "text": "public function getTotalRecords() {\n \treturn $this->size();\n }", "title": "" }, { "docid": "ac7ac91f8b4e50137733fef25fc79222", "score": "0.5708243", "text": "#[ReturnTypeWillChange] public function count()\n {\n return count($this->children);\n }", "title": "" }, { "docid": "0339ad09bb769e2d218919024052d84e", "score": "0.56811076", "text": "public function getRecordCount();", "title": "" }, { "docid": "8e17debf8fb459ef9658b00ae92b090c", "score": "0.56759423", "text": "function _count($root = DATATREE_ROOT)\n {\n $query = $this->_buildLoadQuery($root, true, DATATREE_BUILD_COUNT);\n if (empty($query)) {\n return 0;\n }\n Horde::logMessage('SQL Query by Horde_DataTree_Sql::_count(): ' . $query, 'DEBUG');\n return (int)$this->_db->getOne($query);\n }", "title": "" }, { "docid": "53e61297bb880b613d1ad0136d3305fc", "score": "0.5532356", "text": "function getNumberOfChilds(){\r\n return count($this->arrChilds);\r\n }", "title": "" }, { "docid": "52649193ad26e03bf16ffcf3fd8c34b6", "score": "0.5509429", "text": "function tree_count($tree, $options=NULL) {\n $count = 0;\n $search = $options['search'];\n $child_field = $options['child_field'] ?: 'children'; \n if(is_array($search)) list($key, $val) = $search; \n foreach($tree as $path => $node) {\n if(!$search || $node->$key == $val) $count++;\n $nc = count($node->$child_field);\n if($node->$child_field && is_array($node->$child_field) && count($node->$child_field)) {\n $count += tree_count($node->$child_field, $options);\n }\n }\n return $count;\n}", "title": "" }, { "docid": "2a6f36228b0d67e42fba55d9a3f9799c", "score": "0.5503721", "text": "public function count()\n {\n $return = 0;\n if (count($entityIDs = $this->findEntityIDs())) {\n\n if (count($this->searchFilter)) {\n $entityIDs = $this->applySearch($entityIDs);\n\n // Return result if not ids\n if (count($entityIDs) === 0) {\n return 0;\n }\n }\n\n $this->primary($entityIDs);\n $return = parent::count();\n }\n\n return $return;\n }", "title": "" }, { "docid": "53314302989c25c20bcefd2b800d06a7", "score": "0.54826653", "text": "public function countRecords() {\n $total = $this->find('count');\n \n return $total;\n }", "title": "" }, { "docid": "ce249871ecff0f5a4c01584ec60bb45a", "score": "0.54723936", "text": "abstract public function count(Record $record): int;", "title": "" }, { "docid": "179d77fff94dc4754142df365cdc8ecc", "score": "0.54616904", "text": "function count() : int { return count($this->data); }", "title": "" }, { "docid": "07241fcdd40b78c9e4156006a2298f86", "score": "0.5452986", "text": "public function count() {\n return count($this->records);\n }", "title": "" }, { "docid": "d42164ad005c5ce13f110ca233f1eac6", "score": "0.5446403", "text": "public function numChildren()\n\t{\n\t\tif ($this->cmisObject) {\n\t\t\tif ($this->cmisObject->BaseType == 'document') {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\n\t\t// if it's not a document, then lets return an arbitrary number\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "90d82945bec0e76c511619e9bb1bfa46", "score": "0.54438806", "text": "function record_count() {\r\n\t\t$this->db->from('incoming_materials');\r\n\t\t$this->db->where('is_deleted <>', '1');\r\n\t\t\r\n return $this->db->count_all_results();\r\n }", "title": "" }, { "docid": "f4b44375eb8112990fbfcef8af3fcfe8", "score": "0.54356706", "text": "public function record_count() {\n return $this->db->count_all(\"influencers\");\n }", "title": "" }, { "docid": "8331f58c382d5d2fa999f9ef24b9312a", "score": "0.54310894", "text": "public function countMatches() {\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "b71bb64d5502643ad18ef670dd5ca38c", "score": "0.5416375", "text": "function numEntries()\r\n\t{\r\n\t\treturn count($this->getEntries());\r\n\t}", "title": "" }, { "docid": "1f28575d30ec5f275c3d3b09f1537e3a", "score": "0.5399696", "text": "function countRecords(string $path): int;", "title": "" }, { "docid": "aaa36d7bfc81db6ab2434ee4b891f212", "score": "0.53888017", "text": "public function countKeys(){\n $i = 0;\n foreach($this->memory as $key => $value){\n $i = $i + count($this->memory[$key]);\n }\n return $i;\n }", "title": "" }, { "docid": "156e78de5f0d551b98b512c0723e78fa", "score": "0.53677064", "text": "function collectionGetSize() {\r\n\t\t$output = array();\r\n\t\t$where = '';\r\n\t\t$where .= build_limit($this->data['start'],$this->data['limit']);\r\n\t\t$query = \"SELECT * FROM `collection` \" . $where;\r\n\t\t$rets = $this->db->query_all($query);\r\n\t\tif ($rets == NULL) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(is_array($rets) && count($rets)) {\r\n\t\t\tforeach($rets as $ret) {\r\n\t\t\t\t$ar = array();\r\n\t\t\t\t$ar['collectionId'] = $ret->collectionId;\r\n\t\t\t\t$ar['collection'] = $ret->code;\r\n\t\t\t\t$code = $ret->code;\r\n\r\n# logic to be changed, need to calculate from the master_log table\r\n\t\t\t\t$query = \"SELECT count(*) ct from `image` WHERE `barcode` LIKE '$code%'\";\r\n\t\t\t\t$re = $this->db->query_one($query);\r\n\t\t\t\t$ar['imaged'] = $re->ct;\r\n\r\n\t\t\t\t$ar['notimaged'] = $ret->collectionSize - $re->ct;\r\n\t\t\t\t$output[] = $ar;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $output;\r\n\t}", "title": "" }, { "docid": "977955bf2b7a8837e90f5504f971e229", "score": "0.5357769", "text": "protected function _reportCountGoodRecords()\n {\n return count($this->_items);\n }", "title": "" }, { "docid": "0fa451515c9db6e99f122263514aa878", "score": "0.535235", "text": "public function count()\n {\n return count($this->children);\n }", "title": "" }, { "docid": "6501ebdc9606b9a1aa972f9225ba0164", "score": "0.5348205", "text": "public function countFieldMappings()\n {\n return count($this->localFields);\n }", "title": "" }, { "docid": "ab882002e8269f6c1cbbae141871bcc4", "score": "0.53474474", "text": "public function getTotalElementsCount(): int;", "title": "" }, { "docid": "187d3298da5c55d570cb97424534a32f", "score": "0.5330031", "text": "function GetNumRecords($restr=null)\n {\n $cacheid=$restr;\n if (is_array($restr))\n $cacheid=implode(\"|\",$restr);\n if ($restr == null)\n $cacheid=\" \";\n $cacheid=md5($cacheid);\n if (isset($this->numrecords[$cacheid]))\n {\n //\techo \"CACHE\";\n return $this->numrecords[$cacheid];\n }\n $c=count($this->GetRecords($restr,false,false,false,false,$this->primarykey));\n if (!is_array($this->numrecords))\n $this->numrecords=array();\n $this->numrecords[$cacheid]=$c;\n return $c;\n }", "title": "" }, { "docid": "87079fab53d3fc2f36322c1368c79f39", "score": "0.53287643", "text": "public function my_count() {\n\t\t$path = dirname(dirname(__DIR__)) .'/assets/img/uploads';\n\t\t$main = scandir($path);\n\t\tunset($main[0]);\n\t\tunset($main[1]);\n\t\t$counter = 0;\n\n\t\tforeach($main as $k => $v) {\n\t\t\t$child = scandir($path .\"/\".$v);\n\t\t\tforeach($child as $val) {\n\t\t\t\t\n\t\t\t\tif($val != '.' && $val != '..' && $val != '.keep') {\n\t\t\t\t\t$counter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\techo \"total images : \". $counter;\n\t\techo \"<br>\";\n\t\techo \"total table records : \" . $this->recipies->total_rows();\n\n\t}", "title": "" }, { "docid": "d9ccc583487c9c3c6e58c0d66bf72beb", "score": "0.5319013", "text": "public function numChildren()\n\t{\n\t\t// we don't know how many there might be, so we'll just say that there are for now\n\t\t// This is only used when drawing the tree so it's not critical to be accurate\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "e73dc87301fddb2b3e18c04a3dd14f69", "score": "0.5308179", "text": "public function count_entries_rec($catpath) {\n global $DB;\n\n $catids = explode('/', $catpath);\n $fooid = array_pop($catids); // First is an end of path empty string.\n $catid = array_pop($catids);\n\n $config = get_config('local_sharedresources');\n $shrconfig = get_config('sharedresource');\n\n $plugins = \\sharedresource_get_plugins();\n $plugin = $plugins[$shrconfig->schema];\n $elementnode = $plugin->getTaxumpath()['id'];\n\n $params = array('element' => $elementnode.':%', 'namespace' => $shrconfig->schema, 'value' => $catpath);\n $select = ' element LIKE ? AND namespace = ? AND value = ? AND entryid != 0 ';\n $count = $DB->count_records_select('sharedresource_metadata', $select, $params);\n\n $children = $this->get_children($catid);\n\n if ($children) {\n foreach ($children as $ch) {\n $chpath = $catpath.$ch->id.'/';\n $count += $this->count_entries_rec($chpath);\n }\n }\n\n return 0 + $count;\n }", "title": "" }, { "docid": "42853cbe29a9993a4bdd6f6fe4db8552", "score": "0.530772", "text": "function countDocs(&$tres)\n{\n $n = 0;\n foreach ($tres as $res) $n+= pg_num_rows($res);\n reset($tres);\n return $n;\n}", "title": "" }, { "docid": "3affe322435045fcf186ae2a35fd15ea", "score": "0.5305679", "text": "protected function _countChildren()\n {\n $_this = $this->getChildren();\n if ($_this) {\n return $_this->recursiveCount();\n }\n return 0;\n }", "title": "" }, { "docid": "292a655346d89edf709e3143140580e5", "score": "0.52937746", "text": "public static function count_all() {\n\t\tglobal $database;\n\t\t$sql = \"SELECT COUNT(*) FROM `\".static::$table_name.\"` WHERE `\" . static::primary_key_field() . \"` >= 1\";\n\t\t//if the table contains is_deleted, make sure to include WHERE is_deleted = 0\n\t\tif(in_array(\"is_deleted\", static::$db_fields)) \n\t\t\t$sql .= \" AND `is_deleted` = 0\";\n\t\t$sql .= \";\";\n\t\t\n \t\t$result_set = $database->query($sql);\n\t\t//return the total # of rows\n\t\t$row = $database->fetch_array($result_set);\n\t\treturn array_shift($row);\n\t}", "title": "" }, { "docid": "834fc40c383c8e22bd5741ade6a72010", "score": "0.52829623", "text": "abstract public function countRecord(/** @scrutinizer ignore-unused */ ARecord $record): int;", "title": "" }, { "docid": "bf3250b5b34cd92cef9fbd31072a8f04", "score": "0.52829254", "text": "public function countParts() {\n\n foreach($this->product_references->getParts() as $key => $part) {\n $part_counter = 0;\n\n foreach($this->conveyor as $key => $slot) {\n if($slot['part'] == $part) {\n $part_counter++;\n }\n\n }\n\n $result[$part] = $part_counter;\n }\n\n return $result;\n }", "title": "" }, { "docid": "b666641627d3c03d7c50d20e2d5aaf47", "score": "0.5281735", "text": "function numDocs($QDsimilarity){\r\n\t$count = 0;\r\n\tforeach($QDsimilarity as $key => $value){\r\n\t\tif($value == 0){\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t$count++;\r\n\t}\r\n\treturn $count;\r\n}", "title": "" }, { "docid": "35fbd7bcb3c21df838ff61d177a20b57", "score": "0.52808815", "text": "public function totalRecords()\n {\n return TfStandard::count();\n }", "title": "" }, { "docid": "a075431557f2886a9729bd101b22d91b", "score": "0.5276979", "text": "function getNumRows() {\n\t\t$resID = count($this->resultSet) -1;\n\t\treturn @sqlite_num_rows($this->resultSet[$resID]);\n\t}", "title": "" }, { "docid": "b6d246858984c2d57fb3cb4cc1738df3", "score": "0.5272202", "text": "function getTotalNumObjects()\r\n\t{\r\n\t\treturn $this->numTotalObjects;\r\n\t}", "title": "" }, { "docid": "25fa00723cb539a1a1b9905ce2735248", "score": "0.5255474", "text": "public function getTotalRowsToConvert()\n\t{\n\t\tif ( static::$rowsToConvert === NULL )\n\t\t{\n\t\t\tstatic::$rowsToConvert = static::$db->select('COUNT(*) as count', self::ARCHIVE_TABLE )->setKeyField('count')->first();\n\t\t}\n\t\n\t\treturn static::$rowsToConvert;\n\t}", "title": "" }, { "docid": "0097f90bee851b7e0710294a72172560", "score": "0.5245799", "text": "function count() : int\n {\n $this->setupIteratorTempArray();\n return count(array_keys($this->iteratorTempArray));\n }", "title": "" }, { "docid": "a7bb04c2c4a04cfc7b46ce2760d84541", "score": "0.52267", "text": "function GetNumRecords($restr = null)\n {\n $cacheid = $restr;\n if (is_array($restr))\n $cacheid = implode(\"|\", $restr);\n if ($restr == null)\n $cacheid = \" \";\n $cacheid = md5($cacheid);\n if (isset($this->numrecordscache[$cacheid]))\n {\n return $this->numrecordscache[$cacheid];\n }\n $c = count($this->GetRecords($restr, false, false, false, false, $this->primarykey));\n $this->numrecordscache[$cacheid] = $c;\n if ($restr == null)\n $this->numrecords = $c;\n return $c;\n }", "title": "" }, { "docid": "d14cc96d63e8fb2b62c84845a52a2cc1", "score": "0.52198946", "text": "public function count(): int\n {\n return count($this->resourceRecords);\n }", "title": "" }, { "docid": "d083da461360af66e2cf97a47d914a64", "score": "0.5207525", "text": "public function countParentArtworks()\n {\n return count($this->_parentartworks);\n }", "title": "" }, { "docid": "db22f561edb8235473eca8ed8358c74a", "score": "0.5196414", "text": "function count_deleted_lines()\n\t{\n\t\t$count = 0;\n\n\t\tfor ($i = 0, $size = count($this->_edits); $i < $size; $i++)\n\t\t{\n\t\t\t$edit = $this->_edits[$i];\n\n\t\t\tif (is_a($edit, 'diff_op_delete') || is_a($edit, 'diff_op_change'))\n\t\t\t{\n\t\t\t\t$count += $edit->norig();\n\t\t\t}\n\t\t}\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "5e14d758ee4577d0353caa7079757ae8", "score": "0.51914805", "text": "function test434() : int {\n $x = ['key' => ['other' => 'value']];\n $x['key']['arrayKey'] = [2];\n return count($x['key']['arrayKey']) + strlen($x['key']['other']);\n}", "title": "" }, { "docid": "f583af74dfac7e80dde893498cd1989b", "score": "0.5189211", "text": "public function found()\n {\n\n return count($this->geoObjects);\n\n }", "title": "" }, { "docid": "d34cd19d0b31ad5926f82ed3b892e76d", "score": "0.51758826", "text": "function count_all_num_rows()\n {\n return $this->db->count_all($this->tableName);\n }", "title": "" }, { "docid": "916fabce99da01092748ea61902f384d", "score": "0.5171922", "text": "function count_contents() {\n\t\t$total_items = 0;\n\t\tif (is_array($this->contents)) {\n\t\t\treset($this->contents);\n\t\t\twhile (list($products_id, ) = each($this->contents)) {\n\t\t\t\t$total_items += $this->get_quantity($products_id);\n\t\t\t}\n\t\t}\n\t\treturn $total_items;\n\t}", "title": "" }, { "docid": "de059d9ae06c64bae2fe7e6e231893a2", "score": "0.51716053", "text": "public function getAllRows()\n {\n /**\n * @var $collection Belvg_Storelocator_Model_Resource_Migrate_Collection\n */\n $count = 0;\n\n if ($this->helper('storelocator/migrate')->canMigrate()) {\n $collection = Mage::getModel('storelocator/migrate')->getCollection();\n $count = (int) count($collection->getAllIds());\n }\n\n return $count;\n }", "title": "" }, { "docid": "04ec5d9c159bb4625a44452e9e2146b8", "score": "0.51713914", "text": "function getChildCount($cell)\n\t{\n\t \treturn ($cell != null) ? $cell->getChildCount() : 0;\n\t}", "title": "" }, { "docid": "071cadb50db1bcc40cc2b07ca156feb0", "score": "0.51634204", "text": "public function getChildrenCount(): int;", "title": "" }, { "docid": "8f97055371ba7339ff5cb913aa236166", "score": "0.51628447", "text": "function count_records()\r\n {\r\n \t$this->db->select('*');\r\n \t$this->db->from('clients');\r\n \t$query = $this->db->get();\r\n \treturn $query->num_rows(); \r\n }", "title": "" }, { "docid": "822093c35fa610f8a5609f934486ab8a", "score": "0.51623917", "text": "public function countChildren()\n {\n return Sname::where('parent_id', $this->id)->count();\n }", "title": "" }, { "docid": "6dd7a266c5b2e10d71e5a2d325bcc149", "score": "0.5154904", "text": "public abstract function getFieldCount();", "title": "" }, { "docid": "3ac6e0f1f451286801333933baed70bc", "score": "0.51499945", "text": "public function count(){ \r\n return count($this->data);\r\n }", "title": "" }, { "docid": "ee48195f2efa0be678a591b3b17548af", "score": "0.5148007", "text": "public function count()\n {\n $this->loadUnsubscribed();\n\n $iterator = new IMP_Ftree_IteratorFilter($this);\n $iterator->add($iterator::NONIMAP);\n $iterator->remove($iterator::UNSUB);\n\n return iterator_count($iterator);\n }", "title": "" }, { "docid": "016746cbe1e35851900402dba329ca2e", "score": "0.5135702", "text": "public function count(){\n return count($this->array);\n }", "title": "" }, { "docid": "ecacfef9b328c5a556ef1a02f3556a34", "score": "0.5133603", "text": "public function count($refresh = FALSE) {\n $xml = simplexml_load_file($this->listUrl);\n // Number of sourceid elements beneath the top-level element\n $count = count($xml);\n return $count;\n }", "title": "" }, { "docid": "96671f2a321ea29bc24576fbddc90102", "score": "0.51232857", "text": "public function deepSize()\n {\n $total = sizeof($this->_errors);\n foreach ($this->_nested as $_nestedErrors) {\n $total = $total + $_nestedErrors->deepSize();\n }\n return $total;\n }", "title": "" }, { "docid": "aa0b55f1ba5cc3de5e4f38368d2d96b8", "score": "0.51214904", "text": "function count_added_lines()\n\t{\n\t\t$count = 0;\n\n\t\tfor ($i = 0, $size = count($this->_edits); $i < $size; $i++)\n\t\t{\n\t\t\t$edit = $this->_edits[$i];\n\n\t\t\tif (is_a($edit, 'diff_op_add') || is_a($edit, 'diff_op_change'))\n\t\t\t{\n\t\t\t\t$count += $edit->nfinal();\n\t\t\t}\n\t\t}\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "a3e72be2d9716318d0cf67d59a352195", "score": "0.51152354", "text": "function getRowCount() {\n\t\treturn (count($this->objects));\n\t}", "title": "" }, { "docid": "981f420b8974a807a84580d3a524fda1", "score": "0.5111184", "text": "public function get_number_of_unioned_subqueries();", "title": "" }, { "docid": "21abde8bfd58d62bd745d6586f7557ba", "score": "0.5111072", "text": "function ihc_drush_count_old_content($object, &$count) {\n // The following are known derivative labels. Don't count them!\n static $labels = array('pdf to swf','jpeg to swf','thumbnail','compressed mp4',\n 'JPEG 2000,','Medium sized JPEG', 'compressed to mp3');\n $mimeCount = array( );\n $count = 0;\n\n foreach($object as $ds) {\n $id = $ds->id;\n if ($ds->state != 'A') { continue; }\n\n // If the DSID is not a known type... we have some work to do.\n if ($id != 'OBJ' && !in_array($id, icu_DSIDs( ))) {\n $label = $ds->label;\n if (!in_array($label, $labels)) {\n ++ $count;\n $mime = $ds->mimetype;\n if (empty($mimeCount[$mime])) {\n $mimeCount[$mime] = 1;\n } else {\n ++ $mimeCount[$mime];\n }\n }\n }\n }\n\n // Special... if the $mimeCount['jpeg'] === $mimeCount['tiff'] and $mimeCount['jpeg'] > 0 then we\n // shall assume the jpegs are unnecessary and should not be counted. Remove them from the return.\n if (($mimeCount['image/jpeg'] > 0) && ($mimeCount['image/jpeg'] == $mimeCount['image/tiff'])) {\n $count -= $mimeCount['image/jpeg'];\n unset($mimeCount['image/jpeg']);\n }\n\n return ($count > 0 ? $mimeCount : FALSE);\n}", "title": "" }, { "docid": "ffd813b54c9765885eabf28dbeda37fb", "score": "0.5104748", "text": "function count_rows($array,$table)\n {\n $query = $this->db->get_where($table, $array);\n $rowcount = $query->num_rows();\n return $rowcount;;\n }", "title": "" }, { "docid": "2cbf7b990b02d548b0d03bcc4a45049e", "score": "0.5102124", "text": "function getCoeusRowCount($data) {\n\t$counts = array();\n\t\tforeach ($data as $row) {\n\t\t$counts[$row['record_id']] = 0;\n\t}\n\tforeach ($data as $row) {\n\t\tif ($row['redcap_repeat_instrument'] == \"coeus\") {\n\t\t\t$counts[$row['record_id']]++;\n\t\t}\n\t}\n\treturn $counts;\n}", "title": "" }, { "docid": "d82e05cc827107f0a47e7ebeca38e45c", "score": "0.5097802", "text": "public function getLength()\n {\n return count($this->getMatchedPaths());\n }", "title": "" }, { "docid": "1c88e56364f165aa598fd0124592d9bd", "score": "0.5096003", "text": "public function count_ids() {\n\t\treturn $this->find( -1, true );\n\t}", "title": "" }, { "docid": "e5d15c17e10c4c1555ff68ffd2241797", "score": "0.5092574", "text": "public function count () {\n\t\treturn count($this->data);\n\t}", "title": "" }, { "docid": "7c8e61f4b9ac5766896801ef3af330a3", "score": "0.50852394", "text": "public function getChildCount(array $data, $reset = false): int\n {\n // keep value\n static $count = 0;\n \n // if a reset is needed, for a fresh start\n if ($reset === true) {\n $count = 0;\n }\n \n // validate array\n if (is_array($data) && count($data)) {\n // loop through array\n foreach ($data as $key => $value) {\n // increase count\n $count ++;\n // if children are available, the process has to get restarted for deeper levels\n if (isset($value['children']) && is_array($value['children']) && count($value['children'])) {\n // resatrt the process\n $this->getChildCount($value['children']);\n }\n }\n }\n \n return $count;\n }", "title": "" }, { "docid": "f3a6f964397b73c4b5d3b1492c6d4e6c", "score": "0.5084371", "text": "protected function countRecords(): int\n {\n try {\n $stmt = $this->pdo->query(sprintf(\"SELECT COUNT(*) totalRecords FROM %s\", $this->smsOtpTable));\n $record = $stmt->fetch(PDO::FETCH_OBJ);\n return $record->totalRecords;\n } catch (\\PDOException $e) {\n if (strstr($e->getMessage(), 'no such table')) {\n error_log(sprintf(\"Creating table %s...\\n\", $this->smsOtpTable));\n $this->createSmsOtpTable();\n error_log(\"Creating call verification table...\\n\");\n $this->createCallVerificationTable();\n return 0;\n } else {\n throw new PDOException($e->getMessage(), $e->getCode());\n }\n }\n }", "title": "" }, { "docid": "51b4b03080a5f2a01ea98577cfc8aa69", "score": "0.5080857", "text": "function aff_rows()\n\t{\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "f10fbcfe1f8a7a95e24d0bf5c29ee6d5", "score": "0.5076728", "text": "function num_subfolder_photos($name_value, $path)\n{\n\n\t$query=$GLOBALS['db']->$GLOBALS['query_statement'](\"SELECT id FROM \".PREFIX.\"photos\n\t\t\t\t\t\tWHERE name='\".linpha_addslashes($name_value).\"' AND prev_path='\".linpha_addslashes($path).\"'\");\n\t$num=$query->RecordCount();\n\techo $num;\n}", "title": "" }, { "docid": "0978c3cd24e5d81627a26fc0d622477e", "score": "0.50750774", "text": "public function getTotal() {\n\t\n\t\t$query = $this->database->prepare(\"SELECT COUNT(*) FROM \" . self::entriesTable . \" WHERE forms_id=:forms_id\"); \n\t\t$query->bindValue(':forms_id', $this->forms_id, PDO::PARAM_INT); \n\t\t$query->execute();\n\t\tlist($count) = $query->fetch(PDO::FETCH_NUM); \n\t\treturn $count; \n\t}", "title": "" }, { "docid": "3893cb4fdf5d25c39edf259f0a5ce9a9", "score": "0.5074528", "text": "function size() {\r\n\t\treturn count ( $this->triples );\r\n\t}", "title": "" }, { "docid": "bc8a3aa43f47fec80dcd8fc40bb6f94b", "score": "0.50739104", "text": "public function countChildren()\n {\n $this->load(true);\n\n $count = count($this->campaigns) + count($this->layouts) + count($this->media) + count($this->events) + count($this->playlists);\n $this->getLog()->debug('Counted Children on %d, there are %d', $this->userId, $count);\n\n return $count;\n }", "title": "" }, { "docid": "100ab227a262ea4757145909a92c36bb", "score": "0.50732297", "text": "function getExtractableNodesCount()\r\n {\r\n $classList = eZContentObjectAkismet::getExtractableClassList();\r\n\r\n include_once( 'kernel/classes/ezcontentobjecttreenode.php' );\r\n $params = array(\r\n 'ClassFilterType' => 'include',\r\n 'ClassFilterArray' => $classList\r\n );\r\n\r\n $nodeCount = eZContentObjectTreeNode::subTreeCount( $params, 1 );\r\n return $nodeCount;\r\n }", "title": "" }, { "docid": "7a21bd94fa00bb05f3567538a11d740f", "score": "0.50730443", "text": "public function CountOfRecords()\n {\n $fname = fopen(\"name.txt\", \"r\");\n $count = 0;\n while (!feof($fname)) {\n fgets($fname, 4096);\n $count++;\n }\n return $count - 1;\n fclose($fname);\n }", "title": "" }, { "docid": "d4a3d36ab6a51e373f3b41585081ed49", "score": "0.50708234", "text": "function num_fields() {\r\n return count($this->Record)/2;\r\n }", "title": "" }, { "docid": "c5a9cce9f504e7e92e22a6dbdeab1e0c", "score": "0.5064296", "text": "function get_num_records(){\n return $this -> num_records;\n }", "title": "" }, { "docid": "e43659c0eddef71b79e5d9493f53ca5b", "score": "0.5059809", "text": "function getTotalRecords(){\n $ss=\"SELECT COUNT(*) FROM \".$this->ops['mysqlPrefix'].$this->getCurrentTable()->getName().\";\";\n $res=mysql_query($ss);\n return mysql_result($res,0);\n\t}", "title": "" }, { "docid": "5764ce2c5bc1d48360f5f3a01fcefe9b", "score": "0.50593305", "text": "public function size()\n {\n $this->loadData(0);\n return count($this->data);\n }", "title": "" }, { "docid": "a07b862d29f8d63d6fe59b10c822c57d", "score": "0.5059232", "text": "protected function _updateChildCount()\n {\n if (!in_array($this->getBehavior(), array(\n Mage_ImportExport_Model_Import::BEHAVIOR_REPLACE,\n Mage_ImportExport_Model_Import::BEHAVIOR_APPEND))) {\n return;\n }\n\n $categoryTable = Mage::getSingleton('core/resource')->getTableName('catalog/category');\n $categoryTableTmp = $categoryTable . '_tmp';\n $this->_connection->query(\"CREATE TEMPORARY TABLE IF NOT EXISTS {$categoryTableTmp} LIKE {$categoryTable};\n INSERT INTO {$categoryTableTmp} SELECT * FROM {$categoryTable};\n UPDATE {$categoryTable} cce\n SET children_count = (\n SELECT count(cce2.entity_id) - 1 as children_county\n FROM {$categoryTableTmp} cce2\n WHERE PATH LIKE CONCAT(cce.path,'%')\n );\n \");\n }", "title": "" }, { "docid": "b804dd3e0b4153f479ef701780d210f5", "score": "0.5057665", "text": "function count ()\r\n\t{\r\n\t\treturn parent::count(array(\r\n\t\t\t'pid' => $this->pid \r\n\t\t));\r\n\t}", "title": "" }, { "docid": "5b3730df34627243a6d50e429cb63ace", "score": "0.5055384", "text": "abstract public function countAffected();", "title": "" }, { "docid": "4828f51e9ff592db3724c85b5ce267c4", "score": "0.50551295", "text": "public function countItems() {\n\t\tparent::countItems();\n\n\t\t$sql = \"SELECT\t\tCOUNT(*) AS count \n\t\t\tFROM\t\twcf\".WCF_N.\"_group\n\t\t\tNATURAL JOIN \twcf\".WCF_N.\"_projectSvn \";\n\t\t$row = WCF::getDB()->getFirstRow($sql);\n\n\t\treturn $row['count'];\n\t}", "title": "" }, { "docid": "eaf9ccccdd7b163333022508997d0aa3", "score": "0.5049051", "text": "function total_rsegments(){\n\t\t\treturn count($this->rsegments);\n\t\t}", "title": "" }, { "docid": "4984b79f114a13c79411e54e8f649b1c", "score": "0.5048281", "text": "final function count()\n\t{\n\t\t$o = Db::query(\"SELECT COUNT(*) as cnt FROM $this->model_table $this->model_sql_join $this->model_sql_search\", $this->model_params)->fetchObj();\n\t\tif($o->cnt >= 0) {\n\t\t\treturn $o->cnt;\n\t\t}\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "d530c8d37030e6dfdc5f96ebda9bbe08", "score": "0.50471455", "text": "protected function getKeysCount()\n {\n return 0;\n }", "title": "" }, { "docid": "a131c1bac29a723f9cd0486b6e973445", "score": "0.5044579", "text": "function count_items_children($alias, $pointer) {\n global $cli_mode;\n if ($cli_mode) {\n global $skip_files_pattern; \n }\n else {\n $skip_files_pattern = Zend_Registry::get('skip_files_pattern');\n }\n $structure = get_compound_object_info($alias, $pointer);\n // i.e., Web services API says this item is not compound.\n $structure = simplexml_load_string($structure);\n if (is_object($structure)) {\n $pages = $structure->xpath('//page');\n }\n return count($pages);\n}", "title": "" }, { "docid": "fb615354974db0efeb9e8c9d10052722", "score": "0.5042794", "text": "public function testCountResourcesTree()\n {\n $rules = new Innovation();\n $game = self::createGame();\n $rules->startGame($game);\n $state = $rules->getCurrentState($game);\n\n $civilization = $state->getCivilizations()[0];\n $reforme = $state->getCard('reforme');\n $civilization->place($reforme);\n \n return $this->assertEquals(3, $civilization->countResources()[Card::RESOURCE_TREE]);\n }", "title": "" }, { "docid": "cb351c000892f20cda69d665248c4a8e", "score": "0.50370747", "text": "function load_all_title_call_count($title_call) {\r\n $this->db->select('id');\r\n $this->db->where('title_call', $title_call);\r\n $query = $this->db->get('structure_website_tree');\r\n $record = $query->row_array();\r\n // get count from structure_website_relations\r\n $this->db->where('id_tree', $record['id']);\r\n $this->db->from('structure_website_relations');\r\n return $this->db->count_all_results();\r\n }", "title": "" }, { "docid": "dc2435d3c429f31b07f024fbe475c69c", "score": "0.5031748", "text": "public function count() {\n\t\treturn count($this->data);\n\t}", "title": "" }, { "docid": "bc9c82f4366cf56e41dcd081f780807e", "score": "0.50315547", "text": "public function countAllRecord() {\n $this->checkForSoftDelete();\n $this->getQueryBuilder()->from($this->table);\n $this->db->getAll();\n return $this->db->numRows();\n }", "title": "" }, { "docid": "afc3a48297e6ed5ee1b997012e02c458", "score": "0.50314486", "text": "function nstNbChildren ($node)\n\t{ return (($node['r']-$node['l']-1)/2);\n\t}", "title": "" }, { "docid": "1a9954469e8e2f7bf75ac23afee9ad56", "score": "0.50309694", "text": "public function getFieldCount(): int;", "title": "" }, { "docid": "1bf44b1f7c17125330121427ba093a11", "score": "0.50236434", "text": "public function count() {\n return count($this->data);\n }", "title": "" }, { "docid": "00efceee018e85b6572e3a2e3039ddd0", "score": "0.50201243", "text": "public function recursiveCount()\n {\n $count=0;\n foreach ($this as $val) {\n $count++;\n if ($this->hasChildren()) {\n $count += $this->_countChildren();\n }\n }\n return $count;\n }", "title": "" }, { "docid": "08a2861277ed9d8de6d3cde20708ada0", "score": "0.50180554", "text": "public function countChildren(): int\n {\n return count($this->_children);\n }", "title": "" } ]
874bedac136ceae4677837406bad03fe
The name of our connect table.
[ { "docid": "52a95a9def5b425e366645c4d5503209", "score": "0.7479798", "text": "protected static function get_table() {\n return \"connect_role\";\n }", "title": "" } ]
[ { "docid": "155e76f25aed62cd80aa1ce670a7c2e9", "score": "0.75954336", "text": "public static function TABLE_NAME(): string\n\t{\n\t\treturn (self::TABLE_NAME);\n\t}", "title": "" }, { "docid": "df91289b36f9083f1368e4b3c503f661", "score": "0.7506295", "text": "public function table_name()\n {\n return $this->table_name;\n }", "title": "" }, { "docid": "40912b102f7629d85426156125fee90f", "score": "0.74742925", "text": "public function get_table_name(){\n return $this->table_name();\n }", "title": "" }, { "docid": "f258b834b402cd48b9af14d8a3290ef9", "score": "0.7458531", "text": "protected function getTableName(): string {\n return self::TABLE_NAME;\n }", "title": "" }, { "docid": "5db38ea28d4a5f919a2139ed32700175", "score": "0.7415234", "text": "static public function get_table_name() {\n return static::$tableName;\n }", "title": "" }, { "docid": "068d2af5c75bc509b1fd8133609e6671", "score": "0.7415158", "text": "public static function getTableName()\n {\n return self::getConfig()->get('scheme/tableName');\n }", "title": "" }, { "docid": "599dd8cb66fe9bb9cb840d8fa4817340", "score": "0.7359348", "text": "function table_name() {\n\t\tif ($this->table) {\n\t\t\treturn $this->table;\n\t\t} else {\n\t\t\treturn $this->_get_type();\n\t\t}\n\n\t}", "title": "" }, { "docid": "63ceeb6d6b86c89d7c4fe4508a51730e", "score": "0.7340621", "text": "public static function getTableName()\n {\n return self::getDatabaseName() . '.' . self::NAME;\n }", "title": "" }, { "docid": "bd4e41d39ec7406925a75fd95ab82db1", "score": "0.7340338", "text": "public static function getTableName()\n {\n return _DB_PREFIX_ . self::$definition['table'];\n }", "title": "" }, { "docid": "9582031d66f62deef781fff50e8cfb54", "score": "0.73354405", "text": "public function getTableName() {\n\t\treturn 'wcf'.WCF_N.'_linklist_link';\n\t}", "title": "" }, { "docid": "886fd5e3537ad2fd6befaa638bde97d3", "score": "0.73187184", "text": "public function getTableName() {\n\t\treturn self::$TABLE_NAME;\n\t}", "title": "" }, { "docid": "db13c168c861dc6f0a138a4238876c1f", "score": "0.7312898", "text": "public static function getTableName() {\r\n\t\t\r\n\t\treturn static::properties()->table->getName();\r\n\t\t\r\n\t}", "title": "" }, { "docid": "58b381d8fa59e64d08f72927496a2899", "score": "0.73116297", "text": "public static function getTableName()\n\t{\n\t\treturn self::$table_name;\n\t}", "title": "" }, { "docid": "fddcbe457c7e46a9b8243180fa3508bd", "score": "0.73058856", "text": "public function table(): string\n {\n return $this->config->table;\n }", "title": "" }, { "docid": "a0271646e95eaa65fd50c552422aa291", "score": "0.7298078", "text": "public function get_table_name()\r\n\t{\r\n\t\treturn $this->table_name;\r\n\t}", "title": "" }, { "docid": "b2ade445eabcecd3755dc67d5379b935", "score": "0.728511", "text": "public function getTableName()\n {\n return $this->__get(\"table_name\");\n }", "title": "" }, { "docid": "ab8179e40c3c16b35520cf5412dd017b", "score": "0.727553", "text": "public function getTableName()\n {\n return $this::TABLE;\n }", "title": "" }, { "docid": "05a8778e8cc3ac2fe3390e49c860a4cc", "score": "0.7274218", "text": "public function get_table_name() \n\t{\n\t\treturn $this->table_name;\n\t}", "title": "" }, { "docid": "1b05cfe19f1735e6e76cdafe8a664a2f", "score": "0.7248265", "text": "public static function getTableName()\n\t{\t\n\t\treturn self::$table_name;\n\t}", "title": "" }, { "docid": "b6ea064312af184759259fba637e160f", "score": "0.7245785", "text": "public function getTableName()\r\n {\r\n return $this->table_name;\r\n }", "title": "" }, { "docid": "064d7aaa84b07e1f9da04efa35557240", "score": "0.7236248", "text": "public function getTableName() {\n\t\treturn 'wcf'.WCF_N.'_pm';\n\t}", "title": "" }, { "docid": "db53f27c8f5080f3c96d037081bc33a4", "score": "0.72264344", "text": "public function getTableName()\n {\n return $this->table_name;\n }", "title": "" }, { "docid": "8dd49bee707318b737deafdf4620c4d3", "score": "0.7210409", "text": "public function getTable(): string\n {\n return $this->prefix . $this->table;\n }", "title": "" }, { "docid": "def813a52e9b6f1652bb1d88d6c8ab88", "score": "0.7206769", "text": "abstract public function table_name ();", "title": "" }, { "docid": "5e5903aa07de0422301ba40915c34e14", "score": "0.7164855", "text": "public function getTableName()\n {\n return $this->_name;\n }", "title": "" }, { "docid": "5e5903aa07de0422301ba40915c34e14", "score": "0.7164855", "text": "public function getTableName()\n {\n return $this->_name;\n }", "title": "" }, { "docid": "16c7437f4933a05165e93c6a39dbdbaf", "score": "0.71544373", "text": "public function getTableName(): string\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "16c7437f4933a05165e93c6a39dbdbaf", "score": "0.71544373", "text": "public function getTableName(): string\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "128f97db9f258514a8de9b437027a62e", "score": "0.71466845", "text": "public function getTableName(): string\n {\n return $this->table->getTableName();\n }", "title": "" }, { "docid": "3c635eaff1cf4de4a18dddd37bc8c2d8", "score": "0.7144242", "text": "public function get_tablename() : string\n\t{\n\t\treturn (string)$this->table;\n\t}", "title": "" }, { "docid": "18d371525e9a391fb584cc3665d54679", "score": "0.7101143", "text": "public static function table_name(): string {\n\t\tglobal $wpdb;\n\t\treturn $wpdb->prefix . 'sb_' . static::TABLE;\n\t}", "title": "" }, { "docid": "8209a4f0fcc0e8c75e0b172f823b1409", "score": "0.7054612", "text": "public function getTable(): string\n {\n return $this->_table;\n }", "title": "" }, { "docid": "142bbfda472ef7f8366a1530731cb483", "score": "0.7038402", "text": "public function getTableName()\n {\n return (string) $this->tableName;\n }", "title": "" }, { "docid": "52e7392719764800b4523fc7732fb1f8", "score": "0.7038198", "text": "public function getConnectionName();", "title": "" }, { "docid": "71fe3faf22245d04c527d959837ad668", "score": "0.7028041", "text": "public function getTableName(): string\n {\n return $this->tableNames[0];\n }", "title": "" }, { "docid": "a4e1cba7dc59bddb9bdd0b7038b38ff7", "score": "0.70219046", "text": "public function getTable () {\n\t\treturn $this->getPrefix() . $this->getName();\n\t}", "title": "" }, { "docid": "dd471a7b73abaacd7b3d1494a0aeff05", "score": "0.702127", "text": "public function getTable(): string\n {\n return $this->table;\n }", "title": "" }, { "docid": "dd471a7b73abaacd7b3d1494a0aeff05", "score": "0.702127", "text": "public function getTable(): string\n {\n return $this->table;\n }", "title": "" }, { "docid": "dd471a7b73abaacd7b3d1494a0aeff05", "score": "0.702127", "text": "public function getTable(): string\n {\n return $this->table;\n }", "title": "" }, { "docid": "9bd9d42d52f385607277b3b7abaf089b", "score": "0.7009728", "text": "public function table_name();", "title": "" }, { "docid": "b752c1d3671e9bfe1981b307e6f7c062", "score": "0.7006725", "text": "public function getConnectionName()\n {\n return config('buku-icons.db_connection');\n }", "title": "" }, { "docid": "25e727ac9529540969df18bc38f15004", "score": "0.6996226", "text": "public function getTable() : string\n {\n\n return $this->table;\n }", "title": "" }, { "docid": "108b76317a51ceb83f4489ba6b5508d8", "score": "0.69848835", "text": "public function getTablename(){\n\t\treturn $this->tablename;\n\t}", "title": "" }, { "docid": "8a215082dabcc4c277825aa01ac403a5", "score": "0.69795626", "text": "public static function getTableName() {\n return str_replace(\"-\", '_', self::getFolderName()) . 's';\n }", "title": "" }, { "docid": "d0ab1a6b3e16e2be5f566f73f3acd2b2", "score": "0.6969371", "text": "public function getConnectionName()\n {\n }", "title": "" }, { "docid": "0594fd1e574ede71a82d14f51fe9f533", "score": "0.69632953", "text": "protected function getTableName(): string\n {\n return (new $this->model)->getTable();\n }", "title": "" }, { "docid": "872c6f52cc394e0fbb27c41421e11a1d", "score": "0.6962454", "text": "function getTableName() {\n \t return $this->table_name;\n \t}", "title": "" }, { "docid": "dd9863596631246cb54904a513f264a8", "score": "0.6949796", "text": "public function getTableName()\n {\n if (!isset($this->name)) {\n $this->name = static::uncamelcase(preg_replace('/^.+\\\\\\\\|Table$/i', '', get_class($this)));\n }\n \n return $this->name;\n }", "title": "" }, { "docid": "8997ff257c14e92b6a6f213d2d2da739", "score": "0.6949364", "text": "public function getTableName(): string\n {\n return $this->getEntityDao()->getTableName();\n }", "title": "" }, { "docid": "a88e781d8216e6a116576d03fa46af46", "score": "0.69300336", "text": "function getTableName()\r\n\t{\r\n\t\tif ( $this->table == null ) return (null );\r\n\t\treturn( $this->table->table_name());\r\n\t}", "title": "" }, { "docid": "2cfa0aab200fcbb8deca827c27da5137", "score": "0.6925782", "text": "public function getTableName() {\n return 'KARNET';\n }", "title": "" }, { "docid": "4c96da32a462630735559ec9e17536f2", "score": "0.69205135", "text": "public static function getTableName() {\n return self::$tableName;\n }", "title": "" }, { "docid": "17962423fac5f6ecd8ff13f9406696cc", "score": "0.69181705", "text": "public static function getTableName() : string\n {\n return 'x0i_demo_profile';\n }", "title": "" }, { "docid": "e076974e0c051b41d329ea577d167b1b", "score": "0.6909389", "text": "protected static function table_name(): mixed\n\t{\n\t\treturn self::$query->table_name;\n\t}", "title": "" }, { "docid": "ce2a44385b45579e63a61a2bdfee331c", "score": "0.69056416", "text": "public function getTableName(){\n\t\treturn $this->_table;\n\t}", "title": "" }, { "docid": "bba53c648446be2225020bcb75c082e6", "score": "0.6904464", "text": "public static function getTableName() : string\n {\n return 'x0i_demo_workday_pause';\n }", "title": "" }, { "docid": "6a4fc23cf9c83cb0106086c78faaf0f3", "score": "0.6899526", "text": "public function getDatabaseTableName() {\r\n return $this->getStaticDatabaseTableName();\r\n }", "title": "" }, { "docid": "82b6085473440d39e5c114e9f0509e1f", "score": "0.6883071", "text": "public function getTableName() {\n return $this->_table;\n }", "title": "" }, { "docid": "2025c8e1fdb3357b280239f82b23eb43", "score": "0.6882065", "text": "protected static function get_table_name() {\n return null;\n }", "title": "" }, { "docid": "cc180fce62e984b70812197b5e6b29e0", "score": "0.6880821", "text": "public static function TableName(){\n\t\treturn \"{{%user}}\";\n\t}", "title": "" }, { "docid": "91f1dc771ad0cf818448a2f77ad5c91c", "score": "0.68760014", "text": "public static function getTableName()\n {\n return Str::snake(Str::pluralStudly(class_basename(get_called_class())));\n }", "title": "" }, { "docid": "b4405a8f62687b205957a7f05678d737", "score": "0.687456", "text": "public function getTableName() {\n return $this->table;\n }", "title": "" }, { "docid": "78b33f9cf03f43c3ffaec39320093349", "score": "0.6866585", "text": "public static function getTable() : string {\n\t\t$namespacedClassParts = explode(\"\\\\\", get_called_class());\n\t\t$table = array_pop($namespacedClassParts);\n\t\t$table = preg_replace(\"/([a-z0-9])([A-Z0-9])/\", '$1_$2', $table);\n\t\t$table = strtolower($table);\n\t\treturn $table;\n\t}", "title": "" }, { "docid": "8e5f5d01e9861fa794bd7627c96840e5", "score": "0.6866545", "text": "public function table ()\r\n\t{\r\n\t\tif (!$this->tableName) {\r\n\t\t\tthrow new Hush_Db_Exception('Please bind table first');\r\n\t\t}\r\n\t\treturn $this->shardTableName ? $this->shardTableName : $this->tableName;\r\n\t}", "title": "" }, { "docid": "a3b504be48656a79104591eada6bbf85", "score": "0.6856661", "text": "public function getTableName() {\n\n\t\treturn 'sls'.SLS_N.'_chapter';\n\n\t}", "title": "" }, { "docid": "cf3b58040e1f1638285ede090ba0dce5", "score": "0.68545103", "text": "public function getTableName()\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "cf3b58040e1f1638285ede090ba0dce5", "score": "0.68545103", "text": "public function getTableName()\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "13c5e9f5382e9e4123eaa717a9120a7b", "score": "0.6844171", "text": "public function getTableKeyName()\n\t{\n\t\treturn \"id\".$this->getTableName();\n\t}", "title": "" }, { "docid": "cea6a42ff45f6c31928e81061a7af7f5", "score": "0.6841471", "text": "public function getTableName()\n\t{\n\t\treturn $this->tableName;\n\t}", "title": "" }, { "docid": "c23d0469caaf98e0ee8b1a143674c4f5", "score": "0.6834352", "text": "public function getTableName() {\r\n return $this->tableName;\r\n }", "title": "" }, { "docid": "5812bf65053adb1a93439ba9be77079d", "score": "0.6827282", "text": "protected function getStaticDatabaseTableName() {\r\n $paramDbPrefix=Parameter::getGlobalParameter('paramDbPrefix');\r\n return strtolower($paramDbPrefix . get_class($this));\r\n }", "title": "" }, { "docid": "1e25bda8f4b7e937462ee5cf5c1ce0ad", "score": "0.68200946", "text": "public function getBaseTableName()\n {\n return $this->table->getName();\n }", "title": "" }, { "docid": "2292a95ab87e3496cb3056e8aaa1f525", "score": "0.6815401", "text": "public function getIdentifier() : string {\r\n return $this->table;\r\n }", "title": "" }, { "docid": "8f5fdc5fee6b8312b844784e656d9aac", "score": "0.68145394", "text": "public static function getTableName()\n\t{\n\t\treturn 'b_crm_tracking_trace_channel';\n\t}", "title": "" }, { "docid": "e3062822ef80f95d11bdfb15ec22263d", "score": "0.6814259", "text": "public function getTableName() {\n\t\treturn $this->tableName;\n\t}", "title": "" }, { "docid": "b0bdd55de33d639ac0a602ee8ae4bed7", "score": "0.6807246", "text": "public function GetTableName()\n {\n return($this->tbName);\n }", "title": "" }, { "docid": "7a1c7c9d9eea5e1cb8a850b21be5d4c7", "score": "0.67993885", "text": "public function _tablename() {\n if (isset($this->_table) && !isNull($this->_table)) {\n return $this->_table;\n } else {\n return camel_case_to_underscore(get_class($this));\n }\n }", "title": "" }, { "docid": "a0e47416ad4fb0fa74f964f44c34f3b8", "score": "0.67983603", "text": "public function getTable()\n {\n if (isset($this->table)) {\n return $this->table;\n }\n\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }", "title": "" }, { "docid": "537383cfe3c1291d6a0ddcc0a4572a3f", "score": "0.6790832", "text": "protected function TableName() {\n\treturn 'ord_pkgs';\n }", "title": "" }, { "docid": "fd136304aca85310288e30dc6dc16058", "score": "0.67874557", "text": "public function getTableName(){\n\t\t $table = get_class($this);\n\t\treturn strtolower(substr($table, strripos($table, \"\\\\\")+1));\n\t}", "title": "" }, { "docid": "775b05bdc22328a9f007c50aabe7be48", "score": "0.6786184", "text": "public function getDbTableName()\r\n\t\t{\r\n\t\t\t\treturn $this->_dbTable;\r\n\t\t}", "title": "" }, { "docid": "968a5566aed273c213562b6237d1ed66", "score": "0.678422", "text": "public function getTable()\n {\n if (!isset($this->table)) {\n return str_replace(\n '\\\\', '', str_plural(snake_case(class_basename($this)))\n );\n }\n\n return $this->table;\n }", "title": "" }, { "docid": "ab437b2030f07c2099a7bf5392967ca3", "score": "0.6784052", "text": "function SqlTableName($table=\"\")\n {\n return $this->ApplicationObj->SqlEventTableName(\"Inscriptions\",$table);\n }", "title": "" }, { "docid": "7e325f033a02102c3e084c5c32013d56", "score": "0.67806315", "text": "public function getTableName(){\n\t\treturn $this->tableName;\n\t}", "title": "" }, { "docid": "7e325f033a02102c3e084c5c32013d56", "score": "0.67806315", "text": "public function getTableName(){\n\t\treturn $this->tableName;\n\t}", "title": "" }, { "docid": "93759d1fae776b8e69d21ce7a29e07db", "score": "0.6778805", "text": "public function getTableName()\n {\n return $this->_tableName;\n }", "title": "" }, { "docid": "71257f7c2fff1b72e8098cbb8dcd7749", "score": "0.6778426", "text": "public function tableName()\n\t{\n\t\treturn '{{'.$this->getTableName().'}}';\n\t}", "title": "" }, { "docid": "667106ae8c9c888a60043f64e978b297", "score": "0.67727745", "text": "protected function getCJoinTmpTableName()\n {\n return $this->getGatewayCollection()\n ->getGateway('pt_result_cjoin')\n ->getMetaData()\n ->getName();\n \n }", "title": "" }, { "docid": "8ddb5dd227daf960a37f41fac08fa5e5", "score": "0.676437", "text": "public function getTable()\n {\n if (! isset($this->table)) {\n return str_replace(\n '\\\\',\n '',\n Str::snake(Str::plural(class_basename(self::class)))\n );\n }\n\n return $this->table;\n }", "title": "" }, { "docid": "c4321c8cdeb43cc66c4c3a0b870e4074", "score": "0.6759642", "text": "public function getTableName()\n {\n return $this->parentTable->getName();\n }", "title": "" }, { "docid": "0596731bd2b7bd0c8beaa36c87a0f47a", "score": "0.6753811", "text": "private function relationshipsTableName()\n {\n return config('follow.table_name');\n }", "title": "" }, { "docid": "03f5de1e47af1bede4293ce990b36dfa", "score": "0.67507124", "text": "public function\n\t\tget_table_name()\n\t{\n\t\tif (!isset($this->table_name)) {\n\t\t\t$sxe = $this->get_simple_xml_element();\n\t\t\t\n\t\t\t$this->table_name = (string)$sxe->table['name'];\n\t\t}\n\t\t\n\t\treturn $this->table_name;\n\t}", "title": "" }, { "docid": "0123ae0be0e8d0c585156975295150ad", "score": "0.67480445", "text": "public function getConnectionName()\n {\n return $this->connection->getName();\n }", "title": "" }, { "docid": "b6560bb11f69d04d908031754c2d7b36", "score": "0.67445815", "text": "protected function relationshipsTableName()\n {\n return config('blockable.table_name', 'block_relationships');\n }", "title": "" }, { "docid": "5e650fb0288bd85c87585333f86b314b", "score": "0.6729223", "text": "public function getPrefix()\n {\n return config('pilot.table_prefix', '');\n }", "title": "" }, { "docid": "da4338740664784fdfc58eae417d7184", "score": "0.67281145", "text": "protected static function getTableName()\n {\n // by default we have tables in all lower case letters names after the unqualified model classes\n return strtolower(StringHelper::getNameWithoutNamespaces(get_called_class()));\n }", "title": "" }, { "docid": "001cb7f8dc5aa71396fa5678a3cfb35a", "score": "0.6726223", "text": "private static function tableName() {\n global $wpdb;\n return $wpdb->prefix . self::SIMPLE_LOGIN_HISTORY_TABLE_NAME;\n }", "title": "" }, { "docid": "10b5dd0980b4b7be82dac5c50037dac9", "score": "0.67200243", "text": "function getTableFullName()\n {\n return implode(' ', [$this->table_prefix . $this->table_name, $this->table_alias]);\n }", "title": "" }, { "docid": "364682e995c026534ef521d39bafbd51", "score": "0.6716694", "text": "function SqlTableName($table=\"\")\n {\n return $this->ApplicationObj->SqlUnitTableName(\"Friends\",$table);\n }", "title": "" }, { "docid": "432a9da9b2a64b9b768a9d7695d04a5b", "score": "0.67098206", "text": "function getTableName() {\n return $this->tableName;\n }", "title": "" } ]
3c9e0906da4e57facdbcff2da41c5232
Returns the path on the remote filesystem of WP_LANG_DIR
[ { "docid": "9449c99854ffd8161e0b2a9dcca96dd1", "score": "0.77516", "text": "function wp_lang_dir() {\n return $this->find_folder(WP_LANG_DIR);\n }", "title": "" } ]
[ { "docid": "786399bc04252602fa6a0c17ccf096a7", "score": "0.7121275", "text": "protected function getTranslationDirectory(): string\n {\n return __DIR__ . '/lang/' . $this->locale;\n }", "title": "" }, { "docid": "d25f7eb64809386f69cc007b6f3d7f05", "score": "0.6926213", "text": "public static function getLocaleDirectory()\n\t{\n\t\treturn USVN_Template::$locale_directory;\n\t}", "title": "" }, { "docid": "1256645b7cf7dc412eaa92a2106e276c", "score": "0.6843927", "text": "function datadir_getlangpath ($instance,$file=null,$forceDefault=false) {}", "title": "" }, { "docid": "7a7bd068d95acd0bbe89c46c47e803af", "score": "0.6823861", "text": "public function getBaseLanguageDir()\n {\n return $this->paths['base_lang_dir'];\n }", "title": "" }, { "docid": "69fa2f0de88d43960b35237eb6f2eef8", "score": "0.67814326", "text": "public function getThemeLanguageDir()\n {\n return $this->paths['theme_lang_dir'];\n }", "title": "" }, { "docid": "a3f9acbd2b13eb9c7c5c727391effbd5", "score": "0.67249894", "text": "public function getLocalePath(){\t\t\n\t\treturn locale( $this->getModuleName().DIRECTORY_SEPARATOR, true );\n\t}", "title": "" }, { "docid": "7054f73d595510748b9a4760c69b113c", "score": "0.66543204", "text": "public function getLocalePath(): string\n {\n return $this->getPath() . '/Resources/locale';\n }", "title": "" }, { "docid": "246389f76b88117fe50c0e51d052e3fd", "score": "0.6628219", "text": "public static function get_directory(): string\n {\n return Options::instance()->get('local_dir') ?: '';\n }", "title": "" }, { "docid": "befc4297b6b51e5917408d5be14447b1", "score": "0.65835106", "text": "public static function getLanguagesPath()\n {\n $path = self::getStringBaseValue('languages_path', 'resources/lang');\n\n return Helpers::getPathWithSlash($path);\n }", "title": "" }, { "docid": "305b91fb4421c9d5b02be132b5c0a40b", "score": "0.6579478", "text": "protected function getLanguageFilesPath()\n {\n return base_path(\"vendor/caouecs/laravel-lang/src/{$this->locale}\");\n }", "title": "" }, { "docid": "7a36ff43e9ec4cbba14fdd838fdb25fc", "score": "0.6570725", "text": "public function i18n()\n {\n return __DIR__;\n }", "title": "" }, { "docid": "8ee1de66bb05dc49fb899cbee3e6288b", "score": "0.6560812", "text": "public function getLocalPath();", "title": "" }, { "docid": "3857f3af9362d7cc1d80d44ed0d90d92", "score": "0.65272", "text": "public static function getBasePath()\n {\n return __DIR__ . '/../languages/';\n }", "title": "" }, { "docid": "b0c7b6c357cf6a5dfb3445a35aff01f3", "score": "0.65007746", "text": "public function getLocalPath()\n {\n return $this->settings->getPathLocal();\n }", "title": "" }, { "docid": "aa31fde161bd53c4a44ca809f0907c40", "score": "0.6438789", "text": "protected function getLangPath()\n {\n return base_path('resources/lang/vendor/datagrid-builder');\n }", "title": "" }, { "docid": "61704d72163affa5b2ad6fc3ae945408", "score": "0.6437706", "text": "public static function getTranslationFileDirectory();", "title": "" }, { "docid": "8ae5aa1a4a63b6da91d9ab9ee8b945b4", "score": "0.6432135", "text": "public function getLocalPath()\n {\n return $this->getValue('nb_site_local_path');\n }", "title": "" }, { "docid": "e5f8a4b25aa0484e05300f9a5ea37ae9", "score": "0.63376343", "text": "public static function getRemoteDir()\n {\n $connection = static::getConnection(\n 'filesystem',\n static::get('filesystem.default')\n );\n\n switch($connection['driver']) {\n case 's3':\n return 'https://s3.amazonaws.com/' . $connection['bucket'] . '/';\n } // @codeCoverageIgnore\n }", "title": "" }, { "docid": "a2f1d782497bb957499586c4f9e7bd54", "score": "0.63243437", "text": "public function getLocalePath()\n {\n return $this->localePath;\n }", "title": "" }, { "docid": "b1caf4afa1d0c2994a9bd2ff3d43af70", "score": "0.6310327", "text": "function getBasePath()\n {\n return '../manual/' . $this->strLang . '/';\n }", "title": "" }, { "docid": "9b3ff0fd5f859767b5f873dc583dd4bb", "score": "0.62977046", "text": "function wp_content_dir() {\n return $this->find_folder(WP_CONTENT_DIR);\n }", "title": "" }, { "docid": "ff0a74be5e2f4aaf1cd5b993ea115337", "score": "0.62931", "text": "public function getLocalPath(): string\n {\n return $this->path;\n }", "title": "" }, { "docid": "da4833d5f0df0668f113b1e4189e5b38", "score": "0.628905", "text": "static function getSystemDir(){\n return self::$config->dir['system'];\n }", "title": "" }, { "docid": "75da5debf00f3dd7ef7f898be3b8a2f9", "score": "0.6277108", "text": "public function getLocalPath()\n {\n return $this->getRootPath() . 'local' . DIRECTORY_SEPARATOR;\n }", "title": "" }, { "docid": "98aab6a3ab8e78e62073c380b44d1267", "score": "0.62732303", "text": "public function getTranslationsFolderPath(): string\n {\n // build the path to the translations folder\n $translations_path = $this->buildPath('resources/lang');\n\n // return the build path\n return $translations_path;\n }", "title": "" }, { "docid": "87ee3737f5bdf718a8c8c79a5335a5b6", "score": "0.6263491", "text": "function wcisl_get_plugin_directory() {\n\treturn __DIR__;\n}", "title": "" }, { "docid": "efe9666bd31564c7918f2224bf85dde5", "score": "0.6260014", "text": "public function getLocalPath()\n {\n return _PS_MODULE_DIR_.$this->name.'/';\n }", "title": "" }, { "docid": "42bb89386a610e0ed3e908befeeba5fc", "score": "0.62595904", "text": "public function langPath($path = '')\n {\n return realpath($this->resourcePath('languages') . DIRECTORY_SEPARATOR . $path);\n }", "title": "" }, { "docid": "7faf914a18b15b408a82a83eaab49581", "score": "0.6246482", "text": "private function getPath() {\n return str_replace('%u', $this->store, VCARDDIR_DIR);\n }", "title": "" }, { "docid": "ef4ee0583283b6de1ccf252b55898cd8", "score": "0.6211947", "text": "public function getLocalPath()\r\n {\r\n return $this->_mootolsLibraryPath;\r\n }", "title": "" }, { "docid": "b763ff3c5bc172f524f4988c623a1269", "score": "0.6199638", "text": "public function getLocaleFolder()\n {\n return $this->localeFolder;\n }", "title": "" }, { "docid": "d319283e39a238ff1843e28ce399b3bf", "score": "0.61767226", "text": "public function getPath()\n {\n\t\tif (!is_null($this->_path)) {\n\t\t\treturn $this->_path;\n\t\t}\n\t\t\n\t\t$this->_path = false;\n\t\t\n\t\tif (!($path = trim($this->_config->getStoreConfigValue('wordpress/setup/path')))) {\n\t\t\treturn $this->_path;;\n\t\t}\n\t\t\n\t\tif (substr($path, 0, 1) !== '/') {\n\t\t\t$path = BP . '/' . $path;\n\t\t}\n\t\t\n\t\tif (!is_dir($path) || !is_file($path . '/wp-config.php')) {\n\t\t\treturn $this->_path;\n\t\t}\n\t\t\n\t\treturn $this->_path = $path;\n }", "title": "" }, { "docid": "e878c49382a6d74bba355a3932d96716", "score": "0.6154761", "text": "function get_wp_install_path(){\n\n\t\t$base = dirname(__FILE__);\n\t\t$path = false;\n\n\t\tif (@file_exists(dirname(dirname($base)).\"/wp-config.php\"))\n\t\t{\n\t\t\t$path = dirname(dirname($base)).\"/wp-config.php\";\n\t\t}\n\t\telse\n\t\t\tif (@file_exists(dirname(dirname(dirname($base))).\"/wp-config.php\"))\n\t\t\t{\n\t\t\t\t$path = dirname(dirname(dirname($base))).\"/wp-config.php\";\n\t\t\t}\n\t\t\telse\n\t\t\t\t$path = false;\n\n\t\t\tif ($path != false)\n\t\t\t{\n\t\t\t\t$path = str_replace(\"\\\\\", \"/\", $path);\n\t\t\t}\n\t\t\treturn $path;\n\t\t}", "title": "" }, { "docid": "471383626279fee621973ccf8d88ab47", "score": "0.61499137", "text": "public static function get_wp_config_path()\n {\n return \\WP_CLI_Util::getcwd('wp-config.php');\n }", "title": "" }, { "docid": "89b7df1af29ffd01568898b101aee60a", "score": "0.61328614", "text": "public function getPathTranslated()\n\t{\n\t\treturn isset( $_SERVER['PATH_TRANSLATED'] ) ? $_SERVER['PATH_TRANSLATED'] : null;\n\t}", "title": "" }, { "docid": "f025287a4d4606f98d18ff4364a731b7", "score": "0.61139625", "text": "public static function get_path()\n\t{\n\t\t$filename = Arr::get(self::options(), '_file', 'validate');\n\t\t$lang = str_replace('-', DIRECTORY_SEPARATOR, I18n::$lang);\n\t\t$file = $lang.DIRECTORY_SEPARATOR.$filename;\n\n\t\t$path = Kohana::find_file('messages', $file);\n\t\tif (empty($path))\n\t\t{\n\t\t\tlist($lang) = explode(DIRECTORY_SEPARATOR, $lang);\n\t\t\t$file = $lang.DIRECTORY_SEPARATOR.$filename;\n\t\t\t$path = Kohana::find_file('messages', $file);\n\t\t}\n\t\tif (empty($path))\n\t\t{\n\t\t\t$file = $filename;\n\t\t\t$path = Kohana::find_file('messages', $file);\n\t\t}\n\t\tif (empty($path))\n\t\t{\n\t\t\t$file = NULL;\n\t\t}\n\t\treturn $file;\n\t}", "title": "" }, { "docid": "4f8cc130858ca0e6a5a259708529ee73", "score": "0.6106299", "text": "public static function getLocalConfigPath()\n {\n $path = self::getByDomainConfigPath();\n if ($path) {\n return $path;\n }\n return PIWIK_USER_PATH . self::DEFAULT_LOCAL_CONFIG_PATH;\n }", "title": "" }, { "docid": "4f8cc130858ca0e6a5a259708529ee73", "score": "0.6106299", "text": "public static function getLocalConfigPath()\n {\n $path = self::getByDomainConfigPath();\n if ($path) {\n return $path;\n }\n return PIWIK_USER_PATH . self::DEFAULT_LOCAL_CONFIG_PATH;\n }", "title": "" }, { "docid": "2f5aafdd3c964744c0f0573d94f2d674", "score": "0.6080327", "text": "protected function getLocalCopiesDir(): string\n {\n $localCopies = $this->getConfig()->get('local_copies');\n\n return $this->createDirIfNotExists($localCopies);\n }", "title": "" }, { "docid": "dbd6d7ee9f9383158a9f862a750d9174", "score": "0.60710484", "text": "protected function getDir() : string\n {\n return 'modules/PureClarity/Personalization/admin';\n }", "title": "" }, { "docid": "ed75629bb7f3ece13b3d17923a75db3a", "score": "0.60677147", "text": "protected function replaceLanguagePath()\n {\n return $this->laravel['modules']->config('paths.generator.lang');\n }", "title": "" }, { "docid": "bec1ce1098877491910f755f76f6ed97", "score": "0.6048972", "text": "function datadir_geti18ndir ($instance) {}", "title": "" }, { "docid": "c4570ed54c04987a0878943868a13796", "score": "0.6040214", "text": "function allwebboxLanguageFile(){\n\t\t$plugin_rel_path = ALWEBURL . '/languages'; /* Relative to WP_PLUGIN_DIR */\n\n\t\t$plugin_rel_path = basename( dirname( __FILE__ ) ) . '/languages'; /* Relative to WP_PLUGIN_DIR */\n\t\tload_plugin_textdomain( 'allwebbox', false, $plugin_rel_path );\n\t}", "title": "" }, { "docid": "406b4c1ba47d99714c4eafef7145efc0", "score": "0.6024774", "text": "public static function getSiteDir()\n {\n return self::getSite()->path;\n }", "title": "" }, { "docid": "aed90f7a73da682628604890039c86d8", "score": "0.6016859", "text": "function muplugin_directory() {\n\t\ttrigger_error( 'Use WPMU_PLUGIN_DIR instead', E_USER_NOTICE );\n\n\t\treturn WPMU_PLUGIN_DIR;\n\t}", "title": "" }, { "docid": "7e644b81b70d55698d3ade77f30dbc06", "score": "0.60042584", "text": "public function getLocalPath()\n {\n return $this->localPath;\n }", "title": "" }, { "docid": "6ecb891c14fbb4175edb96738c5666e5", "score": "0.59951365", "text": "public function get_local_json_path() {\n\t\t$directory = BL_PLUGIN_DIR . '/acf-json';\n\n\t\tif ( ! is_dir( $directory ) ) {\n\t\t\tmkdir( $directory );\n\t\t}\n\n\t\treturn $directory;\n\t}", "title": "" }, { "docid": "5a7962cbe4b986bb2ebd15fc3fdd7a17", "score": "0.59950113", "text": "function PluginUrl() {\n $path = dirname(__FILE__);\n $path = str_replace(\"\\\\\",\"/\",$path);\n $path = substr($path, 0, strpos($path,\"wp-content/\"));\n return $path;\n }", "title": "" }, { "docid": "8e3a9430b028f1ef73e6346a93881cf8", "score": "0.5983057", "text": "function myplugin_plugin_path() {\r\n // gets the absolute path to this plugin directory\r\n return untrailingslashit( WMP_DIR );\r\n}", "title": "" }, { "docid": "a063138e9af6b493ba6131a3346645b4", "score": "0.5978981", "text": "function dirPath() { return (\"../../../../\"); }", "title": "" }, { "docid": "908370565aceece7cf32716c03284b5b", "score": "0.59567434", "text": "public function plugin_path(){\n\t\t\treturn untrailingslashit(plugin_dir_path(__FILE__));\n\t\t}", "title": "" }, { "docid": "c122f77044c927e902dc8e0eef1ad9b4", "score": "0.595405", "text": "function lang_file(){\n GLOBAL $av_lang;\n\n if(in_array($_SESSION[\"CURRENT_LANG\"], $av_lang)){\n return \"lang/\".$_SESSION[\"CURRENT_LANG\"].\".php\";\n } else {\n return \"lang/\".DEFAULT_LANG.\".php\";\n }\n}", "title": "" }, { "docid": "3b7d49737abf1638ff3d0c30aafa1502", "score": "0.59521383", "text": "function file_directory_path() {\n return variable_get('file_directory_path', conf_path() .'/files');\n}", "title": "" }, { "docid": "f5888ad08289f011cf52886440115a22", "score": "0.59507614", "text": "function path_system()\r\n\t{\r\n\t\treturn \"/var/www/webtar/\";\r\n\t}", "title": "" }, { "docid": "acc7e2c3eb8f15014f76734a3cdfa04f", "score": "0.5941861", "text": "public function getLocalPath()\n {\n return $this->pathLocal;\n }", "title": "" }, { "docid": "7667c78aa71477c6c1b19d0168f69018", "score": "0.5935536", "text": "public function plugin_path() {\n\n return untrailingslashit( plugin_dir_path( WPSHEV_PLUGIN_FILE ) );\n\n }", "title": "" }, { "docid": "70f178dc19167196530718d06a15b92a", "score": "0.59232754", "text": "private function path()\r\r\n\t{\r\r\n\t\treturn TL_PATH;\r\r\n\t}", "title": "" }, { "docid": "47f89c898e70dad049669c498492deb5", "score": "0.59210485", "text": "function datadir_lsb_cfg_dir_get () {}", "title": "" }, { "docid": "c70e682603355df1d249b3ad9b3af416", "score": "0.59185076", "text": "public function getLocalRootPath()\n {\n return $this->directory.'/'.$this->getLocalFileName();\n }", "title": "" }, { "docid": "c1d7b255a4f8b6584b1032c8a3ea8c11", "score": "0.5891598", "text": "protected function getConfigDir() : string\n {\n return $this->homePath() . '/.larakits';\n }", "title": "" }, { "docid": "d57ee7ce02e62f1b5a6d89bd9ff04e37", "score": "0.58878946", "text": "public function getPluginDir(): string;", "title": "" }, { "docid": "896328fb5bd56209728331972c1e97c1", "score": "0.5880013", "text": "public function plugin_path() {\r\n\t\treturn untrailingslashit( plugin_dir_path( FFD_PLUGIN_FILE ) );\r\n\t}", "title": "" }, { "docid": "848cc67a5f33b1030768eaedb92dab3e", "score": "0.587883", "text": "private static function _get_dir()\n {\n $root = $_SERVER['DOCUMENT_ROOT'];\n $main_dir = __DIR__;\n $installed_dir = str_replace($root, '', $main_dir);\n $installed_dir = trim($installed_dir, DIRECTORY_SEPARATOR);\n $installed_dir = str_replace('Sodium', '', $installed_dir);\n $installed_dir = str_replace(DIRECTORY_SEPARATOR, '/', $installed_dir);\n return $installed_dir;\n }", "title": "" }, { "docid": "c16c825537015b200b61279b8cb6f581", "score": "0.5871952", "text": "function wp_plugins_dir() {\n return $this->find_folder(WP_PLUGIN_DIR);\n }", "title": "" }, { "docid": "f928b19da719df99a9438029c63c91e2", "score": "0.5871174", "text": "static function getThemesPath(){\n return $_SERVER['DOCUMENT_ROOT'].\"/addons/themes/\";\n }", "title": "" }, { "docid": "d0223fbc08e1ed65c12be2c2e10671e4", "score": "0.58542633", "text": "protected function getLocalRootPath(): string\n {\n return Config::get('filesystems.disks.local.root', storage_path('app'));\n }", "title": "" }, { "docid": "bfec324369c96345bbaa9393af4eb3a3", "score": "0.5849791", "text": "function shr_dir_to_path($dir){\n if(!$dir){\n return false;\n }\n //If its is a symlink, it will be resolved to origonal dir path\n $dir = shrb_addTrailingChar(realpath($dir), '/' );\n $path = get_option(\"siteurl\");\n if(substr($path, -1) != '/'){\n $path .= '/';\n }\n $path .= substr($dir , strlen(ABSPATH));\n return $path;\n}", "title": "" }, { "docid": "dc8a4424d136c6e657cdb4d82d0020e0", "score": "0.5849399", "text": "private function getPath(){\n\t\t$this->_path = FVN_PATH . 'includes/admin/' .$this->name .'/';\n\t\treturn $this->_path;\n\t}", "title": "" }, { "docid": "17a077f441d145b5a6ef86a6b525917f", "score": "0.5842956", "text": "public function plugin_path() {\n return untrailingslashit( plugin_dir_path( __FILE__ ) );\n }", "title": "" }, { "docid": "17a077f441d145b5a6ef86a6b525917f", "score": "0.5842956", "text": "public function plugin_path() {\n return untrailingslashit( plugin_dir_path( __FILE__ ) );\n }", "title": "" }, { "docid": "32493a936feddc9d75438229f4e5bdc4", "score": "0.5840301", "text": "protected function getPath() {\n return preg_replace('/^' . preg_quote(INSTALLDIR, '/') . '\\//', '', dirname(__FILE__));\n }", "title": "" }, { "docid": "2f47934c5d7783a5b5a56e3997e5127c", "score": "0.5827537", "text": "public function get_translate_path($langcode = NULL) {\n return $this->get_base_path() . '/translate' . ($langcode ? '/' . $langcode : '');\n }", "title": "" }, { "docid": "734ef5bac699d4020541eeaacdfe27f8", "score": "0.58271587", "text": "public function getContentLangFile()\n {\n return $this->contentLangFile;\n }", "title": "" }, { "docid": "7c240aca4cecbc23d86f398d29d82966", "score": "0.58227766", "text": "public function getCoreDirectory()\n {\n // return mfConfig::get('mf_sites_dir').\"/\".$this->getSiteName().\"/frontend/view/data/moduleManagerAdmins/\".$this->get('id');\n return mfConfig::get('mf_modules_dir').\"/\".$this->get('name');\n }", "title": "" }, { "docid": "cbf042e3f9dc1c2864f631f7826f8810", "score": "0.5822389", "text": "public function getSitePath() {\r\n\t\treturn realpath(dirname(dirname(\r\n\t\t\t$this->_front->getModuleDirectory($this->_front->getDefaultModule()))\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "7e56a4afdfbd6cab81d06d8d1f2212c7", "score": "0.5815879", "text": "function getPathOfRestore()\n {\n $fullpathofimport='/pathtomysql/mysql';\n\n $resql=$this->query('SHOW VARIABLES LIKE \\'basedir\\'');\n if ($resql)\n {\n $liste=$this->fetch_array($resql);\n $basedir=$liste['Value'];\n $fullpathofimport=$basedir.(preg_match('/\\/$/',$basedir)?'':'/').'bin/mysql';\n }\n return $fullpathofimport;\n }", "title": "" }, { "docid": "85d2f8e94a434f250faa53adc7df09ce", "score": "0.5811482", "text": "public function get_translate_path($langcode = NULL) {\n return $this->get_base_path() . '/translate/field' . ($langcode ? '/' . $langcode : '');\n }", "title": "" }, { "docid": "3f97c7becb33c3c255b5813170c09cd1", "score": "0.5803503", "text": "public function plugin_path() {\n\t\treturn untrailingslashit( plugin_dir_path( __FILE__ ) );\n\t}", "title": "" }, { "docid": "6f35cf5da8b7322b836543927413858a", "score": "0.58002156", "text": "public static function get_base_path_network()\n {\n global $wpdb;\n if (defined('PATH_CURRENT_SITE')) {\n return PATH_CURRENT_SITE;\n } else {\n return $wpdb->get_var(\"SELECT `path` FROM `{$wpdb->prefix}blogs` WHERE `blog_id` = 1\");\n }\n }", "title": "" }, { "docid": "3ed8b46f4e28902093228592287a60f4", "score": "0.57976043", "text": "private function getRootMagentoDirPath(): string\n {\n return '/var/www/magento2';\n }", "title": "" }, { "docid": "d6833d8f1fef8f98a5108d77a0447a4f", "score": "0.5792762", "text": "public static function getWikiPath() {\n\t\tglobal $wgScriptPath;\n\t\treturn $wgScriptPath . '/';\n\t}", "title": "" }, { "docid": "98a5f2e4a6dd03685a7a116b13806eb6", "score": "0.5785988", "text": "public function getConfigDir(): string\n {\n return Config::get('paths.config', self::getAppDir().'config/');\n }", "title": "" }, { "docid": "df171e9e05c2e49ab6232ee8a46bf7c4", "score": "0.57855093", "text": "public function getDirectoryPath() {\n return variable_get('file_public_path', conf_path() . '/files');\n }", "title": "" }, { "docid": "779480be5db7a32e5af4ea4cbedd5061", "score": "0.57820463", "text": "protected function pluginPath()\n {\n return root_path('plugins/' . $this->pluginName());\n }", "title": "" }, { "docid": "1577c0b12466199a036664d8759f13c2", "score": "0.57807225", "text": "function _get_plugin_directory() {\n return wp_normalize_path( trailingslashit(dirname( __FILE__ )));\n}", "title": "" }, { "docid": "2604e4a2690037d791410bfff551b14c", "score": "0.57790095", "text": "public static function get_plugin_dir() {\n\t\treturn qformat_smart::$plugin_dir;\n\t}", "title": "" }, { "docid": "e1f481f1878b7078c0c312f749217521", "score": "0.5776825", "text": "function pw_location() {\n $loc = config_get('options', 'location');\n if (substr($loc, -1) != '/') {\n $loc .= '/';\n }\n return $loc;\n}", "title": "" }, { "docid": "4618aeb28710e9bc62abb527d6d38b99", "score": "0.57739896", "text": "public static function getRootDir(): string\n {\n return '/usr/local/share/universe/Ling/Light_PlanetInstaller';\n }", "title": "" }, { "docid": "70f96d3980d77f80edfa49f0b6ef3988", "score": "0.5770843", "text": "public static function get_wp_config_file_path() {\n\t\tif ( file_exists( ABSPATH . 'wp-config.php') ) {\n\t\t\t$path = ABSPATH . 'wp-config.php';\n\t\t} else if ( file_exists( dirname( ABSPATH ) . '/wp-config.php' ) && ! file_exists( dirname( ABSPATH ) . '/wp-settings.php' ) ) {\n\t\t\t$path = dirname( ABSPATH ) . '/wp-config.php';\n\t\t} else {\n\t\t\t$path = ABSPATH . 'wp-config.php';\n\t\t}\n\n\t\treturn apply_filters( 'itsec_filter_wp_config_file_path', $path );\n\t}", "title": "" }, { "docid": "67e7287aab59efd636be5cf17d6e5a5b", "score": "0.5770083", "text": "protected function getUploadDir() {\n // when displaying uploaded doc/image in the view.\n return 'upload/locations/countries';\n }", "title": "" }, { "docid": "a80df206bcab16a26ae925e13805fc74", "score": "0.5764766", "text": "public function getCachePath(?string $locale): string;", "title": "" }, { "docid": "9a0b8dd69f6860a27f2902cd3cf7c2cd", "score": "0.5762145", "text": "function getAdminZonePath()\n {\n global $application;\n\n if (isset($application -> appIni['HTTPS_URL'])\n && $application -> getCurrentProtocol() == 'https')\n $path = $application -> appIni['SITE_AZ_HTTPS_URL'];\n else\n $path = $application -> appIni['SITE_AZ_URL'];\n\n $path = parse_url($path);\n\n return $path['path'];\n }", "title": "" }, { "docid": "a15dc6b598d06528c9f522f4b25d92de", "score": "0.57523876", "text": "private function getPath()\n {\n\n return Settings::getSetting('syscrack_addressdatabase_location');\n }", "title": "" }, { "docid": "1ebfd88564cea99e4925c38b3f78442b", "score": "0.57515585", "text": "static function get_wp_root_path()\r\n\t{\r\n\t $base = dirname(__FILE__);\r\n\t $path = false;\r\n\t\r\n\t if (@file_exists(dirname(dirname($base)).\"/wp-config.php\"))\r\n\t {\r\n\t $path = dirname(dirname($base));\r\n\t }\r\n\t else\r\n\t if (@file_exists(dirname(dirname(dirname($base))).\"/wp-config.php\"))\r\n\t {\r\n\t $path = dirname(dirname(dirname($base)));\r\n\t }\r\n\t else\r\n\t $path = false;\r\n\t\r\n\t if($path != false)\r\n\t {\r\n\t $path = str_replace(\"\\\\\", \"/\", $path);\r\n\t }\r\n\t return $path;\r\n\t}", "title": "" }, { "docid": "7e2201157c64aaff671ce11fc269a47b", "score": "0.5738192", "text": "protected function getLocalCopiesFilesDir(): string\n {\n $dbDir = $this->getLocalCopiesDir() . DIRECTORY_SEPARATOR . 'files';\n\n return $this->createDirIfNotExists($dbDir);\n }", "title": "" }, { "docid": "29d0b15b5812930395e19ba2e9367fe5", "score": "0.5737269", "text": "public function get_plugin_url() {\n\t\tif (function_exists('plugins_url')) return trailingslashit(plugins_url(basename(dirname(__FILE__))));\n\t\t\n\t\t//Try to find manually... can't work if wp-content was renamed or is redirected\n\t\t$path = dirname(__FILE__);\n\t\t$path = str_replace(\"\\\\\",\"/\",$path);\n\t\t$path = trailingslashit(get_bloginfo('wpurl')) . trailingslashit(substr($path,strpos($path,\"wp-content/\")));\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "80aa4386f8706f5f323e31cea88c4bb7", "score": "0.5735253", "text": "public function languageFile()\n {\n return $this->language_file;\n }", "title": "" }, { "docid": "7e0cbd8eeeb02a06cdc81969be0a5837", "score": "0.573272", "text": "function getSiteDir(): string\n{\n return Constant::IS_DEVELOPMENT_MODE ? Constant::DEVELOPMENT_SITE_DIR : SITE_DIR;\n}", "title": "" }, { "docid": "8bf4419a8f0c92a53c11cbd3e707053d", "score": "0.5726471", "text": "protected static function _searchLocaleDirectory()\n {\n if (static::$_pearDirectory !== '@data_dir@') {\n $directory = static::$_pearDirectory . '/' . static::$_domain . '/locale';\n if (is_dir($directory)) {\n return $directory;\n }\n }\n\n $directories = static::_getSearchDirectories();\n foreach ($directories as $directory) {\n if (is_dir($directory)) {\n return $directory;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "08b1a338f38e1288d2d15da762830f8c", "score": "0.572368", "text": "protected function publishPath()\n\t{\n\t\t$machine = config('webserver.machine');\n\t\t\n\t\treturn sprintf('%s%s.conf', config('webserver.fpm.path.' . $machine), $this->name());\n\t}", "title": "" } ]
a780fac1577d5f62ce82ffc1e749d27c
This function lists all domains on the server which have SSL certificates installed.
[ { "docid": "ca1f5ce6a041a3a68f61168822df452f", "score": "0.0", "text": "function listcrts() {\n\t\treturn $this->xmlapi_query('listcrts');\n\t}", "title": "" } ]
[ { "docid": "0901033a65ffdec8a9506e98638dd820", "score": "0.7168", "text": "function getSSLDomains()\n{\n $result = array();\n\n $domains = $GLOBALS['db']->query('SELECT id, domain, wwwserveralias FROM ' . TABLE_PANEL_DOMAINS .\n ' WHERE (deactivated = 0) ' .\n ' AND (email_only = 0) ' .\n ' AND (letsencrypt = 1) ' .\n ' AND (aliasdomain IS NULL) ' .\n ' AND (parentdomainid = 0) ' .\n ' ORDER BY domain'\n );\n\n if ($domains) {\n foreach ($domains as $domain) {\n $result[$domain['domain']] = '';\n\n if ($domain['wwwserveralias'] == 1) {\n $result[$domain['domain']] = 'www.' . $domain['domain'];\n }\n\n // Get all defined subdomains for current domain\n $subDomains = $GLOBALS['db']->query('SELECT id, domain, wwwserveralias FROM ' . TABLE_PANEL_DOMAINS .\n ' WHERE (deactivated = 0) ' .\n ' AND (email_only = 0) ' .\n ' AND (letsencrypt = 1) ' .\n ' AND (aliasdomain IS NULL) ' .\n ' AND (parentdomainid = ' . $domain['id'] . ')' .\n ' ORDER BY domain'\n );\n\n if (count($subDomains) > 0) {\n foreach ($subDomains as $subDomain) {\n // WWW alias\n if ($subDomain['wwwserveralias'] == 1) {\n if (strpos($result[$domain['domain']], 'www.' . $subDomain['domain']) === false) {\n if (isset($result[$domain['domain']])) {\n $result[$domain['domain']] .= ',www.' . $subDomain['domain'];\n } else {\n $result[$domain['domain']] = 'www.' . $subDomain['domain'];\n }\n }\n }\n\n if (isset($result[$domain['domain']])) {\n $result[$domain['domain']] .= ',';\n }\n\n if (isset($result[$domain['domain']])) {\n $result[$domain['domain']] .= $subDomain['domain'];\n } else {\n $result[$domain['domain']] = $subDomain['domain'];\n }\n }\n }\n }\n }\n\n return $result;\n}", "title": "" }, { "docid": "150247026dca81abce7a1bbcbb80768a", "score": "0.6484783", "text": "public function get_secure_hostname_options()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $store = new Certificate_Store();\n $hostnames = $store->get_secure_hostnames();\n\n return $hostnames;\n }", "title": "" }, { "docid": "2bad41e34de21d0e6409785ec53a25de", "score": "0.6250576", "text": "public function get_certificates()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $certs = array();\n $ssl = new SSL();\n\n foreach ($this->_load_certificates() as $line) {\n $match = array();\n if (preg_match('%^(.+)\\\\.([^\\\\.]+)$%', $line, $match)) {\n if ($match[2] === 'crt') {\n $cert = $match[1];\n $details = $ssl->get_certificate_attributes(self::PATH_CERTIFICATES . '/' . $cert . '.crt');\n $certs[$cert] = $details;\n }\n }\n }\n\n ksort($certs);\n\n return $certs;\n }", "title": "" }, { "docid": "6bc0b7380095abe9a4d732e0330a63ac", "score": "0.6245164", "text": "public function getTrustedServerCertificateNames()\n {\n if (array_key_exists(\"trustedServerCertificateNames\", $this->_propDict)) {\n return $this->_propDict[\"trustedServerCertificateNames\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "9473762e6b96ff871fa0efd5979d5f33", "score": "0.61327595", "text": "public function domains() {\n $_params = array();\n return $this->master->call('inbound/domains', $_params);\n }", "title": "" }, { "docid": "5b0f019943fdc276caf65580ce07831b", "score": "0.6120288", "text": "public function index()\n {\n $agent = new Agent();\n $browser = $agent->browser();\n $domaines = Domain::get()->toArray();\n\n $result = [];\n $ssloff = 0;\n $sslon = 0;\n foreach($domaines as $domaine){\n\n $url = $domaine['domain_url']; \n\n $stream = @stream_context_create( array( 'ssl' => array( 'capture_peer_cert' => true ) ) );\n $socket = @stream_socket_client( 'ssl://' . $url . ':443', $errno, $errstr, 30, STREAM_CLIENT_CONNECT, $stream );\n $result[$url] = ($socket == false) ? 'off' : 'on';\n if( $result[$url] == 'off'){\n $ssloff = $ssloff + 1;\n }else{\n $sslon = $sslon + 1;\n }\n\n }\n\n\n //dd($result);\n\n\n\n/*\n dd($domaines);\n $res = [];\n\n // If we got a ssl certificate we check here, if the certificate domain\n // matches the website domain.\n if ( $socket ) {\n $cont = stream_context_get_params( $socket );\n $cert_ressource = $cont['options']['ssl']['peer_certificate'];\n $cert = openssl_x509_parse( $cert_ressource );\n\n // Expected name has format \"/CN=*.yourdomain.com\"\n $namepart = explode( '=', $cert['name'] );\n\n // We want to correctly confirm the certificate even \n // for subdomains like \"www.yourdomain.com\"\n if ( count( $namepart ) == 2 ) {\n $cert_domain = trim( $namepart[1], '*. ' );\n $check_domain = substr( $domain, -strlen( $cert_domain ) );\n $res = ($cert_domain == $check_domain);\n }\n }\n */\n \n $domaine = $domaines;\n $resul = [];\n $count_on = 0;\n $count_off = 0;\n foreach($domaine as $domain){\n\n try {\n $client = new \\GuzzleHttp\\Client();\n $response = $client->request('GET', $domain['domain_url']); \n $statusCode = $response->getStatusCode();\n $resul[$domain['domain_url']] = ($statusCode == 200) ? 'on' : 'off';\n\n $count_on = $count_on + 1;\n } catch (\\GuzzleHttp\\Exception\\ConnectException $e) {\n \n $resul[$domain['domain_url']] = 'off';\n $count_off = $count_off + 1;\n }\n }\n \n\n $client = Client::get();\n $count_client = $client->count();\n $hosting = Hosting::get();\n $count_hosting = $hosting->count();\n $domain = Domain::get();\n $count_domain = $domain->count();\n $project = Project::get();\n $count_project = $project->count();\n $last5project = Project::join('clients','clients.id','=','projects.id_client')->orderby('projects.created_at')->limit(5)->get();\n return view('backend.dashboard', compact('count_domain','sslon', 'ssloff'), compact('count_client'), compact('count_hosting'), compact('last5project'))->with('count_hosting', $count_hosting)->with('count_project', $count_project)->with('count_on',$count_on)->with('count_off', $count_off)->with('last5project', $last5project)->with('client',$client);\n }", "title": "" }, { "docid": "95e3607d5021fe858e7f38bc93b1ad80", "score": "0.60495317", "text": "function get_domains() {\n\t\tif ( !empty( $this->_config['cname'] ) ) {\n\t\t\treturn (array) $this->_config['cname'];\n\t\t} elseif ( !empty( $this->_config['id'] ) ) {\n\t\t\t$domain = sprintf( '%s.cloudfront.net', $this->_config['id'] );\n\n\t\t\treturn array(\n\t\t\t\t$domain\n\t\t\t);\n\t\t}\n\n\t\treturn array();\n\t}", "title": "" }, { "docid": "cfecd630f3a628f9cb578563b929cf1c", "score": "0.600487", "text": "public function getDomains();", "title": "" }, { "docid": "2b3098937a0818f9e2e9c41b1008f066", "score": "0.5981674", "text": "public function get_certs()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $certs = array();\n\n foreach ($this->_load_certificates() as $line) {\n $match = array();\n if (preg_match('%^(.+)\\\\.([^\\\\.]+)$%', $line, $match)) {\n $cert = $match[1];\n if (!array_key_exists($cert, $certs))\n $certs[$cert] = array();\n\n $certs[$cert][$match[2]] = self::PATH_CERTIFICATES . \"/\" . $line;\n }\n }\n\n ksort($certs);\n\n return $certs;\n }", "title": "" }, { "docid": "ec3c02cc573b274f0aa820b0eb8e7243", "score": "0.5859144", "text": "public static function listSites () {\n\t\treturn self::doCall('listSites', array());\n\t}", "title": "" }, { "docid": "e131d6ecc1425d3c522d6d2c94ae7658", "score": "0.58142644", "text": "private function _getDomainNames () {\n\t\t\tif ( $this->_psl == null ) {\n\t\t\t\t$this->_psl = $this->_publicSuffixList->getPSL ();\n\t\t\t}\n\t\t\t$domains = array ();\n\t\t\t$stores = $this->_storeManager->getStores ();\n\t\t\tforeach ( $stores as $store ) {\n\t\t\t\t$domain = $this->_publicSuffixList->extract ( $store->getBaseUrl (), $this->_psl ) [\"root_domain\"];\n\t\t\t\tarray_push ( $domains, $domain );\n\t\t\t}\n\t\t\t$domains = array_unique ( $domains );\n\t\t\tsort ( $domains );\n\t\t\treturn $domains;\n\t\t}", "title": "" }, { "docid": "fda4cf39ba8060fb2e362b24c9c0474e", "score": "0.5801201", "text": "public function hosts( ) {\n return [\n $this -> allSubdomainsOfApplicationUrl( ) ,\n ] ;\n }", "title": "" }, { "docid": "3e33880b7693a244f17d7c22ae1af1e6", "score": "0.5778405", "text": "static function getDomains() {\n\t\treturn static::$_domains;\n\t}", "title": "" }, { "docid": "a91fc5ad5179f198c4b11da20f9ae5da", "score": "0.5762777", "text": "public function getAllDomainsLocale();", "title": "" }, { "docid": "ae7a89d51e769ffe9b40e2945d1aa35c", "score": "0.5761024", "text": "function getDNSServers()\n{\n\texec(\"sudo grep nameserver /etc/resolv.conf | cut -d' ' -f2\",$nameservers);\n\treturn($nameservers);\n}", "title": "" }, { "docid": "4e5200fcb6b2e84175e6c78f8a55dc87", "score": "0.5750179", "text": "public static function getWebhostingDomainNames()\n\t{\n\t\treturn self::_getSoapClient(array_merge(array(), array('__method' => 'getWebhostingDomainNames')))->getWebhostingDomainNames();\n\t}", "title": "" }, { "docid": "3a23396aff2010f6dbc932a8c45fad05", "score": "0.57472837", "text": "function listDomains( Array $reqData=array() ){\n return self::$_instance->get('sip_domains', $reqData);\n }", "title": "" }, { "docid": "68ef1d5de127d57671e6dbc42d62a344", "score": "0.5738122", "text": "public function hosts()\n {\n return [\n $this->allSubdomainsOfApplicationUrl(),\n ];\n }", "title": "" }, { "docid": "0e2b7d958ae77a43698aa9adbff78860", "score": "0.57246625", "text": "public function get_cert_names()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $certs = array();\n\n foreach ($this->_load_certificates() as $line) {\n if (preg_match('%^(.+)\\\\.([^\\\\.]+)$%', $line, $match)) {\n $cert = $match[1];\n $certs[$cert] = $cert;\n }\n }\n\n ksort($certs);\n\n return $certs;\n }", "title": "" }, { "docid": "d2a6bd9345ee8d227f3dde215676773b", "score": "0.5704642", "text": "public function getDomains() : array\n {\n return $this->domains;\n }", "title": "" }, { "docid": "06c0b79cc5c297b6af3e7f15c9407b3a", "score": "0.56332886", "text": "protected static function checkSslIsInstalled(): bool\n {\n return !empty(Request::server('HTTPS')) && Request::server('HTTPS') != 'off';\n }", "title": "" }, { "docid": "3a60fd991437271a7a09158d622a62cc", "score": "0.5621418", "text": "public function getCerts(): array;", "title": "" }, { "docid": "ab0e561446355a4f6b056475df4b7c12", "score": "0.56107247", "text": "function getDomains()\r\n {\r\n reset( $this->liste );\r\n return array_keys( $this->liste );\r\n }", "title": "" }, { "docid": "f8fb0d5ae87b04d94b6c94b895fbddad", "score": "0.55926275", "text": "public function https()\n {\n try {\n $data = SslCertificate::createForHostName($this->name());\n return $data->isValid();\n } catch (\\Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "a0ac64a5873968e6b06f93f1548ade17", "score": "0.55893505", "text": "public function findCDNServers() {\r\n $domains = array();\r\n\r\n HMW_Debug::dump(\"findCDNServers\", HMW_Classes_Tools::isPluginActive('wp-rocket/wp-rocket.php'));\r\n\r\n if (HMW_Classes_Tools::isPluginActive('wp-rocket/wp-rocket.php') && function_exists('get_rocket_option')) {\r\n HMW_Debug::dump(\"wp rocket installed\");\r\n $cnames = get_rocket_option('cdn_cnames', array());\r\n foreach ($cnames as $k => $_urls) {\r\n HMW_Debug::dump($_urls);\r\n $_urls = explode(',', $_urls);\r\n $_urls = array_map('trim', $_urls);\r\n\r\n foreach ($_urls as $url) {\r\n $domains[] = $url;\r\n }\r\n }\r\n }\r\n\r\n if (HMW_Classes_Tools::isPluginActive('cdn-enabler/cdn-enabler.php')) {\r\n if ($cd_enabler = get_option('cdn_enabler')) {\r\n if (isset($cd_enabler['url'])) {\r\n $domains[] = $cd_enabler['url'];\r\n }\r\n }\r\n }\r\n\r\n if (HMW_Classes_Tools::isPluginActive('powered-cache/powered-cache.php')) {\r\n global $powered_cache_options;\r\n if (isset($powered_cache_options['cdn_hostname'])) {\r\n $hostnames = $powered_cache_options['cdn_hostname'];\r\n if (!empty($hostnames)) {\r\n foreach ($hostnames as $host) {\r\n if (!empty($host)) {\r\n $domains[] = $host;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (HMW_Classes_Tools::isPluginActive('wp-super-cache/wp-cache.php')) {\r\n if (get_option('ossdl_off_cdn_url') <> '' && get_option('ossdl_off_cdn_url') <> home_url()) {\r\n $domains[] = get_option('ossdl_off_cdn_url');\r\n }\r\n }\r\n\r\n if (!empty($domains)) {\r\n return $domains;\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "d50d8fb32902b4834d3131b2bd7effbb", "score": "0.55743104", "text": "public function getAllVpnSsl() : stdClass\n\t{\n\t\treturn $this->curlRequest('GET', '/monitor/vpn/ssl', NULL, NULL, NULL);\n\t}", "title": "" }, { "docid": "16db8558ce95afc0d4b4fd7f21161b13", "score": "0.5522753", "text": "public function getDomainNames()\n {\n return $this->domain_names;\n }", "title": "" }, { "docid": "8ec112ce1cec9097e28ac8cff54fa6d9", "score": "0.55136716", "text": "public function availableDomainsProvider()\n {\n $loader = new JsonLoader(\"src/data/servers.json\");\n $cases = array();\n foreach (array_keys($loader->load()) as $TLD) {\n $cases[] = array('helge-sverre-domain-availability.'.$TLD);\n }\n return $cases;\n }", "title": "" }, { "docid": "59df424218ae7551e44ce3085e8725d7", "score": "0.5498171", "text": "function getDomains()\n {\n $res = $this->doRequest( 'GET_DOMAINS' );\n if ( ! $res ) {\n return false;\n }\n $domains = array();\n for ( $i=1; $i <= $res['domains']; $i++ ) {\n $dom = 'domain'.$i;\n $classes = array();\n for ( $j=1; $j<=$res[$dom.'classes']; $j++ ) {\n $classes[$res[$dom.'class'.$j.'name']] = $res[$dom.'class'.$j.'mindevcount'];\n }\n $domains[] = array( 'name' => $res[$dom],\n 'classes' => $classes );\n }\n return $domains;\n }", "title": "" }, { "docid": "fb29fd9380d8401aa52793efad038cf2", "score": "0.5485817", "text": "function updateSSLDomainCertificate($domain)\n{\n $result = -1;\n\n // Path where all certificates are stored\n $domainSSLPath = GETSSL_CONFIG_PATH . DIRECTORY_SEPARATOR . $domain;\n\n // Get domainID\n $domainId = $GLOBALS['db']->single('SELECT id FROM ' . TABLE_PANEL_DOMAINS . ' WHERE domain = :domain', array('domain' => $domain));\n if ($domainId) {\n // Delete subdomains in TABLE_PANEL_DOMAIN_SSL_SETTINGS because they are included as SANS\n $delSubdomains = $GLOBALS['db']->query('DELETE FROM ' . TABLE_PANEL_DOMAIN_SSL_SETTINGS . ' WHERE domainid IN ' .\n '(SELECT id FROM ' . TABLE_PANEL_DOMAINS . ' WHERE parentdomainid = :domainid)', array('domainid' => $domainId));\n\n if ((DEBUG) && ($delSubdomains > 0)) {\n logSyslog(LOG_DEBUG, 'updateSSLDomainCertificate: Deleted ' . $delSubdomains . ' of domain [' . $domain . ']');\n }\n\n // Make sure the certificate file exists\n if (file_exists($domainSSLPath . DIRECTORY_SEPARATOR . $domain . '.crt')) {\n // Read local certificate\n $sslCrt = file_get_contents($domainSSLPath . DIRECTORY_SEPARATOR . $domain . '.crt');\n\n // Certificate info\n $sslCrtInfo = openssl_x509_parse($sslCrt);\n\n // Check if a record exists for current domain\n $sslDomainId = $GLOBALS['db']->single('SELECT id FROM ' . TABLE_PANEL_DOMAIN_SSL_SETTINGS . ' WHERE domainid = :domainid', array('domainid' => $domainId));\n\n if ($sslDomainId) {\n // Check certificate changes\n $sslCrtDatabase = $GLOBALS['db']->single('SELECT ssl_cert_file FROM ' . TABLE_PANEL_DOMAIN_SSL_SETTINGS . ' WHERE id = :id', array('id' => $sslDomainId));\n if ($sslCrt != $sslCrtDatabase) {\n // Update certificate in TABLE_PANEL_DOMAIN_SSL_SETTINGS\n $certificate = $GLOBALS['db']->query('UPDATE ' . TABLE_PANEL_DOMAIN_SSL_SETTINGS . ' SET ssl_csr_file = :ssl_csr_file, ssl_cert_file = :ssl_cert_file, ssl_key_file = :ssl_key_file, ssl_ca_file = :ssl_ca_file, ssl_cert_chainfile = :ssl_cert_chainfile, ssl_fullchain_file = :ssl_fullchain_file, expirationdate = :expirationdate ' .\n ' WHERE id = :id', array(\n 'id' => $sslDomainId,\n 'ssl_csr_file' => file_get_contents($domainSSLPath . DIRECTORY_SEPARATOR . $domain . '.csr'),\n 'ssl_cert_file' => file_get_contents($domainSSLPath . DIRECTORY_SEPARATOR . $domain . '.crt'),\n 'ssl_key_file' => file_get_contents($domainSSLPath . DIRECTORY_SEPARATOR . $domain . '.key'),\n 'ssl_ca_file' => file_get_contents($domainSSLPath . DIRECTORY_SEPARATOR . 'chain.crt'),\n 'ssl_cert_chainfile' => file_get_contents($domainSSLPath . DIRECTORY_SEPARATOR . 'chain.crt'),\n 'ssl_fullchain_file' => file_get_contents($domainSSLPath . DIRECTORY_SEPARATOR . 'fullchain.crt'),\n 'expirationdate' => date('Y-m-d H:i:s', $sslCrtInfo['validTo_time_t']),\n )\n );\n\n $result = 0;\n if (DEBUG) {\n logSyslog(LOG_DEBUG, 'updateSSLDomainCertificate: Updated certificate for domain ' . $domain);\n }\n } else {\n $result = 1;\n if (DEBUG) {\n logSyslog(LOG_DEBUG, 'updateSSLDomainCertificate: Certificate for domain ' . $domain . ' is unchanged.');\n }\n }\n } else {\n // Add certificate in TABLE_PANEL_DOMAIN_SSL_SETTINGS\n $certificate = $GLOBALS['db']->query('INSERT INTO ' . TABLE_PANEL_DOMAIN_SSL_SETTINGS . ' (domainid, ssl_csr_file, ssl_cert_file, ssl_key_file, ssl_ca_file, ssl_cert_chainfile, ssl_fullchain_file, expirationdate)' .\n 'VALUES (:domainid, :ssl_csr_file, :ssl_cert_file, :ssl_key_file, :ssl_ca_file, :ssl_cert_chainfile, :ssl_fullchain_file, :expirationdate)', array(\n 'domainid' => $domainId,\n 'ssl_csr_file' => file_get_contents($domainSSLPath . DIRECTORY_SEPARATOR . $domain . '.csr'),\n 'ssl_cert_file' => file_get_contents($domainSSLPath . DIRECTORY_SEPARATOR . $domain . '.crt'),\n 'ssl_key_file' => file_get_contents($domainSSLPath . DIRECTORY_SEPARATOR . $domain . '.key'),\n 'ssl_ca_file' => file_get_contents($domainSSLPath . DIRECTORY_SEPARATOR . 'chain.crt'),\n 'ssl_cert_chainfile' => file_get_contents($domainSSLPath . DIRECTORY_SEPARATOR . 'chain.crt'),\n 'ssl_fullchain_file' => file_get_contents($domainSSLPath . DIRECTORY_SEPARATOR . 'fullchain.crt'),\n 'expirationdate' => date('Y-m-d H:i:s', $sslCrtInfo['validTo_time_t']),\n )\n );\n\n $result = 0;\n if (DEBUG) {\n logSyslog(LOG_DEBUG, 'updateSSLDomainCertificate: Added certificate for domain ' . $domain);\n }\n }\n } else {\n $result = -1;\n if (DEBUG) {\n logSyslog(LOG_DEBUG, 'updateSSLDomainCertificate: Missing certificate for domain ' . $domain);\n }\n }\n } else {\n $result = -10;\n if (DEBUG) {\n logSyslog(LOG_DEBUG, 'updateSSLDomainCertificate: Unknown domain ' . $domain);\n }\n }\n\n\n return $result;\n}", "title": "" }, { "docid": "1a7073dd788ffa334b2eafa8dc75dea1", "score": "0.54735297", "text": "public function hostnames() {\n $response = \\Terminus_Command::request(\"sites\", $this->site->getId(), 'environments/' . $this->name . '/hostnames', 'GET');\n return $response['data'];\n }", "title": "" }, { "docid": "53231da667080c8dbec8562ec870beba", "score": "0.54731596", "text": "public function getSites() : array\n {\n $endpointUrl = get_site_option('school-redirect-endpoint');\n\n if (!$endpointUrl) {\n return array();\n }\n\n $request = wp_remote_get($endpointUrl);\n $response = wp_remote_retrieve_body($request);\n $response = json_decode($response);\n\n if (!$response) {\n return array();\n }\n\n // Remove main site from array\n $response = array_filter($response, function ($site) {\n return !is_main_site($site->blog_id);\n });\n\n wp_cache_add('sites', $response, 'school-redirect', 60*60*24);\n\n return $response;\n }", "title": "" }, { "docid": "7b5a86c92da87b7a5dd1eadcadc5154b", "score": "0.5461671", "text": "public function getListAll() {\n try{\n return $this->instance->agent_list_sites();\n } catch (Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "dec13841b834d2c556fff1d00c99e29e", "score": "0.5458479", "text": "public function secured()\n {\n return collect($this->files->scandir($this->certificatesPath()))\n ->map(function ($file) {\n return str_replace(['.key', '.csr', '.crt', '.conf'], '', $file);\n })->unique()->values()->all();\n }", "title": "" }, { "docid": "86d17d10183a5ecbb4a509c98dfc0aa3", "score": "0.54382545", "text": "public function getDomainNames()\n {\n $response = $this->get(self::URI_DOMAINNAMES);\n if (!isset($response['domains'])) {\n return [];\n }\n\n $domains = [];\n foreach ($response['domains'] as $result) {\n $domain = new Domain($result['name']);\n $domain->authCode = $result['authCode'];\n $domain->isLocked = $result['isLocked'];\n $domain->registrationDate = $result['registrationDate'];\n $domain->renewalDate = $result['renewalDate'];\n\n $domains[] = $domain;\n }\n\n return $domains;\n }", "title": "" }, { "docid": "0e34c9089bc0c87b4dbb0c33c9caafce", "score": "0.54199934", "text": "function yourls_is_ssl() {\n\t\tif ( isset($_SERVER['HTTPS']) ) {\n\t\t\tif ( 'on' == strtolower($_SERVER['HTTPS']) )\n\t\t\t\treturn true;\n\t\t\tif ( '1' == $_SERVER['HTTPS'] )\n\t\t\t\treturn true;\n\t\t} elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "17118110cbbef2232510e73d166d9cf4", "score": "0.5411014", "text": "private function getCurlSslSettings(): array\n {\n return [\n CURLOPT_SSL_VERIFYPEER => true,\n CURLOPT_SSL_VERIFYHOST => 2,\n CURLOPT_CAINFO => \\GinoPane\\NanoRest\\ROOT_DIRECTORY . DIRECTORY_SEPARATOR . 'cacert.pem'\n ];\n }", "title": "" }, { "docid": "d2640f8724dfb74ac0cecf6c63c4b54c", "score": "0.54024434", "text": "public function getAllRegistrationForticloudDomains() : stdClass\n\t{\n\t\treturn $this->curlRequest('GET', '/monitor/registration/forticloud/domains', NULL, NULL, NULL);\n\t}", "title": "" }, { "docid": "f491e8568812927652c9ca7262dc3149", "score": "0.5399758", "text": "public function getSubDomains()\n {\n return $this->domains;\n }", "title": "" }, { "docid": "68fba26974bbf55aeb2127dbaadd6da9", "score": "0.5375492", "text": "public function getSubdomains()\n {\n if (array_key_exists(\"subdomains\", $this->_propDict)) {\n return $this->_propDict[\"subdomains\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "b22dcc66079b94cabe79e68683b7b191", "score": "0.5356808", "text": "function fetchsslinfo($args) {\n\t\tif (!isset($args['domain']) && !isset($args['crtdata'])) {\n\t\t\terror_log(\"fetchsslinfo requires domain OR crtdata is passed to it\");\n\t\t}\n\t\tif (isset($args['crtdata'])) {\n\t\t\t// crtdata must be URL-encoded!\n\t\t\t$args['crtdata'] = urlencode($args['crtdata']);\n\t\t}\n\t\treturn $this->xmlapi_query('fetchsslinfo', $args);\n\t}", "title": "" }, { "docid": "a9af2f0b9e8a9e2f5a1f8090467321f9", "score": "0.535256", "text": "public function getSubjectDomains()\n {\n return $this->subjectDomains;\n }", "title": "" }, { "docid": "dca5b41e437beba24e9e7936bdc60b20", "score": "0.5352202", "text": "public function getRootCertificatesForServerValidation()\n {\n if (array_key_exists(\"rootCertificatesForServerValidation\", $this->_propDict)) {\n return $this->_propDict[\"rootCertificatesForServerValidation\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "2c70a658892be55b0c0d60737a1aa901", "score": "0.5343554", "text": "public function enableSSLChecks()\n {\n $this->sslChecks = OAUTH_SSLCHECK_BOTH;\n\n return true;\n }", "title": "" }, { "docid": "0c22e30b5e4be3981d4ff55aa3589a27", "score": "0.5336338", "text": "public function ca_list ()\n\t\t{\n\t\t\treturn $this->do_request ('/ca/list', array ('token' => $this->token));\n\t\t}", "title": "" }, { "docid": "6ab6f2e38cce328da42842c2f6844470", "score": "0.5320597", "text": "function get_hosts(){\n\treturn array(array(\"scylla.cs.uoi.gr\",22),array(\"ecourse.uoi.gr\",80),array(\"eudoxus.gr\",80),array(\"classweb.uoi.gr\",443));\n}", "title": "" }, { "docid": "3c4f5b3b3cb7629683cc425aa0cc4371", "score": "0.53186595", "text": "public function getLangsDomains() {\n\t\ttry{\n\t\t\tif (count($this->langsDomains) > 0) {\n\t\t\t\treturn $this->langsDomains;\n\t\t\t}\n\t\t\tforeach ($this->getConfigInstance()->getRootIterator() as $node) {\n\t\t\t\t$this->langsDomains[trim($node->lang)] = trim($node->getContent());\n\t\t\t}\n\t\t\treturn $this->langsDomains;\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "title": "" }, { "docid": "288a1ba23a3fc8021bd73e63cabe8c1f", "score": "0.52916485", "text": "public function domainsGet()\n {\n list($response) = $this->domainsGetWithHttpInfo();\n return $response;\n }", "title": "" }, { "docid": "c59fe25c877256f4515d3a004bf758f7", "score": "0.5281288", "text": "function getSiteList()\n {\n $sites = shell_exec('terminus site:list --format=json');\n $sites = json_decode($sites);\n $output = [];\n\n foreach ($sites as $key => $site) {\n $output[] = $site->name;\n }\n\n return $output;\n }", "title": "" }, { "docid": "d67828d574b7689c92d4c276221bdc5d", "score": "0.5280093", "text": "public function getAllWebsites();", "title": "" }, { "docid": "f67bbf59ae3853797e0de9e96d952359", "score": "0.5257603", "text": "public function getHosts()\n {\n if (method_exists($this->_mongo, \"getHosts\")) {\n return $this->_mongo->getHosts();\n }\n return array();\n }", "title": "" }, { "docid": "87d07b287d46220c7ff2d3be746d81f5", "score": "0.5254298", "text": "private function fetchPortalServers()\n {\n $urls = [];\n\n $url = $this->host . '/IZ/GetPortalList.aspx?';\n\n $data = [\n 'UserID' => $this->credentials->getUserName(),\n 'Pwd' => $this->credentials->getPassword()\n ];\n\n $url = $url . http_build_query($data);\n\n $request = new Request($url);\n $request->run();\n\n if(!$request->wasSuccessful()){\n throw new \\Exception($request->response->getState()['httpCode'] . ' on fetching Portal Servers with url: ' . $url);\n }\n\n $xml = simplexml_load_string($request->response->getState()['body']);\n\n foreach ($xml->ISPortals->children() as $portal)\n {\n array_push($urls, (string)$portal->Url);\n }\n\n return $urls;\n }", "title": "" }, { "docid": "b4ca4213afef0173740ea716881720f2", "score": "0.5253087", "text": "function yourls_needs_ssl() {\n\t\tif ( defined('YOURLS_ADMIN_SSL') && YOURLS_ADMIN_SSL == true )\n\t\t\treturn true;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "237742be88a96931f4574a50a310e118", "score": "0.52525014", "text": "public function getAllWebfilterTrustedUrls() : stdClass\n\t{\n\t\treturn $this->curlRequest('GET', '/monitor/webfilter/trusted-urls', NULL, NULL, NULL);\n\t}", "title": "" }, { "docid": "442bc988b6f298fd230bf42db200012c", "score": "0.5250477", "text": "public function list()\n {\n return $this->HosterAPI->get('datacenter/server');\n }", "title": "" }, { "docid": "1412a8d079621065aee892008755d9ac", "score": "0.524296", "text": "public function getSslOptions()\n {\n\n }", "title": "" }, { "docid": "d7b8b51311499bd636a5d4e0ce69f38e", "score": "0.52406204", "text": "public function isSSL()\n {\n if( !empty( $_SERVER['HTTPS'] ) )\n return true;\n\n if( !empty( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' )\n return true;\n\n return false;\n }", "title": "" }, { "docid": "b0c094ba026a1a674d39f6b576dc3be2", "score": "0.52131563", "text": "public function listHostedServices()\n {\n $context = new HttpCallContext();\n $context->setMethod(Resources::HTTP_GET);\n $context->setPath($this->_getHostedServicePath());\n $context->addStatusCode(Resources::STATUS_OK);\n\n $response = $this->sendContext($context);\n $serialized = $this->dataSerializer->unserialize($response->getBody());\n\n return Utilities::arrayToObject($serialized);\n }", "title": "" }, { "docid": "de05cc03a99361be646e6cd6ee4294eb", "score": "0.5205474", "text": "public function getDomainNames () {\n\t\t\t$domains = $this->_dataHelper->getDomainNames ();\n\t\t\treturn $domains;\n\t\t}", "title": "" }, { "docid": "bfc532ea5ed8028a16fc6112e9f0e905", "score": "0.52040243", "text": "public function get_certinfo($domain)\n {\n //check if the certificate is still valid, and send an email to the administrator if this is not the case.\n $url = $domain;\n $original_parse = parse_url($url, PHP_URL_HOST);\n\n if ($original_parse) {\n\n $get = stream_context_create(array(\"ssl\" => array(\"capture_peer_cert\" => TRUE)));\n if ($get) {\n set_error_handler(array($this, 'custom_error_handling'));\n $read = stream_socket_client(\"ssl://\" . $original_parse . \":443\", $errno, $errstr, 30, STREAM_CLIENT_CONNECT, $get);\n restore_error_handler();\n\n if ($errno == 0 && $read) {\n\n $cert = stream_context_get_params($read);\n $certinfo = openssl_x509_parse($cert['options']['ssl']['peer_certificate']);\n }\n }\n }\n\n if (!empty($certinfo)) return $certinfo;\n\n return false;\n }", "title": "" }, { "docid": "75b08f4f082fdea9a2da241c17dd5caf", "score": "0.519685", "text": "private function getSMTPServerList()\n\t{\n\t\t// [0]: Chi so cua mx record trong mang ma vua duoc dung\n\t\t// [1]->...: Cac mx record\n\t\treturn array(1,\"timkm.com\");\n\t}", "title": "" }, { "docid": "371af4c224b4238d54a6fc61b86510a6", "score": "0.5177447", "text": "public function getAllSites() {\r\n return $this->dbLink->query(\"SELECT * FROM site\", NULL, TRUE);\r\n }", "title": "" }, { "docid": "382fad2e51a77991c30288b2aa6358ea", "score": "0.51746637", "text": "function getDBEmailHosts()\n{\n $mailHosts = '';\n\n $values = $GLOBALS['db']->query('SELECT domain FROM ' . TABLE_PANEL_DOMAINS .\n ' WHERE (deactivated = 0) ' .\n 'AND (isemaildomain = 1) ' .\n 'AND id IN (SELECT domainid FROM ' . TABLE_MAIL_USERS . ')');\n\n if ($values) {\n foreach ($values as $value) {\n if ($mailHosts <> '') {\n $mailHosts .= ',';\n }\n $mailHosts .= MAIL_HOST . '.' . $value['domain'];\n }\n }\n\n return $mailHosts;\n}", "title": "" }, { "docid": "fcadb64a02dad58485235f98ed8152c8", "score": "0.51731116", "text": "function has_ssl( $domain ) {\n\t$ssl_check = @fsockopen( 'ssl://' . $domain, 443, $errno, $errstr, 30 );\n\t$res = !! $ssl_check;\n\tif ( $ssl_check ) {\n\t\tfclose( $ssl_check );\n\t}\n\treturn $res;\n}", "title": "" }, { "docid": "74afcb0013e1b8e1d25b4e68d0254968", "score": "0.51677287", "text": "public function isSsl();", "title": "" }, { "docid": "74afcb0013e1b8e1d25b4e68d0254968", "score": "0.51677287", "text": "public function isSsl();", "title": "" }, { "docid": "2e1bff8a4e328a75811e82674230963b", "score": "0.5163671", "text": "public function getDomainNames()\n {\n return $this->getCache('domainNames', function () {\n $list = array_merge($this->aliases, $this->pointers, [$this->getDomainName()]);\n sort($list);\n return $list;\n });\n }", "title": "" }, { "docid": "993de4c033a0ec3a61664ee8bdfae23b", "score": "0.5161925", "text": "function getReservedDomains($installation_id , $server_name){\n\n \t\n\n \t\t// Is there a domain list for this installation_id\n\n \t\tif($installation_id && is_array($this->virtualhosts_by_installation[$installation_id])){\n\n \t\t\t$allowed_domain_list = $this->virtualhosts_by_installation[$installation_id]['domains'];\n\n \t\t}\n\n \t\t// If not, fallback to the domain name\n\n \t\telse{\n\n \t\t\t$allowed_domain_list = $this->virtualhosts_by_domain[$server_name]['domains'];\n\n \t\t}\n\n \t\t\n\n \t\t// Do an array diff against all domains:\n\n \t\tif(is_array($allowed_domain_list)){\n\n \t\t\t$reserved_domains = array_diff($this->domains , $allowed_domain_list);\n\n \t\t\tsort($reserved_domains);\n\n \t\t}\n\n \t\telse{\n\n \t\t\t$reserved_domains = $this->domains;\n\n \t\t}\n\n \t\t\n\n \t\t//Return the result\n\n \t\treturn $reserved_domains;\n\n \t\n\n \t}", "title": "" }, { "docid": "e3f7a00a6d98b244b2fc4b73523a38e3", "score": "0.51540136", "text": "public function fetchDomains() {\n\n foreach ($this->_letters as $letter) {\n\n $this->_url->query->set(\"bukva\", $letter);\n\n print \"Fetching domains for letter: \". $letter .\"\\n\";\n\n $fetched = false;\n\n $dom = null;\n while (!$fetched) {\n try {\n $dom = ParserLoader::fetch($this->_url);\n $fetched = true;\n } catch (NoConnectionException $e) {\n // to do\n }\n }\n\n $num_pages = count($dom->find('td[align=center] a[href*=bukva]'));\n $linksCount = 0;\n\n for ($i = 0; $i < $num_pages; $i++) {\n\n $this->_url->query->set(\"del\", $i);\n $dom = Parser::file_get_html($this->_url);\n\n $links = $dom->find('td[align=center] a[href*=dom]');\n\n foreach ($links as $link) {\n $domain = new Url($link->href);\n $this->_domains[] = $domain->getQuery()->get(\"dom\");\n $linksCount++;\n }\n\n sleep($this->_pause);\n\n }\n\n print \"Fetched \". $linksCount .\" domains from \". $num_pages .\" pages.\\n\\n\";\n $this->_count += $linksCount;\n\n }\n\n print \"--------\\n\";\n print \"Fetched \". $this->_count .\" domains in 00h 00m 00s.\";\n print \"\\n\\n\";\n\n if ($this->_saveAsJson) {\n $this->saveDomainsAsJson();\n }\n\n }", "title": "" }, { "docid": "dc29703872af4e3db4ffcd9e112a491b", "score": "0.51487726", "text": "public function isSslEnabled(): bool\n {\n return isset($this->settings['ssl_cert_file']);\n }", "title": "" }, { "docid": "79fbe297c89d2148f50470616553dee9", "score": "0.5147457", "text": "function testSslCertificate($urlsToTest, $testId){\n\nconnectToDb($db);\nupdateStatus($db, \"Testing $urlsToTest for untrustworthy SSL certificates...\", $testId);\n\n$log = new Logger();\n$log->lfile('logs/eventlogs');\n\n$log->lwrite(\"Starting SSL certificate verification function on $urlsToTest\");\n\n//Identify which URLs, if any, begin with https\n$log->lwrite(\"Identifying which URLs, if any, begin with HTTPS\");\nupdateStatus($db, \"Identifying which URLs, if any, begin with HTTPS...\", $testId);\n\n$usingHttps = false;\n$httpsUrl = '';\n\nforeach($urlsToTest as $currentUrl)\n{\n\tif(substr($currentUrl, 0, 5) == 'https')\n\t{\n\t\t$usingHttps = true;\n\t\t$httpsUrl = $currentUrl;\n\t\techo \"https url = $currentUrl <br>\";\n\t\t$log->lwrite(\"Found HTTPS URL: $currentUrl\");\n\t\tbreak;\n\t}\n}\n\nif($usingHttps)\n{\n\t//Check if Mozilla's cacert.pem file is online and update our version of it if needed\n\t$log->lwrite(\"Checking if cacert.pem is up to date\");\n\t$http = new http_class;\n\t$http->timeout=0;\n\t$http->data_timeout=0;\n\t//$http->debug=1;\n\t$http->user_agent=\"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\";\n\t$http->follow_redirect=1;\n\t$http->redirection_limit=5;\n\n\t$cacertsUrl = \"http://curl.haxx.se/ca/cacert.pem\";\n\n\t$error=$http->GetRequestArguments($cacertsUrl,$arguments);\n\t\t\t\t\t\t\t\n\t$error=$http->Open($arguments);\n\n\t$log->lwrite(\"URL to be requested is: $cacertsUrl\");\n\n\tif($error==\"\")\n\t{\n\t\t$log->lwrite(\"Sending HTTP request to $cacertsUrl\");\n\t\t$error=$http->SendRequest($arguments);\n\t\t\n\t\tif($error==\"\")\n\t\t{\n\t\t\t$headers=array();\n\t\t\t$error=$http->ReadReplyHeaders($headers);\n\t\t\tif($error==\"\")\n\t\t\t{\t\t\t\t\n\t\t\t\t$responseCode = $http->response_status;//This is a string\n\t\t\t\t$log->lwrite(\"Received response code: $responseCode\");\n\t\t\t\tif(intval($responseCode) == 200)\n\t\t\t\t{\n\t\t\t\t\t//Update cacerts.pem file\n\t\t\t\t\t$cacerts = file_get_contents($cacertsUrl);\n\t\t\t\t\t$oldCacerts = file_get_contents('tests/cacert.pem');\n\t\t\t\t\tif($cacerts != $oldCacerts)\n\t\t\t\t\t{\n\t\t\t\t\t\tfile_put_contents('tests/cacert.pem',$cacerts);\n\t\t\t\t\t\t$log->lwrite(\"cacert.pem file updated\");\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$log->lwrite(\"cacert.pem is already up to date so was not updated\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$log->lwrite(\"Problem accessing Mozilla's URL containing cacert.pem file\");\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Initialize session and set URL.\n\t$ch = curl_init();\n\n\tcurl_setopt($ch, CURLOPT_URL, $httpsUrl);\n\n\t// Set so curl_exec returns the result instead of outputting it.\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n\t$user_agent = \"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\"; \n\tcurl_setopt($ch, CURLOPT_USERAGENT, $user_agent); \n\n\tcurl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );\n\n\t//Check server's certificate against certificates specified in .pem file below\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); \n\n\t//If last parameter is 1, checks the SSL certificate for a comman name (the domain of the site sometimes specified in the certificate), e.g. the site that acquired the certificate\n\t//If last parameter is 2, checks for the common name and, if it exists, checks that it matches the hostname provided\n\t//Default is 2\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); \n\n\t//Using Mozillas certificate file with trusted certificates\n\tcurl_setopt($ch, CURLOPT_CAINFO, getcwd() . \"/cacert.pem\");\n\n\t// Get the response and close the channel.\n\t$response = curl_exec($ch);\n\t\n\tif($db)\n\t\tincrementHttpRequests($db, $testId);\n\n\tif(empty($response))\n\t{\n\t\t//The echo's here are for testing/debugging the function on its own\n\t\techo '<br>SSL Certificate is not trusted!<br>Url: ' . $httpsUrl . '<br>';\n\t\techo 'Method: GET <br>';\n\t\t//echo 'Url Requested: ' . $testUrl . '<br>';\n\t\techo 'Error: ' . curl_error($ch) . '<br>';\n\t\t$tableName = 'test' . $testId;\n\t\n\t\t//Check if this vulnerability has already been found and added to DB. If it hasn't, add it to DB.\n\t\t$query = \"SELECT * FROM test_results WHERE test_id = $testId AND type = 'sslcert' AND method = 'get' AND url = '$httpsUrl' AND attack_str = '$httpsUrl'\";\n\t\t$result = $db->query($query);\n\t\tif(!$result)\n\t\t\t$log->lwrite(\"Could not execute query $query\");\n\t\telse\n\t\t{\n\t\t\t$log->lwrite(\"Successfully executed query $query\");\n\t\t\t$numRows = $result->num_rows;\n\t\t\tif($numRows == 0)\n\t\t\t{\t\n\t\t\t\t$log->lwrite(\"Number of rows is $numRows for query: $query\");\n\t\t\t\tinsertTestResult($db, $testId, 'sslcert', 'get', $httpsUrl, $httpsUrl);\n\t\t\t}\n\t\t}\t\n\t}\n curl_close($ch);\n}\n\n}", "title": "" }, { "docid": "af96f888fe2c3f1d96d2de31a6d25f23", "score": "0.5141026", "text": "public function isSSL()\n {\n if( !empty( $_SERVER['https'] ) && ($_SERVER['HTTPS'] != 'off') )\n return true;\n\n if( !empty( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' )\n return true;\n\n return false;\n }", "title": "" }, { "docid": "811bd831c3be8c75175a67d053d8975f", "score": "0.5121267", "text": "function _drush_acsf_tools_get_sites() {\n $sites = FALSE;\n\n // Look for list of sites and loop over it.\n if (($map = gardens_site_data_load_file()) && isset($map['sites'])) {\n // Acquire sites info.\n $sites = array();\n foreach ($map['sites'] as $domain => $site_details) {\n if (!isset($sites[$site_details['name']])) {\n $sites[$site_details['name']] = $site_details;\n }\n $sites[$site_details['name']]['domains'][] = $domain;\n }\n }\n else {\n drush_log(\"\\nFailed to retrieve the list of sites of the factory.\", 'error');\n }\n\n return $sites;\n}", "title": "" }, { "docid": "fa1bb238ca0cbe3637bf399fffa2e8a4", "score": "0.5120697", "text": "function is_https() {\n\n // Local server flags\n if (isset($_SERVER['HTTPS'])\n && strtolower($_SERVER['HTTPS']) == 'on')\n return true;\n\n // Check if SSL was terminated by a loadbalancer\n return (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])\n && !strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https'));\n }", "title": "" }, { "docid": "630782182c1ef0e07e8e823b6e3a1c9b", "score": "0.50979304", "text": "public static function allowedDomains()\n {\n return [\n '*', // star allows all domains\n 'http://localhost:3000',\n ];\n }", "title": "" }, { "docid": "0e18ccf9736acaeec6382f50a2bc3254", "score": "0.5096403", "text": "public function isSSL()\n {\n return $this->_isSSL;\n }", "title": "" }, { "docid": "88e177f3effb44a1e2bb434e96d3061b", "score": "0.5089851", "text": "public function getAll()\n {\n\n $sql = \"SELECT * FROM $this->TABLE\";\n $result = $this->dbLink->query($sql);\n\n if ($result->num_rows > 0) {\n\n $arr = array();\n while ($row = $result->fetch_assoc()) {\n array_push($arr, new DomainWhitelist($row));\n }\n\n return $arr;\n\n }\n\n return array();\n }", "title": "" }, { "docid": "6af669639ad55c309c9d5d3dbdccd041", "score": "0.5083145", "text": "public function isSSL()\n {\n if (!isset($this->app->_SERVER['HTTPS'])) {\n return false;\n }\n\n //Apache\n if ($this->app->_SERVER['HTTPS'] == 1) {\n return true;\n } //IIS\n elseif ($this->app->_SERVER['HTTPS'] === 'on') {\n return true;\n } //other servers\n elseif ($this->app->_SERVER['SERVER_PORT'] == 443) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "9864968623044c5dd55a68ceb33a838a", "score": "0.508295", "text": "function runGetSSL($domain, $sans = NULL)\n{\n /* Configure getSSL main config */\n writeGetSSLMainConfig();\n\n if ($sans) {\n writeGetSSLConfig($domain, $sans);\n }\n\n /* Start getSSL */\n exec(GETSSL_BIN . (GETSSL_BIN_OPTIONS ? ' ' . GETSSL_BIN_OPTIONS : '') . ' -w ' . GETSSL_CONFIG_PATH . ' -d ' . $domain, $pOutput, $pExitCode);\n if (DEBUG) {\n logSyslog(LOG_DEBUG, \"runGetSSL for $domain exit code: $pExitCode\");\n }\n if (DEBUG_EXTENDED) {\n logSyslog(LOG_DEBUG, $pOutput);\n }\n\n return $pExitCode;\n}", "title": "" }, { "docid": "20a1d87a93aee17a5cf76970a79f14e0", "score": "0.5082883", "text": "public function isSslEnabled(){\n return $this->ssl_enabled;\n }", "title": "" }, { "docid": "40dd2d74b23ea4386b47e756c9cf18b8", "score": "0.50775903", "text": "public function listManagementCertificates()\n {\n $context = new HttpCallContext();\n $context->setMethod(Resources::HTTP_GET);\n $context->setPath($this->_getManagementCertificatesPath());\n $context->addStatusCode(Resources::STATUS_OK);\n\n $response = $this->sendContext($context);\n $serialized = $this->dataSerializer->unserialize($response->getBody());\n\n return Utilities::arrayToObject($serialized);\n }", "title": "" }, { "docid": "9a219793c9d45f5eb5caeacf8e4a9000", "score": "0.50734955", "text": "function culturefeed_search_get_domains() {\n\n $domains = drupal_static(__FUNCTION__, NULL);\n if ($domains !== NULL) {\n return $domains;\n }\n\n $result = db_query('SELECT did, label FROM {culturefeed_search_domains}');\n $domains = array();\n foreach ($result as $row) {\n $domains[$row->did] = $row->label;\n }\n\n return $domains;\n\n}", "title": "" }, { "docid": "5812ee2d2bc89d9ed17a70f4bead03d8", "score": "0.5071031", "text": "static function get_ssl_certificate(){\n\t\treturn get_option('gravity_form_crm_ssl_dir');\n\t}", "title": "" }, { "docid": "78ac1c0d663b56c60c9a2555bb6e9f70", "score": "0.5069465", "text": "private function isSSLConnection() {\n\t\tif($this->getUrl()->getPort() == 443 || $this->getUrl()->getScheme() == 'https') {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "5808a38d3b9955f32ce3841dee4c6060", "score": "0.5066539", "text": "function ds_https_verify()\r\n{\r\n\tadd_filter( 'https_ssl_verify', '__return_false' );\r\n}", "title": "" }, { "docid": "400b56a2a570f8c34274bcf5133e7656", "score": "0.5061901", "text": "protected function isValidSslCertificate()\n {\n $allowed = \\preg_split(\n '/\\s*,\\s*/',\n $this->Config()->get('ssl', 'allow_cn', ''),\n -1,\n PREG_SPLIT_NO_EMPTY\n );\n\n return \\in_array($this->getSslCn(), $allowed, true);\n }", "title": "" }, { "docid": "c251ff403155d1441fdacc1c2370c99e", "score": "0.5058995", "text": "function is_ssl() {\n return $_SERVER['HTTPS'] != '' and $_SERVER['HTTPS'] != 'off';\n }", "title": "" }, { "docid": "04a612e573fdb6ba3c63470f3ccc94da", "score": "0.5045337", "text": "function akismet_check_server_connectivity() {\n\tglobal $akismet_api_host, $akismet_api_port, $wpcom_api_key;\n\t\n\t$test_host = 'rest.akismet.com';\n\t\n\t// Some web hosts may disable one or both functions\n\tif ( !function_exists('fsockopen') || !function_exists('gethostbynamel') )\n\t\treturn array();\n\t\n\t$ips = gethostbynamel($test_host);\n\tif ( !$ips || !is_array($ips) || !count($ips) )\n\t\treturn array();\n\t\t\n\t$servers = array();\n\tforeach ( $ips as $ip ) {\n\t\t$response = akismet_verify_key( akismet_get_key(), $ip );\n\t\t// even if the key is invalid, at least we know we have connectivity\n\t\tif ( $response == 'valid' || $response == 'invalid' )\n\t\t\t$servers[$ip] = true;\n\t\telse\n\t\t\t$servers[$ip] = false;\n\t}\n\n\treturn $servers;\n}", "title": "" }, { "docid": "5472da0d72edc55c7a2b1c3fa6ee5621", "score": "0.50393397", "text": "public function loadCertificates(): void;", "title": "" }, { "docid": "b05992aee05b4e787b81cf85055f4786", "score": "0.5034962", "text": "protected function getInternalDomains(): array\n {\n $internalDomains = [];\n\n $router = $this->grabRouterService();\n $routes = $router->getRouteCollection();\n /* @var Route $route */\n foreach ($routes as $route) {\n if (!is_null($route->getHost())) {\n $compiled = $route->compile();\n if (!is_null($compiled->getHostRegex())) {\n $internalDomains[] = $compiled->getHostRegex();\n }\n }\n }\n\n return array_unique($internalDomains);\n }", "title": "" }, { "docid": "94a9d30374f67134e2457dff1646a9b5", "score": "0.50226414", "text": "protected function isSsl()\n {\n return 'https://' === \\substr($this->url, 0, 8);\n }", "title": "" }, { "docid": "86c3a307890ce2c8b0bf518dc153722f", "score": "0.5020609", "text": "function list_remote_servers() {\n global $CFG;\n\n $sql = \"\n SELECT DISTINCT \n h.id, \n h.name\n FROM \n {$CFG->prefix}mnet_host h,\n {$CFG->prefix}mnet_host2service h2s,\n {$CFG->prefix}mnet_service s\n WHERE\n h.id = h2s.hostid AND\n h2s.serviceid = s.id AND\n s.name = 'mnet_enrol' AND\n h2s.subscribe = 1\";\n\n $res = get_records_sql($sql);\n if (is_array($res)) {\n return $res;\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "6336d396a6e7df13e9b6638a0854a4f6", "score": "0.5015784", "text": "public function getCertifications ()\n {\n return $this->certifications;\n }", "title": "" }, { "docid": "592f6466c6d980a372a65f383067b93f", "score": "0.50092155", "text": "public function getAllowedHostnames()\r\n {\r\n $suffixes = $this->_hostnameValidator->getSuffixes();\n return $this->toHostnames($suffixes);\r\n }", "title": "" }, { "docid": "85538533caf868ac5a881fd7d57d659e", "score": "0.50084895", "text": "public function exposeSSL() : void\n {\n if (self::isSSL()) {\n $_SERVER['HTTPS'] = 'on';\n }\n }", "title": "" }, { "docid": "62c2eef2898fa25c861441da7733ccb4", "score": "0.5005127", "text": "public function getCdnList()\n {\n if (array_key_exists(\"cdnList\", $this->_propDict)) {\n return $this->_propDict[\"cdnList\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "5989cac7e961040eedda92ede55b5ecb", "score": "0.5002525", "text": "function getSites(){\r\n\t\t$dao = SOY2DAOFactory::create(\"SOYShop_SiteDAO\");\r\n\t\ttry{\r\n\t\t\t$sites = $dao->get();\r\n\t\t}catch(Exception $e){\r\n\t\t\t$sites = array();\r\n\t\t}\r\n\t\treturn $sites;\r\n\t}", "title": "" }, { "docid": "6935181b3561b5fd9a7014abe0aa2096", "score": "0.5001899", "text": "public function cert_list ($ca_id, $what)\n\t\t{\n\t\t\treturn $this->do_request ('/cert/list', array ('ca_id' => intval ($ca_id), 'token' => $this->token, 'what' => $what));\n\t\t}", "title": "" }, { "docid": "2ecef4a96088568cef9810e7518d766a", "score": "0.49972573", "text": "function is_ssl() {\n if ( isset( $_SERVER['HTTPS'] ) ) {\n if ( 'on' === strtolower( $_SERVER['HTTPS'] ) ) {\n return true;\n }\n \n if ( '1' == $_SERVER['HTTPS'] ) {\n return true;\n }\n } elseif ( isset( $_SERVER['SERVER_PORT'] ) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "50f1e26ae3ee40bcbc0e04778715ba01", "score": "0.49947095", "text": "public function forceSsl();", "title": "" }, { "docid": "f5ec658faf41930acc81ddbec2c7c735", "score": "0.49944004", "text": "public function getUserCerts($uId)\n {\n $query = 'SELECT * FROM ' . $this->getTableName()\n . ' WHERE uId = ' . (int)$uId\n . ' ORDER BY sslSerial DESC';\n if (!($dbresult = $this->db->sql_query($query))) {\n message_die(\n GENERAL_ERROR, 'Could not load SSL client certificates',\n '', __LINE__, __FILE__, $query, $this->db\n );\n return array();\n }\n\n $certs = array();\n while ($row = $this->db->sql_fetchrow($dbresult)) {\n $certs[] = SemanticScuttle_Model_User_SslClientCert::fromDb($row);\n }\n $this->db->sql_freeresult($dbresult);\n return $certs;\n }", "title": "" } ]
68076a9095d7cb145b6865e7c68065f8
Fields to be shown on filter forms
[ { "docid": "cad4c946f108a7541e107c546bb22aa2", "score": "0.0", "text": "protected function configureDatagridFilters(DatagridMapper $datagridMapper)\n {\n if($this->isGranted('FIELD_NAAM'))\n $datagridMapper->add('naam');\n if($this->isGranted('FIELD_BTW'))\n $datagridMapper->add('btw') ;\n if($this->isGranted('FIELD_IS_INC_BTW'))\n $datagridMapper->add('isIncBtw') ;\n if($this->isGranted('FIELD_VOORRAAD_KAN_NEGATIEF'))\n $datagridMapper->add('voorraadKanNegatief') ;\n }", "title": "" } ]
[ { "docid": "fd2d7631993241026f89677701061732", "score": "0.6750907", "text": "public function searchableFields()\n {\n $questionnaireType = singleton(Questionnaire::class)->dbObject('Type')->enumValues();\n\n return [\n 'Questionnaire.Name' => [\n 'filter' => 'PartialMatchFilter',\n 'title' => 'Questionnaire Name',\n ],\n 'Questionnaire.Type' => [\n 'filter' => 'ExactMatchFilter',\n 'title' => 'Questionnaire Type',\n 'field' => DropdownField::create('QuestionnaireType')\n ->setSource($questionnaireType)\n ->setEmptyString('(Any)')\n ],\n 'ProductName' => [\n 'filter' => 'PartialMatchFilter',\n 'title' => 'Product Name',\n ],\n 'SubmitterName' => [\n 'filter' => 'PartialMatchFilter',\n 'title' => 'Submitter Name'\n ],\n 'SubmitterEmail' => [\n 'filter' => 'PartialMatchFilter',\n 'title' => 'Submitter Email'\n ],\n 'QuestionnaireStatus' => [\n 'filter' => 'ExactMatchFilter',\n 'title' => 'Questionnaire Status'\n ],\n 'CisoApprovalStatus' => [\n 'filter' => 'ExactMatchFilter',\n 'title' => 'Ciso Approval Status'\n ],\n 'BusinessOwnerApprovalStatus' => [\n 'filter' => 'ExactMatchFilter',\n 'title' => 'Business Owner Approval Status'\n ],\n 'SecurityArchitectApprovalStatus' => [\n 'filter' => 'ExactMatchFilter',\n 'title' => 'Security Architect Approval Status'\n ],\n 'UUID' => [\n 'filter' => 'PartialMatchFilter',\n 'title' => 'UUID'\n ],\n 'Created' => [\n 'filter' => 'PartialMatchFilter',\n 'title' => 'Created Date',\n 'field' => DateField::create('Created')\n ],\n 'SubmittedDate' => [\n 'filter' => 'PartialMatchFilter',\n 'title' => 'Submitted Date',\n 'field' => DateField::create('SubmittedDate')\n ],\n 'SubmittedForApprovalDate' => [\n 'filter' => 'PartialMatchFilter',\n 'title' => 'Submitted For Approval Date',\n 'field' => DateField::create('SubmittedForApprovalDate')\n ],\n 'SecurityArchitectStatusUpdateDate' => [\n 'filter' => 'PartialMatchFilter',\n 'title' => 'Date approved/denied by Security Architect',\n 'field' => DateField::create('SecurityArchitectStatusUpdateDate')\n ],\n 'BusinessOwnerStatusUpdateDate' => [\n 'filter' => 'PartialMatchFilter',\n 'title' => 'Date approved/denied by Business Owner',\n 'field' => DateField::create('BusinessOwnerStatusUpdateDate')\n ],\n 'CisoApprovalStatusUpdateDate' => [\n 'filter' => 'PartialMatchFilter',\n 'title' => 'Date approved/denied by Chief Information Security Officer',\n 'field' => DateField::create('CisoApprovalStatusUpdateDate')\n ]\n ];\n }", "title": "" }, { "docid": "84de281edd768c3820a2ac2a64f4f020", "score": "0.6671584", "text": "static public function getFilterFieldList()\n\t{ return static::getDefinedFields(); }", "title": "" }, { "docid": "5d0cd1b3ccf358ae37984ff58319b98f", "score": "0.6653442", "text": "public function filters() {\n parent::filters();\n\n $this->lvIsMobile = Helper::isMobile();\n }", "title": "" }, { "docid": "b44c9bc8189c08e3314c71caa3d0bc4c", "score": "0.6626816", "text": "protected function getFilters()\n { \n $filters = parent::getFilters(); \n $filters['internado_id'] = sfContext::getInstance()->getRequest()->getParameter('internado_id');\n return $filters;\n }", "title": "" }, { "docid": "8101763d85a5d0a8b99b8478334cb08f", "score": "0.66237545", "text": "public function getFilterFields() {\n\t\treturn new FieldList();\n\t}", "title": "" }, { "docid": "8acdc63f629773c93bbd8001a752086b", "score": "0.662126", "text": "public function getFrontendFields();", "title": "" }, { "docid": "b2b3cdc2b6e089150d3f352bd39569f3", "score": "0.65985644", "text": "function renderSearchFields()\n\t{\n\t\t$obj =& $this->data;\n\t\t$filter = $obj->getFilter();\n\t\t\n\t\tif (count($this->groups) > 0)\n\t\t{\n\t\t\t$this->layout->endUngrouped();\n\t\t\t\n\t\t\tforeach($this->groups as $legend => $fields)\n\t\t\t{\n\t\t\t\t$collapsible = array_key_exists($legend, $this->collapsibleGroups);\n\t\t\t\tif ($collapsible)\n\t\t\t\t{\n\t\t\t\t\t$cf = $this->collapsibleGroups[$legend];\n\t\t\t\t\t$collapsed = !$this->data->$cf;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->layout->startGroup($legend, $collapsible, $collapsed);\n\t\t\t\t\n\t\t\t\tforeach($fields as $field)\n\t\t\t\t{\n\t\t\t\t\tif ($field != $pk && !array_key_exists($field, $this->hidden) && !array_key_exists($field, $this->renderedFields) && !($filter && $filter->isExcluded($field)))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->renderOneSearchField($field);\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->layout->endGroup();\n\t\t\t}\n\t\t\t\n\t\t\t$this->layout->startUngrouped();\n\t\t\t\n\t\t}\n\t\t\n\t\tforeach(array_keys($this->fields) as $field)\n\t\t{\n\t\t\tif ($field != $pk && !array_key_exists($field, $this->hidden) && !array_key_exists($field, $this->renderedFields) && !($filter && $filter->isExcluded($field)))\n\t\t\t{\n\t\t\t\t$renderer = $this->getRenderer($field);\n\t\t\t\tif(get_class($renderer) == DateRangeFilterRenderer)\n\t\t\t\t{\n\t\t\t\t\t$dateRangeField = $field;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\t\n\t\t\t\t$this->renderOneSearchField($field);\n\t\t\t}\n\t\t}\n\t\t\n\t\tforeach($this->additional as $r)\n\t\t{\n\t\t\t$renderer = $r['renderer'];\n\t\t\t$field = $r['field'];\n\t\t\tif(!$field)\n\t\t\t\t$field = $renderer->field;\n\t\t\tif (!array_key_exists($field, $this->renderedFields) && !($filter && $filter->isExcluded($field)))\n\t\t\t{\n\t\t\t\tif(get_class($renderer) == DateRangeFilterRenderer)\n\t\t\t\t{\n\t\t\t\t\t$dateRangeField = $field;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\t\n\t\t\t\t$this->renderOneSearchField($field);\n\t\t\t}\t\n\t\t}\n\t\t\t\t\n\t\tif($dateRangeField)\n\t\t{\n\t\t\t$this->renderOneSearchField($dateRangeField);\n\t\t}\n\t}", "title": "" }, { "docid": "a13ab1b53a2bc50d479c7f38d2fac199", "score": "0.65674543", "text": "protected function filters()\n {\n if ($this->getRequest()->isPost()== true or 1==1) {\n \tSession::getInstance()->set($this->namepageactual,1);\n $parramsfilter = array();\n\t\t\t\t\t$parramsfilter['log_usuario'] = $this->_getSanitizedParam(\"log_usuario\");\n\t\t\t\t\t$parramsfilter['log_tipo'] = $this->_getSanitizedParam(\"log_tipo\");\n\t\t\t\t\t$parramsfilter['log_fecha'] = $this->_getSanitizedParam(\"log_fecha\");\n\t\t\t\t\t$parramsfilter['log_log'] = $this->_getSanitizedParam(\"log_log\");Session::getInstance()->set($this->namefilter, $parramsfilter);\n }\n if ($this->_getSanitizedParam(\"cleanfilter\") == 1) {\n Session::getInstance()->set($this->namefilter, '');\n Session::getInstance()->set($this->namepageactual,1);\n }\n }", "title": "" }, { "docid": "0af95ddedac78d7a702bdaf983236ba8", "score": "0.6563462", "text": "public function getSearchableFields();", "title": "" }, { "docid": "4f432c03f64a407284f52d0810fcaede", "score": "0.6541205", "text": "protected function getAllowedFilterFields()\n {\n return $this->model->getItemNames();\n }", "title": "" }, { "docid": "19475faedc7cae647c04325aadc678f8", "score": "0.65379006", "text": "public function formFilter()\n\t{\n\t\treturn '';\n\t}", "title": "" }, { "docid": "ad5f5a0926a211a11a73149f9dfe5834", "score": "0.65373176", "text": "public function fields_from_edit();", "title": "" }, { "docid": "f4736cd297c58b635a7df84ad7e65362", "score": "0.6497169", "text": "function node_filter_form() {\n $session = &$_SESSION['node_overview_filter'];\n $session = is_array($session) ? $session : array();\n $filters = node_filters();\n\n $i = 0;\n $form['filters'] = array('#type' => 'fieldset',\n '#title' => t('Show only items where'),\n '#theme' => 'node_filters',\n );\n foreach ($session as $filter) {\n list($type, $value) = $filter;\n if ($type == 'category') {\n // Load term name from DB rather than search and parse options array.\n $value = module_invoke('taxonomy', 'get_term', $value);\n $value = $value->name;\n }\n else {\n $value = $filters[$type]['options'][$value];\n }\n $string = ($i++ ? '<em>and</em> where <strong>%a</strong> is <strong>%b</strong>' : '<strong>%a</strong> is <strong>%b</strong>');\n $form['filters']['current'][] = array('#value' => t($string, array('%a' => $filters[$type]['title'] , '%b' => $value)));\n }\n\n foreach ($filters as $key => $filter) {\n $names[$key] = $filter['title'];\n $form['filters']['status'][$key] = array('#type' => 'select', '#options' => $filter['options']);\n }\n\n $form['filters']['filter'] = array('#type' => 'radios', '#options' => $names, '#default_value' => 'status');\n $form['filters']['buttons']['submit'] = array('#type' => 'submit', '#value' => (count($session) ? t('Refine') : t('Filter')));\n if (count($session)) {\n $form['filters']['buttons']['undo'] = array('#type' => 'submit', '#value' => t('Undo'));\n $form['filters']['buttons']['reset'] = array('#type' => 'submit', '#value' => t('Reset'));\n }\n\n return drupal_get_form('node_filter_form', $form);\n}", "title": "" }, { "docid": "8271615ad2bbb39db7f8e0a5a5122341", "score": "0.64910626", "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": "8c1fc6618c755f4641396751cb1ff0e0", "score": "0.6468772", "text": "public function fields()\n {\n return [\n 'langs' => 'name:my lang select|belongsTo:model_localizations,name|canAdd',\n 'score_input' => 'name:my score select|type:select|options:1,2,3,4,5,6,7,8,9,10|default:8',\n 'select_filter_by' => 'name:my filter by select|belongsTo:articles,:name :score|filterBy:score_input,score',\n 'comments' => 'name:my filter by auto-table|belongsTo:articles_comments,:name :article_id|filterBy:select_filter_by',\n ];\n }", "title": "" }, { "docid": "1b5adcb86591c0d468fdf786544cca1e", "score": "0.64583296", "text": "public function getFilterFields()\n\t{\n\t\t$this->loadLanguageFile('tl_gallery');\n\t\t$this->loadDataContainer('tl_gallery');\n\n\t\t$arrReturn = array();\n\t\tforeach ($GLOBALS['TL_DCA']['tl_gallery']['fields'] as $k=>$v)\n\t\t{\n\t\t\tif ($v['eval']['feFilter'])\n\t\t\t{\n\t\t\t\t$arrReturn[$k] = $v['label'][0] ? $v['label'][0] : $k;\n\t\t\t}\n\t\t}\n\n\t\treturn $arrReturn;\n\t}", "title": "" }, { "docid": "9b141494823558d7396d9dc83cb83b5c", "score": "0.64496964", "text": "protected function getPreparedFilterFields()\n {\n $fields = FieldList::create();\n $fields->add(CheckboxField::create(\n self::DELETE_ALL,\n _t(\n self::class . '.DELETE_ALL',\n 'Delete all {pluralName}',\n ['pluralName' => $this->getDummyObject()->plural_name()]\n )\n ));\n foreach ($this->getFilterFields() as $field) {\n $fields->add($this->getFieldAsComposite($field));\n }\n return $fields;\n }", "title": "" }, { "docid": "fe0267dd7e2af47b7d052c286425d2a9", "score": "0.64320993", "text": "protected function _Do_Hook_Filter() {\r\n\t\t$form_instance = $this->form_instance;\r\n\t\t// Retrieve the form's fields\r\n $form_fields = $form_instance->fields;\r\n\t\t// If there are no form fields\r\n\t\tif (!$form_fields || !is_array($form_fields)) { return; }\r\n\t\t// Loop through each containers\r\n\t\tforeach ($form_fields as $_name => $field) {\r\n\t\t\t// If this field has a condition result and the field is hidden\r\n\t\t\tif ($field->Is_Hidden()) { continue; } \r\n\t\t\t// Retrieve the filter result\r\n do_action('vcff_do_field_filter', $field );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9f1a104e7e39c4bb7d6b157e5ff42b77", "score": "0.6409635", "text": "public function filters()\n {\n return array(\n 'rights',\n );\n }", "title": "" }, { "docid": "bff6402d0d1c67872660000bac3561eb", "score": "0.6405891", "text": "function theme_node_filter_form(&$form) {\n $output .= '<div id=\"node-admin-filter\">';\n $output .= form_render($form['filters']);\n $output .= '</div>';\n $output .= form_render($form);\n return $output;\n}", "title": "" }, { "docid": "55330b33b1bf561e03501cff9cc3aa7b", "score": "0.64000994", "text": "protected function filters()\n {\n if ($this->getRequest()->isPost()== true) {\n \tSession::getInstance()->set($this->namepageactual,1);\n $parramsfilter = array();Session::getInstance()->set($this->namefilter, $parramsfilter);\n }\n if ($this->_getSanitizedParam(\"cleanfilter\") == 1) {\n Session::getInstance()->set($this->namefilter, '');\n Session::getInstance()->set($this->namepageactual,1);\n }\n }", "title": "" }, { "docid": "9c2a051542c4f8eb1263469cad94223f", "score": "0.63986474", "text": "public function buildFilterForm()\n {\n // only for list mode\n if ($this->defaultAccess == 'w')\n {\n return;\n }\n \n $this->filterForm = new $this->filterFormClass;\n \n // legacy check \n if (!method_exists($this->tableConfig, 'getFilterColumns'))\n {\n return;\n }\n \n $filterColumns = $this->tableConfig->getFilterColumns();\n \n foreach ($filterColumns as $filterColumn => $defaultValue)\n {\n $columnConfig = clone $this->columnsConfig[$filterColumn];\n \n $columnConfig->setAccess('s');\n \n $ullMetaWidgetClassName = $columnConfig->getMetaWidgetClassName();\n $ullMetaWidget = new $ullMetaWidgetClassName($columnConfig, $this->filterForm);\n $ullMetaWidget->addToFormAs($filterColumn);\n \n $this->filterForm->getWidgetSchema()->setLabel($filterColumn, $columnConfig->getLabel());\n \n $this->filterForm->setDefault($filterColumn, $defaultValue);\n \n $widget = $this->filterForm->getWidgetSchema()->offsetGet($filterColumn);\n \n // auto submit select boxes\n if ($widget instanceof sfWidgetFormSelect || \n $widget instanceof sfWidgetFormChoice)\n {\n $widget->setAttribute('onchange', 'submit();');\n }\n }\n \n// $this->filterForm->debug();\n }", "title": "" }, { "docid": "c5d0e70849be8d6270cf0906312a5ab3", "score": "0.639155", "text": "public function getFormFields()\n {\n\n $modelInstance = $this->getModel();\n // $rules = collect($modelInstance->rules());\n // if ($modelInstance->id) {\n // $this->modify('slug', 'text', [\n // 'attr' => ['readonly' => true]\n // ]);\n // }\n\n if (in_array('is_enabled', $modelInstance->getFillable())) {\n $this->addCheckBox('is_enabled');\n }\n if (in_array('title', $modelInstance->getFillable())) {\n $this->add('title', 'text');\n }\n\n if (in_array('slug', $modelInstance->getFillable())) {\n $this->add('slug', 'text', [\n 'attr' => ['readonly' => 'readonly'],\n ]);\n }\n if (in_array('notes', $modelInstance->getFillable())) {\n $this->add('notes', 'textarea');\n }\n }", "title": "" }, { "docid": "d258c9266b5ee76d74b7ae49025fde74", "score": "0.6381393", "text": "protected function listFields() {\n return ['title','astatus','aff_id','program_id'];\n }", "title": "" }, { "docid": "182359b94212e0313f94cf7be5df36fa", "score": "0.6376649", "text": "public function getFilterForm()\n {\n return $this->filterForm;\n }", "title": "" }, { "docid": "12d1c89e0d6815cbf7028c667c3dbcb7", "score": "0.63632697", "text": "private function filter()\n {\n // Filter the HTML form data first\n foreach ($this->fields as $key => $field) {\n if (in_array($key, $this->meta)) {\n $this->{$key} = $field;\n unset($this->fields[$key]);\n }\n }\n\n // And override those with special meta fields set\n // on the tag itself as parameters\n if (array_get($this->fields, '_meta')) {\n $meta = Crypt::decrypt($this->fields['_meta']);\n\n foreach ($meta as $key => $field) {\n if (in_array($key, $this->meta)) {\n $this->{$key} = $field;\n }\n }\n unset($this->fields['_meta']);\n }\n }", "title": "" }, { "docid": "f0de4fb784c28e2fc65181d73ab0e2e9", "score": "0.63486046", "text": "public function showFields($request){\n $attributes = $this->attributes;\n $show = [];\n if($request->has(\"fields.$this->model\") AND !empty($request->input(\"fields.$this->model\"))){\n $req = $request->fields;\n $selects = explode(',', $req[$this->model]);\n if(count($selects)>0){//jika select kolom tidak kosong\n foreach($selects as $select){\n if (in_array($select, $attributes)) {\n $show[$select] = $this->{$select};\n }\n }\n }else{//jika select kolom kosong, dianggap select *\n foreach($attributes as $select){\n $show[$select] = $this->{$select};\n }\n }\n \n }else{\n foreach($attributes as $select){\n $show[$select] = $this->{$select};\n }\n }\n\n return $this->merge($show);\n }", "title": "" }, { "docid": "41e5c5331ba10b085f7a7fe6bb46103c", "score": "0.63465315", "text": "protected function getFilterField(){\n return\n array(\n 'name' => 'category',\n 'type' => 'select',\n 'flt_default' => '',\n 'flt_condition' => '=',\n 'flt_column' => 'id_cat',\n 'data' => array(),\n 'not_selected' => $this->getNotSelectedRow(),\n 'session_field' => TRUE,\n 'act_as_int' => TRUE\n );\n }", "title": "" }, { "docid": "05693bb3d4d2724e79a79ff37131ce9a", "score": "0.6345558", "text": "public static function searchableFields();", "title": "" }, { "docid": "1ffeabce194980df82bc09adcd8085cd", "score": "0.632854", "text": "public function getFiltersForm()\n {\n global $labelsAdmin, $base;\n \n $haveFilters = false;\n \n $form = new Form(\"filterContents\");\n $form->class = \"form-horizontal\";\n $form->legend = $labelsAdmin->get(\"contents_filters\");\n\n\n $field = new FormFieldSelect(\"idusertype\");\n $field->label = $labelsAdmin->get(\"users_userType\");\n $field->importTable = \"cm_usersTypes\";\n $field->importTableValue = \"id\" ;\n $field->importTableDisplay = \"name_\" . $base->language;\n $field->value = $_REQUEST[\"idusertype\"];\n $form->addField($field);\n \n $button = new FormButton();\n $button->name = \"submit\";\n $button->label = $labelsAdmin->get(\"global_filter\");\n $button->type = \"submit\";\n $button->icon = \"tick\";\n $button->class = \"btn btn-primary\";\n $form->addButton($button);\n \n return $form;\n }", "title": "" }, { "docid": "940bdb622b00c0a9b8b6dea2b94a2fd0", "score": "0.63204837", "text": "public function posts_filter_dropdown()\n {\n }", "title": "" }, { "docid": "b37435c5c83628aca4945b0ab65e2f2d", "score": "0.63060784", "text": "private function filters() {\n\n\t}", "title": "" }, { "docid": "4380ec7ef8b26fa982037d331223ac50", "score": "0.6303167", "text": "function getFilters();", "title": "" }, { "docid": "02c0550ee7c53e2bd76f338dc55d5dd9", "score": "0.6299099", "text": "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'accessControl',\n\t\t\t'checkLan + create',\n\t\t\t'checkEditPermissions + update, delete',\n\t\t);\n\t}", "title": "" }, { "docid": "5869e54e652586908a558c619b138ec0", "score": "0.6296674", "text": "function ShowFilterList() {\n\n\t// Initialize\n\t$sFilterList = \"\";\n\n\t// Field farmcode\n\t$sExtWrk = \"\";\n\t$sWrk = \"\";\n\tif (is_array($GLOBALS[\"sel_farmcode\"]))\n\t\t$sWrk = ewrpt_JoinArray($GLOBALS[\"sel_farmcode\"], \", \", EW_REPORT_DATATYPE_STRING);\n\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t$sFilterList .= \"Farmcode<br />\";\n\tif ($sExtWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sExtWrk<br />\";\n\tif ($sWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sWrk<br />\";\n\n\t// Field shedcode\n\t$sExtWrk = \"\";\n\t$sWrk = \"\";\n\tif (is_array($GLOBALS[\"sel_shedcode\"]))\n\t\t$sWrk = ewrpt_JoinArray($GLOBALS[\"sel_shedcode\"], \", \", EW_REPORT_DATATYPE_STRING);\n\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t$sFilterList .= \"Shedcode<br />\";\n\tif ($sExtWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sExtWrk<br />\";\n\tif ($sWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sWrk<br />\";\n\n\t// Field flock\n\t$sExtWrk = \"\";\n\t$sWrk = \"\";\n\tif (is_array($GLOBALS[\"sel_flock\"]))\n\t\t$sWrk = ewrpt_JoinArray($GLOBALS[\"sel_flock\"], \", \", EW_REPORT_DATATYPE_STRING);\n\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t$sFilterList .= \"Flock<br />\";\n\tif ($sExtWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sExtWrk<br />\";\n\tif ($sWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sWrk<br />\";\n\n\t// Field date2\n\t$sExtWrk = \"\";\n\t$sWrk = \"\";\n\tif (is_array($GLOBALS[\"sel_date2\"]))\n\t\t$sWrk = ewrpt_JoinArray($GLOBALS[\"sel_date2\"], \", \", EW_REPORT_DATATYPE_DATE);\n\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t$sFilterList .= \"Date 2<br />\";\n\tif ($sExtWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sExtWrk<br />\";\n\tif ($sWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sWrk<br />\";\n\n\t// Field age\n\t$sExtWrk = \"\";\n\t$sWrk = \"\";\n\tif (is_array($GLOBALS[\"sel_age\"]))\n\t\t$sWrk = ewrpt_JoinArray($GLOBALS[\"sel_age\"], \", \", EW_REPORT_DATATYPE_NUMBER);\n\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t$sFilterList .= \"Age<br />\";\n\tif ($sExtWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sExtWrk<br />\";\n\tif ($sWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sWrk<br />\";\n\n\t// Show Filters\n\tif ($sFilterList <> \"\")\n\t\techo \"CURRENT FILTERS:<br />$sFilterList\";\n}", "title": "" }, { "docid": "b2ac3865ee24f63928476a9cfd7c5346", "score": "0.6294139", "text": "function event_filters() {\n\t$facets = get_sub_field('event_filters');\n\n\tif(count($facets) > 0) {\n\t\techo '<div class=\"row\">\n\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t<div class=\"fieldset filters\">\n\t\t\t\t\t\t\t<h1 class=\"title h4\">Filters</h1>';\n\t\t\t\t\t\t\tforeach($facets as $facet) {\n\t\t\t\t\t\t\t\techo facetwp_display( 'facet', $facet );\n\t\t\t\t\t\t\t}\n\t\t\t\t echo '</div>\n\t\t\t\t\t</div>\n\t\t\t </div>';\n\t}\n}", "title": "" }, { "docid": "2ba3240dc61091c4b046d3f3ba6c8055", "score": "0.62832355", "text": "private function getFilters()\n {\n $html = null;\n $filters = $this->getFiltersForm();\n if ($filters) {\n \n $html = $filters->getAllForm();\n }\n \n return $html;\n }", "title": "" }, { "docid": "62bf60936bcaaad259ecd3fa1729dc16", "score": "0.6271578", "text": "public function getFilterFields()\n {\n $arrAttributes = array();\n\n foreach ($GLOBALS['TL_DCA']['tl_iso_product']['fields'] as $field => $arrData) {\n if ($arrData['attributes']['fe_filter'] ?? false) {\n $arrAttributes[$field] = \\strlen($arrData['label'][0]) ? $arrData['label'][0] : $field;\n }\n }\n\n return $arrAttributes;\n }", "title": "" }, { "docid": "5007f36e3ad66419384d2ed52840c4df", "score": "0.6268347", "text": "public function renderFilters()\n {\n if (isset($_GET['filter'])) {\n if (isset($_GET['q'])) {\n $this->model->addCondition($_GET['filter'], 'like', '%' . $_GET['q'] . '%');\n }\n // Apply filtering to filter.\n $this->applyFilters();\n $action = $this->model->action('field', [$_GET['filter']]);\n $action->group($_GET['filter']);\n $rows = $action->get();\n $data = [];\n foreach ($rows as $k => $v) {\n $data[] = ['id' => $k, 'name' => $v[$_GET['filter']]];\n }\n array_unshift($data, ['id' => -1, 'name' => $this->filterEmpty]);\n\n $this->app->terminate(json_encode([\n 'success' => true,\n 'results' => $data,\n ]));\n }\n }", "title": "" }, { "docid": "6181451f5db3bde2ddad3409d49f9b55", "score": "0.62661487", "text": "protected function _Pre_Filter() {\r\n\t\t$form_instance = $this->form_instance;\r\n\t\t// Retrieve the form's fields\r\n $form_fields = $form_instance->fields;\r\n\t\t// If there are no form fields\r\n\t\tif (!$form_fields || !is_array($form_fields)) { return; }\r\n\t\t// Loop through each containers\r\n\t\tforeach ($form_fields as $_name => $field) {\r\n\t\t\t// If this field has a condition result and the field is hidden\r\n\t\t\tif ($field->Is_Hidden()) { continue; }\r\n\t\t\t// If this field has a custom filter method\r\n\t\t\tif (method_exists($field,'Pre_Filter')) { $field->Pre_Filter(); }\r\n // Retrieve the filter result\r\n do_action('vcff_pre_field_filter', $field);\r\n }\r\n }", "title": "" }, { "docid": "eda8995a3b95342f5d38731ae775cc95", "score": "0.624183", "text": "public function event_filter() {\n\t\t?>\n\n\t\t<form id=\"events-filter\" method=\"get\">\n\t\t\t<div class=\"wp-filter\">\n\t\t\t\t<div class=\"filter-items\">\n\t\t\t\t\t<?php echo $this->mode_picker(); ?>\n\n\t\t\t\t\t<?php echo $this->extra_tablenav( 'bar' ); ?>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"search-form\">\n\t\t\t\t\t<label for=\"event-search-input\" class=\"screen-reader-text\"><?php esc_html_e( 'Search Events', 'sugar-calendar' ); ?></label>\n\t\t\t\t\t<input type=\"search\" placeholder=\"<?php esc_attr_e( 'Search events...', 'sugar-calendar' ) ?>\" id=\"event-search-input\" class=\"search\" name=\"s\" value=\"<?php _admin_search_query(); ?>\">\n\t\t\t\t</div>\n\n\t\t\t\t<input type=\"hidden\" name=\"object_type\" value=\"<?php echo esc_attr( $this->get_object_type() ); ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"status\" value=\"<?php echo esc_attr( $this->get_status() ); ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"mode\" value=\"<?php echo esc_attr( $this->get_mode() ); ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"page\" value=\"<?php echo esc_attr( $this->get_page() ); ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"cd\" value=\"<?php echo esc_attr( $this->get_day() ); ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"cm\" value=\"<?php echo esc_attr( $this->get_month() ); ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"cy\" value=\"<?php echo esc_attr( $this->get_year() ); ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"order\" value=\"<?php echo esc_attr( $this->get_order() ); ?>\" />\n\t\t\t\t<input type=\"hidden\" name=\"orderby\" value=\"<?php echo esc_attr( $this->get_orderby() ); ?>\" />\n\t\t\t</div>\n\t\t</form>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "07382ee09ed7c812f9c22345ce7e067e", "score": "0.62400806", "text": "public function availableFilters();", "title": "" }, { "docid": "04b2bedd456bbc09d9b725eca6d20d8c", "score": "0.6239659", "text": "public function filters()\n {\n return CMap::mergeArray(array(\n 'postOnly + delete',\n ), parent::filters());\n }", "title": "" }, { "docid": "1de3b16d1d747f4f9e3be290f09b552a", "score": "0.62383664", "text": "public function pageFilterValidated()\n {\n // Example:\n //$this->MyField1->AdvancedSearch->SearchValue = \"your search criteria\"; // Search value\n }", "title": "" }, { "docid": "05bba5d559d909f000ac1b9b27beaf3b", "score": "0.6235978", "text": "public function can_display_filter()\n {\n }", "title": "" }, { "docid": "c71c0a3f1f585cf9f0f90e2064f647bb", "score": "0.6222566", "text": "public function filters()\n\t{\n\t\t return array( \n 'rights', \n array('ext.activityLog.QLogFilter','logCategory'=>'Backend','logLevel'=>'action'),\n ); \n\t}", "title": "" }, { "docid": "92f1e57d989dbb34a11821b017e83e0e", "score": "0.6219154", "text": "function Page_FilterValidated() {\r\n\r\n\t\t// Example:\r\n\t\t//$this->MyField1->SearchValue = \"your search criteria\"; // Search value\r\n\r\n\t}", "title": "" }, { "docid": "49756a27dab6415e5b7597cb62f99b27", "score": "0.6209218", "text": "function rubik_preprocess_form_filter(&$vars) {\n _rubik_filter_form_alter($vars['form']);\n}", "title": "" }, { "docid": "27b901d8880eeb2ce88d7a8fafe9f98f", "score": "0.62038046", "text": "public function filters()\n\t{\n\t\t return array( \n 'rights',\n array('ext.activityLog.QLogFilter','logCategory'=>'Backend','logLevel'=>'action'), \n ); \n\t}", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.6196041", "text": "public function fields();", "title": "" }, { "docid": "d20795a71a092780c4a28a958223b5df", "score": "0.6195631", "text": "public function buildShowFields()\n {\n $this->addField(\n SharpShowTextField::make('id')\n ->setLabel('Id:')\n )->addField(\n SharpShowTextField::make('title')\n ->setLabel('Title:')\n )->addField(\n SharpShowTextField::make('widget')\n ->setLabel('Widget:')\n )->addField(\n SharpShowTextField::make('cover')\n )->addField(\n SharpShowTextField::make('created_at')\n ->setLabel('Created At:')\n )->addField(\n SharpShowTextField::make('updated_at')\n ->setLabel('Updated At:')\n )->addField(\n SharpShowEntityListField::make('tags', 'tag')\n ->hideFilterWithValue('photo', function($instanceId) {\n return $instanceId;\n })\n ->showEntityState(false)\n ->showReorderButton(true)\n ->showCreateButton()\n );\n }", "title": "" }, { "docid": "6a6baa9f812d8ce212e1e4909772800e", "score": "0.61910695", "text": "private function addInputFilter() {\n \n // Create main input filter\n $inputFilter = new InputFilter(); \n $this->setInputFilter($inputFilter);\n \n // Create nested input filter for \"Personal Info\" fieldset\n $fieldsetInputFilter = new InputFilter();\n $inputFilter->add($fieldsetInputFilter, 'personal_info');\n \n // Add input for \"email\" field\n $fieldsetInputFilter->add(array(\n 'name' => 'email',\n 'required' => true,\n 'filters' => array(\n array('name' => 'StringTrim'), \n ), \n 'validators' => array(\n array(\n 'name' => 'EmailAddress',\n 'options' => array(\n 'allow' => \\Zend\\Validator\\Hostname::ALLOW_DNS,\n 'useMxCheck' => false, \n ),\n ),\n ),\n )\n ); \n \n // Add input for \"title\" field\n $fieldsetInputFilter->add(array(\n 'name' => 'title',\n 'required' => true,\n 'filters' => array( \n array('name' => 'Int'), \n ), \n 'validators' => array(\n array(\n 'name' => 'InArray',\n 'options' => array(\n 'haystack' => array(1, 2),\n 'strict' => false\n ),\n ),\n ),\n )\n );\n \n // Add input for \"first_name\" field\n $fieldsetInputFilter->add(array(\n 'name' => 'first_name',\n 'required' => true,\n 'filters' => array(\n array('name' => 'StringTrim'),\n array('name' => 'StripTags'),\n array('name' => 'StripNewLines'),\n ), \n 'validators' => array(\n array(\n 'name' => 'StringLength',\n 'options' => array(\n 'min' => 1,\n 'max' => 128\n ),\n ),\n ),\n )\n );\n \n // Add input for \"last_name\" field\n $fieldsetInputFilter->add(array(\n 'name' => 'last_name',\n 'required' => true,\n 'filters' => array(\n array('name' => 'StringTrim'),\n array('name' => 'StripTags'),\n array('name' => 'StripNewLines'),\n ), \n 'validators' => array(\n array(\n 'name' => 'StringLength',\n 'options' => array(\n 'min' => 1,\n 'max' => 128\n ),\n ),\n ),\n )\n );\n \n // Add input for \"password\" field\n $fieldsetInputFilter->add(array(\n 'name' => 'password',\n 'required' => true,\n 'filters' => array( \n ), \n 'validators' => array(\n array(\n 'name' => 'StringLength',\n 'options' => array(\n 'min' => 6,\n 'max' => 64\n ),\n ),\n ),\n )\n );\n }", "title": "" }, { "docid": "5aaa9ac351ee7cf2d3c2d33f79c18bd1", "score": "0.61651504", "text": "public function filters() \n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "6ec74b959cffecdbf3c334031d12e302", "score": "0.6162663", "text": "protected function hideFieldsForAddEdit()\n\t{\n\t}", "title": "" }, { "docid": "00403f75fe68c056d9c14e2a904aee89", "score": "0.61596835", "text": "function EventFilterForm() { \n // Create the DataEntry form\n $oForm = new EventFilterForm($this, 'EventFilterForm');\n // Return the form\n return $oForm;\n\t}", "title": "" }, { "docid": "430744e4a889eaeb8f0dac2aa2559467", "score": "0.61566603", "text": "function render_filters() { }", "title": "" }, { "docid": "375b12e6dd85fe4e9aaeaf09c3020fc6", "score": "0.6155202", "text": "public function get_fields()\n {\n }", "title": "" }, { "docid": "34231e90b3fdb8bc9e9b645be4236d41", "score": "0.61483103", "text": "public static function getSearchableFields();", "title": "" }, { "docid": "5533d482451f71138a59a529f7906012", "score": "0.6139026", "text": "protected function _Do_Method_Filter() {\r\n\t\t$form_instance = $this->form_instance;\r\n\t\t// Retrieve the form's fields\r\n $form_fields = $form_instance->fields;\r\n\t\t// If there are no form fields\r\n\t\tif (!$form_fields || !is_array($form_fields)) { return; }\r\n\t\t// Loop through each containers\r\n\t\tforeach ($form_fields as $_name => $field) {\r\n\t\t\t// If this field has a condition result and the field is hidden\r\n\t\t\tif ($field->Is_Hidden()) { continue; } \r\n\t\t\t// If this field has a custom filter method\r\n\t\t\tif (!method_exists($field,'Do_Filter')) { continue; }\r\n\t\t\t// Retrieve the filter result\r\n\t\t\t$field->Do_Filter();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "419d79991970281bb25f6b1a00c553bb", "score": "0.6138251", "text": "public function fields() {\n\t\treturn apply_filters( 'tf_module_category_description_fields', array(\n\t\t\t'first_page_only' => array(\n\t\t\t\t'label' => __( 'First Page Only', 'themify-flow' ),\n\t\t\t\t'type' => 'radio',\n\t\t\t\t'options' => array(\n\t\t\t\t\tarray( 'name' => __( 'Yes', 'themify-flow' ), 'value' => 'yes', 'selected' => true ),\n\t\t\t\t\tarray( 'name' => __( 'No', 'themify-flow' ), 'value' => 'no' ),\n\t\t\t\t),\n\t\t\t\t'description' => '<br>' . __( 'Display category description on the first category page only', 'themify-flow' )\n\t\t\t)\n\t\t) );\n\t}", "title": "" }, { "docid": "04e837db96416a96e7248465d56a1faf", "score": "0.61276555", "text": "protected static function getFilterInputs(&$filterConditions){ return '';}", "title": "" }, { "docid": "1a4a49fa92f670761376a86e9c0a33ce", "score": "0.61228275", "text": "function get_filter($form){\r\n $output='';\r\n if (!isset($form['filter'])) return $output;\r\n foreach ($form['filter'] as $element => $content){\r\n if (is_array($content)&&isset($content['#type'])){\r\n switch ($content['#type']){\r\n case'select':\r\n \t if($content['#default_value']<>-1) $output.= ($output<>''?' AND ':'').$content['#SQL_FIELD'].'='.$content['#options'][$content['#default_value']];\r\n \t break;\r\n case'checkboxes':\r\n foreach($content['#default_value'] as $key=>$val) {\r\n if ($val <>0) $res.=($res<>''?', ':'').$key; //compone la lista delle chiavi per la struttura IN ( )\r\n }\r\n if ($res<>'') $output.= ($output<>''?' AND ':'').$content['#SQL_FIELD'].' IN ('.$res.') ';\r\n break;\r\n case 'radios':\r\n if (is_array($content['#SQL_FIELD'])) $output.= ($output<>''&&$content['#SQL_FIELD'][$content['#default_value']]<>''?' AND ':'').$content['#SQL_FIELD'][$content['#default_value']];\r\n else $output.= ($output<>''?' AND ':'').$content['#SQL_FIELD'].'='.$content['#default_value'];\r\n break;\r\n }\r\n }\r\n }\r\n return $output;\r\n}", "title": "" }, { "docid": "520b0d6c3c0ab06da66c4f145a1c73d5", "score": "0.6115338", "text": "public function getForm(){\n $form = new AnalyticsFilterForm();\n $this->view->form = $form;\t\n }", "title": "" }, { "docid": "6bd0c0662b21381bfd24752bcedb0614", "score": "0.6112337", "text": "function cspm_search_form_fields(){\r\n\t\t\t\r\n\t\t\t$fields = array();\r\n\t\t\t\r\n\t\t\t$fields[] = array(\r\n\t\t\t\t'name' => 'Search Form Settings',\r\n\t\t\t\t'desc' => 'The search form is a technique that allow users to provide their address and to find locations on the map within a chosen distance restriction.',\r\n\t\t\t\t'type' => 'title',\r\n\t\t\t\t'id' => $this->metafield_prefix . '_search_form_settings',\r\n\t\t\t\t'attributes' => array(\r\n\t\t\t\t\t'style' => 'font-size:20px; color:#008fed; font-weight:400;'\r\n\t\t\t\t),\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$fields[] = array(\r\n\t\t\t\t'id' => $this->metafield_prefix . '_search_form_option',\r\n\t\t\t\t'name' => 'Search form option',\r\n\t\t\t\t'desc' => 'Select \"Yes\" to enable this option in your map. Defaults to \"No\".',\r\n\t\t\t\t'type' => 'radio',\r\n\t\t\t\t'default' => 'false',\r\n\t\t\t\t'options' => array(\r\n\t\t\t\t\t'true' => 'Yes',\r\n\t\t\t\t\t'false' => 'No'\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$fields[] = array(\r\n\t\t\t\t'id' => $this->metafield_prefix . '_sf_display_status',\r\n\t\t\t\t'name' => 'Search form display status',\r\n\t\t\t\t'desc' => 'Choose whether to open or close the search form on map load. Defaults to \"Close\".',\r\n\t\t\t\t'type' => 'radio',\r\n\t\t\t\t'default' => 'close',\r\n\t\t\t\t'options' => array(\r\n\t\t\t\t\t'open' => 'Open',\r\n\t\t\t\t\t'close' => 'Close'\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$fields[] = array(\r\n\t\t\t\t'id' => $this->metafield_prefix . '_sf_min_search_distances',\r\n\t\t\t\t'name' => 'Min distances of search',\r\n\t\t\t\t'desc' => 'Enter the minimum distance to use as a distance search between the origin address and the destinations in the map.',\r\n\t\t\t\t'type' => 'text',\r\n\t\t\t\t'default' => '3',\r\n\t\t\t\t'attributes' => array(\r\n\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t'pattern' => '\\d*',\r\n\t\t\t\t\t'min' => '1',\r\n\t\t\t\t),\t\t\t\t\t\t\t\t\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$fields[] = array(\r\n\t\t\t\t'id' => $this->metafield_prefix . '_sf_max_search_distances',\r\n\t\t\t\t'name' => 'Max distances of search',\r\n\t\t\t\t'desc' => 'Enter the maximum distance to use as a distance search between the origin address and the destinations in the map.',\r\n\t\t\t\t'type' => 'text',\r\n\t\t\t\t'default' => '50',\r\n\t\t\t\t'attributes' => array(\r\n\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t'pattern' => '\\d*',\r\n\t\t\t\t\t'min' => '1',\r\n\t\t\t\t),\t\t\t\t\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$fields[] = array(\r\n\t\t\t\t'id' => $this->metafield_prefix . '_sf_distance_unit',\r\n\t\t\t\t'name' => 'Distance unit',\r\n\t\t\t\t'desc' => 'Select the distance unit.',\r\n\t\t\t\t'type' => 'radio',\r\n\t\t\t\t'default' => 'metric',\r\n\t\t\t\t'options' => array(\r\n\t\t\t\t\t'metric' => 'Km',\r\n\t\t\t\t\t'imperial' => 'Miles'\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\t\t\r\n\t\t\t$fields[] = array(\r\n\t\t\t\t'id' => $this->metafield_prefix . '_sf_geoIpControl',\r\n\t\t\t\t'name' => 'Allow Geo-targeting',\r\n\t\t\t\t'desc' => 'Allow Geo-targeting on the search form. The Geo-targeting is the method of determining the geolocation of a website visitor.',\r\n\t\t\t\t'type' => 'radio',\r\n\t\t\t\t'default' => 'true',\r\n\t\t\t\t'options' => array(\r\n\t\t\t\t\t'true' => 'Yes',\r\n\t\t\t\t\t'false' => 'No'\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\t\t\t\r\n\t\t\t$fields[] = array(\r\n\t\t\t\t'id' => $this->metafield_prefix . '_form_customization_section',\r\n\t\t\t\t'name' => 'Search form customization',\r\n\t\t\t\t'desc' => '',\r\n\t\t\t\t'type' => 'title',\r\n\t\t\t\t'attributes' => array(\r\n\t\t\t\t\t'style' => 'font-size:15px; color:#ff6600; font-weight:600;'\r\n\t\t\t\t),\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t\t$fields[] = array(\r\n\t\t\t\t\t'id' => $this->metafield_prefix . '_sf_address_placeholder',\r\n\t\t\t\t\t'name' => 'Address field placeholder',\r\n\t\t\t\t\t'desc' => 'Edit the text to show as a placeholder of the address field',\r\n\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t'default' => 'Enter City & Province, or Postal code',\r\n\t\t\t\t);\r\n\t\t\t\r\n\t\t\t\t$fields[] = array(\r\n\t\t\t\t\t'id' => $this->metafield_prefix . '_sf_slider_label',\r\n\t\t\t\t\t'name' => 'Slider label',\r\n\t\t\t\t\t'desc' => 'Edit the text to show as a label of the slider',\r\n\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t'default' => 'Expand the search area up to',\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\t$fields[] = array(\r\n\t\t\t\t\t'id' => $this->metafield_prefix . '_sf_submit_text',\r\n\t\t\t\t\t'name' => 'Submit button text',\r\n\t\t\t\t\t'desc' => 'Edit the text to show in the submit button.',\r\n\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t'default' => 'Search',\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\t$fields[] = array(\r\n\t\t\t\t\t'id' => $this->metafield_prefix . '_sf_search_form_bg_color',\r\n\t\t\t\t\t'name' => 'Background color',\r\n\t\t\t\t\t'desc' => 'Change the background color of the search form container.',\r\n\t\t\t\t\t'type' => 'colorpicker',\r\n\t\t\t\t\t'default' => '#ffffff',\r\n\t\t\t\t);\r\n\t\t\t\r\n\t\t\t$fields[] = array(\r\n\t\t\t\t'id' => $this->metafield_prefix . '_warning_msg_section',\r\n\t\t\t\t'name' => 'Warning messages',\r\n\t\t\t\t'desc' => '',\r\n\t\t\t\t'type' => 'title',\r\n\t\t\t\t'attributes' => array(\r\n\t\t\t\t\t'style' => 'font-size:15px; color:#ff6600; font-weight:600;'\r\n\t\t\t\t),\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t\t$fields[] = array(\r\n\t\t\t\t\t'id' => $this->metafield_prefix . '_sf_no_location_msg',\r\n\t\t\t\t\t'name' => 'No locations message',\r\n\t\t\t\t\t'desc' => 'Edit the text to show when the search form has no locations to display.',\r\n\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t'default' => 'We could not find any location',\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\t$fields[] = array(\r\n\t\t\t\t\t'id' => $this->metafield_prefix . '_sf_bad_address_msg',\r\n\t\t\t\t\t'name' => 'Bad address message',\r\n\t\t\t\t\t'desc' => 'Edit the text to show when the search form don\\'t understand the provided address.',\r\n\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t'default' => 'We could not understand the location',\r\n\t\t\t\t);\r\n\t\t\t\r\n\t\t\t\t$fields[] = array(\r\n\t\t\t\t\t'id' => $this->metafield_prefix . '_sf_bad_address_sug_1',\r\n\t\t\t\t\t'name' => '\"Bad address\" first suggestion',\r\n\t\t\t\t\t'desc' => 'Edit the text to show as a first suggestion for the bad address message.',\r\n\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t'default' => '- Make sure all street and city names are spelled correctly.',\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\t$fields[] = array(\r\n\t\t\t\t\t'id' => $this->metafield_prefix . '_sf_bad_address_sug_2',\r\n\t\t\t\t\t'name' => '\"Bad address\" Second suggestion',\r\n\t\t\t\t\t'desc' => 'Edit the text to show as a second suggestion for the bad address message.',\r\n\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t'default' => '- Make sure your address includes a city and state.',\r\n\t\t\t\t);\r\n\t\t\t\r\n\t\t\t\t$fields[] = array(\r\n\t\t\t\t\t'id' => $this->metafield_prefix . '_sf_bad_address_sug_3',\r\n\t\t\t\t\t'name' => '\"Bad address\" Third suggestion',\r\n\t\t\t\t\t'desc' => 'Edit the text to show as a third suggestion for the bad address message.',\r\n\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t'default' => '- Try entering a zip code.',\r\n\t\t\t\t);\r\n\t\t\t\r\n\t\t\t$fields[] = array(\r\n\t\t\t\t'id' => $this->metafield_prefix . '_circle_customization_section',\r\n\t\t\t\t'name' => 'Circle customization',\r\n\t\t\t\t'desc' => '',\r\n\t\t\t\t'type' => 'title',\r\n\t\t\t\t'attributes' => array(\r\n\t\t\t\t\t'style' => 'font-size:15px; color:#ff6600; font-weight:600;'\r\n\t\t\t\t),\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t\t$fields[] = array(\r\n\t\t\t\t\t'id' => $this->metafield_prefix . '_sf_circle_option',\r\n\t\t\t\t\t'name' => 'Circle option',\r\n\t\t\t\t\t'desc' => 'The circle option is a technique of drawing a circle of a given radius of the search address. Select \"Yes\" to enable this option. Defaults to \"Yes\".',\r\n\t\t\t\t\t'type' => 'radio',\r\n\t\t\t\t\t'default' => 'true',\r\n\t\t\t\t\t'options' => array(\r\n\t\t\t\t\t\t'true' => 'Yes',\r\n\t\t\t\t\t\t'false' => 'No'\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$fields[] = array(\r\n\t\t\t\t\t'id' => $this->metafield_prefix . '_sf_edit_circle',\r\n\t\t\t\t\t'name' => 'Resize the circle',\r\n\t\t\t\t\t'desc' => 'Resizing the circle will allow users to increase and/or decrease the search distance in order to get more or less results. Defaults to \"Yes\".',\r\n\t\t\t\t\t'type' => 'radio',\r\n\t\t\t\t\t'default' => 'true',\r\n\t\t\t\t\t'options' => array(\r\n\t\t\t\t\t\t'true' => 'Yes',\r\n\t\t\t\t\t\t'false' => 'No'\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$fields[] = array(\r\n\t\t\t\t\t'id' => $this->metafield_prefix . '_sf_fillColor',\r\n\t\t\t\t\t'name' => 'Fill color',\r\n\t\t\t\t\t'desc' => 'The fill color.',\r\n\t\t\t\t\t'type' => 'colorpicker',\r\n\t\t\t\t\t'default' => '#189AC9',\r\n\t\t\t\t);\r\n\t\t\t\r\n\t\t\t\t$fields[] = array(\r\n\t\t\t\t\t'id' => $this->metafield_prefix . '_sf_fillOpacity',\r\n\t\t\t\t\t'name' => 'Fill opacity',\r\n\t\t\t\t\t'desc' => 'The fill opacity between 0.0 and 1.0.',\r\n\t\t\t\t\t'type' => 'select',\r\n\t\t\t\t\t'default' => '0,1',\r\n\t\t\t\t\t'options' => array(\r\n\t\t\t\t\t\t'0,0' => '0.0',\r\n\t\t\t\t\t\t'0,1' => '0.1',\r\n\t\t\t\t\t\t'0,2' => '0.2',\r\n\t\t\t\t\t\t'0,3' => '0.3',\r\n\t\t\t\t\t\t'0,4' => '0.4',\r\n\t\t\t\t\t\t'0,5' => '0.5',\r\n\t\t\t\t\t\t'0,6' => '0.6',\r\n\t\t\t\t\t\t'0,7' => '0.7',\r\n\t\t\t\t\t\t'0,8' => '0.8',\r\n\t\t\t\t\t\t'0,9' => '0.9',\r\n\t\t\t\t\t\t'1' => '1',\r\n\t\t\t\t\t)\t\t\t\r\n\t\t\t\t);\r\n\t\t\t\r\n\t\t\t\t$fields[] = array(\r\n\t\t\t\t\t'id' => $this->metafield_prefix . '_sf_strokeColor',\r\n\t\t\t\t\t'name' => 'Stroke color',\r\n\t\t\t\t\t'desc' => 'The stroke color.',\r\n\t\t\t\t\t'type' => 'colorpicker',\r\n\t\t\t\t\t'default' => '#189AC9',\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\t$fields[] = array(\r\n\t\t\t\t\t'id' => $this->metafield_prefix . '_sf_strokeOpacity',\r\n\t\t\t\t\t'name' => 'Stroke opacity',\r\n\t\t\t\t\t'desc' => 'The stroke opacity between 0.0 and 1.',\r\n\t\t\t\t\t'type' => 'select',\r\n\t\t\t\t\t'default' => '1',\r\n\t\t\t\t\t'options' => array(\r\n\t\t\t\t\t\t'0,0' => '0.0',\r\n\t\t\t\t\t\t'0,1' => '0.1',\r\n\t\t\t\t\t\t'0,2' => '0.2',\r\n\t\t\t\t\t\t'0,3' => '0.3',\r\n\t\t\t\t\t\t'0,4' => '0.4',\r\n\t\t\t\t\t\t'0,5' => '0.5',\r\n\t\t\t\t\t\t'0,6' => '0.6',\r\n\t\t\t\t\t\t'0,7' => '0.7',\r\n\t\t\t\t\t\t'0,8' => '0.8',\r\n\t\t\t\t\t\t'0,9' => '0.9',\r\n\t\t\t\t\t\t'1' => '1',\r\n\t\t\t\t\t)\t\t\t\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\t$fields[] = array(\r\n\t\t\t\t\t'id' => $this->metafield_prefix . '_sf_strokeWeight',\r\n\t\t\t\t\t'name' => 'Stroke weight',\r\n\t\t\t\t\t'desc' => 'The stroke width in pixels.',\r\n\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t'default' => '1',\r\n\t\t\t\t\t'attributes' => array(\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'pattern' => '\\d*',\r\n\t\t\t\t\t\t'min' => '0'\r\n\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t);\t\r\n\r\n\t\t\treturn $fields;\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "67cc7c79d8331fa3647051bf9cb880e3", "score": "0.61115044", "text": "function getFields()\n\t{ \n // Load the Category data\n if (empty($this->_fields['search']))\n {\n $fields = array();\n\n $db = JFactory::getDbo();\n\n $params = JComponentHelper::getParams('com_fieldsattach');\n $enable_log_searches = $params->get('enabled');\n\n $db = JFactory::getDbo();\n $query = 'SELECT a.*, b.id as idgroup, b.title as titlegroup'\n . ' FROM #__fieldsattach as a'\n . ' INNER JOIN #__fieldsattach_groups as b'\n . ' ON a.groupid = b.id'\n . ' WHERE a.searchable = 1 and a.published=1'\n //. ' GROUP BY b.id'\n . ' ORDER BY b.id'\n ;\n \n $db->setQuery($query);\n $fields = $db->loadObjectList();\n\n if(count($fields)>0)\n {\n foreach ($fields as $tmp_fields) {\n if (is_array($tmp_fields)) {\n $fields = array_merge($fields, $tmp_fields);\n }\n }\n }\n\n\n\n $this->_fields['search'] = $fields;\n }\n\n return $this->_fields ; \n\t}", "title": "" }, { "docid": "08b6a46993bc9b679115740906f90daf", "score": "0.61102355", "text": "public function addFilters() {\n\t\t$this->addFilter(new Generator\\Filters\\Upper);\n\t\t$this->addFilter(new Generator\\Filters\\Lower);\n\t\t$this->addFilter(new Generator\\Filters\\Date);\n\t\t$this->addFilter(new Generator\\Filters\\Number);\n\t}", "title": "" }, { "docid": "64aaf7eb10ad2e349c767b6124931f01", "score": "0.6101468", "text": "static function selectFields() {\n\t\treturn [\n\t\t\t'ov_name',\n\t\t\t'ov_archive_name',\n\t\t\t'ov_url',\n\t\t\t'ov_type',\n\t\t\t'ov_actor',\n\t\t\t'ov_timestamp'\n\t\t];\n\t}", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.6098112", "text": "public function getFilters();", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.6098112", "text": "public function getFilters();", "title": "" }, { "docid": "1f051a50aa1850124792e4d853f1e349", "score": "0.6093568", "text": "abstract function get_edit_form_fields();", "title": "" }, { "docid": "18967d8b4fa4c008277282d223d98cbd", "score": "0.6076114", "text": "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'password' => array(\n\t\t\t\tarray(array(Auth::instance(), 'hash'))\n\t\t\t),\n\t\t\t'email' => array(\n\t\t\t\tarray('strtolower')\n\t\t\t),\n\t\t\t'name' => array(\n\t\t\t\tarray('ucfirst'),\n\t\t\t),\n\t\t\t'surname' => array(\n\t\t\t\tarray('ucfirst'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "caeada21447f079a5aa7d200ceb58345", "score": "0.607478", "text": "public function getVisibleFields()\n {\n return $this->getFieldsByVisibility(false, false);\n }", "title": "" }, { "docid": "e63b177b1146efd208f28269e9beef79", "score": "0.60649556", "text": "function setFilterParameters()\n\t{\n\t\t$obj = $this->data;\n\t\t\n\t\t// JDG 9/2011 handle CompositeDataItems\n\t\t$fields = $obj->getFields();\n\t\t$this->search = new SearchParameters($obj);\n\n\t\tforeach(array_keys($fields) as $field)\n\t\t{\n\t\t\tif (!array_key_exists($field, $this->hidden) &&\n\t\t\t\t!($obj->filter && $obj->filter->isExcluded($field))\n\t\t\t\t)\n\t\t\t{\n\t\t\t\t$value = $obj->get($field);\n\t\t\t\tif($value && !is_int($value))\n\t\t\t\t\t$value = urlencode($value);\n\t\t\t\tif($value)\n\t\t\t\t\t$this->search->setParam($field, \"equal\", $value);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5089cda8d23eaf8f9413329eec9fcb59", "score": "0.60633695", "text": "public function getShowDisplayFields()\n {\n return $this->getDisplayFields('show');\n }", "title": "" }, { "docid": "16db9b9be85f63b89d499b82f83a42d4", "score": "0.60610145", "text": "protected function getFieldsForBreadcrumb()\n {\n return [\n 'label' => $this->filterConfig->getLabel(),\n 'value' => $this->getDisplayValue()\n ];\n }", "title": "" }, { "docid": "c0f95e88eff5d01f3682fb3845f80f25", "score": "0.6059142", "text": "public function fields()\n {\n return [\n $this->getGeneralFields(),\n $this->getPriceFields(),\n Group::tab(ProductsPrice::class)->attributes('hideFromFormIf:product_type,variants'),\n $this->getDescriptionFields(),\n $this->getWarehouseFields(),\n Group::tab(self::class)->attributes('hideFromFormIfNot:product_type,variants'),\n $this->getOtherSettingsFields(),\n ];\n }", "title": "" }, { "docid": "ee488c5fe32643b5dca248860f8bb553", "score": "0.60513073", "text": "public function formFilter()\n {\n global $typenow;\n\n if ($typenow !== 'form-submissions') {\n return;\n }\n\n $forms = get_posts(array(\n 'post_type' => 'mod-form',\n 'post_status' => 'publish',\n 'posts_per_page' => -1,\n 'numberposts' => -1\n ));\n\n echo '<select name=\"form\"><option value=\"-1\">' . __('Select form…', 'modularity-form-builder') . '</option>';\n\n foreach ($forms as $form) {\n $selected = isset($_GET['form']) && $_GET['form'] == $form->ID ? 'selected' : '';\n echo '<option value=\"' . $form->ID . '\" ' . $selected . '>' . $form->post_title . '</option>';\n }\n echo '</select>';\n }", "title": "" }, { "docid": "04be57feef405c1768546d39ba427282", "score": "0.6046817", "text": "protected function build_filters(&$form, &$form_state) {\n // Find all the fields we are allowed to filter by.\n $fields = views_fetch_fields($this->base_table, 'filter');\n\n $entity_info = $this->entity_info;\n // If the current base table support bundles and has more than one (like user).\n if (isset($entity_info['bundle keys']) && isset($entity_info['bundles'])) {\n // Get all bundles and their human readable names.\n $options = array('all' => t('All'));\n foreach ($entity_info['bundles'] as $type => $bundle) {\n $options[$type] = $bundle['label'];\n }\n $form['displays']['show']['type'] = array(\n '#type' => 'select',\n '#title' => t('of type'),\n '#options' => $options,\n );\n $selected_bundle = views_ui_get_selected($form_state, array('show', 'type'), 'all', $form['displays']['show']['type']);\n $form['displays']['show']['type']['#default_value'] = $selected_bundle;\n // Changing this dropdown updates the entire content of $form['displays']\n // via AJAX, since each bundle might have entirely different fields\n // attached to it, etc.\n views_ui_add_ajax_trigger($form['displays']['show'], 'type', array('displays'));\n }\n\n // Check if we are allowed to filter by taxonomy, and if so, add the\n // \"tagged with\" filter to the view.\n //\n // We construct this filter using taxonomy_index.tid (which limits the\n // filtering to a specific vocabulary) rather than taxonomy_term_data.name\n // (which matches terms in any vocabulary). This is because it is a more\n // commonly-used filter that works better with the autocomplete UI, and\n // also to avoid confusion with other vocabularies on the site that may\n // have terms with the same name but are not used for free tagging.\n //\n // The downside is that if there *is* more than one vocabulary on the site\n // that is used for free tagging, the wizard will only be able to make the\n // \"tagged with\" filter apply to one of them (see below for the method it\n // uses to choose).\n if (isset($fields['taxonomy_index.tid'])) {\n // Check if this view will be displaying fieldable entities.\n if (!empty($entity_info['fieldable'])) {\n // Find all \"tag-like\" taxonomy fields associated with the view's\n // entities. If a particular entity type (i.e., bundle) has been\n // selected above, then we only search for taxonomy fields associated\n // with that bundle. Otherwise, we use all bundles.\n $bundles = array_keys($entity_info['bundles']);\n // Double check that this is a real bundle before using it (since above\n // we added a dummy option 'all' to the bundle list on the form).\n if (isset($selected_bundle) && in_array($selected_bundle, $bundles)) {\n $bundles = array($selected_bundle);\n }\n $tag_fields = array();\n foreach ($bundles as $bundle) {\n foreach (field_info_instances($this->entity_type, $bundle) as $instance) {\n // We define \"tag-like\" taxonomy fields as ones that use the\n // \"Autocomplete term widget (tagging)\" widget.\n if ($instance['widget']['type'] == 'taxonomy_autocomplete') {\n $tag_fields[] = $instance['field_name'];\n }\n }\n }\n $tag_fields = array_unique($tag_fields);\n if (!empty($tag_fields)) {\n // If there is more than one \"tag-like\" taxonomy field available to\n // the view, we can only make our filter apply to one of them (as\n // described above). We choose 'field_tags' if it is available, since\n // that is created by the Standard install profile in core and also\n // commonly used by contrib modules; thus, it is most likely to be\n // associated with the \"main\" free-tagging vocabulary on the site.\n if (in_array('field_tags', $tag_fields)) {\n $tag_field_name = 'field_tags';\n }\n else {\n $tag_field_name = reset($tag_fields);\n }\n // Add the autocomplete textfield to the wizard.\n $form['displays']['show']['tagged_with'] = array(\n '#type' => 'textfield',\n '#title' => t('tagged with'),\n '#autocomplete_path' => 'taxonomy/autocomplete/' . $tag_field_name,\n '#size' => 30,\n '#maxlength' => 1024,\n '#field_name' => $tag_field_name,\n '#element_validate' => array('views_ui_taxonomy_autocomplete_validate'),\n );\n }\n }\n }\n }", "title": "" }, { "docid": "a5ccc7c75e6c67599cdfc9e6aebe0da6", "score": "0.60460246", "text": "private function setFilter()\n {\n $this->filter['categories'] = $this->getParameter('categories', 'array');\n $this->filter['value'] = $this->getParameter('value') == null ? '' : $this->getParameter('value');\n }", "title": "" }, { "docid": "98b1fea50787f1100249c479f055ae09", "score": "0.6041846", "text": "function rubik_filter_form($form) {\n if (isset($form['#title'])) {\n unset($form['#title']);\n }\n $select = '';\n foreach (element_children($form) as $key) {\n if (isset($form[$key]['#type']) && $form[$key]['#type'] === 'radio') {\n $select .= drupal_render($form[$key]);\n }\n }\n if (!$select) {\n $select = drupal_render($form['format']);\n }\n $help = theme('filter_tips_more_info');\n $output = \"<div class='filter-options clear-block'>{$select}{$help}</div>\";\n return $output;\n}", "title": "" }, { "docid": "82369edb3256db6e323a5aa6aacce9c1", "score": "0.60376674", "text": "function getFields();", "title": "" }, { "docid": "82369edb3256db6e323a5aa6aacce9c1", "score": "0.60376674", "text": "function getFields();", "title": "" }, { "docid": "82369edb3256db6e323a5aa6aacce9c1", "score": "0.60376674", "text": "function getFields();", "title": "" }, { "docid": "dc21f05d4cfebf6b88e96519ef292482", "score": "0.6037465", "text": "public function filters()\n {\n return $this->belongsToMany('App\\Field', 'record_has_filters', 'record_id', 'field_id')->withPivot('data', 'order')->orderBy('order');\n }", "title": "" }, { "docid": "56777b3ed74b60cd3657df23358a0aef", "score": "0.60297245", "text": "public function filters()\n {\n return [\n 'name' => 'trim',\n 'address_1' => 'trim',\n 'address_2' => 'trim',\n 'city' => 'trim',\n 'state' => 'trim',\n 'postal_code' => 'trim',\n 'country' => 'trim',\n 'email' => 'trim',\n 'phone' => 'trim',\n ];\n }", "title": "" }, { "docid": "2797ee427229e972a842c9cd49b38d3a", "score": "0.6026112", "text": "function getFilters()\r\n\t{\r\n\t\t$params = $this->getParams();\r\n\t\t$name = strtolower(str_replace('fabrikModel', '', get_class($this)));\r\n\t\t$filters = array();\r\n\t\t$showFilters = $params->get($name.'_show_filters', array());\r\n\t\t$listModels = $this->getlistModels();\r\n\t\t$i = 0;\r\n\t\tforeach ($listModels as $listModel) {\r\n\t\t\t$show = (bool)JArrayHelper::getValue($showFilters, $i, true);\r\n\t\t\tif ($show) {\r\n\t\t\t\t$filters[$listModel->getTable()->label] = $listModel->getFilters($this->getContainerId(), 'vizualization', $this->getVisualization()->id);\r\n\t\t\t}\r\n\t\t\t$i ++;\r\n\t\t}\r\n\t\t$this->getRequireFilterMsg();\r\n\t\treturn $filters;\r\n\t}", "title": "" }, { "docid": "67f7eb690606b33cba7d89ad6c684805", "score": "0.6023247", "text": "function get_filters() {\n $filters = array();\n foreach ($this->_fields as $fieldfilter) {\n if (!empty($fieldfilter)) {\n $filters[] = $fieldfilter;\n }\n }\n //$this->err_dump($filters, 'get_filters()::$filters');\n return $filters;\n }", "title": "" }, { "docid": "a09d498e39a84cc24c05cdb0da3806c5", "score": "0.60211456", "text": "protected function getFilters()\n { \n $filters = parent::getFilters(); \n $filters['internado_id'] = is_object($this->hcps_internado) ? $this->hcps_internado->getId() : array();\n return $filters;\n }", "title": "" }, { "docid": "7a56ab9f222dea87f12e18faaf8b627c", "score": "0.60197264", "text": "function __optionalFormFieldsDisplay()\n {\n\n //check optional form fields & and set visibility of form field widget\n $optional_fields = $this->projectsoptionalfields_model->optionalFields('enabled');\n $this->data['debug'][] = $this->projectsoptionalfields_model->debug_data;\n projects_optionalfield_visibility($optional_fields);\n }", "title": "" }, { "docid": "242fc9f44026b65625838f9de42a3aca", "score": "0.60128003", "text": "function region_filter_views_data() {\n $data = array();\n //region filter filed for view\n $data['node']['region_filter'] = array(\n 'title' => t('Node region filter'),\n 'help' => t('Node region filter by login user.'),\n 'filter' => array(\n 'handler' => 'region_handler_filter_node_region',\n ),\n );\n return $data;\n}", "title": "" }, { "docid": "cbad0f5a03d7698757992f5cd5485770", "score": "0.6012186", "text": "private function create_form_filter()\n {\n $data = array();\n $form = $this->createFormBuilder($data)\n ->add('Filtrer','choice',\n array('choices' => array(\n 'entreprise' => 'Entreprise',\n 'particulier' => 'Particulier',\n 'A contacter' => 'A contacter',\n 'Message laissé' => 'Message laissé',\n 'RDV fixé' => 'RDV fixé',\n 'Renseigné' => 'Renseigné',\n 'tout' => 'Tout'\n ),\n 'preferred_choices' => array('tout','entreprise','particulier')))\n ->add('ok','submit',array('attr' => array('class' => 'btn_ok')))\n ->setAction($this->generateUrl('admin_appel'))\n ->getForm();\n return $form;\n }", "title": "" }, { "docid": "5ff71b65d1505c9af358402874425978", "score": "0.60117686", "text": "function theme_node_filters(&$form) {\n $output .= '<ul>';\n if (sizeof($form['current'])) {\n foreach (element_children($form['current']) as $key) {\n $output .= '<li>' . form_render($form['current'][$key]) . '</li>';\n }\n }\n\n $output .= '<li><dl class=\"multiselect\">' . (sizeof($form['current']) ? '<dt><em>'. t('and') .'</em> '. t('where') .'</dt>' : '') . '<dd class=\"a\">';\n foreach (element_children($form['filter']) as $key) {\n $output .= form_render($form['filter'][$key]);\n }\n $output .= '</dd>';\n\n $output .= '<dt>'. t('is') .'</dt>' . '<dd class=\"b\">';\n\n foreach (element_children($form['status']) as $key) {\n $output .= form_render($form['status'][$key]);\n }\n $output .= '</dd>';\n\n $output .= '</dl>';\n $output .= '<div class=\"container-inline\" id=\"node-admin-buttons\">'. form_render($form['buttons']) .'</div>';\n $output .= '</li></ul><br class=\"clear\" />';\n\n return $output;\n}", "title": "" }, { "docid": "49b2818c0c5285fc129305e3dfa82f13", "score": "0.6007622", "text": "public function indexAction() {\n\t\t$formFilter = new Admin_Form_SearchFilter();\n\t\t$formFilter->getElement('nameFilter')->setLabel(_(\"Name category\"));\n\t\t$this->view->formFilter = $formFilter;\n\t}", "title": "" }, { "docid": "5820ada61402a2ff8042fa8d85541b78", "score": "0.6005095", "text": "public function getFields() {\n $fields = parent::getFields();\n $fields['headline'] = 'headline'; \n return $fields;\n }", "title": "" }, { "docid": "1fa4c12280483424188fc0b8f033daff", "score": "0.6001938", "text": "public function initFilter() {\n\t\tforeach ($this->tableview->getFilterableFieldSettings() as $field_set) {\n\t\t\t$field = $field_set->getFieldObject();\n\t\t\t$value = ilDclCache::getFieldRepresentation($field)->addFilterInputFieldToTable($this);\n\n\t\t\t//Disable filters\n\t\t\t$filter = &end($this->filters);\n\t\t\tif (!$field_set->isFilterChangeable())\n\t\t\t{\n\t\t\t\t//always set tableview-filtervalue with disabled fields, so resetFilter won't reset it\n\t\t\t\t$value = $field_set->getFilterValue();\n\t\t\t\t$filter->setValueByArray($value);\n\t\t\t\t$value = $filter->getValue();\n\n\t\t\t\t$filter->setDisabled(true);\n\t\t\t\tif ($filter instanceof ilCombinationInputGUI)\n\t\t\t\t{\n\t\t\t\t\t$filter->__call('setDisabled', array(true));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->applyFilter($field->getId(), $value);\n\t\t}\n\t}", "title": "" }, { "docid": "9eaa7d7b9760519389ff48f933f376e0", "score": "0.5988464", "text": "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'checkPrivilages',\n\t\t);\n\t}", "title": "" }, { "docid": "e2c19f313707e9c2e884c9c844da650e", "score": "0.59860575", "text": "function my_epl_search_widget_fields_frontend( $fields ) {\n\tforeach( $fields as &$field ) {\n\t\tif( $field['key'] == 'search_land_area' ) {\n\t\t\t$field['order'] = '1';\n\t\t}\n\n\t\tif( $field['key'] == 'search_price' ) {\n\t\t\t$field['order'] = '1';\n\t\t}\n\n\t\t// Repeat the above if and alter the name\n\t}\n\treturn $fields;\n}", "title": "" }, { "docid": "1d74d55c6c4c9c0c140fd19006a114cf", "score": "0.5982513", "text": "protected static function getFilterConditions(){ return array(); }", "title": "" }, { "docid": "4bdb956ff534afeb6e9b308a4b6b00c3", "score": "0.59819865", "text": "public function initFilterFromTableView() {\n\t\tforeach ($this->tableview->getFilterableFieldSettings() as $field_set) {\n\t\t\t$field = $field_set->getFieldObject();\n\t\t\tilDclCache::getFieldRepresentation($field)->addFilterInputFieldToTable($this);\n\n\t\t\t//set filter values\n\t\t\t$filter = &end($this->filters);\n\t\t\t$value = $field_set->getFilterValue();\n\t\t\t$filter->setValueByArray($value);\n\t\t\t$this->applyFilter($field->getId(), empty(array_filter($value)) ? null : $filter->getValue());\n\n\t\t\t//Disable filters\n\t\t\tif (!$field_set->isFilterChangeable())\n\t\t\t{\n\t\t\t\t$filter->setDisabled(true);\n\t\t\t\tif ($filter instanceof ilCombinationInputGUI)\n\t\t\t\t{\n\t\t\t\t\t$filter->__call('setDisabled', array(true));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "87eb0acda5b23a4a0a651760d87aba83", "score": "0.5976667", "text": "public function filtersFilterGetNames()\n {\n return array('default' => $this->_('Filtered HTML'));\n }", "title": "" }, { "docid": "84f0ae2d97629f2bc1963654cc4722f7", "score": "0.59703285", "text": "public function filters(){\n\t\treturn ['authControl'];\n\t}", "title": "" } ]
e8c1a58246875933fbfbe8e09726858d
Search patient in existing database
[ { "docid": "0a2fdf9183cf5601e8e580147356cfbf", "score": "0.59805757", "text": "function search_patient_post(){\n\t\t$params = array(\n\t\t\t\"cog1\"\t=> $this->post('surname'),\n\t\t\t\"cog2\"\t=> $this->post('second_surname'),\n\t\t\t\"nom\"\t=> $this->post('first_name')\n\t\t);\t\t\n\t\t$patient_list = $this->Common_model->execute_sp(\n\t\t\tarray('sp_name'=>'mediagenda.malalts_sele_wgi',\n\t\t\t\t'params' => $params,\n\t\t\t\t'db_name' => 'default',\n\t\t\t\t'return_type' => 'array'\n\t\t\t)\n\t\t);\n\t\techo json_encode(array('patient_list'=>$patient_list,'success'=>true));\n\t}", "title": "" } ]
[ { "docid": "e10cfd8e60ecabf777eb115c2eafba56", "score": "0.6503625", "text": "public function searchAction(){\r\n \r\n $em =$this->container->get('doctrine')->getEntityManager();\r\n $pat = $em->getRepository('PidevMedecinBundle:Patient')->findAll();\r\n //Recherche par libelle\r\n $Request = $this->get('request');\r\n if ($Request->getMethod() == 'POST') {\r\n $search = $Request->get('search');\r\n // $Modeles = $em->getRepository('EspritParcBundle:Modele')->findBy(array(\"Libelle\"=> $search));\r\n $query = $em->createQuery('SELECT P\r\n FROM PidevMedecinBundle:Patient P\r\n WHERE P.nomPatient like :nomPatient')->setParameter('nomPatient', '%' . $search . '%');\r\n $pat = $query->getResult();\r\n }\r\n return $this->render('PidevMedecinBundle:Rdv:new.html.twig', array(\"pat\" => $pat));\r\n }", "title": "" }, { "docid": "ae7a9380c7110f5f39f3cea9c2c3c3de", "score": "0.627538", "text": "public static function getPatients() {\n $db = new Database();\n $q = 'SELECT * FROM patients';\n $result = $db->createQuery($q);\n return $result;\n }", "title": "" }, { "docid": "2de49e514f5a39180a56b906586d6e46", "score": "0.6259553", "text": "public function searchPatient($string)\n {\n $dbh = $this->connectDatabase();\n $req = $dbh->prepare('SELECT \n *\n FROM\n hospitalE2N.patients\n WHERE\n lastname LIKE :string\n ORDER BY lastname ASC');\n $req->bindValue(':string', $string . '%', PDO::PARAM_STR);\n $req->execute();\n $fetch = $req->fetchAll(PDO::FETCH_ASSOC);\n return $fetch;\n }", "title": "" }, { "docid": "b343bcf5dc613586d7deb7986b002400", "score": "0.61906534", "text": "public static function searchPatient($args) {\n $results = ModelSearch::getSearchPatient($args);\n $resultsLength = count($results);\n\n include 'config.php';\n $vue = $root . '/app/view/search/searchResultPatient.php';\n require $vue;\n }", "title": "" }, { "docid": "53b8fdac00c4af4783475cba257fa092", "score": "0.61763376", "text": "private function doctor_search()\n\t\t{\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\t$name = isset($this->_request['name'])? '%'.$this->_request['name'].'%':'';\n\t\t\t$phone_no = isset($this->_request['mobile_number']) ? '%'.$this->_request['mobile_number'].'%':'';\n\t\t\t$speacializaton = isset($this->_request['specializaton'])? '%'.$this->_request['specializaton'].'%':'';\n\t\t\t$pincode = isset($this->_request['pincode']) ? '%'.$this->_request['pincode'].'%' :'';\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$where = \" WHERE 1\";\n\t\t\t\t$where1 = \"\";\n\t\t\t\tif(isset($this->_request['name']) && $this->_request['name']!='')\n\t\t\t\t{\n\t\t\t\t\t$where .=\" AND du.du_name like '%\".$this->_request['name'].\"%'\";\n\t\t\t\t}\n\t\t\t\tif(isset($this->_request['mobile_number']) && $this->_request['mobile_number']!='')\n\t\t\t\t{\n\t\t\t\t\t$where .=\" AND du.du_phone_no like '%\".$this->_request['mobile_number'].\"%'\";\n\t\t\t\t}\n\t\t\t\tif(isset($this->_request['specializaton']) && $this->_request['specializaton']!='')\n\t\t\t\t{\n\t\t\t\t\t$where .=\" AND du.specializaton like '%\".$this->_request['specializaton'].\"%'\";\n\t\t\t\t}\n\t\t\t\tif(isset($this->_request['pincode']) && $this->_request['pincode']!='')\n\t\t\t\t{\n\t\t\t\t\t$where .=\" AND du.du_pincode like '%\".$this->_request['pincode'].\"%'\";\n\t\t\t\t}\n\t\t\t\t/*if(isset($this->_request['start_date_time']) && $this->_request['end_date_time']!='')\n\t\t\t\t{\n\t\t\t\t\t$fromdate = date('Y-m-d',strtotime($this->_request['from_date']));\n\t\t\t\t\t$todate = date('Y-m-d',strtotime($this->_request['to_date']));\n\t\t\t\t\t$where .=\" AND date_format(da.start_date,'%Y-%m-%d') >= '\".$fromdate.\"' AND date_format(da.end_date,'%Y-%m-%d') <= '\".$todate.\"'\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$where1 .=\" AND date_format(da.start_date,'%Y-%m-%d') >= '\".date('Y-m-d').\"'\";\n\t\t\t\t}*/\n\t\t\t\t$query=\"SELECT du.du_id, du.du_name, du.du_phone_no, du.du_pic, du.du_city,du.du_district,\n\t\t\t\tdu.du_state, du.du_pincode, du.specializaton, du.qualification, du.du_address,\n\t\t\t\tda.start_date_time, da.doctor_visit_add, DISTINCT(da.doctor_visit_state_id),\n\t\t\t\tFROM table_doctor du\n\t\t\t\tLEFT JOIN doctor_availability da ON du.du_id = da.doc_id {$where1}\n\t\t\t\tLEFT JOIN m_city mc ON du.du_city = mc.cty_id\n\t\t\t\tLEFT JOIN m_state ms ON du.du_state = ms.st_id {$where}\";\n\t\t\t\t$stmt = $this->db->prepare($query);\n\t\t\t\t$stmt->execute();\n\t\t\t\t$result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t$error = array('status' => \"Sucess\", \"msg\" =>\"Availability Data\", \"data\" => $result);\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tcatch(Exception $ex)\n\t\t\t{\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" =>$ex->getMessage());\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "661724d8776515a8401324675648ae54", "score": "0.61475825", "text": "public function search_patient($search_text = '', $doctor_id = '') {\n\n $get_search_patient_sql = \"SELECT \n CONCAT(user_first_name, ' ',user_last_name) AS user_name, \n CONCAT(user_first_name, ' ',user_last_name,' ',user_phone_number,' ',user_unique_id) AS user_search, \n user_unique_id,\n user_id,\n user_phone_number,\n user_email,\n appointment_id,\n appointment_clinic_id\n FROM \n \" . $this->users_table . \" \n LEFT JOIN\n \" . TBL_APPOINTMENTS . \" ON user_id = appointment_user_id AND appointment_status != 9 \";\n\n if (!empty($doctor_id)) {\n $get_search_patient_sql.=\" AND appointment_doctor_user_id=\" . $doctor_id . \" \";\n }\n\n $get_search_patient_sql .= \"\n WHERE \n user_status != 9 AND\n user_type = 1 AND\n (\n user_first_name LIKE '%\" . $search_text . \"%' OR\n user_last_name LIKE '%\" . $search_text . \"%'OR\n user_unique_id LIKE '%\" . $search_text . \"%' OR\n user_phone_number LIKE '%\" . $search_text . \"%' \n )\n GROUP BY user_id ORDER BY user_name ASC\n \";\n\n $get_patient_data = $this->get_all_rows_by_query($get_search_patient_sql);\n return $get_patient_data;\n }", "title": "" }, { "docid": "51523d8111620b45da4b189d83cc7fb2", "score": "0.60339946", "text": "public function search();", "title": "" }, { "docid": "4236a3a6466c6d1631bdc742b9009871", "score": "0.59974855", "text": "public function ajax_searchPatients() {\n\t\tif (!$this->request->is('post') || empty($this->request->data)) {\n\t\t\tthrow new NotFoundException(__d('CampaignsPatient', 'Invalid campaigns patient'));\n\t\t}\n\n\t\t$campaign_id = $this->request->data['CampaignsPatient']['campaign_id'];\n\n\t\t$patients = $this->CampaignsPatient->find('list', array(\n\t\t\t'fields' => array('CampaignsPatient.patient_id'),\n\t\t\t'conditions' => array('CampaignsPatient.campaign_id' => $campaign_id)\n\t\t\t)\n\t\t);\n\n\t\t$conditions = 'Patient.id';\n\t\tif (!empty($patients)) {\n\t\t\t$conditions = array('Patient.id NOT IN (' . implode(',', $patients) . ')');\n\t\t}\n\n\t\t$this->paginate = array(\n\t\t\t'limit' => 5,\n\t\t\t'conditions' => $conditions\n\t\t);\n\t\t$this->set('patients', $this->paginate('Patient'));\n\n\t\t$this->layout = false;\n\t\t$this->render('/Elements/ajax_table');\n\t}", "title": "" }, { "docid": "321aff947601ea387564571542d7b045", "score": "0.59526604", "text": "public function loadPatients()\n\t{\n\t\t$search = Input::get('search');\n\n\t\t$patients = Patient::search($search)->orderBy('id','DESC')->paginate(Config::get('kblis.page-items'));\n\n\t\tif (count($patients) == 0) {\n\t\t \tSession::flash('message', trans('messages.no-match'));\n\t\t}\n\n\t\t// Load the view and pass the patients\n\t\treturn View::make('reports.patient.index')->with('patients', $patients)->withInput(Input::all());\n\t}", "title": "" }, { "docid": "e1d8a1f4520d512cf4e4f2c395a8f96a", "score": "0.59091896", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n $criteria->with = 'patient';\n\n $criteria->compare('id', $this->id);\n $criteria->compare('patient_id', $this->patient_id);\n $criteria->compare('tb_case_no', $this->tb_case_no);\n $criteria->compare('date_opened', $this->date_opened, true);\n $criteria->compare('dots_facility_name', $this->dots_facility_name, true);\n $criteria->compare('bcg_scar', $this->bcg_scar, true);\n $criteria->compare('contact_person', $this->contact_person, true);\n $criteria->compare('contact_person_no', $this->contact_person_no, true);\n $criteria->compare('source_of_patient', $this->source_of_patient, true);\n $criteria->compare('name_of_reffering_physician', $this->name_of_reffering_physician, true);\n $criteria->compare('history_of_anti_tb_drug_intake', $this->history_of_anti_tb_drug_intake, true);\n $criteria->compare('duration', $this->duration, true);\n $criteria->compare('specify_drugs', $this->specify_drugs, true);\n $criteria->compare('when', $this->when, true);\n $criteria->compare('where', $this->where, true);\n $criteria->compare('smear_status', $this->smear_status, true);\n $criteria->compare('no_of_household_contacts', $this->no_of_household_contacts);\n $criteria->compare('classification_of_tb', $this->classification_of_tb, true);\n $criteria->compare('tb_site', $this->tb_site, true);\n $criteria->compare('type_of_patient', $this->type_of_patient, true);\n $criteria->compare('category_1', $this->category_1, true);\n $criteria->compare('category_2', $this->category_2, true);\n $criteria->compare('category_3', $this->category_3, true);\n $criteria->compare('treatment_started', $this->treatment_started, true);\n $criteria->compare('tbdc_findings_and_recommendations', $this->tbdc_findings_and_recommendations, true);\n $criteria->compare('chest_xray', $this->chest_xray, true);\n $criteria->compare('name_of_treatment_partner', $this->name_of_treatment_partner, true);\n $criteria->compare('designation_of_treatment_partner', $this->designation_of_treatment_partner, true);\n\n $criteria->compare('patient_family_name', $this->patient_family_name, true);\n $criteria->compare('patient_first_name', $this->patient_family_name, true, 'OR');\n $criteria->compare('patient_middle_name', $this->patient_family_name, true, 'OR');\n\n $sort = new CSort();\n $sort->attributes = array(\n 'patient_family_name' => array(\n 'asc' => 'patient_family_name',\n 'desc' => 'patient_family_name desc'\n ),\n '*'\n );\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => $sort,\n ));\n }", "title": "" }, { "docid": "7ae814c743d5b44b3134802779f122af", "score": "0.5884209", "text": "private function searchForUserInDatabase() {\n $registration = Auth::user()->getUsername();\n// $registration = '02060091';\n if (User::exists($registration)) {\n $user = User::registration($registration);\n } else {\n $user = $this->fillNewUser();\n if ($this->containsNumbers($registration)) {\n $user->active = '0';\n $user->save();\n } else {\n $user->active = '1';\n $user->save();\n $this->registerNewTeacher($user);\n }\n }\n Session::put('user', $user);\n return $user->where('registration', $registration)->with('teacher', 'google')->first();\n }", "title": "" }, { "docid": "03aa1ea44ccac925867384521640ec23", "score": "0.58759314", "text": "public function searchpatientnamerecord(Request $request){\n\t\t// already fixed chereettt\n\t\t// dd($request->search_string);\n\t\tif($request->search_string!='')\n\t\t{\n\t\t\t$counter = 0;\n\t\t\t$search_string = explode(\" \",$request->search_string);\n\t\t\tfor($i=0; $i < sizeof($search_string); $i++)\n\t\t\t{\n\t\t\t\t$search_patient_id_records = Patient::where('patient_first_name', 'like', '%'.$search_string[$i].'%')->orWhere('patient_middle_name', 'like', '%'.$search_string[$i].'%')->orWhere('patient_last_name', 'like', '%'.$search_string[$i].'%')->orderBy('patient_last_name', 'asc')->pluck('patient_id')->all();\n\t\t\t}\n\t\t\tif(count($search_patient_id_records) > 0){\n\t\t\t\t$searchpatientfirstnamearray = array();\n\t\t\t\t$searchpatientlastnamearray = array();\n\t\t\t\t$searchpatientidarray = array();\n\t\t\t\tforeach ($search_patient_id_records as $search_patient_id_record)\n\t\t\t\t{\n\t\t\t\t\tarray_push($searchpatientfirstnamearray, Patient::find($search_patient_id_record)->patient_first_name);\n\t\t\t\t\tarray_push($searchpatientlastnamearray, Patient::find($search_patient_id_record)->patient_last_name);\n\t\t\t\t\tarray_push($searchpatientidarray, $search_patient_id_record);\n\t\t\t\t}\n\t\t\t\t$counter++;\n\t\t\t\treturn response()->json(['searchpatientidarray' => $searchpatientidarray, 'searchpatientfirstnamearray' => $searchpatientfirstnamearray, 'searchpatientlastnamearray' => $searchpatientlastnamearray, 'counter' => $counter]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn response()->json(['counter' => $counter]);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn response()->json(['counter' => 'blankstring']);\n\t\t}\n\t}", "title": "" }, { "docid": "97d4c10bbb05ff98b0b4d6425965e228", "score": "0.5774501", "text": "function search_project($project_ID)\n{\n $data_conn = connection();\n $data = $data_conn->select(\"Client_Project\", \"*\", [\n \"Project_ID\" => $project_ID,\n \"Status\" => \"1\"\n ]);\n return $data;\n}", "title": "" }, { "docid": "8e5ac9dc9dd0e5e532be7723e96f5d82", "score": "0.57263", "text": "public function search($date) {\n\n\t\t\t$q = 'SELECT a.*, \n\t\t\t\t\tp.patient_id, \n\t\t\t\t\tp.patient_id_number, \n\t\t\t\t\tCONCAT(p.patient_name, \" \", p.patient_last_name) AS patient_fullname, \n\t\t\t\t\ts.store_id, \n\t\t\t\t\ts.store_name\n\t\t\t\tFROM \n\t\t\t\t\tnunu_agenda AS a, \n\t\t\t\t\tnunu_patients AS p, \n\t\t\t\t\tnunu_stores AS s\n\t\t\t\tWHERE \n\t\t\t\t\ta.agenda_patient_id = p.patient_id AND \n\t\t\t\t\ta.agenda_store = s.store_id AND \n\t\t\t\t\ta.agenda_date = \"' . $date . '\"\n\t\t\t\tORDER BY \n\t\t\t\t\ta.agenda_time ASC;'\n\t\t\t;\n\n\t\t\t$query = $this->db->query($q);\n\n\t\t\treturn $query->result_array();\n\t\t}", "title": "" }, { "docid": "df80289da69cd4e2c22c86ab285a9a6d", "score": "0.57255036", "text": "abstract public function searchById($id);", "title": "" }, { "docid": "bacba042087ab49940d4e6b26bb51eda", "score": "0.5695724", "text": "protected function _getSearchData() {}", "title": "" }, { "docid": "9fdc1762979a988e505a19431e7873a8", "score": "0.5694702", "text": "private function getFromDatabase() {\n $fields = array();\n\n $where = array();\n\n if(!empty($this->filterForm)) {\n $filters = $this->getFilterFormValue();\n\n foreach($this->filterForm as $name => $field) {\n if(isset($filters[$name]) && $filters[$name] !== '') {\n switch($field['type']) {\n case 'checkbox' :\n $values = array_filter($filters[$name]);\n\n if(!empty($values)) {\n $where[] = DBExample::make(array(\n $name => array(\n '$in' => array_keys($values)\n )\n ), $this->binds);\n }\n break;\n\n default :\n $where[] = DBExample::make(array(\n $name => $filters[$name]\n ), $this->binds);\n break;\n }\n }\n }\n }\n\n\n if(!empty($this->filter)) {\n if($this->filter instanceof DBExample) {\n $where[] = $this->filter->parse($this->binds);\n }\n else if(is_array($this->filter)) {\n $where[] = $this->filter[0];\n $this->binds = $this->filter[1];\n }\n else{\n $where[] = $this->filter;\n }\n }\n\n // insert the reference if not present in the fields\n if(!isset($this->fields[$this->refAlias])) {\n $this->fields[$this->refAlias] = new ItemListField(\n $this->refAlias,\n array(\n 'field' => $this->refField,\n 'hidden' => true,\n ),\n $this\n );\n }\n\n // Prepare the fields to research\n $searches = array();\n foreach($this->fields as $name => &$field){\n if(!$field->independant) {\n $fields[$this->dbo->formatField($field->field)] = $this->dbo->formatField($name);\n\n // Get the pattern condition\n $sql = $field->getSearchCondition($this->binds);\n if($sql) {\n $where[] = $sql;\n }\n }\n }\n\n try{\n $where = implode(' AND ', $where);\n\n // Utils::debug($where);\n\n $model = $this->model;\n $this->recordNumber = $this->dbo->count($this->table, $where, $this->binds, $this->refField, $this->group);\n\n // Get the number of the page\n if($this->lines == self::ALL_LINES) {\n $this->lines = $this->recordNumber ? $this->recordNumber : 1;\n }\n\n if($this->page > 1 && $this->page > ceil($this->recordNumber / $this->lines)) {\n $this->page = (ceil($this->recordNumber / $this->lines) > 0) ? ceil($this->recordNumber / $this->lines) : 1;\n }\n\n $this->start = ($this->page - 1) * $this->lines;\n\n // Get the data from the database\n $request = array(\n 'fields' => $fields,\n 'from' => $this->table,\n 'where' => $where,\n 'binds' => $this->binds,\n 'orderby' => $this->sorts,\n 'group' => $this->group,\n 'start' => $this->start,\n 'limit' => $this->lines,\n 'index' => $this->refAlias,\n 'return' => $this->model,\n );\n\n $this->results = $this->dbo->select($request);\n\n return $this->results;\n }\n catch(DBException $e){\n exit(DEBUG_MODE ? $e->getMessage() : Lang::get('main.list-error'));\n }\n\n }", "title": "" }, { "docid": "008754cccabda0bee8e7c18dc8f3b643", "score": "0.55900866", "text": "public function find($value){\n $query = \"SELECT * FROM employee WHERE CONCAT(full_name, ' ',email, ' ',designation, ' ') LIKE :value\";\n $run = $this->conn->prepare($query);\n // Short Way to Bind Value\n $run->execute(array(\"value\"=>\"%\".$value.\"%\"));\n $searched_data = $run->fetchAll(PDO::FETCH_ASSOC);\n // $searched_data['Status Code'] = 200;\n return $searched_data;\n }", "title": "" }, { "docid": "77fe7dd79dec6dfdb38a0de2c5b6dd6b", "score": "0.558422", "text": "function basic_search($dbh) {\n if (isset($_POST['criteria']) ) {\n\n $search_by = $_POST['criteria'];\n $search_term = $_POST['search_term'];\n\n //search using keyword (recipe name)\n if ($search_by == 'keyword') {\n $sql = \"SELECT RID, name, time FROM recipe WHERE name LIKE ?\";\n $values = array(\"%\".$search_term.\"%\");\n\n // search using time in minutes less than or equal to search term\n } else if ($search_by == 'time') {\n $sql = \"SELECT RID, name, time FROM recipe WHERE time <= ?\";\n $values = array($search_term); \n\n // search using ingredient name\n } else if ($search_by == 'ingredient') {\n $sql = \"SELECT RID, recipe.name, time FROM recipe, ingredient \n WHERE ingredient.name LIKE ? AND RID = recipeID\";\n $values = array(\"%\".$search_term.\"%\");\n\n // search using equipment name\n } else if ($search_by == 'equipment') {\n $sql = \"SELECT RID, recipe.name, time FROM recipe, equipment \n WHERE equipment.name LIKE ? AND RID = recipeID\";\n $values = array(\"%\".$search_term.\"%\");\n } \n \n $resultset = prepared_query($dbh,$sql,$values);\n $num_rows = $resultset->numRows();\n $resultURL = \"recipe.php\"; //$_SERVER['PHP_SELF'];\n\n echo \"<p>$num_rows results found.\";\n while($row = $resultset->fetchRow(MDB2_FETCHMODE_ASSOC)) {\n $RID = $row['RID'];\n $name = $row['name'];\n $time = $row['time'];\n echo \"<p><a href='$resultURL?RID=$RID' id='recipelink'>$name</a> $time minutes\\n\";\n }\n }\n }", "title": "" }, { "docid": "16609a770d9863fe956935f893ef42ee", "score": "0.5581404", "text": "public static function search();", "title": "" }, { "docid": "cf03c9e16a4d621c89102ea72714f4e3", "score": "0.55298555", "text": "function search()\n\t{\n\t\t$search=$this->input->post('search');\n\t\t$data_rows=get_people_manage_table_data_rows($this->Customer->search($search),$this);\n\t\techo $data_rows;\n\t}", "title": "" }, { "docid": "d9102fdc1eb19c27188f8fc7b5a26e81", "score": "0.55109835", "text": "abstract public function query();", "title": "" }, { "docid": "856712cdce25905fc4aacb787ad97159", "score": "0.5510919", "text": "public function searchDetails()\n {\n $SQL = array();\n\n $thisTable = $this->options->tableValue[0];\n\n //setup the from clause\\\n $from = \"\n FROM {$this->options->_dbName}.{$thisTable} c\n LEFT JOIN mhcdynad.mhc_locations l ON l.id = c.instanceID\n LEFT JOIN mhcdynad.mhc_regions r ON r.id = l.regionID\n LEFT JOIN mhcdynad.mhc_districts d ON d.id = r.districtID\n LEFT JOIN mhcdynad.mhc_locationType lt ON lt.id = d.locationTypeID\n \";\n\n //setup the wher clause\n $where = \"\n WHERE monthYear BETWEEN :begDate AND :endDate\n AND\n \";\n\n //sanitize the locationValue\n if (!empty($this->options->locationValue[0])) {\n switch ($this->options->type) {\n case 'account':\n array_walk_recursive($this->options->locationValue, array(&$this, 'only_ints'));\n $where .= \" c.accountID IN (\" . implode(', ', $this->options->locationValue) . \") \";\n break;\n\n case 'division':\n array_walk_recursive($this->options->locationValue, array(&$this, 'only_ints'));\n $where .= \" lt.id IN (\" . implode(', ', $this->options->locationValue) . \") \";\n break;\n\n case 'district':\n array_walk_recursive($this->options->locationValue, array(&$this, 'only_ints'));\n $where .= \" d.id IN (\" . implode(', ', $this->options->locationValue) . \") \";\n break;\n\n case 'region':\n array_walk_recursive($this->options->locationValue, array(&$this, 'only_ints'));\n $where .= \" r.id IN (\" . implode(', ', $this->options->locationValue) . \") \";\n break;\n\n case 'location':\n array_walk_recursive($this->options->locationValue, array(&$this, 'singleQuote'));\n $where .= \" l.locationID IN (\" . implode(', ', $this->options->locationValue) . \") \";\n break;\n\n case 'phonenumber':\n array_walk_recursive($this->options->locationValue, array(&$this, 'only_ints'));\n $where .= \" c.phone IN (\" . implode(', ', $this->options->locationValue) . \") \";\n break;\n }\n } else {\n $where .= 1;\n }\n\n switch ($thisTable) {\n case self::ACTS:\n $SQL = \"\n SELECT\n 'Account ID',\n 'Instance ID',\n 'Location ID',\n 'District',\n 'Region',\n 'Month',\n 'Year',\n 'SFID',\n 'Device Category',\n 'Device ID',\n 'Bucket ID',\n 'Bucket Description',\n 'Customer Name',\n 'Phone',\n 'Vision Code',\n 'Price Plan',\n 'Contract Length',\n 'Contract Date',\n 'Phone Description',\n 'Commission Amount',\n 'Additional Commission',\n 'Spiff',\n 'Coop',\n 'Tier Bonus',\n 'Purchased Receivable',\n 'Edge Service Fee',\n 'Estimated Commission Payout',\n 'Estimated Additional Commission Payout',\n 'Estimated Spiff Payout',\n 'Estimated Coop Payout',\n 'Estimated Tier Bonus Payout',\n 'Estimated Platinum Bonus Payout',\n 'Estimated Employee Payout',\n 'Estimated Purchased Receivable Payout',\n 'Estimated Edge Service Fee Payout',\n 'Unknown Bucket'\n UNION ALL\n\n SELECT\n c.accountID,\n c.instanceID,\n c.locationID,\n d.district,\n r.region,\n c.month,\n c.year,\n c.sfid,\n c.deviceCategory,\n c.deviceID,\n c.bucketID,\n b.description,\n c.customerName,\n c.phone,\n c.visionCode,\n c.pricePlan,\n c.contractLength,\n DATE_FORMAT(contractDate, '%m/%d/%Y'),\n c.phoneDescription,\n c.commissionAmount,\n c.additionalCommission,\n c.spiff,\n c.coop,\n c.tierBonus,\n c.purchasedReceivable,\n c.edgeServiceFee * -1,\n c.estimatedCommissionPayout,\n c.estimatedAdditionalCommissionPayout,\n c.estimatedSpiffPayout,\n c.estimatedCoopPayout,\n c.estimatedTierBonusPayout,\n c.estimatedPlatinumBonusPayout,\n c.estimatedEmployeePayout,\n c.estimatedPurchasedReceivablePayout,\n c.estimatedEdgeServiceFeePayout * -1,\n c.isUnknownBucket\n $from\n LEFT JOIN {$this->options->_dbName}.buckets b USING (bucketID)\n $where\n \";\n break;\n\n case self::DEACTS:\n $SQL = \"\n SELECT\n 'Account ID',\n 'Instance ID',\n 'Location ID',\n 'District',\n 'Region',\n 'Month',\n 'Year',\n 'SFID',\n 'Device Category',\n 'Device ID',\n 'Bucket ID',\n 'Bucket Description',\n 'Price Plan',\n 'Days of Service',\n 'CustomerName',\n 'Phone',\n 'Vision Code',\n 'Phone Description',\n 'Contract Length',\n 'Contract Date',\n 'Deact Date',\n 'Commission Amount',\n 'Additional Commission',\n 'Spiff',\n 'Coop',\n 'Tier Bonus',\n 'Purchased Receivable',\n 'Edge Service Fee',\n 'Estimated Commission Payout',\n 'Estimated Additional Commission Payout',\n 'Estimated Spiff Payout',\n 'Estimated Coop Payout',\n 'Estimated Tier Bonus Payout',\n 'Estimated Platinum Bonus Payout',\n 'Estimated Employee Payout',\n 'Estimated Purchased Receivable Payout',\n 'Estimated Edge Service Fee Payout',\n 'Unknown Bucket',\n 'Orphaned Deactivation'\n\n UNION ALL\n\n SELECT\n c.accountID,\n c.instanceID,\n c.locationID,\n d.district,\n r.region,\n c.month,\n c.year,\n c.sfid,\n c.deviceCategory,\n c.deviceID,\n c.bucketID,\n b.description,\n c.pricePlan,\n c.daysOfService,\n c.customerName,\n c.phone,\n c.visionCode,\n c.phoneDescription,\n c.contractLength,\n DATE_FORMAT(c.contractDate, '%m/%d/%Y'),\n DATE_FORMAT(c.deactDate, '%m/%d/%Y'),\n c.commissionAmount * -1,\n c.additionalCommission * -1,\n c.spiff * -1,\n c.coop * -1,\n c.tierBonus * -1,\n c.purchasedReceivable * -1,\n c.edgeServiceFee,\n c.estimatedCommissionPayout * -1,\n c.estimatedAdditionalCommissionPayout * -1,\n c.estimatedSpiffPayout * -1,\n c.estimatedCoopPayout * -1,\n c.estimatedTierBonusPayout * -1,\n c.estimatedPlatinumBonusPayout * -1,\n c.estimatedEmployeePayout * -1,\n c.estimatedPurchasedReceivablePayout * -1,\n c.estimatedEdgeServiceFeePayout,\n c.isUnknownBucket,\n c.isOrphanDeact\n $from\n LEFT JOIN {$this->options->_dbName}.buckets b USING (bucketID)\n $where\n \";\n break;\n\n case self::FEATURES:\n $SQL = \"\n SELECT\n 'Account ID',\n 'Instance ID',\n 'Location ID',\n 'District',\n 'Region',\n 'Month',\n 'Year',\n 'SFID',\n 'Customer Name',\n 'Phone',\n 'Device Category',\n 'Device ID',\n 'Price Plan',\n 'Vision Code',\n 'Feature ID',\n 'Plan Name',\n 'Contract Date',\n 'Commission Amount',\n 'Spiff'\n\n UNION ALL\n\n SELECT\n c.accountID,\n c.instanceID,\n c.locationID,\n d.district,\n r.region,\n c.month,\n c.year,\n c.sfid,\n c.customerName,\n c.phone,\n c.deviceCategory,\n c.deviceID,\n c.pricePlan,\n c.visionCode,\n c.featureID,\n c.planName,\n DATE_FORMAT(c.contractDate, '%m/%d/%Y'),\n c.commissionAmount,\n c.spiff\n $from\n $where\n \";\n break;\n\n case self::FEATURES_CHARGEDBACK:\n $SQL = \"\n SELECT\n 'Account ID',\n 'Instance ID',\n 'Location ID',\n 'District',\n 'Region',\n 'Month',\n 'Year',\n 'SFID',\n 'Vision Code',\n 'Feature ID',\n 'Plan Name',\n 'Price Plan',\n 'Customer Name',\n 'Phone',\n 'Device Category',\n 'Device ID',\n 'Contract Date',\n 'Deact Date',\n 'Commission Amount',\n 'Spiff'\n\n UNION ALL\n\n SELECT\n c.accountID,\n c.instanceID,\n c.locationID,\n d.district,\n r.region,\n c.month,\n c.year,\n c.sfid,\n c.visionCode,\n c.featureID,\n c.planName,\n c.pricePlan,\n c.customerName,\n c.phone,\n c.deviceCategory,\n c.deviceID,\n DATE_FORMAT(c.contractDate, '%m/%d/%Y'),\n DATE_FORMAT(c.deactDate, '%m/%d/%Y'),\n c.commissionAmount*-1,\n c.spiff * -1\n $from\n $where\n \";\n break;\n\n case self::REACTS:\n $SQL = \"\n SELECT\n 'Account ID',\n 'Instance ID',\n 'Location ID',\n 'District',\n 'Region',\n 'Month',\n 'Year',\n 'SFID',\n 'Device Category',\n 'Device ID',\n 'Bucket ID',\n 'Bucket Description',\n 'Customer Name',\n 'Phone',\n 'Vision Code',\n 'Code',\n 'Price Plan',\n 'Contract Length',\n 'Contract Date',\n 'Reactivation Date',\n 'Commission Amount',\n 'Additional Commission',\n 'Spiff',\n 'Coop',\n 'Tier Bonus',\n 'Purchased Receivable',\n 'Edge Service Fee',\n 'Estimated Commission Payout',\n 'Estimated Additional Commission Payout',\n 'Estimated Spiff Payout',\n 'Estimated Coop Payout',\n 'Estimated Tier Bonus Payout',\n 'Estimated Platinum Bonus Payout',\n 'Estimated Employee Payout',\n 'Estimated Purchased Receivable',\n 'Estimated Edge Service Fee',\n 'Unknown Bucket'\n\n UNION ALL\n\n SELECT\n c.accountID,\n c.instanceID,\n c.locationID,\n d.district,\n r.region,\n c.month,\n c.year,\n c.sfid,\n c.deviceCategory,\n c.deviceID,\n c.bucketID,\n b.description,\n c.customerName,\n c.phone,\n c.visionCode,\n c.code,\n c.pricePlan,\n c.contractLength,\n DATE_FORMAT(c.contractDate, '%m/%d/%Y'),\n DATE_FORMAT(c.reactivationDate, '%m/%d/%Y'),\n c.commissionAmount,\n c.additionalCommission,\n c.spiff,\n c.coop,\n c.tierBonus,\n c.purchasedReceivable,\n c.edgeServiceFee * -1,\n c.estimatedCommissionPayout,\n c.estimatedAdditionalCommissionPayout,\n c.estimatedSpiffPayout,\n c.estimatedCoopPayout,\n c.estimatedTierBonusPayout,\n c.estimatedPlatinumBonusPayout,\n c.estimatedEmployeePayout,\n c.estimatedPurchasedReceivablePayout,\n c.estimatedEdgeServiceFeePayout *-1,\n c.isUnknownBucket\n $from\n LEFT JOIN {$this->options->_dbName}.buckets b USING (bucketID)\n $where\n \";\n break;\n\n case self::UPGRADES:\n $SQL = \"\n SELECT\n 'Account ID',\n 'Instance ID',\n 'Location ID',\n 'District',\n 'Region',\n 'Month',\n 'Year',\n 'SFID',\n 'Device Category',\n 'Device ID',\n 'Bucket ID',\n 'Bucket Description',\n 'Vision Code',\n 'Price Plan',\n 'Customer Name',\n 'Phone',\n 'Contract Length',\n 'Upgrade Type',\n 'New ESN Contract Start Date',\n 'Phone Description',\n 'Commission Amount',\n 'Additional Commission',\n 'Spiff',\n 'Purchased Receivable',\n 'Edge Service Fee',\n 'Estimated Commission Payout',\n 'Estimated Additional Commission Payout',\n 'Estimated Spiff Payout',\n 'Estimated Employee Payout',\n 'Estimated Purchased Receivable Payout',\n 'Estimated Edge Service Fee Payout',\n 'Unknown Bucket'\n\n UNION ALL\n\n SELECT\n c.accountID,\n c.instanceID,\n c.locationID,\n d.district,\n r.region,\n c.month,\n c.year,\n c.sfid,\n c.deviceCategory,\n c.deviceID,\n c.bucketID,\n b.description,\n c.visionCode,\n c.pricePlan,\n c.customerName,\n c.phone,\n c.contractLength,\n c.upgradeType,\n DATE_FORMAT(c.new_esn_contractdate_start, '%m/%d/%Y'),\n c.phoneDescription,\n c.commissionAmount,\n c.additionalCommission,\n c.spiff,\n c.purchasedReceivable,\n c.edgeServiceFee * -1,\n c.estimatedCommissionPayout,\n c.estimatedAdditionalCommissionPayout,\n c.estimatedSpiffPayout,\n c.estimatedEmployeePayout,\n c.estimatedPurchasedReceivablePayout,\n c.estimatedEdgeServiceFeePayout * -1,\n c.isUnknownBucket\n $from\n LEFT JOIN {$this->options->_dbName}.buckets b USING (bucketID)\n $where\n \";\n break;\n\n case self::UPGRADE_DEACTS:\n $SQL = \"\n SELECT\n 'Account ID',\n 'Instance ID',\n 'LocationID',\n 'District',\n 'Region',\n 'Month',\n 'Year',\n 'SFID',\n 'Device Category',\n 'Device ID',\n 'Bucket ID',\n 'Bucket Description',\n 'Vision Code',\n 'Price Plan',\n 'Customer Name',\n 'Phone',\n 'Contract Length',\n 'New ESN Contract Start Date',\n 'Deact Date',\n 'Phone Description',\n 'Commission Amount',\n 'Additional Commission',\n 'Spiff',\n 'Purchased Receivable',\n 'Edge Service Fee',\n 'Estimated Commission Payout',\n 'Estimated Additional Commission Payout',\n 'Estimated Spiff Payout',\n 'Estimated Employee Payout',\n 'Estimated Purchased Receivable Payout',\n 'Estimated Edge Service Fee Payout',\n 'Unknown Bucket',\n 'Orphaned Deactivation'\n\n UNION ALL\n\n SELECT\n c.accountID,\n c.instanceID,\n c.locationID,\n d.district,\n r.region,\n c.month,\n c.year,\n c.sfid,\n c.deviceCategory,\n c.deviceID,\n c.bucketID,\n b.description,\n c.visionCode,\n c.pricePlan,\n c.customerName,\n c.phone,\n c.contractLength,\n DATE_FORMAT(c.new_esn_contractdate_start, '%m/%d/%Y'),\n DATE_FORMAT(c.deactDate, '%m/%d/%Y'),\n c.phoneDescription,\n c.commissionAmount * -1,\n c.additionalCommission * -1,\n c.spiff * -1,\n c.purchasedReceivable * -1,\n c.edgeServiceFee,\n c.estimatedCommissionPayout * -1,\n c.estimatedAdditionalCommissionPayout * -1,\n c.estimatedSpiffPayout * -1,\n c.estimatedEmployeePayout * -1,\n c.estimatedPurchasedReceivablePayout * -1,\n c.estimatedEdgeServiceFeePayout,\n c.isUnknownBucket,\n c.isOrphanDeact\n $from\n LEFT JOIN {$this->options->_dbName}.buckets b USING (bucketID)\n $where\n \";\n break;\n\n case self::ADJUSTMENTS:\n $SQL = \"\n SELECT\n 'Account ID',\n 'Instance ID',\n 'Location ID',\n 'District',\n 'Region',\n 'Month',\n 'Year',\n 'SFID',\n 'Phone',\n 'Device Category',\n 'Device ID',\n 'Adjustment Description',\n 'Adjustment Amount'\n\n UNION ALL\n\n SELECT\n c.accountID,\n c.instanceID,\n c.locationID,\n d.district,\n r.region,\n c.month,\n c.year,\n c.sfid,\n c.phone,\n c.deviceCategory,\n c.deviceID,\n c.adjustmentDescription,\n c.adjustmentAmount\n $from\n $where\n \";\n break;\n\n case self::DEPOSITS:\n $SQL = \"\n SELECT\n 'Account ID',\n 'Instance ID',\n 'Location ID',\n 'District',\n 'Region',\n 'SFID',\n 'Phone',\n 'Customer Name',\n 'Deposit Date',\n 'Contract Date',\n 'Deposit Amount'\n\n UNION ALL\n\n SELECT\n c.accountID,\n c.instanceID,\n c.locationID,\n d.district,\n r.region,\n c.sfid,\n c.phone,\n c.customerName,\n DATE_FORMAT(c.depositDate, '%m/%d/%Y'),\n DATE_FORMAT(c.contractDate, '%m/%d/%Y'),\n c.depositAmount\n $from\n $where\n \";\n break;\n\n case self::RESIDUALS:\n $SQL = \"\n SELECT\n 'Account ID',\n 'Instance ID',\n 'Location ID',\n 'District',\n 'Region',\n 'SFID',\n 'Company',\n 'Customer Name',\n 'Phone',\n 'Device Category',\n 'Device ID',\n 'Vision Code',\n 'Paid Date',\n 'Contract Date',\n 'Deact Date',\n 'Percent',\n 'Amount',\n 'Residual'\n\n UNION ALL\n\n SELECT\n c.accountID,\n c.instanceID,\n c.locationID,\n d.district,\n r.region,\n c.sfid,\n c.company,\n c.customerName,\n c.phone,\n c.deviceCategory,\n c.deviceID,\n c.visionCode,\n DATE_FORMAT(c.paidDate, '%m/%d/%Y'),\n DATE_FORMAT(c.contractDate, '%m/%d/%Y'),\n DATE_FORMAT(c.deactDate, '%m/%d/%Y'),\n c.percent,\n c.amount,\n c.residual\n $from\n $where\n \";\n break;\n\n case self::CHANGES:\n\n //if phone number, alter behavior\n switch ($this->options->type) {\n case 'phonenumber':\n $where = \"\n WHERE monthYear BETWEEN :begDate AND :endDate\n AND c.old_phone IN (\" . implode(', ', $this->options->locationValue) . \")\n OR c.new_phone IN (\" . implode(', ', $this->options->locationValue) . \")\n \";\n break;\n }\n\n $SQL = \"\n SELECT\n 'Account ID',\n 'Instance ID',\n 'Location ID',\n 'District',\n 'Region',\n 'SFID',\n 'SFID 2',\n 'Company',\n 'Customer Name',\n 'Old Phone',\n 'New Phone',\n 'Old Rate Plan',\n 'New Rate Plan',\n 'Old Account Number',\n 'New Account Number',\n 'Feature',\n 'Feature Desc'\n\n UNION ALL\n\n SELECT\n c.accountID,\n c.instanceID,\n c.locationID,\n d.district,\n r.region,\n c.sfid,\n c.sfid2,\n c.company,\n c.customerName,\n c.old_phone,\n c.new_phone,\n c.old_rate_plan,\n c.new_rate_plan,\n c.old_account_number,\n c.new_account_number,\n c.feature,\n c.feature_desc\n $from\n $where\n \";\n break;\n\n case self::COOP_ACTS:\n $SQL = \"\n SELECT\n 'Account ID',\n 'Instance ID',\n 'Location ID',\n 'District',\n 'Region',\n 'SFID',\n 'Device Category',\n 'Customer Name',\n 'Phone',\n 'Vision Code',\n 'Doc Date',\n 'Commission Amount'\n\n UNION ALL\n\n SELECT\n c.accountID,\n c.instanceID,\n c.locationID,\n d.district,\n r.region,\n c.sfid,\n c.deviceCategory,\n c.customerName,\n c.phone,\n c.visionCode,\n DATE_FORMAT(c.docDate, '%m/%d/%Y'),\n c.commissionAmount\n $from\n $where\n \";\n break;\n\n case self::COOP_DEACTS:\n $SQL = \"\n SELECT\n 'Account ID',\n 'Instance ID',\n 'Location ID',\n 'District',\n 'Region',\n 'SFID',\n 'Device Category',\n 'Customer Name',\n 'Phone',\n 'Vision Code',\n 'Doc Date',\n 'Deact Date',\n 'Commission Amount'\n\n UNION ALL\n\n SELECT\n c.accountID,\n c.instanceID,\n c.locationID,\n d.district,\n r.region,\n c.sfid,\n c.deviceCategory,\n c.customerName,\n c.phone,\n c.visionCode,\n DATE_FORMAT(c.docDate, '%m/%d/%Y'),\n DATE_FORMAT(c.deactDate, '%m/%d/%Y'),\n c.commissionAmount * -1\n $from\n $where\n \";\n break;\n\n default:\n }\n\n $this->file = $this->databaseExportDirectory . '/ccrs_' . time() . '.xls';\n $SQL.=\"\n INTO OUTFILE '{$this->file}'\n FIELDS TERMINATED BY '\\t'\n OPTIONALLY ENCLOSED BY '\\\"'\n LINES TERMINATED BY '\\n'\n \";\n\n $this->detail = $this->_db->query($SQL, array(\n ':begDate' => \"{$this->options->begYear}-{$this->options->begMonth}-1\",\n ':endDate' => \"{$this->options->endYear}-{$this->options->endMonth}-1\"\n ), array(\n 'fetch' => PDO::FETCH_ASSOC\n )\n );\n }", "title": "" }, { "docid": "f3bd915535f62104075ab1ff33d7ae52", "score": "0.55099523", "text": "public function search_person($id, $fname, $sname, $clean = TRUE)\n {\n // if clean is true\n if ($clean)\n {\n // prepare to run sql sentence that gets information out from database\n // via joining two tables\n $stm = $this->prepare(\n \"select p.id, p.fname, p.sname, u.user, u.description from \"\n .\"serverside19_persons as p left join serverside19_users as u \"\n .\"on p.id = u.id \"\n .\"where p.id = ?\"\n .\" or p.fname = ? or p.sname = ?\");\n }\n else \n {\n // using like operator \n $stm = $this->prepare(\n \"select p.id, p.fname, p.sname, u.user, u.description from \"\n .\"serverside19_persons as p left join serverside19_users as u \"\n .\"on p.id = u.id where p.id like ?\"\n .\" or p.fname like ? or p.sname like ?\");\n }\n \n $stm->execute([$id, $fname, $sname]);\n // using fetch class from PDO\n $res = $stm->fetchAll(PDO::FETCH_CLASS);\n \n // if res is longer than zero\n if (count($res) > 0)\n {\n return $res;\n }\n else // fail\n {\n return FALSE;\n }\n }", "title": "" }, { "docid": "3c17d3e5826dc2c7877116907952e526", "score": "0.550299", "text": "public function search($searchText, $page){\n $noOfRecords = 5;\n $offset = ($page-1) * $noOfRecords;\n $sqlQuery = \"SELECT *, longitude_camp, latitude_camp\n FROM Camp_records\n LEFT JOIN Camp_details ON Camp_records.id_Camps = Camp_details.id_Camps WHERE country_camp = '$searchText'\n LIMIT $offset, $noOfRecords\";\n\n\n $statement = $this->_dbHandle->prepare($sqlQuery); // prepare a PDO statement\n $statement->execute();\n\n // if ($statement) {\n // echo \"It worked\";\n // }else {\n // echo \"statement -search in UserData Set Failed\";\n // }\n\n\n $dataSet = [];\n while ($row = $statement->fetch()) {\n $dataSet[] = new CampData($row);\n }\n //var_dump($dataSet);\n return $dataSet;\n\n\n }", "title": "" }, { "docid": "8008f76a3cfcb6adb208f7c99a7e7ab9", "score": "0.5499807", "text": "public function show_admitted_patients_by_Doc(){\n\t\t\t$sid=$_SESSION[\"id\"];\n\t\t\t//$sid=\"DOC-001\";\n\t\t\t$sql=\"SELECT Patient.PID, Patient.Name as PName, Patient.Sex, Patient.Disease, Patient.Phone, \"; \n\t\t\t$sql.=\"employee.Name, admitted_patient.Ad_Date, admitted_patient.Rel_Date, \"; \n\t\t\t$sql.=\"admitted_patient.Word_No \";\n\t\t\t$sql.=\"from treats, Patient, Employee, admitted_patient, reciptionist \"; \n\t\t\t$sql.=\"where patient.PID=treats.T_Patient and \"; \n\t\t\t$sql.=\"patient.PID=admitted_patient.idAdmitted_Patient \";\n\t\t\t$sql.=\"AND treats.T_DOCID='{$sid}' AND \";\n\t\t\t$sql.=\"Patient.idServedRecep=Reciptionist.idReciptionist and \"; \n\t\t\t$sql.=\" employee.EID=Reciptionist.idReciptionist GROUP BY PID\";\n\t\t\t$result=$this->perform_query($sql);\n\t\t\t\n\t\t\t$arr=array();\n\t\t\t$i=0;\n\n\t\t\twhile($row=mysqli_fetch_assoc($result)){\n\t\t\t\t$arr[\"PID\"][$i]=$row[\"PID\"];\n\t\t\t\t$arr[\"PName\"][$i]=$row[\"PName\"];\n\t\t\t\t$arr[\"Sex\"][$i]=$row[\"Sex\"];\n\t\t\t\t$arr[\"Disease\"][$i]=$row[\"Disease\"];\n\t\t\t\t$arr[\"Phone\"][$i]=$row[\"Phone\"];\n\t\t\t\t$arr[\"Name\"][$i]=$row[\"Name\"];\n\t\t\t\t$arr[\"Ad_Date\"][$i]=$row[\"Ad_Date\"];\n\t\t\t\t$arr[\"Rel_Date\"][$i]=$row[\"Rel_Date\"];\n\t\t\t\t$arr[\"Word_No\"][$i]=$row[\"Word_No\"];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t\n\t\t\treturn $arr;\n\n\t\t}", "title": "" }, { "docid": "c4acc6f153c503a4a1bf557edfb5ca52", "score": "0.5498076", "text": "public function query_person_matched_records()\r\n {\r\n // \r\n // Note that the meaning of \"match the person from the query\" means \"Pipl \r\n // is convinced that these records hold data about the person you're \r\n // looking for\". \r\n // Remember that when Pipl is convinced about which person you're looking \r\n // for, the response also contains a Person object. This person is \r\n // created by merging all the fields and sources of these records. \r\n $this->records = array_filter($this->records, create_function('$rec', 'return $rec->query_params_match == 1.0;'));\r\n }", "title": "" }, { "docid": "744bdc666a25d82dc89202a79e138261", "score": "0.54853535", "text": "public function search() {\n }", "title": "" }, { "docid": "c711428e2438aee5f8d5215458c07733", "score": "0.5484871", "text": "public function showPatient()\n {\n $dbh = $this->connectDatabase();\n $fetch = $dbh->query('SELECT * FROM `patients`')->fetchAll(PDO::FETCH_ASSOC);\n return $fetch;\n }", "title": "" }, { "docid": "a1555a1b2ce21a8fc82c10d2fd42a9fd", "score": "0.54740393", "text": "public function findSQL($searchSql='', array $searchValues=array());", "title": "" }, { "docid": "3573a7ba58b7b7e22183276be14bc76a", "score": "0.54554754", "text": "function getVisitsByPatient($patient_id){\n global $dbh;\n $query = \"SELECT * FROM Visit WHERE patient_id = '$patient_id' ORDER BY visit_date\";//.intval($patient_id) ;\n $result = $dbh->query($query);\n $result = $result->fetchAll();\n return $result;\n \n }", "title": "" }, { "docid": "8183ab3ca65d43a83a808f04ce4da4f2", "score": "0.5455327", "text": "public function search()\n\t{\n return UnhlsPatient::search(Input::get('text'))->take(Config::get('kblis.limit-items'))->get()->toJson();\n\t}", "title": "" }, { "docid": "514a96ee78412337d78c87b6f40d4421", "score": "0.5452397", "text": "protected function get_patients($term)\n {\n return Patient::where('email', 'LIKE', '%' . $term . '%')->cursor();\n }", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.54509825", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.54509825", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.54509825", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.54509825", "text": "public function query();", "title": "" }, { "docid": "d93528f2558abdc3d12c199c4b75cb65", "score": "0.5417035", "text": "function getAllUser( $sw ) {\n // print_r($sw);\n $Pre = $_SESSION['pre'];\n if ( !$sw[0] ) {\n $where = \"workphone like '\".$_SESSION['pre'].$sw[1].\"%' or homephone like '\".$_SESSION['pre'].$sw[1].\"%' \";\n }\n else {\n $where = \"(name ilike '\".$sw[1].\"%') or (login ilike '\".$sw[1].\"%')\";\n }\n $sql = \"select * from employee where $where and employee.deleted = false\";\n $rs = $GLOBALS['dbh']->getAll( $sql );\n if ( !$rs ) {\n $rs = false;\n }\n return $rs;\n}", "title": "" }, { "docid": "2a6dac7b7aea24b0d9fd1ce338f3ba4a", "score": "0.54145074", "text": "protected function localIMDBsearch()\n\t{\n\t\t$query = 'SELECT imdbid FROM movieinfo';\n\t\t$andYearIn = '';\n\n\t\t//If we found a year, try looking in a 4 year range.\n\t\tif ($this->currentYear !== false) {\n\t\t\t$start = (int) $this->currentYear - 2;\n\t\t\t$end = (int) $this->currentYear + 2;\n\t\t\t$andYearIn = 'AND year IN (';\n\t\t\twhile ($start < $end) {\n\t\t\t\t$andYearIn .= $start . ',';\n\t\t\t\t$start++;\n\t\t\t}\n\t\t\t$andYearIn .= $end . ')';\n\t\t}\n\t\t$IMDBCheck = $this->pdo->queryOneRow(\n\t\t\tsprintf('%s WHERE title %s %s', $query, $this->pdo->likeString($this->currentTitle), $andYearIn));\n\n\t\t// Look by %word%word%word% etc..\n\t\tif ($IMDBCheck === false) {\n\t\t\t$pieces = explode(' ', $this->currentTitle);\n\t\t\t$tempTitle = '%';\n\t\t\tforeach ($pieces as $piece) {\n\t\t\t\t$tempTitle .= str_replace(array(\"'\", \"!\", '\"'), '', $piece) . '%';\n\t\t\t}\n\t\t\t$IMDBCheck = $this->pdo->queryOneRow(\n\t\t\t\tsprintf(\"%s WHERE replace(replace(title, \\\"'\\\", ''), '!', '') %s %s\",\n\t\t\t\t\t$query, $this->pdo->likeString($tempTitle), $andYearIn\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t// Try replacing er with re ?\n\t\tif ($IMDBCheck === false) {\n\t\t\t$tempTitle = str_replace('er', 're', $this->currentTitle);\n\t\t\tif ($tempTitle !== $this->currentTitle) {\n\t\t\t\t$IMDBCheck = $this->pdo->queryOneRow(\n\t\t\t\t\tsprintf('%s WHERE title %s %s',\n\t\t\t\t\t\t$query, $this->pdo->likeString($tempTitle), $andYearIn\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// Final check if everything else failed.\n\t\t\t\tif ($IMDBCheck === false) {\n\t\t\t\t\t$pieces = explode(' ', $tempTitle);\n\t\t\t\t\t$tempTitle = '%';\n\t\t\t\t\tforeach ($pieces as $piece) {\n\t\t\t\t\t\t$tempTitle .= str_replace(array(\"'\", \"!\", '\"'), \"\", $piece) . '%';\n\t\t\t\t\t}\n\t\t\t\t\t$IMDBCheck = $this->pdo->queryOneRow(\n\t\t\t\t\t\tsprintf(\"%s WHERE replace(replace(replace(title, \\\"'\\\", ''), '!', ''), '\\\"', '') %s %s\",\n\t\t\t\t\t\t\t$query, $this->pdo->likeString($tempTitle), $andYearIn\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 (\n\t\t($IMDBCheck === false\n\t\t\t? false\n\t\t\t: (is_numeric($IMDBCheck['imdbid'])\n\t\t\t\t? (int)$IMDBCheck['imdbid']\n\t\t\t\t: false\n\t\t\t)\n\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "9204323c0ae6b8585d0c69037b9d45b2", "score": "0.54142946", "text": "public function search()\n {\n $search = $this->input->post('search');\n $data_rows = get_people_manage_table_data_rows($this->Customer->search($search), $this);\n echo $data_rows;\n }", "title": "" }, { "docid": "f9ed6451c19f4e8e7aff64c58e378155", "score": "0.5405878", "text": "public function findPataients($data) {\n \n $this->PatientServiceTeams = TableRegistry::get('PatientServiceTeams');\n $this->HospitalsEmployees = TableRegistry::get('HospitalsEmployees');\n $this->PatientsBed = TableRegistry::get('PatientsBed');\n \n $serviceTeamCond = [];\n \n $conditions['AND']['Patients.status'] = 1;\n $conditions['AND']['Patients.discharge !='] = 1;\n \n if(!empty($data['hospital_id']) && $data['hospital_id'] > 0) {\n $conditions['AND']['Patients.hospital_id'] = $data['hospital_id'];\n }\n \n $empoyeepatientLists = [];\n if(!empty($data['employee_id'])) {\n $this->EmployeesPatients = TableRegistry::get('EmployeesPatients');\n $empoyeepatientLists = $this->EmployeesPatients->find('list', ['keyField' => 'id','valueField' =>'patient_id'])->where([ 'employee_id' => $data['employee_id'], 'is_deleted' => 0 ])->toArray(); \n if(!empty($empoyeepatientLists)) {\n $conditions['AND']['Patients.id NOT IN'] = array_values($empoyeepatientLists);\n }else{\n $hospitalEmployees = $this->HospitalsEmployees->find('list', ['keyField' => 'service_team_id','valueField' =>'service_team_id'])->where([ 'employee_id' => $data['employee_id']])->toArray(); \n if(!empty($hospitalEmployees)){\n $patientServiceTeams = $this->PatientServiceTeams->find('list', ['keyField' => 'id','valueField' =>'patient_id'])->where([ 'service_team_id IN' => array_values($hospitalEmployees)])->toArray(); \n if(!empty($patientServiceTeams)){\n $conditions['AND']['Patients.id NOT IN'] = array_values($patientServiceTeams);\n }\n }\n }\n }\n \n if(!empty($data['service_team_id']) && $data['service_team_id'] > 0) {\n $patientLists = $this->PatientServiceTeams->find('list', ['keyField' => 'id','valueField' =>'patient_id'])->where(['service_team_id' => $data['service_team_id']])->toArray();\n if(!empty($patientLists)) {\n $patientLists = array_values($patientLists);\n $mainArr = !empty($empoyeepatientLists) ? array_values(array_unique(array_merge($patientLists, $empoyeepatientLists))) : array_values($patientLists);\n $conditions['AND']['Patients.id NOT IN'] = $mainArr;\n }\n }\n \n if(!empty($data['search_param'])) {\n $search = $data['search_param'];\n if($data['type'] == 1) { \n $search = explode(' ', $search);\n \n $firstname = '';\n $lastname = '';\n \n if(!empty($search[0])) {\n $firstname = $search[0];\n }\n \n if(!empty($search[1])) {\n $lastname = $search[1];\n } else {\n $lastname = $firstname;\n }\n \n $conditions['OR']['Patients.firstname LIKE'] = '%'.$firstname.'%';\n $conditions['OR']['Patients.lastname LIKE'] = '%'.$lastname.'%';\n } elseif ($data['type'] == 2) {\n $roomBed = explode('-', $search);\n\n $this->HospitalBeds = TableRegistry::get('HospitalBeds');\n $hospitalBeds = $this->HospitalBeds->find('list', ['keyField' => 'id','valueField' =>'id'])->where([ 'HospitalBeds.room_number' => $roomBed[0],'HospitalBeds.bed_number' => $roomBed[1]])->toArray();\n \n if(!empty($hospitalBeds)){\n \n $patientsBed = $this->PatientsBed->find('list', ['keyField' => 'id','valueField' =>'patient_id'])->where([ 'PatientsBed.hospital_bed_id IN' => $hospitalBeds])->toArray();\n }\n\n if(!empty($patientsBed)) {\n $conditions['AND']['Patients.id IN'] = array_values($patientsBed);\n } else {\n $conditions['AND']['Patients.id'] = 0;\n }\n \n } elseif ($data['type'] == 3) {\n\n $this->Floors = TableRegistry::get('Floors');\n $floors = $this->Floors->find('list', ['keyField' => 'id','valueField' =>'id'])->where([ 'LOWER(Floors.name)' => strtolower($search)])->toArray();\n if(!empty($floors)){\n $this->HospitalBeds = TableRegistry::get('HospitalBeds');\n $hospitalBeds = $this->HospitalBeds->find('list', ['keyField' => 'id','valueField' =>'id'])->where([ 'HospitalBeds.floor_id IN' => $floors])->toArray();\n }\n if(!empty($hospitalBeds)){\n \n $patientsBed = $this->PatientsBed->find('list', ['keyField' => 'id','valueField' =>'patient_id'])->where([ 'PatientsBed.hospital_bed_id IN' => $hospitalBeds])->toArray();\n }\n if(!empty($patientsBed)) {\n $conditions['AND']['Patients.id IN'] = array_values($patientsBed);\n } else {\n $conditions['AND']['Patients.id'] = 0;\n }\n } elseif ($data['type'] == 4) {\n if(isset($search)){\n $conditions['AND']['ServiceTeams.name LIKE'] = '%'.strtolower($search).'%';\n }\n \n }\n }\n \n \n $result = $this->find('all')\n ->select([\n 'id',\n 'firstname',\n 'lastname',\n 'photo',\n 'mrn',\n 'room',\n 'bed',\n 'group_id',\n 'ServiceTeams.name',\n 'ServiceTeams.id'\n ])\n ->join(\n [\n 'PatientServiceTeams' => [\n 'table' => 'patient_service_teams',\n 'type' => 'LEFT',\n 'conditions' => 'PatientServiceTeams.patient_id = patients.id',\n ],\n 'ServiceTeams' => [\n 'table' => 'service_teams',\n 'type' => 'LEFT',\n 'conditions' => 'ServiceTeams.id = PatientServiceTeams.service_team_id',\n ]\n ]) \n ->where($conditions)\n ->toArray();\n \n $patients = [];\n if(!empty($result)) {\n $i = 0;\n foreach ($result as $key => $val) {\n \n $patients[$i]['id'] = $val->id;\n $patients[$i]['name'] = $val->full_name;\n $patients[$i]['photo'] = Configure::read('DEFAULT_PATIENT_IMAGE_URL');\n $patients[$i]['mrn'] = $val->mrn;\n $patients[$i]['group_id'] = $val->group_id;\n $bedData = $this->PatientsBed->getPatientsBed($val->id);\n $patients[$i]['floor'] = (!empty($bedData[\"floor_name\"])) ? $bedData[\"floor_name\"] : '';\n $patients[$i]['bed'] = (!empty($bedData[\"room_number\"]) && !empty($bedData[\"bed_number\"])) ? $bedData[\"room_number\"].'-'.$bedData[\"bed_number\"] : ( !empty($bedData[\"room_number\"]) ? $bedData[\"room_number\"] : (!empty($bedData[\"bed_number\"]) ? $bedData[\"bed_number\"] : ''));\n $patients[$i]['bed status'] = (!empty($bedData[\"status\"])) ? $bedData[\"status\"] : '';\n $patients[$i]['service_team_id'] = isset($val->ServiceTeams[\"id\"]) && !empty($val->ServiceTeams[\"id\"]) ? $val->ServiceTeams[\"id\"] : \"\";\n $patients[$i]['service_team'] = isset($val->ServiceTeams[\"name\"]) && !empty($val->ServiceTeams[\"name\"]) ? $val->ServiceTeams[\"name\"] : \"\";\n $i++;\n }\n }\n \n return $patients;\n }", "title": "" }, { "docid": "59bbfec0af3f07a07869a5b7a31acd04", "score": "0.5404496", "text": "function BuscarExamenesporSubServicio($query_search)\r\n {\r\n //creamos el objeto $con a partir de la clase ConexionBD\r\n\t $con = new ConexionBD;\r\n\t //usamos el metodo conectar para realizar la conexion\r\n\t if($con->conectar()==true){\r\n\t $query = $query_search;\r\n\t $result = @pg_query($query);\r\n\t if (!$result)\r\n\t\t return false;\r\n\t else\r\n\t\t return $result;\r\n\t } \r\n\r\n }", "title": "" }, { "docid": "1579e8d1ddeba72ca2015620f747ae29", "score": "0.53955114", "text": "public function search($parameters = array()){\n $res=Fdb::search($parameters);\n if ($res){for ($i=0; $i<count($res);$i++){\n $res[$i]->set_schema(FMappa::string_to_mappa($res[$i]->modello)); unset ($res[$i]->modello);} }\n return $res;}", "title": "" }, { "docid": "509920c916aeb3db1a0d55c5c4dc6b94", "score": "0.53903127", "text": "function SEARCH()\n{\n $sql = \"select * from CLASH \";\n\n // si se produce un error en la busqueda mandamos el mensaje de error en la consulta\n if (!($resultado = $this->bd->query($sql))){\n\t\treturn 'Error en la consulta sobre la base de datos';\n\t}\n else{ // si la busqueda es correcta devolvemos el recordset resultado\n\t\treturn $resultado;\n\t}\n\n\n}", "title": "" }, { "docid": "fd4a91b4799f774f242d0d26830459ad", "score": "0.53837013", "text": "public function search(){\n $search = Input::get ( 'search' );\n $clients = Client::where('name','LIKE','%'.$search.'%')->orWhere('email','LIKE','%'.$search.'%')->paginate(7);\n if(count($clients) > 0)\n return view('clients/index-client',compact('clients'))->withQuery ( $search );\n else return view ('clients/index-client',compact('clients'))->with('failure_message','No Details found. Try to search again !');\n\n }", "title": "" }, { "docid": "3977da141a397c84725c129962081239", "score": "0.5381552", "text": "function getData ($data) {\n global $conn;\n\n // get data of entered value\n $getData = $conn->prepare(\"SELECT\n id, name\n FROM\n students\n WHERE\n id = ?\n OR\n name LIKE '%$data%'\n LIMIT 7\");\n $getData->execute([$data]);\n if($getData->rowCount() > 0){ // found\n return $getData->fetchAll();\n }else{\n return 0;\n }\n}", "title": "" }, { "docid": "01d8d50b7e81419cc552438ce071e769", "score": "0.53765833", "text": "public function read_search() {\r\n $this->search = htmlspecialchars($this->search);\r\n $has = \"%$this->search%\";\r\n $query =\r\n 'SELECT *\r\n FROM products\r\n WHERE `name` LIKE :has\r\n ORDER BY `name`';\r\n\r\n $stmt = $this->conn->prepare($query);\r\n $stmt->bindParam(':has', $has);\r\n\r\n $stmt->execute();\r\n\r\n return $stmt;\r\n\r\n }", "title": "" }, { "docid": "f9e516d99439b30a99e08359c6164ddd", "score": "0.53652036", "text": "public function findByPatient(Patient $patient)\n {\n return $this->findBy(array(\n 'patient' => $patient->getId()\n ));\n }", "title": "" }, { "docid": "d1f89f5fb73c3313e00aa2bbe3abe129", "score": "0.5361778", "text": "function searchEmployee($tableName,$Name,$CNIC){\r\n $conn = self::build_connection();\r\n $N = \"'$Name'\";\r\n $C = \"'$CNIC'\";\r\n $q = \"select * from $tableName where CNIC = $C and Name = $N\";\r\n $result = $conn->query($q);\r\n if ($result->num_rows > 0){\r\n $output = $result->fetch_assoc();\r\n }else{\r\n $output = array('Message' => 'No Employee Match :','status'=>'204');\r\n }\r\n self::close_connection($conn);\r\n return $output;\r\n }", "title": "" }, { "docid": "98d9ba52fdf92c1f6d76a7a834ca9b5e", "score": "0.5360745", "text": "public function show_by_patient($id)\n {\n return $test= Test::where('patient_id',$id)->get();\n\n }", "title": "" }, { "docid": "fe89c2982aa83b1223c4b49c074779c6", "score": "0.53584045", "text": "function sqlCreate($search_str,$table){\r\nreturn \"select * from $table where gene_symble='$search_str' or gene_des like '%$search_str%'\";\r\n\r\n}", "title": "" }, { "docid": "f8c14e8c9b2f130f0c25d12e38103180", "score": "0.5352631", "text": "public function search() {\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\n\t\t$this->title = \"Search land \";\n\t\t$this->list = $this->Results();\t\r\n return $this->renderWith(array('Land_results', 'App'));\r\n }", "title": "" }, { "docid": "745a9a98c647e6730424c1fb425c9def", "score": "0.5339826", "text": "function search($keywords){\n \n // Query sql\n $query = \"SELECT * FROM \".$this->table . \" WHERE judul LIKE ?\";\n \n // Prepare statement\n $stmt = $this->koneksi->prepare($query);\n \n // Sanitize isi\n $keywords=htmlspecialchars(strip_tags($keywords));\n $keywords = \"%{$keywords}%\";\n \n // Bind isi\n $stmt->bindParam(1, $keywords);\n \n // Eksekusi query\n $stmt->execute();\n \n // Kembalikan nilai statement atau hasil eksekusi\n return $stmt;\n }", "title": "" }, { "docid": "2b951009a8106f01c8fb99984ce1f3ef", "score": "0.53379714", "text": "function search()\n {\n $query = \"SELECT * FROM \". $this->table_name .\" WHERE id = ?\";\n \n //preparazione query\n $stmt = $this->conn->prepare($query);\n \n // controllo sui caratteri da inserire nella query\n $this->id=htmlspecialchars(strip_tags($this->id));\n // inserimento variabili nella query\n $stmt->bindParam(1, $this->id);\n \n //esecuzione\n $stmt->execute();\n \n //ricezione parametri da restuire\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //inserimento parametri nella risposta\n $this->id = $row['id'];\n $this->descrizione = $row['descrizione'];\n $this->datazione = $row['datazione'];\n $this->luogo_rit = $row['luogo_rit'];\n $this->data_rit = $row['data_rit'];\n //$this->img = $row['img'];\n }", "title": "" }, { "docid": "f8f628fe9030b3c04783651f5e0eacdc", "score": "0.53005916", "text": "public function search()\n {\n }", "title": "" }, { "docid": "f8f628fe9030b3c04783651f5e0eacdc", "score": "0.53005916", "text": "public function search()\n {\n }", "title": "" }, { "docid": "ee5f280b2ae4631fa0e2250b2f7d3808", "score": "0.5296163", "text": "public function get_search()\n\t{\n\t\t// Capture the input criteria\n\t\t// \n\t\t$criteria = Input::query('criteria', function(){ return ''; });\n\n\t\t// Decode the criteria\n\t\t// \n\t\t$criteria = urldecode( $criteria );\n\n\t\t// Search the MSDS database\n\t\t// \n\t\t$search_results = Msds::where(function($where) use($criteria){\n\t\t\t$where->where('name', \t\t'like', \"%{$criteria}%\");\n\t\t\t$where->or_where('synonym', 'like', \"%{$criteria}%\");\n\t\t\t$where->where('active', '=', 1);\n\t\t})->get();\n\n\t\t// Return the results\n\t\t// \n\t\treturn Response::eloquent( $search_results );\n\t}", "title": "" }, { "docid": "02e25e2f6ab5f7f077d200121da0d523", "score": "0.52954364", "text": "public function show(Patient $patient)\n {\n \n }", "title": "" }, { "docid": "857615b6ca332e95e842347935e949ac", "score": "0.52876157", "text": "public function SearchCompany(){\n $connection = parent::returnConnection();\n\n //Step 2: variable that will receive the SQL command to search for the information in the database\n $sql_command = 'select id_company, \n company_name,\n telephone_number,\n company_address\n from tb_company\n where id_user = ? order by company_name ASC';\n \n //Step 3: Creating a object to send the information to the database\n $sql = new PDOStatement();\n\n //Step 4: To put inside the object $sql the connection prepared to execute the SQL command \n $sql = $connection->prepare($sql_command); \n\n //Step 5: Verify if the SQL command that I have to be settled up. If there re BindValues\n $sql->bindValue(1, UtilDAO::UserLoggedIn());\n\n //Step 7: Remove the Index from the Array. \n //return each row as an array indexed by column name \n //as returned in the corresponding result set.\n $sql->setFetchMode(PDO::FETCH_ASSOC);\n\n //Step 6: Execute in the database \n $sql->execute();\n\n return $sql->fetchAll();\n }", "title": "" }, { "docid": "f03cc7af57c0ae9f5ad8acc1840112c6", "score": "0.5286348", "text": "public function filterDoctor($query_string){\n $sql=\"SELECT * FROM doctor_tab as doc JOIN hospital_tab as hosp on (doc.hosp_id = hosp.hosp_id) WHERE hosp.hosp_location LIKE '$query_string%' OR doc.doc_name LIKE '$query_string%' OR doc.doc_degree LIKE '$query_string%' OR doc.doc_gender LIKE '$query_string%'\";\n $result = $this->db->query($sql);\n if ($result->num_rows() <= 0) {\n $response = array(\n 'status' => 500,\n 'status_message' => 'No data found.');\n } else {\n $response = array(\n 'status' => 200,\n 'status_message' => $result->result_array());\n }\n return $response;\n }", "title": "" }, { "docid": "eed3ccd92b5d105ec793861c9f27958b", "score": "0.52728015", "text": "function get_search_results($newSearch, $search_param, $department_id) {\n $findview = \"peopleA\";\n $newSearch = trim($newSearch);\n !$newSearch ? '' : @list($name_f, $name_l) = explode(' ', $newSearch);\n if ($this->is_admin($department_id)) {\n if ($search_param == \"person\") {\n $_SESSION[\"query_type\"] = 'person';\n if (strlen($newSearch) == 1) {\n $query = \"SELECT * FROM all_tables WHERE SUBSTRING(person,1,1) = '$newSearch'\";\n } elseif (empty($newSearch)) {\n $query = 'SELECT * FROM ' . $findview . ' ORDER BY person';\n } else {\n $query = \"SELECT * FROM all_tables WHERE SUBSTRING(person,1,1) = 'a'\";\n if (strpbrk($newSearch, ' ') == false || strstr($newSearch, ',')) {\n $query = \"SELECT * FROM all_tables WHERE person like '%$newSearch%' ORDER BY person\";\n } else {\n if (empty($name_l)) {\n $query = \"SELECT id, \" . parent::concat_fullname('none') . \" as Person, Email, Mailbox, Phone, Location, \" . parent::wrap() . \"Dep/Program\" . parent::wrap() . \" , Position FROM all_tables_person WHERE first_name like '%$name_f%' ORDER BY last_name\";\n } else {\n $query = \"SELECT id, \" . parent::concat_fullname('none') . \" as Person, Email, Mailbox, Phone, Location, \" . parent::wrap() . \"Dep/Program\" . parent::wrap() . \", Position FROM all_tables_person WHERE first_name like '%$name_f%' and last_name like '%$name_l%' ORDER By last_name\";\n }\n }\n }\n } elseif ($search_param == \"department\") {\n $_SESSION[\"query_type\"] = 'department';\n $findview = \"department_view\";\n if (strlen($newSearch) == 1) {\n $query = \"SELECT * FROM department_view WHERE SUBSTRING(department,1,1) = '$newSearch'\";\n } elseif ($newSearch == '') {\n $query = 'SELECT * FROM ' . $findview . ' ORDER BY department';\n } else {\n $query = \"SELECT * FROM department_view WHERE department like '%$newSearch%' or acronym = '$newSearch'\";\n }\n } elseif ($search_param == \"location\") {\n $_SESSION[\"query_type\"] = 'location';\n if (strlen($newSearch) == 1) {\n $query = \"SELECT * FROM location_view WHERE SUBSTRING(building,1,1) = '$newSearch' ORDER BY building\";\n } elseif ($newSearch == '') {\n $query = \"SELECT * FROM location_view ORDER BY building\";\n } else {\n $query = \"SELECT * FROM location_view WHERE building like '%$newSearch%'\";\n }\n } elseif ($search_param == \"users\") {\n $_SESSION[\"query_type\"] = 'users';\n if (strlen($newSearch) == 1) {\n $query = \"SELECT * FROM users_view WHERE SUBSTRING(username,1,1) = '$newSearch' ORDER BY username DESC\";\n } elseif ($newSearch == '') {\n $query = \"SELECT * FROM users_view ORDER BY username\";\n } else {\n $query = \"SELECT * FROM users_view WHERE name like '%$newSearch%' or username like '%$newSearch%' ORDER BY username DESC\";\n }\n } elseif ($search_param == \"program\") {\n $_SESSION[\"query_type\"] = 'program';\n $findview = \"program_view_a\";\n if (strlen($newSearch) == 1) {\n $query = \"SELECT * FROM program_view WHERE SUBSTRING(program,1,1) = '$newSearch'\";\n } elseif ($newSearch == '') {\n $query = 'SELECT * FROM ' . $findview . ' ORDER BY program';\n } else {\n $query = \"SELECT * FROM program_view WHERE program like '%$newSearch%'\";\n }\n } else {\n $_SESSION[\"query_type\"] = 'person';\n $query = \"SELECT * FROM all_tables WHERE SUBSTRING(person,1,1) = 'a'\";\n }\n } else {#Not admin access level\n if ($search_param == \"person\") {\n $_SESSION[\"query_type\"] = 'person';\n if (strlen($newSearch) == 1) {\n $query = \"SELECT id, Person, Email, Mailbox, Phone, location, \" . parent::wrap() . \"Dep/Program\" . parent::wrap() . \", Position FROM all_tables_user WHERE SUBSTRING(person,1,1) = '$newSearch' and department_id in ($department_id)\";\n } elseif (empty($newSearch)) {\n $query = \"SELECT id, Person, Email, Mailbox, Phone, location,\" . parent::wrap() . \"Dep/Program\" . parent::wrap() . \", Position FROM all_tables_user WHERE department_id in ($department_id) ORDER BY person\";\n } else {\n if (strpbrk($newSearch, ' ') == false || strstr($newSearch, ',')) {\n $query = \"SELECT id, Person, Email, Mailbox, Phone, location, \" . parent::wrap() . \"Dep/Program\" . parent::wrap() . \", Position FROM all_tables_user WHERE person like '%$newSearch%' and department_id in ($department_id)\";\n } else {\n if (empty($name_l)) {\n $query = \"SELECT id, \" . parent::concat_fullname('none') . \" as Person, Email, Mailbox, Phone, Location, \" . parent::wrap() . \"Dep/Program\" . parent::wrap() . \" FROM all_tables_person_user WHERE first_name like '%$name_f%' and department_id in ($department_id)\";\n } else {\n $query = \"SELECT id, \" . parent::concat_fullname('none') . \" as Person, Email, Mailbox, Phone, Location, \" . parent::wrap() . \"Dep/Program\" . parent::wrap() . \" FROM all_tables_person_user WHERE first_name like '%$name_f%' and last_name like '%$name_l%' and department_id in ($department_id)\";\n }\n }\n }\n } elseif ($search_param == \"department\") {\n $_SESSION[\"query_type\"] = 'department';\n $query = \"SELECT department_id, Department, Acronym, Chair, Division FROM department_view_user WHERE department_id in ($department_id)\";\n } elseif ($search_param == \"program\") {\n $_SESSION[\"query_type\"] = 'program';\n if (strlen($newSearch) == 1) {\n $query = \"SELECT id, Program, Department,\" . parent::wrap() . \"Program Coordinator\" . parent::wrap() . \", Mailbox from program_view_user WHERE SUBSTRING(program,1,1) = '$newSearch' and department_id in ($department_id) ORDER BY program\";\n } elseif ($newSearch == '') {\n $query = \"SELECT id, Program, Department, \" . parent::wrap() . \"Program Coordinator\" . parent::wrap() . \", Mailbox from program_view_user WHERE department_id in ($department_id) ORDER BY program\";\n } else {\n $query = \"SELECT id, Program, Department, \" . parent::wrap() . \"Program Coordinator\" . parent::wrap() . \", Mailbox from program_view_user WHERE program like '%$newSearch%' and department_id in ($department_id) ORDER BY program\";\n }\n } else {\n $_SESSION[\"query_type\"] = 'person';\n $query = \"SELECT id, Person, Email, Mailbox, Phone, location, \" . parent::wrap() . \"Dep/Program\" . parent::wrap() . \", Position FROM all_tables_user WHERE department_id in ($department_id)\";\n }\n }\n return $query;\n }", "title": "" }, { "docid": "11673d398a09e0f016670e0156d0bc99", "score": "0.52706254", "text": "public function search(&$data, $options = array()) {\n\n // \"act\" can be either \"count\" or \"get\".\n $act = (count($options) && isset($options['act'])) ? $options['act'] : null;\n\n // mosaikekkan\n // error_log('[AppiariesDevicesRepository] act: ' . $act);\n\n // Integrate EC-CUBE \"Customer\" table with \"appiaries_device\" table.\n $qb = $this->createQueryBuilder('d');\n $qb->leftJoin('d.customer', 'c');\n if ($act == 'count') {\n $qb->select('COUNT(d.id)');\n }\n else {\n $qb->select(\n 'd.device_id as device_id',\n 'c.id as customer_id',\n 'c.name01 as name01',\n 'c.name02 as name02',\n 'c.tel01 as tel01',\n 'c.tel02 as tel02',\n 'c.tel03 as tel03',\n 'c.email as email'\n );\n }\n\n if ($data) {\n\n // OS\n $os = $data['os'] == 'ios' ? 1 : 2;\n if (self::DEBUG_OUT) { error_log(\"[AppiariesDevicesRepository] Searching \\\"os = {$os}\\\"\"); }\n $qb->where('d.os = :os')->setParameter('os', $os);\n\n // Sex\n if (isset($data['sex'])) {\n if (self::DEBUG_OUT) {\n error_log('[AppiariesDevicesRepository] Searching'\n . ' \"sex = ' . $data['sex'] . '\"');\n }\n $qb->andWhere('c.Sex = :sex')->setParameter('sex', $data['sex']);\n }\n\n // Pref\n if (isset($data['pref'])) {\n if (self::DEBUG_OUT) {\n error_log('[AppiariesDevicesRepository] Searching'\n . ' \"pref = ' . $data['pref'] . '\"');\n }\n $qb->andWhere('c.Pref = :pref')->setParameter('pref', $data['pref']);\n }\n\n // Age (min)\n if (isset($data['age_min'])) {\n list($min, $max) =\n $this->get_birthday_range($data['age_min']);\n if (self::DEBUG_OUT) {\n error_log('[AppiariesDevicesRepository] Searching'\n . ' \"birth <= ' . $max . '\" (age: \"'\n . $data['age_min'] . '\")');\n }\n $qb->andWhere('c.birth <= :age_max')->setParameter('age_max', $max);\n }\n\n // Age (max)\n if (isset($data['age_max'])) {\n list($min, $max) =\n $this->get_birthday_range($data['age_max']);\n if (self::DEBUG_OUT) {\n error_log('[AppiariesDevicesRepository] Searching'\n . ' \"birth >= ' . $min . '\" (age: \"'\n . $data['age_max'] . '\")');\n }\n $qb->andWhere('c.birth >= :age_min')->setParameter('age_min', $min);\n }\n\n // Jobs\n if (isset($data['jobs']) && count($data['jobs'])) {\n if (self::DEBUG_OUT) {\n error_log('[AppiariesDevicesRepository] Searching \"job IN('\n . implode(',', $data['jobs']) . ')');\n }\n $qb->andWhere('c.Job IN(:jobs)')\n ->setParameter('jobs', array_values($data['jobs']));\n }\n\n // User Last Updated (min)\n if (isset($data['updated_min'])) {\n $min = (gettype($data['updated_min']) == 'string') ?\n $data['updated_min'] : $data['updated_min']->format('Y-m-d H:i:s');\n if (self::DEBUG_OUT) { error_log('[AppiariesDevicesRepository] Searching \"c.update_date >= ' . $min . '\" (min)'); }\n $qb->andWhere('c.update_date >= :updated_min')\n ->setParameter('updated_min', $min);\n }\n\n // User Last Updated (max)\n if (isset($data['updated_max'])) {\n $max = (gettype($data['updated_max']) == 'string') ?\n $data['updated_max'] : $data['updated_max']\n ->modify('+1 days')->format('Y-m-d H:i:s');\n if (self::DEBUG_OUT) { error_log('[AppiariesDevicesRepository] Searching \"c.update_date < ' . $max . '\" (max)'); }\n $qb->andWhere('c.update_date < :updated_max')\n ->setParameter('updated_max', $max);\n }\n\n // User Created (min)\n if (isset($data['created_min'])) {\n $min = (gettype($data['created_min']) == 'string') ?\n $data['created_min'] : $data['created_min']->format('Y-m-d H:i:s');\n if (self::DEBUG_OUT) { error_log('[AppiariesDevicesRepository] Searching \"c.create_date >= ' . $min . '\" (min)'); }\n $qb->andWhere('c.create_date >= :created_min')\n ->setParameter('created_min', $min);\n }\n\n // User Created (max)\n if (isset($data['created_max'])) {\n $max = (gettype($data['created_max']) == 'string') ?\n $data['created_max'] : $data['created_max']\n ->modify('+1 days')->format('Y-m-d H:i:s');\n if (self::DEBUG_OUT) { error_log('[AppiariesDevicesRepository] Searching \"c.created_date < ' . $max . '\" (max)'); }\n $qb->andWhere('c.create_date < :created_max')\n ->setParameter('created_max', $max);\n }\n\n // Product Name\n if (isset($data['product_name'])) {\n if (self::DEBUG_OUT) {\n error_log('[AppiariesDevicesRepository] Searching \"det.product_name LIKE %'\n . $data['product_name'] . '% OR det.product_code LIKE %\"'\n . $data['product_name'] . '%');\n }\n $qb->leftJoin('c.Orders', 'ord')\n ->leftJoin('ord.OrderDetails', 'det')\n ->andWhere('det.product_name LIKE :product_name OR det.product_code LIKE :product_name')\n ->setParameter('product_name', ('%' . $data['product_name'] . '%'));\n }\n\n // Total Price for the Purchases (min)\n if (isset($data['purchase_total_min'])) {\n if (self::DEBUG_OUT) {\n error_log('[AppiariesDevicesRepository] Searching \"c.buy_total >= '\n . $data['purchase_total_min'] . '\" (min)');\n }\n $qb->andWhere('c.buy_total >= :purchase_total_min')\n ->setParameter('purchase_total_min', $data['purchase_total_min']);\n }\n\n // Total Price for the Purchases (max)\n if (isset($data['purchase_total_max'])) {\n if (self::DEBUG_OUT) {\n error_log('[AppiariesDevicesRepository] Searching \"c.buy_total <= '\n . $data['purchase_total_max'] . '\" (max)');\n }\n $qb->andWhere('c.buy_total <= :purchase_total_max')\n ->setParameter('purchase_total_max', $data['purchase_total_max']);\n }\n\n // Number of Purchases (min)\n if (isset($data['purchase_count_min'])) {\n if (self::DEBUG_OUT) {\n error_log('[AppiariesDevicesRepository] Searching \"c.buy_times >= '\n . $data['purchase_count_min'] . '\" (min)');\n }\n $qb->andWhere('c.buy_times >= :purchase_count_min')\n ->setParameter('purchase_count_min', $data['purchase_count_min']);\n }\n\n // Number of Purchases (max)\n if (isset($data['purchase_count_max'])) {\n if (self::DEBUG_OUT) {\n error_log('[AppiariesDevicesRepository] Searching \"c.buy_times <= '\n . $data['purchase_count_max'] . '\" (max)');\n }\n $qb->andWhere('c.buy_times <= :purchase_count_max')\n ->setParameter('purchase_count_max', $data['purchase_count_max']);\n }\n\n // Last Purchased (min)\n if (isset($data['purchase_last_min'])) {\n $min = (gettype($data['purchase_last_min']) == 'string') ?\n $data['purchase_last_min'] : $data['purchase_last_min']->format('Y-m-d H:i:s');\n if (self::DEBUG_OUT) { error_log('[AppiariesDevicesRepository] Searching \"c.last_buy_date >= ' . $min . '\" (min)'); }\n $qb->andWhere('c.last_buy_date >= :purchase_last_min')\n ->setParameter('purchase_last_min', $min);\n }\n\n // Last Purchased (max)\n if (isset($data['purchase_last_max'])) {\n $max = (gettype($data['purchase_last_max']) == 'string') ?\n $data['purchase_last_max'] : $data['purchase_last_max']\n ->modify('+1 days')->format('Y-m-d H:i:s');\n if (self::DEBUG_OUT) { error_log('[AppiariesDevicesRepository] Searching \"c.last_buy_date < ' . $max . '\" (max)'); }\n $qb->andWhere('c.last_buy_date < :purchase_last_max')\n ->setParameter('purchase_last_max', $max);\n }\n }\n // END OF: if (data)\n\n if (self::DEBUG_OUT) { error_log('[AppiariesDevicesRepository] ' . $qb->getQuery()->getSQL()); }\n\n return ($act == 'count') ? $qb->getQuery()->getSingleScalarResult() :\n ($act == 'get' ? $qb->getQuery()->getResult(Query::HYDRATE_ARRAY) :\n $qb);\n }", "title": "" }, { "docid": "31f826a3cd7043ecba375b0657aabf73", "score": "0.5268754", "text": "function search($dbh,$keyword)\n{\n $query = \"SELECT\n hotel_id,\n hotel_brand,\n hotel_name,\n room,\n bed,\n adults,\n children,\n street,\n city,\n country,\n postal,\n phone,\n rank,\n price,\n description,\n breakfast_included,\n smoke_permit,\n image,\n on_maintain,\n log\n FROM\n hotel\n where deleted='0' AND hotel_brand like '%$keyword%' OR city like '%$keyword%' OR hotel_name like '%$keyword%'\n limit 5\";\n $stmt=$dbh->prepare($query);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n}", "title": "" }, { "docid": "cea1450d3e19659e43fa63eac0c9c879", "score": "0.5266949", "text": "public function search(){ \n\t\t$this->layout = false;\t \n\t\t$q = trim(Sanitize::escape($_GET['q']));\t\n\t\tif(!empty($q)){\n\t\t\t// execute only when the search keywork has value\t\t\n\t\t\t$this->set('keyword', $q);\n\t\t\t$data = $this->HrEmployee->find('all', array('fields' => array('full_name','HrDepartment.dept_name','HrDesignation.desig_name'), 'group' => array('full_name'), 'conditions' => \tarray(\"OR\" => array ('full_name like' => '%'.$q.'%','HrDepartment.dept_name like' => '%'.$q.'%','HrDesignation.desig_name like' => '%'.$q.'%'), 'AND' => array('HrEmployee.is_deleted' => 'N'))));\t\t\n\t\t\t$this->set('results', $data);\n\t\t}\n }", "title": "" }, { "docid": "ad8b6a536e6c4c8fb2bb5013402c84bb", "score": "0.52628297", "text": "function search(){\n DB::db_query(\"search_misc\", \"SELECT * FROM reference WHERE reference_type='Misc'\");\n if(DB::db_check_result(\"search_misc\") > 0){\n $data = DB::db_get_array(\"search_misc\");\n $this->load_array($data);\n }\n \n\n }", "title": "" }, { "docid": "60469ef00b4f705f3094247eca36c84c", "score": "0.52622086", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t// syslog(LOG_WARNING, \"IDptmaster: \" . $this->idptmaster . ' - ' . $this->encodePkey());\n\n\t\t//\t\t$criteria->compare('idptmaster', $this->idptmaster,true);\n\t\t$criteria->compare('caseno',$this->caseno,true);\n\t\t$criteria->compare('idccward',$this->idccward,true);\n\t\t$criteria->compare('idpttype',$this->idpttype,true);\n\t\t$criteria->compare('ownername',$this->ownername,true);\n\t\t$criteria->compare('fathername',$this->fathername,true);\n\t\t$criteria->compare('owneraddress',$this->owneraddress,true);\n\t\t$criteria->compare('propertyno',$this->propertyno,true);\n\t\t$criteria->compare('propertyaddress',$this->propertyaddress,true);\n\t\t$criteria->compare('constyear',$this->constyear,true);\n\t\t$criteria->compare('transferbreakup',$this->transferbreakup);\n\t\t$criteria->compare('trashed',$this->trashed);\n\t\t$criteria->compare('ledgerno',$this->ledgerno,true);\n\t\t$criteria->compare('idcccolony',$this->idcccolony,true);\n\t\t$criteria->compare('idptrange',$this->idptrange,true);\n\t\t$criteria->compare('idptpropertyon',$this->idptpropertyon,true);\n\t\t$criteria->compare('propertytax',$this->propertytax);\n\t\t$criteria->compare('watertax',$this->watertax);\n\t\t$criteria->compare('idptservicetax',$this->idptservicetax,true);\n\t\t$criteria->compare('idptexsumtors',$this->idptexsumtors,true);\n\t\t$criteria->compare('propertydetails',$this->propertydetails,true);\n\t\t$criteria->compare('idccsex',$this->idccsex,true);\n\n\t\t$cActiveDataProvider = new CActiveDataProvider(get_class($this));\n\t\tif($this->idptmaster == ''){\n\t\t\t$cActiveDataProvider = new CActiveDataProvider(get_class($this), array(\n\t\t\t\t\t'criteria'=>$criteria,\n\t\t\t));\n\t\t\treturn $cActiveDataProvider;\n\t\t}\n\t\telse{\n\t\t\t$data = array();\n\t\t\tforeach(Ptmaster::model()->findAll($criteria) as $ptmaster){\n\t\t\t\tsyslog(LOG_WARNING, $ptmaster->idccward0->idcczone . ' - ' . $ptmaster->idccward . ' - ' . $ptmaster->idptmaster . ' ---> ' . $this->encodePkey($ptmaster->idccward0->idcczone, $ptmaster->idccward, $ptmaster->idptmaster));\n\n\t\t\t\tif(!(strpos($this->encodePkey($ptmaster->idccward0->idcczone, $ptmaster->idccward, $ptmaster->idptmaster), $this->idptmaster . '') === false)){\n\t\t\t\t\t$data[] = $ptmaster;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$cActiveDataProvider->setData($data);\n\t\t\treturn $cActiveDataProvider;\n\t\t}\n\t}", "title": "" }, { "docid": "8c3deb64874422e5994944450d8b4115", "score": "0.52423567", "text": "public function show(Patient $patient)\n {\n //\n }", "title": "" }, { "docid": "8c3deb64874422e5994944450d8b4115", "score": "0.52423567", "text": "public function show(Patient $patient)\n {\n //\n }", "title": "" }, { "docid": "8c3deb64874422e5994944450d8b4115", "score": "0.52423567", "text": "public function show(Patient $patient)\n {\n //\n }", "title": "" }, { "docid": "8c3deb64874422e5994944450d8b4115", "score": "0.52423567", "text": "public function show(Patient $patient)\n {\n //\n }", "title": "" }, { "docid": "8c3deb64874422e5994944450d8b4115", "score": "0.52423567", "text": "public function show(Patient $patient)\n {\n //\n }", "title": "" }, { "docid": "d734c22474fec7edf12eea69467d6a7e", "score": "0.5228456", "text": "public function getPatients($id){\n info('Get Patients');\n $patients = Pneumologist::find($id)->patients()->get();\n info($patients);\n return $patients;\n\n }", "title": "" }, { "docid": "7c975d94cab50379ca9200f7f09601db", "score": "0.52283967", "text": "function searchSerie($p, $ordine){\n\t$query = \"SELECT * FROM `Serie` WHERE `nome` LIKE '%$p%' ORDER BY '$ordine'\";\n\treturn eseguiQuery($query);\n}", "title": "" }, { "docid": "8dd4a08f250c95bd55e252f931a6e427", "score": "0.5223416", "text": "public function search()\n {\n if (empty($_GET['search'])) {\n echo \"<script> alert('Não existem resultados!') </script>\";\n return [];\n } else {\n // verify if the search field is not empty\n if ($search = (!empty($_GET['search'])) ? $_GET['search'] : \"\") {\n // sql query to select activities by name\n $sql = 'SELECT * FROM activity WHERE name LIKE :search';\n } else {\n echo \"<script> alert('Não existem resultados!') </script>\";\n return [];\n }\n\n // create array of fields for the search field\n $fields = array('search' => $search.\"%\");\n // put the fields and the sql query + execute query\n $searchQuery = $this->query($sql, $fields);\n\n $rows = count($searchQuery);\n if ($rows <= 0) {\n echo \"<script> alert('Não existem resultados!') </script>\";\n return [];\n } else {\n return $searchQuery;\n }\n }\n }", "title": "" }, { "docid": "b44a78d0397c42b720f2bec985915607", "score": "0.5217213", "text": "public function searchByName()\n {\n $request = \\Request::get('q');\n if ($request !== null){\n return Pokemon::searchByName($request);\n } else {\n return Raid::latest()->get();\n }\n }", "title": "" }, { "docid": "d4f6e6c8439cbd66e7da8815f77f0976", "score": "0.52153254", "text": "public function actionSearchCandidates(){\n if ($this->isGuest || ($this->checkPermission('candidates:admin') !== true)){ \n\t\t\theader('HTTP/1.0 403 Forbidden');\n\t\t\t$this->render(\"errors\", \n\t\t\t\t[\n\t\t\t\t\"code\"=> \"403\",\n\t\t\t\t\"title\"=> \"Acceso denegado\",\n\t\t\t\t\"description\" => \"\",\n\t\t\t]); exit();\t\n\t\t}\n\t\t$error = isset($_GET['searchText']) ? false : true;\n\t\t$text = isset($_GET['searchText']) ? $_GET['searchText'] : \"\";\n\t\t$items = array();\n\t\t$returning = (object) [\n\t\t\t'error' \t=> $error,\n\t\t\t'text' => $text,\n\t\t\t'records' => $items,\n\t\t];\n\t\t\n\t\tif ($error === false){\n\t\t\t// \"Busqueda 1\"\n\t\t\t$sql = \"SELECT * FROM `candidates` \n\t\t\tWHERE \n\t\t\t\t`identification_number` LIKE '%{$text}%' \n\t\t\t\tOR `names` LIKE '%{$text}%' \n\t\t\t\tOR `surname` LIKE '%{$text}%' \n\t\t\t\tOR `address` LIKE '%{$text}%' \n\t\t\t\tOR `salary` LIKE '%{$text}%' \n\t\t\t\tOR `email` LIKE '%{$text}%' \n\t\t\t\tOR `phone` LIKE '%{$text}%' \n\t\t\t\tOR `mobile` LIKE '%{$text}%' \n\t\t\t\tOR `notes` LIKE '%{$text}%'\";\n\t\t\t$conn = new EntidadBase('candidates', $this->adapter);\n\t\t\t$data = $conn->getSQL($sql);\n\t\t\t$records1 = [];\n\t\t\tforeach($data as $candidate){\n\t\t\t\t$candidate = is_array($candidate) ? (object) $candidate : $candidate;\n\t\t\t\t//$returning->records[] = $candidate->id;\n\t\t\t\tif(!isset($records1[$candidate->id])){\n\t\t\t\t\t$records1[] = $candidate->id;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// \"Busqueda 2\" - Dentro de experiencia\n\t\t\t$sql2 = \"SELECT * FROM `candidates_experience` \n\t\t\tWHERE \n\t\t\t\t`business` LIKE '%{$text}%' \n\t\t\t\tOR `position` LIKE '%{$text}%' \n\t\t\t\tOR `functions` LIKE '%{$text}%' \";\n\t\t\t$conn2 = new EntidadBase('candidates_experience', $this->adapter);\n\t\t\t$data2 = $conn2->getSQL($sql2);\n\t\t\t$records2 = [];\n\t\t\tforeach($data2 as $experience){\n\t\t\t\t$experience = is_array($experience) ? (object) $experience : $experience;\n\t\t\t\tif(!isset($records2[$experience->candidate])){\n\t\t\t\t\t$records2[] = $experience->candidate;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$returning->records = array_merge(array_unique(array_merge($records1, $records2)), array());\n\t\techo json_encode($returning);\n\t\treturn json_encode($returning);\n\t}", "title": "" }, { "docid": "1c1cabde1a029ca52de7df64813669fe", "score": "0.5214705", "text": "function getOneRecordFromTablePatients($patientID)\n{\n\t//require connection\n\trequire('includes/conn.inc.php');\n\n\t//sql query and select the one you want to get\n\t$sql = \"SELECT * FROM patients WHERE patientID = $patientID\";\n\n\t//prepare query and run\n\t$stmt = $pdo->prepare($sql);\n\n\tif($stmt->execute()){\n\t\techo \"<div class='alert alert-success'>Got one record from table.</div>\";\n\t}else{\n\t\techo \"<div class='alert alert-danger'>Unable to get one record.</div>\";\n\t}\n\n\t//store retrieved row from db to variable\n\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\treturn $row;\n}", "title": "" }, { "docid": "fce9d8b9ca5b9ddf9759e6f417ef4458", "score": "0.51982236", "text": "public function searchAdmin($search)\n {\n $sql = 'SELECT * FROM activity WHERE name LIKE :search';\n // create array of fields for the search field\n $fields = array('search'=> $search.\"%\");\n // put the fields and the sql query + execute query\n $searchQuery = $this->query($sql, $fields);\n\n $rows = count($searchQuery);\n if ($rows <= 0) {\n echo \"<script> alert('Não existem resultados!') </script>\";\n return [];\n } else {\n return $searchQuery;\n }\n }", "title": "" }, { "docid": "e738a9734c0c999d87a16ce4462cee3c", "score": "0.5197664", "text": "public function search_history(Request $request){\n $rs = Reservation::with('patient.historyPatient')->where('patient_id', $request->patient_id)\n ->whereDate('date', Carbon::now()->format('Y-m-d'))->first();\n //dd($request->patient_id);\n\n return response()->json([\n 'reservations' => $rs,\n ]);\n }", "title": "" }, { "docid": "e7a9d6523b00e73087e96c35074af7e7", "score": "0.5194877", "text": "function search_car($X,$Y,$Z) {\n// Fetch database credentials\r\n$username = $_SERVER['DB_USER_AN'];\r\n$password = $_SERVER['DB_PASS_AN'];\r\n// Connect to database with PDO\r\n$hostname = \"localhost\";\r\n// Connect to database\r\ntry {\r\n$conn = new PDO(\"mysql:host=$hostname;dbname=autodb\", $username, $password);\r\n// End PDO connection\n//prepare select statement with variables\n$sth = $conn->prepare(\"SELECT * FROM autoplanet WHERE Make = :Make AND BodyType LIKE :BodyType AND Fuel LIKE :Fuel\");\n//preparing the statement\n//execute the statement with different values\n$sth->bindParam(':Make', $X, PDO::PARAM_STR, 30);\n$sth->bindParam(':BodyType', $Y, PDO::PARAM_STR, 30);\n$sth->bindParam(':Fuel', $Z, PDO::PARAM_STR, 30);\n$sth->execute();\n$result=$sth->fetchAll();\nreturn $result;\n// Display error message in case of database error, close connection and exit script\n}\r\ncatch(PDOException $e) {\nshow_message(\"Sorry, something went wrong... Please try again later.\");\n// Uncomment line below if you need detailed error messages for debugging purposes\n// show_message($e);\n$conn = null;\nexit();\r\n}\n}", "title": "" }, { "docid": "4a9549701e5235363ba1d5c56f22cb28", "score": "0.5194141", "text": "function getCorpSearch ($colum, $keyword)\r\n{\r\n $db = dbconnect();\r\n \r\n // prepare the SQL statement\r\n $stmt = $db->prepare(\"SELECT * FROM corps WHERE ($colum LIKE '%$keyword%')\");\r\n \r\n $results = array();\r\n // execute the statement (Returns BOOL), \r\n // if TRUE check the row count\r\n if ($stmt->execute() && $stmt->rowCount() > 0) {\r\n // fetches all rows for the conditions of SQL statement as an Associative Array\r\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n \r\n return $results;\r\n}", "title": "" }, { "docid": "2a1bab1ccd17db6a46c583b914f734ab", "score": "0.51936615", "text": "public function search($text) {\n\t $text1 = explode(\" \",$text);\n\t $sql = null;\n\t $text = array_filter($text1);\n\t foreach($text as $val) {\n\t\t$sql .= $val.' | ';\n\t }\n\t $cond1 = substr($sql,0,-3);\n\t $userid = Yii::app()->user->id;\n\t $user = Yii::app()->db2->createCommand()\n\t\t->selectDistinct('e.experiment_id')\n\t\t->from('experiments e')\n\t\t->leftJoin('variables v', 'e.experiment_id = v.experiment__id')\n\t\t->leftJoin('constants c', 'e.experiment_id = c.experiment__id')\n\t\t->leftJoin('conclusions cc', 'e.experiment_id = cc.experiment__id')\n\t\t->leftJoin('metrics m', 'e.experiment_id = m.experiment__id')\n\t\t->leftJoin('trials t', 'e.experiment_id = t.experiment__id')\n\t\t->leftJoin('documents d', 'e.experiment_id = d.experiment__id')\n\t\t->leftJoin('access_grants a', 'e.experiment_id = a.experiment__id')\n\t\t//->where(\"(e.user__id = \" . Yii::app()->user->id . \" OR a.user__id = \" . Yii::app()->user->id.\") AND ((\n\t\t->where(\"(a.user__id = \" . Yii::app()->user->id.\" OR e.organization__id IN (SELECT DISTINCT organization__id FROM memberships WHERE user__id = \" . Yii::app()->user->id . \" )) AND ((\n\t\te.ts_en @@ to_tsquery('{$cond1}')) OR (v.ts_en @@ to_tsquery('{$cond1}')) OR (c.ts_en @@ to_tsquery('{$cond1}')) OR (cc.ts_en @@ to_tsquery('{$cond1}')) OR (m.ts_en @@ to_tsquery('{$cond1}')) OR (t.ts_en @@ to_tsquery('{$cond1}')) OR (d.ts_en @@ to_tsquery('{$cond1}')))\")->queryAll();\n\t\t// to print result use ->queryAll()\n\t\t// to print query use ->text;\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "cba98f1a7a36b0fb9f14ff2d929b764a", "score": "0.51852196", "text": "function retrieveRecords($conn){\t \n $params = getParams();\n\t\t$fname = $params['fname'];\n\t\t$lname = $params['lname'];\n\t\t$state = $params['state'];\n\t\tif ($conn)\n\t\t{ \n\t\t\t//create search results table;\n\t\t\t$drop1 = \"DROP TABLE IF EXISTS PersonRecordSearchResults;\";\n\t\t\t$create1 = \"CREATE TABLE IF NOT EXISTS PersonRecordSearchResults\n\t\t\t(\n\t\t\t\tid int(10) NOT NULL AUTO_INCREMENT,\n\t\t\t\tfname varchar(255) NOT NULL,\n\t\t\t\tminitial varchar(10)NULL,\n\t\t\t\tlname varchar(255)NOT NULL,\n\t\t\t\tdob varchar(255) NULL,\n\t\t\t\tage varchar(255) NULL, \n\t\t\t\taddress varchar(255)NULL,\n\t\t\t\tcity varchar(255) NOT NULL,\n\t\t\t\tstate varchar(255) NOT NULL, \n\t\t\t\tzip varchar(255) NOT NULL, \n\t\t\t\treportDate varchar(255),\n\t\t\t\tphone varchar(255) NOT NULL,\n\t\t\t\trelatives varchar(510) NULL,\n\t\t\t\tpreviousAddresses varchar(1020) NULL,\n\t\t\t\thomeOwner varchar(10)NULL,\n\t\t\t\tPRIMARY KEY (id) \n\t\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8;\"; \n\t\t\t//check if table creation is successful\n\t\t\tif (!$conn->query($drop1) || !$conn->query($create1))\n\t\t\t{\n\t\t\t\t\t\techo \"Table creation failed: (\" . $conn->errno . \") \" . $conn->error;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Query the database table to retrieve search results \n\t\t\t\t$select = \"SELECT * FROM PersonRecords where fname = '$fname' AND lname='$lname' AND state='$state';\"; \n\t\t\t\t$result= $conn->query($select);\n\t\t\t\t$num_results = $result->num_rows; \n\t\t\t\techo \"<h3>Number of Matching Records: $num_results</h3>\";\n \t\t\tif ($num_results == 0) {\n \t\t \techo \"No Records are saved to the database<br/>\";\n \t\t\t}\n\t\t\t\techo \"--------------------------------------------------------------------<br/>\";\n\t\t\t\t$personArray= array();\t\t\t\n\t\t\t\t$counter = 0;\n\t\t\t\twhile ($row = $result->fetch_assoc()) \n\t\t\t\t{\n\t\t\t\t\t//echo $row[\"fname\"].\" \".$row[\"minitial\"].\" \".$row[\"lname\"].\" State \".$row[\"state\"].\" Phone: \".$row[\"phone\"];\n\t\t\t\t\t$fname = $row[\"fname\"];\n\t\t\t\t\t$personArray[$counter]->firstname = $fname;\n\t\t\t\t\t//echo $personArray[$counter]->firstname; \n\t\t\t\t\t$mname = $row[\"minitial\"];\n\t\t\t\t\t$personArray[$counter]->middlename = $mname;\n\t\t\t\t\t$lname = $row[\"lname\"];\n\t\t\t\t\t$personArray[$counter]->lastname = $lname;\n\t\t\t\t\t$dob = $row[\"dob\"];\n\t\t\t\t\t$personArray[$counter]->dob = $dob;\n\t\t\t\t\t$age = $row[\"age\"];\n\t\t\t\t\t$personArray[$counter]->age = $age;\n\t\t\t\t\t$address =$row[\"address\"];\n\t\t\t\t\t$personArray[$counter]->address = $address;\n\t\t\t\t\t$city = $row[\"city\"];\n\t\t\t\t\t$personArray[$counter]->city = $city;\n\t\t\t\t\t$state= $row[\"state\"];\n\t\t\t\t\t$personArray[$counter]->state = $state;\n\t\t\t\t\t$zip = $row[\"zip\"];\n\t\t\t\t\t$personArray[$counter]->zip = $zip;\n\t\t\t\t\t$reportDate= $row[\"reportDate\"];\n\t\t\t\t\t$personArray[$counter]->reportDate = $reportDate;\n\t\t\t\t\t$phone = $row[\"phone\"];\n\t\t\t\t\t$personArray[$counter]->phone = $phone;\n\t\t\t\t\t$relatives = $row[\"relatives\"];\n\t\t\t\t\t$personArray[$counter]->relatives = $relatives;\n\t\t\t\t\t$previousAddresses =$row[\"previousAddresses\"];\n\t\t\t\t\t$personArray[$counter]->previousAddresses = $previousAddresses;\n\t\t\t\t\t$homeOwner = $row[\"homeOwner\"];\n\t\t\t\t\t$personArray[$counter]->homeOwner = $homeOwner;\n\t\t\t\t\t$counter++;\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t$insert2 = \"INSERT INTO PersonRecordSearchResults (fname,minitial,lname,dob,age,address,city,state,zip,reportDate,phone,relatives,previousAddresses,homeOwner)\n\t\t\t\t\t\t\t VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n\t\t\t\t\t //Using prepare \n\t\t\t\t\t $query2 = $conn->prepare($insert2); \n\t\t\t\t\t // bind parameters \n\t\t\t\t\t $query2->bind_param(\"ssssssssssssss\",$fname,$mname,$lname,$dob,$age,$address,$city,$state,$zip,$reportDate,$phone,$relatives,$previousAddresses,$homeOwner);\n\t\t\t\t\t //Execute\n\t\t\t\t\t $query2->execute();\n\t\t\t\t\t $query2->close(); \t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif ($query2){\n \t\t\t echo \"Search Results are saved to database successfully<br/>\"; \n\t\t\t\t} else {\n\t\t\t\t\t\techo \"Error: \" . $query2 . \"<br>\" . $conn->error;\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t} \t\t\t\t\t \n\t\t\t \tmysqli_free_result($result); \t\t\t\n\t\t\t \t$conn->close();\n\t\t\t}\n\t\t} \n\t}", "title": "" }, { "docid": "9178a3316bb07b12aabc7061c0e88e83", "score": "0.51826084", "text": "public function search($query)\n {\n if(strlen($query) >= 1){\n $results = \\DB::select(\n \" select * from treatments where name like '%$query%'\"\n );\n $ids = [];\n foreach ($results as $result) {\n foreach($result as $key => $val){\n if($key == 'id'){\n array_push($ids, $val);\n }\n }\n }\n return Treatment::find($ids);\n }\n }", "title": "" }, { "docid": "2d9276a2c70c16fffe4b6a5b04a4ac14", "score": "0.5180997", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\t\tif(!isset($_GET['PatientTestSummary_sort'])){\n\t\t\t\n\t\t\t//echo \"-------\";\n\t\t$criteria->order = \"t.id ASC\";\n\t\t//$criteria->order = \"t.chkin_id desc\";\n\t\t}\n\t\tif(isset($_GET['PatientTestSummary']['from_date']) && isset($_GET['PatientTestSummary']['to_date'])){\n\t\t\t$from_date = $_GET['PatientTestSummary']['from_date'];\t\t\t\n\t\t\t$to_date = $_GET['PatientTestSummary']['to_date'];\t\t\t\n\t\t\t$criteria->condition = \" examination_date BETWEEN '$from_date' AND '$to_date'\";\n\t\t}\n\t\tif(isset($_GET['PatientTestSummary']['klt_no'])){\n\t\t\t$klt_no = $_GET['PatientTestSummary']['klt_no'];\t\t\t\n\t\t\t$criteria->condition = \" klt_no = '$klt_no'\";\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$criteria->order = \" t.id DESC\";\n\n\t\t$criteria->compare('t.id',$this->id);\n\t\t$criteria->compare('examination_date', $this->examination_date,true);\n\t\t$criteria->compare('reporting_date', $this->reporting_date,true);\n\t\t$criteria->compare('klt_no',$this->klt_no,true);\n\t\t$criteria->compare('patient.reg_no',$this->reg_no,true);\n\t\t$criteria->compare('patient.ref_no',$this->ref_no,true);\n\t\t$criteria->compare('patient.referrer_id',$this->referrer_id,true);\n\t\t$criteria->compare('patient.country_applied_for',$this->country_applied_for,true);\n\t\t\n\t\t$criteria->compare('patient.name',$this->patient_id, true);\n\t\t$criteria->compare('panel.id',$this->panel_id);\n\t\t$criteria->compare('t.price',$this->price);\n\t\t$criteria->compare('discount',$this->discount);\n\t\t$criteria->compare('urgent_charges',$this->urgent_charges);\n\t\t$criteria->compare('payment',$this->payment);\n\t\t$criteria->compare('balance',$this->balance);\n\t\t$criteria->compare('remarks',$this->remarks,true);\n\t\t$criteria->compare('patient_test_status',$this->patient_test_status,true);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('created_date',$this->created_date,true);\n\t\t$criteria->compare('updated_date',$this->updated_date,true);\n\t\t\n\t\t$criteria->with = array('patient', 'panel');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array('pageSize'=>50),\n\t\t\t\n\t\t\t));\n\t}", "title": "" }, { "docid": "e1b3ce1bced6a083ee77aec20d95d71d", "score": "0.51802444", "text": "public static function search() {\n\n $string = Input::get('string');\n\n\n $results = Musician::Where('first_name', 'like', \"$string%\")\n ->orWhere('last_name', 'like', \"$string%\")\n ->orWhere('stagename', 'like', \"$string%\")->get();\n\n return ($results->toArray());\n }", "title": "" }, { "docid": "adee7e9516e529a8b913f92854d076d9", "score": "0.5177382", "text": "function query() {}", "title": "" }, { "docid": "adee7e9516e529a8b913f92854d076d9", "score": "0.5177382", "text": "function query() {}", "title": "" }, { "docid": "f924a4d9b73bb6bb1790a8b32374bef9", "score": "0.5175713", "text": "public function search()\n {\n //\n if($search = \\Request::get('q')){\n $parsel=Parselinfo::where(function($query) use ($search){\n $query->where('name','LIKE',\"%$search%\")\n ->orWhere('recever_name','LIKE',\"%$search%\")\n ->orWhere('package_name','LIKE',\"%$search%\")\n ->orWhere('source','LIKE',\"%$search%\")\n ->orWhere('destination','LIKE',\"%$search%\")\n ->orWhere('phone','LIKE',\"%$search%\")\n ->orWhere('recever_phone','LIKE',\"%$search%\")\n ->orWhere('type','LIKE',\"%$search%\");\n })->paginate(10);\n\n }else{\n $parsel= Parselinfo::latest()->paginate(10);\n }\n return $parsel;\n }", "title": "" }, { "docid": "31818c01a67fe3c4214561397d8d43ee", "score": "0.5174526", "text": "public function search()\n {\n // get post parameters\n $adname = $_POST['adname'];\n\n // show all ads with matching titles\n $ads = $this->ads->search($adname);\n $this->present($ads,'');\n }", "title": "" }, { "docid": "6769404aa44b30e78979e0a9f2943ba7", "score": "0.5163952", "text": "public function find(){\r\n\t\t$this->initdb();\r\n\t\t$qry = array( 'nombre' => $this->pass,'password' => $this->usu);\r\n\t\t$db = $this->db;\r\n\t\t$st = $db->cPersonal->findOne($qry);\r\n\t\t//devuelvo el array\r\n\t\treturn $st;\r\n\t}", "title": "" }, { "docid": "5c272f0649f8b8f84a61b959850fffee", "score": "0.5161775", "text": "private function search($table, Array $columns, Array $records,$extraSQL=\"\", $printSQL = false) {\n\t\treturn $this->get_database_utils ()->search ( $table, $columns, $records, $extraSQL, $printSQL );\n\t}", "title": "" }, { "docid": "c85846eba8333c1e9b131b2ad6fffea0", "score": "0.515786", "text": "public function search() {\n $filterTemplate = array(\"idField\" => FILTER_VALIDATE_INT,\n \"entity\" => FILTER_SANITIZE_STRING);\n $rawData = $_GET;\n $filteredData = filter_var_array($rawData, $filterTemplate);\n if($filteredData['idField']) {\n $entityController = Controllers\\ControllerFactory::genController($filteredData['entity']);\n $targetEntity = $entityController->getSpecific($filteredData['idField']);\n if($filteredData['idField'] == $targetEntity->getId()) {\n ob_start();\n $this->view->show(\"{$filteredData['entity']}s/edit\".ucfirst($filteredData['entity']).\".php\", $targetEntity);\n $editForm = gzcompress(ob_get_clean());\n $_SESSION['editForm'] = $editForm;\n header(\"Location: index.php?action={$filteredData['entity']}/listAll\"); \n } else {\n //header(\"Location: index.php?notFound&entity={$filteredData['entity']}\");\n }\n }\n //header(\"Location: index.php?fillTheFields\");\n }", "title": "" }, { "docid": "d1b59a043d5525660b3483b2e68859d4", "score": "0.5153621", "text": "function checkPatientCOMS($PatientDFN){\n $query = \"SELECT DFN,Patient_ID as id FROM Patient WHERE DFN = '$PatientDFN'\";\nerror_log(\"checkPatientCOMS - $PatientDFN = $query\");\n $result = $this->query($query); \n\n $query2 = \"SELECT PAT_ID\n ,Patient_ID\n ,Template_ID\n ,Date_Applied\n ,Date_Started\n ,Date_Ended\n ,Is_Active\n ,AssignedByRoleID\n ,Goal\n ,Clinical_Trial\n ,Status\n ,Perf_Status_ID\n ,Weight_Formula\n ,BSA_Method\n ,Date_Ended_Actual\n FROM Patient_Assigned_Templates\";\n\n $result2 = $this->query($query2);\n $arr = array_merge ((array)$result,(array)$result2);\n return ($result);\n }", "title": "" }, { "docid": "d02ffde5eb861cd8b37f49ce40aafe3f", "score": "0.5151549", "text": "public function searchName($name){\n\n\t\t$query = \"SELECT * FROM \".$this->tableName.\" WHERE (name = :name)\";\n $newRoom = null;\n $parameters[\"name\"] = $name;\n $validate = false;\n $this->connection = Connection::GetInstance();\n $array = $this->connection->Execute($query, $parameters);\n foreach($array as $newArray){\n if($newArray !== null){ \n // $newRoom = new Room($newArray['capacity'],$newArray['id_cinema'],$newArray['name'],$newArray['capacity']);\n //$newRoom->setId($newArray['idrooms']);\n $validate = true;\n }\n }\n return $validate;\n\n\n }", "title": "" }, { "docid": "8119d44c56a4f572bdc20697b3916902", "score": "0.51487184", "text": "function db_search($sql){\n\n $servername = \"localhost\";\n $username = \"root\";\n $password = \"\";\n $dbname = \"crs\";\n\n // Create connection\n $conn = new mysqli($servername, $username, $password, $dbname);\n\n // Check connection\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n\n $result = $conn->query($sql);\n\n return $result->fetch_object();\n}", "title": "" }, { "docid": "47d2e26b212a4680810fb8cc4a97d2dd", "score": "0.5148718", "text": "function customsearch() {\r\n $this->dbClass();\r\n }", "title": "" }, { "docid": "11e87f1811e1c804c67a109f530ddf6f", "score": "0.5148331", "text": "function containsMedication($participant_id,$medication) {\r\n //database object\r\n $dbh = connect();\r\n\r\n $sql = \"SELECT * FROM medications WHERE participant_id = :participant_id AND medication_name = :medication\";\r\n\r\n //prepare the statement\r\n $statement = $dbh->prepare($sql);\r\n\r\n //bind parameters\r\n $statement->bindParam(':participant_id',$participant_id, PDO::PARAM_INT);\r\n $statement->bindParam(':medication',$medication, PDO::PARAM_STR);\r\n\r\n //execute statement\r\n $statement->execute();\r\n\r\n //count the many of rows\r\n $count = $statement->rowCount();\r\n return $count > 0;\r\n}", "title": "" }, { "docid": "59510bc5fc3c6691ecd830e0df5bf4e2", "score": "0.5148035", "text": "public function search()\n {\n\n }", "title": "" }, { "docid": "59510bc5fc3c6691ecd830e0df5bf4e2", "score": "0.5148035", "text": "public function search()\n {\n\n }", "title": "" } ]
fa56d1e615dafa13a69270f5ad1a8005
TBD What does 'preview' mean for bulk exports? According to doc: "Fully render the display for the purposes of a live preview or some other AJAXy reason. [views_plugin_display.inc:1877]" Not sure it makes sense for Bulk exports to be previewed in this manner? We need the user's full attention to run the batch. Suggestions: 1) Provide a link to execute the view? 2) Provide a link to the last file we generated?? 3) Show a table of the first 20 results?
[ { "docid": "db64abd0e8d7dcc1d5276a4cb0eec12f", "score": "0.7151009", "text": "function preview() {\n if (!$this->is_batched()) {\n // Can replace with return parent::preview() when views 2.12 lands.\n if (!empty($this->view->live_preview)) {\n // Change the items per page:\n $this->view->set_items_per_page(20);\n return '<p>' . t('A maximum of 20 items will be shown here, all results will be shown on export.') . '</p><pre>' . check_plain($this->view->render()) . '</pre>';\n }\n return $this->view->render();\n }\n return '';\n }", "title": "" } ]
[ { "docid": "0dc51de78a3852d4bf0f3ba9e0251f5d", "score": "0.64079416", "text": "function execute_initial() {\n\n // Register this export with our central table - get a unique eid\n // Also store our view in a cache to be retrieved with each batch call\n $this->batched_execution_state = views_data_export_new($this->view->name, $this->view->current_display, $this->outputfile_create());\n views_data_export_view_store($this->batched_execution_state->eid, $this->view);\n\n // We need to build the index right now, before we lose $_GET etc.\n $this->initialize_index();\n //$this->batched_execution_state->fid = $this->outputfile_create();\n\n // Initialize the progress counter\n $this->batched_execution_state->sandbox['max'] = db_result(db_query('SELECT COUNT(*) FROM {' . $this->index_tablename() . '}'));\n // Record the time we started.\n list($usec, $sec) = explode(' ', microtime());\n $this->batched_execution_state->sandbox['started'] = (float) $usec + (float) $sec;\n\n // Build up our querystring for the final page callback.\n $querystring = array(\n 'eid' => $this->batched_execution_state->eid,\n );\n // If we were attached to another view, grab that for the final URL.\n if (!empty($_GET['attach']) && isset($this->view->display[$_GET['attach']])) {\n // Get the path of the attached display:\n $querystring['return-url'] = $this->view->get_url(NULL, $this->view->display[$_GET['attach']]->handler->get_path());\n }\n $querystring_built = drupal_query_string_encode($querystring);\n\n //Set the batch off\n $batch = array(\n 'operations' => array (\n array('_views_data_export_batch_process', array($this->batched_execution_state->eid, $this->view->current_display, $this->view->get_exposed_input())),\n ),\n 'title' => t('Building export'),\n 'init_message' => t('Export is starting up.'),\n 'progress_message' => t('Exporting @percentage% complete,'),\n 'error_message' => t('Export has encountered an error.'),\n );\n\n // We do not return, so update database sandbox now\n views_data_export_update($this->batched_execution_state);\n\n $final_destination = $this->view->get_url();\n\n // Provide a way in for others at this point\n // e.g. Drush to grab this batch and yet execute it in\n // it's own special way\n $batch['view_name'] = $this->view->name;\n $batch['exposed_filters'] = $this->view->get_exposed_input();\n $batch['display_id'] = $this->view->current_display;\n $batch['eid'] = $this->batched_execution_state->eid;\n $batch['__drupal_alter_by_ref']['final_destination'] = &$final_destination;\n $batch['__drupal_alter_by_ref']['querystring'] = &$querystring_built;\n drupal_alter('views_data_export_batch', $batch);\n\n // Modules may have cleared out $batch, indicating that we shouldn't process further.\n if (!empty($batch)) {\n batch_set($batch);\n // batch_process exits\n batch_process(array($final_destination, $querystring_built));\n }\n }", "title": "" }, { "docid": "215d60a76c8312ae061d332a08f578fb", "score": "0.6340732", "text": "public function actionPreview()\n {\n $fileParams = \\Yii::$app->params->getFileParams();\n\n $fileParamKeys = array_keys($fileParams);\n $fileParamsArray = array_map(\n function ($key) use ($fileParams) {\n $scopeSeparatorPos = strpos($key, '.');\n return [\n 'scope' => $scopeSeparatorPos === false ? 'NULL' : substr($key, 0, $scopeSeparatorPos),\n 'code' => $scopeSeparatorPos === false ? $key : substr($key, $scopeSeparatorPos + 1, strlen($key)),\n 'value' => $fileParams[$key]\n ];\n },\n $fileParamKeys\n\n );\n\n $fileParams = new \\yii\\data\\ArrayDataProvider([\n 'allModels' => $fileParamsArray,\n // TODO: add pagination and sort\n ]);\n\n // prepare db params data provider\n $dbParams = new \\yii\\data\\ActiveDataProvider([\n 'query' => Params::find(),\n ]);\n\n return $this->render('index', ['fileParams' => $fileParams, 'dbParams' => $dbParams]);\n }", "title": "" }, { "docid": "2a732427536c17c3d8ad10ae9f3248d4", "score": "0.62286955", "text": "function execute_normal() {\n\n // Pass through to our render method,\n $output = $this->view->render();\n\n // Append what was rendered to the output file.\n $this->outputfile_write($output);\n\n // Store for convenience.\n $state = &$this->batched_execution_state;\n $sandbox = &$state->sandbox;\n\n // Update progress measurements & move our state forward\n switch ($state->batch_state) {\n\n case VIEWS_DATA_EXPORT_BODY:\n // Remove rendered results from our index\n if (count($this->view->result) && ($sandbox['weight_field_alias'])) {\n $last = end($this->view->result);\n db_query('DELETE FROM {' . $this->index_tablename() . '} WHERE ' . $sandbox['weight_field_alias'] . ' <= %d', $last->{$sandbox['weight_field_alias']});\n\n // Update progress.\n $progress = db_result(db_query('SELECT COUNT(*) FROM {' . $this->index_tablename() . '}'));\n $progress = 0.99 - ($progress / $sandbox['max'] * 0.99);\n $progress = ((int)floor($progress * 100000));\n $progress = $progress / 100000;\n $sandbox['finished'] = $progress;\n }\n else {\n // No more results.\n $progress = 0.99;\n $state->batch_state = VIEWS_DATA_EXPORT_FOOTER;\n }\n break;\n\n case VIEWS_DATA_EXPORT_HEADER:\n $sandbox['finished'] = 0;\n $state->batch_state = VIEWS_DATA_EXPORT_BODY;\n break;\n\n case VIEWS_DATA_EXPORT_FOOTER:\n // Update the temporary file size, otherwise we would get a problematic\n // \"Content-Length: 0\" HTTP header, that may break the export download.\n $this->outputfile_update_size();\n $sandbox['finished'] = 1;\n $state->batch_state = VIEWS_DATA_EXPORT_FINISHED;\n break;\n }\n\n // Create a more helpful exporting message.\n $sandbox['message'] = $this->compute_time_remaining($sandbox['started'], $sandbox['finished']);\n }", "title": "" }, { "docid": "4d1e4e2f8caf0ddd6558a544950c3a03", "score": "0.61657727", "text": "public function executePreview()\n {\n if ($this->hasRequestParameter('id'))\n {\n $this->getUser()->setAttribute('id', $this->getRequestParameter('id'), 'tv_admin/serial');\n }\n return $this->renderComponent('serials', 'preview');\n }", "title": "" }, { "docid": "3f12fd1a01aee5bd58684085d6d702e3", "score": "0.6128976", "text": "public function preview(){\n\t\t$col = ['desname','desfile'];\n\t\t$id = $this->input->get('id');\n\t\t$dbres = $this->Mcerti->detaildesign($col,$id);\n\t\t\n\t\t//set row title\n\t\t$row = $this->returncolomn($col);\n\t\t\n\t\t//set table template\n\t\t$tmpl = array ( 'table_open' => '<table class=\"table table-striped\">',\n\t\t\t\t\t'heading_row_start' => '<tr>',\n 'heading_row_end' => '</tr>',\n 'heading_cell_start' => '<td>',\n 'heading_cell_end' => '</td>',\n\n 'row_start' => '<tr>',\n 'row_end' => '</tr>',\n 'cell_start' => '<td>',\n 'cell_end' => '</td>'\n\n\t\t\t\t\t);\n\t\t$this->table->set_template($tmpl);\n\t\t//set table data\n\t\t$a = 0;\n\t\tforeach($row as $key)\n\t\t{\n\t\t\t$dtable[$a] = array(\n\t\t\t\t\"dtcol\"=>'<div class=\"text-center\"><h3>'.$dbres[0][$col[$a]].'</h3></div>'\n\t\t\t\t);\n\t\t\t\t\n\t\t\tif ($key=='Design File'){\n\t\t\t\t$dtable[$a] = array(\n\t\t\t\t\"dtcol\"=>'<div class=\"text-center\"><img src=\"'.base_url('upload/design/'.$dbres[0][$col[$a]]).'\" width=850px class=\"img-round\"></div>'\n\t\t\t\t);\n\t\t\t\n\t\t\t}\n\t\t\t$a++;\n\t\t}\n\t\t$data['rdata']=$this->table->generate($dtable);\n\t\t\n\t\t// =============== view handler ============\n\t\t$this->load->view('dashboard/org/design/printpreview', $data);\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "0cd340bda4b6da5900c014473b304e9d", "score": "0.6116775", "text": "function live_preview() {\n }", "title": "" }, { "docid": "290865652d4d6c515569345573cc86bb", "score": "0.6097309", "text": "function views_ui_preview($js, $view) {\n // Take off the items we know so that we can have just the args passed\n // in for later use.\n $func_args = func_get_args();\n array_shift($func_args); // $js\n array_shift($func_args); // $view\n $display_id = (count($func_args)) ? array_shift($func_args) : 'default';\n\n $form_state = array(\n 'display_id' => $display_id,\n 'view_args' => $func_args ? implode('/', $func_args) : '',\n 'rerender' => TRUE,\n 'no_redirect' => TRUE,\n 'view' => &$view,\n 'ajax' => $js\n );\n\n $output = drupal_build_form('views_ui_preview_form', $form_state);\n $args = array();\n if (isset($form_state['view_args']) && $form_state['view_args'] !== '') {\n $args = explode('/', $form_state['view_args']);\n }\n\n $errors = $view->validate();\n if ($errors === TRUE) {\n $view->ajax = $js;\n $view->live_preview = TRUE;\n\n // Store the current view URL for later use:\n $view->set_display($form_state['display_id']);\n $view->set_arguments($args);\n\n if ($view->display_handler->get_option('path')) {\n $path = $view->get_url();\n }\n\n // Make view links come back to preview.\n $view->override_path = 'admin/build/views/nojs/preview/' . $view->name . '/' . $form_state['display_id'];\n\n // also override $_GET['q'] so we get the pager\n $_GET['q'] = $view->override_path;\n if ($form_state['view_args']) {\n $_GET['q'] .= '/' . $form_state['view_args'];\n }\n\n $preview = $view->preview($form_state['display_id'], $args);\n\n // Get information from the preview for display.\n if (!empty($view->build_info['query'])) {\n $rows = array();\n $query = db_prefix_tables($view->build_info['query']);\n if ($view->build_info['query_args']) {\n _db_query_callback($view->build_info['query_args'], TRUE);\n $query = preg_replace_callback(DB_QUERY_REGEXP, '_db_query_callback', $query);\n }\n $rows[] = array('<strong>' . t('Query') . '</strong>', '<pre>' . check_plain($query) . '</pre>');\n if (!empty($view->additional_queries)) {\n $queries = '<strong>' . t('These queries were run during view rendering:') . '</strong>';\n foreach ($view->additional_queries as $query) {\n if ($queries) {\n $queries .= \"\\n\";\n }\n $queries .= t('[@time ms]', array('@time' => intval($query[1] * 100000) / 100)) . ' ' . check_plain($query[0]);\n }\n\n $rows[] = array('<strong>' . t('Other queries') . '</strong>', '<pre>' . $queries . '</pre>');\n }\n\n $rows[] = array('<strong>' . t('Title') . '</strong>', filter_xss_admin($view->get_title()));\n if (isset($path)) {\n $path = l($path, $path);\n }\n else {\n $path = t('This display has no path.');\n }\n\n $rows[] = array('<strong>' . t('Path') . '</strong>', $path);\n\n $rows[] = array('<strong>' . t('Query build time') . '</strong>', t('@time ms', array('@time' => intval($view->build_time * 100000) / 100)));\n $rows[] = array('<strong>' . t('Query execute time') . '</strong>', t('@time ms', array('@time' => intval($view->execute_time * 100000) / 100)));\n $rows[] = array('<strong>' . t('View render time') . '</strong>', t('@time ms', array('@time' => intval($view->render_time * 100000) / 100)));\n drupal_alter('views_preview_info', $rows, $view);\n\n $info = theme('table', array(), $rows);\n }\n else {\n $info = theme('table', array(), array(array('<strong>' . t('Query') . '</strong>', t('No query was run'))));\n }\n }\n else {\n foreach ($errors as $error) {\n drupal_set_message($error, 'error');\n }\n $preview = t('Unable to preview due to validation errors.');\n $info = '';\n }\n\n $info = '<div class=\"views-query-info\">' . $info . '</div>';\n\n if (variable_get('views_ui_query_on_top', FALSE)) {\n $output .= $info . $preview;\n }\n else {\n $output .= $preview . $info;\n }\n\n if (!$js) {\n views_add_css('views-admin');\n drupal_set_title($view->get_title());\n return $output;\n }\n else {\n views_include('ajax');\n $object = new stdClass();\n if (!empty($view->js_settings)) {\n $object->js = $view->js_settings;\n }\n $object->display = '';\n if ($messages = theme('status_messages')) {\n $object->display = '<div class=\"views-messages\">' . $messages . '</div>';\n }\n $object->display .= $output;\n $object->title = $view->get_title();\n views_ajax_render($object);\n }\n}", "title": "" }, { "docid": "c9b6fe20e8f394f05a7f14c857c51eac", "score": "0.5961373", "text": "public function render(){ $this->displayIfExport(); }", "title": "" }, { "docid": "743b96e6a827afd90eaa74203ba2d0e4", "score": "0.59289736", "text": "public function preview($args) {}", "title": "" }, { "docid": "fbfacc8db9906cd5da4ba8d70a0c586c", "score": "0.5907564", "text": "public function executePreviewall()\n {\n\n $id = $this->getRequestParameter('id', $this->getUser()->getAttribute('serial'));\n $serial = SerialPeer::retrieveByPk($id);\n $this->forward404Unless($serial);\n $hash = SerialHashPeer::get($serial);\n\n $this->redirect($hash->getUrl(true, true));\n\n /*\n $this->setLayout('tvlayout');\n //ADD CSS\n\n //$this->\n\n $c = new Criteria();\n $c->add(SerialPeer::ID, $this->getRequestParameter('id', $this->getUser()->getAttribute('serial')));\n list($aux) = SerialPeer::doSelectWithI18n($c, $this->getUser()->getCulture());\n $this->serial = $aux;\n $this->forward404Unless($this->serial);\n\n $this->mms = $this->serial->getMms();\n $this->roles = RolePeer::doSelectWithI18n(new Criteria(), $this->getUser()->getCulture());\n\n $this->getResponse()->setTitle($this->serial->getTitle());\n $this->getResponse()->addMeta('keywords', $this->serial->getKeyword());\n */\n }", "title": "" }, { "docid": "9607c398904bb295735aa8b249469f7f", "score": "0.5901818", "text": "public function drawViewBatch() {\n $this->load->model('batch/batch_model');\n $column = array('batch_no', 'id_batch', 'expiry_date');\n $viewBatch = $this->batch_model->fetchFromAnyTable(\"tbl_batch\", null, null, $column, 10000, 0, \"RESULTSET\", array('batch_status' => 1), \"expiry_date\");\n $this->template->draw('batch/viewBatch', false, $viewBatch);\n }", "title": "" }, { "docid": "c4a6244749f5ed28815eef75ef7ae4e4", "score": "0.5878025", "text": "public function executeAction() {\n\t\t$html = \"\";\n foreach ( $this->importer->listFiles() as $displayName => $page ) {\n $html .= \"* Import de \".$page->getWikiText().\"\\n\";\n\t\t\t$page->checkVersion( $this->getExtensionVersion() );\n if ( $page->needsUpdate() && $page->hasChanged() ) {\n $comment = $this->importer->getNewComment(\n $this->getExtensionName(), $this->getExtensionVersion()\n );\n\t\t\t\t$page->import( $comment );\n\t\t\t}\n }\n $html .= \"\\n\";\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "55f1027af28afd66a5cfc2654dc82f15", "score": "0.587359", "text": "public function preview() {\n\t\tglobal $post, $job_preview;\n\n\t\tif ( $this->job_id ) {\n\t\t\t$job_preview = true;\n\t\t\t$post = get_post( $this->job_id );\n\t\t\t$post->post_status = 'preview';\n\n\t\t\tsetup_postdata( $post );\n\n\t\t\tget_job_manager_template( 'job-preview.php', array(\n\t\t\t\t'form' => $this\n\t\t\t) );\n\n\t\t\twp_reset_postdata();\n\t\t}\n\t}", "title": "" }, { "docid": "a6bf41faa53335c55867d6202d3b64cc", "score": "0.5860188", "text": "public function renderEditable(){ $this->displayIfExport(); }", "title": "" }, { "docid": "e0ad5a1d5ba60a48048de29c68d547f0", "score": "0.5830803", "text": "public function previewAction() {\r\n\t\t$result = array();\r\n \r\n $id = $this->getRequest()->getParam('id');\r\n\t\t\r\n\t\tif ($data = $this->getRequest()->getPost()) {\r\n\t\t\t\r\n if(!empty($data[\"stores\"])){\r\n $arrStores = explode(\",\", $data[\"stores\"][0]);\r\n }\r\n /*\r\n\t\t\tforeach($arrStores as $key => $store){\r\n\t\t\t\tif($store != 0) {\r\n $storeId = $store;\r\n break;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t*/\r\n //$result['url'] = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK); \r\n \r\n $storeId = $arrStores[0];\r\n $storeCode = Mage::app()->getStore($storeId)->getCode();\r\n $result['state'] = \"success\";\t\r\n $result['url'] = Mage::getStoreConfig('web/unsecure/base_url').\"?___store=\".$storeCode.\"&popup=preview&popupid=\".$id;\r\n\t\t}else{\r\n\t\t\t//No Data do nothing\r\n\t\t\t$result['state'] = \"error\";\r\n\t\t}\r\n\t\t$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\r\n\t}", "title": "" }, { "docid": "855a5bf7cc313352ab894c2b55f87592", "score": "0.5802607", "text": "function ewww_image_optimizer_bulk_preview() {\n\tglobal $ewww_debug;\n\t$ewww_debug .= \"<b>ewww_image_optimizer_bulk_preview()</b><br>\";\n\t// retrieve the attachment IDs that were pre-loaded in the database\n\tlist($fullsize_count, $unoptimized_count, $resize_count, $unoptimized_resize_count) = ewww_image_optimizer_count_optimized ('media');\n//\t$upload_import = get_option('ewww_image_optimizer_imported');\n\t$upload_import = true;\n?>\n\t<div class=\"wrap\"> \n\t<div id=\"icon-upload\" class=\"icon32\"><br /></div><h2><?php _e('Bulk Optimize', EWWW_IMAGE_OPTIMIZER_DOMAIN); ?></h2>\n<?php\t// Retrieve the value of the 'bulk resume' option and set the button text for the form to use\n\t$resume = get_option('ewww_image_optimizer_bulk_resume');\n\tif (empty($resume)) {\n\t\t$button_text = __('Start optimizing', EWWW_IMAGE_OPTIMIZER_DOMAIN);\n\t} else {\n\t\t$button_text = __('Resume previous bulk operation', EWWW_IMAGE_OPTIMIZER_DOMAIN);\n\t}\n\t$loading_image = plugins_url('/wpspin.gif', __FILE__);\n\t// create the html for the bulk optimize form and status divs\n?>\n\t\t<div id=\"ewww-bulk-loading\">\n\t\t\t<p id=\"ewww-loading\" class=\"ewww-bulk-info\" style=\"display:none\"><?php _e('Importing', EWWW_IMAGE_OPTIMIZER_DOMAIN); ?>&nbsp;<img src='<?php echo $loading_image; ?>' /></p>\n\t\t</div>\n\t\t<div id=\"ewww-bulk-progressbar\"></div>\n\t\t<div id=\"ewww-bulk-counter\"></div>\n\t\t<form id=\"ewww-bulk-stop\" style=\"display:none;\" method=\"post\" action=\"\">\n\t\t\t<br /><input type=\"submit\" class=\"button-secondary action\" value=\"<?php _e('Stop Optimizing', EWWW_IMAGE_OPTIMIZER_DOMAIN); ?>\" />\n\t\t</form>\n\t\t<div id=\"ewww-bulk-status\"></div>\n<?php \t\tif (empty($upload_import)) { ?>\n\t\t\t<p class=\"ewww-bulk-info\"><?php _e('You should import Media Library images into the table to prevent duplicate optimization.', EWWW_IMAGE_OPTIMIZER_DOMAIN); ?></p>\n\t\t\t<form id=\"import-start\" class=\"bulk-form\" method=\"post\" action=\"\">\n\t\t\t\t<input type=\"submit\" class=\"button-secondary action\" value=\"<?php _e('Import Images', EWWW_IMAGE_OPTIMIZER_DOMAIN); ?>\" />\n\t\t\t</form>\n\t\t</div>\n<?php\t\t\treturn;\n\t\t} ?>\n\t\t<form class=\"ewww-bulk-form\">\n\t\t\t<p><label for=\"ewww-force\" style=\"font-weight: bold\"><?php _e('Force re-optimize', EWWW_IMAGE_OPTIMIZER_DOMAIN); ?></label>&emsp;<input type=\"checkbox\" id=\"ewww-force\" name=\"ewww-force\"></p>\n\t\t\t<p><label for=\"ewww-delay\" style=\"font-weight: bold\"><?php _e('Choose how long to pause between images (in seconds, 0 = disabled)', EWWW_IMAGE_OPTIMIZER_DOMAIN); ?></label>&emsp;<input type=\"text\" id=\"ewww-delay\" name=\"ewww-delay\" value=\"<?php if ($delay = ewww_image_optimizer_get_option ( 'ewww_image_optimizer_delay' ) ) { echo $delay; } else { echo 0; } ?>\"></p>\n\t\t\t<div id=\"ewww-delay-slider\" style=\"width:50%\"></div>\n\t\t</form>\n\t\t<h3><?php _e('Optimize Media Library', EWWW_IMAGE_OPTIMIZER_DOMAIN); ?></h3>\n<?php\t\tif ($fullsize_count < 1) {\n\t\t\techo '<p>' . __('You do not appear to have uploaded any images yet.', EWWW_IMAGE_OPTIMIZER_DOMAIN) . '</p>';\n\t\t} else { ?>\n\t\t\t<div id=\"ewww-bulk-forms\">\n<?php\t\t\tif ( ! $resize_count && ! $unoptimized_count && ! $unoptimized_resize_count) { ?>\n\t\t\t\t<p class=\"ewww-media-info ewww-bulk-info\"><?php printf(__('%1$d images in the Media Library have been selected, unable to determine how many resizes and how many are unoptimized.', EWWW_IMAGE_OPTIMIZER_DOMAIN), $fullsize_count); ?><br />\n<?php\t\t\t} else { ?>\n\t\t\t\t<p class=\"ewww-media-info ewww-bulk-info\"><?php printf(__('%1$d images in the Media Library have been selected (%2$d unoptimized), with %3$d resizes (%4$d unoptimized).', EWWW_IMAGE_OPTIMIZER_DOMAIN), $fullsize_count, $unoptimized_count, $resize_count, $unoptimized_resize_count); ?><br />\n<?php\t\t\t} ?>\n\t\t\t<?php _e('Previously optimized images will be skipped by default.', EWWW_IMAGE_OPTIMIZER_DOMAIN); ?></p>\n\t\t\t<form id=\"ewww-bulk-start\" class=\"ewww-bulk-form\" method=\"post\" action=\"\">\n\t\t\t\t<input id=\"ewww-bulk-first\" type=\"submit\" class=\"button-secondary action\" value=\"<?php echo $button_text; ?>\" />\n\t\t\t\t<input id=\"ewww-bulk-again\" type=\"submit\" class=\"button-secondary action\" style=\"display:none\" value=\"<?php _e('Optimize Again', EWWW_IMAGE_OPTIMIZER_DOMAIN); ?>\" />\n\t\t\t</form>\n<?php\t\t}\n\t\t// if the 'bulk resume' option was not empty, offer to reset it so the user can start back from the beginning\n\t\tif (!empty($resume)): \n?>\n\t\t\t<p class=\"ewww-media-info ewww-bulk-info\"><?php _e('If you would like to start over again, press the Reset Status button to reset the bulk operation status.', EWWW_IMAGE_OPTIMIZER_DOMAIN); ?></p>\n\t\t\t<form class=\"ewww-bulk-form\" method=\"post\" action=\"\">\n\t\t\t\t<?php wp_nonce_field( 'ewww-image-optimizer-bulk', 'ewww_wpnonce'); ?>\n\t\t\t\t<input type=\"hidden\" name=\"ewww_reset\" value=\"1\">\n\t\t\t\t<button id=\"ewww-bulk-reset\" type=\"submit\" class=\"button-secondary action\"><?php _e('Reset Status', EWWW_IMAGE_OPTIMIZER_DOMAIN); ?></button>\n\t\t\t</form>\n<?php\t\tendif;\n\techo '</div>';\n\tewwwio_memory( __FUNCTION__ );\n\tewww_image_optimizer_aux_images();\n}", "title": "" }, { "docid": "b59709dbcd48c534255f2c0476c93d07", "score": "0.5765525", "text": "function query() {\n\n if (!$this->is_batched()) {\n return parent::query();\n }\n\n // Make the query distinct if the option was set.\n if ($this->get_option('distinct')) {\n $this->view->query->set_distinct();\n }\n\n if (!empty($this->batched_execution_state->batch_state) && !empty($this->batched_execution_state->sandbox['weight_field_alias'])) {\n\n switch ($this->batched_execution_state->batch_state) {\n case VIEWS_DATA_EXPORT_BODY:\n case VIEWS_DATA_EXPORT_HEADER:\n case VIEWS_DATA_EXPORT_FOOTER:\n // Tell views its been executed.\n $this->view->executed = TRUE;\n // Grab our results from the index, and push them into the view result.\n // TODO: Handle external databases.\n $result = db_query_range('SELECT * FROM {' . $this->index_tablename() . '} ORDER BY ' . $this->batched_execution_state->sandbox['weight_field_alias'] . ' ASC', 0, $this->get_option('segment_size'));\n $this->view->result = array();\n while ($item_arr = db_fetch_array($result)) {\n $item = new stdClass();\n // We had to shorten some of the column names in the index, restore\n // those now.\n foreach ($item_arr as $hash => $value) {\n if (isset($this->batched_execution_state->sandbox['field_aliases'][$hash])) {\n $item->{$this->batched_execution_state->sandbox['field_aliases'][$hash]} = $value;\n }\n else {\n $item->{$hash} = $value;\n }\n }\n // Push the restored $item in the views result array.\n $this->view->result[] = $item;\n }\n break;\n }\n }\n }", "title": "" }, { "docid": "d9b6c73219023bd762f8d1c7b4ca411a", "score": "0.5756988", "text": "public function actionDesignPreview()\n {\n $this->layout = 'adminlte-moqup-preview';\n return $this->render('design-preview');\n }", "title": "" }, { "docid": "0531971d7e19fe3c91567ea1aee70e82", "score": "0.57515734", "text": "public function preview(){\n\t\t\t// Retrieve image\n\t\t\t\t$pobj = Photo::fetch($_GET['id']);\n\t\t\t\tif($pobj !== false) $pobj->show('preview');\n\t\t\texit();\n\t\t}", "title": "" }, { "docid": "d3b69623b6cfe33379da771286e5ab26", "score": "0.5714746", "text": "public function preview($args) {\n }", "title": "" }, { "docid": "5d08179351c31d2db4a397d2eb9e7125", "score": "0.57058483", "text": "function render() {\n\n if (!$this->is_batched()) {\n $result = parent::render();\n if (empty($this->view->live_preview)) {\n $this->add_http_headers();\n }\n return $result;\n }\n\n $this->view->build();\n\n switch ($this->batched_execution_state->batch_state) {\n case VIEWS_DATA_EXPORT_BODY:\n $output = $this->view->style_plugin->render_body();\n break;\n case VIEWS_DATA_EXPORT_HEADER:\n $output = $this->view->style_plugin->render_header();\n break;\n case VIEWS_DATA_EXPORT_FOOTER:\n $output = $this->view->style_plugin->render_footer();\n break;\n }\n\n return $output;\n }", "title": "" }, { "docid": "ded4aadadb96cd3a3ec54b9437d975b3", "score": "0.56993693", "text": "public function exportAction(){\n\t\t$request = $this->getRequest();\n\t\t$table = $this->_getParam('table');\n\t\t$grid = Bvb_Grid::factory('Bvb_Grid_Deploy_JqGrid', Zend_Registry::get('grid-config'), '', array());\n\t\t$parm['factory'] = true;\n\t\t$con = new Admin_Service_Grid('', $table, $parm, $request->getParams());\n\t\t\n\t\t$con->configure($grid, $table);\n\t\t$con->ajax(get_class($grid));\n\t\t$this->view->g1 = $grid->deploy();\n\t\t\n\t\t$this->render('index');\n\t}", "title": "" }, { "docid": "5bf1a0a302e6239e81368ec4d05a7cd9", "score": "0.56906384", "text": "function view() {\n\t\t\n\t}", "title": "" }, { "docid": "22bfe6536e36a9a8504b9281717901e6", "score": "0.5685859", "text": "public function adminViewFileEdits()\r\n\t{\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "22bfe6536e36a9a8504b9281717901e6", "score": "0.5685859", "text": "public function adminViewFileEdits()\r\n\t{\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "775e98439e585b1d19542b1696be2152", "score": "0.56689173", "text": "function theme_views_data_export_complete_page($file, $errors = array(), $return_url = '') {\n drupal_set_title(t('Data export successful'));\n drupal_set_html_head('<meta http-equiv=\"refresh\" content=\"3;url='. check_plain($file) . '\" />');\n $output = '';\n $output .= '<p>';\n $output .= t('Your export has been created. View/download the file <a href=\"@link\">here</a> (will automatically download in 3 seconds.)', array('@link' => $file));\n $output .= '</p>';\n\n if (!empty($return_url)) {\n $output .= '<p>';\n $output .= l(t('Return to previous page'), $return_url);\n $output .= '</p>';\n }\n return $output;\n}", "title": "" }, { "docid": "d51d379f36c96f23c8d275d9870ad915", "score": "0.56668395", "text": "function render_complete() {\n $return_path = empty($_GET['return-url']) ? '' : $_GET['return-url'];\n\n return theme('views_data_export_complete_page', url($this->view->get_url(), array('query' => 'download=1&eid=' . $this->batched_execution_state->eid)), array(), $return_path);\n }", "title": "" }, { "docid": "0c1b884988b18be0b6a2d828e32f62d7", "score": "0.5639829", "text": "function views_ui_preview_form(&$form_state) {\n $view = &$form_state['view'];\n $view->init_display();\n $options = array();\n foreach ($view->display as $id => $display) {\n $options[$id] = $display->display_title;\n }\n\n $form['#attributes'] = array(\n 'class' => 'clear-block',\n );\n\n $form['display_id'] = array(\n '#type' => 'select',\n '#title' => t('Display'),\n '#options' => $options,\n '#default_value' => $form_state['display_id'],\n '#id' => 'preview-display-id',\n );\n\n $form['args'] = array(\n '#type' => 'textfield',\n '#title' => t('Arguments'),\n '#default_value' => $form_state['view_args'],\n '#description' => t('Separate arguments with a / as though they were a URL path.'),\n '#id' => 'preview-args',\n );\n\n $form['preview'] = array(\n '#type' => 'submit',\n '#value' => t('Preview'),\n '#id' => 'preview-submit',\n );\n\n\n $form['live_preview'] = array(\n '#type' => 'checkbox',\n '#title' => t('Automatic live preview'),\n '#default_value' => !variable_get('views_ui_disable_live_preview', 0),\n );\n\n $form['#action'] = url(\"admin/build/views/nojs/preview/$view->name\");\n return $form;\n}", "title": "" }, { "docid": "ba4aeb0f0366c753f4e6b18dc310fb85", "score": "0.56327796", "text": "public function manageAction() {\n\n //GET NAVIGATION\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitereview_admin_main', array(), 'sitereview_admin_main_import');\n\n //FORM CREATION FOR SORTING\n $this->view->formFilter = $formFilter = new Sitereview_Form_Admin_Import_Filter();\n $sitereview = $this->_getParam('page', 1);\n \n $tableImportFile = Engine_Api::_()->getDbTable('importfiles', 'sitereview');\n $select = $tableImportFile->select();\n\n //IF IMPORT IS IN RUNNING STATUS FOR SOME FILE THAN DONT SHOW THE START BUTTON FOR ALL\n $importFileStatusData = $tableImportFile->fetchRow(array('status = ?' => 'Running'));\n $this->view->runningSomeImport = 0;\n if (!empty($importFileStatusData)) {\n $this->view->runningSomeImport = 1;\n }\n\n $values = array();\n if ($formFilter->isValid($this->_getAllParams())) {\n $values = $formFilter->getValues();\n }\n\n foreach ($values as $key => $value) {\n if (null === $value) {\n unset($values[$key]);\n }\n }\n\n $values = array_merge(array(\n 'order' => 'importfile_id',\n 'order_direction' => 'DESC',\n ), $values);\n\n $this->view->assign($values);\n\n $select->order((!empty($values['order']) ? $values['order'] : 'importfile_id' ) . ' ' . (!empty($values['order_direction']) ? $values['order_direction'] : 'DESC' ));\n\n $this->view->paginator = $paginator = Zend_Paginator::factory($select);\n $this->view->total_slideshows = $paginator->getTotalItemCount();\n $this->view->paginator->setItemCountPerPage(200);\n $this->view->paginator = $paginator->setCurrentPageNumber($sitereview);\n }", "title": "" }, { "docid": "5a4a18ce7543a339bae315ea5f9f727e", "score": "0.56093735", "text": "public static function previewPage($data,$type){\n\t\t\n\t}", "title": "" }, { "docid": "dbb8d54b8a76adcc3d023682b28f786f", "score": "0.55908763", "text": "public function preview() {\n\n\t\tcheck_ajax_referer( 'forced-preview' );\n\n\t\tif( isset( $_POST['id'] ) ) {\n\n\t\t\tupdate_post_meta( \n\t\t\t\tintval( $_POST['id'] ),\n\t\t\t\t'forced_preview',\n\t\t\t\t1\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "5e6fdbd26ea3168bad9f1bd491f0d276", "score": "0.5569951", "text": "public function actionPreview($id)\n {\n return $this->render('preview', [\n 'model' => $this->findModel($id),\n ]);\n }", "title": "" }, { "docid": "5e6fdbd26ea3168bad9f1bd491f0d276", "score": "0.5569951", "text": "public function actionPreview($id)\n {\n return $this->render('preview', [\n 'model' => $this->findModel($id),\n ]);\n }", "title": "" }, { "docid": "fa166b43bac1487c9e51881e448f8295", "score": "0.55697364", "text": "public function views($mod){\n return LiangLee_plugin_path($mod , 'preview').'default/';\n}", "title": "" }, { "docid": "19fba9711b475b101834d7bc8d15f38d", "score": "0.55666345", "text": "function preview(){\n// if (preg_match(\"/MSIE/i\", $_SERVER['HTTP_USER_AGENT'])) $this->view($this->title, $this->saveFile(\"CON_COM_\"));\n// else\n\n/* //$slOut = $this->pdf->output();\n////header(\"Content-type: application/pdf\");\n//header('Content-type: application/vnd.ms-excel');\n//header(\"Content-disposition: inline; filename=reporte.pdf\");\n//header(\"Content-length: \" . strlen($slOut));\n$opt['Content-type'] ='application/pdf';\n$opt['Content-disposition'] ='inline; filename=test.pdf';\n$opt['Content-length'] =strlen($slOut);\n $this->pdf->ezStream($opt); // no funciona en IE\n//echo $slOut;\n*/\n $this->view($this->title, $this->saveFile(\"CON_COM_\"));\n}", "title": "" }, { "docid": "06cb47d83c6fec0ae2573d572c40ab6b", "score": "0.55600435", "text": "public function preview($mod){\n return LiangLee_plugin_path($mod , 'preview');\n}", "title": "" }, { "docid": "ad9c51384d8854e4c56ccde41126f89f", "score": "0.5556077", "text": "function viewRecordView()\n{\n\t$rxa = databaseLoad();\n\tformPage(MODE_VIEW, $rxa);\n}", "title": "" }, { "docid": "9005574070e0708a799ce2825a3cdaf3", "score": "0.55541915", "text": "function showLargeview()\n\t{\n\t\tinclude('classes/Core/CHome.php');\n\t\tinclude_once('classes/Core/CProductDetail.php');\n\t\tinclude_once('classes/Display/DProductDetail.php');\n\t\t\n\t\tinclude_once('classes/Core/CCurrencySettings.php');\n\t\tCore_CCurrencySettings::getDefaultCurrency();\n\t\t\n\t\t$output['skinname']=Core_CHome::skinName();\n\t\t$default=new Core_CProductDetail();\n\t\t$output['result']=$default->showLargeview();\n\t\tBin_Template::createTemplate('largeview.html',$output);\n\t}", "title": "" }, { "docid": "c29c2d7f3206cd84bb522fd1621bf550", "score": "0.5549269", "text": "public function browseAction()\n {\n $this->_helper->content->setNoRender()->setEnabled();\n }", "title": "" }, { "docid": "992e6ecd7a74bd76ff42821fdb9b477c", "score": "0.5524296", "text": "public function preview_handler() {\n\t\tif ( ! $_POST ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Edit = show submit form again\n\t\tif ( ! empty( $_POST['edit_job'] ) ) {\n\t\t\t$this->step --;\n\t\t}\n\n\t\t// Continue = change job status then show next screen\n\t\tif ( ! empty( $_POST['continue'] ) ) {\n\t\t\t$job = get_post( $this->job_id );\n\n\t\t\tif ( in_array( $job->post_status, array( 'preview', 'expired' ) ) ) {\n\t\t\t\t// Reset expiry\n\t\t\t\tdelete_post_meta( $job->ID, '_job_expires' );\n\n\t\t\t\t// Update job listing\n\t\t\t\t$update_job = array();\n\t\t\t\t$update_job['ID'] = $job->ID;\n\t\t\t\t$update_job['post_status'] = apply_filters( 'submit_job_post_status', get_option( 'job_manager_submission_requires_approval' ) ? 'pending' : 'publish', $job );\n\t\t\t\t$update_job['post_date'] = current_time( 'mysql' );\n\t\t\t\t$update_job['post_date_gmt'] = current_time( 'mysql', 1 );\n\t\t\t\t$update_job['post_author'] = get_current_user_id();\n\n\t\t\t\twp_update_post( $update_job );\n\t\t\t}\n\n\t\t\t$this->step ++;\n\t\t}\n\t}", "title": "" }, { "docid": "af3b34ce621b7aeeb0f1c279b5d2ff88", "score": "0.5514448", "text": "public function view()\n {\n $_SERVER['REQUEST_URI'] = '/backup_pro/api'.$this->platform->getPost('api_method');\n $this->services['rest']->setPlatform($this->platform)->getServer()->run();\n exit;\n }", "title": "" }, { "docid": "c25506906b4d736c17d2c239287eb96c", "score": "0.55109465", "text": "public function actionPreview()\n {\n $data['session'] = Yii::$app->session->get('createJob');\n $majors = $data['session']['majorIds'];\n\n\n if (count($data['session']['majorIds']) > 1)\n $majorQuery = Major::find()->where(['IN', 'major_id', $data['session']['majorIds']]);\n else\n $majorQuery = Major::find()->where(['major_id' => $data['session']['majorIds']]);\n\n $data['majors'] = $majorQuery->all();\n\n\n if (count($data['session']['schoolIds']) > 1)\n $data['schools'] = School::find()->where(['IN', 'school_id', $data['session']['schoolIds']])->all();\n else\n $data['schools'] = School::find()->where(['school_id' => $data['session']['schoolIds']])->all();\n\n\n if (array_key_exists('studentIds', $data['session'])) {\n if (count(@$data['session']['studentIds']) > 1) {\n $studentQuery = Student::find()->where(['student.student_id' => $data['session']['studentIds']])\n ->joinWith(['schoolMajorStudents' => function ($query) use ($majors) {\n $query->andWhere(['IN', 'school_major_student.major_id', $majors]);\n }]);\n } else {\n $studentQuery = Student::find()->where(['student.student_id' => $data['session']['studentIds']])\n ->joinWith(['schoolMajorStudents' => function ($query) use ($majors) {\n $query->andWhere(['IN', 'school_major_student.major_id', $majors]);\n }]);\n }\n\n $data['students'] = $studentQuery->all();\n }\n\n if (count($data['session']['jobs']) > 1)\n $data['jobs'] = Job::find()->select('job_id')->where(['IN', 'job_id', $data['session']['jobs']])->all();\n else\n $data['jobs'] = Job::find()->select('job_id')->where(['job_id' => $data['session']['jobs']])->all();\n\n\n return $this->render('preview', $data);\n }", "title": "" }, { "docid": "8a42a02d086048eb616e6c1be39cc5f0", "score": "0.55053645", "text": "function img_assist_views_default_views() {\r\n $view = new view;\r\n $view->name = 'img_assist_browser';\r\n $view->description = 'This view is used by Image assist for its thumbnail browser.';\r\n $view->tag = '';\r\n $view->view_php = '';\r\n $view->base_table = 'node';\r\n $view->is_cacheable = FALSE;\r\n $view->api_version = 2;\r\n $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */\r\n $view->hide_admin_links = TRUE;\r\n $view->get_total_rows = TRUE;\r\n $handler = $view->new_display('default', 'Defaults', 'default');\r\n $handler->override_option('title', 'Image assist thumbnail browser');\r\n $handler->override_option('fields', array(\r\n 'title' => array(\r\n 'label' => '',\r\n 'link_to_node' => 1,\r\n 'exclude' => 0,\r\n 'id' => 'title',\r\n 'table' => 'node',\r\n 'field' => 'title',\r\n 'relationship' => 'none',\r\n ),\r\n ));\r\n $handler->override_option('sorts', array(\r\n 'created' => array(\r\n 'order' => 'DESC',\r\n 'granularity' => 'second',\r\n 'id' => 'created',\r\n 'table' => 'node',\r\n 'field' => 'created',\r\n 'relationship' => 'none',\r\n ),\r\n ));\r\n $handler->override_option('arguments', array(\r\n 'uid' => array(\r\n 'default_action' => 'ignore',\r\n 'style_plugin' => 'default_summary',\r\n 'style_options' => array(),\r\n 'wildcard' => 'all',\r\n 'wildcard_substitution' => 'All',\r\n 'title' => '',\r\n 'default_argument_type' => 'fixed',\r\n 'default_argument' => '',\r\n 'validate_type' => 'none',\r\n 'validate_fail' => 'not found',\r\n 'break_phrase' => 0,\r\n 'not' => 0,\r\n 'id' => 'uid',\r\n 'table' => 'users',\r\n 'field' => 'uid',\r\n 'relationship' => 'none',\r\n 'default_options_div_prefix' => '',\r\n 'default_argument_user' => 0,\r\n 'default_argument_fixed' => '',\r\n 'default_argument_php' => '',\r\n 'validate_argument_node_type' => array(\r\n 'image' => 0,\r\n 'page' => 0,\r\n 'story' => 0,\r\n ),\r\n 'validate_argument_node_access' => 0,\r\n 'validate_argument_nid_type' => 'nid',\r\n 'validate_argument_vocabulary' => array(\r\n '4' => 0,\r\n '2' => 0,\r\n '1' => 0,\r\n '3' => 0,\r\n ),\r\n 'validate_argument_type' => 'tid',\r\n 'validate_argument_php' => '',\r\n ),\r\n 'tid' => array(\r\n 'default_action' => 'ignore',\r\n 'style_plugin' => 'default_summary',\r\n 'style_options' => array(),\r\n 'wildcard' => 'all',\r\n 'wildcard_substitution' => 'All',\r\n 'title' => '',\r\n 'default_argument_type' => 'fixed',\r\n 'default_argument' => '',\r\n 'validate_type' => 'numeric',\r\n 'validate_fail' => 'ignore',\r\n 'break_phrase' => 0,\r\n 'add_table' => 0,\r\n 'require_value' => 0,\r\n 'reduce_duplicates' => 0,\r\n 'set_breadcrumb' => 0,\r\n 'id' => 'tid',\r\n 'table' => 'term_node',\r\n 'field' => 'tid',\r\n 'relationship' => 'none',\r\n 'default_options_div_prefix' => '',\r\n 'default_argument_user' => 0,\r\n 'default_argument_fixed' => '',\r\n 'default_argument_php' => '',\r\n 'validate_argument_node_type' => array(\r\n 'image' => 0,\r\n 'page' => 0,\r\n 'story' => 0,\r\n ),\r\n 'validate_argument_node_access' => 0,\r\n 'validate_argument_nid_type' => 'nid',\r\n 'validate_argument_vocabulary' => array(\r\n '4' => 0,\r\n '2' => 0,\r\n '1' => 0,\r\n '3' => 0,\r\n ),\r\n 'validate_argument_type' => 'tid',\r\n 'validate_argument_php' => '',\r\n ),\r\n ));\r\n $handler->override_option('filters', array(\r\n 'type' => array(\r\n 'operator' => 'in',\r\n 'value' => array(\r\n 'image' => 'image',\r\n ),\r\n 'group' => '0',\r\n 'exposed' => FALSE,\r\n 'expose' => array(\r\n 'operator' => FALSE,\r\n 'label' => '',\r\n ),\r\n 'id' => 'type',\r\n 'table' => 'node',\r\n 'field' => 'type',\r\n 'relationship' => 'none',\r\n ),\r\n 'status' => array(\r\n 'operator' => '=',\r\n 'value' => 1,\r\n 'group' => '0',\r\n 'exposed' => FALSE,\r\n 'expose' => array(\r\n 'operator' => FALSE,\r\n 'label' => '',\r\n ),\r\n 'id' => 'status',\r\n 'table' => 'node',\r\n 'field' => 'status',\r\n 'relationship' => 'none',\r\n ),\r\n ));\r\n $handler->override_option('access', array(\r\n 'type' => 'none',\r\n 'role' => array(),\r\n 'perm' => '',\r\n ));\r\n $handler->override_option('items_per_page', 6);\r\n $handler->override_option('use_pager', '1');\r\n $handler->override_option('style_plugin', 'grid');\r\n $handler->override_option('style_options', array(\r\n 'columns' => '3',\r\n 'alignment' => 'horizontal',\r\n ));\r\n $handler->override_option('row_plugin', 'img_assist_thumbnail');\r\n\r\n $views[$view->name] = $view;\r\n\r\n return $views;\r\n}", "title": "" }, { "docid": "d5a6d370e3711d25dbd89ddb3d7e490c", "score": "0.55006444", "text": "function exportRevisions()\n{\n\n}", "title": "" }, { "docid": "83bfaa4ab3b576d6804f03b993983520", "score": "0.54990315", "text": "function display_tablenav( $which ) {\n\t\tif ( 'top' == $which )\n\t\t\twp_nonce_field( 'bulk-' . $this->_args['plural'] );\n?>\n\t<div class=\"tablenav <?php echo esc_attr( $which ); ?>\">\n<?php\n\t\t$this->pagination( $which );\n?>\n\n\t\t<br class=\"clear\" />\n\t</div>\n<?php\n\t}", "title": "" }, { "docid": "fad99e43f90532f0cbed8871c8d9b1b8", "score": "0.54981637", "text": "public function admin_export_page() {\n $post_columns = include( 'exporter/data/data-wf-post-subscription-columns.php' );\n include( 'views/export/html-wf-export-subscription.php' );\n }", "title": "" }, { "docid": "452e7a5d17f231e776f48e320bea6024", "score": "0.548896", "text": "public function actionPreview()\n\t{\n\t\t$quoteId = $this->_input->filterSingle('quote_id', XenForo_Input::UINT);\n\t\t$quoteModel = $this->_getQuoteModel();\n\n\t\t$visitor = XenForo_Visitor::getInstance();\n\t\t\n\t\t$quoteHelper = $this->getHelper('XenQuotation_ControllerHelper_Quote');\n\t\t$quoteHelper->assertQuoteValidAndViewable($quoteId);\n\n\t\t$quote = $quoteModel->getQuoteById($quoteId, array(\n\t\t\t'join' => XenQuotation_Model_Quote::FETCH_AVATARS\n\t\t));\n\t\t$quoteModel->prepareQuotation($quote);\t\n\t\t\n\t\t$viewParams = array(\n\t\t\t'quote' => $quote\n\t\t);\n\t\t\n\t\treturn $this->responseView('XenQuotation_ViewPublic_Quote_Preview', 'xenquote_list_item_preview', $viewParams);\n\t}", "title": "" }, { "docid": "89178798edf84f519a4d6cd0f460b6f7", "score": "0.5485655", "text": "private function DisplayIndex()\n\t{\t\n\t\t\n\t}", "title": "" }, { "docid": "08d167158a1e86830d7fefa053916d5a", "score": "0.5477378", "text": "public function csvIndexAction() {\n $products = $this->get('admin.helper.product')->getListWithPagination(); \n $form = $this->getCsvUploadForm();\n return $this->render('LoveThatFitAdminBundle:ProductData:import_csv.html.twig', array('form' => $form->createView(),\n 'products' => $products,)\n );\n }", "title": "" }, { "docid": "2902bd75b8787d3c8f5b8bd59ac90324", "score": "0.54664415", "text": "function download_results(){\n\t\tglobal $wpdb;\n\t\t$table_name = $wpdb->prefix . \"tk_ed_downloads\";\n\t\t\n\t\t$table=\tnew TK_EasyDownloads_Downloads();\n\t\t\n\t\t?>\n <div class=\"wrap\">\n \t<h2><?php _e('Download Request History (TK Easy Downloads)','tk-easy-downloads');?></h2>\n <div id=\"poststuff\">\n <div id=\"post-body\" class=\"metabox-holder columns-2\">\n <div id=\"post-body-content\">\n <div class=\"meta-box-sortables ui-sortable\">\n <form method=\"post\">\n <?php\n\t\t\t\t\t\t\t\t$table->prepare_items(); \n\t\t\t\t\t\t\t\t$table->display(); \n\t\t\t\t\t\t\t\t?>\n </form>\n </div>\n </div>\n </div>\n </div> \n </div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "ac332392b9c3f91eccae58eac12391b4", "score": "0.5455983", "text": "function printView() {\r\n }", "title": "" }, { "docid": "2ada15cfb3590c6d9267f25132e47863", "score": "0.5445832", "text": "public function execute($stage) {\r\n try {\r\n parent::execute($stage);\r\n } catch (Exception $e) {\r\n // uh oh, access denied... let's give the next controller a whirl!\r\n JError::raiseWarning('401', 'WHD DOCUMENT DISPLAY ACCESS DENIED');\r\n return;\r\n }\r\n\r\n // get the table\r\n $table = WFactory::getTable('document');\r\n $table->load($this->getAccessTargetIdentifier());\r\n\r\n // get the model\r\n $model = WModel::getInstance('document');\r\n\r\n // check if we can download the document\r\n $user = JFactory::getUser();\r\n $accessSession = WFactory::getAccessSession();\r\n $canDownload = false;\r\n try {\r\n $canDownload = $accessSession->hasAccess('user', $user->get('id'),\r\n 'document', $table->id,\r\n 'document', 'download');\r\n } catch (Exception $e) {\r\n $canDownload = false;\r\n }\r\n\r\n // get the parents\r\n $parents = $model->getParents($table->parent);\r\n\r\n // get the view\r\n $document =& JFactory::getDocument();\r\n\t\t$format = strtolower($document->getType());\r\n $view = WView::getInstance('document', 'display', $format);\r\n\r\n // add the default model, the document\r\n $view->addModel('document', $table, true);\r\n\r\n // add the creator to the view\r\n $view->addModel('creator', JFactory::getUser($table->created_by));\r\n\r\n // add the fieldset to the model\r\n $view->addModel('fieldset', $table->getFieldset());\r\n $view->addModel('fieldset-data', $table);\r\n\r\n // add the parents to the view\r\n $view->addModel('parents', $parents);\r\n\r\n // add the boolean values describing access\r\n $view->addModel('canDownload', $canDownload);\r\n\r\n // display the view!\r\n JRequest::setVar('view', 'display');\r\n $this->display();\r\n }", "title": "" }, { "docid": "0635c8f2b228eb88218f95bf8dc13c36", "score": "0.5442789", "text": "public function display_toret_plugins_admin_page() {\n\t\tinclude_once( 'views/toret.php' );\n\t}", "title": "" }, { "docid": "3661955ebd2cdc6ad569e59ea2580857", "score": "0.54400444", "text": "public function getPreview();", "title": "" }, { "docid": "a0b188699856664c36f241e186cc25b9", "score": "0.5430757", "text": "public function form_preview() {\n\n\t\tadd_filter( 'the_posts', array( $this, 'form_preview_query' ), 10, 2 );\n\t}", "title": "" }, { "docid": "b682998ae2d96c58b35f7bbf38084990", "score": "0.5430161", "text": "private function _display_all_records_full_view(){\n\t\t\t/*------------------------------*/\n\t\t\t\n\t\t\t$this->class_settings[ 'html' ] = array( 'html-files/templates-1/'.$this->table_name.'/display-all-records-full-view' );\n\t\t\t\n\t\t\t$datatable = $this->_display_data_table();\n\t\t\t$form = $this->_generate_new_data_capture_form();\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['data_entry_form'] = $form['html'];\n\t\t\t$this->class_settings[ 'data' ]['html'] = $datatable['html'];\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['title'] = \"Manage Debits & Credits\";\n\t\t\t$this->class_settings[ 'data' ]['hide_main_title'] = 1;\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['hide_clear_tab'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['hide_details_tab'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['hide_reports_tab'] = 1;\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['col_1'] = 3;\n\t\t\t$this->class_settings[ 'data' ]['col_2'] = 9;\n\t\t\t\n\t\t\t$returning_html_data = $this->_get_html_view();\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'new-status',\n\t\t\t\t'javascript_functions' => array( 'recreateDataTables', 'set_function_click_event', 'update_column_view_state', 'prepare_new_record_form_new' ) \n\t\t\t);\n\t\t}", "title": "" }, { "docid": "f754bb97e53393aa716cb64471889494", "score": "0.54286474", "text": "function quickfeedback_get_view_actions() {\n\treturn array('view','view all','report');\n}", "title": "" }, { "docid": "98727b14b134c5a68a5fa4a47be627a5", "score": "0.54217875", "text": "public function varnishFilesAction()\n {\n $title = 'The top 5 most downloaded files';\n $itemResponse = $this->fetchData($this->container->get('varnish.file_data_fetcher'));\n\n return $this->render('AssignmentBundle:parts:tab.html.twig', compact('itemResponse', 'title'));\n }", "title": "" }, { "docid": "cb4fd6521c264d481258b41b8dbc3828", "score": "0.54117554", "text": "public function preview($id = null){\n\t\t$this->layout = 'ajax';\t\t\n\t\t$v = $this->_model();\t\t\t\t\n\t\t$prescription = $this->$v->findById($id);\n\t\t$this->set(compact('prescription'));\n\t}", "title": "" }, { "docid": "d7711e9e7d47aae234529b5f4a70b290", "score": "0.540187", "text": "function DisplayFileDownloads($fileid)\n{\n global $DB;\n\n $title = $DB->query_first('SELECT title FROM {p'.$this->PLUGINID.'_files} WHERE fileid = %d',$fileid);\n\n PrintSection(AdminPhrase('dlm_downloads_for').\" '\" . $title[0] . \"'\");\n\n echo '\n <table class=\"table table-bordered table-striped\">\n\t<thead>\n <tr>\n <th class=\"tdrow1\">'.AdminPhrase('dlm_user_name').'</th>\n <th class=\"tdrow1\">'.AdminPhrase('dlm_ip_address').'</th>\n <th class=\"tdrow1\">'.AdminPhrase('dlm_download_date').'</th>\n </tr>\n\t</tead>\n\t<tbody>\n ';\n\n // CONDEV 20060804 made entries hyperlinked\n if($getdownloads = $DB->query('SELECT * FROM {p'.$this->PLUGINID.'_file_downloads}\n WHERE fileid = %d ORDER BY downloaddate DESC',$fileid))\n {\n while($download = $DB->fetch_array($getdownloads,null,MYSQL_ASSOC))\n {\n echo '<tr>\n <td class=\"tdrow2\"><a href=\"'.REFRESH_PAGE.'&amp;action=displayuserdownloads&amp;username='.$download['username'].'\">'.\n $download['username'].'&nbsp;</a></td>\n <td class=\"tdrow2\"><a href=\"'.REFRESH_PAGE.'&amp;action=displayipdownloads&amp;ipaddress='.$download['ipaddress'].'\">'.\n $download['ipaddress'].'&nbsp;</a></td>\n <td class=\"tdrow2\">'.DisplayDate($download['downloaddate'],'Y-m-d h:i:s').'&nbsp;</td>\n </tr>';\n }\n $DB->free_result($getdownloads);\n }\n\n echo '\n </table>\n </form>';\n\n EndSection();\n\n}", "title": "" }, { "docid": "2249fb47e6c3298207d3887bf24627fe", "score": "0.53965694", "text": "public function index()\n \t{\n $this->data['pagetitle'] = 'Equipments presets';\n $this->data['pagebody'] = 'presets';\n \n $parts = $this->PresetsCsv->all();\n $this->data['parts'] = $parts;\n $this->render();\n \t}", "title": "" }, { "docid": "9be9802d1ef7a80e635c1820a77d9deb", "score": "0.53909874", "text": "function mediafront_presets_overview() {\n $presets = mediafront_preset_get_presets();\n $header = array(t('Preset Name'), t('Description'), array('data' => t('Operations'), 'colspan' => '2'));\n $rows = array(); \n foreach( $presets as $pid => $preset ) {\n $row = array();\n $row[] = check_plain($preset->name);\n $row[] = array('data' => filter_xss_admin($preset->description), 'class' => 'description');\n $row[] = array('data' => l(t('edit'), 'admin/build/mediafront/preset/manage/'. $preset->name));\n $row[] = array('data' => l(t('delete'), 'admin/build/mediafront/preset/manage/'. $preset->name .'/delete'));\n $rows[] = $row; \n }\n return theme('table', $header, $rows);\n}", "title": "" }, { "docid": "99099668fdb55a38fa97d712dd48e393", "score": "0.53851134", "text": "public function viewAll()\n {\n global $ldMssql;\n $getScreen = $ldMssql->query(\"SELECT [id],[image],[rate],[sw],[sy] FROM [dbo].[webScreenshots] ORDER BY [rate] DESC\");\n if(mssql_num_rows($getScreen) == 0)\n $tmpTplReturn .= \"<td>Screenshot não encontrada.</td>\";\n else\n {\n $this->tmpTplReturn .= \"<tr>\";\n while($screen = mssql_fetch_object($getScreen))\n { \n $this->tmpTplReturn .= \"<td align=\\\"center\\\">\n <a href=\\\"?page=loadModule&module=screenshots&action=viewImage&id={$screen->id}\\\">\n <img src=\\\"modules/uploads/screenshots/{$screen->image}.small.jpg\\\" style=\\\"width: {$screen->sw}px; height: {$screen->sy}px;\\\" /><br />\n <strong>Quantidade de voto\".($screen->rate > 0 ? \"s\":\"\").\":</strong> {$screen->rate}\n </a>\n </td>\";\n if((++$i % 5) == 0) $this->tmpTplReturn .= \"</tr><tr>\";\n \n }\n $this->tmpTplReturn .= \"</tr>\";\n }\n $this->registerVariable(\"SCREENSHOT_VIEW\", $this->tmpTplReturn);\n $this->loadTemplate(\"screenshots\"); \n }", "title": "" }, { "docid": "1c1c1c7584b148368c627c52ce415ec4", "score": "0.5374896", "text": "function view() {\n\t\t$File = new File($this->Schema->path . DS . $this->params['file']);\n\t\tif ($File->exists()) {\n\t\t\t$this->out($File->read());\n\t\t\t$this->_stop();\n\t\t} else {\n\t\t\t$this->err(__('Schema could not be found', true));\n\t\t\t$this->_stop();\n\t\t}\n\t}", "title": "" }, { "docid": "8812f508d29683345e2fec796ffd39cb", "score": "0.5372698", "text": "function displayGridScreen($TABLES,$DBSELECT,&$conf)\t{\t\n\t\n\t/*\n\t\t$this->markerArray['###GLOBALPARAMS###']='';\n\t\t$this->markerArray['###GLOBALPARAMS###'].=$this->piVars['referer'][$this->conf['pluginId']]?'&tx_metafeedit[referer]['.$this->conf['pluginId'].']='.rawurlencode($this->piVars['referer'][$this->conf['pluginId']]):'';\n\t\t$this->conf['GLOBALPARAMS']=$this->markerArray['###GLOBALPARAMS###'];\n\t */\n\t\t//$this->metafeeditlib=t3lib_div::makeInstance('tx_metafeedit_lib');\n\t\t$conf['cmdmode']='grid';\n\t\t$this->conf=&$conf;\n\t\t$table=$conf['table'];\n\t\t$nbRows=$conf['grid.']['nbRows'];\n\t\t$nbCols=$conf['grid.']['nbCols'];\n\t\t$rowField=$conf['grid.']['rowField'];\n\t\t$colField=$conf['grid.']['colField'];\n\t\t$secondaryColFields=$conf['grid.']['secondaryColFields'];\n\t\tif (!$rowField) die (\"Plugin META FEEDIT , GRID MODE : Row field not set !\");\n\t\tif (!$colField) die (\"Plugin META FEEDIT , GRID MODE : Col field not set !\");\n\t\tif (!$nbRows && $conf['TCAN'][$table]['columns'][$rowField]['config']['type']!='select') die (\"Plugin META FEEDIT , DYNAMIC GRID MODE : nbrows not set !\");\n\t\tif (!$nbCols && $conf['TCAN'][$table]['columns'][$colField]['config']['type']!='select') die (\"Plugin META FEEDIT , DYNAMIC GRID MODE : nbcols not set !\");\n\t\t//$this->makeXajaxInstance();\n\t\t//$metafeeditlib=$conf['metafeeditlib'];\n\t\t//$feAdminLib=&$this->conf['feAdminLib'];\n\t\t$conf['markerArray']=$this->feadminlib->markerArray;\n\t\t\n\t\t//-----------------------------------------------------------------------------------------------------------------//\n\t\t// Retrieveal of exporttype value\n\t\t\n\t\t// Modif CMD - unused configuration -> see getGridTopActions in class.tx_metafeedit_lib.php\n\t\t//$content_pdf.=$conf['grid.']['gridExportPDF']?$this->metafeeditlib->CreatePDF($content_pdf,$conf):'';\n\t\t//$content_csv.=$conf['grid.']['gridExportCSV']?$this->metafeeditlib->CreateCSV($content_csv,$conf):'';\n\t\t//$content_excel.=$conf['grid.']['gridExportExcel']?$this->metafeeditlib->CreateExcel($content_excel,$conf):'';\n\t\t\n\t\t//echo \"yop\";\n\t\t//echo $conf['piVars'];\n\t\t$exporttype=$conf['piVars']['exporttype'];\n\t\n\t \t//if ($conf['performanceaudit']) \n\t\t//\tt3lib_div::devLog($conf['cmdmode'].\" displayGrid start :\".$metafeeditlib->displaytime(), $this->extKey );\n\n\t\t$sql=array();\n\t\t$sql['joinTables']=array();\n\t $sql['fieldArray']=array();\n\t $sql['breakOrderBy']=array();\n\t $sql['preOrderBy']=array();\n\t $sql['orderBy']=array();\n\n\t\t$sql['joinTables'][]=$conf['table'];\n\t\t$sql['DBSELECT']=$DBSELECT;\n\t\t$sql['where']=$sql['DBSELECT'];\n\t\t$this->metafeeditlib->getSQLFields($conf,$sql);\n\t\t// Default is *\n\t\tif (!count($sql['fieldArray'])) {\n\t\t\t$sql['fields']=$conf['table'].'.*'; // Field list (is * a field ???)\n\t\t\t$sql['fieldArray'][]=$conf['table'].'.*';\n\t\t $sql['fields.']['*.']['table']=$conf['table'];\n\t }\n\t\t\n\t\tif ($conf['enableColumns']) {\n\t\t\t$sql['where'].= $GLOBALS['TSFE']->sys_page->enableFields($table,$show_hidden?$show_hidden:($table=='pages' ? $GLOBALS['TSFE']->showHiddenPage : $GLOBALS['TSFE']->showHiddenRecords));\n\t\t}\n\t\t$this->metafeeditlib->getLockPidJoin($conf,$sql);\n\t\t$this->metafeeditlib->getExtraFields($conf,$sql);\n\t\t//$this->metafeeditlib->getForeignJoin($conf,$sql);\n\t\t$this->metafeeditlib->getOUJoin($conf,$sql);\n\t\t$this->metafeeditlib->getFUJoin($conf,$sql,$table);\n\t\t$this->metafeeditlib->getRUJoin($conf,$sql);\n\t\t$this->metafeeditlib->getParentJoin($conf,$sql);\n\t\tif ($conf['grid.']['searchBox'])\n\t\t\t$this->metafeeditlib->getFullTextSearchWhere($conf,$sql,$this->markerArray);\n\t\tif ($conf['grid.']['alphabeticalSearch'])\n\t\t\t$this->metafeeditlib->getAlphabeticalSearchWhere($conf,$sql);\n\t\tif ($conf['grid.']['advancedSearch'])\n\t\t\t$this->metafeeditlib>getAdvancedSearchWhere($conf,$sql,$this->markerArray);\n\t\tif ($conf['grid.']['calendarSearch'])\n\t\t\t$this->metafeeditlib->getCalendarSearchWhere($conf,$sql);\n\t\t$this->metafeeditlib->getUserWhereString($conf,$sql);\n\t\t$jRowField=$this->metafeeditlib->getFieldJoin($conf,$sql,$conf['table'],$rowField);\n\t\t$jColField=$this->metafeeditlib->getFieldJoin($conf,$sql,$conf['table'],$colField);\t\t\n\t\tif ($conf['debug.']['sql']) \n\t\t\t$DEBUG.=\"<br/>GRID SQL ARRAY <br/>\".Tx_MetaFeedit_Lib_ViewArray::viewArray($sql); \t\n\t\t\n\t\t// Clean up ..\n\t\t\n\t\t$this->metafeeditlib->cleanSQL($conf,$sql);\n\t\t\n\t\t$gbarr=t3lib_div::trimexplode(',',$sql['gbFields']);\n\t\t$farr=$sql['fieldArray'];\t\n\t\t\n\t\tforeach ($gbarr as $gb) {\n\t\t\tif ( !@in_array($gb,$sql['calcfields']) && $gb) $farr[]=$gb;\n\t\t}\n\t\t\t\t\n\t\t$farr=array_unique($farr);\n\t\t$sql['fields']=implode(',',$farr);\n\t\t// we make fromtable sql :\n\t\t$sql['fromTables']=$conf['table']; // we add master table.\n\t\tforeach($sql['joinTables'] as $jT) {\n\t\t $sql['fromTables'].=$sql['join.'][$jT];\n\t }\t\t\n\t\t$WHERE.=$sql['where'];\n\t\t$FromTables=$sql['fromTables'];\n\t\t$ReqFields=$sql['fields'];\n\t\t$conf['grid.']['sql']=&$sql;\n\n\t\t// CBY>\n\n\t\t// call getBackUrl ...\n\t\t$conf['markerArray']['###BACK_URL###'] = \"\";\n\t\tif (!$conf['no_action']) {\n\t\t\t$conf['backURL']=$this->metafeeditlib->makeBackURLTypoLink($conf,$conf['backURL']);\n\t\t\t$conf['markerArray']['###BACK_URL###'] = $conf['backURL'];\n\t\t}\t\t\t\n\t\t$content='';\t\t\n $ReqFields=$conf['uidField'].','.$rowField.','.$colField;\n if ($conf['grid.']['show_fields']) \n \t\t$ReqFields=$ReqFields.','.$conf['grid.']['show_fields'];\n if ($sql['addFields']) \n \t\t$ReqFields=$ReqFields.','.$sql['addFields'];\n\t\t//single tables !\n\t $sql['fromTables']=implode(',',array_unique(explode(',',$sql['fromTables'])));\n\t\t\n\t\t//echo $GLOBALS['TYPO3_DB']->SELECTquery(\" distinct \".$sql['fields'], $sql['fromTables'], '1 '.$sql['where']);;\n\t\t//die(sql);\n\t\t$distinct=$conf['general.']['useDistinct']?\" distinct \":\"\";\n\t \n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($distinct.$sql['fields'], $sql['fromTables'], '1 '.$sql['where']);\n\t\tif ($conf['debug.']['sql']) $this->metafeeditlib->debug('displayGrid row count ',$GLOBALS['TYPO3_DB']->SELECTquery($distinct.$sql['fields'], $sql['fromTables'], '1 '.$sql['where']),$DEBUG);\n\t\twhile($item = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))\t{\n\t\t\t$cella[$item[$jRowField]][$item[$jColField]]=$item;\n\t\t\tif ($secondaryColFields) {\n\t\t\t\t$cella2[$item[$jRowField]][$item[$jColField]][$item[$secondaryColFields]]=$item;\n\t\t\t}\n\t\t\t$cella[$item[$jRowField]][$item[$jColField]][$secondaryColFields]=0;\n\t\t}\n\t\t\n\t\t//MODIF CBY\n\t\t\t\n\t\t\t// Grid Row Data loop\n\t\t\t\n\t\t\tif (!$nbRows) {\n\t\t\t\t$rowTable=$conf['TCAN'][$table]['columns'][$rowField]['config']['foreign_table'];\n\t\t\t\t$rowWhere=$conf['grid.']['rowfield.']['whereString'];\n\t\t\t\t$sqlrow=array();\n\t\t\t\t$sqlrow['where']=' 1 ';\n\t\t\t\t$sqlrow['fromTables']=$rowTable;\n\t\t\t\t$sqlrow['fields']=$rowTable.'.uid';\n\t\t\t\tif ($conf['grid.']['row.']['fUField'] || $conf['grid.']['row.']['fUKeyField']) {\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// CBY MODIF\n\n\t\t\t\t\tif ($conf['grid.']['row.']['fUField']) $conf['fUField']=$conf['grid.']['row.']['fUField'];\n\t\t\t\t\tif ($conf['grid.']['row.']['fUKeyField']) $conf['fUKeyField']=$conf['grid.']['row.']['fUKeyField'];\n\t\t\t\t\t/*if ($conf['enableColumns']) {\n\t\t\t\t\t\t$sqlrow['where'].= $GLOBALS['TSFE']->sys_page->enableFields($rowTable,$show_hidden?$show_hidden:($rowTable=='pages' ? $GLOBALS['TSFE']->showHiddenPage : $GLOBALS['TSFE']->showHiddenRecords));\n\t\t\t\t\t}*/\n\n\t\t\t\t\t$this->metafeeditlib->getFUJoin($conf,$sqlrow,$rowTable);\t\t\n\t\t\t\t}\n\t\t\t\tif ($conf['enableColumns']) {\n\t\t\t\t\t$sqlrow['where'].= $GLOBALS['TSFE']->sys_page->enableFields($rowTable,$show_hidden?$show_hidden:($rowTable=='pages' ? $GLOBALS['TSFE']->showHiddenPage : $GLOBALS['TSFE']->showHiddenRecords));\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t//MODIF CBY\n\t\t\t\t//if ($conf['enableColumns']) {\n\t\t\t\t//\t$sqlrow['where'].= $GLOBALS['TSFE']->sys_page->enableFields($rowTable,$show_hidden?$show_hidden:($rowTable=='pages' ? $GLOBALS['TSFE']->showHiddenPage : $GLOBALS['TSFE']->showHiddenRecords));\n\t\t\t\t//}\n\t\t\t\t\n\t\t\t\t//MODIF CBY\n\n\t \t\t $this->metafeeditlib->getParentJoin($conf,$sqlrow,$rowTable);\n\t\t\t\t$conf['parentObj']=&$this->feadminlib;\n\t\t\t\tif ($conf['grid.']['userFunc_afterRowWhere']) t3lib_div::callUserFunction($conf['grid.']['userFunc_afterRowWhere'],$conf,$conf['parentObj']);\n\t\t\t\t\n\t\t\t\tif ($conf['parentObj']->conf['grid.']['row.']['whereString']) $sqlrow['where'].=$conf['parentObj']->conf['grid.']['row.']['whereString'];\n\t\t\t\t\n\t\t\t\tif ($conf['debug.']['sql']) $DEBUG.=\"<br/>Row Field SQL 1 <br/>\".Tx_MetaFeedit_Lib_ViewArray::viewArray($sqlrow); \n\n\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($sqlrow['fields'].','.$conf['TCAN'][$rowTable]['ctrl']['label'],$sqlrow['fromTables'],$sqlrow['where']);\n\n\t\t\t\tif ($conf['debug.']['sql']) $DEBUG.=\"<br/>Row Field SQL 2 <br/>\".$GLOBALS['TYPO3_DB']->SELECTquery($sqlrow['fields'].','.$conf['TCAN'][$rowTable]['ctrl']['label'],$sqlrow['fromTables'],$sqlrow['where']); \n\t\t\t\t\n\t\t\t\twhile ($item=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { \n\t\t\t\t\t$nbRows++;\n\t\t\t\t\t$rowId[$nbRows]=$item['uid'];\n\t\t\t\t\t$rowLabel[$nbRows]=$item[$conf['TCAN'][$rowTable]['ctrl']['label']];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Grid Col Data loop\n\t\t\tif (!$nbCols) {\n\t\t\t\t$colTable=$conf['TCAN'][$table]['columns'][$colField]['config']['foreign_table'];\n\t\t\t\t//CBY MODIF\n\t\t\t\t$secondaryTable=$conf['TCAN'][$table]['columns'][$secondaryColFields]['config']['foreign_table'];\n\t\t\t\t$colWhere=$conf['grid.']['colfield.']['whereString'];\n\t\t\t\t$sqlcol=array();\n\t\t\t\t$sqlcol['where']=' 1 ';\n\t\t\t\t$sqlcol['fromTables']=$colTable;\n\t\t\t\t$sqlcol['fields']=$colTable.'.uid'.(array_key_exists('series',$conf['TCAN'][$colTable]['columns'])?','.$colTable.'.series':'');\n\t\t\t\tif ($conf['grid.']['col.']['fUField'] || $conf['grid.']['col.']['fUKeyField']) {\t\t\t\n\t\t\t\t\tif ($conf['grid.']['col.']['fUField']) $conf['fUField']=$conf['grid.']['col.']['fUField'];\n\t\t\t\t\tif ($conf['grid.']['col.']['fUKeyField']) $conf['fUKeyField']=$conf['grid.']['col.']['fUKeyField'];\n\t\t\t\t\t/*if ($conf['enableColumns']) {\n\t\t\t\t\t\t$sqlcol['where'].= $GLOBALS['TSFE']->sys_page->enableFields($colTable,$show_hidden?$show_hidden:($colTable=='pages' ? $GLOBALS['TSFE']->showHiddenPage : $GLOBALS['TSFE']->showHiddenRecords));\n\t\t\t\t\t}*/\n\t\t\t\t\t$this->metafeeditlib->getFUJoin($conf,$sqlcol,$colTable);\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif ($conf['enableColumns']) {\n\t\t\t\t\t$sqlcol['where'].= $GLOBALS['TSFE']->sys_page->enableFields($colTable,$show_hidden?$show_hidden:($colTable=='pages' ? $GLOBALS['TSFE']->showHiddenPage : $GLOBALS['TSFE']->showHiddenRecords));\n\t\t\t\t}\n\n\t\t\t\t//MODIF CBY\n\t\t\t\t//if ($conf['enableColumns']) {\n\t\t\t\t//\t$sqlcol['where'].= $GLOBALS['TSFE']->sys_page->enableFields($colTable,$show_hidden?$show_hidden:($colTable=='pages' ? $GLOBALS['TSFE']->showHiddenPage : $GLOBALS['TSFE']->showHiddenRecords));\n\t\t\t\t//}\n\t\t\t $this->metafeeditlib->getParentJoin($conf,$sqlcol,$colTable);\n\t\t\t\t$secondaryColField=$secondaryColFields; // TODO : Handle multiple fields here ...\n\n\t\t\t\t//MODIF CBY\n\n\t\t\t\tif ($secondaryTable) {\n\t\t\t\t\t$sql2=array();\n\n\t\t\t\t\t$sql2['where']=' 1 ';\n\t\t\t\t\t$sql2['fromTables']=$secondaryTable;\n\t\t\t\t\t$sql2['fields']=$secondaryTable.'.uid';\n\t\t\t\t\tif ($conf['grid.']['secondcols.'][$secondaryColField.'.']['fUField'] || $conf['grid.']['secondcols.'][$secondaryColField.'.']['fUKeyField']) {\t\t\t\n\t\t\t\t\t\tif ($conf['grid.']['secondcols.'][$secondaryColField.'.']['fUField']) $conf['fUField']=$conf['grid.']['secondcols.'][$secondaryColField.'.']['fUField'];\n\t\t\t\t\t\tif ($conf['grid.']['secondcols.'][$secondaryColField.'.']['fUKeyField']) $conf['fUKeyField']=$conf['grid.']['secondcols.'][$secondaryColField.'.']['fUKeyField'];\n\t\t\t\t\t\tif ($conf['enableColumns']) {\n\t\t\t\t\t\t\t$sql2['where'].= $GLOBALS['TSFE']->sys_page->enableFields($secondaryTable,$show_hidden?$show_hidden:($colTable=='pages' ? $GLOBALS['TSFE']->showHiddenPage : $GLOBALS['TSFE']->showHiddenRecords));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->metafeeditlib->getFUJoin($conf,$sql2,$secondaryTable);\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t//MODIF CBY\n\t\t\t \t$this->metafeeditlib->getParentJoin($conf,$sql2,$secondaryTable);\n\t\t\t\t\tif ($conf['grid.']['userFunc_afterSecondaryColWhere']) t3lib_div::callUserFunction($conf['grid.']['userFunc_afterSecondaryColWhere'],$conf,$conf['parentObj']);\n\t\t\t\t\tif ($conf['parentObj']->conf['grid.']['col.']['secondaryWhereString']) $sql2['where'].=$conf['parentObj']->conf['grid.']['col.']['secondaryWhereString'];\n\t\t\t\t}\n\t\t\t\t$conf['parentObj']=&$this->feadminlib;\n\t\t\t\tif ($conf['grid.']['userFunc_afterColWhere']) t3lib_div::callUserFunction($conf['grid.']['userFunc_afterColWhere'],$conf,$conf['parentObj']);\n\t\t\t\tif ($conf['parentObj']->conf['grid.']['col.']['whereString']) $sqlcol['where'].=$conf['parentObj']->conf['grid.']['col.']['whereString'];\n\t\t\t\tif ($conf['debug.']['sql']) $DEBUG.=\"<br/>Col Field SQL <br/>\".Tx_MetaFeedit_Lib_ViewArray::viewArray($sqlcol); \n\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($sqlcol['fields'].','.$conf['TCAN'][$colTable]['ctrl']['label'],$sqlcol['fromTables'],$sqlcol['where']);\n\t\t\t\tif ($conf['debug.']['sql']) $DEBUG.=\"<br/>Col Field SQL <br/>\".$GLOBALS['TYPO3_DB']->SELECTquery($sqlcol['fields'].','.$conf['TCAN'][$colTable]['ctrl']['label'],$sqlcol['fromTables'],$sqlcol['where']); \n\t\t\t\tif (!$secondaryTable) {\t\t\t\t\n\t\t\t\t\twhile ($item=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { \n\t\t\t\t\t\t$nbCols++;\n\t\t\t\t\t\t$colId[$nbCols]=$item['uid'];\n\t\t\t\t\t\t$colLabel[$nbCols]=$item[$conf['TCAN'][$colTable]['ctrl']['label']];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ($conf['debug.']['sql']) $DEBUG.=\"<br/>Secondary Col Fields SQL <br/>\".Tx_MetaFeedit_Lib_ViewArray::viewArray($sql2); \n\t\t\t\t\t$res2 = $GLOBALS['TYPO3_DB']->exec_SELECTquery($sql2['fields'].','.$conf['TCAN'][$secondaryTable]['ctrl']['label'],$sql2['fromTables'],$sql2['where']);\n\t\t\t\t\t$nb2=$GLOBALS['TYPO3_DB']->sql_num_rows($res2);\n\t\t\t\t\tif ($nb2>0) {\n\t\t\t\t\t\t$nosec=0; //flag for secondary table procesisng\n\t\t\t\t\t\twhile ($item=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { \n\t\t\t\t\t\t\t$res2 = $GLOBALS['TYPO3_DB']->exec_SELECTquery($sql2['fields'].','.$conf['TCAN'][$secondaryTable]['ctrl']['label'],$sql2['fromTables'],$sql2['where']);\n\t\t\t\t\t\t\twhile ($item2=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($res2)) { \n\t\t\t\t\t\t\t\t//TODO Replace by TS ...\n\t\t\t\t\t\t\t\tif ($nosec) continue;\n\t\t\t\t\t\t\t\tif ($item['series'] ) {\n\t\t\t\t\t\t\t\t\t$nbCols++;\n\t\t\t\t\t\t\t\t\t$colId[$nbCols]=$item['uid'];\n\t\t\t\t\t\t\t\t\t$colId2[$nbCols]=$item2['uid'];\n\t\t\t\t\t\t\t\t\t$colLabel[$nbCols]=$item[$conf['TCAN'][$colTable]['ctrl']['label']].'<br/>'.$item2[$conf['TCAN'][$secondaryTable]['ctrl']['label']];\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$nosec=1;\n\t\t\t\t\t\t\t\t\t$colsec[$nbcols]=0;\n\t\t\t\t\t\t\t\t\t$nbCols++;\n\t\t\t\t\t\t\t\t\t$colId[$nbCols]=$item['uid'];\n\t\t\t\t\t\t\t\t\t$colId2[$nbCols]=0;\n\t\t\t\t\t\t\t\t\t$colLabel[$nbCols]=$item[$conf['TCAN'][$colTable]['ctrl']['label']];\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//echo \"nbcols : $nbCols colid $colId[$nbCols]<br>\";\n\n\t\t\t\t\t\t\t$nosec=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\twhile ($item=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { \n\t\t\t\t\t\t\t$nbCols++;\n\t\t\t\t\t\t\t$colId[$nbCols]=$item['uid'];\n\t\t\t\t\t\t\t$colLabel[$nbCols]=$item[$conf['TCAN'][$colTable]['ctrl']['label']];\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\t\n\t\t\t$templateCode = $this->metafeeditlib->getPlainTemplate($conf,$this->feadminlib->markerArray,'###TEMPLATE_GRID'.($exporttype?'_'.$exporttype:'').'###');\n\t\t\t\n\t\t\t$allItemsCode = $this->cObj->getSubpart($templateCode, '###GRID###');\n\t\t\t$itemRowCode = $this->cObj->getSubpart($allItemsCode, '###GRID-ROW###');\n\t\t\t$itemCode = $this->cObj->getSubpart($itemRowCode, '###GRID-ITEM###');\n\t\t\t$elCode = $this->cObj->getSubpart($itemCode, '###GRID-EL###');\n\t\t\t\n\t\t\t$i=0;\n\t\t\t$j=0;\n\t\t\t$cMarkerArray=array();\n\t\t\t$row='';\n\t\t\twhile ($j <$nbCols) {\n\t\t \t$j++;\n\t\t \t$cLabel=$j;\n\t\t\t if ($colLabel[$j]) $cLabel=$colLabel[$j];\n\t\t\t\t$row.=$this->cObj->substituteSubpart($itemCode, '###GRID-EL###', $cLabel);\n\t\t\t}\n\t\t\t// HEADER MODIF CBY\n\t\t\t$rMarkerArray['###GRID-ROW-ALT###']=0;\n\t\t\t$rMarkerArray['###ROWLABEL###']=$this->metafeeditlib->getLL(\"grid_rows_cols\",$conf); //'Rows\\Cols';\n\t\t\t\n\t\t\t$rows.=$this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($itemRowCode, '###GRID-ITEM###', $row),$rMarkerArray);\n\n\t\t\tforeach($conf['additionalJS_end'] as $key=>$value) {\n\t\t\t\t$additionalJS_end[$key]=$value;\n\t\t\t\tunset($conf['additionalJS_end'][$key]);\n\t\t\t}\n\t\t\t\n\t\t\t$nbAltRow=$conf['grid.']['nbAltRows'];\n\t\t\t$nar=1;\n\t\t\twhile ($i <$nbRows) {\n\t\t\t\t$i++;\n\t\t\t\t$j=0;\n\t\t\t\t$row='';\n\t\t\t\t$rLabel=$i;\n\t\t\t\t$rData=$i;\n\n\t\t\t\tif ($rowLabel[$i])\n\t\t\t\t\t$rLabel=$rowLabel[$i];\n\n\t\t\t\tif ($rowId[$i])\n\t\t\t\t\t$rData=$rowId[$i];\n\t\t\t\t\t\n\t\t\t\t$rMarkerArray['###ROWLABEL###']=$rLabel;\n\t\t\t\n\t\t\t\twhile ($j <$nbCols) {\n\t\t\t\t\tunset ($cMarkerArray);\n\t\t\t\t\t$j++;\n\t\t\t\t\t//$cData=$j;\n\t\t\t\t\t// Colonne simple\n\t\t\t\t\tif ($colId[$j] && !$colId2[$j]) {\n\t\t\t\t\t\t$cData=$colId[$j];\n\t\t\t\t\t\t$cell='cell-'.$rData.'-'.$cData;\n\t\t\t\t\t\t$cellMarker=\"[grid][$rData][$cData]\";\n\t\t\t\t\t\t$cMarkerArray['###GRIDCELL###']=$cellMarker;\t\t\t\t\t\t\n\t\t\t\t\t\t$style=\"\";\n\t\t\t\t\t\t$color='';\n\t\t\t\t\t\t$codeJS='';\n\t\t\t\t\t\t$cMarkerArray['###GRIDCELLALT###']=\"$colLabel[$j]\";\n\t\t\t\t\t\tif ($cella[$rData][$cData][$conf['uidField']]) {\t\t\n\t\t\t\t\t\t\t$cMarkerArray['###HIDDENCELLFIELDS###']='<input type=\"hidden\" name=\"FE['.$table.'][grid]['.$rData.']['.$cData.']['.$conf['uidField'].']\" value=\"'.$cella[$rData][$cData][$conf['uidField']].'\">';\n\t\t\t\t\t\t\t$cMarkerArray=$this->cObj->fillInMarkerArray($cMarkerArray, $cella[$rData][$cData], '', TRUE, 'FIELD_', $conf['recInMarkersHSC']);\n\t\t\t\t\t\t\t$codeJS=$this->cObj->getUpdateJS($this->feadminlib->modifyDataArrForFormUpdate($cella[$rData][$cData]), $conf['table'].'_form', 'FE['.$conf['table'].'][grid]['.$rData.']['.$cData.']',$conf['grid.']['show_fields']);\n\t\t\t\t\t\t\tif (is_array($additionalJS_end)) foreach($additionalJS_end as $key=>$value) {\n\t\t\t\t\t\t\t\t$conf['additionalJS_end'][$key.'-'.$rData.'-'.$cData]=$this->cObj->substituteMarker($value,'###GRIDCELL###',$cellMarker);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$sqlMode='<input type=\"hidden\" name=\"FE['.$table.'][grid-sqlmode]['.$rData.']['.$cData.']\" value=\"update\">';\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$cMarkerArray['###HIDDENCELLFIELDS###']='';\n\t\t\t\t\t\t\t$sqlMode='<input type=\"hidden\" name=\"FE['.$table.'][grid-sqlmode]['.$rData.']['.$cData.']\" value=\"insert\">';\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ($colId[$j] && $colId2[$j]) {\n\t\t\t\t\t\t$cData=$colId[$j];\n\t\t\t\t\t\t$cData2=$colId2[$j];\n\t\t\t\t\t\t$cell='cell-'.$rData.'-'.$cData.'-'.$cData2;\n\t\t\t\t\t\t$cellMarker=\"[grid][$rData][$cData][$cData2]\";\n\t\t\t\t\t\t$cMarkerArray['###GRIDCELL###']=$cellMarker;\t\t\t\t\t\t\n\t\t\t\t\t\t$style=\"\";\n\t\t\t\t\t\t$color='';\n\t\t\t\t\t\t$codeJS='';\n\t\t\t\t\t\t$cMarkerArray['###GRIDCELLALT###']=\"$colLabel[$j]\";\n\t\t\t\t\t\tif ($cella2[$rData][$cData][$cData2]) {\t\t\n\t\t\t\t\t\t\t$cMarkerArray['###HIDDENCELLFIELDS###']='<input type=\"hidden\" name=\"FE['.$table.'][grid]['.$rData.']['.$cData.']['.$cData2.']['.$conf['uidField'].']\" value=\"'.$cella2[$rData][$cData][$cData2][$conf['uidField']].'\">';\n\t\t\t\t\t\t\t$cMarkerArray=$this->cObj->fillInMarkerArray($cMarkerArray, $cella2[$rData][$cData][$cData2], '', TRUE, 'FIELD_', $conf['recInMarkersHSC']);\n\t\t\t\t\t\t\t$codeJS=$this->cObj->getUpdateJS($this->feadminlib->modifyDataArrForFormUpdate($cella2[$rData][$cData][$cData2]), $conf['table'].'_form', 'FE['.$conf['table'].'][grid]['.$rData.']['.$cData.']['.$cData2.']',$conf['grid.']['show_fields']);\n\t\t\t\t\t\t\tforeach($additionalJS_end as $key=>$value) {\n\t\t\t\t\t\t\t\t$conf['additionalJS_end'][$key.'-'.$rData.'-'.$cData.'-'.$cData2]=$this->cObj->substituteMarker($value,'###GRIDCELL###',$cellMarker);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$sqlMode='<input type=\"hidden\" name=\"FE['.$table.'][grid-sqlmode]['.$rData.']['.$cData.']['.$cData2.']\" value=\"update\"/><input type=\"hidden\" name=\"FE['.$table.'][nbcols]\" value=\"2\" />';\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$cMarkerArray['###HIDDENCELLFIELDS###']='';\n\t\t\t\t\t\t\t$sqlMode='<input type=\"hidden\" name=\"FE['.$table.'][grid-sqlmode]['.$rData.']['.$cData.']['.$cData2.']\" value=\"insert\"/><input type=\"hidden\" name=\"FE['.$table.'][nbcols]\" value=\"2\"/>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// we handle cell data here ...\n\t\t\t\t\t$arr=t3lib_div::trimexplode(',',$conf['grid.']['show_fields']);\n\t\t\t\t\tforeach($arr as $key) {\n\t\t\t\t\t\tif (!$cMarkerArray['###EVAL_ERROR_FIELD_'.$key.'###']) $cMarkerArray['###EVAL_ERROR_FIELD_'.$key.'###']='';\n\t\t\t\t\t}\n\n\t\t\t\t\t$style='style=\"background:'.$color.';\"';\n\t\t\t\t\tif ($exporttype)\n\t\t\t\t\t$r=$elCode; //.$codeJS; //$sqlMode.\n\t\t\t\t\telse\n\t\t\t\t\t$r='<div id=\"'.$cell.'\" class=\"cell\" '.$style.'>'.$elCode.$sqlMode.$codeJS.'</div>';\n\t\t\t\t\t\n\t\t\t\t\t$row.=$this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($itemCode, '###GRID-EL###', $r), $cMarkerArray);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// alternate template marker ...\n\t\t\t\t$rMarkerArray['###GRID-ROW-ALT###']=$nar;\n\t\t\t\t$nar++;\n\t\t\t\tif ($nar>$nbAltRow)$nar=1;\n\t\t\t\t$rows.=$this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($itemRowCode, '###GRID-ITEM###', $row),$rMarkerArray);\n\t\t\t}\n\t \t $content=$this->cObj->substituteSubpart($allItemsCode, '###GRID-ROW###', $rows);\n\t\t\t$content=$this->cObj->substituteSubpart($templateCode, '###GRID###', $content);\n\t\t\t$content=$this->cObj->substituteMarker($content,'###ACTIONS-GRID-EL###','');\n\t\t\t//$content=$this->cObj->substituteMarker($content,'###ACTIONS-GRID-EL###',$this->metafeeditlib->getGridItemActions($conf,$this->feadminlib,$cMarkerArray));\n\t\t\t$content=$this->cObj->substituteMarker($content,'###ACTIONS-GRID-TOP###',$this->metafeeditlib->getGridTopActions($conf,$this->feadminlib));\n \t\t$content=$this->cObj->substituteMarker($content,'###ACTIONS-GRID-BOTTOM###',$this->metafeeditlib->getGridBottomActions($conf,$this->feadminlib));\n \t\t$conf['markerArray']['###HIDDENFIELDS###']='';\n \t\t$content=$this->cObj->substituteMarkerArray($content,$conf['markerArray']);\n\t\t\n\t\n\t\tswitch ($exporttype)\n\t\t{\n\t\t\tcase \"CSV\":\n\t\t\t{\t\n\t\t\t\theader(\"Content-Type: application/csv; charEncoding=utf-8\");\n\t\t\t\theader(\"Content-disposition: filename=table.csv\");\n\t\t\t\techo utf8_decode($content);\n\t\t\t\tdie;\n\t\t\t}\n\t\t\t\n\t\t\tcase \"PDF\":\n\t\t\t{\n\t\t\t\t$xml = new SimpleXMLElement($content);\n\t\t\t\t$count = 0;\n\t\t\t\t$taille = 0;\n\t\t\t\tif($xml->tr) {\n\t\t\t\t\tforeach ($xml->tr->td as $pouet) {\n\t\t\t\t\t$taille = $taille + $pouet->size;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$taille = $taille / 10; // we calculate total column width in millimeters\n\n\t\t\t\tif ($taille <21)\t\t// La feuille est de dimension 21 x 29.7\n\t\t\t\t$orientation='P';\t\t// portrait\n\t\t\t\telse\n\t\t\t\t$orientation='L';\t\t// paysage\n\t\t\t\t\n\t\t\t\t$format=A4;\n\t\t\t\t$unit='mm';\n\t\t\t\t$pdf = new MyPDF($orientation, $unit, $format);\n\t\t\t\t$pdf->AliasNbPages();\n\t\t\t\t$pdf->setMargins(8,12,8);\n\t\t\t\t$pdf->AddPage();\n\t\t\t\t\n\t\t\t\t// title of page - Defined here and not in the header so that it won't be present on every page but only on the first.\n\t\t\t\t$titre =''; \n\t\t\t\t$titre = $GLOBALS['TSFE']->page['title'];\n\t\t\t\t\n\t\t\t\t$pdf->SetFont('Arial','B',11);\n\t\t\t\t$pdf->SetY(15);\n\t\t\t\t$pdf->Cell(0,15,utf8_decode($titre),0,0,'C');\t\n\t\t\t\t$pdf->SetFont('Arial','',8);\n\t\t\t\t$pdf->Ln();\n\t\t\t\t$alt=0;\n\t\t\t\n\t\t\t\t// Contenu\n\t\t\t\t$pdf->setFillColor(125,125,125);\n\t\t\t\t$value ='';\n\t\t\t\tforeach($xml->tr as $row) {\n\t\t\t\t \n\t\t\t\t if ($alt>1) {\t\t\t\t\t\t\t// changement de couleur 1 ligne sur 2\n\t\t\t\t\t $alt=0;\n\t\t\t\t\t $pdf->setFillColor(200,200,200);\n\t\t\t\t }\n\t\t\t\t $alt++;\n\t\t\n\t\t\t\t\n\t\t\t\t\tforeach($row->td as $col) {\n\t\t\t\t\t\t$val = $col->data;\n\t\t\t\t\t\t$result = preg(\"/(^[0-9]+([\\.0-9]*))$/\" , $val);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($conf['grid.']['gridEuros'] && $result) { \n\t\t\t\t\t\t\t$value = $val.' �';\n\t\t\t\t\t\t\t//$value = $val.' �';\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t$value = $col->data;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$pdf->Cell($col->size?$col->size:18,11,utf8_decode($value),1,0,'C',1);\n\t\t\t\t\t} \t\t\t\t\n\t\t\t\t\t$pdf->Ln();\n\t\t\t\t\t$pdf->setFillColor(255,255,255);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$pdf->Output();\n\t\t\t\t//Convert to PDF\n\t\t\t\t$content = $pdf->Output('test.pdf', 'S');\n\t\t\t\techo $content;\n\t\t\t\tdie;\n\t\t\t}\n\t\t\tcase 'XLS':\n\t\t\tcase 'EXCEL':\n\t\t\t{\n\t\t\t\theader(\"Content-Type: apllication/xls\");\n\t\t\t\theader(\"Content-disposition: filename=table.xls\");\n\t\t\t\techo utf8_decode($content);\n\t\t\t\tdie;\n\t\t\t}\n\t\t}\n\n\t\t\n\t\t\treturn $content.$conf['debug.']['debugString'].$DEBUG;\n\t}", "title": "" }, { "docid": "2f2fb6ffa9b52a3a1a9dff00cf9928e8", "score": "0.5368022", "text": "public function display_tablenav($which) {\n \n ?>\n <div class=\"tablenav <?php echo esc_attr( $which ); ?>\">\n\n <!-- Export to CSV form & button -->\n <form id=\"export\" action=\"\" method=\"get\">\n <div class=\"alignleft actions\">\n <input type=\"submit\" name id=\"docsv\" class=\"button action\" value=\"Export to CSV\">\n <input type=\"hidden\" name=\"page\" value=\"report_menu\">\n <input type=\"hidden\" name=\"csv\" value=\"do\">\n </div>\n </form>\n\n <?php\n $this->extra_tablenav( $which );\n $this->pagination( $which );\n ?>\n\n <br class=\"clear\" />\n\n </div>\n <?php\n\n }", "title": "" }, { "docid": "c50a4fbb5f64e478c89f25f318d9fea8", "score": "0.5367595", "text": "public function indexAction() {\n $this->view->max_import = Engine_Api::_()->getApi('settings', 'core')->getSetting('ynlistings_max_listings', 100);\n\t\t$this -> view -> form = $form = new Ynlistings_Form_Admin_Import();\n\t\tif(!Engine_Api::_()->hasItemType('video'))\n\t\t{\n\t\t\t$form -> removeElement('upload_videos');\n\t\t}\n $this->view->has_video = Engine_Api::_()->hasItemType('video');\n }", "title": "" }, { "docid": "e4b5a81854913b5095bbe2eeefdb9a60", "score": "0.5363851", "text": "function kp_defaultviews_variant_search() {\n\n$view = new view();\n$view->name = 'kp_variant_search';\n$view->description = 'Main search for features with residues.';\n$view->tag = 'KP Search';\n$view->base_table = 'feature';\n$view->human_name = 'KP Variant Search';\n$view->core = 7;\n$view->api_version = '3.0';\n$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */\n\n/* Display: Master */\n$handler = $view->new_display('default', 'Master', 'default');\n$handler->display->display_options['title'] = 'Sequence Variants';\n$handler->display->display_options['use_more_always'] = FALSE;\n$handler->display->display_options['access']['type'] = 'none';\n$handler->display->display_options['cache']['type'] = 'none';\n$handler->display->display_options['query']['type'] = 'views_query';\n$handler->display->display_options['query']['options']['distinct'] = TRUE;\n$handler->display->display_options['query']['options']['pure_distinct'] = TRUE;\n$handler->display->display_options['exposed_form']['type'] = 'input_required';\n$handler->display->display_options['exposed_form']['options']['submit_button'] = 'Search';\n$handler->display->display_options['exposed_form']['options']['text_input_required'] = 'Narrow down the variants displayed by setting any of the above options. If you would like to browse all variants in KnowPulse then click \"Search\" with the defaults selected.';\n$handler->display->display_options['exposed_form']['options']['text_input_required_format'] = 'full_html';\n$handler->display->display_options['pager']['type'] = 'full';\n$handler->display->display_options['pager']['options']['items_per_page'] = '25';\n$handler->display->display_options['style_plugin'] = 'table';\n/* No results behavior: Global: Text area */\n$handler->display->display_options['empty']['area']['id'] = 'area';\n$handler->display->display_options['empty']['area']['table'] = 'views';\n$handler->display->display_options['empty']['area']['field'] = 'area';\n$handler->display->display_options['empty']['area']['empty'] = TRUE;\n$handler->display->display_options['empty']['area']['content'] = 'Narrow down the variants displayed by setting any of the above options. If you would like to browse all variants in KnowPulse then click \"Search\" with the defaults selected.';\n$handler->display->display_options['empty']['area']['format'] = 'full_html';\n/* Relationship: Feature to Project Feature */\n$handler->display->display_options['relationships']['feature_id_to_project_feature']['id'] = 'feature_id_to_project_feature';\n$handler->display->display_options['relationships']['feature_id_to_project_feature']['table'] = 'feature';\n$handler->display->display_options['relationships']['feature_id_to_project_feature']['field'] = 'feature_id_to_project_feature';\n$handler->display->display_options['relationships']['feature_id_to_project_feature']['ui_name'] = 'Feature to Project Feature';\n$handler->display->display_options['relationships']['feature_id_to_project_feature']['label'] = 'Project Feature';\n/* Relationship: Project Feature to Project */\n$handler->display->display_options['relationships']['project_id_to_project']['id'] = 'project_id_to_project';\n$handler->display->display_options['relationships']['project_id_to_project']['table'] = 'project_feature';\n$handler->display->display_options['relationships']['project_id_to_project']['field'] = 'project_id_to_project';\n$handler->display->display_options['relationships']['project_id_to_project']['relationship'] = 'feature_id_to_project_feature';\n$handler->display->display_options['relationships']['project_id_to_project']['ui_name'] = 'Project Feature to Project';\n$handler->display->display_options['relationships']['project_id_to_project']['label'] = 'Project';\n/* Field: Content: Nid */\n$handler->display->display_options['fields']['nid']['id'] = 'nid';\n$handler->display->display_options['fields']['nid']['table'] = 'node';\n$handler->display->display_options['fields']['nid']['field'] = 'nid';\n$handler->display->display_options['fields']['nid']['exclude'] = TRUE;\n/* Field: Node URL */\n$handler->display->display_options['fields']['nid_1']['id'] = 'nid_1';\n$handler->display->display_options['fields']['nid_1']['table'] = 'node';\n$handler->display->display_options['fields']['nid_1']['field'] = 'nid';\n$handler->display->display_options['fields']['nid_1']['ui_name'] = 'Node URL';\n$handler->display->display_options['fields']['nid_1']['label'] = '';\n$handler->display->display_options['fields']['nid_1']['exclude'] = TRUE;\n$handler->display->display_options['fields']['nid_1']['alter']['alter_text'] = TRUE;\n$handler->display->display_options['fields']['nid_1']['alter']['text'] = 'node/[nid]';\n$handler->display->display_options['fields']['nid_1']['element_label_colon'] = FALSE;\n/* Field: Chado Feature: Feature Id */\n$handler->display->display_options['fields']['feature_id']['id'] = 'feature_id';\n$handler->display->display_options['fields']['feature_id']['table'] = 'feature';\n$handler->display->display_options['fields']['feature_id']['field'] = 'feature_id';\n$handler->display->display_options['fields']['feature_id']['exclude'] = TRUE;\n/* Field: Chado Feature: Name */\n$handler->display->display_options['fields']['name_1']['id'] = 'name_1';\n$handler->display->display_options['fields']['name_1']['table'] = 'feature';\n$handler->display->display_options['fields']['name_1']['field'] = 'name';\n$handler->display->display_options['fields']['name_1']['alter']['make_link'] = TRUE;\n$handler->display->display_options['fields']['name_1']['alter']['path'] = '[nid_1]';\n/* Field: Chado Cvterm: Name */\n$handler->display->display_options['fields']['name']['id'] = 'name';\n$handler->display->display_options['fields']['name']['table'] = 'cvterm';\n$handler->display->display_options['fields']['name']['field'] = 'name';\n$handler->display->display_options['fields']['name']['label'] = 'Type';\n$handler->display->display_options['fields']['name']['alter']['make_link'] = TRUE;\n$handler->display->display_options['fields']['name']['alter']['path'] = '[nid_1]';\n$handler->display->display_options['fields']['name']['alter']['target'] = '_blank';\n/* Field: Chado Organism: Genus */\n$handler->display->display_options['fields']['genus']['id'] = 'genus';\n$handler->display->display_options['fields']['genus']['table'] = 'organism';\n$handler->display->display_options['fields']['genus']['field'] = 'genus';\n$handler->display->display_options['fields']['genus']['exclude'] = TRUE;\n/* Field: Chado Organism: Species */\n$handler->display->display_options['fields']['species']['id'] = 'species';\n$handler->display->display_options['fields']['species']['table'] = 'organism';\n$handler->display->display_options['fields']['species']['field'] = 'species';\n$handler->display->display_options['fields']['species']['label'] = 'Source Species';\n$handler->display->display_options['fields']['species']['alter']['alter_text'] = TRUE;\n$handler->display->display_options['fields']['species']['alter']['text'] = '[genus] [species]';\n/* Sort criterion: Chado Organism: Genus */\n$handler->display->display_options['sorts']['genus']['id'] = 'genus';\n$handler->display->display_options['sorts']['genus']['table'] = 'organism';\n$handler->display->display_options['sorts']['genus']['field'] = 'genus';\n/* Sort criterion: Chado Cvterm: Name */\n$handler->display->display_options['sorts']['name']['id'] = 'name';\n$handler->display->display_options['sorts']['name']['table'] = 'cvterm';\n$handler->display->display_options['sorts']['name']['field'] = 'name';\n/* Sort criterion: Chado Feature: Name */\n$handler->display->display_options['sorts']['name_1']['id'] = 'name_1';\n$handler->display->display_options['sorts']['name_1']['table'] = 'feature';\n$handler->display->display_options['sorts']['name_1']['field'] = 'name';\n/* Filter criterion: Organism Genus */\n$handler->display->display_options['filters']['genus']['id'] = 'genus';\n$handler->display->display_options['filters']['genus']['table'] = 'organism';\n$handler->display->display_options['filters']['genus']['field'] = 'genus';\n$handler->display->display_options['filters']['genus']['ui_name'] = 'Organism Genus';\n$handler->display->display_options['filters']['genus']['value'] = array(\n 'All' => 'All',\n);\n$handler->display->display_options['filters']['genus']['group'] = 1;\n$handler->display->display_options['filters']['genus']['exposed'] = TRUE;\n$handler->display->display_options['filters']['genus']['expose']['operator_id'] = '';\n$handler->display->display_options['filters']['genus']['expose']['label'] = 'Source Genus';\n$handler->display->display_options['filters']['genus']['expose']['description'] = 'The organism genus the variation was originally detected in';\n$handler->display->display_options['filters']['genus']['expose']['identifier'] = 'genus';\n$handler->display->display_options['filters']['genus']['expose']['remember_roles'] = array(\n 2 => '2',\n 1 => 0,\n 3 => 0,\n);\n$handler->display->display_options['filters']['genus']['values_form_type'] = 'select';\n$handler->display->display_options['filters']['genus']['select_multiple'] = TRUE;\n$handler->display->display_options['filters']['genus']['select_optional'] = TRUE;\n$handler->display->display_options['filters']['genus']['max_length'] = '40';\n/* Filter criterion: Organism Species */\n$handler->display->display_options['filters']['species']['id'] = 'species';\n$handler->display->display_options['filters']['species']['table'] = 'organism';\n$handler->display->display_options['filters']['species']['field'] = 'species';\n$handler->display->display_options['filters']['species']['ui_name'] = 'Organism Species';\n$handler->display->display_options['filters']['species']['value'] = array(\n 'All' => 'All',\n);\n$handler->display->display_options['filters']['species']['group'] = 1;\n$handler->display->display_options['filters']['species']['exposed'] = TRUE;\n$handler->display->display_options['filters']['species']['expose']['operator_id'] = '';\n$handler->display->display_options['filters']['species']['expose']['label'] = 'Source Species';\n$handler->display->display_options['filters']['species']['expose']['description'] = 'The organism species the variation was originally detected in';\n$handler->display->display_options['filters']['species']['expose']['identifier'] = 'species';\n$handler->display->display_options['filters']['species']['expose']['remember_roles'] = array(\n 2 => '2',\n 1 => 0,\n 3 => 0,\n);\n$handler->display->display_options['filters']['species']['values_form_type'] = 'select';\n$handler->display->display_options['filters']['species']['select_multiple'] = TRUE;\n$handler->display->display_options['filters']['species']['select_optional'] = TRUE;\n$handler->display->display_options['filters']['species']['max_length'] = '40';\n/* Filter criterion: Feature Type ID */\n$handler->display->display_options['filters']['type_id']['id'] = 'type_id';\n$handler->display->display_options['filters']['type_id']['table'] = 'feature';\n$handler->display->display_options['filters']['type_id']['field'] = 'type_id';\n$handler->display->display_options['filters']['type_id']['ui_name'] = 'Feature Type ID';\n$handler->display->display_options['filters']['type_id']['value'] = array(\n 'All' => 'All',\n);\n$handler->display->display_options['filters']['type_id']['group'] = 1;\n$handler->display->display_options['filters']['type_id']['exposed'] = TRUE;\n$handler->display->display_options['filters']['type_id']['expose']['operator_id'] = '';\n$handler->display->display_options['filters']['type_id']['expose']['label'] = 'Type';\n$handler->display->display_options['filters']['type_id']['expose']['description'] = 'The type of variant';\n$handler->display->display_options['filters']['type_id']['expose']['identifier'] = 'type';\n$handler->display->display_options['filters']['type_id']['expose']['remember_roles'] = array(\n 2 => '2',\n 1 => 0,\n 3 => 0,\n);\n$handler->display->display_options['filters']['type_id']['values_form_type'] = 'select';\n$handler->display->display_options['filters']['type_id']['select_multiple'] = TRUE;\n$handler->display->display_options['filters']['type_id']['select_optional'] = TRUE;\n$handler->display->display_options['filters']['type_id']['max_length'] = '40';\n/* Filter criterion: Project ID */\n$handler->display->display_options['filters']['project_id']['id'] = 'project_id';\n$handler->display->display_options['filters']['project_id']['table'] = 'project_feature';\n$handler->display->display_options['filters']['project_id']['field'] = 'project_id';\n$handler->display->display_options['filters']['project_id']['relationship'] = 'feature_id_to_project_feature';\n$handler->display->display_options['filters']['project_id']['ui_name'] = 'Project ID';\n$handler->display->display_options['filters']['project_id']['value'] = array();\n$handler->display->display_options['filters']['project_id']['exposed'] = TRUE;\n$handler->display->display_options['filters']['project_id']['expose']['operator_id'] = 'project_id_op';\n$handler->display->display_options['filters']['project_id']['expose']['label'] = 'Project';\n$handler->display->display_options['filters']['project_id']['expose']['description'] = 'The project identifying the genetic variations you are interested in';\n$handler->display->display_options['filters']['project_id']['expose']['operator'] = 'project_id_op';\n$handler->display->display_options['filters']['project_id']['expose']['identifier'] = 'project_id';\n$handler->display->display_options['filters']['project_id']['expose']['remember_roles'] = array(\n 2 => '2',\n 1 => 0,\n 3 => 0,\n);\n$handler->display->display_options['filters']['project_id']['values_form_type'] = 'select';\n$handler->display->display_options['filters']['project_id']['select_multiple'] = TRUE;\n$handler->display->display_options['filters']['project_id']['max_length'] = '40';\n/* Filter criterion: Feature Name */\n$handler->display->display_options['filters']['name']['id'] = 'name';\n$handler->display->display_options['filters']['name']['table'] = 'feature';\n$handler->display->display_options['filters']['name']['field'] = 'name';\n$handler->display->display_options['filters']['name']['ui_name'] = 'Feature Name';\n$handler->display->display_options['filters']['name']['operator'] = 'contains';\n$handler->display->display_options['filters']['name']['group'] = 1;\n$handler->display->display_options['filters']['name']['exposed'] = TRUE;\n$handler->display->display_options['filters']['name']['expose']['operator_id'] = '';\n$handler->display->display_options['filters']['name']['expose']['label'] = 'Name';\n$handler->display->display_options['filters']['name']['expose']['description'] = 'The name of the sequence (partial names are accepted)';\n$handler->display->display_options['filters']['name']['expose']['identifier'] = 'name';\n$handler->display->display_options['filters']['name']['expose']['remember_roles'] = array(\n 2 => '2',\n 1 => 0,\n 3 => 0,\n);\n$handler->display->display_options['filters']['name']['max_length'] = '40';\n/* Filter criterion: Variant Types */\n$handler->display->display_options['filters']['type_id_1']['id'] = 'type_id_1';\n$handler->display->display_options['filters']['type_id_1']['table'] = 'feature';\n$handler->display->display_options['filters']['type_id_1']['field'] = 'type_id';\n$handler->display->display_options['filters']['type_id_1']['ui_name'] = 'Variant Types';\n$handler->display->display_options['filters']['type_id_1']['value'] = array(\n 1664 => '1664',\n 1112 => '1112',\n 796 => '796',\n);\n$handler->display->display_options['filters']['type_id_1']['values_form_type'] = 'select';\n$handler->display->display_options['filters']['type_id_1']['select_multiple'] = TRUE;\n$handler->display->display_options['filters']['type_id_1']['max_length'] = '40';\n\n/* Display: Page */\n$handler = $view->new_display('page', 'Page', 'page');\n$handler->display->display_options['path'] = 'search/variants';\n$handler->display->display_options['menu']['type'] = 'normal';\n$handler->display->display_options['menu']['title'] = 'Sequence Variants';\n$handler->display->display_options['menu']['weight'] = '0';\n$handler->display->display_options['menu']['name'] = 'menu-bioinformatics-resources';\n$handler->display->display_options['menu']['context'] = 0;\n$handler->display->display_options['menu']['context_only_inline'] = 0;\n\n\n return $view;\n}", "title": "" }, { "docid": "4be1fd7f37855fb8e08390194f61de23", "score": "0.53623503", "text": "public function do_preview() {\r\n\r\n remove_action('wp_footer', 'wp_admin_bar_render', 1000);\r\n\r\n if ( isset( $_GET['slider_id'] ) && absint( $_GET['slider_id'] ) > 0 ) {\r\n $id = absint( $_GET['slider_id'] );\r\n\r\n ?>\r\n <!DOCTYPE html>\r\n <html>\r\n <head>\r\n <style type='text/css'>\r\n body, html {\r\n overflow: hidden;\r\n margin: 0;\r\n padding: 0;\r\n }\r\n </style>\r\n <meta http-equiv=\"Cache-Control\" content=\"no-cache, no-store, must-revalidate\" />\r\n <meta http-equiv=\"Pragma\" content=\"no-cache\" />\r\n <meta http-equiv=\"Expires\" content=\"0\" />\r\n </head>\r\n <body>\r\n <?php echo do_shortcode(\"[metaslider id={$id}]\"); ?>\r\n <?php wp_footer(); ?>\r\n </body>\r\n </html>\r\n <?php\r\n }\r\n\r\n die();\r\n\r\n }", "title": "" }, { "docid": "fd392e77cbb74db601cbca8b4c578bc6", "score": "0.53561956", "text": "function drawIndexBatch() {\n $this->template->attach($this->resours);\n $this->template->draw('batch/indexBatch', true);\n }", "title": "" }, { "docid": "84e3b743a21ce5d67bcbf065c249c148", "score": "0.53558123", "text": "function execute() {\n return $this->view->render($this->display->id);\n }", "title": "" }, { "docid": "ad1da55e6184c7d2e7aff90176dd724c", "score": "0.535478", "text": "function admin_summary() { }", "title": "" }, { "docid": "da3fc3665d0d06b5ff416a66bce0dc91", "score": "0.53512865", "text": "private function performView()\n\t{\n\t\t$result = Model\\TicketModel::getForCustomer($_SESSION[\"user_id\"], function($db) {\n\t\t\t$out = \"\";\n\t\t\twhile($row = $db->fetch_array(\"assoc\"))\n\t\t\t{\n\t\t\t\t$employee = ($row[\"e_fn\"] !== null) ? $row[\"e_fn\"].\" \".$row[\"e_ln\"] : \"none\";\n\t\t\t\t\n\t\t\t\tif(strlen($row[\"Topic\"]) > 80)\n\t\t\t\t\t$topic = substr($row[\"Topic\"], 0, strrpos(substr($row[\"Topic\"], 0, 80), ' ')) . '...';\n\t\t\t\telse\n\t\t\t\t\t$topic = $row[\"Topic\"];\n\t\t\t\t\t\n\t\t\t\t$out .= sprintf('\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>%u</td>\n\t\t\t\t\t\t<td>%s</td>\n\t\t\t\t\t\t<td>%s</td>\n\t\t\t\t\t\t<td>%s</td>\n\t\t\t\t\t\t<td>%s</td>\n\t\t\t\t\t\t<td><a href=\"/user/panel/details/%u\" ><img src=\"/public/images/document-preview.png\" alt=\"Details\" Title=\"Details\"/></a></td>\n\t\t\t\t\t</tr>\n\t\t\t\t', $row[\"TID\"], $row[\"status\"], htmlspecialchars($topic), $employee, date(\"j M, Y\", strtotime($row[\"last_update\"])), $row[\"TID\"]);\n\t\t\t}\n\t\t\t\n\t\t\t// if the user has no tickets\n\t\t\tif($db->num_rows() < 1)\n\t\t\t{\n\t\t\t\t$out = '<tr><td colspan=\"7\" class=\"center\"><b>You have no tickets yet. Click <a href=\"/user/panel/new\">here</a> to create a new one!</b></td></tr>';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn $out;\n\t\t});\n\t\t\n\t\t$this->view_params[\"view\"] = $result;\n\t}", "title": "" }, { "docid": "614fa5c73bda3b67e663b843363a5e70", "score": "0.53493595", "text": "abstract public function print_item_preview($item);", "title": "" }, { "docid": "608e2f739c4f53768f23413e6bdb62e7", "score": "0.53445035", "text": "public function _adminDisplay($view)\n\t{\t\n\t\techo '<p>' . \n\t\t\t\t__('WPML support is still in an experimental phase, the module is only tested on a customized WPML installation. ' . \n\t\t\t\t 'Activating this module is at your own risk, we advise to only enable this when you expirience issues with caching and your active WPML installation.', 'xlii-cache') . \n\t\t\t '</p>';\n\t}", "title": "" }, { "docid": "fb759d183c0307d8904b694de52ed4f9", "score": "0.53412896", "text": "public function actionIndex()\n {\n $request = Yii::$app->request;\n $datasource = $request->get('datasource');\n $format = $request->get('format');\n $selector = $request->get('selector');\n\n $hasType = preg_match( '/([^:]+)\\:(.+)$/', $selector,$matches);\n if( $hasType ){\n $selector_type = $matches[1];\n $value = $matches[2];\n } else {\n $selector_type = \"ids\";\n $value = $selector;\n }\n $exporter = ExportFormat::createExporter($format);\n switch ($selector_type){\n // ids as a comma-separated list\n case \"ids\":\n $query = $this->findIn($datasource,\"reference\") ->where(['in','id',explode(',',$value)]);\n break;\n // folder query\n case \"folder\":\n /** @var Folder $folder */\n $folder = $this->findIn($datasource,\"folder\")\n ->where(['id' => $value])\n ->one();\n if (!$folder) {\n throw new UserErrorException(\"Folder #$selector does not exist.\");\n }\n $query = $folder->getReferences();\n break;\n case \"query\":\n $query = $this->createActiveQueryFromNaturalLanguageQuery(\n Datasource::in($datasource,'reference'),\n $datasource,\n $value\n );\n break;\n default:\n throw new UserErrorException(Yii::t('app',\"Invalid export request parameters.\"));\n }\n\n //\n $response = Yii::$app->response;\n $response->format = \\yii\\web\\Response::FORMAT_RAW;\n $filename = $datasource . '.' . $exporter->extension;\n\n // todo count results, and use paged batches,\n // todo use streaming? see https://www.yiiframework.com/doc/api/2.0/yii-web-response#sendStreamAsFile()-detail\n // if batch processing is preferred, load result into memory\n //if( $exporter->preferBatch ){\n $data = $exporter->export($query->all());\n $response->sendContentAsFile($data, $filename, [\n 'mimeType' => $exporter->mimeType\n ]);\n return;\n //}\n }", "title": "" }, { "docid": "a9e771cc4d5a337be3d485aa2d74fbd9", "score": "0.5336927", "text": "private function _display_all_records_full_view(){\n\t\t\t/*------------------------------*/\n\t\t\t\n\t\t\t$this->class_settings[ 'html' ] = array( 'html-files/templates-1/'.$this->table_name.'/display-all-records-full-view' );\n\t\t\t\n\t\t\t$datatable = $this->_display_data_table();\n\t\t\t$form = $this->_generate_new_data_capture_form();\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['data_entry_form'] = $form['html'];\n\t\t\t$this->class_settings[ 'data' ]['html'] = $datatable['html'];\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['title'] = \"Manage General Settings\";\n\t\t\t$this->class_settings[ 'data' ]['hide_main_title'] = 1;\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['hide_clear_tab'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['hide_details_tab'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['hide_reports_tab'] = 1;\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['col_1'] = 3;\n\t\t\t$this->class_settings[ 'data' ]['col_2'] = 9;\n\t\t\t\n\t\t\t$returning_html_data = $this->_get_html_view();\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'new-status',\n\t\t\t\t'javascript_functions' => array( 'recreateDataTables', 'set_function_click_event', 'update_column_view_state', 'prepare_new_record_form_new' ) \n\t\t\t);\n\t\t}", "title": "" }, { "docid": "6cbb34a503c6665b9b3cd7853f39f4fe", "score": "0.53312474", "text": "function SendPreviewDisplay()\n\t{\n\t\t$this->ParseTemplate('Preview_EmailWindow');\n\t}", "title": "" }, { "docid": "d88b3082a9f5054a5329cf3d296d8552", "score": "0.53302807", "text": "function cortex_preview_render_html_preview($post) {\n\n}", "title": "" }, { "docid": "1234b39a60cb2253d4fc2afcad700b05", "score": "0.5325476", "text": "function ShowSamples($sql, $hdrcols, $tablenick, $hdr, $controls=1) {\n global $LDB, $GLOBS, $PARMS;\n $html = '';\n $maxdir = 0; // For now, show all samples\n $pkey = $tablenick . '_pkey';\n \t$table = $LDB[$tablenick];\n $pkey = $LDB[$pkey];\n\n // Get all samples from this project\n if ($maxdir) { $sql .= \" LIMIT $maxdir\"; }\n $result = SQL_Query($sql);\n $numrows = SQL_NumRows($result);\n\n // Show details for each sample\n $html .= $hdr . \"<p align='center'/>\" . $GLOBS['links'] . \"</p>\\n\";\n $html .= \"<table align='center' width='100%' border='1'><tr>\\n\";\n foreach ($hdrcols as $c) {\n $html .= \"<th class='heading'>\" . ucfirst($c) . \"</th>\\n\";\n }\n if ($GLOBS['iammgr']) { $html .= \"<th>&nbsp;</th>\"; }\n $html .= \"</tr>\\n\";\n\n for ($i=0; $i<$numrows; $i++) {\n $row = SQL_Fetch($result);\n reset($hdrcols);\n foreach ($hdrcols as $c) {\n if ($c == 'QUIKSTAT') {\n $u = $_SERVER['SCRIPT_NAME'] . \"?fcn=showout&amp;table=$tablenick&amp;id=\" .\n $row[$pkey] . \"&amp;samplestate=XX\";\n $u = \"<a href='$u' onclick='javascript:popup2(\\\"$u\\\",680,720); return false;'>XX</a>\";\n $d = QuickStatus($row, $u); // Pass on URL for failing states\n }\n else { $d = $row[$c]; }\n if ((! isset($d)) || ($d == '')) { $d = '&nbsp;'; }\n $html .= \"<td align='center'>$d</td>\\n\";\n } \n\n $html .= \"<td align='center'>\";\n if ($controls) {\n\t\t\tif ($controls != 2 && $LDB['datatype'] == 'rnaseq') {\n\t\t\t\t$u = $_SERVER['SCRIPT_NAME'] . \"?fcn=files&amp;id=\" . $row[$pkey];\n\t\t\t\t$html .= \"<a href='$u' onclick='javascript:popup2(\\\"$u\\\",800,720); return false;'>\" .\n\t\t\t\t\"<font color='green' size='-2'>Files</font></a>&nbsp;\";\n\t\t\t}\n\t\t\t$u = $_SERVER['SCRIPT_NAME'] .\"?fcn=detail&amp;table=$tablenick&amp;id=\" . $row[$pkey];\n\t\t\t$html .= \"<a href='$u' onclick='javascript:popup2(\\\"$u\\\",680,720); return false;'>\" .\n\t\t\t\t\"<font color='green' size='-2'>Details</font></a>&nbsp;\";\n\t\t\tif ($GLOBS['iammgr']) {\n\t\t\t\t$u = $_SERVER['SCRIPT_NAME'] .\"?fcn=edit&amp;table=$tablenick&amp;id=\" . $row[$pkey];\n\t\t\t\t$html .= \"<a href='$u' onclick='javascript:popup2(\\\"$u\\\",680,720); return false;'>\" .\n\t\t\t\t\t\"<font color='red' size='-2'>Edit</font></a>\";\n\t\t\t}\n }\n $html .= \"</td></tr>\\n\";\n }\n $html .= \"</table>\\n\" .\n \"<div class='indent'>\\n\" . $GLOBS['statuscolor'] . \"</div>\\n\";\n return $html;\n}", "title": "" }, { "docid": "24df0edc3691563e3ad3aa533043cdb3", "score": "0.53241014", "text": "function viewFile($inline) {\r\n\t\t$this->downloadFile(true);\r\n\t}", "title": "" }, { "docid": "849e8930a85aeb720ef53b798738709e", "score": "0.5323094", "text": "function tripal_analysis_kegg_admin_view() {\n $output = '';\n\n // set the breadcrumb\n $breadcrumb = array();\n $breadcrumb[] = l('Home', '<front>');\n $breadcrumb[] = l('Administration', 'admin');\n $breadcrumb[] = l('Tripal', 'admin/tripal');\n $breadcrumb[] = l('Extensions', 'admin/tripal/extension');\n $breadcrumb[] = l('KEGG Analysis', 'admin/tripal/extension/tripal_analysis_kegg');\n drupal_set_breadcrumb($breadcrumb);\n\n // Add the view\n // $view = views_embed_view('tripal_analysis_kegg_admin_analyses','default');\n // if (isset($view)) {\n // $output .= $view;\n // }\n // else {\n // $output .= '<p>The Feature module uses primarily views to provide an '\n // . 'administrative interface. Currently one or more views needed for this '\n // . 'administrative interface are disabled. <strong>Click each of the following links to '\n // . 'enable the pertinent views</strong>:</p>';\n // $output .= '<ul>';\n // $output .= '<li>'.l('Features View', 'admin/tripal/chado/tripal_feature/views/features/enable').'</li>';\n // $output .= '</ul>';\n // }\n\n $output .= \"The Tripal KEGG Module extends the Tripal Analysis module to\n provide support loading and display of KEGG analysis results for features that\n reside in the database.\";\n\n return $output;\n}", "title": "" }, { "docid": "0ca7807a1559b67b171072bdf42c7c80", "score": "0.5317831", "text": "public function display() {\n\t\t// there is no model/default file.\n\t\t$model = $this->getModel('default');\n\t\t$view = $this->getView('default');\n\t\t$view->setModel($model);\n\t\t$view->display();\n\t}", "title": "" }, { "docid": "335739085ad3d0348ca8ef862f55e733", "score": "0.5312405", "text": "public function fileview( $id ) {\n\t\t\t$this->Fileuploader->fileview( $id );\n\t\t}", "title": "" }, { "docid": "87c0f6febd92d90256678bb75f0849de", "score": "0.53066593", "text": "protected function previewData()\n {\n if ($this->preview_data_fetched === false) {\n\n $this->fieldData();\n\n $this->preview_data = array(\n 'id' => $this->tool['field_id'],\n 'row_background_color' => $this->field_data['row_background_color']\n );\n\n $this->preview_data_fetched = true;\n }\n }", "title": "" }, { "docid": "d2a3c6f44112c38785054e8b90875ce2", "score": "0.5300688", "text": "public function preview(){\n\n\t\t$this->set(\"fontFamily\", \"font-family:Helvetica,maradival,Sans-Serif\");\n\t\t$this->set(\"siteId\", 1);\n\t\t$this->set(\"siteEmail\", \"luxurylink.com\");\n\t\t$this->set(\"siteName\", \"LuxuryLink\");\n\t\t$this->set(\"siteUrl\", \"http://www.luxurylink.com\");\n\t\t$this->set(\"additionalClients\", false);\n\t\t$this->set(\"isAuction\", false);\n\t\t$this->set(\"additionalClients\", false);\n\t\t$this->set(\"clientNameP\", \"Test Client Name\");\n\t\t$this->set(\"locationDisplay\", \"Test of location display value\");\n\t\t$this->set(\"sitePhone\", \"123-123-1234\");\n\t\t$this->set(\"sitePhoneLocal\", \"333-444-1234\");\n\t\t$this->set(\"pdpUrl\", \"http://www.luxurylink.com/fivestar/hotels/test-location/hotel-testerosa\");\n\t\t$img=\"http://photos.luxurylink.us/images/sho_4fcee4e4/8455_9015-auto-578/image-8455_9015.jpg\";\n\t\t$this->set(\"clientImagePath\", $img);\n\n\t\t$file=\"42_43_abandoned_cart.html\";\n\t\t$this->set('fileName', $file);\n\t\t$this->autoLayout=false;\n\t\tConfigure::write('debug',0);\n\t\t$this->render(\"preview\");\n\n\t}", "title": "" }, { "docid": "42617053df17b4563acd3d296fe7b67f", "score": "0.53001213", "text": "function getViewList()\n {\n\t\n\t$dbname = \"techie17_fp2_new\";\n\t$dbuser = \"techie17_user50\";\n\t$dbpass = \"user50pass\";\n\t$dbhost = \"localhost\";\n\t\n\t$views = array();\n\t\n\t$db = new mysqli($dbhost,$dbuser,$dbpass,$dbname);\n\t\n\t$sql = \"show full tables where table_type = 'VIEW'\";\n\t\n\ttry\n\t{\n\t\t$query = $db->query($sql);\n\t}\n\tcatch(Exception $err)\n\t{\n\t\techo $err->getMessage() . \"<br />\";\n\t}\n\t\n\twhile($result = mysqli_fetch_array($query))\n\t{\n\t\t$views[] = $result[0];\n\t}\n\t\n\t$count = count($views);\n\techo \"found $count views <br />\";\n\t\n }", "title": "" }, { "docid": "6d7bc2df10fe0f1f54905d3cfecd805f", "score": "0.52950597", "text": "public function render_admin_preview( $settings ) {\n\t\tinclude IBX_WPFOMO_DIR . 'includes/floating-button.php';\n\t}", "title": "" }, { "docid": "55a06113a74d6910e5dff716d4100042", "score": "0.52898514", "text": "function index() {\n $data['current'] = 1;\n $data['description'] = 'description';\n $data['keyword'] = 'Keywords';\n $data['title'] = 'Dashboard';\n $data['query'] = $this->get('id');\n $data['view_file'] = 'list_test'; //view file\n $data['module'] = 'test'; //module\n $this->load->module('template');\n $this->template->one_col($data);\n }", "title": "" }, { "docid": "a8e08dacbf9b26c22cdf3be01d25134e", "score": "0.52889884", "text": "public function showArtifacts()\r\n{\r\n $results = $this->getArtifacts();\r\n echo \"<table align='center'>\r\n <tr>\r\n <th>Name</th>\r\n <th>GroupNumber</th>\r\n <th>Link</th>\r\n </tr>\";\r\n foreach ($results as $artifact)\r\n {\r\n echo \"<tr>\";\r\n echo \"<td align='center' style='border:1px solid black; font-size:18; font-weight:bold'>\" . $artifact['name'] . \"</td>\";\r\n echo \"<td align='center'style='border:1px solid black; font-size:18; font-weight:bold'>\" . $artifact['group_number'] . \"</td>\";\r\n echo \"<td align='center'style='border:1px solid black; font-size:18; font-weight:bold'>\" . '<a target=\\\"_blank\\\" href='.$artifact[\"link\"] . '>View Artifact</a>' . \"</td>\";\r\n echo \"</tr>\";\r\n }\r\necho \"</table>\";\r\n}", "title": "" }, { "docid": "2e3ce372d6ff076aed5d7a53f14211f3", "score": "0.52886397", "text": "public function output_view() {\n \t// get the list from database\n \t$this->CI->load->model('source');\n \t$sources = $this->CI->source->get_sources();\n \t$this->var['sources'] = $sources;\n // Load view with data\n $this->CI->load->view('layout/default', $this->var);\n }", "title": "" }, { "docid": "1742f3d7bded72e9cacc10ab6488e065", "score": "0.52827513", "text": "public function customize_preview_init() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'customize_preview_enqueue' ) );\n\t\tadd_action( 'wp_print_styles', array( $this, 'print_preview_css' ), 1 );\n\t\tadd_action( 'wp_footer', array( $this, 'export_preview_data' ), 20 );\n\t}", "title": "" }, { "docid": "b662edff24491c8e9d71c0dba54839b8", "score": "0.5276275", "text": "public function indexAction()\n {\n $this->tag->setTitle(__('Tariffs'));\n // Available sort to choose\n $this->filter->add('in_array', function($value) {\n return in_array($value, ['amount', 'amount DESC', 'downloadCeil', 'downloadCeil DESC', 'name', 'name DESC', 'priority', 'priority DESC', 'uploadCeil', 'uploadCeil DESC']) ? $value : null;\n });\n\n // Get tariffs and prepare pagination\n $paginator = new Paginator([\n \"data\" => Tariffs::find(['order' => $this->request->getQuery('order', 'in_array', 'id', true)]),\n \"limit\" => $this->request->getQuery('limit', 'int', 20, true),\n \"page\" => $this->request->getQuery('page', 'int', 1, true)\n ]);\n\n $this->view->setVars([\n 'pagination' => $paginator->getPaginate(),\n 'bitRate' => \\Las\\Models\\Settings::options('bitRate', $this->las['general']['bitRate']),\n ]);\n }", "title": "" }, { "docid": "af65a57fb558a45a8cb560e0363c6cd1", "score": "0.52742743", "text": "public function addImportButton() {\n global $wp;\n if(isset(get_current_screen()->post_type) && get_current_screen()->post_type == \"job-listing\") {\n $queryArgs = array_merge($wp->query_vars, array(str_replace(\"\\\\\", \"\", __CLASS__) => 'true')); \n echo '<a href=\"' . add_query_arg($queryArgs, home_url($wp->request)) . '\" class=\"button-primary extraspace\" style=\"float: right; margin-right: 10px;\">'. __(\"Start Visma Import\") .'</a>'; \n }\n }", "title": "" }, { "docid": "fd9fcec3464521c0b2a628e2fc80b7c9", "score": "0.5271268", "text": "function preview()\n {\n if(isset($_POST['id']))\n {\n #initialization\n $refresh = '';\n $id = (int)$this->input->post('id');\n $id_users = $this->general->id_user();\n $admin = $this->general->admin();\n\n $qposts = $this->db->query(\"SELECT user_id, user_name, message, link, picture, name, caption, description FROM posts WHERE id='\".(int)$id.\"'\".( empty($admin)? \" AND id_users='\".$id_users.\"'\":\"\" ));\n\n if($qposts->num_rows() > 0)\n {\n $data['fb_name'] = $qposts->row()->user_name;\n $data['fb_image'] = 'https://graph.facebook.com/'.$qposts->row()->user_id.'/picture';\n $data['message'] = $qposts->row()->message;\n $data['link'] = $qposts->row()->link;\n $data['picture'] = $qposts->row()->picture;\n $data['name'] = $qposts->row()->name;\n $data['caption'] = $qposts->row()->caption;\n $data['description'] = $qposts->row()->description;\n\n $refresh = $this->load->view('sections/frame-preview', $data, true);\n }\n\n return json_encode(array('result' => 'ok', 'refresh' => $refresh));\n }\n }", "title": "" }, { "docid": "b64d93653927ee2e5749c8764b0baa2d", "score": "0.5268417", "text": "public function get_preview_content_object_url()\n {\n return $this->get_url(array(self::PARAM_ACTION => self::ACTION_PREVIEW));\n }", "title": "" }, { "docid": "afc95d5c4b0d204e8ae58f814abe8b5e", "score": "0.52658993", "text": "public function manageAction() {\n\n //GET NAVIGATION\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitepage_admin_main', array(), 'sitepage_admin_main_import');\n\n //FORM CREATION FOR SORTING\n $this->view->formFilter = $formFilter = new Sitepage_Form_Admin_Import_Filter();\n $page = $this->_getParam('page', 1);\n\n $tableImportFile = Engine_Api::_()->getDbTable('importfiles', 'sitepage');\n $select = $tableImportFile->select();\n\n //IF IMPORT IS IN RUNNING STATUS FOR SOME FILE THAN DONT SHOW THE START BUTTON FOR ALL\n $importFileStatusData = $tableImportFile->fetchRow(array('status = ?' => 'Running'));\n $this->view->runningSomeImport = 0;\n if (!empty($importFileStatusData)) {\n $this->view->runningSomeImport = 1;\n }\n\n $values = array();\n if ($formFilter->isValid($this->_getAllParams())) {\n $values = $formFilter->getValues();\n }\n\n foreach ($values as $key => $value) {\n if (null === $value) {\n unset($values[$key]);\n }\n }\n\n $values = array_merge(array(\n 'order' => 'importfile_id',\n 'order_direction' => 'DESC',\n ), $values);\n\n $this->view->assign($values);\n\n $select->order((!empty($values['order']) ? $values['order'] : 'importfile_id' ) . ' ' . (!empty($values['order_direction']) ? $values['order_direction'] : 'DESC' ));\n\n $this->view->paginator = $paginator = Zend_Paginator::factory($select);\n $this->view->total_slideshows = $paginator->getTotalItemCount();\n $this->view->paginator->setItemCountPerPage(100);\n $this->view->paginator = $paginator->setCurrentPageNumber($page);\n }", "title": "" }, { "docid": "1e38c0f39af634885fb05bf30f08ebd1", "score": "0.52653444", "text": "function bibdk_actions_print_page($ids) {\n $pids = preg_replace('@;@', ',', $ids);\n $pids = explode(',', $pids);\n $view = \"\";\n $return = t('no_elements_to_be_printed', array(), array('context' => 'bibdk_actions'));\n if (($manifestations = bibdk_actions_get_manifestations($pids))){\n foreach ($manifestations as $manifestation) {\n $views[] = _bibdk_actions_print_manifestation_view($manifestation);\n }\n drupal_add_js(drupal_get_path('module', 'bibdk_actions') . '/js/bibdk_actions.print.js');\n drupal_add_css(drupal_get_path('module', 'bibdk_actions') . '/css/bibdk_actions.css', array('media' => 'all'));\n $return = $views;\n }\n bibdk_cart_reservation_update_status('print_complete', $ids);\n return $return;\n}", "title": "" }, { "docid": "5fdef9eedcead63718749be33efa4842", "score": "0.525912", "text": "public static function load_preview() {\r\r\n $id = absint( $_REQUEST['id'] );\r\r\n echo SUPER_Shortcodes::super_form_func( array( 'id'=>$id ) );\r\r\n //echo do_shortcode('[super_form id=\"' . $id . '\"]');\r\r\n die();\r\r\n }", "title": "" }, { "docid": "c8145db610484d4fff94d2fc26f4c453", "score": "0.52581435", "text": "function views_ui_preview_form_submit(&$form, &$form_state) {\n $form_state['display_id'] = $form_state['values']['display_id'];\n $form_state['view_args'] = $form_state['values']['args'];\n}", "title": "" } ]
922325ce5cdd8a94e1773dcb46d0ab51
OneToMany (owning side) Add TcernUnidadeGestora
[ { "docid": "6cac1b3a8cb26036393a78251d39e7f1", "score": "0.53597367", "text": "public function addFkTcernUnidadeGestoras(\\Urbem\\CoreBundle\\Entity\\Tcern\\UnidadeGestora $fkTcernUnidadeGestora)\n {\n if (false === $this->fkTcernUnidadeGestoras->contains($fkTcernUnidadeGestora)) {\n $fkTcernUnidadeGestora->setFkNormasNorma($this);\n $this->fkTcernUnidadeGestoras->add($fkTcernUnidadeGestora);\n }\n \n return $this;\n }", "title": "" } ]
[ { "docid": "d6681e39e62a3fb3bb48950303dee4ed", "score": "0.59462285", "text": "public function initialize()\n {\n $this->hasMany('id_contrato', 'Datoscontratacion', 'tipo_cont', array('alias' => 'Datoscontratacion'));\n $this->hasMany('id_contrato', 'Datoscontratacion', 'tipo_cont', NULL);\n }", "title": "" }, { "docid": "f30c8e304991af28736aba8f611cb59b", "score": "0.5899566", "text": "public function buildRelations()\n\t{\n $this->addRelation('Setor', 'Setor', RelationMap::MANY_TO_ONE, array('setor_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Local', 'Local', RelationMap::MANY_TO_ONE, array('local_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Cargo', 'Cargo', RelationMap::MANY_TO_ONE, array('cargo_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Perfil', 'Perfil', RelationMap::MANY_TO_ONE, array('perfil_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('GrupoProduto', 'GrupoProduto', RelationMap::MANY_TO_ONE, array('grupo_produto_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('ParceiroUsuario', 'ParceiroUsuario', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('UsuarioComissionamento', 'UsuarioComissionamento', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('LogSerama', 'LogSerama', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('LogAcesso', 'LogAcesso', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('CertificadoSituacao', 'CertificadoSituacao', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('CuponsDescontoCertificadoRelatedByUsuarioId', 'CuponsDescontoCertificado', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('CuponsDescontoCertificadoRelatedByUsuarioAutorizacaoId', 'CuponsDescontoCertificado', RelationMap::ONE_TO_MANY, array('id' => 'usuario_autorizacao_id', ), 'RESTRICT', null);\n $this->addRelation('LocalUsuario', 'LocalUsuario', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('Importacao', 'Importacao', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('CertificadoRelatedByUsuarioId', 'Certificado', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('CertificadoRelatedByUsuarioValidouId', 'Certificado', RelationMap::ONE_TO_MANY, array('id' => 'usuario_validou_id', ), 'RESTRICT', null);\n $this->addRelation('ClienteHistorico', 'ClienteHistorico', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('Contador', 'Contador', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('ContadorDetalhar', 'ContadorDetalhar', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('Boleto', 'Boleto', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('Caixa', 'Caixa', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('Aviso', 'Aviso', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('AvisoUsuario', 'AvisoUsuario', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('ProspectRelatedByUsuarioId', 'Prospect', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('ProspectRelatedBySupervisorUsuarioId', 'Prospect', RelationMap::ONE_TO_MANY, array('id' => 'supervisor_usuario_id', ), 'RESTRICT', null);\n $this->addRelation('ProspectContato', 'ProspectContato', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('ProspectSituacao', 'ProspectSituacao', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('ProspectAtendimento', 'ProspectAtendimento', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n $this->addRelation('ProspectNegocio', 'ProspectNegocio', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), 'RESTRICT', null);\n\t}", "title": "" }, { "docid": "b0c0cac72c6cd1b50b9727e24792b510", "score": "0.5889254", "text": "public function getFkTcernUnidadeGestoras()\n {\n return $this->fkTcernUnidadeGestoras;\n }", "title": "" }, { "docid": "4d59b1e016043bf8e395a4de66ca5002", "score": "0.58465034", "text": "public function representantes(){\n \treturn $this->hasMany('App\\Representantes','id_parentesco','id');\n }", "title": "" }, { "docid": "c26a037d374595bbff3fdaa1e3301347", "score": "0.58056825", "text": "public function buildRelations()\n\t{\n $this->addRelation('LancamentoConta', 'LancamentoConta', RelationMap::ONE_TO_MANY, array('id' => 'conta_bancaria_id', ), 'RESTRICT', null);\n\t}", "title": "" }, { "docid": "ef4ead137b84d49a1bb7f49b0a40179d", "score": "0.58002484", "text": "public function buildRelations()\n {\n $this->addRelation('Sucursales', 'Sucursales', RelationMap::ONE_TO_MANY, array('sepomex_id' => 'sepomex_id', ), 'CASCADE', 'CASCADE', 'Sucursaless');\n }", "title": "" }, { "docid": "4c245ea8ec22a6ed0a9a33d602e7d9dd", "score": "0.57760304", "text": "public function buildRelations()\n {\n $this->addRelation('CiUsuariosRelatedByIdUserCreated', '\\\\CiUsuarios', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, null, false);\n $this->addRelation('CiUsuariosRelatedByIdUserModified', '\\\\CiUsuarios', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, null, false);\n $this->addRelation('CiUsuariosRelatedByIdCliente', '\\\\CiUsuarios', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_cliente',\n 1 => ':id_usuario',\n ),\n), null, null, null, false);\n $this->addRelation('HbfClubs', '\\\\HbfClubs', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_club',\n 1 => ':id_club',\n ),\n), null, null, null, false);\n $this->addRelation('HbfTurnos', '\\\\HbfTurnos', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_turno',\n 1 => ':id_turno',\n ),\n), null, null, null, false);\n $this->addRelation('HbfSesiones', '\\\\HbfSesiones', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_sesion',\n 1 => ':id_sesion',\n ),\n), null, null, null, false);\n $this->addRelation('HbfProductos', '\\\\HbfProductos', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_producto',\n 1 => ':id_producto',\n ),\n), null, null, null, false);\n }", "title": "" }, { "docid": "65bc92cd6c1d876029d623e48370a219", "score": "0.57733905", "text": "public function initialize()\n {\n $this->belongs_to('tipomatrizanalizada');\n $this->belongs_to('tipomuestra');\n $this->belongs_to('lugartomamuestra');\n $this->has_many('muestramemoriacalculo');\n }", "title": "" }, { "docid": "5dfa29510b09d1253f335ab6b257b6c9", "score": "0.57534856", "text": "public function buildRelations()\n {\n $this->addRelation('JournalDeVente', 'JournalDeVente', RelationMap::MANY_TO_ONE, array('jdv_id' => 'jdv_id', ), null, null);\n }", "title": "" }, { "docid": "d4d3696c5bd90f546c4b52ea1e66a983", "score": "0.568495", "text": "public function __construct() {\n $this->relacionUsuario = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n }", "title": "" }, { "docid": "e650b55c6c5cede0e07ea4d0bbc8c880", "score": "0.5674809", "text": "public function registroSesionTratamientoAction()\r\n {\r\n $isAjax = $this->get('Request')->isXMLhttpRequest();\r\n if($isAjax){\r\n $em = $this->getDoctrine()->getManager();\r\n $usuario= $this->get('security.token_storage')->getToken()->getUser();\r\n \r\n $id = $this->get('request')->request->get('id');\r\n $sucursalId = $this->get('request')->request->get('sucursal');\r\n $empleadoId = $this->get('request')->request->get('empleado');\r\n \r\n $sucursal = $em->getRepository('DGPlusbelleBundle:Sucursal')->find($sucursalId);\r\n $empleado = $em->getRepository('DGPlusbelleBundle:Empleado')->find($empleadoId);\r\n $personaTratamiento = $em->getRepository('DGPlusbelleBundle:PersonaTratamiento')->find($id);\r\n \r\n $entity = new \\DGPlusbelleBundle\\Entity\\SesionVentaTratamiento();\r\n $seguimiento1 = new \\DGPlusbelleBundle\\Entity\\ImagenTratamiento();\r\n \r\n $entity->setEmpleado($empleado);\r\n $entity->setSucursal($sucursal);\r\n $entity->setPersonaTratamiento($personaTratamiento);\r\n $entity->setFechaSesion(new \\DateTime('now'));\r\n \r\n $em->persist($entity);\r\n $em->flush();\r\n\r\n $id2 = $entity->getId();\r\n\r\n $entity2 = $em->getRepository('DGPlusbelleBundle:SesionVentaTratamiento')->find($id2);\r\n $seguimiento1->setSesionVentaTratamiento($entity2);\r\n\r\n $seguimiento = $em->getRepository('DGPlusbelleBundle:SeguimientoTratamiento')->findOneBy(array('idPersonaTratamiento' => $id));\r\n $seguimiento->setNumSesion($seguimiento->getNumSesion() + 1);\r\n $em->merge($seguimiento);\r\n $em->flush();\r\n\r\n //$paciente = $em->getRepository('DGPlusbelleBundle:Paciente')->findOneBy(array('persona' => $entity->getPersonaTratamiento ()->getPaciente()->getId()));\r\n \r\n $sesionTratamiento = array(\r\n 'id' => $personaTratamiento->getId(), \r\n 'sesiones' => $personaTratamiento->getNumSesiones(), \r\n 'nomTrata' => $personaTratamiento->getTratamiento()->getNombre()\r\n );\r\n \r\n $this->get('bitacora')->escribirbitacora(\"Se registro una nueva sesion de tratamiento\", $usuario->getId());\r\n \r\n $response = new JsonResponse();\r\n $response->setData(array(\r\n 'exito' => '1',\r\n 'seguimiento' => $seguimiento->getNumSesion(),\r\n 'personaTratamiento' => $sesionTratamiento,\r\n )); \r\n \r\n return $response; \r\n } else { \r\n return new Response('0'); \r\n } \r\n }", "title": "" }, { "docid": "c24f79ee1e12954dad1e21cadf5f17c1", "score": "0.5662418", "text": "public function addItem($pedido_cab_id, $cliente_id, $usuario_cliente_id, $usuario_vendedor_id, $marcacion_sec, $agencia_carga_id, \n\t\t\t\t\t\t $producto_id, $variedad_id, $grado_id, $tallos_x_bunch, $tipo_caja_id, $nro_cajas_seleccionada,\n\t\t\t\t\t\t\t$control_transaccion = true, $tipo_oferta = null, $carne_pedido_cab_sec = null)\n\t{\n\t\t$DispoBO\t\t= new DispoBO();\t\t\n\t\t$PedidoCabDAO \t= new PedidoCabDAO();\n\t\t$PedidoDetDAO \t= new PedidoDetDAO();\n\t\t$PedidoCabData\t= new PedidoCabData();\n\t\t$PedidoDetData\t= new PedidoDetData();\n\n\t\tif ($control_transaccion){\n\t\t\t$this->getEntityManager()->getConnection()->beginTransaction();\n\t\t}//end if\n\t\ttry\n\t\t{\n\t\t\t$DispoBO->setEntityManager($this->getEntityManager());\t\t\n\t\t\t$PedidoCabDAO->setEntityManager($this->getEntityManager());\n\t\t\t$PedidoDetDAO->setEntityManager($this->getEntityManager());\n\t\t\t\n\n\t\t\t/*\n\t\t\t * 1. Se establece cual es el usuario que va ingresar el pedido o anadir items al detalle\n\t\t\t */\n\t\t\tif (empty($usuario_vendedor_id)){\n\t\t\t\t$usuario_ing_id = $usuario_cliente_id;\n\t\t\t}else{\n\t\t\t\t$usuario_ing_id = $usuario_vendedor_id;\n\t\t\t}\n\n\n\t\t\t/*\n\t\t\t * 2. Se obtiene la DISPO ACTUAL\n\t\t\t */\n\t\t\t$result_dispo = $DispoBO->getDispo($cliente_id, $usuario_cliente_id, $marcacion_sec, $tipo_caja_id, $variedad_id, $grado_id, \n\t\t\t\t\t\t\t\t\t\t\t false, true, true, $producto_id, $tallos_x_bunch);\n\t\t\tif ($result_dispo['respuesta_code']!='OK'){\n\t\t\t\tif ($control_transaccion){\n\t\t\t\t\t$this->getEntityManager()->getConnection()->rollback();\n\t\t\t\t\t$this->getEntityManager()->close();\n\t\t\t\t}//end if\n\t\t\t\treturn $result_dispo;\n\t\t\t}//end if\t\t\t\n\t\t\t$reg_dispo\t = $result_dispo['result_dispo'][0];\n\t\t\t\n\t\t\t/*\n\t\t\t * 3. Revisar si tiene un pedido activo \n\t\t\t */\n\t\t\tif (empty($pedido_cab_id))\n\t\t\t{\n\t\t\t\t//Se llena los campos\n\t\t\t\t//$PedidoCabData->setId\t\t\t\t($pedido_cab_id);\n\t\t\t\t$PedidoCabData->setFecha\t\t\t(\\Application\\Classes\\Fecha::getFechaHoraActualServidor());\n\t\t\t\t$PedidoCabData->setClienteId\t\t($cliente_id);\n\t\t\t\t$PedidoCabData->setMarcacionSec\t\t($marcacion_sec);\n\t\t\t\t$PedidoCabData->setAgenciaCargaId\t($agencia_carga_id);\n\t\t\t\t$PedidoCabData->setTotal\t\t\t(0);\n\t\t\t\t$PedidoCabData->setComentario\t\t('');\n\t\t\t\t$PedidoCabData->setEstado\t\t\t(\\Application\\Constants\\Pedido::ESTADO_COMPRANDO);\n\t\t\t\t$PedidoCabData->setUsuarioClienteId\t($usuario_cliente_id);\n\t\t\t\t$PedidoCabData->setUsuarioIngId\t\t($usuario_ing_id);\n\t\n\t\t\t\t$pedido_cab_id \t\t= $PedidoCabDAO->ingresar($PedidoCabData);\n\t\t\t}//end if\n\t\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t * 4. Se registra el detalle\n\t\t\t */\n\t\t\t$pedido_cab_sec = $PedidoDetDAO->consultarMaximaSecuencia($pedido_cab_id);\n\t\t\t$pedido_cab_sec++;\n\n\t\t\t$bunch_total \t= $nro_cajas_seleccionada * $reg_dispo['cantidad_bunch']; //Se multiplica por la cantidad de bunch que tiene una caja\n\t\t\t$tallos_total\t= $bunch_total * $reg_dispo['tallos_x_bunch'];\n\t\t\tif ($tipo_oferta=='oferta_carne')\n\t\t\t{\n\t\t\t\t$precio \t\t= $reg_dispo['precio_oferta'];\n\t\t\t}else{\n\t\t\t\t$precio \t\t= $reg_dispo['precio'];\n\t\t\t}//end if\n\t\t\t$precio_total\t= $tallos_total * $precio; //Se multiplica el precio del tallo\t\t\n\n\t\t\t//Se define el total x caja\n\t\t\tif (empty($precio))\n\t\t\t{\n\t\t\t\t$total_x_caja = 0;\n\t\t\t}else{\n\t\t\t\t$total_x_caja = $reg_dispo['tallos_x_bunch'] * $bunch_total/$nro_cajas_seleccionada * $precio;\n\t\t\t}//end if\n\n\t\t\t$PedidoDetData->setPedidoCabId\t\t\t($pedido_cab_id);\n\t\t\t$PedidoDetData->setPedidoDetSec \t\t($pedido_cab_sec);\n//\t\t\t$PedidoDetData->setMarcacionSec\t\t\t($marcacion_sec);\n\t\t\t$PedidoDetData->setInventarioId\t\t\t($reg_dispo['inventario_id']);\n\t\t\t$PedidoDetData->setVariedadId\t\t\t($variedad_id);\n\t\t\t$PedidoDetData->setGradoId\t\t\t\t($grado_id);\n\t\t\t$PedidoDetData->setTipoCajaId\t\t\t($tipo_caja_id);\n\t\t\t$PedidoDetData->setTipoCajaOrigenEstado\t($reg_dispo['tipo_caja_origen_estado']);\n\t\t\t$PedidoDetData->setTipoCajaOrigenId\t\t($reg_dispo['tipo_caja_origen_id']);\n\t\t\t$PedidoDetData->setNroCajas\t\t\t\t($nro_cajas_seleccionada);\n\t\t\t$PedidoDetData->setCantidadBunch\t\t($bunch_total);\n\t\t\t$PedidoDetData->setTallosxBunch\t\t\t($reg_dispo['tallos_x_bunch']);\n\t\t\t$PedidoDetData->setTallosTotal\t\t\t($tallos_total);\n\t\t\t$PedidoDetData->setPrecio\t\t\t\t($precio);\n\t\t\t$PedidoDetData->setTotalXCaja \t\t\t($total_x_caja);\n\t\t\t$PedidoDetData->setTotal\t\t\t\t($precio_total);\n//\t\t\t$PedidoDetData->setAgenciaCargaId\t\t($agencia_carga_id);\n//\t\t\t$PedidoDetData->setComentario\t\t\t('');\n\t\t\tif ($tipo_oferta=='oferta_hueso')\n\t\t\t{\n\t\t\t\t$PedidoDetData->setPedidoCabOfertaId \t($pedido_cab_id);\n\t\t\t\t$PedidoDetData->setPedidoDetOfertaSec \t($carne_pedido_cab_sec);\n\t\t\t}else{\n\t\t\t\t$PedidoDetData->setPedidoCabOfertaId \t(null);\n\t\t\t\t$PedidoDetData->setPedidoDetOfertaSec \t(null);\n\t\t\t}//end if\n\t\t\tif ($tipo_oferta=='oferta_carne')\n\t\t\t{\n\t\t\t\t$PedidoDetData->setEstadoRegOferta\t\t(1);\n\t\t\t}else{\n\t\t\t\t$PedidoDetData->setEstadoRegOferta\t\t(0);\t\t\t\t\n\t\t\t}//end if\n\t\t\t$PedidoDetData->setCalidadId\t\t\t($this->calidad_id);\n\t\t\t$PedidoDetData->setPuntoCorte\t\t\t($this->punto_corte); //MORONITOR\n\n\t\t\t//conversion a caja FB\n\t\t\t$cajas_fb = \\Application\\Classes\\CajaConversion::equivalenciaFB($tipo_caja_id, $nro_cajas_seleccionada);\n\t\t\t$PedidoDetData->setEqFb\t\t\t\t\t($cajas_fb);\n\t\t\t\n\t\t\t$PedidoDetData->setUsuarioIngId\t\t\t($usuario_ing_id);\n\t\t\t$PedidoDetData->setUsuarioModId\t\t\t($usuario_ing_id);\n\t\t\t$key_det = $PedidoDetDAO->ingresar($PedidoDetData);\n\t\t\t\n\t\t\t/*\n\t\t\t * 5. Actualizar el total de la CABECERA de PEDIDO\n\t\t\t */\n\t\t\t$PedidoCabDAO->actualizarTotal($pedido_cab_id);\n\n\t\t\t/*\n\t\t\t * 6. Devuelve el resultado del registro del PEDIDO\n\t\t\t */\n\t\t\t$result['respuesta_code']\t= 'OK';\n\t\t\t$result['respuesta_msg']\t= '';\n\t\t\t$result['pedido_cab_id'] \t= $pedido_cab_id;\n\t\t\t$result['pedido_cab_sec'] \t= $pedido_cab_sec;\n\t\t\t$result['variedad_nombre']\t= $reg_dispo['variedad_nombre'];\n\t\t\t\n\t\t\tif ($control_transaccion){\n\t\t\t\t$this->getEntityManager()->getConnection()->commit();\n\t\t\t}//end if\n\t\t\treturn $result;\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\tif ($control_transaccion){\n\t\t\t\t$this->getEntityManager()->getConnection()->rollback();\n\t\t\t\t$this->getEntityManager()->close();\t\t\t\t\n\t\t\t}//end if\n\t\t\tthrow $e;\n\t\t}\t\t\t\n\t}", "title": "" }, { "docid": "94b35ebe4149e2aa8fd2a9e619760d28", "score": "0.5652987", "text": "public function addparticipantAction(Request $request)\n\t\n\t{\n//Création de l'entité Participant\n$participant = new Participant();\n\n$repP = $this->getDoctrine()->getManager()->getRepository('CCIRamScoBundle:Personne');\n$repR = $this->getDoctrine()->getManager()->getRepository('CCIRamScoBundle:Role');\n$repA = $this->getDoctrine()->getManager()->getRepository('CCIRamScoBundle:Activite');\n//$repository = $this->getDoctrine()->getManager()->getRepository('CCIRamScoBundle:Personne');\n//$listAdherent = $repository->findAll();\n\n//tester si la combinaison existe déjà ?\n//rechercher les id ?\n//faire un formulaire ?\n$personne = $repP->findOneby(array('nom' => 'yasmina'));\n$role = $repR->findOneby(array('typeRole' => 'chauffeur'));\n$activite = $repA->findOneby(array('titreActivite' => 'Equitation'));\n\n//Remplissage de Participant\n$participant->setPersonne($personne);\n$participant->setRole($role);\n$participant->setActivite($activite);\n\n\n//Récupération de l'entity manager (em)\n$em = $this->getDoctrine()->getManager();\n\n//Persistance de l'entité\n$em->persist($participant);\n\n//Nettoyage de tout ce qui a été persisté avant\n$em->flush();\n\n//Revoir ce que ça fait... :/\n/*if ($request->isMethod('POST')) {\n\n $request->getSession()->getFlashBag()\n ->add('notice', 'Participant bien enregistré.');\nreturn $this->redirect($this\n\t->generateUrl('participant_view', \n\tarray('id' => $participant->getId())));\n\t\n\t}*/\n\nreturn $this->render('CCIRamScoBundle:Yasmina:addparticipant.html.twig', \narray('participant' => $participant));\n}", "title": "" }, { "docid": "a888ed7483f678ea1ddb2df475b8131d", "score": "0.5648399", "text": "public function initialize()\n {\n $this->belongsTo('unidade_negocio_cd_unidade', 'App\\Models\\UnidadeNegocio', 'cd_unidade', array('alias' => 'UnidadeNegocio'));\n $this->belongsTo('unidade_negocio_cd_unidade', 'App\\Models\\UnidadeNegocio', 'cd_unidade', array('foreignKey' => true,'alias' => 'UnidadeNegocio'));\n }", "title": "" }, { "docid": "8053f90b4f3ddfdc4e93e55501adc46b", "score": "0.56423086", "text": "public function buildRelations()\n {\n $this->addRelation('Societe', '\\\\Societe', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':soc_id_FK',\n 1 => ':soc_id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n $this->addRelation('MTransport', '\\\\MTransport', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':transport_FK',\n 1 => ':transport',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n $this->addRelation('COMCondition', '\\\\COMCondition', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_commande_FK',\n 1 => ':id_commande',\n ),\n), 'CASCADE', 'CASCADE', 'COMConditions', false);\n $this->addRelation('COMVendeur', '\\\\COMVendeur', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_commande_FK',\n 1 => ':id_commande',\n ),\n), 'CASCADE', 'CASCADE', 'COMVendeurs', false);\n $this->addRelation('CMDPiece', '\\\\CMDPiece', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_commande_FK',\n 1 => ':id_commande',\n ),\n), 'CASCADE', 'CASCADE', 'CMDPieces', false);\n $this->addRelation('COMEnduser', '\\\\COMEnduser', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_commande_FK',\n 1 => ':id_commande',\n ),\n), 'CASCADE', 'CASCADE', 'COMEndusers', false);\n $this->addRelation('CMDTDoc', '\\\\CMDTDoc', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_commande_FK',\n 1 => ':id_commande',\n ),\n), 'CASCADE', 'CASCADE', 'CMDTDocs', false);\n $this->addRelation('CMDTAppareil', '\\\\CMDTAppareil', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_commande_FK',\n 1 => ':id_commande',\n ),\n), 'CASCADE', 'CASCADE', 'CMDTAppareils', false);\n }", "title": "" }, { "docid": "583ce046b087ce71424bbaa8c496dd6c", "score": "0.5626669", "text": "public function comidaIngredientes()\n {\n \treturn $this->hasMany('App\\Comida_Ingrediente','id_comida');\n \t}", "title": "" }, { "docid": "6676005313ada9648ff631c86446c364", "score": "0.5612279", "text": "public function registroSesionTratamientoPaqueteAction()\r\n {\r\n $isAjax = $this->get('Request')->isXMLhttpRequest();\r\n if($isAjax){\r\n $em = $this->getDoctrine()->getManager();\r\n $usuario= $this->get('security.token_storage')->getToken()->getUser();\r\n \r\n $id = $this->get('request')->request->get('id');\r\n $sucursalId = $this->get('request')->request->get('sucursal');\r\n $empleadoId = $this->get('request')->request->get('empleado');\r\n $tratamientoId = $this->get('request')->request->get('tratamiento');\r\n \r\n $sucursal = $em->getRepository('DGPlusbelleBundle:Sucursal')->find($sucursalId);\r\n $empleado = $em->getRepository('DGPlusbelleBundle:Empleado')->find($empleadoId);\r\n $tratamiento = $em->getRepository('DGPlusbelleBundle:Tratamiento')->find($tratamientoId);\r\n $entity = new \\DGPlusbelleBundle\\Entity\\SesionTratamiento();\r\n\r\n $entity->setFechaSesion(new \\DateTime('now'));\r\n $entity->setEmpleado($empleado);\r\n $entity->setSucursal($sucursal);\r\n $entity->setTratamiento($tratamiento);\r\n \r\n $ventaPaquete = $em->getRepository('DGPlusbelleBundle:VentaPaquete')->find($id);\r\n\r\n $entity->setVentaPaquete($ventaPaquete);\r\n $entity->setRegistraReceta(\"0\");\r\n $em->persist($entity);\r\n $em->flush();\r\n\r\n $id2=$entity->getId();\r\n $entity2 = $em->getRepository('DGPlusbelleBundle:SesionTratamiento')->find($id2);\r\n\r\n $seguimiento = $em->getRepository('DGPlusbelleBundle:SeguimientoPaquete')->findOneBy(array('idVentaPaquete' => $id, 'tratamiento' => $entity->getTratamiento()->getId()));\r\n $tratamientos = $em->getRepository('DGPlusbelleBundle:DetalleVentaPaquete')->findBy(array('ventaPaquete' => $ventaPaquete->getId()));\r\n \r\n $aux = 0;\r\n $total = count($tratamientos);\r\n foreach ($tratamientos as $trat){\r\n if($seguimiento->getNumSesion() + 1 >= $trat->getNumSesiones()){\r\n $aux++;\r\n }\r\n }\r\n\r\n if($aux < $total){\r\n $ventaPaquete->setEstado(2);\r\n } else {\r\n $ventaPaquete->setEstado(3);\r\n }\r\n\r\n $em->merge($ventaPaquete);\r\n $em->flush();\r\n\r\n\r\n $seguimiento->setNumSesion($seguimiento->getNumSesion() + 1);\r\n $em->merge($seguimiento);\r\n $em->flush();\r\n \r\n $idtratamientos = array(); \r\n \r\n $dvtratamientos = $em->getRepository('DGPlusbelleBundle:DetalleVentaPaquete')->findBy(array('ventaPaquete' => $ventaPaquete->getId()));\r\n\r\n foreach ($dvtratamientos as $trat){\r\n $idtrat = $trat->getTratamiento()->getId();\r\n $seguimiento = $em->getRepository('DGPlusbelleBundle:SeguimientoPaquete')->findOneBy(array('tratamiento' => $idtrat,\r\n 'idVentaPaquete' => $ventaPaquete->getId()\r\n ));\r\n\r\n if($seguimiento->getNumSesion() < $trat->getNumSesiones()){\r\n array_push($idtratamientos, $idtrat); \r\n } \r\n }\r\n\r\n $dql = \"SELECT t.id, t.nombre FROM DGPlusbelleBundle:Tratamiento t \"\r\n . \"WHERE t.id IN (:ids) \";\r\n $tratVenta = $em->createQuery($dql)\r\n ->setParameter('ids', $idtratamientos)\r\n ->getResult();\r\n \r\n \r\n $rsm = new ResultSetMapping();\r\n $em = $this->getDoctrine()->getManager(); \r\n \r\n $sql = \"select ven.id as id,\"\r\n . \"paq.nombre as nomPaquete, \"\r\n . \"tra.nombre as ntrata, \"\r\n . \"pt.num_sesiones as sesiones, \"\r\n . \"seg.num_sesion as numSesion \"\r\n . \"from venta_paquete ven \"\r\n . \"inner join paquete paq on ven.paquete = paq.id \"\r\n . \"inner join seguimiento_paquete seg on ven.id = seg.id_venta_paquete \"\r\n . \"inner join persona emp on ven.empleado = emp.id \"\r\n . \"inner join persona pac on ven.paciente = pac.id \"\r\n . \"inner join paciente p on pac.id = p.persona \"\r\n . \"inner join expediente exp on p.id = exp.paciente \"\r\n . \"inner join sucursal suc on ven.sucursal = suc.id \"\r\n . \"inner join detalle_venta_paquete pt on ven.id = pt.venta_paquete \"\r\n . \"inner join tratamiento tra on pt.tratamiento = tra.id \"\r\n . \"left outer join descuento des on ven.descuento = des.id \"\r\n . \"where ven.id = '$id' and seg.tratamiento = pt.tratamiento\";\r\n \r\n $rsm->addScalarResult('id','id');\r\n $rsm->addScalarResult('nomPaquete','nomPaquete');\r\n $rsm->addScalarResult('ntrata','ntrata');\r\n $rsm->addScalarResult('sesiones','sesiones');\r\n $rsm->addScalarResult('numSesion','numSesion');\r\n \r\n $mensaje = $em->createNativeQuery($sql, $rsm)\r\n ->getResult();\r\n \r\n $this->get('bitacora')->escribirbitacora(\"Se registro una nueva sesion de tratamiento\", $usuario->getId());\r\n \r\n $response = new JsonResponse();\r\n $response->setData(array(\r\n 'exito' => '1',\r\n 'ventaPaquete' => $mensaje,\r\n 'tratVenta' => $tratVenta,\r\n )); \r\n \r\n return $response; \r\n } else { \r\n return new Response('0'); \r\n } \r\n }", "title": "" }, { "docid": "0b7d97d532a5b7e1224613b35b666506", "score": "0.56064963", "text": "public function initialize()\n {\n $this->hasMany('cd_informacao', 'App\\Models\\InformacoesccompraHasArea', 'cd_informacao', array('alias' => 'InformacoesccompraHasArea'));\n $this->belongsTo('cd_empresa', 'App\\Models\\Empresa', 'cd_empresa', array('alias' => 'Empresa'));\n $this->hasMany('cd_informacao', 'App\\Models\\InformacoesccompraHasArea', 'cd_informacao', NULL);\n $this->belongsTo('cd_empresa', 'App\\Models\\Empresa', 'cd_empresa', array('foreignKey' => true,'alias' => 'Empresa'));\n }", "title": "" }, { "docid": "c73b4aa7b8f1560c9ed3c21553b189fe", "score": "0.5589309", "text": "public function clientes(){\n // hasOne : ele vai retornar o primeiro registro que encontrar\n // hasMany : ele vai retornar todos os registros\n\n// return $this->hasMany('Cliente','cliente_tipo_id');\n }", "title": "" }, { "docid": "a8e0926d0c5281c59900171d5a1b678b", "score": "0.55811983", "text": "public function addChampStatutAction() \n { \n \n $request = $this->get('request');\n\n if ($request->isXmlHttpRequest()) {\n \n $data = $request->request->all();\n //\\Doctrine\\Common\\Util\\Debug::dump($data);\n \n $repository = $this->getDoctrine()->getManager()->getRepository('NIPAProjetBundle:DemandeStatut');\n\n // On vérifie que l'objet n'existe pas déjà\n if($entity = $repository->findOneBy(array('nom' => $data[\"nom\"]))) {\n throw new NotFoundHttpException(\n $this->get('translator')->trans('Ce statut existe déjà')\n );\n return new JsonResponse(array('message' => 'Error'), 400); \n }\n\n //On récupère toutes les instances\n $repository = $this->getDoctrine()->getManager()->getRepository('NIPAProjetBundle:DemandeStatut');\n $listStatuts = $repository->findAll(); \n \n $id = substr($listStatuts[sizeof($listStatuts)-1]->getReference(), -1) + 1;\n \n $entity = new DemandeStatut();\n $entity->setNom($data[\"nom\"]);\n $entity->setReference(\"Ref\".$id);\n \n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return new JsonResponse(array('message' => 'Success!'), 200);\n\n //$response = new JsonResponse(array('message' => 'Error'), 400);\n\n //return $response; \n \n }\n }", "title": "" }, { "docid": "349925520fb929f31504d91d47e5dcf6", "score": "0.55709946", "text": "public function registroAbonoPaqueteAction()\r\n {\r\n $isAjax = $this->get('Request')->isXMLhttpRequest();\r\n if($isAjax){\r\n $em = $this->getDoctrine()->getManager();\r\n $usuario= $this->get('security.token_storage')->getToken()->getUser();\r\n \r\n $id = $this->get('request')->request->get('id');\r\n $sucursalId = $this->get('request')->request->get('sucursal');\r\n $empleadoId = $this->get('request')->request->get('empleado');\r\n $monto = $this->get('request')->request->get('monto');\r\n $descripcion = $this->get('request')->request->get('descripcion');\r\n $id_ventapaquete = $this->get('request')->request->get('id_ventapaquete');\r\n \r\n $paciente = $em->getRepository('DGPlusbelleBundle:Paciente')->find($id);\r\n $sucursal = $em->getRepository('DGPlusbelleBundle:Sucursal')->find($sucursalId);\r\n $empleado = $em->getRepository('DGPlusbelleBundle:Empleado')->find($empleadoId);\r\n $ventaPaquete = $em->getRepository('DGPlusbelleBundle:VentaPaquete')->find($id_ventapaquete);\r\n \r\n $entity = new \\DGPlusbelleBundle\\Entity\\Abono();\r\n \r\n $entity->setPaciente($paciente);\r\n $entity->setEmpleado($empleado);\r\n $entity->setSucursal($sucursal);\r\n $entity->setFechaAbono(new \\DateTime('now'));\r\n $entity->setVentaPaquete($ventaPaquete); \r\n $entity->setPersonaTratamiento(null);\r\n $entity->setMonto($monto);\r\n $entity->setDescripcion($descripcion);\r\n \r\n $em->persist($entity);\r\n $em->flush();\r\n\r\n $ptid = $ventaPaquete->getId();\r\n \r\n $rsm2 = new ResultSetMapping();\r\n $sql2 = \"select cast(sum(abo.monto) as decimal(36,2)) abonos, count(abo.monto) cuotas \"\r\n . \"from abono abo inner join venta_paquete p on abo.venta_paquete = p.id \"\r\n . \"where p.id = '$ptid'\";\r\n \r\n $rsm2->addScalarResult('abonos','abonos');\r\n $rsm2->addScalarResult('cuotas','cuotas');\r\n \r\n $abonos = $em->createNativeQuery($sql2, $rsm2)\r\n ->getSingleResult();\r\n //var_dump($abonos);\r\n $this->get('bitacora')->escribirbitacora(\"Se registro un nuevo abono de un paquete\", $usuario->getId());\r\n \r\n $response = new JsonResponse();\r\n $response->setData(array(\r\n 'exito' => '1',\r\n 'abonos' => $abonos['abonos'],\r\n 'cuotas' => $abonos['cuotas'],\r\n 'costo' => $ventaPaquete->getCosto(),\r\n 'descuento' => $ventaPaquete->getDescuento()->getPorcentaje(),\r\n )); \r\n \r\n return $response; \r\n } else { \r\n return new Response('0'); \r\n } \r\n }", "title": "" }, { "docid": "1835a64485dd8600a5c723c204340875", "score": "0.5544923", "text": "public function buildRelations()\n\t{\n\t\t$this->addRelation('UsuarioRelatedById_emisor', 'Usuario', RelationMap::MANY_TO_ONE, array('id_emisor' => 'id', ), null, null);\n\t\t$this->addRelation('UsuarioRelatedById_receptor', 'Usuario', RelationMap::MANY_TO_ONE, array('id_receptor' => 'id', ), null, null);\n\t\t$this->addRelation('Tipo_notificacion', 'Tipo_notificacion', RelationMap::MANY_TO_ONE, array('id_tipo_notificacion' => 'id', ), null, null);\n\t}", "title": "" }, { "docid": "fae229beb21be2e09d8f6aae1770986d", "score": "0.5544234", "text": "public function sucursal(){ \n return $this->belongsTo('Sucursal'); \n }", "title": "" }, { "docid": "02e7ddd9a79bc596db8d00f2a7e1e47e", "score": "0.5540345", "text": "public function comentario(){\n return $this->hasMany('App\\Comentario');\n }", "title": "" }, { "docid": "bb25f117613004577e5116469f040b2e", "score": "0.5533676", "text": "public function relations()\n {\n return array(\n 'usuario' => array( self::BELONGS_TO, 'Usuarios', 'usuarios_id_usuario'),\n 'accionGrupal' => array( self::BELONGS_TO, 'AccionesGrupales', 'acciones_grupales_id_accion_grupal'),\n );\n }", "title": "" }, { "docid": "f1f372eeb9497839d0bf5c8462d0046d", "score": "0.55178374", "text": "public function especialistas()\n {\n return $this->belongsToMany('App\\EspecialistaModel', 'especialista_servicios', 'id_servicio', 'id_especialista');\n }", "title": "" }, { "docid": "f2ea5adfb458c6248be309f88dc86623", "score": "0.5511007", "text": "public function initialize()\n {\n $this->hasMany('cd_simples', 'App\\Models\\UnidadeNegocio', 'cd_simples', array('alias' => 'UnidadeNegocio'));\n $this->hasMany('cd_simples', 'App\\Models\\UnidadeNegocio', 'cd_simples', NULL);\n }", "title": "" }, { "docid": "45d307f366dc1a058b8afe403793a795", "score": "0.5484838", "text": "function asociazaCuGestiuni($gestiuni = array(), $params = array())\n {\n $gestiuni_asociate = $this->getGestiuniAsociate();\n foreach ($gestiuni as $gest_id)\n {\n if (!in_array($gest_id, $gestiuni_asociate))\n {\n $cg = new ProduseGestiuni($params);\n $cg->gestiune_id = $gest_id;\n $cg->produs_id = $this->id;\n\t\t\t\t$cg -> modificat = 1;\n $cg->save();\n }\n }\n }", "title": "" }, { "docid": "bd8aebc9e55438107a5652dabe118eae", "score": "0.54822564", "text": "public function buildRelations()\n\t{\n\t\t$this->addRelation('UsuarioRelatedByAprovadorId', 'Usuario', RelationMap::MANY_TO_ONE, array('aprovador_id' => 'id', ), null, null);\n\t\t$this->addRelation('Premio', 'Premio', RelationMap::MANY_TO_ONE, array('premio_id' => 'id', ), null, null);\n\t\t$this->addRelation('UsuarioRelatedBySolicitanteId', 'Usuario', RelationMap::MANY_TO_ONE, array('solicitante_id' => 'id', ), null, null);\n\t}", "title": "" }, { "docid": "2504bb122bb541b138d456b1a13d3322", "score": "0.5476865", "text": "public function buildRelations()\n {\n $this->addRelation('Cliente', 'Cliente', RelationMap::MANY_TO_ONE, array('idcliente' => 'idcliente', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Proveedorcliente', 'Proveedorcliente', RelationMap::MANY_TO_ONE, array('idconsignatarioembarcador' => 'idproveedorcliente', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Expedienteanticipo', 'Expedienteanticipo', RelationMap::ONE_TO_MANY, array('idexpediente' => 'idexpediente', ), 'CASCADE', 'CASCADE', 'Expedienteanticipos');\n $this->addRelation('Expedientearchivo', 'Expedientearchivo', RelationMap::ONE_TO_MANY, array('idexpediente' => 'idexpediente', ), 'CASCADE', 'CASCADE', 'Expedientearchivos');\n $this->addRelation('Expedientegasto', 'Expedientegasto', RelationMap::ONE_TO_MANY, array('idexpediente' => 'idexpediente', ), 'CASCADE', 'CASCADE', 'Expedientegastos');\n $this->addRelation('Expedienteservicio', 'Expedienteservicio', RelationMap::ONE_TO_MANY, array('idexpediente' => 'idexpediente', ), 'CASCADE', 'CASCADE', 'Expedienteservicios');\n }", "title": "" }, { "docid": "a69bcf688644160d4b0e062fd09ead1e", "score": "0.5476029", "text": "public function addAttraitAction()\r\r\n\t{\r\r\n\t\tgc_enable();\r\r\n\t\t$injecterole = \"ROLE_ADMIN\";\r\r\n\t\t//Gestionnaire d'entitiés\r\r\n\t\t$em = $this->getDoctrine()->getEntityManager();\r\r\n\t\t//Récupère le nom de la personne qui accède à l'administration\r\r\n\t\t$user = $this->container->get('security.context')->getToken()->getUser();\r\r\n\t\t//On vérifie le rôle\r\r\n\t\t$validRole = new ControleDataSecureController();\r\r\n\t\t$role = $validRole->getValidRoles($user);\r\r\n\t\t//Formulaire d'ajout d'un attrait.\r\r\n\t\t$attrait = new Attraits();\r\r\n\t\t$form = $this->createForm(new AttraitForm($injecterole), $attrait);\r\r\n\t\t//Création des textes pour les attraits temporaires cela va nous servir pour la fiche client.\r\r\n\t\t$temporaireAttrait = new Temporaire_attraits();\r\r\n\t\t// On récupére la requète.\r\r\n\t\t$request = $this->get('request');\r\r\n\t\t// On vérifie qu'elle est de type << POST >>.\r\r\n\t\tif( $request->getMethod() == 'POST' )\r\r\n\t\t{\r\r\n\t\t\t// On fait le lien Requête <-> Formulaire.\r\r\n\t\t\t$form->bindRequest($request);\r\r\n\t\t\t// On vérifie que les valeurs rentrées sont correctes.\r\r\n\t\t\t\t//On enregistre la région, la zone et la ville\r\r\n\t\t\t\t$region = $_POST['listeregion'];\r\r\n\t\t\t\t$zone = $_POST['listezone'];\r\r\n\t\t\t\t$ville = $_POST['listeville'];\r\r\n\t\t\t\t$attrait->setRegionId($em->find(\"MyAppGlobalBundle:Regions\", $region));\r\r\n\t\t\t\t$attrait->setZoneId($em->find(\"MyAppGlobalBundle:Zones\", $zone));\r\r\n\t\t\t\t$attrait->setVilleId($em->find(\"MyAppGlobalBundle:Villes\", $ville));\r\r\n\t\t\t\t//On valide les textes de l'éditeur\r\r\n\t\t\t\t//$txtfr = $validRole->getSecureData($form->getData()->getTexteDescriptionFr());\r\r\n\t\t\t\t//$txten = $validRole->getSecureData($form->getData()->getTexteDescriptionEn());\r\r\n\t\t\t\t// entity attraits\r\r\n\t\t\t\t//$attrait->setTexteDescriptionFr($txtfr); //Texte descriptif FR\r\r\n\t\t\t\t//$attrait->setTexteDescriptionEn($txten); //Texte descriptif EN\r\r\n\t\t\t\t$attrait->setLatitude($validRole->getFormatValueGps($form->getData()->getLatitude())); //On valide la valeur de la latitude\r\r\n\t\t\t\t$attrait->setLongitude($validRole->getFormatValueGps($form->getData()->getLongitude())); //Ici on valide la valeur pour la longitude\r\r\n\t\t\t\t$attrait->setCodePostal($validRole->getCodePostalAddSpace($form->getData()->getCodePostal())); //On vérifie le code postal\r\r\n\t\t\t\t$attrait->setDateCreation(new \\DateTime(\"now\"));\r\r\n\t\t\t\t$utilisateur = $em->find('MyAppGlobalBundle:Utilisateur', $form->getData()->getUtilisateur()->getId());\r\r\n\t\t\t\t$utilisateur->setAttraitExiste(true);\t\t\r\r\n\t\t\t\t$em->persist($utilisateur);\r\r\n\t\t\t\t//$em->persist($attrait);\r\r\n\t\t\t\t/*foreach($attrait->getUrl1Fr() as $mov)\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$em->persist($mov);\r\r\n\t\t\t\t}*/\r\r\n\t\t\t\t$em->persist($form->getData()->getLundiMatinEte());\r\r\n\t\t\t\t//On vérifie que la valeur du champ photo n'est pas vide.\r\r\n\t\t\t\t/*$img = $form->getData()->getImageDoctrine();\r\r\n\t\t\t\tif($img != null)\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$attrait->setImage($img);\r\r\n\t\t\t\t}*/\r\r\n\t\t\t\t//traitement des types de soins\r\r\n\t\t\t\t$tabTypeSoinCompare = [];\r\r\n\t\t\t\t//Récupère les id des types de soin du formulaire\r\r\n\t\t\t\tforeach($form->getData()->getSoinsSanteId() as $tw){\r\r\n\t\t\t\t\tif($tw->getTypesSoinsSanteId() != null)\r\r\n\t\t\t\t\t\tarray_push($tabTypeSoinCompare, $tw->getTypesSoinsSanteId()->getId());\r\r\n\t\t\t\t}\r\r\n\t\t\t\t$tabReturnTypeSoin = $em->getRepository(\"MyAppGlobalBundle:Types_soins_sante\")->getReturnTableauTypeSoin($tabTypeSoinCompare, $attrait->getId());\r\r\n\t\t\t\t//persiste les nouveaux type de soins s'il y a.\r\r\n\t\t\t\tif($tabReturnTypeSoin != null){\r\r\n\t\t\t\t\tforeach($tabReturnTypeSoin as $ts){\r\r\n\t\t\t\t\t\t$instanceTypeSoin = $em->find(\"MyAppGlobalBundle:Types_soins_sante\", $ts);\r\r\n\t\t\t\t\t\t$attrait->addTypes_soins_sante($instanceTypeSoin);\r\r\n\t\t\t\t\t\t$instanceTypeSoin = null;\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\t\t\t\t//On enregistre qui à créer l'attrait\r\r\n\t\t\t\t$attrait->setValiderPar($user->getUsername());\r\r\n\t\t\t\t$em->persist($attrait);\r\r\n\t\t\t\t$em->flush();\r\r\n\t\t\t\t//Nettoyage de la mémoire.\r\r\n\t\t\t\tgc_collect_cycles();\t\r\r\n\t\t\t\tgc_disable();\r\r\n\t\t\t\techo 'Attrait ajouté avec succés !';\r\r\n\t\t\t\t//On redirige vers la liste des attraits.\r\r\n\t\t\t\treturn $this->redirect($this->generateUrl('_Dashboard_attrait'));\r\r\n\t\t}\r\r\n gc_collect_cycles();\t\r\r\n\t\t//Préparation de la view dashboard_addattrait_html.twig\r\r\n\t\treturn $this->render('MyAppAdminBundle:Attrait:dashboard_addattrait.html.twig',\r\r\n\t\t\t\tarray(\r\r\n\t\t\t\t\t\t'annee' \t\t\t => date('Y'),\r\r\n\t\t\t\t\t\t'name_admin' => $user->getUsername(),\r\r\n\t\t\t\t\t\t'pointeur' \t\t\t => 'pointeur',\r\r\n\t\t\t\t\t\t'form' \t\t\t\t => $form->createView(),\r\r\n\t\t\t\t\t\t'addatt'\t\t\t => \"menu_attrait\",\r\r\n\t\t\t\t\t\t'exist' \t\t\t => \"false\",\r\r\n\t\t\t\t\t\t'role'\t\t\t\t => $role,\r\r\n\t\t\t\t));\r\r\n\t}", "title": "" }, { "docid": "58619ad91e80f66f94a983400fc32490", "score": "0.5471762", "text": "protected function setupCreateOperation()\n {\n CRUD::setValidation(ProduitsRequest::class);\n $this->crud->addField(\n [\n 'name' => 'code_categorie',\n 'type' => 'select2',\n 'label' => \"Categorie du produit\",\n 'entity' => 'categories',\n 'attribute' => 'nom',\n 'model' => \"App\\Models\\Categories\", // foreign key model\n //'pivot' => true,\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6'\n ]\n ]\n );\n\n\n $this->crud->addField(\n [\n 'name' => 'nom',\n 'type' => 'text',\n 'label' => 'nom du produit',\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6'\n ],\n ]\n );\n $this->crud->addField(\n [ // Browse\n 'label' => \"image\",\n 'name' => \"image\",\n 'type' => 'upload_multiple',\n 'upload' => true,\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6'\n ],\n ]\n );\n $this->crud->addField(\n [\n 'name' => 'quantite',\n 'type' => 'number',\n 'label' => 'quantité disponible',\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6'\n ],\n ]\n );\n\n $this->crud->addField(\n [\n 'name' => 'owner_id',\n 'type' => 'hidden',\n 'value' => backpack_user()->id\n ]\n );\n\n\n $this->crud->addField(\n [\n 'name' => 'prix_vente',\n 'type' => 'text',\n 'label' => 'prix de vente',\n 'default' => '2000',\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6 '\n ],\n ]\n );\n\n $this->crud->addField(\n [\n 'name' => 'prix_achat',\n 'type' => 'text',\n 'label' => 'prix d\\'achat',\n 'default' => '2000',\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6'\n ],\n ]\n );\n\n $this->crud->addField(\n [\n 'name' => 'enabled',\n 'type' => 'boolean',\n 'label' => 'Activer',\n 'default' => true,\n 'wrapperAttributes' => [\n 'class' => 'form-group col-md-6'\n ],\n ]\n );\n $this->crud->addField([\n 'name' => 'description',\n 'type' => 'wysiwyg',\n 'label' => 'description du produit',\n ]);\n\n\n $mtn = request()->input('prix_vente');\n $prix_achat = intval($mtn) * 0.2 + $mtn;\n $prix_vente = intval($mtn) + 1500;\n\n \\DB::table('produits')->where('code', request()->input('code'))->first() ? \"\" : request()->merge(array('prix_vente' => $prix_vente));\n request()->merge(array('prix_achat' => $prix_achat));\n }", "title": "" }, { "docid": "be5f68046d755da34b53d8ffa20e6131", "score": "0.54689544", "text": "public function liste() {\n // Suppression\n if(isset($this->post->liste)){\n //$entity = new Consommation();\n $facture = new Facture();\n foreach ($this->post->liste as $id) {\n // Mettre à jour pointeur compteur\n $consommation = $this->em->selectById('consommation', $id);\n $compteur = $this->em->selectById('compteur', $consommation->getIdCompteur());\n $compteur->setPointeur($compteur->getPointeur() - $consommation->getQuantiteChiffre());\n $this->em->update($compteur);\n //$entity->setId($id);\n $facture->setId($id);\n $this->em->delete($facture);\n $this->em->delete($consommation);\n }\n $this->handleStatus('Consommation(s) ' . implode(',', $this->post->liste) . ' supprimée(s)');\n }\n // Générer facture\n if(isset($this->post->facture)){\n $facture = new Facture();\n foreach ($this->post->facture as $id) {\n $consommation = $this->em->selectById('consommation', $id);\n $facture->setId($id);\n $facture->setIdConsommation($id);\n $numero = strtoupper(base_convert(rand(100000000, 999999999), 10, 36));\n $facture->setNumero(str_pad($id, 4, '0', STR_PAD_LEFT) . $numero);\n $tarif = $this->em->selectById('tarif', $consommation->getIdTarif());\n $montant = $consommation->getQuantiteChiffre() * $tarif->getPrixLitre();\n $facture->setMontant($montant);\n $facture->setDateFacturation($this->date);\n $date = $consommation->getDate();\n $facture->setDateLimitePaiement($date);\n $this->em->replace($facture);\n }\n $this->handleStatus('Facture(s) générée(s) pour la/les consommation(s) ' . implode(',', $this->post->facture));\n }\n // Charger la vue liste\n $this->loadView('liste', 'content');\n // Lire les données à partir de la bd et formater\n $arr = $this->em->selectAll('compteur');\n $arrCompteur = $this->em->getRefined($arr);\n $liste = $this->em->selectAll('consommation');\n $html = '';\n foreach ($liste as $key => $entity) {\n $compteur = $arrCompteur[$entity->getIdCompteur()];\n $id = $entity->getId();\n $html .= '<tr>';\n $html .= '<td>' . $id . '</td>';\n //$html .= '<td> <a href=\"abonnements/detail/' . $id . '\" title=\"Détails\">' . $entity->getNumero() . '</a> </td>';\n $html .= '<td>' . $entity->getQuantiteChiffre() . ' litres</td>';\n $html .= '<td><a href=\"compteurs/detail/' . $compteur->id . '\">' . $compteur->numero . '</a></td>';\n $html .= '<td>' . Helper::getDate($entity->getDate()) . '</td>';\n $html .= '<td><a href=\"consommations/modifier/' . $id . '\"> Modifier </a></td>';\n $html .= '<td><input type=\"checkbox\" name=\"facture[]\" value=\"' . $id . '\"></td>';\n $html .= '<td><input type=\"checkbox\" name=\"liste[]\" value=\"' . $id . '\"></td>';\n //$html .= '<td><form type=\"POST\" action=\"compteurs/liste\"><button type=\"submit\" name=\"id\" value=\"' . $id . '\">Supprimer</button></form></td>';\n $html .= '</tr>';\n }\n // Ajouter les compteurs à la vue\n $this->loadHtml($html, 'list');\n }", "title": "" }, { "docid": "315d1e1bf2d6db5643d8a52a6f5326ec", "score": "0.5446881", "text": "public function addCuisineAttraitAction()\r\r\n\t{\r\r\n\t\t$em = $this->getDoctrine()->getEntityManager();\r\r\n\t\t//R�cup�re le nom de la personne qui acc�de � l'administration\r\r\n\t\t$user = $this->container->get('security.context')->getToken()->getUser();\r\r\n\t\t//on vérifie le role\r\r\n\t\t$validRole = new ControleDataSecureController();\r\r\n\t\t$role = $validRole->getValidRoles($user);\r\r\n\t\t//Hydratation du formulaire avec l'entity\r\r\n\t\t$cuisine = new Cuisines();\r\r\n\t\t//Formulaire d'ajout d'une cuisine.\r\r\n\t\t$form = $this->container->get('form.factory')->create(new AddCuisinesForm(), $cuisine);\r\r\n\t\t// On r�cup�re la requ�te.\r\r\n\t\t$request = $this->get('request');\r\r\n\t\t// On v�rifie qu'elle est de type � POST �.\r\r\n\t\tif( $request->getMethod() == 'POST' )\r\r\n\t\t{\r\r\n\t\t\t// On fait le lien Requ�te <-> Formulaire.\r\r\n\t\t\t$form->bindRequest($request);\r\r\n\t\t\t// On v�rifie que les valeurs rentr�es sont correctes.\r\r\n\t\t\tif( $form->isValid() )\r\r\n\t\t\t{\r\r\n\t\t\t\t// On l'enregistre notre objet $cuisine dans la base de donn�es.\r\r\n\t\t\t\t$em->persist($cuisine);\r\r\n\t\t\t\t$em->flush();\r\r\n\t\t\t\techo 'Cuisine ajoutée avec succés !';\r\r\n\t\t\t\t//On redirige vers la liste des cuisines.\r\r\n\t\t\t\treturn $this->redirect($this->generateUrl('_Dashboard_attraitcusines'));\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\t//Pr�paration de la view dashboard_addservice_html.twig\r\r\n\t\treturn $this->render('MyAppAdminBundle:Attrait:dashboard_addcuisine.html.twig',\r\r\n\t\t\t\tarray(\r\r\n\t\t\t\t\t\t'annee' \t\t\t => date('Y'),\r\r\n\t\t\t\t\t\t'name_admin' \t\t => $user->getUsername(),\r\r\n\t\t\t\t\t\t'pointeur' \t\t\t => 'pointeur',\r\r\n\t\t\t\t\t\t'form' \t\t\t\t => $form->createView(),\r\r\n\t\t\t\t\t\t'cuisiat'\t\t\t => \"menu_cuisine\",\r\r\n\t\t\t\t\t\t'exist' \t\t\t => \"false\",\r\r\n\t\t\t\t\t\t'role'\t\t\t\t => $role,\r\r\n\t\t\t\t));\r\r\n\t}", "title": "" }, { "docid": "b25134c19540ec676c7a38adb3a40314", "score": "0.5440431", "text": "public function getEquipo()\n {\n return $this->hasOne(Equipo::className(),['idEquipo'=> 'idEquipo'])->viaTable ('grupo',['idPersona'=>'idPersona']);\n \n }", "title": "" }, { "docid": "115fcc63eb5ed4ee0af9280366c08cb8", "score": "0.5430358", "text": "public function agregar2(){\r\n $ID_Usuario = $_POST['i'];\r\n $ID_Materia = $_POST['m'];\r\n $nota = $_POST['n'];\r\n $this->cursadas->add($ID_Usuario, $ID_Materia, $nota); // Invoco a la funcion add del modelo que realiza la accion y no devuelve nada obvio.\r\n }", "title": "" }, { "docid": "b29a41813adfebf840b38abb3567b5b7", "score": "0.54165334", "text": "public function ajouter() {\n $this->loadView('ajouter', 'content');\n $arr = $this->em->selectAll('compteur');\n $optionsCompteur = '';\n foreach ($arr as $entity) {\n $optionsCompteur .= '<option value=\"' . $entity->getId() . '\">' . $entity->getNumero() . '</option>';\n }\n $this->loadHtml($optionsCompteur, 'compteurs');\n if(isset($this->post->quantiteChiffre)){\n $consommation = new Consommation($this->post);\n $tarif = $this->em->selectAll('tarif')[0];\n $consommation->setIdTarif($tarif->getId());\n $this->em->save($consommation);\n // Incrémenter pointeur compteur\n $compteur = $this->em->selectById('compteur', $this->post->idCompteur);\n $compteur->setPointeur($compteur->getPointeur() + $this->post->quantiteChiffre);\n $this->em->update($compteur);\n $this->handleStatus('Consommation ajoutée avec succès.');\n }\n }", "title": "" }, { "docid": "2d9151e3bd3cb8510a9b2abae50197a1", "score": "0.5407164", "text": "public function objestrategico(){\n return $this->belongsTo(Objestrategico::class);\n }", "title": "" }, { "docid": "d5be0c17da866b28d796fb25f94c6dba", "score": "0.5390045", "text": "public function relations()\n {\n return array(\n 'pelicula'=>array(self::HAS_MANY, 'Pelicula', 'id_director'),\n );\n }", "title": "" }, { "docid": "10a41bb9988688736c9db996af0d0114", "score": "0.5386269", "text": "public function etatCommande() {\n return $this->belongsTo('App\\EtatCommande');\n }", "title": "" }, { "docid": "b4c1da0598729913f88e490d4d70ead1", "score": "0.538555", "text": "public function pantallaAction() {\r\n $this->setPersistance(true);\r\n }", "title": "" }, { "docid": "2ba0b237e6824abc374e684e255fe0bb", "score": "0.5384405", "text": "function updaterelationAction () {\r\n $table = $this->_project->find_table ($this->getRequest()->getPost ('clase'));\r\n\r\n //Obtengo las relaciones\r\n $relations = $table->get_relations ();\r\n\r\n //Obtengo la relación en cuestion\r\n $relation = $relations[$this->getRequest()->getPost ('row')];\r\n\r\n// debug ($relations);\r\n\r\n //Solo se le hacen cambios a las HasMany\r\n if (! $relation instanceof HasMany)\r\n {\r\n ZendExt_MessageBox::show('Este tipo de relaciones no admiten cambios.', ZendExt_MessageBox::ERROR);\r\n return;\r\n }\r\n\r\n //Se le pone la tabla intermedia\r\n $relation->set_intermediate_table ($relation->get_foreign_table ());\r\n\r\n //Se le pone la tabla foranea\r\n $relation->set_foreign_table ($this->getRequest()->getPost ('value'));\r\n\r\n //Se actualiza el campo foraneo con el campo de llave primaria de esa tabla\r\n $relation->set_foreign_field($this->_project->find_table($this->getRequest()->getParam('value'))->get_pk_field ()->get_name ());\r\n\r\n //Se crea la relacion inversa\r\n $inverse_relation = new HasMany();\r\n\r\n //La tabla inversa es la local\r\n $inverse_relation->set_foreign_table ($table->get_name ());\r\n\r\n //Idem\r\n $inverse_relation->set_local_field ($relation->get_foreign_field ());\r\n\r\n //Idem\r\n $inverse_relation->set_foreign_field ($relation->get_local_field ());\r\n\r\n //Idem\r\n $inverse_relation->set_intermediate_table ($relation->get_intermediate_table ());\r\n\r\n $inverse_table = $this->_project->find_table ($relation->get_foreign_table ());\r\n\r\n //Se elimina la relación vieja\r\n $inverse_table->add_relation ($inverse_relation);\r\n\r\n foreach ($inverse_table->get_relations () as $index =>$rr) {\r\n if ($rr->get_foreign_table() == $relation->get_intermediate_table()) {\r\n $inverse_table->rem_relation ($index); break;\r\n }\r\n }\r\n\r\n $tmp_table = $this->_project->find_table($relation->get_intermediate_table());\r\n $tmp_relations = $tmp_table->get_relations ();\r\n\r\n foreach ($tmp_relations as $index => $tr) {\r\n if ($tr->get_foreign_table () == $table || $tr->get_foreign_table () == $relation->get_foreign_table()) {\r\n $tmp_table->rem_relation ($index); break;\r\n }\r\n }\r\n \r\n $this->save (); echo json_encode($table->to_array ());\r\n }", "title": "" }, { "docid": "91cf602551b9de589fa8bb5b2063ca8d", "score": "0.5382482", "text": "public function universidad()\n {\n return $this->belongsTo('App\\Universidad');\n }", "title": "" }, { "docid": "91cf602551b9de589fa8bb5b2063ca8d", "score": "0.5382482", "text": "public function universidad()\n {\n return $this->belongsTo('App\\Universidad');\n }", "title": "" }, { "docid": "fbcdc1bc031bdbfca04e6ca7b5765752", "score": "0.5365777", "text": "public function ordenes_corte() //relacion con User\n {\n return $this->hasMany('App\\Orden_corte','prendas_id');\n }", "title": "" }, { "docid": "a51110b7624bd39b6cc78fd594370582", "score": "0.53641516", "text": "public function commandes()\n {\n return $this->hasMany('App\\Commande');\n }", "title": "" }, { "docid": "8d78c25fa25d31087849fb76d8489b8c", "score": "0.5361968", "text": "public function niveauAjouterAction()\n\t{\n\t\t//$niveau1 -> setLibelle('première année') ;\n\t\t//$niveau2 = new Niveau();\n\t\t//$niveau2 -> setLibelle('deuxième année') ;\n\t\t$niveau3 = new Niveau();\t\n\t\t$niveau3 -> setLibelle('troisième année') ;\n\t\t\n\t\t// Etape 1 : On récupère l'EntityManager\n\t\t$em = $this->getDoctrine()->getManager();\n \n\t\t// Etape 2 : On PERSISTE les entités\n\t\t$em->persist($niveau3);\n\t\t\t\n\t\t// Étape 3 : On « flush » tout ce qui a été persisté avant\n\t\t$em->flush();\n \n\t\t/*return $this->redirect( $this->generateUrl('Niveau_consulter', array('niveau' => $niveau3->getId(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'libelle'=> $niveau3->getLibelle() )) );*/\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\treturn $this->render('webStudentEtudiantBundle:Etudiant:niveauConsulter.html.twig', array('niveau' => $niveau3->getLibelle()));\n\t}", "title": "" }, { "docid": "e91dbd69528120d98fd092d4e06aad1e", "score": "0.5359356", "text": "public function branchOffices()\n {\n return $this->belongsToMany(UsuarioSucursal::class, \"usuario_id\");\n }", "title": "" }, { "docid": "7af7fc4c6529b1f188bbecc4e20def2c", "score": "0.53584486", "text": "public function productos(){\n return $this->hasMany('App\\Productos', 'id_disciplina', 'disciplina_id');\n }", "title": "" }, { "docid": "57d07cb5ea930851b4a8f7844bbc1542", "score": "0.53453636", "text": "protected function addElements() {\n// $this->add([\n// 'type' => 'text',\n// 'name' => 'instituicao',\n// 'attributes' => [\n// 'id' => 'instituicao',\n// 'class' => 'form-control',\n// ],\n// 'options' => [\n// 'label' => 'Instituição'\n// ],\n// ]);\n \n $this->add([\n 'type' => 'DoctrineModule\\Form\\Element\\ObjectSelect',\n 'name' => 'instituicao',\n 'attributes' => [\n 'id' => 'instituicao',\n 'class' => 'form-control',\n ],\n 'options' => [\n 'label' => 'Instituição',\n 'empty_option' => 'Selecione',\n 'object_manager' => $this->getObjectManager(),\n 'target_class' => \\Bag\\Entity\\Instituicao::class,\n 'property' => 'razaoSocial',\n 'find_method' => [\n 'name' => 'getQuery',\n 'params' => [\n 'search' => [\n 'combo' => 2\n ]\n ]\n ],\n ]\n ]); \n\n //Adiciona o campo \"requisitante\"\n $this->add([\n 'type' => 'text',\n 'name' => 'requisitante',\n 'attributes' => [\n 'id' => 'requisitante',\n 'class' => 'form-control',\n ],\n 'options' => [\n 'label' => 'Requisitante'\n ],\n ]);\n\n //Adiciona o campo \"recebedor\"\n $this->add([\n 'type' => 'text',\n 'name' => 'recebedor',\n 'attributes' => [\n 'id' => 'recebedor',\n 'class' => 'form-control',\n ],\n 'options' => [\n 'label' => 'Recebedor'\n ],\n ]);\n\n //Adiciona o campo \"data_retirada\"\n $this->add([\n 'type' => 'Zend\\Form\\Element\\Date',\n 'name' => 'dataRetirada',\n 'attributes' => [\n 'id' => 'dataRetirada',\n 'class' => 'form-control',\n ],\n 'options' => [\n 'format' => 'Y-m-d',\n 'label' => 'Data retirada'\n ],\n ]);\n\n //Adiciona o campo \"tipo\"\n $this->add([\n 'type' => 'select',\n 'name' => 'tipo',\n 'attributes' => [\n 'id' => 'tipo',\n 'class' => 'form-control'\n ],\n 'options' => [\n 'label' => 'Destino do material',\n 'value_options' => [\n \"0\" => \"Selecione\",\n \"1\" => \"Embrapa\",\n \"2\" => \"Fora da Embrapa\",\n \"3\" => \"Exterior\"\n ]\n ],\n ]);\n\n //Adiciona o campo \"anexoAtm\"\n $this->add([\n 'type' => 'text',\n 'name' => 'anexoAtm',\n 'attributes' => [\n 'id' => 'anexoAtm',\n 'class' => 'form-control',\n ],\n 'options' => [\n 'label' => 'Anexo ATM'\n ],\n ]);\n\n //Adiciona o campo \"area\"\n $this->add([\n 'type' => 'text',\n 'name' => 'area',\n 'attributes' => [\n 'id' => 'area',\n 'class' => 'form-control',\n ],\n 'options' => [\n 'label' => 'Area'\n ],\n ]);\n\n //Adiciona o campo \"observacao\"\n $this->add([\n 'type' => 'textarea',\n 'name' => 'observacao',\n 'attributes' => [\n 'id' => 'observacao',\n 'class' => 'form-control',\n 'rows' => '2',\n 'placeholder' => 'Digite as Observações aqui'\n ],\n 'options' => [\n 'label' => 'Observação'\n ],\n ]);\n \n //Adiciona o campo \"anexoAtm\"\n $this->add([\n 'type' => 'text',\n 'name' => 'anexoAtm',\n 'attributes' => [\n 'id' => 'anexoAtm',\n 'class' => 'form-control',\n 'readonly' => true\n ],\n 'options' => [\n 'label' => 'ATM'\n ],\n ]);\n \n //Adiciona o campo \"fileAtm\"\n $this->add([\n 'type' => 'Zend\\Form\\Element\\File',\n 'name' => 'fileAtm',\n 'attributes' => [\n 'id' => 'fileAtm',\n// 'class' => 'form-control',\n ],\n 'options' => [\n 'label' => 'Anexar ATM'\n ],\n ]);\n\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [\n 'value' => 'Salvar',\n 'id' => 'submitbutton',\n 'class' => 'btn btn-primary'\n ]\n ]);\n }", "title": "" }, { "docid": "9fd30e2d9ed63d81f9b82838a0be332b", "score": "0.53453434", "text": "public function comidaVenta()\n {\n \treturn $this->hasMany('App\\Comida_Venta','id_comida');\n \t}", "title": "" }, { "docid": "2769b7cfd96766b429080bd400bdd7ee", "score": "0.5339889", "text": "public function registroAbonoTratamientoAction()\r\n {\r\n $isAjax = $this->get('Request')->isXMLhttpRequest();\r\n if($isAjax){\r\n $em = $this->getDoctrine()->getManager();\r\n $usuario= $this->get('security.token_storage')->getToken()->getUser();\r\n \r\n $id = $this->get('request')->request->get('id');\r\n $sucursalId = $this->get('request')->request->get('sucursal');\r\n $empleadoId = $this->get('request')->request->get('empleado');\r\n $monto = $this->get('request')->request->get('monto');\r\n $descripcion = $this->get('request')->request->get('descripcion');\r\n $id_personatratamiento = $this->get('request')->request->get('id_personatratamiento');\r\n \r\n $paciente = $em->getRepository('DGPlusbelleBundle:Paciente')->find($id);\r\n $sucursal = $em->getRepository('DGPlusbelleBundle:Sucursal')->find($sucursalId);\r\n $empleado = $em->getRepository('DGPlusbelleBundle:Empleado')->find($empleadoId);\r\n $personaTratamiento = $em->getRepository('DGPlusbelleBundle:PersonaTratamiento')->find($id_personatratamiento);\r\n \r\n $entity = new \\DGPlusbelleBundle\\Entity\\Abono();\r\n \r\n $entity->setPaciente($paciente);\r\n $entity->setEmpleado($empleado);\r\n $entity->setSucursal($sucursal);\r\n $entity->setFechaAbono(new \\DateTime('now'));\r\n $entity->setVentaPaquete(null); \r\n $entity->setPersonaTratamiento($personaTratamiento);\r\n $entity->setMonto($monto);\r\n $entity->setDescripcion($descripcion);\r\n \r\n $em->persist($entity);\r\n $em->flush();\r\n\r\n $ptid = $personaTratamiento->getId();\r\n $rsm = new ResultSetMapping();\r\n $rsm2 = new ResultSetMapping();\r\n $sql2 = \"select cast(sum(abo.monto) as decimal(36,2)) abonos, count(abo.monto) cuotas \"\r\n . \"from abono abo inner join persona_tratamiento p on abo.persona_tratamiento = p.id \"\r\n . \"where p.id = '$ptid'\";\r\n \r\n $rsm2->addScalarResult('abonos','abonos');\r\n $rsm2->addScalarResult('cuotas','cuotas');\r\n \r\n $abonos = $em->createNativeQuery($sql2, $rsm2)\r\n ->getSingleResult();\r\n //var_dump($abonos);\r\n $this->get('bitacora')->escribirbitacora(\"Se registro un nuevo abono de un tratamiento\", $usuario->getId());\r\n \r\n $response = new JsonResponse();\r\n $response->setData(array(\r\n 'exito' => '1',\r\n 'abonos' => $abonos['abonos'],\r\n 'cuotas' => $abonos['cuotas'],\r\n 'costo' => $personaTratamiento->getCostoConsulta(),\r\n 'descuento' => $personaTratamiento->getDescuento()->getPorcentaje(),\r\n 'abono' => $entity->getId()\r\n )); \r\n \r\n return $response; \r\n } else { \r\n return new Response('0'); \r\n } \r\n }", "title": "" }, { "docid": "c4e3dcccd16ffa57a9fb42632bd40f08", "score": "0.5339279", "text": "public function __construct()\n {\n\t//$this->modification = $this->creation;\n\t// pour la relation bi-directionnelle\n\t$this->commentaires = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n }", "title": "" }, { "docid": "ffe78c7a72c193ffe397cec733abd623", "score": "0.53314567", "text": "function gruposEspecialistas()\n\t{\n\t\treturn $this->hasMany(\n\t\t\tGrupoEspecialista::class,\n\t\t\t'GrupoUsuario_id',\n\t\t\t'id'\n\t\t);\n\t}", "title": "" }, { "docid": "c090548b2e2eb6a88fbce1ba144c0c86", "score": "0.5330019", "text": "public function createAction() {\n $entity = new Grado();\n\n $request = $this->getRequest();\n $form = $this->createForm(new GradoType(), $entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $grado_copia = $form[\"grado\"]->getData();\n if ($grado_copia!=\"\") {\n $d = \"\";\n $areas_copiar = $em->getRepository('NetpublicCoreBundle:Asignatura')->findBy(array(\n 'es_area' => 1,\n \"grado\" => $grado_copia->getId()\n ));\n echo $grado_copia->getId().\".-..\";\n foreach ($areas_copiar as $a_c) {\n $area = new Asignatura();\n $area->setEsArea(1);\n $area->setNombre($a_c->getNombre());\n $area->setDuracionMinutos($a_c->getDuracionMinutos());\n $area->setGrado($entity);\n\n $em->persist($area);\n $asignaturas_copiar = $em->getRepository('NetpublicCoreBundle:Asignatura')->findBy(array(\n 'es_area' => 0,\n \"grado\" => $grado_copia->getId(),\n \"area\" => $a_c->getId()\n ));\n $d.=\"area\";\n foreach ($asignaturas_copiar as $asig_copiar) {\n $asignatura = new Asignatura();\n $asignatura->setEsArea(0);\n $asignatura->setNombre($asig_copiar->getNombre());\n $asignatura->setDuracionMinutos($asig_copiar->getDuracionMinutos());\n $asignatura->setArea($area);\n $asignatura->setGrado($entity);\n $em->persist($asignatura);\n $d.=\"asingtura\";\n }\n }\n\n //return new \\Symfony\\Component\\HttpFoundation\\Response(\"$d\".$grado_copia);\n }\n $em->persist($entity);\n $em->flush();\n if ($this->container->get('request')->isXmlHttpRequest()) {\n return new \\Symfony\\Component\\HttpFoundation\\Response(\"Ok\");\n }\n return $this->redirect($this->generateUrl('grado_show', array('id' => $entity->getId())));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "title": "" }, { "docid": "a4d447fe2e5efd43e3d1ccddcadb9625", "score": "0.5328608", "text": "public function localProva()\n {\n return $this->belongsToMany('App\\LocalProva', 'exame_local');\n }", "title": "" }, { "docid": "ee26bc75ad705958384da922a4341ad7", "score": "0.5326835", "text": "public function classe()\n {\n return $this->belongsTo('App\\Classe');\n }", "title": "" }, { "docid": "8c1e5049c424a431ad40b529bfefa112", "score": "0.53213733", "text": "public function actionCreate()\n\t{\n\t\t/*\t\n\t\t$pendiente = Orden::model()->findAllByAttributes(array(\n\t\t\t'id_usuario' => Yii::app()->user->getState(\"id_empleado\"),\n\t\t\t'paso_wf' => \"swOrden/llenaroc\"\n\t\t));\n\n\n\t\tif(count($pendiente) == 0){\n\t\t\t$model=new Orden;\n\t\t\t$model->paso_wf = \"swOrden/llenaroc\";\n\t\t\t$model->usuario_actual = Yii::app()->user->getState(\"id_empleado\");\n\t\t\t$model->id_usuario = Yii::app()->user->getState(\"id_empleado\");\n\t\t\t$model->save();\n\t\t\t$modelo = $model->id;\n\t\t}else{\n\t\t\t$modelo = $pendiente[0]['id'];\n\t\t}\n\t\t*/\n\t\t$model=new Orden;\n\t\t$model->id = Orden::model()->idProvisional();\n\t\t$model->usuario_actual = Yii::app()->user->getState(\"id_empleado\");\n\t\t$model->id_usuario = Yii::app()->user->getState(\"id_empleado\");\n\n\t\t$res = Gerencias::model()->jefaturaYGerencia();\n\t\tif(count($res) != 0){\n\t\t $model->id_gerencia = $res[0]['id_gerencia'];\n\t\t $model->id_gerente = $res[0]['id_gerente'];\n\n\t\t //Caso en el que el jefe es igual al gerente. (Analistas sin jefe, solo con gerente)\n $jefe_gerente = Orden::model()->getJefeJefatura(Yii::app()->user->getState(\"id_empleado\"));\n\t\t if(count($jefe_gerente) > 0){\n\t\t $model->id_jefatura = $jefe_gerente[0]['id_jefatura'];\n\t\t $model->id_jefe = $jefe_gerente[0]['id_jefe_gerente'];\n\t\t }else{\n\t\t \t $model->id_jefatura = $res[0]['id_jefatura'];\n\t\t $model->id_jefe = $res[0]['id_jefe'];\n\t\t }\n\t\t \n\t\t \n\t\t}\n\n\t\t$model->setScenario('');\n\t\t$model->paso_wf = \"swOrden/llenaroc\";\n\t\t$model->save();\n\n\n\t\t$modelo = $model->id;\n\n\t\t$this->redirect(array(\"update\", 'id' => $modelo));\n\n\t\t\n\t}", "title": "" }, { "docid": "430bdfacca1195dd8aadb06ad9ce84ea", "score": "0.5316826", "text": "public function getSeguimientoUas()\n {\n return $this->hasMany(SeguimientoUa::className(), ['id_pext' => 'id_pext', 'tipo_docum' => 'tipo_docum', 'nro_docum' => 'nro_docum', 'desde' => 'desde']);\n }", "title": "" }, { "docid": "7f2564fa142698bdc912cb97acae59e4", "score": "0.5311201", "text": "public function commanderProduit()\n { \n\n $user= User::create([\n \"name\"=>\"SANOU Baba\",\n \"email\"=>\"[email protected]\",\n \"password\"=>Hash::make(\"admin123\"),\n ]); \n $user = User::first();\n $produit1 = Produit::first();\n $produit2 = Produit::findOrFail(2);\n\n //$user->produits()->attach($produit1);\n\n $user->produits()->attach($produit2);\n \n dd($user->produits);\n \n }", "title": "" }, { "docid": "f8a01e8392128830f482a91179df4929", "score": "0.5310871", "text": "public function buildRelations()\n\t{\n $this->addRelation('sfGuardUser', 'sfGuardUser', RelationMap::MANY_TO_ONE, array('user_id' => 'id', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Role', 'Role', RelationMap::MANY_TO_ONE, array('role_id' => 'id', ), null, null);\n\t}", "title": "" }, { "docid": "91c333b50ff0f111c2f3bcd38ecc230e", "score": "0.5309287", "text": "public function modulos()\n {\n return $this->belongsToMany('App\\Modulo');\n }", "title": "" }, { "docid": "91c333b50ff0f111c2f3bcd38ecc230e", "score": "0.5309287", "text": "public function modulos()\n {\n return $this->belongsToMany('App\\Modulo');\n }", "title": "" }, { "docid": "4e541e59b4ca6ff4450e47788f05c1e0", "score": "0.53069204", "text": "public function utilisateurs()\n {\n return $this->hasMany('App\\Utilisateur');\n }", "title": "" }, { "docid": "d4aaa94ace5b1375a4cf1da366541f3a", "score": "0.53044116", "text": "public function unidades_negocio_familia()\n {\n return $this->belongsTo('App\\Models\\Unidad_negocio_familia');\n }", "title": "" }, { "docid": "572d56a84ce639f7ae92de5a9615ddd2", "score": "0.52985126", "text": "public function paiements(){\n\n return $this->hasMany('App\\Paiement');\n}", "title": "" }, { "docid": "3a39b67af791cfc2aecde84f70fbb780", "score": "0.5297909", "text": "public function comidaComida()\n {\n \treturn $this->hasMany('App\\Comida_Comida','id_comida');\n \t}", "title": "" }, { "docid": "3645134cc008a1dc1e2d980467d71d78", "score": "0.529616", "text": "public function buildRelations()\n {\n $this->addRelation('Consultorio', 'Consultorio', RelationMap::MANY_TO_ONE, array('idconsultorio' => 'idconsultorio', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Medico', 'Medico', RelationMap::MANY_TO_ONE, array('idmedico' => 'idmedico', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Paciente', 'Paciente', RelationMap::MANY_TO_ONE, array('idpaciente' => 'idpaciente', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Cargoconsulta', 'Cargoconsulta', RelationMap::ONE_TO_MANY, array('idconsulta' => 'idconsulta', ), 'CASCADE', 'CASCADE', 'Cargoconsultas');\n $this->addRelation('Consultaanticipo', 'Consultaanticipo', RelationMap::ONE_TO_MANY, array('idconsulta' => 'idconsulta', ), 'CASCADE', 'CASCADE', 'Consultaanticipos');\n $this->addRelation('Factura', 'Factura', RelationMap::ONE_TO_MANY, array('idconsulta' => 'idconsulta', ), 'CASCADE', 'CASCADE', 'Facturas');\n }", "title": "" }, { "docid": "4f3ca903a8fa60cd12533cc824a52cf6", "score": "0.5290019", "text": "public function initialize()\n {\n $this->belongsTo('unidade_negocio_has_usuario_Unidade_negocio_cd_unidade', 'App\\Models\\UnidadeNegocioHasUsuario', 'unidade_negocio_cd_unidade', array('alias' => 'UnidadeNegocioHasUsuario'));\n $this->belongsTo('rotina', 'App\\Models\\Rotina', 'cd_rotina', array('alias' => 'Rotina'));\n $this->belongsTo('rotina', 'App\\Models\\Rotina', 'cd_rotina', array('foreignKey' => true,'alias' => 'Rotina'));\n }", "title": "" }, { "docid": "d05c21a9174abe247dbe308fc7ede973", "score": "0.52800393", "text": "public function platos(){\n return $this->hasMany('App\\Models\\plato');\n }", "title": "" }, { "docid": "5f7635c88ed8c727445c748754e059a2", "score": "0.52789205", "text": "public function trgovine()\n {\n return $this->belongsToMany('App\\Trgovina','mobitel_trgovina');\n }", "title": "" }, { "docid": "8b7ce943b8610b83a14875223dbab56f", "score": "0.52778405", "text": "public function modulos()\n {\n return $this->belongsToMany('App\\Models\\Modulos', 'perfusr_t21', 'idusr_t21', 'idmodfunc_t21');\n }", "title": "" }, { "docid": "b8e7c0931c08d252a1647173192ccb84", "score": "0.5276573", "text": "public function buildRelations()\n\t{\n $this->addRelation('sfGuardUserProfile', 'sfGuardUserProfile', RelationMap::ONE_TO_MANY, array('id' => 'role_id', ), null, null);\n $this->addRelation('UserTeam', 'UserTeam', RelationMap::ONE_TO_MANY, array('id' => 'role_id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('ProjResourceType', 'ProjResourceType', RelationMap::ONE_TO_MANY, array('id' => 'role_id', ), null, null);\n\t}", "title": "" }, { "docid": "7f7bf7b40eaa63bb6e18ea1e9317d48f", "score": "0.52756095", "text": "public function servicioDetalle(){\n return $this->belongsTo('App\\Servicio_detalle');\n }", "title": "" }, { "docid": "a1a5567d36f65ec926523de24bf5b4b7", "score": "0.5272885", "text": "public function buildRelations()\n\t{\n $this->addRelation('EquipoRelatedByIdequipo1', 'Equipo', RelationMap::MANY_TO_ONE, array('idequipo1' => 'idequipo', ), null, null);\n $this->addRelation('EquipoRelatedByIdequipo2', 'Equipo', RelationMap::MANY_TO_ONE, array('idequipo2' => 'idequipo', ), null, null);\n $this->addRelation('Pronostico', 'Pronostico', RelationMap::ONE_TO_MANY, array('idpartido' => 'idpartido', ), null, null);\n\t}", "title": "" }, { "docid": "96aab47916d521fa6fdf011593d1196f", "score": "0.5272247", "text": "public function initialize()\n {\n $this->hasMany('code', 'Tache', 'codeUseCase', array('alias' => 'Tache'));\n $this->belongsTo('idProjet', 'Projet', 'id', array('alias' => 'Projet'));\n $this->belongsTo('idDev', 'User', 'id', array('alias' => 'Developpeur'));\n }", "title": "" }, { "docid": "5ee8a03880d91220fcf174482206e3c3", "score": "0.5268878", "text": "public function comentarios()\n {\n return $this->hasMany('App\\ComentarioDisco', 'disco_id', 'id');\n }", "title": "" }, { "docid": "f33eb7e3d8a451c28234a4b46dc7c620", "score": "0.5268575", "text": "public function initialize()\n {\n $this->belongsTo('cod_chamado', 'App\\Models\\SacChamado', 'cod_chamado', array('alias' => 'SacChamado'));\n $this->belongsTo('cod_produto', 'App\\Models\\Produto', 'cd_produto', array('alias' => 'Produto'));\n $this->belongsTo('cod_status', 'App\\Models\\SacStatus', 'cod_status', array('alias' => 'SacStatus'));\n $this->belongsTo('cod_usuario_modificacao', 'App\\Models\\Usuario', 'cd_usuario', array('alias' => 'Usuario'));\n $this->belongsTo('cod_usuario_responsavel', 'App\\Models\\Usuario', 'cd_usuario', array('alias' => 'Usuario'));\n $this->belongsTo('cod_tipo_problema', 'App\\Models\\Tipos', 'cd_tipos', array('alias' => 'Tipos'));\n $this->belongsTo('cod_chamado', 'App\\Models\\SacChamado', 'cod_chamado', array('foreignKey' => true,'alias' => 'SacChamado'));\n $this->belongsTo('cod_produto', 'App\\Models\\Produto', 'cd_produto', array('foreignKey' => true,'alias' => 'Produto'));\n $this->belongsTo('cod_status', 'App\\Models\\SacStatus', 'cod_status', array('foreignKey' => true,'alias' => 'SacStatus'));\n $this->belongsTo('cod_usuario_modificacao', 'App\\Models\\Usuario', 'cd_usuario', array('foreignKey' => true,'alias' => 'Usuario'));\n $this->belongsTo('cod_usuario_responsavel', 'App\\Models\\Usuario', 'cd_usuario', array('foreignKey' => true,'alias' => 'Usuario'));\n $this->belongsTo('cod_tipo_problema', 'App\\Models\\Tipos', 'cd_tipos', array('foreignKey' => true,'alias' => 'Tipos'));\n }", "title": "" }, { "docid": "0a3c46cf084853838fe1081c6f34a23a", "score": "0.5265608", "text": "public function DatosDeInscripcionDelAlumno(){\n return $this->hasMany(DatosInscripcionAlumno::class);\n }", "title": "" }, { "docid": "ac3eed699df6b37be54267e4f9f5125a", "score": "0.52646816", "text": "public function initialize()\n {\n $this->hasMany('operadora_id', 'Remito', 'remito_operadoraId', array('alias' => 'Remito'));\n $this->belongsTo('operadora_yacimientoId', 'Yacimiento', 'yacimiento_id', array('alias' => 'Yacimiento'));\n }", "title": "" }, { "docid": "0a51e0772c35d174944dfb37bce00c52", "score": "0.5263718", "text": "public function mostrarTecnico(){\n return $this->hasOne('App\\Empleados','id' ,'id_Tecnico');\n }", "title": "" }, { "docid": "d129a3f88aae8580143e0bb14cb1ae8e", "score": "0.5262547", "text": "public function initialize()\n {\n $this->hasMany('id', 'Contenidoweb', 'empresa', array('alias' => 'Contenidoweb'));\n $this->belongsTo('contacto', 'Entidad', 'id', array('alias' => 'Entidad'));\n }", "title": "" }, { "docid": "078f4f3bc808062d22d2685348247d6a", "score": "0.5258675", "text": "public function addTypeSoinSanteAction($id)\r\r\n\t{\t\r\r\n\t\t$infoimg = \"\";\r\r\n\t\t$em = $this->getDoctrine()->getEntityManager();\r\r\n\t\t//Récupère le nom de la personne qui accède à l'administration\r\r\n\t\t$user = $this->container->get('security.context')->getToken()->getUser();\r\r\n\t\t//On vérifie le rôle\r\r\n\t\t$validRole = new ControleDataSecureController();\r\r\n\t\t$role = $validRole->getValidRoles($user);\r\r\n\t\tif($id == \"id\")\r\r\n\t\t{\r\r\n\t\t\t$exist == \"false\";\r\r\n\t\t\t//Formulaire d'ajout de sous catégorie.\r\r\n\t\t\t$typeSoin = new Types_soins_sante();\r\r\n\t\t\t$form = $this->createForm(new AddTypesSoinsForm(), $typeSoin);\r\r\n\t\t\t// On récupère la requête.\r\r\n\t\t\t$request = $this->get('request');\r\r\n\t\t\t// On vérifie qu'elle est de type « POST ».\r\r\n\t\t\tif( $request->getMethod() == 'POST' )\r\r\n\t\t\t{\r\r\n\t\t\t\t// On fait le lien Requête <-> Formulaire.\r\r\n\t\t\t\t$form->bindRequest($request);\r\r\n\t\t\t\t// On vérifie que les valeurs rentrées sont correctes.\r\r\n\t\t\t\tif( $form->isValid() )\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t// On l'enregistre notre objet $typesoin dans la base de données.\r\r\n\t\t\t\t\t$em->persist($typeSoin);\r\r\n\t\t\t\t\t$em->flush();\r\r\n\t\t\t\t\techo 'Type soin de santé ajouté avec succés !';\r\r\n\t\t\t\t\t//On redirige vers la liste des types de soin.\r\r\n\t\t\t\t\treturn $this->redirect($this->generateUrl('_Dashboard_attraittypesoins'));\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\telse{\r\r\n\t\t\t$exist = \"true\";\r\r\n\t\t\t//Formulaire de modification d'un type de soin.\r\r\n\t\t\t$modifTypeSoin = $em->find('MyAppGlobalBundle:Types_soins_sante',$id);\r\r\n\t\t\t$form = $this->container->get('form.factory')->create(new AddTypesSoinsForm(), $modifTypeSoin);\r\r\n\t\t\t// On récupère la requête.\r\r\n\t\t\t$request = $this->get('request');\r\r\n\t\t\t// On vérifie qu'elle est de type « POST ».\r\r\n\t\t\tif( $request->getMethod() == 'POST' )\r\r\n\t\t\t{\r\r\n\t\t\t\t// On fait le lien Requête <-> Formulaire.\r\r\n\t\t\t\t$form->bindRequest($request);\r\r\n\t\t\t\t// On vérifie que les valeurs rentrées sont correctes.\r\r\n\t\t\t\tif( $form->isValid() )\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t// On l'enregistre notre objet $modiftypeSoin dans la base de données.\r\r\n\t\t\t\t\t//Contrôle la valeur du champ de l'image pour savoir si on met le champ à jour\r\r\n\t\t\t\t\t$img = $form->getData()->getImageDoctrine();\r\r\n\t\t\t\t\tif($img != null)\r\r\n\t\t\t\t\t{\r\r\n\t\t\t\t\t\t$modifTypeSoin->setImage($img);\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t$em->persist($modifTypeSoin);\r\r\n\t\t\t\t\t$em->flush();\r\r\n\t\t\t\t\techo 'Type de soin santé modifiés avec succés !';\r\r\n\t\t\t\t\t//On redirige vers la liste des types de soins santé.\r\r\n\t\t\t\t\treturn $this->redirect($this->generateUrl('_Dashboard_attraittypesoins'));\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\t//Préparation de la view dashboard_addtypesoinsante_html.twig\r\r\n\t\treturn $this->render('MyAppAdminBundle:Attrait:dashboard_addtypesoinsante.html.twig',\r\r\n\t\t\t\tarray(\r\r\n\t\t\t\t\t\t'annee' \t\t\t => date('Y'),\r\r\n\t\t\t\t\t\t'name_admin' \t\t => $user->getUsername(),\r\r\n\t\t\t\t\t\t'pointeur' \t\t\t => 'pointeur',\r\r\n\t\t\t\t\t\t'form' \t\t\t\t => $form->createView(),\r\r\n\t\t\t\t\t\t'typesoinat'\t\t => \"menu_attrait\",\r\r\n\t\t\t\t\t\t'exist' \t\t\t => $exist,\r\r\n\t\t\t\t\t\t'role'\t\t\t\t => $role,\r\r\n\t\t\t\t\t\t'infoid'\t\t\t => $id,\r\r\n\t\t\t\t\t\t'infonom'\t\t\t => $modifTypeSoin->getNomFr(),\r\r\n\t\t\t\t\t\t'infoimg'\t\t\t => $modifTypeSoin->getImage(),\r\r\n\t\t\t\t\t\t'txtFr'\t\t\t => trim($modifTypeSoin->getTexteFr()),\r\r\n\t\t\t\t\t\t'txtEn'\t\t\t => trim($modifTypeSoin->getTexteEn()),\r\r\n\t\t\t\t));\r\r\n\t}", "title": "" }, { "docid": "920e2c5b97d458f88e49a05195fc8d77", "score": "0.5257286", "text": "public function __construct()\n {\n $this->setColumnsMeta(array(\n 'pasahitza'=> array('password'),\n 'egoera'=> array('enum:sortua|datuakSartuta|aktibatua'),\n 'url'=> array('urlIdentifier:erabiltzaileIzena'),\n 'profila'=> array('enum:irakasle|otros|ikasle'),\n 'typeAvatar'=> array('enum:default|irudia'),\n ));\n\n $this->setMultiLangColumnsList(array(\n ));\n\n $this->setAvailableLangs(array('eu'));\n\n $this->setParentList(array(\n 'ErabiltzaileaIbfk1'=> array(\n 'property' => 'Irudia',\n 'table_name' => 'ErabiltzaileenIrudiak',\n ),\n ));\n\n $this->setDependentList(array(\n 'AtseginDutErabiltzaileaId' => array(\n 'property' => 'AtseginDut',\n 'table_name' => 'AtseginDut',\n ),\n 'FkEdukiaErabiltzailea1' => array(\n 'property' => 'Edukia',\n 'table_name' => 'Edukia',\n ),\n 'EmailHistoryErabiltzaileaId' => array(\n 'property' => 'EmailHistory',\n 'table_name' => 'EmailHistory',\n ),\n 'FkErabiltzaileaHasEdukiaErabiltzailea1' => array(\n 'property' => 'ErabiltzaileaRelEdukia',\n 'table_name' => 'ErabiltzaileaRelEdukia',\n ),\n 'FkErabiltzaileaHasIkastetxeaErabiltzailea1' => array(\n 'property' => 'ErabiltzaileaRelIkastegia',\n 'table_name' => 'ErabiltzaileaRelIkastegia',\n ),\n 'FkErabiltzaileaHasErabiltzaileaErabiltzailea3' => array(\n 'property' => 'ErabiltzaileaRelIrakasleaByErabiltzailea',\n 'table_name' => 'ErabiltzaileaRelIrakaslea',\n ),\n 'FkErabiltzaileaHasErabiltzaileaErabiltzailea4' => array(\n 'property' => 'ErabiltzaileaRelIrakasleaByIrakaslea',\n 'table_name' => 'ErabiltzaileaRelIrakaslea',\n ),\n 'ErabiltzaileaSettingsErabiltzaileaId' => array(\n 'property' => 'ErabiltzaileaSettings',\n 'table_name' => 'ErabiltzaileaSettings',\n ),\n 'FkEdukiaHasErabiltzaileaErabiltzailea1' => array(\n 'property' => 'Gustokoa',\n 'table_name' => 'Gustokoa',\n ),\n 'HobekuntzakErabiltzaileaId' => array(\n 'property' => 'Hobekuntzak',\n 'table_name' => 'Hobekuntzak',\n ),\n 'FkIruzkinaErabiltzailea1' => array(\n 'property' => 'Iruzkina',\n 'table_name' => 'Iruzkina',\n ),\n 'FkJakinarazpenakErabiltzailea1' => array(\n 'property' => 'JakinarazpenakByErabiltzailea',\n 'table_name' => 'Jakinarazpenak',\n ),\n 'JakinarazpenakThatUserId' => array(\n 'property' => 'JakinarazpenakByThatUser',\n 'table_name' => 'Jakinarazpenak',\n ),\n 'JakinarazpenakGroupErabiltzaileaId' => array(\n 'property' => 'JakinarazpenakGroup',\n 'table_name' => 'JakinarazpenakGroup',\n ),\n 'KexaIbfk1' => array(\n 'property' => 'Kexa',\n 'table_name' => 'Kexa',\n ),\n 'FkErabiltzaileaHasErabiltzaileaErabiltzailea1' => array(\n 'property' => 'LagunakByErabiltzailea',\n 'table_name' => 'Lagunak',\n ),\n 'FkErabiltzaileaHasErabiltzaileaErabiltzailea2' => array(\n 'property' => 'LagunakByErabiltzaileaId1',\n 'table_name' => 'Lagunak',\n ),\n 'FkMezuakErabiltzailea1' => array(\n 'property' => 'MezuakByNork',\n 'table_name' => 'Mezuak',\n ),\n 'FkMezuakErabiltzailea2' => array(\n 'property' => 'MezuakByNori',\n 'table_name' => 'Mezuak',\n ),\n 'NewsletterHashErabiltzaileaId' => array(\n 'property' => 'NewsletterHash',\n 'table_name' => 'NewsletterHash',\n ),\n ));\n\n $this->setOnDeleteCascadeRelationships(array(\n 'EmailHistory_erabiltzaileaId'\n ));\n\n $this->setOnDeleteSetNullRelationships(array(\n 'fk_Edukia_Erabiltzailea1'\n ));\n\n\n $this->_defaultValues = array(\n 'egoera' => 'sortua',\n 'sortzeData' => 'CURRENT_TIMESTAMP',\n 'superErabiltzailea' => '0',\n 'profila' => 'otros',\n 'typeAvatar' => 'default',\n 'newsletter' => '0',\n 'karma' => '0',\n );\n\n $this->_initFileObjects();\n parent::__construct();\n }", "title": "" }, { "docid": "3a8dfda94f46dfddee7cf404f291ae17", "score": "0.52545846", "text": "public function desayuno(){\n return $this->hasOne(desayuno::class);\n}", "title": "" }, { "docid": "717b3c722a433af9269f88c18fc02f7f", "score": "0.52540123", "text": "public function getSektor(){\n return $this->hasOne(Division::className(),['id' => 'division']);\n }", "title": "" }, { "docid": "271a3d2764a31ef1e9587d9d55cdb2b9", "score": "0.52520907", "text": "public function initialize()\n {\n $this->belongsTo('pedido_cd_pedido', 'App\\Models\\Pedido', 'cd_pedido', array('alias' => 'Pedido'));\n $this->belongsTo('pedido_cd_pedido', 'App\\Models\\Pedido', 'cd_pedido', array('foreignKey' => true,'alias' => 'Pedido'));\n }", "title": "" }, { "docid": "c1c3f0fe796ac5d8bbc9c8b4cb547f9a", "score": "0.5248564", "text": "public function addAction() {\n\n // Create entity manager object\n $entityManager = $this->getServiceLocator()->get('doctrine.entitymanager.orm_default');\n $type = $this->getRequest()->getQuery('type');\n $entity = $this->getRequest()->getQuery('entity');\n // Set Layout\n $this->layout('layout/ajax');\n $viewmodel = new ViewModel();\n $request = $this->getRequest();\n $is_xmlhttprequest = 1;\n $entityId = \"\";\n $id = (int) $this->params()->fromRoute('id', 0);\n $mode = '';\n $control = '';\n //disable layout if request by Ajax\n //$viewmodel->setTerminal($request->isXmlHttpRequest());\n switch ($entity) {\n case 'Type':\n $entityId = 'typeid';\n $control = $entityManager->find(\"CsnCms\\Entity\\\\\" . $entity, $id);\n if (!$control instanceof Type) {\n $control = new Type();\n $mode = \"Add \" . $type;\n }else{\n $mode = \"Edit \" . $type;\n }\n break;\n case 'Sector':\n $entityId = 'sectorid';\n $control = $entityManager->find(\"CsnCms\\Entity\\\\\" . $entity, $id);\n if (!$control instanceof Sector) {\n $control = new Sector();\n $mode = \"Add \" . $type;\n }else{\n $mode = \"Edit \" . $type;\n }\n break;\n case 'ConsultationPreferences':\n $entityId = 'consultationid';\n $control = $entityManager->find(\"CsnCms\\Entity\\\\\" . $entity, $id);\n if (!$control instanceof ConsultationPreferences) {\n $control = new ConsultationPreferences();\n $mode = \"Add Consultation Preferences\";\n }else{\n $mode = \"Edit Consultation Preferences\";\n }\n break;\n case 'Payment':\n $entityId = 'paymentid';\n $control = $entityManager->find(\"CsnCms\\Entity\\\\\" . $entity, $id);\n if (!$control instanceof Payment) {\n $control = new Payment();\n $mode = \"Add \" . $type;\n }else{\n $mode = \"Edit \".$type;\n }\n break;\n case 'Property':\n $entityId = 'propertyid';\n $control = $entityManager->find(\"CsnCms\\Entity\\\\\" . $entity, $id);\n if (!$control instanceof Property) {\n $control = new Property();\n $mode = \"Add \" . $type;\n }else{\n $mode = \"Edit \".$type;\n }\n break;\n case 'DocumentType':\n $entityId = 'documentid';\n $control = $entityManager->find(\"CsnCms\\Entity\\\\\" . $entity, $id);\n if (!$control instanceof DocumentType) {\n $control = new DocumentType();\n $mode = \"Add Document Type\";\n }else{\n $mode = \"Edit Document Type\";\n }\n break;\n case 'FollowUpAction':\n $entityId = 'followupid';\n $control = $entityManager->find(\"CsnCms\\Entity\\\\\" . $entity, $id);\n if (!$control instanceof FollowUpAction) {\n $control = new FollowUpAction();\n $mode = \"Add Follow Up Action\";\n }else{\n $mode = \"Edit Follow Up Action\";\n }\n break;\n case 'SendTo':\n $entityId = 'sendid';\n $control = $entityManager->find(\"CsnCms\\Entity\\\\\" . $entity, $id);\n if (!$control instanceof SendTo) {\n $control = new SendTo();\n $mode = \"Add Send To\";\n }else{\n $mode = \"Edit Send To\";\n }\n break;\n case 'Location':\n $entityId = 'location';\n $control = $entityManager->find(\"CsnCms\\Entity\\\\\" . $entity, $id);\n if (!$control instanceof Location) {\n $control = new Location();\n $mode = \"Add \" . $type;\n }else{\n $mode = \"Edit \" . $type;\n }\n break;\n case 'CompanyType':\n $entityId = 'CompanyType';\n $control = $entityManager->find(\"CsnCms\\Entity\\\\\" . $entity, $id);\n if (!$control instanceof CompanyType) {\n $control = new CompanyType();\n $mode = \"Add Company Type\";\n }else{\n $mode = \"Edit Company Type\";\n }\n break;\n \n case 'KeyProjectArea':\n $entityId = 'KeyProjectArea';\n $control = $entityManager->find(\"CsnCms\\Entity\\\\\" . $entity, $id);\n if (!$control instanceof KeyProjectArea) {\n $control = new KeyProjectArea();\n $mode = \"Add Key Project Area\";\n }else{\n $mode = \"Edit Key Project Area\";\n }\n break;\n }\n\n // Create an object for form \n $form = $this->getForm();\n\n // assign hydrator\n $hydrator = new DoctrineHydrator($entityManager, get_class($control));\n $form->setHydrator($hydrator);\n // bind object to form\n $form->bind($control);\n $form->get('type')->setValue($type);\n $form->get('entityid')->setValue($id);\n $form->get('entity')->setValue($entity);\n\n if (!$request->isXmlHttpRequest()) {\n //if NOT using Ajax\n $is_xmlhttprequest = 0;\n if ($request->isPost()) {\n $form->setData($request->getPost());\n if ($form->isValid()) {\n // TODO\n }\n }\n }\n $viewmodel->setVariables(array(\n 'form' => $form,\n // is_xmlhttprequest is needed for check this form is in modal dialog or not\n // in view\n 'is_xmlhttprequest' => $is_xmlhttprequest,\n 'mode' => $mode,\n 'type' => $type\n ));\n\n return $viewmodel;\n }", "title": "" }, { "docid": "b68e1316d2e743ac745af474cf10899d", "score": "0.52463526", "text": "public function add()\n {\n $data_url = $this->request->query;\n //Obtengo los datos de la tabla\n $action = $data_url['Accion'];\n $categoria = $data_url['Categoria'];\n\n\n $servicio = $this->Servicios->newEntity();\n if ($this->request->is('post')) {\n $servicio = $this->Servicios->patchEntity($servicio, $this->request->data);\n if ($this->Servicios->save($servicio)) {\n $this->Flash->success(__('El servicio se ha guardado correctamente!'));\n\n return $this->redirect(['action' => 'index', '?' => ['Accion' => 'Ver Servicios', 'Categoria' => 'Servicios']]);\n }\n $this->Flash->error(__('Error al guardar el Servicio. Intente nuevamente.'));\n }\n\n\n $this->set('servicio', $servicio);\n $this->set('action', $action);\n $this->set('categoria', $categoria);\n\n }", "title": "" }, { "docid": "c1215160c1c374c473e0ff98f61d7548", "score": "0.52457553", "text": "public function initialize()\n {\n $this->belongsTo('cod_chamado_historico', 'App\\Models\\SacChamado', 'cod_chamado', array('alias' => 'SacChamado'));\n $this->belongsTo('cod_acao', 'App\\Models\\SacStatus', 'cod_status', array('alias' => 'SacStatus'));\n $this->belongsTo('cod_usuario_acao', 'App\\Models\\Usuario', 'cd_usuario', array('alias' => 'Usuario'));\n $this->belongsTo('cod_chamado_historico', 'App\\Models\\SacChamado', 'cod_chamado', array('foreignKey' => true,'alias' => 'SacChamado'));\n $this->belongsTo('cod_acao', 'App\\Models\\SacStatus', 'cod_status', array('foreignKey' => true,'alias' => 'SacStatus'));\n $this->belongsTo('cod_usuario_acao', 'App\\Models\\Usuario', 'cd_usuario', array('foreignKey' => true,'alias' => 'Usuario'));\n }", "title": "" }, { "docid": "9cf8c7a3e7042f0407844f3c79bc59ad", "score": "0.5245354", "text": "public function agregar()\n {\n //Validamos conexion al SII\n conexion_sii();\n $this->load->model('mpersonas');\n \n // Validaciones de Formulario\n $this->form_validation->set_rules('area', 'Nombre del área', 'required|callback_validararea');\n $this->form_validation->set_rules('nombre', 'Nombre de la Subárea', 'required|is_unique[SubAreas.sub_nombre]');\n $this->form_validation->set_rules('responsable', 'Nombre del responsable', 'required|callback_validarpersona|callback_validarresponsable');\n\n if( $this->form_validation->run() && $this->input->post() )\n { \n $responsable = $this->input->post('responsable');\n $area = $this->mareas->obtener($this->input->post('area'));\n $unidad = $this->munidades->obtener($area->a_unidad);\n\n //Si existe el usuario obtenes de la tabla\n if( $persona = $this->mpersonas->obtener_refsii($responsable))\n {\n $idpersona = $persona->u_id;\n }\n else\n {\n //Si no existe el usuario obtenemos del SII e insertamos en la tabla\n $persona = $this->mpersonas->obtener_sii($responsable);\n //Preparamos la información para insertar en la tabla usuarios\n $data_persona = array(\n 'u_refsii' => $persona->idpersonas,\n 'u_institucion' => $unidad->uni_institucion,\n 'u_nombre' => $persona->nombre,\n 'u_appaterno' => $persona->apellidopat,\n 'u_apmaterno' => $persona->apellidomat,\n 'u_password' => $persona->password,\n 'u_email' => $persona->email,\n 'u_create' => date('Y:m:d')\n );\n\n //Agregamos la información en la tabla usuarios\n $idpersona = $this->mpersonas->agregar($data_persona);\n }\n\n\n //Preparamos la información para insertar\n $data_subareas = array(\n 'sub_nombre' => $this->input->post('nombre',TRUE),\n 'sub_area' => $this->input->post('area',TRUE),\n 'sub_create' => date('Y:m:d')\n );\n\n //Agregamos la información en la tabla subareas\n $idsubarea = $this->msubareas->agregar($data_subareas);\n\n //Preparamos la información para insertar\n $data_colaboradores = array(\n 'co_usuario' => $idpersona,\n 'co_subarea' => $idsubarea,\n 'co_responsable'=> 1,\n 'co_create' => date('Y:m:d')\n );\n\n $this->mcolaboradores->agregar($data_colaboradores);\n $this->alerts->success('subareas');\n }\n\n $data['personas'] = $this->mpersonas->listar_sii();\n $data['areas'] = $this->mareas->listar();\n \n $this->load->view('subareas/agregar',$data);\n }", "title": "" }, { "docid": "8098227291e921f49b1c0869721e7ebd", "score": "0.52446413", "text": "public function addChampStatutInstanceAction() \n { \n \n $request = $this->get('request');\n\n if ($request->isXmlHttpRequest()) {\n \n $data = $request->request->all();\n //\\Doctrine\\Common\\Util\\Debug::dump($data);\n \n $repository = $this->getDoctrine()->getManager()->getRepository('NIPAProjetBundle:DemandeStatutInstance');\n\n // On vérifie que l'objet n'existe pas déjà\n if($entity = $repository->findOneBy(array('nom' => $data[\"nom\"]))) {\n throw new NotFoundHttpException(\n $this->get('translator')->trans('Ce statut existe déjà')\n );\n return new JsonResponse(array('message' => 'Error'), 400); \n }\n\n \n $entity = new DemandeStatutInstance();\n $entity->setNom($data[\"nom\"]);\n \n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return new JsonResponse(array('message' => 'Success!'), 200);\n\n //$response = new JsonResponse(array('message' => 'Error'), 400);\n\n //return $response; \n \n }\n }", "title": "" }, { "docid": "6f3004d50f72083e0fe261fddd3d535d", "score": "0.5240106", "text": "public function initialize()\n {\n $this->hasMany('localidad_id', 'Curriculum\\Persona', 'persona_localidadId', array('alias' => 'Persona'));\n $this->belongsTo('localidad_ciudadId', 'Curriculum\\Ciudad', 'ciudad_id', array('alias' => 'Ciudad'));\n }", "title": "" }, { "docid": "86198efeea9a93a94525f9ec307df9b0", "score": "0.52382344", "text": "public function create(){\n\t\t$this->auth->restrict('Entrevistas.Gestion.Create');\n\n\t\tif (isset($_POST['save'])){\n\t\t\tif ($insert_id = $this->save_entrevistas()){\n\t\t\t\t// Log the activity\n\t\t\t\tlog_activity($this->current_user->id, lang('entrevistas_act_create_record') .': '. $insert_id .' : '. $this->input->ip_address(), 'entrevistas');\n\n\t\t\t\tTemplate::set_message(lang('entrevistas_create_success'), 'success');\n\t\t\t\tredirect(SITE_AREA .'/gestion/entrevistas');\n\t\t\t} else {\n\t\t\t\tTemplate::set_message(lang('entrevistas_create_failure') . $this->entrevistas_model->error, 'error');\n\t\t\t}\n\t\t}\n\n\t\t// Recupero los entrevistadores (tutores) y los entrevistados\n\t\t$this->load->model('tutorandos/tutorandos_model');\n\t\t$this->load->model('users/user_model');\n\t\t$this->load->model('entrevistas/entrevistas_model');\n\t\tforeach ($this->tutorandos_model->find_all() as $tutorando) {\n\t\t\t$tutorandos[$tutorando->tutorando_id] = $tutorando->apellido.' '.$tutorando->nombre;\n\t\t}\n\t\tforeach ($this->entrevistas_model->find_all_plantillas() as $plantilla) {\n\t\t\t$plantillas[$plantilla->plantilla_id] = $plantilla->anio;\n\t\t}\n\t\tforeach ($this->user_model->find_all() as $tutor) {\n\t\t\tif ($tutor->role_id == 7) {\n\t\t\t\t$tutores[$tutor->id] = $tutor->surname.' '.$tutor->name;\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tTemplate::set('plantillas', $plantillas);\n\t\tTemplate::set('tutores', $tutores);\n\t\tTemplate::set('tutorandos', $tutorandos);\n\t\tAssets::add_module_js('entrevistas', 'entrevistas.js');\n\t\t// Recuperar a los tutores\n\t\tTemplate::set('toolbar_title', lang('entrevistas_create') . ' Entrevistas');\n\t\tTemplate::render();\n\t}", "title": "" }, { "docid": "baf17cd27665f00de4c7f779e93deaf5", "score": "0.52373195", "text": "public function initialize()\n {\n $this->belongsTo('empleado', 'Empleado', 'id', array('alias' => 'Empleado'));\n $this->belongsTo('credito', 'CreditoXCliente', 'id', array('alias' => 'CreditoXCliente'));\n }", "title": "" }, { "docid": "45a70db71f339fef19b708caa0dcb865", "score": "0.5232531", "text": "public function gimnastas(){\n return $this->belongsToMany('App\\Models\\Gimnasta');\n }", "title": "" }, { "docid": "1a87b91c7ba6ba33c6ef5905cd4d2e2c", "score": "0.5231715", "text": "public function usuarios(){\n return $this->belongsToMany('App\\User','usuario_apartamentos','apartamento_id','usuario_id');\n }", "title": "" }, { "docid": "5a7dad047766a8a67a9905544fd452fc", "score": "0.52309686", "text": "public function addJ006tLugarSeguro(J006tLugarSeguro $l)\n\t{\n\t\tif ($this->collJ006tLugarSeguros === null) {\n\t\t\t$this->initJ006tLugarSeguros();\n\t\t}\n\t\tif (!in_array($l, $this->collJ006tLugarSeguros, true)) { // only add it if the **same** object is not already associated\n\t\t\tarray_push($this->collJ006tLugarSeguros, $l);\n\t\t\t$l->setJ802tClasificacion($this);\n\t\t}\n\t}", "title": "" }, { "docid": "8474c5a6781bb2f02d02e1971e0f9bc9", "score": "0.52306783", "text": "public function categori()\n {\n return $this->belongsTo('App\\Categori');\n }", "title": "" }, { "docid": "3b5bb960a928a9e2745d32ccf0e7ca5a", "score": "0.5223702", "text": "public function addFornecedorQuery($uf){\n\n $q = Doctrine_Query::create()\n ->from('Fornecedor j');\n \n\n $alias = $q->getRootAlias();\n\n $q->innerJoin($alias.'.contrato_fornecedor a');\n\n $q->where('a.fornecedor_id = ?', $uf);\n //$q->orderBy($alias.'.updated_at DESC');\n return $q;\n }", "title": "" } ]
22a803e66fe01952e2cf12b74c7b0abf
Whether ActionScheduler thinks that it has migrated or not.
[ { "docid": "2af0632c289ad837b482b97c90a330dc", "score": "0.68892425", "text": "public function is_usable() {\n\n\t\t// No tasks if ActionScheduler wasn't loaded.\n\t\tif ( ! class_exists( 'ActionScheduler_DataController' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn \\ActionScheduler_DataController::is_migration_complete();\n\t}", "title": "" } ]
[ { "docid": "48e9c4928a476350546324dfa3a32b13", "score": "0.72192585", "text": "public function isMigratable()\n {\n return $this->post->isMigratable();\n }", "title": "" }, { "docid": "01c0da7c600ffc31ae88ced27d03ccb0", "score": "0.69524837", "text": "public function haveToMigrate()\n {\n // no need to migrate if we already did successfully\n if ($this->isStatusSuccess()) {\n return false;\n }\n\n // Migration is need if there are payone orders or a protect config\n if ($this->helper()->hasPayoneOrders()\n or $this->helper()->hasProtectConfig()\n ) {\n return true;\n }\n else {\n // Mark migration success, it is not needed\n $this->setMigrationStatus();\n return false;\n }\n }", "title": "" }, { "docid": "0eca34c23f5450346d3c85fce36ca64a", "score": "0.64871585", "text": "public function is_usable() {\n\t\treturn ( $this->get_migration_state() === self::MIGRATION_STATE_SUCCESS );\n\t}", "title": "" }, { "docid": "d55795c22024f3cf383f1165a70a9c69", "score": "0.64675075", "text": "private function isExportNeeded()\n {\n $query = 'SELECT export_action FROM '. \\rex::getTablePrefix() .'d2u_machinery_export_machines '\n .'WHERE provider_id = '. $this->provider_id .\" AND export_action = 'delete'\";\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n\n if ($result->getRows() > 0) {\n return true;\n }\n\n $query = 'SELECT used_machines.updatedate, export.export_timestamp FROM '. \\rex::getTablePrefix() .'d2u_machinery_used_machines_lang AS used_machines '\n .'LEFT JOIN '. \\rex::getTablePrefix() .'d2u_machinery_export_machines AS export ON used_machines.used_machine_id = export.used_machine_id '\n .'WHERE provider_id = '. $this->provider_id .' AND clang_id = '. $this->clang_id .' '\n .'ORDER BY used_machines.updatedate DESC LIMIT 0, 1';\n $result->setQuery($query);\n\n if ($result->getRows() > 0 && $result->getValue('updatedate') > $result->getValue('export_timestamp')) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "328379f324ac7f6f1b6ed4c27ebb6d62", "score": "0.635679", "text": "protected function shouldMigrate()\n {\n return Compass::$runsMigrations && config('compass.driver') === 'database';\n }", "title": "" }, { "docid": "8625f21bd369d80a7cbb9153c5d6da7c", "score": "0.6143426", "text": "public function hasScheduledDowntime()\r\n\t{\r\n\t\t$file = $this->maintenanceFile . '_schedule';\r\n\t\treturn file_exists($file);\r\n\t}", "title": "" }, { "docid": "24acfe4177587cc89b0c575266fd71a5", "score": "0.6120296", "text": "public function hasBulkActions(): bool\n {\n return !empty($this->bulkActions);\n }", "title": "" }, { "docid": "5e49ea0e8f9232b5e24ba8104366bf3c", "score": "0.60579526", "text": "public function isMigrating(string $command): bool\n {\n return starts_with($command, 'migrate');\n }", "title": "" }, { "docid": "e26f9ea297311c5563c961f712db3323", "score": "0.6039665", "text": "public function has_migration_error() {\n\t\treturn ( $this->get_migration_state() === self::MIGRATION_STATE_ERROR );\n\t}", "title": "" }, { "docid": "c009a16ac4472f5ce68d998a1c25dbb8", "score": "0.60132027", "text": "public function shouldMigrate()\n {\n $pluginTables = [\n env('DB_PREFIX', '').'contents',\n env('DB_PREFIX', '').'content_meta',\n env('DB_PREFIX', '').'content_histories',\n env('DB_PREFIX', '').'content_relations',\n ];\n\n return collect(array_map('reset', DB::select('SHOW TABLES')))\n ->intersect($pluginTables)\n ->isEmpty();\n }", "title": "" }, { "docid": "138c0763cd1f6be43adbb144f3769637", "score": "0.5966143", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_tools/migration');\n }", "title": "" }, { "docid": "c97a74331c1035d6eddf14022c3d9f1b", "score": "0.5926852", "text": "public function isInitialImport()\n {\n $appliedMigrations = $this->getAppliedMigrations();\n return empty($appliedMigrations);\n }", "title": "" }, { "docid": "452097556c2081d1097a65def62cce59", "score": "0.5885929", "text": "public function dirtyTableCollectorExists(): bool\n {\n return in_array(self::DIRTY_TABLE_COLLECTOR, $this->getAllTables(true));\n }", "title": "" }, { "docid": "9c1b8dfc6f3d60d16bd657558c93de81", "score": "0.58738476", "text": "public function isCanExecuteActionInFlowOutdated()\n {\n return null === $this->canExecuteActionInFlow;\n }", "title": "" }, { "docid": "9638c0ec89c7d76599fc729f9e7f08b8", "score": "0.58372813", "text": "public function hasMassActions()\n {\n return count($this->_massActions) > 0;\n }", "title": "" }, { "docid": "3963cb336a6d5d0a6a19477c1d8bf3c8", "score": "0.5714442", "text": "public function scheduled()\n\t{\n\t\treturn ($this->getValue('type')==='scheduled');\n\t}", "title": "" }, { "docid": "68517d8a5f40620e6a798226ffb60e33", "score": "0.5712231", "text": "function give_has_upgrade_completed( $upgrade_action = '' ) {\n\t// Bailout.\n\tif ( empty( $upgrade_action ) ) {\n\t\treturn false;\n\t}\n\n\t// Fresh install?\n\t// If fresh install then all upgrades will be consider as completed.\n\t$is_fresh_install = ! Give_Cache_Setting::get_option( 'give_version' );\n\tif ( $is_fresh_install ) {\n\t\treturn true;\n\t}\n\n\t$completed_upgrades = give_get_completed_upgrades();\n\n\treturn in_array( $upgrade_action, $completed_upgrades );\n\n}", "title": "" }, { "docid": "f031dda807b1f4b5705b0f2b7f74657a", "score": "0.57090527", "text": "function hasAction()\n {\n return !is_null($this->_action);\n }", "title": "" }, { "docid": "53ab7710e871bfabd005e8424e6fb440", "score": "0.5708824", "text": "public function isUpToDate() : bool ;", "title": "" }, { "docid": "71ce101eb3407a1ab0ddf2cf5334cef3", "score": "0.57006097", "text": "public function isExportPossible()\n {\n $query = 'SELECT * FROM '. \\rex::getTablePrefix() .'d2u_machinery_export_machines '\n .'WHERE provider_id = '. $this->provider_id;\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n\n if ($result->getRows() > 0) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "26625550f5f2bcd0f4d1889b3f1a358d", "score": "0.56922686", "text": "public function is_upgradeable() {\n\n\t\t// Bail if global and upgrading global tables is not allowed\n\t\tif ( $this->is_global() && ! wp_should_upgrade_global_tables() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Kinda weird, but assume it is\n\t\treturn true;\n\t}", "title": "" }, { "docid": "09b7cb4f0236830ee4fd49120abd285b", "score": "0.5681779", "text": "public function hasBeenUsedForAdmin()\n {\n return $this->admin_id !== null;\n }", "title": "" }, { "docid": "2d74f6ed9a436f084fc6f24c09a01912", "score": "0.5677839", "text": "function isCreated() \n {\n return ( (int) $this->getValueByFieldName( 'transition_isCreated' ) == 1);\n }", "title": "" }, { "docid": "f3509b390ab5d2a36c3e42adebd94d86", "score": "0.5657192", "text": "public function hasActions()\n {\n return count($this->actions) > 0;\n }", "title": "" }, { "docid": "b1cf9642888f167cf3d5f549d48e8021", "score": "0.56564486", "text": "public function hasCurrentAction()\n {\n return !is_null($this->currentAction);\n }", "title": "" }, { "docid": "753fc41d0b963a917fa34999fafea4cd", "score": "0.56473464", "text": "public function should_run()\n\t{\n\t\treturn $this->forum_data['enable_prune'] && $this->forum_data['prune_next'] < time();\n\t}", "title": "" }, { "docid": "b1b4b12fd8a5b927b58b57e1b9599dcd", "score": "0.56281865", "text": "public function createMigrationTable()\n {\n $return = false;\n foreach ($this->getConfigurations() as $config) {\n if ($config->createMigrationTable()) {\n $return = true;\n }\n }\n return $return;\n }", "title": "" }, { "docid": "332f52996a071149dcdd3ebe34fc4fa4", "score": "0.5596854", "text": "public function should_run()\n\t{\n\t\treturn $this->forum_data['enable_shadow_prune'] && $this->forum_data['prune_shadow_next'] < time();\n\t}", "title": "" }, { "docid": "9e067adea4b27a46c0582d097282ad03", "score": "0.5564543", "text": "static public function checkForDbTable()\n\t{\n\t\t$db_config = $GLOBALS['db_config'];\n\t\t$migrations_table = $db_config->migrations_table;\n\t\tif (isset($db_config->migrations_table))\n\t\t{\n\t\t\t$migrations_table = $db_config->migrations_table;\n\t\t}\n\t $tables = MpmDbHelper::getTables();\n\t\tif (count($tables) == 0 || !in_array($migrations_table, $tables))\n\t {\n\t return false;\n\t }\n\t return true;\n\t}", "title": "" }, { "docid": "0864776ad21cae5041450e288bfa8fab", "score": "0.5521969", "text": "public function supportsMigrations()\n {\n return $this->_write->supportsMigrations();\n }", "title": "" }, { "docid": "a3646cd983844d8539261a5bea100fde", "score": "0.5517133", "text": "public function checkMigration()\n\t{\n\t\ttry {\n\t\t\t$migrated = $this->getService('com://admin/ninjaboard.model.forums_backups')->getTotal();\n\t\t} catch(KDatabaseTableException $e) {\n\t\t\t// Do nothing if the table don't exist\n\t\t\treturn $this;\n\t\t}\n\t\t\n\t\t//Do nothing if there's no migrated data\n\t\tif(!$migrated) return $this;\n\n\t\t//Do nothing if there's already data in Ninjaboard\n\t\t$existing = $this->getService('com://admin/ninjaboard.model.forums')->getTotal();\n\t\tif($existing) return $this;\n\t\t\n\t\tJError::raiseNotice(0, sprintf(\n\t\t\tJText::_('COM_NINJABOARD_CONGRATULATIONS_ON_THE_UPGRADE_YOULL_FIND_THAT_ALL_YOUR_05_DATA_WERE_BACKED_UP_DURING_THE_10_INSTALL'),\n\t\t\t'<a href=\"'.JRoute::_('&option=com_ninjaboard&view=tools&shortcut=legacy').'\">'.\n\t\t\tJText::_('COM_NINJABOARD_CLICK_HERE_TO_MIGRATE').\n\t\t\t'</a>'\n\t\t));\n\t}", "title": "" }, { "docid": "4d537730c889d4c1a4420d6d94c9a98a", "score": "0.55109966", "text": "public function isUpdateNeeded()\n {\n return $this->storage->isUpdateRequired();\n }", "title": "" }, { "docid": "f243335b5fe4be94a88059428c39e3ec", "score": "0.54973567", "text": "public function should_run()\n {\nreturn $this->config['activeuser_task_last_gc'] < time() - $this->config['activeuser_task_gc'];\n }", "title": "" }, { "docid": "021b86eb373c668ce4ad6b4ce06243b2", "score": "0.5492875", "text": "protected function wantsToUpdate()\n {\n if ($this->getActionName() == 'update') {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "176e9ecf387f60b0792f2955017e0e57", "score": "0.548584", "text": "public function isMaintenance()\n {\n if ($this->getCurrent()->format('H') >= $this->getStart()->format('H') &&\n $this->getCurrent()->format('H') <= $this->getEnd()->format('H')\n ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "beab75809ed86b5ab29eb44cdae02a2a", "score": "0.5485117", "text": "public function check_maintenance_on()\n {\n $result = $this->find_one_by(array('name' => 'maintenance'));\n\n return (bool) $result->value;\n }", "title": "" }, { "docid": "1e842b95cc8b7c58d9bc353d266dc497", "score": "0.5478146", "text": "public function safeUp()\n\t{\n\t\t// The last build may have indexed some transforms without actually creating them\n\t\t$this->delete('assettransformindex', \"dateCreated >= '2013-12-06 00:00:00'\");\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fc735f7124f93381623766857cf0f14e", "score": "0.546947", "text": "public function isReimported()\n {\n $query = 'UPDATE ' . _DB_PREFIX_ . 'lengow_orders\n SET `is_reimported` = 1\n WHERE `id_order`= \\'' . (int)$this->id . '\\'';\n return DB::getInstance()->execute($query);\n }", "title": "" }, { "docid": "c0ffd7e2a039fddc2b4d1018314d55c6", "score": "0.54658604", "text": "function should_run() {\n\t\t\t// exporting fields\n\t\t\tglobal $pagenow;\n\t\t\t//echo '<pre>'; print_r($pagenow); die;\n\t\t\tif (is_admin() && $pagenow == 'edit.php' && (isset($_POST['generate']) || isset($_POST['download'])) && isset($_POST['acf_export_keys'])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// do not run if on an ACF edit page\n\t\t\tif (is_admin() && $pagenow == 'edit.php' && isset($_GET['post_type']) && $_GET['post_type'] == 'acf-field-group') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (is_admin() && $pagenow == 'post.php' && isset($_GET['post']) && get_post_type(intval($_GET['post'])) == 'acf-field-group') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "d5933037eae7e1c75d5225e381bebde1", "score": "0.5462898", "text": "public function isDeploying()\n {\n return 'deploying' == $this->status;\n }", "title": "" }, { "docid": "e56dcc3a66f217aea101350fc9456ad1", "score": "0.5443517", "text": "public function inMaintenance()\r\n\t{\r\n\t\t$file = $this->maintenanceFile;\r\n\t\tif(file_exists($file))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "1cf35784e4f4b50ece145e499bd63e15", "score": "0.54288685", "text": "public function shouldDelete() {\n\t\treturn $this->toDelete;\n\t}", "title": "" }, { "docid": "805d0eb3fe50c34e42ff1eee4b264475", "score": "0.5427357", "text": "function already_run() {\n $r = xModel::load('rattachement', array(\n 'id' => array(166, 167)\n ))->get();\n return !!$r;\n }", "title": "" }, { "docid": "14826fc422329f9459abdaf4b2affa7e", "score": "0.5422419", "text": "public function is_runnable()\n\t{\n\t\treturn !$this->config['use_system_cron'] && $this->forum_data;\n\t}", "title": "" }, { "docid": "14826fc422329f9459abdaf4b2affa7e", "score": "0.5422419", "text": "public function is_runnable()\n\t{\n\t\treturn !$this->config['use_system_cron'] && $this->forum_data;\n\t}", "title": "" }, { "docid": "fcd4927d793347b42aa48842d6e0599c", "score": "0.5414943", "text": "public function isComplete() {\n // If Auto Node Title is disabled, other migrations are free to go\n if (module_exists('auto_nodetitle')) {\n return FALSE;\n }\n else {\n return TRUE;\n }\n }", "title": "" }, { "docid": "a284890f68e3f75203e96894c0f7c165", "score": "0.54134506", "text": "public function is_cleanup_needed() {\n\t\t$cron_event = $this->cleanup_factory->cron_event();\n\n\t\t// Note: This may give us false positives: There may be a WP-Cron event executed later during this request,\n\t\t// which will delete all remaining DIPs. Unfortunately, we have no way of predicting that reliably.\n\t\t//\n\t\t// This will be happening if there are exactly between ($x+1) and ($x*2) DIPs,\n\t\t// where $x = Toolset_Association_Cleanup_Post::DELETE_POSTS_PER_BATCH.\n\t\treturn $this->cron->is_scheduled( $cron_event );\n\t}", "title": "" }, { "docid": "220117065e0df28767f09ec065aab4d7", "score": "0.5408277", "text": "public function hasRun(string $name): bool\n {\n return $this->_createMigrationQuery()\n ->andWhere(['name' => $name])\n ->exists($this->db);\n }", "title": "" }, { "docid": "1e8256229f7a5d49b5083f6ac94cc809", "score": "0.5404351", "text": "public function shouldBeUpdatedInApp(): bool\n {\n return $this->isDifferentConcerningAppDatabase($this->fresh());\n }", "title": "" }, { "docid": "e91f52cf72a91164cafb6b7848d6e5ec", "score": "0.5394502", "text": "public function isImported(){\n return $this->isImported === true;\n }", "title": "" }, { "docid": "915c7d0f781806adb4314a31da1e829d", "score": "0.53931665", "text": "public function isReady(){\n if($this->lastActionTime === null){\n return true;\n }\n $t = $this->getWaitingTime();\n return ($t <= 0);\n }", "title": "" }, { "docid": "2bbbfee9b59ce4f80227955f4f4b79ae", "score": "0.5383883", "text": "public function isExecuted()\n\t{\n\t\treturn ($this->data[\"executeStatus\"] === \"executed\");\n\t}", "title": "" }, { "docid": "7ba62900fe6fc45124d4c18fcca794f7", "score": "0.53744847", "text": "public function hasTransferJobName(){\n return $this->_has(9);\n }", "title": "" }, { "docid": "9484931740b1b744268e61daaf74a80d", "score": "0.5372994", "text": "private function isUpdated(){\n return $this->owner->updated == self::QUIZ_UPDATED;\n }", "title": "" }, { "docid": "41b623432c803605822c27e74fb7f1dc", "score": "0.537012", "text": "public function isRollbackAllowed(){\n return Mage::getSingleton('admin/session')->isAllowed('system/tools/backup/rollback' );\n }", "title": "" }, { "docid": "4bde573fc53e2ee874f386ffd0832012", "score": "0.5369198", "text": "function tpt_has_action() {\n\t if ( is_object($this->tpt_action) && isset($this->tpt_action->summary) )\n return TRUE;\n return FALSE;\n\t}", "title": "" }, { "docid": "5575eb42091093bca5d80cf80cd09138", "score": "0.53562295", "text": "function isDeleteType() \n {\n $type = $this->getValueByFieldName( 'transition_type' );\n return ($type == RowManager_TransitionsManager::TRANSITION_TYPE_DELETE);\n }", "title": "" }, { "docid": "376f816d0d5215a25678ba8c5959948b", "score": "0.5354157", "text": "public function isSetupComplete(): bool;", "title": "" }, { "docid": "a7257a24d7e56c5731fc1d56770074eb", "score": "0.5325706", "text": "public function isDbQueryAlreadyExecuted(): bool;", "title": "" }, { "docid": "51df70c05c58bec4fbc684bcbfbb80a8", "score": "0.53217936", "text": "function migration_exist(string $name = ''): bool\n {\n return file_exists(migration_path($name));\n }", "title": "" }, { "docid": "701946bd50007709c0e817874c2d54f2", "score": "0.5319337", "text": "public function onUpgrade() {\r\n \ttry {\r\n\t eF_executeQuery(\"ALTER TABLE module_vlabs_shoppingcart change timestamp timestamp int(11) default 0\");\r\n \t} catch (Exception $e) {/*the table was already upgraded*/}\r\n\r\n \treturn true;\r\n }", "title": "" }, { "docid": "62f1a44c17f8f79cc85a5aabc9549c17", "score": "0.5318629", "text": "public function canRun()\n {\n //runAgain? check db first\n if($this->runAgain){\n //get document\n $this->notificationDbObject = $this->notificationCollection->getNotification(\n $this->event->eventId, $this->getToUser()\n );\n\n //Notification already sent ? (fanOut 1)\n if($this->notificationDbObject === null)\n return false;\n\n //Notification in processing state (fanOut -1) ?\n if($this->notificationDbObject)\n return true;\n }\n\n //first time? write document (fanOut -1) and go\n $this->notificationDbObject = $this->notificationCollection->addNotification(\n $this->event->eventId, $this->getToUser(), $this->getFromUser(), $this->notificationName, $this->getNotificationData()\n );\n return true;\n\n }", "title": "" }, { "docid": "a2515d85232f1e0bc3dd72d6409f430b", "score": "0.53167576", "text": "public function wasUpdated(): bool\n {\n return !$this->wasCreated();\n }", "title": "" }, { "docid": "9a41b958872c25d339b05041218cf057", "score": "0.5313284", "text": "protected function needsRefresh()\n {\n if (in_array($this->cachedFileName, self::$transformedFiles) === true) {\n return false;\n }\n \n if (false === self::$enableCaching) {\n return true;\n }\n \n if (filemtime($this->cachedFileName) > filemtime($this->fileName)) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "5e5a79565c68fdb7ba8d8a93a97c37a2", "score": "0.53032154", "text": "public function hasTransactions(): bool\n {\n return $this->config->dbTransactions();\n }", "title": "" }, { "docid": "3bad25ede5176656bc388e8dd6de33ae", "score": "0.5297236", "text": "function is_action($action = null) {\r\n if ($action == null)\r\n return $this->action != null;\r\n if ($this->action == null)\r\n return false;\r\n if ($this->action != $action)\r\n return false;\r\n if (check_admin_referer('save'))\r\n return true;\r\n die('Invalid call');\r\n }", "title": "" }, { "docid": "f93a6fa4861974ebba225341650d5fc6", "score": "0.52954715", "text": "private function checkAccess(): bool\n\t{\n\t\treturn AccessController::getCurrent()->check(\n\t\t\tActionDictionary::ACTION_CATALOG_IMPORT_EXECUTION\n\t\t);\n\t}", "title": "" }, { "docid": "ded46612bb7bcc744b955c2c3ab86f29", "score": "0.5294958", "text": "public function is_scheduled( $hook ) {\n\n\t\tif ( ! function_exists( 'as_next_scheduled_action' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn as_next_scheduled_action( $hook );\n\t}", "title": "" }, { "docid": "f742e4e962eb86908b068ed4b4f8781b", "score": "0.5293482", "text": "function menumanager_is_activated()\n{\n\tglobal $db;\n\tif($db->table_exists(\"menumanager\"))\n\t{\n\t\t\treturn true;\n\t}\n\treturn false;\n\n\n}", "title": "" }, { "docid": "bb278230c94d5e75c3438c0730843162", "score": "0.52877325", "text": "public function isDownForMaintenance() {}", "title": "" }, { "docid": "797837bba0c8f628f0f64380c831ba17", "score": "0.5280244", "text": "public function provisioningJobDispatched()\n {\n return ! is_null($this->provisioning_job_dispatched_at);\n }", "title": "" }, { "docid": "9cc7b2debbb20845d96231b5abb6a444", "score": "0.5264812", "text": "protected function checkForAlternativeCrudAction($action)\n {\n }", "title": "" }, { "docid": "03ee68064359de2150de912b0e8aee34", "score": "0.52467847", "text": "private function tableLoaded(): bool\n\t{\n\t\treturn $this->table != null;\n\t}", "title": "" }, { "docid": "f9f71ac98304204537ee05ae5e11ec2f", "score": "0.52401185", "text": "public function upgrade() {\n\t\tif ( ! $this->can_upgrade() ) {\n\t\t\tadd_action( 'all_admin_notices', array( $this, 'admin_notices' ) );\n\t\t\treturn false;\n\t\t}\n\n\t\tadd_action( 'admin_init', array( $this, '_upgrade' ) );\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1b1213236bf034e69b48942c775e590e", "score": "0.52393025", "text": "public static function isTurningOn(){\n\t\treturn ((int) Yii::$app->request->post('switchcolumnreq') == 1);\n\t}", "title": "" }, { "docid": "e92832b1c62c8c649883a6a96d6cd592", "score": "0.5239209", "text": "public function getIsAdmin() {\n //Get the old value for Permission.admin_implies_all\n $oldValue=Config::inst()->get(Permission::class, 'admin_implies_all');\n \n \n //Disable the Permission.admin_implies_all\n Config::inst()->update(Permission::class, 'admin_implies_all', false);\n \n \n //Look to the normal permission checking\n $result=Permission::check('CMS_ACCESS_DeploymentScheduleAdmin');\n \n \n //Restore the value for Permission.admin_implies_all\n Config::inst()->update(Permission::class, 'admin_implies_all', $oldValue);\n \n \n return ($result!==false);\n }", "title": "" }, { "docid": "fb6b48322f0f4d60cb8d7f189f80c293", "score": "0.52357924", "text": "public function isAllowedToUpdate()\n {\n $userName = $this->chartConfig->getUsername();\n $created = new \\DateTime();\n $created->setTime(0,0,0);\n $results = $this->repository->findAfterCreated($userName, $created);\n\n // The cron has already ran today, therefor ignoring a current update, only update once a day.\n if ( count($results) === 0 )\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "2a109477222e494a461f03b009dd6aad", "score": "0.52304316", "text": "public function isAutomatic()\n {\n return (bool)(int)Mage::getStoreConfig('general/content_staging/create_entry_point');\n }", "title": "" }, { "docid": "b546596a05ca606d59c4001f6d6b4415", "score": "0.5230022", "text": "public function has_applied(){\n\t\t\tif($this->action_applied === null){\n\t\t\t\treturn true; //maintains expected behavior from unsupported discount actions\n\t\t\t}\n\t\t\treturn $this->action_applied ? true : false;\n\t\t}", "title": "" }, { "docid": "af4600644a0a9efaa41fd5667005e48b", "score": "0.52226096", "text": "public function testEnsureWorking() {\n\t\t$task = new MigrateTask();\n\t\t$this->assertContains(\"migrations\", $task->getMigrationPath());\n\t}", "title": "" }, { "docid": "cca2cb03dd1beaafc099534e03f97344", "score": "0.522162", "text": "public function isFlushed(): ?bool;", "title": "" }, { "docid": "98cfe4d856f03a5e111f30d88baa488f", "score": "0.5211804", "text": "public function isReactivation()\n {\n return 0 < $this->getAttributeRaw('original');\n }", "title": "" }, { "docid": "ec0146885404656716c03ad157b5479e", "score": "0.5207869", "text": "public function actionConfirmMigrations()\n {\n $this->migrationConfirmed = true;\n return $this->actionSetup();\n }", "title": "" }, { "docid": "ce2360decd4b7f12781d1bffadc5e2da", "score": "0.52064896", "text": "public function set_upgrade_in_progress() {\n\t\t$retval = false;\n\t\t$showDbVersion = $this->databaseVersion;\n\t\tif(is_null($showDbVersion) || !strlen($showDbVersion)) {\n\t\t\t$showDbVersion = \"(unknown)\";\n\t\t}\n\t\tif(!$this->lockObj->is_lockfile_present()) {\n\t\t\t$details = $this->projectName .': Upgrade from '. $showDbVersion .' started at '. date('Y-m-d H:i:s');\n\t\t\t$this->lockObj->create_lockfile($details);\n\t\t}\n\t\t$retval = $this->lockObj->is_lockfile_present();\n\t\t\n\t\treturn $retval;\n\t}", "title": "" }, { "docid": "388ae614c2ec97c45fbe3a65be6466bd", "score": "0.5204635", "text": "public function hasPreTaskCommands()\n {\n return !empty($this->preTaskCommands);\n }", "title": "" }, { "docid": "b6e7b222c34521381e12271802dfd2d5", "score": "0.5202783", "text": "public function isDeclined(): bool;", "title": "" }, { "docid": "92eedf2a72fc54ff3e1dc5614101f54d", "score": "0.51971245", "text": "protected function isAutoRefreshable()\n {\n return $this->isRefreshable &&\n ( isset($GLOBALS['sugar_config']['dashlet_auto_refresh_min']) ?\n $GLOBALS['sugar_config']['dashlet_auto_refresh_min'] != -1 : true );\n }", "title": "" }, { "docid": "4750f768e97d0890df7babddb6d4ee29", "score": "0.51885384", "text": "protected function isDone()\n\t{\n\t\t$is_done = $this->data['stage'] == self::STAGE_DONE;\n\t\t\n\t\tif ($is_done)\n\t\t{\n\t\t\t$this->app_settings_model->set('shop.ip', 'kladr_api_last_update_datetime', date('Y-m-d H:i:s'));\n\t\t}\n\t\t\n\t\treturn $is_done;\n\t}", "title": "" }, { "docid": "8cfbd8de5f626b1989a7a128d4a652a2", "score": "0.5186012", "text": "function checkUpdate() {\n\t\t/** @var moduleModel $oModuleModel */\n\t\t$oModuleModel = getModel('module');\n\t\tif(!$oModuleModel->getTrigger('file.downloadFile', 'file_log', 'controller', 'triggerFileDownloadBefore', 'before')) {\n\t\t\treturn true;\n\t\t}\n\t\tif(!$oModuleModel->getTrigger('file.downloadFile', 'file_log', 'controller', 'triggerFileDownloadAfter', 'after')) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "a9448e9be217e886a1ae9a28e5ea7c0e", "score": "0.5185534", "text": "public static function isFeatureRunned()\n {\n return self::$featureItemID != self::EMPTY_ID;\n }", "title": "" }, { "docid": "b6c533019e05487b8f6579486fcc5992", "score": "0.5182877", "text": "public function action_status() {\r\n $this->_console->out();\r\n foreach ($this->_migrations->get_migrations() as $migration) {\r\n if ($migration->version == $this->_migrations->get_schema_version()) {\r\n $this->_console->out($migration->version . \"*\\t\" . Console::format($migration->descr, Console::SUCCESS));\r\n } else {\r\n $this->_console->out($migration->version . \"\\t\" . $migration->descr);\r\n }\r\n }\r\n $this->_console->out();\r\n $this->_console->out_line();\r\n\r\n return $this->action_index();\r\n }", "title": "" }, { "docid": "80c9ee6889d59fdec934896a5894e963", "score": "0.5178594", "text": "public function isSnapinTask()\n {\n $id = (\n $this instanceof Task ?\n 'typeID' :\n 'id'\n );\n\n return\n $this->isValid()\n && (\n (\n $this->isDeploy()\n && $this->get($id) != 17\n )\n || in_array($this->get($id), array(12, 13))\n )\n ;\n }", "title": "" }, { "docid": "c6f74484d964ec162c886712478e3137", "score": "0.5177082", "text": "public function isBackupCreated();", "title": "" }, { "docid": "ed7a4a9d225c4b255943ece9afa90140", "score": "0.5176343", "text": "protected function databaseNeedsUpdate() {\n\t\treturn $this->pageDataStructureNeedsUpdate() || $this->contentDataStructureNeedsUpdate() || $this->templateObjectDataStructureNeedsUpdate() || $this->templateObjectFileRefNeedsUpdate();\n\t}", "title": "" }, { "docid": "7748460fc063b498122b888760a63e7d", "score": "0.5176026", "text": "public function canShowStartButton(){\n\t\t\t// the tournament hasn't started automatically yet, so the start date is smaller than the\n\t\t\t// current time\n\t\t\treturn $this->getTournamentState() === TournamentState::CHECKIN && $this->getDate() < time();\n\t\t}", "title": "" }, { "docid": "4b0aa02d5f2f454d34bcd85b6d6ca33d", "score": "0.5172108", "text": "public function coolingDown()\n {\n return isset($this->restartAgainAt) &&\n Chronos::now()->lt($this->restartAgainAt);\n }", "title": "" }, { "docid": "013dfb9ab9b8648ab2788fb5dfb8f2a0", "score": "0.5164996", "text": "public function isDownForMaintenance()\n {\n }", "title": "" }, { "docid": "013dfb9ab9b8648ab2788fb5dfb8f2a0", "score": "0.5164996", "text": "public function isDownForMaintenance()\n {\n }", "title": "" }, { "docid": "7208f13c8d9476c9f21c3583665fa8ce", "score": "0.5164584", "text": "protected static function migrate() {\n $bool = 0;\n $files = glob(__DIR__ . '/../docs/*_migration.sql');\n\n sort($files);\n $settings = new Settings();\n $currentVersion = (int)$settings->getMigration();\n $unprocessed = array_splice($files, $currentVersion);\n foreach ($unprocessed as $file) {\n $bool += self::_dbEvent(basename($file), \"Error migrating $file.\");\n if ($bool === false) {\n break;\n }\n $currentVersion++;\n }\n $settings->setMigration($currentVersion);\n return $bool;\n }", "title": "" }, { "docid": "61e44dd7b08d495cd1ce24cad5bac4ee", "score": "0.5162237", "text": "public function databaseNeedsUpdating() {\n\t\t\n\t\t$latestVersion = $this->getLatestVersion();\n\t\t\n\t\t$queryManager = new DIM_QueryManager();\n\t\tif($queryManager->checkForVersionFile($latestVersion + 1)) {\n\t\t\treturn true; \n\t\t}\t\t\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "367767909bb895036073a14bf78a322f", "score": "0.0", "text": "public function index()\n {\n //Paginating products\n $products = Product::paginate(15);\n $previousPageUrl = $products->previousPageUrl();//previous page url\n $nextPageUrl = $products->nextPageUrl();//next page url\n $lastPage = $products->lastPage(); //Gives last page number\n $total = $products->total();\n return view('admin.Products.index')->with(['products'=>$products,'previousPageUrl'=>$previousPageUrl,'nextPageUrl'=>$nextPageUrl,'lastPage'=>$lastPage,\"total\"=>$total]);\n }", "title": "" } ]
[ { "docid": "e5e7384bd73dca78941fcbd89a202b70", "score": "0.7997081", "text": "public function action_listing() {\n\t\t$this->_content('listing', $this->_instances(), true);\n\t}", "title": "" }, { "docid": "5843220cf684a1a73c04dea06b179c98", "score": "0.77250284", "text": "public function listAction ()\n {\n $module = $this->_request->getModuleName();\n $controller = $this->_request->getControllerName();\n\n $resourceResource = $this->_helper->modelResource('Resources');\n $resources = $resourceResource->fetchAll();\n $this->view->resources = $resources;\n }", "title": "" }, { "docid": "a9bb13ba4c87678e1ac5005171d43f4a", "score": "0.74907076", "text": "public function actionList()\n {\n $this->render('list');\n }", "title": "" }, { "docid": "8d51b677bee6c53da8e98cce79f655aa", "score": "0.7418133", "text": "public function listAction()\n {\n echo Zend_Json::encode($this->_records->queryRecords(\n $this->_request->getParams()\n ));\n }", "title": "" }, { "docid": "6eac2ccd3e0cf5d8296b9c33085d378d", "score": "0.72538555", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t$search = $this->getInput(array('name', 'status'));\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\tlist($total, $result) = Super_Service_Resource::search($page, $perpage, $search);\r\n\t\t\r\n\t\t$this->assign('search', $search);\r\n\t\t$this->assign('result', $result);\r\n\t\t$this->cookieParams();\r\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\r\n\t\t$this->cookieParams();\r\n\t}", "title": "" }, { "docid": "3b1a348da533dcb6668082a3467f61de", "score": "0.7189258", "text": "public function actionList()\n {\n $this->restObj->loadModels();\n }", "title": "" }, { "docid": "2cdc01c5b6d9b929fb113d684dccaced", "score": "0.7156122", "text": "public function index()\n {\n $resource = $this->resource->all();\n\n return view('resources', compact('resource'));\n }", "title": "" }, { "docid": "717b72f905cc3eb38c16a04ff9a86ae6", "score": "0.7114549", "text": "public function index()\n {\n // $this->hasAccessOrFail('list');\n $this->setOperation('list');\n if ($this->tienePermiso('list')) {\n $this->data = array();\n $this->data['title'] = $this->getTitle() ?? mb_ucfirst($this->entity_name_plural);\n $this->data['routerAlias'] = $this->getRouterAlias();\n $this->data['contentClass'] = $this->getListContentClass();\n $this->data['heading'] = $this->getHeading() ?? $this->entity_name_plural;\n $this->data['subheading'] = '';\n $this->data['permissionName'] = $this->getPermissionName();\n $this->data['buttons_top'] = $this->getButtons()->where('stack', 'top');\n $this->data['columns'] = $this->getColumns();\n $this->data['columnOrderNum'] = $this->getColumnNumericIndex($this->getDefaultOrderColumn());\n $this->data['columnOrderName'] = $this->getDefaultOrderColumn();\n $this->data['columnOrderDire'] = $this->getDefaultOrderDirection();\n $this->data['filtros'] = $this->getfilters();\n\n // load the view from /resources/views/vendor/Cesi/crud/ if it exists, otherwise load the one in the package\n return view($this->getListView(), $this->data);\n } else {\n return view('cesi::errors.401');\n }\n }", "title": "" }, { "docid": "7246ebaf3415f94d436da4bb642e24a3", "score": "0.70818526", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t$search = $this->getInput(array('name', 'status'));\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\tlist($total, $result) = Gou_Service_Resource::search($page, $perpage, $search);\r\n\t\t\r\n\t\t$this->assign('search', $search);\r\n\t\t$this->assign('result', $result);\r\n\t\t$this->cookieParams();\r\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\r\n\t\t$this->cookieParams();\r\n\t}", "title": "" }, { "docid": "7adba616fe1b0a755e693520aac54298", "score": "0.7053882", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $recipes = $em->getRepository('AppBundle:Recipe')->findAllPublic();\n\n return $this->render('recipe/list.html.twig', array(\n 'recipes' => $recipes,\n ));\n }", "title": "" }, { "docid": "3046e5391755ed0249127951b935e880", "score": "0.7045966", "text": "public function indexAction()\n {\n $filterRenderer = $this->getFilterRenderer();\n $listRenderer = $this->getListRenderer();\n\n return $this->container->get('templating')\n ->renderResponse($listRenderer->getTemplate(), array(\n 'renderer' => $listRenderer,\n 'filter' => $filterRenderer,\n 'csrf' => $this->container->get('form.csrf_provider')->generateCsrfToken('list')\n ));\n }", "title": "" }, { "docid": "0c4d22454d91d669f713e248e6cd4363", "score": "0.70392543", "text": "public function listAction()\n {\n\n // get reference to our repository\n // and get array of all DVDs\n $dvdRepository = new DvdRepository();\n $dvds = $dvdRepository->getAllDvds();\n\n // add to args array\n // ------------\n $argsArray = [\n 'dvds' => $dvds\n ];\n\n // render (draw) template\n // ------------\n $templateName = 'list';\n return $this->app['twig']->render($templateName . '.html.twig', $argsArray);\n }", "title": "" }, { "docid": "a9ac287e901f12c6cd37fe3754d96da7", "score": "0.70273596", "text": "public function index()\n {\n return $this->showAll(PeopleResource::collection(People::get()));\n }", "title": "" }, { "docid": "61981ceb471a82ebd3789f7373c04b9c", "score": "0.7009925", "text": "public function display() {\n $res = NULL;\n $params = $this->request->query;\n if (empty($params) || empty($params['cat'])) {\n $res = $this->getAllListings();\n }\n else {\n $res = $this->getListingsByCategory($params['cat'],\n $params['sort'],\n $params['ascDesc']);\n }\n $this->set(['listings' => $res]);\n }", "title": "" }, { "docid": "9c23597c81f0260d62a430388b719886", "score": "0.6998034", "text": "public function list()\n {\n try {\n\n } catch (\\Exception $e) {\n echo '<pre>';\n print_r($e->getMessage());\n echo '</pre>';\n }\n }", "title": "" }, { "docid": "271af64fc25b41beefcb0ae2bf3d06c1", "score": "0.69789684", "text": "public function index()\n {\n $this->lst();\n }", "title": "" }, { "docid": "970e35836b9768276ac32a7f819d569f", "score": "0.6969622", "text": "public function index()\n {\n return \"Here is the listing page.\";\n }", "title": "" }, { "docid": "333551ff905b0a0ba61cb4344dc527c5", "score": "0.6954035", "text": "public function index()\n\t{\n\t\t$lines = $this->repository->getPaginate(10);\n\t\t$links = str_replace('/?', '?', $lines->render());\n\n\t\treturn view($this->base.'.list', compact('lines', 'links'));\n\t}", "title": "" }, { "docid": "763c667833a58c0ab1d9b6ed41fcd7f1", "score": "0.6949768", "text": "public function actionList(){\n // input\n $t = Text::getEntityTexts($this->moduleid, $this->entityid);\n \n // process\n \n // output\n Page::setTitle(\"Consulta de \".$t->entity());\n $this->view(\"list\");\n }", "title": "" }, { "docid": "a42d2c3cb23ebb4d90fe085f81abfdf1", "score": "0.694591", "text": "public function indexAction()\n {\n $handler = $this->_createModelHandler();\n\n $url = $this->getRequest()->getRequestUri();\n $params = Rest_Serializer::decode($url, Rest_Serializer::FULL_URL_UNKNOWN);\n\n try {\n $items = $handler->getList($params);\n } catch (Rest_Model_MethodNotAllowedException $e) {\n $this->getResponse()->setHttpResponseCode(405);\n $this->getResponse()->setHeader('Allow', implode(', ', $e->getAllowedMethods()));\n $this->view->data = $e->getMessage();\n return;\n } catch (Rest_Model_BadRequestException $e) {\n $this->getResponse()->setHttpResponseCode(400);\n $this->view->data = $e->getMessage();\n return;\n } catch (Exception $e) {\n $this->getResponse()->setHttpResponseCode(500);\n // should output 500 errors conditional to APP_ENV being dev\n // should log errors no matter what environment\n return;\n }\n\n $this->view->data = $items;\n }", "title": "" }, { "docid": "f39dea430d1832d789b6e49e5d7554be", "score": "0.692712", "text": "public function index()\n {\n $categories = Category::all();\n return $this->resp->ok(eRespCode::CAT_LISTED_200_00, new CategoryResourceCollection($categories));\n }", "title": "" }, { "docid": "8c8ca6b1a9586345fa58fa75152c17eb", "score": "0.6921003", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n\n\t\t//GET SETTING\n $this->view->owner_photo = $this->_getParam('owner_photo', 1);\n\n //GET LISTING SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n }", "title": "" }, { "docid": "75c25c496b7bb134be1dfcae86fb4091", "score": "0.6907718", "text": "function list() {\n $data = $this->handler->handleList();\n\n $page = new Page(\"List existing templates\", \"Templates\");\n $page->top();\n\n listView($data);\n\n $page->bottom();\n }", "title": "" }, { "docid": "ca758c8d004263d55a0ae58a76c94b8e", "score": "0.68839717", "text": "public function listAction()\n {\n $list = Interest::getList();\n\n return $this->render('interest/list', $list);\n }", "title": "" }, { "docid": "5c422eb9c63aaa4755881379e395025b", "score": "0.68358845", "text": "public function index() {\n\t\t\n\t\tif ($this->require_role('admin')) {\n\t\t\t$this->load->model('Resource', 'resource');\n\t\t\t$this->load->helper(array('form', 'url'));\n\t\n\t\t\t$data = array('resources' => $this->resource->all());\n\t\t\t$this->load->template('admin/resources_index', $data);\t\n\t\t}\n\t}", "title": "" }, { "docid": "faf64cfddc139b306817d316d98d7998", "score": "0.68326175", "text": "protected function listing(array $params) {\n\t\t// Check parameters\n\t\t// Get resources\n\t\t// Filter it by key (perms)\n\t\t// Returns the list\n\t}", "title": "" }, { "docid": "d273d165886af297123e8efab8c940d8", "score": "0.6827775", "text": "public function index()\n {\n $items = ItemResource::collection(Item::orderBy('sort_order')->get());\n\n return $this->success($items);\n }", "title": "" }, { "docid": "b868b6f2a3079e57b349fd81d8b7d5bd", "score": "0.6826282", "text": "public function index()\n {\n if (!$this->user->can('view-record')) {\n return $this->unauthorizedResponse([\n 'errors' => ['Ora entuk ndes']\n ]);\n }\n\n $records = Record::paginate();\n return $this->okResponse([\n 'data' => new RecordTableResourceCollection($records) \n ]);\n }", "title": "" }, { "docid": "5856416953feca05c4cf552b6d0d19f9", "score": "0.6806458", "text": "public function index()\n {\n // return all statuses as a resource ordered by status\n $statuses = Status::orderBy('status', 'asc')->get();\n\n // Return the statuses as a resource\n return StatusResource::collection($statuses);\n }", "title": "" }, { "docid": "ae6ac1129584c76c474a8718bca91c33", "score": "0.6780087", "text": "public function ListView() {\n $this->Render();\n }", "title": "" }, { "docid": "2d1d458b52819df5fe6e27c7992f0ddc", "score": "0.6779744", "text": "public function index()\n {\n $listings = Listing::latest()->paginate(20);\n return view('backend.listing.index', compact('listings'));\n }", "title": "" }, { "docid": "4c6b319e397c45d649f8fe5ba2a7bd53", "score": "0.67744184", "text": "public function index()\n {\n $model = $this->resourceModel;\n return $model::all();\n }", "title": "" }, { "docid": "b748eaa207eeee72d7887a0fc25dca4a", "score": "0.67608345", "text": "public function index() {\n\n $limit = Input::get('limit') ? : 10;\n $fullItemsBase = FullItemsBase::paginate($limit);\n return $this->respondWithPagination($fullItemsBase, $this->fullItemsBaseTransformer->transformCollection($fullItemsBase->items()));\n\n }", "title": "" }, { "docid": "aa645d4232fad0744f3db157558e1606", "score": "0.67556214", "text": "public function index()\n\t{\n\t\t\n\t\t$kiosk = Request::input('kiosk');\n\n\t\t$q = Request::input('query');\n\n\t\t$listings = Listing::search($q)\n\t\t\t->forKiosk($kiosk)\n\t\t\t->orderBy('lastName')\n\t\t\t->orderBy('company')\n\t\t\t->get([\n\t\t\t\t'listings.id',\n\t\t\t\t'firstName',\n\t\t\t\t'lastName',\n\t\t\t\t'company',\n\t\t\t\t'title',\n\t\t\t\t'listings.location',\n\t\t\t\t'address',\n\t\t\t\t'email',\n\t\t\t\t'phone',\n\t\t\t\t'description',\n\t\t\t\t'listings.image',\n\t\t\t\t'maps.image as map'\n\t\t\t]);\n\n\n\t\treturn ['listings'=>$listings];\n\t}", "title": "" }, { "docid": "5656a3bc0d701acc424777c84b33b509", "score": "0.6750781", "text": "public function index()\n {\n // If there is an Ajax request or any request wants json data\n if (request()->ajax() || request()->wantsJson()) {\n\n $sort = request()->has('sort')?request()->get('sort'):'name';\n $order = request()->has('order')?request()->get('order'):'asc';\n $search = request()->has('searchQuery')?request()->get('searchQuery'):'';\n $paginate = request()->get('paginate', 'on');\n\n list($data, $paginator) = $this->entityService->getResults($sort, $order, $search, $paginate);\n\n if (empty($data)) {\n return response([\n 'status_code' => 404,\n // 'message' => trans($this->getNotFoundKey())\n ], 404);\n }\n\n $data = $this->entityTransformer->transformCollection($data);\n\n return response([\n 'data' => $data,\n 'paginator' => $paginator,\n 'status_code' => 200\n ], 200);\n }\n\n return $this->entityList->view();\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": "fcdd2b18e7fdb84a081f8b4808c3dd87", "score": "0.67329895", "text": "public function index() {\n $this->listar();\n }", "title": "" }, { "docid": "de6abddc6ff8899fbf9d928f85487ba7", "score": "0.6730043", "text": "public function index()\n {\n\n return PersonResource::collection(Person::latest()->paginate(10));\n\n }", "title": "" }, { "docid": "01a0ecf1244ed50cd57b8fc36e7c90c6", "score": "0.67276037", "text": "public function showEntries ()\r\n {\r\n $sampleDocument = [];\r\n $results = $this->doQuery();\r\n\r\n // extract document keys to use them in query autocompletion\r\n if (isset($results[0])) {\r\n $sampleDocument = json_decode($results[0][\"document\"], true);\r\n }\r\n\r\n return $this->render(\"collection/home.html.twig\", [\r\n \"results\" => $results['results'],\r\n \"pagination\" => $results['pagination'],\r\n \"db\" => $_REQUEST[\"db\"],\r\n \"collection\" => $_REQUEST[\"collection\"],\r\n \"autocompleteFields\" => array_keys($sampleDocument)\r\n ]);\r\n }", "title": "" }, { "docid": "d8665c5666597c18e5362e0a4d89c431", "score": "0.67268443", "text": "public function index()\n {\n //only allow get requests to this endpoint\n $this->request->allowMethod('get');\n\n //fetch user id of the logged in user\n $user_id = $this->Authentication->getIdentity()['id'];\n\n //query the database\n $lists = $this->TodoLists->find()->where(['user_id'=>$user_id])->toArray();\n\n if (count($lists) === 0) {\n return $this->respond(400, [], 'No lists in the database');\n }\n\n return $this->respond(200, $lists, 'Lists fetched from the database');\n }", "title": "" }, { "docid": "c47747da41037cffb7ca6030eb0269ad", "score": "0.6714673", "text": "public function listAll()\n {\n echo view('{name}/listAll', [\n 'rows' => $this->model->paginate(20),\n ]);\n }", "title": "" }, { "docid": "f9f637b83ec4dd52acd76b5a1b723b01", "score": "0.6714468", "text": "public function index()\n\t{\n\t\t$resources = Resource::with('user')->get();\n\t\treturn View::make('resources.index')->with('resources', $resources);\n\t}", "title": "" }, { "docid": "b3f65d348a322a4797182798d5dd2389", "score": "0.6711745", "text": "public function action_list()\n\t{\n\t\t// Load the contest id\n\t\t$contest_id = $this->request->param('contest_id');\n\n\t\t// Load the contest model\n\t\t$contest = new Model_Photo_Contest($contest_id);\n\n\t\t// Load the active contest if the ID is not set\n\t\tif ($contest_id === NULL)\n\t\t{\n\t\t\t$contest->get_active();\n\t\t}\n\n\t\t// You can only see the list if the contest has started\n\t\tif ($contest->id === NULL)\n\t\t{\n\t\t\tdie('Sorry you can\\'t view this listing yet');\n\t\t}\n\n\t\t// Lets build the filters\n\t\t$query = $this->request->query();\n\t\t$filters = array(\n\t\t\t'amount' \t=> Arr::get($query, 'amount', 9),\n\t\t\t'order_by' \t=> Arr::get($query, 'order_by', 'last_vote'),\n\t\t\t'page' \t\t=> Arr::get($query, 'page', 1),\n\t\t);\n\n\t\t// Let the view build the list\n\t\t$content = new View_Photo_Contest_List($contest, $this->auth, $filters);\n\t\t$this->_build_layout($content, $contest, array('top'));\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": "6a2ce4bfb9032f960818fea7d1c1fd2f", "score": "0.6711654", "text": "function view()\n\t{\n\t\t$model\t=& $this->getModel( 'List' );\n\t\t$view =& $this->getView( 'List' );\n\t\t$view->setModel( $model, true );\n\t\t$view->display();\n\t}", "title": "" }, { "docid": "2e4e6ad1b566258d4381885b7225442d", "score": "0.66980463", "text": "public function index()\n {\n //\n $resources = Resource::all();\n return response([\n 'status' => true,\n 'resources' => $resources,\n ]);\n }", "title": "" }, { "docid": "a32ed162bac5feffa4d0d4d75f031e5f", "score": "0.66931826", "text": "public function index()\n {\n //\n\t\t$comp = Entity::paginate(10);\n\t\treturn view('entity.list')->with('user', $comp);\n }", "title": "" }, { "docid": "7a9f78e0d04bc17991354eb2a8289b5e", "score": "0.66906714", "text": "function listing(){\n\t\t// la variable $listado guarda el resultado de la funcion GetPersons\n\t\t//para luego ser enviada a la vista en el objeto _listado\n\t\t\t\t$listado = $this->_person->getPersons();\n\t\t\t\t$this->_view->_listado = $listado;\n\t\t\t\t\n\t\t\t\t$this->_view->render('listing', 'persons', '',$this->_sidebar_menu);\n\t\t\t}", "title": "" }, { "docid": "2734f9c5798c709c85e88386fda37702", "score": "0.66896355", "text": "public function index()\n {\n $students = Student::paginate(15);\n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "484df5509ac351a459c94ed96dad9631", "score": "0.6678784", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\tlist($total, $result) = Cod_Service_Type::getList($page, $perpage);\r\n\t\t\r\n\t\t$this->assign('result', $result);\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'?'));\r\n\t}", "title": "" }, { "docid": "232eafda3e687831892df1684534abd5", "score": "0.66763496", "text": "public function index()\n {\n // Get products\n $products = Product::paginate(3);\n\n // Return collection of products as a resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "e6c8741b5d134655b9c2b8dd778cefb8", "score": "0.66754305", "text": "function index()\n {\n // a main page yet ;-).\n $this->listings();\n }", "title": "" }, { "docid": "0fca76630447c6e294fc2e600086d38d", "score": "0.66752857", "text": "public function indexAction()\n\t{\n\t\t$albums = Album::find();\n\n\t\t// send data to the view\n\t\t$this->view->albums = $albums;\n\n\t\t$this->view->setLayout('list');\n\t}", "title": "" }, { "docid": "65070a2f2a7d54a05f7733a8e04446da", "score": "0.6657747", "text": "public function index() {\n\n $limit = Input::get('limit') ? : 10;\n $itemsBase = Item::paginate($limit);\n return $this->respondWithPagination($itemsBase, $this->itemTransformer->transformCollection($itemsBase->items()));\n\n }", "title": "" }, { "docid": "c7007e2c86edf572b2e16d9880bffb0d", "score": "0.6656419", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_permission->get_all();\n\t\t$this->template->set('title', 'Permission List');\n\t\t$this->template->load('template', 'contents', 'permission/list', $data);\n\t}", "title": "" }, { "docid": "f4d17451160e0b6de7ae955b505d6c54", "score": "0.6638445", "text": "public function list() {\n\n\t}", "title": "" }, { "docid": "518e90338c030a6d81f610434bd500ce", "score": "0.663422", "text": "public function list()\n {\n \n }", "title": "" }, { "docid": "5e41c828cebc4cc13f7309e5c05c4bc4", "score": "0.66317695", "text": "public function index()\n {\n //\n\n $listings = Listing::all();\n\n return view('admin.listing.index', compact('listings'));\n\n }", "title": "" }, { "docid": "a0c0872e537528aa097056ee2809bd73", "score": "0.662889", "text": "public function index()\n {\n return $this->responseCollection(['title' => 'Đây là resource collection']);\n }", "title": "" }, { "docid": "c0b97bdef674a1363cd928a5e28e2df1", "score": "0.66180605", "text": "public function index()\n {\n $items = $this->itemSrv->findAll();\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "5a2c942ef5f8bfbf353721a34ccb1db0", "score": "0.6603064", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t$params = $this->getInput(array('rid', 'imei'));\n\t\t$search = array();\n\t\tif ($params['rid']) $search['rid'] = $params['rid'];\n\t\tif ($params['imei']) $search['imei'] = $params['imei'];\n\t\t\n\t\tlist($total, $rids) = Gou_Service_Rid::getList($page, $perpage, $search);\n\t\t$this->assign('rids', $rids);\n\t\t$url = $this->actions['listUrl'] .'/?'. http_build_query($search) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $this->perpage, $url));\n\t\t$this->assign('search', $search);\n\t}", "title": "" }, { "docid": "d118079baa11c6896210752de43f466a", "score": "0.6598392", "text": "public function actionIndex()\n {\n $cars = Car::getAll(5);\n\n return $this->render('index', [\n\t 'cars' => $cars['cars'],\n\t 'pagination' => $cars['pagination'],\n ]);\n }", "title": "" }, { "docid": "7b0362011beee277adca7fa19bb6e265", "score": "0.6589539", "text": "public function listAction() {\n\t\t$this->view->role = Auth_Info::getUser ()->user_type;\n\t\tLog::infoLog ( 'method=' . __FUNCTION__ . ';user_id=' . Auth_Info::getUser ()->user_id . ';control_number' . ';Start action' );\n\t\t\n\t\t$page = null;\n\t\t// Doan nay phan biet POST voi GET\n\t\tif ($this->getRequest ()->isPost ()) {\n\t\t\t// Trong nay danh cho thu tuc post\n\t\t} else {\n\t\t\t// Trong nay danh cho thu tuc get\n\t\t\t\n\t\t\t// Lay ra danh sach account\n\t\t\t$select = TTestings::getInstance ()->getTestList ();\n\t\t\t$this->view->paginator = Zynas_Paginator::factoryWithOptions ( $select, $page, $this->view );\n\t\t\t// Lay ra danh sach chi tiet\n\t\t\t$select1 = TTestingdetails::getInstance ()->getListDetail ();\n\t\t\t$this->view->paginator1 = Zynas_Paginator::factoryWithOptions ( $select1, $page, $this->view );\n\t\t}\n\t\tLog::infoLog ( 'method=' . __FUNCTION__ . ';user_id=' . Auth_Info::getUser ()->user_id . ';control_number' . ';End action' );\n\t}", "title": "" }, { "docid": "58397a3ae7d676f27e069b6cd638cb54", "score": "0.65887684", "text": "public function index()\n {\n $products = Product::paginate(15);\n return ProductResource::collection($products);\n //\n }", "title": "" }, { "docid": "d387ade88ed7ada9aa0979d5a0c09bee", "score": "0.6585575", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate());\n }", "title": "" }, { "docid": "cf63b2e262afbf8c41ea8735174a1c1f", "score": "0.65836424", "text": "public function index()\n {\n $links = Link::all();\n return $this->showAll($links);\n }", "title": "" }, { "docid": "3d9f02ab227264eab59e37e914140bf1", "score": "0.65828973", "text": "public function index()\n {\n\n $perPage = Input::has('entries') ? Input::get('entries') : 10;\n if (Input::has('searchText'))\n return $this->respository->paginateSearch($perPage, Input::get('sort'), Input::get('searchText'));\n return $this->respository->paginate($perPage, Input::get('sort'));\n }", "title": "" }, { "docid": "1d851e06286b1c4304d70235a04c9b12", "score": "0.6582138", "text": "public function index()\n {\n\n $this->repository->skipPresenter();\n\n $perPage = request()->has('per_page') ? (int) request()->per_page : 5;\n\n if (request()->has('sort')) {\n list($sortCol, $sortDir) = explode('|', request()->sort);\n $catalogos = $this->repository->with('items')->orderBy($sortCol, $sortDir)->paginate($perPage);\n } else {\n $catalogos = $this->repository->with('items')->orderBy('id', 'asc')->paginate($perPage);\n }\n\n \n return response()->json($catalogos);\n }", "title": "" }, { "docid": "414d41e0df5b50d2fc08d8b1ff7cd984", "score": "0.65818864", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\tif ($page < 1) $page = 1;\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\tlist($total, $result) = Resource_Service_Attribute::getList(1, $this->perpage,array('at_type'=>1,'status'=>1), array('sort'=>'DESC'));\n\t\t\r\n\t\t$this->cookieParams();\r\n\t\t$this->assign('result', $result);\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'?'));\r\n\t}", "title": "" }, { "docid": "083677cf7d4c4336b6764e1c2e471e53", "score": "0.6575686", "text": "public function index()\n {\n return success($this->service->getList());\n }", "title": "" }, { "docid": "02f1b268574a4e41b19c995fbc856de6", "score": "0.6574009", "text": "public function index()\n {\n $items=Item::all();\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "e99878c1a0eff5bcf7bf12ed5c8ef9d5", "score": "0.65716714", "text": "public function show()\n {\n return view('listing::show');\n }", "title": "" }, { "docid": "7b5e2b301434be8bca6abbff68773c36", "score": "0.6567384", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate(10));\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "46f84c15b7beced16b95caa4f1ddc7b9", "score": "0.65611297", "text": "public function listing() {\n //show a list of games\n \n //prepare a collection of all games\n $this->games = new boardgameCollection();\n //pass this to the view\n View::setTemplate('gamelisting');\n }", "title": "" }, { "docid": "ae1d3b1986302fafef3e4fcf2486c80a", "score": "0.655366", "text": "public function index()\n {\n AnonymousResourceCollection::wrap('list');// 资源列表默认返回 data 更换为 list\n\n $lists = QueryBuilder::for(ElectricChargeLog::class)\n ->defaultSort('-created_at')\n ->where('user_id', '=', auth('api')->id())\n ->paginate();\n\n return ElectricChargeLogResource::collection($lists);\n }", "title": "" }, { "docid": "2bf1a2bd26f0394c521a6010c1bf0f05", "score": "0.6550969", "text": "public function listAction()\n {\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n $this->view->page_id = $page_id = $this->_getParam('page_id');\n\n //GET PROJECT ITEM\n $this->view->sitepage = $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\n\n //IF THERE IS NO PAGE.\n if (empty($sitepage)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n Engine_Api::_()->core()->setSubject($sitepage);\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n $this->view->initiatives = $outcomes = Engine_Api::_()->getDbtable('initiatives', 'sitepage')->getAllInitiativesByPageId($page_id);\n\n }", "title": "" }, { "docid": "b07dc2d3e33f03e6da772e77e05f7172", "score": "0.654454", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\t\t\n\t\t$params = $this->getInput(array('id', 'name'));\n\t\t\n\t\t$search = array();\n\t\tif ($params['id']) $search['id'] = $params['id'];\n\t\tif($params['name']) $search['name'] = array('LIKE', trim($params['name']));\n\t\t\n\t list($total, $suppliers) = Gou_Service_Url::getList($page, $perpage, $search);\n\t\t$this->assign('suppliers', $suppliers);\n\t\t$this->assign('search', $search);\n\t\t$this->cookieParams();\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($params) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\n\t}", "title": "" }, { "docid": "dc0dfaf548f5417e5fb8ca63e88f4bab", "score": "0.65415925", "text": "public function indexAction()\n {\n $this->tag->setTitle(__('Devices'));\n // Available sort to choose\n $this->filter->add('in_array', function($value) {\n return in_array($value, ['client_id', 'client_id DESC', 'IP', 'IP DESC', 'lastActive', 'lastActive DESC', 'name', 'name DESC', 'status', 'status DESC', 'type', 'type DESC']) ? $value : null;\n });\n\n // Check if limit to client's devices\n if ($client = $this->request->getQuery('client', 'int', null, true)) {\n $data = Devices::find(['client_id = :client:', 'order' => $this->request->getQuery('order', 'in_array', 'id', true), 'bind' => ['client' => $client]]);\n } else {\n $data = Devices::find(['order' => $this->request->getQuery('order', 'in_array', 'id', true)]);\n }\n\n // Get devices 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": "8ea0483fd142809c831c55dd4d54c8bc", "score": "0.6534711", "text": "public function index()\n {\n return response(Entry::getAll(), 200);\n }", "title": "" }, { "docid": "e58e46ad70cfe2abf6e6334edfcf4d33", "score": "0.653384", "text": "public function index()\n {\n return ProductResource::collection($this->model->all());\n }", "title": "" }, { "docid": "c53e5e5723ef0824b3deac61a33dcd59", "score": "0.653131", "text": "public function list()\n {\n $tickets = $this->getRepo()->all();\n $this->render('tickets.php', ['tickets' => $tickets]);\n }", "title": "" }, { "docid": "48a441e4246d6b8497f81c71044cc07c", "score": "0.6530572", "text": "public function listing()\n {\n return true;\n }", "title": "" }, { "docid": "f13e9e33ef11f1b3cc6bbc86c6cf452b", "score": "0.65302867", "text": "public function index()\n\t{\n\t\t$resources = Resource::select(\n\t\t\tarray(\n\t\t\t'resources.id',\n\t\t\t'resources.name',\n\t\t\t'resources.description',\n\t\t\t'resources.thumb',\n\t\t\t'resources.url',\n\t\t\t'resources.type'\n\t\t\t)\n\t\t)->limit(999)->get();\n\n\t\t// Derive the hover thumbnail image and add it to the object\n\t\tforeach ($resources as &$resource) {\n\t\t\t$resource->hover = str_replace('th.jpg', 'hv.jpg', $resource->thumb);\n\t\t}\n\n\t\t// Make sure we have an even number of entries, which is a factor of 3\n\t\t$count = $resources->count();\n\t\t$count = (($count % 2) !== 0) ? ($count + 1): $count;\n\n\t\t$first = null;\n\t\t$useImage = 0;\n\t\twhile (($count % 3) !== 0) {\n\t\t\t$use = clone($resources->get($useImage));\n\t\t\t$use['id'] = (9999 + $useImage);\t\t// Dummy unique id\n\t\t\t$resources = $resources->merge([$use]);\n\t\t\t$count = $resources->count();\n\t\t\t$useImage++;\n\t\t}\n\n\t\treturn view('pages.home', compact('resources'));\n\t}", "title": "" }, { "docid": "f36768242b82968fc5b2a672bf3b5d40", "score": "0.65284115", "text": "public function index()\n {\n // Get books or resources\n $booksOrResources = BookOrResource::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return BookOrResourceResource::collection($booksOrResources);\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "134e2581f1e75a4912a1c302ac7bdb43", "score": "0.6523618", "text": "public function index()\n {\n $contacts = Contact::forUser(Auth::user())->orderByDesc('id')->paginate(20);\n\n return ContactListResource::collection($contacts);\n }", "title": "" }, { "docid": "ba54d9aa7546c8835b3a3ea61bb72cf7", "score": "0.6519067", "text": "public function listAction(){\r\n\r\n $filter = $this->Request()->getParam('filter', null);\r\n $sort = $this->Request()->getParam('sort', null);\r\n $page = $this->Request()->getParam('page', 1);\r\n $start = $this->Request()->getParam('start', 0);\r\n $limit = $this->Request()->getParam('limit', 20);\r\n if (empty($sort)) {\r\n $sort = array(array('property' => 'o.offerTime', 'direction' => 'DESC'));\r\n } else {\r\n $sort[0]['property'] = 'o.' . $sort[0]['property'];\r\n }\r\n $repository = Shopware()->Models()->getRepository('Shopware\\CustomModels\\Offer\\Offer');\r\n $builder = $repository->getListQuery($filter, $sort);\r\n\r\n $builder = $builder->setFirstResult($start)\r\n ->setMaxResults($limit);\r\n\r\n $query = $builder->getQuery();\r\n $query->setHydrationMode(\\Doctrine\\ORM\\Query::HYDRATE_ARRAY);\r\n\r\n $paginator = $this->getModelManager()->createPaginator($query);\r\n $total = $paginator->count();\r\n\r\n $data = $paginator->getIterator()->getArrayCopy();\r\n if(!empty($data)) {\r\n $offers = $this->processOffersData($data, false);\r\n }\r\n\r\n // sends the out put to the view of the HBox\r\n $this->View()->assign(array(\r\n 'success' => true,\r\n 'data' => $offers,\r\n 'total' => $total\r\n ));\r\n }", "title": "" }, { "docid": "dd68c5aaf62bba59eb1c118ba9877062", "score": "0.65172595", "text": "public function index()\n {\n $this->authorize('items', 'index');\n $data = $this->service->index();\n return $this->successResponse($data);\n }", "title": "" }, { "docid": "319e68416f72b5d4be9e16bfd153c873", "score": "0.6512332", "text": "public function index()\n {\n //get staff\n $staff = StaffModel::paginate(10);\n\n return StaffResource::collection($staff);\n }", "title": "" }, { "docid": "0128f4addd68bf96770aa31441d1e085", "score": "0.65060353", "text": "public function index()\n {\n //\n //return Artista::all();\n return ArtistaResource::collection(Artista::all());\n }", "title": "" }, { "docid": "2028e84eeee5da547d802b37530d47f0", "score": "0.650491", "text": "public function show()\n {\n return $this->service->getAll();\n }", "title": "" }, { "docid": "e1ee96a401d87220945c1c91f862da36", "score": "0.6501406", "text": "public function index()\n {\n $mall = Mall::orderBy('id', 'DESC')->get();\n return MallResource::collection($mall);\n }", "title": "" }, { "docid": "3373e9d4bf0613737bfacd0d8bf0cbaf", "score": "0.65009093", "text": "public function index()\n {\n $this->indexPage('list-category', 'List Category');\n }", "title": "" }, { "docid": "cda757802b45272ab522944beaaf5df2", "score": "0.6493003", "text": "public function index()\n {\n if(request('reload'))\n $articles = Article::orderBy('created_at', 'desc')->paginate(3);\n else\n $articles = Article::all()->sortByDesc('id');\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "552960c1c38f29b1dc303b574b3afc2c", "score": "0.6492177", "text": "public function indexAction() {\n //do some sanity checking\n $error = array();\n $id_User = Default_Model_Auth::getUserId();\n\n try {\n $allitems = $this->RESTModel->gets($id_User);\n } catch( Exception $exc ) {\n $error['code'] = 400;\n $error['message'] = $exc->getMessage();\n }\n\n if( count($error) > 0 )\n $this->getResponse()\n ->setBody($error['message'])\n ->setHttpResponseCode($error['code']);\n else\n $this->getResponse()\n ->setBody(json_encode($allitems))\n ->setHttpResponseCode(200);\n\n }", "title": "" }, { "docid": "26b752dd4fadfe9ae139146b6a14ba4f", "score": "0.6483919", "text": "public function listAction() {\n $this->_template = 'ItemsList';\n Route::factory()->setAction('list');\n // Filter parameters to array if need\n Filter::setFilterParameters();\n // Set filter elements sortable\n Filter::setSortElements();\n $page = !(int) Route::param('page') ? 1 : (int) Route::param('page');\n // Check for existance\n $group = DB::select()->from('catalog_tree')->where('alias', '=', Route::param('alias'))->where('status', '=', 1)->as_object()->execute()->current();\n if( !$group ) { return Config::error(); }\n // Seo\n $this->setSeoForGroup($group);\n // Add plus one to views\n DB::update('catalog_tree')->set(array('views' => (int) $group->views + 1))->where('id', '=', $group->id)->execute();\n // Get items list\n $result = Filter::getFilteredItemsList($this->limit, ($page - 1) * $this->limit, $this->sort, $this->type);\n // Generate filter add for sql queries\n $add = Filter::getSql();\n // Count of parent groups\n $count = DB::query(Database::SELECT, 'SELECT COUNT(DISTINCT catalog.id) AS count FROM catalog '.$add['join'].'WHERE catalog.parent_id = \"'.$group->id.'\" AND catalog.status = \"1\"'.$add['where'])->as_object()->execute()->current();\n if ($count) {\n $count = $count->count;\n } else {\n $count = 0;\n }\n // Generate pagination\n $pager = Pager::factory($page, $count, $this->limit)->create();\n // Render page\n $this->_content = View::tpl( array('result' => $result, 'pager' => $pager), 'Catalog/ItemsList' );\n }", "title": "" }, { "docid": "9e1f5a874e1a782bad9b3af042809146", "score": "0.64805275", "text": "public function index()\n {\n //Show listings\n $listings = Listing::orderBy('created_at', 'desc')->get();\n return view('listings.index')->with('listings', $listings);\n }", "title": "" }, { "docid": "1093dccb5201e51e58ffed50dfe8aa7c", "score": "0.6477544", "text": "public function index()\n {\n $aventura = Aventura::latest()->paginate(10);\n return AventuraResource::collection($aventura);\n }", "title": "" }, { "docid": "fd2bf2ef206a7df828f6b8610a41b3a4", "score": "0.64756256", "text": "public function index()\n {\n // Get brands\n $brand = Brand::all();\n\n // Return collection of brands as resource\n return BrandResource::collection($brand);\n }", "title": "" } ]
00ca8471dd13b101dc9ecc81fdd15b61
Metodo carregaEndereco Apos selecionar o cep, verifica no banco se existe o cep digitado
[ { "docid": "ba5748002124592746d806d3db6b58d8", "score": "0.7278342", "text": "private function carregaEndereco()\n {\n \t//Verifica se o formulário foi postado\n if ($_SERVER['REQUEST_METHOD'] == \"POST\")\n {\n\t\t\t$this->Delegator('ConcreteCadastro' , 'carregaEndereco' , $this->getPost());\n }\n }", "title": "" } ]
[ { "docid": "fa9c165b96e2bda75f4f6f7a7e1823e8", "score": "0.637399", "text": "public function getCFOPCliente($PaisEstabelecimento,$UFEstabelecimento,$PaisEnderecoEntrega,$UFEnderecoEntrega){\n if($UFEstabelecimento == '' || $PaisEstabelecimento == '' || $UFEnderecoEntrega == '' || $PaisEnderecoEntrega == ''){/* Se algum par?metros estiver em branco retornal false */\n $this->setMensagem('C?lculo de CFOP (Linha:'.__LINE__.'): UF ou Pais de origem ou destino em branco.');\n return false;\n }\n if($PaisEnderecoEntrega != $PaisEstabelecimento || $UFEnderecoEntrega != $UFEstabelecimento){ /* Se o pais for diferente usa a CFOP internacinal ou Se o estado for diferente usa o interestadual */\n $IdCFOP = $this->getPessoa()->getDadoPessoa('cfop_interestadual_padrao');\n }\n elseif($UFEnderecoEntrega == $UFEstabelecimento){ /* Se o estado for igual usa o estadual */\n $IdCFOP = $this->getPessoa()->getDadoPessoa('cfop_estadual_padrao');\n }\n return $IdCFOP;\n }", "title": "" }, { "docid": "4882c0f036e6d856f5618d6529689f74", "score": "0.62614095", "text": "function Endereco_Filial($true=true){\r\n $titulo = __('Filiais do Sistema');\r\n $link = '_Sistema/Filial/Filiais';\r\n if($true===true){\r\n $this->Tema_Endereco($titulo,$link);\r\n }else{\r\n $this->Tema_Endereco($titulo);\r\n }\r\n }", "title": "" }, { "docid": "17d9d929990dde7d60a3e205521ee38d", "score": "0.6071293", "text": "public function localizarporcep($cep)\r\n {\r\n try{\r\n $pdo = Conectar();\r\n $comando=$pdo->prepare(\"select * from where cep_origem_encom = :cep or cep_destino_encom = :cep\");\r\n $comando->bindValue(\":cep\",$cep);\r\n $comando->execute();\r\n Desconectar($pdo);\r\n\r\n }\r\n catch(Exception $erro)\r\n {\r\n Desconectar($pdo);\r\n }\r\n }", "title": "" }, { "docid": "c6642e57caf08805fd96c849e5cd4590", "score": "0.5798461", "text": "public function search($cep)\n {\n\n $endereco = Endereco::where('cep', $cep)->first();\n\n if(!$endereco){\n // url \n $url = sprintf(self::ENDPOINT, $cep);\n\n\n //curl\n $request = Http::get($url);\n $response = $request->json();\n\n // dados\n $cep = str_replace(['-', '/'], null, $response['cep']);\n $logradouro = $response['logradouro'];\n $bairro = $response['bairro'];\n $cidade = $response['localidade'];\n $uf = $response['uf'];\n\n // model\n $endereco = Endereco::create([\n 'cep' => $cep,\n 'logradouro' => $logradouro,\n 'bairro' => $bairro,\n 'cidade' => $cidade,\n 'uf' => $uf \n ]);\n \n }\n \n return $endereco;\n }", "title": "" }, { "docid": "82b5b3573abcfcc77b6ba0db4cf50f25", "score": "0.5751265", "text": "function getAddress(){\n $link = null;\n $type_request = \"GET\";\n $params = array(\n \"estado\" => \"RS\",\n \"cidade\" => \"Flores da Cunha\",\n );\n\n if (is_array($params)){\n foreach ($params as $type_key => $value){\n if (empty($value)) continue;\n $link .= $type_key . '=' . urlencode($value) . '&';\n }\n\n $params = substr($link, 0, -1);\n\n if (!empty($params)){\n $uri = \"https://www.cepaberto.com/api/v3/address?\". $params;\n return $this->request($uri, $type_request);\n \n }\n }\n }", "title": "" }, { "docid": "9422be6692020a650b23236b15f89363", "score": "0.5740776", "text": "public function checarEmail(){ //Método para checar no banco se o email já existe.\r\n \r\n \r\n $conn = new Sql();\r\n \r\n try {\r\n\r\n $conn = $conn->connect();\r\n\r\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n \r\n $emailTemp = $this->email;\r\n \r\n $result = $conn->query(\"SELECT * FROM usuario where email = '$emailTemp';\")->fetchAll();\r\n \r\n $contador = count($result);\r\n \r\n if($contador > 0){ //Se encontrar no banco de dados ele retorna verdadeiro.\r\n // echo '<div class = \"container\"><div class = \"card\"><div class = \"card-content\"> O email se encontra no banco.</div></div></div>';\r\n return true;\r\n }else{\r\n // echo '<div class = \"container\"><div class = \"card\"><div class = \"card-content\"> O email não se encontra no banco.</div></div></div>';\r\n return false;\r\n }\r\n \r\n \r\n }\r\n \r\n catch(PDOException $e){\r\n echo '<div class = \"container\"><div class = \"card\"><div class = \"card-content\">'. $conn . \"<br>\" . $e->getMessage().'</div></div></div>';\r\n \r\n }\r\n \r\n $conn = null;\r\n \r\n \r\n \r\n }", "title": "" }, { "docid": "589b3f57b5b1293fd8963eef6d6045ed", "score": "0.5722292", "text": "public function getEndereco()\n {\n return $this->endereco;\n }", "title": "" }, { "docid": "589b3f57b5b1293fd8963eef6d6045ed", "score": "0.5722292", "text": "public function getEndereco()\n {\n return $this->endereco;\n }", "title": "" }, { "docid": "589b3f57b5b1293fd8963eef6d6045ed", "score": "0.5722292", "text": "public function getEndereco()\n {\n return $this->endereco;\n }", "title": "" }, { "docid": "a9cce9fe15249efed8cc55687e141c4d", "score": "0.5705188", "text": "public function testGetFuncionarioEndereco()\n {\n $funcionario = \\App\\Models\\Funcionario\\Funcionario::factory()->create();\n $enderecoFuncionario = \\App\\Models\\EnderecoFuncionario\\EnderecoFuncionario::factory()->create();\n $associacao = \\App\\Models\\FuncionarioEndereco\\FuncionarioEndereco::factory()->create();\n\n $associacao->funcionario_id = $funcionario->id;\n $associacao->endereco_funcionario_id = $enderecoFuncionario->id;\n $associacao->save();\n\n $retorno = $this->implementacao->getFuncionarioEndereco($funcionario->id);\n\n $this->assertEquals($associacao->id, $retorno->id);\n }", "title": "" }, { "docid": "9c50de6ad7d4e499c795c64f902da2c7", "score": "0.5704981", "text": "function consultaCliente()\n{\n require('../App/Services/Conexao.php');\n $pesquisa = $_GET['pesquisa'];\n\n // gerar pesquisa por cpf\n if ($pesquisa == 'cpf') {\n $dados = $_GET['dadoscpf'];\n $query = \"SELECT * \n FROM cliente\n INNER JOIN endereco\n ON cliente.endereco_idEndereco = endereco.idEndereco\n WHERE cpf = $dados\";\n }\n // gerar pesquisa pelo nome\n else {\n $dados = $_GET['dadosnome'];\n $query = \"SELECT * \n FROM cliente\n INNER JOIN endereco\n ON cliente.endereco_idEndereco = endereco.idEndereco\n WHERE LOWER(nome) LIKE LOWER('%$dados%')\";\n }\n $result = mysqli_query($con, $query);\n // verifica se retorna linhas no array, se não retornar, informa...\n if (!$row = $result->fetch_assoc()) {\n ?>\n <div class=\"card\">\n <hr />\n Nenhum cliente cadastrado com esses dados.\n </div>\n <?php\n\n // ...se retornar, exibe os clientes\n } else {\n $result = mysqli_query($con, $query);\n while ($row = $result->fetch_assoc()) {\n ?>\n <hr />\n <div class=\"card\">\n <div class=\"items\">\n <div class=\"item\">Nome: </div>\n <div class=\"item\"><?php echo \"\" . $row['nome'] ?></div>\n </div>\n <div class=\"items\">\n <div class=\"item\">CPF:</div>\n <div class=\"item\"><?php echo $row['cpf'] ?></div>\n </div>\n <div class=\"items\">\n <div class=\"item\">Data de Nascimento:</div>\n <!-- formatar saída de data do BD -->\n <div class=\"item\"><?php echo date_format(new DateTime($row['dataNasc']), \"d/m/Y\") ?></div>\n </div>\n <div class=\"items\">\n <div class=\"item\">E-mail:</div>\n <div class=\"item\"><?php echo $row['email'] ?></div>\n </div>\n <div style=\"font-weight: bold\">Endereço:</div>\n <div class=\"items\">\n <div class=\"item\">Logradouro:</div>\n <div class=\"item\"><?php echo $row['logradouro'] ?></div>\n </div>\n <div class=\"items\">\n <div class=\"item\">Numero:</div>\n <div class=\"item\"><?php echo $row['numero'] ?></div>\n </div>\n <div class=\"items\">\n <div class=\"item\">Bairro:</div>\n <div class=\"item\"><?php echo $row['bairro'] ?></div>\n </div>\n <div class=\"items\">\n <div class=\"item\">Cidade:</div>\n <div class=\"item\"><?php echo $row['cidade'] ?></div>\n </div>\n <div class=\"items\">\n <div class=\"item\">Estado:</div>\n <div class=\"item\"><?php echo $row['uf'] ?></div>\n </div>\n </div>\n\n <?php\n }\n }\n}", "title": "" }, { "docid": "4253dca2297c4a71cb51b47b5f068679", "score": "0.5703329", "text": "public function getEndereco() {\n return !empty($this->endereco) ? $this->endereco : null;\n }", "title": "" }, { "docid": "cede648501095cbb3339142455dca761", "score": "0.5689478", "text": "public function getTransportadorEndereco()\n {\n return $this->transportador_endereco;\n }", "title": "" }, { "docid": "4e34895e6ea204ff32e403cdb5261421", "score": "0.56663555", "text": "public function buscaEnderecoImovel()\n {\n return $this->app[\"db\"]->fetchAll('SELECT c_v_imoveis_completo.CODIGO, c_v_imoveis_completo.ENDERECO, c_v_imoveis_completo.BAIRRO\n FROM c_v_imoveis_completo\n LEFT JOIN c_v_proprietarios_contratos_todos ON c_v_proprietarios_contratos_todos.IMOVEL_ID = c_v_imoveis_completo.IMOVEL_ID\n ORDER BY c_v_imoveis_completo.IMOVEL_ID DESC');\n }", "title": "" }, { "docid": "64624f9812bde6fcb0d1cb11e72b57ee", "score": "0.56493473", "text": "public function getEndereco()\n {\n return $this->getModel()->getValor(\"endereco\");\n }", "title": "" }, { "docid": "9cb4db7b13dc0afd1055fcc157e0d1e0", "score": "0.5534777", "text": "public function consultaEnd($rua, $cidade, $uf, $cep)\n\t{\n\t\t$dados = $this->getConfig();\n\t\n\t\t$rer = array(\n\t\t\t'Accept: application/json, text/plain, */*'.\n\t\t\t'Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.5,en;q=0.3',\n\t\t\t'Content-Type: application/x-www-form-urlencoded',\n\t\t\t\"Authorization: Bearer \".base64_decode($dados['token'])\n\t\t);\n\n\t\t$url = $dados['url'] . 'consulta/consultaEndereco';\n\t\t$ref = $dados['url'];\n\t\n\t\t$post = '';\n\n\t\tif(strlen($rua) > 3)\n\t\t{ \n\t\t\t$post .= 'logradouro=' . $rua . '&';\n\t\t}\n\n\t\tif(strlen($cidade) > 3)\n\t\t{\n\t\t\t$post .= 'cidade=' . $cidade . '&';\n\t\t}\n\t\n\t\tif(strlen($uf) == 2)\n\t\t{\n\t\t\t$post .= 'uf=' . $uf . '&';\n\t\t}\n\t\n\t\tif(strlen($cep) > 4)\n\t\t{\n\t\t\t$post .= 'cep=' . $cep . '&';\n\t\t}\n\t\telse\n\t\t{ \n\t\t\t$post .= 'cep=&';\n\t\t}\n\t\n\t\t$post .= 'cliente= '. $dados['cliente'] .'&usuario=' . $dados['usuario'];\n\t\t$res = $this->curl($url, base64_decode($dados['cookie']), $post, true, $ref, $rer) . '####end###';\n\n\t\tif(stristr($res, '[{')){\n\t\t\t$res = '[{'.$this->corta($res, '[{', '####end###');\n\t\t\t$res = json_decode($res, true);\n\t\t\treturn $res;\n\n\t\t}else{\n\t\t\treturn [];\n\t\t}\n\n\t}", "title": "" }, { "docid": "0fa3647349daf4b6e8645687ee007dc9", "score": "0.5514876", "text": "public function consultaNome($nome, $cidade, $uf, $cep)\n\t{\n\t\t$dados = $this->getConfig();\n\n\t\t$rer = array(\n\t\t\t'Accept: application/json, text/plain, */*'.\n\t\t\t'Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.5,en;q=0.3',\n\t\t\t'Content-Type: application/x-www-form-urlencoded',\n\t\t\t\"Authorization: Bearer \".base64_decode($dados['token'])\n\t\t);\n\n\t\t$url = $dados['url'] . 'consulta/consultaNome';\n\t\t$ref = $dados['url'];\n\t\n\t\t$post = '';\n\n\t\tif(strlen($nome) > 3){ \n\t\t\t$post .= 'nome=' . $nome . '&';\n\t\t}\n\n\t\tif(strlen($cidade) > 3){\n\t\t\t$post .= 'cidade=' . $cidade . '&';\n\t\t}\n\t\n\t\tif(strlen($uf) == 2){\n\t\t\t$post .= 'uf=' . $uf . '&';\n\t\t}\n\t\n\t\tif(strlen($cep) > 4){\n\t\t\t$post .= 'cep=' . $cep . '&';\n\t\t}\n\t\n\t\t$post .= 'cliente='. $dados['cliente']. '&usuario=' . $dados['usuario'];\n\t\t$res = $this->curl($url, base64_decode($dados['cookie']), $post, false, $ref, $rer) . '####end###';\n\t\tif(stristr($res, '[{')){\n\t\t\t$res = '[{'.$this->corta($res, '[{', '####end###');\n\t\t}\n\n\n\t\t$res = json_decode($res, true);\n\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "26b9a8a7cfdd4870d347ed1983710daa", "score": "0.54987246", "text": "function buscar_deco($acceso,$codigo_da){\n\t$acceso->objeto->ejecutarSql(\"select id_contrato,status_da from deco_ana where codigo_da='$codigo_da'\");\n\tif($row=row($acceso)){\n\t\t$id_contrato=trim($row['id_contrato']);\n\t\t$status_da=trim($row['status_da']);\n\t\tif($status_da!=''){\n\t\t\techo \"EXISTE\";\n\t\t\treturn;\n\t\t}\n\t\tif($id_contrato!=''){\n\t\t\t$acceso->objeto->ejecutarSql(\"select nro_contrato, nombre, apellido from vista_contrato where id_contrato='$id_contrato'\");\n\t\t\tif($row=row($acceso)){\n\t\t\t\t$nro_contrato=trim($row['nro_contrato']);\n\t\t\t\t$cliente=trim($row['nombre']).\" \".trim($row['apellido']);\n\t\t\t\techo \": $nro_contrato, Cliente: $cliente\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo \"EXISTE\";\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\techo \"EXISTE\";\n\t\t}\n\t}\n}", "title": "" }, { "docid": "4437c6d00801a157eb66c1f9b9fd7c90", "score": "0.5472833", "text": "function consultaCEP($cep) {\r\n\t\t\t$cep = preg_replace(\"([.-])\", \"\", $cep);\r\n\t\t\t\r\n\t\t\t$this->sql(\"SELECT \r\n\t\t\t\t\t\t\tIF(E.ENDERECO_CEP IS NULL,C.CIDADE_CEP,E.ENDERECO_CEP) AS CEP,\r\n\t\t\t\t\t\t\tCONCAT(TL.ABREVIATURA,' ',E.ENDERECO_LOGR) AS ENDERECO,\r\n\t\t\t\t\t\t\tB.BAIRRO_DESCRICAO AS BAIRRO,\r\n\t\t\t\t\t\t\tC.CIDADE_ID AS CIDADE,\r\n\t\t\t\t\t\t\tUF.UF_ID AS UF\r\n\t\t\t\t\t\tFROM CEP_ENDERECO AS E\r\n\t\t\t\t\t\tLEFT OUTER JOIN CEP_BAIRRO AS B ON E.BAIRRO_ID = B.BAIRRO_ID\r\n\t\t\t\t\t\tLEFT OUTER JOIN TB_CIDADE AS C ON B.CIDADE_ID = C.CIDADE_ID\r\n\t\t\t\t\t\tLEFT OUTER JOIN CEP_TIPO_LOGRADOURO AS TL ON TL.TIPO_LOGRADOURO_ID = E.TIPO_LOGRADOURO_ID\r\n\t\t\t\t\t\tLEFT OUTER JOIN TB_UF AS UF ON UF.UF_ID = C.UF_ID\r\n\t\t\t\t\t\tWHERE E.ENDERECO_CEP = '\" . $cep . \"' OR C.CIDADE_CEP = '\" . $cep . \"'\");\r\n\t\t\t$linha = $this->linha();\r\n\t\t\treturn $linha;\r\n\t\t}", "title": "" }, { "docid": "90cafac451c8fb3464e4f2f36b58ddae", "score": "0.54219085", "text": "public function cadastrar_cliente(){\t\t\t\t\n\n\t\t//cadastra o endereco do cliente\n\t\t$sqlGravar = \"INSERT INTO endereco VALUES (DEFAULT, '{$this->rua}', '{$this->numero}', '{$this->bairro}', '{$this->cidade}', '{$this->cep}');\";\n\n\t\t$resultado = $this->mysqli->query($sqlGravar);\n\n\t\t//verifica se há erro\n\t\tif(!$resultado){\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//recupera o id recem cadastrado do endereco do cliente\n\t\t$sqlBusca = \"SELECT last_insert_id(id) as id from endereco order by id desc limit 1\";\n\n\t\t$resultado = $this->mysqli->query($sqlBusca);\n\n\t\t//verifica se há erro\n\t\tif(!$resultado){\n\t\t\treturn false;\n\t\t}\n\n\t\t$id_endereco = mysqli_fetch_array($resultado);\n\n\t\t//cadastra o cliente juntamente com o id do endereco recuperado\n\t\t$sqlGravar = \"INSERT INTO cliente VALUES (DEFAULT, '{$id_endereco['id']}', '{$this->nome}', '{$this->data_nasc}', '{$this->cpf}', '{$this->rg}', '{$this->telefone}', '{$this->celular}', '{$this->email}', '{$this->senha}', '{$this->sobrenome}');\";\n\n\t\t$resultado = $this->mysqli->query($sqlGravar);\t\n\n\t\t//verifica se há erro\n\t\tif(!$resultado)\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t//Busca o registro recente para \n\t\t$sqlBusca = \"SELECT *, last_insert_id(id) as id FROM cliente ORDER BY id DESC LIMIT 1;\";\n\t\t\n\t\t$resultado = $this->mysqli->query($sqlBusca);\n\n\t\t//verifia se há erro\n\t\tif(!$resultado){\n\t\t\treturn false;\n\t\t}\n\n\t\t//limpa o resultado da memória \n\t\tmysqli_free_result($resultado);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7db3754401cd5df26c5fa6278a4d3354", "score": "0.54056984", "text": "function EnvoiMailCommandeChequeValidee($numcommande,$email,$montant) {\r\n\r\n if(!is_numeric($numcommande)) return false;\r\n else {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//recup de la commande - on ne peut pas utiliser nos objets\r\n\t\t$result=mysql_query(\"SELECT * FROM if_bo_com WHERE numcom='\".$numcommande.\"'\");\r\n\t\t$laCommande=mysql_fetch_array($result);\r\n\t\t\r\n\t\tif ($laCommande[\"tpereg\"]==\"ch\") $type=\"chèque\";\r\n\t\telse if ($laCommande[\"tpereg\"]==\"vi\") $type=\"virement\";\r\n\t\t\r\n\t\t//recup du client - on ne peut pas utiliser nos objets\r\n\t\t$result=mysql_query(\"SELECT * FROM if_bo_client WHERE numclient='\".$laCommande[\"numclient\"].\"'\");\r\n\t\t$leClient=mysql_fetch_array($result);\r\n\t\t\r\n\t\t$corps.=\"\\nCOMMANDE IFIP - Institut du Porc\\n\\n\";\r\n\t\t\r\n\t\t$corps.=\"Bonjour \".$leClient[\"prenom\"].\" \".$leClient[\"nom\"].\",\\n\\n\";\r\n\t\t\t\r\n\t\t$corps.=\"Nous avons bien reçu votre \".$type.\" en paiement de votre \";\r\n\t\t$corps.=\"commande n°\".$numcommande.\" effectuée sur le site de l'Ifip et vous en remercions.\\n\\n\";\r\n\t\t$corps.=\"Si votre commande concerne des ouvrages, ceux-ci sont en cours de préparation pour expédition.\\n\";\r\n\t\t$corps.=\"Si votre commande concerne une référence (article) à télécharger, nous vous invitons\\n\";\r\n\t\t$corps.=\"à vous rendre sur la page d'accueil ifip.asso.fr puis à cliquer sur la rubrique Mon Compte.\\n \";\r\n\t\t$corps.=\"accessible en haut et à droite de toutes les pages du site. Cliquez sur le détail de la commande\\n \";\r\n\t\t$corps.=\"n°\".$numcommande.\" pour accéder à la liste des documents à télécharger.\\n \";\r\n\t\t\r\n\r\n\t\t$corps.=\"\\nVous pouvez également suivre en ligne l'évolution de votre commande en vous \r\n\t\tconnectant à cette même rubrique.\\n\";\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t$corps.=\"\\nCordialement\\n\";\r\n\t\t$corps.=\"\\nBrigitte Laval\\n\";\r\n\t\t$corps.=\"<strong>Ifip - Institut\tdu\tporc</strong>\\n\";\r\n\t\t$corps.=\"Service Editions\\n\";\r\n\t\t$corps.=\"149 rue de Bercy\\n\";\r\n\t\t$corps.=\"75595 Paris Cedex 12\\n\";\r\n\t\t$corps.=\"----------------------------------------------------------------------------------\\n\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t$recipients=$email;\r\n\t\t$From=\"Ifip Institut du Porc<[email protected]>\";\r\n\t\t$Bcc=\"\";\r\n\t\t$To=$recipients;\r\n\t\t$ReturnPath=$From;\r\n\t\t$ReplyTo=$From;\r\n\t\t$Subject=\"IFIP/ commande n°\".$numcommande.\" - paiement reçu\";\r\n\t\t\t\r\n\t\tEnvoiMail($recipients,$From,$Bcc,$To,$ReturnPath,$ReplyTo,$Subject,$corps);\r\n\t\t\t\r\n\t\t\t\r\n\t\t$recipients=\"[email protected],[email protected]\";\r\n\t\t//$recipients=\"[email protected]\";\r\n\t\t$From=\"Ifip Institut du Porc<[email protected]>\";\r\n\t\t$Bcc=\"\";\r\n\t\t$To=$recipients;\r\n\t\t$ReturnPath=$From;\r\n\t\t$ReplyTo=$From;\r\n\t\t$Subject=\"Copie IFIP/ commande n°\".$numcommande.\" - paiement reçu\";\r\n\t\t\t\r\n\t\tEnvoiMail($recipients,$From,$Bcc,$To,$ReturnPath,$ReplyTo,$Subject,$corps);\t\t\r\n\t\t\t\r\n\t\treturn true;\r\n }\r\n}", "title": "" }, { "docid": "16d7c4a14b4bf6ba35b764d750c01b79", "score": "0.5399173", "text": "public function getDadosEnderecoCadastrados(){\n\t\t$sql = \"SELECT * FROM dados_endereco\";\n\t\t/**\n\t\t * Faça essa query no banco de dados\n\t\t */\n\t\t$sql = $this->db->query($sql);\n\t\tif($sql->rowCount() > 0){\n\t\t\treturn $sql->fetchAll();\n\t\t} else {\n\t\t\treturn array();\n\t\t}\n\t}", "title": "" }, { "docid": "8ed050c8314b4ce06fd16d707eaf2f1c", "score": "0.5390441", "text": "function ComprobarDNI ($Dniphp, &$correcto){\n\t\t$res = mysql_query ('SELECT DNI FROM cliente');\n\t\t$correcto = false;\n\t\twhile($row = mysql_fetch_assoc($res)){\n\t\t\tif ($Dniphp == $row['DNI']){\n\t\t\t\t$correcto = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5ec07ffbadc8c5d901d6922c247e4cbe", "score": "0.535172", "text": "function check_demande($arg_email, $arg_chemin_fichier, $arg_date_retour, $arg_num_copie, $arg_couleur, $arg_finition, $arg_recto_verso){\n\t\t\n\t\t$bdd = connexion_sql();\n \n\t\t$sql = \"SELECT id_request FROM REQUESTS WHERE user_email='\". $arg_email .\"' AND path_file='\". $arg_chemin_fichier .\"' AND delivery_date='\". $arg_date_retour .\"' AND num_copy='\". $arg_num_copie .\"' AND couleur='\". $arg_couleur .\"' AND finition='\". $arg_finition .\"' AND recto_verso='\". $arg_recto_verso .\"'\";\n\n\t\t$reponse = $bdd->query($sql);\n\t\t$donnees = $reponse->fetch();\n\n\t\t$requete = $donnees['id_request'];\n\n\t\tif ($requete == ''){\n\t\t\treturn TRUE;\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "3f7c624db9b5b7ff1d0f190103022f57", "score": "0.523389", "text": "function cadastrarCliente($Cliente,$link){\n\t\t\t $query = \"INSERT INTO `Clientes` (`nome`, `cpf`, `residencial`, `celular`, `email`, `cep`, `logradouro`, `bairro`, `cidade`, `complemento`, `numero`, `estado`) VALUES \n\t\t\t(\".$Cliente->getAtributos().\");\";\n\t\t\t\n\t\t\t\n\t\t\t$verifica=true;\n\t\n\t\t\tif(!mysqli_query($link,$query)){\n\t\t\t\t//die (\"nao foi possivel salvar\".mysqli_error($link));\n\t\t\t\t$verifica=false;\n\t\t\t\treturn $verifica;\n\t\t\t}\n\t\t\n\t\t\treturn $verifica;\n\t\t}", "title": "" }, { "docid": "45c66dfe1b24f7cb3b6a1c52dabccaaf", "score": "0.52216387", "text": "function getCep($cep){\n $type_request = \"GET\";\n $params = 'cep='.$cep;\n $uri = \"https://www.cepaberto.com/api/v3/cep?\". $params;\n\n \n if (!empty($params)){\n return $this->request($uri, $type_request);\n $json_str = $this->request($uri, $type_request);\n $obj = $json_decode($json_str);\n echo $obj->cep;\n \n }\n }", "title": "" }, { "docid": "4471f94c54772efb9e5355035cbfda85", "score": "0.52143854", "text": "function escolherIP() {\n limparTela();\n echo(\"Servidor em localhost ou remoto? \");\n echo(\"\\nLocalhost - 1\");\n echo(\"\\nRemoto - 2\");\n echo(\"\\nSair - 3\\n\");\n $opcao = readline(\": \");\n if($opcao == 1) {\n return(\"localhost\");\n } else if ($opcao == 2){\n $ip = readline(\"Insira o IP: \");\n return $ip;\n }\n}", "title": "" }, { "docid": "59c5e0faf032653bf1b58e337c0a4876", "score": "0.52101624", "text": "public function findAddressByCEP($pcep) {\n $url = \"http://apps.widenet.com.br/busca-cep/api/cep/\" . $pcep . \".json\";\n \n echo $url;\n return file_get_contents($url);\n }", "title": "" }, { "docid": "5787b6c6efbbc66b5f12e96674a81d2a", "score": "0.5208783", "text": "static function verificaTel($param){\n $sql = \"SELECT * FROM pessoas WHERE pessoas_tel = ?\";\n\n try{\n return $query = Database::validarParam($sql,$param); //retorna se existe ou nao o valor\n }catch(Exception $e){\n return die(\"Erro: \". $e->getMessage);\n }\n }", "title": "" }, { "docid": "94f7f96f48b34e8f56123a387f95ce4a", "score": "0.5205001", "text": "public function cep($cep = null) {\n try{\n return response()->json(['code' => 0, 'endereco' => CepGratis::consulta($cep)]);\n }catch(Exception $e){\n return response()->json(['code' => 99, 'message' => $e->getMessage()]);\n }\n }", "title": "" }, { "docid": "80d008e253fd994311f91e41888624fd", "score": "0.5198962", "text": "function tipoCliente() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n\r\n $w_chave = $_REQUEST[\"w_chave\"];\r\n $w_troca = $_REQUEST[\"w_troca\"];\r\n\r\n if ($w_troca > '') { // Se for recarga da página\r\n $w_tipo = $_REQUEST[\"w_tipo\"];\r\n $w_nome = $_REQUEST[\"w_nome\"];\r\n }\r\n elseif ($O == 'L') {\r\n //Recupera todos os registros para a listagem\r\n $SQL = \"select sq_tipo_cliente as chave, ds_tipo_cliente, ds_registro, tipo, \" . $crlf .\r\n \" case tipo when '1' then 'Secretaria' \" . $crlf .\r\n \" when '2' then 'Regional' \" . $crlf .\r\n \" when '3' then 'Escola' \" . $crlf .\r\n \" end nm_tipo \" . $crlf .\r\n \" from sbpi.Tipo_Cliente \" . $crlf;\r\n $RS = db_exec :: getInstanceOf($dbms, $SQL, & $numRows);\r\n }\r\n elseif (strpos(\"AEV\", $O) !== false && $w_troca == '') {\r\n //Recupera os dados do endereço informado\r\n $SQL = \"select sq_tipo_cliente as chave, ds_tipo_cliente, ds_registro, tipo, \" . $crlf .\r\n \" case tipo when '1' then 'Secretaria' \" . $crlf .\r\n \" when '2' then 'Regional' \" . $crlf .\r\n \" when '3' then 'Escola' \" . $crlf .\r\n \" end nm_tipo \" . $crlf .\r\n \" from sbpi.Tipo_Cliente \" . $crlf .\r\n \" where sq_tipo_Cliente = \" . $w_chave;\r\n $RS = db_exec :: getInstanceOf($dbms, $SQL, & $numRows);\r\n foreach ($RS as $row) {\r\n $RS = $row;\r\n break;\r\n }\r\n $w_tipo = f($RS, \"tipo\");\r\n $w_nome = f($RS, \"ds_tipo_cliente\");\r\n }\r\n\r\n Cabecalho();\r\n ShowHTML('<HEAD>');\r\n ShowHTML('<script type=\"text/javascript\" src=\"js/modal/js/ajax.js\"></script>');\r\n ShowHTML('<script type=\"text/javascript\" src=\"js/modal/js/ajax-dynamic-content.js\"></script> ');\r\n ShowHTML('<script type=\"text/javascript\" src=\"js/modal/js/modal-message.js\"></script> ');\r\n ShowHTML('<link rel=\"stylesheet\" href=\"js/modal/css/modal-message.css\" type=\"text/css\" media=\"screen\" />');\r\n ShowHTML('<script language=\"javascript\" type=\"text/javascript\" src=\"js/jquery.js\"></script>');\r\n ShowHTML('<script language=\"javascript\" type=\"text/javascript\" src=\"js/funcoes.js\"></script>');\r\n if (strpos(\"IAEP\", $O) !== false) {\r\n ScriptOpen(\"JavaScript\");\r\n CheckBranco();\r\n FormataData();\r\n ValidateOpen(\"Validacao\");\r\n if (strpos(\"IA\", $O) !== false) {\r\n //Validate (\"w_dt_mensagem\" , \"Data\" , \"DATA\" , \"1\" , \"10\" , \"10\" , \"1\" , \"1\");\r\n Validate(\"w_nome\", \"Nome\", \"\", \"1\", \"2\", \"50\", \"1\", \"1\");\r\n }\r\n ShowHTML(' theForm.Botao[0].disabled=true;');\r\n ShowHTML(' theForm.Botao[1].disabled=true;');\r\n ValidateClose();\r\n ScriptClose();\r\n }\r\n ShowHTML('</HEAD>');\r\n if ($w_troca > \"\") {\r\n BodyOpen('onLoad=\"document.Form.' . $w_troca . '.focus()\";');\r\n }\r\n elseif ($O == \"I\" or $O == \"A\") {\r\n BodyOpen(\"onLoad='document.Form.w_nome.focus()';\");\r\n } else {\r\n BodyOpen(\"onLoad='document.focus()';\");\r\n }\r\n ShowHTML('<B><FONT COLOR=\"#000000\">Cadastro de tipos de Instituições </FONT></B>');\r\n ShowHTML('<HR>');\r\n ShowHTML('<div align=center><center>');\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"95%\">');\r\n If ($O == 'L') {\r\n //Exibe a quantidade de registros apresentados na listagem e o cabeçalho da tabela de listagem\r\n ShowHTML('<tr><td><font size=\"2\"><a accesskey=\"I\" class=\"SS\" href=\"' . $dir . $w_pagina . $par . $w_ew . \"&R=\" . $w_pagina . $par . \"&O=I&CL=\" . $CL . '\"><u>I</u>ncluir</a>&nbsp;');\r\n ShowHTML(' <td align=\"right\"><b>Registros existentes: ' . count($RS));\r\n ShowHTML('<tr><td align=\"center\" colspan=3>');\r\n ShowHTML(' <TABLE WIDTH=\"100%\" bgcolor=\"' . $conTableBgColor . '\" BORDER=\"' . $conTableBorder . '\" CELLSPACING=\"' . $conTableCellSpacing . '\" CELLPADDING=\"' . $conTableCellPadding . '\" BorderColorDark=\"' . $conTableBorderColorDark . '\" BorderColorLight=\"' . $conTableBorderColorLight . '\">');\r\n ShowHTML(' <tr bgcolor=\"' . $conTrBgColor . '\" align=\"center\">');\r\n ShowHTML(' <td><b>Descrição</font></td>');\r\n ShowHTML(' <td><b>Tipo</font></td>');\r\n ShowHTML(' <td><b>Operações</font></td>');\r\n ShowHTML(' </tr>');\r\n if (count($RS) <= 0) {\r\n // Se não foram selecionados registros, exibe mensagem\r\n ShowHTML(' <tr bgcolor=\"' . $conTrBgColor . '\"><td colspan=5 align=\"center\"><b>Não foram encontrados registros.</b></td></tr>');\r\n } else {\r\n foreach ($RS as $row) {\r\n $w_cor = ($w_cor == $conTrBgColor || $w_cor == '') ? $w_cor = $conTrAlternateBgColor : $w_cor = $conTrBgColor;\r\n ShowHTML(' <tr bgcolor=\"' . $w_cor . '\" valign=\"top\">');\r\n ShowHTML(' <td>' . f($row, \"ds_tipo_cliente\") . '</td>');\r\n switch (f($row, \"tipo\")) {\r\n case 1 :\r\n ShowHTML(' <td align=\"center\">Secretaria</font></td>');\r\n break;\r\n case 2 :\r\n ShowHTML(' <td align=\"center\">Regional</font></td>');\r\n break;\r\n case 3 :\r\n ShowHTML(' <td align=\"center\">Escola Pública</font></td>');\r\n break;\r\n case 4 :\r\n ShowHTML(' <td align=\"center\">Escola Privada</font></td>');\r\n break;\r\n default :\r\n ShowHTML(' <td>---</td>');\r\n break;\r\n }\r\n ShowHTML(' <td align=\"top\" nowrap>');\r\n ShowHTML(' <A class=\"HL\" HREF=\"' . $w_dir . $w_pagina . $par . '&R=' . $w_pagina . $par . '&O=A&w_chave=' . f($row, 'chave') . '\">Alterar</A>&nbsp');\r\n ShowHTML(' <A class=\"HL\" HREF=\"' . $w_dir . $w_pagina . $par . '&R=' . $w_pagina . $par . '&O=E&w_chave=' . f($row, 'chave') . '\" onClick=\"return confirm(\\'Confirma a exclusão do registro?\\');\">Excluir</A>&nbsp');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n }\r\n }\r\n ShowHTML(' </center>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </td>');\r\n ShowHTML('</tr>');\r\n }\r\n elseif (strpos(\"IAEV\", $O) !== false) {\r\n if (strpos(\"EV\", $O) !== false) {\r\n $w_Disabled = ' DISABLED ';\r\n }\r\n AbreForm('Form', $w_dir . $w_pagina . 'Grava', 'POST', 'return(Validacao(this));', null);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"SG\" value=\"TIPOCLIENTE\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"CL\" value=\"' . $CL . '\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"' . $w_chave . '\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_cliente\" value=\"' . $_SESSION[\"CL\"] . '\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"O\" value=\"' . $O . '\">');\r\n\r\n ShowHTML('<tr bgcolor=\"' . '#EFEFEF' . '\"><td align=\"center\">');\r\n ShowHTML(' <table width=\"95%\" border=\"0\">');\r\n ShowHTML(' <tr><td valign=\"\"top\"\" colspan=\"\"3\"\"><table border=0 width=\"\"100%\"\" cellspacing=0>');\r\n ShowHTML(' <tr valign=\"top\"><td valign=\"top\"><b>D<u>e</u>scrição:</b><br><input ' . $w_Disabled . ' accesskey=\"E\" type=\"text\" name=\"w_nome\" class=\"STI\" SIZE=\"60\" MAXLENGTH=\"60\" VALUE=\"' . $w_nome . '\" ></td></tr>');\r\n ShowHTML(' <TD><font size=\"2\" CLASS=\"BTM\"><b>Tipo:</b> ');\r\n if ($w_tipo == 1) {\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"1\" checked> Secretaria ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"2\"> Regional ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"3\"> Escola Pública ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"4\"> Escola Privada ');\r\n }\r\n elseif ($w_tipo == 2) {\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"1\"> Secretaria ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"2\" checked> Regional ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"3\"> Escola Pública ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"4\"> Escola Privada ');\r\n }\r\n elseif ($w_tipo == 3) {\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"1\"> Secretaria ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"2\"> Regional ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"3\" checked> Escola Pública ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"4\"> Escola Privada ');\r\n }\r\n elseif ($w_tipo == 4) {\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"1\"> Secretaria ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"2\"> Regional ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"3\"> Escola Pública ');\r\n ShowHTML(' <br><input ' . $w_Disabled . ' type=\"Radio\" name=\"w_tipo\" value=\"4\" checked> Escola Privada ');\r\n } else {\r\n ShowHTML(' <br><input type=\"Radio\" name=\"w_tipo\" value=\"1\"> Secretaria de Ensino do DF ');\r\n ShowHTML(' <br><input type=\"Radio\" name=\"w_tipo\" value=\"2\"> Rede de Ensino ');\r\n ShowHTML(' <br><input type=\"Radio\" name=\"w_tipo\" value=\"3\" checked> Escola Pública');\r\n ShowHTML(' <br><input type=\"Radio\" name=\"w_tipo\" value=\"4\"> Escola Privada ');\r\n }\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr>');\r\n ShowHTML(' <tr><td align=\"\"center\"\" colspan=4><hr>');\r\n\r\n if ($O == 'E') {\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Excluir\">');\r\n } else {\r\n if ($O == \"I\") {\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Incluir\">');\r\n } else {\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Atualizar\">');\r\n }\r\n }\r\n ShowHTML(' <input class=\"STB\" type=\"button\" onClick=\"location.href=\\'' . $dir . $w_pagina . $par . $w_ew . \"&CL=\" . $CL . '&O=L\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen(\"JavaScript\");\r\n ShowHTML(' alert(\\'Opção não disponível\\');');\r\n //ShowHTML (' history.back(1);');\r\n ScriptClose();\r\n }\r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Rodape();\r\n\r\n }", "title": "" }, { "docid": "5606d0678306a4567b4c53cd60bf741a", "score": "0.5192026", "text": "public function editar(Juridico $juridico, Endereco $endereco, Pagina $pagina)\n\t\t{\n\t\t\t\n\t\t\t$sql = \"CALL SP_EDITAR_JURIDICO(:idjuridico, :descricao, :fixo, :fone, :email, :responsavel, :foto, :nomefantasia, :cnpj, :razaosocial, :status_, :area, :endereco, :cep, :logradouro, :numero, :bairro, :cidade, :estado, :complemento, :pagina, :site, :google, :twitter, :pinterest, :facebook, :instagram)\";\n\n\t\t\t$consulta = Conexao::getCon()->prepare($sql);\n\n\t\t\t$consulta->bindValue(':idjuridico',$juridico->getIdjuridico()); \n\t\t\t$consulta->bindValue(':cnpj',$juridico->getCnpj()); \n\t\t\t$consulta->bindValue(':descricao',$juridico->getDescricao()); \n\t\t\t$consulta->bindValue(':email',$juridico->getEmail()); \n\t\t\t$consulta->bindValue(':fone',$juridico->getFone()); \n\t\t\t$consulta->bindValue(':fixo',$juridico->getFixo()); \n\t\t\t$consulta->bindValue(':status_',$juridico->getStatus_()); \n\t\t\t$consulta->bindValue(':razaosocial',$juridico->getRazaosocial()); \n\t\t\t$consulta->bindValue(':nomefantasia',$juridico->getNomefantasia()); \n\t\t\t$consulta->bindValue(':responsavel',$juridico->getResponsavel()); \n\t\t\t$consulta->bindValue(':foto',$juridico->getFoto()); \n\t\t\t$consulta->bindValue(':pagina',$juridico->getPagina()); \n\t\t\t$consulta->bindValue(':area',$juridico->getArea()); \n\n\t\t\t$consulta->bindValue(':endereco',$juridico->getEndereco());\n\t\t\t$consulta->bindValue(':cep',$endereco->getCep()); \n\t\t\t$consulta->bindValue(':logradouro',$endereco->getLogradouro()); \n\t\t\t$consulta->bindValue(':cidade',$endereco->getCidade()); \n\t\t\t$consulta->bindValue(':bairro',$endereco->getBairro()); \n\t\t\t$consulta->bindValue(':estado',$endereco->getEstado()); \n\t\t\t$consulta->bindValue(':numero',$endereco->getNumero()); \n\t\t\t$consulta->bindValue(':complemento',$endereco->getComplemento()); \n\n\t\t\t$consulta->bindValue(':facebook',$pagina->getFacebook()); \n\t\t\t$consulta->bindValue(':instagram',$pagina->getInstagram()); \n\t\t\t$consulta->bindValue(':pinterest',$pagina->getPinterest()); \n\t\t\t$consulta->bindValue(':twitter',$pagina->getTwitter()); \n\t\t\t$consulta->bindValue(':google',$pagina->getGoogle()); \n\t\t\t$consulta->bindValue(':site',$pagina->getSite());\n\t\t\t\n\t\t\t$consulta->execute();\n\n\t \t$result = $consulta->fetch(PDO::FETCH_ASSOC);\n\t \t\n\t return $result[\"idjuridico\"]; \n\t\t}", "title": "" }, { "docid": "94d13deb302e9053c226ddfbc28e76ad", "score": "0.5184281", "text": "public function checkcliente($IDEmpresa){\n $sql = $this->db->select('*')->where(\"IDEmpresa='$IDEmpresa'\")->get('tb_datos_pago_clientes');\n if($sql->num_rows()===0){\n return false;\n }else{\n return $sql->row_array();\n }\n \n }", "title": "" }, { "docid": "8f0df9a60fd1586c6a87c4b80a206191", "score": "0.5181708", "text": "public function controlloInfedeli(){\n //NB!! Questo metodo mi DOVREBBE ritornare una lista di clienti, la chiamata al DB probabilmente ritorna la lista di prenotazioni\n $clientePrenotazione = DBFacade::getIstance()->getFedeltaUltimaPrenotazione();\n foreach ($clientePrenotazione as $cliente) {\n $anni = $this->anniPassati($cliente[1]);\n if($anni == 3) {\n $this->registroClienti->annullaIscrizione($cliente[0]);\n }\n else if($anni == 2){\n $this->registroClienti->setClienteInfedele($cliente[0]);\n }\n }\n }", "title": "" }, { "docid": "46c5f13c2c46ffe9b846063bde80f9f4", "score": "0.51627904", "text": "public function ValidaCadastroCondominio($bloco, $nivel, $apartamento)\n {\n //não aceita se vinher vazio ou com valor zer\n if ($bloco == \"00\" || $nivel == '00' || $apartamento == '00') {\n echo \"<script>alert('Selecione Um Bloco');window.location='../nice-html/ltr/Cadastro.php'; </script>\";\n exit();\n }\n\n $pdo = parent::get_instace();\n // slect para validade se ja existe cadastro\n $sql01 = \"SELECT * FROM tb_estrutura_condominio WHERE bloco=:bloco and nivel=:nivel and apartamento=:apartamento\";\n $sql01 = $pdo->prepare($sql01);\n $sql01->bindValue(\":bloco\", $bloco);\n $sql01->bindValue(\":nivel\", $nivel);\n $sql01->bindValue(\":apartamento\", $apartamento);\n $sql01->execute();\n if ($sql01->rowCount() > 0) {\n echo \"<script>alert('Cadastro ja existe');window.location='../nice-html/ltr/Cadastro.php'; </script>\";\n exit();\n } else {\n //inset no banco se todas as validaçoes de certo.\n $sql = \"INSERT INTO tb_estrutura_condominio (bloco,nivel,apartamento) VALUES (:bloco,:nivel,:apartamento)\";\n $sql = $pdo->prepare($sql);\n $sql->bindValue(\":bloco\", $bloco);\n $sql->bindValue(\":nivel\", $nivel);\n $sql->bindValue(\":apartamento\", $apartamento);\n $sql->execute();\n if ($sql->rowCount()) {\n\n echo \"<script>alert('Cadastrado Com sucesso');window.location='../nice-html/ltr/Cadastro.php'; </script>\";\n } else {\n echo \"<script>alert('Nao cadastrado ');window.location='../nice-html/ltr/Cadastro.php'; </script>\";\n }\n }\n }", "title": "" }, { "docid": "89194dfb6c389e0d22223ae51ed6c7d1", "score": "0.5112587", "text": "function buscarCliente($cliente, $link){\n\n\t \t$query = \"SELECT * FROM `Clientes` WHERE `nome` LIKE '\".$cliente->getNome().\"%'\";\n\t \t\n\t\t$r = mysqli_query($link, $query);\n\t\tif (!$r){\n\t\t\techo \"Erro do banco de dados, não foi possível consultar o banco de dados\\n\";\n\t\t\techo 'Erro MySQL: ' . mysqli_error();\n\t\t\t\texit;\n\t\t\t}\n\t\treturn $r;\n\n\t }", "title": "" }, { "docid": "5360dae8d3a68bb254d4cf6619793675", "score": "0.5110346", "text": "function PegaCodigoCnaeEmpresa($empresaId) {\n\t\n\t// Verifica se é construtora.\n\t$construtora = 0;\n\n\t$sql = \"SELECT * FROM dados_da_empresa_codigos ec \n\t\t\t\tINNER JOIN cnae c ON ec.cnae = c.cnae \n\t\t\t\tWHERE ec.id = '\".$empresaId.\"' \n\t\t\t\tAND (c.cnae LIKE '41%' OR c.cnae LIKE '42%' OR c.cnae LIKE '43%');\";\n\n\t$lista_cnae = mysql_query($sql) or die (mysql_error());\n\n\tif(mysql_num_rows($lista_cnae) > 0){\n\t\t$construtora = 1;\n\t}\n\t\n\treturn $construtora;\n}", "title": "" }, { "docid": "5f5956b5d53c03ccccce84ec3c8183ea", "score": "0.5097837", "text": "public function verificaArgConteudo(){\r\n\t //Verifica o número do curso para recuperar os dados\r\n\t if(empty($_REQUEST['conteudo'])){\r\n\t\t header(\"Location: index.php?ctrl=dashboardLicao&ac=conteudo&modulo=\".$_REQUEST['modulo'].\"&licao=\".$_REQUEST['licao'].\"&curso=\".$_REQUEST['curso'].\"&sucesso=error\");\t\t\r\n\t\t break;\r\n\t }\r\n\t}", "title": "" }, { "docid": "7cdf62f11c6463fcf66c18055d337206", "score": "0.5066853", "text": "public function verifBancoDreamIp($request) {\n $ip = $request->ip;\n $query=\"SELECT `ip` FROM `dream_pbx` WHERE `ip` = '$ip'\";\n $result = $this->EjecutarTelefonia($query);\n $post = array();\n while ($row = mysqli_fetch_object($result)) {\n\n $post[] = array('ip'=>$row->ip );\n\n if ($post > 0) {\n echo TRUE;\n }else{\n echo FALSE;\n }\n }\n }", "title": "" }, { "docid": "d862e4778857a73ad273c74870e3531c", "score": "0.50496644", "text": "public function getEndereco()\n {\n return $this->hasOne(Endereco::className(), ['id' => 'endereco_id']);\n }", "title": "" }, { "docid": "e57a6bb815d7836ecb23c8420b3a310b", "score": "0.50495476", "text": "function insertar_incidencia_nomina($cod_nomina,$cedula,$cod_incidencia,$monto,$tipo,$descripcion,$tipo_nomina,$link)\r\n\t {\r\n\t $monto=round($monto*100)/100; \r\n\t $excluidas=array(\"4444\",\"5555\");//incidencias excluidas para la creacion de la nomina ej: sueldo integral\r\n\t if (in_array($cod_incidencia,$excluidas)==false)//si no esta en las excluidas\r\n\t \t{\r\n\t \tif ($tipo=='Debito')\r\n\t \t\t{\r\n\t \t\t$monto=-1*$monto;\r\n\t \t\t}\r\n\t \tif (mysql_query(\"insert into nomina(cod,cedula,cod_incidencia,monto_incidencia,tipo,descripcion,tipo_nomina) values ('$cod_nomina','$cedula','$cod_incidencia','$monto','$tipo','$descripcion','$tipo_nomina')\",$link)==true)\r\n\t {\r\n\t return true;\r\n\t }\r\n\t else \r\n\t {\r\n\t \treturn false;\r\n\t \t }\r\n\t } \r\n\t return true;//si esta en excluidas igual devuelve true \t \r\n\t }", "title": "" }, { "docid": "3a3f44fae945b84dfa4aa6f33379f203", "score": "0.5037358", "text": "function comprobarRecetaUrl($url) {\r\n $query = 'SELECT CODRE FROM RECETA WHERE URL = \"' . $url . '\";';\r\n $resultado = $this->selectQuery($query);\r\n return (count($resultado) > 0) ? true : false;\r\n }", "title": "" }, { "docid": "0a1e70d1689edba62b9d632b182cebfc", "score": "0.50306606", "text": "public function verificaCodigos(){\n //se recibe desde recibeCodigo.php\n $CodigoUsuario= $_POST[\"ingresar\"];\n $CorreoUsuario= $_POST[\"correo\"];\n \n // EL numero aleatorio es de tipo string se debe cambiar a entero\n gettype($CodigoUsuario) . \"<br>\";\n settype($CodigoUsuario,\"integer\");\n gettype($CodigoUsuario) . \"<br>\";\n \n echo \"Código usuario= \" . $CodigoUsuario . \"<br>\";\n echo \"Córreo usuario= \" . $CorreoUsuario . \"<br>\";\n\n //Se CONSULTA el código enviado por el usuario con el código que hay en la BD\n $Aleatorio= $this->obtenerRegistros->consultarCodigo($CodigoUsuario, $CorreoUsuario);\n // print_r($Aleatorio);\n // echo $Aleatorio;\n // echo \"<br>\"; \n\n //Si el codigo que envia el usuario es diferente al del sistema \n if($Aleatorio == 0){\n echo \"El código recibido no coincide con el que le hemos enviado\"; \n exit(); \n }\n else{//Si los códigos coinciden se permite hacer el cambio de contraseña\n //Se ACTUALIZA en la BD que el codigo ha sido usado y verificado\n $this->obtenerRegistros->actualizarEst_Cod($CodigoUsuario);\n \n //Se redirecciona, la función redireccionar se encuentra en url_helper.php\n redireccionar(\"/CambiarClave_C/index/$CorreoUsuario\"); \n }\n }", "title": "" }, { "docid": "d23bb15b564720897ecbc94c6928f7bd", "score": "0.50221807", "text": "public static function curso(string $email, string $codigo): bool{\n $historial = self::findCursada($email,$codigo);\n\n if(is_null($historial))\n return false;\n else\n return true; \n }", "title": "" }, { "docid": "77ce630209244242d93988f2a350bebb", "score": "0.50156534", "text": "function check_pdispo()\n{\n\trequire \"inc/config.php\";\n\t$chercher = $bdd->query(\"SELECT * FROM placeoccupee WHERE statut_place = '0'\");\n\t$chercher->execute();\n\t\n\tif (!($cb = $chercher->fetch())) { \n\t\t//Aucun de libre\n\t\treturn 0;\n\t}\n\telse{\n\t\t//echo \"Place libre\";\n\t\treturn 1;\n\t}\n\n}", "title": "" }, { "docid": "98ec891836a824092eab1b88702b179b", "score": "0.5010193", "text": "function buscarClienteFormulario($cliente,$link){\n\t\t$query = \"SELECT * FROM `Clientes` WHERE cpf = '\".$cliente->getCpf().\"'\";\n\t\t$r = mysqli_query($link, $query);\n\t\treturn $r;\n\n\t}", "title": "" }, { "docid": "f712fe87377b9a66ef9aa826a8ceda88", "score": "0.50099814", "text": "function telefoneExiste($conn,$idcliente,$tipo){\n $sql = \"SELECT * FROM `telefone_cliente` AS t INNER JOIN `cliente` AS c WHERE t.`ID_Cliente` ='\".$idcliente.\"'\n AND t.`ID_Cliente` = c.`ID_Cliente` AND `ID_TipoTelefone` = '\".$tipo.\"'\";\n $resultado = $conn->query($sql);\n return $resultado;\n}", "title": "" }, { "docid": "1d90e74299c893b3c4a80100b93dabff", "score": "0.5004522", "text": "private function verificaTelefone() {\n\n if (strlen($this->valor) > 13 ) {\n return $this->verificaTelefone_sp2();\n } else {\n return $this->verificaTelefone2();\n }\n }", "title": "" }, { "docid": "6ae15fe4d5e8c98af7b0df7d6899f975", "score": "0.50008583", "text": "function verificarInscrito($retorno) {\n $inscrito=$this->validacion->validarEspacioInscrito($_REQUEST);\n if($inscrito!='ok' && is_array($inscrito))\n {\n $carrera=$this->consultarNombreCarrera($inscrito[0]['PROYECTO']);\n $retorno['mensaje']=\"El espacio académico ya esta inscrito en el grupo \".$inscrito[0]['GRUPO'].\" de \".$carrera.\" para el periodo actual. No se puede inscribir de nuevo.\";\n $this->enlaceNoAdicion($retorno);\n }\n }", "title": "" }, { "docid": "eda99f9aefad3de53e003e38dd4de144", "score": "0.49979493", "text": "public function insertBancoFreeIp($request) {\n $nombre = $request->nombre;\n $ip = $request->ip;\n $query=\"INSERT INTO `free_pbx`(`nombre`, `ip`) VALUES ('$nombre', '$ip')\";\n\n $result = $this->EjecutarTelefonia($query);\n\n if($result){\n echo TRUE;\n }else{\n echo false;\n } \n }", "title": "" }, { "docid": "1bc3fea107f3e1b651b278a3a1a326da", "score": "0.49669385", "text": "public function cidadesDenuncia($email) {\n $sql = $this->select(\"cidades\", \"*\");\n while($cidade = mysqli_fetch_array($sql)){\n \n //buscando as denuncias da cidade\n $sqlDenuncia = $this->select(\"denuncia\", \"*\", \"cep = '\".$cidade['cep'].\"' AND email_cid = '$email'\");\n \n if(mysqli_num_rows($sqlDenuncia) > 0){\n //mostra o botão\n echo '<li>';\n echo '<a href=\"javascript:void(0)\" id=\"btnCidade\" lang=\"'.$cidade['nome'].'\" cep=\"'.$cidade['cep'].'\">'.$cidade['nome'].'</a>';\n echo '</li>';\n }\n }\n \n }", "title": "" }, { "docid": "1a31d3bda1b24fa54736a13e139ada8c", "score": "0.49615893", "text": "public function registrar_cliente($name, $pw_reg, $email, $tipo, $preg, $resp_reg, $dir_reg, $pais, $cp)\n\t{\n\t\t$query = \"INSERT INTO usuarios (usr_name, usr_pw, usr_email, usr_tipo_cuenta, usr_preg, usr_resp, usr_dir, usr_pais, usr_cod_postal) VALUES (\\\"\".$name.\"\\\",\\\"\".$pw_reg.\"\\\",\\\"\".$email.\"\\\",\\\"\".$tipo.\"\\\",\\\"\".$preg.\"\\\",\\\"\".$resp_reg.\"\\\",\\\"\".$dir_reg.\"\\\",\\\"\".$pais.\"\\\",\".$cp.\");\";\n $retorno = true;\n\n try {\n $retorno = $this->conectorMySQL->insertQuery($query);\n }\n catch(Exception $e) {\n $retorno = false;\n }\n\n return $retorno;\n\t}", "title": "" }, { "docid": "f762c62c4051bcf0fe18a9377cf3f379", "score": "0.49488088", "text": "function ver_contactos_proveedor()\n {\n\t // Función que devuelve los contactos del proveedor selecionado en EDITAR \n $id = $_GET['id'];\n\t \n\t $query04 = \"SELECT * FROM proveedores_clientes_contactos WHERE id_proveedor_cliente='\".$id.\"' AND active_proveedor=1\";\n $query04 = mysql_query($query04);\n\t $num_rows_query04 = mysql_num_rows($query04);\n if ( $num_rows_query04 > 0 ) {\n\t\t // Guardo estos valores en un array para devolverlos \n\t\t for ( $i=0; $i < $num_rows_query04; $i++ )\n\t\t {\n\t\t $registro_contactos[$i] = mysql_fetch_assoc($query04); \n\t\t }\n\t\t \n\t\t return $registro_contactos;\n\t\t \n\t } else { \n\t \n\t return \"null\";\n\t }\n \n }", "title": "" }, { "docid": "61558a26bacdf198eb2d2bfd40b9b23d", "score": "0.49452975", "text": "public static function aprobo(string $email, string $codigo): bool{\n $historial = self::findFinal($email,$codigo);\n\n if(is_null($historial))\n return false;\n else\n return true; \n }", "title": "" }, { "docid": "58049a4a254053509b597dcbe06f5b21", "score": "0.4944033", "text": "protected function existe_telefono($tabla,$campo,$tel){\r\n\t\t$this->where($campo,$tel);\r\n\t\tif($salida = $this->getOne($tabla)){\r\n\t\t\t$this->error = $this->errores[14];\r\n\t\t}\t\r\n\t}", "title": "" }, { "docid": "1f3a7812e7ebdaba51d30ab4540b078c", "score": "0.49326432", "text": "public static function checkReferringDomain() \n\t{ \n\t\t$ref = $_SERVER['HTTP_REFERER'];\n\t\t$ref_arr = explode(\"/\", $ref);\n\t\t$dom_arr = explode(\"/\", self::$abso);\n\t\tif ($ref_arr[2] != $dom_arr[2]) {\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "38965372b34709c847a39c4ef3c12ec5", "score": "0.4919796", "text": "public function geraLink(){\n\t\t//gera numero unico\n\t\t//salva o novo usuario no banco com respectivo ID de indicacao\n\t\t//monta link de indicacao: www.oma.inf.br + ID unico\n\t\t//configurar opcoes de envio de email\n\t\t//enviar email para o usuario com o link de indicacao\n\t\t//redireciona para pagina de agradecimento\n\t}", "title": "" }, { "docid": "19d9049c8160bd05df6e5f3eec7cefc6", "score": "0.4919094", "text": "private function queryDepositAddress( $coin ) {\r\n\r\n $error = null;\r\n for ( $i = 0; $i < 3; $i++ ) {\r\n try {\r\n //\r\n $data = $this->queryAPI( 'account/getdepositaddress', ['currency' => $coin ] );\r\n return $data[ 'Address' ];\r\n //\r\n }\r\n catch ( Exception $ex ) {\r\n // Ignore error messages here...\r\n // (API call fails if address is still generating...)\r\n $error = $ex;\r\n sleep( 30 );\r\n }\r\n }\r\n throw $error;\r\n\r\n }", "title": "" }, { "docid": "04afe11e443a5888748a9cc35ad0b7e2", "score": "0.49166244", "text": "function cpfExiste($conn,$cpf){\n $sql = \"SELECT * FROM cliente WHERE `CPF_Cliente` ='\".$cpf.\"'\";\n $resultado = $conn->query($sql);\n return $resultado;\n}", "title": "" }, { "docid": "f94b4dc9b15e936e888fea7187a3646f", "score": "0.49108568", "text": "public function localizarcodigoencomenda($cod)\r\n {\r\n try{\r\n $pdo = Conectar();\r\n $comando = $pdo->prepare(\"select * from encomenda where cod_encom = :cod \");\r\n $comando->bindValue(\":cod\",$cod);\r\n $comando->execute();\r\n Desconectar($pdo);\r\n\r\n\r\n }\r\n catch(Exception $erro)\r\n {\r\n Desconectar($pdo);\r\n }\r\n }", "title": "" }, { "docid": "9f5f8c959b7c7e60dd6c417f14fc8094", "score": "0.49028772", "text": "function buscaPedido($cod)\n {\n $busca = $this->con->query(\"SELECT * FROM pedidos WHERE cdpedi = '{$cod}'\");\n\n if (count($busca) > 0) {\n\n return $busca->fetchAll(PDO::FETCH_ASSOC);\n }\n\n return false;\n }", "title": "" }, { "docid": "7b0948d50700286b454593bf3147b6f0", "score": "0.4893296", "text": "public function gerarRelatorioCovidTxt($tipoServidor, $mes, $ano)\n {\n $andQuery = \"\";\n if($tipoServidor == 'membros'){\n //membros\n $andQuery = \" AND V74_COD_CARGO IN ('11002','410004','414001','410001','410002','600001','600002','408001','408002','77777000','414017','411001') \";\n }else{\n //servidores administrativos\n $andQuery = \" AND V74_COD_CARGO NOT IN ('11002','410004','414001','410001','410002','600001','600002','408001','408002','77777000','414017','411001') \";\n }\n\n if(strlen($mes) == 1) $mes = \"0\".$mes;\n\n ini_set(\"memory_limit\", \"512M\");\n try {\n\n DB::beginTransaction();\n $results = DB::select(\"SELECT '0' || '40106' || '\".$ano.$mes.\"' || '001' || RPAD(' ',40) arquivo_covid_txt FROM DUAL\n UNION\n SELECT '1' ||\n '41691636134' ||\n '40106' ||\n LPAD(V74_COD_SIAPE, 7, 0) ||\n T06_ANO ||\n T06_MES ||\n T06_DIA_INICIO ||\n T06_ANO ||\n T06_MES ||\n T06_DIA_FIM ||\n CASE WHEN T06_COD_AFASTAMENTO IN ('7795', '7796', '7797', '7798', '7799', '7800', '7996') THEN\n '0387'\n ELSE\n '0388'\n END ||\n RPAD(' ',11) arquivo_covid_txt\n FROM XAGU_RH.T06_FREQ_SERVIDOR\n JOIN XAGU_RH.T05_FREQ_UNIDADE\n ON T06_ANO = T05_ANO\n AND T06_MES = T05_MES\n AND T06_COD_UNIDADE = T05_COD_UNIDADE\n JOIN XAGU_ESTRUTURA.V74_PESSOAS\n ON T06_NU_CPF = V74_NUM_CPF\n LEFT JOIN XAGU_ESTRUTURA.V86_UNIDADES\n ON T06_COD_UNIDADE_FILHA = V86_COD_UNIDADE\n WHERE T06_ANO = '\".$ano.\"'\n AND T06_MES = '\".$mes.\"'\n AND T06_COD_AFASTAMENTO IN ('7795',\n '7796',\n '7797',\n '7798',\n '7799',\n '7800',\n '8195',\n '8595',\n '7996')\n AND (T05_SN_RH = 'E' OR T05_SN_RH = 'R')\n /*membros OU administrativos*/\n $andQuery\n UNION\n SELECT '9' || LPAD(COUNT(*), 6, '0') || RPAD(' ',48) arquivo_covid_txt\n FROM XAGU_RH.T06_FREQ_SERVIDOR\n JOIN XAGU_RH.T05_FREQ_UNIDADE\n ON T06_ANO = T05_ANO\n AND T06_MES = T05_MES\n AND T06_COD_UNIDADE = T05_COD_UNIDADE\n JOIN XAGU_ESTRUTURA.V74_PESSOAS\n ON T06_NU_CPF = V74_NUM_CPF\n LEFT JOIN XAGU_ESTRUTURA.V86_UNIDADES\n ON T06_COD_UNIDADE_FILHA = V86_COD_UNIDADE\n WHERE T06_ANO = '\".$ano.\"'\n AND T06_MES = '\".$mes.\"'\n AND T06_COD_AFASTAMENTO IN ('7795',\n '7796',\n '7797',\n '7798',\n '7799',\n '7800',\n '8195',\n '8595',\n '7996')\n AND (T05_SN_RH = 'E' OR T05_SN_RH = 'R')\n /*membros OU administrativos*/\n $andQuery\n order by arquivo_covid_txt\");\n\n return $results;\n\n } catch (\\Exception $e) {\n return ['error', 'Ocorreu um erro no carregamento de dados, por favor tente novamente.'];\n }\n }", "title": "" }, { "docid": "f6d3883a1c73990042f60e6b6636b5d8", "score": "0.4882861", "text": "private function validarPaginaConsulta() {\r\n\r\n if ($this->analizaURL) {\r\n $urlActual = URL_BASE . Helpers\\Sesion::obt('URL_ACTUAL_COMPLETA');\r\n\r\n }\r\n\r\n $this->paginaConsulta = URL_BASE . JD('URL_COMPLETA');\r\n $query = JD('QueryString');\r\n $this->queryString = (empty($query)) ? [] : $query;\r\n\r\n }", "title": "" }, { "docid": "ad64ee382b979e51c8c7368c57127b8c", "score": "0.48773456", "text": "function buscarContacto ($nombre) {\n\tglobal $conexion;\n\tif ($nombre == \"\")\n\t\t$consultaSQL = \"SELECT * FROM t_contactos;\";\n\telse\n\t\t$consultaSQL = \"SELECT * FROM t_contactos WHERE nombre LIKE '\".$nombre.\"%';\";\n\t$encontrados = 0;\n\tif ($resultado = $conexion->query($consultaSQL)) {\n\t\tif ($resultado->num_rows > 0) {\n\t\t\techo \"<table class=\\\"texto\\\" cellpadding=\\\"10\\\" border=\\\"1\\\" style=\\\"border-collapse:collapse;\\\"><tr><th>Nombre</th><th>Teléfono</th></tr>\";\n\t\t\twhile ($registro = $resultado->fetch_assoc()) {\n\t\t\t\techo \"<tr><td width=\\\"100\\\">\".$registro[\"nombre\"].\"</td><td width=\\\"100\\\">\".$registro[\"telefono\"].\"</td></tr>\";\n\t\t\t}\n\t\t\techo \"</table>\";\n\t\t\techo \"<p class=\\\"texto\\\">\".$resultado->num_rows.\" contactos encontrados en la agenda</p>\";\n\t\t\t$encontrados = $resultado->num_rows;\n\t\t}\n\t\t$resultado->close();\n\t}\n\treturn $encontrados;\n}", "title": "" }, { "docid": "1f1601e4b981b4ea911a4fb3a5e9083f", "score": "0.48760146", "text": "public function enderecosShowAction()\n {\n \t$enderecosTable = new Application_Model_DbTable_LocalEnderecos();\n \t$enderecos = $enderecosTable->getAllList();\n \t$this->_helper->json($enderecos);\n }", "title": "" }, { "docid": "10fbd086d0452beb75aac320af3fd298", "score": "0.48717642", "text": "public function verificaArgPagina(){\r\n\t //Verifica o número do curso para recuperar os dados\r\n\t if(empty($_REQUEST['pagina'])){\r\n\t\t header(\"Location: index.php?ctrl=dashboardPagina&ac=paginas&sucesso=error\");\t\t\r\n\t \t break;\r\n\t }\r\n\t}", "title": "" }, { "docid": "20036d916e28f40beb2f34c7309da22e", "score": "0.48710346", "text": "public function show(Enderecos $enderecos)\n {\n //\n }", "title": "" }, { "docid": "449e2b3e2d65bc600e767b346cace6a8", "score": "0.48672515", "text": "function BanearIP($HTACCESS = \".htaccess\") {\n\t\t$Archivo = fopen($HTACCESS, \"r\");\n\t\t$Txthta = fread($Archivo, filesize($HTACCESS));\n\t\tfclose($Archivo);\n\t\t\t\n\t\t// Nueva IP para banear (\\r\\n es un salto de línea valido para windows, en linux se omite \\r)\n\t\t$NuevaIP = \"\\r\\n\".\"deny from \".$_SERVER['REMOTE_ADDR'];\n\t\t// Comentario que debemos buscar\n\t\t$TxtIpBaneada = \"#INICIO ips baneadas\";\n\t\t// Obtenemos la posición donde empieza el comentario\n\t\t$Posicion = strpos($Txthta, $TxtIpBaneada);\n\t\t// No se ha encontrado el comentario salimos.....\n\t\tif ($Posicion === FALSE) return FALSE;\n\t\t// Sumamos el tamaño del comentario\n\t\t$Posicion += strlen($TxtIpBaneada);\n\t\t// Guardo el .htaccess con la nueva ip baneada\n\t\t$Archivo = fopen($HTACCESS, \"w\");\n\t\t// Guardamos desde el inicio hasta el comentario (incluyendo el mismo)\n\t\tfwrite($Archivo, substr($Txthta, 0, $Posicion), $Posicion);\n\t\t// Guardamos la nueva ip\n\t\tfwrite($Archivo, $NuevaIP, strlen($NuevaIP));\n\t\t// Guardamos el resto del archivo\n\t\tfwrite($Archivo, substr($Txthta, $Posicion, strlen($Txthta) - $Posicion), strlen($Txthta) - $Posicion);\n\t\tfclose($Archivo);\n\t\t\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "b32a562caa2484145ae0a095180289a1", "score": "0.4867165", "text": "function existeClienteParticular($cedula){\n $recurso = $this->controlBD->existeClienteParticular($cedula);\n $row = mysql_fetch_array($recurso);\n $disponible = $row[existeParticular];\n return $disponible;\n }", "title": "" }, { "docid": "cf88f3a4f550a469b5c098d9e7a6cd72", "score": "0.48664242", "text": "function buscaItensPedido($cod)\n {\n $busca = $this->con->query(\"SELECT * FROM pedidosi WHERE cdpedi = '{$cod}'\");\n\n if (count($busca) > 0) {\n\n return $busca->fetchAll(PDO::FETCH_ASSOC);\n }\n\n return false;\n }", "title": "" }, { "docid": "59ab7804c06c122130341301caf34111", "score": "0.48643944", "text": "protected function pesquisarBlocoAssinaturaConectado(BlocoDTO $blocoDTOConsulta){\n try{\n $result = array();\n $blocoRN = new BlocoRN();\n //$blocoDTOConsulta->setStrStaEstado(BlocoRN::$TE_CONCLUIDO,InfraDTO::$OPER_DIFERENTE);\n $blocoDTOConsulta->setStrStaTipo(BlocoRN::$TB_ASSINATURA);\n $blocoDTOConsulta->retNumIdBloco();\n $blocoDTOConsulta->retNumIdUnidade();\n $blocoDTOConsulta->retStrDescricao();\n $blocoDTOConsulta->retStrStaTipo();\n $blocoDTOConsulta->retStrStaEstado();\n $blocoDTOConsulta->retStrStaEstadoDescricao();\n $blocoDTOConsulta->retStrTipoDescricao();\n $blocoDTOConsulta->retStrSiglaUnidade();\n $blocoDTOConsulta->retStrDescricaoUnidade();\n $blocoDTOConsulta->retStrSinVazio();\n $blocoDTOConsulta->retArrObjRelBlocoUnidadeDTO();\n $blocoDTOConsulta->setOrdNumIdBloco(InfraDTO::$TIPO_ORDENACAO_DESC);\n\n /** Acessa o componente SEI para realizar a pesquisa de blocos de assinatura */\n $ret = $blocoRN->pesquisar($blocoDTOConsulta);\n\n /** @var BlocoDTO $blocoDTO */\n foreach($ret as $blocoDTO){\n $relBlocoProtocoloRN = new RelBlocoProtocoloRN();\n $relBlocoProtocoloDTOConsulta = new RelBlocoProtocoloDTO();\n $relBlocoProtocoloDTOConsulta->setNumMaxRegistrosRetorno(1);\n $relBlocoProtocoloDTOConsulta->setNumPaginaAtual(0);\n $relBlocoProtocoloDTOConsulta->setNumIdBloco($blocoDTO->getNumIdBloco());\n $relBlocoProtocoloDTOConsulta->setOrdNumIdBloco(InfraDTO::$TIPO_ORDENACAO_DESC);\n $relBlocoProtocoloDTOConsulta->retDblIdProtocolo();\n /** Acessa o componente SEI para consultar o total de documentos dentro de um bloco de assinatura */\n $relBlocoProtocoloRN->listarRN1291($relBlocoProtocoloDTOConsulta);\n $numeroDocumentos = $relBlocoProtocoloDTOConsulta->getNumTotalRegistros();\n\n $arrUnidades = array();\n /** @var RelBlocoUnidadeDTO $relBlocoUnidadeDTO */\n foreach($blocoDTO->getArrObjRelBlocoUnidadeDTO() as $relBlocoUnidadeDTO){\n $arrUnidades[] = array(\n 'idUnidade' => $relBlocoUnidadeDTO->getNumIdUnidade(),\n 'unidade' => $relBlocoUnidadeDTO->getStrSiglaUnidade()\n );\n }\n $result[] = array(\n 'id' => $blocoDTO->getNumIdBloco(),\n 'atributos' => array(\n 'idBloco' => $blocoDTO->getNumIdBloco(),\n 'idUnidade' => $blocoDTO->getNumIdUnidade(),\n 'siglaUnidade' => $blocoDTO->getStrSiglaUnidade(),\n 'estado' => $blocoDTO->getStrStaEstado(),\n 'descricao' => $blocoDTO->getStrDescricao(),\n 'unidades' => $arrUnidades,\n 'numeroDocumentos' => $numeroDocumentos\n )\n );\n }\n return MdWsSeiRest::formataRetornoSucessoREST(null, $result, $blocoDTOConsulta->getNumTotalRegistros());\n }catch (Exception $e){\n return MdWsSeiRest::formataRetornoErroREST($e);\n }\n }", "title": "" }, { "docid": "fb68d4dfdfc43bd781260f4cda640419", "score": "0.48630077", "text": "function commande_non_paye()\n{\n\tif(isset($_SESSION['email']) or isset($_SESSION['id_client']) or isset($_SESSION['phone']))\n\t{\n\t $id_client = htmlspecialchars($_SESSION['id_client']);\n\t $confirme = 'EN COURS';\n\t $bdd = new PDO('mysql:host=localhost;dbname=ffs','root','');\n\t $reqcommande = $bdd->prepare(\"SELECT * FROM payer WHERE id_client = ? and confirme = ? \");\n\t\t $reqcommande->execute(array($id_client, $confirme));\n\t\t $commandeexiste = $reqcommande->rowCount();\n\t\t return $commandeexiste;\n\t}\n}", "title": "" }, { "docid": "6fa1304b0e6ce35cebf294b9550842b2", "score": "0.4862796", "text": "public function ConsultarCliente($clientes_cadastro_chave){\n\t\treturn self::_Call('ConsultarCliente',Array(\n\t\t\t$clientes_cadastro_chave\n\t\t));\n\t}", "title": "" }, { "docid": "f19bcaef7938a2ee05ddf4ad742d42fb", "score": "0.48603588", "text": "public function buscaCEP(Request $request) {\n $cep = str_replace(\"-\", \"\", str_replace(\".\", \"\", $request->get('cep')));\n $url = \"http://viacep.com.br/ws/\" . $cep . \"/json/\";\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HEADER, 0); // No header in the result\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Return, do not echo result\n\n $result = curl_exec($ch);\n curl_close($ch);\n\n $jsonRetorno = json_decode($result, true);\n\n $jsonRetorno['pais'] = 'Brasil';\n $strRetorno[\"erro\"] = false;\n if (array_key_exists(\"erro\", $jsonRetorno)) {\n if ($jsonRetorno[\"erro\"] == true)\n $strRetorno[\"erro\"] = true;\n else\n $strRetorno[\"erro\"] = false;\n } else {\n $strRetorno[\"jsonRetorno\"] = $jsonRetorno;\n }\n\n return response()->json($strRetorno);\n }", "title": "" }, { "docid": "1f72c431b8fed94cba708ab67724ca56", "score": "0.4858809", "text": "public function inAddr();", "title": "" }, { "docid": "2fb2347a30fe2caa0b1f66baff01c4dc", "score": "0.4852346", "text": "function inserirPessoa(){\n\n $banco = abrirBanco();\n //declarando as variáveis usadas na inserção dos dados\n $nome = $_POST[\"nome\"];\n $nascimento = $_POST[\"nascimento\"];\n $endereco = $_POST[\"endereco\"];\n $telefone = $_POST[\"telefone\"];\n\n //a consulta sql\n $sql = \"INSERT INTO pessoa(nome,nascimento,endereco,telefone) VALUES ('$nome','$nascimento','$endereco','$telefone')\";\n \n //executando a inclusão\n $banco->query($sql);\n //fechando a conexao com o banco\n $banco->close();\n voltarIndex();\n\n }", "title": "" }, { "docid": "3102e3dedaf08a23113f851cc754dad5", "score": "0.48519602", "text": "public function validarUsuarioBD()\n\t {\n\t \t$sentencia=$this->crearSelect(\"t_solicitante\",\"tx_indicador\",\"tx_indicador='\".$this->usuario->getIndicador().\"'\",\"\");\t \t \n\t $filas=$this->numeroFilas($sentencia);\t\n\t echo \"<br> Filas\".$filas;\n\t if ($filas)\n\t \treturn true;\n\t else\n\t \treturn false;\t \n\t }", "title": "" }, { "docid": "9e225f257b32dc5358c67b895c79c8e4", "score": "0.4850841", "text": "function modificaCliente($cliente){\n //no implementado por no requerimiento del proyecto\n }", "title": "" }, { "docid": "19a26c8813aed14d622ca7a1fc742ace", "score": "0.48504233", "text": "public\n function protegePagina()\n {\n $this->query(\"SELECT * FROM usuarios WHERE email = '\" . $_SESSION['login'] . \"' AND senha = '\" . $_SESSION['senha'] . \"' AND excluido = 0\");\n $login = $this->conta_resultado();\n if ($login >= 1) {\n return true;\n } else {\n exit('Deu erro amigo!!! Nome de usuário ou senha incorretos.');\n }\n }", "title": "" }, { "docid": "d963db8426f4e24ecc3d94a425a5d1cf", "score": "0.48483434", "text": "public function obtenerPorIdentificador()\r\n {\r\n if ($this->id) {\r\n $consulta = \"SELECT * FROM asignatura WHERE id = {$this->id}\";\r\n $resultado = Conexion::getInstancia()->obtener($consulta);\r\n if (gettype($resultado[0]) == \"array\") {\r\n $fila = $resultado[0];\r\n $this->id = $fila['id'];\r\n $this->nombreCorto = $fila['nombreCorto'];\r\n $this->nombreLargo = $fila['nombreLargo'];\r\n $this->fechaCreacion = $fila['fechaCreacion'];\r\n return array(2, \"Se obtuvo la información de la asignatura correctamente\");\r\n }\r\n return $resultado;\r\n }\r\n Log::guardar(\"INF\", \"ASIGNATURA --> OBTENER POR IDENTIFICADOR: IDENTIFICADOR INVALIDO\");\r\n return array(1, \"No se pudo hacer referencia a la asignatura\");\r\n }", "title": "" }, { "docid": "6520b9e679e6eaac949c3332eec076e8", "score": "0.4844545", "text": "public static function getResultado($cep)\n {\n\n try { \n\n if (isset($cep)) {\n\n $url = \"https://viacep.com.br/ws/\" . $cep . \"/json\";\n \n $results = array();\n\n $results = file_get_contents($url);\n\n $results = json_decode($results, true);\n \n if (!isset($results['erro'])) {\n \n echo \"Rua: \" . $results['logradouro'] . \"<br>\";\n echo \"Bairro: \" . $results['bairro'] . \"<br>\";\n echo \"Cidade: \" . $results['localidade'] . \"<br>\";\n echo \"Estado: \" . $results['uf'];\n \n }\n \n } else {\n \n echo 'Erro.';\n \n }\n \n } catch(Exception $e) { \n\n var_dump($e);\n\n }\n \n }", "title": "" }, { "docid": "c57f70177a73ea1d0fbf4e20616ba29e", "score": "0.48417005", "text": "function verificar_correo($correo){\n\t\t//pdo\n\t\tglobal $conn;\n\t\t//consulta buscando un usuario con su correo\n\t\t$sql = 'SELECT * FROM user WHERE email=?'; \n\t\t//mandar consulta al pdo\n\t\t$select = $conn ->prepare($sql);\n\t\t//ejecutar consulta\n\t\t$select->execute(array($correo));\n\t\t\n\t\t$r = $select ->fetch();\n\n\t\tif($r){\n\t\t\treturn $r; //si existe retorna $r\n\t\t}else{\n\t\t\treturn 2; //si no existe retorn 2\n\t\t}\n\t}", "title": "" }, { "docid": "bf5a3ec8d44f60b16ff7375b5f79a732", "score": "0.484161", "text": "public function buscarUsuario($mail,$con){\r\n $query=\"SELECT * FROM `usuarios` WHERE `usuario`= '$mail'\";\r\n $resultado=mysqli_query($con,$query);\r\n while($fila = $resultado->fetch_assoc()){\r\n $this->usuario=$mail; //o $fila['usuario'];\r\n $this->clave=$fila['clave'];\r\n return true; break;\r\n };\r\n return false;\r\n }", "title": "" }, { "docid": "fe1ec94e996fda6884a464bd59eab0d2", "score": "0.48379272", "text": "function AdreProv ($CodiProv) {\n$handle = fopen (\"proveidors-email\",\"r\");\n\nif ($handle) {\n while (($buffer = fscanf($handle, \"%s\\t%s\\n\"))) {\n list ($codi,$email) = $buffer;\n if ($codi == $CodiProv) {\n break;\n }\n }\n fclose($handle);\n}\nreturn $email;\n}", "title": "" }, { "docid": "bd32a318f8cf4694804da0e9e3219468", "score": "0.48320463", "text": "function existePendencia(){\n\t\t\t$consulta = mysql_query(\"SELECT * FROM historico_cobranca WHERE id = '\".$this->getid_user().\"' AND ( status_pagamento = 'não pago' OR status_pagamento = 'vencido' ) \");\n\t\t\tif( mysql_num_rows($consulta) > 0 )\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "065270860eb1c651e346cdbb0c8850f6", "score": "0.48310798", "text": "public function check_nome_servico($servico_nome)\n\t{\n\t\t$servico_id = $this->input->post('servico_id');\n\n\t\tif ($this->core_model->get_by_id('servicos', array('servico_nome' => $servico_nome, 'servico_id !=' => $servico_id))) {\n\n\t\t\t$this->form_validation->set_message('check_nome_servico', 'Este serviço já existe');\n\n\t\t\treturn FALSE;\n\t\t} else {\n\t\t\treturn TRUE;\n\t\t}\n\n\t}", "title": "" }, { "docid": "b330a51d1f87116e28b019476dfdd293", "score": "0.48304918", "text": "function dadosCliente()\n{\n require('../App/Services/Conexao.php');\n $id = $_GET['idCliente'];\n\n $query = \"SELECT * \n FROM cliente\n INNER JOIN endereco\n ON cliente.endereco_idEndereco = endereco.idEndereco\n WHERE idCliente = $id\";\n\n $result = mysqli_query($con, $query);\n // verifica se retorna linhas no array, se não retornar, informa...\n if (!$row = $result->fetch_assoc()) {\n ?>\n <div class=\"card\">\n <hr />\n Nenhum cliente encontrado com esses dados.\n </div>\n <?php\n\n // ...se retornar, exibe o cliente\n } else {\n $result = mysqli_query($con, $query);\n while ($row = $result->fetch_assoc()) {\n ?>\n <div class=\"cliente\">\n <form action=\"\" method=\"POST\">\n <div class=\"form-group\">\n <div style=\"font-weight: bold\">Dados Pessoais:</div>\n <div style=\"margin-top: 10px;\">\n <label for=\"nome\">Nome:</label>\n <input id=\"nome\" value=\"<?php echo $row['nome'] ?>\" name=\"nome\" required type=\"texto\" class=\"form-control\" placeholder=\"Nome completo\" />\n </div>\n <div>\n <label for=\"cpf\">CPF:</label>\n <input id=\"cpf\" value=\"<?php echo $row['cpf'] ?>\"\" name=\" cpf\" required maxlength=\"11\" type=\"texto\" class=\"form-control\" placeholder=\"CPF (somente numeros)\" onkeypress=\"return somenteNumeros(event)\" />\n </div>\n <div>\n <label for=\"data-nascimento\">Data de Nascimento:</label>\n <input id=\"data-nascimento\" value=\"<?php echo $row['dataNasc'] ?>\" required name=\"data-nascimento\" type=\"date\" class=\"form-control\" />\n </div>\n <div>\n <label for=\"email\">E-mail:</label>\n <input id=\"email\" value=\"<?php echo $row['email'] ?>\" name=\"email\" required type=\"email\" class=\"form-control\" placeholder=\"[email protected]\" />\n </div>\n </div>\n <div class=\"form-group\">\n <div style=\"font-weight: bold\">Endereço:</div>\n <div style=\"margin-top: 10px;\">\n <label for=\"cep\" style=\"width: 100%;\">CEP:</label>\n <div style=\"display: flex; margin: 0\">\n <input id=\"cep\" value=\"<?php echo $row['cep'] ?>\" maxlength=\"8\" required name=\"cep\" class=\"form-control\" placeholder=\"00000000 (somente numeros)\" onkeypress=\"return somenteNumeros(event)\" />\n <button type=\"button\" class=\"botao\" onClick=\"pesquisacep(cep.value)\" style=\"margin: 0; margin-left: 10px;\">Buscar</button>\n </div>\n </div>\n <div id=\"cepinvalido\" class=\"oculto\" style=\"color: red\">\n *Por favor, informe um CEP válido.\n </div>\n <div id=\"cepnaoencontrado\" class=\"oculto\" style=\"color: red\">\n *CEP não encontrado.\n </div>\n <div id=\"adress\">\n <div>\n <label for=\"rua\">Lougradouro:</label>\n <input id=\"rua\" value=\"<?php echo $row['logradouro'] ?>\" required name=\"rua\" type=\"text\" class=\"form-control\" placeholder=\"Nome da Rua\" />\n </div>\n <div>\n <label for=\"numero\">Número:</label>\n <input id=\"numero\" value=\"<?php echo $row['numero'] ?>\" name=\"numero\" type=\"text\" class=\"form-control\" />\n </div>\n <div>\n <label for=\"bairro\">Bairro:</label>\n <input id=\"bairro\" value=\"<?php echo $row['bairro'] ?>\" required name=\"bairro\" type=\"text\" class=\"form-control\" />\n </div>\n <div>\n <label for=\"cidade\">Cidade:</label>\n <input id=\"cidade\" value=\"<?php echo $row['cidade'] ?>\" required name=\"cidade\" type=\"text\" class=\"form-control\" />\n </div>\n <div>\n <label for=\"uf\">Estado:</label>\n <input id=\"uf\" required value=\"<?php echo $row['uf'] ?>\" name=\"uf\" type=\"text\" class=\"form-control\" />\n </div>\n <div style=\"display: flex; justify-content: center; gap: 20px\">\n <button class=\"cancel\" onclick=\"location.href='../public_html/editar_cliente.php'\" type=\"button\" style=\"margin: 0px;\">Cancelar</button>\n <input id=\"cadastrar\" name=\"submit\" type=\"submit\" value=\"Confirmar\" onclick=\"return confirma('editar')\" />\n </div>\n </div>\n <script src=\"../App/Services/Cliente.js\"></script>\n </div>\n </form>\n <?php\n if (isset($_POST[\"submit\"])) {\n // pegar id do cliente e do endereço a ser atualizado\n $id = $row['idCliente'];\n $adress = $row['idEndereco'];\n\n // obter novos valores\n $nome = $_POST['nome'];\n $cpf = $_POST['cpf'];\n $dataNasc = $_POST['data-nascimento'];\n $email = $_POST['email'];\n $cep = $_POST['cep'];\n $logradouro = $_POST['rua'];\n $numero = $_POST['numero'];\n $bairro = $_POST['bairro'];\n $cidade = $_POST['cidade'];\n $uf = $_POST['uf'];\n\n // comando de update\n $query = \"UPDATE cliente AS c, endereco AS e\n SET\n c.nome = '$nome',\n c.cpf = $cpf,\n c.dataNasc = '$dataNasc',\n c.email = '$email',\n e.cep = '$cep',\n e.logradouro = '$logradouro',\n e.numero = $numero,\n e.bairro = '$bairro',\n e.cidade = '$cidade',\n e.uf = '$uf'\n WHERE c.idCliente = $id AND e.idEndereco = $adress\";\n\n // retorna pagina de sucesso ou erro\n if (mysqli_query($con, $query)) {\n echo \"<script>window.location='editar_cliente_sucesso.php'</script>\";\n } else {\n echo \"<script>window.location='editar_cliente_erro.php'</script>\";\n }\n }\n ?>\n </div>\n\n<?php\n }\n }\n}", "title": "" }, { "docid": "aa0c5e956ea320adaf52dc3a0b35b00b", "score": "0.48294723", "text": "function consultar_correo() {\n extract($_POST);\n\n $arrayData = array();\n $arrayData[] = $correo;\n\n $consultaUsuario = $this->Pgsql->SELECTPLSQL('existe_correo', $arrayData);\n\n if ($consultaUsuario[0][0] != '0') {\n echo 1;\n } else {\n echo 2;\n }\n }", "title": "" }, { "docid": "e818d4a0d1ad4711cdd378ebabb30031", "score": "0.48281035", "text": "public function getClientAddress();", "title": "" }, { "docid": "14c13b679b398c68e843ca470b638e30", "score": "0.482583", "text": "function existeContacto( $email ){\n\n\t\tinclude('config/db.php');\n\n\t\t$sql = 'SELECT * FROM contactos WHERE email =\"'.$mysqli->real_escape_string($email).'\"';\n\t\t$result = $mysqli->query( $sql );\n\n\t\treturn ( $result->num_rows>0 ) ? true : false;\n\t}", "title": "" }, { "docid": "07c0c394f60d9d115195729f6867a675", "score": "0.48250508", "text": "public function es_cliente()\n\t{\n\t\tif($this->esta_logueado())\n\t\t{\n\t\t\tif(CLIENTE == $this->CI->session->userdata('id_tipo_usuario'))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\t\t\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\t\n\t}", "title": "" }, { "docid": "e294f27f1ff695b43cbab20e7f21dbc0", "score": "0.48234776", "text": "public function insertBancoDreamIp($request) {\n $nombre = $request->nombre;\n $ip = $request->ip;\n $query=\"INSERT INTO `dream_pbx`(`nombre`, `ip`) VALUES ('$nombre', '$ip')\";\n\n $result = $this->EjecutarTelefonia($query);\n\n if($result){\n echo TRUE;\n }else{\n echo false;\n } \n }", "title": "" }, { "docid": "0065917306bdc9c55a037afb2b63d899", "score": "0.481832", "text": "private function validarCep($cep) {\n $cep = trim($cep);\n // expressao regular para avaliar o cep\n $avaliaCep = preg_match(\"/[0-9]{5}-[0-9]{3}/\", $cep);\n \n // verifica o resultado\n if(!$avaliaCep) { \n return false;\n }else{\n return true;\n }\n }", "title": "" }, { "docid": "64f41bd3fa3fb9a898004669b3706a9a", "score": "0.48180053", "text": "function consultarClienteAgenciaRifNombre ($busqueda) {\n $resultado = false;\n $query = \"SELECT *\n FROM CLIENTE_AGENCIA \n WHERE (nombre LIKE '\".$busqueda.\"%'\n OR rif LIKE '\".$busqueda.\"%') LIMIT 0,10\";\n $resultado = $this->transaccion->realizarTransaccion($query);\n return $resultado;\n }", "title": "" }, { "docid": "fc52c414bc84ffde7c88310ea1e89993", "score": "0.4817187", "text": "function verificarNoRepeticionEmail($conexion){\r\n \t$checkEmail = \"SELECT * FROM usuarios WHERE Email = '$_POST[email]' \";\r\n \t// Obtiene informacion de la conexion\r\n \t$result = $conexion -> query($checkEmail);\r\n \t// Obtiene los resultados de cuantos emails iguales hay\r\n \t$count = mysqli_num_rows($result);\r\n return $count;\r\n }", "title": "" }, { "docid": "c4aebe826c204edc75f3d19790fe0932", "score": "0.48143807", "text": "public function atualizar_cad_cliente(){\n\t\t//atualiza registro do cliente\n\t\t$sqlUpdate = \"UPDATE cliente SET nome = '{$this->nome}', data_nasc = '{$this->data_nasc}', cpf = '{$this->cpf}', rg = '{$this->rg}', telefone = '{$this->telefone}', celular = '{$this->celular}', email = '{$this->email}', senha = '{$this->senha}', sobrenome = '{$this->sobrenome}' WHERE id = {$this->id}\";\n\n\t\t$resultado = $this->mysqli->query($sqlUpdate);\n\n\t\t//verifica se houve erro\n\t\tif(!$resultado){\n\t\t\treturn false;\n\t\t}\n\n\t\t//atualiza registro de endereco do cliente\n\t\t$sqlUpdate = \"UPDATE endereco SET rua = '{$this->rua}', numero = '{$this->numero}', bairro = '{$this->bairro}', cidade = '{$this->cidade}', cep = '{$this->cep}' WHERE id = '{$this->id_endereco}'\";\n\n\t\t$resultado = $this->mysqli->query($sqlUpdate);\n\n\t\t//verifica se houve erro\n\t\tif(!$resultado){\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "60645207a3596d9593f59d90adc052d7", "score": "0.4812349", "text": "public function getClienteCep()\n {\n return $this->cliente_cep;\n }", "title": "" }, { "docid": "7cabfe20e98151362185f7d90d2f3000", "score": "0.4811555", "text": "function novaConta(){\n\n if(empty ($_POST['nome']) == true){\n\n\n }else{\n\n include(\"control/conexao.php\");\n\n $conta = new Conta();\n\n\n $conta->setNome($_POST['nome']);\n $conta->setCpf($_POST['cpf']);\n $conta->setEmail($_POST['email']);\n $conta->setSenha(md5($_POST['senha']));\n\n $validarCadastro=\"SELECT * FROM conta WHERE cpf='\".$conta->getCpf().\"'\";\n $validarCadastro=$conn->query($validarCadastro)->fetchAll();\n\n $resultados= count($validarCadastro);\n\n echo $resultados;\n\n if($resultados >0){\n echo \"Você possui um cadastro em nosso sistema, faça login\";\n }else{\n\n\n\n\n \n\n\n \n\n try {\n \n $persist= \"INSERT INTO conta (id_conta, cliente, cpf, email, senha) VALUES (NULL, '\".$conta->getNome().\"', '\".$conta->getCpf().\"', '\".$conta->getEmail().\"', '\".$conta->getSenha().\"')\";\n $persist=$conn->query($persist);\n\n \n\n \n echo \"<h2>Dados do Cliente</h2>\"; \n echo \"Nome: \".$conta->getNome().\"<br>\";\n echo \"CPF: \".$conta->getCpf().\"<br>\";\n echo \"E-mail: \".$conta->getEmail().\"<br>\";\n \n \n } catch (PDOException $e) {\n echo \"Erro: \".$e->getMessage();\n }\n }\n \n }\n \n \n }", "title": "" }, { "docid": "cbe68b5eb452fde9105d9d23e8a50ece", "score": "0.4807497", "text": "private function consulta_sepomex($codigo_postal)\n\t{\n\t\t$resultado = array();\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$resultado['sepomex'] = $this->direccion_envio_model->obtener_direccion_sepomex($codigo_postal)->result();\n\t\t\t$resultado['success'] = true;\n\t\t\t$resultado['msg'] = \"Ok\";\n\t\t\t\n\t\t\treturn $resultado;\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$resultado['exception'] = $exception;\n\t\t\t$resultado['msg'] = $exception->getMessage();\n\t\t\t$resultado['error'] = true;\n\t\t\treturn $resultado;\t\n\t\t}\n\t\t\n\t\t/*\n\t\t$resultado = array();\n\t\t\n\t\ttry {\n\t\t\t$cliente = new SoapClient(\"https://cctc.gee.com.mx/ServicioWebCCTC/ws_cms_cctc.asmx?WSDL\");\n\t\t\n\t\t\t$parameter = array( \"codigo_postal\" => $codigo_postal );\t\n\t\t\t\n\t\t\t$obj_result = $cliente->ObtenerEstadoCiudad($parameter);\n\t\t\t//por si no regresa ningún resultado\n\t\t\t$simple_result = isset($obj_result->ObtenerEstadoCiudadResult) ?\n\t\t\t\t $obj_result->ObtenerEstadoCiudadResult : null;\n\t\t\t\n\t\t\t//var_dump($obj_result);\n\t\t\t$resultado['sepomex'] = $simple_result;\n\t\t\t\n\t\t\t$resultado['success'] = true;\n\t\t\t$resultado['msg'] = \"Sepomex Ok\";\n\t\t\t\n\t\t\treturn $resultado;\n\t\t\t\n\t\t} catch (Exception $e)\t{\n\t\t\t$resultado['exception'] = $exception;\n\t\t\t$resultado['msg'] = $exception->getMessage();\n\t\t\t$resultado['error'] = true;\n\t\t\t//echo \"No se pudo recuperar el catálogo de SEPOMEX.<br/>\";\n\t\t\t//echo $e->getMessage();\n\t\t\t//exit();\n\t\t\treturn $resultado;\t\n\t\t}\n\t\t*/\n\t}", "title": "" }, { "docid": "0743889c32502c097dd6da6644dfab2f", "score": "0.47981876", "text": "function consultaImpoconsumo( $informacionCompraPaquete )\n {\n # Se consultan las variables asociadas a la trama Impoconsumo (iTEL 223)\n $infoVariable = $this->getVariables(\"'VAR_CLWSIMPOCONSUMO'\");\n\n # Se obtienen lo datos del consumo desde Base de Datos\n list($paquetes, $usuario, $clave, $metodo, $wsdl) = explode( \";\", $infoVariable['VAR_CLWSIMPOCONSUMO']);\n\n $tiposValidos = str_replace('\"', '', $informacionCompraPaquete['tiposValidos']);\n\n // solo se validan los paquetes de datos y todo incluido (DATOS, COMBO) prepago\n if( (strpos($paquetes, trim($tiposValidos)) !== false) /*&& ($valores['TIPO_COMPRA_DESC'] != 'WF')*/ ){\n\n if($infoVariable['error'] == false) {\n\n $msisdn = $informacionCompraPaquete['numeroLinea'];\n\n $trama = $usuario.'!'.$clave.'!'.$metodo.'!'.$msisdn.'!!*';\n\n $parametrosPeticion = array('TRAMA' => $trama, 'IP_ORIGEN' => $_SERVER['REMOTE_ADDR']);\n $parametrosWS = array( 'Input_Parameters' => $parametrosPeticion );\n $opciones = array('connection_timeout' => '10');\n\n try{\n $soap = new Soap();\n $respuesta = $soap->callSoapWS($wsdl,'ejecutarTrama', $parametrosWS, $opciones);\n\n if( !is_array($respuesta) ){\n $codigo = $respuesta->CODIGO;\n $mensaje = $respuesta->MENSAJE;\n $usuario = $mensaje->USUARIO;\n $descripcion = $mensaje->DESCRIPCION;\n\n if (LOG_FILE == 1) {\n $log = \"\\n Fecha: \" . date('Y-m-d H:i:s') . \"\\n\\n Trama: \" . $trama\n . \".\\n\\n Respuesta: \" . $mensaje . \".\";\n $file = fopen(\"../tmp/impoconsumo\" . date('YmdHis') . \".txt\", \"a+\");\n fwrite($file, $log);\n fclose($file);\n }\n\n if( $codigo == 1 ){\n\n $impoconsumo_tmp = explode('!', $mensaje);\n $impoconsumo = $impoconsumo_tmp[4];\n list($valor_ipc, $ipc_actua, $cobrar_ipc) = explode( \";\", $impoconsumo);\n\n if($cobrar_ipc == 0) {\n $valorPermitido = $valor_ipc - $ipc_actua;\n #$_SESSION['permitido_impoconsumo'] = $valorPermitido.\"--\".$log_trama;\n $retorno = array(\"error\" => false, \"mensaje\" => $cobrar_ipc, \"valorPermitido\" => $valorPermitido);\n } else {\n $retorno = array(\"error\" => true, \"mensaje\" => 'Paquetes no disponibles en el momento, intente más tarde. 2');\n }\n } else {\n $retorno = array(\"error\" => true, \"mensaje\" => \"En este momento no podemos atender esta solicitud, intenta más tarde 3\");\n }\n } else {\n echo $respuesta;\n $retorno = array(\"error\" => true, \"mensaje\" => \"En este momento no podemos atender esta solicitud, intenta más tarde 4 \" . $respuesta);\n }\n\n } catch(Exception $e) {\n $retorno = array(\"error\" => true, \"mensaje\" => \"En este momento no podemos atender esta solicitud, intenta más tarde 5\");\n }\n\n } else {\n $retorno = array(\"error\" => true, \"mensaje\" => \"En este momento no podemos atender esta solicitud, intenta más tarde 6\");\n }\n } else {\n $retorno = array(\"error\" => false, \"valorPermitido\" => 0);\n }\n\n return $retorno;\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "09d09bbc5c8995cf2c6b2c44ee7267b0", "score": "0.0", "text": "public function edit(Request $request, $id)\n {\n $user = User::findOrFail($id);\n return view('admin.users.edit', compact('user'));\n }", "title": "" } ]
[ { "docid": "ac53c5763e3a0b0ec0125039ef9bb509", "score": "0.7631773", "text": "public function edit()\n {\n $this->form();\n }", "title": "" }, { "docid": "b8b614ce042ab5ea8a3e6ef84e6e7778", "score": "0.713407", "text": "public function edit($id)\n {\n $res = Resource::find($id);\n return view('resource.edit')->withResource($res);\n }", "title": "" }, { "docid": "f2b550245f3055e9568b85c7fbb1163e", "score": "0.7120567", "text": "public function edit(int $id)\n {\n $resource = Resource::findOrFail($id);\n\n return view('admin.resource.edit', [\n 'resource' => $resource\n ]);\n }", "title": "" }, { "docid": "361abed2cb852975c0683ccd26ce7d82", "score": "0.70657694", "text": "public function edit($id)\n {\n $data['module'] = array_merge($this->module(),[\n 'action' => 'update'\n ]);\n $data['data'] = Resources::findOrFail($id);\n return view(\"backend.{$this->module()['module']}.create-edit\", $data);\n }", "title": "" }, { "docid": "b7a9dbd94e4c376397338c3286f585f3", "score": "0.6979171", "text": "public function action_edit() {\n $article_id = $this->request->param('id');\n $article = new Model_Article($article_id);\n\n $this->template->title = \"Editar Art&iacute;culo\";\n $this->template->content = View::factory('article/dashboard/form')\n ->bind('article', $article);\n }", "title": "" }, { "docid": "54bd15e9dccbc11ab9791830a78b15b6", "score": "0.69532436", "text": "public function edit($id) {\n $viewData = $this->getDefaultFormViewData();\n $viewData[\"mode\"] = \"edit\";\n $viewData[\"supplier\"] = Supplier::find($id);\n\n return view(\"{$this->viewPath}.form\", $viewData);\n }", "title": "" }, { "docid": "989918b39caf8ede67ab11ef4dc4a651", "score": "0.69339967", "text": "public function editresourceAction() {\n\t\t$resourceid = $this->_request->getParam('resourceid');\n\t\t$srlink = new StudentResourceLink();\n\t\t$select = $srlink->select()->where($srlink->getAdapter()->quoteInto('auto_id = ?', $resourceid));\n\t\t$rows = $srlink->fetchAll($select);\n\t\t$therow = null;\n\t\tforeach ($rows as $row) {\n\t\t\t$therow=$row;\n\t\t}\n\t\t//print_r($therow);\n\t\t$this->view->resourcelink = $therow;\n\t\t\n\t\t$mediabankUtility = new MediabankUtility();\n\t\tob_start();\n\t\t$mediabankUtility->curlDownloadResource($therow['mid'],false);\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\t$this->view->content = $content;\t\t\n\t\t$this->view->redirect_to = $_SERVER[\"HTTP_REFERER\"];\n\t\tStudentResourceService::prepStudentResourceView($this, $this->_request, $therow->loid);\n\t\tif($therow['category']=='Summary') //summary has been stripped out since a summary exists; add it back in if this one is a summary\n\t\t\t$this->view->studentResourceCategories[6]='Summary';\n\t}", "title": "" }, { "docid": "60cbf7aaa1aa0791c0914ed1dcab803f", "score": "0.6928311", "text": "public function edit($id) {\n $resource = static::$resource::findOrFail($id);\n return view($this->getView('edit'), [static::$varName[0] ?? $this->getResourceName() => $resource]);\n }", "title": "" }, { "docid": "d7aa2e5a119120de3c3ba215c6a55f12", "score": "0.6926486", "text": "public function showEdit($id)\n {\n $form = $this->singleRow($id);\n return view('forms.edit', compact('form'));\n }", "title": "" }, { "docid": "18527251f9ef186ce3fe75e5b272924a", "score": "0.69218755", "text": "public function edit()\n {\n return view('rms::edit');\n }", "title": "" }, { "docid": "18527251f9ef186ce3fe75e5b272924a", "score": "0.69218755", "text": "public function edit()\n {\n return view('rms::edit');\n }", "title": "" }, { "docid": "6bfd6ee5429b006ef8ac6c80e55dd39b", "score": "0.6914203", "text": "public function edit($id)\n {\n $oItem = $this->oRepository\n ->getFillFromView($this->sPath.'/form')\n ->find($id);\n \n $sPageTitle = $this->sName;\n \n return view($this->sPath.'/form', compact('oItem','sPageTitle'));\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.69117606", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "0602544d24c996605ea507ebb7ee3e56", "score": "0.6878878", "text": "public function edit($id)\n\t{\n return $this->showForm( $id, 'update' );\n\t}", "title": "" }, { "docid": "a71e27a959041b3dc97b873e60de94e7", "score": "0.68629944", "text": "public function showEditForm()\n {\n return view('profile.edit');\n }", "title": "" }, { "docid": "3736499054b89a9776863393fe21594e", "score": "0.68470234", "text": "public function editAction()\n {\n $id = (int) $this->param('id');\n $project = $this->service->retrieveProjectById($id);\n if (!$project) {\n $this->flash('error')->addMessage('project.not.found');\n $this->redirectToRoute('list', ['page' => 1]);\n } else {\n $action = $this->view->url(['action' => 'update']);\n $projectForm = $this->service->getFormForEditing($action);\n $projectForm->populate($project->toArray());\n $this->view->project = $project;\n $this->view->projectForm = $projectForm;\n }\n }", "title": "" }, { "docid": "701c592af1d277babf262ba31d833e6d", "score": "0.6843164", "text": "public function edit()\n {\n return view('fehome::edit');\n }", "title": "" }, { "docid": "ef3688e29d18642367c0f31d2daf4e03", "score": "0.68410045", "text": "public function edit()\n {\n return view('commonbackend::edit');\n }", "title": "" }, { "docid": "a643a9d707708f188d2b193d7694df02", "score": "0.6840435", "text": "public function edit()\n {\n return view('orgmanagement::edit');\n }", "title": "" }, { "docid": "d38180038ed5b6fde7cb6b7829d278fc", "score": "0.6835701", "text": "public function edit()\n {\n JRequest::setVar( 'view', 'actions' );\n JRequest::setVar( 'layout', 'form' );\n JRequest::setVar( 'hidemainmenu', 1 );\n\n parent::display();\n }", "title": "" }, { "docid": "a695b4f4340bb78a765476c7a7b02c4c", "score": "0.68351203", "text": "public function edit()\n {\n return view('clientapp::edit');\n }", "title": "" }, { "docid": "1816939dd0a3de7ecf446799caf8016c", "score": "0.68238723", "text": "public function edit($id)\n {\n $data = $this->model->findOrFail($id);\n\n View::share(\"data\", $data);\n View::share(\"pageTitle\", $this->pageTitle);\n View::share(\"pageUrl\", $this->pageUrl);\n View::share(\"formFields\", $this->form->getFields());\n return View::make('admin.form.form');\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": "3b2bff17656413d9e096fd6442febe9d", "score": "0.6799307", "text": "public function edit($id) {\n $model = new $this->model;\n $field = $model::find($id);\n return view('admin.' . strtolower($this->controller) . '.edit', compact('field'));\n }", "title": "" }, { "docid": "06c02e9061fd35c64388a48995f01327", "score": "0.6796334", "text": "public function edit($id)\n\t{\n\t\t//\n\t\t$resource = \\App\\Resource::find($id);\n\n\n\t\t$categories = \\App\\Category::lists('name','id');\n\n\t\treturn view('editResource', array( 'resource' => $resource , 'categories'=>$categories) );\n\t}", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "d2626096b25b928d4917d532209d348f", "score": "0.67897326", "text": "public function editAction()\n {\n Zend_Controller_Action_HelperBroker::removeHelper('Layout');\n\n $id = $this->_getParam(\"id\");\n $question = $this->em()->find(\"\\Classified\\Entity\\Question\", $id);\n $this->view->question = $question->getArrayCopy();\n }", "title": "" }, { "docid": "de733d13625d2e27b579a67d4dd0e5cb", "score": "0.67832476", "text": "public function getEdit()\n {\n //\n $id = Input::get('id');\n $model = new $this->model;\n $model = $model->find($id);\n return $this->viewMake('form.create', ['model'=> $model]);\n }", "title": "" }, { "docid": "80357935025ac73c8b779d2b96017dee", "score": "0.67724776", "text": "public function edit($id) {\n $name = $this->name;\n $config = $this->config;\n $model = $this->config->find($id);\n $form = new Form($model);\n $this->config->editForm($form, $model);\n return View::make(static::editViewName(), compact('id', 'name', 'config', 'model', 'form'));\n }", "title": "" }, { "docid": "8202b11a0ebab1ee33526e691e4d3eed", "score": "0.6755838", "text": "public function edit()\n {\n return view('frontend.edit');\n }", "title": "" }, { "docid": "63cbd5995cf95e846b6f36e8000a815a", "score": "0.6754102", "text": "public function editAction()\n {\n $this->_forward('new');\n }", "title": "" }, { "docid": "4e09d9c17a6aceefb0b461c0178bb595", "score": "0.6745991", "text": "public function edit(Form $form)\n {\n $this->authorize('view', $form);\n return view('forms.edit')->with(['form' => $form]);\n }", "title": "" }, { "docid": "ff2840a2ada11fccc572361d76303fac", "score": "0.6741958", "text": "function edit()\r\n\t{\r\n\t\tJRequest::setVar( 'view', 'individual' );\r\n\t\tJRequest::setVar( 'layout', 'form' );\r\n\t\tJRequest::setVar( 'hidemainmenu', 1);\r\n\r\n\t\tparent::display();\r\n\t}", "title": "" }, { "docid": "668b7d8579ddada4536a4181f3e08041", "score": "0.6737808", "text": "public function edit()\n {\n return view('rekanan::edit');\n }", "title": "" }, { "docid": "2b96e953246fda0c5243448568a7c515", "score": "0.67088807", "text": "public function edit($id)\n {\n $entreprise = Entreprise::find($id);\n return view('entreprises.formEdit', ['entreprise' => $entreprise]);\n }", "title": "" }, { "docid": "c4c379abb53b2ca3c6d6cbd170b55609", "score": "0.6686614", "text": "public function edit($id)\n {\n \n \t$model = $this->user->find($id);\n return view('dashboard.model.form', ['modelId'=>$id, 'model'=>$model]);\n }", "title": "" }, { "docid": "559ede1cbea107ac064ad8b6596ece86", "score": "0.66762877", "text": "public function editAction($id)\n {\n $entity = $this->getRepository('Alumni')->find($id);\n $this->forward404UnlessExist($entity);\n\n $editForm = $this->createForm(new AlumniType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->renderTwig('Master/Alumni:form', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "e12e61afec6117ea96b6103dec4dfafb", "score": "0.66596234", "text": "public function edit($id)\n {\n return view('post::forms');\n }", "title": "" }, { "docid": "b4bcae16b256bb23707dba844fd207b0", "score": "0.6656474", "text": "public static function edit()\n {\n $record = todos::findOne($_REQUEST['id']);\n self::getTemplate('edit_task', $record);\n \n }", "title": "" }, { "docid": "aecac872c5871a37f7794940474724af", "score": "0.6651918", "text": "public function edit($id)\n\t{\n\t\t//\n\t\t$employee = Employee::find($id);\n\t\treturn view('employee.edit')->with('employee', $employee);\n\t}", "title": "" }, { "docid": "5abc6953fae7162215480b7a9fef57c1", "score": "0.66518015", "text": "public function edit()\n {\n return view('collection::edit');\n }", "title": "" }, { "docid": "a39d1bedc4c3fd6b0b645b643c26dd0d", "score": "0.66507", "text": "public function edit($id)\n {\n $data = Employee::where('id', $id)->first();\n\n return view('master.form.employee-form', compact('data'));\n }", "title": "" }, { "docid": "75e95fc5ea1762bde4210a296e9c267f", "score": "0.6649592", "text": "public function edit()\n {\n return view('spereport::edit');\n }", "title": "" }, { "docid": "f03c98b1ded6cb4c6e6e2fc27daed613", "score": "0.66491336", "text": "public function edit(Question $question)\n {\n $this->authorize('update',$question);//update name is taken from questionpolicy.\n return view('questions.edit',compact('question'));\n }", "title": "" }, { "docid": "b8d8f7bcf858b30b9d3fd07cde03c478", "score": "0.66466177", "text": "public function edit($id)\n {\n return view('pemilih::edit');\n }", "title": "" }, { "docid": "2c86f1804737a94386a0a9ecc5c6ef5f", "score": "0.66418463", "text": "public function editAction ()\n\t{\n\t $id = $this->params()->fromRoute('id');\n\t \n\t $form = $this->form;\n\t\n\t // Get the record by its id\n\t $rsevent = $this->eventService->find($id);\n\n\t\tif(empty($rsevent)){\n\t $this->flashMessenger()->setNamespace('danger')->addMessage('The record has been not found!');\n\t return $this->redirect()->toRoute('events');\n\t }\n\n\t\t// Bind the data in the form\n\t if (! empty($rsevent)) {\n\t $form->bind($rsevent);\n\t }\n\t \n\t $viewModel = new ViewModel(array (\n\t 'form' => $form,\n\t 'event' => $rsevent,\n\t ));\n\t\n\t $viewModel->setTemplate('events/myevents/form');\n\t return $viewModel;\n\t}", "title": "" }, { "docid": "d75ec83a50e710b9d72084a319e7792e", "score": "0.66327494", "text": "public function edit($id)\n {\n $groups = Group::all();\n $resource = Resource::find($id);\n\n return view('resources.edit', compact('resource', 'groups'));\n }", "title": "" }, { "docid": "34b21fe71b4142863d1302f360b4a15e", "score": "0.66252655", "text": "public function editAction()\n {\n View::renderTemplate('Profile/edit.html.twig', [\n 'user' => $this->user\n ]);\n }", "title": "" }, { "docid": "0132281e923c663960827a2dba422346", "score": "0.6624558", "text": "public function edit(form $form)\n {\n return view('forms.edit',compact('form'));\n }", "title": "" }, { "docid": "c5e6fb8c3a6f53103bcd8c305c0be357", "score": "0.6624066", "text": "public function edit(Family $family)\n {\n return view('humanresources::edit');\n }", "title": "" }, { "docid": "892b227aa26c3b6d3701690609dfa3a0", "score": "0.662098", "text": "public function edit($id)\n {\n $this->data['titlePage'] = trans('admin.obj_edit',['obj' => trans('admin.'.$this->titleSingle)]);\n $breadcrumbs = array();\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconEdit ];\n $this->data['breadcrumbs'] = $breadcrumbs;\n\n $this->data['data'] = $this->model->find($id);\n\n return view(GetViewAdminResource($this->resourceView, 'edit'))->with($this->data);\n }", "title": "" }, { "docid": "223a4b2e951b2071b1a916b352d3f758", "score": "0.66207314", "text": "public function edit($id)\n {\n $columns = $this->columnsExtractor->getUpdateFormFields($this->columnParams);\n $entity = $this->getEntity($id);\n $mediaExtractor = new MediaExtractor($entity);\n\n return view(AdminGeneratorServiceProvider::VIEWS_NAME . '::forms.edit')\n ->with([\n 'columns' => $columns,\n 'entity' => $entity,\n 'titleSingular' => $this->titleSingular,\n 'titlePlural' => $this->titlePlural,\n 'url' => $this->getUrl(),\n 'mediaExtractor' => $mediaExtractor,\n ]);\n }", "title": "" }, { "docid": "2632981557af6d87fc0ef718c76a60a5", "score": "0.6616139", "text": "public function edit($id)\n\t{\n\t\t//\n\t\treturn View::make('invfor.edit');\n\n\t}", "title": "" }, { "docid": "e7eb022f99d007266654247f8c875bb2", "score": "0.6612846", "text": "public function edit()\n {\n return view('leaveapplication::edit');\n }", "title": "" }, { "docid": "73eac20ddaa6b78ea1224540dfac5019", "score": "0.6609262", "text": "public function edit($id)\n {\n $record = Record::findOrFail($id);\n return view('admin.edit', compact('record'));\n\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "cbe6404e0b856f507d216614da279133", "score": "0.6604817", "text": "public function edit($id)\n {\n $data = $this->model::findOrFail($id);\n return view($this->masterViews.$this->routeName.'.form', [\n 'data' => $data\n ]);\n }", "title": "" }, { "docid": "eda065f96a6d12f0f767633c98f9c541", "score": "0.6597777", "text": "public function edit($id)\n\t{\n\t\t$model = Proyecto::find($id);\n\t\tif (is_null ($model)){\n\t\t\tApp::abort(404);\n\t\t}\n\n\t\t$form_data = array('route' => array('admin.proyectos.update', $model->id), 'method' => 'PATCH');\n $actionName = 'Editar';\n $action = 'edit';\n $estadoid = 'disabled';\n $modelsName = 'proyectos';\n $proyectosSelect = null;\n return View::make('admin/layoutform', compact('model', 'form_data', 'modelsName', 'action', 'actionName', 'estadoid', 'proyectosSelect'));\n\t}", "title": "" }, { "docid": "25924f3d76afc3161783024ff1fd4760", "score": "0.65920466", "text": "public function edit() {\n\t\tif(!is_numeric($this->intFieldID) || empty($this->intFieldID)) {\n\t\t\t// Shows form interface\n\t\t\t$this->objSmarty->assign('ALERT_MSG','You must choose an item to update!');\n\t\t\t$this->_create();\n\t\t\texit();\n\t\t}\n\t\t\n\t\t// Gets Field Data\n\t\t$this->getFieldData();\n\t\t$this->objSmarty->assign('objField',$this->objField);\n\t\n\t\t// Gets Fields List\n\t\t$this->getFieldList();\n\t\t$this->objSmarty->assign('objData',$this->objData);\n\t\t\n\t\t// Shows interface\n\t\t$this->renderTemplate(true,$this->strModule . '_form.html');\n\t}", "title": "" }, { "docid": "f8aee712021a0a05cbe7c94c60ca6d93", "score": "0.6588382", "text": "public function edit($id) {\n //\n $resource = Resource::find($id);\n return back()->with('editresource',$resource);\n }", "title": "" }, { "docid": "86d1f75f514c3b131adae0c8cebb7e03", "score": "0.6585817", "text": "public function edit($id) {\n $job = Job::where('id', $id)->first();\n\n return view('forms.editJobForm', ['job' => $job]);\n }", "title": "" }, { "docid": "0725b077de449824aa68932fd4c06e1e", "score": "0.6585609", "text": "public function edit($id)\n\t{\n\t\tView::share('action', 'edit');\n\t\t$this->book = Book::with('author')->findOrFail($id);\n\t\t$this->layout->content = View::make('book/edit')->with('book', $this->book);\n\t}", "title": "" }, { "docid": "63b009873bce5c7c95fc27d34eb2c977", "score": "0.6583854", "text": "public function edit($id)\n\t{\n\t\t// get the genero\n\t\t$genero = Genero::find($id);\n\n\t\t// show the edit form and pass the genero\n\t\t$this->layout->content = View::make('genero.edit')\n\t\t\t->with('genero', $genero);\n\t}", "title": "" }, { "docid": "2036ec29cbad4ebb5c2e9ffca9c418ae", "score": "0.65807027", "text": "public function edit($id)\n\t{\n\t\t$oficina = Oficina::findOrFail($id);\n\n\t\treturn view('admin.oficinas.edit', compact('oficina'));\n\t}", "title": "" }, { "docid": "0a559309f2a48b4e6e1f531aeecd4b3a", "score": "0.6580553", "text": "public function edit($id)\n {\n //\n \n if(Auth::user()->isAdmin()) {\n $product = Product::find($id);\n return view('products.edit_form') -> with('product', $product) -> with('manufacturers', Manufacturer::all());\n } else {\n \n session()->flash('danger', 'You do not have right to edit the product.');\n \n }\n return redirect()->back();\n }", "title": "" }, { "docid": "bbd0cad2e80812e64ded040020148d94", "score": "0.6580386", "text": "public function edit()\n {\n $jobId = Helper::getIdFromUrl('job');\n $job = JobModel::load()->get($jobId);\n\n Helper::checkIdsFromSessionAndUrl($job->user_id);\n\n View::render('jobs/edit.view', [\n 'method' => 'POST',\n 'action' => '/job/' . $jobId . '/update',\n 'job' => $job\n ]); \n }", "title": "" }, { "docid": "a6c6b148776a004b9feea4845a365f72", "score": "0.65799844", "text": "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "title": "" }, { "docid": "ff31c9fe6a0066f10f83d40443f2a001", "score": "0.65770376", "text": "public function edit($id, Request $request)\n {\n $resource = $this->resources->findOrFail($id);\n\n $category = $this->categories->findBySlug(Category::SLUG_RESOURCES);\n\n abort_unless($category, 404);\n\n $categoryId = $request->query('category_id', null);\n if ($categoryId) {\n $resource->category_id = $categoryId;\n }\n\n $categories = $this->categories->getChildrenByParent($category);\n $authors = $this->authors->all();\n $statuses = Resource::getAllStatuses();\n\n return view('spark::kiosk.resource.edit', compact('resource', 'categories', 'authors', 'statuses'));\n }", "title": "" }, { "docid": "81d2968d7fc0142efbb22b2c81fc3c03", "score": "0.6576812", "text": "public function edit()\n {\n return view('panel::edit');\n }", "title": "" }, { "docid": "5d95ad49eb9dde72f7bad4139e934d2a", "score": "0.6575461", "text": "public function edit(Product $product)\n {\n //\n return $this->formView($product);\n }", "title": "" }, { "docid": "32a2288a9719adb61281e330dcfcb6be", "score": "0.6572076", "text": "public function edit()\n {\n return view('post::edit');\n }", "title": "" }, { "docid": "102b804d3fdc24125875b01f5339096a", "score": "0.65714765", "text": "public function edit($id)\n {\n return view('form.edit', Form::findorfail($id));\n }", "title": "" }, { "docid": "adf8a8a4d2598db563e5a217bbdba3cd", "score": "0.6570653", "text": "public\n\tfunction edit() {\n\t\treturn view('roles::edit');\n\t}", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "5612f7342c86406c173280e0606947ef", "score": "0.65648115", "text": "public function editAction(){\n $this->title = 'Edit privilege';\n \n $form = new PrivilegeForm();\n $privilegeModel = new Privilege();\n \n if($this->getRequest()->isPost()){\n if($form->isValid($this->getRequest()->getPost())){\n $privilegeModel->save($form->getValues());\n $this->_helper->FlashMessenger(\n array(\n 'msg-success' => 'The privilege was successfully edited.',\n )\n );\n \n //Regenerate Flag and Flippers\n App_FlagFlippers_Manager::save();\n \n $this->_redirect('/privileges/');\n }\n }else{\n $id = $this->_getParam('id');\n \n if (!is_numeric($id)) {\n $this->_helper->FlashMessenger(\n array(\n 'msg-error' => 'The provided privilege_id is invalid.',\n )\n );\n \n $this->_redirect('/privileges/');\n }\n \n $row = $privilegeModel->findById($id);\n \n if (empty($row)) {\n $this->_helper->FlashMessenger(\n array(\n 'msg-warning' => 'The requested privilege could not be found.',\n )\n );\n \n $this->_redirect('/privileges/');\n }\n \n $form->populate($row->toArray());\n $this->view->item = $row;\n }\n \n $this->view->form = $form;\n }", "title": "" }, { "docid": "f5e66e76e12762a9390e895ff8b010a1", "score": "0.6561447", "text": "public function edit($id)\n {\n return view('crm::edit');\n }", "title": "" }, { "docid": "f5e66e76e12762a9390e895ff8b010a1", "score": "0.6561447", "text": "public function edit($id)\n {\n return view('crm::edit');\n }", "title": "" }, { "docid": "5775aa0e917620a07289496795e159aa", "score": "0.6558975", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CabinetPatientBundle:Patient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Patient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CabinetPatientBundle:Patient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "5a4fa29c8ead075ce097e439b6230e7f", "score": "0.6557373", "text": "public function edit() {\n return view('page::edit');\n }", "title": "" }, { "docid": "7036da046bffbfc19788a64f352479f1", "score": "0.6556628", "text": "public function edit($id)\n {\n $this->data['mode'] = 'edit';\n $this->data['headline'] = 'Update Informtation';\n $this->data['button'] = 'Update';\n\n $this->data['categories'] = Category::arrayForSelect();\n $this->data['product'] = Product::findorfail($id);\n\n return view('products.form',$this->data);\n }", "title": "" }, { "docid": "b1e091bc34289ce5815c7d0b31f9819f", "score": "0.6555672", "text": "public function edit()\n {\n return view('penerimaanbarangpo::edit');\n }", "title": "" }, { "docid": "1bf97160345191ce099650d7d6e00526", "score": "0.6553838", "text": "public function edit($id)\n {\n $formulario = Formulario::find($id);\n\n return view('formulario/edit')->with('formulario', $formulario);\n }", "title": "" }, { "docid": "b1a3f3ce92584deb6d9ca02e12c64273", "score": "0.654789", "text": "public function edit($id)\n\t{\n return View::make('qualimandroids.edit');\n\t}", "title": "" }, { "docid": "151edb16858cb744e42ff9328609d7c5", "score": "0.65452754", "text": "public function edit($id)\n {\n $info = $this->tableService->find($id);\n return view('backend.table.form',compact('info'));\n }", "title": "" }, { "docid": "5bfd503c4d418b21289e0965a996d9ce", "score": "0.6544858", "text": "public function edit($id)\n\t{\n return View::make('documentos.edit');\n\t}", "title": "" }, { "docid": "68681147e5708ef1d65d76ee334789ed", "score": "0.6541047", "text": "public function editAction($id) {\n $this->securityControle();\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('GestionBundle:Employe')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Employe entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('GestionBundle:Employe:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "63bf6338921c0ecb6e450b96aa113d99", "score": "0.653981", "text": "public function edit($id) {\n $viewData = $this->getDefaultViewData();\n $viewData[\"salesInvoice\"] = SalesInvoice::find($id);\n $viewData[\"mode\"] = \"EDIT\";\n\n return view('pages.sales-invoices.form', $viewData);\n }", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.65383214", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.65383214", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "84d9018597a19c73dbebf5d06a3be9a2", "score": "0.65322036", "text": "public function edit($id)\n {\n //\n $enterprise= enterprise::find($id);\n return view('Enterprise.edit',compact('enterprise'));\n }", "title": "" }, { "docid": "f0a76f273d495876976122c5ef6a0216", "score": "0.6531367", "text": "public function edit($id)\n {\n $model = $this->getModel()->find($id);\n if (!$model) {\n return $this->create();\n }\n\n $this->setIndexParams([\n 'model' => $model,\n 'url' => $this->getFormUrl(),\n 'module' => $this->module,\n 'viewPath' => $this->getViewPath()\n ]);\n return view(sprintf('%s.edit', $this->getViewPath()),$this->getIndexParams());\n }", "title": "" }, { "docid": "947653e61d0da11a491ac8f8ab4c2834", "score": "0.6529227", "text": "public function edit($id)\n {\n $requicisao = $this->requicisaoRepository->find($id);\n\n if (empty($requicisao)) {\n Flash::error(__('messages.not_found', ['model' => __('models/requicisaos.singular')]));\n\n return redirect(route('requicisaos.index'));\n }\n\n return view('requicisaos.edit')->with('requicisao', $requicisao);\n }", "title": "" }, { "docid": "8720fc9c034d2db005346ebf128debb7", "score": "0.6529178", "text": "public function edit($id)\n {\n $worker=Worker::find($id);\n return view('Worker.updateform')->with('worker',$worker);\n }", "title": "" }, { "docid": "3cc92efd165a27a9567115e63d5afc4f", "score": "0.65289825", "text": "public function edit($id)\n {\n //formulario que permite modificar los datos \n }", "title": "" }, { "docid": "452b52e702b8d21243ac1f71da4ecd8b", "score": "0.6528226", "text": "public function edit($id)\n {\n //\n $field = Field::find($id);\n $menu = 'field';\n return view('admin.field.edit',compact('field','id','menu'));\n }", "title": "" }, { "docid": "003b6711d6f29181a45b0161a4d2d580", "score": "0.65280944", "text": "public function edit($id)\n {\n $this->view->line = $this->model->edit($id);\n $this->view->render($this->path . '/edit');\n \n }", "title": "" }, { "docid": "1f1fbaf4a6b16a7929b4ed49489555ed", "score": "0.6526529", "text": "public function edit($id)\n {\n $model = Kain::findOrFail($id);\n return view('adminstok.stokkain.form', compact('model'));\n }", "title": "" }, { "docid": "1ac91718aaf760018a9a68bfca3c4ca9", "score": "0.65216976", "text": "public function edit()\n {\n return view('perfil.edit');\n }", "title": "" }, { "docid": "0061e073e0d24249bc7f3fb846e94788", "score": "0.65170205", "text": "public function edit($id)\n {\n //\n $projecto = projecto::find($id);\n\n // show the editprojecto form and pass the nerd\n return View('projecto.editProjecto')\n ->with('projectos', $projecto);\n }", "title": "" }, { "docid": "c8485d35beb0db260202f1dfbd256b0e", "score": "0.65143573", "text": "public function editAction()\r\n {\r\n $item = $this->getItem();\r\n if($item === false) {\r\n $this->getResponse()->setStatusCode(404);\r\n return;\r\n }\r\n\r\n /** @var \\Zend\\Form\\Form $form */\r\n $form = $this->getServiceLocator()->get('thingyform'); // name to be dealt with here\r\n $form->setObject($item);\r\n\r\n return array(\r\n 'item' => $item,\r\n 'form' => $form\r\n );\r\n }", "title": "" } ]
9b7f4966d60145db51f22dee58db4cbc
Summary Gets a Currency object.
[ { "docid": "fcb3674abb9e32bb908adcc7c3a27124", "score": "0.0", "text": "function GetCurrency($currencyId)\n\t{\n\t\t$result = $this->sendRequest(\"GetCurrency\", array(\"CurrencyId\"=>$currencyId));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "title": "" } ]
[ { "docid": "d4f03f842937a6ce81b43ca3838f81ee", "score": "0.7279008", "text": "public function getCurrency();", "title": "" }, { "docid": "d4f03f842937a6ce81b43ca3838f81ee", "score": "0.7279008", "text": "public function getCurrency();", "title": "" }, { "docid": "d4f03f842937a6ce81b43ca3838f81ee", "score": "0.7279008", "text": "public function getCurrency();", "title": "" }, { "docid": "0f26ed257e8a5133c3c033167c660ff6", "score": "0.713327", "text": "public function getCurrencyInfo();", "title": "" }, { "docid": "1b0e9fa1084f188b9b998745c729f529", "score": "0.69839716", "text": "public function getCurrencyCredit();", "title": "" }, { "docid": "83accdeffcf5771ccca721c3667956e7", "score": "0.6876402", "text": "function getCurrency()\r\n\t{\r\n\t\treturn $this->call_API('getCurrency');\r\n\t}", "title": "" }, { "docid": "f9256266bf34ac161d978fb5ae9586c3", "score": "0.6870601", "text": "public function getSourceCurrency();", "title": "" }, { "docid": "214bf210417235c6d6058a2bde243bd1", "score": "0.68209517", "text": "public function getCurrency()\n {\n return $this->data['currency'] ?? null;\n }", "title": "" }, { "docid": "15cb791bf0cc5d2ca9aeac073c85c67c", "score": "0.6787129", "text": "public function getCurrency(){\n return $this->_currency;\n }", "title": "" }, { "docid": "60aef893b4ac3d9cc2cf89f61ec52f31", "score": "0.67646545", "text": "public function getCurrency()\n {\n return $this->currency;\n }", "title": "" }, { "docid": "60aef893b4ac3d9cc2cf89f61ec52f31", "score": "0.67646545", "text": "public function getCurrency()\n {\n return $this->currency;\n }", "title": "" }, { "docid": "60aef893b4ac3d9cc2cf89f61ec52f31", "score": "0.67646545", "text": "public function getCurrency()\n {\n return $this->currency;\n }", "title": "" }, { "docid": "60aef893b4ac3d9cc2cf89f61ec52f31", "score": "0.67646545", "text": "public function getCurrency()\n {\n return $this->currency;\n }", "title": "" }, { "docid": "60aef893b4ac3d9cc2cf89f61ec52f31", "score": "0.67646545", "text": "public function getCurrency()\n {\n return $this->currency;\n }", "title": "" }, { "docid": "60aef893b4ac3d9cc2cf89f61ec52f31", "score": "0.67646545", "text": "public function getCurrency()\n {\n return $this->currency;\n }", "title": "" }, { "docid": "60aef893b4ac3d9cc2cf89f61ec52f31", "score": "0.67646545", "text": "public function getCurrency()\n {\n return $this->currency;\n }", "title": "" }, { "docid": "30a10c3789301a9b9e6768f76e0e8ca7", "score": "0.6709782", "text": "public function getCurrency(): string;", "title": "" }, { "docid": "71cd7c1d9f6f6d33766bfdfb41f0cafc", "score": "0.6582986", "text": "public function getCurrency(): string\n {\n return $this->currency;\n }", "title": "" }, { "docid": "33b157d88c38652d4db04a0e233736f1", "score": "0.65721166", "text": "public function getCurrency() {\n\t\treturn $this->MoneyCurrency;\n\t}", "title": "" }, { "docid": "3559e886869d6dc7ff4a8a412b1efb51", "score": "0.65569454", "text": "public function getCurrencyOperation();", "title": "" }, { "docid": "b60e271360d86ed24d811f02339e7386", "score": "0.65079254", "text": "public function getCurrency()\n\t{\n\t\treturn $this->getKeyValue('Currency'); \n\n\t}", "title": "" }, { "docid": "f8fbfc036564e7d39e1ae98d47e20409", "score": "0.64610356", "text": "public function getCurrency() : string\n {\n return $this->currency;\n }", "title": "" }, { "docid": "f8fbfc036564e7d39e1ae98d47e20409", "score": "0.64610356", "text": "public function getCurrency() : string\n {\n return $this->currency;\n }", "title": "" }, { "docid": "8ac3fd84101aac1ce165b9f909565ed5", "score": "0.6436534", "text": "function currency(){\n return $this->currency;\n }", "title": "" }, { "docid": "b680ab46594207339353da43a022a8fe", "score": "0.6283251", "text": "public function getCurrencyCode();", "title": "" }, { "docid": "b680ab46594207339353da43a022a8fe", "score": "0.6283251", "text": "public function getCurrencyCode();", "title": "" }, { "docid": "b680ab46594207339353da43a022a8fe", "score": "0.6283251", "text": "public function getCurrencyCode();", "title": "" }, { "docid": "8b138f5a5b22fdf5e8fe23d7e7402b89", "score": "0.62827635", "text": "function GetOurCurrency()\n\t{\n\t\t$result = $this->sendRequest(\"GetOurCurrency\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "title": "" }, { "docid": "8774c54d40bb4a878c5d72813f0e559c", "score": "0.62617534", "text": "public function getCurrencies();", "title": "" }, { "docid": "5a68263572af27c87f3339ae798daf67", "score": "0.6190023", "text": "public function getBaseCurrency()\n {\n return $this->baseCurrency;\n }", "title": "" }, { "docid": "5a68263572af27c87f3339ae798daf67", "score": "0.6190023", "text": "public function getBaseCurrency()\n {\n return $this->baseCurrency;\n }", "title": "" }, { "docid": "db98f2917d15fb680d47447888abad4d", "score": "0.6185365", "text": "public function getCurrency()\n {\n return $this->hasOne(Currency::className(), ['id' => 'currency_id']);\n }", "title": "" }, { "docid": "ade4bf2e3cafa85b5e59caa2434fd7ac", "score": "0.6173328", "text": "public function getCurrency()\n {\n return $this->hasOne(Currency::className(), ['currency_id' => 'currency_id']);\n }", "title": "" }, { "docid": "2807da24e065b62430a1c79155223528", "score": "0.6129864", "text": "public function getPriceCurrency()\n {\n return $this->priceCurrency;\n }", "title": "" }, { "docid": "3b1fb6fa0f5f043d3c5b5be36488699c", "score": "0.6109186", "text": "protected function get_currency_data()\n {\n }", "title": "" }, { "docid": "c55b99d25561d2429d363fe1ae979200", "score": "0.6095399", "text": "public function currency()\n {\n $currency = Content::where('key', 'currency')->get();\n\n return view('admin.currency', [\n 'currency' => doubleval($currency->first()->value)\n ]);\n }", "title": "" }, { "docid": "29203024fab867fb5071b380ea98d529", "score": "0.6037171", "text": "function GetBaseCurrency()\n\t{\n\t\t$result = $this->sendRequest(\"GetBaseCurrency\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "title": "" }, { "docid": "0a5c2d90bbaaf6248e65778cf846918f", "score": "0.60318017", "text": "public function getRate($currency);", "title": "" }, { "docid": "1ae115b74d73a3adb452a53929fe740e", "score": "0.59780985", "text": "public function getTargetCurrency();", "title": "" }, { "docid": "2745798973d16886509a96d9bfd119f5", "score": "0.59294856", "text": "function GetActiveCurrency(){\n\t\n\t}", "title": "" }, { "docid": "46db905da7fa143ff98137af85fa4cd6", "score": "0.5911732", "text": "public static function GetCurrency()\n {\n $val=\\Config::get('paypal.currency');\n if($val)\n return $val;\n else\n return 'USD';\n }", "title": "" }, { "docid": "aa8b5795a19dc1cb07f9688d7362115a", "score": "0.59063977", "text": "public function getCurrencyParameter();", "title": "" }, { "docid": "84aba4f291f7e6211b29486dd41fc174", "score": "0.589947", "text": "public function getCurrencyCode()\r\n {\r\n return $this->code;\r\n }", "title": "" }, { "docid": "1c6e156c22773550fab500fc8867fe2a", "score": "0.58980453", "text": "public function getDefaultCurrency();", "title": "" }, { "docid": "5f489e22d0fb31caf79c8529c1b4f0a3", "score": "0.58899593", "text": "public function getSummary()\n {\n return $this->get(self::_SUMMARY);\n }", "title": "" }, { "docid": "5f489e22d0fb31caf79c8529c1b4f0a3", "score": "0.5889399", "text": "public function getSummary()\n {\n return $this->get(self::_SUMMARY);\n }", "title": "" }, { "docid": "5f489e22d0fb31caf79c8529c1b4f0a3", "score": "0.5889399", "text": "public function getSummary()\n {\n return $this->get(self::_SUMMARY);\n }", "title": "" }, { "docid": "5f489e22d0fb31caf79c8529c1b4f0a3", "score": "0.5889399", "text": "public function getSummary()\n {\n return $this->get(self::_SUMMARY);\n }", "title": "" }, { "docid": "5f489e22d0fb31caf79c8529c1b4f0a3", "score": "0.5889399", "text": "public function getSummary()\n {\n return $this->get(self::_SUMMARY);\n }", "title": "" }, { "docid": "5f489e22d0fb31caf79c8529c1b4f0a3", "score": "0.5889399", "text": "public function getSummary()\n {\n return $this->get(self::_SUMMARY);\n }", "title": "" }, { "docid": "5f489e22d0fb31caf79c8529c1b4f0a3", "score": "0.5889399", "text": "public function getSummary()\n {\n return $this->get(self::_SUMMARY);\n }", "title": "" }, { "docid": "5f489e22d0fb31caf79c8529c1b4f0a3", "score": "0.58889025", "text": "public function getSummary()\n {\n return $this->get(self::_SUMMARY);\n }", "title": "" }, { "docid": "5f489e22d0fb31caf79c8529c1b4f0a3", "score": "0.58889025", "text": "public function getSummary()\n {\n return $this->get(self::_SUMMARY);\n }", "title": "" }, { "docid": "0a35e80adf86e825357437fd68d41615", "score": "0.5882701", "text": "protected function getCurrency()\n {\n return $this->checkoutSession->getLastRealOrder()->getOrderCurrencyCode();\n }", "title": "" }, { "docid": "231e4bef759f178aae348a2b0f6e0592", "score": "0.5880495", "text": "public function getCurrency(): ?string\n {\n return $this->currency;\n }", "title": "" }, { "docid": "231e4bef759f178aae348a2b0f6e0592", "score": "0.5880495", "text": "public function getCurrency(): ?string\n {\n return $this->currency;\n }", "title": "" }, { "docid": "231e4bef759f178aae348a2b0f6e0592", "score": "0.5880495", "text": "public function getCurrency(): ?string\n {\n return $this->currency;\n }", "title": "" }, { "docid": "231e4bef759f178aae348a2b0f6e0592", "score": "0.5880495", "text": "public function getCurrency(): ?string\n {\n return $this->currency;\n }", "title": "" }, { "docid": "231e4bef759f178aae348a2b0f6e0592", "score": "0.5880495", "text": "public function getCurrency(): ?string\n {\n return $this->currency;\n }", "title": "" }, { "docid": "39b0b14bd63819e6bca5c83f51781e65", "score": "0.58724976", "text": "public static function getInstance()\n {\n if (!is_object(self::$_instance)) //or if( is_null(self::$_instance) ) or if( self::$_instance == null )\n self::$_instance = new Currency();\n return self::$_instance;\n }", "title": "" }, { "docid": "6bbd56b49e3edced79da49c210bf1d5d", "score": "0.58452076", "text": "public static function getCurrencyForCurrentLocale()\r\n {\r\n\treturn Currency::getInstanceForLocale( self::getCurrentLocale() );\r\n }", "title": "" }, { "docid": "7a193a412e838ad220160a3e313bcabe", "score": "0.5828882", "text": "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "title": "" }, { "docid": "7a193a412e838ad220160a3e313bcabe", "score": "0.5828882", "text": "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "title": "" }, { "docid": "7a193a412e838ad220160a3e313bcabe", "score": "0.5828882", "text": "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "title": "" }, { "docid": "7a193a412e838ad220160a3e313bcabe", "score": "0.5828882", "text": "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "title": "" }, { "docid": "50934b022419182bfaec447f41fa17e3", "score": "0.5828604", "text": "public function get_currency() {\n\t\t$data['currency'] = $this->session->data['currency'];\n\t\t/* added by it-lab end */\n\n\t\t$this->response->setOutput(json_encode($data));\n\t}", "title": "" }, { "docid": "efc0fb6a7d4386549a58f75b526b7d5e", "score": "0.58240485", "text": "public function getTransactionCurrency()\n {\n return $this->transactionCurrency;\n }", "title": "" }, { "docid": "cc72ddc9f4907aad00bb3999a8ba1cd5", "score": "0.58046585", "text": "public static function getCurrency(): string\n {\n return static::$currency ?: Config::get('bazar.currencies.default', 'usd');\n }", "title": "" }, { "docid": "95000b3bd7b58718ae1fe229a31d8eb5", "score": "0.5803353", "text": "public function show(Currency $currency)\n {\n //\n }", "title": "" }, { "docid": "95000b3bd7b58718ae1fe229a31d8eb5", "score": "0.5803353", "text": "public function show(Currency $currency)\n {\n //\n }", "title": "" }, { "docid": "28e5f36048c0dd5fbda85fe8a96127b1", "score": "0.57821095", "text": "public function getCurrencyCode()\n {\n return $this->_currencyCode;\n }", "title": "" }, { "docid": "fb37f586b55cf6ac87dadeedabcacbff", "score": "0.57783514", "text": "public function getCurrencyCode()\n {\n return $this->currency_code;\n }", "title": "" }, { "docid": "fb37f586b55cf6ac87dadeedabcacbff", "score": "0.57783514", "text": "public function getCurrencyCode()\n {\n return $this->currency_code;\n }", "title": "" }, { "docid": "fb37f586b55cf6ac87dadeedabcacbff", "score": "0.57783514", "text": "public function getCurrencyCode()\n {\n return $this->currency_code;\n }", "title": "" }, { "docid": "28b8c0e1a2ebbd390c01eb910f453ee1", "score": "0.57576776", "text": "public function getCurrentCurrencyRate() {\r\n\t\treturn $this->_storeManager->getStore()->getCurrentCurrencyRate();\r\n\t}", "title": "" }, { "docid": "e2988f0fa3dd164398ac32db4ed35329", "score": "0.57477325", "text": "public function getBillingCurrency()\n {\n return $this->billingCurrency;\n }", "title": "" }, { "docid": "87ae04cb73568c29f66053a67617111a", "score": "0.57233065", "text": "public static function usesCurrency()\n {\n return static::$currency;\n }", "title": "" }, { "docid": "b491c35cc87c4dcfe67b830f3128bc82", "score": "0.57209635", "text": "public function getCurrencyCode() {\n return $this->currency_code;\n }", "title": "" }, { "docid": "997084c1b2fb801c083067e509577beb", "score": "0.5711219", "text": "public function toCurrency() {\n\t\treturn $this->belongsTo( 'App\\Currency' );\n\t}", "title": "" }, { "docid": "47b5f7e01cb610d040e5da003c5ea0e1", "score": "0.5657201", "text": "public function getCurrencies(){\n\t\t$this->cur_call = 'getCurrencies';\n\t\t$this->url = '/Common/getCurrencies';\n\t\t\n\t\treturn $this->_call_api();\n\t}", "title": "" }, { "docid": "a8ef98a2ba8b924bb1edad7745b5b1e7", "score": "0.565009", "text": "public function index()\n { \n return new CurrencyCollection($this->currencyService->all());\n }", "title": "" }, { "docid": "23890932fd5e6d5082310e615495b588", "score": "0.5647369", "text": "public function getOriginalCurrency()\n {\n return $this->originalCurrency;\n }", "title": "" }, { "docid": "31fdd6c56291de6adba3aa2a2e7ee964", "score": "0.56441045", "text": "public function getSummary()\n {\n return $this->summary;\n }", "title": "" }, { "docid": "31fdd6c56291de6adba3aa2a2e7ee964", "score": "0.56441045", "text": "public function getSummary()\n {\n return $this->summary;\n }", "title": "" }, { "docid": "dd72e6ce06d67d159eac20a07ee054e2", "score": "0.56436974", "text": "public function getCurrencyShortName()\n {\n return Shopware()->Container()->get('currency')->getShortName();\n }", "title": "" }, { "docid": "dbce3607359ac619f7d14dbd01c905f6", "score": "0.5643419", "text": "public static function default_currency()\n {\n return EcommerceCurrency::get()\n ->Filter(\n array(\n 'Code' => trim(strtolower(EcommerceConfig::get('EcommerceCurrency', 'default_currency'))),\n 'InUse' => 1,\n )\n )\n ->First();\n }", "title": "" }, { "docid": "8cbfdbd79bea43ec9329ac1d6665205d", "score": "0.56409514", "text": "function GetCurrencies()\n\t{\n\t\t$result = $this->sendRequest(\"GetCurrencies\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "title": "" }, { "docid": "1e06574f36444ea9efd89b13b8ea6793", "score": "0.56344897", "text": "public function getCurrencyCode()\n {\n return isset($this->currencyCode) ? $this->currencyCode : null;\n }", "title": "" }, { "docid": "398673d2a6e5986eda786adfe92cc9a0", "score": "0.56292033", "text": "public function getCurrenciesAction()\n {\n $repository = Shopware()->Models()->getRepository('Shopware\\Models\\Shop\\Currency');\n\n $builder = $repository->createQueryBuilder('c');\n $builder->select(\n [\n 'c.id as id',\n 'c.name as name',\n 'c.currency as currency',\n 'c.symbol as symbol',\n 'c.factor as factor',\n 'c.default as default'\n ]\n );\n\n $query = $builder->getQuery();\n\n $total = Shopware()->Models()->getQueryCount($query);\n\n $data = $query->getArrayResult();\n\n $this->View()->assign(\n [\n 'success' => true,\n 'data' => $data,\n 'total' => $total\n ]\n );\n }", "title": "" }, { "docid": "3a7821925c736721ff8f55692b572409", "score": "0.56224775", "text": "public function getTargetCurrency()\n {\n return $this->targetCurrency;\n }", "title": "" }, { "docid": "5f6fac73b9e25e2da5b2b8aff6ac4cf0", "score": "0.5602235", "text": "public function getActiveCurrency() {\n\n $loggedInAccount = $this->securityService->getLoggedInSecurableAndAccount()[1];\n\n if ($loggedInAccount) {\n $currencyCode = $loggedInAccount->getAccountData()->getCurrencyCode();\n } else if ($this->session->getValue(self::ACTIVE_CURRENCY_SESSION_NAME)) {\n $currencyCode = $this->session->getValue(self::ACTIVE_CURRENCY_SESSION_NAME);\n } else {\n $currencyCode = $this->getDefaultCurrency()->getCode();\n }\n\n return $this->getCurrencies()[$currencyCode] ?? $this->getActiveCurrency();\n\n }", "title": "" }, { "docid": "f5a257a800fc97c0b8d7587c821f95bc", "score": "0.55842924", "text": "public function getCurrencyID()\n {\n return $this->currencyID;\n }", "title": "" }, { "docid": "3bb846a834361fa9dde01dd99be952f4", "score": "0.5583874", "text": "public function getCurrency()\n {\n $exchangeCron = NgoaiTeCron::orderBy('id', 'DESC')->first();\n if (!$exchangeCron) {\n return response()->json([\"message\" => \"Cannot find cron job\"], 403);\n }\n\n $exchanges = NgoaiTe::where('cron_id', $exchangeCron->id)->where('default', 0)\n ->where('code', 'USD')\n ->orderBy('id', 'DESC')->select(\n 'code','bank_id','bank_code',\n 'symbol','ename','vname',\n 'muatienmat','muatienmat_diff','bantienmat','bantienmat_diff',\n 'muachuyenkhoan','muachuyenkhoan_diff','banchuyenkhoan','banchuyenkhoan_diff'\n )->get();\n if (!$exchanges) {\n return response()->json([\"message\" => \"Data not found\"], 403);\n }\n\n return response()->json($exchanges, 200);\n }", "title": "" }, { "docid": "5cd27b8bcef51d011646979e05374823", "score": "0.5583866", "text": "public function getBaseCurrencyCode() {\r\n\t\treturn $this->_storeManager->getStore()->getBaseCurrencyCode();\r\n\t}", "title": "" }, { "docid": "2429a474568bd2b0d5cf62e792398d5f", "score": "0.5582642", "text": "public function getCurrencies() {\n return $this->public([\n 'command' => 'returnCurrencies',\n ]);\n }", "title": "" }, { "docid": "031b22755aab77f2a6b2520180738b64", "score": "0.55779266", "text": "public function fetchSecurityCurrency($security, Logger $logger) {\n $rate = $this->fetchRates($security, $logger);\n return $rate['currency'];\n }", "title": "" }, { "docid": "d5a48f28661b095f5a547f653c022d55", "score": "0.55739963", "text": "public function get_summary() {\n return $this->summary;\n }", "title": "" }, { "docid": "8f16bf4db4bc5c5ab99f45159839e977", "score": "0.5553439", "text": "public function Price() {\n return $this->payment->transactions[0]->amount->total;\n }", "title": "" }, { "docid": "3426d9e4966b4e5be6c2db8091b644f5", "score": "0.5550193", "text": "public function getSellingSummary()\n {\n return $this->sellingSummary;\n }", "title": "" }, { "docid": "8994db3a9a5e6191aa3100babb1df3b6", "score": "0.55460995", "text": "public function getCurrencyCode()\n {\n return isset($this->currency_code) ? $this->currency_code : '';\n }", "title": "" }, { "docid": "08f6eb13a702398df5a8906af9f780b9", "score": "0.5543006", "text": "public function getCurrencyCode()\n {\n return isset($this->CurrencyCode) ? $this->CurrencyCode : null;\n }", "title": "" } ]
16027204dcc6cf54c46e9de83823ef7e
Utilize WooCommerce's WC_Query object to retrieve information about any ordering that's going on
[ { "docid": "3d50fbfe7521871a3df0cdc2f0d38166", "score": "0.67798036", "text": "function get_woocommerce_ordering() {\n\t\tif ( ! $this->is_woocommerce_search() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! function_exists( 'WC' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! isset( WC()->query ) && ! is_object( WC()->query ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! method_exists( WC()->query, 'get_catalog_ordering_args' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->ordering = WC()->query->get_catalog_ordering_args();\n\t\t$this->ordering['wc_orderby'] = isset( $_GET['orderby'] ) ? $_GET['orderby'] : '';\n\t}", "title": "" } ]
[ { "docid": "1de59c7512e9ca0b89c612030c3d288c", "score": "0.6657123", "text": "function getOrderings() ;", "title": "" }, { "docid": "81b846be6ae2dd33047df4387efac179", "score": "0.658885", "text": "public function getOrderings() {}", "title": "" }, { "docid": "f91c451ad85ee35cd85baac7f8745c31", "score": "0.6410115", "text": "public function getOrderings();", "title": "" }, { "docid": "bb678f39178e99b5b866f6230341c107", "score": "0.63685113", "text": "public function retrieveOrders() {\r\n $client = new Client(\r\n str_replace('/public', '', get_site_url()),\r\n // get_site_url(),\r\n $this->consumer_key,\r\n $this->consumer_secret,\r\n [\r\n 'wp_api' => true,\r\n 'version' => 'wc/v3',\r\n 'query_string_auth' => true,\r\n 'timeout' => PADBSYNC_CURL_TIMEOUT\r\n ]\r\n );\r\n \r\n global $wpdb;\r\n \r\n $query = \"SELECT ID FROM {$wpdb->prefix}posts WHERE profaktura_status = %d AND post_type = %s ORDER BY post_date DESC\";\r\n \r\n $sql = $wpdb->prepare($query, [0, 'shop_order']);\r\n \r\n $dbOrdersProStatZero = $wpdb->get_results($sql);\r\n \r\n $allOrders = $client->get('orders');\r\n \r\n $orders = [];\r\n \r\n if (count($allOrders) > 0 && count($dbOrdersProStatZero) > 0) {\r\n foreach ($allOrders as $o) {\r\n foreach ($dbOrdersProStatZero as $d) {\r\n if ($o->id == $d->ID) {\r\n $orders[] = $o;\r\n continue;\r\n }\r\n }\r\n } \r\n }\r\n \r\n if (count($orders) < 1) {\r\n return new WP_REST_Response(['message' => 'No orders found!']);\r\n }\r\n \r\n return new WP_REST_Response($orders);\r\n }", "title": "" }, { "docid": "4f8298a63e3a01cf2eb4775f84748217", "score": "0.6218339", "text": "private function sortQueryOrders() {\n foreach ($this->queryResult as $index => $order) {\n $order = $this->injectKitData($order);\n $this->statusOutputOrder[$order['Order']['status']][$order['Order']['id']] = $order;\n }\n }", "title": "" }, { "docid": "5e9b51deb5bf209dfa6e9010617e8f23", "score": "0.6203623", "text": "function getOrders() {\n\t\t$orders = Mage::getModel ( 'sales/order' )->getCollection ()->addAttributeToSelect ( \"*\" )->addAttributeToFilter ( 'status', array ('complete') );\n\t\t$orders_data = $this->preapreOrdersTosend ( $orders );\n\t\treturn $orders_data;\n\t}", "title": "" }, { "docid": "fd0ea2487372d0cd9289456705d112ad", "score": "0.61741704", "text": "public function fetchWarehouseOrders() {\n $pullList = $this->find('all', array(\n 'conditions' => array(\n 'Order.status' => array('Released', 'Pulled')\n ),\n 'contain' => array(\n 'User',\n 'UserCustomer' => array(\n 'Customer' => array(\n 'fields' => array(\n 'id',\n 'allow_backorder'\n )\n )\n ),\n 'Budget',\n 'OrderItem' => array(\n 'Catalog' => array(\n 'ParentCatalog' => array(\n 'Item'\n )\n ),\n 'Item' => array(\n 'Image',\n 'Location'\n )\n ),\n 'Shipment',\n 'Document' => array(\n 'fields' => array(\n 'id'\n )\n )\n )));\n $this->groupWarehouseOrders($pullList);\n return $this->statusOutputOrder;\n }", "title": "" }, { "docid": "cb5fecbed305bc41f923d47483cea34f", "score": "0.6154348", "text": "function query_orderby( $orderby ) {\n\t\tglobal $wpdb;\n\n\t\t$array_return = [];\n\n\t\tif ( $this->is_woocommerce_search() && ! empty( $this->ordering ) ) {\n\n\t\t\tif ( ! isset( $this->ordering['wc_orderby'] ) ) {\n\t\t\t\t$this->get_woocommerce_ordering();\n\t\t\t}\n\n\t\t\t// depending on the sorting we need to do different things\n\t\t\tif ( isset( $this->ordering['wc_orderby'] ) ) {\n\t\t\t\t$order = isset( $this->ordering['order'] ) ? $this->ordering['order'] : 'ASC';\n\t\t\t\tswitch ( $this->ordering['wc_orderby'] ) {\n\t\t\t\t\tcase 'price':\n\t\t\t\t\tcase 'price-desc':\n\t\t\t\t\tcase 'popularity':\n\t\t\t\t\t\t$order = in_array( $this->ordering['wc_orderby'], array( 'popularity', 'price-desc' ) )\n\t\t\t\t\t\t\t? 'DESC' : $order;\n\n\t\t\t\t\t\t$array_return[] = [\n\t\t\t\t\t\t\t'column' => 'swpwc.meta_value+0',\n\t\t\t\t\t\t\t'direction' => $order,\n\t\t\t\t\t\t];\n\n\t\t\t\t\t\t// SeachWP 3.x compat.\n\t\t\t\t\t\t$orderby = \"ORDER BY swpwc.meta_value+0 {$order}, \" . str_replace( 'ORDER BY', '', $orderby );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t/* case 'price-desc':\n\t\t\t\t\t\t$orderby = \"ORDER BY {$wpdb->postmeta}.meta_value+0 DESC, \" . str_replace( 'ORDER BY', '', $orderby );\n\t\t\t\t\t\tbreak; */\n\t\t\t\t\tcase 'date':\n\t\t\t\t\t\t$array_return[] = [\n\t\t\t\t\t\t\t'column' => \"{$wpdb->posts}.post_date\",\n\t\t\t\t\t\t\t'direction' => 'DESC',\n\t\t\t\t\t\t];\n\n\t\t\t\t\t\t// SeachWP 3.x compat.\n\t\t\t\t\t\t$orderby = 'ORDER BY post_date DESC';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'rating':\n\t\t\t\t\t\t$array_return[] = [\n\t\t\t\t\t\t\t'column' => 'average_rating',\n\t\t\t\t\t\t\t'direction' => 'DESC',\n\t\t\t\t\t\t];\n\t\t\t\t\t\t$array_return[] = [\n\t\t\t\t\t\t\t'column' => \"{$wpdb->posts}.post_date\",\n\t\t\t\t\t\t\t'direction' => 'DESC',\n\t\t\t\t\t\t];\n\n\t\t\t\t\t\t// SeachWP 3.x compat.\n\t\t\t\t\t\t$orderby = \"ORDER BY average_rating DESC, {$wpdb->posts}.post_date DESC\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'name':\n\t\t\t\t\t\t$array_return[] = [\n\t\t\t\t\t\t\t'column' => 'post_title',\n\t\t\t\t\t\t\t'direction' => 'ASC',\n\t\t\t\t\t\t];\n\n\t\t\t\t\t\t// SeachWP 3.x compat.\n\t\t\t\t\t\t$orderby = 'ORDER BY post_title ASC';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->is_legacy_searchwp() ? $orderby : $array_return;\n\t}", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.6139672", "text": "public function getOrder();", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.6139672", "text": "public function getOrder();", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.6139672", "text": "public function getOrder();", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.6139672", "text": "public function getOrder();", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.6139672", "text": "public function getOrder();", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.6139672", "text": "public function getOrder();", "title": "" }, { "docid": "82ac4300ebfb8187eb2ed38dcc16a634", "score": "0.6094264", "text": "public function orderQueryAction()\n {\n // https://api.weixin.qq.com/pay/orderquery?access_token=xxxxxx\n $orderId = $this->params()->fromRoute('id', '0');\n\n $order = $this->getOrderTable()->getOrder($orderId);\n if ($orderId == '0' || !$order) {\n return $this->errorViewModel(array('code' => 1, 'msg' => 'order '.$orderId.' not exist.'));\n }\n\n $postResult = $this->orderQuery($orderId);\n // echo $postResult;\n echo '<br>errcode:';\n echo $postResult->errcode;\n echo '<br>errmsg:';\n echo $postResult->errmsg;\n if ($postResult->errcode == 0) {\n echo '<br>orderinfo:';\n var_dump($postResult->order_info);\n }\n\n return $this->viewModel();\n }", "title": "" }, { "docid": "5f6d863117dda35c1754f37c77753163", "score": "0.6071936", "text": "function wisataone_X1_get_all_order() {\n global $wpdb, $wisataone_X1_tblname;\n $wp_track_table = $wpdb->prefix . $wisataone_X1_tblname;\n\n return $wpdb->get_results( \n \"\n SELECT *\n FROM {$wp_track_table}\n \"\n );\n}", "title": "" }, { "docid": "7209114313ccd008b87662dfa005fe77", "score": "0.603548", "text": "public function query() {\n\t\tif (get_current_login_user() == 'admin') {\n\t\t\treturn Order::get();\n\t\t} else if (get_current_login_user() == 'store') {\n\t\t\t$store_id = auth()->guard('store')->user()->id;\n\t\t\treturn Order::where('store_id', $store_id)->get();\n\t\t}\n\t}", "title": "" }, { "docid": "05423d4b8360c9f91340feadecd70cf8", "score": "0.6001543", "text": "public function query( $query_vars ) {\n\t\t$args = $this->get_wp_query_args( $query_vars );\n\n\t\tif ( ! empty( $args['errors'] ) ) {\n\t\t\t$query = (object) array(\n\t\t\t\t'posts' => array(),\n\t\t\t\t'found_posts' => 0,\n\t\t\t\t'max_num_pages' => 0,\n\t\t\t);\n\t\t} else {\n\t\t\t$query = new WP_Query( $args );\n\t\t}\n\n\t\t$orders = ( isset( $query_vars['return'] ) && 'ids' === $query_vars['return'] ) ? $query->posts : array_filter( array_map( 'wc_get_order', $query->posts ) );\n\n\t\tif ( isset( $query_vars['paginate'] ) && $query_vars['paginate'] ) {\n\t\t\treturn (object) array(\n\t\t\t\t'orders' => $orders,\n\t\t\t\t'total' => $query->found_posts,\n\t\t\t\t'max_num_pages' => $query->max_num_pages,\n\t\t\t);\n\t\t}\n\n\t\treturn $orders;\n\t}", "title": "" }, { "docid": "1675f364b985c39bbe28050a682a78e4", "score": "0.598664", "text": "public function get_order() {\n return wc_get_order( $this->get_order_id() );\n }", "title": "" }, { "docid": "83ae51c37394019c2d70b1e878386171", "score": "0.597807", "text": "function product_query( $q, $woocommerce ) {\n\t\tglobal $wp_query;\n\n\t\t$this->woocommerce_query = $q;\n\t\t$this->woocommerce = $woocommerce;\n\n\t\tif ( $this->is_woocommerce_search() ) {\n\t\t\t$q->set( 's', '' );\n\t\t}\n\n\t\t// if SearchWP found search results we want the order of results to be returned by SearchWP weight in descending order\n\t\tif ( $this->is_woocommerce_search() && apply_filters( 'searchwp_woocommerce_force_weight_sort', true ) ) {\n\t\t\t$wp_query->set( 'order', 'DESC' );\n\t\t\t$wp_query->set( 'orderby', 'post__in' );\n\n\t\t\t// if it's not the main Search page, it's the WooCommerce Shop page\n\t\t\tif ( ! is_search() && wc_get_page_id( 'shop' ) == get_queried_object_id() ) {\n\t\t\t\t$wp_query->set( 's', '' );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "27d757e3e70ad7dce6f713fc90f00a40", "score": "0.59779656", "text": "function getOrder();", "title": "" }, { "docid": "5eb7af6847cd922b7eb5fa8e559f4c76", "score": "0.5826269", "text": "public function getOrders()\n {\n return $this->orders;\n }", "title": "" }, { "docid": "36a7768cbf147cf3673f6bfd17dbdccd", "score": "0.58233577", "text": "function page_handler() {\n\t\tprint '<div class=\"wrap\">\n\t\t\t<ul>';\n\t\t\n\t\t$first_query = new WP_Query();\n\t\t\n\t\t// Query all orders\n\t\t$first_query->query(array(\n\t\t\t'post_type' => 'shop_order',\n\t\t\t'posts_per_page' => '-1'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$not_alive = array();\n\t\t\n\t\twhile ($first_query->have_posts()) : $first_query->the_post();\n\t\t\t\n\t\t\t// Finds all orders lacking signs of life\n\t\t\tif ( !is_object_in_term( get_the_ID(), 'shop_order_status' ) ) :\n\t\t\t\t$not_alive[] = get_the_ID();\n\t\t\tendif;\n\t\t\n\t\tendwhile;\n\t\t\n\t\t$second_query = new WP_Query();\n\t\t\n\t\t// Query all orders BUT those contained in the $not_alive array\n\t\t$second_query->query(array(\n\t\t\t'post_type' => 'shop_order',\n\t\t\t'post__in' => $not_alive,\n\t\t\t'posts_per_page' => '-1'\n\t\t\t)\n\t\t);\n\t\t\n\t\twhile ($second_query->have_posts()) : $second_query->the_post();\n\t\t\t\n\t\t\tglobal $wpdb;\n\n\t\t\t$offset = '0';\n\t\t\n\t\t\tdo {\n\t\t\t\tif ( $offset != '0' ) {\n\t\t\t\t\t$db_offset = \" OFFSET \" . $offset;\n\t\t\t\t} else {\n\t\t\t\t\t$db_offset = '';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Check comments until a solid match is found\n\t\t\t\t// The Query\n\t\t\t\t$comments = $wpdb->get_results (\"SELECT *\n\t\t\t\t\tFROM $wpdb->comments\n\t\t\t\t\tWHERE comment_approved = '1' AND comment_type = 'order_note' AND comment_post_ID=\".get_the_ID().\"\n\t\t\t\t\tORDER BY comment_date_gmt DESC\n\t\t\t\t\tLIMIT 1\" . $db_offset);\n\n\t\t\t\t// Looping through comments to find last true indication of life\n\t\t\t\tif ( $comments ) {\n\t\t\t\t\tforeach ( $comments as $comment ) {\n\n\t\t\t\t\t\t$vital_check = preg_match(\"/.*Order status changed from .* to (.*)./\", $comment->comment_content);\n\t\t\t\t\t\t$vital_status = preg_replace(\"/.*Order status changed from .* to (.*)./\", \"$1\", $comment->comment_content);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Check if comment is a match to Woo template\n\t\t\t\t\t\tif ( $vital_check == '1' ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Extract $vital_status\n\t\t\t\t\t\t\t$order = new WC_Order(get_the_ID());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Update order status with extracted $vital_status\n\t\t\t\t\t\t\t$order->update_status($vital_status, 'Revitalized!');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<li>Order #'.get_the_ID().' has been revitalized, due to its previously logged state of \"'.$vital_status.'\"!';\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$offset++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\twhile ($vital_check === '0');\n\t\t\n\t\tendwhile;\n\t\t\n\t\tprint '</ul>\n\t\t</div>';\n\t}", "title": "" }, { "docid": "72aeb741ec59f64887b35fdcfdbe018a", "score": "0.58054477", "text": "function orders() {\n\t \treturn $this->hook(\"/{$this->subject_slug}/v1/orders.xml?api_key={$this->api_key}\",\"order\");\n\t}", "title": "" }, { "docid": "3d86ddeb2ab7548bc9a2fc770b32f08b", "score": "0.57436794", "text": "function get_order()\n{\n\n}", "title": "" }, { "docid": "15bec3f3407b6b9c27c452fee8bdc3f0", "score": "0.5719756", "text": "public function getOrderings()\n {\n return $this->orderings;\n }", "title": "" }, { "docid": "f094fc4f473c0deadb88754a85c69995", "score": "0.5696922", "text": "public function Orders()\n {\n return $this->getOrders();\n }", "title": "" }, { "docid": "243a9e77f96edc90417386de7ac3ae8c", "score": "0.56923854", "text": "public function getOrders() \n {\n return $this->_fields['Orders']['FieldValue'];\n }", "title": "" }, { "docid": "c768b5f07aefcda30e6193dfea594b36", "score": "0.56772774", "text": "function getOrder()\n{\n\n}", "title": "" }, { "docid": "e5d4c4f9db1dbbae2899cb5df5fb445c", "score": "0.56260693", "text": "function order_list($where, $query)\n {\n }", "title": "" }, { "docid": "23f7fc70a2b224f4981ea3a8cfd9b6a4", "score": "0.56190556", "text": "public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }", "title": "" }, { "docid": "23f7fc70a2b224f4981ea3a8cfd9b6a4", "score": "0.56190556", "text": "public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }", "title": "" }, { "docid": "23f7fc70a2b224f4981ea3a8cfd9b6a4", "score": "0.56190556", "text": "public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }", "title": "" }, { "docid": "c677bb59b8250b00f8f2c1855a1d11f1", "score": "0.56170213", "text": "public function getOrder()\n {\n return $this->__get(\"order\");\n }", "title": "" }, { "docid": "b202267fef8ac4e8f7abc87c0c1db378", "score": "0.5611443", "text": "abstract public function getOrderAble();", "title": "" }, { "docid": "9baecbb200ccb59aae10f2d85ee672cb", "score": "0.5604724", "text": "private function getShopOrderList() {\n\t\tif (array_key_exists('shopTemplate', $this->template->conf)) {\n\t\t\t$templateCode = $this->template->plugin->fileResource($this->template->conf['shopTemplate']);\n\t\t\t//$templateCode = $this->template->tplutils->getSubpart($tmpl, '###ORDERS_LIST_TEMPLATE###');\n\t\t} else {\n\t\t\t$templateCode = $this->template->plugin->getTemplate('###SHOP###');\n\t\t}\n\n\t\t$feusers_uid = $GLOBALS['TSFE']->fe_user->user['uid'];\n\t\tif (!$feusers_uid) {\n\t\t\treturn $this->template->tplutils->getSubpart($templateCode, '###MEMO_NOT_LOGGED_IN###');\n\t\t}\n\n\t\t$cond = array();\n\t\t$cond['select'] = '*';\n\t\t$cond['from'] = 'sys_products_orders';\n\t\t$cond['order'] = 'crdate';\n\n\t\t$cond['limit'] = '';\n\n\t\t// Get a custom where, or default if none\n\t\t$cond = $this->calc->custom->getOrderListCondition();\n\t\tif (!$cond) {\n\t\t\t$cond['where'] = 'feusers_uid=' . intval($feusers_uid) . ' AND NOT deleted';\n\t\t} else if (!is_array($cond)) {\n\t\t\t$cond['where'] = $cond;\n\t\t}\n\n\t\treturn $this->layoutOrderList($templateCode, $cond);\n\t}", "title": "" }, { "docid": "391bd1435c6de7379188760523fad194", "score": "0.56043977", "text": "protected function obtainDataOrders()\n\t{\n\t\t$this->dbQueryResult['ORDERS'] = CSaleOrder::GetList(array($this->sortBy => $this->sortOrder), $this->filter);\n\t\t$this->dbQueryResult['ORDERS']->NavStart($this->arParams[\"ORDERS_PER_PAGE\"], false);\n\n\t\tif(empty($this->dbQueryResult['ORDERS']))\n\t\t\treturn;\n\n\t\twhile ($arOrder = $this->dbQueryResult['ORDERS']->GetNext())\n\t\t{\n\t\t\t$arOBasket = array();\n\t\t\t$dbBasket = CSaleBasket::GetList(array('NAME' => 'asc'), array(\"ORDER_ID\"=>$arOrder[\"ID\"]), false, false, array('*'));\n\t\t\twhile ($arBasket = $dbBasket->Fetch())\n\t\t\t{\n\t\t\t\tif (CSaleBasketHelper::isSetItem($arBasket))\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$arOBasket[] = $arBasket;\n\t\t\t}\n\n\t\t\t$this->dbResult['ORDERS'][] = array(\n\t\t\t\t\"ORDER\" => $arOrder,\n\t\t\t\t\"BASKET_ITEMS\" => $arOBasket,\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "23c34043d2d205674a9127db3da22fe8", "score": "0.5583982", "text": "public function vendor_orders()\n {\n $query = $this->db->where('vendor_hash', $this->current_user->user_hash)\n ->where('progress >', '0')\n ->order_by('time desc')\n ->get('orders');\n\n if ($query->num_rows() > 0) {\n $row = $query->result_array();\n return $this->build_array($row);\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "a0757f62ff080b1a78f3d6e79716dcc9", "score": "0.5579239", "text": "public function getOpenedOrders() {\n\t\t$client = $this->getWssClient();\n\t\t$client->send( \"{\\\"H\\\":\\\"corehub\\\",\\\"M\\\":\\\"QueryExchangeState\\\",\\\"A\\\":[\\\"{$this->pair}\\\"],\\\"I\\\":1}\" );\n\t\ttime_nanosleep( 0, 500000 );\n\t\t$orders = json_decode( $client->receive(), true )['R'];\n\t\tif ( ! $orders ) {\n\t\t\ttime_nanosleep( 0, 500000 );\n\t\t\t$orders = json_decode( $client->receive(), true )['R'];\n\t\t}\n\n\t\treturn $orders;\n\t}", "title": "" }, { "docid": "3c8e7dec6461992ec2e5289130bd3358", "score": "0.5561717", "text": "function custom_post_order_query( $wp_query ){\n\n\t//exclude admin pages, we wat to display posts as default since admin can check the post order from the submanu page\n\t// check the settings to see if the user wants custom post display or WordPress default\n\tif( ! is_admin() && get_option( 'dd_custom_post_order_on_off', 'on' ) === 'on' ){\n\n\t\t\t// target the main query and archive pages\n\t\t\tif( $wp_query->is_main_query() || $wp_query->is_post_type_archive()){\n\n\t\t\t\tif( $_GET[ 'orderby' ] ){\n\t\t\t\t\t$wp_query->set( 'orderby', $_GET[ 'orderby' ] );\n\t\t\t\t\t$wp_query->set( 'order', $_GET[ 'order' ] );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t$wp_query->set( 'meta_key', 'post_order' );\n\t\t\t\t\t$wp_query->set( 'orderby', 'meta_value_num' );\n\t\t\t\t\t$wp_query->set( 'order', 'ASC' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n}", "title": "" }, { "docid": "d6272c1a25e0266039eb6a0bf2639606", "score": "0.55614763", "text": "function returned_orders() {\n global $wpdb;\n $woo_cust_id = get_current_user_id();\n $returned_orders = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM randys_orders o LEFT JOIN randys_customers c ON c.custnmbr = o.randys_customer_id WHERE c.woocustid=%s AND status='returned'\", array($woo_cust_id) ) );\n\n return $returned_orders;\n}", "title": "" }, { "docid": "92978427ca4de6910446a8b3c953bfba", "score": "0.555336", "text": "public function woocommerce_dashboard_recent_orders() {\n\t\t$this->set_reporting_flag(true);\n\n\t\t$base_currency = WC_Aelia_CurrencySwitcher::settings()->base_currency();\n\n\t\t$args = array(\n\t\t\t\t'numberposts' => 8,\n\t\t\t\t'orderby' => 'post_date',\n\t\t\t\t'order' => 'DESC',\n\t\t\t\t'post_type' => 'shop_order',\n\t\t\t\t'post_status' => 'publish'\n\t\t);\n\t\t$orders = get_posts($args);\n\t\tif ($orders) :\n\t\t\techo '<ul class=\"recent-orders\">';\n\t\t\tforeach ($orders as $order) :\n\t\t\t\t$this_order = new Aelia_Order($order->ID);\n\n\t\t\t\t$order_currency = $this_order->get_order_currency();\n\t\t\t\t$order_total = WC_Aelia_CurrencySwitcher::instance()->format_price((float)$this_order->order_total,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $order_currency);\n\t\t\t\tif($order_currency != $base_currency) {\n\t\t\t\t\t$order_total_base_currency = woocommerce_price($this_order->order_total_base_currency);\n\t\t\t\t\t$formatted_order_total_base_currency = sprintf('(%s)', $order_total_base_currency);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// No need to display the total in base currency separately if the order\n\t\t\t\t\t// was placed in base currency\n\t\t\t\t\t$formatted_order_total_base_currency = '';\n\t\t\t\t}\n\n\n\t\t\t\techo '<li>';\n\t\t\t\t// Order status and timestamp\n\t\t\t\techo '<span class=\"order-status '.sanitize_title($this_order->status).'\">'.ucwords(__($this_order->status, 'woocommerce')).'</span> <a href=\"'.admin_url('post.php?post='.$order->ID).'&action=edit\">' . get_the_time(__('l jS \\of F Y h:i:s A', 'woocommerce'), $order->ID) . '</a><br />';\n\t\t\t\techo '<small>';\n\t\t\t\techo sizeof($this_order->get_items()).' '._n('item', 'items', sizeof($this_order->get_items()), 'woocommerce');\n\t\t\t\t// Order total\n\t\t\t\techo ' <span class=\"order-cost\">';\n\t\t\t\techo __('Total:', 'woocommerce') . ' ' . $order_total . ' ' . $formatted_order_total_base_currency;\n\t\t\t\techo '</span></small>';\n\t\t\t\techo '</li>';\n\n\t\t\tendforeach;\n\t\t\techo '</ul>';\n\t\telse:\n\t\t\techo '<p>' . __('There are no product orders yet.', 'woocommerce') . '</p>';\n\t\tendif;\n\n\t\t$this->set_reporting_flag(false);\n\t}", "title": "" }, { "docid": "5ea6ec2c18dc57edd3772eac536f1067", "score": "0.554851", "text": "public function getOrder()\n {\n return $this->getQuote();\n }", "title": "" }, { "docid": "c0c3528f987b6aa09f5ccb333392dacf", "score": "0.55461055", "text": "function woocommerce_catalog_ordering() {\n global $wp_query;\n\n if ( 1 === $wp_query->found_posts || ! woocommerce_products_will_display() ) {\n return;\n }\n\n $orderby = isset( $_GET['orderby'] ) ? wc_clean( $_GET['orderby'] ) : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) );\n $show_default_orderby = 'menu_order' === apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) );\n $catalog_orderby_options = apply_filters( 'woocommerce_catalog_orderby', array(\n 'menu_order' => __( 'Default', 'woocommerce' ),\n 'popularity' => __( 'Popularity', 'woocommerce' ),\n 'rating' => __( 'Average rating', 'woocommerce' ),\n 'date' => __( 'Newness', 'woocommerce' ),\n 'price' => __( 'Price: low to high', 'woocommerce' ),\n 'price-desc' => __( 'Price: high to low', 'woocommerce' )\n ) );\n\n if ( ! $show_default_orderby ) {\n unset( $catalog_orderby_options['menu_order'] );\n }\n\n if ( 'no' === get_option( 'woocommerce_enable_review_rating' ) ) {\n unset( $catalog_orderby_options['rating'] );\n }\n\n wc_get_template( 'loop/orderby.php', array( 'catalog_orderby_options' => $catalog_orderby_options, 'orderby' => $orderby, 'show_default_orderby' => $show_default_orderby ) );\n }", "title": "" }, { "docid": "51509416c09d4982d15f84b0e77c6f1b", "score": "0.5535177", "text": "public function queryOrders($query, $archived) {\n if( !$this->User->accessibleUserInList ) {\n $this->User->getAccessibleUserInList;\n }\n if($archived){\n $statusComparator = '=';\n } else {\n $statusComparator = '!=';\n }\n\n $baseOrderInList = $this->find('list', array(\n 'conditions' => array(\n 'Order.status '.$statusComparator => 'Archived',\n 'OR' => array(\n 'Order.user_id' => $this->User->accessibleUserInList,\n 'Order.user_customer_id' => $this->User->accessibleUserInList\n )\n )));\n\n //get Orders belonging to Users that were found by $query (if any)\n if(!empty($this->User->userQueryOrderInList)){\n $this->userQueryOrders($this->User->userQueryOrderInList);\n }\n\n //perform find\n $this->queryResult = $this->find('all', array(\n 'conditions' => array(\n 'Order.id' => $baseOrderInList,\n 'OR' => array(\n 'Order.order_number LIKE' => \"%{$query}%\",\n 'Order.billing_company LIKE' => \"%{$query}%\",\n 'Order.order_reference LIKE' => \"%{$query}%\"\n )\n ),\n 'contain' => array(\n 'User',\n 'UserCustomer' => array(\n 'Customer' => array(\n 'fields' => array('id', 'allow_backorder')\n )\n ),\n 'Budget',\n 'OrderItem' => array(\n 'Item',\n 'Catalog' => array(\n 'ParentCatalog' => array(\n 'Item'\n )\n )\n ),\n 'Shipment',\n )\n ));\n //Merge userQueryOrders and directly found Orders\n $this->queryResult = array_merge($this->userQueryResult, $this->queryResult);\n\n //Setup array to use standard status page grain\n $this->sortQueryOrders();\n\n //return final sorted orders\n return $this->statusOutputOrder;\n }", "title": "" }, { "docid": "1b558b2213e3f13da4ed2977a6cfff29", "score": "0.5531068", "text": "public function getOrder()\n {\n //Note: order by parts are not \"named\" so it's all or nothing\n return $this->_get('_order');\n }", "title": "" }, { "docid": "b4690090829b5936bbd5c1475459bb17", "score": "0.5526895", "text": "function get_order() {\n return $this->get_mapped_property('order');\n }", "title": "" }, { "docid": "c7da32ac106594c2869beb826b3beee4", "score": "0.5526574", "text": "public function getOrders($filter = array()) {\n return $this->getTable()->getOrders();\n }", "title": "" }, { "docid": "585c5376ae6cf1f946163986ed682629", "score": "0.5523645", "text": "public function orders_get_list() {\n\t\t $sql = <<<EOD\n\t\t SELECT\n\t\t \t{$this->wpdb->prefix}topspin_orders.id,\n\t\t \t{$this->wpdb->prefix}topspin_orders.artist_id,\n\t\t \t{$this->wpdb->prefix}topspin_orders.created_at,\n\t\t \t{$this->wpdb->prefix}topspin_orders.subtotal,\n\t\t\t{$this->wpdb->prefix}topspin_currency.currency,\n\t\t\t{$this->wpdb->prefix}topspin_currency.symbol,\n\t\t \t{$this->wpdb->prefix}topspin_orders.tax,\n\t\t \t{$this->wpdb->prefix}topspin_orders.phone,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_method_calculator,\n\t\t \t{$this->wpdb->prefix}topspin_orders.reshipment,\n\t\t \t{$this->wpdb->prefix}topspin_orders.fan,\n\t\t \t{$this->wpdb->prefix}topspin_orders.details_url,\n\t\t \t{$this->wpdb->prefix}topspin_orders.exchange_rate,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_method_code,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_firstname,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_lastname,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_lastname,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_address1,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_address2,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_city,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_state,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_postal_code,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_country,\n\t\t \t{$this->wpdb->prefix}topspin_orders.shipping_address_phone\n\t\t FROM {$this->wpdb->prefix}topspin_orders\n\t\t LEFT JOIN\n\t\t \t{$this->wpdb->prefix}topspin_currency ON {$this->wpdb->prefix}topspin_orders.currency = {$this->wpdb->prefix}topspin_currency.currency\n\t\t WHERE\n\t\t \t{$this->wpdb->prefix}topspin_orders.artist_id = '%d'\n\t\t GROUP BY\n\t\t \t{$this->wpdb->prefix}topspin_orders.id\n\t\t ORDER BY\n\t\t \t{$this->wpdb->prefix}topspin_orders.created_at DESC\nEOD;\n\t\t$ordersList = $this->wpdb->get_results($this->wpdb->prepare($sql,array($this->artist_id)));\n\t\tif(count($ordersList)) {\n\t\t\tforeach($ordersList as $key=>$order) {\n\t\t\t\t$ordersList[$key]->items_list = $this->orders_get_items_list($order->id);\n\t\t\t}\n\t\t}\n\t\treturn $ordersList;\n\t}", "title": "" }, { "docid": "0cf194d97cb20a891f997b00cc9971f0", "score": "0.55134827", "text": "public function getOrderList()\n {\n }", "title": "" }, { "docid": "853887cdfdabdd606b0b4e581c20ab9f", "score": "0.5503846", "text": "function admin_get_all_orders(){\n\t //$orders = $this->Order->find('all');\n\t $this->paginate = array('limit' => 10, 'order' => 'Order.od_date DESC');\n\t \n\t $this->set('orders', $this->paginate());\n\t \n\t \n\t if(!empty($this->data)){\n\t $this->Order->id = $this->data['Order']['id'];\n\t $this->Order->saveField('od_status', $this->data['Order']['od_status']);\n\t \n\t $result = $this->Order->get_ordered_items($this->data['Order']['id']);\n\t \n\t\t//enviar el correo electronico de la situacion\n\t $this->set('orderedProducts',$result);\n\t $this->set('status', $this->data['Order']['od_status']);\n\t $this->MyEmail->sendOrderStatusEmail($this->data['Order']['od_payment_email']);\n\t $this->redirect($this->referer());\n\t } \n\t}", "title": "" }, { "docid": "7dab6a0c66f08adfbf197c327bed3425", "score": "0.5500901", "text": "public function actionWalmartorderinfo()\n {\n $status = false;\n if (isset($_GET['status'])) {\n $status = $_GET['status'];\n }\n $merchant_id = MERCHANT_ID;\n $test = false;\n $prev_date = date('Y-m-d', strtotime(date('Y-m-d') . ' -2 month'));\n $config = Data::getConfiguration($merchant_id);\n $walmartHelper = new Walmartapi($config['consumer_id'], $config['secret_key']);\n if ($status) {\n $orderdata = $walmartHelper->getOrders(['status' => $status, 'limit' => '100', 'createdStartDate' => $prev_date], Walmartapi::GET_ORDERS_SUB_URL, $test);\n } else {\n $orderdata = $walmartHelper->getOrders(['limit' => '100', 'createdStartDate' => $prev_date], Walmartapi::GET_ORDERS_SUB_URL, $test);\n }\n\n print_r($orderdata);\n die;\n }", "title": "" }, { "docid": "16f4e5bffd5cfcc217eb02ec98490034", "score": "0.5487254", "text": "function alg_wc_custom_order_numbers() {\n\t\treturn Alg_WC_Custom_Order_Numbers::instance();\n\t}", "title": "" }, { "docid": "ad320121f45eab9b8fe0eb309cef14f6", "score": "0.5486578", "text": "function get_recent_orders(){\n\t $orders = $this->Order->get_recent_orders();\n\t if($this->params['requested']){\n\t return $orders;\n\t }else{\n\t $this->set('orders', $orders);\n\t }\n \n\t}", "title": "" }, { "docid": "fb176c93f2814ed87e5705bd94318356", "score": "0.54662174", "text": "function casano_woocommerce_catalog_ordering() {\r\n\t\tif ( ! class_exists( 'WooCommerce' ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif ( ! wc_get_loop_prop( 'is_paginated' ) || ! woocommerce_products_will_display() ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$show_default_orderby = 'menu_order' === apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) );\r\n\t\t$catalog_orderby_options = apply_filters( 'woocommerce_catalog_orderby', array(\r\n\t\t\t'menu_order' => __( 'Sort by', 'casano' ),\r\n\t\t\t'popularity' => __( 'Popularity', 'casano' ),\r\n\t\t\t'rating' => __( 'Rating', 'casano' ),\r\n\t\t\t'date' => __( 'Newness', 'casano' ),\r\n\t\t\t'price' => __( 'Price: low', 'casano' ),\r\n\t\t\t'price-desc' => __( 'Price: high', 'casano' ),\r\n\t\t) );\r\n\t\t\r\n\t\t$default_orderby = wc_get_loop_prop( 'is_search' ) ? 'relevance' : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby', '' ) );\r\n\t\t$orderby = isset( $_GET['orderby'] ) ? wc_clean( wp_unslash( $_GET['orderby'] ) ) : $default_orderby; // WPCS: sanitization ok, input var ok, CSRF ok.\r\n\t\t\r\n\t\tif ( wc_get_loop_prop( 'is_search' ) ) {\r\n\t\t\t$catalog_orderby_options = array_merge( array( 'relevance' => __( 'Relevance', 'casano' ) ), $catalog_orderby_options );\r\n\t\t\t\r\n\t\t\tunset( $catalog_orderby_options['menu_order'] );\r\n\t\t}\r\n\t\t\r\n\t\tif ( ! $show_default_orderby ) {\r\n\t\t\tunset( $catalog_orderby_options['menu_order'] );\r\n\t\t}\r\n\t\t\r\n\t\tif ( 'no' === get_option( 'woocommerce_enable_review_rating' ) ) {\r\n\t\t\tunset( $catalog_orderby_options['rating'] );\r\n\t\t}\r\n\t\t\r\n\t\tif ( ! array_key_exists( $orderby, $catalog_orderby_options ) ) {\r\n\t\t\t$orderby = current( array_keys( $catalog_orderby_options ) );\r\n\t\t}\r\n\t\t\r\n\t\twc_get_template( 'loop/fami-orderby.php', array(\r\n\t\t\t'catalog_orderby_options' => $catalog_orderby_options,\r\n\t\t\t'orderby' => $orderby,\r\n\t\t\t'show_default_orderby' => $show_default_orderby,\r\n\t\t) );\r\n\t}", "title": "" }, { "docid": "38c8bcd35b97052013f2d5284fae1e90", "score": "0.54606783", "text": "public function getOrder()\n {\n\n }", "title": "" }, { "docid": "7644a7ee578f6da723a292020abbf76d", "score": "0.5458543", "text": "public function lstOrder(){\n\t\t$Sql = \"SELECT \n\t\t\t\t\torder_id,\n\t\t\t\t\tcustomer_id,\n\t\t\t\t\tproduct_id,\n\t\t\t\t\tproduct_name,\n\t\t\t\t\torder_date,\n\t\t\t\t\tsub_total,\n\t\t\t\t\tgrand_total,\n\t\t\t\t\torder_type,\n\t\t\t\t\tstart_date,\n\t\t\t\t\tend_date,\n\t\t\t\t\tpickup_location_id,\n\t\t\t\t\tdrop_location_id,\n\t\t\t\t\tproduct_price,\n\t\t\t\t\torder_status,\n\t\t\t\t\tpayment_method\n\t\t\t\tFROM\n\t\t\t\t\trs_tbl_order\n\t\t\t\tWHERE\n\t\t\t\t\t1=1\";\n\t\t\n\t\tif($this->isPropertySet(\"order_id\", \"V\")){\n\t\t\t$Sql .= \" AND order_id='\" . $this->getProperty(\"order_id\") . \"'\";\n\t\t}\n\t\tif($this->isPropertySet(\"customer_id\", \"V\")){\n\t\t\t$Sql .= \" AND customer_id=\" . $this->getProperty(\"customer_id\");\n\t\t}\n\t\tif($this->isPropertySet(\"product_id\", \"V\")){\n\t\t\t$Sql .= \" AND product_id=\" . $this->getProperty(\"product_id\");\n\t\t}\n\t\tif($this->isPropertySet(\"order_type\", \"V\")){\n\t\t\t$Sql .= \" AND order_type='\" . $this->getProperty(\"order_type\") . \"'\";\n\t\t}\n\t\tif($this->isPropertySet(\"order_status\", \"V\")){\n\t\t\t$Sql .= \" AND order_status='\" . $this->getProperty(\"order_status\") . \"'\";\n\t\t}\n\t\tif($this->isPropertySet(\"from_dt\", \"V\") && $this->isPropertySet(\"to_dt\", \"V\")){\n\t\t\t$Sql .= \" AND LEFT(order_date, 10) BETWEEN '\" . $this->getProperty(\"from_dt\") . \"' AND '\" . $this->getProperty(\"to_dt\") . \"'\";\n\t\t}\n\t\tif($this->isPropertySet(\"from_date\", \"V\") && $this->isPropertySet(\"to_date\", \"V\")){\n\t\t\t$Sql .= \" AND order_date BETWEEN '\" . $this->getProperty(\"from_date\") . \"' AND '\" . $this->getProperty(\"to_date\") . \"'\";\n\t\t}\n\t\tif($this->isPropertySet(\"ORDERBY\", \"V\")){\n\t\t\t$Sql .= \" ORDER BY \" . $this->getProperty(\"ORDERBY\");\n\t\t}\n\t\t\n\t\tif($this->isPropertySet(\"limit\", \"V\"))\n\t\t\t$Sql .= $this->appendLimit($this->getProperty(\"limit\"));\n\t\treturn $this->dbQuery($Sql);\n\t}", "title": "" }, { "docid": "3e8be5df80b06d6e4c0f90e563b130b3", "score": "0.54526633", "text": "public function get_my_orders( $args = array() )\n {\n return $this->_request('myorders', $args);\n }", "title": "" }, { "docid": "c16e375047d4d31b076e65ccbcc46e80", "score": "0.54358214", "text": "static function get_orders_by_product_id($product_id, $offset = null, $per_page = null ) {\n\n global $wpdb;\n $tabelaOrderItemMeta = $wpdb->prefix . 'woocommerce_order_itemmeta';\n $tabelaOrderItems = $wpdb->prefix . 'woocommerce_order_items';\n $limiter_str = '';\n\n if( $offset !== null && $per_page !== null ) {\n $limiter_str = \" LIMIT $offset, $per_page \";\n }\n\n if( is_array( $product_id ) ) {\n\n echo \"SELECT b.order_id, a.meta_value as product_id\nFROM {$tabelaOrderItemMeta} a, {$tabelaOrderItems} b\nWHERE a.meta_key = '_product_id'\nAND a.meta_value IN (%s)\nAND a.order_item_id = b.order_item_id\nORDER BY b.order_id DESC $limiter_str\";\n\n $results = $wpdb->get_results(\n $wpdb->prepare(\n \"SELECT b.order_id, a.meta_value as product_id\nFROM {$tabelaOrderItemMeta} a, {$tabelaOrderItems} b\nWHERE a.meta_key = '_product_id'\nAND a.meta_value IN (%s)\nAND a.order_item_id = b.order_item_id\nORDER BY b.order_id DESC $limiter_str\",\n\n implode(',', $product_id ) //array('336','378')\n )\n );\n } else {\n $results = $wpdb->get_results(\n $wpdb->prepare(\n \"SELECT b.order_id\nFROM {$tabelaOrderItemMeta} a, {$tabelaOrderItems} b\nWHERE a.meta_key = '_product_id'\nAND a.meta_value = %s\nAND a.order_item_id = b.order_item_id\nORDER BY b.order_id DESC $limiter_str\",\n $product_id\n )\n );\n }\n\n\n if ($results) {\n\n $order_ids = array();\n foreach ($results as $item)\n array_push($order_ids, $item->order_id);\n\n if ($order_ids) {\n $args = array(\n 'post_type' => 'shop_order',\n 'post_status' => array('wc-processing', 'wc-completed'),\n 'posts_per_page' => -1,\n 'post__in' => $order_ids,\n 'fields' => 'ids'\n );\n $query = new WP_Query($args);\n return $query;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "4956a790043bd5a7309271ddcfa8675a", "score": "0.5421316", "text": "public function rebuildOrders() {\n\t\t$totalOrdersPage = $this->ordersGetTotalPages();\n\t\tfor($i=1;$i<=$totalOrdersPage;$i++) {\n\t\t\t$page = $this->getOrders($i);\n\t\t\tif(count($page->response)) {\n\t\t\t\tforeach($page->response as $order) {\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'id' => $order->id,\n\t\t\t\t\t\t'artist_id' => $order->artist_id,\n\t\t\t\t\t\t'created_at' => $order->created_at,\n\t\t\t\t\t\t'subtotal' => $order->subtotal,\n\t\t\t\t\t\t'tax' => $order->tax,\n\t\t\t\t\t\t'currency' => $order->currency,\n\t\t\t\t\t\t'phone' => $order->phone,\n\t\t\t\t\t\t'shipping_method_calculator' => $order->shipping_method_calculator,\n\t\t\t\t\t\t'reshipment' => $order->reshipment,\n\t\t\t\t\t\t'fan' => $order->fan,\n\t\t\t\t\t\t'details_url' => $order->details_url,\n\t\t\t\t\t\t'exchange_rate' => $order->exchange_rate,\n\t\t\t\t\t\t'shipping_method_code' => $order->shipping_method_code,\n\t\t\t\t\t\t'shipping_address_firstname' => $order->shipping_address->firstname,\n\t\t\t\t\t\t'shipping_address_lastname' => $order->shipping_address->lastname,\n\t\t\t\t\t\t'shipping_address_address1' => $order->shipping_address->address1,\n\t\t\t\t\t\t'shipping_address_address2' => $order->shipping_address->address2,\n\t\t\t\t\t\t'shipping_address_city' => $order->shipping_address->city,\n\t\t\t\t\t\t'shipping_address_state' => $order->shipping_address->state,\n\t\t\t\t\t\t'shipping_address_postal_code' => $order->shipping_address->postal_code,\n\t\t\t\t\t\t'shipping_address_country' => $order->shipping_address->country,\n\t\t\t\t\t\t'shipping_address_phone' => $order->shipping_address->phone\n\t\t\t\t\t);\n\t\t\t\t\t$format = array('%d','%d','%s','%f','%f','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s');\n\t\t\t\t\t$tableFields = implode(',',array_keys($data));\n\t\t\t\t\t$tableFormat = implode(',',$format);\n\t\t\t\t\t$orderOnDuplicateUpdate = '';\n\t\t\t\t\t$keyIndex = 0;\n\t\t\t\t\tforeach($data as $key=>$field) {\n\t\t\t\t\t\tif($keyIndex>0) { $orderOnDuplicateUpdate .= ', '; }\n\t\t\t\t\t\t$orderOnDuplicateUpdate .= $key.'=VALUES('.$key.')';\n\t\t\t\t\t\t$keyIndex++;\n\t\t\t\t\t}\n\t\t\t\t\t$orderSQL = <<<EOD\n\t\t\t\t\tINSERT INTO {$this->wpdb->prefix}topspin_orders ({$tableFields}) VALUES ({$tableFormat})\n\t\t\t\t\tON DUPLICATE KEY UPDATE {$orderOnDuplicateUpdate}\nEOD;\n\t\t\t\t\t$this->wpdb->query($this->wpdb->prepare($orderSQL,$data));\n\t\t\t\t\t\n\t\t\t\t\t//Build items for the order\n\t\t\t\t\tforeach($order->items as $item) {\n\t\t\t\t\t\t$itemData = array(\n\t\t\t\t\t\t\t'id' => $item->id,\n\t\t\t\t\t\t\t'order_id' => $order->id,\n\t\t\t\t\t\t\t'campaign_id' => $item->campaign_id,\n\t\t\t\t\t\t\t'line_item_id' => $item->line_item_id,\n\t\t\t\t\t\t\t'spin_name' => $item->spin_name,\n\t\t\t\t\t\t\t'product_id' => $item->product_id,\n\t\t\t\t\t\t\t'product_name' => $item->product_name,\n\t\t\t\t\t\t\t'product_type' => $item->product_type,\n\t\t\t\t\t\t\t'merchandise_type' => $item->merchandise_type,\n\t\t\t\t\t\t\t'quantity' => $item->quantity,\n\t\t\t\t\t\t\t'sku_id' => $item->sku_id,\n\t\t\t\t\t\t\t'sku_upc' => $item->sku_upc,\n\t\t\t\t\t\t\t'sku_attributes' => serialize($item->sku_attributes),\n\t\t\t\t\t\t\t'factory_sku' => $item->factory_sku,\n\t\t\t\t\t\t\t'shipped' => $item->shipped,\n\t\t\t\t\t\t\t'status' => $item->status,\n\t\t\t\t\t\t\t'weight' => serialize($item->weight),\n\t\t\t\t\t\t\t'bundle_sku_id' => $item->bundle_sku_id,\n\t\t\t\t\t\t\t'shipping_date' => $item->shipping_date\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$itemFormat = array('%d','%d','%d','%d','%s','%d','%s','%s','%s','%d','%d','%s','%s','%s','%d','%s','%s','%d','%s');\n\t\t\t\t\t\t$itemTableFields = implode(',',array_keys($itemData));\n\t\t\t\t\t\t$itemTableFormats = implode(',',$itemFormat);\n\t\t\t\t\t\t$itemOnDuplicateUpdate = '';\n\t\t\t\t\t\t$itemKeyIndex = 0;\n\t\t\t\t\t\tforeach($itemData as $itemKey=>$itemField) {\n\t\t\t\t\t\t\tif($itemKeyIndex>0) { $itemOnDuplicateUpdate .= ', '; }\n\t\t\t\t\t\t\t$itemOnDuplicateUpdate .= $itemKey.'=VALUES('.$itemKey.')';\n\t\t\t\t\t\t\t$itemKeyIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$itemSQL = <<<EOD\n\t\t\t\t\t\tINSERT INTO {$this->wpdb->prefix}topspin_orders_items ({$itemTableFields}) VALUES ({$itemTableFormats})\n\t\t\t\t\t\tON DUPLICATE KEY UPDATE {$itemOnDuplicateUpdate}\nEOD;\n\t\t\t\t\t\t$this->wpdb->query($this->wpdb->prepare($itemSQL,$itemData));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b37ead17547c86618a622179fbf70da9", "score": "0.5411079", "text": "protected function getAllOrders()\n {\n return Order::withTrashed()\n ->with(['address', 'user'])\n ->orderBy('id', 'DESC')\n ->get();\n }", "title": "" }, { "docid": "9e89d84b96ca72d9a4a99b379dae3bb8", "score": "0.5403022", "text": "protected function include_extended_info( &$orders_data, $query_args ) {\n\t\t$mapped_orders = $this->map_array_by_key( $orders_data, 'order_id' );\n\t\t$products = $this->get_products_by_order_ids( array_keys( $mapped_orders ) );\n\t\t$coupons = $this->get_coupons_by_order_ids( array_keys( $mapped_orders ) );\n\t\t$customers = $this->get_customers_by_orders( $orders_data );\n\t\t$mapped_customers = $this->map_array_by_key( $customers, 'customer_id' );\n\n\t\t$mapped_data = array();\n\t\tforeach ( $products as $product ) {\n\t\t\tif ( ! isset( $mapped_data[ $product['order_id'] ] ) ) {\n\t\t\t\t$mapped_data[ $product['order_id'] ]['products'] = array();\n\t\t\t}\n\n\t\t\t$is_variation = '0' !== $product['variation_id'];\n\t\t\t$product_data = array(\n\t\t\t\t'id' => $is_variation ? $product['variation_id'] : $product['product_id'],\n\t\t\t\t'name' => $product['product_name'],\n\t\t\t\t'quantity' => $product['product_quantity'],\n\t\t\t);\n\n\t\t\tif ( $is_variation ) {\n\t\t\t\t$variation = wc_get_product( $product_data['id'] );\n\t\t\t\t$separator = apply_filters( 'woocommerce_product_variation_title_attributes_separator', ' - ', $variation );\n\n\t\t\t\tif ( false === strpos( $product_data['name'], $separator ) ) {\n\t\t\t\t\t$attributes = wc_get_formatted_variation( $variation, true, false );\n\t\t\t\t\t$product_data['name'] .= $separator . $attributes;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$mapped_data[ $product['order_id'] ]['products'][] = $product_data;\n\t\t}\n\n\t\tforeach ( $coupons as $coupon ) {\n\t\t\tif ( ! isset( $mapped_data[ $coupon['order_id'] ] ) ) {\n\t\t\t\t$mapped_data[ $product['order_id'] ]['coupons'] = array();\n\t\t\t}\n\n\t\t\t$mapped_data[ $coupon['order_id'] ]['coupons'][] = array(\n\t\t\t\t'id' => $coupon['coupon_id'],\n\t\t\t\t'code' => wc_format_coupon_code( $coupon['coupon_code'] ),\n\t\t\t);\n\t\t}\n\n\t\tforeach ( $orders_data as $key => $order_data ) {\n\t\t\t$defaults = array(\n\t\t\t\t'products' => array(),\n\t\t\t\t'coupons' => array(),\n\t\t\t\t'customer' => array(),\n\t\t\t);\n\t\t\t$orders_data[ $key ]['extended_info'] = isset( $mapped_data[ $order_data['order_id'] ] ) ? array_merge( $defaults, $mapped_data[ $order_data['order_id'] ] ) : $defaults;\n\t\t\tif ( $order_data['customer_id'] && isset( $mapped_customers[ $order_data['customer_id'] ] ) ) {\n\t\t\t\t$orders_data[ $key ]['extended_info']['customer'] = $mapped_customers[ $order_data['customer_id'] ];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a02339954c9461d96cf823ddbab65087", "score": "0.5398553", "text": "public static function getOrders()\n\t{\n $orders = DB::query(\"SELECT orderproducts.*, products.strName, products.strDescription, products.strFeatures, products.price, products.category_id, products.status_id, orders.totalAmount, orders.date, inventoryproducts.name AS inventoryproductsname\n FROM orderproducts\n LEFT JOIN orders ON orderproducts.orderId=orders.id\n LEFT JOIN products ON orderproducts.productId=products.id\n LEFT JOIN inventoryproducts ON products.inventoryproductsId=inventoryproducts.id\");\n\n // acting as a factory\n // empty array to avoid errors when nothing was found\n\t\t$ordersArray = array();\n\t\tforeach($orders as $order)\n\t\t{\n\t\t\t// create an instance / object for this SPECIFIC \n\t\t\t$ordersArray[] = new OrdersAdmin($order); // put this object onto the array\n }\n\t\t// return the list of objects\n\t\t//return $ordersArray;\n }", "title": "" }, { "docid": "8faaaa364406dc9087f9bc867fc67ce8", "score": "0.53975856", "text": "public function getOrder()\n {\n return $this->getItem()->getOrder();\n }", "title": "" }, { "docid": "57dec076c8ab50c6cd547436e04e2850", "score": "0.5396353", "text": "public function get_supported_orders(\\context $context) {\n $orders = parent::get_supported_orders($context);\n\n // If not within a course, no other kind of sorting supported.\n $coursecontext = $context->get_course_context(false);\n if ($coursecontext) {\n // Within a course or activity/block, support sort by location.\n $orders['location'] = get_string('order_location', 'search',\n $context->get_context_name());\n }\n\n return $orders;\n }", "title": "" }, { "docid": "fcc9958d6f620c2404ff5c836a658611", "score": "0.53956825", "text": "public function orders() {\n if ($this->orders != null)\n return $this->orders;\n $ids = Pdb::fetchAll('small_order', self::$table);\n return $this->orders = safe_array_map(function ($id) { return new Order($id); }, $ids); // no paging here\n }", "title": "" }, { "docid": "e3d2fdd00a21d9fb9bdcc38f83f9fbae", "score": "0.5394526", "text": "protected function getOrders()\n {\n \\Rakuten\\Connector\\Resources\\Log\\Logger::info('Processing initialize in getOrders in Batch.');\n $resource = Mage::getSingleton('core/resource');\n $write = $resource->getConnection('core_write');\n $order = $resource->getTableName('sales/order');\n $rakutenOrder = $resource->getTableName('rakuten_rakutenlogistics/order');\n $payment = $resource->getTableName('sales/order_payment');\n\n $select = $write->select()\n ->from(['order' => $order], ['entity_id', 'increment_id', 'customer_firstname', 'customer_lastname', 'state', 'created_at'])\n ->join(['payment' => $payment], 'order.entity_id = payment.entity_id', ['additional_information'])\n ->join(['rakutenOrder' => $rakutenOrder], 'order.entity_id = rakutenOrder.order_id', ['calculation_code', 'order_id'])\n ->where('DATEDIFF(NOW(), order.created_at) <= ?', $this->days)\n ->where('order.state = ?', Mage_Sales_Model_Order::STATE_PROCESSING);\n\n $data = $write->fetchAll($select);\n foreach ($data as $key => $item) {\n if (!$item['calculation_code']) {\n continue;\n }\n if (!$this->hasBatchCode($item['additional_information'])) {\n $this->orders[$key]['orderId'] = $item['order_id'];\n $this->orders[$key]['incrementId'] = $item['increment_id'];\n $this->orders[$key]['status'] = $item['state'];\n $this->orders[$key]['billingName'] = $item['customer_firstname'] . ' ' . $item['customer_lastname'];\n $createdAt = new \\DateTime($item['created_at']);\n $this->orders[$key]['createdAt'] = $createdAt->format('d/m/Y H:m:s');\n $this->orders[$key]['calculationCode'] = $item['calculation_code'];\n }\n }\n if (count($this->orders)) {\n $this->orders = array_values($this->orders);\n }\n }", "title": "" }, { "docid": "57f51121926b500db0803a564757ddeb", "score": "0.5393176", "text": "public function getOrders()\n {\n $response = $this->orderDesk->get( \"orders\" );\n $orders = $response[ \"orders\" ];\n $values = [];\n\n if (!empty($orders)) {\n foreach ( $orders as $order ) {\n\n $value = [\n $order[\"shipping\"][\"first_name\"],\n $order[\"shipping\"][\"last_name\"],\n $order[\"email\"],\n $order[\"shipping_method\"],\n $order[\"payment_type\"],\n $order[\"order_total\"]\n ];\n \n array_push( $values, $value );\n }\n \n $this->updateGoogleSheets( $values );\n } else {\n return $response['message'];\n }\n }", "title": "" }, { "docid": "080eb0e96ee291a814e73a9b68c4fb8d", "score": "0.53867537", "text": "function woocommerce_export_csv_query($status, $startdate = NULL, $enddate = NULL) {\n\n\t\t\tglobal $wpdb;\n\n\t\t\t$statusquery = '(';\n\n\t\t\tfor ( $i = 0; $i < count( $status ); $i++ ) {\n\t\t\t\tif ( $i == 0 )\n\t\t\t\t\t$statusquery .= $wpdb->prefix . \"terms.name = '\" . $status[$i] . \"'\";\n\t\t\t\telse\n\t\t\t\t\t$statusquery .= \" OR \" . $wpdb->prefix . \"terms.name = '\" . $status[$i] . \"'\";\n\t\t\t}\n\t\t\t$statusquery .= ')';\n\n\t\t\t// Get an array of completed orders (id values)\n\t\t\t$orders_sql = \"SELECT DISTINCT \" . $wpdb->prefix . \"postmeta.post_id AS orders FROM \" . $wpdb->prefix . \"postmeta LEFT JOIN \" . $wpdb->prefix . \"posts ON (\" . $wpdb->prefix . \"postmeta.post_id = \" . $wpdb->prefix . \"posts.ID) LEFT JOIN \" . $wpdb->prefix . \"term_relationships ON (\" . $wpdb->prefix . \"posts.ID = \" . $wpdb->prefix . \"term_relationships.object_id) LEFT JOIN \" . $wpdb->prefix . \"term_taxonomy ON (\" . $wpdb->prefix . \"term_relationships.term_taxonomy_id = \" . $wpdb->prefix . \"term_taxonomy.term_taxonomy_id) LEFT JOIN \" . $wpdb->prefix . \"terms ON (\" . $wpdb->prefix . \"term_taxonomy.term_id = \" . $wpdb->prefix . \"terms.term_id) WHERE \" . $wpdb->prefix . \"posts.post_status = 'publish' AND \" . $wpdb->prefix . \"term_taxonomy.taxonomy = 'shop_order_status' AND \" . $statusquery;\n\t\t\t// Insert start date if provided\n\t\t\tif ($startdate!=NULL) {\n\t\t\t\t$orders_sql .= \" AND DATE_FORMAT(\" . $wpdb->prefix . \"posts.post_date, '%Y-%m-%d') >= '\" . $startdate . \"'\";\n\t\t\t}\n\t\t\t// Insert end date if provided\n\t\t\tif ($enddate!=NULL) {\n\t\t\t\t$orders_sql .= \" AND DATE_FORMAT(\" . $wpdb->prefix . \"posts.post_date, '%Y-%m-%d') <= '\" . $enddate . \"'\";\n\t\t\t}\n\n\t\t\t$orders_sql .= \" ORDER BY orders DESC\";\n\n\t\t\treturn $wpdb->get_results( $orders_sql );\n\n\t\t}", "title": "" }, { "docid": "0bfafeb75e1f2873d9b1cc8048431601", "score": "0.5380949", "text": "public function getOrder()\n {\n \treturn $this->_order;\n }", "title": "" }, { "docid": "e8ab87c6eafb4c7ecbcceb55e314791f", "score": "0.5379606", "text": "public function getOrders() : \\TheCodingMachine\\TDBM\\AlterableResultIterator\n {\n return $this->retrieveManyToOneRelationshipsStorage('orders', 'from__product_id__to__table__products__columns__id', ['orders.product_id' => $this->get('id', 'products')]);\n }", "title": "" }, { "docid": "0a819a61973311c66a88a4b8fca272dd", "score": "0.5375114", "text": "private function GetOrders()\n\t{\t$orders = array();\n\t\t$where = array();\n\t\t\n\t\tif ($this->startdate)\n\t\t{\t$where[] = 'orderdate>=\"' . $this->startdate . ' 00:00:00\"';\n\t\t}\n\t\tif ($this->enddate)\n\t\t{\t$where[] = 'orderdate<=\"' . $this->enddate . ' 23:59:59\"';\n\t\t}\n\t\tif (!$this->showunpaid)\n\t\t{\t$where[] = 'NOT paiddate=\"0000-00-00 00:00:00\"';\n\t\t}\n\t\t\n\t\t$sql = 'SELECT * FROM storeorders';\n\t\tif ($wstr = implode(' AND ', $where))\n\t\t{\t$sql .= ' WHERE ' . $wstr;\n\t\t}\n\t\t$sql .= ' ORDER BY orderdate DESC';\n\t\t\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$orders[$row['id']] = $row;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $orders;\n\t}", "title": "" }, { "docid": "c3d81d725532b7b891f7ab5e502cfd7a", "score": "0.5372503", "text": "private function getOrder($orderoid){\n $rs = selectQuery('select * from WTSORDER where KOID=\"'.$orderoid.'\"');\n if ($rs->rowcount() == 1){\n $ors = $rs->fetch();\n foreach($ors as $k=>$v){\n\t$order->{$k} = $v;\n }\n } else {\n $order = null;\n XLogs::critical(get_class($this), 'Impossible de trouver la commande ayant pour KOID : '.$orderoid);\n }\n return $order;\n }", "title": "" }, { "docid": "9a9017831490f38803ef682739c06a85", "score": "0.5371609", "text": "public function index(Request $request)\n\t{\n\t\t// \n\t\t$queries = [];\n\t\t$columns = ['after', 'before', 'status'];\n\n\t\tforeach ($columns as $column) {\n\t\t\tif (request()->has($column)) {\n\n\t\t\t\t$queries[$column] = request($column);\n\t\t\t}\n\t\t}\n\n\t\t$query = array_merge($request->query(), $queries);\n\n\t\t$page = Paginator::resolveCurrentPage(); // $request->input('page', 1); // Get the current page or default to 1\n\t\t$perPage = intval(\\App\\Configuration::get('WOOC_ORDERS_PER_PAGE'));\t// Waiting for Configuration::get('WOOC_PRODUCTS_PER_PAGE') if needed\n\t\tif ($perPage<1) $perPage=10;\n\t\t$offset = ($page * $perPage) - $perPage;\n\n\t\t// https://stackoverflow.com/questions/39101445/how-to-sort-products-in-woocommerce-wordpress-json-api\n\t\t// https://www.storeurl.com/wc-api/v3/products?orderby=title&order=asc\n\t\t// https://www.storeurl.com/wc-api/v3/products?filter[order]=asc&filter[orderby]=meta_value_num&filter[orderby_meta_key]=_regular_price => the \"Filter\" parameter, which allows you to use any WP_Query style arguments you may want to add to your request\n\t\t$params = [\n\t\t 'per_page' => $perPage,\n\t\t 'page' => $page,\n//\t\t 'status' => 'completed',\n//\t \t'after' => '2017-08-01 00:00:00',\t\t// ISO8601 compliant date\n//\t \t'before' => '2017-12-31T23:59:59',\n//\t \t'after' => $request->input('date_from', '') ? $request->input('date_from').' 00:00:00' : '',\n//\t \t'before' => $request->input('date_to', '') ? $request->input('date_to') .' 23:59:59' : '',\n\t \t'orderby' => 'id',\t\t// Options: date, id, include, title and slug. Default is date.\n\t \t'order' => 'asc',\t\t// Options: asc and desc. Default is desc.\n\t\t];\n\n\t\t// status : any, draft, pending, private and publish. Default is any.\n\t\t// type : simple, grouped, external and variable.\n\n\t\tforeach ($columns as $column) {\n\t\t\tif (request()->has($column) && request($column)) {\n\n\t\t\t\t$params[$column] = request($column);\n\t\t\t}\n\t\t}\n\n\n try {\n\n\t\t\t$results = WooCommerce::get('products', $params);\n\n\t\t}\n\n\t\t\tcatch(WooHttpClientException $e) {\n\n//\t\t\t$e->getMessage(); // Error message.\n\n//\t\t\t$e->getRequest(); // Last request data.\n\n//\t\t\t$e->getResponse(); // Last response data.\n//\t\t\tabi_r($e->getResponse);\n\n\t\t\t$err = '<ul><li><strong>'.$e->getMessage().'</strong></li></ul>';\n\n\t\t\t// Improbe this: 404 doesnot show upper-left logo , and language is English\n\t\t\treturn redirect('404')\n\t\t\t\t->with('error', l('La Tienda Online ha rechazado la conexión, y ha dicho: ') . $err);\n\n\t\t}\n\n\n\t\t// abi_r($results, true);\n\n\n\n\n\n\t\t\n\t\t// So far so good, then\n\t\t$total = WooCommerce::totalResults();\n\n\t\t$products = collect($results);\n\n\t\t// Allready imported? Let's see deeply\n\t\t$first = $products->first()[\"id\"];\n\t\t$last = $products->last()[\"id\"];\n\n\n\t\t$products = new LengthAwarePaginator($products, $total, $perPage, $page, ['path' => $request->url(), 'query' => $query]);\n\n return view('woo_connect::woo_products.index', compact('products', 'query'));\n\t}", "title": "" }, { "docid": "000d0f8140809d69250f6ed987ea2e8c", "score": "0.5370595", "text": "function getAllOrders()\n {\n $dataService = new OrderDataService();\n\n return $dataService->getAllOrders();\n }", "title": "" }, { "docid": "4630c50e8edbbd5461ddb814622ed44a", "score": "0.5364109", "text": "public function getOrder(): array;", "title": "" }, { "docid": "dd17095762e727cadea16c8887171290", "score": "0.5357776", "text": "public function buyer_orders()\n {\n $query = $this->db->where('buyer_id', $this->current_user->user_id)\n ->order_by('time desc')\n //->order_by('progress asc, time desc')\n ->get('orders');\n #echo $this->db->last_query();\n return ($query->num_rows() > 0) ? $this->build_array($query->result_array()) : array();\n\n }", "title": "" }, { "docid": "26574403eb77b88916a893d18186ff5b", "score": "0.5351664", "text": "public function findAllOrders()\n {\n return $this->createQueryBuilder('o')\n ->orderBy('o.createdDate' , 'DESC');\n }", "title": "" }, { "docid": "95bb245c6ecc7213d75b8b75fdeaddb1", "score": "0.5351619", "text": "function getOrderingAndPlaygroundQuery()\n\t{\n\t\treturn 'SELECT ordering AS value,name AS text FROM #__joomleague_playground ORDER BY ordering';\n\t}", "title": "" }, { "docid": "9e89d7d65322a5c5a5ce4f0c61f07b05", "score": "0.53481233", "text": "public function getOrder()\n {\n return $this->_order;\n }", "title": "" }, { "docid": "8015ace537f335f965a05422d35d076b", "score": "0.5344988", "text": "public function getOrder()\n {\n return $this->order;\n }", "title": "" }, { "docid": "8015ace537f335f965a05422d35d076b", "score": "0.5344988", "text": "public function getOrder()\n {\n return $this->order;\n }", "title": "" }, { "docid": "8015ace537f335f965a05422d35d076b", "score": "0.5344988", "text": "public function getOrder()\n {\n return $this->order;\n }", "title": "" }, { "docid": "8015ace537f335f965a05422d35d076b", "score": "0.5344988", "text": "public function getOrder()\n {\n return $this->order;\n }", "title": "" }, { "docid": "8015ace537f335f965a05422d35d076b", "score": "0.5344988", "text": "public function getOrder()\n {\n return $this->order;\n }", "title": "" }, { "docid": "8015ace537f335f965a05422d35d076b", "score": "0.5344988", "text": "public function getOrder()\n {\n return $this->order;\n }", "title": "" }, { "docid": "8015ace537f335f965a05422d35d076b", "score": "0.5344988", "text": "public function getOrder()\n {\n return $this->order;\n }", "title": "" }, { "docid": "8015ace537f335f965a05422d35d076b", "score": "0.5344988", "text": "public function getOrder()\n {\n return $this->order;\n }", "title": "" }, { "docid": "8015ace537f335f965a05422d35d076b", "score": "0.5344988", "text": "public function getOrder()\n {\n return $this->order;\n }", "title": "" }, { "docid": "8015ace537f335f965a05422d35d076b", "score": "0.5344988", "text": "public function getOrder()\n {\n return $this->order;\n }", "title": "" }, { "docid": "8015ace537f335f965a05422d35d076b", "score": "0.5344988", "text": "public function getOrder()\n {\n return $this->order;\n }", "title": "" }, { "docid": "3b82e3e4aaffd3d5374994ce0ff3655b", "score": "0.5342584", "text": "public static function getDeals() {\n\t\t\tglobal $dealofday;\n\t\t\t$args = array();\n\t\t\t$args['post_type'] = 'product';\n\t\t\t$args['meta_key'] = 'dod_is_in_dod';\n\t\t\t$args['meta_value'] = 'on';\n\t\t\t$args['orderby'] = \"menu_order\";\n\t\t\t$args['order'] = 'ASC';\n\t\t\tadd_filter('posts_results', array(&$dealofday, 'order_by_featured'), PHP_INT_MAX, 2);\n\t\t\treturn new WP_Query($args);\n\t\t}", "title": "" }, { "docid": "309f468b32d220e8af282fa2542e66f4", "score": "0.53386444", "text": "public function get_waiting_orders()\n\t{\n\t\treturn get_posts(array(\n\t\t\t'posts_per_page' => -1,\n\t\t\t'orderby' => 'date',\n\t\t\t'order' => 'DESC',\n\t\t\t'meta_query' => array(\n\t\t\t\t'relation' => 'OR',\n\t\t\t\tarray(\n\t\t\t\t\t'key' => '_kd_letters_generated',\n\t\t\t\t\t'compare' => 'NOT EXISTS'\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'key' => '_kd_letters_generated',\n\t\t\t\t\t'value' => '0'\n\t\t\t\t)\n\t\t\t),\n\t\t\t'post_type' => 'order_paysera'\n\t\t));\n\t}", "title": "" }, { "docid": "3de305664509e82394d44cae676b1932", "score": "0.5337877", "text": "public function getOrder()\n {\n return $this->coreRegistry->registry('current_order');\n }", "title": "" }, { "docid": "9bbf02aa568a334e6a5e4e0eb28beb6d", "score": "0.5324727", "text": "public static function getRecentDoneOrders() {\n\n\t\treturn Order::fullActive()\n\t\t\t\t\t->where('state', '=', '3')\n\t\t\t\t\t->orderBy('date', 'desc')\n\t\t\t\t\t->take(10)\n\t\t\t\t\t->get();\n\t}", "title": "" }, { "docid": "d6af57199a7deb2d9c2633fd783225e1", "score": "0.53208137", "text": "public function getAvailableOrders()\n {\n return [\n 'name-asc' => 'from-a-z',\n 'name-desc' => 'from-z-a',\n 'created_at-desc' => 'newest-first',\n 'created_at-asc' => 'oldest-first',\n 'price-asc' => 'cheapest-first',\n 'price-desc' => 'expensive-first'\n ];\n }", "title": "" }, { "docid": "9a0a1fa3a21fce7ab7769ec4068a9dcf", "score": "0.5319388", "text": "function getOrder(){\n\t\treturn $this->order;\n\t}", "title": "" }, { "docid": "c4b1ae4e99e2eeba9e307f94b491a0ff", "score": "0.5316014", "text": "public function getOrder ()\r\n\t{\r\n\t\treturn $this->order;\r\n\t}", "title": "" }, { "docid": "2fa80541fcf8ab0701a611054555e16d", "score": "0.5310948", "text": "private static function getAllNewSystem(): array\n {\n $args = [\n 'post_status' => self::$ordersStatuses,\n 'posts_per_page' => self::$limit,\n 'paged' => self::$currentPage,\n 'orderby' => 'date',\n 'paginate' => true,\n 'order' => 'DESC',\n 'meta_query' => [\n 'relation' => 'OR',\n [\n 'key' => '_moloni_sent',\n 'compare' => 'NOT EXISTS'\n ],\n [\n 'key' => '_moloni_sent',\n 'value' => '0',\n 'compare' => '='\n ]\n ],\n ];\n\n $args = apply_filters('moloni_before_pending_orders_fetch', $args);\n\n $results = wc_get_orders($args);\n\n self::$totalPages = $results->max_num_pages;\n\n return $results->orders;\n }", "title": "" }, { "docid": "baf69af5d7295d820813d9d5af5f9c1f", "score": "0.5303513", "text": "public function getOrderDetails()\n {\n return Orders::getOrderdetails($this->getOrderId());\n }", "title": "" } ]
7e4f9c6c940b3103b72b3c7ea36ce2a9
We do not use the "USE " to keep the connection stateless and reusable, but maybe will implement connection pool or open/close new connection later if needed
[ { "docid": "9d605bd38e1a2f86e24f21efc2a59432", "score": "0.0", "text": "public function getConnection(): \\PDO\n {\n if (!isset(self::$connection)) {\n throw new \\PDOException('You must first call ::connect() to create a working connection!');\n }\n\n return self::$connection;\n }", "title": "" } ]
[ { "docid": "fa3e817aed8fcf47ca0cf907abee15d7", "score": "0.7149987", "text": "protected abstract function getConnection();", "title": "" }, { "docid": "19a0652e98e3be8a1ef43f3191d61602", "score": "0.7102806", "text": "private function returnConnection(): void\n {\n if ($this->transaction !== null || $this->transactionLevel > 0) {\n return;\n }\n\n if ($this->connection !== null) {\n $connection = $this->connection;\n $this->connection = null;\n\n $this->pool->push($connection);\n }\n }", "title": "" }, { "docid": "733d7d192d4df02da63f2e5ac44a2882", "score": "0.6984906", "text": "abstract public function getConnection();", "title": "" }, { "docid": "9b6ef5dfb6b795a70ba32f004e0fea16", "score": "0.67868304", "text": "protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "title": "" }, { "docid": "24e11e3a5e55b6733bece9818b33aba4", "score": "0.67629844", "text": "protected function createDatabaseConnection()\n\t{\n\t\t$this->dbConnectionPool = new \\Bitrix\\Main\\Data\\ConnectionPool();\n\t}", "title": "" }, { "docid": "c10bcfa70c08f50e6ac116b1ad4c9834", "score": "0.67485017", "text": "public function putConnection(): void\n {\n $this->pool->putConn($this->conn);\n }", "title": "" }, { "docid": "bf84b650953ecf32bf6d60e1176b7ed3", "score": "0.67077386", "text": "abstract protected function createConnection();", "title": "" }, { "docid": "413d66cf42ddac2c3ea302c11e2dff60", "score": "0.6689916", "text": "public function getConnection();", "title": "" }, { "docid": "413d66cf42ddac2c3ea302c11e2dff60", "score": "0.6689916", "text": "public function getConnection();", "title": "" }, { "docid": "413d66cf42ddac2c3ea302c11e2dff60", "score": "0.6689916", "text": "public function getConnection();", "title": "" }, { "docid": "413d66cf42ddac2c3ea302c11e2dff60", "score": "0.6689916", "text": "public function getConnection();", "title": "" }, { "docid": "413d66cf42ddac2c3ea302c11e2dff60", "score": "0.6689916", "text": "public function getConnection();", "title": "" }, { "docid": "fa153c74e6de581fa9c6b57f427b9137", "score": "0.66513675", "text": "public function getConnection()\n {\n return;\n }", "title": "" }, { "docid": "e513f97411a4a8c5cac490844be5c96e", "score": "0.6596752", "text": "function &getConnection()\n\t{\n\t\t$this->_oConn = FabrikWorker::getConnection($this->getTable());\n\t\treturn $this->_oConn;\n\t}", "title": "" }, { "docid": "f41e7bc6c3365be2a9458598cc959ae1", "score": "0.65735376", "text": "private static function getConnection()\n\t{\n\t\t$pool = Application::getInstance()->getConnectionPool();\n\t\t$connection = $pool->getConnection(static::CONNECTION_NAME);\n\t\tif (!$connection)\n\t\t{\n\t\t\t$connection = $pool->cloneConnection(\n\t\t\t\t$pool::DEFAULT_CONNECTION_NAME,\n\t\t\t\tstatic::CONNECTION_NAME\n\t\t\t);\n\t\t}\n\n\t\treturn $connection;\n\t}", "title": "" }, { "docid": "13811527ffd38c087318ce918ed8788d", "score": "0.65589124", "text": "function &getConnection(){\r\n\t\tdie('Not implemented');\r\n\t}", "title": "" }, { "docid": "dd2adeb0008f579947936bc245029436", "score": "0.65462875", "text": "public abstract function new_connection();", "title": "" }, { "docid": "0298eb64c1494ad282cc1df2c8102956", "score": "0.6522469", "text": "public function getConnection(){\n\t\t\tif (self::$db) {\n\t\t\t\treturn self::$db;\n\t\t\t} else {\n\t\t\t\t$this->Connection();\n\t\t\t\treturn self::$db;\n\t\t\t}\n\t }", "title": "" }, { "docid": "95a3abeaa9d3b5d795e9435ce9145dd7", "score": "0.6489678", "text": "protected function _getConnection() {\n if ( empty( self::$_Connection ) || !is_resource( self::$_Connection->connection ) ) {\n self::getInstance( self::$_MemCachePool );\n }\n\n return self::$_Connection;\n }", "title": "" }, { "docid": "a9903ac8e675c16e992804407e92cf78", "score": "0.646407", "text": "public function connection(?string $name = null): ConnectionInterface\n {\n if (is_null($name)) {\n $name = $this->getDefaultConnection();\n }\n\n $connection = null;\n $id = $this->getContextKey($name);\n if (Context::has($id)) {\n $connection = Context::get($id);\n }\n\n if (! $connection instanceof ConnectionInterface) {\n $pool = $this->factory->getPool($name);\n $connection = $pool->get();\n try {\n // PDO is initialized as an anonymous function, so there is no IO exception,\n // but if other exceptions are thrown, the connection will not return to the connection pool properly.\n $connection = $connection->getConnection();\n Context::set($id, $connection);\n } finally {\n if (Coroutine::inCoroutine()) {\n defer(function () use ($connection, $id) {\n Context::set($id, null);\n $connection->release();\n });\n }\n }\n }\n\n return $connection;\n }", "title": "" }, { "docid": "59d9d17c86a402e0c41315e5f1ab69fc", "score": "0.6448678", "text": "protected function _connect()\r\n {\r\n if (is_resource($this->_connection)) {\r\n // connection already exists\r\n return;\r\n }\r\n\r\n if($this->_config['persistent']) {\r\n // use persistent connection\r\n $conn_func_name = 'odbtp_connect';\r\n } else {\r\n // use \"normal\" connection\r\n $conn_func_name = 'odbtp_connect';\r\n }\r\n\r\n if (!isset($this->_config['options'])) {\r\n // config options were not set, so set it to an empty array\r\n $this->_config['options'] = array();\r\n }\r\n\r\n if (!isset($this->_config['options']['autocommit'])) {\r\n // set execution mode\r\n $this->_config['options']['autocommit'] = &$this->_execute_mode;\r\n }\r\n \r\n $dbname = 'DRIVER={SQL Server}' .\r\n ';DATABASE='\t. $this->_config['dbname'] .\r\n ';SERVER=' \t. $this->_config['server'] .\r\n ';UID=' \t\t. $this->_config['username'] .\r\n ';PWD=' \t\t. $this->_config['password'] .';';\r\n $this->_connection = $conn_func_name($this->_config['host'], $dbname);\r\n \r\n // check the connection\r\n if (!$this->_connection) {\r\n throw new Liquid_Db_Adapter_Odbtp_Exception(odbtp_get_error($this->_connection));\r\n }\r\n }", "title": "" }, { "docid": "12ebc5e0a27c0ead218e350fa55ebb46", "score": "0.64464015", "text": "public function getConnection()\n {\n }", "title": "" }, { "docid": "2dfc05772521f05a6b422a437cda5a52", "score": "0.6435963", "text": "abstract function open_connection();", "title": "" }, { "docid": "72b20404b03c451e4414925ded12e52a", "score": "0.6420714", "text": "private static function setConnection( ) {\n\t\t$db_config = \\core\\Smrt_DBConfig::get();\n\t\t$factory = new \\core\\Smrt_DBFactory($db_config);\n\t\tself::$connection= $factory->get();\n\n\t}", "title": "" }, { "docid": "f99ff68ec85b23fb9213ee457f40903e", "score": "0.6420104", "text": "public static function getConnection()\n\t\t\t\t{\n \n\t\t\t\t//Guarantees single instance, if no connection object exists then create one.\n\t\t\t\tif (!self::$db)\n\t\t\t\t\t{\n\t\t\t\t\t//new connection object.\n\t\t\t\t\tnew dbConn();\n\t\t\t\t\t}\n \n\t\t\t\t//return connection.\n\t\t\t\treturn self::$db;\n\t\t\t\t}", "title": "" }, { "docid": "183f78b599fe3b344c53b84b5c33f3b7", "score": "0.6419156", "text": "public function getConnection() {\n//\t\tif ($this->conn == NULL) {\n//\t\t\tif (self::$pdo == NULL) {\n//\t\t\t\tself::$pdo = new PDO($GLOBALS['DB_DSN'], $GLOBALS['DB_USER'], $GLOBALS['DB_PWD']);\n//\t\t\t\t\n//\t\t\t\t// in order to work with InnoDB. Disable the foreign key checks \n//\t\t\t\tself::$pdo->exec('SET FOREIGN_KEY_CHECKS=0');\n//\t\t\t}\n//\t\t\t\n//\t\t\t$this->conn = $this->createDefaultDBConnection(self::$pdo, $GLOBALS['DB_DBNAME']);\n//\t\t}\n\n\t\tif ($this->conn == NULL) {\n\t\t\tif ($this->pdo == NULL) {\n\t\t\t\t$this->pdo = new PDO($GLOBALS['DB_DSN'], $GLOBALS['DB_USER'], $GLOBALS['DB_PWD']);\n\t\t\t\t\n\t\t\t\t// in order to work with InnoDB. Disable the foreign key checks \n\t\t\t\t$this->pdo->exec('SET FOREIGN_KEY_CHECKS=0');\n\t\t\t}\n\t\t\t\n\t\t\t$this->conn = $this->createDefaultDBConnection($this->pdo, $GLOBALS['DB_DBNAME']);\n\t\t}\n\t\t\n\t\treturn $this->conn;\n\t}", "title": "" }, { "docid": "7d3774ebb86abc2f04270e2e82f631d8", "score": "0.64067763", "text": "private function getConnectionInstant(){\r\n\t\tif(!$this->connection){\r\n\t\t\t$pdo=new PDO('mysql:host=localhost;dbname=news_db;charset=utf8mb4','root','root');\r\n\t\t\t$this->connection=$pdo;\r\n\t\t}\r\n\t\treturn $this->connection;\r\n\t}", "title": "" }, { "docid": "f2e31c807fbdb5489ae206f861bd543c", "score": "0.63721156", "text": "public function connection($name = null)\n {\n $name = $name ?: $this->getDefaultConnection();\n\n if (! $this->isPoolConnection($name)) {\n return parent::connection($name);\n }\n\n if ($connection = $this->getConnectionFromContext($name)) {\n return $connection;\n }\n\n return $this->getConnectionFromPool($name);\n }", "title": "" }, { "docid": "51dda6ea82e9d29da339f5867754ba05", "score": "0.6346862", "text": "function connect()\n {\n // Note: the only reason we keep this variable is for getLastId()\n if (empty($this->db)) {\n $this->db = xarDB::getConn();\n }\n }", "title": "" }, { "docid": "b16132b723900b55ea5d57f567d6b3b9", "score": "0.63339835", "text": "private function open_connection() {\r\n\t\t//$this->conn = new mysqli($this->db_host, $this->db_user,$this->db_pass, $this->db_name);\r\n\t\t$this->conn = new mysqli(null,$this->db_user,$this->db_pass, $this->db_name,null,'/cloudsql/crucial-bonito-58:inicio');\r\n\t\t//self::$db_pass, $this->db_name);\r\n\t\t$this->rows=null;\r\n\t\t$this->rows=array();\r\n\t}", "title": "" }, { "docid": "17cef2b1bef872840cfebc6ae4bd721b", "score": "0.63198084", "text": "protected function getConnection(){\r\n\r\n return $this->connectionHandle;\r\n }", "title": "" }, { "docid": "df015ae5f865fdbac99fe9ef93c77892", "score": "0.6310885", "text": "static function getConnection() {\n return mysqli_connect(self::$host, self::$username, self::$password, self::$dbname);;\n }", "title": "" }, { "docid": "d6ed67cfbde46762a292cd8631f810ed", "score": "0.63028675", "text": "private function getConnection(){\n \n try {\n $conn = new PDO(\"mysql:host=$this->servername;dbname=$this->dbName\", $this->username, $this->password);\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n catch(PDOException $e)\n {\n echo \"Connection failed: \" . $e->getMessage();\n }\n finally{\n return $conn;\n }\n }", "title": "" }, { "docid": "7fd2ec05ba521b092204ae71f53ae678", "score": "0.6272133", "text": "private function connect() \n\t{\n\t\ttry {\n\t\t\tif ($this->usepool) {\n\t\t\t\t$this->redis = new \\redisProxy();\n\t\t\t} else {\n\t\t\t\t$this->redis = new \\Redis();\n\t\t\t}\n\n\t\t\t$this->redis->connect(self::$host, self::$port, 0);\n\t\t} catch (\\RedisException $e) {\n\t\t\t$this->dealErrorInfo($e);\n\t\t}\n\t}", "title": "" }, { "docid": "3f62d00bfb5fc464030515dc04cad49b", "score": "0.627064", "text": "public function getConnection(){ $this->conn = null;\n\n $this->conn = @new mysqli(\"localhost\", \"Issues\", \"root\", \"\");\n// $this->conn = new mysqli($this->$host, $this->$username, $this->$password, $this->$db_name);\n if ($mysqli->connect_error) {\n die('Connect Error: ' . $mysqli->connect_error);\n }\n\n return $this->conn;\n }", "title": "" }, { "docid": "a36e591b6739e704a1c5b316497f360a", "score": "0.62694037", "text": "public function getConnection \n ()\n {\n return $this->db;\n }", "title": "" }, { "docid": "c1e51dfd539d2ff0e0cdc57066af32cf", "score": "0.626489", "text": "private function bindConnection()\n\t{\n\t\t$this->app->singleton('psychic.conn', function()\n\t\t{\n\t\t\t$defaultConnection = $this->app['config']->get('database.default');\n\t\t\t$connections = $this->app['config']->get('database.connections');\n\t\t\t$connection = $connections[$defaultConnection];\n\t\t\t\n\t\t\t$config = new \\Doctrine\\DBAL\\Configuration();\n\t\t\t$connectionParams = array(\n\t\t\t\t\t'dbname' => $connection['database'],\n\t\t\t\t\t'user' => $connection['username'],\n\t\t\t\t\t'password' => $connection['password'],\n\t\t\t\t\t'host' => $connection['host'],\n\t\t\t\t\t'driver' => 'pdo_mysql',\n\t\t\t);\n\t\t\treturn \\Doctrine\\DBAL\\DriverManager::getConnection($connectionParams, $config);\n\t\t});\n\t}", "title": "" }, { "docid": "8cf397b5da0c25cc9a87f61390a3bb59", "score": "0.6262664", "text": "private function connect(): Adapter {\n // connect\n if (isset($this->connectionParams['dbType']) && isset($this->connectionParams['dbHostName']) &&\n isset($this->connectionParams['dbUserName']) && isset($this->connectionParams['dbPassword']) &&\n isset($this->connectionParams['dbName'])) {\n\n $dbType = strtolower($this->connectionParams['dbType']);\n $this->isFileDB = $dbType == 'sqlite' && strtolower($this->connectionParams['dbName']) != ':memory:';\n\n $this->connId = join(',', [$this->connectionParams['dbType'], $this->connectionParams['dbHostName'],\n $this->connectionParams['dbUserName'], $this->connectionParams['dbPassword'], $this->connectionParams['dbName'],\n // make sure that the sequence mapper uses it's own connection for separate transaction management\n (!$this->isFileDB && $this->getType() == $this->getSequenceMapper()->getType())\n ]);\n\n // reuse an existing adapter if possible\n if (isset(self::$adapters[$this->connId])) {\n $this->adapter = self::$adapters[$this->connId];\n }\n else {\n try {\n $charSet = isset($this->connectionParams['dbCharSet']) ?\n $this->connectionParams['dbCharSet'] : 'utf8';\n\n // create new connection\n $pdoParams = [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION];\n // driver specific\n switch ($dbType) {\n case 'mysql':\n $pdoParams[PDO::MYSQL_ATTR_USE_BUFFERED_QUERY] = true;\n $pdoParams[PDO::MYSQL_ATTR_INIT_COMMAND] = \"SET NAMES \".$charSet;\n break;\n case 'sqlite':\n if (!$this->isFileDB) {\n $pdoParams[PDO::ATTR_PERSISTENT] = true;\n }\n else {\n $this->connectionParams['dbName'] = FileUtil::realpath(WCMF_BASE.$this->connectionParams['dbName']);\n }\n break;\n }\n\n $params = [\n 'hostname' => $this->connectionParams['dbHostName'],\n 'username' => $this->connectionParams['dbUserName'],\n 'password' => $this->connectionParams['dbPassword'],\n 'database' => $this->connectionParams['dbName'],\n 'driver' => 'Pdo_'.ucfirst($this->connectionParams['dbType']),\n 'driver_options' => $pdoParams\n ];\n\n if (!empty($this->connectionParams['dbPort'])) {\n $params['port'] = $this->connectionParams['dbPort'];\n }\n $this->adapter = new Adapter($params);\n\n // store the connection for reuse\n self::$adapters[$this->connId] = $this->adapter;\n }\n catch(\\Exception $ex) {\n throw new PersistenceException(\"Connection to \".$this->connectionParams['dbHostName'].\".\".\n $this->connectionParams['dbName'].\" failed: \".$ex->getMessage());\n }\n }\n // get database prefix if defined\n if (isset($this->connectionParams['dbPrefix'])) {\n $this->dbPrefix = $this->connectionParams['dbPrefix'];\n }\n }\n else {\n throw new IllegalArgumentException(\"Wrong parameters for constructor.\");\n }\n assert(!is_null($this->adapter));\n return $this->adapter;\n }", "title": "" }, { "docid": "2d291750b44187e6d34c113e3e860e9d", "score": "0.625678", "text": "public function createConnection()\n\t\t{\n\n\t\t\tif ($this->hasConnection() == true)\n\t\t\t{\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->memcache->connect(Settings::setting('memcache_address'), Settings::setting('memcache_port'), Settings::setting('memcache_timeout'));\n\t\t}", "title": "" }, { "docid": "7a6a609b4e87ca1e872d5c15708f606d", "score": "0.6244627", "text": "public function db() : Connection { return $this->conn; }", "title": "" }, { "docid": "22c2157ba221d6eb9f8a45b9eb229b5f", "score": "0.62252206", "text": "public function getConnection(){\n\n $this->conn = null;\n\n try {\n $this->conn = new PDO(\"mysql:host=\" . $this->dbhost . \";dbname=\" . $this->dbname, $this->uid, $this->upw);\n }\n catch (PDOException $exception) { echo \"Connection error: \" . $exception ->getMessage(); }\n\n return $this->conn;\n }", "title": "" }, { "docid": "ccad6d2c9a5205d3644ada7ba5d4e2aa", "score": "0.62237215", "text": "public function getConnection()\n {\n return $this->_conn;\n }", "title": "" }, { "docid": "ccad6d2c9a5205d3644ada7ba5d4e2aa", "score": "0.62237215", "text": "public function getConnection()\n {\n return $this->_conn;\n }", "title": "" }, { "docid": "b2b06f50ad0852c90d46235a4e88df4d", "score": "0.6213003", "text": "private function openConnection()\n {\n $this->reset();\n if(!isset($this->dbh))\n $this->dbh = new \\PDO($this->s_dns, $this->s_username, $this->s_password, array(\\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION)); \n\n \n }", "title": "" }, { "docid": "58c7b63ac4fee40cd37e650ba508e666", "score": "0.6206091", "text": "public function getMasterConnection() : Awaitable\n {\n return $this->getConnectionPool()->getConnection();\n //$this->open();\n //return $this->pdo;\n }", "title": "" }, { "docid": "41b048c51171996f51558497eec5abab", "score": "0.62060684", "text": "private function getConnection(){\n return $this->_connection;\n }", "title": "" }, { "docid": "dc0d549bb552bcc9d21776e4413efee6", "score": "0.620395", "text": "protected function getConnection()\n\t{\n\t\treturn $this->createDefaultDBConnection(TEST_DB_PDO(), TEST_GET_DB_INFO()->name);\n\t}", "title": "" }, { "docid": "dc0d549bb552bcc9d21776e4413efee6", "score": "0.620395", "text": "protected function getConnection()\n\t{\n\t\treturn $this->createDefaultDBConnection(TEST_DB_PDO(), TEST_GET_DB_INFO()->name);\n\t}", "title": "" }, { "docid": "2b4d7d5164df427515552a3d97e4878d", "score": "0.62038106", "text": "public function getConnection(){\n\n $this->conn = null;\n \n try{\n $this->conn = new PDO(\"mysql:host=\" . $this->host . \";dbname=\" . $this->db_name, $this->username, $this->password);\n $this->conn->exec(\"set names utf8\");\n }catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage();\n }\n \n return $this->conn;\n }", "title": "" }, { "docid": "42b62d7cb93fadd5b3f48648afc41361", "score": "0.62005806", "text": "public function resolveConnection();", "title": "" }, { "docid": "1e854737d44f30974327b5103bdc1791", "score": "0.6199885", "text": "public function getConnection(){\n $this->db->getConnection();\n }", "title": "" }, { "docid": "f42775de58e70ff73bbf37fc06c50d04", "score": "0.61978257", "text": "public function getConnection()\n\t\t{\n\t\t\tif (empty($this->conn))\n\t\t\t\t$this->conn = Database::getInstance();\n\t\t\t\n\t\t\treturn $this->conn;\n\t\t}", "title": "" }, { "docid": "13665799aac709e2cf4fdf5ffd0931fa", "score": "0.6176516", "text": "public function getConnection()\n {\n if (($this->connection == null) && ($this->connectionString != ''))\n {\n try\n {\n $this->connection = Creole::getConnection($this->connectionString, Creole::PERSISTENT);\n $this->DSN = $this->connection->getDSN();\n \n // Initialize connection?\n if (!isset(self::$initializedConnections[$this->connectionString]))\n {\n // ensure utf-8 is used as default encoding\n // set traditional mode (i.e. non strict) for Creole compatibility\n // also, don't trace those statements\n $debug = $this->debug;\n $this->debug = false;\n $this->executeStatement(\"SET NAMES 'UTF8'\", null, false);\n $this->executeStatement(\"SET sql_mode=''\", null, false);\n self::$initializedConnections[$this->connectionString] = 1;\n $this->debug = $debug;\n }\n }\n catch(SqlException $se)\n {\n $this->lastErrorMsg = 'getConnection (' . $this->connectionString . ') :: ' . $se->getMessage();\n $this->lastErrorMsg .= ' ' . $se->getNativeError();\n $this->logger->logError($this->lastErrorMsg);\n return null;\n }\n catch(Exception $e)\n {\n $this->lastErrorMsg = 'getConnection (' . $this->connectionString . ') :: ' . $e->getMessage();\n $this->logger->logError($this->lastErrorMsg);\n return null;\n }\n }\n\n\n return $this->connection;\n }", "title": "" }, { "docid": "9a5d116f5a202fcde463c49383b2a830", "score": "0.6176064", "text": "public function getConnection() {\n \n $this->connection = null;\n \n try {\n $this->connection = new PDO(\"mysql:host=\" . $this->host . \";port=\" . $this->port . \";dbname=\" . $this->db_name . \";charset=\" . $this->charset, $this->username, $this->password);\n } catch(PDOException $exception) {\n echo \"Connection error: \" . $exception->getMessage();\n }\n \n return $this->connection;\n }", "title": "" }, { "docid": "0019bfd635fcb29cfe906b052fcd03ca", "score": "0.61744696", "text": "private function open_connection() {\r\n $this->conn = new mysqli(self::$db_host, self::$db_user, self::$db_pass, $this->db_name);\r\n }", "title": "" }, { "docid": "97386c807467aef5a2eacf4118b75317", "score": "0.6166708", "text": "public function getConnection(){ $this->conn = null;\n\n try{\n $this->conn = new PDO(\"mysql:host=\" . $this->host . \";dbname=\" . $this->db_name.\";charset=UTF8\", $this->username, $this->password);\n }catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage();\n }\n\n return $this->conn;\n }", "title": "" }, { "docid": "a1cbe4452b5a880ad6f7595b158169e0", "score": "0.61631644", "text": "static function getInstace()\n\t{\n\t\tif (self::$connection == NULL)\n\t\t{\n\t\t\tinclude_once('helpers/dbconnector.php');\n\t\t\tself::$connection = connect(); //LOLWOOT\n\t\t}\n\t\treturn self::$connection;\n\t}", "title": "" }, { "docid": "6381ac20699bf34ceb05809a27222228", "score": "0.6162837", "text": "protected static function getConn() {\n return self::Conectar();\n }", "title": "" }, { "docid": "c088f1000d3c77e8ade8ff43244b5a7d", "score": "0.6155627", "text": "public static function getConnection() {\n //Guarantees single instance, if no connection object exists then create one.\n if (!self::$db) {\n //new connection object.\n new dbConn();\n }\n //return connection.\n return self::$db;\n }", "title": "" }, { "docid": "14dc4ed89bf371d18e45b219e70c1edd", "score": "0.61488706", "text": "public static function getConnection()\n {\n\n //Guarantees single instance, if no connection object exists then create one.\n if (!self::$db) {\n //new connection object.\n new dbConn();\n }\n\n //return connection.\n return self::$db;\n }", "title": "" }, { "docid": "d859a0d9de41e84fca624cb3d01dbcae", "score": "0.61398774", "text": "public static function getConnection()\r\n {\r\n return static::$db;\r\n }", "title": "" }, { "docid": "42757c168d1a83de139c0b40ee357b30", "score": "0.613938", "text": "public function getConnection()\n {\n return $this->db;\n }", "title": "" }, { "docid": "be48e3b1213ad40b1d2001d81868f4ea", "score": "0.6136829", "text": "public function connect() {\n Global $APPLOG;\n\n \t$h = self::host;\n \t$u = self::user;\n \t$p = self::pass;\n \t$d = self::dbname;\n\n \ttry {\n /* \"pgsql:dbname=$dbname;host=$dbhost\", \"$dbuser\", \"$dbpass\" */\n \t $this->conn = new PDO(\"pgsql:dbname=$d;host=$h\", $u, $p, array(PDO::ATTR_PERSISTENT => self::connection_pool));\n \t} catch(PDOException $e){\n \t\tif ($this->debug == true)\n \t\t{\n echo $e->getMessage();\n $APPLOG->debug($e->getMessage());\n \t\t}\n }\n \treturn $this->conn;\n }", "title": "" }, { "docid": "447844c0626dc4dc25f0bbe3beb42d89", "score": "0.6134765", "text": "abstract protected function openConnection(): void;", "title": "" }, { "docid": "9aac8f20354b5c4baa3a310a85449615", "score": "0.61312664", "text": "public function refreshDBConn() {\n self::$instance = null;\n self::$instance = new self();\n }", "title": "" }, { "docid": "00369a115df67a6039d3345131f2598a", "score": "0.61278874", "text": "private function open_connection() {\n $this->conn = new mysqli (self::$db_host, self::$db_user, self::$db_pass, $this->db_name);\n }", "title": "" }, { "docid": "f89b1ce6a8d5a35e4a9a21b0eff50c48", "score": "0.61244535", "text": "public function getConnection(){\r\n \r\n $this->conn = null;\r\n \r\n try{\r\n $this->conn = new PDO(\"mysql:host=\" . $this->host . \";dbname=\" . $this->db_name, $this->username, $this->password);\r\n }catch(PDOException $exception){\r\n echo \"Connection error: \" . $exception->getMessage();\r\n }\r\n \r\n return $this->conn;\r\n }", "title": "" }, { "docid": "49af6ab9157e4590d81ff1673d431471", "score": "0.611621", "text": "function db() {\n\t\tif (!$this->db) {\n\t\t\tglobal $GLOBAL_CONNECTION;\n\t\t\t\n\t\t\tif (!$GLOBAL_CONNECTION || $GLOBAL_CONNECTION == 'FALHA') {\n\t\t\t\t$GLOBAL_CONNECTION = ADONewConnection(DBType);\n\t\t\t\t$GLOBAL_CONNECTION->Connect(DBServer, DBUser, DBPassword, DBDatabase);\n\t\t\t}\n\t\t\t\n\t\t\t$this->db = $GLOBAL_CONNECTION;\n\t\t}\n\n\t\t$this->setTransaction();\n\t}", "title": "" }, { "docid": "b1eb403c53603c20281172ada15aa2c3", "score": "0.61136675", "text": "public function getConnection()\n\t{\n\t\treturn $this->db;\n\t}", "title": "" }, { "docid": "6e72052e5a88c693a30eff2ba1c0fc8c", "score": "0.6110235", "text": "public function _connect() {\r\n try{\r\n $this->_sqlLink = new mysqli($this->_sqlHost, $this->_sqlUser, $this->_sqlPass, $this->_sqlDB);\r\n } catch (\\Exception $e){\r\n XWork\\Errors::launch($e);\r\n }\r\n return $this;\r\n }", "title": "" }, { "docid": "4a7ad61fc0484aec1f15b22457d79d09", "score": "0.6108244", "text": "private static function getConnection()\n {\n if (! self::$connection) {\n $accessData = require_once(__DIR__ . '/../Config/Database.php');\n\n $dsn = \"{$accessData['driver']}:host={$accessData['host']};dbname={$accessData['dbname']}\";\n\n $pdo = new \\PDO($dsn, $accessData['username'], $accessData['password']);\n $pdo->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\n self::$connection = $pdo;\n } else {\n return self::$connection;\n }\n }", "title": "" }, { "docid": "88118e6de7a56967d31b2276bba68194", "score": "0.6106412", "text": "public static function getConnection() {\n\n //Guarantees single instance, if no connection object exists then create one.\n if (!self::$db) {\n //new connection object.\n new dbConn();\n }\n\n //return connection.\n return self::$db;\n }", "title": "" }, { "docid": "b6dded33b5163bc536f5c1591d675403", "score": "0.6104225", "text": "function open() {\r\n\r\n\t\t// We already have a valid connection\r\n\t\tif($this->oDbConn != Null) {\r\n\t\t\treturn $this->oDbConn;\r\n\t\t}\r\n\r\n\t\t$sDataSource = $this->getConnDBDriver();\r\n\t\t$oDataSource = new $sDataSource;\r\n\t\t$oDataSource->setHost($this->getConnectionURL());\r\n\t\t$oDataSource->setDatabase($this->getAuthDB());\r\n\t\t$oDataSource->setUsername($this->getConnectionName());\r\n\t\t$oDataSource->setPassword($this->getConnectionPassword());\r\n\t\t$oDataSource->setPersistent($this->getPersistent());\t\r\n\r\n\t\t$conn = $oDataSource->open();\r\n\t\t// Do we have a vaild connection\r\n\t\tif( DB::isError($conn) ) {\r\n\t\t\tdie( $conn->getMessage() );\r\n\t\t}\r\n\r\n\t\t$this->oDbConn =& $oDataSource;\t// Save a reference to the DS\r\n\r\n\t\treturn $this->oDbConn;\r\n\r\n\t}", "title": "" }, { "docid": "5165a19ee3c2ccb9917cccc406a29dd6", "score": "0.6100252", "text": "function __construct() {\n $connector = new DbConnection();\n $conn = $connector->connect(); \n }", "title": "" }, { "docid": "0ddee75839eb0ad688d18003e98f64e3", "score": "0.610024", "text": "public final function getConnection(): Connection {\n\t\t// if the connection hasn't been established, create it\n\t\tif($this->connection === null) {\n\t\t\t// connect to mySQL and provide the interface to PHPUnit\n\n\n\t\t\t$secrets = new Secrets(\"/etc/apache2/capstone-mysql/cohert28testing.ini\");\n\t\t\t$pdo = $secrets->getPdoObject();\n\t\t\t$this->connection = $this->createDefaultDBConnection($pdo, $secrets->getDatabase());\n\t\t}\n\t\treturn ($this->connection);\n\t}", "title": "" }, { "docid": "311e8660583117dd87cb2116353f3ac3", "score": "0.6094021", "text": "public function __construct(){\n\t\t//make lazy connections, only the first one is executed instantly\n\t\tif(!self::$linkCount){\n\t\t\t$this->_connect();\n\t\t\t//make the first connection reuseable\n\t\t\t$this->repool();\n\t\t}\n\t\tself::$conCount++;\n\t}", "title": "" }, { "docid": "bdb8709c53eb185a1ccd61c7e8bd2fb9", "score": "0.60937434", "text": "public function getConnection()\n\t{\n\t\tif(isset($this->connection))\n\t\t\treturn $this->connection;\n\t\telse\n\t\t\treturn Connection::get();\n\t}", "title": "" }, { "docid": "badbe99650250d242b7f04a033c55311", "score": "0.6088421", "text": "public function getConnection(){\n $this->conn = null;\n try{\n $this->conn = new PDO(\"mysql:host=\" . $this->host . \";dbname=\" . $this->db_name, $this->username, $this->password);\n $this->conn->exec(\"set names utf8\");\n }\n catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage();\n }\n return $this->conn;\n }", "title": "" }, { "docid": "6a5045333a63e37f4163d225536b0b26", "score": "0.608535", "text": "public function getConnection(){\n \n $this->conn = null;\n \n try{\n $this->conn = new PDO(\n \"mysql:host=\" . $this->host . \n \";dbname=\" . $this->db_name, \n $this->username, \n $this->password);\n }catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage();\n exit;\n }\n \n return $this->conn;\n }", "title": "" }, { "docid": "f1eef24caff0ce31448605ba2159fd96", "score": "0.6082911", "text": "public static function getConnection() {\n if (self::$instance === null) {\n self::$instance = new Database();\n }\n // return while class by its instance\n return self::$instance;\n }", "title": "" }, { "docid": "5272c11a6a5a6fcb546ac0b38dd4ff5f", "score": "0.6080952", "text": "public function getConnection(){\n \n $this->conn = null;\n \n try{\n $this->conn = new PDO(\"mysql:host=\" . $this->host . \";dbname=\" . $this->db_name, $this->username, $this->password);\n $this->conn->exec(\"set names utf8\");\n }catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage();\n }\n \n return $this->conn;\n }", "title": "" }, { "docid": "5272c11a6a5a6fcb546ac0b38dd4ff5f", "score": "0.6080952", "text": "public function getConnection(){\n \n $this->conn = null;\n \n try{\n $this->conn = new PDO(\"mysql:host=\" . $this->host . \";dbname=\" . $this->db_name, $this->username, $this->password);\n $this->conn->exec(\"set names utf8\");\n }catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage();\n }\n \n return $this->conn;\n }", "title": "" }, { "docid": "01a97384207743c550769a6f1ff9913d", "score": "0.6059652", "text": "public function getConnection()\n {\n\n return $this->prepareConnection();\n }", "title": "" }, { "docid": "1c4f94190b9104310fb999c16ca6b181", "score": "0.60551566", "text": "public function __construct()\n {\n $this->connection = $this->getConnection();\n }", "title": "" }, { "docid": "1c4f94190b9104310fb999c16ca6b181", "score": "0.60551566", "text": "public function __construct()\n {\n $this->connection = $this->getConnection();\n }", "title": "" }, { "docid": "d576ae5408cc49d407e303a1f20ee704", "score": "0.60546243", "text": "protected function connectDB(){\n\n // Prevent to open multiple connections\n if (!isset($this->db)) {\n\n $this->db = (new Db())->connect();\n \n }\n\n }", "title": "" }, { "docid": "2109f74ff61e286078b7f39b74bfc075", "score": "0.6052615", "text": "public function getConnection()\n {\n return $this->createDefaultDBConnection($this->_pdo, Zend_Registry::get('config')->database->params->dbname);\n }", "title": "" }, { "docid": "5881dd9fc4e80939b901c19118c9b3ca", "score": "0.6051711", "text": "function getConnection() {\n\t\t/** @var String hostname */\n\t\t$host = DB_HOST;\n\t\t/** @var String database username */\n\t\t$user = DB_USER;\n\t\t/** @var String database password */\n\t\t$pass = DB_PASS;\n\t\t/** @var String database name */\n\t\t$name = DB_NAME;\n\n\t\t/** @var String connection string */\n\t\t$dsn = \"mysql:host=$host;dbname=$name;charset=utf8\";\n\n\t\ttry {\n\t\t\t// Create a new PDO connection\n\t\t\t$connection = new PDO($dsn, $user, $pass);\n\t\t\t$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t$connection->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);\n\t\t\t// Return the connection\n\t\t\treturn $connection;\n\t\t} catch (PDOException $e) {\n\t\t\tdie('<strong>DataBase Error</strong>: Connection failed.<br>' . $e->getMessage());\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "b87b41b130a9f8b84e4509d718de09dc", "score": "0.6049451", "text": "public function getConnection(){\n return $this->conn;\n }", "title": "" }, { "docid": "831ca286ca228b34a0d99a5b9a2b89df", "score": "0.60484093", "text": "protected function getLazyConnection()\n {\n return new AMQPLazyConnection(HOST, PORT, USER, PASS, VHOST);\n }", "title": "" }, { "docid": "c92e9eeee25034b2889ccaf1c8aeb283", "score": "0.60472244", "text": "public function open() {\n //if the connection is null go ahead and open\n if(is_null($this->myConnection)){\n if(strlen($this->connectionString) == 0) {\n $this->connectionString += \"server=\". $this->host .\";\";\n $this->connectionString += \"uid=\". $this->username .\";\";\n $this->connectionString += \"pwd=\". $this->password .\";\";\n $this->connectionString += \"database=\". $this->schema .\";\";\n }\n $this->myConnection = odbc_connect($this->connectionString, $this->username, $this->password);\n }\n }", "title": "" }, { "docid": "cbe13c140c07caf071086bbbc1849ff9", "score": "0.6039235", "text": "public static function getConnection() {\n\t\tif (!self::$con) {\n\t\t\tnew DB();\n\t\t}\n\t\treturn self::$con;\n\t}", "title": "" }, { "docid": "933359269f9acdbed6edaa519b2412ea", "score": "0.6037629", "text": "public function getConnection()\n {\n $conn = new mysqli($this->host, $this->user, $this->password, $this->dbName);\n if($conn->connect_errno)\n {\n die(\"Sorry Error occurred during data base connection\".$conn->connect_errno);\n\n }else{\n return $conn;\n }\n }", "title": "" }, { "docid": "28eb632032eb4f116b34d2f6c8f1da50", "score": "0.60361505", "text": "public function getConnection()\n {\n $connection = null;\n \n if (count($this->m_availableConnections) > 0)\n {\n /* @var $connection MysqliConnection */\n $connection = array_shift($this->m_availableConnections);\n $this->m_assignedConnections[$connection->getId()] = $connection;\n }\n \n if \n (\n count($this->m_availableConnections) === 0 &&\n count($this->m_assignedConnections) === 0\n )\n {\n throw new Exception(\"Trying to get a connection from a pool that has none\");\n }\n return $connection;\n }", "title": "" }, { "docid": "02f9c0c0095af000225fd89260514942", "score": "0.6034801", "text": "public function getConnection()\n {\n return $this->createDefaultDBConnection($this->_pdo, Zend_Registry::get('config')->database->dbname);\n }", "title": "" }, { "docid": "02f9c0c0095af000225fd89260514942", "score": "0.6034801", "text": "public function getConnection()\n {\n return $this->createDefaultDBConnection($this->_pdo, Zend_Registry::get('config')->database->dbname);\n }", "title": "" }, { "docid": "da46e7ad342f70584dbb531a6186296d", "score": "0.60292053", "text": "public function getConnection(?string $name = null);", "title": "" }, { "docid": "da46e7ad342f70584dbb531a6186296d", "score": "0.60292053", "text": "public function getConnection(?string $name = null);", "title": "" }, { "docid": "924c6dcac613f8fbdc9f29de218c5368", "score": "0.60270315", "text": "private function makeConnection($db_info = null) {\n\t\t\n\t\tif ($db_info === null)\n\t\t\t$db_info = Configure::get(\"Database.profile\");\n\t\t\n\t\t// Attempt to reuse an existing connection if one exists that matches this connection\n\t\tif (Configure::get(\"Database.reuse_connection\") !== false && ($key = array_search($db_info, self::$db_infos)) !== false)\n\t\t\t$this->connection =& self::$connections[$key];\n\t\t\t\n\t\t// Only attempt to set up a new connection if none exists\n\t\tif (!($this->connection instanceof PDO)) {\n\t\t\t\n\t\t\t// Override any default settings with those provided\n\t\t\t$options = (array)(isset($db_info['options']) ? $db_info['options'] : null) + $this->default_pdo_options;\n\t\t\t// Ensure persistence is set to either true or false\n\t\t\t$options[PDO::ATTR_PERSISTENT] = (isset($db_info['persistent']) ? $db_info['persistent'] : false);\n\t\t\t\n\t\t\ttry {\n\t\t\t\t$this->connection = new PDO(self::makeDSN($db_info), (isset($db_info['user']) ? $db_info['user'] : null), (isset($db_info['pass']) ? $db_info['pass'] : null), $options);\n\t\t\t\t\n\t\t\t\t// Record the connection\n\t\t\t\tself::$connections[] =& $this->connection;\n\t\t\t\tself::$db_infos[] = $db_info;\n\t\t\t\t\n\t\t\t\t// Run a character set query to override the database server's default character set\n\t\t\t\tif (isset($db_info['charset_query']) && $db_info['charset_query'] != \"\")\n\t\t\t\t\t$this->query($db_info['charset_query']);\n\t\t\t}\n\t\t\tcatch (PDOException $e) {\n\t\t\t\tthrow new Exception($e->getMessage());\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "787035165fc635f6a393eef5699d8db0", "score": "0.6025142", "text": "protected function connectInternal()\n\t{\n\t\tif ($this->isConnected)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$host = $this->host;\n\t\t$port = 0;\n\t\tif (($pos = strpos($host, \":\")) !== false)\n\t\t{\n\t\t\t$port = intval(substr($host, $pos + 1));\n\t\t\t$host = substr($host, 0, $pos);\n\t\t}\n\t\tif (($this->options & self::PERSISTENT) != 0)\n\t\t{\n\t\t\t$host = \"p:\".$host;\n\t\t}\n\n\t\t$connection = \\mysqli_init();\n\t\tif (!$connection)\n\t\t{\n\t\t\tthrow new ConnectionException('Mysql init failed');\n\t\t}\n\n\t\tif (!empty($this->initCommand))\n\t\t{\n\t\t\tif (!$connection->options(MYSQLI_INIT_COMMAND, $this->initCommand))\n\t\t\t{\n\t\t\t\tthrow new ConnectionException('Setting mysql init command failed');\n\t\t\t}\n\t\t}\n\n\t\tif ($port > 0)\n\t\t{\n\t\t\t$success = $connection->real_connect($host, $this->login, $this->password, $this->database, $port);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$success = $connection->real_connect($host, $this->login, $this->password, $this->database);\n\t\t}\n\n\t\tif (!$success)\n\t\t{\n\t\t\tthrow new ConnectionException(\n\t\t\t\t'Mysql connect error ['.$this->host.']',\n\t\t\t\tsprintf('(%s) %s', $connection->connect_errno, $connection->connect_error)\n\t\t\t);\n\t\t}\n\n\t\t$this->resource = $connection;\n\t\t$this->isConnected = true;\n\n\t\t// nosql memcached driver\n\t\tif (isset($this->configuration['memcache']))\n\t\t{\n\t\t\tif (function_exists('mysqlnd_memcache_set'))\n\t\t\t{\n\t\t\t\t$memcached = \\Bitrix\\Main\\Application::getInstance()->getConnectionPool()->getConnection($this->configuration['memcache']);\n\t\t\t\tmysqlnd_memcache_set($this->resource, $memcached->getResource());\n\t\t\t}\n\t\t}\n\n\t\t$this->afterConnected();\n\t}", "title": "" }, { "docid": "651d593b7c89bd32084744e232db3167", "score": "0.6024699", "text": "public final function getConnection() : Connection {\n\t\t// if the connection hasn't been established, create it\n\t\tif($this->connection === null) {\n\t\t\t// connect to mySQL and provide the interface to PHPUnit\n\t\t\t$config = readConfig(\"/etc/apache2/capstone-mysql/abqreport.ini\");\n\t\t\t$pdo = connectToEncryptedMySQL(\"/etc/apache2/capstone-mysql/abqreport.ini\");\n\t\t\t$this->connection = $this->createDefaultDBConnection($pdo, $config[\"database\"]);\n\t\t}\n\t\treturn($this->connection);\n\t}", "title": "" } ]
2d2f4cf775923de888c1d59fb81c84b7
Returns information on the folder.
[ { "docid": "874d50f13c68897f05b69444ccb1a627", "score": "0.0", "text": "public function StatFolder($id) {\n ZLog::Write(LOGLEVEL_DEBUG, sprintf(\"BackendCalDAV->StatFolder('%s')\", $id));\n $val = $this->GetFolder($id);\n $folder = array();\n $folder[\"id\"] = $id;\n $folder[\"parent\"] = $val->parentid;\n $folder[\"mod\"] = $val->serverid;\n return $folder;\n }", "title": "" } ]
[ { "docid": "1404139197c9625750c2fde1b8ee9517", "score": "0.8955944", "text": "public function getFolderInfo() {}", "title": "" }, { "docid": "29128cb467d47fc04968119514af4be9", "score": "0.8118326", "text": "public function get_folder_info($folder_id='') {\n // No need for folders, so nothing to do.\n }", "title": "" }, { "docid": "c3bae1848eeaa3661bc75eedeb0fc1b7", "score": "0.7165262", "text": "function directory_info()\n\t{\n\t\t$dir_id = ee()->input->get('directory_id');\n\t\t$dir = $this->directory($dir_id, FALSE, TRUE);\n\n\t\t$data = $dir ? call_user_func($this->config['directory_info_callback'], $dir) : array();\n\n\t\tif (count($data) == 0)\n\t\t{\n\t\t\techo '{}';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['id'] = $dir_id;\n\t\t\techo json_encode($data);\n\t\t}\n\t\texit;\n\t}", "title": "" }, { "docid": "3fd09ea84b7e0fa7a6af807065954233", "score": "0.7016821", "text": "public function getFolderInfo(string $folder_id) {\n\t\treturn $this->execute(\"folders/{$folder_id}\", 'GET');\n\t}", "title": "" }, { "docid": "4b932a974202a91b9e72ad996a604a97", "score": "0.6650612", "text": "public function getInfo()\n {\n return $this->file->getInfo();\n }", "title": "" }, { "docid": "c24b54a1b78c80b19fa938e60a3d2b92", "score": "0.6625734", "text": "public function getFolderPath()\n {\n }", "title": "" }, { "docid": "f5c722a62bc44fe313d6c1758594acb5", "score": "0.6582222", "text": "public function getFolder()\n {\n return $this->folder;\n }", "title": "" }, { "docid": "f5c722a62bc44fe313d6c1758594acb5", "score": "0.6582222", "text": "public function getFolder()\n {\n return $this->folder;\n }", "title": "" }, { "docid": "f5c722a62bc44fe313d6c1758594acb5", "score": "0.6582222", "text": "public function getFolder()\n {\n return $this->folder;\n }", "title": "" }, { "docid": "42b059523ddc65db9c08d47f960b63ff", "score": "0.65777993", "text": "public function getFolder() {\n return $this->folder;\n }", "title": "" }, { "docid": "f6619c9777ed3c2b43420f34c934298a", "score": "0.65650153", "text": "public function getFolder()\n {\n return $this->_folder;\n }", "title": "" }, { "docid": "c633dd34b0345b70ad4ee9583a10151d", "score": "0.656049", "text": "public function folder()\n {\n return Folder::find($this->folder_id);\n }", "title": "" }, { "docid": "68f868ed3b4057f20262b633f61ea834", "score": "0.65399456", "text": "public function getFolder()\n {\n $name = $this->_injector\n ->getInstance('Horde_Kolab_FreeBusy_Params_Freebusy_Resource_Kolab')\n ->getResourceId();\n \n }", "title": "" }, { "docid": "3518d12becc4aa3e8da6ebc52fa230ac", "score": "0.65368783", "text": "public function getFolderInfo($folder_id = null)\n {\n return $this->_process('folder/info', ['folder_id' => $folder_id])->folder;\n }", "title": "" }, { "docid": "5199120df5cd5e27e55390c83b6e3cdb", "score": "0.65017647", "text": "protected function getStorageInfo() {\n\t\t$dirInfo = \\OC\\Files\\Filesystem::getFileInfo('/', false);\n\t\treturn \\OC_Helper::getStorageInfo('/', $dirInfo);\n\t}", "title": "" }, { "docid": "3b0cf77d30be8484ea3aef020ce389d7", "score": "0.64968944", "text": "private function readFolder()\n\t{\n\t\t//cause the script to stop and user will get blank page without any information\n\t\tif($this->checkDir())\n\t\t{\n\t\t\tforeach(new DirectoryIterator($this->name) as $fileInfo)\n\t\t\t{\n\t\t\t\tif($fileInfo->getFilename() == '.htaccess' && $this->isSubfolder) {\n\t\t\t\t\t$this->isProtected = TRUE;\n\t\t\t\t}\n\t\t\t\tif((!$fileInfo->isDir() && !in_array(strtolower($this->getExtension($fileInfo->getFilename())),$this->allowedTypes))\n\t\t\t\t\t|| $fileInfo->isDot() || ($fileInfo->isDir() && ($fileInfo->getFilename()=='thumbs') || $fileInfo->getFilename()=='generated' || $fileInfo->getFilename()=='.svn'))\n\t\t\t\t\tcontinue;\n\t\t\t\t$fileName = ($fileInfo->isDir()&&!$this->isRoot?$this->userLoc.'/':'').$fileInfo->getFilename();\n\t\t\t\t$newFile=new MediaFile($this->rootFile,$fileName,$fileInfo->getPath(),$fileInfo->getSize(),$fileInfo->isDir());\n\t\t\t\t$newFile->setModedDate($fileInfo->getMTime());\n\t\t\t\tif($fileInfo->isDir() && !$this->checkDir($fileInfo->getPath().'/'.basename($fileName))) $newFile->setNotAccessible();\n\t\t\t\t$this->addFile($newFile);\n\t\t\t\tunset($newFile);\n\t\t\t}\n\t\t}\n\t\tif(!$this->isRoot)\n\t\t{\n\t\t\tif(!$this->isSubfolder)\n\t\t\t{\n\t\t\t\tif($this->isAdmin)\n\t\t\t\t\t$this->addFile(new MediaFile($this->rootFile,'0','',0,TRUE,TRUE,$this->isSubfolder));\n\t\t\t}\n\t\t\telse\n\t\t\t\t$this->addFile(new MediaFile($this->rootFile,dirname($this->userLoc),'',0,TRUE,TRUE,$this->isSubfolder));\n\t\t}\n\t}", "title": "" }, { "docid": "884c3e147d82fcff4f0bddcb8baf07e3", "score": "0.6458937", "text": "function get_info($json_path,$folder){\n\tif($folder == ''){\n\t\t$dir = $json_path;\n\t} else {\n\t\t$dir = $json_path.$folder;\n\t}\n\tif(!file_exists($dir)){\n\t\treturn 'no exist';\n\t} else {\n\t\t$file = file_get_contents($dir.'/_info.json');\n\t\tif($file == '' || $file == '[]'){\n\t\t\treturn 'empty';\n\t\t} else {\n\t\t\treturn $file;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "94e62184ea7a090289d3da54481422b9", "score": "0.6416353", "text": "public function show(Folder $folder)\n {\n\n }", "title": "" }, { "docid": "9f3c8498be5adb53f2e4e367c8a0c059", "score": "0.63664174", "text": "public function getFolder() {\n return $this->getFolderName();\n }", "title": "" }, { "docid": "88f571bc710736a4b84c4fb526c7c19e", "score": "0.6346334", "text": "public function getFolderInfoByIdentifier($folderIdentifier) {\n return [\n 'identifier' => $folderIdentifier,\n 'name' => 'Frontify',\n 'mtime' => 0,\n 'ctime' => 0,\n 'storage' => $this->storageUid\n ];\n }", "title": "" }, { "docid": "b96b47fab393f4147e36414af2bc6a8a", "score": "0.63396734", "text": "protected static function getInfo()\n {\n $files = self::getFiles();\n //\n foreach ($files as $path) {\n $data = self::convert(self::readFile($path.'/vinala.json'), $path);\n $data = $data['system'];\n $data['path'] = $path;\n\n if (array_key_exists('alias', $data)) {\n self::$infos[$data['alias']] = $data;\n } else {\n // die($path.\"/.info\");\n }\n }\n //\n return self::$infos;\n }", "title": "" }, { "docid": "fa46968363a0742d633c21342d096832", "score": "0.63374686", "text": "public function getFolderInfoByIdentifier($folderIdentifier)\n {\n if (is_dir($this->getAbsolutePath($folderIdentifier))) {\n return parent::getFolderInfoByIdentifier($folderIdentifier);\n }\n\n return [\n 'identifier' => $folderIdentifier,\n 'name' => PathUtility::basename($folderIdentifier),\n 'storage' => $this->storageUid,\n ];\n }", "title": "" }, { "docid": "5ec7806c4c99ac415be9819294a77528", "score": "0.6327248", "text": "private function _directory_info($dir)\n\t{\n\t\tee()->load->model('file_model');\n\n\t\treturn array(\n\t\t\t'url' \t\t\t=> $dir['url'],\n\t\t\t'file_count'\t=> ee()->file_model->count_files($dir['id']),\n\t\t\t'image_count'\t=> ee()->file_model->count_images($dir['id'])\n\t\t);\n\t}", "title": "" }, { "docid": "abdf003c11c51fe8c3c7ec3d44d195e6", "score": "0.62965983", "text": "public function getFolderTree()\n {\n return self::_loadFolderTree();\n }", "title": "" }, { "docid": "155523ac8707c329537c141daf94bb14", "score": "0.62601435", "text": "public function getFolder()\n\t{\n\t\treturn $this->router->getFolder();\n\t}", "title": "" }, { "docid": "0932598d97e562a5d4c8c481d157b3db", "score": "0.61922884", "text": "public function getInfo()\n {\n \treturn include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Meta.php');\n }", "title": "" }, { "docid": "97c34813a77788935a3d94922ddd648b", "score": "0.61840445", "text": "public function getDirectory();", "title": "" }, { "docid": "97c34813a77788935a3d94922ddd648b", "score": "0.61840445", "text": "public function getDirectory();", "title": "" }, { "docid": "ce6194fce03b0d79d59d44be8d4e3091", "score": "0.61792606", "text": "public function index()\n {\n return auth()->user()\n ->folders()\n ->orderBy('created_at', 'DESC')\n ->paginate(10);\n }", "title": "" }, { "docid": "9d41a8b704f58a3b31c4a5d7151dbe5a", "score": "0.61633503", "text": "public function readDirectory();", "title": "" }, { "docid": "4a7b063e65d01011272538bff7635789", "score": "0.6150534", "text": "public function getCacheInfo()\n {\n\t\tif(($cachePath = $this->folder->getCachePath(true))) {\n\t\t\t$size = 0;\n\t\t\t$count = 0;\n\n\t\t\t$di\t= new DirectoryIterator($cachePath);\n\n\t\t\tforeach($di as $fileinfo) {\n\t\t\t\tif(\t$fileinfo->isDot() ||\n\t\t\t\t\t!$fileinfo->isFile() ||\n\t\t\t\t\tstrpos($fileinfo->getFilename(), $this->filename) !== 0\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t++$count;\n\t\t\t\t$size += $fileinfo->getSize();\n\t\t\t}\n\t\t\treturn ['count' => $count, 'totalSize' => $size];\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "4b9ce87c5942553b1e3f992ef49ae34d", "score": "0.6149231", "text": "public function directory() {\n $config = \\Drupal::config('webspark_isearch.settings');\n $directory_url = $config->get('directory_path');\n return $this->retriveJsonFromService($directory_url);\n }", "title": "" }, { "docid": "537725ff0be1920bf3df97afdcccda56", "score": "0.61426204", "text": "function readFolderXML(){\n\t\t\t// confirm it exists first!\n\t\t\tif (file_exists($_SERVER['DOCUMENT_ROOT'].\"/\".$this -> rootFolder.\"/folderList.xml\")){\n\t\t\t\t\n\t\t\t\t$xml = simplexml_load_file(\t$_SERVER['DOCUMENT_ROOT'].\"/\".$this -> rootFolder.\"/folderList.xml\");\n\t\t\t\tforeach($xml->children() as $child){\n\t\t\t\t\t\n\t\t\t\t\t$this -> folderMap[ (string) $child['id']] = (string) $child['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4f6b6c909c5244795d0dcaabf56da7be", "score": "0.61304647", "text": "public function getFileInfo();", "title": "" }, { "docid": "099130e4b804163c9fc0cbe733a60a4f", "score": "0.6114343", "text": "public abstract function getDirectory();", "title": "" }, { "docid": "2be1115bb8f19f01f4a14d9573e14b79", "score": "0.60981387", "text": "static function getDirectoryListing();", "title": "" }, { "docid": "59003201df06ed2a27dcca2a091d51a8", "score": "0.60975164", "text": "public function getFolderPath()\n {\n return $this->_folderPath;\n }", "title": "" }, { "docid": "efca4a32e5b3550f94b9503e55df175d", "score": "0.6094526", "text": "function getPath(){\n $elementData = $this->getData();\n $folder = new folder($elementData['folder']);\n return $folder->getPath();\n }", "title": "" }, { "docid": "2341578bf2608bb0337a2096d883083c", "score": "0.60796386", "text": "protected function getWorkspaceInfo() {}", "title": "" }, { "docid": "3ee1f045e72c916fb819773236dd3fcb", "score": "0.6058408", "text": "public function getInfo() {}", "title": "" }, { "docid": "a4410c79a5b96e25fd44c9b9feed384c", "score": "0.6044263", "text": "public function index() {\n\t\treturn array_keys($this->info->centralDirectory);\n\t}", "title": "" }, { "docid": "29251df46c094230943507c52a37b8db", "score": "0.604008", "text": "public function getDir();", "title": "" }, { "docid": "29251df46c094230943507c52a37b8db", "score": "0.604008", "text": "public function getDir();", "title": "" }, { "docid": "29251df46c094230943507c52a37b8db", "score": "0.604008", "text": "public function getDir();", "title": "" }, { "docid": "eb469d05dd1f394ceecbdb5c1a1c4c81", "score": "0.60152787", "text": "public function getInfo();", "title": "" }, { "docid": "eb469d05dd1f394ceecbdb5c1a1c4c81", "score": "0.60152787", "text": "public function getInfo();", "title": "" }, { "docid": "e0debe37b8b55fe63e2f5caf12e7dab8", "score": "0.59910876", "text": "public function getDirectory(): string;", "title": "" }, { "docid": "45a749f6be7ac4d40911faa2427e59f5", "score": "0.5979218", "text": "function getInfo()\n {\n $arr = $this->createArray($this->downloadFile($this->url));\n //$arr = $this->createArray(getcwd() . \"/hurdat2-nencpac-1949-2012-040513.txt\");\n\n return $this->getStorms($arr);\n }", "title": "" }, { "docid": "ab3f5a25637801b899afa8b4258f420d", "score": "0.5970763", "text": "public function folders()\n {\n return $this->content('folders');\n }", "title": "" }, { "docid": "83dcfdd3790b0364b7127612aa416fc7", "score": "0.59697664", "text": "public function get_info();", "title": "" }, { "docid": "af0bd2bce910ad9f01ac359cfea58d51", "score": "0.59649765", "text": "function getFolderProps($store, $folder)\n\t\t{\n\t\t\t$data = $GLOBALS[\"operations\"]->getProps($store, $folder, $GLOBALS[\"properties\"]->getFolderProperties());\t\n\t\t\t\t\t\t\t\n\t\t\t// adding container_class if missing\n\t\t\tif (!isset($data[\"container_class\"])){\n\t\t\t\t$data[\"container_class\"] = \"IPF.Note\";\n\t\t\t}\n\n\t\t\t// adding missing comment\n\t\t\tif (!isset($data[\"comment\"])){\n\t\t\t\t$data[\"comment\"] = \"\";\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t// replace \"IPM_SUBTREE\" with the display name of the store, and use the store message size\n\t\t\tif ($data[\"display_name\"] == \"IPM_SUBTREE\"){\n\t\t\t\t$store_props = mapi_getprops($store, array(PR_DISPLAY_NAME, PR_MESSAGE_SIZE_EXTENDED, PR_QUOTA_WARNING_THRESHOLD, PR_QUOTA_SEND_THRESHOLD, PR_QUOTA_RECEIVE_THRESHOLD));\n\t\t\t\t$data[\"display_name\"] = windows1252_to_utf8($store_props[PR_DISPLAY_NAME]);\n\t\t\t\t$data[\"message_size\"] = round($store_props[PR_MESSAGE_SIZE_EXTENDED]/1024). \" \"._(\"kb\");\n\t\t\t\t$data[\"store_size\"] = round($store_props[PR_MESSAGE_SIZE_EXTENDED]/1024);\n\n\t\t\t\tif (isset($store_props[PR_QUOTA_WARNING_THRESHOLD]))\n\t\t\t\t\t$data[\"quota_warning\"] = round($store_props[PR_QUOTA_WARNING_THRESHOLD]);\n\t\t\t\tif (isset($store_props[PR_QUOTA_SEND_THRESHOLD]))\n\t\t\t\t\t$data[\"quota_soft\"] = round($store_props[PR_QUOTA_SEND_THRESHOLD]);\n\t\t\t\tif (isset($store_props[PR_QUOTA_RECEIVE_THRESHOLD]))\n\t\t\t\t\t$data[\"quota_hard\"] = round($store_props[PR_QUOTA_RECEIVE_THRESHOLD]);\n\t\t\t}\n\n\t\t\t// retrieve parent folder name\n\t\t\tif (is_array($data[\"parent_entryid\"]) && isset($data[\"parent_entryid\"][\"_content\"])){\n\t\t\t\t$data[\"parent_entryid\"] = $data[\"parent_entryid\"][\"_content\"];\n\t\t\t}\n\t\t\t$parent_folder = mapi_msgstore_openentry($store, hex2bin($data[\"parent_entryid\"]));\n\t\t\t$parent_props = mapi_getprops($parent_folder, array(PR_DISPLAY_NAME));\n\t\t\t$data[\"parent_display_name\"] = \"\";\n\t\t\tif (isset($parent_props[PR_DISPLAY_NAME])){\n\t\t\t\t$data[\"parent_display_name\"] = windows1252_to_utf8($parent_props[PR_DISPLAY_NAME]);\n\t\t\t\tif ($data[\"parent_display_name\"] == \"IPM_SUBTREE\"){\n\t\t\t\t\t// this must be the root folder, so get the name of the store\n\t\t\t\t\t$store_props = mapi_getprops($store, array(PR_DISPLAY_NAME));\n\t\t\t\t\t$data[\"parent_display_name\"] = windows1252_to_utf8($store_props[PR_DISPLAY_NAME]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// calculating missing message_size\n\t\t\tif (!isset($data[\"message_size\"])){\n\t\t\t\t$data[\"message_size\"] = round($GLOBALS[\"operations\"]->calcFolderMessageSize($folder, false)/1024). \" \"._(\"kb\");\n\t\t\t}\n\t\t\t\n\t\t\t// retrieving folder permissions\n\t\t\t$data[\"permissions\"] = $this->getFolderPermissions($folder);\n\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "c95e73cc042f1da6627fb0f03c408e69", "score": "0.59615743", "text": "public function directory() \r\n {\r\n return $this->directory;\r\n }", "title": "" }, { "docid": "6d12da3a9ac284a4e5ed46d846a4b474", "score": "0.59433526", "text": "public function __toString()\n {\n return $this->directory;\n }", "title": "" }, { "docid": "e8b830adf6280440749acb482365374b", "score": "0.59202594", "text": "public function getDirectory() {\n\t\t return $this->directory;\n\t }", "title": "" }, { "docid": "c020e11ca4c04cf3ca63418f6b6fb904", "score": "0.59152937", "text": "public function getMetadata()\n {\n $this->getFtpMetadata();\n\n parent::getMetadata();\n\n /**\n * Discovery creates an array of Files and Directories based on Path\n */\n if ($this->exists === true) {\n $this->discovery($this->path);\n }\n\n $this->getSize();\n\n return;\n }", "title": "" }, { "docid": "39e4d671968b75c7f6cce00aad40ec4c", "score": "0.5912963", "text": "function get_folder($folder_id=null) {\n\tif($folder_id === null) {\n\t\treturn false;\n\t}\n\tif(!get_option('quip-access-token')) {\n\t\treturn false;\n\t}\n\t\n\t$access_token = get_option('quip-access-token');\n\t$url = 'https://platform.quip.com/1/folders/'.$folder_id;\n\t$ch = curl_init($url);\n\t\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer ' . $access_token));\n\t\n\t$result = curl_exec($ch); \n curl_close($ch); \n return $result;\n}", "title": "" }, { "docid": "6c07aeb2d1c1e4f02c3a24588542949c", "score": "0.58973604", "text": "function get_directory() {\n\t\treturn $this->directory;\n\t}", "title": "" }, { "docid": "e5955d9f62f83aae5d4e76bc5ba715e0", "score": "0.5895354", "text": "private static function folders_path(){\n\t\treturn dirname(__DIR__) . '/content/folders.json';\n\t}", "title": "" }, { "docid": "3dad2acf8b3e3dbcd78f458604122733", "score": "0.58778644", "text": "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "title": "" }, { "docid": "3dad2acf8b3e3dbcd78f458604122733", "score": "0.58771753", "text": "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "title": "" }, { "docid": "3dad2acf8b3e3dbcd78f458604122733", "score": "0.587693", "text": "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "title": "" }, { "docid": "3dad2acf8b3e3dbcd78f458604122733", "score": "0.587693", "text": "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "title": "" }, { "docid": "3dad2acf8b3e3dbcd78f458604122733", "score": "0.58759826", "text": "public function getInfo()\n {\n return $this->get(self::_INFO);\n }", "title": "" }, { "docid": "93b5abaf3e3bbaee7271922a2a11364a", "score": "0.5866511", "text": "public function index($folder_id)\n {\n //\n }", "title": "" }, { "docid": "fd53946bce988df8ed9367d5f0f5fdbb", "score": "0.58644325", "text": "public function readFolder() {\n $read = false;\n if (file_exists($this->rootPath)) {\n $read = true;\n $files = scandir($this->rootPath);\n natcasesort($files);\n \n if (count($files) > 0) {\n // All dirs\n \n foreach ($files as $file) {\n //discard folders\n if ($file == '.' || $file == '..') {\n continue;\n }\n \n $path = $this->rootPath . \"/\" . $file;\n if (is_dir($path)) {\n \n $folderInfo = new FolderInfo();\n $folderInfo->setName($file);\n $folderInfo->setPath($path . \"/\");\n $this->folderItemList->setItem($folderInfo);\n }\n }\n\n $this->arrayAllFiles[\"folders\"] = $this->folderItemList;\n // All files\n foreach ($files as $file) {\n //dicart files\n if ($file == '.' || $file == '..') {\n continue;\n }\n\n $path = $this->rootPath . \"/\" . $file;\n\n if (file_exists($path) && !is_dir($path)) {\n \n $fileInfo = new FileInfo($path);\n if(!$this->isFilterExtension($fileInfo->getExt()))\n $this->fileItemList->setItem($fileInfo);\n }\n }\n $this->arrayAllFiles[\"files\"] = $this->fileItemList;\n }\n }\n\n return $read;\n }", "title": "" }, { "docid": "e261a3f1ce897cebf1433052fc792b9d", "score": "0.5862487", "text": "public function getDirectoryMonitor();", "title": "" }, { "docid": "8e10de805af696b6cf3289fba0f3f978", "score": "0.58611", "text": "function listFolder($sessionKey,$group_id,$item_id) {\n $params = array('id' => $item_id, 'report' => 'List');\n return _makeDocmanRequest($sessionKey, $group_id, 'show', $params);\n}", "title": "" }, { "docid": "db47475932954641e88019f14817d9ff", "score": "0.5777312", "text": "public function getDirectoryData();", "title": "" }, { "docid": "ec9a081232d2bc3208b32d520fe37dea", "score": "0.57665676", "text": "abstract public function getInfo();", "title": "" }, { "docid": "9dc68f7b2e7591b47142c94c6482a365", "score": "0.5764645", "text": "public function index()\n {\n return Directory::orderBy('id', 'DESC')->get();\n }", "title": "" }, { "docid": "b57533e54453f1c9583d61706209b7d5", "score": "0.5753265", "text": "public function dump()\n {\n $_new_dir = new DirectoryModel;\n $_new_dir->setPath( dirname($this->getPath()) );\n $_new_dir->setDirname( basename($this->getPath()) );\n return $_new_dir->scanDir();\n }", "title": "" }, { "docid": "409c046c648a50574a7d8c8d7c7ea0e6", "score": "0.5746554", "text": "public function index(Folder $folder)\n {\n\n $users = User::all()\n ->where('id','<>' , auth()->id());\n\n\n $folders = Folder::all()\n ->where('user_id' , auth()->id())\n ->where('parent_folder_id',$folder->id);\n\n $departmentFolders = DepartmentFolder::all()\n ->where('department_id' , Auth::user()->department->id);\n\n $files = FileSystem::all()\n ->where('user_id' , auth()->id())\n ->where('folder_id',$folder->id)\n ->where('isDepartmentFile',0);\n\n\n return view('FileSystem.index', [\n 'folders' => $folders,\n 'parent_id' => $folder->id,\n 'parent' => $folder,\n 'departmentFolders' => $departmentFolders,\n 'users' => $users,\n 'files' => $files\n ]);\n }", "title": "" }, { "docid": "b4dd3baffec79b9180cbf981ea3e330a", "score": "0.5734299", "text": "public function path_info() {\n\t\t\treturn \\uri\\generate::path_info($this->object);\n\t\t}", "title": "" }, { "docid": "917695c52f1678260af83c2f02532e45", "score": "0.5722407", "text": "public function getInfo(){\n $title = $this->request->data('title'); \n $year = $this->request->data('year');\n \n $isFile = $this->request->data('isFile');\n if ($isFile == true){\n $dir = $this->request->data('dir');\n $this->set('location', $dir);\n $this->set('ext', explode('.', $title)[count(explode('.', $title))-1]); \n $this->set('is_file', true); \n $title = $this->extractTitle($title);\n $year = $title['year'];\n $title = $title['title'];\n $this->set('title', $title); \n \n $base_location = Configure::read('DeviceNetworkLocations')[explode('/', $dir)[1]];\n $dir_arr = explode('/', $dir);\n unset($dir_arr[0]);unset($dir_arr[1]);\n $base_location .= implode('\\\\', $dir_arr);\n $this->set('network_location', $base_location); //This only works with windows as docuemtn separator has to be the document separator of the client not he server\n }\n \n $json_string = file_get_contents('http://www.omdbapi.com/?t='.urlencode($title).'&y='.urlencode($year).'&plot=short&r=json');\n $json_string = utf8_encode($json_string);\n $data_array = json_decode($json_string, true); \n \n $this->set('data', $data_array); \n }", "title": "" }, { "docid": "38bd76b05bfadb91c72440615f26ed45", "score": "0.5714254", "text": "public function getTreeData()\n\t{\n\t\t$arrData\t\t= $this->getFolderContents($this->absPath);\n\t\t\n\t\treturn $arrData;\n\t}", "title": "" }, { "docid": "0ff7dd6b66fbb1e39d2a8803deae8027", "score": "0.57097864", "text": "public function getDirectory() {\n return $this->directory;\n }", "title": "" }, { "docid": "8d48502c541330c87007625d7551ff2e", "score": "0.57064146", "text": "public static function get_folder_status()\n\t{\n\t\tstatic $status = null;\n\n\t\tif(is_null($status))\n\t\t{\n\t\t\t$stock_dirs = AEPlatform::get_stock_directories();\n\n\t\t\t// Get output writable status\n\t\t\t$registry =& AEFactory::getConfiguration();\n\t\t\t$outdir = $registry->get('akeeba.basic.output_directory');\n\t\t\tforeach( $stock_dirs as $macro => $replacement )\n\t\t\t{\n\t\t\t\t$outdir = str_replace($macro, $replacement, $outdir);\n\t\t\t}\n\t\t\t$status['output']= @is_writable($outdir);\n\n\t\t\t// Get temp writable status\n\t\t\t$tempdir = $registry->get('akeeba.basic.temporary_directory');\n\t\t\tforeach( $stock_dirs as $macro => $replacement )\n\t\t\t{\n\t\t\t\t$tempdir = str_replace($macro, $replacement, $tempdir);\n\t\t\t}\n\t\t\t$status['temporary'] = @is_writable($tempdir);\n\t\t}\n\n\t\treturn $status;\n\t}", "title": "" }, { "docid": "ba5d176b152c98c3410287d9271843d6", "score": "0.5700603", "text": "function fileinfo($path) \r\n {\r\n \t\t$this->tx_cbywebdav_devlog(1,\"=== Fileinfo : \".$path,\"cby_webdav\",\"fileinfo\");\r\n\t\t\t//$upath=$this->_urlencode($path);\r\n\t\t\t$upath=$path;\r\n\t\t\t$t3io=$this->CFG->t3io;\r\n\r\n // map URI path to filesystem path\r\n $virtualpath = $t3io->T3CleanFilePath($this->base . $path);\r\n\t\t $fsupath = $t3io->T3CleanFilePath($this->base . $upath);\r\n\r\n // create result array\r\n $info = array();\r\n // TODO remove slash append code when base clase is able to do it itself\r\n $info[\"path\"] = $t3io->T3IsDir($virtualpath) ? $this->_slashify($upath) : $upath; \r\n $info[\"props\"] = array();\r\n // no special beautified displayname here ...\r\n $info[\"props\"][] = $this->mkprop(\"displayname\", strtoupper($upath));\r\n \r\n // creation and modification time\r\n\t\t\tif ($virtualpath== '/'.T3_FTPD_FILE_ROOT || $virtualpath== '/'.T3_FTPD_WWW_ROOT) {\t\r\n\t\t \t$info[\"props\"][] = $this->mkprop(\"creationdate\", 0);\r\n\t\t \t$info[\"props\"][] = $this->mkprop(\"getlastmodified\", 0);\r\n\t\t\t} else {\r\n\t\t \t$info[\"props\"][] = $this->mkprop(\"creationdate\", $t3io->T3FileCTime($virtualpath));\r\n\t\t \t$info[\"props\"][] = $this->mkprop(\"getlastmOdified\", $t3io->T3FileMTime($virtualpath));\r\n\t\t\t}\r\n\r\n // type and size (caller already made sure that path exists)\r\n\r\n if ($t3io->T3IsDir($virtualpath)) {\r\n // directory (WebDAV collection)\r\n $info[\"props\"][] = $this->mkprop(\"resourcetype\", \"collection\");\r\n $info[\"props\"][] = $this->mkprop(\"getcontenttype\", \"httpd/unix-directory\"); \r\n } else {\r\n // plain file (WebDAV resource)\r\n $info[\"props\"][] = $this->mkprop(\"resourcetype\", \"\");\r\n if (is_readable($virtualpath)) {\r\n $info[\"props\"][] = $this->mkprop(\"getcontenttype\", $this->_mimetype($virtualpath));\r\n } else {\r\n $info[\"props\"][] = $this->mkprop(\"getcontenttype\", \"application/x-non-readable\");\r\n } \r\n $info[\"props\"][] = $this->mkprop(\"getcontentlength\", $t3io->T3FileSize($virtualpath));\r\n }\r\n\r\n // get additional properties from database\r\n $res=$this->CFG->T3DB->exec_SELECTquery('ns, name, value','tx_cbywebdav_webdav_properties',\"path = '$path'\");\r\n\t\t\t$this->tx_cbywebdav_devlog(1,\"=== fileinfo query: \".$this->CFG->T3DB->SELECTquery('ns, name, value','tx_cbywebdav_webdav_properties',\"path = '$path'\"),\"cby_webdav\",\"fileinfo\");\r\n if($res) {\r\n \t\t\twhile ($row=$this->CFG->T3DB->sql_fetch_assoc($res)) {\r\n $info[\"props\"][] = $this->mkprop($row[\"ns\"], $row[\"name\"], $row[\"value\"]);\r\n \t}\r\n } else {\r\n \t\t$this->tx_cbywebdav_devlog(1,\"=== fileinfo : pb db\",\"cby_webdav\",\"fileinfo\");\r\n\r\n\t}\r\n\r\n \t $this->tx_cbywebdav_devlog(1,\"=== fileinfo end:\".serialize($info),\"cby_webdav\",\"fileinfo\");\r\n return $info;\r\n }", "title": "" }, { "docid": "99853ff4e4b0c2fa353b575efa96dd63", "score": "0.5688401", "text": "public function getFolderPath(){\n $dossierName = ClientDossier::getDossierName($this->id);\n if(is_null($dossierName))\n return null;\n else{\n return $dossierName;\n }\n }", "title": "" }, { "docid": "8306fa6cc73853d8c10068d71cd1be04", "score": "0.56850857", "text": "public function getDir(): string;", "title": "" }, { "docid": "15926b4187d6c87252570be04b390190", "score": "0.5678095", "text": "public function getFolderId()\n {\n return $this->folderId;\n }", "title": "" }, { "docid": "e4d82f5ed61104bff1ba5da07e4f4022", "score": "0.5677571", "text": "public function getFlatFolders()\n {\n $society_id = OauthToken::find(\\Input::get('access_token'))->society_id;\n $user_id = OauthToken::find(\\Input::get('access_token'))->user_id;\n\t\t\n\t\t$search = \\Input::get('search',null);\n $type = \\Input::get('type',1);\n//\t\tprint_r($type);exit;\n\t\t$binds = ['offset'=>\\Input::get('offset',0),'limit'=>\\Input::get('limit',10)];\n \n $where = ' where f.society_id = \"'.$society_id.'\" and f.deleted_at IS NULL';\n\t\tif ($search) {\n\t\t\t$where .= ' and f.name like :search and f.type= :type';\n\t\t\t$binds['search'] = '%'.$search.'%';\n $binds['type'] =$type;\n\t\t}else{\n $where .= ' and f.type = :type';\n $binds['type'] = $type;\n }\n \n $results = \\DB::select(\"select f.*,users.first_name,users.last_name,f.name as folder_name,date_format(f.created_at,'%d-%m-%Y') as created_at from admin_folder as f INNER JOIN users on f.user_id=users.id $where order by f.id desc limit :limit offset :offset\",$binds);\n \n \n\t\t$count = \\DB::selectOne(\n\t\t\t\t\t\"select count(*) as total from admin_folder as f $where\",\n\t\t\t\t\t$search ? array('search'=>'%'.$search.'%','type'=>$type) : array('type'=>$type)\n\t\t\t\t);\n\n\t\treturn ['total'=>$count->total,'data'=>$results];\n }", "title": "" }, { "docid": "ec9c7f746608e4689bd04ff00ee154a7", "score": "0.56725526", "text": "public function show(Folder $folder, $id)\n {\n $folder = Folder::with('project')\n ->whereHas('project.users', function($query) {\n $query->where('id', auth()->id());\n })->findOrFail($id);\n return response()->json([\n 'children' => $folder->children,\n 'folder' => $folder\n ]);\n }", "title": "" }, { "docid": "1a5237315a62caae92afaa72e759b2b7", "score": "0.56723917", "text": "public function get_folder_stats(string $folder = null)\n\t{\n\t\t$current_folder = $this->folder;\n\n\t\tif (isset($folder))\n\t\t{\n\t\t\t$this->select_folder($folder);\n\t\t}\n\n\t\t$stats = imap_mailboxmsginfo($this->stream);\n\n\t\tif ($stats)\n\t\t{\n\t\t\t$stats = [\n\t\t\t\t'unread' => $stats->Unread,\n\t\t\t\t'deleted' => $stats->Deleted,\n\t\t\t\t'messages' => $stats->Nmsgs,\n\t\t\t\t'size' => $stats->Size,\n\t\t\t\t'Date' => $stats->Date,\n\t\t\t\t'date' => date('c', strtotime(substr($stats->Date, 0, 30))),\n\t\t\t\t'recent' => $stats->Recent,\n\t\t\t];\n\t\t}\n\n\t\tif (isset($folder))\n\t\t{\n\t\t\t$this->select_folder($current_folder);\n\t\t}\n\n\t\treturn $stats;\n\t}", "title": "" }, { "docid": "de1047a4238943fd1c8cc0883e2f7d2a", "score": "0.5668588", "text": "public function folder($folder)\n {\n // @todo\n }", "title": "" }, { "docid": "c80135fe0551a4d80f708a7829698f56", "score": "0.5666607", "text": "public function getStrAdditionalInfo() {\n $strNameInternal = $this->getStrPageI();\n $strNameExternal = $this->getStrPageE();\n $strNameFolder = \"\";\n if(validateSystemid($this->getStrFolderI())) {\n $objFolder = new class_module_pages_folder($this->getStrFolderI());\n $strNameFolder = $objFolder->getStrName();\n }\n\n return $strNameInternal.$strNameExternal.$strNameFolder;\n }", "title": "" }, { "docid": "cf390b52a124e06a860e523d1326ed64", "score": "0.5664995", "text": "public function get_directory() {\n\t\treturn $this->directory;\n\t}", "title": "" }, { "docid": "4f8c93bc7ed402f6f0163c6f722874ec", "score": "0.5655948", "text": "public function getMetaImageFolder()\n {\n if ($album = $this->getAlbum()) {\n return $album->getMetaImageFolder();\n }\n }", "title": "" }, { "docid": "d813eee98f8ee86ac1885a56fc412686", "score": "0.56520146", "text": "public function getInformation();", "title": "" }, { "docid": "4607076efbfa90c4deb9f447b861123d", "score": "0.56411463", "text": "function getHtmlFileInfo(){\n\t\n\t\treturn $this->html_info;\n\t}", "title": "" }, { "docid": "be83d7ca6746b0212bbe6e2bc1623996", "score": "0.5638763", "text": "public function getSingleFolder(){\n $sqlQuery = \"SELECT\n idFolder,\n name, \n id_Folder, \n id_User\n FROM\n \". $this->dbTable .\"\n WHERE \n idFolder = ?\n LIMIT 0,1\";\n\n $stmt = self::$bdd->prepare($sqlQuery);\n \n $stmt->bindParam(1, $this->idFolder);\n\n if($stmt->execute()){\n \n return $stmt->fetch(PDO::FETCH_ASSOC);\n \n }\n else{\n false;\n }\n }", "title": "" }, { "docid": "c14effdb6422a38308b2d5803576b25b", "score": "0.5634005", "text": "public function getInfo()\n {\n return $this->getServer()->getInfo();\n }", "title": "" }, { "docid": "cd482a429bb7e28861d9c35ffd9f04d8", "score": "0.5627603", "text": "public function getPathInfo()\n {\n return $this->path;\n }", "title": "" }, { "docid": "3faf0f480ab11ee063ba4c7c25941336", "score": "0.5624469", "text": "function ShowShareFolder()\n {\n $folderController = new FolderController($this->Core);\n echo $folderController->ShowShareFolder(Request::GetPost(\"FolderId\"));\n }", "title": "" }, { "docid": "dc022f6baa6d8df08c742821eb799fe2", "score": "0.5624079", "text": "public function find_folder($folder)\n {\n }", "title": "" }, { "docid": "1f70e3966ef941b0171754f1c71baa4a", "score": "0.5617999", "text": "public function show($id)\n {\n return Folder::findOrFail($id);\n }", "title": "" }, { "docid": "823569634d96cb4dfd48bef69cb19011", "score": "0.56108767", "text": "public function folder($id) {\n if(!$this->current_user->can('view_directory'))\n return $this->prepareResponse('NOT_AUTHORIZED');\n\n $type = ContractType::where('name', '=', 'FOLDER')->first();\n $directory = Contract::find($id);\n\n if(!$directory)\n\t\t\treturn $this->prepareResponse('directory.NOT_FOUND');\n\n\n if($directory->contract_type_id != $type->id)\n return $this->prepareResponse('directory.OBJECT_NOT_DIRECTORY');\n\n if($directory->user_id != $this->current_user->id)\n // if the current user is not authorized to view a directory of other users.\n if(!$this->current_user->can('super_view_directory'))\n return $this->prepareResponse('NOT_AUTHORIZED');\n\n $directory->load('children');\n $directory->load('children.contract_type');\n return $directory->toArray();\n }", "title": "" }, { "docid": "901ed6f1cc67612046f11d0eaaa315c3", "score": "0.56053954", "text": "public function getPathInfo(): string\n {\n return $this->pathInfo;\n }", "title": "" }, { "docid": "42654f420e901a0028aa7399f71f3409", "score": "0.5595234", "text": "public function getDirectoryVar();", "title": "" }, { "docid": "3cc0883a4cd498752087f03ac48e6437", "score": "0.55796266", "text": "public function getDirectory()\n {\n return $this->directory;\n }", "title": "" }, { "docid": "3cc0883a4cd498752087f03ac48e6437", "score": "0.55796266", "text": "public function getDirectory()\n {\n return $this->directory;\n }", "title": "" } ]
9a8bd01733d8fc8695bd4d8cd22ce6fc
Return the notify body from request.
[ { "docid": "6165fccee7a427c4f353fa1b806fb8d2", "score": "0.0", "text": "public function getReturnData()\n {\n if (!empty($this->notify)) {\n return $this->notify;\n }\n\n $desKey = Config::get(\"desKey\");\n $keys = base64_decode($desKey);\n\n $tradeNum = $this->request->get('tradeNum');\n $amount = $this->request->get('amount');\n $currency = $this->request->get('currency');\n $tradeTime = $this->request->get('tradeTime');\n $note = $this->request->get('note');\n $status = $this->request->get('status');\n $sign = $this->request->get('sign');\n\n $resdata = array();\n if('' !== $tradeNum){\n $resdata['tradeNum'] = TDES::decrypt4HexStr($keys, $tradeNum);\n }\n\n if('' !== $amount){\n $resdata['amount'] = TDES::decrypt4HexStr($keys, $amount);\n }\n\n if('' !== $currency){\n $resdata['currency'] = TDES::decrypt4HexStr($keys, $currency);\n }\n\n if('' !== $tradeTime){\n $resdata['tradeTime'] = TDES::decrypt4HexStr($keys, $tradeTime);\n }\n\n if('' !== $note){\n $resdata['note'] = TDES::decrypt4HexStr($keys, $note);\n }\n\n if('' !== $status){\n $resdata['status'] = TDES::decrypt4HexStr($keys, $status);\n }\n\n if('' !== $tradeNum){\n $resdata['tradeNum'] = TDES::decrypt4HexStr($keys, $tradeNum);\n }\n\n $strSourceData = Sign::signString($resdata, array());\n $decryptStr = Rsa::decryptByPublicKey($sign);\n $sha256SourceSignString = hash(\"sha256\", $strSourceData);\n\n if($decryptStr == $sha256SourceSignString){\n $this->isValid = true;\n }\n\n if (true === Config::get('debug')) {\n $this->log('return data: ' . var_export($resdata, true), 'Info');\n $this->log('isValid: ' . $this->isValid . \";{$decryptStr} == {$sha256SourceSignString}\", 'Info');\n }\n\n return $this->notify = new Collection($resdata);\n }", "title": "" } ]
[ { "docid": "e5167d950caae993d3e677d6b97bc1de", "score": "0.69851035", "text": "protected function getRequestBody()\n\t{\n\t\treturn $this->request->getContent();\n\t}", "title": "" }, { "docid": "43062e8427d0875ed6a89e516f4b7e27", "score": "0.6936559", "text": "public static function getRequestBody() {}", "title": "" }, { "docid": "3009330cf3348f227567af7825d07534", "score": "0.67538923", "text": "static function body()\n\t{\n\t\treturn file_get_contents('php://input');\n\t}", "title": "" }, { "docid": "b3bd8da5261b23148736e3ed2d601cd7", "score": "0.6666282", "text": "public static function getBody() {\r\n return @file_get_contents('php://input');\r\n }", "title": "" }, { "docid": "265ce8d9cfdcf6248ad4694d021b2b55", "score": "0.65728545", "text": "public function body()\r\n {\r\n // Only get it once\r\n if (null === $this->body) {\r\n $this->body = @file_get_contents('php://input');\r\n }\r\n\r\n return $this->body;\r\n }", "title": "" }, { "docid": "3457bbc841a842758ce5a77a90b7d188", "score": "0.65084857", "text": "protected function getBody()\n {\n return $this->getRequest()->getBody();\n }", "title": "" }, { "docid": "93a3f7ee0d89d60d37283772a8a660f9", "score": "0.64427567", "text": "public function body() {\n\t\tif ( null === $this->_body ) {\n\t\t\t$this->_body = @file_get_contents( 'php://input' );\n\t\t}\n\n\t\treturn $this->_body;\n\t}", "title": "" }, { "docid": "37687a6ce72baff8f09ce736d9558eba", "score": "0.6416284", "text": "public function get_body()\n {\n return json_decode(file_get_contents('php://input'), TRUE);\n }", "title": "" }, { "docid": "5f0033723bddb83839e06361f30609ac", "score": "0.6408606", "text": "private function body()\n {\n return json_decode($this->request->all()[\"job\"], true);\n }", "title": "" }, { "docid": "043ba412d8d378c94112660e864cb4bc", "score": "0.6394916", "text": "public function getNotifyData()\n {\n if (!empty($this->notify)) {\n return $this->notify;\n }\n\n $resdata = array();\n $xml = strval($this->request->getContent());\n\n $this->isValid = Xml::decryptResXml($xml, $resdata);\n\n //记录日志\n if (true === Config::get('debug')) {\n $this->log('notify xml: ' . var_export($xml, true), 'Info');\n $this->log('notify data: ' . var_export($resdata, true), 'Info');\n $this->log('isValid: ' . $this->isValid, 'Info');\n }\n\n return $this->notify = new Collection($resdata);\n }", "title": "" }, { "docid": "265a5a88b5da24b1edfa7468b426f8c9", "score": "0.62928724", "text": "abstract public function getRequestBody();", "title": "" }, { "docid": "af93519fec67d9e6e8d6a70f783249d8", "score": "0.62915516", "text": "public function post_body() {\n\t\treturn file_get_contents( 'php://input' );\n\t}", "title": "" }, { "docid": "962c5230ecacb794bbddb58ecacebbd8", "score": "0.6265829", "text": "public function getPayload()\n {\n return $this->request->getJsonRawBody();\n }", "title": "" }, { "docid": "db4e285284ac5809eb4f319e960fe4aa", "score": "0.62604344", "text": "public function body()\n {\n $entityBody = file_get_contents('php://input');\n\n foreach ((array)json_decode($entityBody) as $field => $value) {\n $this->requestStack[$field] = $value;\n }\n return json_decode($entityBody);\n }", "title": "" }, { "docid": "ac46ace1ead35da6e22e3ec4714a3a6c", "score": "0.61886877", "text": "public static function getBody()\n {\n $entityBody = file_get_contents('php://input');\n return $entityBody;\n }", "title": "" }, { "docid": "90d89e2dcdc9a44210ddf7d8507972ec", "score": "0.61519516", "text": "public function getBody() : string\n {\n if ($this->requestMethod !== \"POST\" && $this->requestMethod !== \"PUT\" && $this->requestMethod !== \"DELETE\")\n throw new \\InvalidArgumentException(\"Body is only availabe on POST/PUT requests.\");\n return file_get_contents(\"php://input\");\n }", "title": "" }, { "docid": "271e34a831299d467872b5f75b503073", "score": "0.61274254", "text": "function getBody() {\n\t\treturn $this->getData('body');\n\t}", "title": "" }, { "docid": "271e34a831299d467872b5f75b503073", "score": "0.61274254", "text": "function getBody() {\n\t\treturn $this->getData('body');\n\t}", "title": "" }, { "docid": "1a59ccb9d70ffbba4cd2611109afa7d6", "score": "0.6092119", "text": "public function get_payload_request();", "title": "" }, { "docid": "a87019a0c7501d78bb2a3e48b9fffdb4", "score": "0.60842365", "text": "static function getBody()\n\t{\n\t return self::get('__postBody__', null);\n\t}", "title": "" }, { "docid": "c34536b9afd52c4ab834886fae40c34a", "score": "0.6079072", "text": "#[Pure]\n public function getRawRequestMessage() {}", "title": "" }, { "docid": "3a30520f30dbf1d9c15e36140b799600", "score": "0.6077351", "text": "public function body() {\n\t\treturn $this->getBody();\n\t}", "title": "" }, { "docid": "654e52d4fe9aae95bd453266fea90930", "score": "0.6065987", "text": "public function getBody()\n {\n return $this->values[\"body\"];\n }", "title": "" }, { "docid": "ea77026ef8aeedacf1edb199b9c6753e", "score": "0.6064057", "text": "public function getRawBody();", "title": "" }, { "docid": "1fa57f4f9c20c22a9748b5eeba8d8998", "score": "0.60611415", "text": "public function getBody()\n {\n $this->set('returnTransfer', 1);\n\n return $this->send();\n }", "title": "" }, { "docid": "5b87de5afd44d672a00cd37e26aa6757", "score": "0.6057676", "text": "public function getRequestBody() {\n return json_encode($this->buildRequestArray());\n }", "title": "" }, { "docid": "375d76da6202841a45f9e0943a767984", "score": "0.6052118", "text": "public function getBody()\n\t{\n\t\tif ( !$this->executed ) {\n\t\t\treturn 'Trying to fetch response body for a pending request.';\n\t\t}\n\t\treturn $this->response_body;\n\t}", "title": "" }, { "docid": "0b869dd6de30d70f8c1ccfc3c853fe8b", "score": "0.60483724", "text": "public static function requestPayload() {\n return json_decode(file_get_contents('php://input'), true);\n }", "title": "" }, { "docid": "4809d813643d01c2fa823596eed4e1fb", "score": "0.6040094", "text": "public function getHttpBody(): string\n {\n return $this->httpBody;\n }", "title": "" }, { "docid": "ceb9630c1bc09a708499a9b6571e21fb", "score": "0.6024131", "text": "public function getRawBody()\n {\n return $this->job->getMessageBody();\n }", "title": "" }, { "docid": "242f7805592ac680721500dda0cef50b", "score": "0.6016828", "text": "private function getRequest() {\n return json_decode(request()->getContent(), true);\n }", "title": "" }, { "docid": "95459b02981d129fccd7996af47fdf5e", "score": "0.5998897", "text": "public function getBody() {}", "title": "" }, { "docid": "14c7dbe1e88627548cf5c0a96f81c030", "score": "0.59886074", "text": "public function getBody()\r\n\t{\r\n\t\treturn $this->data;\r\n\t}", "title": "" }, { "docid": "3abddf2ccaadb87ba1e5583f120d6ccb", "score": "0.5987079", "text": "public function getRawBody(): string\n {\n if ($this->rawBody === null) {\n $this->rawBody = file_get_contents('php://input');\n }\n\n return $this->rawBody;\n }", "title": "" }, { "docid": "a3c7e6b33692a08c2ffb95d391685735", "score": "0.5978688", "text": "public function getRawRequest() {\n\t}", "title": "" }, { "docid": "3d65c46e5d7b2b695595410bd5c1828e", "score": "0.59735185", "text": "public function getMessageBody()\n {\n return $this->messageBody;\n }", "title": "" }, { "docid": "46afe6b16d2096324f2a36b0db4ae6d8", "score": "0.5963917", "text": "public function getBody(): string\n {\n return $this->message;\n }", "title": "" }, { "docid": "8376840f451c75bd321bfe492bd470e5", "score": "0.5944341", "text": "public function getBodyContents()\n {\n return ($this->payload != null) \n ? $this->payload : URLUtils::formURLEncodeMap($this->bodyParams); \n }", "title": "" }, { "docid": "4e83765e9fd6fe23b0c6ed12b1d30c6d", "score": "0.594253", "text": "public function getBody()\n {\n return $this->invokeWrappedIfEntityEnclosed(__FUNCTION__, func_get_args());\n }", "title": "" }, { "docid": "e60bbf82b7e153c9cad2ed8f6a14fdae", "score": "0.5938137", "text": "public function getRawBody()\n {\n return array_key_exists('Body', $this->job) ? $this->job['Body'] : $this->job['body'];\n }", "title": "" }, { "docid": "bb7c0ac1c216c6b9aee838284f732997", "score": "0.5927489", "text": "public function getBody()\n {\n return $this->rawBody;\n }", "title": "" }, { "docid": "47e9a012950631acbe579cafe70993a7", "score": "0.59260476", "text": "#[Pure]\nfunction http_get_request_body() {}", "title": "" }, { "docid": "2cc6fe0ddbf8a10055f25b5a7f7ef5e7", "score": "0.5912794", "text": "protected function getRequestBody(Request $request)\n {\n return json_decode((string) $request->getBody());\n }", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.5908057", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.5908057", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.5908057", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.5908057", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.5908057", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.5908057", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.5908057", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.5908057", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.5908057", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.5908057", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.5908057", "text": "public function getBody();", "title": "" }, { "docid": "e6f5ff01aaf9fd60e3979b5e106ca635", "score": "0.5908057", "text": "public function getBody();", "title": "" }, { "docid": "23ea77425d326c6b47f954b94bbafc69", "score": "0.5905362", "text": "public function parse_body()\n\t{\n\t\tforeach ($this->vars AS $key => $value)\n\t\t{\n\t\t\t$this->body = str_replace('{' . $key . '}', $value, $this->body);\n\t\t}\n\n\t\t// Pas de HTML pour MSN / Jabber\n\t\tif ($this->method == NOTIFY_MSN || $this->method == NOTIFY_JABBER)\n\t\t{\n\t\t\t$this->body = preg_replace('#</?[^>]+?>#si', '', $this->body);\n\t\t\t$this->body = str_replace(array(\"\\r\\n\", \"\\r\"), array(\"\\n\", \"\\n\"), $this->body);\n\t\t\t$this->body = str_replace(\"\\n\", \"\\r\\n\", $this->body);\n\n\t\t\tif ($this->method == NOTIFY_JABBER)\n\t\t\t{\n\t\t\t\t$this->body = htmlspecialchars($this->body);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7f17f25a70ef10ddcf3946bfb48d67d3", "score": "0.58983964", "text": "public function rawRequest() {\n\t\treturn $this->raw_request;\n\t}", "title": "" }, { "docid": "3e2bc2e665ac6d2d65ffdca9bcec0bf6", "score": "0.5897685", "text": "public function get_body_string() \n\t{ \n\t\treturn $this->body_string; \n\t}", "title": "" }, { "docid": "04d38003789c256d2f55c8d07c8c5793", "score": "0.5896772", "text": "protected function body() \n\t{\n\t\tif (!$this->body instanceof stdClass)\n\t\t{\n\t\t\t$this->body = new stdClass;\n\t\t}\n\t\treturn $this->body;\n\t}", "title": "" }, { "docid": "d0826eb424d5db849a74385e3ba974bc", "score": "0.58906853", "text": "public function getRawBody()\n {\n if ($this->_rawBody === null) {\n $this->_rawBody = file_get_contents('php://input');\n }\n\n return $this->_rawBody;\n }", "title": "" }, { "docid": "0ddb55f6302b69a59b6a42789e53bad0", "score": "0.58895355", "text": "public function getRawBody()\n {\n return $this->rawMessage;\n }", "title": "" }, { "docid": "8123e72a22b983b7013fc0e1f90578ef", "score": "0.58869773", "text": "function getHttpBody() {\n return $this->httpBody;\n }", "title": "" }, { "docid": "b4720a5a5c725c159817f56852ec9484", "score": "0.588366", "text": "public function getHttpBody()\n {\n return $this->httpBody;\n }", "title": "" }, { "docid": "04d27edbbecad0bd47eda6ccd7cb751a", "score": "0.5878053", "text": "public function getBody()\n {\n $parser = $this->getParser();\n $return = $parser->getMessageBody();\n return $return;\n }", "title": "" }, { "docid": "57eae38c39904824b1360abca5e261c8", "score": "0.58767354", "text": "public function getBody() : array\n {\n if ($this->requestMethod == \"GET\") {\n $result = array(); \n foreach ($_GET as $key => $value) {\n $result[$key] = $value;\n }\n return $result;\n }\n\n if ($this->requestMethod == \"POST\") {\n $result = array();\n foreach ($_POST as $key => $value) {\n $result[$key] = filter_input(INPUT_POST, $key, FILTER_SANITIZE_SPECIAL_CHARS);\n }\n\n return $result;\n }\n\n return $body;\n }", "title": "" }, { "docid": "22a4b90527c74a277192cdb2e366cb98", "score": "0.5855812", "text": "public function body()\n\t{\n\t\treturn $this->body;\n\t}", "title": "" }, { "docid": "b8fb239f2dd891cc66713808c7241648", "score": "0.5849309", "text": "public function getBody()\n {\n return $this->response;\n }", "title": "" }, { "docid": "4d8b1897dc06a23869d9b14c406f9436", "score": "0.58461523", "text": "public function getBody()\n {\n $body = json_decode($this->body, true);\n\n dd($body);\n }", "title": "" }, { "docid": "d3703e232ca9712c83f749222d423ea3", "score": "0.58385223", "text": "public function getBody() {\n\t\treturn $this->response_body;\n\t}", "title": "" }, { "docid": "d81c457cccab6755e279045f99fd2511", "score": "0.58360606", "text": "public function getRawBody()\n {\n return (string) $this->job->getBody();\n }", "title": "" }, { "docid": "a135a72590f9986b3eafe6fc9e02bad8", "score": "0.58204913", "text": "public function getBody() {\n\t\treturn $this->body;\n }", "title": "" }, { "docid": "a135a72590f9986b3eafe6fc9e02bad8", "score": "0.58204913", "text": "public function getBody() {\n\t\treturn $this->body;\n }", "title": "" }, { "docid": "0d0374f9bbdad1f68184756765f299e7", "score": "0.5818663", "text": "public function body() {\n return $this->body ;\n }", "title": "" }, { "docid": "e012ce1f62ef40076336ed7a2ba997d7", "score": "0.58168364", "text": "public function body() {\n return $this->body;\n }", "title": "" }, { "docid": "0384a020c2fc736e20e563b7de6c95a8", "score": "0.5815162", "text": "public function getBody(): string {\n\t\treturn $this->body;\n\t}", "title": "" }, { "docid": "3effd9725a92a63f9bc187a31787b986", "score": "0.58080053", "text": "public function getBody(): string;", "title": "" }, { "docid": "3effd9725a92a63f9bc187a31787b986", "score": "0.58080053", "text": "public function getBody(): string;", "title": "" }, { "docid": "21f24e72029df7cf0269a383440e85e1", "score": "0.58075327", "text": "public function getParsedBody() {}", "title": "" }, { "docid": "5e79e07a25e7fcb86d944caf0b108953", "score": "0.57889605", "text": "public function getBody(): string\n {\n return $this->body;\n }", "title": "" }, { "docid": "5e79e07a25e7fcb86d944caf0b108953", "score": "0.57889605", "text": "public function getBody(): string\n {\n return $this->body;\n }", "title": "" }, { "docid": "9a861684ca1d00e8c3c7df6465bd1953", "score": "0.5784624", "text": "public function getRawRequest()\n {\n return $this->request;\n }", "title": "" }, { "docid": "12d9abd232bdd8737252e6e639fa8730", "score": "0.5780964", "text": "public function getBody() {\n\t\treturn $this->body;\n\t}", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" }, { "docid": "bf2f6ebe17a35be3689482bb72fc0c2a", "score": "0.57721883", "text": "public function getBody()\n {\n return $this->body;\n }", "title": "" } ]
b73756c671fe0ef75a11eca3d5fb7cde
Get brand_name Prod Hier Level 3
[ { "docid": "73358a04af9cbbc5387bce3b85ec1ccb", "score": "0.778214", "text": "public function getBrand_name () {\n\t$preValue = $this->preGetValue(\"brand_name\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->brand_name;\n\treturn $data;\n}", "title": "" } ]
[ { "docid": "2dcc5055ce8863b07439875f9097717f", "score": "0.7242045", "text": "public function getBrandName(): string\n {\n return $this->brand;\n }", "title": "" }, { "docid": "210bac9669cc9d09420e6516e2be6881", "score": "0.672803", "text": "public function getBrand(): string\n {\n return AbstractDeviceParser::getShortCode($this->brand);\n }", "title": "" }, { "docid": "3dc76e9eb6e4ef010dd246a7c440b9a1", "score": "0.6638718", "text": "public function getBrandName($id){\n $this->db->select('b_name');\n $this->db->where('id',$id, FALSE);\n $result = $this->db->get('brand');\n return $result->row()->b_name;\n }", "title": "" }, { "docid": "da5d5d62ed6aedb7c5feb6ff4b2f71ad", "score": "0.6581357", "text": "public function getFullName()\n {\n return \"Brand Citozi\";\n }", "title": "" }, { "docid": "6cc0e41a8f612ae1160b8c91604f23d6", "score": "0.657813", "text": "public function getBrand()\n {\n return $this->brand;\n }", "title": "" }, { "docid": "6cc0e41a8f612ae1160b8c91604f23d6", "score": "0.657813", "text": "public function getBrand()\n {\n return $this->brand;\n }", "title": "" }, { "docid": "da2dbd1a9f5a2985d917ff04a0ba10b4", "score": "0.6575138", "text": "function fumseck_brand_site_title() {\n\t$title = strtolower ( get_bloginfo('name') );\n\tlist($firstname, $lastname ) = explode( ' ', $title );\n\t$output = '<span class=\"brand1\">' . $firstname . '</span>'\n\t\t\t. '<span class=\"brand2\">' . $lastname . '</span>';\n\techo $output;\n}", "title": "" }, { "docid": "6df53bb54ac4fc0ad626d173cfe4eba3", "score": "0.6492103", "text": "public function dbGetBrand()\n\t{\n\t\t// Return the Brand Names\n\t\treturn array(\"-\", \"Coke\", \"Coke Light\", \"Coke Zero\", \"Sprite\", \"Dr Pepper\", \"Fanta\");\n\t}", "title": "" }, { "docid": "72fe45dcfbf3f98180feb498ba8e2cf4", "score": "0.63913536", "text": "public function carBrand()\n {\n return parent::getBrand();\n }", "title": "" }, { "docid": "dbc9c3a916bb646f7a7e64907a7fb911", "score": "0.62780565", "text": "public function getBrandName(): ?string\n {\n return isset($this->BrandName) ? $this->BrandName : null;\n }", "title": "" }, { "docid": "aac7b1e488c9319394d5d3ac7fd1bbaf", "score": "0.6251089", "text": "public function getBrand(): ?string\n {\n return $this->brand;\n }", "title": "" }, { "docid": "a80febe9d53841050a374734f9a7437a", "score": "0.61234725", "text": "public function get_brand() {\n $query = $this->db->get('brand');\n if ($query->num_rows() > 0) {\n return $query->result();\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "9d2a81ebed687c4d296800d22d2b3bb0", "score": "0.6097879", "text": "public function getBrand()\n\t{\n\t\t$Brand = new Product_Brand();\n\t\treturn $Brand->findItem( array( 'Id = '.$this->Brand ) );\n\t}", "title": "" }, { "docid": "d7ea8bde205e1e78972e8a51c3727c41", "score": "0.60944253", "text": "public function getAttributeCode(){\n\t\t$code = 'brand_name';\n\t\treturn $code;\n\t}", "title": "" }, { "docid": "826e56e092e0d508ad9e3f4ed51d73db", "score": "0.6072722", "text": "public function getBrand()\n{\nreturn $this->brand;\n}", "title": "" }, { "docid": "ef54525b88e1cb8b17ecc190c73a0379", "score": "0.60686356", "text": "public function getBrand()\n {\n foreach ($this->getSupportedBrands() as $brand => $val) {\n if (preg_match($val, $this->getNumber())) {\n return $brand;\n }\n }\n }", "title": "" }, { "docid": "3ee21a384329a27113ec9316ed54c626", "score": "0.5991271", "text": "public function getBrand_id()\n {\n return $this->brand_id;\n }", "title": "" }, { "docid": "3ee21a384329a27113ec9316ed54c626", "score": "0.5991271", "text": "public function getBrand_id()\n {\n return $this->brand_id;\n }", "title": "" }, { "docid": "5ba229e90136acaab4e3feb1405f745c", "score": "0.5988851", "text": "public function getBrand()\n {\n $brandAttribute = $this->helper->getBrandConfig();\n\n return $this->getAttribute($brandAttribute);\n }", "title": "" }, { "docid": "e0db1d30ca8ae1a1b40d0c106ebab80b", "score": "0.594481", "text": "function getManufacturerTitle() {\n \tif ($this->getManufacturerUid()) {\n \t\treturn $this->conn_db->getManufacturerTitle($this->getManufacturerUid());\n \t}\n \t\n }", "title": "" }, { "docid": "c12b6901f3886758f37abc257c989f7b", "score": "0.59213406", "text": "public static function getHgncName($biomarker) {\n\t\tforeach ($biomarker['BiomarkerName'] as $name) {\n\t\t\tif ($name['isHgnc'] == 1) {\n\t\t\t\treturn $name['name'];\n\t\t\t}\n\t\t}\n\t\treturn \"Unknown\";\n\t}", "title": "" }, { "docid": "d80a55e65441aed0f461fdcb6b37e4ef", "score": "0.591225", "text": "public function getBrandurl(){ \n\t\treturn Mage::helper('brand')->brandUrl();\n\t}", "title": "" }, { "docid": "ac931dc29a386a206a0d0280723eaf37", "score": "0.5908339", "text": "public function getProduct_name () {\n\t$preValue = $this->preGetValue(\"product_name\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->product_name;\n\treturn $data;\n}", "title": "" }, { "docid": "dd614547502aa1e1c2fcb264cd0668c4", "score": "0.59080166", "text": "public function getBrand() : ?string \n {\n if ( ! $this->hasBrand()) {\n $this->setBrand($this->getDefaultBrand());\n }\n return $this->brand;\n }", "title": "" }, { "docid": "f07178513b5e77286b01bedaccbea30f", "score": "0.58530027", "text": "function displayBrandNarrow($arr)\n\t{\n\t\tif((count($arr))>0)\n\t\t{\n\t\t\t$id=(int)$_GET['subcatid'];\n\t\t\t$cnt=count($arr);\n\t\t\tif(!array_key_exists(\"Brand\",$_SESSION['search_option']))\n\t\t\t{\n\t\t\t\t$output.='<ul><span>Brand</span>';\n\t\t\t\tfor($i=0;$i<$cnt;$i++)\n\t\t\t\t{\n\t\t\t\t\tif($arr[$i]['count'] > 0 )\n\t\t\t\t\t{\n\t\t \t\t\t\t$output.='<li><a href=\"'.$_SESSION['base_url'].'/index.php?do=featured&action=showfeaturedproduct&subcatid='.$id.'&type=Brand&val='.$arr[$i]['brand'].'\">'.(($arr[$i]['brand'])!='' ? $arr[$i]['brand'] : 'Unbranded Items').' ('.$arr[$i]['count'].')</a></li>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$output.='</ul>';\n\t\t\t}\n\t\t\t\n\t\t\n \t\t}\n \t\treturn $output;\n\t}", "title": "" }, { "docid": "1ca34074e0ec7bccf3b5105a99443736", "score": "0.5801217", "text": "function wac_vendor_name($user){\n\t$firstname = get_user_meta($user->ID,'first_name',true);\n\t$lastname = get_user_meta($user->ID,'last_name',true);\n\t\n\t$fullName = $user->data->user_nicename;\n\tif(!empty($firstname)){\n\t\t$fullName = trim($firstname.' '.$lastname);\n\t}\n\treturn $fullName;\n}", "title": "" }, { "docid": "69c49f9a35271f0fb85cefd48ae44489", "score": "0.5766506", "text": "public function getBrandFound()\n\t{\n\t\treturn $this->brandFound;\n\t}", "title": "" }, { "docid": "2d1a30428c8fd47218ffdf9d5673396f", "score": "0.57456565", "text": "function getVendorname(){\r\n return $this->vendorname;\r\n }", "title": "" }, { "docid": "2c8146187fb8e098b353a633777c220b", "score": "0.5717689", "text": "function tep_get_manufacturers_name($manufacturers_id) {\n\t$manufactures_query = tep_db_query(\"select manufacturers_name from \" . TABLE_MANUFACTURERS . \" where manufacturers_id = '\" . (int)$manufacturers_id . \"'\");\n\t$manufactures = tep_db_fetch_array($manufactures_query);\n\treturn $manufactures['manufacturers_name'];\n}", "title": "" }, { "docid": "0196631baa782233dd48da136e13bef9", "score": "0.57107353", "text": "function buildername($id)\n{\n\t$buildername=mysql_fetch_array(mysql_query(\"select company_name from manage_property_builder where p_bid='$id'\"));\n\treturn $buildername['company_name'];\n\t}", "title": "" }, { "docid": "df05431d083f7bb905eeae6884fc8c0c", "score": "0.5680802", "text": "function prodname()\r\n {\r\n //left join oc_product as op on opd.product_id=op.product_id \");\r\n\r\n //return $query->rows; \r\n \r\n $query = $this->db->query(\"SELECT product_id,model,sku FROM `oc_product` WHERE `status`='1'\");\r\n \r\n return $query->rows;\r\n }", "title": "" }, { "docid": "02471929010c89742c557db40315d345", "score": "0.56602186", "text": "function get_brand($id) {\n return $this->db->get_where('brands', array('id' => $id))->row_array();\n }", "title": "" }, { "docid": "c8a1c4ac109b8bc704b39d05179d6627", "score": "0.5657559", "text": "public function getBrandNames($keyword)\n {\n $brands = null;\n //dd($keyword);\n\n try\n {\n $query = DB::table('brands as b')->select('b.id as brand_id', 'b.brand_name', 'd.id as drug_id', 'd.drug_name');\n $query->join('drugs as d', 'd.id', '=', 'b.drug_id');\n $query->where('b.brand_name', 'LIKE', $keyword.'%');\n $query->where('b.brand_status', '=', 1);\n //dd($query->toSql());\n $brands = $query->get();\n //dd($brands);\n /*$query = DB::table('drugs as d')->select('d.id', 'd.brand_name', 'd.drug_name');\n $query->where('d.brand_name', 'LIKE', $keyword.'%');\n $query->where('d.drug_status', '=', 1);\n\n $brands = $query->get();*/\n }\n catch(QueryException $queryEx)\n {\n throw new HospitalException(null, ErrorEnum::BRAND_LIST_ERROR, $queryEx);\n }\n catch(Exception $exc)\n {\n throw new HospitalException(null, ErrorEnum::BRAND_LIST_ERROR, $exc);\n }\n\n return $brands;\n }", "title": "" }, { "docid": "9692a342a42a3343fa8b38654430f28c", "score": "0.56573683", "text": "function getName($row) {\n $result = \"\";\n if ($row['objectnaam']!=\"\") {\n\t$result = processWikitext($row['objectnaam'], 0);\n } else {\n\t$result = $row['objrijksnr'];\n } \n if ($row['woonplaats']!=\"\") {\n\t$result = $result . \", \" . $row['woonplaats'];\n }\n return $result;\n}", "title": "" }, { "docid": "e69891be01b02e209ef83e3a0b54fe6a", "score": "0.5645576", "text": "public function getBrandID()\n\t{\n\t\treturn $this->brandID;\n\t}", "title": "" }, { "docid": "aea21e6b55eb018b5c41bf727bc8e9f2", "score": "0.56390333", "text": "function corBrand($arr)\n\t{\n\t\t $sql='select distinct brand,product_id from products_table group by brand asc';\n\t\t $obj=new Bin_Query();\n\t\t $obj->executeQuery($sql);\n\t\t return Display_DProductEntry::corBrand($obj->records,$arr);\n\t}", "title": "" }, { "docid": "d675141b229941990eab62bdc08a3971", "score": "0.56318176", "text": "public function getBrandBySku($identifier)\r\n\t{\r\n\t\tif (strlen($identifier))\r\n\t\t{\r\n\t\t\t$product = Mage::getModel('catalog/product')->loadByAttribute('sku', $identifier);\r\n\t\t\t\r\n\t\t\tif ($product && $product instanceof Mage_Catalog_Model_Product)\r\n\t\t\t{\r\n\t\t\t\treturn $product->getAttributeText('manufacturer');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn '';\r\n\t}", "title": "" }, { "docid": "195693d6770c4966c5f3e2dbfd3e5c6a", "score": "0.56316084", "text": "public function fullname()\n\t{\n\t\treturn $this->product->name .' - '. $this->name();\n\t}", "title": "" }, { "docid": "4a4e6a0303e49d04347fc34c70bb563d", "score": "0.5614288", "text": "function viaggio_site_brand(){\n\tob_start();\n\tif(cs_get_option('logo_url') != ''){\n\t\t$site_brand = '<a href=\"'.esc_url(home_url('/')).'\"><img src=\"'.wp_get_attachment_image_src( cs_get_option( 'logo_url' ), 'full' )[0].'\" alt=\"Logo\"/></a>';\n\t\techo $site_brand;\n\t}else{\n\t\t$site_brand = '<div class=\"brand_container\"><h1 class=\"brand_name\"><a href=\"'. esc_url(home_url('/')) .'\">'.get_bloginfo('name').'</a></h1>';\n\t\tif(get_bloginfo('description')){\n\t\t\t$site_brand .= '<h2 class=\"brand_description\">'.get_bloginfo('description').'</h2></div>';\n\t\t}\n\t\techo $site_brand;\n\t}\n\n}", "title": "" }, { "docid": "3579af3a9baba31cdaf0b3f2eff5bf24", "score": "0.5612955", "text": "public function get_brands()\n\t{\n\t\t$brands = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect(array('brand', 'name'))->groupByAttribute('brand')->getColumnValues('brand');\n\t\tunset($brands[0]);\n\t\tksort($brands);\n\t\treturn $brands;\n\t}", "title": "" }, { "docid": "f893f5f8f47fcee5d6a9f65c4778e86f", "score": "0.5608146", "text": "function getProductsByBrand()\n\t{\n\t\tglobal $con;\n\t\tif (isset($_GET['brand'])) {\n\t\t\t$brand_id = $_GET['brand'];\n\t\t\t$get_products = \"select * from products where prod_brand='$brand_id'\";\n\t\t\t$run_products = mysqli_query($con, $get_products);\n\t\t\t$count = mysqli_num_rows($run_products);\n\n\t\t\tif ($count == 0)\n\t\t\t\techo \"<h2>No Products for this brand</h2>\";\n\t\n\t\t\twhile($row = mysqli_fetch_array($run_products)) {\n\t\t\t\t$prod_id = $row['prod_id'];\n\t\t\t\t$prod_cat = $row['prod_cat'];\n\t\t\t\t$prod_brand = $row['prod_brand'];\n\t\t\t\t$prod_price = $row['prod_price'];\n\t\t\t\t$prod_image = $row['prod_img'];\n\n\t\t\t\techo \"\n\t\t\t\t<div class='single_product'>\n\t\t\t\t\t<h3>$prod_title</h3>\n\t\t\t\t\t<img src='admin_area/product_images/$prod_image'>\t\n\t\t\t\t\t<h2>$prod_price</h2>\n\t\t\t\t\t<a href='details.php?pro_id=$prod_id' style='float:left;'>Details</a>\n\t\t\t\t\t<a href='index.php?add_cart=$prod_id'><button>Add to Cart</button></a>\n\t\t\t\t</div>\n\t\t\t\t\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7f3514dbdf01a3e211b14c226e1f845c", "score": "0.55882734", "text": "public function getBrandId()\n {\n return $this->brandId;\n }", "title": "" }, { "docid": "18e8ea51bf6fab20590c808365019088", "score": "0.5585802", "text": "function tep_get_manufacturers_name($id) {\n $mquery = tep_db_query(\"select manufacturers_name from manufacturers where manufacturers_id = '\".$id.\"'\");\n $mresult = tep_db_fetch_array($mquery);\n\n return $mresult['manufacturers_name'];\n}", "title": "" }, { "docid": "4c7a0764af339e481cced5a4d3c7a376", "score": "0.5585259", "text": "protected function getCardBrand() {\n\t\t$number = preg_replace('/[^\\d]/', '', $this->getCard()->getNumber());\n\t\tif (preg_match('/^3[47][0-9]{13}$/', $number)) {\n\t\t\treturn 'AMEX';\n\t\t} elseif (preg_match('/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/', $number)) {\n\t\t\treturn 'DINERS';\n\t\t} elseif (preg_match('/^6(?:011|5[0-9][0-9])[0-9]{12}$/', $number)) {\n\t\t\treturn 'DISCOVER';\n\t\t} elseif (preg_match('/^(?:2131|1800|35\\d{3})\\d{11}$/', $number)) {\n\t\t\treturn 'JCB';\n\t\t} elseif (preg_match('/^5[1-5][0-9]{14}$/', $number)) {\n\t\t\treturn 'MC';\n\t\t} elseif (preg_match('/^4[0-9]{12}(?:[0-9]{3})?$/', $number)) {\n\t\t\treturn 'VISA';\n\t\t} else {\n\t\t\treturn 'UNKNOWN';\n\t\t}\n\t}", "title": "" }, { "docid": "68f943e775d2a7a414783b5889ea4f91", "score": "0.55556923", "text": "function getBrand(){\n global $db;\n $get_brands=\"select * from brands\";\n $run_brands=mysqli_query($db, $get_brands);\n while($row_brands=mysqli_fetch_array($run_brands)){\n $brand_id= $row_brands['brand_id'];\n $brand_title= $row_brands['brand_title'];\n echo \"<li><a href='index.php?brand=$brand_id'>$brand_title</a></li>\";\n }\n }", "title": "" }, { "docid": "513502c428fe05de92049a392208e7cc", "score": "0.5555658", "text": "public function get_name() : array {\n\t\t$name = $this->dom->find( 'h1.product-name' );\n\t\tif ( ! $name ) {\n\t\t\treturn [ 'product_name' => '' ];\n\t\t}\n\n\t\treturn [ 'product_name' => sanitize_text_field( $name[0]->text() ) ];\n\t}", "title": "" }, { "docid": "51730cbf11cd4a1695defb98157a5039", "score": "0.5539259", "text": "public function get_brands()\n\t{\n\t\t$this->db->select(\n\t\t\t\"DISTINCT(\".$this->datas_table.\".brand) \"\n\t\t);\n\t\t$this->db->from($this->datas_table);\n\t\t$datas = $this->db->get();\n\t\treturn $datas;\n\t}", "title": "" }, { "docid": "3b6c7afb96bd9c5b277a041fe61f33a4", "score": "0.5523705", "text": "public function get_name();", "title": "" }, { "docid": "3b6c7afb96bd9c5b277a041fe61f33a4", "score": "0.5523705", "text": "public function get_name();", "title": "" }, { "docid": "3b6c7afb96bd9c5b277a041fe61f33a4", "score": "0.5523705", "text": "public function get_name();", "title": "" }, { "docid": "e46a1f91dec3f3ab9131861882030854", "score": "0.55190915", "text": "public function getVendorName(): string;", "title": "" }, { "docid": "8c6aa38df127ec8eca91b4b3110028ac", "score": "0.5497522", "text": "public function getBrand($limit = 3)\n {\n return \\R::find('brand', \"LIMIT {$limit}\");\n }", "title": "" }, { "docid": "b5a0bd4bab1d41be40f1fadbe0e23173", "score": "0.54974824", "text": "public function getName_product()\n {\n return $this->name_product;\n }", "title": "" }, { "docid": "b80457e9e1000629ffd9fe8bf0e701ef", "score": "0.54974735", "text": "abstract public function get_name();", "title": "" }, { "docid": "b80457e9e1000629ffd9fe8bf0e701ef", "score": "0.54974735", "text": "abstract public function get_name();", "title": "" }, { "docid": "b80457e9e1000629ffd9fe8bf0e701ef", "score": "0.54974735", "text": "abstract public function get_name();", "title": "" }, { "docid": "6e0681f1dc1122812c9d7efffede5d0c", "score": "0.5494527", "text": "function get_name() {\n\t\treturn $this->get_name_from_vtec();\t\n\t}", "title": "" }, { "docid": "8c1c0bbf6b601e8d71e671dbc829d048", "score": "0.5490329", "text": "function get_brand(){\n\tglobal $con;\n\n\t$get_brand = \"select * from brands\";\n\t$run_brand = mysql_query($get_brand);\n\n\t\n\n\twhile($row_brand = mysql_fetch_array($run_brand)){\n\n\t\t\n\t\t$brand_id = $row_brand['brand_id'];\n\t\t$brand_title = $row_brand['brand_name'];\n\n\t\t\n\t\techo '<div class=\"brand-checkbox\">\n\t\t\t\t\t\t<label><input type=\"checkbox\"class=\"brnd-chk\" value=\"\">';echo \"$brand_title\"; echo'</label>\n\t\t\t\t\t</div>';\n\t}\n}", "title": "" }, { "docid": "3a8e8c5c7ec607afe27782b53b0d1a87", "score": "0.54838735", "text": "public function getBrandImage()\n {\n return $this->brandImage;\n }", "title": "" }, { "docid": "41db21ba978493555950947302b0ecc5", "score": "0.5481093", "text": "public function getManufacturer()\n {\n }", "title": "" }, { "docid": "fb51aa5683689bcb89a899c9a0137126", "score": "0.5467959", "text": "function hidupkan_laptop() {\n return \"Hidupkan Laptop\";\n }", "title": "" }, { "docid": "23747c579fcd4da3874cff921e225303", "score": "0.54636914", "text": "function floorsubcategory_name($fcat)\n{\n\t$fcat_name=mysql_fetch_array(mysql_query(\"select sub_type_name from manage_floor_subcategory where stype='$fcat'\"));\n\treturn $fcat_name['sub_type_name'];\n}", "title": "" }, { "docid": "b7246537cb6bcafd5193a17b77cec393", "score": "0.54518205", "text": "public function getBrandList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('tbl_brand');\r\n\t\t$this->db->where('brand_status', '1');\t\t\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\r\n\t}", "title": "" }, { "docid": "37ff892a94f042dfeef2a7b79724a6ff", "score": "0.5444531", "text": "public function getBrandById($id);", "title": "" }, { "docid": "dccd646fea997738cc6e98a416f5fb0e", "score": "0.5442763", "text": "private function getName ()\n\t\t{\t\n\t\t\t$dbs = new DB ( $this->config['database'] );\n\t\t\t$search = $dbs->query(\"SELECT * FROM tbl_vpn_org WHERE org_id = \" . trim($this->c) );\n\t\t\tif ( count($search) ) {\n\t\t\t\t// Convert result to human code \n\t\t\t\t$this->result['data']['id'] = $search[0]['org_id'];\n\t\t\t\t$this->result['data']['name'] = $search[0]['org_name'];\n\t\t\t\t$this->result['data']['description'] = $search[0]['org_desc'];\n\t\t\t} else \n\t\t\t\t$this->result['data']['result'] = \"Not found\";\n\t\t\n\t\t\t$dbs->CloseConnection ();\t\n\t\t\treturn;\n\t\t}", "title": "" }, { "docid": "81f6100fb76806c3f4ce2cf5fdd36653", "score": "0.5436843", "text": "private function buildManufacturerViewTitle()\n {\n $title_chunks = array();\n if ($this->params->get('manufacturer_name_order', 0)) {\n $title_chunks[$this->params->get('manufacturer_name_order')] = $this->virtuemartHelper->getManufacturerName();\n }\n if ($this->params->get('manufacturer_customtext_order', 0)) {\n $title_chunks[$this->params->get('manufacturer_customtext_order')] = $this->params->get('manufacturer_customtext', '');\n }\n ksort($title_chunks);\n\n return (join(' ', $title_chunks));\n }", "title": "" }, { "docid": "4a0d9993a44e00645cbd8ca150bfcd15", "score": "0.5430574", "text": "private function outputBrand($brand) {\n $attachments = [];\n foreach ($brand->attachments()->where('type','logo')->get() as $attachment) {\n //Convert thumbs by indexing by size\n $mythumbs = [];\n foreach ($attachment->thumbs()->get() as $thumb) {\n $mythumbs[$thumb->size] = $thumb->toArray();\n unset($mythumbs[$thumb->size]['size']);\n }\n $attachment->sizes = $mythumbs;\n array_push($attachments, $attachment->toArray());\n }\n if (array_key_exists(0,$attachments))\n $brand->image = $attachments[0];\n //Output associated models \n //$brand->models = $brand->modeles()->pluck('id')->toArray(); \n\n return $brand; \n }", "title": "" }, { "docid": "3ce3f1ff44d4cde65414c805195aac71", "score": "0.54267025", "text": "public function getBrandName(CategoryInterface $category)\n {\n if (!$category) {\n return false;\n }\n\n if ($category->getLevel() === static::BRAND_CATEGORY_LV) {\n return $category->getName();\n }\n\n if (!$category->getParentId()) {\n return false;\n }\n\n return $this->getBrandName($category->getParentCategory());\n }", "title": "" }, { "docid": "054173d940a7b6574f9a24a23483edc4", "score": "0.5421417", "text": "function getBrandSelect()\n\t{\n\t\tglobal $con;\n\t\t\t\n\t\t$get_brands = \"select * from brands\";\n\t\t$run_brands = mysqli_query($con, $get_brands);\n\t\twhile ($row = mysqli_fetch_array($run_brands)){\n\t\t\t$id = $row['brand_id'];\n\t\t\t$title = $row['brand_title'];\n\n\t\t\techo \"<option value='$id'>$title</option>\";\n\t\t}\n\t}", "title": "" }, { "docid": "69f76de7b4decb339425e78850a585f1", "score": "0.54157436", "text": "private function getManufacturer($product)\n { \n $manufacturers= $product->manufacturers;\n\n if(!$manufacturers->isEmpty())\n {\n $manufacturerName=NULL;\n\n foreach ($manufacturers as $manufacturer) {\n\n $manufacturerName .= $manufacturer->manufacturer_name. '+';\n }\n return trim($manufacturerName,'+');\n }\n else\n {\n return NULL;\n }\n }", "title": "" }, { "docid": "644aecc389822eb855b72df30c5c2352", "score": "0.5414685", "text": "public abstract function get_amd_name();", "title": "" }, { "docid": "8efbc2ca215ebe881e44423dbd0afeee", "score": "0.54115254", "text": "function select_byproductbrands($id_brand= NULL, $slug_brand= NULL)\n {\n\n $fields = 'ac_product.id_product AS id_product, ac_product.name_product AS name_product, ac_product.slug_product AS slug_product, ac_product.price_product AS price_product, ac_product.discount AS discount, ac_product.after_price_discount AS after_price_discount, ac_product.description_product AS description_product, ac_product.picture_product AS picture_product, ac_brand.name_brand AS id_brand, ac_brand.slug_brand AS slug_brand';\n\n $this->db->select($fields); \n $this->db->from('ac_product');\n $this->db->join('ac_brand', 'ac_brand.id_brand = ac_product.id_brand','left');\n $this->db->where(array('ac_product.id_brand'=>$id_brand));\n $this->db->or_where(array('ac_brand.slug_brand'=>$id_brand));\n $this->db->order_by('created_at','desc');\n $query = $this->db->get();\n \n return $query->result();\n \n }", "title": "" }, { "docid": "4181bef88f377f2f0aa1a2afbb57883a", "score": "0.54041547", "text": "public function getManufacturerName()\n {\n $oManufacturer = $this->getManufacturer();\n\n if ($oManufacturer instanceof oxManufacturer) {\n return $oManufacturer->getTitle();\n }\n\n return null;\n }", "title": "" }, { "docid": "a1893f2a9baee3016f1662db3cfef3d1", "score": "0.53953224", "text": "function particularbranch($id)\n\t{\n\t\t$getParsubbrand=\"SELECT * from brand where brand_id = $id\";\n\t\t$subbrand_data=$this->get_results( $getParsubbrand );\n\t\treturn $subbrand_data;\n\t}", "title": "" }, { "docid": "7696f7c16580b0e610bfe4ae5c90c77c", "score": "0.5390008", "text": "public function printBrandDropdown($selectedBrand = null)\n {\n\t\techo '<div class=\"input-field col s3\">';\n\t\t$holder = \"('brandSelect')\";\n\t\techo '<select id=\"brand\" class=\"btn teal lighten-2 dropdown-button-widths change\" name=\"brand\" onchange=\"formChange'.$holder.'\">';\n\t\t\n if($selectedBrand == null) {\n echo '<option class=\"placeholder white-text teal darken-1\" selected value=\"false\">Select Brand</option>';\n } else {\n echo '<option class=\"placeholder white-text teal darken-1\" disabled value=\"false\">Select Brand</option>';\n }\n $brands = $this->getDeviceBrands();\n foreach($brands as $brand)\n {\n if($brand['name'] == $selectedBrand){\n echo '<option value=\"' . $brand['name'] . '\" selected>' . $brand['name'] . '</option>';\n } else {\n echo '<option value=\"' . $brand['name'] . '\">' . $brand['name'] . '</option>';\n }\n }\n\t\techo \"</select>\";\n\t\techo \"</div>\";\n\n }", "title": "" }, { "docid": "037288224721dd1bd473eb9aa392e4c1", "score": "0.53891456", "text": "public function getFloorName() {\n $sql = \"SELECT sm_nameFloor FROM `SM_FLOOR` WHERE sm_idBuilding='$this->idBuilding' AND sm_idFloor = '$this->idFloor'\";\n $result = $this->mysqli->query($sql)->fetch_array();\n return $result['sm_nameFloor'];\n }", "title": "" }, { "docid": "6c873e1bf9304353b6f76ebaa96a0c9a", "score": "0.5382277", "text": "function getBrandPro() {\n\n if(isset($_GET['brand'])){\n\n\n\n $brand_id = $_GET['brand'];\n\n\n global $con;\n\n $run_brand_pro = mysqli_query($con,\"SELECT * FROM products WHERE product_brand = '$brand_id'\") or die(mysqli_error($con));\n\n $count_brands = mysqli_num_rows($run_brand_pro);\n\n if($count_brands == 0) {\n\n echo \"<div class='no-cat'>\n\n <h1> We're sorry! There are currently no products for that gender. :(</h1>\n\n </div>\";\n } else {\n\n while($row_brand_pro = mysqli_fetch_array($run_brand_pro)) {\n\n $pro_id = $row_brand_pro['product_id'];\n $pro_cat = $row_brand_pro['product_cat'];\n $pro_brand = $row_brand_pro['product_brand'];\n $pro_title = $row_brand_pro['product_title'];\n $pro_price = $row_brand_pro['product_price'];\n $pro_image = $row_brand_pro['product_image'];\n\n echo \"\n <div class='single-product cf'>\n\n <h4><a href='#'>$pro_title</a></h4>\n <a href='details.php?pro_id=$pro_id'><img src='admin/product_images/$pro_image' /></a>\n <p>\n Price: $ $pro_price\n </p>\n\n <a href='index.php?add_cart=$pro_id'><button>Add To Cart</button></a>\n </div>\n\n \";\n\n }\n }\n }\n\n }", "title": "" }, { "docid": "cdda0f26e448066b33c8514a9f3e7bd5", "score": "0.538165", "text": "public function getHumanName();", "title": "" }, { "docid": "eca92bffd9cea639e3462ee564562096", "score": "0.5376415", "text": "public function getCarBrands();", "title": "" }, { "docid": "2780c6fad8cf6e579c0259845d12d7c5", "score": "0.5372005", "text": "function vendor_type_name_static($vst, $type='i') {\n // $type is the type of string to return:\n // i -> initial\n // n -> name\n // p -> plural name\n\n $table['i'] = array( \n 0 => \"A\",\n 1 => \"M\",\n 2 => \"E\", \n 3 => \"R\", \n 4 => \"W\", \n 5 => \"T\", \n 6 => \"G\" \n ); \n \n $table['n'] = array( \n 0 => \"All\", \n 1 => \"Manufacturer\", \n 2 => \"Exclusive Importer\", \n 3 => \"Manufacturers Representive\", \n 4 => \"Wholesale Facility\", \n 5 => \"Retail Facility\", \n 6 => \"Grower\" \n ); \n \n $table['p'] = array( \n 0 => \"All\", \n 1 => \"Manufacturers\", \n 2 => \"Exclusive Importers\", \n 3 => \"Manufacturers Representives\", \n 4 => \"Wholesale Facilities\", \n 5 => \"Retail Facilities\", \n 6 => \"Growers\" \n ); \n return($table[$type][$vst]); \n }", "title": "" }, { "docid": "cabab918307490533ec2cc0c61c0a2b6", "score": "0.53704107", "text": "public function getbrandlist() {\t\t\t\n \n\t\t$result[]=array('status'=>array(\"code\"=>\"1\",\"message\"=>\"Success\"),'brandlist'=>array(array('id'=>1,'img'=>'http://159.203.151.92/fitness_logo4.jpg'),array('id'=>2,'img'=>'http://159.203.151.92/fitness_logo5.jpg')));\n\t\t\n\t\t\n\t\treturn $result; \n\t\t \n \n\t }", "title": "" }, { "docid": "0d3b791c53354f05a304e1654e7a06eb", "score": "0.5368113", "text": "public static function get_name() : string ;", "title": "" }, { "docid": "0d3b791c53354f05a304e1654e7a06eb", "score": "0.5368113", "text": "public static function get_name() : string ;", "title": "" }, { "docid": "de6ac2a3e8d06438337cc23aa7d5aae2", "score": "0.53636736", "text": "private function split_by_huts($rec){\n static $hut_name = '';\n\n if (!split_by_huts) return '';\n\n switch($status=bForm_vm_Visit::_getStatus($rec)){\n case STATUS_NO: \n $rec_hut_name = '_REFUSED_applications'; \n break; \n case STATUS_YES: \n // if (empty($rec['hut_code']) && cnf_dev) MSG::DEBUG(\"?? Empty hut_code for \".$rec['av_lastname']);\n if (empty($rec['hut_name'])) $rec['hut_name'] = '_missing accommodation';\n $rec_hut_name = (@$rec['hut_code']===HUT_BI ? $rec['a_name'] : $rec['hut_name']);\n break;\n case STATUS_PENDING: \n default:\n $rec_hut_name = '_PENDING_applications'; \n }\n\n if ($rec_hut_name != $hut_name){\n $hut_name = $rec_hut_name;\n $this->t->td(x('h3',$hut_name),'colspan=5');\n $this->t->reset_counter();\n }\n return $hut_name;\n }", "title": "" }, { "docid": "72f659f349f9bd41fcafd4e3815f1049", "score": "0.5329747", "text": "public function website_name(){\r\n\r\n echo ISSET($this->globalSettings->website_name)?$this->globalSettings->website_name:'';\r\n\r\n }", "title": "" }, { "docid": "a05fd3d801b193906813a88d0ad711c1", "score": "0.5324603", "text": "function getname($category_id){\n\t\t\t\t\n\n\t\t\t\t$Q = $this->db->query('SELECT name\n\t\t\t\t\t\t\t\tFROM customize_apparel_category\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tWHERE apparel_category_id = '.$category_id.'');\n\t\t\t\tif ($Q-> num_rows() > 0){\n\t\t\t\tforeach ($Q->result_array() as $row){\n\t\t\t\t$type_name= $row['name'];\n\t\t\t\t}\n\t\t\t\treturn $type_name;\n\t\t\t\t}\n\t\t\t\t}", "title": "" }, { "docid": "f76541ad84c3ddb7c7a60ee91a84b05d", "score": "0.5322651", "text": "function getBrand($brandId){\r\n\r\n $this->app->log->info(__CLASS__ . '::' . __METHOD__);\r\n $dao = new \\PNORD\\Model\\BrandDAO($this->app); \r\n return $dao->getBrand($brandId); \r\n\r\n }", "title": "" }, { "docid": "8a59be559807a6b149dbc4fe67707963", "score": "0.5322038", "text": "function lb_get_merchant_brand_of_product($product_id, $type = 'merchant') {\n if('merchant' == $type) {\n $terms = get_the_terms( $product_id, 'pa_merchant');\n } elseif('brand' == $type) {\n $terms = get_the_terms( $product_id, 'pa_brand');\n } else {\n return false;\n }\n \n error_log('lb_get_merchant_brand_of_product - terms (' . $type . ' for product ID ' . $product_id . '): ' . print_r($terms, true));\n \n $slug = $terms[0]->slug;\n \n // If there is a merchant slug, get the corresponding merchant post.\n // If there is no merchant slug, return false.\n if(!empty($slug)) {\n if('merchant' == $type) {\n $post = lb_get_post_by_slug($slug, 'butiker');\n } elseif('brand' == $type) {\n $post = lb_get_post_by_slug($slug, 'varumarken');\n } else {\n return false;\n }\n } else {\n return false;\n }\n \n error_log('lb_get_merchant_brand_of_product - post: ' . print_r($post, true));\n \n // If no merchant post was found for the merchant slug, return false.\n if(empty($post)) {\n return false;\n }\n\n return $post[0];\n}", "title": "" }, { "docid": "2f700bcd1b0fc36e6d0104f0001a1d48", "score": "0.5321929", "text": "function company_name_meta() {\n echo '<li class=\"company\">';\n echo '<span class=\"value\">'. get_the_company_name() .'</span>';\n echo '</li>';\n }", "title": "" }, { "docid": "575c384d2b37f3d689c0ef72b6bf4b6b", "score": "0.5313411", "text": "public function getSkuName ()\n {\n $sql = \" SELECT t1.id,sku_name,sku_description,sku_code,sku_weight_id,sku_lpc,sku_volume,sku_launch_date,t8.sku_type_name,\n GROUP_CONCAT(t5.unit_name SEPARATOR '<br /><br />') AS unit,t2.quantity,\n GROUP_CONCAT(ROUND(t2.db_lifting_price,2) SEPARATOR '<br /><br />') as db_lifting_price ,\n GROUP_CONCAT(ROUND(t2.outlet_lifting_price,2) SEPARATOR '<br /><br />') AS outlet_lifting_price,\n GROUP_CONCAT(ROUND(t2.mrp_lifting_price,2) SEPARATOR '<br /><br /> ') AS mrp_lifting_price ,\n t3.element_name,t4.sku_active_status_name,t5.unit_name,t6.element_name as product,\n t7.element_name as catagory\n FROM tbld_sku AS t1\n INNER JOIN\n `tbli_sku_mou_price_mapping` AS t2\n ON t1.id = t2.sku_id\n INNER JOIN\n tbld_sku_active_status AS t4\n ON t1.sku_active_status_id = t4.id\n INNER JOIN\n tbld_sku_hierarchy_elements AS t3\n ON t1.parent_id = t3.id\n INNER JOIN\n tbld_unit AS t5\n ON t5.id= t2.mou_id\n left join tbld_sku_hierarchy_elements as t6\n on t6.id = t3.parent_element_id\n left join tbld_sku_hierarchy_elements as t7\n on t7.id = t6.parent_element_id\n left Join `tbld_sku_type` as t8\n On t1.sku_type_id=t8.id\n GROUP BY t2.sku_id\n ORDER BY t2.sku_id,t2.quantity asc\";\n $query = $this->db->query( $sql )->result_array();\n return $query;\n }", "title": "" }, { "docid": "82a8c07be0f306f35c91f163ab938e4c", "score": "0.5312244", "text": "public function getNameFloor(){\n return $this->nameFloor;\n }", "title": "" }, { "docid": "155f04d233ce59876ab1e39afa324e9a", "score": "0.531192", "text": "function fetchManufacturer($Hersteller)\r\n\t{\r\n\t\t$sql = $GLOBALS['db']->Query(\"SELECT Name FROM \" . PREFIX . \"_modul_shop_hersteller WHERE Id = '$Hersteller' LIMIT 1\");\r\n\t\t$row = $sql->fetchrow();\r\n\t\t$sql->close();\r\n\t\treturn @$row->Name;\r\n\t}", "title": "" }, { "docid": "75a87e6fc18b3fe4ea2cd5f4fe8b0854", "score": "0.53066623", "text": "function get_pre_information_title(){\n\tif ( get_post_type() == 'companies' ) {\t/* Companies = purple text */\n\t\t?>\n\t\t<span class=\"purple-text\"><?php echo get_the_title() ?></span> / \n\t\t<?php\n\t}\n\telseif ( get_post_type() == \"group_of_companies\") { /* Group_of_companies = turquoise text */\n\t\t?>\n\t\t<span class=\"turquoise-text\"><?php echo get_the_title() ?></span> /\n\t\t<?php\n\t}\n\telse {} /* Do nothing */\n}", "title": "" }, { "docid": "0688e8041b2795be2dbdb7cdd266cdaa", "score": "0.5304546", "text": "public function getProdName()\n {\n return $this->prod_name;\n }", "title": "" }, { "docid": "ede031c667b5e8acc8d79b933167d259", "score": "0.5299651", "text": "private function get_info_warehouse_name($fcode){\n $rs = array();\n $arrWhere = array();\n \n $arrWhere = array('fcode'=>$fcode);\n \n //Parse Data for cURL\n $rs_data = send_curl($arrWhere, $this->config->item('api_list_warehouses'), 'POST', FALSE);\n $rs = $rs_data->status ? $rs_data->result : array();\n \n $wh_name = \"\";\n foreach ($rs as $r) {\n $wh_name = filter_var($r->fsl_name, FILTER_SANITIZE_STRING);\n }\n \n return $wh_name;\n }", "title": "" }, { "docid": "2e761b49df674275dc7c162a2c0d94a1", "score": "0.5299478", "text": "public function getProductName(){\n return $this->product_name;\n }", "title": "" }, { "docid": "1a22cb230d43637f8bf8bff11a5147e5", "score": "0.52975416", "text": "function getTitle(&$record){\n $type = array('H' => 'Hydrological Station', 'M'=>'Meteorological Station');\n $title = \"\".$type[$record->val('type_station')].\" - id: \".$record->val('id_station');\n \n return $title;\n }", "title": "" }, { "docid": "a7437b63888aa31cccb44b17046dd6f4", "score": "0.5294503", "text": "public function getProductName()\n {\n return $this->product_name;\n }", "title": "" }, { "docid": "3bc61abbdb407f8d9279835cb6e16b5c", "score": "0.5289349", "text": "function detalhe_get_header_image() {\n // If the plugin is active, then follow the business logic and check if there is a brand present\n if(is_detalhe_core_actived()) {\n $brand = Brands::get_current_brand();\n $term = get_queried_object();\n\n if($term instanceof WP_Term) {\n $brand = Brands::get_current_brand($term->to_array());\n }\n\n $have_brand = Brands::have_brand();\n\n // If there is a brand present, then display the brand banner.\n if($have_brand) {\n fetch_header_image($brand->header_banner);\n }\n } else {\n // Fetch the normal header if the plugin is deactivated.\n fetch_header_image();\n }\n}", "title": "" }, { "docid": "a2a214235bdbc80b49fad7f01b805a3e", "score": "0.5289162", "text": "function getBrands() {\n $cat = $_POST['cat'];\n echo(json_encode($this->Trader_mdl->getBrands($cat)));\n }", "title": "" } ]
6cf0ba1e5d8d42c17b6e6734f7f5b9ff
Operation getDuplicatePalletTypeByIdAsync Get a duplicated a palletType by id
[ { "docid": "be5fd2312ddfeb3c01cc212a13dde40f", "score": "0.68926764", "text": "public function getDuplicatePalletTypeByIdAsync($pallet_type_id)\n {\n return $this->getDuplicatePalletTypeByIdAsyncWithHttpInfo($pallet_type_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" } ]
[ { "docid": "bdae2e2bedc71e17d1145b70583287b7", "score": "0.65870714", "text": "protected function getDuplicatePalletTypeByIdRequest($pallet_type_id)\n {\n // verify the required parameter 'pallet_type_id' is set\n if ($pallet_type_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $pallet_type_id when calling getDuplicatePalletTypeById'\n );\n }\n\n $resourcePath = '/beta/palletType/duplicate/{palletTypeId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($pallet_type_id !== null) {\n $resourcePath = str_replace(\n '{' . 'palletTypeId' . '}',\n ObjectSerializer::toPathValue($pallet_type_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "2b244f988a806b539e11f46335a89809", "score": "0.6509255", "text": "public function getDuplicatePalletTypeByIdWithHttpInfo($pallet_type_id)\n {\n $returnType = '\\Infoplus\\Infoplus\\Model\\PalletType';\n $request = $this->getDuplicatePalletTypeByIdRequest($pallet_type_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Infoplus\\Infoplus\\Model\\PalletType',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "20d9e63d04de5567b6b1c2e1b3c4813f", "score": "0.62070626", "text": "public function getDuplicatePalletTypeByIdAsyncWithHttpInfo($pallet_type_id)\n {\n $returnType = '\\Infoplus\\Infoplus\\Model\\PalletType';\n $request = $this->getDuplicatePalletTypeByIdRequest($pallet_type_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "931c9480146fe47f2385eb6411a627a0", "score": "0.6135866", "text": "public function getDuplicatePalletTypeById($pallet_type_id)\n {\n list($response) = $this->getDuplicatePalletTypeByIdWithHttpInfo($pallet_type_id);\n return $response;\n }", "title": "" }, { "docid": "b0c9b66852b474551fb954dbf4ca0a4d", "score": "0.5278437", "text": "public function Duplicate(Request $request)\n\t{\n $duplicateType = Type::where('type','=',$request->get('type')) \n ->where('id','<>',$request->get('id'))\n ->first();\n \n if ($duplicateType) {\n return $this->presentor->make400Response('Type \\''.$request->get('type').'\\' already exists.');\n \n }\n else{\n return $this->presentor->make200Response('no duplicate found');\n } \n\t}", "title": "" }, { "docid": "6d8468a241bc44a9e18e6fdb1d556229", "score": "0.51384485", "text": "protected function getPalletTypeByIdRequest($pallet_type_id)\n {\n // verify the required parameter 'pallet_type_id' is set\n if ($pallet_type_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $pallet_type_id when calling getPalletTypeById'\n );\n }\n\n $resourcePath = '/beta/palletType/{palletTypeId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($pallet_type_id !== null) {\n $resourcePath = str_replace(\n '{' . 'palletTypeId' . '}',\n ObjectSerializer::toPathValue($pallet_type_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "81dda2a44c9389386561259a5a008355", "score": "0.4915587", "text": "public function one( $type ) {\n\t\treturn $this->beanHelper\n\t\t\t->getToolBox()\n\t\t\t->getRedBean()\n\t\t\t->load( $type, $this->id );\n\t}", "title": "" }, { "docid": "bf70cb8f06a1a809cc9f74c531d8f056", "score": "0.4874286", "text": "private function get_product_to_duplicate($id)\n {\n }", "title": "" }, { "docid": "3db2e33c1d64b87536ee5f8193745624", "score": "0.48526546", "text": "public function getPalletTypeByIdWithHttpInfo($pallet_type_id)\n {\n $returnType = '\\Infoplus\\Infoplus\\Model\\PalletType';\n $request = $this->getPalletTypeByIdRequest($pallet_type_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Infoplus\\Infoplus\\Model\\PalletType',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "8433fd5482cf9d737b1cbfffbfd535ec", "score": "0.48496687", "text": "public function testDuplicate() {\n $this->drupalGet('admin/commerce/config/product-bundle-types/default/duplicate');\n $this->assertSession()->fieldValueEquals('label', 'Default');\n $edit = [\n 'label' => 'Default2',\n 'id' => 'default2',\n ];\n $this->submitForm($edit, t('Save'));\n $this->assertSession()\n ->pageTextContains('The product bundle type Default2 has been successfully saved.');\n\n // Confirm that the original product type is unchanged.\n $product_bundle_type = ProductBundleType::load('default');\n $this->assertNotEmpty($product_bundle_type);\n $this->assertEquals('Default', $product_bundle_type->label());\n\n // Confirm that the new product type has the expected data.\n $product_bundle_type = ProductBundleType::load('default2');\n $this->assertNotEmpty($product_bundle_type);\n $this->assertEquals('Default2', $product_bundle_type->label());\n }", "title": "" }, { "docid": "129ca810cee193d6b70b16422da64a57", "score": "0.4709226", "text": "public function getTypeId();", "title": "" }, { "docid": "da27839d965b6252330f584f8fe1c6d8", "score": "0.46957496", "text": "public function find($id) {\n $sql = \"select * from t_packtype where packtype_id=?\";\n $row = $this->getDb()->fetchAssoc($sql, array($id));\n\n if ($row)\n return $this->buildDomainObject($row);\n else\n throw new \\Exception(\"No PackType matching id \" . $id);\n }", "title": "" }, { "docid": "541a00468d66cd09084e01394c2a3749", "score": "0.46606207", "text": "protected function deletePalletTypeRequest($pallet_type_id)\n {\n // verify the required parameter 'pallet_type_id' is set\n if ($pallet_type_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $pallet_type_id when calling deletePalletType'\n );\n }\n\n $resourcePath = '/beta/palletType/{palletTypeId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($pallet_type_id !== null) {\n $resourcePath = str_replace(\n '{' . 'palletTypeId' . '}',\n ObjectSerializer::toPathValue($pallet_type_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "cf8e3a5ef3afe1533f86348274320f12", "score": "0.4656535", "text": "public function getpaperTypeById($id)\n {\n $paperType = PaperType::find($id);\n if(is_null($paperType))\n {\n return response()->json([\"message\"=>\"Not found\"]);\n }\n return $paperType ;\n }", "title": "" }, { "docid": "715da04093a86401099666ce6db47a66", "score": "0.4655602", "text": "protected function getProductTypeInstance($typeId)\r\n {\r\n if (!isset($this->productTypes[$typeId])) {\r\n $productEmulator = $this->getProductEmulator($typeId);\r\n $this->productTypes[$typeId] = $this->catalogProductType->factory($productEmulator);\r\n }\r\n\r\n return $this->productTypes[$typeId];\r\n }", "title": "" }, { "docid": "e0fdc3360e060223620e39a4500ade4b", "score": "0.46301782", "text": "public function getTypeById($id)\n {\n $requestTypeRepo = new RequestTypeRepo();\n return $type = $requestTypeRepo->getByID($id);\n }", "title": "" }, { "docid": "4a9d8aff51b31bc3d0d9956eb41d89bb", "score": "0.46190017", "text": "public function getType($id)\n {\n return $this->types->find($id);\n }", "title": "" }, { "docid": "166aa551022903e74f5fa44788830042", "score": "0.46155706", "text": "public function getTypeId()\n {\n return $this->type_id;\n }", "title": "" }, { "docid": "166aa551022903e74f5fa44788830042", "score": "0.46155706", "text": "public function getTypeId()\n {\n return $this->type_id;\n }", "title": "" }, { "docid": "166aa551022903e74f5fa44788830042", "score": "0.46155706", "text": "public function getTypeId()\n {\n return $this->type_id;\n }", "title": "" }, { "docid": "c564e73dd64e40bd21cb17391968a143", "score": "0.46083158", "text": "function selectHotspotType($id)\n\t{\n\t\treturn $this->hotspot_type[$id];\n\t}", "title": "" }, { "docid": "686571d94a5487c6efdb272ba43d9fe8", "score": "0.460174", "text": "function getTypeId() {\r\n\t\treturn $this->_type_id;\r\n\t}", "title": "" }, { "docid": "421dcfdfde0aba77cd8626fda6f387fa", "score": "0.4588467", "text": "public function getPalletTypeByIdAsync($pallet_type_id)\n {\n return $this->getPalletTypeByIdAsyncWithHttpInfo($pallet_type_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "c1d4ebea9b0cecbb50c09d8680b4dbfb", "score": "0.45840946", "text": "public function id() {\n return $this->type;\n }", "title": "" }, { "docid": "743c3d7dfa6c331d560eb18b18aee455", "score": "0.45762062", "text": "public function find($id)\n {\n return $this->em->find(Type::class, $id);\n }", "title": "" }, { "docid": "9d8e65c5ab5a0e7df39469114b0f7ddb", "score": "0.45590618", "text": "public function getDuplicate($id) {\n\t\t\tif ($id < 1 ) return $this->getEmptyItem();\n\n\t\t\t$item = $this->first()->getById($id);\n\n\t\t\t$item[$this->id_field] = -1;\n\t\t\t\n\t\t\treturn $item;\n\n\t}", "title": "" }, { "docid": "4da9f49b5a790a01b96be7a0ac0be805", "score": "0.45414302", "text": "public function getOne($type, $id)\n {\n $repo = $this->fetchRepo($type);\n\n // Actual fetching of objects\n $object = $repo->find($id);\n\n return $object;\n }", "title": "" }, { "docid": "8b14bd1d1f0647c62675ef3ad7556cea", "score": "0.45123407", "text": "public function getPointTypeById($typeId)\n {\n return PointType::find($typeId);\n }", "title": "" }, { "docid": "baa11e1d1a2177adc9bfae0219b99c3d", "score": "0.45035475", "text": "public function duplicate($id, ComenMueble $comenMueble)\n\t{\n\t\t$comenMueble=$comenMueble->find($id);\n\t\treturn view('comenMuebles.duplicate', compact('comenMueble'))\n\t\t\t->with( 'list', ComenMueble::getListFromAllRelationApps() );\n\t}", "title": "" }, { "docid": "7b12b9809bd87eb193690eb0e4792ab1", "score": "0.4492973", "text": "public function duplicate($id, DiaNoHabil $diaNoHabil)\n\t{\n\t\t$diaNoHabil = $diaNoHabil->find($id);\n\t\treturn view('diaNoHabils.duplicate', compact('diaNoHabil'))\n\t\t\t->with('list', DiaNoHabil::getListFromAllRelationApps());\n\t}", "title": "" }, { "docid": "6014f542a50527edc4323b631d79b391", "score": "0.44819567", "text": "public function getTypeId()\n {\n return $this->_getData('type_id');\n }", "title": "" }, { "docid": "33fe960e94e2f1ec3f8db4fbdf79432b", "score": "0.44732893", "text": "public function duplicate($id, Otro $otro)\n\t{\n\t\t$otro=$otro->find($id);\n\t\treturn view('otros.duplicate', compact('otro'))\n\t\t\t->with( 'list', Otro::getListFromAllRelationApps() );\n\t}", "title": "" }, { "docid": "9898d692ff55206092fa9c411e4e7c11", "score": "0.44544786", "text": "public function type()\n {\n return $this->hasOne(ProductVariationType::class, 'id', 'product_variation_type_id');\n }", "title": "" }, { "docid": "378b5c25c32faf0e1106ae232a235dd4", "score": "0.44513318", "text": "public function duplicate($id, Ciclo $ciclo)\n\t{\n\t\t$ciclo=$ciclo->find($id);\n\t\treturn view('ciclos.duplicate', compact('ciclo'))\n\t\t\t->with( 'list', Ciclo::getListFromAllRelationApps() );\n\t}", "title": "" }, { "docid": "5112fb36eefdab06c54ef5f36cfc3343", "score": "0.4442269", "text": "public function byTypeAction(Request $request){\n $id=$request->query->get('id');\n $typeList= $this->getDoctrine()\n ->getRepository('SansthonProdBundle:Type')\n ->findAll();\n\n if(empty($id)){\n return array(\n 'types' => $typeList,\n 'type' => null,\n 'etatList' => null,\n 'stocks' =>array(),\n );\n }\n $currentType= $this->getDoctrine()\n ->getRepository('SansthonProdBundle:Type')\n ->find($id);\n $stockList = $this->getDoctrine()\n ->getRepository('SansthonProdBundle:Stock')\n ->getByType($currentType);\n $etatList =$this->getDoctrine()\n ->getRepository('SansthonProdBundle:Etat')\n ->findBy(array(\"type\" => $currentType,\"fin\" => null, \"stocked\" => false ));\n return array(\n 'etatList' => $etatList,\n 'types' => $typeList,\n 'type' => $currentType,\n 'stocks' => $stockList,\n );\n\n }", "title": "" }, { "docid": "15260151c36c469d2e0c0e64bdb369d7", "score": "0.44215882", "text": "public function addPalletTypeAsync($body)\n {\n return $this->addPalletTypeAsyncWithHttpInfo($body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "107ead9d214f3e847e0e08ee97c437f0", "score": "0.44193342", "text": "private static function get_post_type($id)\n {\n }", "title": "" }, { "docid": "fd5f5f2410ab378adefc6bbb1d005978", "score": "0.44155473", "text": "public function getPalletTypeByIdAsyncWithHttpInfo($pallet_type_id)\n {\n $returnType = '\\Infoplus\\Infoplus\\Model\\PalletType';\n $request = $this->getPalletTypeByIdRequest($pallet_type_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "0d6967090199ac73ff2c04ebed45a027", "score": "0.43922976", "text": "public function getType()\n {\n return Type::findOne($this->type_id);\n }", "title": "" }, { "docid": "72a039e9bed9aa88695d94350f5bc364", "score": "0.43897986", "text": "public function getProtypesByID($id)\n {\n $sql = \"SELECT * FROM `protypes` WHERE type_ID = $id\";\n // thuc thi cau truy van\n $result = self::$conn->query($sql);\n return $this->getData($result);\n }", "title": "" }, { "docid": "019d68d634cb342da8398c6831b133a5", "score": "0.43887767", "text": "public function duplicate($id, Param $param)\n\t{\n\t\t$param=$param->find($id);\n\t\treturn view('params.duplicate', compact('param'))\n\t\t\t->with( 'list', Param::getListFromAllRelationApps() );\n\t}", "title": "" }, { "docid": "088f4aa11fffe69f40c2bb8e2c204dbd", "score": "0.4385597", "text": "protected function getPalletTypeTagsRequest($pallet_type_id)\n {\n // verify the required parameter 'pallet_type_id' is set\n if ($pallet_type_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $pallet_type_id when calling getPalletTypeTags'\n );\n }\n\n $resourcePath = '/beta/palletType/{palletTypeId}/tag';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($pallet_type_id !== null) {\n $resourcePath = str_replace(\n '{' . 'palletTypeId' . '}',\n ObjectSerializer::toPathValue($pallet_type_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "e752106386a0b1d27feb0592bcc4a8d7", "score": "0.43657237", "text": "public function getDuplicate($slug){\n\n\t\treturn Post::where( 'slug', $slug )->first();\n\t}", "title": "" }, { "docid": "3c56c7d4497ccd2f44041897d820fe65", "score": "0.43571392", "text": "function getWithTypePersoon($id) {\n $this->db->where('id', $id);\n $query = $this->db->get('typePersoon');\n return $query->row();\n }", "title": "" }, { "docid": "69ff116c6115411fd394732fc2f5b8e6", "score": "0.43472412", "text": "public function duplicate($id, Ebanx $ebanx)\n\t{\n\t\t$ebanx=$ebanx->find($id);\n\t\treturn view('ebanxes.duplicate', compact('ebanx'))\n\t\t\t->with( 'list', Ebanx::getListFromAllRelationApps() );\n\t}", "title": "" }, { "docid": "51d550c6b1a01bcbb726e73edd6e9880", "score": "0.43374348", "text": "public function duplicate($id, StMuebleUso $stMuebleUso)\n\t{\n\t\t$stMuebleUso=$stMuebleUso->find($id);\n\t\treturn view('stMuebleUsos.duplicate', compact('stMuebleUso'))\n\t\t\t->with( 'list', StMuebleUso::getListFromAllRelationApps() );\n\t}", "title": "" }, { "docid": "1ffe512b4b270513f2bc8739b1b2935f", "score": "0.43373752", "text": "public function duplicate($id, Giro $giro)\n\t{\n\t\t$giro=$giro->find($id);\n\t\treturn view('giros.duplicate', compact('giro'))\n\t\t\t->with( 'list', Giro::getListFromAllRelationApps() );\n\t}", "title": "" }, { "docid": "12ac36f37124e0af1db23763f97274aa", "score": "0.43340197", "text": "public function duplicate($pre_burn_id)\n {\n\n $pre_burn = $this->get($pre_burn_id);\n\n $result = $this->save($pre_burn);\n\n return $result;\n }", "title": "" }, { "docid": "06e688cd65485bb176ebe5a05011a0bd", "score": "0.43086997", "text": "public function occurrenceType(): HasOne\n {\n return $this->hasOne(OccurrenceType::class, 'id', 'occurrence_type_id');\n }", "title": "" }, { "docid": "ee428c5143a43796e3ee845977b7270e", "score": "0.4308196", "text": "public function getTypeId()\n\t{\n\t\treturn $this->typeId;\n\t}", "title": "" }, { "docid": "5d14ba43aed3a2da071fa6e48bf71a44", "score": "0.43044373", "text": "function duplicateProductPlan($ID) {\n return $this->request('POST', 'https://api.upodi.io/v2/productplans/' . $ID . '/duplicate');\n }", "title": "" }, { "docid": "f8a681c052e0198a35540163b864e2c8", "score": "0.4303949", "text": "public function duplicate($id, Bandeja $bandeja)\n\t{\n\t\t$bandeja=$bandeja->find($id);\n\t\treturn view('bandejas.duplicate', compact('bandeja'))\n\t\t\t->with( 'list', Bandeja::getListFromAllRelationApps() );\n\t}", "title": "" }, { "docid": "fe35af7abbd387ebdd4ae6ffee80784c", "score": "0.43030086", "text": "public function getId()\n {\n return self::$TYPES[$this->name];\n }", "title": "" }, { "docid": "bf9be1715d576d927fa2de682b4c302d", "score": "0.42929065", "text": "public function getPalletTypeByFilter($filter = null, $page = null, $limit = null, $sort = null)\n {\n list($response) = $this->getPalletTypeByFilterWithHttpInfo($filter, $page, $limit, $sort);\n return $response;\n }", "title": "" }, { "docid": "b928012fd5a23ce66aa3ae25ea92bbc4", "score": "0.42888704", "text": "public static function getIdByType($Type)\n {\n $query = Effect::select('id')->where('type', $Type)->get();\n $id = $query[0]->id;\n return $id;\n\n }", "title": "" }, { "docid": "ce3d282617f6a73480c8bb45167e0193", "score": "0.42872402", "text": "public function type($id){\n return $this->scopeQuery(function($scope) use ($id){\n return $scope->where('id_type', $id);\n })->paginate();\n }", "title": "" }, { "docid": "0dbf8a608c25c20bad56c80dbb8a793f", "score": "0.42704648", "text": "function tc_wb_get_product_type( $product_id ) {\n return WC_Product_Factory::get_product_type( $product_id );\n}", "title": "" }, { "docid": "2d3b8e440215e6a1b0c74e1a64faa971", "score": "0.42651516", "text": "public function find($id)\n {\n return $this->types->find($id);\n }", "title": "" }, { "docid": "98b71e9153bc2e0f15bb1bdad2eb61e7", "score": "0.42629912", "text": "public function addPalletType($body)\n {\n list($response) = $this->addPalletTypeWithHttpInfo($body);\n return $response;\n }", "title": "" }, { "docid": "a55aedca69b5af29cda37e96c5e3861e", "score": "0.4258848", "text": "public function getProductByeType($id)\n\t{\n\t\t$products = $this->product->where('type_id',$id)->with('type')->get();\n\t\treturn $products;\n\t}", "title": "" }, { "docid": "1ffc5a7cccc692ff2f3e2136845dc52c", "score": "0.42494562", "text": "public function get_product_type($product_id);", "title": "" }, { "docid": "4ca5f31d224cf91b46e7a8b5c5a9fe22", "score": "0.42474875", "text": "public function getType_id()\n {\n return $this->type_id;\n }", "title": "" }, { "docid": "4ca5f31d224cf91b46e7a8b5c5a9fe22", "score": "0.42474875", "text": "public function getType_id()\n {\n return $this->type_id;\n }", "title": "" }, { "docid": "4ca5f31d224cf91b46e7a8b5c5a9fe22", "score": "0.42474875", "text": "public function getType_id()\n {\n return $this->type_id;\n }", "title": "" }, { "docid": "3726c3b78b57ffd72c7a6ebce31ca47b", "score": "0.4241611", "text": "function findByType(){\n\n // query to read single record\n $query = \"SELECT \".$this->table_name.\".*\n FROM \".$this->table_name.\"\n WHERE \".$this->table_name.\".TypeName = ?\n LIMIT 0,1\";\n\n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n\n // bind id of product to be updated\n $stmt->bindParam(1, $this->TypeName);\n\n // execute query\n $stmt->execute();\n\n // get retrieved row\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n // set values to object properties\n return $row['QuestionTypeID'];\n }", "title": "" }, { "docid": "efb3455b6dfbd5841a66f072d23ec58f", "score": "0.42405686", "text": "public function getType() {\r\n return filter_var($this->type_id, FILTER_VALIDATE_INT) ? Factory::Create(\"Type\", $this->type_id) : false;\r\n }", "title": "" }, { "docid": "47750ca793accb4ccb871b14e3effcd6", "score": "0.42374617", "text": "public function type()\n {\n return $this->hasOne('App\\Entities\\Type', 'id', 'type_id');\n }", "title": "" }, { "docid": "e0cd9449e98e676e0ca9e600f99b1672", "score": "0.42187715", "text": "public function getSlotFromTypeId($id) {\r\n //$result = $this->query($sql);\r\n\r\n $effectID=array(11,12,13,2663,3772);\r\n $result = $this->selectWhere(\"dgmTypeEffects\",['typeID'=>$id,'effectID'=>['IN',$effectID]],['effectID']);\r\n \r\n if ($result&& $result->rows >0) {\r\n $row = $result->results[0];\r\n if (count($row) != 0 && isset($row[\"effectID\"])) {\r\n return $row[\"effectID\"];\r\n }\r\n }\r\n \r\n $type = $this->getTypeFromTypeId($id);\r\n if (in_array($type[\"groupID\"],array(640,100,639,641)))\r\n\t\t\t\treturn SLOT_DRONE;\r\n \r\n return SLOT_NONE;\r\n }", "title": "" }, { "docid": "d8a1a7570a4cd06dd206eb76c595cc95", "score": "0.421131", "text": "public function duplicateAction(Request $request,$id)\n {\n\t$em = $this->getDoctrine()->getManager();\n\t$oHolidays = $em->getRepository('BoAdminBundle:Holidayslist')->find($id);\n $holidayslist = $this->createHolidays($oHolidays);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\HolidayslistType', $holidayslist);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($holidayslist);\n $em->flush();\n\n return $this->redirectToRoute('holidayslist_index');\n }\n\n return $this->render('holidayslist/duplicate.html.twig', array(\n 'holidayslist' => $holidayslist,\n\t\t\t'idholiday'=> $oHolidays->getId(),\n 'form' => $form->createView(),\n\t\t\t'pm'=>\"setting\",\n\t\t\t'sm'=>\"holidays\"\t\n ));\n }", "title": "" }, { "docid": "d9c32912c54ef5481ddd18185e374e1b", "score": "0.4203665", "text": "public function duplicate($id, Curso $curso)\n\t{\n\t\t$curso=$curso->find($id);\n\t\treturn view('cursos.duplicate', compact('curso'))\n\t\t\t->with( 'list', Curso::getListFromAllRelationApps() );\n\t}", "title": "" }, { "docid": "c04b3d581e77329a704263f5465efd2f", "score": "0.4194794", "text": "public function getProductTypeInstance($productType)\n {\n $types = $this->getProductTypeInstances();\n if (isset($types[$productType])) {\n return $types[$productType];\n }\n return false;\n }", "title": "" }, { "docid": "7593888a2af044931412e74798eb1f71", "score": "0.4191454", "text": "function getTypeId() {\n\t\tif (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "77ac9460ffdc129f0b02351e0a0837ec", "score": "0.4187351", "text": "public function getType()\n {\n return $this->hasOne(Type::className(), ['id' => 'type_id']);\n }", "title": "" }, { "docid": "339297dcd633cf8c93f903664d9cef0c", "score": "0.41844025", "text": "public function getTypeNameById($typeID)\n {\n if (isset($this->trackedTypeIDs[(int) $typeID]))\n return $this->trackedTypeIDs[(int) $typeID];\n else {\n $exceptionClass = \\iveeCore\\Config::getIveeClassName('TypeIdNotFoundException');\n throw new $exceptionClass((int) $typeID . ' not found among market tracked item IDs.');\n }\n }", "title": "" }, { "docid": "0725a6db9c865ddc239689eb32abbb81", "score": "0.41826573", "text": "public function updatePalletType($body)\n {\n $this->updatePalletTypeWithHttpInfo($body);\n }", "title": "" }, { "docid": "d6544790854fd4b49ccc51097c16b9a1", "score": "0.4171429", "text": "public function duplicateObject()\n {\n $definition = ObjectModel::getDefinition($this);\n\n $res = Db::getInstance()->getRow('\n\t\t\t\t\tSELECT *\n\t\t\t\t\tFROM `'._DB_PREFIX_.bqSQL($definition['table']).'`\n\t\t\t\t\tWHERE `'.bqSQL($definition['primary']).'` = '.(int) $this->id\n );\n if (!$res) {\n return false;\n }\n\n unset($res[$definition['primary']]);\n foreach ($res as $field => &$value) {\n if (isset($definition['fields'][$field])) {\n $value = static::formatValue($value, $definition['fields'][$field]['type'], false, true, !empty($definition['fields'][$field]['allow_null']));\n }\n }\n\n if (!Db::getInstance()->insert($definition['table'], $res)) {\n return false;\n }\n\n $objectId = Db::getInstance()->Insert_ID();\n\n if (isset($definition['multilang']) && $definition['multilang']) {\n $result = Db::getInstance()->executeS('\n\t\t\tSELECT *\n\t\t\tFROM `'._DB_PREFIX_.bqSQL($definition['table']).'_lang`\n\t\t\tWHERE `'.bqSQL($definition['primary']).'` = '.(int) $this->id);\n if (!$result) {\n return false;\n }\n\n foreach ($result as &$row) {\n foreach ($row as $field => &$value) {\n if (isset($definition['fields'][$field])) {\n $value = static::formatValue($value, $definition['fields'][$field]['type'], false, true, !empty($definition['fields'][$field]['allow_null']));\n }\n }\n }\n\n // Keep $row2, you cannot use $row because there is an unexplicated conflict with the previous usage of this variable\n foreach ($result as $row2) {\n $row2[$definition['primary']] = (int) $objectId;\n if (!Db::getInstance()->insert($definition['table'].'_lang', $row2)) {\n return false;\n }\n }\n }\n\n /** @var ObjectModel $objectDuplicated */\n $objectDuplicated = new $definition['classname']((int) $objectId);\n $objectDuplicated->duplicateShops((int) $this->id);\n\n return $objectDuplicated;\n }", "title": "" }, { "docid": "f61241b031116f94263d36a0e3741bbb", "score": "0.4171083", "text": "public function getInstance($type)\n {\n return $this->get(Key::ofType($type));\n }", "title": "" }, { "docid": "04f79cf88070f4c25d93bbd619e25537", "score": "0.41601586", "text": "public function get_non_synced_duplicate( $post_name, $post_type ) {\n\n\t\tglobal $wpdb;\n\n\t\t$sql = \"SELECT ID, post_type, post_modified FROM $wpdb->posts WHERE post_name = %s AND post_type = %s\";\n\t\t$prepared_sql = $wpdb->prepare( $sql, $post_name, $post_type );\n\n\t\t$post = $wpdb->get_row( $prepared_sql, ARRAY_A );\n\n\t\treturn ( $post ) ? $post : false;\n\n\t}", "title": "" }, { "docid": "c65849dfe3d7bc60c4e2d4e5fa2185ba", "score": "0.41468644", "text": "public function actionComponentDuplicate($id)\n {\n $component = $this->findComponent($id);\n\n $cmp = null;\n\n // if not repeatable, continue.\n if ($component->isRepeatable())\n {\n $type = $component->type;\n $locale = Yii::$app->language;\n $cmp = ContentComponent::create($type, $component->content, $locale, $component->order, [ 'repeatable' => true, ], $component->id,\n false);\n }\n\n $arr = [];\n if ($cmp->group_id != $cmp->id)\n {\n array_push($arr, $cmp->group_id);\n }\n array_push($arr, $cmp->id);\n\n \\Yii::$app->response->format = Response::FORMAT_JSON;\n\n return [\n 'id' => $cmp->content_id,\n 'opened_boxes' => $arr,\n 'msg' => \\Yii::t('backend', 'The component has been successfully duplicated.'),\n 'code' => 100,\n ];\n }", "title": "" }, { "docid": "0bb18416279d5d246a0e815b57e0f334", "score": "0.4146419", "text": "public function duplicate($id, PreguntaCliente $preguntaCliente)\n\t{\n\t\t$preguntaCliente=$preguntaCliente->find($id);\n\t\treturn view('preguntaClientes.duplicate', compact('preguntaCliente'))\n\t\t\t->with( 'list', PreguntaCliente::getListFromAllRelationApps() );\n\t}", "title": "" }, { "docid": "c8e2c2bb49b63458fec8575fe5c4fc70", "score": "0.4140198", "text": "public function addPalletTypeWithHttpInfo($body)\n {\n $returnType = '\\Infoplus\\Infoplus\\Model\\PalletType';\n $request = $this->addPalletTypeRequest($body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Infoplus\\Infoplus\\Model\\PalletType',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 405:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Infoplus\\Infoplus\\Model\\ApiResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "565b22bb5c38913ff2ca368bda2597a4", "score": "0.41363493", "text": "public function getWithType();", "title": "" }, { "docid": "bdf29fc79fab6d79251986ec6f533665", "score": "0.41363004", "text": "public function DeleteTypeByID($id)\n {\n $sql = \"DELETE FROM `protypes` WHERE type_ID = $id\";\n // thuc thi cau truy van\n $result = self::$conn->query($sql);\n return $result;\n }", "title": "" }, { "docid": "cf5f0e5bfa433d0fe7e9df6e9e83f57f", "score": "0.4133571", "text": "function get_param_type($id = '')\n\t{\n\t\tglobal $wpdb;\n\t\n\t\tif ($id == '') {\n\t\t\t$arr = $wpdb->get_results('SELECT * FROM `'.$wpdb->prefix.'scat_types` ORDER BY `id`');\n\t\t}\n\t\telse {\n\t\t\t$arr = $wpdb->get_results('SELECT * FROM `'.$wpdb->prefix.'scat_types` WHERE `id`=\"'.$id.'\"');\n\t\t}\n\t\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "b24946f9bdcc5b7d311486be9893d4f3", "score": "0.41310483", "text": "public static function getScoreTypeById($id) {\n return ScoreType::all()->find($id);\n }", "title": "" }, { "docid": "b894c54534974ef08ecf5f2bc7372fd9", "score": "0.4119835", "text": "public function isDuplicate(Biblio $biblio) {\n $md5 = $this->generateBiblioMd5($biblio);\n\n $query = new EntityFieldQuery();\n $result = $query\n ->entityCondition('entity_type', 'biblio')\n ->propertyCondition('md5', $md5)\n ->range(0, 1)\n ->execute();\n\n if (empty($result['biblio'])) {\n return;\n }\n\n $row = reset($result['biblio']);\n $biblio = biblio_load($row->bid);\n\n return $biblio;\n }", "title": "" }, { "docid": "0e11299c365c8b22ad3235d539531655", "score": "0.4117112", "text": "public function getProductType(){\r\n return $this->getProduct()->getTypeId();\r\n }", "title": "" }, { "docid": "f3dce52894a8cd9c552c15c350ade929", "score": "0.41105273", "text": "public function show($id)\n {\n $productType = $this->repository->find($id);\n\n return new ProductTypeResource($productType);\n }", "title": "" }, { "docid": "93348c71139c1871f0a47144c7e32b8a", "score": "0.40893945", "text": "function GetType($typeId)\r\n {\r\n $typeId = $this->dbh->sql_safe($typeId);\r\n $sql = 'SELECT rt_name AS RT_NAME '\r\n . 'FROM report_type '\r\n . 'WHERE rt_id = ' . $typeId;\r\n\r\n return $this->dbh->query_first($sql);\r\n }", "title": "" }, { "docid": "cf322ff6e9aab5a768a898822fd91dbb", "score": "0.40853205", "text": "public function getTypeID()\n {\n return $this->typeID;\n }", "title": "" }, { "docid": "f4838b05bd0ca3dde319c4992105331b", "score": "0.40828755", "text": "public function getPlatById($id){\n\n $product = $this->re\n ->getRepository(Plat::class)\n ->findPlatById($id);\n return $product;\n\n }", "title": "" }, { "docid": "cd9afe26c44a180cec8cb2e6379efc7b", "score": "0.40703878", "text": "public function duplicateCopy($id){\n\n $getDeliveryReceipt = LechonDeCebuDeliveryReceipt::find($id);\n\n //update table delivery receipt\n $dupStatus = 1;\n\n $getDeliveryReceipt->duplicate_status = $dupStatus;\n $getDeliveryReceipt->save();\n \n\n $getDReceipts = LechonDeCebuDeliveryReceipt::where('dr_id', $id)->get()->toArray();\n\n\n //save to duplicate copies table\n $duplicateCopy = new LechonDeCebuDeliveryReceiptDuplicateCopy([\n 'user_id'=>$getDeliveryReceipt->user_id,\n 'sold_to'=>$getDeliveryReceipt->sold_to,\n 'time'=>$getDeliveryReceipt->time,\n 'dr_no'=>$getDeliveryReceipt->dr_no,\n 'date'=>$getDeliveryReceipt->date,\n 'date_to_be_delivered'=>$getDeliveryReceipt->date_to_be_delivered,\n 'delivered_to'=>$getDeliveryReceipt->delivered_to,\n 'contact_person'=>$getDeliveryReceipt->contact_person,\n 'mobile_num'=>$getDeliveryReceipt->mobile_num,\n 'special_instruction'=>$getDeliveryReceipt->special_instruction,\n 'qty'=>$getDeliveryReceipt->qty,\n 'description'=>$getDeliveryReceipt->description,\n 'price'=>$getDeliveryReceipt->price,\n 'total'=>$getDeliveryReceipt->total,\n 'prepared_by'=>$getDeliveryReceipt->prepared_by,\n 'created_by'=>$getDeliveryReceipt->created_by,\n ]);\n\n $duplicateCopy->save();\n\n $insertedId = $duplicateCopy->id;\n\n foreach($getDReceipts as $getDReceipt){\n\n $addedDataDuplicate = new LechonDeCebuDeliveryReceiptDuplicateCopy([\n 'user_id'=>$getDReceipt['user_id'],\n 'sold_to'=>$getDReceipt['sold_to'],\n 'time'=>$getDReceipt['time'],\n 'dr_id'=>$insertedId,\n 'dr_no'=>$getDReceipt['dr_no'],\n 'date'=>$getDReceipt['date'],\n 'delivered_to'=>$getDReceipt['delivered_to'],\n 'contact_person'=>$getDReceipt['contact_person'],\n 'mobile_num'=>$getDReceipt['mobile_num'],\n 'special_instruction'=>$getDReceipt['special_instruction'],\n 'qty'=>$getDReceipt['qty'],\n 'description'=>$getDReceipt['description'],\n 'price'=>$getDReceipt['price'],\n 'total'=>$getDReceipt['total'],\n 'prepared_by'=>$getDReceipt['prepared_by'],\n 'created_by'=>$getDReceipt['created_by'],\n ]);\n\n $addedDataDuplicate->save();\n }\n \n\n\n Session::flash('duplicateSuccess', 'Successfully duplicated a copy.');\n\n return redirect('lolo-pinoy-lechon-de-cebu/delivery-receipt/lists');\n\n }", "title": "" }, { "docid": "17a518e3bf33f5cd72798ba1b6cdf560", "score": "0.40681306", "text": "public function duplicate($id, Empleado $empleado)\r\n {\r\n $empleado = $empleado->find($id);\r\n\r\n $planteles = array();\r\n foreach ($empleado->plantels as $p) {\r\n //dd($p->id);\r\n array_push($planteles, $p->id);\r\n }\r\n $jefes = Empleado::select('id', DB::raw('concat(nombre,\" \",ape_paterno,\" \",ape_materno) as name'))\r\n ->where('jefe_bnd', '=', '1')\r\n //->where('plantel_id', '=', $plantel)\r\n ->pluck('name', 'id');\r\n $responsables = Empleado::select('id', DB::raw('concat(nombre,\" \",ape_paterno,\" \",ape_materno) as name'))\r\n //->where('plantel_id', '=', $empleado->plantel_id)\r\n ->whereIn('plantel_id', $planteles)\r\n ->pluck('name', 'id');\r\n $doc_existentes = DB::table('pivot_doc_empleados as pde')->select('doc_empleado_id')\r\n ->join('empleados as e', 'e.id', '=', 'pde.empleado_id')\r\n ->where('e.id', '=', $id)\r\n ->where('pde.deleted_at', '=', NULL)->get();\r\n\r\n $de_array = array();\r\n if ($doc_existentes->isNotEmpty()) {\r\n foreach ($doc_existentes as $de) {\r\n array_push($de_array, $de->doc_empleado_id);\r\n }\r\n //dd($de_array);\r\n }\r\n\r\n $documentos_faltantes = DB::table('doc_empleados')\r\n ->select()\r\n ->whereNotIn('id', $de_array)\r\n ->get();\r\n return view('empleados.duplicate', compact('empleado', 'jefes', 'responsables', 'documentos_faltantes'))\r\n ->with('list', Empleado::getListFromAllRelationApps())\r\n ->with('list1', PivotDocEmpleado::getListFromAllRelationApps());\r\n }", "title": "" }, { "docid": "77f284a110b2c912051322a9a3dc582a", "score": "0.40663618", "text": "public function getReactionTypeIdFromName(string $type_name) {\n $type_ids = $this->entityTypeManager\n ->getStorage('emoji_reaction_type')\n ->getQuery()\n ->condition('name', $type_name)\n ->execute();\n\n return reset($type_ids);\n }", "title": "" }, { "docid": "4a211bb884e0890c935b323308c03d8e", "score": "0.40662402", "text": "public function getType()\n {\n return $this->hasOne(Types::className(), ['id' => 'type_id']);\n }", "title": "" }, { "docid": "d65a44cf42eaa9097df1cbf0bb4a2358", "score": "0.40646598", "text": "public function create($id)\n {\n $palletitem = $id;\n $farms = Farm::orderBy('name', 'ASC')->pluck('name', 'id');\n $clients = Client::orderBy('name', 'ASC')->pluck('name', 'id');\n $pallets = Pallet::select('id')->where('number', '=', $id)->get();\n $id_pallet = $pallets[0]->id; \n\n // Breadcrums\n $load = Pallet::select('id_load')->where('number', '=', $id)->get();\n $loads = Load::select('code', 'id')->where('id', '=', $load[0]->id_load)->get();\n $code_load = $loads[0]->code;\n $id_load = $loads[0]->id;\n \n //dd($code_load);\n return view('palletitems.create', compact('palletitem', 'farms', 'clients', 'id_pallet', 'code_load', 'id_load'));\n }", "title": "" }, { "docid": "e94475ecaf095ec2651872d336c89920", "score": "0.4064622", "text": "public function getDataDtoType();", "title": "" }, { "docid": "6569788626aed6cb12849492c91e3e21", "score": "0.4062025", "text": "public function getPalletTypeByFilterAsync($filter = null, $page = null, $limit = null, $sort = null)\n {\n return $this->getPalletTypeByFilterAsyncWithHttpInfo($filter, $page, $limit, $sort)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "ceb2bbf3474a48de09373344a73806ad", "score": "0.40576681", "text": "public function getRandomMealType() {\n $db = Zend_Registry::get('dbAdapter');\n $typeId = $db->fetchRow('select id from meal_types order by rand() limit 1');\n return (integer) $typeId['id'];\n }", "title": "" }, { "docid": "7bb0d64a368df990daac9aeff778e474", "score": "0.4054826", "text": "public function createDuplicate();", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "1c8123afca12920b823d941baf821971", "score": "0.0", "text": "public function edit( $id)\n {\n $item = Sale::find($id);\n\n return response()->json($item);\n }", "title": "" } ]
[ { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "8f5529ba137277265d5572c380aac566", "score": "0.76910913", "text": "public function editAction()\n {\n $this->view->title .= ' - Edit Resource';\n\n $id = $this->_getParam('id');\n if (empty($id)) {\n throw new RuntimeException('Missing parameter id.');\n }\n\n $resourceResource = $this->_helper->modelResource('Resources');\n $resource = $resourceResource->find($id);\n if (!count($resource)) {\n throw new RuntimeException('Cannot found resource ' . $id);\n }\n $resource = $resource->getIterator()->current();\n\n $form = $this->_helper->form();\n $request = $this->getRequest();\n if ($request->isPost() && $form->isValid($request->getPost())) {\n $data = $form->getValues();\n unset($data['id']); //unset data for zf 1.6\n $resource->populate($data);\n if (!$resource->save()) {\n throw new RuntimeException('Save Resource failure!');\n }\n\n $this->_helper->flashMessenger(\"Save Resource \\\"{$resource->name}\\\" successful!\");\n $this->view->messages = $this->_helper->flashMessenger->getCurrentMessages();\n $this->_helper->flashMessenger->clearCurrentMessages();\n }\n $form->setDefaults($resource->toArray());\n $form->setDefault('id', $resource->id);\n $this->view->form = $form;\n }", "title": "" }, { "docid": "5069ab4d37ad8824f8739ff562d0d370", "score": "0.74427706", "text": "function editForm() {\n render(\"guest/update\");\n }", "title": "" }, { "docid": "6f88bb286afae4ce47ad9810da77dffb", "score": "0.7220439", "text": "public function editAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Super_Service_Resource::get(intval($id));\r\n\t\t\r\n\t\t$this->assign('info', $info);\r\n\t}", "title": "" }, { "docid": "84fa42f4318791adb736d823ce255f40", "score": "0.7115206", "text": "public function edit() {\n \n $partner = $this->partner_model->get_by_id($this->input->get('id'));\n if (!is_null($partner)) {\n echo $this->load->view('partner/edit_form', array(\n 'id' =>$partner->id,\n 'name' => $partner->name\n ), TRUE);\n }\n else {\n echo show_404('The resource you requested was not found');\n } \n }", "title": "" }, { "docid": "7f75b87329616886dbf4cacf219053f8", "score": "0.7070694", "text": "public function editAction()\n {\n $this->formClass = EditForm::class;\n\n return parent::editAction();\n }", "title": "" }, { "docid": "da32ec30ea6b151bdb0d8c95b7fbef49", "score": "0.7062849", "text": "public function edit($id)\n\t{\n\t\t$resource = Resource::find($id);\n\n\t\tif (Auth::id() !== ($resource->user_id))\n\t\t{\n\t\t\treturn Redirect::back()->withFlashMessage('You cannot edit this resource');\n\t\t}\n\n\t\treturn View::make('resources.edit')->with('resource', $resource);\n\t}", "title": "" }, { "docid": "5a02684925f991ee39abcb153d80d058", "score": "0.7008457", "text": "public function edit()\r\n {\r\n return view('hr::edit');\r\n }", "title": "" }, { "docid": "06b34b79c3a9b611ad6ef22ee71c20e7", "score": "0.6987668", "text": "public function edit()\n {\n return view('redistask::edit');\n }", "title": "" }, { "docid": "53fbc8894a41287014c5edbb650194bf", "score": "0.6966032", "text": "public function editAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Service_Resource::get(intval($id));\r\n\t\t\r\n\t\tlist(,$resource_imgs) = Gou_Service_ResourceImg::getList(0, 10, array('resource_id'=>intval($id)), array('id'=>'ASC'));\r\n\t\t$this->assign('resource_imgs', $resource_imgs);\r\n\t\t\r\n\t\t$this->assign('info', $info);\r\n\t}", "title": "" }, { "docid": "7e492dbc3c5834bd8dcf322b6e0bebf4", "score": "0.6945628", "text": "public function editAction() {\n $patientID = $this->getParam('id');\n\n $form = new Application_Form_Patient();\n $form->getElement('submit')->setLabel(\"Daten ändern\");\n\n $request = $this->getRequest();\n\n // Wenn das Formular abgesedet wurde, neue Daten Speichern\n // Wenn kein post Request vorliegt => Erster Seitenaufruf, Patient wird anhand der uebergebenen ID ins Formular eingetragen.\n\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($request->getPost())) {\n $patient = new Application_Model_Patient_Patient($form->getValues());\n $mapper = new Application_Model_Patient_PatientMapper();\n $mapper->save($patient);\n return $this->_helper->redirector('list');\n }\n } else {\n $patient = new Application_Model_Patient_Patient();\n $mapper = new Application_Model_Patient_PatientMapper();\n $mapper->find($patientID, $patient);\n\n\n $form->populate($patient->getKeyValueArray());\n }\n\n $this->view->form = $form;\n }", "title": "" }, { "docid": "a5aafcf2a2bbeb05f135b2394c4525d2", "score": "0.6944655", "text": "public function action_edit() {\n\t\tif (empty($this->id)) {\n\t\t\tthrow new Kohana_Exception('No ID received for view');\n\t\t}\n\n\t\t$this->load_model('edit');\n\n\t\tif ( ! empty($_POST)) {\n\t\t\t$this->save_model();\n\t\t}\n\n\t\t$this->template->page_title = 'Edit - ' . $this->page_title_append;\n\t\t$view_title = $this->get_page_title_message('editing_item');\n\t\t$view_content = $this->model->get_form(array(\n\t\t\t'mode' => 'edit',\n\t\t));\n\t\t$this->add_default_view($view_title, $view_content);\n\t}", "title": "" }, { "docid": "5528e9d735a1d9a4a8c37629a76211ee", "score": "0.6944128", "text": "public function show_editform() {\n $this->item_form->display();\n }", "title": "" }, { "docid": "5984290a0d4758b0ead36edab74a7fcb", "score": "0.69379073", "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('admin.layouts.edit')->with(compact('data','forms', 'title', 'form_title'));\n }", "title": "" }, { "docid": "439b2cee9a4232572f243ce40fe7ff37", "score": "0.6936526", "text": "public function edit($id)\n\t{\n\t\t$resource = Resource::find($id);\n\n\t\t// queries the schools db table, orders by type and lists type and id\n\t \t$school_options = DB::table('schools')->orderBy('type', 'asc')->lists('type','type');\n\t \t$year_options = DB::table('years')->lists('year','year');\n\t \t$unit_options = DB::table('units')->lists('unit','unit');\n\t \t$resourceTypes_options = DB::table('resource_types')->orderBy('type', 'asc')->lists('type','type');\n\n\t \t$options = [\n\n\t \t\t'school_options' => $school_options, \n\t \t\t'year_options' => $year_options, \n\t \t\t'unit_options' => $unit_options,\n\t \t\t'resourceType_options' => $resourceTypes_options\n\t \t];\n\n\t return View::make('resources.edit', array('options' => $options, 'resource' => $resource));\n\n\n\n\t}", "title": "" }, { "docid": "44db8e15fc1352a7c519823621a72cc9", "score": "0.69331795", "text": "public function edit()\n {\n return view('coreplanification::edit');\n }", "title": "" }, { "docid": "6f12de6367ed6b5e724959286c687d98", "score": "0.6924614", "text": "public function edit($id)\n\t{\n\t\t$model = SysDetailFormManager::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysDetailFormManagerForm', [\n \t'method' => 'POST',\n \t'url' => 'detailformmanager/update/'.$id,\n \t'model' => $model,\n \t]);\n\n\t\treturn View::make('dynaflow::detailformmanager.form', compact('form'));\n\t}", "title": "" }, { "docid": "32d0551d54bd22e3701bf40a8c1cbd2e", "score": "0.6904719", "text": "public function edit()\n {\n return view('partnermanagement::edit');\n }", "title": "" }, { "docid": "7b1b04ea22eb307dae4782d1893d684f", "score": "0.68787277", "text": "public function edit()\n {\n return view('app::edit');\n }", "title": "" }, { "docid": "be7762755fcfeef213c7106eb19a722a", "score": "0.68687415", "text": "public function edit()\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "bd55c6cca624fddd49faf3e7f8d44ebc", "score": "0.6867638", "text": "public function editAction()\n {\n// \treturn array('form'=>$form);\n }", "title": "" }, { "docid": "311e3f6fa3d20c187430d7b70defb091", "score": "0.68635666", "text": "public function editAction()\n {\n $this->loadLayout();\n $this->renderLayout();\n }", "title": "" }, { "docid": "a093d663f095c2eff827fd56ba3f1c5c", "score": "0.6835696", "text": "public function edit()\n {\n return view('taskmanagement::edit');\n }", "title": "" }, { "docid": "96e7a1a8798dd32cbc9d0fff02092958", "score": "0.683385", "text": "public function edit($id)\n\t{\n\t\t$this->resources = array('driver' => $this->resource\n \t\t\t\t\t\t);\n\t\treturn $this->respondTo(\n\t\t\tarray('html'=> function()\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t $this->layout->nest('content', $this->view, $this->resources);\n\t\t\t\t \t\t\t},\n\t\t\t\t 'js' => function()\n\t\t\t\t \t\t {\n\t\t\t\t \t\t \t $form = View::make($this->form, $this->resources)->render();\n\t\t\t\t \t\t \t return View::make('admin.shared.modal', array('body' => $form))->render();\n\t\t\t\t \t\t }\n\t\t\t\t )\n\t\t\t);\n\t}", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "9c40deb595ac4a285fa76f490ad8b576", "score": "0.67989755", "text": "public function fieldEditAction() {\n\n parent::fieldEditAction();\n\n //GENERATE FORM\n $form = $this->view->form;\n\n if ($form) {\n $form->setTitle('Edit Form Question');\n $form->removeElement('search');\n $form->removeElement('display');\n $form->removeElement('show');\n $form->addElement('hidden', 'show', array('value' => 0));\n $form->removeElement('error');\n $form->removeElement('style');\n }\n }", "title": "" }, { "docid": "e3fad094d4252fd72e2502d403dfc367", "score": "0.67960227", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "38b95b158cfbd7d6008eb1313d74dead", "score": "0.67904013", "text": "public function editProduct()\n {\n $this->configureFormRenderer('required');\n\n $this->productForm->addProductId();\n $this->productForm->populateFrom($product = $this->catalog->productOf($id = 1));\n\n echo $this->view->render('examples/edit-information.html.twig', [\n 'form' => $this->productForm->buildView(),\n ]);\n }", "title": "" }, { "docid": "1f3e62c409733532dc3f0f85568bdbb0", "score": "0.6761064", "text": "public function edit($id)\n\t{\n\t\treturn view($this->plural.'.edit', [$this->singular => $this->model->findOrFail($id)]);\n\t}", "title": "" }, { "docid": "2e451cbecb2a4edf2e18ea359a84b198", "score": "0.6758181", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('OffresBundle:Offres')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Offres entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('OffresBundle:Offres:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "1ad8f42c84160b8c6ce6296389de89c9", "score": "0.6757268", "text": "function edit( $resource ){\n\n $brands = allWithoutTrash('product_brands' );\n\n\n $stocks = get('inventory', $resource);\n\n $product = get( 'products', $resource );\n\n return view( 'admin/product/add_product', compact( 'product', 'brands', 'stocks' ));\n}", "title": "" }, { "docid": "c687e229c70d5b2bb3174acd2887d935", "score": "0.67551833", "text": "public function edit($id)\n {\n //Open form in edit mode.\n $product = Product::findOrFail($id);\n return view('admin.Products.edit')->with('product', $product);\n }", "title": "" }, { "docid": "aae9d312c6fa709ae12d3c879ef9a3f2", "score": "0.67495203", "text": "public function edit(Form $form)\n {\n $form = Form::find($form->id);\n $data = array(\n 'form' => $form,\n 'types' => $this->getType()\n );\n return view('./form/form', $data);\n }", "title": "" }, { "docid": "173e18a8d00009c51c3e2b096afa35c6", "score": "0.67494076", "text": "public function edit()\n {\n $rmk = Specialization::find($id);\n return view('specialization.edit', compact('rmk'));\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": "bcf716390400a7068b7e1c48017f7c0f", "score": "0.67475426", "text": "function edit()\n\t{\n\t\t$id = $this->ci->uri->segment($this->config['uri_segment']+1);\n\t\treturn $this->_form($id);\n\t}", "title": "" }, { "docid": "7b5265e5c66828f2674f182bfb554b6b", "score": "0.67471254", "text": "public function edit()\n {\n return view('feaccount::edit');\n }", "title": "" }, { "docid": "7e53728fc096714ffa60b9478bd64083", "score": "0.67435557", "text": "function edit()\n {\n JRequest::setVar('view', 'team');\n JRequest::setVar('layout', 'form');\n JRequest::setVar('hidemainmenu', 1);\n\n parent::display();\n }", "title": "" }, { "docid": "668b7d8579ddada4536a4181f3e08041", "score": "0.6737808", "text": "public function edit()\n {\n return view('rekanan::edit');\n }", "title": "" }, { "docid": "7cb2b004357f9ffd5cddc45388789b2a", "score": "0.6736445", "text": "public function edit($id)\n {\n $this->data['obj'] = FormObject::find($id);\n $this->data['title'] = \"Edit \" . $this->data['obj']->name . \" Property\";\n $this->data['url'] = 'system/form-objects/' . $id;\n $this->data['method'] = 'put';\n $this->data['sites'] = Site::whereActive(1)->get()->all();\n\n $this->data['hotels'] = Hotel::all();\n\n return view('system.forms.form-object', $this->data);\n }", "title": "" }, { "docid": "a57bcfb849abf842f54ab142f87778dc", "score": "0.6734803", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n return view('admin.portal.edit', compact('resource'));\n }", "title": "" }, { "docid": "ff86c2f46684f81c5fd959adb2807f9e", "score": "0.67255336", "text": "public function edit($id)\n {\n $product = $this->products->findById($id);\n return View::make('products._form', compact('product'));\n }", "title": "" }, { "docid": "e144891e4fdc3366376e396b701fbf99", "score": "0.6711672", "text": "public function edit()\n\t{\n\t\t$jInput = JFactory::getApplication()->input;\n\t\t$jInput->set('view', 'item');\n\t\t$jInput->set('layout', 'default');\n\t\t$jInput->set('hidemainmenu', 1);\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "c53a972e2af2970da7bb04372311a3a5", "score": "0.669989", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AppBundle:Programas')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Programas entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AppBundle:Programas:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "aae7f4b0c772355bb99330a14ba29014", "score": "0.6696947", "text": "public function edit($id)\n\t{\n return View::make('matrimonials.edit');\n\t}", "title": "" }, { "docid": "883502561745369884d7fc695ef1624e", "score": "0.6691808", "text": "public function edit($id)\n\t{\n return View::make('requirements.edit');\n\t}", "title": "" }, { "docid": "439487f339021f8335c9eeaa79db8fa8", "score": "0.6690575", "text": "public function edit(FormBuilder $formBuilder, $id)\n {\n $data['title'] = $this->title;\n $tbl = $this->table->find($id);\n $data['form'] = $formBuilder->create('App\\Forms\\TypeBookForm', [\n 'method' => 'PUT',\n 'model' => $tbl,\n 'url' => route($this->uri.'.update', $id)\n ]);\n\n $data['url'] = route($this->uri.'.index');\n return view($this->folder.'.create', $data);\n }", "title": "" }, { "docid": "1507a482b7f295d6473bdf19d6d3da89", "score": "0.6678381", "text": "function edit( $resource ){\n\n $receivables = get( 'receivables', $resource );\n\n return view( 'admin/receivables/add_receivables', compact( 'receivables' ) );\n\n}", "title": "" }, { "docid": "2e96703e3ded22777d115212adcbfa8e", "score": "0.66781634", "text": "public function edit($id)\n {\n return view('manage::edit');\n }", "title": "" }, { "docid": "f2990bfbaee0f3cc29d99eb0cccdfc5d", "score": "0.6674401", "text": "public function edit(Entity $entity)\n {\n $this->authorize('update', $entity);\n\n return view('entities.edit', [\n 'entity' => $entity,\n ]);\n }", "title": "" }, { "docid": "b182548861e62c722e9b46c8496db241", "score": "0.6673116", "text": "public function edit($id)\n {\n $this->setOperation('update');\n if ($this->tienePermiso('update')) {\n\n // get entry ID from Request (makes sure its the last ID for nested resources)\n $id = $this->getCurrentEntryId() ?? $id;\n $entry = $this->getEntry($id);\n\n $this->data = array();\n // get the info for that entry\n $this->data['title'] = $this->getTitle() ?? trans('cesi::core.crud.edit') . ' ' . $this->entity_name;\n $this->data['heading'] = $this->getHeading() ?? $this->entity_name_plural;\n $this->data['subheading'] = $this->getSubheading() ?? trans('cesi::core.crud.edit').' '.$this->entity_name;\n $this->data['entry'] = $entry;\n $this->data['contentClass'] = $this->getEditContentClass();\n $this->data['routerAlias'] = $this->getRouterAlias();\n $this->data['resourceAlias'] = $this->getResourceAlias();\n $this->data['hasUploadFields'] = $this->hasUploadFields('update', $entry->getKey());\n\n // TODO ?? $this->data['saveAction'] = $this->getSaveAction();\n // $this->data['fields'] = $this->getCrud()->getUpdateFields($id);\n\n $this->data['id'] = $id;\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->getEditView(), $this->filterEditViewData($this->data));\n } else {\n return view('cesi::errors.401');\n }\n }", "title": "" }, { "docid": "23695efbb416dcbac50f5655f76220eb", "score": "0.6671321", "text": "public function edit()\n {\n return view('mpcs::edit');\n }", "title": "" }, { "docid": "9eabaca39cbbc769fdc4d4613662986d", "score": "0.6670628", "text": "public function edit($id)\n {\n $form = Form::find( $id );\n return view('editar', [\n 'item' => $form,\n ]);\n }", "title": "" }, { "docid": "98a687ec9cd21bb18a66914c17a84262", "score": "0.666875", "text": "function viewedit() {\n $id = Request::read('email');\n $error = Request::read('r'); \n \n if($error == -1){\n $error = 'No se ha editado';\n }\n \n $usuario = $this->getModel()->getUsuario($id);\n $email = $usuario->getEmail();\n \n \n $this->getModel()->addData('email', $email);\n $this->getModel()->addData('error', $error);\n \n $this->getModel()->addFile('form', 'sections/user/formEdit.html');\n }", "title": "" }, { "docid": "8aecb685b024e89667372cb88e6534b5", "score": "0.6665608", "text": "public function edit()\n {\n $product = $this->model('IndexModel')->get($this->getParam()['id']);\n\n $this->template('edit', $product);\n }", "title": "" }, { "docid": "897c904da29480933d49a2afe6a447fa", "score": "0.6664957", "text": "public function edit()\n {\n return view('core::edit');\n }", "title": "" }, { "docid": "47e15a6904083b2dac82790c56050341", "score": "0.66649014", "text": "public function showEditJobForm($id){\n \t$jobData = Job::find($id);\n \treturn view('employer.employer_edit_job', compact('jobData'));\n }", "title": "" }, { "docid": "55bfb83b470d662ff8fb0f9f1f658c98", "score": "0.6653699", "text": "public function edit($id)\n\t{\n\t\t$form = \\View::make('project.form');\n\t\t$form->project = Project::find($id);\n\t\t$form->action = array('action' => array('Toomdrix\\Pm\\ProjectController@update', $form->project->id),'class'=>'form-signup');\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "f7bd52c4216f50ae40e29aa9291a3153", "score": "0.66463226", "text": "public function edit($id) {}", "title": "" }, { "docid": "028c8bc8d418c3bcb062ed6c39f57a64", "score": "0.6643353", "text": "public function edit($id)\n {\n $asociado = Asociado::getPersonaAsociadoSingle($id);\n $asociado->persona;\n $title = 'Editad asociado: '.$asociado->persona->primer_nombre;\n $form_data = ['route' => ['asociado.update',$asociado->id],'method' => 'PUT'];\n $cliente_id_field = '';\n $cliente_id = $asociado->cliente_id;\n\n return view('asociado.form')->with(compact('asociado','title','form_data','cliente_id_field','cliente_id'));\n }", "title": "" }, { "docid": "45821cecfbb5732cd269059f6aad418f", "score": "0.66403663", "text": "function edit()\n\t{\n\t\tJRequest::setVar( 'view', 'editlieux' );\n\t\tJRequest::setVar( 'layout', 'edit_form' );\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "e4c3c0cbb7ac2570554ac1a25beb95aa", "score": "0.66388327", "text": "public function edit()\n {\n return view('berita::edit');\n }", "title": "" }, { "docid": "ab2518ea287ee8d0a67051d27dc511a8", "score": "0.66294515", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->membership->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['membership' => $this->membership]);\n\t}", "title": "" }, { "docid": "55c0c1d3fd64720346563285fe8ebb07", "score": "0.6628236", "text": "public function edit($id)\n {\n return view('employee.edit_form',['employee' => User::findOrFail($id)]);\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "4ba8a0764293ed6e4bdc9a47879f5cdb", "score": "0.66251445", "text": "public function edit($id)\n {\n $item = Provider::find($id);\n return View('provider.form', [\"item\" => $item, 'type' => 'edit']);\n }", "title": "" }, { "docid": "c2183a818e413caf29da395ac5aa45fe", "score": "0.6625103", "text": "public function edit($id)\n\t{\n\t\t$datos['empresa'] = Empresa::find($id);\n\t\t$datos['form'] = array('route'=> array('datos.empresas.update', $id), 'method' => 'PATCH');\n\t\t\n\t\treturn View::make('datos/empresas/list-edit-form')->with('datos', $datos);\n\t}", "title": "" }, { "docid": "1a4ead4c141c44cd189d59dd857cc05f", "score": "0.6621553", "text": "public function edit($field)\n {\n $field = Fields::find($field);\n return view('admin.fields.form',[\n 'active' => 'Fields',\n 'action' => 'Edit',\n 'field' => $field,\n ]);\n }", "title": "" }, { "docid": "5004b89ebea0b269b185830cb2f7e2f7", "score": "0.6621499", "text": "public function edit($id)\n {\n $this->view->guest = $this->model->edit($id);\n $this->view->render($this->_path . '/edit');\n \n }", "title": "" }, { "docid": "4085123883432653825ea3d6eca4c3ba", "score": "0.66196555", "text": "public function edit(Form $form, Event $event)\n {\n return view('form.edit', compact('event', 'form'));\n }", "title": "" }, { "docid": "8310a47ca16507655295572f382e4e29", "score": "0.6616868", "text": "public function edit($id)\n {\n // first : retrieve flower info and show the form to update flower\n }", "title": "" }, { "docid": "8c2bb4ce9efff69262207822b4887159", "score": "0.66112494", "text": "public function edit($id)\n {\n $template = (object) $this->template;\n $form = $this->form();\n $data = Penduduk::findOrFail($id);\n return view('admin.master.edit',compact('template','form','data'));\n }", "title": "" }, { "docid": "9a57ebf3330d38ff3b1cfbadfc9fc69b", "score": "0.66103256", "text": "function edit() {\n\t\t\n\t\tif ($_POST) {\n\t\t\t$this->entity->update($_POST);\n\t\t\t$this->_relative_redirect('view');\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "12e1c226dd6ae426a8e7bea555851773", "score": "0.6606947", "text": "public function edit($id)\n {\n \t$manufacturer = Manufacturer::findOrFail($id);\n return view('backend.module.manufacturer.edit',['manufacturer' => $manufacturer]);\n }", "title": "" }, { "docid": "c6087fca66897a650dc6e75718832e74", "score": "0.66025347", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->generic_medication->id], 'method' => 'PUT'];\n \n return view(self::$prefixView . 'formm', compact('form_data'))\n \t->with(['generic_medication' => $this->generic_medication]);\n\t}", "title": "" }, { "docid": "a12dc077ea7b8efef6338c64b0b115cb", "score": "0.66000247", "text": "public function edit($id)\n {\n // get the nerd\n $product = Product::find($id);\n\n // show the edit form and pass the nerd\n return View::make('products.edit')\n ->with('product', $product);\n }", "title": "" }, { "docid": "2b5fb043a3c87778cf2cebbc780df3b7", "score": "0.659838", "text": "public function edit()\n\t{\n\t\tparent::edit();\n\t}", "title": "" }, { "docid": "2a47ad7ce79b806f24d1a15c7fc9c440", "score": "0.6596694", "text": "public function edit($id)\n {\n return view('frontend::edit');\n }", "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": "6d657e63dc93b082619d2f7dcb0b720c", "score": "0.65891075", "text": "public function edit($id)\n {\n //mostrar formulario d edicion\n }", "title": "" }, { "docid": "7b2f75aaedf8589b46dde92aafda12f3", "score": "0.6586938", "text": "public function editAction()\n\t{\n\t\t$accountId = $this->_getParam('id');\n\t\t$accountTable = new AccountTable();\n\t\tif ($accountId) $account = $accountTable->find($accountId);\n\t\telse {\n\t\t\t/* Redirect to some error page */\n\t\t}\n\t\t\n\t\t/* Setup view data */\n\t\t$view = $this->getView();\n\t\t\n\t\t$view->title = \"Edit Account\";\n\t\t$view->account = $account;\n\t\t$view->error = NULL;\n\t\t\n\t\t/* And render it */\t\t\n\t\t$this->render('account/AccountEditView.php');\n\t}", "title": "" }, { "docid": "7f6e393f74ad5b78eb86af1fb59ad0f7", "score": "0.65856075", "text": "public function edit($id)\n {\n $data = User::findOrFail($id);\n $template = (object)$this->template;\n $form = $this->form();\n return view('admin.master.edit',compact('template','form','data'));\n }", "title": "" }, { "docid": "2ca5925eff8fd2c9f2e5fb536e2717b3", "score": "0.65842867", "text": "function edit()\n\t{\n\t\tJRequest::setVar( 'edit', true );\n\t\t$model\t=& $this->getModel( 'Item' );\n\t\t$model->checkout();\n\n\t\t$view =& $this->getView( 'Item' );\n\t\t$view->setModel( $model, true );\n\t\t// Set the layout and display\n\t\t$view->setLayout('form');\n\t\t$view->edit();\n\t}", "title": "" }, { "docid": "df89a714812746e77528c831bc256a8a", "score": "0.6574023", "text": "public function edit($id)\n {\n $this->user->offers()->findOrFail($id);\n\n return view('admin.offer.edit_form', [\n 'route_base_url' => 'offer',\n 'model_name' => '\\App\\Models\\Offer',\n 'model_id' => $id,\n ]);\n }", "title": "" }, { "docid": "568ce94a39ba9f1d0b81cd0579729a5f", "score": "0.6571842", "text": "public function edit()\n {\n $view = $this->getView('election', 'html');\n $view->setModel($this->getModel('election'), true);\n //JRequest::setVar('hidemainmenu', 1);\n\n $view->display();\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "ce4fc37201a9083467febf6f580c94ee", "score": "0.6567868", "text": "public function edit($id) {\n $urinalysis = Urinalysis::ConsolidatedId($id)->first();\n $urinalysisRef = UrinalysisRef::all();\n return view('pages.urinalysis.form', [\"urinalysis\" => $urinalysis, 'urinalysisRef' => $urinalysisRef, 'mode' => 'EDIT']);\n }", "title": "" }, { "docid": "df0197e5108b918276674eb05562c1d7", "score": "0.65657616", "text": "public function editAction()\n {\n $page = Pages::findFirst(\n [\n 'conditions' => 'id = :id:',\n 'bind' => ['id' => (int) $this->dispatcher->getParam('id')],\n ]\n );\n if ($page === false) {\n return $this->dispatcher->forward(['action' => 'error404']);\n }\n $this->assets\n ->collection('ace')\n ->addJs('scripts/ace/ace.js');\n $page->content = htmlentities($page->content);\n $this->view->page = $page;\n $this->view->title = $page->title.' – Edit ';\n $editable = new \\stdClass();\n $editable->content = $page->content;\n $editable->id = $page->id;\n $this->view->form = new \\Kolibri\\Forms\\Edit($editable);\n }", "title": "" }, { "docid": "d49dc9860beddbcef1bd1992ac80ce76", "score": "0.656234", "text": "public function action_edit()\r\n\t{\r\n\t\t$item_id = $this->request->param('params');\r\n\r\n\t\t$element = ORM::Factory($this->_resource, $item_id);\r\n\r\n\t\t$form = Formo::form()->orm('load', $element);\r\n\t\t$form->add('update', 'submit', 'Save');\r\n\r\n\t\tif($form->load($_POST)->validate())\r\n\t\t{\r\n\t\t\tif($this->_update_passed($form, $element))\r\n\t\t\t{\r\n\t\t\t\t$element->save();\r\n\t\t\t\t$form->orm('save_rel', $element);\r\n\r\n\t\t\t\t$this->request->redirect(Route::get($this->_route_name)->uri( array('controller' => $this->controller)));\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->_update_error($form, $element);\r\n\t\t}\r\n\r\n\t\t$view = $this->template->content;\r\n\t\t$view->set(\"formo\", $form);\r\n\t}", "title": "" }, { "docid": "469fc3592be913e351b579a5c9fe18dc", "score": "0.65604365", "text": "public function edit()\n {\n $organization = OwnerOrganization::find(0);\n return view('modules.system.OwnerOrganization.form', compact('organization'));\n }", "title": "" }, { "docid": "59702db081c964bfd257f5f4ed31ec07", "score": "0.6559696", "text": "public function edit($id){\n $entry = Entry::find($id);\n $this->authorize('update', $entry); //Access Controll using policies\n return view('entries.edit',compact('entry'));\n }", "title": "" }, { "docid": "3cee07ed8f37cad18680bc48310b6842", "score": "0.6559204", "text": "public function edit()\n {\n return view('tenderpurchaserequest::edit');\n }", "title": "" }, { "docid": "531deb797a3602e8ea456bf473e6c600", "score": "0.6543909", "text": "public function edit($id)\n\t{\n\t\t$record = Record::find($id);\n\n\t\treturn View::make('records.edit', compact('record'));\n\t}", "title": "" }, { "docid": "5c6c8de62974cc03322207e7d02b68d7", "score": "0.6542949", "text": "public function edit($id) {\r\n\t\t$data ['aluno'] = Aluno::findOrFail ( $id );\r\n\t\t$data ['page_title'] = 'Editar aluno';\r\n\t\treturn view ( 'paginas.cadastro.aluno.create-edit' )->with ( $data );\r\n\t}", "title": "" }, { "docid": "0108853fa0d0f8ddd5e30d5bd2f3f67d", "score": "0.6542555", "text": "public function edit($id)\n\t{\n // Get the student\n $student = Student::find($id);\n\n // show the edit form and pass the nerd\n return View::make('students.edit')->with('student', $student);\n\t}", "title": "" }, { "docid": "0b8bea11641b000a8cc94135b0aa739a", "score": "0.6542523", "text": "public function edit($id)\n {\n return view('slo::edit');\n }", "title": "" }, { "docid": "3d60dba5b14a240b364d0e8824386a7e", "score": "0.6542473", "text": "public function edit($id)\n {\n $electric = $this->electricService->findById($id);\n return view('electric.update' ,compact('electric'));\n }", "title": "" }, { "docid": "4530461421ee8156467d6dfae72cde9c", "score": "0.6540356", "text": "public function edit($id)\n {\n static::setInstanceModel($model = $this->model()->findOrFail($id));\n $this->renderForm($model);\n $this->renderButton($model);\n return view(static::$baseView.'.edit');\n }", "title": "" }, { "docid": "5cddc5545db4d8408b496a8b468427fc", "score": "0.6539553", "text": "public function edit($project_id) {\n $project = Project::withTrashed()->where('id', $project_id)->first();\n\n if (empty($project)) {\n return abort(404);\n }\n $form = new AdministrationForm();\n $form->route(Administration::route('projects.store'));\n $form->model($project);\n $form->route(Administration::route('projects.update', $project->id));\n $form->method('PUT');\n $form->form(ProjectForm::class);\n\n\n Breadcrumbs::register('administration', function ($breadcrumbs) {\n $breadcrumbs->parent('base');\n $breadcrumbs->push(trans('projects::admin.module_name'), Administration::route('projects.index'));\n $breadcrumbs->push(trans('administration::admin.edit'));\n });\n\n Administration::setTitle(trans('projects::admin.article') . ' - ' . trans('administration::admin.edit') . ' #' . $project->id);\n\n return $form->generate();\n }", "title": "" } ]
2e640b2819e0e2483ca2c8015eacce77
Show the application dashboard.
[ { "docid": "cea3d646ff26deddfc5d63f01a280a67", "score": "0.0", "text": "public function reserv()\n {\n\n return view('reservations');\n }", "title": "" } ]
[ { "docid": "579b40182c1b4a0368fc80d378534acb", "score": "0.78593004", "text": "public function index(){\n $this->showDashboard(null, null);\n }", "title": "" }, { "docid": "52cd98c9bab69ff225187ee45faa7b10", "score": "0.76352644", "text": "public function dashboard() {\n\t\treturn View::make('admin.dashboard');\n\t}", "title": "" }, { "docid": "447668991908cf8139e91958b1f3de1f", "score": "0.7625139", "text": "public function dashboard()\n\t{\n\t\treturn view('backend.index');\n\t}", "title": "" }, { "docid": "bf47867962e58c674aa0a05a1c840ea4", "score": "0.7577938", "text": "public function dashboard()\n {\n return view('client.dashboard');\n }", "title": "" }, { "docid": "58ff9af5c4774b54148f020966941246", "score": "0.7389247", "text": "public function dashboard()\n {\n return view('kadept.dashboard', ['name' => 'dashboard']);\n }", "title": "" }, { "docid": "0068f61938b30cd7321c84bea2124e26", "score": "0.73809326", "text": "public function dashboard()\n {\n \n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8d576a41bd235530fcf3039d47d39c84", "score": "0.7356564", "text": "public function dashboard()\n\t{\n\t\treturn view('station.dashboard');\n\t}", "title": "" }, { "docid": "1a8925153d4fdf57b36c041ec5d7a890", "score": "0.7350788", "text": "public function dashboard()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "9e126d0d454f62a33c0b21400a586816", "score": "0.73379624", "text": "public function index()\n {\n $menuItems = array(\"blog\", \"event\", \"gear\", \"league\", \"location\", \"sport\", \"store\", \"map\");\n $menuPanel = \"map\";\n $maps = Map::all();\n return View::make(\"admin/dashboard/dashboard\")->withTitle(\"Dashboard\")\n ->withItems($menuItems)\n ->withPanel($menuPanel)\n ->withPanelData($maps);\n }", "title": "" }, { "docid": "b85036e03b8b8e780005b7044e832ab1", "score": "0.7334421", "text": "public function dashboard()\n {\n return View::make('administrator.dashboard');\n }", "title": "" }, { "docid": "a24f34814b0aabc046ad7f264912320f", "score": "0.7311127", "text": "public function dashboard()\n {\n return View::make('dashboard');\n }", "title": "" }, { "docid": "107c3e5593a1195fcc4106ed8558ec31", "score": "0.72920537", "text": "public function get_index()\n\t{\n\t\t$panes = Orchestra\\Widget::make('pane.orchestra')->get();\n\n\t\treturn View::make('orchestra::resources.dashboard', compact('panes'));\n\t}", "title": "" }, { "docid": "29a58a57216b831f1f28d6b55ee68ece", "score": "0.72803825", "text": "public function index()\n {\n $this->global['pageTitle'] = ': Dashboard';\n \n $this->loadViews(\"admin/dashboard\", $this->global, NULL , NULL);\n }", "title": "" }, { "docid": "b971054292945d70e3f4d9ef835b489a", "score": "0.7275892", "text": "public function index()\n {\n\n $pageTitle = \"Dashboard | Haber Silver\";\n\n return view('admin::dashboard.dashboard', [\n 'pageTitle'=>$pageTitle\n ]);\n }", "title": "" }, { "docid": "b91599c3527ce96ed81b1e3890f83bdc", "score": "0.7272359", "text": "public function index()\n {\n return view ('dashboard');\n }", "title": "" }, { "docid": "058e067845d1afcd260e7a263779d8af", "score": "0.72663206", "text": "public function index()\n {\n return view('horizon::app');\n }", "title": "" }, { "docid": "1407e0ee6e323f6c61738080cd865a17", "score": "0.7262396", "text": "public function index() {\n\t\t$data = array(\n\t\t\t\"js\" => array(\n\t\t\t\t// Add any vars to translate to js\n\t\t\t)\n\t\t);\n\t\t$this->tpl->view('app/dashboard', $data, \"app\");\n\t}", "title": "" }, { "docid": "2c2be7b669906f96f445aba1631bd21a", "score": "0.7255785", "text": "public function index()\n\t{\n\t\treturn view('admin.admin_dashboard');\n\t}", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "f9de42067b84008e95b74d3e3c089ce2", "score": "0.7241262", "text": "public function index()\n {\n return view('admin.dashboard');\n \n }", "title": "" }, { "docid": "8aaa108beb5ba3a2631be99142c3db3a", "score": "0.72402406", "text": "public function index()\n {\n $this->global['pageTitle'] = 'FashionFound : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "title": "" }, { "docid": "ed80569e646e32c1205ac4111b06b734", "score": "0.7221619", "text": "public function index()\n {\n $this->adminlayout->addTemplate('dashboard', '');\n $this->adminlayout->render();\n }", "title": "" }, { "docid": "bd2c13402b854f91e7a3c45b2731b220", "score": "0.722015", "text": "public function index()\n {\n return $this->view('admin::dashboard.index');\n }", "title": "" }, { "docid": "47587d93b3041a7ec66a18e0f6a8e289", "score": "0.72112995", "text": "public function index()\n {\n $data['title'] = 'Dashboard';\n $data['active'] = '0';\n $data['merchants'] = Merchant::all();\n $data['androidp'] = Merchant::where('platform', 'Android')->get();\n $data['iosp'] = Merchant::where('platform', 'iOS')->get();\n\n return view('pages.dashboard', $data);\n }", "title": "" }, { "docid": "acce0e078ffc0e32124f5fb80b80e264", "score": "0.7192685", "text": "public function index()\n {\n return view('Core::dashboard.index');\n }", "title": "" }, { "docid": "445ea4f5396e2ed3391531f4198c4f93", "score": "0.7188234", "text": "private function showDashboard()\n {\n //Si es Admin\n if($this->registry->getObject('authenticate')->getUser()->isAdmin())\n {\n $this->registry->getObject('template')->buildFromTemplates(\n $this->registry->getSetting($this->registry->getObject('constants')->getConstant('pages_admin_base')).$this->registry->getObject('constants')->getHeaderTpl(),\n $this->registry->getSetting($this->registry->getObject('constants')->getConstant('pages_admin_base')).$this->registry->getObject('constants')->getDashboardTpl(),\n $this->registry->getSetting($this->registry->getObject('constants')->getConstant('pages_admin_base')).$this->registry->getObject('constants')->getFooterTpl()\n );\n }else\n { //Si es usuario normal\n $this->registry->getObject('template')->buildFromTemplates(\n $this->registry->getObject('constants')->getHeaderTpl(), \n $this->registry->getSetting($this->registry->getObject('constants')->getConstant('pages_logged_base')).$this->registry->getObject('constants')->getDashboardTpl(), \n $this->registry->getObject('constants')->getFooterTpl()\n );\n }\t\n }", "title": "" }, { "docid": "0a8901e6b57244bea919df4e15543635", "score": "0.71839315", "text": "public function dashboard()\n {\n $this->data['title'] = trans('backpack::base.dashboard'); // set the page title\n $this->data['statics'] = $this->dashboardStatics();\n\n return view('backpack::dashboard', $this->data);\n }", "title": "" }, { "docid": "5d0cf09108ebc932b2d33d5b30d7a765", "score": "0.7183862", "text": "public function index()\n\t{\n\t\treturn view('worker.dashboard', [\n\t\t\t'user' => Auth::user(),\n\t\t]);\n\t}", "title": "" }, { "docid": "45cc9c755c1a6ced0fe04bd68c649d03", "score": "0.71749306", "text": "public function index()\r\n {\r\n $this->admin_dashboard();\r\n }", "title": "" }, { "docid": "fb056c0b3b80a9835b08833ffe9aef25", "score": "0.71748364", "text": "public function index()\r\n {\r\n $this->global['pageTitle'] = 'Dashboard';\r\n \r\n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\r\n }", "title": "" }, { "docid": "f019e5a66eef87c54498e60f32b53a36", "score": "0.71592695", "text": "public function index()\n {\n return Inertia::render('back/admin/dashboard', [\n 'customers_by_month' => $this->customersByMonth(),\n 'stats' => $this->stats(),\n ]);\n }", "title": "" }, { "docid": "64bb78526560b5bc987dab9ca6062341", "score": "0.7159069", "text": "public function get_index() {\n\t\treturn View::make( 'gotin::dashboard', array(\n\t\t\t\t'flash'=>$this->flash,\n\t\t\t\t'active'=>'dashboard',\n\t\t\t\t'b_links'=> array()\n\t\t\t) );\n\t}", "title": "" }, { "docid": "be1e90630cb1b42e77d7a253ea988f8c", "score": "0.71577966", "text": "public function index()\n {\n return view('pages.admin.dashboard');\n }", "title": "" }, { "docid": "76435524f47c138fccfe5214a004e091", "score": "0.7157352", "text": "public function dashboard()\n {\n $this->data['title'] = trans('backpack::base.dashboard'); // set the page title\n $this->data['breadcrumbs'] = [\n trans('backpack::crud.admin') => backpack_url('dashboard'),\n trans('backpack::base.dashboard') => false,\n ];\n\n return view('vendor.backpack.base.dashboard', $this->data);\n }", "title": "" }, { "docid": "1b8f9f86743b44bceb85870e8f9674ae", "score": "0.7155779", "text": "public function index() {\n return view('vendor.pages.dashboard');\n }", "title": "" }, { "docid": "5e5194d582d7f393a400a0a06943a2f8", "score": "0.715449", "text": "public function dashboard(){\n return view('backend.dashboard');\n }", "title": "" }, { "docid": "148ae98b8a2cf5d38c8da7898ac2b6b8", "score": "0.7146072", "text": "public function getDashboard()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "5ba175db176292443f99f6c4d6d5f936", "score": "0.7143234", "text": "public function index()\n {\n return view('admin.adminDashboard');\n }", "title": "" }, { "docid": "86ab5b9487d6f029c8e08a79f54b2c50", "score": "0.7125773", "text": "public function render_dashboard_page() {\n M360IVelocityViewController::get_instance()->make_view( 'admin-m360ivelocity-dashboard' );\n }", "title": "" }, { "docid": "1404d09e7a550e23336937cacba228b8", "score": "0.7122523", "text": "public function index()\n {\n return view('admin.dashboard-admin');\n }", "title": "" }, { "docid": "b2b75974886ee4085a4792ed174528da", "score": "0.71222126", "text": "public function admin_dashboard()\n {\n return view('backend.dashboard');\n }", "title": "" }, { "docid": "708d4fe0e21e49ad9ca36f597af234ec", "score": "0.71160483", "text": "public function index()\n {\n return view('admin.dashbroad');\n }", "title": "" }, { "docid": "3d7e9d8a333aa1c8af7ea61a7872ab6e", "score": "0.711174", "text": "public function index()\n\t{\n\t\t$data = array(\n\t\t\t'title' => 'dashboard',\n\t\t\t'id' => 'dashboard'\n\t\t);\n\t\treturn View::make(\"backend.owners.home\", $data);\n\t}", "title": "" }, { "docid": "bef1524f5d345070820868e5f2759306", "score": "0.71116877", "text": "public function dashboard() {\n }", "title": "" }, { "docid": "a92b42e5f0410d626b6f944d3e42100a", "score": "0.71096784", "text": "public function index()\n {\n return view('adminpanel.pages.dashboard.index');\n }", "title": "" }, { "docid": "0201385a6afd39e31e937ab2ecaebd7b", "score": "0.70883113", "text": "public function getDashboard()\n {\n Helpers::setPageTitle('Dashboard');\n\n return View::make('larapress::pages.cp.dashboard');\n }", "title": "" }, { "docid": "65588e690d04d5b49d7eb128f5ed725c", "score": "0.708715", "text": "public function dashboard()\n {\n //\n return view('bkk.dashboard');\n }", "title": "" }, { "docid": "1dade2a382ff2fa92d75fccf360a8bba", "score": "0.70701516", "text": "public function dashboard()\n\t{\n\t\t$this->pages_list_home();\n\t}", "title": "" }, { "docid": "a95512b4255527c6e122f918e5cbfc09", "score": "0.7063409", "text": "public function dashboard()\n {\n return view('account.dashboard');\n }", "title": "" }, { "docid": "5506c65c33237d6dcffc4278cc5acdc3", "score": "0.70624286", "text": "public function index()\n {\n $configuration = Configuration::with('facades', 'colors', 'media')->latest()->paginate(10);\n return view('layouts.admin.dashboard', compact('configuration'));\n }", "title": "" }, { "docid": "6da24aead6710868935ad24d0eb20f17", "score": "0.70542616", "text": "public function getDashboardPage() {\n\t\treturn View::make('account.dashboard', ['pageTitle' => 'Dashboard']);\n\t}", "title": "" }, { "docid": "800388574646c1d681037827249b9a7a", "score": "0.7031459", "text": "public function getDashboard() {\n return view('dashboard');\n }", "title": "" }, { "docid": "f3184d21325e505540a766a278103596", "score": "0.7024267", "text": "public function index()\n {\n return view('auth.dashboard');\n }", "title": "" }, { "docid": "832dbf59abca42d9cbd638a4c8cf68c2", "score": "0.70194215", "text": "public function index()\n {\n return $this->view(\"dashboard.{$this->name}.index\", [camel_case(str_plural($this->name)) => $this->getList()])->with($this->indexParameters());\n }", "title": "" }, { "docid": "6aca39a4e31d950263ad407e844043e7", "score": "0.70155257", "text": "public function index()\n {\n return view('panel.application.index');\n }", "title": "" }, { "docid": "bac1533b5184bacbd2516d1f758fd750", "score": "0.70154643", "text": "public function dashboard()\n {\n return view('brand.index');\n }", "title": "" }, { "docid": "d252c97080f508e9643a205cdb6d6877", "score": "0.70128304", "text": "public function dashboard()\n {\n //\n return view('inventory.index');\n }", "title": "" }, { "docid": "c5c3ac087a66c50795987d0f7a486120", "score": "0.7009946", "text": "public function index()\r\n {\r\n return view('admins.dashboard');\r\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "eb01955bf4137a3564cad6ac8fc85fd0", "score": "0.70078236", "text": "public function dashboard()\n {\n return view('nav.dashboard');\n }", "title": "" }, { "docid": "0f89b67ab1f41a2f649ddf4909f9dff0", "score": "0.7006107", "text": "public function index(){\n\t\t$this->dashboard();\n\t}", "title": "" }, { "docid": "cebf8ae47ce6e7aea7f125109617e49d", "score": "0.7005977", "text": "public function dashboardAction()\n {\n\n\n return $this->render('dashboard/dashboard.html.twig');\n }", "title": "" }, { "docid": "b2996b19e69665c46956af1102f4b5a0", "score": "0.6987892", "text": "public function index() {\n $title = 'Redpaint | Dashboard';\n return View::make('admin.index',compact('title'));\n }", "title": "" }, { "docid": "601e3cefae20bf7a64fb6e988caedeac", "score": "0.69844925", "text": "public function index()\n {\n return view('layouts.dashboard');\n }", "title": "" }, { "docid": "cef2cd67ac20700d627d558bded0918d", "score": "0.6982704", "text": "public function dashboardAction()\n\t{\n\t\treturn $this->render('@Principal/usuarios/dashboard.html.twig');\n\t}", "title": "" }, { "docid": "74a624b39c1aef39092ce80d7701f072", "score": "0.6982562", "text": "public function index()\n {\n return view('dashboard/dashboard');\n }", "title": "" }, { "docid": "d61d8f9b197d6a86f8be02de2ae300a0", "score": "0.69741833", "text": "public function index(){\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "2ec8fd7eb0660caec9e83e7aa1c301a4", "score": "0.69689953", "text": "protected function dashview () {\n \n return view('dashboard');\n }", "title": "" }, { "docid": "f6e5f64bbfb7cb4421a9484c68638201", "score": "0.69621867", "text": "public function index()\n {\n return view('user.dashboard.index');\n }", "title": "" }, { "docid": "2ec416974178fabab986f0815ae01e36", "score": "0.69601697", "text": "public function index()\n {\n return view('user.dashboard');\n }", "title": "" }, { "docid": "3ebc2b4f51f015764f2c12c0fa301b9b", "score": "0.69586027", "text": "public function index()\n {\n\n return view('dashboard');\n }", "title": "" }, { "docid": "9c49243816f470e8c25e4fc140770320", "score": "0.694787", "text": "public function adminDashboard() \n {\n return view('back.home');\n }", "title": "" }, { "docid": "a16ef8effec82ff445ce863514304c82", "score": "0.6944547", "text": "public function index()\n {\n $this->setCaption(trans('mconsole::mconsole.headings.main'));\n $this->setAction(trans('mconsole::mconsole.text.welcome'));\n $quote = app('API')->quotes->getRandom();\n return view('mconsole::dashboard', [\n 'quote' => $quote,\n ]);\n }", "title": "" }, { "docid": "82967d0d6dca1124dca3048ed5478778", "score": "0.6942918", "text": "public function index(){\n # Display experiments without a winner at the top of the dashboard\n $experiments = App::make('split_catalog')->all_active_first();\n\n $metrics = Metric::all();\n\n $current_env = App::make('split_config')->current_environment;\n\n return view('dashboard.index', [\n 'experiments' => $experiments,\n 'metrics' => $metrics,\n 'current_env' => $current_env,\n ]);\n }", "title": "" }, { "docid": "814af9bba9a0739fe4987765ae132564", "score": "0.69422865", "text": "public function index()\n {\n return view('adminPanel::home');\n }", "title": "" }, { "docid": "7c2eb5acf7ec9a1206b531092672a739", "score": "0.6939365", "text": "public function index()\n {\n return Inertia::render('Dashboard/Index');\n }", "title": "" }, { "docid": "2b5593b4af9be225b5166a23d9f3d08e", "score": "0.6937456", "text": "public function index()\n {\n return view('dashboard.index');\n }", "title": "" }, { "docid": "5d678eff5bdd5607bb3e35754dbab239", "score": "0.6936999", "text": "public function dashboard()\n {\n $accountModel=new AccountModel();\n $info=$accountModel->detail(Auth::user()->id);\n $feed=$accountModel->feed(Auth::user()->id);\n $extraInfo=Auth::user()->getExtra(['gender', 'contact', 'school', 'country', 'location'], 100);\n $socialiteInfo=Auth::user()->getSocialiteInfo(100);\n return view(\"account.dashboard\", [\n 'page_title'=>\"DashBoard\",\n 'site_title'=>config(\"app.name\"),\n 'navigation'=>\"DashBoard\",\n 'info'=>$info,\n 'userView'=>false,\n 'settingsView' => false,\n 'feed'=>$feed,\n 'extra_info' => $extraInfo,\n 'extraDict' => UserExtra::$extraDict,\n 'socialite_info' => $socialiteInfo,\n 'socialites' => Socialite::getAvailable(),\n ]);\n }", "title": "" }, { "docid": "8d5e8fbfc8f2b43cc98d9be3728279af", "score": "0.69327134", "text": "public function dashboard()\n\t{\n\t\t// Signed in status check\n\t\t$status = $this->home_model->is_signedin();\n\t\tif ($status==0) {\n\t\t\t// Show sign in form\n\t\t\t$this->load->view('id/signin_form');\n\t\t}\n\t\telse {\n\t\t\t// Show dashboard\n\t\t\t$content = $this->default_system_settings();\n\t\t\t$content[\"member_total\"] = $this->backend_model->data_count();\n\t\t\t$this->load->view('id/admin_header', $content);\n\t\t\t$this->load->view('id/dashboard');\n\t\t\t$this->load->view('id/admin_footer');\n\t\t}\n\t}", "title": "" }, { "docid": "a26227c6baa68fb15958ece43e9a95a9", "score": "0.6927981", "text": "public function index()\n {\n $dashboards = Dashboard::get();\n return view('dashboards.index', compact('dashboards'));\n }", "title": "" }, { "docid": "33bf8f39dc652088b126dffe12c2f70c", "score": "0.69231695", "text": "public function index()\n {\n $this->data['title'] = 'Dashboard';\n return view('admin.index', $this->data);\n }", "title": "" }, { "docid": "b7f86ddd7de57fdd8e90fdf6ee20e9c4", "score": "0.6918792", "text": "function index() {\n Session::checkSession();\n $this->view->metaTitle = \"Dashboard\";\n $this->view->render('panel/header');\n $this->view->render('panel/layout/start');\n $this->view->render('panel/dashboard/content');\n $this->view->render('panel/layout/end');\n $this->view->render('panel/footer');\n }", "title": "" }, { "docid": "88fc08d1d261584d65af5d47e0988f92", "score": "0.69177806", "text": "public function getDashboard() {\n echo 'ssd';die;\n return view('front.dashboard');\n }", "title": "" }, { "docid": "b915ddf8f85166dfbde99111941de769", "score": "0.69086576", "text": "public function index()\n {\n $this->global['pageTitle'] = 'Amey Trading : Registered Clients & Consignees ';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "title": "" }, { "docid": "5c4d915c4526d103408736acf445c20b", "score": "0.68958414", "text": "public function index()\n {\n \treturn view('dashboard/dashboard');\n }", "title": "" }, { "docid": "1f1b3f3199e750bcc5f840510e3170e2", "score": "0.6895117", "text": "public function index()\n {\n return $this->response->view('dashboard', [\n 'speakers' => $this->speakers->getLimitLastUpdated(),\n 'sessions' => $this->repository->getEventByTypeOrderAndLimit('session'),\n 'social' => $this->repository->getEventByTypeOrderAndLimit('social'),\n 'bofs' => $this->repository->getEventByTypeOrderAndLimit('bof'),\n ]);\n }", "title": "" }, { "docid": "adab1fc2abe5c070b86e4290adeee59d", "score": "0.6894978", "text": "public function index()\n {\n return view('dashboard.index', [\n 'title' => trans('dashboard.title'),\n 'latest' => $this->buildTimelineData(),\n ]);\n }", "title": "" }, { "docid": "e80094dd40ebcce0727c178da78951a9", "score": "0.68947", "text": "public function dashboard()\n\t{\n\t\t$this->load->view('admin/dashboard');\n\t}", "title": "" }, { "docid": "59094952a65864845c74fc305a7b0665", "score": "0.6894655", "text": "public function dashboard() {\n\t\t$data['title'] = '';\n\t\t$data['header_allowed'] = TRUE;\n\t\t$data['header_black'] = TRUE;\n $this->load->template('dashboard', 'dashboard', $data);\n }", "title": "" }, { "docid": "09c2e592da626900c53cd03d49f7c84a", "score": "0.6894255", "text": "public function index()\n {\n return view('cms.dashboard');\n }", "title": "" }, { "docid": "1860283ea16fee468599149df4c487d2", "score": "0.6893375", "text": "public function dashboard()\n {\n $today = Carbon::now(getenv('TZ') ?: null);\n $lastEnteredString = 'Never';\n $lastExitedString = 'Never';\n\n $lastEntered = TimestampRepository::lastByUser(Auth::user(), true);\n $lastExited = TimestampRepository::lastByUser(Auth::user(), false);\n\n if ($lastEntered) {\n $lastEnteredString = $lastEntered->carbon->calendar();\n }\n\n if ($lastExited) {\n $lastExitedString = $lastExited->carbon->calendar();\n }\n\n return view('home', compact('today', 'lastEnteredString', 'lastExitedString'));\n }", "title": "" }, { "docid": "6932c82666048ecbb4f449c773d00c69", "score": "0.68915683", "text": "public function index()\n {\n return view('admin::management.appraiser.index');\n }", "title": "" }, { "docid": "b9eb7f4035b176807f36c04001578fc2", "score": "0.6886553", "text": "public function index()\n {\n return view('dashboard.index');\n }", "title": "" } ]
047ac883b618fc23d8b0bc60f587965f
Retorna el animal ganador
[ { "docid": "e91b89eb58ca45013dc6514ad5fa21e8", "score": "0.5008394", "text": "public function animal() {\n return $this->belongsTo('App\\Animal', 'animal_id');\n }", "title": "" } ]
[ { "docid": "000531abb90abc250f0138a4e7a481aa", "score": "0.6627429", "text": "public function getAnimal()\n {\n return $this->animal;\n }", "title": "" }, { "docid": "aba634309c612c9bc50437912b627444", "score": "0.6443384", "text": "public function getAnimal(): Animal\n {\n return $this->animal;\n }", "title": "" }, { "docid": "cb247374d2ef80869030e4015bd42d00", "score": "0.62867814", "text": "public function getNomAnimal()\n {\n return $this->nomAnimal;\n }", "title": "" }, { "docid": "0e2ab7f6e4fcbef3d7c9636c03f76a16", "score": "0.6220834", "text": "public function getDog()\n {\n return $this->dog;\n }", "title": "" }, { "docid": "7f0715a932033855bee9ee38d1ef802b", "score": "0.6087909", "text": "public function rutaImageFly()\n {\n\n // primero vemos a que galeria pertenece\n $galeria = ORM::factory( 'Galeria', $this->galeria );\n\n return( $galeria->rutaImageFly().$this->imagen );\n\n }", "title": "" }, { "docid": "160d168076c1e688c7e13e936cc0a4bc", "score": "0.60738313", "text": "public function getSexeAnimal()\n {\n return $this->sexeAnimal;\n }", "title": "" }, { "docid": "50a702af40837995d17858e67cabddab", "score": "0.60093755", "text": "public function random(): GifData;", "title": "" }, { "docid": "085fcd5a417834eddd7bdd510e73200a", "score": "0.5995968", "text": "public function getPhotoAnimal()\n {\n return $this->photoAnimal;\n }", "title": "" }, { "docid": "6d1efa5d8c9528e304f0ddb0cc1d4990", "score": "0.5927035", "text": "function getIDAnimal($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud->sql(\"select * from pigs_tbl where pig_id='{$id}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['date_born'];\n\n\t}\n\t$crud->disconnect();\n}", "title": "" }, { "docid": "146dd1b3520f4e926f4a98f51dd8879c", "score": "0.5863063", "text": "public function getNaissanceAnimal()\n {\n return $this->naissanceAnimal;\n }", "title": "" }, { "docid": "7902a0e35aeba8049056927e8f29a7a8", "score": "0.5830422", "text": "function obtenerGastromapa($edicion){\n\t\t$concurso = new Concurso();\n\t\t$res = $concurso->recuperar($edicion);\n\t\treturn $res['gastromapa'];\n\t}", "title": "" }, { "docid": "f669d95859595eaeac70cebcb0a7aa35", "score": "0.5818108", "text": "public function getGaid();", "title": "" }, { "docid": "7f08ee1846ca31ab244135cf2728bbdf", "score": "0.5796833", "text": "public function getAnimalID()\n {\n return $this->animalID;\n }", "title": "" }, { "docid": "21b098d747cdeb5a1d20008356d16312", "score": "0.5679956", "text": "public function getIdAnimal()\n {\n return $this->idAnimal;\n }", "title": "" }, { "docid": "c26f7d88672226d44bbad8f7fb4fdff4", "score": "0.5676962", "text": "public function getGaleria() {\n //carga la galeria de la sección \n global $ROOT;\n $seccion = $this->seccion;\n if ($seccion=='') {\n $seccion = \"inicio\";\n }\n \n /* $ficheros = $_SERVER['DOCUMENT_ROOT'] . \"/\" . $ROOT .\"images/hoteles/\" . $this->hotel . \"/\" . $seccion . \"/*.jpg\";\n echo $ficheros;\n $galeria=[];\n foreach (glob($ficheros) as $filename) {\n $galeria[] = $filename; \n }*/\n \n \n $ficheros = $_SERVER['DOCUMENT_ROOT'] . \"/\" . $ROOT .\"images/hoteles/\" . $this->hotel . \"/\" . $seccion . \"/\";\n $galeria=[];\n if (file_exists($ficheros)) {\n $directory = $ficheros;\n chdir($directory);\n $images = glob(\"*.{jpg,JPG,jpeg,JPEG,png,PNG}\", GLOB_BRACE);\n\n foreach($images as $image) {\n\n $galeria[] = $ROOT .\"images/hoteles/\" . $this->hotel . \"/\" . $seccion . \"/\" . $image; \n }\n\n }\n \n return $galeria;\n }", "title": "" }, { "docid": "669686ef8b58a34c4390c85a1c0cfdfe", "score": "0.5531", "text": "public function show(Animal $animal)\n {\n return $animal;\n }", "title": "" }, { "docid": "32934b33d503e7ec1aee11e6e4acb07a", "score": "0.5523962", "text": "public function dogs()\n {\n return $this->all(static::TYPE_DOG);\n }", "title": "" }, { "docid": "80d00109b3c85734201299c7c68bedd3", "score": "0.54770476", "text": "protected function get_gta()\n\t{\n\t\t// hent garasjer\n\t\t$gta = new gta($this->up);\n\t\t$this->gta_garage = $gta->get_bydeler_info();\n\t\t\n\t\t// sett opp antall biler i nåværende bydel\n\t\tif (!isset($this->gta_garage[$this->up->data['up_b_id']]))\n\t\t{\n\t\t\t$this->gta_count = 0;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$this->gta_count = $this->gta_garage[$this->up->data['up_b_id']]['cars'];\n\t}", "title": "" }, { "docid": "e4b756d84da02477ed91cba2f4966b83", "score": "0.5407815", "text": "public function getMilage()\n {\n }", "title": "" }, { "docid": "8edae4d434472890e18d0a4f3c070696", "score": "0.53864694", "text": "function getBreed($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud->sql(\"select * from pigs_tbl where pig_id='{$id}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['breed'];\n\n\t}\n\t$crud->disconnect();\n}", "title": "" }, { "docid": "6a688997930e568af0453a4ec82efef6", "score": "0.53586143", "text": "function RecuperaAnimal($id){\n\t$conteudo = file_get_contents(\"php://input\");\n\t$resposta = array();\n\n\t//Verifica se o conteudo foi recebido\n\tif(empty($conteudo)){\n\t\t$resposta = mensagens(2);\n\t}\n\telse{\n\t\t//Converte o json recebido pra array\n\t\t$dados = json_decode($conteudo,true);\n\t\t\n\t\t//Verifica se as informações esperadas foram recebidas\n\t\tif(!isset($dados[\"Nome\"]) || !isset($dados[\"idUsuario\"])){\n\t\t\t$resposta = mensagens(3);\n\t\t}\n\t\telse{\n\t\t\tinclude(\"conectar.php\");\n\t\t\t$animalCadastrado = false;\n\t\t\t\n\t\t\t//Evita SQL injection\n\t\t\t$Nome = mysqli_real_escape_string($conexao,$dados[\"Nome\"]);\n\t\t\t$idUsuario = mysqli_real_escape_string($conexao,$dados[\"idUsuario\"]);\n\t\t\t\n\t\t\t//Consulta animal + dono no banco\n\t\t\t$query = mysqli_query($conexao,\"SELECT A.idAnimal, A.Nome, A.Genero, A.Cor, A.Porte, A.Idade, A.Caracteristicas, A.QRCode, A.Foto, A.Desaparecido, A.FotoCarteira, A.DataFotoCarteira, A.idUsuario, A.idRaca, R.Nome as 'NomeRaca', R.Descricao as 'DescricaoRaca', U.Nome as 'NomeUsuario', U.Email, U.Telefone, U.Cidade, U.Bairro, E.idEspecie, E.Nome as 'NomeEspecie' FROM Animal as A INNER JOIN Usuario as U on A.idUsuario = U.idUsuario INNER JOIN Raca as R on A.idRaca = R.idRaca INNER JOIN Especie as E on E.idEspecie = R.idEspecie WHERE A.Nome='\" .$Nome .\"' and A.idUsuario=\" .$idUsuario .\"\") or die(mysqli_error($conexao));\n\t\t\t\n\t\t\t\n\t\t\t//Verifica se foi retornado algum registro\n\t\t\twhile($dados = mysqli_fetch_array($query))\n\t\t\t{\n\t\t\t\t$resposta[] = array('idAnimal' => $dados['idAnimal'],\n\t\t\t\t\t\t\t'Nome' => $dados['Nome'],\n\t\t\t\t\t\t\t'Genero' => $dados['Genero'],\n\t\t\t\t\t\t\t'Cor' => $dados['Cor'],\n\t\t\t\t\t\t\t'Porte' => $dados['Porte'],\n\t\t\t\t\t\t\t'Idade' => $dados['Idade'],\n\t\t\t\t\t\t\t'Caracteristicas' => $dados['Caracteristicas'],\n\t\t\t\t\t\t\t'QRCode' => $dados['QRCode'],\n\t\t\t\t\t\t\t'Foto' => $dados['Foto'],\n\t\t\t\t\t\t\t'Desaparecido' => $dados['Desaparecido'],\n\t\t\t\t\t\t\t'FotoCarteira' => $dados['FotoCarteira'],\n\t\t\t\t\t\t\t'DataFotoCarteira' => $dados['DataFotoCarteira'],\n\t\t\t\t\t\t\t'idUsuario' => $dados['idUsuario'],\n\t\t\t\t\t\t\t'idRaca' => $dados['idRaca'],\n\t\t\t\t\t\t\t'NomeRaca' => $dados['NomeRaca'],\n\t\t\t\t\t\t\t'DescricaoRaca' => $dados['DescricaoRaca'],\n\t\t\t\t\t\t\t'NomeUsuario' => $dados['NomeUsuario'],\n\t\t\t\t\t\t\t'Email' => $dados['Email'],\n\t\t\t\t\t\t\t'Telefone' => $dados['Telefone'],\n\t\t\t\t\t\t\t'Cidade' => $dados['Cidade'],\n\t\t\t\t\t\t\t'Bairro' => $dados['Bairro'],\n\t\t\t\t\t\t\t'idEspecie' => $dados['idEspecie'],\n\t\t\t\t\t\t\t'NomeEspecie' => $dados['NomeEspecie']);\n\t\t\t\t\t\t\t\n\t\t\t $animalCadastrado = true;\n\t\t\t break;\n\t\t\t}\n\t\t\t\n\t\t\t//Verifica se o animal foi encontrado\n\t\t\tif(!$animalCadastrado){\n\t\t\t\t$resposta = mensagens(8);\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $resposta;\n}", "title": "" }, { "docid": "502b0fc2145f37d960afc735c8318ff1", "score": "0.53531915", "text": "public function getGangster()\n {\n return $this->hasOne(Gangster::class, ['id' => 'gangster_id']);\n }", "title": "" }, { "docid": "1e2c92b0993faa2edddbe797446ae9ae", "score": "0.5305621", "text": "public function getDescriptionAnimal()\n {\n return $this->descriptionAnimal;\n }", "title": "" }, { "docid": "618b9c8470be9b456ff882f7947b4b76", "score": "0.5298584", "text": "public function animals() {\n $fitting = Cage::fitting();\n $animals = Animal::all();\n return view('shop.animals', compact('animals'), compact('fitting'));\n }", "title": "" }, { "docid": "7e3b591bc6837b97f62a6937ca4f2e48", "score": "0.52979463", "text": "private function getBuildingAnimation(){\n $img = NULL;\n\n $building = $this->getBuilding();\n \n if ($building){\n if (!strcmp(\"factory\", $building)) {\n $image = \"img/smoke2.png\";\n }\n }\n\n return $image;\n }", "title": "" }, { "docid": "ef2a01ac11d3e7b5c4ee797ec6c3694a", "score": "0.5296284", "text": "public function getGenre() {}", "title": "" }, { "docid": "26b77bbb370dc4e51cf6b7597b5b154c", "score": "0.52962655", "text": "public function getGofo()\n {\n return $this->gofo;\n }", "title": "" }, { "docid": "dcf103791d46a1b74d5474972ec3f8af", "score": "0.52935207", "text": "public function animal($type) {\n $animal = Animal::where('type', $type)->first();\n if ($animal) {\n return view('shop.animal', compact('animal'));\n } else {\n return redirect('/shop/animals');\n }\n }", "title": "" }, { "docid": "89398e893f7ab9f5a6200891b727430a", "score": "0.5293272", "text": "public function magias1() {\n $magias = Magia::where('nivel', 'like', '%1%')->get();\n return $magias;\n }", "title": "" }, { "docid": "acc636584ef8aed2de5844bed896c6d6", "score": "0.529197", "text": "public function imagen(){\n $imagenes = $this->imagenes;\n\n if ($imagenes->isNotEmpty()) {\n return $imagenes->sortBy('n_orden')->first()->imagen;\n }\n }", "title": "" }, { "docid": "7aabdbb009a149989f8ef6837f839511", "score": "0.5247454", "text": "public static function getComponentByLocation($animal) {\n $howMany = 1;\n $query = Component::orderBy('order', 'desc')\n ->where('type_id', $animal)\n //->with('creator')\n //->with('type')\n ->take(50)\n ->get();\n\n $component = (new Collection($query))\n ->random($howMany);\n\n return $component;\n }", "title": "" }, { "docid": "76e769b1f9071b3680007318303e15b6", "score": "0.52397776", "text": "private function getGender(){\n $gender_array= array(\"male\",\"female\");\n return $gender_array[rand(0,1)];\n }", "title": "" }, { "docid": "484eb8d4ec65ada6e6422b866555790a", "score": "0.5238862", "text": "private function getLigado()\n {\n return $this->ligado;\n }", "title": "" }, { "docid": "c78f1a5ad0a6add79ab273c590ec2620", "score": "0.52360284", "text": "public function gor()\n {\n return $this->belongsTo(\\App\\Gor::class);\n }", "title": "" }, { "docid": "bf46b176f0e887fa38b7e10fb977c445", "score": "0.522813", "text": "function getOGRole();", "title": "" }, { "docid": "bf46b176f0e887fa38b7e10fb977c445", "score": "0.522813", "text": "function getOGRole();", "title": "" }, { "docid": "bef7364ecc2673e38431e2b210077aad", "score": "0.5225713", "text": "public function isGina(){return $this->gina;}", "title": "" }, { "docid": "9ef64b410cc85afc3b2480c4f21d275a", "score": "0.5217149", "text": "public function alimentar()\n {\n }", "title": "" }, { "docid": "8f89b027a887908a7a869a9c5ba9d950", "score": "0.52167857", "text": "public function getGajis()\n {\n return $this->hasOne(Gaji::className(), ['pegawai_id' => 'id']);\n }", "title": "" }, { "docid": "17ab241514aa0a1c118befd06a9bf609", "score": "0.5212648", "text": "function getHeart_girth($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud->sql(\"select * from pigs_tbl where pig_id='{$id}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['heart_girth'];\n\n\t}\n\t$crud->disconnect();\n}", "title": "" }, { "docid": "36781b7c5951791edc80e31488d3a417", "score": "0.52044004", "text": "public function getGenre(){\n return $this->film['genre'];\n }", "title": "" }, { "docid": "73ecde2cf1c829c1ec78b345f753b54a", "score": "0.5193848", "text": "public function piocherCarte(){\n $carte = new Carte();\n $nr = rand(0,4);\n switch ($nr) {\n case 0 : \n $carte->setType(Carte::BAVE_CRAPAUD);\n break;\n case 1 :\n $carte->setType(Carte::AILE_CHAUVE_SOURIS);\n break;\n case 2 :\n $carte->setType(Carte::MANDRAGORE);\n break;\n case 3 :\n $carte->setType(Carte::LAPIS_LAZULI);\n break;\n case 4 :\n $carte->setType(Carte::CORNE_LICORNE);\n break;\n }\n return $carte;\n }", "title": "" }, { "docid": "3516e2933bbebe5be0ab8bd18cd1a09a", "score": "0.5191523", "text": "public function dog($id)\n {\n return $this->get($id, static::TYPE_DOG);\n }", "title": "" }, { "docid": "2e9a4f4ef3a3bc743d7dc30f36b5d395", "score": "0.51823", "text": "public function getBobotNilai();", "title": "" }, { "docid": "822bf784f69f606018fee1a859385789", "score": "0.5161279", "text": "public function getMedicaments(){\n\t\t$req = \"select * from medicament order by MED_NOMCOMMERCIAL\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\t$ligne = $rs->fetchAll();\n\t\treturn $ligne;\n\t}", "title": "" }, { "docid": "5954b725bd291d48517609b1208305d8", "score": "0.5153288", "text": "function getGenre($genreno) {\n if ($this->debug) print($this->debugbeg . \"getgenre($genreno)<HR>\\n\");\n\n $genres = $this->genres();\n if (isset($genres[$genreno])) {\n $genre = $genres[$genreno];\n if ($this->debug) print($genre . \"\\n\");\n } else {\n $genre = '';\n }\n\n if ($this->debug) print($this->debugend);\n return $genre;\n }", "title": "" }, { "docid": "8231a2a01d80f4450dff4e418f793f46", "score": "0.514424", "text": "public function getGenres()\n {\n $sql = \"select G.GEN_ID as id, GEN_NOM as nom, count(ALB_ID) AS nbAlbums \" .\n \"from T_GENRE G left join T_ALBUM A on G.GEN_ID=A.GEN_ID group by G.GEN_ID order by GEN_NOM\";\n return $this->executerRequete($sql);\n }", "title": "" }, { "docid": "36f4a1a110fd80674461a26bf47fe6b7", "score": "0.5140287", "text": "function getAdjective() {\n\t\n\t\taddToDebugLog(\"getAdjective(), Function Entry - No parameters, INFO\");\n\t\n\t\t// Determine the consonant to use for the name\n\t\t$consonants = array(\"b\", \"c\", \"d\", \"f\", \"g\", \"h\", \"j\", \"k\", \"l\", \"m\", \"n\", \"p\", \"q\", \"r\", \"s\", \"t\", \"v\", \"w\", \"y\", \"z\");\n\t\t$consonant = $consonants[rand(0, 20)];\n\t\n\t\t// Choose the title based on the consonant\n\t\t$filepath = \"lists/adjectives/\" . $consonant . \".txt\";\n\t\t$titles = file($filepath); // reads contents of select file into the array\n\t\t$titles_length = count($titles);\n\t\t$title = \"\";\n\t\twhile ($title == \"\") {\n\t\t\tsrand(make_seed());\n\t\t\t$title = $titles[rand(0, $titles_length)];\n\t\t}\n\t\n\t\taddToDebugLog(\"getAdjective(), Adjective: \" . $title . \", INFO\");\n\t\n\t\treturn $title;\n\t\n\t}", "title": "" }, { "docid": "2a51e664c76bb3c27113f1106dd08390", "score": "0.513915", "text": "public function show(cuidador_animal $cuidador_animal)\n {\n //\n }", "title": "" }, { "docid": "cbca0b28d4e4c886e284fd5bd1cd676f", "score": "0.51385933", "text": "public function getDogs(Request $request)\n {\n $uri = $request->path();\n $menuItem = Menu::where('route', $uri)->first();\n $category = Category::where('menu_id', $menuItem->id)->first();\n return View::make('pages/animals')->with('category', $category);\n // ->with('orientation', 'right');\n }", "title": "" }, { "docid": "4fa7bffeb49509a4ff16b26253cf5a1a", "score": "0.5134088", "text": "function make_them_sing(Singable $singing_animals) {\n\t$singing_animal->sing();\n}", "title": "" }, { "docid": "bd107683809e107885dc5746f2bfc563", "score": "0.5119965", "text": "function getGroup() ;", "title": "" }, { "docid": "cea7c2ffa7b06d7a96623015f6677f34", "score": "0.50901645", "text": "public function getHouse();", "title": "" }, { "docid": "8a4f54b246bfa0457dfcba943f8c15bd", "score": "0.5085424", "text": "public static function getDirector()\n {\n $director = file_get_contents('http://sws.itvillahermosa.edu.mx/ws/jefes?nivel=1');\n $director = json_decode($director, true);\n $director = array_values($director[0]);\n\n #Se pasa a mayúscula\n $director[0]= mb_strtoupper($director[0]);\n $director[1]= mb_strtoupper($director[1]);\n $director[2]= mb_strtoupper($director[2]);\n $director[]= SWS_API::buscarID($director[1]);\n $director[]= 'DIRECTOR(A)';\n\n return $director;\n }", "title": "" }, { "docid": "44e14b6558b2266a62b85c26a34b987c", "score": "0.50818574", "text": "public function awal(){\n // return $data = dosen::where('pengguna_id', 12)->with('pengguna')->get(); \n // //relasi dari pengguna ke dosen\n // return $data = pengguna::where('id', 12)->with('dosen')->get();\n return \"halo\";\n }", "title": "" }, { "docid": "b62657dbd51a64f6a192b3d578587737", "score": "0.5071176", "text": "public function getGrapes(){\r\n //executea query to get all grapes\r\n $sqlQuery = \"SELECT * FROM grapetype\";\r\n\r\n $statement = $this->connection->prepare($sqlQuery);\r\n $status = $statement->execute();\r\n\r\n if (!$status){\r\n die(\"Could Not Retrieve Grapes\");\r\n }\r\n\r\n return $statement;\r\n }", "title": "" }, { "docid": "19a6c5ec01e5c1fe372eb186686e6110", "score": "0.50691205", "text": "function galerien_data($bgalg_id = 0)\n\t{\n\t\t$sql = sprintf(\"SELECT * FROM %s\n\t\t\t\t\t\tWHERE bgalg_id='%d'\",\n\t\t\t$this->db_praefix.\"ecard_galerien\",\n\t\t\t$bgalg_id\n\t\t);\n\t\t$temp_return = $this->db->get_row($sql, ARRAY_A);\n\t\treturn $temp_return;\n\t}", "title": "" }, { "docid": "be3f1c9e529e592dfade6bc6dd2de720", "score": "0.50546896", "text": "function getDrugs()\n {\n $request = \"SELECT * FROM DRUG\";\n DBConnexion::getInstance()->prepareAndExecuterQuerySelect($request, null);\n $response = DBConnexion::getInstance()->getResult();\n $drugs = new Drugs();\n foreach ($response as $resp) {\n $drug = new Drug(\n $resp['id'],\n $resp['title'],\n $resp['sub_name'],\n $resp['bar_code'],\n $resp['flash_code'],\n $resp['notice']\n );\n $drugs->addDrug($drug->toJson());\n }\n\n DBConnexion::getInstance()->destroyQueryResults();\n return $drugs->getDrugsToJson();\n }", "title": "" }, { "docid": "a949995a7c7b4c62fda7f4cae990e86f", "score": "0.505342", "text": "function getAcademy(){\r\n return $this->academy;\r\n }", "title": "" }, { "docid": "57dc96b1219fc50556326405bbc51115", "score": "0.50480807", "text": "function makeThemSing(Singable $singingAnimal){\n $singingAnimal->sing();\n }", "title": "" }, { "docid": "7a1d40678a119ff04144ef53aca8319f", "score": "0.50422", "text": "public function selectGoat($choice)\n {\n $remaining = array_diff_key($this->doors,array($choice => ''));\n $goats = array_keys($remaining,'goat');\n //in the event the user chooses the car, we'll just return one goat\n return $goats[array_rand($goats)];\n }", "title": "" }, { "docid": "1ce6a33e4733aee79c2a36bcdae27aa7", "score": "0.50419736", "text": "public function image()//minuscula modeloforaneo\n {\n return $this->morphOne('App\\Image','imageable'); //1er parametro:direccion modeloforaneo, 2do parametro: modeloforaneo+'able'\n }", "title": "" }, { "docid": "2438dbbb5785db7c0892a281343caf40", "score": "0.5039002", "text": "function getImagen(){\n\t\t\treturn $this->imagen;\n\t\t}", "title": "" }, { "docid": "cae9270fce542460ba8d551d1d6f4bcb", "score": "0.5034367", "text": "public function getGenres()\n {\n $genres = Genre::orderBy('name','ASC')->get();\n\n return view('genres')->with('genres',$genres);\n }", "title": "" }, { "docid": "2cab034c94bb770edd06413511955de4", "score": "0.5029512", "text": "function getOGActor();", "title": "" }, { "docid": "2cab034c94bb770edd06413511955de4", "score": "0.5029512", "text": "function getOGActor();", "title": "" }, { "docid": "58418baf58663baa825671e79dd9c2c1", "score": "0.5028071", "text": "function get_alumni() {\n //$this -> db -> from('gallery');\n //$this -> db -> where('did = ' . \"'\" . $gid . \"'\");\n $query = $this->db->get('alumni');\n return $query->result();\n }", "title": "" }, { "docid": "655ee3c84f47f285070033f7f4b67285", "score": "0.5023098", "text": "public function getRandomOne()\n {\n $allType = $this->horoscopeDictionnary->getAllType();\n $randomKeyType = rand(0, 11);\n $frenchType = $this->horoscopeDictionnary->getTypeEnglishToFrench($allType[$randomKeyType]);\n\n return $this->getByKey($frenchType);\n }", "title": "" }, { "docid": "8489bee5def176db263483cfa1bd4996", "score": "0.50227696", "text": "public function canineBreed()\n {\n $breed = array_rand($this->lists['breeds']);\n\n return $this->lists['breeds'][$breed];\n }", "title": "" }, { "docid": "8449a211ce7c33333905bfdb7599ca20", "score": "0.5016231", "text": "public function animalRegistrationRegistrator() {\n $registration = $this->animalRegistration();\n\n if (!isset($registration)) {\n return null;\n }\n\n return $registration->registrator->name;\n }", "title": "" }, { "docid": "0030ec2844f169d26f9c7262274c9f82", "score": "0.50153655", "text": "public function getGuardianAttribute()\n {\n return $this->families()->where('type', 'guardian')->first();\n }", "title": "" }, { "docid": "31dacf2d6eb2632682ba55fa543e9559", "score": "0.50148135", "text": "public function getUnidadMedida() {\n $o_DMantenimientoGeneral = new DMantenimientoGeneral();\n $resultado = $o_DMantenimientoGeneral->getUnidadMedida();\n foreach ($resultado as $key => $value) {\n array_push($resultado[$key], \"../../../../fastmedical_front/imagen/icono/editar.png ^ Editar\");\n array_push($resultado[$key], \"../../../../fastmedical_front/imagen/icono/i_nomailappt.png ^ Eliminar\");\n }\n return $resultado;\n }", "title": "" }, { "docid": "46f66c296a341e2b3d8e8c45dec542e8", "score": "0.501313", "text": "public function get_all_godzina_better(){\n\t\t$data=array();\n\t\t$query = $this->db->query('select * from godzina');\t\n\t\tforeach($query->result() as $row){\n\t\t\t\tarray_push($data,array(\n\t\t\t\t'id_godzina'=>$row->id_godzina,\n\t\t\t\t'godzina'=>substr($row->godzina,0,5)\n\t\t\t\t));\n\t\t\t\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "de575be8a5a36474f1ec1b4e5698962d", "score": "0.500708", "text": "public static function getMemberDogs($member) {\n\tglobal $db,$SDS;\n\treturn $db->fetchObjects(\"\n\t\tSELECT * FROM sds.dogs\n\t\tWHERE member = $member\n\t\tORDER BY callname ASC\n\t\t\",\"Dogs\");\n\t}", "title": "" }, { "docid": "326b6ebc54ab07c575045fc4f98006bf", "score": "0.50037384", "text": "public function magias4() {\n $magias = Magia::where('nivel', 'like', '%4%')->get();\n return $magias;\n }", "title": "" }, { "docid": "72955e5274ff38b2bdb9f7c6f603b4af", "score": "0.49783316", "text": "public function magias2() {\n $magias = Magia::where('nivel', 'like', '%2%')->get();\n return $magias;\n }", "title": "" }, { "docid": "721c4a9831457c7e6323a0b070bfd8db", "score": "0.49759793", "text": "protected function _buddy_gender_guess() {\n return 'LOOKUP';\n}", "title": "" }, { "docid": "d47222e374e7bcda27a4c5097eb84bec", "score": "0.49719247", "text": "function getPG()\n {\n $query = $this->db->query('SELECT `poin_gejala` FROM `tmp_hasil`\n `tb_gejala` as where `kd_gejala` = `kd_gejala`.`poin_gejala`= `0` ');\n return $query->result();\n }", "title": "" }, { "docid": "c010398fc7fb399c6cbbd14d2de1519e", "score": "0.49586135", "text": "protected function groeperingen()\n\t{\n\t\t$query = $this->connection->table('handelaars_groepering');\n\t\t$groeperingen = $query->where('handelaarid', $this->handelaarid)\n\t\t\t->get(array('groeperingid'));\n\t\t$this->groeperingen = array_map(function($item)\n\t\t{\n\t\t\treturn $item->groeperingid;\n\t\t}, $groeperingen);\n\t}", "title": "" }, { "docid": "49820b70ed78d1591013e4701cd2b646", "score": "0.4956345", "text": "public function getGallery()\n {\n return $this->gallery;\n }", "title": "" }, { "docid": "d92927633516fdd5ece748f8ec25429e", "score": "0.49521682", "text": "public function setAnimal($animal)\n {\n $this->animal = $animal;\n\n return $this;\n }", "title": "" }, { "docid": "c1985ad4a257533468a546cc7599300e", "score": "0.49472505", "text": "public function getSpecies();", "title": "" }, { "docid": "f85e480a1009531515657e9a7d609504", "score": "0.49375817", "text": "public function genius(){\n $aNames = array('name-1', 'name-2', 'name-3');\n\n // Pick random index number from array aNames\n $iKey = array_rand($aNames);\n\n // Return the name using the random index\n return $aNames[$iKey];\n\n }", "title": "" }, { "docid": "cb2a1f3e4ed72f68839b68d8904dd4ff", "score": "0.493274", "text": "public function getRnd($gen) {\n if(empty($gen) || $gen == \"any\") {\n $condition = \"\";\n } else {\n $condition = \" WHERE genres like '%\" . $gen . \"%'\";\n }\n $query = \"SELECT * FROM movies \".$condition.\" ORDER BY RAND() LIMIT 24\";\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n $result = $stmt->fetchAll(PDO::FETCH_CLASS);\n if($result) {\n return json_response(200, \"Et Voilà !\", $result);\n } else {\n return json_response(404, \"Ups, couldn't find anything\");\n }\n }", "title": "" }, { "docid": "634e7dcc0bf806af82348beaa6ba90d6", "score": "0.49102372", "text": "function getSingleFeedlotAnimals(){\n\n // $query = \"SELECT tag_id FROM movement WHERE lot_id = :lot_id\";\n $query = \"SELECT m.tag_id AS tag_id, max(m.GMT_Added) AS time, a.dob as dob FROM movement m JOIN animal a on m.tag_id = a.tag_id where lot_id = :lot_id AND current = 1 group by m.tag_id\";\n // $query = \"SELECT m.tag_id AS tag_id, max(m.GMT_Added) AS time, a.dob as dob FROM movement m where lot_id = :lot_id AND current = 1 group by m.tag_id\";\n\n $stmt = $this->conn->prepare($query); // prepare query statement\n\n $varible = $this->feedlot_id;\n $stmt->bindParam(\":lot_id\", $varible, PDO::PARAM_STR); // bind tag_id of product to be updated\n\n $stmt->execute(); // execute query\n\n return $stmt->fetchAll(PDO::FETCH_ASSOC); // Return all values\n\n // $row = $stmt->fetch(PDO::FETCH_ASSOC); // get retrieved row\n //\n // // set values to object properties\n // $this->tag_id = $row['tag_id'];\n // $this->feedlot_name = $row['name_feedlot'];\n }", "title": "" }, { "docid": "2b09151ec3821d51c02b5142a40266e4", "score": "0.49075273", "text": "function recuperarGanadores(){\n\t\t$votopro = new VotaProfesional();\n\t\t$res = $votopro->recuperarGanadores();\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "3446d20b77673a1334b9a9a7dcb7c6f0", "score": "0.49018705", "text": "public function genre()\n\t{\n\t\treturn $this->CLI->stringQuery($this->SqueezePlyrID.\" genre ?\");\n\t}", "title": "" }, { "docid": "52def95ad92fe0b392e606845b8e60c3", "score": "0.4894638", "text": "private function getGoal() {\r\n $goalid = is_numeric($this->goal) ? $this->goal : 0;\r\n return self::getGoals($goalid);\r\n }", "title": "" }, { "docid": "4657108ec20392092ae58b98b361e6f0", "score": "0.48858282", "text": "public static function main() {\n\t\t$page = file_get_html('http://photography.nationalgeographic.com/photography/photo-of-the-day/nature-weather/');\n\t\t$link = $page->find('#search_results', 0)->find('a', 0)->href;\n\n\t\t$page = file_get_html('http://photography.nationalgeographic.com'.$link);\n\t\t$img = $page->find('meta[property=og:image]', 0)->content;\n\t\treturn $img;\n\t}", "title": "" }, { "docid": "feeb5894d185435bbdd520fe381052e4", "score": "0.48835295", "text": "function obtenirIdNomGroupesAHeberger ($connexion) {\r\n\r\n $req = \"SELECT id, nom FROM Groupe WHERE hebergement='O' ORDER BY id\";\r\n $stmt = $connexion -> prepare ($req);\r\n $stmt -> execute ();\r\n return $stmt;\r\n\r\n }", "title": "" }, { "docid": "06acd0bfcb5ef7248469a6cd9dcc2fc9", "score": "0.48772457", "text": "public function get_game_one_image () {\n\t\treturn get_field('field_5b476fbb1dd99', $this->get_id());\n\t}", "title": "" }, { "docid": "7e582caf4d126c5ec48a71c86a37dca9", "score": "0.48744392", "text": "public function getDamage();", "title": "" }, { "docid": "329a89c66eb2b563b0a7cb20384e898d", "score": "0.4874437", "text": "public function getTypeGardePetSitter()\n {\n return $this->typeGardePetSitter;\n }", "title": "" }, { "docid": "697a1a2ee8f8a28c584ad4b02c9f5528", "score": "0.4870951", "text": "public function asesmen_gigi() \n {\n return view('rj_asesmen_gigi');\n }", "title": "" }, { "docid": "7ed75f1ba1cda28697225b169637cc86", "score": "0.48704305", "text": "function ermittle_Liganamen($liganr)\n{\n $liganame = 'unbekannt';\n //\n $single_land = Land::where('LandNr', '=', $liganr)\n ->first();\n //\n if ($single_land) {\n $liganame = $single_land->LandName;\n }\n //\n return $liganame;\n}", "title": "" }, { "docid": "470c94ce4442e70dbc529495630b4d61", "score": "0.4864524", "text": "public function getGallery()\n {\n return $this->morphMany(Media::class, 'mediable', ['type' => Media::TYPE_GALLERY], 'mediable', 'media_id');\n }", "title": "" }, { "docid": "d0ace9f64b6f8516a34712a986fb348d", "score": "0.48627886", "text": "public function getChapeau();", "title": "" }, { "docid": "1cb828b6c943f1331ba60e9010199672", "score": "0.486264", "text": "public function animal()\n {\n return $this->belongsTo('App\\Animal');\n }", "title": "" }, { "docid": "83aa9ddd86418c8ee4cdfed75d79ba0d", "score": "0.48571384", "text": "function getGreet($gen){\n switch($gen){\n case 'male': return \"Sir\"; break;\n case 'female': return \"Ma'am\"; break;\n }\n }", "title": "" }, { "docid": "ce36446c76f7ce881fe4612eee17bf70", "score": "0.48566344", "text": "function getAtkImag($atk) {\n $atkimgpath = 'img/atkimg/' . $atk . '.jpg';\n if (file_exists($atkimgpath)) {\n $atkimg = $atkimgpath;\n } else {\n $atkimg = 'img/atkimg/def.jpg';\n }\n return $atkimg;\n}", "title": "" } ]
724659bbfd66b9a81ae5b1d95e335f02
Calculates the number of cents an employee will get for a trip
[ { "docid": "b9313f6c654b10b32b0adc5e653c6335", "score": "0.0", "text": "public function getExpenses(\\DateTimeImmutable $start, \\DateTimeImmutable $end): int\n {\n // Warning - finanzamt might disagree.\n return $end->getTimestamp() - $start->getTimestamp();\n }", "title": "" } ]
[ { "docid": "82190bed507e7acdf9848c2c95b0f872", "score": "0.6809465", "text": "public function getTotalInCents(): int\n {\n $total = $this->price->getTotalCents();\n //@TODO make sure rounding rules are followed correctly - consult/find person that knows applicable rules\n $vat = round($total * $this->getVatRate());\n\n return $total + $vat;\n }", "title": "" }, { "docid": "9b2b5f0dd24d0abc820014b7be55e64a", "score": "0.67976624", "text": "public function totalInCents(): int\n {\n return $this->total() * 100;\n }", "title": "" }, { "docid": "df6c271a82c4ac26d91de1821d591e35", "score": "0.65991706", "text": "public function calculateTrip()\n {\n $this->calculator = new Calculator($this->geoService, $this->trip, $this->vehicle, $this->driver);\n $this->calculator->generate();\n\n return $this->calculator->calculateCost();\n }", "title": "" }, { "docid": "7d300dd267a0c07613c7b1bcd14e33bc", "score": "0.65593016", "text": "public function calculatePrice(): int\n {\n return $this->shippingCosts+$this->productPrice;\n }", "title": "" }, { "docid": "59c8e7aaca2edd051d56bf725712c08d", "score": "0.6439442", "text": "public function getVatInCents(): int\n {\n //@TODO make sure rounding rules are followed correctly - consult/find person that knows applicable rules\n return round($this->price->getTotalCents() * $this->getVatRate());\n }", "title": "" }, { "docid": "441182bab9ea0e0f28a61fbbff119088", "score": "0.6428172", "text": "public function calculatePrice(): int\n {\n return $this->productPrice + $this->shippingCosts;\n }", "title": "" }, { "docid": "3284988296be4fdf89038d828638e101", "score": "0.6401913", "text": "public function calcCost() {\r\n if ($this->time == \"all\") {\r\n $this->cost = $this->salary; \r\n } else {\r\n $this->cost = ( (int) $this->time ) * $this->salary; \r\n } \r\n return $this->cost;\r\n }", "title": "" }, { "docid": "12e415cd75610143126eed8be11cc56f", "score": "0.63574815", "text": "function calculate_trip_cost($miles, $mpg, $ppg){\n\t// get the number of gallons\n\t$gallons = $miles/$mpg;\n\t// get the cost of those gallons\n\t$dollars = $gallons * $ppg;\n\t// return the formatted cost\n\treturn number_format($dollars, 2);\n}", "title": "" }, { "docid": "1de01784dc0fdbdbe0f3d620ac58a445", "score": "0.6352464", "text": "public function subtotalInCents()\n {\n return $this->sum('subtotal_in_cents') - static::$discount;\n }", "title": "" }, { "docid": "3e61124c0b7afca4b8d6c751428a9683", "score": "0.6280737", "text": "public function calcTotal() {\r\n return $this->totalCost;\r\n }", "title": "" }, { "docid": "0d9fc3aea65152fe4d70af2dd80a05ec", "score": "0.6227589", "text": "public function getCost() {\r\n\t\t$total = 0;\r\n\t\tforeach ($this->items as $item):\r\n\t\t\t$total += $item->getCost();\r\n\t\tendforeach;\r\n\t\treturn $total;\r\n\t}", "title": "" }, { "docid": "ba1abcf45938c8ed130902f7c82cff83", "score": "0.61839044", "text": "public function getTotalPrice()\n {\n $totalPrice = 0;\n\n // if there is an education on the course,\n if ($this->education) {\n $totalPrice = (int)$this->education->price;\n } else {\n\n /** @var Course $course */\n foreach ($this->courses as $course) {\n $totalPrice += (int)$course->price;\n }\n }\n\n // now using 1 seat, if the number of selected seats are 0 (or less)\n return $totalPrice * ($this->seats <= 0 ? 1 : $this->seats);\n }", "title": "" }, { "docid": "2deeca940b9e10c3a5bdcbe805a7a739", "score": "0.61536545", "text": "public function getTotal()\n\t{\n\t\t$this->total = $this->calculateHotel();\n\n\t\t// Calculate the golf cost\n\t\t$this->total += $this->calculateGolf();\n\n\t\t// Add in the package percentage\n\t\t$this->total *= (1 + $this->quote->percent_package);\n\n\t\treturn (float) ceil($this->total);\n\t}", "title": "" }, { "docid": "7a5f17972b6853adea04749c17d9d115", "score": "0.6117259", "text": "function solve($meal_cost, $tip_percent, $tax_percent) {\n$tip_percent = $meal_cost * 0.2;\n$tax_percent = $meal_cost * 0.08;\n$totalcost = floor($meal_cost + $tip_percent + $tax_percent);\necho $totalcost;\n}", "title": "" }, { "docid": "145080a1b7f2862ff131daeb739c3bc9", "score": "0.6109618", "text": "public function getPriceInCent(): int\n {\n return $this->price;\n }", "title": "" }, { "docid": "2ed3a8d6a46a44b306b939825bdd47a5", "score": "0.6085392", "text": "public function totalcost() {\n return $this->resourcescost() + $this->machinescost() + $this->othercost();\n }", "title": "" }, { "docid": "95342f774d1c7f4048ea72ea12c0c5b5", "score": "0.6084489", "text": "public function getTotalPrice(){\n $orders = $this->data->orders;\n $total_price=0;\n for ($i = 0; $i < sizeof($orders); $i++) {\n $total_price = $total_price+$orders[$i]->final_price;\n $total_price = round($total_price,2);\n }\n\n return $total_price;\n }", "title": "" }, { "docid": "4f7afd6d3f37d942f6739d42cca9a23a", "score": "0.6072826", "text": "public function getTotalCost(){\n\t\t$cost = 0;\n\t\t\tforeach($this->items as $item => $amount)\n\t\t\t{\n\t\t\t\t$product = Product::getProductById($item);\n\t\t\t\t$cost += $product->getPrice()*$amount;\n\t\t\t}\n\t\treturn $cost;\n\t}", "title": "" }, { "docid": "ae2fb70cdb0257f37e25313d00509563", "score": "0.60533947", "text": "public static function getTotalPrice() {\n $price = 0;\n foreach (static::getCard() as $order) {\n $price += ($order['price'] * $order['amount']);\n }\n return $price;\n }", "title": "" }, { "docid": "cb9dfa3e262c0396d8b716fc71fbee29", "score": "0.6049478", "text": "public function getTotalCost()\n {\n return $this->total_cost;\n }", "title": "" }, { "docid": "fd1d3b507b8826fe38a2e36d821cada4", "score": "0.6043792", "text": "public function totalAmountOfSpendings()\n {\n \t$spendingsAmount = 0;\n \tforeach ($this->fortnights as $fortnight) {\n \t\t$spendingsAmount += $fortnight->getTotalAmountOfSpendings();\n \t}\n\n \treturn $spendingsAmount;\n }", "title": "" }, { "docid": "3bdab525b5ab3fecbc0cad153e4b54ca", "score": "0.60193723", "text": "public function totalAmountOfEntries()\n {\n \t$entriesAmount = 0;\n \tforeach ($this->fortnights as $fortnight) {\n \t\t$entriesAmount += $fortnight->getTotalAmountOfEntries();\n \t}\n\n \treturn $entriesAmount;\n }", "title": "" }, { "docid": "9c3029ce6c6c3f9bd12265d968ad4265", "score": "0.59896225", "text": "public function getTotalTripFareAttribute()\n {\n return number_format(($this->attributes['total_fare']-$this->attributes['access_fee']),2, '.', ''); \n }", "title": "" }, { "docid": "4e62f9f7b4d8507c8ae715a8fe980466", "score": "0.5987362", "text": "public function get_total_amount(){\n\n \nreturn $this->principal_amount+((($this->interest_rate/100)*$this->principal_amount)*$this->time_period);\n\n\n\n}", "title": "" }, { "docid": "3646aa3950ce5c78314b2b03bc67aad2", "score": "0.59810483", "text": "public function get_total_cost()\n\t{\n\t\t$num = '0.00';\n\t\tif (isset($_SESSION['cart']))\n\t\t{\n\t\t\t// se há items para mostrar\n\t\t\t\n\t\t\t// busca os id's dos produtos\n\t\t\t$ids = $this->get_ids();\n\t\t\t\n\t\t\t// busca os preços dos produtos\n\t\t\tglobal $Products;\n\t\t\t$prices = $Products->get_prices($ids);\n\t\t\t\n\t\t\t// faz o loop, adicionando o custo de cada item * o nº de item no carrinho ao $num cada vez que faz o loop\n\t\t\tif ($prices != NULL)\n\t\t\t{\n\t\t\t\tforeach($prices as $price)\n\t\t\t\t{\n\t\t\t\t\t$num += doubleval($price['price'] * $_SESSION['cart'][$price['id']]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $num;\n\t}", "title": "" }, { "docid": "d89e152a4d2707fa43beb9efb827eae4", "score": "0.5968185", "text": "public function calculateTotalRentalIncome() {\r\n $this->totalRentalIncome = $this->employee +\r\n $this->incomePensionCompensation +\r\n $this->fee +\r\n $this->interestFinancialIncome +\r\n $this-> dividendsShares +\r\n $this->otherIncome +\r\n $this->abroad;\r\n }", "title": "" }, { "docid": "dbc49acc091e6de46574a91dce68e731", "score": "0.5953337", "text": "public function calculateEmployee() {\r\n $this->employee = $this->wages +\r\n $this->severance +\r\n $this->otherEarnings +\r\n $this->provisionServices;\r\n }", "title": "" }, { "docid": "d9692b1a91af87f1c94aa9a0875cd97f", "score": "0.5926879", "text": "public function getTotalCost(): Amount\n {\n return $this->getTotalUnitCost()->add($this->getTotalVatCost());\n }", "title": "" }, { "docid": "08e2f3da6563ce83a8b29bc7e2f146d0", "score": "0.59129304", "text": "public function calculate()\n {\n if (null === $this->defaultVacationDaysCount) {\n $this->init();\n }\n\n $employee = $this->getEmployee();\n\n $vacationDays = $employee->getSpecialDays() ?: $this->defaultVacationDaysCount + $this->getExtraVacationDays();\n $workInterval = $this->getWorkInterval();\n\n if ($workInterval->y < 1) {\n $vacationDays = $this->getVacationDaysCountForNewBie( $workInterval, $vacationDays);;\n }\n\n return $vacationDays;\n }", "title": "" }, { "docid": "a7d2f00ea1d0d63c89c245510af724a7", "score": "0.59116143", "text": "public function getTotalHours()\n {\n \t$conservators = $this->getReportConservators();\n \t$total = 0.0;\n \tforeach ($conservators as $conservator)\n \t{\n \t\t$total += $conservator->getHoursWorked();\n \t}\n \treturn $total;\n }", "title": "" }, { "docid": "3beff28d0cb1cc36de9d43dc76fd2fa4", "score": "0.5911478", "text": "public function getTotal(): int\n {\n return $this->getWayTooLess()\n + $this->getTooLess()\n + $this->getOk()\n + $this->getTooMuch()\n + $this->getWayTooMuch();\n }", "title": "" }, { "docid": "30a706429065bd995a0294002234c797", "score": "0.589913", "text": "public function getCODTotalAmount() {\n return inship_fedexrates_get($this->handle, 1 );\n }", "title": "" }, { "docid": "e1addd6cb95da019fed4f9c8d30102f7", "score": "0.58906823", "text": "public function discount(): float;", "title": "" }, { "docid": "42062bb07b66e4267f07e459f0a50dcc", "score": "0.58831304", "text": "public function getTotalCost()\n {\n $totalCost = 0;\n if($this->isCartEmpty())\n {\n return $totalCost;\n }\n foreach ($_SESSION['cart'] as $item)\n {\n $totalCost = $totalCost + $item->getCost();\n }\n return $totalCost;\n }", "title": "" }, { "docid": "50edb51da5992c845fa283350e48e34e", "score": "0.5879536", "text": "public function getSubTotal(){\n $cost = 0;\n foreach ($this->_positions as $position) {\n $cost += $position->getCost($withDiscount);\n }\n foreach ($this->_positionsLunches as $position) {\n $cost += $position->getCost($withDiscount);\n }\n return $cost;\n }", "title": "" }, { "docid": "41adbba44d0c07e7b623eead3d75e9e8", "score": "0.58717954", "text": "public function getCost(): int;", "title": "" }, { "docid": "abfeca7494077804d88a6cf45eae72c3", "score": "0.5862295", "text": "private function calculateChange(): float\n {\n return $this->amountProvided - $this->totalCost;\n }", "title": "" }, { "docid": "e71c4dcc7b2136e9e55f3914dc28fb8e", "score": "0.58536136", "text": "protected function calculateHotel()\n\t{\n\t\t$item = $this->quote->getHotel();\n\n\t\t// Get the hotel we're using\n\t\t$hotel = $item->hotel;\n\n\t\t// How many rooms do we need?\n\t\t$rooms = ceil($item->people / 2);\n\n\t\t// Calculate the cost for 1 night\n\t\t$total = $rooms * $item->rate;\n\n\t\t// Figure out how many nights it is\n\t\t$nights = $item->arrival->diffInDays($item->departure);\n\n\t\t// Re-calculate the total\n\t\t$total *= $nights;\n\n\t\t// Finally, calculate the total with tax\n\t\t$total *= (1 + $hotel->tax_rate);\n\n\t\treturn (float) $total;\n\t}", "title": "" }, { "docid": "da844cb9518f75f3be0dfb691dd28e03", "score": "0.58456343", "text": "private function calcTotalAmount()\n\t{\n\n\t\t$total = 0;\n\t\tforeach ($this->products as $product) {\n\t\t\t$total += $product->getPrice();\n\t\t}\n\n\t\treturn $total;\n\t}", "title": "" }, { "docid": "c26a798e08158e79907cc41f6559507a", "score": "0.5836609", "text": "public function porcentagemDistancia() {\r\n\t\tglobal $DB;\r\n\t\t$curso_id = $this->_cursolv->getConfiguracao()->id_curso;\r\n\t\t$soma = $DB->get_record('tarefalv', array('course'=>$curso_id), 'SUM(porcentagem) as total');\r\n\t\r\n\t\treturn $soma->total;\r\n\t}", "title": "" }, { "docid": "0e8c4b2f3940df14b2bd8bb4c230f183", "score": "0.5831506", "text": "public function getTotalPrice();", "title": "" }, { "docid": "0e8c4b2f3940df14b2bd8bb4c230f183", "score": "0.5831506", "text": "public function getTotalPrice();", "title": "" }, { "docid": "704732b6fb9e733f6bda20a4d096e8bc", "score": "0.5817071", "text": "public function getCost();", "title": "" }, { "docid": "d004a70d8ae966e2a4725f1163f33f7c", "score": "0.5811528", "text": "public function getTotalTtlCsPrice(): int\n {\n $total = 0;\n\n $this->items->each(function (ShopItem $item) use (&$total) {\n if ($item->sale_type == Shop::SALE_CS_TYPE) {\n $total += $item->total_price;\n }\n });\n\n return $total;\n }", "title": "" }, { "docid": "c497120d00e04ff5916d6a7067433df0", "score": "0.5806498", "text": "public function getTeamCost()\n {\n return array_sum($this->teams->map(function($team) {\n return $team->getCost();\n })->toArray());\n }", "title": "" }, { "docid": "99d8b71eca4477f236e23a6415e9e2c5", "score": "0.5784056", "text": "public function getCostTotals();", "title": "" }, { "docid": "dbd6cbb0f102edc0f1169bb478655985", "score": "0.5773176", "text": "public function getTotalPrice()\n {\n $total = 0;\n\n foreach ($this->orders as $order) {\n $total += $order['total_price'];\n }\n\n return $total;\n }", "title": "" }, { "docid": "73e75bd75b3d8cd4eb51eeeed1d726f4", "score": "0.5766653", "text": "public function totalColecao(){\r\n $oRhFeriadoBD = new RhFeriadoBD();\r\n return $oRhFeriadoBD->totalColecao();\r\n }", "title": "" }, { "docid": "467a7360e37cdcfe8f2172bfc180ede8", "score": "0.57563275", "text": "public function getCost()\n {\n return 10;\n }", "title": "" }, { "docid": "e3707435d3a13b8b4aaa5ac20cfabcda", "score": "0.5744589", "text": "public function getAmountOfMains(): int\n {\n $sql = \n \"SELECT COUNT(id) \n AS amount_of_cat_mains \n FROM recette\n WHERE `dish_category` = '2'\n \";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n\n return $query->fetch()->amount_of_cat_mains;\n }", "title": "" }, { "docid": "9bfdfb2e53861685db42164b95c77e6d", "score": "0.57334834", "text": "function calculateTotalPrice()\n {\n return round(self::$tax + self::$total_price, 2);\n }", "title": "" }, { "docid": "60318f67db7ddd4635a406ff3edf65fa", "score": "0.5719763", "text": "public function get_total() {\n if($this->hotel == \"Voyage Hotel\"){\n $total = 250 * $this->num_guests * $this->num_rooms * $this->interval->format('%a');\n } else if($this->hotel == \"Summer Dune Hotel\") {\n $total = 290 * $this->num_guests * $this->num_rooms * $this->interval->format('%a');\n } else {\n $total = 330 * $this->num_guests * $this->num_rooms * $this->interval->format('%a');\n }\n\n echo 'R' . $total;\n }", "title": "" }, { "docid": "f4b34be20ae4f40bb94d49cdf176bcd3", "score": "0.5702723", "text": "public function calculateTotalAmount();", "title": "" }, { "docid": "61a4af77d4610ea4def39ed3ec71daae", "score": "0.56983626", "text": "public function discount_amount(){\n return $this->original_price - $this->discount_price;\n }", "title": "" }, { "docid": "ffb6315caf1b2bb2efb91955024f53df", "score": "0.5689802", "text": "public function getFlightCost()\n\t{\n\t\treturn $this->flight_cost;\n\t}", "title": "" }, { "docid": "37d944ce87d934985fc7e2d65ba3a199", "score": "0.5689733", "text": "function calcularPorcentajePlanEstudiante(){\n $setenta=$this->consultarPorcentajePlan($this->codigoEstudiante);\n if(is_array($setenta)&&isset($setenta[0]['CREDITOS_PLAN']))\n {\n switch (trim($setenta[0]['TIPO_ESTUDIANTE'])){\n case 'S':\n $porcentaje=($setenta[0]['CREDITOS_ESTUDIANTE']/$setenta[0]['CREDITOS_PLAN'])*100;\n break;\n case 'N':\n $porcentaje=($setenta[0]['ESPACIOS_ESTUDIANTE']/$setenta[0]['CREDITOS_PLAN'])*100;\n break;\n default :\n $porcentaje=0;\n break;\n }\n $porcentaje=floor($porcentaje);\n }elseif(!is_array($setenta))\n {\n $porcentaje=0;\n }\n else\n {\n if(strlen($this->codigoEstudiante)>10&&substr($this->codigoEstudiante, -11,5)>=20112)\n {\n $porcentaje=0;\n }else{$porcentaje=0;}\n }\n return $porcentaje;\n\t}", "title": "" }, { "docid": "c3adad3c5f76e62c3919277b33de1fa9", "score": "0.568225", "text": "public function getCost() {\n return 25;\n }", "title": "" }, { "docid": "ae4fd2ea41d432b50486a52009d3715f", "score": "0.5670877", "text": "public function getTotalAmount();", "title": "" }, { "docid": "574a1e7280bd6ddde210150c66622be6", "score": "0.5649615", "text": "public function getCostPerUnit(): Amount\n {\n return $this->getBillable()->getCostPerUnit();\n }", "title": "" }, { "docid": "9ea2389b1930eff1a4a5cafecf3f15bc", "score": "0.5648658", "text": "public function getTotalUnitCost(): Amount\n {\n return $this->getCostPerUnit()->multiplyWith($this->getNrOfUnits());\n }", "title": "" }, { "docid": "64c4baf79bce823273cb94c961daab59", "score": "0.5643563", "text": "function calcularPorcentajePlanEstudiante(){\n $setenta=$this->consultarPorcentajePlan($this->codigoEstudiante);\n if(is_array($setenta)&&isset($setenta[0]['CREDITOS_PLAN']))\n {\n switch (trim($setenta[0]['TIPO_ESTUDIANTE'])){\n case 'S':\n $porcentaje=($setenta[0]['CREDITOS_ESTUDIANTE']/$setenta[0]['CREDITOS_PLAN'])*100;\n break;\n case 'N':\n $porcentaje=($setenta[0]['ESPACIOS_ESTUDIANTE']/$setenta[0]['CREDITOS_PLAN'])*100;\n break;\n default :\n $porcentaje=0;\n break;\n }\n $porcentaje=floor($porcentaje);\n }elseif(!is_array($setenta))\n {\n $porcentaje=0;\n }\n else\n {\n if(strlen($this->codigoEstudiante)>10&&substr($this->codigoEstudiante, -11,5)>=20112)\n {\n $porcentaje=0;\n }else{$porcentaje='';}\n }\n return $porcentaje;\n\t}", "title": "" }, { "docid": "b351d2cc7e9ce31a48d5f109650a9f85", "score": "0.56406796", "text": "function calculatePrices() {\n if (!isset($this->foodItems)) {\n echo(\"NIL\\n\");\n return;\n }\n //print_r($this->foodItems);\n $totalRestaurant = NULL;\n $total = NULL;\n foreach ($this->restaurants as $restaurant) {\n // don't consider restaurant \n $subTotal = 0.0;\n foreach ($this->choices as $choice) {\n if($this->foodItems[$restaurant][$choice] !== NULL){\n $subTotal += $this->foodItems[$restaurant][$choice];\n }else{\n continue 2;\n }\n }\n if ($total == NULL || $subTotal < $total) {\n $total = $subTotal;\n $totalRestaurant = $restaurant;\n }\n }\n\n if ($total == NULL) {\n echo(\"NIL\\n\");\n return;\n }\n $total = money_format($total, 3);\n echo(\"Winning Restaurant: $totalRestaurant and winning Price: $total\");\n }", "title": "" }, { "docid": "4e5f4e219b78528da1d1b453c04fbf6c", "score": "0.5640095", "text": "public function get_total_price() {\n\n\t\t\t$query = $this->db->query( \"SELECT SUM(price) as total FROM activities_directions\" );\n\t\t\treturn $query->row( \"total\" );\n\n\t\t}", "title": "" }, { "docid": "fe111c9f1bc680d735682ca5a3a2e908", "score": "0.5628391", "text": "public function getCostFactor() : int;", "title": "" }, { "docid": "f3ab396f8c8e23a4eabace4cb3cd52db", "score": "0.56245816", "text": "function trip_departure_discounted_price($original_price,$discount){\n\n\t\t$discounted_cost = (int)$original_price-(((int)$original_price * (int)$discount)/100);\n\n\t\t//return round($discounted_cost);\n\t\treturn ($discounted_cost);\n\n\t}", "title": "" }, { "docid": "10fcb861443e09bba6bcc3045182bb74", "score": "0.562169", "text": "function compute_tire_bonus($tires)\n\t{\n\t return $tires * 0.4;\n\t}", "title": "" }, { "docid": "1d27f21efe57395f76cff0785546f902", "score": "0.561627", "text": "protected function _getTravelRate() {\n\t\t// meters per second\n\t\t// 1 m/s:\n\t\t// 2.2 miles per hour (about)\n\t\t// 3.2 feet per second (about)\nreturn 8; // About 17 mph for now (might be a little fast in the long run)\n\t\treturn 2;\n\t}", "title": "" }, { "docid": "0b024f438f14a1efd31cd604e2f04af6", "score": "0.55931747", "text": "public function getDiscountTotal(): float;", "title": "" }, { "docid": "30bdfc53bc366f4b28bc70c8ae82e425", "score": "0.5581299", "text": "public function getServiceTotal()\n {\n $total = 0;\n if($this->service)\n {\n $installation_fee = $this->item->standard_install_fee;\n $feet = $this->service->value;\n $excessFeet = $feet - 10;\n $feePerExcess = $excessFeet * 300;\n $total = $installation_fee + $feePerExcess;\n }\n return $total;\n }", "title": "" }, { "docid": "5fd89ef470c9057a7395678b28c36dd4", "score": "0.5568588", "text": "public function totalPrice()\r\n {\r\n if (!$this->book_amount)\r\n return $this->price;\r\n try {\r\n return $this->book_amount * $this->price;\r\n } catch (\\Exception $exception) {\r\n return $this->price;\r\n }\r\n }", "title": "" }, { "docid": "c2d0643205d41731487bdb056a967461", "score": "0.55625504", "text": "public function cost(): float\n {\n return $this->baseCost;\n }", "title": "" }, { "docid": "6583d0b332b7eb3d79de78fd5b74c268", "score": "0.55613285", "text": "public function getTotalVatCost(): Amount\n {\n return $this->getTotalUnitCost()->multiplyWith($this->getVatRate());\n }", "title": "" }, { "docid": "3bee865d74f8e818ee8e4d3273f39238", "score": "0.555188", "text": "function calculateTotal() {\n $this->points_total =\n $this->points_simple +\n $this->points_goals +\n $this->points_yellowcards +\n $this->points_redcards +\n $this->points_defenses;\n }", "title": "" }, { "docid": "05cedd6e817963ccdd12902222b943d1", "score": "0.5539664", "text": "public function calculateSalary(){\n return $this->salary = ($this->salary -($this->salary * $this->tax) / 100); \n }", "title": "" }, { "docid": "5ddf3ef7c74973ed0db742d12697e3b1", "score": "0.55371463", "text": "protected function calculateInterests()\n {\n return round($this->capital * $this->interestRate / 100, 2);\n }", "title": "" }, { "docid": "0331cf1d7f7c2f5339826bb45200eeb9", "score": "0.5533904", "text": "public function cost_of_goods() {\n $txn= $this->txn();\n $q= \"SELECT CAST(IFNULL(ROUND_TO_EVEN(\n {$this->allocated} * ROUND_TO_EVEN(AVG(tl.retail_price), 2),\n 2), 0.00) AS DECIMAL(9,2)) AS cost\n FROM txn\n JOIN txn_line tl ON txn.id = tl.txn_id\n WHERE type = 'vendor'\n AND item_id = {$this->item_id}\n AND filled < '{$txn->created}'\";\n\n $cost= $this->orm->for_table('txn')->raw_query($q)->find_one();\n return $cost->cost;\n }", "title": "" }, { "docid": "16ffe31346ba8a6a58cc34d9a3c00187", "score": "0.5532635", "text": "public function totalColecao(){\r\n\t\t$oSicasEncaminhamentoBD = new SicasEncaminhamentoBD();\r\n\t\treturn $oSicasEncaminhamentoBD->totalColecao();\r\n\t}", "title": "" }, { "docid": "1f5b55fbf6d122254000a968b98fbd71", "score": "0.55318385", "text": "public function averageTimeSpent() {\n $credits = Credit::find_by_topic($this->id); \n $sum = 0;\n $count = 0; \n \n foreach($credits as $credit) {\n if ($credit->enddate > 0) {\n $end = $credit->enddate;\n $start = $credit->startdate;\n $days_between = (strtotime($end) - strtotime($start)) / 86400;\n $sum = $sum + $days_between;\n $count++;\n }\n }\n \n if ($count != 0) {\n return round($sum / $count); \n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "c2ad89e426e057d71b7a2c33aaaa0743", "score": "0.55306095", "text": "public function getAmountOfDesserts(): int\n {\n $sql = \n \"SELECT COUNT(id) \n AS amount_of_cat_desserts \n FROM recette\n WHERE `dish_category` = '3'\n \";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n\n return $query->fetch()->amount_of_cat_desserts;\n }", "title": "" }, { "docid": "5801e8c63d27ccac7b814036433b69e7", "score": "0.55289924", "text": "public function total()\n {\n return number($this->sum('discount'));\n }", "title": "" }, { "docid": "1c268c28cba5b5904e1db959865dba6b", "score": "0.55284584", "text": "public function calculFinance()\n\t{\n\t\treturn ($this->CREDITTEMPS -$this->MONTANTADEBITER);\n\t}", "title": "" }, { "docid": "871223fdc7a7891f979073c906fae194", "score": "0.55269545", "text": "protected function calc()\n {\n $ret = 0;\n if ($chain = $this->createChain()) {\n $i = 0;\n while ($chain->offsetExists($i)) {\n $rule = $chain->itemAt($i++);\n if (($value = $rule->calc()) !== false) {\n $ret += $value;\n } else {\n break;\n }\n }\n }\n\n return $ret;\n }", "title": "" }, { "docid": "52a86545b767f09428c4b1f87ae7d510", "score": "0.5519683", "text": "function calculateTotalPointsEarned()\n\t{\n\t\tforeach ($this->vals AS $valid=>$valObj)\n\t\t{\n\t\t\t$this->totalPointsEarned += $valObj->score;\n\t\t}\n\t}", "title": "" }, { "docid": "284c5edd8e28bf0de2df925a0e5172b1", "score": "0.5518324", "text": "public function getTotalPrice()\n {\n return $this->total_price;\n }", "title": "" }, { "docid": "c042e54541157de6ebc20973a2369322", "score": "0.55181134", "text": "public function getTotal_price()\n {\n return $this->total_price;\n }", "title": "" }, { "docid": "e5fb15116509bd0eabba85db85a0bc2e", "score": "0.5516242", "text": "public function getTotalHours() : float\n {\n return $this->totalHours;\n }", "title": "" }, { "docid": "f61935469035c605baba9d0244554a26", "score": "0.5514685", "text": "public function getCrapAmount() :int\n {\n $sumOfCraps = array_reduce($this->all_craps, function ($sum, $crap) {\n /** @var Crap $crap */\n return $sum + $crap->getExcrement();\n }, 0);\n return $sumOfCraps;\n }", "title": "" }, { "docid": "81508c5a857c2be99194e051b03471e5", "score": "0.55042994", "text": "public function price() {\n\t\treturn $this->basePrice() - $this->discount() + $this->shipping();\n\t}", "title": "" }, { "docid": "7a2f729c8003bbd2a48edccb7f9c2453", "score": "0.55032045", "text": "public function getTotalUnitCsPrice(): int\n {\n $total = 0;\n\n $this->items->each(function (ShopItem $item) use (&$total) {\n if ($item->sale_type == Shop::SALE_CS_TYPE) {\n $total += $item->price;\n }\n });\n\n return $total;\n }", "title": "" }, { "docid": "34094d57da9bd1f6f637ea20023aefb9", "score": "0.5502905", "text": "public function getPrice()\n {\n return ($this->price - $this->discount);\n }", "title": "" }, { "docid": "bab3973e2446d4154d991cffddc9dcfc", "score": "0.54998696", "text": "public function total(): int;", "title": "" }, { "docid": "22248aefcd7f5f139134a6c58b47171b", "score": "0.5498378", "text": "public function getTotalcostAttribute()\n {\n return number_format($this->attributes['cost'] * $this->attributes['quantity'], 2);\n }", "title": "" }, { "docid": "a2505b9abbd311fa36bef5a5f09b1753", "score": "0.5495727", "text": "public function cost()\n {\n return $this->cost;\n }", "title": "" }, { "docid": "49c357c25b4303be87c70c81eb8c9383", "score": "0.5487485", "text": "public function getSpeakerHotelAttribute()\n {\n return $this->program->travel_hotel_costs->sum('real');\n }", "title": "" }, { "docid": "dfb81c4ca6ef1531ccd5944d3fdf6306", "score": "0.54872465", "text": "public function subtotalPrice() {\n return $this->totalPrice() - $this->totalVat();\n }", "title": "" }, { "docid": "eea3f5026abbe7a548b7310c122ff210", "score": "0.5483572", "text": "public function get_total_credit() {\n\t\t$this->db->select('SUM((product_price * product_qty)-((product_price * product_qty)*((diskon_price)/100))) AS total_amount');\n\t\t$this->db->where('accepted != 1 OR shipped != 1 OR paid != 1 OR recived != 1');\n\t\t$this->db->join('sale_detail', 'sale_detail.sale_id = sale.id', 'left');\n\t\t$query = $this->db->get('sale');\n\t\treturn $query->row()->total_amount;\n\t}", "title": "" }, { "docid": "44632ab768eaaf163ca7aa4c8f8b38a7", "score": "0.54749566", "text": "public function getTotalTtlVotePrice(): int\n {\n $total = 0;\n\n $this->items->each(function (ShopItem $item) use (&$total) {\n if ($item->sale_type == Shop::SALE_VOTE_TYPE) {\n $total += $item->total_price;\n }\n });\n\n return $total;\n }", "title": "" }, { "docid": "91e01c27432602255529a254ea1eca66", "score": "0.547134", "text": "public function getBaseTotalRefunded();", "title": "" }, { "docid": "4a1bf50de5723ab7515077d97b358acf", "score": "0.5469267", "text": "function computeMoney($numberMonthsSinceCreation) {\n return round($this->statistics->viewCount / 1000, 2);\n }", "title": "" }, { "docid": "d57f55a6c239825198bf308f71b24e36", "score": "0.54645646", "text": "function get_total_price($order);", "title": "" }, { "docid": "f53082e1ceff854d3265d8e1b6bfe8fa", "score": "0.5460451", "text": "public function TotalPrice() {\n\n\t\t$amount = $this->Total();\n\t\t$this->extend('updatePrice', $amount);\n\t\treturn $amount;\n\t}", "title": "" } ]
a8d93f25c0c8adcda92286694c0ceb45
Specifies the access control rules. This method is used by the 'accessControl' filter.
[ { "docid": "3eb597a2c4604596db70737b6ad77280", "score": "0.6826669", "text": "public function accessRules()\r\n {\r\n return array(\r\n array('allow', // allow all users to perform 'index' and 'view' actions\r\n 'actions' => array('index', 'view', 'order', 'toggle', 'editOrder','completion', 'logistic', 'setSend', 'filtr', 'revaluation', 'setNotSend', 'setOrdered'),\r\n 'users' => array('@'),\r\n 'roles' => array('administrator')\r\n ),\r\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n 'actions' => array('create', 'update', 'order', 'updateLogistic'),\r\n 'users' => array('@'),\r\n ),\r\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\r\n 'actions' => array('admin', 'delete', 'order'),\r\n 'roles' => array('administrator'),\r\n ),\r\n array('deny', // deny all users\r\n 'users' => array('*'),\r\n ),\r\n );\r\n }", "title": "" } ]
[ { "docid": "01d36f1cab79546aef2dc3fe4909beed", "score": "0.7454042", "text": "public function accessRules()\n\t\t{\n\t\t\treturn array(\n\t\t\t\t'accessControl'\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "15c29c3128a969d03e845e8518848a3b", "score": "0.71746397", "text": "public function accessRules() {\n return [['allow', 'users' => ['@']],['deny']];\n }", "title": "" }, { "docid": "e2dda312d464042fb4f0f4c89e2ad632", "score": "0.7174244", "text": "public function accessRules() \r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n\t\t\t\t'actions'=>array('index','dashboard'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t\t'expression'=>'in_array(Yii::app()->user->level, array(1,2))',\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "a5731c62145b4ecf53eca78bda314a3c", "score": "0.71435976", "text": "public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "a000000d8df21969d64e8b00a88c919b", "score": "0.7136168", "text": "public function accessRules() {\n return [['allow', 'users' => ['@']], ['deny']];\n }", "title": "" }, { "docid": "31ddfd1b80ec6ec5a873a8cb2f4eeef3", "score": "0.7102114", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('createapproval','updateapproval','returnApproval', 'index','view','approval', \n 'quote', 'admin', 'search', 'UpdateAjax', 'exportApproval','Createquote','Updatequote',\n 'returnQuote'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('delete'),\n\t\t\t\t'users' => Yii::app()->getModule(\"user\")->getAdmins(),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "de4dd9a74204b4fa2000cbf978db4775", "score": "0.709299", "text": "public function accessRules()\n {\n return array(\n array(\n 'allow', // Allow all authenticated AMs to create, send, and get sent reports\n 'actions' => array('create, saved'),\n 'users' => array('@'),\n ),\n array(\n 'deny', // Deny everything else\n 'users'=>array('*'),\n ),\n );\n }", "title": "" }, { "docid": "58e281e9fa806c40979dc5f4cf4d4487", "score": "0.70868784", "text": "public function accessRules()\n {\n return array(\n array('allow',\n 'actions'=>array('admin','view'),\n 'roles'=>array('reader', 'writer')\n ),\n array('allow',\n 'actions'=>array('update'),\n 'roles'=>array('writer')\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }", "title": "" }, { "docid": "6a31cbac92ba17bb6fdc5c2833a90f0c", "score": "0.7078831", "text": "public function accessRules()\n {\n return array(\n array('allow',\n 'actions'=>array('list','show','captcha','PostedInMonth','PostedOnDate', 'search'),\n 'users'=>array('*'),\n ),\n array('allow',\n 'actions'=>array('ajaxBookmark','create'),\n 'users'=>array('@'),\n ),\n array('allow',\n 'expression'=>'Yii::app()->user->status=='.User::STATUS_ADMIN.\n '||Yii::app()->user->status=='.User::STATUS_WRITER,\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }", "title": "" }, { "docid": "51fe1a28a26177ae23f7b3752299232c", "score": "0.7075398", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "51fe1a28a26177ae23f7b3752299232c", "score": "0.7075398", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "3cd5d9976cb453400fb69ae8b21610b1", "score": "0.7071383", "text": "public function accessRules()\n {\n return array(\n array('allow',\n 'expression' => 'Yii::app()->user->isAdmin()',\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "9add1af1a15564f6710f3e45f64d3157", "score": "0.706163", "text": "public function accessRules()\n {\n return array(\n array('allow',\n 'expression' => 'Yii::app()->user->isAdmin()'\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "b69df21a2be62eec2741a1483b7535e5", "score": "0.7054694", "text": "public function accessRules()\n\t{\n\t\treturn array(\n array('allow',\n 'actions'=>array('index','delete','create', 'update','admin'),\n 'expression'=>'($user->rule===\"admin\")'\n ),\n array('allow',\n 'actions'=>array('view'),\n 'expression'=>'($user->rule===\"utente\") or ($user->rule===\"admin\")'\n ),\n\t\t\tarray('deny',\n 'users'=>array('*'),\n ),\n\t\t);\n\t}", "title": "" }, { "docid": "433cfaf543ffe0d6b784e812a0785963", "score": "0.70469457", "text": "public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\r\n\t\t\tarray('allow', // allow all users to perform 'index' actions if they have the writing permission on admin\r\n\t\t\t\t'actions'=>array('index'),\r\n\t\t\t\t'pbac'=>array('write', 'admin'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow all users to perform 'accessList' actions if they have the writing permission on admin\r\n\t\t\t\t'actions'=>array('accessList'),\r\n\t\t\t\t'ajax'=>true,\r\n\t\t\t\t'pbac'=>array('write', 'admin'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow root to access the update action\r\n\t\t\t\t'actions'=>array('update'),\r\n\t\t\t\t'users'=>array(UserGroupsUser::ROOT),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow root to access the update action\r\n\t\t\t\t'actions'=>array('cron'),\r\n\t\t\t\t'ips'=>array('127.0.0.1'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow all users to perform 'documentation' actions if they have the reading permission on admin\r\n\t\t\t\t'actions'=>array('documentation'),\r\n\t\t\t\t'pbac'=>array('read'),\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "f7ce12a3e4d2b317914c07dd9922c8a1", "score": "0.7032648", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('add'),\n\t\t\t\t'expression'=>'Yii::app()->user->isAdmin()',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "9aa3319b9c59cef39141d61b7d1905ca", "score": "0.7022486", "text": "public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view', 'SelectCountry','GetStartPage','SelectArea'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "ce8b49157a056c10f8935ef50bdbf9c4", "score": "0.7021989", "text": "public function accessRules()\n {\n\treturn array(\n\t array('allow',\n\t\t'roles' => array('admin'),\n\t ),\n\t array('deny',\n\t\t'users' => array('*'),\n\t ),\n\t);\n }", "title": "" }, { "docid": "4ffb8a3984a6365e8568b4dc514546ac", "score": "0.70030314", "text": "public function accessRules()\n\t{\n \t \n\t\treturn array(\n \t\t array('allow', // allow all users to perform 'index' and 'view' actions\n \t\t \t 'actions'=>array('user', 'job', 'slot', 'jobreport', 'jobreportmenu', 'queuereport','jobReportMenu', 'usageSumReport'),\n \t\t \t 'users'=>array('*'),\n \t\t ),\n \t\t array('allow', // allow all users to perform 'index' and 'view' actions\n \t\t \t 'actions'=>array('ajaxQueueReport', 'ajaxUsageSumReport', 'ajaxUsagedetailsReport'),\n \t\t \t 'users'=>array('*'),\n \t\t ),\n \t\tarray('deny', 'users' => array('*')),\n\t\t );\n }", "title": "" }, { "docid": "6b30735c5458e80e864bbff42bc9d57c", "score": "0.7000095", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform actions\n 'actions'=>array('index','error','logout','about','terms','notify','notifyFacebook','suggestCountry',\n 'suggestSkill','suggestCity','unbsucribeFromNews','cookies','sitemap','startupEvents',\n 'applyForEvent','vote','clearNotif','suggestEventCityCountry'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\t/*array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions'=>array(),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),*/\n\t\t\tarray('allow', // allow admin user to perform actions:\n\t\t\t\t'actions'=>array('list','recalcPerc','setVanityUrl','sqlIndustry','test'),\n\t\t\t\t'users'=>Yii::app()->getModule('user')->getAdmins(),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "662e8b2f7fe9cd0420f2e756d0eb545e", "score": "0.6979242", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('index'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('uagent'),\n\t\t\t\t'roles'=>array(\n Yii::app()->params['agent'],\n ),\n\t\t\t),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('company'),\n\t\t\t\t'roles'=>array(\n Yii::app()->params['company'],\n ),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "4a89327037a301866f6b38485d4a872d", "score": "0.6978328", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('create','update','view','delete','admin','index','changeimage','uploadisi','uploadringkasan','uploadcover','addsni','addpetunjukteknis','addpedomanteknis','downloadisi','downloadringkasan','excel'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>'Yii::app()->user->record->level==1',\n\t\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('detail','list','search','searchsni','searchpedomanteknis','searchpetunjukteknis'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t\t),\t\t\t\n\t\t\tarray('deny',\n\t\t\t\t'users'=>array('*'),\n\t\t\t\t),\n\t\t\t);\n\t}", "title": "" }, { "docid": "6f8f62a18adbeb9bcea909a6ad1e953b", "score": "0.69747704", "text": "public function accessRules()\n\t{\n\t\tYii::app()->user->loginUrl = array(\"/cruge/ui/login\");\n\t\treturn array(\n\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('ordenlotesube1','ordenlotebaja1','colocaloteultimo','colocaloteprimero','editalote','pintarotacion','revertirajuste','ajuste','editaconteofisico','conteofisico','updateubicacion','muestrakardex','admin','pintareservas','create','supervision','import','pronostica','pareto','adminpareto','repinventario','prueba','buclecarga','update','cargarmat','busqueda','cargaalmacenes','cargaalmacenes1'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\n\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "c640cf5803b750014edaff4ca51ad448", "score": "0.6964876", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('index','view','update'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('create','update','delete','admin','index','view'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>'Yii::app()->user->record->level==1',\n\t\t\t\t),\n\t\t\tarray('deny',\n\t\t\t\t'actions'=>array('create','update','delete','admin','index','view'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t\t),\n\t\t\t);\n\t}", "title": "" }, { "docid": "a4ee8fa3edc5545ad7e92069b458b855", "score": "0.6959726", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('load'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t),\t\t\t\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('create','update','view','delete','admin','index','changeimage','enable','disable'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>'Yii::app()->user->record->level==1',\n\t\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('view','index'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>'Yii::app()->user->record->level==2',\n\t\t\t\t),\t\t\t\n\t\t\tarray('deny',\n\t\t\t\t'users'=>array('*'),\n\t\t\t\t),\n\t\t\t);\n\t}", "title": "" }, { "docid": "a932b01164c9afefaaf6766bac7bbb47", "score": "0.69563323", "text": "public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view'),\n 'users' => array('admin'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update','setRanking'),\n 'users' => array('admin'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('admin'),\n ),\n );\n }", "title": "" }, { "docid": "a7d77ceb1225f833ac90e18fb2e91898", "score": "0.6953277", "text": "public function accessRules() {\n return array(\n array('allow', // allow authenticated user\n 'actions' => array('view', 'admin', 'create'),\n 'users' => array('@',),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('import', 'export'),\n 'expression' => array('Controller', 'allowOnlyAdminModer')\n ),\n array('allow', // allow only the owner to perform 'view' 'update' 'delete' actions\n 'actions' => array('create', 'admin', 'view', 'update', 'delete',),\n 'expression' => array('Controller', 'allowOnlyOwner')\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "11fe86bf9e8c7327c645fadd748aff92", "score": "0.6945494", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('validatenum','rentrelease','rentupdate','sellrelease','sellupdate'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "84caa58191ae307138133176552d3e9a", "score": "0.69448566", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('dashboard'),\n\t\t\t\t'expression' => 'Yii::app()->user->role >= ' . User::ROLE_ORGANISATION,\n\t\t\t),\n\n\t\t\tarray('allow',\n\t\t\t\t'actions' => array('downloadContacts'),\n\t\t\t\t'expression' => 'Yii::app()->user->role == ' . User::ROLE_ORGANISATION,\n\t\t\t),\n\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('homepage','error', 'notFound','logout','login','resetpassword','privacy'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\t\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "0076f77f260036c2ec48cbeb9c332fbf", "score": "0.694211", "text": "public function accessRules() {\r\n return array(\r\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n 'actions' => array('ver', 'ActualizarInfoAsistentes', 'crear', 'actualizar', 'agregarasistente', 'AsistenteAutoComplete',\r\n 'ValidarAgregarAsistente', 'adminantiguos', 'verantiguos', 'ampliarproyecto', 'agregarInvestigador', 'investigadorAutoComplete',\r\n 'cancelarproyecto', 'editarasistencia'),\r\n 'users' => array('@'),\r\n ),\r\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\r\n 'actions' => array('admin', 'delete'),\r\n 'users' => array('admin'),\r\n ),\r\n array('deny', // deny all users\r\n 'users' => array('*'),\r\n ),\r\n );\r\n }", "title": "" }, { "docid": "f0eeeb5db1e1dd28ecacf7b17cc06e9b", "score": "0.6941781", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'expression'=>'helpers::isadmin()',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "0d1d51e8b9d4b874fa8596bc72002cca", "score": "0.69405013", "text": "public function accessRules() {\n\n return array(\n array(\n 'allow',\n 'actions' => array(\n 'index',\n 'list',\n 'view',\n ) ,\n 'users' => array(\n '*'\n ) ,\n ) ,\n array(\n 'deny', // deny all users\n 'users' => array(\n '*'\n ) ,\n ) ,\n );\n }", "title": "" }, { "docid": "a6f9fbc609939ed26ea78eef574f8124", "score": "0.69403964", "text": "public function accessRules() {\n\t\treturn array(\n\t\t\tarray('allow',\n\t\t\t\t'actions' => array('index', 'create', 'update', 'roles', 'tasks', 'operations', 'delete', 'createAuthItem', 'child', 'setAllowedAuthItem'),\n\t\t\t\t'users' => array('*'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users' => array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "df28325b8e735a02d10a27a60f655892", "score": "0.6938808", "text": "public function accessRules() {\n\n return array(\n array('allow',\n 'actions'=>array('view','viewCierre','cierreInterno'), \n \t\t'roles'=>array('gestor','finanzas','supervisor','supervisor2'),\n ),\n array('allow',\n 'actions'=>array('update','updateCierre','borrar','create','createCierre','cierreEtapa'), \n 'roles'=>array('admin'),\n \t),\n array('deny',\n 'users'=>array('*'),\n ),\n );\n }", "title": "" }, { "docid": "938e38bf7fdf6bb7ca7ed0da748adfe0", "score": "0.6937296", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('batchTest','send'),\n\t\t\t\t'expression' => 'Yii::app()->user->role >= ' . User::ROLE_SUPERADMIN,\n\t\t\t),\n\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('view', 'index', 'recipients','rules','intendedRecipients', 'edit'),\n\t\t\t\t'expression' => 'Yii::app()->user->role >= ' . User::ROLE_MANAGER,\n\t\t\t),\n\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "1f4982faff4c4362fc47a98094398424", "score": "0.6934239", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','create','update','admin','delete', 'user', 'manage'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t\t'expression' => 'Yii::app()->user->isAdmin()',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "837f218bd6ace804ee2f8ad70e078653", "score": "0.6933033", "text": "public function accessRules()\r\n { \r\n return array(\r\n array('allow',\r\n \t'actions' => array('index'),\r\n \t'users' => array('@'),\r\n \t'expression' => 'UserRoles::model()->hasPermission(\"manage\", Yii::app()->user->role)',\r\n 'deniedCallback' => array($this, 'error')\r\n ),\r\n array('deny') \r\n ); \r\n }", "title": "" }, { "docid": "c7af807692aa9f6ffc3f6ef1744f18ed", "score": "0.69282365", "text": "public function accessRules() {\n \n return array(\n array(\n 'allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array(\n 'create',\n 'admin',\n 'update',\n 'delete',\n 'product',\n 'discount',\n 'view',\n 'detail',\n ) ,\n 'users' => array(\n '@'\n ) ,\n ) ,\n array(\n 'allow', // all all users\n 'actions' => array(\n 'error'\n ) ,\n 'users' => array(\n '*'\n ) ,\n ) ,\n array(\n 'deny', // deny all users\n 'users' => array(\n '*'\n ) ,\n ) ,\n );\n }", "title": "" }, { "docid": "f5a98138dbf5becf322b0f5635dae5c4", "score": "0.6905537", "text": "public function accessRules() {\n return array(\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'create', 'index', 'view', 'delete', 'update'),\n 'expression' => 'Yii::app()->user->checkAccess(\"Admin1\")',\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "49c14e7fc35378a16cdc9a169c4a425c", "score": "0.6894919", "text": "public function accessRules()\n {\n return array(\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions'=>array('assignaccess'),\n 'users'=>UserModule::getAdmins(),\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }", "title": "" }, { "docid": "ed9d0eab023f639bf0d6f5c5d30a303f", "score": "0.6892506", "text": "public function accessRules()\n\t{\n\t\treturn array(\t\t\t\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','create','delete', 'resultado', 'apuestas'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "9294fcf20965a70f8dabd2b280c7740b", "score": "0.6892006", "text": "public function accessRules()\n {\n return array(\n );\n }", "title": "" }, { "docid": "80d0360ce2e05610cd847a046d61d19e", "score": "0.68885267", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','index','update','FindCode',\n\t\t\t\t'LoadCodeCheck','AddCheck','DeleteFromCheck','UpdateAmount','NewCheck','DeleteCheck','ViewCheck','GetCheck'\n\t\t\t\t),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "8585289b1623d511025c20f88bbf75ed", "score": "0.6885497", "text": "public function accessRules()\r\r\n\t{\r\r\n\t\treturn array(\r\r\n\t\t\t\t\r\r\n\t\t\t\tarray('allow', // actions that only allow students to perform\r\r\n\t\t\t\t\t\t'actions'=>array('index',),\r\r\n\t\t\t\t\t\t'users'=>array('@'),\r\r\n\t\t\t\t\t\t'expression'=>'intval($user->user_group_id)===Student::USER_GROUP_ID' //only allow student to access\r\r\n\t\t\t\t),\r\r\n\t\t\t\tarray('deny', // deny all users\r\r\n\t\t\t\t\t\t'users'=>array('*'),\r\r\n\t\t\t\t),\r\r\n\t\t);\r\r\n\t}", "title": "" }, { "docid": "fe9761558e0531eaf637ede3f43f3504", "score": "0.6885482", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t\t\t'actions'=>array('admin','delete','create','update','index','view'),\n\t\t\t\t\t\t'expression'=>array($this,'isAdmin'),\n\t\t\t\t),\n\t\t\t\tarray('deny', // deny all users\n\t\t\t\t\t\t'users'=>array('*'),\n\t\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "1cc24b051888791bec35ad77b17d2f56", "score": "0.688504", "text": "public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view', 'show', 'updateGrid', 'getDataForGrid','getDirectionsForSelect','updateRow','editAssetDialog','editAsset', 'delete'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin'),\n 'users' => array('admin'),\n ),\n /*\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n * \n */\n );\n }", "title": "" }, { "docid": "ff779f510fbce6853990814a81e5cb33", "score": "0.6883083", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete','create','update','view'),\n\t\t\t\t'users'=>UserModule::getAdmins(),\n\t\t\t),\n\t\t\tarray('allow', // for UserAdmin\n\t\t\t\t'actions'=>array('admin','create','update','view'),\n\t\t\t\t'expression'=>\"Yii::app()->user->checkAccess('UserAdmin')\",\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "de2ab3d1255d1beef2045c14540ef41b", "score": "0.6881573", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','admin','delete','view','agregarexperiencia','verExperiencia','actualizar','crear'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>'Yii::app()->user->rol===\"talentohumano\"'\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "abae31579d2479cdc32fa4f8542270b4", "score": "0.68805194", "text": "public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'view' action\n 'actions' => array('index', 'chart'),\n 'groups' => array('coordenador', 'empresa', 'root', 'demo'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'chart', 'delete', 'update', 'view',\n 'getCriterioDinamico', 'getPreVisualizacao', 'visualizarMetrica',\n 'getColaboradores', 'RelatorioMetrica', 'Favorito', 'detalheMetrica', 'EntradasFavorito','GetColaboradoresPorEquipe',\n 'modalFavoritar'),\n 'groups' => array('empresa', 'coordenador', 'demo'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "388ce8edbcfb8b86e471e19e850164c7", "score": "0.6878373", "text": "public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\r\n\t\tarray('allow', // allow all users\r\n\t\t\t\t\t\t'users'=>array('*'),\r\n\t\t),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "a33383dccf5e90dae889c6cd6725e3b1", "score": "0.6878197", "text": "public function accessRules()\n {\n return array(\n array('allow',\n 'actions'=>array('index','view','edit','fileupload','fileRemove'),\n 'expression'=>array('ExamTheoryController','allowReadWrite'),\n ),\n array('allow',\n 'actions'=>array('index','view','fileDownload'),\n 'expression'=>array('ExamTheoryController','allowReadOnly'),\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }", "title": "" }, { "docid": "c351b2a58f07662224c4ecce83dc59a6", "score": "0.68734246", "text": "public function accessRules() \n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array(),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('index',\n\t\t\t\t\t'cityget','citysuggest','citypost','citydrop',\n\t\t\t\t\t'anotherget','anothersuggest','anotherpost',\n\t\t\t\t),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>'isset(Yii::app()->user->level)',\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('manage','delete'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>'isset(Yii::app()->user->level) && in_array(Yii::app()->user->level, array(1,2))',\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array(),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "d6dbfa2c334875d5689eca7081ab9d5d", "score": "0.6872983", "text": "public function accessRules() {\r\n return array();\r\n }", "title": "" }, { "docid": "ea3ef0d9e8936fe9f549564087590ca0", "score": "0.68715954", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('index','view','create','update', 'reconcile', 'storn', 'archive', 'archived'),\n\t\t\t\t'users'=>array('@'),\n ),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n ),\n );\n\t}", "title": "" }, { "docid": "03c32764ff44861e5bb0f2e3a738e34d", "score": "0.68712664", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('edit','black'),\n\t\t\t\t'expression'=>array('TreatyStopController','allowReadWrite'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('index','view'),\n\t\t\t\t'expression'=>array('TreatyStopController','allowReadOnly'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "9dae06d6c45553bc37ecaba9665d84b0", "score": "0.68711966", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin user to perform 'create', 'update', 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('add', 'index', 'dialog', 'remove', 'dialogWindow', 'setSeen', 'ajaxList', 'getNewMessages', 'hide'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'create', 'update', 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('create','update','admin','delete'),\n\t\t\t\t'users'=>Yii::app()->user->getAdmins(),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "c180cbb360af18661fd84e50ca43a077", "score": "0.68704945", "text": "public function accessRules()\n\t{\n\t\treturn array(\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions'=>array('save', 'check', 'invitePage','PromoSpotList', 'sendSMS', 'confirm', 'confirmPage', 'FB', 'VK'),\n 'users'=>array('?'),\n ),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "45afecbf5c876286c6d0365dedf73810", "score": "0.6869489", "text": "public function accessRules()\n {\n return array(\n array('allow',\n 'actions'=>array('index','admin','create','view','update','safeDelete','list','upload','runFile','menuSort','postSort','multiLanguage','myuser','dataFacebookSync','deleteImage'),\n // 'expression'=>'Yii::app()->user->checkAccess(\"administrador\")',\n 'users'=>array('@'),\n ),\n array('allow',\n 'actions'=>array('index','list','view','formContact','flag','tester','content','facebook','template','checkStatus','realTimeUpdate','searchPost','images','getImage'),\n 'users'=>array('*'),\n ),\n array('deny', // deny all to users\n 'users'=>array('*'),\n ),\n );\n }", "title": "" }, { "docid": "25900f6e7fbf6c032fcb90675e4837c9", "score": "0.6869233", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index', 'view', 'bulkUpdate', 'geteBayCategories', 'searchAppliedListings', 'bulkUpdateSubmit', 'testGetItem'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "ec5ec3ee11160c0421c9f48546f3c24d", "score": "0.6867236", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('index','view','create','update','getFields'),\n\t\t\t\t'roles'=>array('doctor'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('delete'),\n\t\t\t\t'roles'=>array('administrator'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "1157f0c7c42a58721390f782b5c4c36d", "score": "0.6866872", "text": "public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update', 'suggestMahasiswa','suggestpendaftaran','admin','delete', 'suggestPendaftaranmhs','suggestNilaiDetil'),\n 'expression' => '$user->getLevel()==1',\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('suggestMahasiswa', 'suggestPendaftaranmhs','suggestpendaftaran'),\n 'expression' => '$user->getLevel()==3',\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "143d1dffff4186976af5a384a506a301", "score": "0.6864597", "text": "public function accessRules() {\n return array(\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete', 'create', 'update', 'view', 'Dynamiccities', 'Dynamicdistrict',\n 'Dynamicarea', 'Deleteall', 'Freeze', 'unfreeze', 'black', 'blacklist', 'Deleteblack', 'Delallblack',\n 'Importoutexcel', 'Account'\n ),\n //'users'=>UserModule::getAdmins(),\n 'users' => array('@'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "7074f03dd7be50156ce2446a5bdbca69", "score": "0.6864444", "text": "public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view', 'map', 'locationUpdate', 'dataUpdate', 'columnFiltering'),\n 'users' => array('@'),\n ),\n array('allow', // allow authenticated user to perform 'upload' and 'update' actions\n 'actions' => array('upload', 'update', 'setup', 'filter'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('manage', 'delete'),\n 'users' => array('@'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "98fbf651f209e758f212e9c37fc8da0f", "score": "0.68606716", "text": "public function accessRules() {\n \n return array(\n array(\n 'allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array(\n 'changepass',\n 'create',\n 'admin',\n 'index',\n 'view',\n 'update',\n 'delete',\n ) ,\n 'users' => array(\n '@'\n ) ,\n ) ,\n array(\n 'allow', // all all users\n 'actions' => array(\n 'error'\n ) ,\n 'users' => array(\n '*'\n ) ,\n ) ,\n array(\n 'deny', // deny all users\n 'users' => array(\n '*'\n ) ,\n ) ,\n );\n }", "title": "" }, { "docid": "8fac2f36bad84c386160813c80827a46", "score": "0.6860667", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('fill'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('admin','view','downloadPdf'),\n\t\t\t\t'roles'=>array('viewer'),\n\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('create','update','delete'),\n\t\t\t\t'roles'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny',\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "07300b3a5ecbc84415b953415e705ae8", "score": "0.68566793", "text": "public function accessRules()\n\t{\n\t\treturn array(\n/*\t\t\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('index','new','edit','delete','save'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n*/\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('new','edit','delete','save','down','downs','remove',\"templates\",'fileupload','fileremove','filedownload'),\n\t\t\t\t'expression'=>array('QcController','allowReadWrite'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('index','view','filedownload'),\n\t\t\t\t'expression'=>array('QcController','allowReadOnly'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "6fe49e5b11a1dedf7a0052efefbf2777", "score": "0.6855942", "text": "public function accessRules() {\n return array(\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t 'actions' => array('index','fetch', 'view','create', 'update','like','delete'),\n 'users' => array('@'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "e1b13d856f11cac9e323d7cad44942f9", "score": "0.6855337", "text": "public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t\tarray('allow', // allow authenticated user only\r\n\t\t\t\t\t\t'actions'=>array('home',\r\n\t\t\t\t\t\t\t\t\t\t 'viewProfile'),\r\n\t\t\t\t\t\t'users'=>array('@'),\r\n \t\t\t),\r\n \t\t\tarray('deny', // deny all users\r\n \t\t\t\t\t'users'=>array('*'),\r\n \t\t\t)\r\n \t);\r\n }", "title": "" }, { "docid": "ca91d02bc717f6b46bfa937522b68934", "score": "0.68510383", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // Allow superusers to access Rights\n\t\t\t\t'actions'=>array(\n\t\t\t\t\t'view',\n\t\t\t\t\t'user',\n\t\t\t\t\t'revoke',\n\t\t\t\t\t'ajax',\n\t\t\t\t\t'selectuser',\n\t\t\t\t\t'testAjax',\n\t\t\t\t),\n\t\t\t\t'users'=>$this->_authorizer->getSuperusers(),\n\t\t\t),\n\t\t\tarray('deny', // Deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "a7f8a2618a54c9230048c3757b9e38a0", "score": "0.68475974", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "05fce3827da83bcfbb4eb569177b70eb", "score": "0.68469745", "text": "public function accessRules()\n {\n return array(\n// array( 'allow', // allow all users to perform 'index' and 'view' actions\n// 'actions' => array( 'index', 'view' ),\n// 'users' => array( '*' ),\n// ),\n array( 'allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array( 'create', 'update'),\n 'users' => array( '@' ),\n ),\n array( 'allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array( 'admin', 'delete', \n Helper::CONST_employeeadmin, Helper::CONST_salesadmin,\n Helper::CONST_customeradmin, Helper::CONST_supplieradmin,\n Helper::CONST_contractoradmin,\n Helper::CONST_employeecreate, Helper::CONST_salescreate,\n Helper::CONST_customercreate, Helper::CONST_suppliercreate,\n Helper::CONST_contractorcreate,\n Helper::CONST_employeeupdate, Helper::CONST_salesupdate,\n Helper::CONST_customerupdate, Helper::CONST_supplierupdate,\n Helper::CONST_contractoradmin, ),\n 'users' => array( 'admin', 'su' ),\n ),\n array( 'deny', // deny all users \n 'users' => array( '*' ),\n ),\n );\n }", "title": "" }, { "docid": "9d22960259fa2464ec9370db1f9a683f", "score": "0.68454283", "text": "public function accessRules()\n\t{\n\t\treturn array(\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions'=>array('index'),\n 'users'=>array('admin','pemilik'),\n ),\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('view'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update'),\n 'users'=>array('admin','kasir','pemilik'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('admin','kasir','pemilik'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "52f9b8d4146058c4d7df02a3fb422b45", "score": "0.6842863", "text": "public function accessRules() {\r\n return array(\r\n array('allow', // allow all users to perform 'index' and 'view' actions\r\n 'actions' => array('index', 'view', 'address', 'wallet',\r\n 'creditwallet', 'package', 'adminsponsor', 'verification',\r\n 'socialaccount', 'contact', 'transaction','refferal','deposit','trackrefferal','subscriber','bugreport','feedback','mediacenter'),\r\n 'users' => array('*'),\r\n ),\r\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n 'actions' => array('create', 'update'),\r\n 'users' => array('@'),\r\n ),\r\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\r\n 'actions' => array('admin', 'delete'),\r\n 'users' => array('admin'),\r\n ),\r\n array('deny', // deny all users\r\n 'users' => array('*'),\r\n ),\r\n );\r\n }", "title": "" }, { "docid": "3fe3fd0ce9de12509cb0376843a20998", "score": "0.68423796", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array(), //TODO acomodar esto cuando se tengan los usuarios\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('index','filtrar','storefront', 'buscarCategoria'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array(),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "7fd4ab85576b60a9d4e23697ad9301a7", "score": "0.6841774", "text": "public function accessRules(){\n\t\treturn array(\t\t\t\t\t\t\n\t\t\tarray(\n\t\t\t\t'allow',\n\t\t\t\t'actions'=>array('index','per_karyawan','check','eksport_per_karyawan',\n\t\t\t\t\t'eksport_index','verifikasi','count_absen'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\t\t\t\n\t\t\tarray('deny','users'=>array('*')),\n\t\t);\n\t}", "title": "" }, { "docid": "e4b65697bb5b3757956c0fc7984d9d7d", "score": "0.6841196", "text": "public function accessRules()\n {\n return array(\n\n array('allow',\n 'actions'=>array('index','delete'),\n 'expression'=>'$user->getState(\"info\")->authority >= 1',\n ),\n\n array('deny', // *代表所有的用户\n 'users'=>array('*'),\n ),\n );\n }", "title": "" }, { "docid": "875e10266f3940ad1850fadc3073cc6a", "score": "0.68411916", "text": "public function accessRules() {\n return array(\n /* array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ), */\n );\n }", "title": "" }, { "docid": "186131b1fd065e5c038a8c9e5358d376", "score": "0.68380135", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index','view' and 'create' actions\n\t\t\t\t'actions'=>array('index','view','create','update','admin','delete','approve','approveViaLink'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\t/*array('allow', // allow authenticated user to perform 'update' actions\n\t\t\t\t'actions'=>array('update'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete','approve'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),*/\n\t\t);\n\t}", "title": "" }, { "docid": "ee9e494059b5c203b76b0f8822a19bfd", "score": "0.68332255", "text": "public function accessRules() {\n return array(\n /*\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions'=>array('index','view'),\n 'users'=>array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions'=>array('create','update'),\n 'users'=>array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions'=>array('admin','delete'),\n 'users'=>array('admin'),\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ), */\n );\n }", "title": "" }, { "docid": "7bb41c3ca6d5670f8a001d9fc5f3d06b", "score": "0.6831193", "text": "public function accessRules()\n {\n return array(\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('test','testaa','expdetailajax','add', 'exprules', 'pay','query', 'preview','paytest', 'testnotice', 'rules'),\n 'users' => array('*'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('send', 'index', 'expdetail', 'transfer', 'share','transfercard'),\n // 'roles' => array('teacher',),\n 'users' => array('@'),\n //'expression'=>array($this,'loginAndNotDeleted'),\n ),\n\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "283f87e138c14e6dcfa27cb3ba9c9be9", "score": "0.68299675", "text": "public function accessRules()\n\t{\n\t\treturn array(\n array('allow', // allow authenticated users to perform 'list' and 'view' actions\n 'actions'=>array(\n 'area',\n 'areaView',\n 'ethernet',\n 'ethernetView'\n ),\n 'users'=>array('@'),\n ),\n\t\t\tarray('allow', // allow admin/super users to perform maintenance actions\n\t\t\t\t'actions'=>array(\n 'index',\n 'update',\n 'areaCreate',\n 'areaUpdate',\n 'areaAdmin',\n 'areaDelete',\n 'ethernetCreate',\n 'ethernetUpdate',\n 'ethernetRestore',\n 'ethernetAdmin',\n 'ethernetDelete',\n ),\n 'expression'=>'!Yii::app()->user->isGuest && (Yii::app()->user->isAdmin() || Yii::app()->user->isSuperUser())',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "80448cf98c78c563185e9b4a3423734c", "score": "0.6827723", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t//'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('@'),\n 'expression'=> 'Yii::app()->user->IsReseller',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "8646e1d71dda61fcb14688cb2507f529", "score": "0.6827232", "text": "public function accessRules() {\n return array(\n array('allow',\n 'actions' => array(\n 'index',\n 'paymentDetails',\n 'updateTotalInfo',\n 'export',\n ),\n 'roles' => array('admin', 'super_admin', 'operations_admin', 'finance_admin')\n ),\n array('deny',\n 'users' => array('*')\n )\n );\n }", "title": "" }, { "docid": "2231c4f438d22f691c116ae0bd446514", "score": "0.6826592", "text": "public function accessRules()\n {\n return array(\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions'=>array('rentrelease',\"rentupdate\",\"salerelease\",\"saleupdate\",\"ValidateNum\",\"ShowLikeName\"),\n 'users'=>array('@'),\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }", "title": "" }, { "docid": "254775f332aad97de345de8b8f814ca7", "score": "0.68261886", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('deny', // deny admin user all actions (admin doesn't vote)\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated users (except admin, see above) all actions\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('deny', // for completeness, deny all users all actions\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "1cf1d52f3bf5794bdee55d0c12e8d060", "score": "0.6823669", "text": "public function accessRules()\n {\n return array(\n array('allow',\n 'actions' => array('index', 'indexCategory', 'createCategory', 'updateCategory', 'deleteCategory',\n 'create', 'update', 'delete', 'gallery', 'deleteImage', 'orders', 'orderView', 'export'),\n 'roles' => array('admin', 'moderator'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "493d697350f8c7f5162fdc1705a7cf0c", "score": "0.68227553", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all user to perform 'menu'\n\t\t\t\t'actions'=>array('index'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform all actions\n\t\t\t\t'actions'=>array('widget'),\n\t\t\t\t'roles'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "a74a45d5ca02135683293fa9fe502cef", "score": "0.6820562", "text": "public function accessRules()\n {\n return array(\n array(\n 'allow', \n 'actions' => array(\n\t\t\t\t\t'resetCodeForm',\n 'resetCode',\n ),\n 'users' => array(\n '*'\n )\n ),\n array(\n 'allow',\n 'actions' => array(\n 'changePassword',\n 'changeMail',\n 'confirmMailChange'\n ),\n 'users' => array(\n '@'\n )\n ), \n array(\n 'deny', // deny all users\n 'users' => array(\n '*'\n )\n )\n );\n }", "title": "" }, { "docid": "38201a6b5ccdecf17d92e651cd555422", "score": "0.6820058", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin only\n\t\t\t\t'actions'=>array('index','view','create','update','admin','delete'),\n\t\t\t\t'roles'=>array('3'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "95735ed39f2d9563ae38f74c263752e6", "score": "0.6819532", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view', 'success', 'cancel', 'ipn'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\t/*array('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),*/\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete', 'create', 'update'),\n\t\t\t\t'users'=>Yii::app()->getModule('user')->getAdmins(),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "ba4acace420ea52898d9acab29d715b9", "score": "0.68184257", "text": "public function accessRules()\n {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'roles'=>Yii::app()->getModule('d_export')->accessPermissionRoles,\n ),\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'users'=>Yii::app()->getModule('d_export')->accessPermissionUsers,\n ),\n\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }", "title": "" }, { "docid": "161adb367fe6a33a1708f381a4696ae1", "score": "0.6816485", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('Index'),\n\t\t\t\t'expression'=>'$user->isSimpel() || $user->isAdvanced() || $user->isAdmin()',\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'my' and 'update' actions\n\t\t\t\t'actions'=>array(''),\n\t\t\t\t'expression'=>'$user->isAdvanced() || $user->isAdmin()',\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('Kor'),\n\t\t\t\t'expression'=>'$user->isAdmin()',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "2c51e5a2fc988364d45564037a613e9b", "score": "0.68158215", "text": "public function accessRules(){\r\n\t\treturn array(\r\n\t\t\tarray('deny', // allow all users to perform 'index' and 'view' actions\r\n\t\t\t\t'actions' => array('create','edit','delete'),\r\n\t\t\t\t'users'=>array('?'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "3f4144bc0a98f879ee3b4a0e33120074", "score": "0.68150115", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('index','view','create','update','admin','delete','getSchedules','InsertService','getNewServiceId','update1','AddSharedMembers','UpdateSharedMembers','UnSharedMembers','GetSharedMembers','Edit','Timezone'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "dbfa84f6ba0b57ce8168568641f6fb22", "score": "0.68132377", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index', 'oauth', 'oauthcallback', 'test1', 'test2'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "060708982d028a7ed66fb9310403c6df", "score": "0.6812876", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','selectmunicipio', 'selectparroquia'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "a063f1e70c18f521a9a06ae018853f1c", "score": "0.68125075", "text": "public function accessRules() {\n return array(\n array(\n 'allow', // allow all user to perform 'create' and 'update' actions\n 'actions' => array('details', 'search', 'history', 'yiichat', 'chat' , 'messages', 'online', 'listenToIpn', 'example'),\n 'users' => array('*'),\n ),\n array(\n 'allow', // allow authenticated users to perform 'index' and 'view' actions\n 'actions' => array('index', 'unsubscribe'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin to perform 'admin' and 'delete' actions\n 'actions' => array('searchMembership', 'saveUserChanges', 'pageNavigate'),\n 'roles' => array('admin'),\n ),\n array(\n 'deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" }, { "docid": "8d2207d639323e5e41cd96c210b6c566", "score": "0.68119794", "text": "public function accessRules()\r\n\t{\r\n\r\n\t\r\n\t\treturn array(\r\n\t\t\tarray('allow', \r\n\t\t\t\t'actions'=>array('post'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t),\r\n\t\t\t\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t\t\r\n\t\t);\r\n\r\n\t\t\r\n\r\n\t}", "title": "" }, { "docid": "93697bd9ae149690cd0f9bb486e0519a", "score": "0.68118817", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','byEmployee'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update', 'admin'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('delete'),\n\t\t\t\t'roles'=>array('admin', 'superadmin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "7a250a58e16258ed054a2e05565ca070", "score": "0.68068546", "text": "public function accessRules()\n {\n return array(\n\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('index', 'addRoles', 'removeRoles'),\n 'expression' => 'Yii::app()->user->canDo(\"\")'\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }", "title": "" } ]
dc215c0d0d689e65705a48ef1fa8b431
Busca un objeto Tipo_equipo en la base de datos.
[ { "docid": "22e0fae06e99c5e9fd23cb30589c8069", "score": "0.72443503", "text": "public function select($tipo_equipo);", "title": "" } ]
[ { "docid": "b60828c6ce16094681100a5f17764e3d", "score": "0.686862", "text": "public function insert($tipo_equipo);", "title": "" }, { "docid": "eb48d174130b822ad79ef4445266a52e", "score": "0.66327685", "text": "public function insert(equipo $equipo);", "title": "" }, { "docid": "b559dee6728d85ad4dd0832ffb5773be", "score": "0.63169867", "text": "public function __construct( Equipo $equipo)\n {\n\n }", "title": "" }, { "docid": "e2ddceb057b2fcc5045e3d899a2e1c74", "score": "0.6110892", "text": "public function insertarBd($equipo){\n\t\t$sql=\"INSERT INTO equipos (nombre,codigo,precio,fecha_in,fecha_fab,garantia) VALUES ('\".$equipo->getNombre().\"','\".$equipo->getCodigo().\"',\".$equipo->getPrecio().\",'\".$equipo->getFecha_in().\"','\".$equipo->getFecha_fab().\"',\".$equipo->getGarantia().\");\";\n\t\tif($this->db->query($sql) === TRUE){\n\t\t\t//echo \"Equipo insertado <br>\";\n\t\t \t\n\t\t}else{\n\t\t\techo \"<br>Fallo: equipo no insertado. \".$db->error;\n\t\t \t\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "2eca7bf8c223446a630f26f6d1ed5683", "score": "0.59898126", "text": "public function edit(Equipo $equipo)\n {\n //\n }", "title": "" }, { "docid": "37db9ccdea3ae98928fc585682af2003", "score": "0.5954786", "text": "public function update(equipo $equipo);", "title": "" }, { "docid": "a02dc68f2c71e586d9cfa70e626b1263", "score": "0.58486646", "text": "function equipos(){\n return $this->hasMany('\\futboleros\\Equipo');\n }", "title": "" }, { "docid": "a02dc68f2c71e586d9cfa70e626b1263", "score": "0.58486646", "text": "function equipos(){\n return $this->hasMany('\\futboleros\\Equipo');\n }", "title": "" }, { "docid": "ea36374b3c7b157b935c26e8389f5541", "score": "0.5781426", "text": "public function equipos()\n {\n return $this->belongsTo(Equipo::class, 'equipo_id');\n }", "title": "" }, { "docid": "b71df10458b1cf4e2c690d571f0c956b", "score": "0.57755816", "text": "public function show(Equipo $equipo)\n {\n return $equipo;\n }", "title": "" }, { "docid": "32d9f2a5a0f28bd13b0652f51f5581f3", "score": "0.56668085", "text": "public function model()\n {\n return PartidosEquipos::class;\n }", "title": "" }, { "docid": "8cfa6cdbf4b4aa9dec0e025919ef26b1", "score": "0.5633249", "text": "public function getSerieComprobante($punto_venta,$tipo)\r\n {\r\n $criteria=new CDbCriteria;\r\n $criteria->select='serie';\r\n $criteria->condition='punto_venta_id='.$punto_venta.' and comprobante_id='.$tipo;\r\n return $this->find($criteria)->serie; //devuelve la serie\r\n }", "title": "" }, { "docid": "140f6ed98855951146e512728cb0c4d9", "score": "0.5619873", "text": "public function requisicao_has_equipamento($informacao){\n $this->db->insert('requisicao_has_equipamento', $informacao);\n }", "title": "" }, { "docid": "53b852757ba46ac405dafdfb3c12cf13", "score": "0.561575", "text": "function equipajePorVuelo($idVuelo) {\n $resultado = $this->controlBD->consultarEquipajePorVuelo($idVuelo);\n return $resultado;\n }", "title": "" }, { "docid": "88f3fd0e263a69e5b3e7100a3b41b83b", "score": "0.5589775", "text": "public function getPiezasEquipoNoSelect($equipo){\n\n\t\t$em = $this->getEntityManager(); \n\n\t\t$array = array(); \n \n $pieza = 'SELECT p.id, p.pieza FROM InformaticaBundle:Pieza p WHERE p.id <> 0 ORDER By p.id ASC';\n \t\t// AND p.id not in (SELECT pp.id FROM InformaticaBundle:InventarioEquipo ie JOIN ie.pieza pp WHERE ie.equipo=:equipo) ORDER By p.id ASC';\n $pieza = $em->createQuery($pieza); \n $pieza = $pieza\n \t\t\t//->setParameter('equipo', $equipo )\n \t\t\t->getResult();\n\n return $pieza; \n\t}", "title": "" }, { "docid": "107b72af63051358dc5e839516d7cd5f", "score": "0.55879366", "text": "public function select($tipo_proyecto);", "title": "" }, { "docid": "5008dc3faea3ef08459aa5c1822f2585", "score": "0.5537038", "text": "public function delete($tipo_equipo);", "title": "" }, { "docid": "f2cbc4e2534bcf61e38a0236131b6ee9", "score": "0.5516762", "text": "public function getIdEquipamento() {\n return $this->idEquipamento;\n }", "title": "" }, { "docid": "f89346b2f8dbb477345edb3fd22b511d", "score": "0.55124235", "text": "public function carregarEquipamento($equipid)\n {\n /* verifica se existe valor */\n if (isset($equipid) && !empty ($equipid))\n {\n /* monta query */\n $query = \"select\n e.tipo_equipamento as nome , f.nome as fabricante , f.id as idFabri\n from tb_equipamento e\n inner join tb_fabricante f on f.id = e.id_fabricante\n where e.id = {$equipid}\";\n \n /* monta result */\n $result = $this->db->select($query);\n \n /* verifica se existe respota */\n if ($result)\n {\n /* verifica se existe valor */\n if (@mysql_num_rows($result) > 0)\n {\n /* arruma os valores no array */\n while ($row = @mysql_fetch_assoc($result))\n $retorno[] = $row;\n /* retorna o array com os valores */\n return $retorno;\n }\n else\n /* fim */\n return false;\n }\n else\n /* fim */\n return false;\n }\n else\n /* fim */\n return false;\n }", "title": "" }, { "docid": "6ee4396c7a44d747933f1b3ca2246933", "score": "0.54958135", "text": "public function guardarEquipoEmpaqueItems($idEmpaque,$idCaja,$valores,$idElemento,$modelo,$procesoSistema,$usrEmpaque){\n\t\t\t$objEquipo=new funcionesComunes();\n\t\t\t//echo \"<br>\".$idElemento=\"#\".$idElemento;\n\t\t\techo \"<br>\".$idElemento=$idElemento;\n\t\t\t$valores=explode(\",\",$valores);\n\t\t\techo \"<br>Imei: \".$valores[0];\n\t\t\techo \"<br>Sim: \".$valores[2];\n\t\t\t$estaEnviado=$objEquipo->buscarImeiEnviadoProceso($valores[0]);\n\t\t\t$esNoEnviar=$objEquipo->buscarNoEnviar($valores[0]);\n\t\t\t$estaEnBd=$objEquipo->buscarImei($valores[0]);\n\t\t\t$estaEmpacado=$objEquipo->buscarImeiEmpacado($valores[0]);\n\t\t\t$esScrap=$objEquipo->buscarImeiScrap($valores[0]);\n\t\t\t$estaActualizado=$objEquipo->buscarImeiActualizadoNoEmpacado($valores[0]);\n\t\t\t$escorrectoModelo=$objEquipo->buscarImeiVsModelo($valores[0],$modelo);\n\t\t\tif($estaEnBd==0){\n\t\t\t\t$msgCaja=\"EQUIPO no existe en Base de Datos\";\n\t\t\t\t$color=\"red\";\n\t\t\t\t$fuente=\"white\";\n\t\t\t\t//return;\n\t\t\t}else if($estaEnviado==1){//\n\t\t\t\t$msgCaja=\"Equipo enviado\";\n\t\t\t\t$color=\"red\";\n\t\t\t\t$fuente=\"white\";\n\t\t\t\t//return;\n\t\t\t}else if($esNoEnviar==1){\n\t\t\t\t$msgCaja=\"Equipo no Enviar\";\n\t\t\t\t$color=\"red\";\n\t\t\t\t$fuente=\"white\";\n\t\t\t\t//return;\n\t\t\t}else if($estaEmpacado==1){\n\t\t\t\t$msgCaja=\"Equipo empacado\";\n\t\t\t\t$color=\"red\";\n\t\t\t\t$fuente=\"white\";\n\t\t\t\t//return;\n\t\t\t}else if($esScrap==1){\n\t\t\t\t$msgCaja=\"Equipo marcado como Scrap\";\n\t\t\t\t$color=\"red\";\n\t\t\t\t$fuente=\"white\";\n\t\t\t}else if($estaActualizado==1){\n\t\t\t\t$msgCaja=\"Equipo actualizado No Empacado\";\n\t\t\t\t$color=\"orange\";\n\t\t\t\t$fuente=\"white\";\n\t\t\t}else if($escorrectoModelo==0){\n\t\t\t\t$msgCaja=\"Modelo Incorrecto del Equipo\";\n\t\t\t\t$color=\"red\";\n\t\t\t\t$fuente=\"white\";\n\t\t\t}else{\n\t\t\t\t//se extrae la informacion del equipo\n\t\t\t\techo \"<br>\".$sqlEquipo=\"SELECT * from equipos where imei='\".$valores[0].\"'\";\n\t\t\t\t$resEquipo=mysql_query($sqlEquipo,$this->conectarBd());\n\t\t\t\t$rowRadio=mysql_fetch_array($resEquipo);\n\t\t\t\tif($rowRadio[\"status\"]==\"WIP\" && $rowRadio[\"statusProceso\"]==\"Empaque\" && $rowRadio[\"statusIngenieria\"]==\"ING_OK\" && $rowRadio[\"statusEmpaque\"]==\"N/A\"){\n\t\t\t\t\t//se inserta en el detalle de la caja y se actualiza el equipo\n\t\t\t\t\techo \"<br>\".$sqlActualiza=\"update equipos set statusEmpaque='EMPACADO',statusProceso='Empacado' WHERE imei='\".$valores[0].\"'\";\n\t\t\t\t\t//se ejecutan las consultas\n\t\t\t\t\t$resActualizaEquipo=mysql_query($sqlActualiza,$this->conectarBd());\n\t\t\t\t\t//consulta de insercion\n\t\t\t\t\techo \"<br>\".$sqlItems=\"INSERT INTO empaque_items (id_empaque,imei,sim,serial,mfgdate,id_caja,fecha,hora) values('\".$idEmpaque.\"','\".$valores[0].\"','\".$valores[2].\"','\".$valores[1].\"','\".$valores[3].\"','\".$idCaja.\"','\".date(\"Y-m-d\").\"','\".date(\"h:i:s\").\"')\";\t\n\t\t\t\t\tif($resActualizaEquipo){\n\t\t\t\t\t\t//se guarda el detalle del radio\n\t\t\t\t\t\t$objEquipo->guardaDetalleSistema($procesoSistema,$usrEmpaque,$valores[0]);\n\t\t\t\t\t\t//se procede a insertar el item del empaque\n\t\t\t\t\t\t$resItemEmpaque=mysql_query($sqlItems,$this->conectarBd());\n\t\t\t\t\t\tif($resItemEmpaque){\n\t\t\t\t\t\t\t$msgCaja=\"Guardado\";\n\t\t\t\t\t\t\t$color=\"green\";\n\t\t\t\t\t\t\t$fuente=\"white\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$msgCaja=\"Actualizado / Error\";\n\t\t\t\t\t\t\t$color=\"red\";\n\t\t\t\t\t\t\t$fuente=\"white\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$msgCaja=\"No Actualizado\";\n\t\t\t\t\t\t$color=\"red\";\n\t\t\t\t\t\t$fuente=\"white\";\n\t\t\t\t\t}\n\t\t\t\t}else if($rowRadio[\"status\"]==\"WIP\" && $rowRadio[\"statusProceso\"]==\"Empaque\" && $rowRadio[\"statusEmpaque\"]==\"EMPACADO\"){\n\t\t\t\t\t$msgCaja=\"Equipo empacado en otro envio\";\n\t\t\t\t\t$color=\"red\";\n\t\t\t\t\t$fuente=\"white\";\n\t\t\t\t}else{\n\t\t\t\t\t$msgCaja=\"Verifique el Equipo\";\n\t\t\t\t\t$color=\"orange\";\n\t\t\t\t\t$fuente=\"black\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//se escribe el resultado en el elemento indicado\n\t\t\t\techo \"<script type='text/javascript'>document.getElementById('\".$idElemento.\"').value='\".$msgCaja.\"'; </script>\";\n\t\t\t\techo \"<script type='text/javascript'>document.getElementById('\".$idElemento.\"').style.background='\".$color.\"'; </script>\";\n\t\t\t\techo \"<script type='text/javascript'>document.getElementById('\".$idElemento.\"').style.color='\".$fuente.\"'; </script>\";\n\t\t\t}\n\t\t\techo \"<script type='text/javascript'>document.getElementById('\".$idElemento.\"').value='\".$msgCaja.\"'; </script>\";\n\t\t\techo \"<script type='text/javascript'>document.getElementById('\".$idElemento.\"').style.background='\".$color.\"'; </script>\";\n\t\t\techo \"<script type='text/javascript'>document.getElementById('\".$idElemento.\"').style.color='\".$fuente.\"'; </script>\";\n\t\t}", "title": "" }, { "docid": "99bcd27aa936bf328818a0e9379cdc2c", "score": "0.5489635", "text": "function buscaProduto($conexao, $id){\n\t\t\n\t\t$query = \"select * from produtos where id = {$id}\";\n \t$resultado = mysqli_query($conexao, $query);\n\t\t$produto_buscado = mysqli_fetch_assoc($resultado);\t\n\t\t\n \t\t$categoria = new Categoria();\n \t$categoria->setId($produto_buscado['categoria_id']);\n \n \n \t$produto = new Produto();\n \n \t$produto->setId($produto_buscado[\"id\"]);\n \t$produto->setNome($produto_buscado[\"nome\"]);\n \t$produto->setPreco($produto_buscado[\"preco\"]);\n \t$produto->setDescricao($produto_buscado[\"descricao\"]);\n \t$produto->setCategoria($categoria);\n \t$produto->setUsado($produto_buscado[\"usado\"]);\n \n \treturn $produto;\n\t}", "title": "" }, { "docid": "5e4c3d7dc2cdc98fa796db53b7d75693", "score": "0.54664034", "text": "public static function getFromExtTableUnite_joueur($unite_joueur=0) {\n\t\t$listeObjet = array();\n\t\t// Lancement de la requete\n\t\t$requete = 'SELECT * FROM `equipement_joueur` ';\n\t\tif ($unite_joueur == 0) {\n\t\t\t$requete .= 'WHERE unite_joueur > 0 ORDER BY id ASC';\n\t\t} else {\n\t\t\t$requete .= 'WHERE unite_joueur = :unite_joueur ORDER BY id ASC';\n\t\t\t//Il faut que le parametre soit dans un array pour le BIND\n\t\t\t$unite_joueur = array(':unite_joueur' => $unite_joueur);\n\t\t}\n\t\tdatabase::getInstance() -> prepareRequete($requete);\n\t\tif (is_array($unite_joueur) || $unite_joueur > 0) {\n\t\t\tdatabase::getInstance() -> bind($unite_joueur);\n\t\t}\n\t\tif (! database::getInstance() -> executeRequete()) {\n\t\t\tthrow new Exception(__CLASS__.'::'.__FUNCTION__.'(): Impossible de lire la table equipement_joueur');\n\t\t}\n\t\t// Recuperation des donnees\n\t\t$datas = database::getInstance() -> getTableauResultat();\n\t\t// Traitement des donnees\n\t\tforeach ($datas AS $data) {\n\t\t\t$listeObjet[] = new Equipement_joueur($data['id'],$data['membre'],$data['unite_joueur'],$data['nom'],$data['description'],$data['categorie'],$data['cp'],$data['lp'],$data['mtcp'],$data['mtlp'],$data['dommage'],$data['msvg'],$data['gabarit'],$data['type'],$data['fo'],$data['sauvegarde'],$data['mmvt'],$data['encombrement'],$data['deux_mains'],$data['cout'],$data['date_creation'],$data['used'],$data['chemin'],$data['tile'],$data['usure'],$data['demontable'],$data['date_fin_reparation'],$data['ingame']);\n\t\t}\n\t\tif (sizeof($listeObjet) == 1) {\n\t\t\t$listeObjet = $listeObjet[0];\n\t\t}\n\t\treturn $listeObjet;\n\t}", "title": "" }, { "docid": "bb2dafad09351dc2756ff40b80c92b7d", "score": "0.5439141", "text": "public function insert($tipo_proyecto);", "title": "" }, { "docid": "34c85abc24c935a5788f5c67c306fc6b", "score": "0.5400894", "text": "public function equipos(){\n return $this->belongsToMany(Equipo::class);\n }", "title": "" }, { "docid": "05b5713cd92f05656ea73082bab6a150", "score": "0.5396054", "text": "function consultarTodosLosEquipajes() {\n $resultado = $this->controlBD->consultarEquipaje();\n return $resultado;\n }", "title": "" }, { "docid": "a357a4eb6a0025668e08ef806ae46c2a", "score": "0.5394264", "text": "public function inserir_Equipamento($data){\n $this->db->insert('equipamento', $data);\n \n }", "title": "" }, { "docid": "83bac52cea1e373874ae4afa2cfdda9c", "score": "0.53902584", "text": "public function create(Equipo $equipo)\n {\n $componente = Componente::getComponentes();\n $estados_componente = EstadoComponente::all();\n //dd($estados_componente);\n $tipos_mantenimientos = TipoMantenimiento::all();\n $id_sede = (int) $equipo->id_sede;\n $id_empresa = (int) $equipo->id_empresa;\n $sede_equipo = Sede::getsedeEquipo($id_sede);\n $empresa_equipo = Empresa::getempresaEquipo($id_empresa);\n $administradores = User::getAdministradores();\n return view('mantenimientos.create', [\n 'mantenimiento' => new Mantenimiento,\n 'equipo' => $equipo,\n 'componente' => $componente,\n ], compact('tipos_mantenimientos', 'sede_equipo', 'empresa_equipo', 'administradores', 'estados_componente'));\n }", "title": "" }, { "docid": "25a85b67319074ad41056ddf5276e44e", "score": "0.5381482", "text": "public function crearFromItem(Item $producto){\n $bodegas=Bodega::model()->findAll();\n if(is_array($bodegas)){\n foreach($bodegas as $key =>$value){\n $crit=self::setCriterio($producto->id,$value->id);\n $item_bodega=Itembodega::model()->find($crit);\n if($item_bodega==null){\n $relacion=new ItemBodega;\n $relacion->setScenario('ínsert');\n $relacion->idbodega=$value->id;\n $relacion->iditem=$producto->id;\n $relacion->stock=0;\n $relacion->stockcomprometido=0;\n $relacion->stockporllegar=0;\n $relacion->stockcomprometido=0;\n $relacion->idempresa=$this->empresa_id;\n $relacion->save();\n }\n }\n }\n }", "title": "" }, { "docid": "f6c9f2a76e7539ae132e82a7ab16d11a", "score": "0.5346431", "text": "public function mostrarTipoProducto(){\n\t\tif ($this->hayError()==true){\n\t\t\treturn null;\n\t\t}else{\n\t\t\t$resultado=$this->conexion()->query(\"SELECT * FROM tipo_producto\");\n\t\t\treturn $resultado;\n\t\t}\n\t}", "title": "" }, { "docid": "f5db384629d64e0c451023c4cff4dc32", "score": "0.5337963", "text": "private function buscaObjetivos() {\n\n $oDaoOrcProgramaVinculoObjetivo = db_utils::getDao(\"orcprogramavinculoobjetivo\");\n $sWhere = \" o144_orcprogramaprograma = {$this->iCodigoPrograma}\";\n $sWhere .= \" and o144_orcprogramaanousu = {$this->iAno}\";\n $sSQL = $oDaoOrcProgramaVinculoObjetivo->sql_query(\"null\", \"*\", null, $sWhere);\n $rsResultado = db_query($sSQL);\n $iTotalObjetivos = pg_num_rows($rsResultado);\n\n if (!$rsResultado) {\n\n $sMensagemErro = \"Erro Técnico: erro ao buscar vínculo entre o Programa {$this->iCodigoPrograma}\";\n $sMensagemErro .= \" e o Objetivos.\";\n $sMensagemErro .= $oDaoOrcProgramaVinculoObjetivo->erro_msg;\n throw new DBException($sMensagemErro);\n }\n\n $this->aObjetivos = array();\n for ($iObjetivo = 0; $iObjetivo < $iTotalObjetivos; $iObjetivo++) {\n\n $oStdObjetivo = db_utils::fieldsMemory($rsResultado, $iObjetivo);\n $oObjetivo = new ProgramaObjetivo($oStdObjetivo->o144_orcobjetivo);\n $this->aObjetivos[$oStdObjetivo->o144_orcobjetivo] = $oObjetivo;\n }\n }", "title": "" }, { "docid": "c27f7fb2dbcc094946f500d50f6cfd5e", "score": "0.5337449", "text": "function actualizarEquipaje($id, $descripcion, $tipo, $peso, $idReserva) {\n $equipaje = new Equipajeclass();\n $equipaje->setId($id);\n $equipaje->setDescripcion($descripcion);\n $equipaje->setTipo($tipo);\n $equipaje->setPeso($peso);\n $equipaje->setReservaId($idReserva);\n $resultado = $this->controlBD->editarEquipaje($equipaje);\n return ($resultado);\n }", "title": "" }, { "docid": "5a77b88fdab546688e1cf5615cc978c5", "score": "0.53367734", "text": "public static function ingresartipoentrada()\n {\n // values (?,?)', [\"123\",\"Editorial Bersunsa\"]);\n\n }", "title": "" }, { "docid": "71467e62fd33c1a3978b29cf9036fcbb", "score": "0.53267103", "text": "static function etapas_tipo_proceso($idTipoProceso){\n return $etapas=Etapa::where('tipo_procesos_id', $idTipoProceso)->orderBy('indice', 'asc')->get();\n }", "title": "" }, { "docid": "2a3f5f95eb21887512515b27f571d33e", "score": "0.5324856", "text": "public static function getFromExtTableCategorie($categorie=0) {\n\t\t$listeObjet = array();\n\t\t// Lancement de la requete\n\t\t$requete = 'SELECT * FROM `equipement_joueur` ';\n\t\tif ($categorie == 0) {\n\t\t\t$requete .= 'WHERE categorie > 0 ORDER BY id ASC';\n\t\t} else {\n\t\t\t$requete .= 'WHERE categorie = :categorie ORDER BY id ASC';\n\t\t\t//Il faut que le parametre soit dans un array pour le BIND\n\t\t\t$categorie = array(':categorie' => $categorie);\n\t\t}\n\t\tdatabase::getInstance() -> prepareRequete($requete);\n\t\tif (is_array($categorie) || $categorie > 0) {\n\t\t\tdatabase::getInstance() -> bind($categorie);\n\t\t}\n\t\tif (! database::getInstance() -> executeRequete()) {\n\t\t\tthrow new Exception(__CLASS__.'::'.__FUNCTION__.'(): Impossible de lire la table equipement_joueur');\n\t\t}\n\t\t// Recuperation des donnees\n\t\t$datas = database::getInstance() -> getTableauResultat();\n\t\t// Traitement des donnees\n\t\tforeach ($datas AS $data) {\n\t\t\t$listeObjet[] = new Equipement_joueur($data['id'],$data['membre'],$data['unite_joueur'],$data['nom'],$data['description'],$data['categorie'],$data['cp'],$data['lp'],$data['mtcp'],$data['mtlp'],$data['dommage'],$data['msvg'],$data['gabarit'],$data['type'],$data['fo'],$data['sauvegarde'],$data['mmvt'],$data['encombrement'],$data['deux_mains'],$data['cout'],$data['date_creation'],$data['used'],$data['chemin'],$data['tile'],$data['usure'],$data['demontable'],$data['date_fin_reparation'],$data['ingame']);\n\t\t}\n\t\tif (sizeof($listeObjet) == 1) {\n\t\t\t$listeObjet = $listeObjet[0];\n\t\t}\n\t\treturn $listeObjet;\n\t}", "title": "" }, { "docid": "41fdba6823de9aeffe587535e7b28662", "score": "0.5322119", "text": "function buscaTipo(){\n\t//AVERIGUAR VENTA O POSTVENTA\n\t$queryUsuario = sprintf(\"SELECT id_usuario, nombre_usuario,\n\t\t\t\t\t\t\t CONCAT_WS(' ', nombre_empleado, apellido) AS nombre,\n\t\t\t\t\t\t\t clave_filtro,\n\t\t\t\t\t\t\t\t\t(CASE clave_filtro\n\t\t\t\t\t\t\t\t\t\t WHEN 1 THEN 'Ventas'\n\t\t\t\t\t\t\t WHEN 2 THEN 'Ventas'\n\t\t\t\t\t\t\t\t\t\t WHEN 4 THEN 'Postventa'\n\t\t\t\t\t\t\t WHEN 5 THEN 'Postventa'\n\t\t\t\t\t\t\t WHEN 6 THEN 'Postventa'\n\t\t\t\t\t\t\t WHEN 7 THEN 'Postventa'\n\t\t\t\t\t\t\t WHEN 8 THEN 'Postventa'\n\t\t\t\t\t\t\t WHEN 26 THEN 'Postventa'\n\t\t\t\t\t\t\t WHEN 400 THEN 'Postventa'\n\t\t\t\t\t\t\t\t\tEND) AS tipo\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tFROM pg_usuario\n\t\t\t\t\t\t\t\t\tINNER JOIN pg_empleado ON pg_usuario.id_empleado = pg_empleado.id_empleado\n\t\t\t\t\t\t\t\t\tINNER JOIN pg_cargo_departamento ON pg_empleado.id_cargo_departamento = pg_cargo_departamento.id_cargo_departamento\n\t\t\t\t\t\t\t\tWHERE id_usuario = %s \",\n\t\t\t\t\t\tvalTpDato($_SESSION['idUsuarioSysGts'],\"int\"));\n\n\t$rsUsuario = mysql_query($queryUsuario);\n\tif (!$rsUsuario) return array(false, mysql_error().\"\\nError Nro: \".mysql_errno().\"\\nLine: \".__LINE__.\"\\n\".$queryUsuario);\n\t$row = mysql_fetch_array($rsUsuario);\n\n\treturn array(true, $row['tipo']);\n}", "title": "" }, { "docid": "8289040fe7853d65cc7b1c793bb905cf", "score": "0.5317463", "text": "private function assignarJugadorForm($equipos){\n // $this->smarty->assign('equipo', $equipo);\n $this->smarty->assign('equipos', $equipos);\n // $this->smarty->assign('nom_corto', $nom_corto);\n // $this->smarty->assign('ganados', $ganados);\n // $this->smarty->assign('perdidios', $perdidios);\n // $this->smarty->assign('porcentaje', $porcentaje);\n // $this->smarty->assign('dif_partido', $dif_partido);\n // $this->smarty->assign('conferencia', $conferencia);\n }", "title": "" }, { "docid": "cefbd311b9c5889b233562ab1513c12c", "score": "0.53150535", "text": "public static function getFromTableEquipement_joueur($id=-1) {\n\t\t//Generated by FactoryGenerator::generateGetAllFromTable() on 03/04/2017 15:27:43\n\t\t$listeObjet = array();\n\t\t// Lancement de la requete\n\t\tif (empty(self::$_requete)) {\n\t\t\t$requete = 'SELECT * FROM `equipement_joueur`';\n\t\t} else {\n\t\t\t$requete = self::$_requete;\n\t\t}\n\t\tif (!is_array($id)) {\n\t\t\tif ($id > -1) {\n\t\t\t\t$requete .= ' WHERE id = :id';\n\t\t\t\t//Il faut que le parametre soit dans un array pour le BIND\n\t\t\t\t$id = array(':id' => $id);\n\t\t\t} else {\n\t\t\t\t/* Tous les objets ==> il faut les ordonner */\n\t\t\t\t$requete .= ' ORDER BY id ASC';\n\t\t\t}\n\t\t} else {\n\t\t\t$requete .= ' WHERE id IN ('.implode(\",\",$id).') ORDER BY id ASC';\n\t\t}\n\t\tdatabase::getInstance() -> prepareRequete($requete);\n\t\tif (is_array($id) || $id > -1) {\n\t\t\tdatabase::getInstance() -> bind($id);\n\t\t}\n\t\tif (! database::getInstance() -> executeRequete()) {\n\t\t\tthrow new Exception(__CLASS__.'::'.__FUNCTION__.'(): Impossible de lire la table equipement_joueur');\n\t\t}\n\t\t// Recuperation des donnees\n\t\t$datas = database::getInstance() -> getTableauResultat();\n\t\t\n\t/*\n\t * Entre ces deux balises vous pourrez mettre votre code specifique a la classe.\n\t * Il sera preserve lors de la reconstruction automatique.\n\t */\n\t/*[TAG-Equipement_joueur2]*/\t/*[/TAG-Equipement_joueur2]*/\n\n\t\t/* Traitement des donnees */\n\t\tforeach ($datas AS $data) {\n\t\t\t/* objet par defaut */\n\t\t\t$listeObjet[] = new Equipement_joueur($data['id'],$data['membre'],$data['unite_joueur'],$data['nom'],$data['description'],$data['categorie'],$data['cp'],$data['lp'],$data['mtcp'],$data['mtlp'],$data['dommage'],$data['msvg'],$data['gabarit'],$data['type'],$data['fo'],$data['sauvegarde'],$data['mmvt'],$data['encombrement'],$data['deux_mains'],$data['cout'],$data['date_creation'],$data['used'],$data['chemin'],$data['tile'],$data['usure'],$data['demontable'],$data['date_fin_reparation'],$data['ingame']);\n\t\t\n\t/*\n\t * Entre ces deux balises vous pourrez mettre votre code specifique a la classe.\n\t * Il sera preserve lors de la reconstruction automatique.\n\t */\n\t/*[TAG-getFromTableEquipement_joueur1]*/\t/*[/TAG-getFromTableEquipement_joueur1]*/\n\n\t\t}\n\t\tif (!empty($listeObjet) && sizeof($listeObjet) == 1) {\n\t\t\t$listeObjet = $listeObjet[0];\n\t\t}\n\t\treturn $listeObjet;\n\t}", "title": "" }, { "docid": "abe625c2d7ea6570ec2f09d53fae4db9", "score": "0.5300299", "text": "protected static function datos_item_modelo($tipo,$id){\r\n\t\t\tif ($tipo==\"Unico\") {\r\n\t\t\t\t\t$sql=mainModel::conectar()->prepare(\"SELECT * FROM item WHERE item_id=:ID\");\r\n\t\t\t\t\t$sql->bindParam(\":ID\",$id);\r\n\t\t\t\t\t\r\n\t\t\t}elseif($tipo==\"Conteo\"){\r\n\t\t\t\t\t$sql=mainModel::conectar()->prepare(\"SELECT item_id FROM item\");\r\n\t\t\t}\r\n\t\t\t$sql->execute();\r\n\r\n\t\t\treturn $sql;\t\r\n\t\t}", "title": "" }, { "docid": "0b1b2c06e7349b902a5d497517e98ed8", "score": "0.5299837", "text": "public function Fortiptit_Forpoa() {\n $this->c = new Criteria();\n $this->c->addAscendingOrderByColumn(FortiptitPeer::CODTIP);\n\n $this->columnas = array(\n FortiptitPeer :: CODTIP => 'Codigo',\n FortiptitPeer :: DESTIP => 'Nombre Extendido'\n );\n }", "title": "" }, { "docid": "a8748b0c015cbc4e7ce7bd14d8ae8a7a", "score": "0.52829736", "text": "public function cantidad() {\n $usuarioanteproyectos = array();\n try {\n $sql = 'SELECT e.idequipo ,concat( u.nombre,\" \",u.apellido ) as nombres, r.status FROM tb_anteproyecto r INNER join tb_equipo e on e.idequipo = r.idequipo INNER join tb_usuario u on u.idUsuario = e.idUsuario and r.status = 2 GROUP by r.idequipo ORDER by r.status ASC';\n $cn = DataBase::getInstancia();\n $stmp = $cn->prepare($sql);\n $stmp->execute();\n foreach ($stmp->fetchAll(PDO::FETCH_OBJ) as $obj) {\n $usuarioanteproyectos[] = new UsuarioAnteproyecto($obj->idequipo, $obj->nombres, $obj->status);\n }\n } catch (PDOException $ex) {\n echo $ex->getMessage();\n }\n return $usuarioanteproyectos;\n }", "title": "" }, { "docid": "7a8d6a7c7c27d51c74c1b56c35c075a4", "score": "0.52620536", "text": "function consultaTipoProducto( $accion, $data )\n\t{\n\t\t$validar = new Validar();\n\n\t\t// SETEO VARIABLES GENERALES\n \t\t$data->tipoProducto = isset( $data->tipoProducto ) ? (string)$data->tipoProducto : NULL;\n\n \t\t// VALIDACIONES\n \t\t$idTipoProducto = 'NULL';\n \t\tif( $accion == 'update' ):\n \t\t\t$data->idTipoProducto = isset( $data->idTipoProducto ) ? (int)$data->idTipoProducto : NULL;\n \t\t\t$idTipoProducto = $validar->validarEntero( $data->idTipoProducto, NULL, TRUE, 'El ID del Tipo de Producto no es válido' );\n \t\tendif;\n\n\t\t$tipoProducto = $medida = $this->con->real_escape_string( $validar->validarTexto( $data->tipoProducto, NULL, TRUE, 3, 45, 'el Tipo Producto' ) );\n\t\t\n\t\t// OBTENER RESULTADO DE VALIDACIONES\n \t\tif( $validar->getIsError() ):\n\t \t\t$this->respuesta = 'danger';\n\t \t\t$this->mensaje = $validar->getMsj();\n\n \t\telse:\n\t \t\t$sql = \"CALL consultaTipoProducto( '{$accion}', {$idTipoProducto}, '{$tipoProducto}' );\";\n\n\t \t\tif( $rs = $this->con->query( $sql ) AND $row = $rs->fetch_object() ){\n\t \t\t\t$this->con->siguienteResultado();\n\n \t\t\t\t$this->respuesta = $row->respuesta;\n \t\t\t\t$this->mensaje = $row->mensaje;\n \t\t\t\tif( $accion == 'insert' AND $this->respuesta == 'success' )\n \t\t\t\t\t$this->data = (int)$row->id;\n \t\t\t\n\t \t\t}\n\t \t\telse{\n\t \t\t\t$this->respuesta = 'danger';\n\t \t\t\t$this->mensaje = 'Error al ejecutar la instrucción.';\n\t \t\t}\n\n \t\tendif;\n\n \t\treturn $this->getRespuesta();\n\t}", "title": "" }, { "docid": "54794b5ba253265eccbfdbbd78822660", "score": "0.52601105", "text": "public function mostrar_Requisicoes_Equipamentos2($slug){\n \n\n $this->db->select('requisicao.id \"idreq\",requisicao.data_inicio,requisicao.data_fim,requisicao.hora_inicio,requisicao.hora_fim,\n requisicao.utilizador_id,requisicao.tipologia_id,utilizador.nome \"nomeuser\",tipologia.id,tipologia.nome,requisicao_has_equipamento.quantidade,\n requisicao_has_equipamento.equipamento_id,equipamento.nome \"equipnome\"');\n $this->db->from('requisicao');\n $this->db->join('utilizador', 'utilizador.id = requisicao.utilizador_id');\n $this->db->join('tipologia', 'tipologia.id = requisicao.tipologia_id');\n $this->db->join('requisicao_has_equipamento', 'requisicao_has_equipamento.requisicao_id = requisicao.id' );\n $this->db->join('equipamento', 'equipamento.id = requisicao_has_equipamento.equipamento_id');\n $this->db->like('utilizador.nome',$slug);\n // se quisermos multiplas procuras colocamos or_like.\n $this->db->or_like('requisicao_has_equipamento.quantidade',$slug);\n $this->db->or_like('tipologia.nome',$slug);\n $this->db->or_like('requisicao.data_inicio',$slug);\n \n $query = $this->db->get();\n return $query->result_array();\n }", "title": "" }, { "docid": "fefdd7446804224be2c685ddf3bb4056", "score": "0.5255034", "text": "public function insertProdotto($prodotto){ //insert vista dal punto di vista del database, non del prodotto: per questo è qui e non in una eventuale classe prodotto\n $toInsert = \"INSERT INTO PRODOTTO(IDProdotto, Categoria, Nome, Marca, Prezzo, DataInizio, isOfferta) VALUES (?, ?, ?, ?, ?, ?, ?);\";\n //$this -> connect();\n $stmt = $this -> pdo -> prepare($toInsert);\n $okai = $stmt -> execute([$prodotto -> getID(), $prodotto -> getCategoria(), $prodotto -> getNome(), $prodotto -> getMarca(), $prodotto -> getPrezzo(), $prodotto -> getDataInizioPrezzo(), $prodotto -> getOfferta()]);\n //$this -> close();\n return $okai;\n }", "title": "" }, { "docid": "932277a2420be0ef9d77f2cda3a41a07", "score": "0.5254867", "text": "public function MostrarEquiposC(){\n\n $tabla = \"ct_equipos\";\n\n $respuesta = EppM::MostrarEquiposM($tabla);\n\n foreach ($respuesta as $key => $value) {\n\n echo '<input class=\"form-control\" name=\"equipoR\" style=\"width: 80%;\" value=\"'.$value[\"NEquipo\"].'\" readonly><br><br>\n <select class=\"form-control\" style=\"width: 10%;\" id=\"RelementoR\" name=\"RelementoR\">\t\t\t\t\t\t\n <option value=\"0\">No</option>\n <option value=\"5\">Si</option>\n <option value=\"\">N/A</option>\n </select>';\n }\n }", "title": "" }, { "docid": "4541d469c55c6fa84eab7cd96a47c570", "score": "0.5242666", "text": "public static function getFromExtTableType($type=0) {\n\t\t$listeObjet = array();\n\t\t// Lancement de la requete\n\t\t$requete = 'SELECT * FROM `equipement_joueur` ';\n\t\tif ($type == 0) {\n\t\t\t$requete .= 'WHERE type > 0 ORDER BY id ASC';\n\t\t} else {\n\t\t\t$requete .= 'WHERE type = :type ORDER BY id ASC';\n\t\t\t//Il faut que le parametre soit dans un array pour le BIND\n\t\t\t$type = array(':type' => $type);\n\t\t}\n\t\tdatabase::getInstance() -> prepareRequete($requete);\n\t\tif (is_array($type) || $type > 0) {\n\t\t\tdatabase::getInstance() -> bind($type);\n\t\t}\n\t\tif (! database::getInstance() -> executeRequete()) {\n\t\t\tthrow new Exception(__CLASS__.'::'.__FUNCTION__.'(): Impossible de lire la table equipement_joueur');\n\t\t}\n\t\t// Recuperation des donnees\n\t\t$datas = database::getInstance() -> getTableauResultat();\n\t\t// Traitement des donnees\n\t\tforeach ($datas AS $data) {\n\t\t\t$listeObjet[] = new Equipement_joueur($data['id'],$data['membre'],$data['unite_joueur'],$data['nom'],$data['description'],$data['categorie'],$data['cp'],$data['lp'],$data['mtcp'],$data['mtlp'],$data['dommage'],$data['msvg'],$data['gabarit'],$data['type'],$data['fo'],$data['sauvegarde'],$data['mmvt'],$data['encombrement'],$data['deux_mains'],$data['cout'],$data['date_creation'],$data['used'],$data['chemin'],$data['tile'],$data['usure'],$data['demontable'],$data['date_fin_reparation'],$data['ingame']);\n\t\t}\n\t\tif (sizeof($listeObjet) == 1) {\n\t\t\t$listeObjet = $listeObjet[0];\n\t\t}\n\t\treturn $listeObjet;\n\t}", "title": "" }, { "docid": "08f6e2c6d3d0f77d06703614bf925fd4", "score": "0.52387285", "text": "function lerUm()\n {\n // selecionar consultar todos\n $query = \"SELECT\n c.nome as categoria_nome, p.id, p.nome, p.descricao, p.preco, p.categoria_id, p.criado\n FROM\n \" . $this->tabela_nome . \" p\n LEFT JOIN\n categorias c\n ON p.categoria_id = c.id\n WHERE\n p.id = ?\n LIMIT\n 0,1\";\n\n //preparar declaração de consulta\n $stmt = $this->conn->prepare($query);\n\n // ID de ligação do produto a ser atualizado\n $stmt->bindParam(1, $this->id);\n\n // executar consulta\n $stmt->execute();\n\n // obter linha recuperada\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n // definir valores para propriedades do objeto\n $this->nome= $row['nome'];\n $this->preco= $row['preco'];\n $this->descricao= $row['descricao'];\n $this->categoria_id= $row['categoria_id'];\n $this->categoria_nome = $row['categoria_nome'];\n \n }", "title": "" }, { "docid": "a3c4a528bb499bfc38799a313104266d", "score": "0.52351296", "text": "public function mostrar_Requisicoes_Equipamentos($slug){\n \n $this->db->select('requisicao.id \"idreq\",requisicao.data_inicio,requisicao.data_fim,requisicao.hora_inicio,requisicao.hora_fim,\n requisicao.utilizador_id,requisicao.tipologia_id,utilizador.nome \"nomeuser\",tipologia.id,tipologia.nome,requisicao_has_equipamento.quantidade,\n requisicao_has_equipamento.equipamento_id,equipamento.nome \"equipnome\",requisicao_has_equipamento.id \"idreqequip\"');\n $this->db->from('requisicao');\n $this->db->join('utilizador', 'utilizador.id = requisicao.utilizador_id');\n $this->db->join('tipologia', 'tipologia.id = requisicao.tipologia_id');\n $this->db->join('requisicao_has_equipamento', 'requisicao_has_equipamento.requisicao_id = requisicao.id' );\n $this->db->join('equipamento', 'equipamento.id = requisicao_has_equipamento.equipamento_id');\n $this->db->like('utilizador.nome',$slug);\n $this->db->or_like('requisicao_has_equipamento.quantidade',$slug);\n $this->db->or_like('tipologia.nome',$slug);\n $this->db->or_like('requisicao.data_inicio',$slug);\n $this->db->or_like('requisicao.data_fim',$slug);\n $this->db->or_like('equipamento.nome',$slug);\n $query = $this->db->get();\n return $query->result_array();\n }", "title": "" }, { "docid": "2b3393763135f1c28de5fb90ecac99a7", "score": "0.52130276", "text": "function crear_objetos($nombre_objeto, $valores_comunes){\nif($this->depurar_objeto) $this->depurar_mensaje(\"OBJETO: \".$nombre_objeto);\n $arra_comun=array();\n if($valores_comunes) \n\t\t\tforeach($valores_comunes as $comun)\t\n\t\t\t$this->addArray($arra_comun, $comun, $this->{$comun});\n\t\t$this->{$nombre_objeto}=new $nombre_objeto($arra_comun) ;\n if($nombre_objeto=='registro'){\n\t\t\t$this->user=$this->registro->user;\n\t\t\t$this->password=$this->registro->password;\n\t\t\t$query_reg=\"select * from registro_00 where user='{$this->user}' and password='{$this->password}'\";\n\t\t\t$this->query($query_reg);\n\t\t\t\tif($this->next_record()){\n\t\t\t\t\t$this->zona_gestion_registro=$this->Record[zona_gestion_registro];\n\t\t\t\t}//if next_record\n }//if registro entonces se pasa a la inversa los valores\n}", "title": "" }, { "docid": "ca0a0be21c16766c5ecea35e087dd518", "score": "0.5212769", "text": "public function mostrarTipoEmpleado() {\r\n return $this->DataTipoEmpleado->mostrarTipo();\r\n }", "title": "" }, { "docid": "7a8b43a66674a588ce6655146433260d", "score": "0.52081525", "text": "function restringe($equipo,$torneo,$controlador){\n\t\t$em = $controlador->getDoctrine()->getManager();\n\t\t$query =$em->createQuery('Select IDENTITY(i.idJugador) FROM limubacadministratorBundle:Integra i where i.idEquipo='.$equipo->getIdEquipo());\n\t\t$Jugadores = $query->getResult();\n\t\t\n\t\tswitch($equipo->getIdCategoria()->getIdCategoria()){//Variables que se necesitan dependiendo la categoria del equipo\n\t\t\tcase 1:\n\t\t\t\t$JugadoresEnSegunda=0;\n\t\t\t\t\n\t\t\t\t//No Jugadores de Tercera en Primera, NI UNO!!!!\n\t\t\t\t$query =$em->createQuery('Select IDENTITY(i.idJugador) FROM limubacadministratorBundle:Integra i join limubacadministratorBundle:Equipo e with i.idEquipo=e.idEquipo\njoin limubacadministratorBundle:ParticipanT p with i.idEquipo = p.idEquipo where e.idCategoria=3 and p.idTorneo='.$torneo->getIdTorneo());\n\t\t\t\t$resultado = $query->getResult();\n\t\t\t\tif(count($resultado)>0){\n\t\t\t\t\techo \"<script type='text/javascript'>alert('No puede Registrarse el equipo debido a que tienes al menos un Jugador en Tercera Fuerza');</script>\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$JugadoresEnPrimera=0; \n\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t//No Jugadores de Primera en Tercera, NI UNO!!!!\n\t\t\t\t$query =$em->createQuery('Select IDENTITY(i.idJugador) FROM limubacadministratorBundle:Integra i join limubacadministratorBundle:Equipo e with i.idEquipo=e.idEquipo\njoin limubacadministratorBundle:ParticipanT p with i.idEquipo = p.idEquipo where e.idCategoria=1 and p.idTorneo='.$torneo->getIdTorneo());\n\t\t\t\t$resultado = $query->getResult();\n\t\t\t\tif(count($resultado)>0){\n\t\t\t\t\techo \"<script type='text/javascript'>alert('No puede Registrarse el equipo debido a que tienes al menos un Jugador en Primera Fuerza');</script>\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 4://Estudiantil\n\t\t\t\t//Solamente Jugadores menores de 22 años\n\t\t\t\t$dia = date(\"d\");\n\t\t\t\t$mes = date(\"m\");\n\t\t\t\t$year= date(\"Y\");\n\t\t\t\t$query =$em->createQuery('Select IDENTITY(i.idJugador) FROM limubacadministratorBundle:Integra i join limubacadministratorBundle:Jugador j \nwith i.idJugador = j.idJugador where i.idEquipo='.$equipo->getIdEquipo().' and j.fNacimiento<'.$dia.\"-\".$mes.\"-\".($year-22));\n\t\t\t\t$resultado = $query->getResult();\n\t\t\t\t\n\t\t\t\t//echo 'Select IDENTITY(i.idJugador) FROM limubacadministratorBundle:Integra i join limubacadministratorBundle:Jugador j \n//with i.idJugador = j.idJugador where i.idEquipo='.$equipo->getIdEquipo().' and j.fNacimiento<'.$dia.\"-\".$mes.\"-\".($year-22);\n\t\t\t\t\n\t\t\t\tif(count($resultado)>0){\n\t\t\t\t\techo \"<script type='text/javascript'>alert('No puede Registrarse el equipo debido a que tienes al menos un jugador mayor de 22 años');</script>\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 5://Femenil\n\t\t\t\t$query =$em->createQuery('Select IDENTITY(i.idJugador) FROM limubacadministratorBundle:Integra i join limubacadministratorBundle:Jugador j \nwith i.idJugador = j.idJugador where i.idEquipo='.$equipo->getIdEquipo().\" and j.idGenero=1\");\n\t\t\t\t$resultado = $query->getResult();\n\t\t\t\t\n\t\t\t\tif(count($resultado)>0){//Si hay al menos un hombre en el equipo\n\t\t\t\t\techo \"<script type='text/javascript'>alert('No puede Registrarse el equipo debido a que tienes al menos un hombre en el equipo');</script>\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 6://Unicamente mayores de 35 años\n\t\t\t\t$dia = date(\"d\");\n\t\t\t\t$mes = date(\"m\");\n\t\t\t\t$year= date(\"Y\");\n\t\t\t\t$query =$em->createQuery('Select IDENTITY(i.idJugador) FROM limubacadministratorBundle:Integra i join limubacadministratorBundle:Jugador j \nwith i.idJugador = j.idJugador where i.idEquipo='.$equipo->getIdEquipo().\" and j.fNacimiento>\".$dia.\"-\".$mes.\"-\".($year-35));\n\t\t\t\t$resultado = $query->getResult();\n\t\t\t\t\n\t\t\t\tif(count($resultado)>0){\n\t\t\t\t\techo \"<script type='text/javascript'>alert('No puede Registrarse el equipo debido a que tienes al menos un jugador menor de 35 años');</script>\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tforeach($Jugadores as $Jugador){ // Buscando Jugadores que incumplen\n\t\t\n\t\t\t//Si el jugador tiene menos de 18 años a la mierda las restricciones\n\t\t\t$repositorio = $controlador->getDoctrine()->getRepository(\"limubacadministratorBundle:Jugador\");\n\t\t\t$temporal = $repositorio->find($Jugador[1]);\n\t\t\t\n\t\t\t$hoy = new DateTime(date(\"Y/m/d\"));\n\t\t\t$diferencia = $temporal->getFNacimiento()->diff($hoy);\n\t\t\t$años = $diferencia->y;\n\t\t\t\n\t\tif($años>=18){\n\t\t\t\n\t\t\tswitch($equipo->getIdCategoria()->getIdCategoria()){\n\t\t\tcase 1:\n\t\t\t\t//El jugadore juega en Segunda? ->\n\t\t\t\t$query =$em->createQuery('Select IDENTITY(i.idJugador) FROM limubacadministratorBundle:Integra i join limubacadministratorBundle:Equipo e with i.idEquipo=e.idEquipo\njoin limubacadministratorBundle:ParticipanT p with i.idEquipo = p.idEquipo where e.idCategoria=2 and i.idJugador='.$Jugador[1].' and p.idTorneo='.$torneo->getIdTorneo());\n\t\t\t\t$resultado = $query->getResult();\n\t\t\t\tif(count($resultado)!=0){\n\t\t\t\t\t$JugadoresEnSegunda++;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t//El jugadore juega en primera? ->\n\t\t\t\t$query =$em->createQuery('Select IDENTITY(i.idJugador) FROM limubacadministratorBundle:Integra i join limubacadministratorBundle:Equipo e with i.idEquipo=e.idEquipo\njoin limubacadministratorBundle:ParticipanT p with i.idEquipo = p.idEquipo where e.idCategoria=1 and i.idJugador='.$Jugador[1].' and p.idTorneo='.$torneo->getIdTorneo());\n\t\t\t\t$resultado = $query->getResult();\n\t\t\t\tif(count($resultado)!=0){\n\t\t\t\t\t$JugadoresEnPrimera++;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\t}//fin años\n\t\t\n\t\t}\n\t\t\n\t\t//Resultados Registrar o no Registrar\n\t\tswitch($equipo->getIdCategoria()->getIdCategoria()){\n\t\t\tcase 1:\n\t\t\tif($JugadoresEnSegunda>3){\n\t\t\t\t\techo \"<script type='text/javascript'>alert('No puede Registrarse el equipo debido a que tienes mas de 3 jugadores que ya estan registrados en segunda categoria');</script>\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif($JugadoresEnPrimera>3){\n\t\t\t\t\techo \"<script type='text/javascript'>alert('No puede Registrarse el equipo debido a que tienes mas de 3 jugadores que ya estan registrados en primera categoria');</script>\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "afc7d3d73a4b7e12dc0a3b107aa5944a", "score": "0.520664", "text": "function insertarTipoComp($tipo) {\n\t\t\t\n\t\t\t$cnx = \tconectar_postgres();\n\t\t\t$cons = \"INSERT INTO Contabilidad.TiposComprobante (tipo) VALUES ('$tipo')\"\t;\n\t\t\t\t\t \n\t\t\t$cons = str_replace( \"'NULL'\",\"NULL\",$cons );\t\n\t\t\t$res = @pg_query($cnx, $cons);\n\t\t\t\tif (!$res) {\n\t\t\t\t\t$consUTF8 = utf8_encode($cons);\n\t\t\t\t\t$resUTF8 = @pg_query($cnx, $consUTF8);\t\t\t\t\t\n\t\t\t\t\t\tif (!$resUTF8) {\n\t\t\t\t\t\t\techo \"<p class='error1'> Error de ejecucion </p>\".pg_last_error().\"<br>\";\n\t\t\t\t\t\t\techo \"<p class= 'subtitulo1'>Comando SQL </p> <br>\".$consUTF8.\"<br/> <br/> <br/>\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t\n\t\t}", "title": "" }, { "docid": "12977e09ba39a6114b2dc5e53df8f5ea", "score": "0.5201614", "text": "public function crear(){\n\t\t\t\t\t\t\t\t$tipodisco = new tipodisco($_POST['data']);\n\t\t\t\t\t\t $tipodiscoMapper = new tipodiscoMapper();\n\t\t\t\t\t\t var_dump($tipodiscoMapper->creartipodisco($tipodisco));\n\t\t\t\t\t\t\t}", "title": "" }, { "docid": "3605d2fdbd17da8d53ee45ee4405f2a0", "score": "0.5180318", "text": "public function getSerie_id($punto_venta,$tipo)\r\n {\r\n $criteria=new CDbCriteria;\r\n $criteria->select='id';\r\n $criteria->condition='punto_venta_id='.$punto_venta.' and comprobante_id='.$tipo;\r\n return $this->find($criteria)->serie; //devuelve la serie\r\n }", "title": "" }, { "docid": "e50aac0692c6ba73f4d7bc46b4e9b647", "score": "0.51775855", "text": "public function motivo(){\r\n\t\tparent::conectaBDMy();\t \r\n\t\t$this->idMotivo=\"\";\t\t\r\n\t\t$this->nom=\"\";\t\t\r\n\t}", "title": "" }, { "docid": "1ad3fb170d8c083d80d0459605380c2f", "score": "0.51597756", "text": "public static function getFromExtTableTile($tile=0) {\n\t\t$listeObjet = array();\n\t\t// Lancement de la requete\n\t\t$requete = 'SELECT * FROM `equipement_joueur` ';\n\t\tif ($tile == 0) {\n\t\t\t$requete .= 'WHERE tile > 0 ORDER BY id ASC';\n\t\t} else {\n\t\t\t$requete .= 'WHERE tile = :tile ORDER BY id ASC';\n\t\t\t//Il faut que le parametre soit dans un array pour le BIND\n\t\t\t$tile = array(':tile' => $tile);\n\t\t}\n\t\tdatabase::getInstance() -> prepareRequete($requete);\n\t\tif (is_array($tile) || $tile > 0) {\n\t\t\tdatabase::getInstance() -> bind($tile);\n\t\t}\n\t\tif (! database::getInstance() -> executeRequete()) {\n\t\t\tthrow new Exception(__CLASS__.'::'.__FUNCTION__.'(): Impossible de lire la table equipement_joueur');\n\t\t}\n\t\t// Recuperation des donnees\n\t\t$datas = database::getInstance() -> getTableauResultat();\n\t\t// Traitement des donnees\n\t\tforeach ($datas AS $data) {\n\t\t\t$listeObjet[] = new Equipement_joueur($data['id'],$data['membre'],$data['unite_joueur'],$data['nom'],$data['description'],$data['categorie'],$data['cp'],$data['lp'],$data['mtcp'],$data['mtlp'],$data['dommage'],$data['msvg'],$data['gabarit'],$data['type'],$data['fo'],$data['sauvegarde'],$data['mmvt'],$data['encombrement'],$data['deux_mains'],$data['cout'],$data['date_creation'],$data['used'],$data['chemin'],$data['tile'],$data['usure'],$data['demontable'],$data['date_fin_reparation'],$data['ingame']);\n\t\t}\n\t\tif (sizeof($listeObjet) == 1) {\n\t\t\t$listeObjet = $listeObjet[0];\n\t\t}\n\t\treturn $listeObjet;\n\t}", "title": "" }, { "docid": "152b32e07ee7e5b3304f000fe4d454d0", "score": "0.51450753", "text": "public function UploadEquipos($tipo,$folio){\n $PartesNombre = explode('.',$this->NameFile);\n $extFile = end($PartesNombre);\n $ext_correcta = in_array($extFile,$this->Extencion);\n\n //Expresion para Sacar el Filtro\n $tipo_correcto = preg_match($this->PregMatch,$this->FileType);\n\n if(in_array($extFile,$this->Extencion)){\n //Validar que el Archivo no este Danado\n if($this->File['error'] > 0){\n echo \"Error al Subir el Archivo\".$this->File['error'];\n }else{\n //Archivo Correcto y en Buen estado\n $NombreFinal = str_pad($folio,4,\"0\", STR_PAD_LEFT).\"_\".date('Ymd').\"_1.$extFile\";\n\n //Si el Archivo Ya Existe en la BD.\n $this->_query = \"SELECT COUNT(Folio) FROM BSHAdjuntosEquipos WHERE Folio = '$folio' ORDER BY Folio ASC\";\n $this->get_result_query();\n\n\n $maxID = $this->_rows[0];\n\n if($maxID[0] >=1 ){\n $tt=($maxID[0] + 1);\n $NombreFinal = str_pad($folio,4,\"0\",STR_PAD_LEFT).\"_\".date(\"Ymd\").\"_$tt.$extFile\";\n }\n\n if(!move_uploaded_file($this->NamFileTemp,$this->FolderName.$NombreFinal) ){\n\n return false;\n\n }else{\n\n return $NombreFinal;\n\n }\n\n }\n }else{\n //Extencion Invalida\n echo \"<script language='JavaScript'>MyAlert('Tipo de documento invalido','error');</script>\";\n }\n }", "title": "" }, { "docid": "08d84ced37a13a7dac335ed0565404c2", "score": "0.514461", "text": "private function campo(){}", "title": "" }, { "docid": "4f6938125d4684a997df14c767be27a4", "score": "0.5143299", "text": "public function tablebiopeixeAction() {\n //IMPORTANTE TER!!\n $this->_helper->layout->disableLayout();\n\n $idEntrevista = $this->_getParam('id');\n $entrevista = $this->modelArrastoFundo->find($idEntrevista);\n $this->view->assign(\"entrevista\", $entrevista);\n $vBioPeixe = $this->modelArrastoFundo->selectVBioPeixe('taf_id=' . $idEntrevista, 'tafbp_id');\n\n $this->view->assign('vBioPeixe', $vBioPeixe);\n }", "title": "" }, { "docid": "dd519c86f9e2304606e950e2eeeec7b5", "score": "0.5141027", "text": "public function PesquisarEstoqueProdutoByID(EstoqueProdutoDTO $EstoqueProdutoDTO){\n try {\n //Conexão com o banco de dados pela classe PDO\n $pdo = Conexao::getinstance();\n //Comando em SQL para pesquisar os dados na tabela estoqueproduto\n $sql = \"SELECT * FROM estoque_produto ep INNER JOIN produto p ON(ep.produto=p.id_produto) INNER JOIN estoque e ON(ep.estoque=e.id_estoque) WHERE p.produto LIKE ?\";\n //Prepara o sql para receber os binds\n $stmt = $pdo->prepare($sql);\n //Metodo que guarda o valor setado no atributo produto\n $stmt->bindValue(1, $EstoqueProdutoDTO->getProduto());\n //Executa o SQL\n $stmt->execute();\n //Guarda em um array todos os dados da tabela\n $estoqueproduto = $stmt->fetch(PDO::FETCH_ASSOC);\n //Retorna o array com todos os dados da tabela\n return $estoqueproduto;\n } catch (PDOException $ex) {\n echo \"\".$ex;\n }\n }", "title": "" }, { "docid": "c4e052bd44c6e926429fd21d25a6ac3d", "score": "0.5131403", "text": "function set_dataTproyectos()\n {\n $this->tproyectos['data1'] = 'idEmpresa';\n $this->tproyectos['data2'] = 'nombre';\n $this->tproyectos['data3'] = 'actividadEconomica';\n $this->tproyectos['data4'] = 'descripcionGeneral';\n $this->tproyectos['data5'] = 'video';\n $this->tproyectos['data6'] = 'regDate';\n $this->tproyectos['data7'] = 'monto';\n }", "title": "" }, { "docid": "432286723e6dedc22c4abdeefdd9af70", "score": "0.5129799", "text": "function llamarRegistrosMySQLTipoComp() {\n\t\t\tglobal $res;\n\t\t\t$cnx = conectar_mysql(\"Contabilidad\");\n\t\t\t$cons = \"SELECT * FROM Contabilidad.TiposComprobante\";\n\t\t\t$res = mysql_query($cons);\n\t\t\treturn $res; \n\t\t\n\t\t}", "title": "" }, { "docid": "1f5c198300846e085344d9357f3a3e19", "score": "0.51082134", "text": "public function getEstablecimientoTipo(){\r\n\t\treturn $_SESSION['INFORMACION_GENERAL']['ESTABLECIMIENTO']['TIPO'];\r\n\t}", "title": "" }, { "docid": "0a1600cb20bcbf21fbfa04872e2b538a", "score": "0.51007277", "text": "public function getTipo_empleado()\n {\n return $this->tipo_empleado;\n }", "title": "" }, { "docid": "c719a826b22b427c3a5e093f8afcff68", "score": "0.5099355", "text": "public function insertarTipoUsuario($tTipo)\n {\n //\n $nueva = new TipoUsuario;\n $nueva->tipo = $tTipo;\n $nueva->save();\n }", "title": "" }, { "docid": "ba61392e4191878224470ea5ab223506", "score": "0.5095548", "text": "public function getTipo0()\n {\n return $this->hasOne(Tipos::className(), ['id' => 'tipo']);\n }", "title": "" }, { "docid": "b077e562216205cf5bd80deca40603e5", "score": "0.5075079", "text": "public function capturaEquiposCaja($fecha,$txtTecnico,$txtEntrega,$modelo){\n\t\t\techo \"<br>\".$sqlEmpaque=\"INSERT INTO empaque (fecha,tecnico,entrega,modelo) values ('\".$fecha.\"','\".$txtTecnico.\"','\".$txtEntrega.\"','\".$modelo.\"')\";\n\t\t\t$resEmpaque=mysql_query($sqlEmpaque,$this->conectarBd());\n\t\t\tif($resEmpaque){\n\t\t\t\techo \"<br><br><strong>Registro guardado, continuando con la captura de equipos....</strong>\";\n\t\t\t\t//se recupera el id de empaque y se coloca en un campo oculto\n\t\t\t\t$sql_id = \"SELECT LAST_INSERT_ID() as id FROM empaque\";\n\t\t\t\t$res_id=mysql_query($sql_id,$this->conectarBd());\n\t\t\t\t$row_id=mysql_fetch_array($res_id);\n\t\t\t\techo \"<script type='text/javascript'> alert('Empaque interno No: \".$row_id['id'].\"'); listarCapturas('capturas');</script>\";\n\t\t\t\techo \"<script type='text/javascript'> $('#detalleEmpaque').html(''); </script>\";\n\t\t\t}else{\n\t\t\t\techo \"Error al ejecutar la consulta, la caja no pudo ser guardada\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7aee4bc921aabbebc7dd63e34326de99", "score": "0.5074941", "text": "public function metodo_combo() {\n require 'model/ItemModel.php';\n $items = new ItemModel();\n $Imagen = addslashes(file_get_contents($_FILES['Imagen']['tmp_name']));\n $codigoPromo = $_POST['idCombo'];\n $titulo = $_POST['titulo'];\n $precioCombo = $_POST['precio'];\n $cantidad = $_POST['cantidad'];\n\n if ($Imagen != null && $codigoPromo != NULL && $titulo != null && $precioCombo != null && $cantidad!=NULL) {\n\n// \n $items->insertar_combo($codigoPromo, $Imagen, $precioCombo, $titulo, $cantidad);\n \n $message = 'Combo ingresado exitosamente';\n echo \"<script type='text/javascript'>alert('$message');</script>\";\n \n $this->view->show(\"combos.php\");\n }\n// $message = 'Verifica tu información';\n// echo \"<script type='text/javascript'>alert('$message');</script>\";\n// $this->view->show(\"combo.php\");\n \n }", "title": "" }, { "docid": "ca8637a33bafed5a36a950d0b224267f", "score": "0.50734735", "text": "public function buscar($tipo)\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ingresoEgreso',$tipo);\n\n\t\treturn self::model()->findAll($criteria\n\t\t);\n\t}", "title": "" }, { "docid": "699b3ca5363d6f820d2073429a8bb994", "score": "0.50734407", "text": "function f_convertir_tipo_imput($row_info_columna,$ind_registro=NULL){\n\t\tif(!$row_info_columna) return false;\n\t\tglobal $db;\t\t\n\t\t$txt_nombre_columna\t\t= $row_info_columna['txt_nombre'];\n\t\t$max_length\t\t\t\t= $row_info_columna['max_length'];\n\t\t$txt_script_cursor\t\t= $row_info_columna['txt_script_cursor'];\n\t\t$cod_ventana_emergente\t= $row_info_columna['cod_ventana_emergente'];\n\t\t$cod_tabla\t\t\t\t= $row_info_columna['cod_tabla'];\n\t\t$txt_js_onblur\t\t\t= $row_info_columna['txt_js_onblur'];\n\t\t$ind_not_null\t\t\t= $row_info_columna['ind_not_null'];\n\t\t$txt_placeholder\t\t= $row_info_columna['txt_placeholder'];\n\t\t$num_zise_input\t\t\t= $row_info_columna['num_size_input'];\n\t\t\n\t\t\n\t\t$acum_txt_js_onblur\t\t= 'onblur\t\t=\"'.$txt_js_onblur.'\"';\n\t\t$ind_multiple = false;\n\t\t\n\t\t// para los combo box de seleccion multiple\n\t\t$ind_input_multiple\t\t= $row_info_columna['ind_input_multiple'];\n\t\tif($ind_input_multiple == 1 && $ind_registro ==FALSE){ \n\t\t\t$ind_multiple = true;\n\t\t\t$multiple = \"multiple='multiple' \";\n\t\t}else{ \n\t\t\t$multiple = NULL;\n\t\t\t$ind_multiple = FALSE;\n\t\t}\n\t\t\t\t\n\t\t// si el indicardor de not null esta en 1 añade atribute require\n\t\tif($ind_not_null == 1){\n\t\t\t$required = \"required='required'\";\n\t\t\t$class_invalid= 'is-invalid';\n\t\t}\n\t\telse\t\t\t\t\t$required = \"\";\n\t\t\n\t\t//=== Para poner alias para varias tablas >>>\n\t\tif($row_info_columna['txt_tabla']){\n\t\t\t$txt_nombre_columna\t= $row_info_columna['txt_tabla'].\"-\".$row_info_columna['txt_nombre'];\n\n\t\t}else{\n\t\t\t$txt_nombre_columna\t= $row_info_columna['txt_nombre'];\n\t\t}\n\t\t\n\n\t\t\n\t\t$row_imput\t= array();\n\t\t//=== Evalua si el campo debe quedar bloqueado>>>\n\t\tif($row_info_columna['ind_bloqueado'] == 1 || $row_info_columna['ind_readonly']==1)\t\t$readonly = \"readonly=true\";\n\t\telse\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$readonly = FALSE;\n\t\t\n\t\t// si es pantalla de consulta no bloquea los filtros\n\t\tif($readonly && $ind_registro == FALSE)$readonly = FALSE;\t\t\n\t\t\n\t\t\n\t\t//=== Evalua campo oculto PK>>>\n\t\tif($row_info_columna['ind_pk'] == 1){\n\t\t\t$row_imput['input']\t= \n\t\t\t\t\"<input \tname\t\t='$txt_nombre_columna' \n\t\t\t\t\n\t\t\t\t\t\t\ttype\t\t='hidden' \n\t\t\t\t\t\t\tvalue\t\t='value_columna'/>\";\n\t\t\t$row_imput['txt_alias']= NULL;\n\t\t}\n\t\t//=== Evalua datos tipo ARCHIVO MP3 >>>\n\t\telse if($row_info_columna['cod_tipo_dato_columna'] == 13){\n\t\t\t$row_imput['input']\t= \t\"\n\t\t\t<input type='hidden' name='$txt_nombre_columna' value='value_columna' />\n\t\t\t<input name='file_$txt_nombre_columna' $acum_txt_js_onblur type='file' class='combo' />\";\n\t\t}\n\t\t//=== Evalua datos tipo ARCHIVO >>>\n\t\telse if($row_info_columna['cod_tipo_dato_columna'] == 9){\n\t\t\t$row_imput['input']\t= \t\"\n\t\t\t<input type='hidden' name='$txt_nombre_columna' value='value_columna' />\n\t\t\t<input name='file_$txt_nombre_columna' $acum_txt_js_onblur type='file' class='combo' />\";\n\t\t}\n\t\t//=== Evalua datos tipo CELULAR >>>\n\t\telse if($row_info_columna['cod_tipo_dato_columna'] == 10){\n\t\t\t$row_imput['input']\t= \n\t\t\t\"<input \tname\t\t='1$txt_nombre_columna' \n\t\t\t\t\t\ttype\t\t='text' \n\t\t\t\t\t\t$readonly\n\t\t\t\t\t\t$acum_txt_js_onblur\n\t\t\t\t\t\tclass\t\t='combo' \n\t\t\t\t\t\tvalue\t\t='adicional' \n\t\t\t\t\t\tsize\t\t='3'\n\t\t\t\t\t\tmaxlength\t='3'/>\n\t\t\t<input \t\tname\t\t='$txt_nombre_columna' \n\t\t\t\t\t\ttype\t\t='text' \n\t\t\t\t\t\t$readonly\n\t\t\t\t\t\t$acum_txt_js_onblur\n\t\t\t\t\t\tclass\t\t='combo' \n\t\t\t\t\t\tvalue\t\t='value_columna' \n\t\t\t\t\t\tsize\t\t='7'\n\t\t\t\t\t\tmaxlength\t='$max_length'/>\t\t\t\t\t\t\n\t\t\t\t\t\t\";\n\t\t}\n\t\t//=== Evalua datos tipo DATETIME CON FORMATO >>>\n\t\telse if($row_info_columna['cod_tipo_dato_columna'] == 8){\n\t\t\tif($readonly)\n\t\t\t\t$row_imput['input']\t= \n\t\t\t\t\"<input \tname\t\t='$txt_nombre_columna' \n\t\t\t\t\t\t\t$required \n\t\t\t\t\t\t\ttype\t\t='text' class='combo' \n\t\t\t\t\t\t\tvalue\t\t='value_columna' \n\t\t\t\t\t\t\t$readonly\n\t\t\t\t\t\t\t$acum_txt_js_onblur\n\t\t\t\t\t\t\tsize\t\t='15' />\";\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$row_imput['input']\t= \n\t\t\t\t\"<input \tname\t\t='$txt_nombre_columna' \n\t\t\t\t\t\t\t$required\n\t\t\t\t\t\t\tautocomplete = 'off'\n\t\t\t\t\t\t\ttype\t\t='text' \n\t\t\t\t\t\t\tclass\t\t='form-control' \n\t\t\t\t\t\t\tid\t\t\t='$txt_nombre_columna'\n\t\t\t\t\t\t\tvalue\t\t='value_columna' \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treadonly\n\t\t\t\t\t\t\tsize\t\t='20' />\n\t\t\t\t\t\t\t\n\t\t\t\t<script>\n\t\t\t\t$(function(){\n\t\t\t\t\t$('#$txt_nombre_columna').datetimepicker({\n\t\t\t\t\t\tchangeMonth: true, // Muestra comobobox para seleccionar el mes\n\t\t\t\t\t\t//changeYear: true, // Muestra comobobox para seleccionar el año\n\t\t\t\t\t\tyearRange: 'c-100:c+10',\n\t\t\t\t\t\t//hourGrid: 4,\n\t\t\t\t\t\t//secondGrid: 10, \n\t\t\t\t\t\t//minuteGrid: 10,\n\t\t\t\t\t\t//timeFormat: 'H:mm:ss',\n\t\t\t\t\t\t//timeFormat: 'hh:mm tt',\n\t\t\t\t\t\ttimeFormat: 'HH:mm:ss',\n\t\t\t\t\t\tcontrolType: 'select',\n\t\t\t\t\t\tdateFormat: 'yy-mm-dd',\n\t\t\t\t\t\tconstrainInput: false,\n\t\t\t\t\t\tonSelect: function(){\n\t\t\t\t\t\t\t//alert('hola');\t\n\t\t\t\t\t\t\t$(this).blur();\n\t\t\t\t\t\t\t$(this).datetimepicker('hide');\n\t\t\t\t\t\t}\n\t\t\t\t\t}).on('changeDate', function (e) {\n\t\t\t\t\t\t$(this).blur();\n\t\t\t\t\t\t//alert();\n\t\t\t\t\t\t//$(this).datetimepicker('hide');\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t})\n\t\t\t\t\n\t\t\t\t</script>\t\t\t\n\t\t\t\t\";\n\t\t\t}\n\t\t}\n\t\t//=== Evalua datos combos con VENTANA EMERGENTE >>>\n\t\telse if($row_info_columna['cod_tipo_dato_columna'] == 7){\n\t\t\t\n\t\t\t//=== Divide el nombre por si acaso viene con algun alias\n\t\t\t$array_nombre = explode(\"-\",$txt_nombre_columna);\n\t\t\tif($array_nombre[1]) {\n\t\t\t\t\n\t\t\t\t$tmp_tabla \t\t= $array_nombre[0].\"-\";\n\t\t\t\t$tmp_columna \t= $array_nombre[1];\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$tmp_tabla \t\t= NULL;\n\t\t\t\t$tmp_columna \t= $array_nombre[0];\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif($readonly){\n\t\t\t\t$row_imput['input']\t= \n\t\t\t\t\"<input type\t\t='text' \n\t\t\t\t\t\tclass\t\t='form-control' \n\t\t\t\t\t\t$readonly\n\t\t\t\t\t\t$required\n\t\t\t\t\t\tid\t\t\t='$txt_nombre_columna' \n\t\t\t\t\t\tname\t\t='$txt_nombre_columna' \n\t\t\t\t\t\tvalue\t\t='value_columna' \n\t\t\t\t\t\tsize\t\t='3' \n\t\t\t\t/>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<input \t\n\t\t\t\t\t\tclass\t\t='combo' \n\t\t\t\t\t\tname\t\t='$tmp_tabla\".\"txt_$tmp_columna' \n\t\t\t\t\t\tid\t\t\t='$tmp_tabla\".\"txt_$tmp_columna' \n\t\t\t\t\t\ttype\t\t='text' \n\t\t\t\t\t\tvalue\t\t='txt_value_columna' \n\t\t\t\t\t\tsize\t\t='30' \n\t\t\t\t\t\treadonly\t='true' />\";\n\t\t\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\t// este onblur era del input sin embargo no se ve necesario puesto que el usuario escogera el resultado\n\t\t\t\t// de la lista que se despliega\n\t\t\t\t//onBlur\t\t\t\t='ver_valor_onblur(this);return false;' \n\t\t\t\t\n\t\t\t\t$row_imput['input']\t= \n\t\t\t\t\"<div id=\\\"box_input_\".$txt_nombre_columna.\"\\\" >\n\t\t\t\t\t<input type\t\t\t\t='hidden' \n\t\t\t\t\t\t\tclass\t\t\t\t='' \n\t\t\t\t\t\t\t$required\n\t\t\t\t\t\t\t$readonly\n\t\t\t\t\t\t\tname\t\t\t\t='\".$txt_nombre_columna.\"' \n\t\t\t\t\t\t\tid\t\t\t\t\t='\".$txt_nombre_columna.\"' \t\t\t\t\t\t\n\t\t\t\t\t\t\tautocomplete \t\t= 'off'\n\t\t\t\t\t\t\tvalue\t\t\t\t='value_columna'\n\t\t\t\t\t\t\tdata-cod_columna \t= '\".$row_info_columna['cod_columna_tabla'].\"' \n\t\t\t\t\t\t\tsize\t\t='9' \n\t\t\t\t\t \t/> \n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class='input-group'>\n\t\t\t\t\t\t\t<input \t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tclass\t\t\t\t='form-control ' \n\t\t\t\t\t\t\t\tname\t\t\t\t='txt_\".$txt_nombre_columna.\"' \n\t\t\t\t\t\t\t\tid\t\t\t\t\t='txt_\".$txt_nombre_columna.\"' \n\t\t\t\t\t\t\t\ttype\t\t\t\t='search' \n\t\t\t\t\t\t\t\tvalue\t\t\t\t='txt_value_columna' \n\t\t\t\t\t\t\t\tdata-cod_columna \t= '\".$row_info_columna['cod_columna_tabla'].\"' \n\t\t\t\t\t\t\t\tdata-input_padre\t= '\".$txt_nombre_columna.\"'\n\t\t\t\t\t\t\t\tdata-tipo_columna\t='\".$row_info_columna['cod_tipo_dato_columna'].\"'\t\t\t\t\t\n\t\t\t\t\t\t\t\tautocomplete \t\t= 'off'\n\t\t\t\t\t\t\t\tsize\t\t\t\t='25'\n\t\t\t\t\t\t\t\tonClick\t\t\t\t=\\\"this.select();\\\" \n\t\t\t\t\t\t\t\trequired\n\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<div class='btnClearInput' id='btnClear_\".$txt_nombre_columna.\"'>X</div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t<span class=\\\"input-group-btn\\\">\n\t\t\t\t\t\t\t\t<button \n\t\t\t\t\t\t\t\t\ttype\t\t='button'\n\t\t\t\t\t\t\t\t\tclass\t\t='btn btn-default ' \n\t\t\t\t\t\t\t\t\tname\t\t='button2'\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tid \t\t\t='btn_\".$txt_nombre_columna.\"'\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tonclick\t\t=\".'\"ver_lista_valor('.$cod_ventana_emergente.','.\"'$tmp_tabla\".\"$tmp_columna')\".'\"'.\"><span class=\\\"glyphicon glyphicon-search\\\"></span></button>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t<div id=\\\"content_result_\".$row_info_columna['cod_columna_tabla'].\"\\\" style='display:none;'></div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<script>\n\n\t\t\t\t\t\t\t/*var timeout;\n\t\t\t\t\t\t\tvar searchFieldValue = (this_,e) =>{\n\t\t\t\t\t\t\t if(timeout) { clearTimeout(timeout); }\n\t\t\t\t\t\t\t timeout = setTimeout(() => {\n\t\t\t\t\t\t\t \tver_valor_script_columna(_this,e);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t }, 600);\n\t\t\t\t\t\t\t}*/\n\n\t\t\t\t\t\t\t$(function(){\n\t\t\t\t\t\t\t\tlet txtInput = $(\\\"input[name='txt_\".$txt_nombre_columna.\"']\\\");\n\t\t\t\t\t\t\t\tif($(txtInput).val()){\n\t\t\t\t\t\t\t\t\t$(txtInput).attr('readonly',true);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$('#btnClear_\".$txt_nombre_columna.\"').on('click',function(e){\n\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t$(\\\"input[name='\".$txt_nombre_columna.\"']\\\").val('');\n\t\t\t\t\t\t\t\t\t$(txtInput).val('');\n\t\t\t\t\t\t\t\t\t$(txtInput).attr('readonly',false);\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t$('#txt_\".$txt_nombre_columna.\"').on('keydown',function(e){\n\t\t\t\t\t\t\t\t\tvar keyCode = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode;\n\t\t\t\t\t\t\t\t\t_this = this;\n\t\t\t\t\t\t\t\t\t//searchFieldValue(_this,e);\n\t\t\t\t\t\t\t\t\tver_valor_script_columna(_this,e);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t})\n\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$('#txt_\".$txt_nombre_columna.\"').on('click',function(e){\n\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\t\t\t\t\t$('body').off('keyup',funcion_teclas); // frena el funcionamiento de teclas del body\n\t\t\t\t\t\t\t\t\treturn false;\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$('#txt_\".$txt_nombre_columna.\"').on('blur',function(e){\n\n\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\t\t\te.stopImmediatePropagation();\n\n\t\t\t\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\t\t\t\t$('body').on('keyup',funcion_teclas); // reinicia el funcionamiento de las teclas del body\n\t\t\t\t\t\t\t\t\t},500);\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\treturn false;\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\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\n\t\t\t\t\t\t</script>\n\n\t\t\t\t\t</div>\";\n\t\t\t}\n\t\t}\n\t\t//=== Evalua datos tipo TEXT >>>\n\t\telse if($row_info_columna['cod_tipo_dato_columna'] == 6){\n\t\t\t\n\t\t\t\t\t\t\n\t\t\t$row_imput['input']\t= \n\t\t\t\"<textarea \tclass\t='form-control'\n\t\t\t\t\t\tname\t='$txt_nombre_columna' \n\t\t\t\t\t\t$required\n\t\t\t\t\t\tid\t\t='$txt_nombre_columna' \n\t\t\t\t\t\tcols\t='30' \n\t\t\t\t\t\tsize\t\t='30'\n\t\t\t\t\t\t$readonly\t\t\n\t\t\t\t\t\t$acum_txt_js_onblur\n\t\t\t\t\t\tdata-tipo_columna='\".$row_info_columna['cod_tipo_columna'].\"'\t\t\t\t\t\n\t\t\t\t\t\t>value_columna</textarea>\n\t\t\t\n\t\t\t\t\t\t\";\n\t\t}\n\t\t//=== Evalua datos tipo NUMERIC SIN FORMATO >>>\n\t\telse if($row_info_columna['cod_tipo_dato_columna'] == 5){\n\t\t\t$row_imput['input']\t= \n\t\t\t\"<input \ttype\t\t='number' \n\t\t\t\t\t\tclass\t\t='form-control' \n\t\t\t\t\t\tautocomplete='off'\n\t\t\t\t\t\t$required\n\t\t\t\t\t\tsize\t\t='22'\n\t\t\t\t\t\tname\t\t='$txt_nombre_columna' \n\t\t\t\t\t\tplaceholder\t= 'Campo Numerico'\n\t\t\t\t\t\tvalue\t\t='value_columna'\n\t\t\t\t\t\tdata-tipo_columna='\".$row_info_columna['cod_tipo_columna'].\"'\n\t\t\t\t\t\t$readonly\n\t\t\t\t\t\t$acum_txt_js_onblur\n\t\t\t\t\t\tmaxlength\t='$max_length'/>\";\n\t\t}\n\t\t//=== Evalua datos tipo LISTBOX >>>\n\t\telse if($row_info_columna['cod_tipo_dato_columna'] == 4){\n\n\n\t\t\t$id \t\t\t\t\t= \"id='\".$txt_nombre_columna.\"'\";\n\t\t\t$class\t\t\t\t\t= \"class='form-control'\";\n\t\t\t$opcion_blanco\t\t\t= \"<option value='-1' selected='selected'></option>\";\n\t\t\tif($txt_js_onblur){ \t$on_change = \"onchange=$txt_js_onblur\";}\n\t\t\telse{\t\t\t\t$on_change = \"\";}\t\t\n\t\t\t\n\t\t\tif($readonly){\n\n\t\t\t\t$div_abre\t\t= '<div style=\"position:relative; width:; height:;\">';\n\t\t\t\t$div_cierra\t\t= '</div>';\n\t\t\t\t$div_bloquea\t= '<div style=\"z-index:0; position:absolute; width:300px; height:26px; opacity:.6;\"></div>';\n\t\t\t\t$on_change \t\t= \"onClick=\\\"alert('Acceso Denegado');\\\"\";\n\t\t\t\t$style\t\t\t= 'style=\"color: #933; background-color: #ffc;\"';\n\t\t\t\t\n\t\t\t\t$opcion_blanco = NULL;\n\t\t\t\t\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// si el select permite seleccionar multiples valores\n\t\t\tif($ind_multiple == true){\t\n\t\t\t\t$id \t\t\t\t= NULL;\n\t\t\t\t$sym_multiple \t\t= \"[]\";\n\t\t\t\t$class\t\t\t\t= \"class='multiple_select'\";\n\t\t\t\t$opcion_blanco\t\t= \"\";\n\t\t\t\t//$opcion_blanco\t\t\t= \"<option value='' selected='selected'></option>\";\n\t\t\t}else{\n\t\t\t\t$sym_multiple \t= \"\";\n\t\t\t\t$multiple\t\t= NULL;\n\t\t\t}\n\t\t\t\t\n\t\t\t$row_imput['cursor']\t= $db->consultar($txt_script_cursor);\n\t\t\t$row_imput['input']\t= \t$div_abre.$div_bloquea.'\n\t\t\t\t<select data-tipo_columna=\"'.$row_info_columna['cod_tipo_columna'].'\" '.$class.' '.$required.' '.$on_change.' '.$style.' '.$multiple.' \n\t\t\t\t\t\t\tname=\"'.$txt_nombre_columna.$sym_multiple.'\" '.$id.' id=\"'.$txt_nombre_columna.'\" >\n\t\t\t\t\t\t\t'.$opcion_blanco.'\n\t\t\t\t\t\t\tvalue_columna\n\t\t\t\t</select>\n\t\t\t\n\t\t\t\t'.$div_cierra.'\n\t\t\t';\n\t\t\t\n\t\t\tif($readonly){\n\t\t\t\t$row_imput['input']\t.= \"\t\n\t\t\t\t\t\t<script>\n\t\t\t\t\t\t\t$(function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tvar val_readonly_\".$txt_nombre_columna.\" = $('#\".$txt_nombre_columna.\" option:selected').val();\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//$('#\".$txt_nombre_columna.\" option[value!='+val_readonly_\".$txt_nombre_columna.\"+']').remove();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t</script>\";\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\t// ==================================== // ============\n\t\t\t// si se ha indicado que permite seleccion multiple\n\t\t\tif($ind_multiple == true){\n\t\t\t\t\n\t\t\t\t// estilo para no mostrar el select sin el widget cargado ya que afecta el diseño de la pagina\n\t\t\t\t$style='style=\"display:none;\"';\n\t\t\t\t//$style='style=\"height:15px;\"';\n\t\t\t\t \n\t\t\t\t$row_imput['input']\t= \t\n\t\t\t\t\t'<select class=\"form-control\" data-tipo_columna=\"'.$row_info_columna['cod_tipo_columna'].'\" '.$required.' '.$on_change.' '.$style.' '.$multiple.' \n\t\t\t\t\t\t\tname=\"'.$txt_nombre_columna.$sym_multiple.'\" '.$id.' id=\"'.$txt_nombre_columna.'\" >\n\t\t\t\t\t\t\t'.$opcion_blanco.'\n\t\t\t\t\t\t\tvalue_columna\n\t\t\t\t\t\t</select>';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$row_imput['input']\t.=\t' \n\t\t\t\t\t<input type=\"hidden\" data-tipo_columna=\"'.$row_info_columna['cod_tipo_dato_columna'].'\" name=\"'.$txt_nombre_columna.$sym_multiple.'\" value=\"\" />\n\t\t\t\t\n\t\t\t\t\t<script>\n\t\t\t\t\t$(function(){\n\t\t\t\t\t\t$(\\'#'.$txt_nombre_columna.'\\').multiselect({\n\t\t\t\t\t\t\tminWidth:\"100%\",\n\t\t\t\t\t\t\tclassesBtn: \"form-control\",\n\t\t\t\t\t\t\tclick: function(event, ui){\n\t\t\t\t\t\t\t\t//alert(\"presiono\");\n\t\t\t\t\t\t\t\t//$callback.text(ui.value + \\' \\' + (ui.checked ? \\'checked\\' : \\'unchecked\\') );\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</script>\t\t\t';\n\t\t\t}\n\t\t\n\t\t\t\n\t\t}\n\t\t//=== Evalua datos tipo DATE CON FORMATO >>>\n\t\telse if($row_info_columna['cod_tipo_dato_columna'] == 3){\n\t\t\tif($readonly){\n\t\t\t\t$row_imput['input']\t= \n\t\t\t\t\"<input \tname\t\t='$txt_nombre_columna'\n\t\t\t\t\t\t\ttype\t\t='text' \n\t\t\t\t\t\t\tvalue\t\t='value_columna' \n\t\t\t\t\t\t\tclass \t\t= 'form-control'\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsize\t\t='10' \n\t\t\t\t\t\t\t$required\n\t\t\t\t\t\t\t$acum_txt_js_onblur\n\t\t\t\t\t\t\t$readonly\n\n\t\t\t\t\t\t\t/>\";\n\t\t\t}else {\n\t\t\t\t$row_imput['input']\t= \n\t\t\t\t\"<input \tname\t\t='$txt_nombre_columna'\n\t\t\t\t\t\t\t$required \n\t\t\t\t\t\t\ttype\t\t='text' \n\t\t\t\t\t\t\tid\t\t\t='$txt_nombre_columna' \n\t\t\t\t\t\t\tclass\t\t= 'datepicker form-control'\n\t\t\t\t\t\t\tvalue\t\t='value_columna' \n\t\t\t\t\t\t\treadonly\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsize\t\t='10' />\n\t\t\t\t\t\t\t\n\t\t\t\t\t<script>\n\t\t\t\t\t$(function(){\n\t\t\t\t\t\t$('#$txt_nombre_columna').datepicker({\n\t\t\t\t\t\t\tchangeMonth: true, // Muestra comobobox para seleccionar el mes\n\t\t\t\t\t\t\tchangeYear: true, // Muestra comobobox para seleccionar el año\n\t\t\t\t\t\t\tyearRange: 'c-100:c+10',\n\t\t\t\t\t\t\t//minDate: new Date(2010, 11, 20, 8, 30), // para poner un minimo de fecha\n\t\t\t\t\t\t\t//minDate: 0,\n\t\t\t\t\t\t\tdateFormat: 'yy-mm-dd'\n\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t})\n\t\t\t\t\n\t\t\t\t\t</script>\";\n\t\t\t}\n\t\t}\n\t\t//=== Evalua datos tipo NUMERIC CON FORMATO >>>\n\t\telse if($row_info_columna['cod_tipo_dato_columna'] == 2){\t\t\t\n\n\t\t\t$row_imput['input']\t= \n\t\t\t\"<input \ttype\t\t='text' \n\t\t\t\t\t\tclass\t\t='form-control \".$class_invalid.\"' \n\t\t\t\t\t\t$required\n\t\t\t\t\t\tautocomplete='off'\n\t\t\t\t\t\tname\t\t='$txt_nombre_columna' \n\t\t\t\t\t\tplaceholder = 'Campo Numerico'\n\t\t\t\t\t\tvalue\t\t='value_columna'\n\t\t\t\t\t\tdata-tipo_columna='\".$row_info_columna['cod_tipo_columna'].\"'\t\t\t\t\t\n\t\t\t\t\t\tsize\t\t='22'\n\t\t\t\t\t\t$readonly\n\t\t\t\t\t\tmaxlength\t='$max_length'\n\t\t\t\t\t\tonkeyup\t\t='comportamiento_combo_numerico(this,2,event)' \n\t\t\t\t\t\tonblur\t\t='comportamiento_combo_numerico(this,2,event);$txt_js_onblur'\n\t\t\t\t\t\tonfocus\t\t='comportamiento_combo_numerico(this,2,event)' />\";\n\t\t}\n\t\t//=== Evalua datos tipo VARCHAR >>>\n\t\telse if($row_info_columna['cod_tipo_dato_columna'] == 1){\n\t\t\t$row_imput['input']\t= \n\t\t\t\"<input \tname\t\t='$txt_nombre_columna' \n\t\t\t\t\t\ttype\t\t='text' \n\t\t\t\t\t\t$required\n\t\t\t\t\t\t$readonly\n\t\t\t\t\t\t$acum_txt_js_onblur\n\t\t\t\t\t\t\n\t\t\t\t\t\tclass\t\t='form-control' \n\t\t\t\t\t\tdata-tipo_columna='\".$row_info_columna['cod_tipo_columna'].\"'\t\t\t\t\t\n\t\t\t\t\t\tvalue\t\t='value_columna' \n\t\t\t\t\t\tsize\t\t='22'\n\t\t\t\t\t\tmaxlength\t='$max_length'/>\";\n\t\t}\n\t\t//=== Evalua datos tipo VARCHAR SIN NUMEROS >>>\n\t\telse if($row_info_columna['cod_tipo_dato_columna'] == 15){\n\t\t\t$row_imput['input']\t= \n\t\t\t\"<input \tname\t\t='$txt_nombre_columna' \n\t\t\t\t\t\ttype\t\t='text' \n\t\t\t\t\t\t$readonly\n\t\t\t\t\t\t$required\n\t\t\t\t\t\t$acum_txt_js_onblur\n\t\t\t\t\t\tclass\t\t='form-control' \n\t\t\t\t\t\tvalue\t\t='value_columna' \n\t\t\t\t\t\tdata-tipo_columna='\".$row_info_columna['cod_tipo_columna'].\"'\t\t\t\t\t\n\t\t\t\t\t\tsize\t\t='22'\n\t\t\t\t\t\tmaxlength\t='$max_length'/>\";\n\t\t}\n\t\t//=== Evalua datos tipo PASSWORD >>>\n\t\telse if($row_info_columna['cod_tipo_dato_columna'] == 16){\n\t\t\t$row_imput['input']\t= \n\t\t\t\"<input \tname\t\t='$txt_nombre_columna' \n\t\t\t\t\t\ttype\t\t='password'\n\t\t\t\t\t\t$readonly\n\t\t\t\t\t\t$required\n\t\t\t\t\t\t$acum_txt_js_onblur\n\t\t\t\t\t\tclass\t\t='combo' \n\t\t\t\t\t\tvalue\t\t='value_columna' \n\t\t\t\t\t\tsize\t\t='22'\n\t\t\t\t\t\tmaxlength\t='$max_length'/>\";\n\t\t}\n\t\t\n\t\t//=== Evalua datos tipo AUTOCOMLETE (utilizando ajax) >>>\n\t\telse if($row_info_columna['cod_tipo_dato_columna'] == 17){\n\t\t\t\n\t\t\tif($ind_hidden == true)\t$type = 'hidden';\n\t\t\telse \t\t\t\t\t$type='text';\n\t\t\t\n\t\t\t$row_imput['input']\t= \n\t\t\t\"<input \tname\t\t='$txt_nombre_columna' \n\t\t\t\t\t\tid\t\t\t='$txt_nombre_columna' \n\t\t\t\t\t\ttype\t\t='$type'\n\t\t\t\t\t\t$txt_placeholder\n\t\t\t\t\t\t$txt_js_onkeyup\n\t\t\t\t\t\t\n\t\t\t\t\t\t$readonly\n\t\t\t\t\t\t$acum_txt_js_onblur\n\t\t\t\t\t\tclass\t\t='$estilo_input' \n\t\t\t\t\t\tvalue\t\t='value_columna' \n\t\t\t\t\t\tdata-tipo_columna='\".$row_info_columna['cod_tipo_columna'].\"'\t\t\t\t\t\n\t\t\t\t\t\tsize\t\t='22'\n\t\t\t\t\t\t$max_length/>\n\t\t\t\t\t\t\n\t\t\t<div id='autocomplete_$txt_nombre_columna'></div>\n\t\t\t\n\t\t\t\";\n\n\t\t}\n\t\t\n\t\t//=== Evalua datos tipo SELECT CON BUSCADOR >>>\n\t\telse if($row_info_columna['cod_tipo_dato_columna'] == 19){\n\t\t\t\n\t\t\t\n\t\t\tif($txt_js_onblur) \t$on_change = \"onchange=$txt_js_onblur\";\n\t\t\telse\t\t\t\t$on_change = \"\";\n\t\t\tif($readonly) \t$on_change = \"onClick=\\\"alert('Acceso Denegado')\\\"\";\n\t\t\tif($multiple){\t$ind_multiple = \"[]\";}else{$ind_multiple = \"\";}\n\t\t\t\n\t\t\t$cod_columna_tabla = $row_info_columna['cod_columna_tabla'];\n\t\t\t\n\t\t\t$row_imput['cursor']\t= $db->consultar($txt_script_cursor);\n\t\t\t/*$row_imput['input']\t= \n\t\t\t\"<select class='' $required $on_change $multiple name='$txt_nombre_columna$ind_multiple' id='$txt_nombre_columna' >\n\t\t\t <option value=''></option>\n\t\t\tvalue_columna\n\t\t\t</select>\n\t\t\t\n\t\t\t<script>\n\t\t\t$(function(){\n\t\t\t\t$('#$txt_nombre_columna').select2({\n\t\t\t\t\tplaceholder: '$txt_placeholder',\n\t\t\t\t allowClear: true,\n\t\t\t\t\tdropdownAutoWidth: true\n\t\t\t\t});\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t})\n\t\t\t\n\t\t\t</script>\n\t\t\t\n\t\t\t\";*/\n\t\t\t\n\t\t\tif(!$num_zise_input || $num_zise_input == 0){\n\t\t\t\t$num_zise_input = '\\'element\\'';\n\t\t\t\t \n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$row_imput['input']\t= \n\t\t\t\"\n\t\t\t\n\t\t\t<input \ttype='hidden' \n\t\t\t\t\tid='$txt_nombre_columna' \n\t\t\t\t\tname='$txt_nombre_columna' \n\t\t\t\t\tclass='form-control' \n\t\t\t\t\tvalue='value_columna'\n\t\t\t\t\tdata-tipo_columna='\".$row_info_columna['cod_tipo_dato_columna'].\"'\t\t\t\t\t\n\t\t\t\t\t$required\n\t\t\t\t\tdata-placeholder='$txt_placeholder'\n\t\t\t>\t\t\t\n \n\t\t\t\n\t\t\t<script>\n\t\t\t$(function(){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$('#\".$txt_nombre_columna.\"').select2({\n\t\t\t\t\t\t\n\t\t\t\t\t\tminimumInputLength : 0,\n\t\t\t\t\t\tallowClear: true,\n\t\t\t\t\t\taddSelectedTitle: true,\n\t\t\t\t\t\t//width: \".$num_zise_input.\",\n\t\t\t\t\t\t/*formatSelection: function(item) {\n\t\t\t\t\t // Debugging -- open the developer console to see what you can access from the item object\n\t\t\t\t\t\t\t//alert(item.text);\n\t\t\t\t\t\t\tvar text_this = item.text;\n\t\t\t\t\t\t\talert($(this).find('.select2-chose').length);\n\t\t\t\t\t\t\t$(this).find('.select2-chose').attr('title',text_this);\n\n\t\t\t\t\t return item.text;\n\t\t\t\t\t // return '<strong>' + item.id + '</strong>';\n\t\t\t\t\t },*/\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tajax: {\n\t\t\t\t\t\t url: '../consulta/consulta_script_columna.php',\n\t\t\t\t\t\t dataType: 'json',\n\t\t\t\t\t\t data: function (term, page) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t term: term,\n\t\t\t\t\t\t\t cod_columna_tabla: \".$cod_columna_tabla.\"\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t },\n\t\t\t\t\t\t results: function (data, page) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn { results: data.results };\n\t\t\t\t\t\t }\n\t\t\t\t\t\t},\n\t\t\t\t\t\tinitSelection: function(element, callback) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// revisa si el elemento tiene un valor inicial o por default y lo carga despues de cargar el plugin\n\t\t\t\t\t\t\t// element es el elemento del dom al que se le aplico el plugin select2 y callback la funcion a llamar despues de buscar el valor\n\n\t\t\t\t\t\t\treturn $.getJSON('../consulta/consulta_script_columna.php?cod_columna_tabla=$cod_columna_tabla&id=' + (element.val()), null, function(data) {\n\t\t\t\t\n\t\t\t\t\t\t\t\t\treturn callback(data);\n\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}).on('select2-open', function() {\n\t\t\t\t\t \t//alert('open');\n\t\t\t\t\t\t\t$('body').unbind('keyup',funcion_teclas); // frena el funcionamiento de teclas del body\n\t\t\t\t\t\t\tvar a = $('#s2id_\".$txt_nombre_columna.\"').find('.select2-chosen');\n\t\t\t\t\t\t\t$(a).tooltip().tooltip('close');\n\n\t\t\t\t }).on('select2-selecting', function(e) {\n\t\t\t\t //alert('selecting val=e.val choice=e.object.text');\n\t\t\t\t\t\t //$(this).blur();\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t</script>\t\";\t\n\t\t\t\n\t\t\t\n\t\t\tif($readonly){\n\t\t\t\t$row_imput['input']\t.= \"\n\t\t\t\t\t<script>\n\t\t\t\t\t\t$(function(){\n\t\t\t\t\t\t\t$('#\".$txt_nombre_columna.\"').\n\t\t\t\t\t\t\t(\\\"readonly\\\",true);\n\t\t\t\t\t\t});\n\t\t\t\t\t</script>\t\";\n\t\t\t}\n\n\t\t}\n\t\t\n\t\treturn $row_imput;\n\t}", "title": "" }, { "docid": "fa14eae4b0f9d49b8e9dd0a32ecee4f6", "score": "0.5062531", "text": "public function buscarTipoEmpleado($TipoEmpleado) {\r\n return $this->DataTipoEmpleado->buscarTipo($TipoEmpleado);\r\n }", "title": "" }, { "docid": "d80bc3021671233943bee0da96c931f6", "score": "0.5054885", "text": "private function cargarObjeto($param){\n //print_r ($param);\n $obj = null;\n \n if( array_key_exists('idarchivocargadoestado',$param) and array_key_exists('idestadotipos',$param) and array_key_exists('acedescripcion',$param)\n and array_key_exists('idusuario',$param)and array_key_exists('acefechaingreso',$param)and array_key_exists('acefechafin',$param)\n and array_key_exists('idarchivocargado',$param)){\n \n //creo objeto estadotipos\n $objEstadoTipo = new EstadoTipos();\n $objEstadoTipo->setIdestadotipos($param['idestadotipos']); \n $objEstadoTipo->cargar();\n \n //creo objeto usuario\n $objUsuario = new Usuario();\n $objUsuario->setIdusuario($param['idusuario']); \n $objUsuario->cargar();\n \n //creo objeto archivocargado\n $objArchivo = new ArchivoCargado();\n $objArchivo->setACId($param['idarchivocargado']); \n $objArchivo->cargar();\n \n //agregarle los otros objetos\n $obj = new ArchivoCargadoEstado();\n $obj->setear($param['idarchivocargadoestado'], $objEstadoTipo, $param['acedescripcion'], $objUsuario, $param['acefechaingreso'],\n $param['acefechafin'], $objArchivo);\n }\n return $obj;\n }", "title": "" }, { "docid": "fa0f3a3493336766c9bdcdc99ad53c00", "score": "0.5054332", "text": "public function listarStatusCelularPorTipo()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"SELECT Discipulo.nome AS discipulo , TipoStatusCelular.nome AS status\n FROM Discipulo,StatusCelular, TipoStatusCelular WHERE\nDiscipulo.id = StatusCelular.discipuloId AND TipoStatusCelular.id = ? AND TipoStatusCelular.id = StatusCelular.tipoOferta\" ;\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n //\n $stm->bindParam(1, $this->tipoOferta);\n\n $resposta = $stm->execute();\n\n //fechar conexão\n $pdo = null ;\n\n return $stm->fetchAll();\n }", "title": "" }, { "docid": "b2de7d12974103cde42c19b918417658", "score": "0.50525695", "text": "public function model()\n {\n return TipoExigencia::class;\n }", "title": "" }, { "docid": "024c14e1da6f7a95d6839cbb1f5c1edd", "score": "0.5049575", "text": "private function funSetNivelEquipa($posEquipa){\n\t\t$varBD = new ExecuteDBOperations();\n\t\t$varBD->abreLigacao();\t\t\t\t\n\t\t\t\n\t\tIf ($varBD->funGetConnection() == null){\n\t\t\tunset($varBD);\n\t\t\t$this->returnCode = -904; //Erro de ligação a BD\n\t\t\tbreak;\n\t\t}\n\t\ttry{\n\t\t\t$varBD->queryString = 'select tab_niveis_nivel ';\n\t\t\t$varBD->queryString .='from tab_niveis ';\n\t\t\t$varBD->queryString .='where tab_niveis_conf = :CONF ';\n\t\t\t$varBD->queryString .='and (tab_niveis_min_pos <= :POS and tab_niveis_max_pos >= :POS)';\n\t\t\n\t $varBD->parseDBQuery($varBD->queryString);\t\t\n\t\t\toci_bind_by_name($varBD->queryParse, ':CONF', $this->eqConf);\n\t\t\toci_bind_by_name($varBD->queryParse, ':POS', $posEquipa);\n\t\t\t\n\t\t\toci_execute($varBD->queryParse);\n\t\t\t$row = oci_fetch_array($varBD->queryParse);\n\t\t\t$posEquipa = $row[0];\n\n\t\t\t$varBD->fechaLigacao();\n\t\t\tunset($varBD);\n\t\t\treturn $posEquipa;\n\t\t}catch(Exception $e){\n\t\t\t$varBD->fechaLigacao();\n\t\t\tunset($varBD);\n\t\t\t$this->returnCode = -912;\n\t\t}\t\t\t\t\t\t\n\t}", "title": "" }, { "docid": "183914a258b954bb98e675c5ff7a7572", "score": "0.5048594", "text": "public function gestion()\n {\n $ac = new Actividad();\n // Ejecutar el Metodo findAll\n $actividad = $ac->findAll();\n // Instanciar un Objeto Actividad para pedir los Tipos\n $ac2 = new Actividad();\n // Ejecutar el Metodo findAllTiposA\n $tipos = $ac2->findAllTipoA();\n // instancia objeto actividad abuelo\n $ac3 = new Actividad();\n //ejecutar medoto findallAbuelo\n $abuelo = $ac3->findAllAbuelito();\n //instancia obejto actividad usuarios\n $ac4 = new Actividad();\n //ejecutar metodo findAllUsuario\n $users = $ac4->findAllUsuario();\n $activi2 = new Actividad();\n $porcentaje = $activi2->countTipo();\n $activi3 = new Actividad();\n $usuariosActividad = $activi3->findUsariosActividad();\n if (isset($_GET['id'])) {\n $id = $_GET['id'];\n if ($id == '') {\n header('Location: ' . baseUrl . 'error/index');\n }\n $ac5 = new Actividad();\n $ac5->setId($id);\n $r = $ac5->findID();\n }\n require_once 'views/actividad/crud.php';\n }", "title": "" }, { "docid": "b9ac61325b9f1fdfb4bc3453943ff391", "score": "0.50417054", "text": "function getDatosTipo()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'tipo'));\n $oDatosCampo->setEtiqueta(_(\"tipo\"));\n $oDatosCampo->setTipo('texto');\n $oDatosCampo->setArgument(1);\n return $oDatosCampo;\n }", "title": "" }, { "docid": "ff12e7e0fd423a0e41c18253b0fda204", "score": "0.5038835", "text": "public function getTipoExemplar()\n {\n return $this->hasOne(Tipoexemplar::className(), ['id' => 'TipoExemplar_id']);\n }", "title": "" }, { "docid": "c442807fb0ba03d8b3d9e7a0a477100f", "score": "0.5037185", "text": "function equipajeReservaPasajeroVuelo() {\n $resultado = $this->controlBD->consultarEquipajeReservaPasajeroVuelo();\n return $resultado;\n }", "title": "" }, { "docid": "502dd2c66759ccb9205074f17d3a1b9c", "score": "0.5035314", "text": "public static function agregar_equipoinf ($serial_factura,$fecha,$serial_material,$proveedor,$descripcion,$cantidad,$doc)\n{\ninclude (\"conexiondb.php\");\ninclude (\"auditoria.php\");\n\n$query = \"SELECT cant FROM equipo_inf WHERE cod_inventario ='$serial_material' \"; \n$resultado= pg_query ($dbconn,$query);\n$row = pg_fetch_assoc($resultado);\n$cantidad_equipo=$row['cant'];\n\n// validacion de que los campos del formulario no estan vacios \nswitch (true) { \ncase $serial_factura=='' or $serial_material=='' or $proveedor=='' or $cantidad=='';\necho'<script>\nswal({title:\"\",text:\"Ninguno de los campos obligatorios debe estar vacio\",timer: 3000, confirmButtonColor:\"#2E64FE\",showConfirmButton:true }); \n</script>';\nbreak; \n\n// validacion de que el combobox no fue manipulado\ncase pg_num_rows($resultado)==0;\necho'<script>swal({title:\"\",text:\"Funcion no permitida\",timer: 3000, confirmButtonColor:\"#2E64FE\",showConfirmButton:true }); \n</script>'; \nbreak; \n\n// validacion que la cantidad no tenga letras \ncase (!is_numeric($cantidad));\necho'<script>swal({title:\"\",text:\"La cantidad de material no debe contener letras\",timer: 3000, confirmButtonColor:\"#2E64FE\",showConfirmButton:true }); \n</script>'; \nbreak; \n\n// validacion que el serial factura no tenga letras \ncase (!is_numeric($serial_factura));\necho'<script>swal({title:\"\",text:\"El serial de factura no debe contener letras \",timer: 3000, confirmButtonColor:\"#2E64FE\",showConfirmButton:true }); \n</script>'; \nbreak; \n\n// se ingresan los datos del equipo nuevo\ncase $query1= \"INSERT INTO ingreso_equipo (id_factura,fecha_ingre_equipo,cod_invet_ingre_equipo,proveedor_ing_equipo,equipo_desc_fact,cant_ingreso) values ('$serial_factura','$fecha','$serial_material','$proveedor','$descripcion','$cantidad')\"; \n$resultado1= pg_query($dbconn,$query1); \n\n// se actualiza la cantidad en la tabla equipo \n$cantidad_equipo=$cantidad_equipo + $cantidad;\n$query2= \"UPDATE equipo_inf SET cant='$cantidad_equipo' WHERE cod_inventario ='$serial_material' \";\n$resultado2= pg_query($dbconn,$query2);\n\n// Se registra el evento en el log de auditoria \nauditoria:: registro_evento ($id_usuario=\"$doc\",$fecha=date(\"d/m/Y\"),$hora=date(\"G:i:s\"),$host=$_SERVER[\"SERVER_ADDR\"],$tipo=\"Registro equipo\");\n\necho'<script> swal({title:\"\",text:\"El registro fue creado exitosamente\",timer: 3000,confirmButtonColor:\"#2E64FE\",showConfirmButton:true}); \n</script>'; \nbreak;\n} \n}", "title": "" }, { "docid": "2673b924901a587a4c2477942b3cbb04", "score": "0.50345045", "text": "public function store(Request $request)\n {\n $token = $request->session()->token();\n\n $token = csrf_token();\n $chars = '0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz';\n $charsLength = (strlen($chars) - 1);\n $r = null;\n\n for ($i = 1; $i <= 8; $i++) {\n $rand = rand(0, $charsLength);\n $r .= $chars[$rand];\n }\n\n $equipo = new \\App\\Models\\Equipo();\n $equipo->id_user = $request->get('id_user');\n $equipo->id_cliente = $request->get('id_cliente');\n $equipo->id_servicio = $request->get('id_servicio'); //marca\n $equipo->email = $request->get('email_contacto');\n $equipo->telefono = $request->get('telefono_contacto');\n $equipo->presupuesto = $request->get('presupuesto');\n $equipo->pago = $request->get('pago');\n $equipo->uniqueid = $r;\n $equipo->modelo = $request->get('modelo');\n $equipo->id_sucursal = $request->get('id_sucursal');\n $equipo->serial = $request->get('serial');\n $equipo->imei = $request->get('imei');\n $equipo->id_captura = $request->get('id_captura');\n $equipo->id_comentario = $request->get('descripcion');\n $equipo->fecha_recibido = $request->get('fecha_recibido');\n $equipo->fecha_entrega = $request->get('fecha_entrega');\n $equipo->status = $request->get('status');\n $equipo->Tiene_Camara = $request->get('Tiene_Camara');\n $equipo->Centro_Carga = $request->get('Centro_Carga');\n $equipo->Señal = $request->get('Señal');\n $equipo->LectorSD = $request->get('LectorSD');\n $equipo->AltaVoz = $request->get('AltaVoz');\n $equipo->BotonHome = $request->get('BotonHome');\n $equipo->Microfono = $request->get('Microfono');\n $equipo->Lector_SIM = $request->get('Lector_SIM');\n $equipo->Volumenplus = $request->get('Volumenplus');\n $equipo->Volumenless = $request->get('Volumenless');\n $equipo->Encendido = $request->get('Encendido');\n $equipo->Auricular = $request->get('Auricular');\n $equipo->Touch = $request->get('Touch');\n $equipo->Bateria = $request->get('Bateria');\n $equipo->Enciende = $request->get('Enciende');\n $equipo->Memoria = $request->get('Memoria');\n $equipo->SIM = $request->get('SIM');\n $equipo->Golpes = $request->get('Golpes');\n $equipo->Tiene_Bateria = $request->get('Tiene_Bateria');\n $equipo->save();\n\n $user = \\App\\Models\\User::all();\n //$usuario = \\App\\Models\\User::find(1);\n\n $setting = \\App\\Models\\Settings::find(1);\n $pago = new \\App\\Models\\Pago_Equipo();\n //$cajaT = \\App\\Models\\Caja::all();\n $sucursal = \\App\\Models\\Sucursal::find($equipo->id_sucursal);\n $caja = \\App\\Models\\Caja::find($sucursal->id);\n $pago->id_user = $equipo->id_user;\n $pago->id_equipo = $equipo->id;\n\n $pago->iva = $setting->setting_iva;\n $pago->id_cliente = $equipo->id_cliente;\n $pago->id_servicio = null;\n $pago->id_sucursal = $equipo->id_sucursal;\n $pago->id_caja = $caja->id;\n $pago->id_corte = $equipo->created_at; //\n $pago->monto = $equipo->presupuesto; // esto es lo que deberia de pagar total\n $pago->adelanto = $equipo->pago; // esto es lo que adelanto\n if ($pago->adelanto == 0 && $pago->iva == '' && $pago->monto == 0) {\n $pago->total = 0;\n } else if ($pago->adelanto != 0 && $pago->iva != '' && $pago->monto != 0) {\n\n // $temporal = $pago->monto - $pago->adelanto; se quito aqui quite primero el adelanto y luego aplique el iva WRONG\n //1000 - 100=900\n $iva = ($pago->monto * $pago->iva) / 100;\n // dd($iva);\n //900*16=144\n $pago->pagado = $pago->monto + $iva;\n $total = ($pago->monto + $iva) - $pago->adelanto; //aqui calculo el total mas el iva y luego remuevo el adelanto es lo que falta a pagar\n $pago->total = $total;\n $cajaTemp = $pago->adelanto + $caja->corte;\n $caja->corte = $cajaTemp;\n } else if ($pago->adelanto != 0 && $pago->iva == '' && $pago->monto != 0) {\n $pago->pagado = $pago->monto;\n $temporal = $pago->monto - $pago->adelanto;\n $total = $temporal;\n $pago->total = $total;\n $cajaTemp = $pago->adelanto + $caja->corte;\n $caja->corte = $cajaTemp;\n } else if ($pago->adelanto == 0 && $pago->iva != '' && $pago->monto != 0) {\n\n //1000 - 100=900\n $iva = ($pago->monto * $pago->iva) / 100;\n //900*16=144\n $pago->pagado = $pago->monto + $iva;\n $total = $pago->monto + $iva;\n $pago->total = $total;\n $cajaTemp = $pago->adelanto + $caja->corte;\n $caja->corte = $cajaTemp;\n } else if ($pago->adelanto != 0 && $pago->iva != '' && $pago->monto == 0) {\n\n $pago->total = 0;\n $cajaTemp = $pago->adelanto + $caja->corte;\n $caja->corte = $cajaTemp;\n } else {\n $pago->total = 0;\n $cajaTemp = $pago->adelanto + $caja->corte;\n $caja->corte = $cajaTemp;\n }\n\n $pago->comentario = $request->get('comentario4');\n $pago->status = 0;\n $pago->fecha = $equipo->created_at;\n $pago->save();\n $caja->save();\n if ($equipo->email != '') {\n Mail::to($request->user())->cc($equipo->email)->send(new notificacionEmail($equipo, $setting));\n }\n\n return back()->with('success', '<a target=\"_blank\" href=\"/imprimir/id=' . $equipo->id . '&csrf=' . $token . '\">Ticket Generado con exito <br> Imprime Esta Orden dando Click aqui</a>');\n }", "title": "" }, { "docid": "89df4c3447777aba4f265ed7f78ebb79", "score": "0.5028157", "text": "function buildTablaOtros(){\n $comprasOtros= Xcrud::get_instance()->table('follaje')->unset_remove()->unset_add();\n $comprasOtros->fields('user,stamp,registroevento.hotel,registroevento.descripcionItem,registroevento.comentarioItem,registroevento.fechaEvento,registroevento.imagen',true);\n $comprasOtros->join('idOrden','registroevento','id');\n $comprasOtros->where('estatus !=','Cotizado');\n $comprasOtros->order_by('id','desc');\n\n /* Nombre de tabla */\n $comprasOtros->table_name('Follaje y Otros');\n\n /* Cambiar nombres a las columnas */\n //tabla Follaje\n $comprasOtros->label('id','# Pedido');\n $comprasOtros->label('idOrden','# Orden');\n $comprasOtros->label('item','Follaje/Otro');\n $comprasOtros->label('user','Pedido creado por');\n $comprasOtros->label('stamp','Pedido creado en');\n $comprasOtros->label('precioUnitario','Precio Unitario');\n $comprasOtros->label('presupuestoTotal','Presupuesto Total');\n //tabla Evento\n $comprasOtros->label('registroevento.fechaEvento','Fecha de evento');\n $comprasOtros->label('registroevento.nombreItem','Articulo');\n $comprasOtros->label('registroevento.folioEP','Folio EP');\n $comprasOtros->label('registroevento.stamp','Evento creado en');\n $comprasOtros->label('registroevento.user','Evento creado por');\n\n\n /* Mostrar ID en campos */\n $comprasOtros->show_primary_ai_field(true);\n $comprasOtros->show_primary_ai_column(true);\n\n /* Quitar numeros de fila */\n /* $comprasOtros->unset_numbers(); */ \n \n /* Mapeo de columnas */\n $comprasOtros->columns('id,idOrden,registroevento.folioEP,registroevento.fechaEvento,registroevento.nombreItem,item,cantidad,unidad,precioUnitario,presupuestoTotal,estatus,registroevento.tipo');\n \n /* Campos de solo lectura */\n $comprasOtros->readonly('id,idOrden,item,unidad,cantidad,precioUnitario,presupuestoTotal,notas,registroevento.estatus,registroevento.folioEP,registroevento.fechaEvento,registroevento.nombreItem,registroevento.cantidadItem,registroevento.tipo');\n $comprasOtros->disabled('stamp,registroevento.stamp');\n \n /* Lista de opciones de solicitud para compras */\n $comprasOtros->change_type('estatus','select','black,white',array('values'=>'-,Pedido,Entregado,Cancelado,Incompleto'));\n\n /* Highligt */\n $comprasOtros->highlight('estatus','=','Pedido','#fa9973');\n $comprasOtros->highlight('estatus','=','Entregado','#86f584');\n $comprasOtros->highlight('estatus','=','Cancelado','#f7cdf3');\n $comprasOtros->highlight('estatus','=','Confirmado','#ebe9e4');\n $comprasOtros->highlight('estatus','=','Incompleto','#f7f497');\n $comprasOtros->highlight('registroevento.tipo','=','Urgente','#ff8645');\n\n /* No puede modificar despues de poner entregado */\n /* $comprasOtros->unset_edit(true,'estatus','=','Entregado'); */\n\n return $comprasOtros;\n\n}", "title": "" }, { "docid": "0bdc8a207b31403ba415dc89a6948085", "score": "0.50259155", "text": "public static function save($inventario){\n\t\t$db=Db::getConnect();\n\t\t\t\t\n\t\t$insert=$db->prepare('INSERT INTO inventario VALUES (NULL, :nombre_producto,:precio,:cantidad,\n\t\t\t:descripcion,:id_tienda)');\n\n\t\t$insert->bindValue('nombre_producto',$inventario->getNombreProducto());\n\t\t$insert->bindValue('precio',$inventario->getPrecio());\n\t\t$insert->bindValue('cantidad',$inventario->getCantidad());\n\t\t$insert->bindValue('descripcion',$inventario->getDescripcion());\t\t\n\t\t$insert->bindValue('id_tienda',$inventario->getTienda());\n\t\t$insert->execute();\n\n\t}", "title": "" }, { "docid": "c607711024521aab54cc0e9b337f3e04", "score": "0.5024453", "text": "function Consulta(){\r\n $query = \"SELECT\r\n v.ID_Vehiculo, v.VEH_Placa, v.VEH_Color, v.VEH_Modelo, v.VEH_Marca, v.ID_Tipo_Vehiculo, t.TV_Nombre as Tipo_Vehiculo,v.ID_Conductor,CONCAT(c.CON_Nombre,' ',c.CON_Apellidos) as Nombre_Conductor\r\n FROM\r\n \" . $this->table_name . \" v\r\n LEFT JOIN\r\n Tbl_Tipo_Vehiculo t\r\n ON v.ID_Tipo_Vehiculo = t.ID_Tipo_Vehiculo\r\n LEFT JOIN\r\n Tbl_Conductor c\r\n ON v.ID_Conductor = c.ID_Conductor\r\n WHERE\r\n v.VEH_Placa = ?\r\n LIMIT\r\n 0,1\";\r\n // prepare query statement\r\n $stmt = $this->conn->prepare( $query );\r\n \r\n // bind id of product to be updated\r\n $stmt->bindParam(1, $this->VEH_Placa);\r\n \r\n // execute query\r\n $stmt->execute();\r\n \r\n // get retrieved row\r\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\r\n \r\n // set values to object properties\r\n $this->ID_Vehiculo = $row['ID_Vehiculo'];\r\n $this->VEH_Placa = $row['VEH_Placa'];\r\n $this->VEH_Color = $row['VEH_Color'];\r\n $this->VEH_Modelo = $row['VEH_Modelo'];\r\n $this->VEH_Marca = $row['VEH_Marca'];\r\n $this->ID_Tipo_Vehiculo = $row['ID_Tipo_Vehiculo'];\r\n $this->Tipo_Vehiculo = $row['Tipo_Vehiculo'];\r\n $this->ID_Conductor = $row['ID_Conductor'];\r\n $this->Nombre_Conductor = $row['Nombre_Conductor'];\r\n }", "title": "" }, { "docid": "41afc6990eabaf43ecd768ea7e5c5702", "score": "0.50187814", "text": "function verEquipo($id){\n $sentencia = $this->db->prepare( \"select * from equipo where id=?\");\n $sentencia->execute([$id]);\n\n return $sentencia->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "0085b00ae2d6feef4d58cadb63d02076", "score": "0.5018366", "text": "function getRRHHOrdenTrabajo($idOT){\n\t\t\t$this->db->select('tbl_listarea.id_usuario,\n\t\t\t\t\t\t\t\t\t\t\t\tsisusers.usrName,\n\t\t\t\t\t\t\t\t\t\t\t\tsisusers.usrLastName');\t\t\t\n\t\t\t$this->db->from('tbl_listarea');\n\t\t\t$this->db->join('sisusers', 'sisusers.usrId = tbl_listarea.id_usuario');\n\t\t\t$this->db->where('tbl_listarea.id_orden', $idOT);\n\t\t\t$query = $this->db->get();\n\t\t\t$i = 0;\n\t\t\tforeach ($query->result() as $row)\n\t\t\t{ \n\t\t\t\t\t$equipos[$i]['label'] = $row->usrLastName.\", \". $row->usrName ;\n\t\t\t\t\t$equipos[$i]['value'] = $row->id_usuario;\n\t\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $equipos; \n\t\t}", "title": "" }, { "docid": "93f472b34cb0334ee6cb36391f3a3b80", "score": "0.5014116", "text": "public function show(Equipo $equipo)\n {\n if (\\Auth::user()->tipo == \"admin\")\n {\n return view('equipos.equipoShow', compact('equipo'));\n }\n elseif(\\Auth::user()->tipo == \"comun\")\n {\n return redirect()->route('equipos.index');\n }\n }", "title": "" }, { "docid": "8abdb004c573c5ceb38f02726fe35740", "score": "0.5013527", "text": "public function combo_proveedor()\n\t{\n\t\t$id_proveedor = $this->input->post('elegido');\n\t\t$this->Proveedor->muestra_combo_proveedor($id_proveedor);\n\t}", "title": "" }, { "docid": "44ce9be721158528fe536914ca27c4c8", "score": "0.50056094", "text": "public function item_pedido(){\n\t\t$this->set_config =\n\t \t\t[ \n\t\t\t'table' =>\n\t\t\t\t['nome' => 'tbl_item_pedido',\n\t\t\t\t 'chave_pk' => 'id_item_pedido',\n\t\t\t\t 'display' => 'Item do Pedido'],\n\t\t\t'columns' =>\n\t\t\t\t[\n\t\t\t\t \n\t\t\t 'id_item_pedido' =>\n\t\t\t\t['display_column' => 'Id', \n\t\t\t\t \n\t\t\t\t 'select' => [],\n\t\t\t\t 'input' => ['type' => 'number', 'required' => 'readonly'],\n\t\t\t\t\t\n\t\t\t\t 'rules' => '',\n\t\t\t\t 'default_value' => '', \n\t\t\t\t 'costumer_value' => '',\n\t\t\t\t 'display_grid' => 'false'],\n\t\t\t 'id_pedido' =>\n\t\t\t\t['display_column' => 'Pedido', \n\t\t\t\t \n\t\t\t\t 'select_relacional' => ['id_pedido','tbl_pedido', 'id_pedido', []],\n\t\t\t\t\t\n\t\t\t\t 'rules' => 'required',\n\t\t\t\t 'default_value' => '', \n\t\t\t\t 'costumer_value' => '',\n\t\t\t\t 'display_grid' => 'true'],\n\t\t\t 'id_produto' =>\n\t\t\t\t['display_column' => 'Produto', \n\t\t\t\t \n\t\t\t\t 'select_relacional' => ['id_produto','tbl_produto', 'nome', []],\n\t\t\t\t\t\n\t\t\t\t 'rules' => 'required',\n\t\t\t\t 'default_value' => '', \n\t\t\t\t 'costumer_value' => '',\n\t\t\t\t 'display_grid' => 'true'],\n\t\t\t 'id_categoria' =>\n\t\t\t\t['display_column' => 'Categoria', \n\t\t\t\t \n\t\t\t\t 'select' => [],\n\t\t\t\t 'input' => ['type' => 'number', 'required' => 'required'],\n\t\t\t\t\t\n\t\t\t\t 'rules' => 'required',\n\t\t\t\t 'default_value' => '', \n\t\t\t\t 'costumer_value' => '',\n\t\t\t\t 'display_grid' => 'true'],\n\t\t\t 'qtde' =>\n\t\t\t\t['display_column' => 'Qtde', \n\t\t\t\t \n\t\t\t\t 'select' => [],\n\t\t\t\t 'input' => ['type' => 'number', 'required' => 'required'],\n\t\t\t\t\t\n\t\t\t\t 'rules' => 'required',\n\t\t\t\t 'default_value' => '', \n\t\t\t\t 'costumer_value' => '',\n\t\t\t\t 'display_grid' => 'true'],\n\t\t\t 'valor_unitario' =>\n\t\t\t\t['display_column' => 'Valor Unitário', \n\t\t\t\t \n\t\t\t\t 'select' => [],\n\t\t\t\t 'input' => ['type' => 'number', 'required' => 'required'],\n\t\t\t\t\t\n\t\t\t\t 'rules' => 'required',\n\t\t\t\t 'default_value' => '', \n\t\t\t\t 'costumer_value' => '',\n\t\t\t\t 'display_grid' => 'true'],\n\t\t\t 'id_usuario' =>\n\t\t\t\t['display_column' => '', \n\t\t\t\t \n\t\t\t\t 'select_relacional' => ['id_usuario','tbl_usuario', 'nome', []],\n\t\t\t\t\t\n\t\t\t\t 'rules' => '',\n\t\t\t\t 'default_value' => $this->session->userdata(\"id_user\"), \n\t\t\t\t 'costumer_value' => '',\n\t\t\t\t 'display_grid' => 'false'],\n\n\t\t\t\t],\n\t\t\t'where' => ['id_usuario' => $this->session->userdata('id_user')],\n\t\t\t'dropdown' => [],\n\t\t];\n\n\t\t$this->execute();\n\t}", "title": "" }, { "docid": "9ca3c71e4a9f15f0eb2f04b03432528c", "score": "0.49936417", "text": "function insertarTipoCompDefecto() {\n\t\t\t\n\t\t\t$cnx = \tconectar_postgres();\n\t\t\t$cons = \"INSERT INTO Contabilidad.TiposComprobante (tipo) VALUES ('POR VALIDAR')\"\t;\n\t\t\t\t\t \n\t\t\t$cons = str_replace( \"'NULL'\",\"NULL\",$cons );\t\n\t\t\t$res = @pg_query($cnx, $cons);\n\t\t\t\tif (!$res) {\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>\".$consUTF8.\"<br/> <br/> <br/>\";\n\t\t\t\t}\n\t\n\t\t}", "title": "" }, { "docid": "e4ce60d0607d449ec38b606e493469f4", "score": "0.4988939", "text": "public function busca($select, $busca){\n $conn = new Conexao();\n //Criação de uma estrutura de escolha para o campo select do metodo busca.\n switch($select){\n \n //Estrutura condicional, para selecionar as informações do cliente.\n case \"CLIENTE\":\n\n //Herança da classe método buscando os camos e informaçõs da tabela no banco de dados.\n $conn->conecta();\n $query=\"SELECT cliente,email,telefone FROM cliente WHERE cliente like '%\".$busca.\"%'\";\n $conn->query = $conn->mysqli->query($query);\n\n //Cria as Linhas de array para armazenar os campos obtidos como resultado da busca. \n $dbArray = mysqli_fetch_array($conn->query);\n $cliente = $dbArray[0];\n $email = $dbArray[1];\n $telefone = $dbArray[2];\n \n //impressão das informações na tela. \n echo '<label>Nome: </label>'.$cliente.'</br>';\n echo '<label>Email: </label>'.$email.'</br>';\n echo '<label>Telefone: </label>'.$telefone.'</br>';\n\n //finalização da conexão com banco.\n exit();\n $conn->disconecta();\n\n ;break;\n\n //Estrutura condicional, para selecionar as informações do produto.\n case \"PRODUTO\":\n \n //Herança da classe método buscando os camos e informaçõs da tabela no banco de dados.\n $conn->conecta();\n $query=\"SELECT nome, descricao, preco, quantidade, dataP FROM produto WHERE nome LIKE '%\".$busca.\"%'\";\n $conn->query = $conn->mysqli->query($query);\n \n //Cria as Linhas de array para armazenar os campos obtidos como resultado da busca.\n $dbArray = mysqli_fetch_array($conn->query); \n $nome = $dbArray[0];\n $descricao = $dbArray[1];\n $preco = $dbArray[2];\n $quantidade = $dbArray[3];\n $data = $dbArray[4];\n \n //estrutura condicional para, faz com que os produtos mostrados se repitam até suas quantias.\n // for ($i=0; $i <= 5; $i++) { \n // echo '<label style=\"\">Nome: </label>'.$dbArray[$i].'<br>';\n // }\n\n echo '<label>Nome: </label>'.$nome.'</br>';\n echo '<label>Descrição: </label>'.$descricao.'</br>';\n echo '<label>Preço: </label>'.$preco.'</br>';\n echo '<label>Quantidade: </label>'.$quantidade.'</br>';\n echo '<label>Data: </label>'.$data.'</br>'.'</br>';\n\n //finaliza conexão com banco de dados.\n exit();\n $conn->disconecta();\n\n ;break;\n\n //Estrutura condicional, para selecionar as informações do produto.\n case \"VENDA\":\n \n //Herança da classe método buscando os camos e informaçõs da tabela no banco de dados.\n $conn->conecta();\n $query=\"SELECT * FROM venda WHERE datav LIKE '%\".$busca.\"%'\";\n $conn->query = $conn->mysqli->query($query);\n\n //Estrutura condicional para repetição do metodo while de impressão das imformações.\n while ($result=mysqli_fetch_array($conn->query)) {\n echo '<label>Id Venda: </label>' . $result['idVenda'] .'</br>';\n echo '<label>Cliente: </label>' . $result['idCliente'] .'</br>';\n echo '<label>Produto: </label>' . $result['idProduto'] .'</br>';\n echo '<label>Quantidade: </label>' . $result['quantidade'] .'</br>';\n echo '<label>Subtotal: </label>' . $result['subtotal'] .'</br>';\n echo '<label>Total: </label>' . $result['total'] .'</br>';\n echo '<label>Observação: </label>' . $result['obs'] .'</br>';\n echo '<label>Data: </label>' . $result['datav'] .'</br>';\n echo '</br>';} \n \n //finaliza conexão com banco de dados.\n exit();\n $conn->disconecta();\n\n ;break;\n }\n }", "title": "" }, { "docid": "3e77e0371b224735828c6ea08d41f23c", "score": "0.4986482", "text": "public static function getFromExtTableGabarit($gabarit=0) {\n\t\t$listeObjet = array();\n\t\t// Lancement de la requete\n\t\t$requete = 'SELECT * FROM `equipement_joueur` ';\n\t\tif ($gabarit == 0) {\n\t\t\t$requete .= 'WHERE gabarit > 0 ORDER BY id ASC';\n\t\t} else {\n\t\t\t$requete .= 'WHERE gabarit = :gabarit ORDER BY id ASC';\n\t\t\t//Il faut que le parametre soit dans un array pour le BIND\n\t\t\t$gabarit = array(':gabarit' => $gabarit);\n\t\t}\n\t\tdatabase::getInstance() -> prepareRequete($requete);\n\t\tif (is_array($gabarit) || $gabarit > 0) {\n\t\t\tdatabase::getInstance() -> bind($gabarit);\n\t\t}\n\t\tif (! database::getInstance() -> executeRequete()) {\n\t\t\tthrow new Exception(__CLASS__.'::'.__FUNCTION__.'(): Impossible de lire la table equipement_joueur');\n\t\t}\n\t\t// Recuperation des donnees\n\t\t$datas = database::getInstance() -> getTableauResultat();\n\t\t// Traitement des donnees\n\t\tforeach ($datas AS $data) {\n\t\t\t$listeObjet[] = new Equipement_joueur($data['id'],$data['membre'],$data['unite_joueur'],$data['nom'],$data['description'],$data['categorie'],$data['cp'],$data['lp'],$data['mtcp'],$data['mtlp'],$data['dommage'],$data['msvg'],$data['gabarit'],$data['type'],$data['fo'],$data['sauvegarde'],$data['mmvt'],$data['encombrement'],$data['deux_mains'],$data['cout'],$data['date_creation'],$data['used'],$data['chemin'],$data['tile'],$data['usure'],$data['demontable'],$data['date_fin_reparation'],$data['ingame']);\n\t\t}\n\t\tif (sizeof($listeObjet) == 1) {\n\t\t\t$listeObjet = $listeObjet[0];\n\t\t}\n\t\treturn $listeObjet;\n\t}", "title": "" }, { "docid": "4aef57e6ee47bbe242e7f645b37a8b1a", "score": "0.49864367", "text": "public function actionProceso2() {\n $contador = 1;\n $equipos = 1;\n $inscripciones = Inscripcion::find()->where('rol=1')->all();\n foreach ($inscripciones as $inscripcion) {\n $institucion = Institucion::find()->where('codigo_modular=:codigo_modular', [':codigo_modular' => $inscripcion->codigo_modular])->one();\n if ($institucion) {\n $estudiante = Estudiante::find()->where('dni=:dni or email=:email', [':dni' => $inscripcion->dni, ':email' => $inscripcion->email])->one();\n $estudianteCount = Estudiante::find()->where('dni=:dni or email=:email', [':dni' => $inscripcion->dni, ':email' => $inscripcion->email])->count();\n\n if ($estudianteCount <= 1 && $inscripcion->rol == 1) {\n\n $coordinador = Integrante::find()->where('estudiante_id=:estudiante_id', [':estudiante_id' => $estudiante->id])->one();\n //var_dump($coordinador);\n if ($coordinador && $coordinador->rol == 1) {\n $equipo = Equipo::find()->where('id=:id', [':id' => $coordinador->equipo_id])->one();\n echo \"Ya es lider del equipo \" . htmlentities($equipo->descripcion_equipo, ENT_QUOTES) . \" \" . $estudiante->dni . \"<br>\";\n } elseif ($coordinador && $coordinador->rol == 2) {\n $equipo = Equipo::find()->where('id=:id', [':id' => $coordinador->equipo_id])->one();\n echo \"Es integrante del equipo \" . htmlentities($equipo->descripcion_equipo, ENT_QUOTES) . \" \" . $estudiante->dni . \"<br>\";\n } else {\n $equipo = new Equipo;\n $equipo->descripcion_equipo = $inscripcion->equipo;\n $equipo->descripcion = $inscripcion->equipo;\n $equipo->fecha_registro = date(\"Y-m-d H:i:s\");\n $equipo->estado = 0;\n $equipo->etapa = 0;\n $equipo->save();\n $coordinador = new Integrante;\n $coordinador->estudiante_id = $estudiante->id;\n $coordinador->equipo_id = $equipo->id;\n $coordinador->rol = 1;\n $coordinador->estado = 1;\n $coordinador->save();\n $invitados = Inscripcion::find()->where('lider_id=:lider_id and rol=2', [':lider_id' => $estudiante->id])->all();\n foreach ($invitados as $invitado) {\n $invitacion = new Invitacion;\n $invitacion->equipo_id = $equipo->id;\n $invitacion->estudiante_id = $coordinador->estudiante_id;\n $invitacion->estudiante_invitado_id = $invitado->estudiante_id;\n $invitacion->estado = 2;\n $invitacion->fecha_invitacion = date(\"Y-m-d H:i:s\");\n $invitacion->fecha_aceptacion = date(\"Y-m-d H:i:s\");\n $invitacion->save();\n\n $integrante = new Integrante;\n $integrante->equipo_id = $equipo->id;\n $integrante->estudiante_id = $invitado->estudiante_id;\n $integrante->rol = 2;\n $integrante->estado = 1;\n $integrante->save();\n }\n\n\n\n echo \"Se ha creado al lider del equipo: \" . $inscripcion->equipo . \" con dni\" . $inscripcion->dni . \"<br>\";\n $equipos++;\n }\n } else {\n echo \"El usuario DNI:\" . $inscripcion->dni . \" presenta doble registro <br>\";\n }\n } else {\n echo \"El usuario DNI:\" . $inscripcion->dni . \" su codigo modular se encuentra erroneo <br>\";\n }\n echo $contador;\n $contador++;\n }\n echo \"equipo creados\" . $equipos;\n }", "title": "" }, { "docid": "41ff5bfed2e86476fc92d4b266a102b3", "score": "0.49839473", "text": "function getTipo()\n {\n if (!isset($this->itipo) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->itipo;\n }", "title": "" }, { "docid": "f46dff156388f97e7c1f1aeed48334ac", "score": "0.49793068", "text": "public static function setTblproducto($nombreproduct, $descripcion,$ingredientes,$seo,$promcalif,$activado,$idtblproveedor,$idtblcategproduc,$idtblclasifproduct,$emailcreo){\n \n $insert =\"INSERT INTO tblproducto (\n tblproducto_nombre,\n tblproducto_descripcion,\n tblproducto_ingredientes,\n tblproducto_seo,\n tblproducto_promcalificacion,\n tblproducto_activado,\n tblproveedor_idtblproveedor,\n tblcategproduct_idtblcategproduct,\n tblclasifproduct_idtblclasifproduct,\n tblproducto_fchmodificacion,\n tblproducto_fchcreacion,\n tblproducto_emailusuacreo,\n tblproducto_emailusuamodifico) VALUES (?,?,?,?,?,?,?,?,?,NOW(),NOW(),?,?)\"; \n \n try{\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($insert);\n\t\t\t$resultado->bindParam(1,$nombreproduct,PDO::PARAM_STR);\n\t\t\t$resultado->bindParam(2,$descripcion,PDO::PARAM_STR);\n\t\t\t$resultado->bindParam(3,$ingredientes,PDO::PARAM_STR);\n\t\t\t$resultado->bindParam(4,$seo,PDO::PARAM_STR);\n\t\t\t$resultado->bindParam(5,$promcalif,PDO::PARAM_STR);\n\t\t\t$resultado->bindParam(6,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->bindParam(7,$idtblproveedor,PDO::PARAM_INT);\n\t\t\t$resultado->bindParam(8,$idtblcategproduc,PDO::PARAM_INT);\n\t\t\t$resultado->bindParam(9,$idtblclasifproduct,PDO::PARAM_INT);\n\t\t\t$resultado->bindParam(10,$emailcreo,PDO::PARAM_STR);\n\t\t\t$resultado->bindParam(11,$emailcreo,PDO::PARAM_STR);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->rowCount(); //retorna el numero de registros afectado por el insert\n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n }", "title": "" }, { "docid": "64c6e7367bd7fd9dca7dadf1f3a8d1be", "score": "0.49714652", "text": "final public function comprarleche(){\n if (isset($_POST['id_productor'])) {\n $rp = array(\n 'id_productor' => $_POST['id_productor'],\n 'ced_leche' => $_POST['id_productor'],\n 'cantidad_leche' => $_POST['cantidad_leche']\n\n );\n $this->db->insert('leche', $rp);\n }else{\n\n }\n }", "title": "" }, { "docid": "14c8869dc101285da8ee2bc8ee11375a", "score": "0.49703637", "text": "public function get_tipo_pessoa()\n {\n // loads the associated object\n if (empty($this->tipo_pessoa))\n $this->tipo_pessoa = new TipoPessoa($this->tipo_pessoa_id);\n \n // returns the associated object\n return $this->tipo_pessoa;\n }", "title": "" }, { "docid": "2fa6c139d0ce7fe6191b90da7224ecfc", "score": "0.49682295", "text": "protected static function agregar_item_modelo($datos){\r\n\t\t\t$sql=mainModel::conectar()->prepare(\"INSERT INTO item(item_codigo,item_tipo,item_nombre,item_stock,item_estado,item_detalle) VALUES(:Codigo,:Tipo,:Nombre,:Stock,:Estado,:Detalle)\");\r\n\r\n\t\t\t$sql->bindParam(\":Codigo\",$datos['Codigo']);\r\n\t\t\t$sql->bindParam(\":Tipo\",$datos['Tipo']);\r\n\t\t\t$sql->bindParam(\":Nombre\",$datos['Nombre']);\r\n\t\t\t$sql->bindParam(\":Stock\",$datos['Stock']);\r\n\t\t\t$sql->bindParam(\":Estado\",$datos['Estado']);\r\n\t\t\t$sql->bindParam(\":Detalle\",$datos['Detalle']);\r\n\t\t\t$sql->execute();\r\n\r\n\t\t\treturn $sql;\r\n\t\t}", "title": "" }, { "docid": "266699b7bf21228ff56f896f25762943", "score": "0.49667647", "text": "public function AgregarPedido()\r\n {\r\n require_once(\"../modelo/m_pedido.php\");\r\n $this->modelo=new M_Pedido();\r\n //require_once(\"../vista/v_ficha_pedido.php\");\r\n\r\n $Producto = $_POST['producto'];\r\n $Talla = $_POST['tallas'];\r\n $Material = $_POST['material'];\r\n $Cantidad=$_POST['cantidad'];\r\n $FechaRequerida = $_POST['fecharequerida'];\r\n\r\n $this->modelo->Registrar_Pedido($Producto, $Talla, $Material, $Cantidad, $FechaRequerida);\r\n }", "title": "" }, { "docid": "d034ca4ecf43ddce4d213409a3994f0b", "score": "0.49599758", "text": "public function ProcesosPorTecnico($tecnico)\n {\n \n\t\t $select=array(\"T0.ACTIVO\",\"T0.ID_TECNICO_PROCESO\",\"T1.CEDULA as cedula\",\"CONCAT(T1.APELLIDO_TECNICO,T1.NOMBRE_TECNICO)AS tecnico\", \"T1.DIRECCION as direccion\",\"T2.NOMBRE_PROCESO as proceso\",\"T3.NOMBRE_CATEGORIA as categoria\", \"T3.SIGLAS_CATEGORIA as siglas\");\n\t\t $this->db->select($select);\n $this->db->from(\"tecnico_proceso T0\");\n\t\t $this->db->join(\"tecnico T1\",'T0.ID_TECNICO=T1.ID_TECNICO');\n\t\t $this->db->join(\"procesos_nombre T2\",'T0.ID_PROCESO_NOMBRE=T2.ID_PROCESO_NOMBRE');\n\t\t $this->db->join(\"categoria T3\",'T0.ID_CATEGORIA=T3.ID_CATEGORIA');\n\t\t $this->db->order_by(\"T1.ID_TECNICO\",\"DESC\");\n\t\t \n\t\t if($tecnico!= \"\"){\n\t\t\t \n $this->db->where(\"T0.ID_TECNICO=\", $tecnico); \n }\n\t\t \n $consulta = $this->db->get();\n $resultado = $consulta->result_array();\n return $resultado;\n\t\t\t\t\n }", "title": "" }, { "docid": "4c0b78fdfe83280c863a810f50436077", "score": "0.49598843", "text": "public function ingresar_venta_items($examen_id, $cliente_id, $gestion_id, $descuento, $venta_id, $valor, $tipo_examen) {\n $query = $this->conexion->prepare(\"INSERT INTO venta_items (examen_id,cliente_id,gestion_id,descuento,venta_id,valor,tipo_examen) VALUES (:examen_id,:cliente_id,:gestion_id,:descuento,:venta_id,:valor,:tipo_examen)\");\n\n $query->execute(array(':examen_id' => $examen_id,\n ':cliente_id' => $cliente_id,\n ':gestion_id' => $gestion_id,\n ':descuento' => $descuento,\n ':venta_id' => $venta_id,\n ':valor' => $valor,\n ':tipo_examen' => $tipo_examen\n ));\n }", "title": "" } ]
f81c60d1a67c6711386bf236fcbc609f
check if user is registered
[ { "docid": "0c67d77605a0cb4e9ce6e957715eb3fa", "score": "0.0", "text": "function _auth()\n {\n if( $this->B->auth->is_user !== FALSE )\n {\n return TRUE;\n }\n else\n {\n $query = base64_encode(commonUtil::getQueryString());\n @header('Location: '.SF_BASE_LOCATION.'/index.php?tpl=login&ret='.$query);\n exit;\n }\n }", "title": "" } ]
[ { "docid": "2c1880a3dfa044ddff738574bd51d246", "score": "0.7921991", "text": "public function isRegistered(){\n return !empty($this->_userInfos['login']);\n }", "title": "" }, { "docid": "23b948d0ddd70ec964564c8ca0c1f6bf", "score": "0.7919892", "text": "public function isRegistered(){\t\t\tif ($_SESSION['id']){\n\t\t\t\t$res = $this->getUsersInfo($_SESSION['id']);\t\t\t\n\t\t\t\tif ($res['Registered'] == '1'){\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn true; //we dont want a user that hasn't logged in yet to, be have the message\n\t\t\t}\n\t\t\treturn false;\t\t\n\t\t}", "title": "" }, { "docid": "db31c0f1d1a4f33f7850e1dae61a2ef0", "score": "0.78600883", "text": "private function is_registered() {\n\t\treturn $this->user->loaded();\n\t}", "title": "" }, { "docid": "33d712360592be48cf8752a0e027f7e6", "score": "0.7729719", "text": "private function isRegistered(){\n\t\t\t$r = false;\n\t\t\t$newusername = strtolower($this->username);\n\t\t\tif (Auth::isKeyCached('user-'.$newusername.'-registered',86400)){\n $r = true;\n } else {\n\t\t\t\t$sql = \"SELECT a.Username\n\t\t\t\t\tFROM sys_user a \n\t\t\t\t\tWHERE a.Username = :username;\";\n\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t$stmt->bindParam(':username', $newusername, PDO::PARAM_STR);\n\t\t\t\tif ($stmt->execute()) {\t\n \t\tif ($stmt->rowCount() > 0){\n\t\t\t\t\t\t$r = true;\n\t\t\t\t\t\tAuth::writeCache('user-'.$newusername.'-registered',null,86400);\n\t \t } \t \t\n\t\t\t\t}\n\t\t\t} \t\t\n\t\t\treturn $r;\n\t\t\t$this->db = null;\n\t\t}", "title": "" }, { "docid": "0d3bb3b29a916b0f4c0d05e104fd1a26", "score": "0.7692935", "text": "public function isRegisteredUser(){\n\t\t\tif(isset($_SESSION['user_data']) && $_SESSION['user_data']){\n\t\t\t\ttry{\n\t\t\t\t\t$email = $_SESSION['user_data']['email'];\n\t\t\t\t\t$name = $_SESSION['user_data']['name'];\n\t\t\t\t\t$password = $_SESSION['user_data']['password'];\n\t\t\t\t\t$query = \"SELECT email FROM users where email = '$email' and name='$name' and password = '$password' \";\n\t\t\t\t\t$result = mysqli_query($this->con_aux, $query);\n\t\t\t\t\t$count = mysqli_num_rows($result);\n\t\t\t\t\t\n\t\t\t\t\tif( $count == 1){\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}catch(Exception $e){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "64128350bdabfc2a4634df0cf65a24c2", "score": "0.7592519", "text": "function is_registered(){\n\t\t$this->load->database();\n\t\t$query = $this->db->query('SELECT * from users WHERE email = ? LIMIT 1', array($this->input->post('email')));\n\t\t\n\t\tif($query->row())\n\t\t\treturn true;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "02592fc2f37b2f9dbaca909c5f039cbd", "score": "0.7488469", "text": "public function userCanRegister()\n {\n $credentials = [\n 'email' => '[email protected]',\n 'password' => 'password',\n ];\n\n $response = $this->json('POST', '/api/auth/register', $credentials);\n // endpoint responded\n $response->assertStatus(200);\n\n $user = \\Sentinel::findByCredentials(['login' => $credentials['email']]);\n // user is there\n $this->assertSame($user->email, $credentials['email']);\n }", "title": "" }, { "docid": "d0bcf4a4db0a57395c62704bb214beaf", "score": "0.74542946", "text": "private function doesUserExist()\n {\n return $this->userEmailPassword['email'] != NULL;\n }", "title": "" }, { "docid": "1aa1b8d5bb047480b0bef98d4564493e", "score": "0.7368282", "text": "public function user_exists() {\n if (isset($_POST['user_name'])) \n {\n \t\t$input_user_name = htmlspecialchars($_POST['user_name']);\n \t\tif ($this->get_id($input_user_name) === false) echo 0;\n \t\telse echo 1;\n\t }\n\t else echo 0;\n }", "title": "" }, { "docid": "6436af3a8e7080b923144dcf3ac36273", "score": "0.73672014", "text": "public function canRegisterUser(): bool\n {\n return $this->security_controller->canRegisterUser();\n }", "title": "" }, { "docid": "cccf25f56d75b3f647955d17d4ee5d11", "score": "0.7353962", "text": "function UserRegistration()\r\n\t\t{\r\n\t\t\t#Return 0 coz already have email in database\r\n\t\t\t$jsonData['Mail'] = $_GET['Mail'];\r\n\t\t\t$jsonData['FirstName'] = $_GET['FirstName'];\r\n\t\t\t$jsonData['LastName'] = $_GET['LastName'];\r\n\t\t\t$jsonData['College'] = $_GET['College'];\r\n\t\t\t$jsonData['Phone'] = $_GET['Phone'];\r\n\t\t\t$jsonData = json_encode($jsonData);\r\n\t\t\tif(RegisterUser($jsonData))\r\n\t\t\t\t{\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "c9eaf3e595f8d386d39ccf3c256c3ce0", "score": "0.7301995", "text": "public function userexistsAction()\n {\n $this->disableLayout();\n $this->disableView();\n $entry = $this->getParam('entry');\n if (!is_string($entry)) {\n echo 'false';\n\n return;\n }\n\n $notifications = Zend_Registry::get('notifier')->callback(\n 'CALLBACK_CORE_CHECK_USER_EXISTS',\n array('entry' => $entry)\n );\n foreach ($notifications as $value) {\n if ($value === true) {\n echo 'true';\n\n return;\n }\n }\n\n $userDao = $this->User->getByEmail(strtolower($entry));\n if ($userDao) {\n echo 'true';\n } else {\n echo 'false';\n }\n }", "title": "" }, { "docid": "1d0300fd384c35a1bcdecdef6a679982", "score": "0.7299856", "text": "function user_exist() {\r\n\t\t\t\r\n\t\t\tif( username_exists( $this->user_login ) ) {\r\n\t\t\t\treturn true;\t\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\t\r\n\t\t\t}\t\t\r\n\t\t}", "title": "" }, { "docid": "dc6231eaa0c25099f9f614cc600a48ae", "score": "0.7237384", "text": "public function isDuringRegistration()\n {\n $session = new Session();\n $code = $session->get('code');\n $email = $session->get('email');\n\n $repository = $this->getDoctrine()->getRepository('UserBundle:ActivationCode');\n\n $code = $repository\n ->findByCodeAndEmail($code, $email);\n\n if (count($code) > 0)\n {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "8ee3cdad3b452fc23f5320d265286e5a", "score": "0.7235279", "text": "private function userExists()\n {\n $db = new Connection();\n $sql = \"Select * FROM users WHERE email_address='\" . $_POST[\"eaddr\"] . \"'\";\n if($result = $db->conn->query($sql))\n {\n $rows = mysqli_num_rows($result);\n if($rows >= 1)\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "7bb1b5b77b4ed1202e24cf6bcee2f1b8", "score": "0.7188278", "text": "private function register() \n\t{\n\t\t$user = trim( htmlentities( $_POST[ 'username-register' ] ) );\n\t\t$pwd = trim( htmlentities( $_POST[ 'pwd-register' ] ) );\n\t\t$pwdConfirm = trim( htmlentities( $_POST[ 'pwd-register-confirm' ] ) );\n\t\t\n\t\t$registered = false;\n\t\t\n\t\tif( $this->notExists( $user ) ) {\n\t\t\tif( $this->passwordMatch( $pwd, $pwdConfirm ) ) {\n\t\t\t\t$this->createUser( $user, $pwd );\n\t\t\t\t$registered = true;\n\t\t\t} else {\n\t\t\t\t$response[ 'valid' ] = false;\n\t\t\t\t$response[ 'type' ] = 2;\n\t\t\t\t$response[ 'msg' ] = \"Passwörter stimmen nicht überein.\";\n\t\t\t\techo json_encode( $response );\n\t\t\t\texit();\n\t\t\t}\n\t\t} else {\n\t\t\t$response[ 'valid' ] = false;\n\t\t\t$response[ 'type' ] = 1;\n\t\t\t$response[ 'msg' ] = \"Benutzer existiert bereits.\";\n\t\t\techo json_encode( $response );\n\t\t\texit();\n\t\t}\n\t\t\n\t\tif( $registered == true ) {\n\t\t\t$this->login( $user, $pwd );\n\t\t} \n\t}", "title": "" }, { "docid": "8cce404209b2811677f39f06c892eeb3", "score": "0.7186943", "text": "public function isRegister($params){\n\t\t\t\n\t\t/* Ejecuta una sentencia preparada pasando un array de valores */\n\t\t$sentencia = $GLOBALS['DB']->prepare('SELECT usuario_id, name, username, role, phone\n\t\t\t\t\t\t\t\tFROM users\n\t\t\t\t\t\t\t\tWHERE username = :username AND password = :password');\n\t\t$sentencia->execute(array(':username' => $params['username'],\n\t\t\t\t\t\t\t\t\t':password' => $params['password']));\n\t\t$user = $sentencia->fetchAll()[0];\t\t\t\t\n\t\tif(count($user == 1))\n\t\t\treturn $user;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "72cc8517eb24d775cbc7ccaea450650f", "score": "0.7182673", "text": "public function userWantsToRegister(){\n if (isset($_POST[self::$register])){\n return true;\n }\n //If register button is not clicked return false.\n return false;\n }", "title": "" }, { "docid": "3885f4d6741fc29d31050325035ddb8e", "score": "0.71749747", "text": "public function register()\n {\n if ($this->validate()) {\n if ($this->registerUser($this)) {\n return true;\n } else {\n $this->addError('username', 'Unknown error. Try to register later!');\n return false;\n }\n }\n return false;\n }", "title": "" }, { "docid": "05c4e10e180812b54b89a63e859a7f98", "score": "0.71680975", "text": "public function check_user_is_registered($app_user_id)\n\t{\n\t\t$query=$this->db->get_where('app_user_details',array('ref_app_user_details_app_user_id'=>$app_user_id));\n\t\t\n\t\tif($query->num_rows()==1)\n\t\t{\n\t\t\t//It is already registered\n\t\t\treturn 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//It is not registered\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\treturn 0;//unexpected;Never happend\n\t}", "title": "" }, { "docid": "e865339acad61a79436e9c617a50fbdd", "score": "0.716117", "text": "private function userExists()\n {\n $user = self::where(['email' => $this->email])->first();\n return ($user == null)? FALSE : TRUE;\n }", "title": "" }, { "docid": "eaa10807d0792cc8a0b35ccf5c713915", "score": "0.7159686", "text": "protected function canRegister()\n {\n return UserSettings::get('allow_registration', true);\n }", "title": "" }, { "docid": "7e23c92f13e942efa3c8cd4d81084c26", "score": "0.7158536", "text": "function check_user()\n\t{\n\t\t$usr=$this->input->post('email');\n\t\t$result=$this->m_user->check_user_exist($usr);\n\t\tif($result)\n\t\t{\n\t\t\techo \"false\";\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\techo \"true\";\n\t\t}\n\t}", "title": "" }, { "docid": "56474efb01773c461e63db4190d6aa28", "score": "0.7142914", "text": "public function registerUser(){\r\n\t\t// Check if user has already participated\r\n\t\t$sql = \"SELECT * FROM `app_participation` WHERE `fb_userid`='$this->user_id' AND `date`='\" . date(\"Y-m-d\", time()) . \"'\";\r\n\t\t$row = $this->db->fetchOne($sql);\r\n\t\tif (!$row && $this->fbme) {\r\n\t\t\t$sql = \"INSERT INTO `app_participation` SET `fb_userid`='$this->user_id', `date`='\" . date(\"Y-m-d\", time()) . \"', `tickets`= 1\";\r\n\t\t\t$res = $this->db->query($sql);\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "11182f34391cb5d58cae5f8fe65f551e", "score": "0.7101323", "text": "public function canRegister()\n {\n return UserSettings::get('allow_registration', true);\n }", "title": "" }, { "docid": "6b88ae48d906cf95306a2bf998262ed5", "score": "0.70391333", "text": "public function register()\n {\n $userId = $this->saveUser();\n\n if (!$userId) {\n $session = new SessionManager();\n $session->set('form-errors', 'We could not create your account. Please contact us.');\n return false;\n }\n\n return $userId;\n }", "title": "" }, { "docid": "632f7c11e1abec5fc1fff6ef1729f613", "score": "0.6992233", "text": "public function isSignedup()\n {\n }", "title": "" }, { "docid": "28f4070af33e7022f5611587070870b4", "score": "0.69904506", "text": "public static function hasUser()\r\n\t{\r\n\t\treturn (bool)self::callContext(\"hasUser\");\t\t\r\n\t}", "title": "" }, { "docid": "962b687e307e50b91f14c812ccb23363", "score": "0.6986319", "text": "private function lookUpUser()\n {\n if ( $this->url_email ) {\n \n $pdo = DB::getInstance();\n \n $q = \"SELECT * FROM users WHERE registered_email=:registered_email\";\n \n $stmt = $pdo->prepare($q);\n $stmt->bindParam( ':registered_email', $this->url_email );\n \n if ( ! $stmt->execute() ) {\n $this->error = true;\n $this->data['error'] = 'USER NOT FOUND';\n return false;\n }\n \n $this->user_data = $stmt->fetch(\\PDO::FETCH_ASSOC);\n return true;\n }\n }", "title": "" }, { "docid": "e8d4644280005d0e72770a50ca49bd8e", "score": "0.6962438", "text": "private function _checkUser()\n {\n //Already logged in\n if($this->Authorization->user('id'))\n {\n $this->redirect(array(\n 'controller' => 'accounts',\n 'action' => 'index',\n 'prefix' => 'account',\n 'accountSlug' => $this->Authorization->read('Account.slug')\n ));\n }\n \n return false;\n }", "title": "" }, { "docid": "fda9cb105198a85a994ea02573b80ca1", "score": "0.6955708", "text": "public static function is_user_registration_page() {\n\n\t\t$current_page = trim( strtolower( RGForms::get( 'page' ) ) );\n\n\t\treturn in_array( $current_page, array( 'gf_user_registration' ) );\n\t}", "title": "" }, { "docid": "2a2e5db8665ef7245ffec8d8a3089870", "score": "0.695407", "text": "public function didUserPressRegister()\n\t{\n\t\treturn isset($_POST[self::$register]);\n\t}", "title": "" }, { "docid": "b6fc297998e9ff3330fab9af7416ce30", "score": "0.6938988", "text": "public function testUserCanRegister()\n {\n $this->visit('/register')\n ->type($this->userInfo['name'], 'name')\n ->type($this->userInfo['email'], 'email')\n ->type($this->userInfo['password'], 'password')\n ->type($this->userInfo['password'], 'password_confirmation')\n ->press('Register')\n ->see('register')\n ->seeInDatabase('users', ['email' => $this->userInfo['email']]);\n }", "title": "" }, { "docid": "d9acf76617a01a8aefeefd068733cf68", "score": "0.69026834", "text": "public function register()\n {\n $params = Params::getInstance();\n $username = $params->username;\n $session = getSession();\n if (! $session->exists('authinfo'))\n return \"This is awkward. We lost your OpenId. Try logging in and registring again\";\n \n $this->tUser = new TUsers();\n $this->tUser->openid = $session->authinfo['openid'];\n $this->tUser->email = $session->authinfo['email'];\n $this->tUser->username = $username;\n $this->tUser->dbSave();\n \n $session->User = $this->tUser;\n \n return \"ok\";\n }", "title": "" }, { "docid": "79644a31c1258a3d3f8d45552bb51999", "score": "0.68807673", "text": "public function isAllowedToRegister()\n {\n return $this->is_registration_allowed;\n }", "title": "" }, { "docid": "5192da974ea326b74b77e0076f01879f", "score": "0.6854469", "text": "public function testUserCanRegister()\n {\n $response = $this->post('/register', [\n 'username' => 'testuser1',\n 'email' => '[email protected]',\n 'password' => 'password',\n 'password_confirmation' => 'password'\n ]);\n\n $this->assertCount(1, User::all());\n }", "title": "" }, { "docid": "191e347daf1336e9484add494154e44a", "score": "0.68541306", "text": "function Register(){\n\t$toret = array(); //array de errores\n\t$comprobar_login = $this->comprobar_login(); //resultado de comprobacion de login\n\tif(is_array($comprobar_login)){ //si hubieron errores se introducen en el array\n\t\tarray_push($toret,$this->comprobar_login());\n\t}\n\n\tif(!empty($toret)){ //si hubieron errores se devuelven\n\t\treturn $toret;\n\t}\n\n\t\t$sql = \"select * from USUARIOS where login = '\".$this->login.\"'\";\n\n\t\t$result = $this->mysqli->query($sql);\n\t\tif ($result->num_rows == 1){ // existe el usuario\n\t\t\t\treturn 'El usuario ya existe';\n\t\t}\n\t\telse{ //no existe un usuario con ese login\n\t \t\treturn true; \n\t\t}\n}", "title": "" }, { "docid": "32840dd1984836241313c2dba9223aea", "score": "0.68460983", "text": "public function checkRegistration()\r\n\t{\r\n\t\t// Double check us...\r\n\t\tif (! ensure_active( 'user' ) ) return;\r\n\t\t\r\n\t\t$config\t\t=\tdunloader( 'config', 'jwhmcs' );\r\n\t\t$method\t\t=\t$config->get( 'regmethod' );\r\n\t\t\r\n\t\t// `1` indicates WHMCS registration form\r\n\t\tif ( $method == '1' ) return;\r\n\t\t\r\n\t\t$uri\t\t=\tDunUri :: getInstance( $config->get( 'joomlaurl' ), true );\r\n\t\t$uri->setVar( 'option',\t'com_users' );\r\n\t\t$uri->setVar( 'view',\t'registration' );\r\n\t\t$redirect\t=\t$uri->toString();\r\n\t\t\r\n\t\theader( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' );\r\n\t\theader( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );\r\n\t\theader( 'Cache-Control: no-store, no-cache, must-revalidate' );\r\n\t\theader( 'Cache-Control: post-check=0, pre-check=0', false );\r\n\t\theader( 'Pragma: no-cache' );\r\n\t\theader( 'Location: ' . $redirect );\r\n\t\texit;\r\n\t}", "title": "" }, { "docid": "12e430d197eb37ac3f71062567c6ef04", "score": "0.6837845", "text": "public function checkUserExist() {\n\t\t$username\t= $this->username;\n\t\tif($this->dbBI->get_where('md_user',array('username'=>$username))->num_rows()==0) {\n\t\t\treturn FALSE;\n\t\t} else\t{\n\t\t\treturn TRUE;\n\t\t}\n\t}", "title": "" }, { "docid": "f7ea22f5c0d0e6fc5ed2dfff22a87e90", "score": "0.68318033", "text": "function RegisterUser(){\n\t\tif(!isset($_POST['submitted'])){\n\t\t\treturn false;\n\t\t}\n\n\t\t$formvars = array();\n\n\t\tif(!$this->ValidateRegistrationSubmission()){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$this->CollectRegistrationSubmission($formvars);\n\t\t\n\t\tif(!$this->comparePswd($formvars)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!$this->SaveToEventAdvDatabase($formvars)){\n\t\t\treturn false;\n\t\t}\n\n\t\t/*if(!$this->sendConfimMail($formvars)){\n\t\t\treturn false;\n\t\t}*/\n\n\t\t//$this->SendAdminIntimationEmail($formvars);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7e8773d5c56bc396263a83aeb66689c6", "score": "0.6825143", "text": "public function hasUser() {\n return!(null === $this->_user);\n }", "title": "" }, { "docid": "d8ba614b140aa89ae41442bea6d9f71b", "score": "0.6813312", "text": "public function hasUser()\n {\n return ! empty($this->getUsername());\n }", "title": "" }, { "docid": "eedb07c2bfe574d7d0e6f52d2f35ee73", "score": "0.6811728", "text": "public function register(){\n //connectie\n $conn = Db::getInstance();\n \n // query (insert)\n $statement =$conn-> prepare(\"insert into users (email, password, firstname, lastname) values (:email, :password, :firstname, :lastname);\");\n $statement->bindParam(':email', $this->email);\n $statement->bindParam(':password', $this->password);\n $statement->bindParam(\":firstname\",$this->firstname);\n $statement->bindParam(\":lastname\",$this->lastname);\n $result = $statement->execute();\n \n //return true/false\n return $result;\n }", "title": "" }, { "docid": "50a706b3b36976d42df203651990dbf4", "score": "0.6795906", "text": "function estaRegistrado($usuario,$password,$conexion){\r\n\t\t$registrado=false;\r\n\t\ttry{\r\n\t\t\t$stmt=$conexion->prepare(\"SELECT nick, pass FROM usuarios WHERE nick=:nick\");\r\n\t\t\t$stmt->bindParam(':nick',$usuario);\r\n\t\t\t$stmt->execute();\r\n\t\t\t$user=$stmt->fetch();\r\n\t\t\tif($user!=null){\r\n\t\t\t\tif($user[\"pass\"]==$password){\r\n\t\t\t\t\t$registrado=true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}catch(PDOException $e){\r\n\t\t\t$_SESSION[\"exception\"]=\"Error al comprobar si el usuario esta registrado\";\r\n\t\t\theader(\"Location: ../exception.php\");\r\n\t\t\tdie();\r\n\t\t}\r\n\t\treturn $registrado;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "e16d6470aed9f81b5b87d79e2605500f", "score": "0.6787355", "text": "public function action_registerUser()\n {\n $this->bean->import($this->api->getRequest()->input);\n $userExists = R::count($this->api->getRequest()->baseEntity, \"username = :username or email = :email\", [\"username\" => $this->bean->username, \"email\" => $this->bean->email]);\n $result = new RegisterActionResult();\n\n if ($userExists > 0) {\n $result->code = 1;\n $result->message = \"User with name or email exists\";\n $result->success = false;\n return $result;\n }\n $this->bean->password = sha1($this->bean->password);\n R::store($this->bean);\n $this->maskExportFields();\n $result->code = 2;\n $result->message = \"User Registration was successfull\";\n $result->success = true;\n return $result;\n }", "title": "" }, { "docid": "8d8a52a97bbe6c44dc528bb110a82ad5", "score": "0.67841446", "text": "public function isSignIn(){\n return isset($_SESSION['user']);\n }", "title": "" }, { "docid": "cee05f8ef0cfd9ceed4ad01ea9a82d14", "score": "0.6771595", "text": "function userExists($username);", "title": "" }, { "docid": "f0d3cec12167675979a964362e92e86b", "score": "0.67640275", "text": "public function actionExistsUser()\n {\n $username = Yii::app()->request->getParam('username');\n $email = Yii::app()->request->getParam('email');\n $checkUser = Users::model()->countByAttributes(array(\n 'username' => $username\n ));\n $checkEmail = Users::model()->countByAttributes(array(\n 'email' => $email\n ));\n echo ($checkEmail > 0 || $checkUser > 0) ? \"true\" : \"false\";\n }", "title": "" }, { "docid": "bbb6d053adfdcf47064c03aaabadd97d", "score": "0.6734264", "text": "public function checkAddUser(){\r\n\r\n /*\r\n * Comprobamos sesión si no enviamos a login\r\n */\r\n\r\n if (!$this->authService->hasIdentity()) {\r\n return $this->redirect()->toRoute('fruteria',array('controller' => 'login','action' => 'index'));\r\n }else{\r\n $miSesion = $this->storage->getMember();\r\n $this->usuarioLogin = $this->storage->read();\r\n //Debug::dump($this->storage->read());\r\n $this->getIdprofile();\r\n }\r\n }", "title": "" }, { "docid": "9e9130cc07544a6f7a0a11d3da7083c2", "score": "0.67331874", "text": "function userExists(){\n $query = \"SELECT id, email, password\n FROM \" . $this->table_name . \"\n WHERE user = ?\n LIMIT 0,1\";\n \n $stmt = $this->conn->prepare( $query ); \n $this->user=htmlspecialchars(strip_tags($this->user));\n $stmt->bindParam(1, $this->user);\n $stmt->execute();\n $num = $stmt->rowCount();\n if($num>0) {\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n $this->id = $row['id'];\n $this->email = $row['email'];\n $this->password = $row['password']; \n return true;\n } \n return false;\n }", "title": "" }, { "docid": "356bf1feeae50af33b58b567c24b66e3", "score": "0.67179716", "text": "function Register(){\n\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM PROF_TITULACION \n\t\t\t\twhere (CODTITULACION = '$this->codTitulacion' AND DNI = '$this->DNI'\n\t\t\t\t\t)\";\n\n\n\t\t$result = $this->mysqli->query($sql);\n\t\tif ($result->num_rows == 1){ // existe el usuario\n\t\t\t\treturn 'Inserción fallida: el elemento ya existe';\n\t\t}\n\t\telse{\n\t \t\treturn true; //no existe el usuario\n\t\t}\n\n\t}", "title": "" }, { "docid": "c54e3532fcd6532a1db218fe8e59f4a4", "score": "0.6717498", "text": "public function register()\n {\n if (isset($_POST['register'])) {\n $_POST['time'] = makeDate();\n if (empty($_POST['username']) || empty($_POST['password'])) {\n $this->session->inputMessage(\"error\", \"All fields are required\");\n } else {\n if ($this->User->checkExists('username', $_POST['username'])) {\n $this->session->inputMessage(\"error\", \"Username is already exists\");\n } else {\n if ($this->User->create($_POST)) {\n $this->session->inputMessage(\"success\", \"Registration Success\");\n } else {\n $this->session->inputMessage(\"error\", \"Registration Failed\");\n }\n }\n }\n }\n }", "title": "" }, { "docid": "46f9b7ff81eea1edce6bb2a9e1e3e1df", "score": "0.6708672", "text": "public function testRegistrationUserExists()\n {\n $this->get('/register');\n $this->user_data['_token'] = session('_token');\n $this->post('register', $this->user_data);\n $this->post('/logout', ['_token' => $this->user_data['_token']]);\n\n // Register a user with same e-mail and get and error.\n $response = $this->post('register', $this->user_data);\n $response->assertSessionHasErrors([\n 'email' => __('User with this e-mail already exists.')\n ]);\n }", "title": "" }, { "docid": "2fe8460e3dd7c992f26db0b1da8a7a3c", "score": "0.6706064", "text": "function wpsyslog_user_register($arg='null', $arg2='null') {\n\tglobal $wpsyslogHaveTriggered, $wpsyslogDoTrigger;\n\tif ('true' === $wpsyslogDoTrigger['user_register']) {\n\t\t$user = get_userdata($arg);\n\t\twpsyslog('core', sprintf( __('New user successfully registered. Name: %1$s (%2$s).', 'wpsyslog'), $user->display_name, $user->user_login ), 3);\n\t\t$wpsyslogHaveTriggered['user_register'] = true;\n\t}\n}", "title": "" }, { "docid": "078d256412bd07263bc7199ad0191937", "score": "0.6683988", "text": "function is_unregistered(){\n\t\t$this->load->database();\n\t\t$query = $this->db->query('SELECT * from tempusers WHERE email = ? AND password = ? LIMIT 1', array($this->input->post('email'),Accountmodel::password_hash($this->input->post('password'))));\n\t\t\n\t\tif($query->row())\n\t\t\treturn true;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "16ef000885727cf6a62e1fe7d5c9013b", "score": "0.66720843", "text": "public function accountExist($email, $password, $name, $newUser)\n {\n $this->db->where('e-mail',$email);\n $dataUser = $this->db->get('user')->row_array();\n\n if($dataUser > 0)\n {\n echo \"<script>\n alert('This email is already registered! Please use another email!');\n </script>\";\n }\n else\n { \n $this->User->register($newUser);\n }\n redirect(base_url('welcome'),'refresh');\n }", "title": "" }, { "docid": "5807cfefd494a0d9d67eeebfdb4eb8a7", "score": "0.66684264", "text": "function UserExists($uname) {\n\tglobal $adb;\n\t$user_result = $adb->pquery('SELECT 1 FROM vtiger_users WHERE user_name=?', array($uname));\n\treturn ($adb->num_rows($user_result) > 0);\n}", "title": "" }, { "docid": "8da94652531dbb2e38fbedb1f3a2912a", "score": "0.66670066", "text": "function reg() {\n //~ screening input data\n $tmp_arr=$this->screening_array($_REQUEST);\n $login=$tmp_arr['_login'];\n $passwd=$tmp_arr['_passwd'];\n $passwd2=$tmp_arr['passwd2'];\n $mail=$tmp_arr['mail'];\n //~ User floor translate to a numeric value\n\n //~ Check valid user data\n if ($this->check_new_user($login, $passwd, $passwd2, $mail)) {\n //~ User data is correct. Register. \n $user_key = $this->generateCode(10);\n $passwd = md5($user_key.$passwd); //~ password hash with the private key and user key\n // echo $user_key.\"<Br>\".$passwd;\n $query = self::$sqli->query(\"INSERT INTO `users` (`name`, `password`, `mail`, `key`) VALUES ('\".$login.\"', '\".$passwd.\"', '\".$mail.\"', '\".$user_key.\"')\");\n if ($query) {\n return true;\n } else {\n self::$error='Произошла ошибка при регистрации нового пользователя. Cообщите администрацией.';\n return false;\n }\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "9ed072fc6bb765bcb7b975aaf4cc0e68", "score": "0.6666095", "text": "public function hasUser(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "7fccc2506b0c886734b97283c585087b", "score": "0.66607934", "text": "public function checkUser()\n\t{\n\t\tif (!$this->session->get(\"user\")) {\n\t\t\t$this->response->redirect('/user/login');\n\t\t}\n\t}", "title": "" }, { "docid": "09a5bc6629f1bd76f2b2ac23c0007f3a", "score": "0.66569424", "text": "public function registration()\n\t{\n\t\t$this->api();\n\n\t\t// --------------------------------------------\n\t\t//\tDo we allow new member registrations?\n\t\t// --------------------------------------------\n\n\t\tif ( ee()->config->item('allow_member_registration') == 'n' )\n\t\t{\n\t\t\treturn $this->no_results('fbc');\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tPrep initial vars\n\t\t// --------------------------------------------\n\n\t\t$cond['fbc_login_button']\t\t\t\t\t= '';\n\t\t$cond['fbc_logged_into_ee']\t\t\t\t\t= ( ee()->session->userdata('member_id') == '0' ) ? 'n': 'y';\n\t\t$cond['fbc_logged_into_facebook']\t\t\t= 'n';\n\t\t$cond['fbc_logged_into_facebook_and_ee']\t= 'n';\n\t\t$cond['fbc_logged_into_ee_and_facebook']\t= 'n';\n\t\t$cond['fbc_facebook_account_exists']\t\t= 'n';\n\t\t$cond['fbc_registration_form']\t\t\t\t= 'n';\n\n\t\t// --------------------------------------------\n\t\t//\tIs this user already a registered FB user?\n\t\t// --------------------------------------------\n\n\t\tif ( ( $uid = $this->api->get_user_id() ) !== FALSE )\n\t\t{\n\t\t\t$cond['fbc_logged_into_facebook']\t= 'y';\n\n\t\t\t// --------------------------------------------\n\t\t\t//\tDo we already have a record for this facebook user id?\n\t\t\t// --------------------------------------------\n\n\t\t\tif ( $this->data->get_member_id_from_facebook_user_id( $uid ) !== FALSE )\n\t\t\t{\n\t\t\t\t$cond['fbc_facebook_account_exists']\t= 'y';\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tIs this user already a registered FB user in EE?\n\t\t// --------------------------------------------\n\n\t\tif ( $this->_facebook_member_is_ee_member() !== FALSE )\n\t\t{\n\t\t\t$cond['fbc_logged_into_facebook_and_ee']\t= 'y';\n\t\t\t$cond['fbc_logged_into_ee_and_facebook']\t= 'y';\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tPrepare params\n\t\t// --------------------------------------------\n\n\t\t$params\t\t= array(\n\t\t\t'return_on_success'\t=> ee()->uri->uri_string,\n\t\t\t'show_captcha'\t\t=> ee()->config->item('use_membership_captcha')\n\t\t);\n\n\t\tforeach ( $params as $key => $val )\n\t\t{\n\t\t\tif ( ee()->TMPL->fetch_param($key) !== FALSE AND ee()->TMPL->fetch_param($key) != '' )\n\t\t\t{\n\t\t\t\t$val\t= $this->_chars_decode( ee()->TMPL->fetch_param($key) );\n\t\t\t}\n\n\t\t\t$params[$key]\t= $val;\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t// Prepare the arguments for the FBML string\n\t\t// --------------------------------------------\n\n\t\t$fb_arguments\t\t= array();\n\n\t\t$template_params\t= array(\n\t\t\t'border_color'\t=> '',\n\t\t\t'width'\t\t\t=> 600\n\t\t);\n\n\t\tforeach ( $template_params as $param => $default )\n\t\t{\n\t\t\tif ( ee()->TMPL->fetch_param($param) !== FALSE )\n\t\t\t{\n\t\t\t\tif ( is_numeric( $default ) === TRUE AND is_numeric( ee()->TMPL->fetch_param($param) ) === TRUE )\n\t\t\t\t{\n\t\t\t\t\t$fb_arguments[]\t= $param . '=\"' . ee()->TMPL->fetch_param($param) . '\"';\n\t\t\t\t}\n\t\t\t\telseif ( is_string( $default ) === TRUE AND is_string( ee()->TMPL->fetch_param($param) ) === TRUE )\n\t\t\t\t{\n\t\t\t\t\t$fb_arguments[]\t= $param . '=\"' . ee()->TMPL->fetch_param($param) . '\"';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t// Captcha?\n\t\t// --------------------------------------------\n\n\t\t$prefs['captcha'] = ( ee()->config->item('use_membership_captcha') == 'y' ) ? 'y': 'n';\n\n\t\tif ( ee()->TMPL->fetch_param('show_captcha') !== FALSE )\n\t\t{\n\t\t\tif ( $this->check_yes( ee()->TMPL->fetch_param('show_captcha') ) === TRUE )\n\t\t\t{\n\t\t\t\t$prefs['captcha']\t= 'y';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$prefs['captcha']\t= 'n';\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t// Prepare fields\n\t\t// --------------------------------------------\n\n\t\t$fields\t= $this->data->get_facebook_registration_fields( $prefs );\n\n\t\t// --------------------------------------------\n\t\t// Loop and establish required\n\t\t// --------------------------------------------\n\n\t\t$fb_validate\t= array();\n\t\t$js\t\t\t\t= '';\n\n\t\tforeach ( $fields as $field => $data )\n\t\t{\n\t\t\tif ( isset( $data['required'] ) AND $data['required'] == 'y' )\n\t\t\t{\n\t\t\t\tif ( $field == 'accept_terms' )\n\t\t\t\t{\n\t\t\t\t\t$fb_validate[]\t= \"\\n\" . 'if ( !form.' . $field . ' ) { errors.' . $field . ' = \"' . lang('please_accept_terms') . '\" }';\n\t\t\t\t}\n\t\t\t\telseif ( $data['type'] == 'select' )\n\t\t\t\t{\n\t\t\t\t\t$fb_validate[]\t= \"\\n\" . 'if ( form.' . $field . ' == \"\" || form.' . $field . ' == \"-\" ) { errors.' . $field . ' = \"' . lang('please_complete_field') . '\" }';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$fb_validate[]\t= \"\\n\" . 'if ( form.' . $field . ' == \"\" ) { errors.' . $field . ' = \"' . lang('please_complete_field') . '\" }';\n\t\t\t\t}\n\n\t\t\t\t// Not needed by FB\n\t\t\t\tunset($fields[$field]['required']);\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty( $fb_validate ) )\n\t\t{\n\t\t\t$fb_arguments[]\t= 'onvalidate=\"fb_validate\"';\n\n\t\t\t$js\t= \"\\n\" . '<script>function fb_validate(form) {errors = {}; ' . implode( \" \", $fb_validate ) . ' return errors;}</script>';\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t// Convert to JSON\n\t\t// --------------------------------------------\n\n\t\t$params['fields'] = $fields = $this->json_encode( array_values( $fields ) );\t// We store this and call it back later to validate against the incoming data from FB.\n\n\t\t// $fields\t= str_replace( \",{\", \",\\n{\", $fields );\n\n\t\t// print_r( $fields );\n\n\t\t// --------------------------------------------\n\t\t//\tSave params\n\t\t// --------------------------------------------\n\t\t//\tWe create a tag hash and save that with our cookie so that we can test and not generate one of these DB inserts for every page load per user.\n\t\t// --------------------------------------------\n\n\t\t$tag_hash\t= md5( serialize( $params ) . ee()->input->ip_address() );\n\n\t\tif ( ( $hash = $this->data->set_params( $tag_hash, $params ) ) === FALSE )\n\t\t{\n\t\t\treturn $this->no_results('fbc');\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t// Load parameters to the tag\n\t\t// --------------------------------------------\n\n\t\t$qs\t\t= ( ee()->config->item('force_query_string') == 'y' ) ? '' : '?';\n\n\t\t$fb_arguments[]\t= 'fields=\\'' . $fields . '\\'' . ' fb_only=\"true\"' . ' redirect-uri=\"' . ee()->functions->fetch_site_index( 0, 0 ) . $qs . 'ACT=' . ee()->functions->fetch_action_id('Fbc', 'register') . '&hash=' . $hash . '\"';\n\n\t\t$cond['fbc_registration_form']\t= '<fb:registration ' . implode( ' ', $fb_arguments ) . '></fb:registration>' . $js;\n\n\t\t// --------------------------------------------\n\t\t// Failsafe: if we are logged into don't show the reg form\n\t\t// --------------------------------------------\n\n\t\tif ( $cond['fbc_logged_into_ee'] == 'y' )\n\t\t{\n\t\t\t$cond['fbc_registration_form']\t= '';\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tGrab login button?\n\t\t// --------------------------------------------\n\n\t\tif ( strpos( ee()->TMPL->tagdata, LD . 'fbc_login_button' . RD ) !== FALSE )\n\t\t{\n\t\t\t$cond['fbc_login_button']\t= $this->login_button( '', 'gimme' );\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tIs there tagdata?\n\t\t// --------------------------------------------\n\n\t\tif ( ee()->TMPL->tagdata == '' )\n\t\t{\n\t\t\treturn $cond['fbc_registration_form'];\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tParse and return\n\t\t// --------------------------------------------\n\n\t\t$tagdata\t= ee()->functions->prep_conditionals( ee()->TMPL->tagdata, $cond );\n\n\t\tforeach ( $cond as $key => $val )\n\t\t{\n\t\t\t$tagdata\t= str_replace( LD . $key . RD, $val, $tagdata );\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t// Return\n\t\t// --------------------------------------------\n\n\t\treturn $tagdata;\n\t}", "title": "" }, { "docid": "6d6bbacf3f73c74bed5cd2c03606905f", "score": "0.6643294", "text": "private function register(array $data): bool {\n\n $this->user->add([\n 'login' => $data['login'],\n 'password' => $data['password'],\n 'email' => $data['email'],\n 'name' => $data['name'],\n 'token' => '0'\n ]);\n\n return true;\n }", "title": "" }, { "docid": "9602ca801826332d66e721eae92e1178", "score": "0.66349876", "text": "private function checkUser()\n {\n $session = $this->di->get(\"session\");\n\n if (!$session->get(\"activeUser\") && !$session->get(\"username\")) {\n return $this->di->get('response')->redirect(\"user/login\");\n }\n }", "title": "" }, { "docid": "2cfe17e1a16ac2504bf9b9b3d4d2fa92", "score": "0.66310793", "text": "public function registerMember()\r\n {\r\n $member=new UserModel();\r\n $isOk=$member->newUser($this->request);\r\n\r\n $this->getJson([\r\n 'exist' => $isOk\r\n ]);\r\n \r\n }", "title": "" }, { "docid": "d863fcc02b4839ac3094b5246c010ba2", "score": "0.66214347", "text": "public static function isLoggedIn()\n {\n return self::exists('User');\n }", "title": "" }, { "docid": "a0b92c9bcea11061e906619a8764632e", "score": "0.66129607", "text": "function exists($user)\r\n {\r\n if (mysql_num_rows(database::query(\"SELECT * FROM user WHERE user='$user'\"))) return(TRUE);\r\n return(FALSE);\r\n }", "title": "" }, { "docid": "d62bc06fa66658227a9785f623a1f163", "score": "0.6608166", "text": "function user_exists($username)\n{\n\t$user_data = get_user_data($username);\n\tif ($user_data == false)\n\t{\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "1fc14a666a3c3f899a1e693a08d636d6", "score": "0.6601101", "text": "public function register() {\r\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\r\n $saved = $this->model->saveUser();\r\n if (is_array($saved)) {\r\n // if errors occur\r\n $this->loadView('register', $saved);\r\n } else {\r\n $this->redirect('login');\r\n }\r\n } else {\r\n $this->loadView('register');\r\n }\r\n }", "title": "" }, { "docid": "9b47598602b10fccf9535442819e634d", "score": "0.6600815", "text": "public function register()\n {\n $json_data = array();\n $username = getPostParameter('username');\n $password = getPostParameter('password');\n \n if (getModel('user')->insert($username, $password)){\n $json_data = array('status'=> true, 'message' =>'用户注册成功!');\n } else {\n $json_data = array('status'=> false, 'message' =>'该用户名已经存在!');\n }\n \n $this->writeJson($json_data);\n \n }", "title": "" }, { "docid": "bf306fb9cecf655abe1d095207059920", "score": "0.6597904", "text": "public function isRegistered($username) {\n\n $result = $this->connection->query(\n \"SELECT email\n FROM flower\n WHERE username='$username';\n \"\n );\n $row = $result->fetchAll(PDO::FETCH_OBJ);\n if( $row ) return true;\n return false;\n }", "title": "" }, { "docid": "72c81b503a1bed6cc884b4e6d364682b", "score": "0.65892506", "text": "function register_cek($username) {\n global $connect;\n\n $query = \"SELECT * FROM users WHERE username='$username'\";\n\n if ($result = mysqli_query($connect, $query)) {\n if (mysqli_num_rows($result) == 0) return true;\n else return false;\n }\n }", "title": "" }, { "docid": "622dbaa6ca23d4d1c35d9288a34ef672", "score": "0.6588746", "text": "public function register()\n {\n if (!$this->validate()) {\n return false;\n }\n $this->_user = $user = new User();\n $user->email = $this->email;\n $user->generateAuthKey();\n $user->generateRegistrationToken();\n\n return $user->save();\n }", "title": "" }, { "docid": "f2d048cc54c8691c28ccd6133e3b41b9", "score": "0.6587094", "text": "function checkExists($username,$email,$password,$connection){\n \n // query to get user details \n $already_reg_check_query = \"SELECT username,email FROM `registereduser` WHERE username='\".$username.\"' OR email='\".$email.\"';\";\n $result = mysqli_query($connection, $already_reg_check_query);\n // if output is >0 then run 'if' otherwise insert in database\n if(mysqli_num_rows($result)>0){\n // if username or email is exists the store it in row variable\n $row = mysqli_fetch_assoc($result);\n // if username is matched from database then throw 'if' part or else email is matched from database then throw 'else' part\n if($row['username'] == $username){\n echo \"username '\".$row['username'].\"' already exists\";\n }else if($row['email'] == $email){\n echo \"email '\".$row['email'].\"' already exists\";\n }\n }else{\n // register the user\n registerUserWithInsert($username,$email,$password,$connection);\n }\n }", "title": "" }, { "docid": "0512b93b4afd143ea25f5d74979d5568", "score": "0.6583242", "text": "public function registration() {\n\t\t// Is this user already signed in? If so redirect to the post login route\n\t\tif (Sentry::check()) {\n\t\t\treturn $this->redirectTo('session_store');\n\t\t}\n\n\t\t//If registration is currently disabled, show a message and redirect home.\n\t\tif (!config('sentinel.registration', false)) {\n\t\t\treturn $this->redirectTo(['route' => 'home'], ['error' => trans('Sentinel::users.inactive_reg')]);\n\t\t}\n\n\t\t// All clear - show the registration form.\n\t\treturn $this->viewFinder('Member.register')->with($this->page_data);\n\n\t}", "title": "" }, { "docid": "119928b384b6b1a224bb8389456b60f3", "score": "0.6578571", "text": "public function registeration(){\r\n\t\trequire_once 'Database.php';\r\n\t\t$db = new Database();\r\n\t\t$user = new User();\r\n\r\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST') {\r\n\r\n\t\t\t$username = strip_tags(addslashes(stripslashes($_POST['username'])));\r\n\t\t\t$password = strip_tags(addslashes(stripslashes($_POST['password'])));\r\n\t\t\t$age \t = strip_tags(addslashes(stripslashes($_POST['age'])));\r\n\t\t\t$phone\t = strip_tags(addslashes(stripslashes($_POST['phone'])));\r\n\t\t\t$email =\tstrip_tags(addslashes(stripslashes($_POST['email'])));\r\n\t\t\t$weight = strip_tags(addslashes(stripslashes($_POST['weight'])));\r\n\t\t\t$height = strip_tags(addslashes(stripslashes($_POST['height'])));\r\n\r\n\t\t\t$name = $user->search($username);\r\n\r\n\t\t\tif($username != $name['username']){\r\n\r\n\t\t\t\t$user->setName($username);\r\n\t\t\t\t$user->setPassword($password);\r\n\t\t\t\t$user->setAge($age);\r\n\t\t\t\t$user->setPhone($phone);\r\n\t\t\t\t$user->setMail($email);\r\n\t\t\t\t$user->setWeight($weight);\r\n\t\t\t\t$user->setHeight($height);\r\n\t\t\t\t\r\n\t\t\t\t$db->addUser($user);\r\n\r\n\t\t\t\theader('Location:..\\UserPage\\userHome.php');\r\n\t\t\t}else{\r\n\t\t\t\techo \"<script type='text/javascript'>\r\n\t\t\t\t alert('*Username is Exist please enter another one');\r\n \t\t\t\t</script> \";\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d5c6f9aa643bfdb54ff9688ffff7f4ef", "score": "0.65755177", "text": "public function __registerPleUser($userData)\n\t {\n\t \tif ($userData) \n\t \t{\n\t \t\t//check if user is already registered\n\t \t\t$is_register = $this->PleUser->find('first',array('conditions'=>array('midasId'=>$userData['midasId'],'course'=>$userData['course']),'fields'=>array('id')));\n\t \t\t//check if id exist\n\t \t\tif ($is_register['PleUser']['id']) {\n\t \t\t\t$userData['id'] = $is_register['PleUser']['id'];\n\t \t\t\t$this->PleUser->save($userData);\n\t \t\t} else {\n\t \t\t\t$this->PleUser->save($userData);\n\t \t\t}\n\t \t\treturn true;\n\t \t}\n\t \treturn false;\n\t }", "title": "" }, { "docid": "76d9fa3a61d16dcc378c387f6c76ddc4", "score": "0.657197", "text": "public static function check()\n\t\t{\n\t\t\treturn isset($_SESSION['LOGGED_IN_USER']);\n\t\t}", "title": "" }, { "docid": "3aa3cfe5bb1f99cd8a8c8b70179fb276", "score": "0.65690535", "text": "function verify() {\n if (!empty($this->passedArgs['n']) && !empty($this->passedArgs['t'])) {\n $name = $this->passedArgs['n'];\n $tokenHash = $this->passedArgs['t'];\n $results = $this->User->find('first', array('conditions' => array('username' => $name)));\n if ($results['User']['activate'] != 1) {\n if ($results['User']['tokenhash'] == $tokenHash) {\n $results['User']['activate'] = 1;\n $this->User->save($results['User']);\n $this->Session->setFlash(__('Your registration is complete: '));\n $this->autoRender = false;\n $this->redirect('login');\n } else {\n $this->Session->setFlash(__('The token does not match'));\n $this->redirect('register');\n }\n } else {\n $this->Session->setFlash(__('Token has alredy been used'));\n $this->redirect('register');\n }\n } else {\n $this->Session->setFlash(__('There was no token provided for confirmation'));\n $this->redirect('register');\n }\n }", "title": "" }, { "docid": "eb9817ed6c0a1f0e875cf46819eb3941", "score": "0.656793", "text": "public function authorize()\n {\n if ($this->route()->getName() === 'users.register') {\n return true;\n } else {\n return auth('web')->user();\n }\n }", "title": "" }, { "docid": "a44c6febd62a23f30d4f626d26a208fb", "score": "0.65671486", "text": "public function register(){\n Registry::get('errorhandler')->clearErrors('signup');\n $validator = Registry::get('validator');\n $errorhandler = Registry::get('errorhandler');\n $confirm = false;\n $email = trim($_POST['Email']);\n if (!isset($_POST['FullName'])){\n $errorhandler->setError('signup', 'Full Name is required'); \n }\n if (!$validator->valueIsString($_POST['FullName'])){\n $errorhandler->setError('signup', 'Full Name is not a string');\n }\n \n if (!isset($_POST['Email'])){\n $errorhandler->setError('signup', 'Email is required'); \n }\n if (!$validator->valueIsEmailFormat($_POST['Email'])){\n $errorhandler->setError('signup', 'Email is invalid format');\n }\n\n if(isset($_POST['agree'])){\n if($_POST['agree'] == 'on'){\n if(isset($_POST['Password']) && isset($_POST['confirmPass'])){\n if (!$validator->valueIsString($_POST['Password']) && !$validator->valueIsString($_POST['Password'])){\n $errorhandler->setError('signup', 'Passwords must be strings');\n }\n else{\n if($_POST['Password'] === $_POST['confirmPass']){\n if($validator->validatePassword($_POST['Password']))\n {\n if(empty($errorhandler->getErrors('signup'))){\n $confirm = $this->model->insertRecord($_POST,'users');\n }\n }\n else{\n $errorhandler->setError('signup', 'Password should be atleast 8 characters');\n }\n }\n else{\n $errorhandler->setError('signup', 'Password should match the confirmation password'); \n }\n }\n }\n }\n else{\n $errorhandler->setError('signup', 'Password or Confirm Password are required'); \n }\n }\n else{\n $errorhandler->setError('signup', 'You must agree to the terms of this website to register'); \n }\n \n if($confirm == true){\n Registry::set('role', 'LoggedIn');\n Registry::set('email', $email);\n header('location: ../Profile');\n }\n else{\n header('location: ../Signup');\n }\n }", "title": "" }, { "docid": "c0b7999ddc07998c48647e4fd6c30c53", "score": "0.65645826", "text": "private function signupNewUser() {\n $status = $this->formValid();\n if (empty($status)) {\n $user = new \\Users();\n $user->setUserName(trim(filter_input(INPUT_POST, 'username')));\n $user->setPassword(trim(filter_input(INPUT_POST, 'password')));\n $user->setEmail(trim(filter_input(INPUT_POST, 'email')));\n $user->setName(filter_input(INPUT_POST, 'name'));\n $user->save();\n return true;\n }\n return $status;\n }", "title": "" }, { "docid": "dcfab3d0a375a52d0c706d96a77c09d9", "score": "0.65639925", "text": "public function testRegisterUser()\n {\n $user = $this->CI->User->register('[email protected]', 'pass');\n $this->CI->config->load('cashew');\r\n $admin_enabled = $this->CI->config->item('cashew_admin_enabled');\r\n if ($admin_enabled)\n {\n $this->assertCount(4, $this->CI->User->all());\n }\n else\n {\n $this->assertCount(3, $this->CI->User->all());\n }\n }", "title": "" }, { "docid": "55d11184752a635ea519a9776fe380ba", "score": "0.656321", "text": "public function register()\n\t{\n\t\t$this->actions();\n\t\t$this->api();\n\n\t\t// --------------------------------------------\n\t\t//\tRun security tests\n\t\t// --------------------------------------------\n\n\t\tif ( $this->actions->_security() === FALSE )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tAlready logged in?\n\t\t// --------------------------------------------\n\n\t\tif ( ee()->session->userdata('member_id') != 0 )\n\t\t{\n\t\t\t$this->error[]\t= lang('already_logged_in');\n\t\t\treturn $this->show_error($this->error );\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tDo we allow new member registrations?\n\t\t// --------------------------------------------\n\n\t\tif ( ee()->config->item('allow_member_registration') == 'n' )\n\t\t{\n\t\t\t$this->error[]\t= lang('registration_not_enabled');\n\t\t\treturn $this->show_error($this->error );\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tDivert when Facebook is the one POSTing registration data\n\t\t// --------------------------------------------\n\n\t\tif ( ! empty( $_POST['signed_request'] ) )\n\t\t{\n\t\t\t// --------------------------------------------\n\t\t\t//\tLog that this came from FB\n\t\t\t// --------------------------------------------\n\n\t\t\t$this->from_fb\t= TRUE;\n\n\t\t\t// --------------------------------------------\n\t\t\t//\tSpin up the API\n\t\t\t// --------------------------------------------\n\n\t\t\tif ( ( $fb_post = $this->api->convert_signed_request( $_POST['signed_request'] ) ) == FALSE )\n\t\t\t{\n\t\t\t\t$this->error[]\t= lang('facebook_signed_request_failed');\n\t\t\t\treturn $this->show_error($this->error );\n\t\t\t}\n\n\t\t\t// --------------------------------------------\n\t\t\t//\tPrep for later\n\t\t\t// --------------------------------------------\n\n\t\t\t$params\t\t= array(\n\t\t\t\t'fields'\t\t\t=> '',\n\t\t\t\t'return_on_success'\t=> ''\n\t\t\t);\n\n\t\t\t// --------------------------------------------\n\t\t\t//\tGet params for later\n\t\t\t// --------------------------------------------\n\n\t\t\tforeach ( $params as $key => $val )\n\t\t\t{\n\t\t\t\tif ( ( $param = $this->data->get_param( $_GET['hash'], $key, 'delete' ) ) !== FALSE )\n\t\t\t\t{\n\t\t\t\t\t$params[$key]\t= $param;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$params[$key]\t= $val;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// --------------------------------------------\n\t\t\t//\tDoes the field list match?\n\t\t\t// --------------------------------------------\n\n\t\t\tif ( empty( $fb_post['registration_metadata']['fields'] ) OR $params['fields'] != $fb_post['registration_metadata']['fields'] )\n\t\t\t{\n\t\t\t\t$this->error[]\t= lang('facebook_field_metadata_failed');\n\t\t\t\treturn $this->show_error($this->error );\n\t\t\t}\n\n\t\t\t// --------------------------------------------\n\t\t\t//\tHas a uid been sent over?\n\t\t\t// --------------------------------------------\n\n\t\t\t$uid\t= '';\n\n\t\t\tif ( ! empty( $fb_post['uid'] ) )\n\t\t\t{\n\t\t\t\t$uid\t= $fb_post['uid'];\n\t\t\t}\n\n\t\t\t// --------------------------------------------\n\t\t\t//\tForce data into POST\n\t\t\t// --------------------------------------------\n\n\t\t\t$incoming_post\t= (array) $fb_post['registration'];\n\n\t\t\tforeach ( $incoming_post as $field => $val )\n\t\t\t{\n\t\t\t\t$_POST[$field]\t= $val;\n\t\t\t}\n\n\t\t\t$_POST['name']\t= ( empty( $_POST['name'] ) ) ? '': $_POST['name'];\n\n\t\t\t// --------------------------------------------\n\t\t\t//\tForce return\n\t\t\t// --------------------------------------------\n\n\t\t\t$_POST['return']\t= $params['return_on_success'];\n\n\t\t\t// --------------------------------------------\n\t\t\t//\tFix username\n\t\t\t// --------------------------------------------\n\n\t\t\tif ( ! empty( $_POST['username'] ) )\n\t\t\t{\n\t\t\t\t$_POST['username']\t= str_replace( ' ', '_', $_POST['username'] );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$_POST['username']\t= str_replace( ' ', '_', $_POST['name'] );\t// FB requires that their reg form contain a 'name' field so we know it's there.\n\t\t\t}\n\n\t\t\t// --------------------------------------------\n\t\t\t//\tFix screen name\n\t\t\t// --------------------------------------------\n\n\t\t\tif ( empty( $_POST['screen_name'] ) )\n\t\t\t{\n\t\t\t\t$_POST['screen_name']\t= $_POST['name'];\n\t\t\t}\n\n\t\t\t// --------------------------------------------\n\t\t\t//\tFix email\n\t\t\t// --------------------------------------------\n\n\t\t\tif ( empty( $_POST['email'] ) )\n\t\t\t{\n\t\t\t\t$_POST['email']\t= md5( time() . $uid ) . '@facebook.com';\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t// Get the FB user id if we don't already have it\n\t\t// --------------------------------------------\n\n\t\tif ( empty( $uid ) )\n\t\t{\n\t\t\tif ( ( $uid = $this->api->get_user_id() ) === FALSE )\n\t\t\t{\n\t\t\t\t$this->error[]\t= lang('facebook_not_logged_in');\n\t\t\t\treturn $this->show_error($this->error );\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tDo we already have a record for this facebook user id?\n\t\t// --------------------------------------------\n\n\t\tif ( $this->data->get_member_id_from_facebook_user_id( $uid ) !== FALSE )\n\t\t{\n\t\t\t$this->error[]\t= lang( 'fb_user_already_exists' );\n\t\t\treturn $this->show_error($this->error );\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tClean the post\n\t\t// --------------------------------------------\n\n\t\t$_POST\t= ee()->security->xss_clean( $_POST );\n\n\t\t// --------------------------------------------\n\t\t//\tHandle alternate username / screen name\n\t\t// --------------------------------------------\n\n\t\tif ( ee()->db->table_exists('exp_user_params') === TRUE )\n\t\t{\n\t\t\t$pref_query = ee()->db->query(\"SELECT COUNT(*) AS count FROM exp_user_preferences WHERE preference_name = 'email_is_username' AND preference_value = 'y'\");\n\n\t\t\tif (\n\t\t\t\tempty( $_POST['email'] )\n\t\t\t\tAND ! empty( $_POST['username'] )\n\t\t\t\tAND $pref_query->row('count') == 1\n\t\t\t)\n\t\t\t{\n\t\t\t\t$_POST['email']\t= $_POST['username'];\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tDo we have email, username, screen name?\n\t\t// --------------------------------------------\n\n\t\tforeach ( array( 'email' => 'required', 'username' => 'required', 'screen_name' => 'optional', 'timezone' => 'optional' ) as $key => $val )\n\t\t{\n\t\t\tif ( empty( $_POST[$key] ) AND $val == 'required' )\n\t\t\t{\n\t\t\t\t$this->error[]\t= lang( $key . '_required_for_registration' );\n\t\t\t}\n\t\t\telseif ( ! empty( $_POST[$key] ) )\n\t\t\t{\n\t\t\t\t$member_data[$key]\t= $_POST[$key];\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tPrep and load custom member fields and check for required's\n\t\t// --------------------------------------------\n\n\t\t$custom_member_fields\t= $this->data->get_member_fields();\n\n\t\tforeach ( $custom_member_fields as $name => $field_data )\n\t\t{\n\t\t\tif ( ! empty( $_POST[ 'm_field_id_' . $field_data['id'] ] ) )\n\t\t\t{\n\t\t\t\t$member_data[ 'm_field_id_' . $field_data['id'] ]\t= $_POST[ 'm_field_id_' . $field_data['id'] ];\n\t\t\t}\n\t\t\telseif ( ! empty( $_POST[ $name ] ) )\n\t\t\t{\n\t\t\t\t$member_data[ 'm_field_id_' . $field_data['id'] ]\t= $_POST[ $name ];\n\t\t\t}\n\t\t\telseif ( $field_data['required'] == 'y' )\n\t\t\t{\n\t\t\t\t$this->error[]\t= str_replace( '%field_label%', $field_data['label'], lang( 'blank_required_for_registration' ) );\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tAssign member group\n\t\t// --------------------------------------------\n\t\t//\tWe observe activation protocols, but if no activation is required, we make sure that we have a default member group been designation.\n\t\t// --------------------------------------------\n\n\t\tif ( ( $member_data['group_id'] = ee()->config->item('fbc_member_group') ) === FALSE )\n\t\t{\n\t\t\t$this->error[]\t= lang('facebook_member_group_missing');\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tIf we are email activating or admin activating, we do some tricks with the group id\n\t\t// --------------------------------------------\n\n\t\tif ( ee()->config->item('fbc_account_activation') == 'fbc_email_activation' OR ee()->config->item('fbc_account_activation') == 'fbc_admin_activation' )\n\t\t{\n\t\t\t$member_data['group_id']\t= 4;\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t// Require captcha?\n\t\t// --------------------------------------------\n\t\t// We only check if this is a standard registration through EE. If the reg comes through FB, Fb does not send the captcha value in the POST. We just assumed that FB would not allow an invalid captcha through.\n\t\t// --------------------------------------------\n\n\t\tif ( $this->from_fb === FALSE )\n\t\t{\n\t\t\tif ( ( $param = $this->data->get_param( $_GET['hash'], 'show_captcha', 'delete' ) ) !== FALSE )\n\t\t\t{\n\t\t\t\t$show_captcha\t= $param;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$show_captcha\t= '';\n\t\t\t}\n\n\t\t\tif ( $this->check_yes( $show_captcha ) === TRUE AND empty( $_POST['captcha'] ) )\n\t\t\t{\n\t\t\t\t$this->error[] = lang('captcha_required');\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tRequire terms?\n\t\t// --------------------------------------------\n\n\t\tif ( ee()->config->item('require_terms_of_service') == 'y' AND empty( $_POST['accept_terms'] ) )\n\t\t{\n\t\t\t$this->error[] = lang('mbr_terms_of_service_required');\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tWill there be a password?\n\t\t// --------------------------------------------\n\n\t\tif ( ! empty( $_POST['password'] ) )\n\t\t{\n\t\t\tif ( empty( $_POST['password_confirm'] ) )\n\t\t\t{\n\t\t\t\t$this->error[] = lang('passwords_do_not_match');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$member_data['password']\t\t\t= $_POST['password'];\n\t\t\t\t$member_data['password_confirm']\t= $_POST['password_confirm'];\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tErrors?\n\t\t// --------------------------------------------\n\n\t\tif ( count( $this->error ) > 0 )\n\t\t{\n\t\t\treturn $this->show_error($this->error );\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tForce screen name?\n\t\t// --------------------------------------------\n\n\t\tif ( empty( $member_data['screen_name'] ) )\n\t\t{\n\t\t\t$member_data['screen_name']\t= $member_data['username'];\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tValidate\n\t\t// --------------------------------------------\n\n\t\t$validate = array(\n\t\t\t'val_type'\t\t=> 'new', // new or update\n\t\t\t'fetch_lang'\t=> TRUE,\n\t\t\t'require_cpw'\t=> FALSE,\n\t\t\t'enable_log'\t=> FALSE,\n\t\t\t'username'\t\t=> $member_data['username'],\n\t\t\t'screen_name'\t=> stripslashes( $member_data['screen_name'] ),\n\t\t\t'email'\t\t\t=> $member_data['email']\n\t\t);\n\n\t\tif ( ! empty( $member_data['password'] ) )\n\t\t{\n\t\t\t$validate['password']\t\t\t= $member_data['password'];\n\t\t\t$validate['password_confirm']\t= $member_data['password_confirm'];\n\t\t}\n\n\t\tee()->load->library('validate', $validate, 'validate');\n\n\t\tee()->validate->validate_username();\n\t\tee()->validate->validate_screen_name();\n\t\tee()->validate->validate_email();\n\n\t\tif ( ! empty( $member_data['password'] ) )\n\t\t{\n\t\t\tee()->validate->validate_password();\n\t\t}\n\n\t\tif ( ee()->db->table_exists('exp_user_params') === TRUE )\n\t\t{\n\t\t\tif (\n\t\t\t\tee()->config->item('user_email_is_username') != 'n'\n\t\t\t\tAND ( $key = array_search( lang('username_password_too_long'), ee()->validate->errors ) ) !== FALSE\n\t\t\t\t)\n\t\t\t{\n\t\t\t\tif (strlen(ee()->validate->username) <= 50)\n\t\t\t\t{\n\t\t\t\t\tunset(ee()->validate->errors[$key]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tee()->validate->errors[$key] = str_replace('32', '50', ee()->validate->errors[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( count( ee()->validate->errors ) > 0 )\n\t\t{\n\t\t\t$this->error\t= array_merge( $this->error, ee()->validate->errors );\n\t\t\treturn $this->show_error($this->error );\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tDo we require captcha? And are we not in from_fb mode?\n\t\t// --------------------------------------------\n\n\t\tif ( ee()->config->item('use_membership_captcha') == 'y' AND $this->from_fb === FALSE )\n\t\t{\n\t\t\t$query = ee()->db->query(\n\t\t\t\t\"SELECT COUNT(*) AS count\n\t\t\t\tFROM exp_captcha\n\t\t\t\tWHERE word='\" . ee()->db->escape_str( $_POST['captcha'] ) . \"'\n\t\t\t\tAND ip_address = '\" . ee()->db->escape_str( ee()->input->ip_address() ) . \"'\n\t\t\t\tAND date > UNIX_TIMESTAMP()-7200\"\n\t\t\t);\n\n\t\t\tif ( $query->row('count') == 0 )\n\t\t\t{\n\t\t\t\treturn $this->show_error(lang('captcha_incorrect') );\n\t\t\t}\n\n\t\t\tee()->db->query(\n\t\t\t\t\"DELETE FROM exp_captcha\n\t\t\t\tWHERE (word='\" . ee()->db->escape_str($_POST['captcha']) . \"'\n\t\t\t\tAND ip_address = '\" . ee()->db->escape_str( ee()->input->ip_address() ) . \"')\n\t\t\t\tOR date < UNIX_TIMESTAMP()-7200\"\n\t\t\t);\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tCheck form hash\n\t\t// --------------------------------------------\n\t\t//\tIf we are registering through Facebook's registration plugin, we have gone through the signed token validation which proves that the request originated from our domain.\n\t\t// --------------------------------------------\n\n\t\tif ( $this->from_fb === FALSE )\n\t\t{\n\t\t\tif ($this->_check_form_hash() === FALSE)\n\t\t\t{\n\t\t\t\treturn $this->show_error(lang('not_authorized'));\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tErrors?\n\t\t// --------------------------------------------\n\n\t\tif ( count( $this->error ) > 0 )\n\t\t{\n\t\t\treturn $this->show_error($this->error );\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tAttempt to create account\n\t\t// --------------------------------------------\n\n\t\tif ( ( $member_data = $this->actions->create_member_account( $uid, $member_data ) ) === FALSE )\n\t\t{\n\t\t\t$this->error[]\t= lang('could_not_create_account');\n\t\t\treturn $this->show_error($this->error );\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tSend admin notification\n\t\t// --------------------------------------------\n\n\t\t$this->actions->send_admin_notification_of_registration( $member_data );\n\n\t\t// --------------------------------------------\n\t\t//\t'fbc_register_end' hook.\n\t\t// --------------------------------------------\n\t\t//\tAdditional processing when a member is created through the User Side\n\t\t// --------------------------------------------\n\n\t\tif (ee()->extensions->active_hook('fbc_register_end') === TRUE)\n\t\t{\n\t\t\t$edata = ee()->extensions->universal_call( 'fbc_register_end', $this, $member_data['member_id'] );\n\t\t\tif (ee()->extensions->end_script === TRUE) return;\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tPrep return\n\t\t// --------------------------------------------\n\n\t\t$return\t= '';\n\n\t\tif ( ! empty( $_POST['RET'] ) )\n\t\t{\n\t\t\t$return\t= $_POST['RET'];\n\t\t}\n\n\t\tif ( ! empty( $_POST['return'] ) )\n\t\t{\n\t\t\t$return\t= $_POST['return'];\n\t\t}\n\n\t\t$return\t= $this->_chars_decode( $return );\n\n\t\t// --------------------------------------------\n\t\t//\tIs this a pending account?\n\t\t// --------------------------------------------\n\n\t\tif ( $member_data['group_id'] == 4 )\n\t\t{\n\t\t\t// --------------------------------------------\n\t\t\t//\tSend activation email?\n\t\t\t// --------------------------------------------\n\n\t\t\tif ( ee()->config->item('fbc_account_activation') == 'fbc_email_activation' )\n\t\t\t{\n\t\t\t\t// --------------------------------------------\n\t\t\t\t//\tSend admin notification\n\t\t\t\t// --------------------------------------------\n\n\t\t\t\t$this->actions->send_user_activation_email( $member_data );\n\n\t\t\t\t// --------------------------------------------\n\t\t\t\t//\tShow success message\n\t\t\t\t// --------------------------------------------\n\n\t\t\t\t$data\t= array(\n\t\t\t\t\t'title'\t\t=> lang('account_created'),\n\t\t\t\t\t'heading'\t=> lang('account_created'),\n\t\t\t\t\t'link'\t\t=> array(\n\t\t\t\t\t\t\t\t\t$return,\n\t\t\t\t\t\t\t\t\tlang('back')\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t'content'\t=> lang('mbr_membership_instructions_email')\n\t\t\t\t);\n\n\t\t\t\treturn ee()->output->show_message( $data, TRUE );\n\t\t\t}\n\n\t\t\t// --------------------------------------------\n\t\t\t//\tIndicate that an admin will activate account?\n\t\t\t// --------------------------------------------\n\n\t\t\tif ( ee()->config->item('fbc_account_activation') == 'fbc_admin_activation' )\n\t\t\t{\n\t\t\t\t// --------------------------------------------\n\t\t\t\t//\tShow success message\n\t\t\t\t// --------------------------------------------\n\n\t\t\t\t$data\t= array(\n\t\t\t\t\t'title'\t\t=> lang('account_created'),\n\t\t\t\t\t'heading'\t=> lang('account_created'),\n\t\t\t\t\t'link'\t\t=> array(\n\t\t\t\t\t\t\t\t\t$return,\n\t\t\t\t\t\t\t\t\tlang('back')\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t'content'\t=> lang('mbr_admin_will_activate')\n\t\t\t\t);\n\n\t\t\t\treturn ee()->output->show_message( $data, TRUE );\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tJust log them in\n\t\t// --------------------------------------------\n\n\t\telse\n\t\t{\n\t\t\tif ( $this->actions->ee_login( $member_data['member_id'] ) === FALSE )\n\t\t\t{\n\t\t\t\treturn $this->show_error($this->actions->error );\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tReturn\n\t\t// --------------------------------------------\n\n\t\t$this->_redirect( $return );\n\t\texit();\n\t}", "title": "" }, { "docid": "605cba863acbe72ed2f8899f10e707a7", "score": "0.65627795", "text": "function register(){\r\n \r\n //Se inserta el usuario en la base de datos y se guarda el resultado en la variable sql\r\n $sql = \"INSERT INTO USUARIO VALUES('$this->email', '$this->nombre', '$this->contraseña')\";\r\n //Se comprueba si se ha insertado correctamente el usuario y devuelve un mensaje con el resultado\r\n if($this->mysqli->query($sql)){\r\n return 'Registrado';\r\n }\r\n else{\r\n return 'Error de inserción';\r\n }\r\n }", "title": "" }, { "docid": "829756e06de8e263d8f398effa447c08", "score": "0.6560501", "text": "public function guest_can_register()\n {\n Event::fake();\n\n Carbon::setTestNow(\n Carbon::createFromFormat('Y-m-d H:i:s', '2020-01-01 01:23:45')\n );\n\n $this\n ->from($this->registerGetRoute('[email protected]'))\n ->post(route('register'), [\n 'first_name' => 'Pepe',\n 'last_name' => 'Grillo',\n 'email' => '[email protected]',\n 'password' => 'awesome-secret',\n 'password_confirmation' => 'awesome-secret',\n ])\n ->assertRedirect($this->successfulRegistrationRoute());\n\n $this->assertCount(1, $users = User::all());\n $this->assertAuthenticatedAs($user = $users->first());\n\n $this->assertEquals('Pepe', $user->first_name);\n $this->assertEquals('Grillo', $user->last_name);\n $this->assertEquals('[email protected]', $user->email);\n $this->assertNull($user->email_verified_at);\n $this->assertTrue(Hash::check('awesome-secret', $user->password));\n $this->assertEquals('2020-01-01 01:23:45', $user->password_changed_at);\n\n Event::assertDispatched(Registered::class, fn ($e) => $e->user->id === $user->id);\n }", "title": "" }, { "docid": "c4f4b0531643b8eaa68c04cca239c898", "score": "0.6557552", "text": "public static function check()\n\t{\n\t\treturn !is_null(self::user());\n\t}", "title": "" }, { "docid": "6c2284197d06d1be0b44cae493655abe", "score": "0.65541404", "text": "function user_register($name, $email, $username, $password)\r\n\t{\r\n\t\t$user_loggued = get_loggedin_user();\r\n\t\tif(!is_object($user_loggued)) \r\n\t\t\tthrow new InvalidParameterException(\"Forbidden : not logged in (token ?) \"); \r\n\t\tif(!$user_loggued->isadmin())\r\n\t\t{\r\n\t\t\tthrow new InvalidParameterException('Forbidden : not admin');\r\n\t\t}\r\n\t\t$user = get_user_by_username($username);\r\n\t\tif (!$user) {\r\n\t\t\t$return['success'] = true;\r\n\t\t\t$return['guid'] = register_user($username, $password, $name, $email);\r\n\t\t} else {\r\n\t\t\t$return['success'] = false;\r\n\t\t\t$return['message'] = elgg_echo('registration:userexists');\r\n\t\t}\r\n\t\treturn $return;\r\n\t}", "title": "" }, { "docid": "c77a5cf2e1545080184c106091aa48d0", "score": "0.65523654", "text": "public function isUserCreatable();", "title": "" }, { "docid": "5e6c0b8dbd56fdd8ead1194c8ab796fd", "score": "0.6547576", "text": "public function registrar($datos){\n if(!$this->db->insert('users',$datos)){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "cd96989c95b9163d043d9b30737c7b6c", "score": "0.6545236", "text": "function envato_user_exist() {\r\n\t\t\t\r\n\t\t\t$url = 'http://marketplace.envato.com/api/v2/' . $this->user_login . '/' . $this->api . '/account.json';\r\n\t\t\t$credentials = @file_get_contents( $url );\r\n\t\t\t\r\n\t\t\tif( $credentials ) {\r\n\t\t\t\treturn true;\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\t\t\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "fa54f7335922e4f37a0c9255929fa212", "score": "0.6532946", "text": "public function checkUserIfExist()\n\t{\n\t\t$inputtedData = $this->setUpperCase($this->input->post());\n\t\t$birthDay = date('Y-m-d', strtotime($inputtedData['birth_day'])) . ' 00:00:00';\n\t\t$isExist = $this->db->from('tblConstituent')->where('strFirstName', $inputtedData['first_name'])\n\t\t\t\t\t->where('strLastName', $inputtedData['last_name'])\n\t\t\t\t\t->where('dteBirth', $birthDay)\n\t\t\t\t\t->get()->row();\n\t\tif (!empty($isExist)) {\n\t\t\techo json_encode(true);\n\t\t} else {\n\t\t\techo json_encode(false);\n\t\t}\n\t}", "title": "" }, { "docid": "0f61735eb470442d65f412be8cb749e4", "score": "0.65316135", "text": "public function isRegistered($id)\n {\n return (bool) $this->registrations()->where('user_id', '=', $id)->first();\n }", "title": "" }, { "docid": "0f61735eb470442d65f412be8cb749e4", "score": "0.65316135", "text": "public function isRegistered($id)\n {\n return (bool) $this->registrations()->where('user_id', '=', $id)->first();\n }", "title": "" }, { "docid": "77708893a7e9f707b4f5171a99adc094", "score": "0.653112", "text": "function check_user_exists( $p_user_id ) {\r\n\t\tglobal $g_mantis_user_table, $g_main_page;\r\n\r\n\t\t$query = \"SELECT *\r\n\t\t\t\tFROM $g_mantis_user_table\r\n\t\t\t\tWHERE id='$p_user_id'\";\r\n\t\t$result = db_query( $query );\r\n\t\tif ( 0 == db_num_rows( $result ) ) {\r\n\t\t\tprint_header_redirect( $g_main_page );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "374246e6972a55d22bc912bdf85c64a2", "score": "0.65247345", "text": "function user_exists($login)\n\t{\n\t\t$query = 'SELECT count(*)\n\t\t\t\t\t\t\tFROM user\n\t\t\t\t\t\t\tWHERE user_login = \\'' . $login . '\\';';\n\n\t\t$result = $dbsocket->query($query);\n\n\t\tif($result->fetchColumn() > 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": "07a32386f751565dafbdce21bc34478a", "score": "0.6518151", "text": "public function register() {\n if (session_status() == PHP_SESSION_NONE && !headers_sent()) {\n session_start();\n }\n\n if (isset($_POST[\"register\"])) {\n if ($this->registerNewUser()) {\n $login = new Login();\n $login->doLogin($_POST['userName'], $_POST['userPasswordNew']);\n } else {\n $this->showError();\n }\n }\n }", "title": "" }, { "docid": "2c2cd43d12f75ff74dc9ac616b9a0da5", "score": "0.65174264", "text": "function rgisterUser()\n {\n $query = \"INSERT INTO `users` (`id`, `name`, `username`, `password`, `email`) VALUES ('','$this->name','$this->username','$this->password','$this->email')\";\n \n $sql = mysql_query($query);\n \n if($sql) echo\"Registered successfuly\";\n else throw new Exception(\"Error: not registerd\");\n \n }", "title": "" }, { "docid": "67392b78a0370ed6b9d0a646ff2e979e", "score": "0.6515555", "text": "public function isUserExist(){\n $res = $this->readAll();\n\n //check if query was successful \n if(!$res) {\n echo(\"Error description: \" .$this->conn->conn->error); \n }\n\n\n //check if the number of rows in the result set is greater than 0\n if ($res->num_rows > 0){\n\n //loop through each row of the result set\n while($row = $res->fetch_assoc()){\n if($this->getUsername() == $row [\"username\"]){\n echo \"This user name already exists\";\n return false;\n }\n }\n\n }\n\n return true;\n }", "title": "" }, { "docid": "1c8019069ef90e5aa676367b9317b43d", "score": "0.65153587", "text": "function userIsValid() {\n if (!isset($_SESSION['email']) || !$_SESSION['email']) {\n return false;\n } else {\n $admin = R::findOne('admin', ' email=:email ', array(':email'=>$_SESSION['email']));\n if (isset($admin) && $admin->id) {\n return true;\n }\n return false;\n }\n}", "title": "" }, { "docid": "adefd52fb9e0e543994c43d1f701f2c3", "score": "0.6510612", "text": "public function hasUser(): bool\n {\n return ($this->tokenStorage->getToken()->getUser() instanceof UserInterface) ? true : false;\n }", "title": "" }, { "docid": "ee5e7482b35cebc6227bd84cbadfcab6", "score": "0.65005136", "text": "public function testcheckUserExist()\n {\n $user = $this->userRepo->checkUserExist('julien',md5('toto'));\n $this->assertTrue($user);\n }", "title": "" } ]
bf3baf48ac40d933106773a7c2073f9e
Define the model's default state.
[ { "docid": "d85cd5b8efaad5ab3ad6048a233ca93e", "score": "0.0", "text": "public function definition()\n {\n return [\n 'goal'=>$this->faker->name,\n 'goalStatus'=> 1,\n ];\n }", "title": "" } ]
[ { "docid": "0f0992fa77a5c6bb2600c2f11e1120b8", "score": "0.70344335", "text": "protected function _setDefault()\n {\n $this->_default = $this->_model->fetchNew();\n }", "title": "" }, { "docid": "e8adc3e5854585decaa8c6e07f432a8f", "score": "0.6857964", "text": "public function getDefaultUserState();", "title": "" }, { "docid": "c201cd5c5992b7b1e8ccfe8fde766547", "score": "0.6475143", "text": "public static function get_default_state(){return 'start';}", "title": "" }, { "docid": "7d4421c92ddfb746b30ec3055cb0171d", "score": "0.62678003", "text": "function getDefaultState() {\n\t\tparent::getDefaultState();\n\t\t$this->import_throttled_import = true;\n\t\t$this->import_num_records = 1;\n\t\t$this->keys = array('coupon_id', 'coupon_name', 'coupon_code', 'coupon_type', 'coupon_group', 'coupon_automatic', 'coupon_value', 'coupon_value_type', 'currency_id', 'coupon_description', 'coupon_params', 'created_date', 'modified_date', 'start_date', 'expiration_date', 'coupon_enabled', 'coupon_uses', 'coupon_max_uses', 'coupon_max_uses_per_user');\n\t}", "title": "" }, { "docid": "496c6e599de87d962189660d96fcc178", "score": "0.6229978", "text": "public function setDefaultUserState($state);", "title": "" }, { "docid": "fdef745d4604e48c3f213c96b73ad4f0", "score": "0.62146235", "text": "public function testSetModelPropertiesDefault()\n {\n $this->markTestSkipped(\n 'Tests still not updated.'\n );\n\n $this->Crud->setAction('index');\n $this->assertSame('CrudExamples', $this->Crud->getModelName());\n }", "title": "" }, { "docid": "f7fe79f7c46df237e2a3a2fa3bfcee1d", "score": "0.6210733", "text": "public function makeDefault()\n\t{\n\t\t$this->repo->setDefault($this->name, $this->module_srl);\n\t}", "title": "" }, { "docid": "5619c57d631bdeba431596b06aa1dca5", "score": "0.620997", "text": "function _getState()\r\n {\r\n $app = JFactory::getApplication();\r\n $model = $this->_getModel( $this->get('default_model') );\r\n $ns = $this->_getNamespace();\r\n\r\n $state = parent::_getState(); // get the basic state values from the parent method\r\n\r\n // then add your own custom ones just for this report\r\n // $state['filter_name'] = $app->getUserStateFromRequest($ns.'name', 'filter_name', '', '');\r\n //$state['filter_product_id'] = $app->getUserStateFromRequest($ns.'product_id', 'filter_product_id', '', '');\r\n $state['filter_product_name'] = $app->getUserStateFromRequest($ns.'product_name', 'filter_product_name', '', '');\r\n $state['filter_manufacturer_id'] = $app->getUserStateFromRequest($ns.'manufacturer_id', 'filter_manufacturer_id', '', '');\r\n \r\n // then apply the states to the model\r\n foreach (@$state as $key=>$value)\r\n {\r\n $model->setState( $key, $value );\r\n }\r\n return $state; \r\n }", "title": "" }, { "docid": "90067e31c3599fb0cf640497d030cd6c", "score": "0.6183043", "text": "abstract protected function getDefaultStatus();", "title": "" }, { "docid": "c0683d1a0519089177318edfa8078526", "score": "0.6084986", "text": "public static function getDefaultState()\n {\n return 'in-queue';\n }", "title": "" }, { "docid": "64a156a71debd35893e17ef5894f073f", "score": "0.60674965", "text": "public function default()\n {\n }", "title": "" }, { "docid": "bace67c4c89688f46c4d12e19b51f36c", "score": "0.60185605", "text": "public function applyDefault()\n {\n $this->internalValue = $this->internalDefaultValue;\n }", "title": "" }, { "docid": "fca93b6eafea77a0e245281d6fe674bf", "score": "0.59910166", "text": "public function setDefault($value){$this->default = $value; return $this;}", "title": "" }, { "docid": "ad440b3f73390a97e31c3d1e9c88ce2f", "score": "0.59858906", "text": "public function applyDefaultValues()\n {\n $this->is_obsolete = 0;\n $this->is_relationshiptype = 0;\n }", "title": "" }, { "docid": "2122d84e531804cfbf4599e6818341bf", "score": "0.5984543", "text": "public function applyDefaultValues()\n {\n $this->deleted = false;\n $this->idx = 0;\n $this->isvector = false;\n $this->penalty = 0;\n $this->visibleinjobticket = false;\n $this->isassignable = false;\n $this->defaultevaluation = false;\n $this->toepicrisis = false;\n $this->mandatory = false;\n $this->readonly = false;\n }", "title": "" }, { "docid": "420e10f03c0363090caf9781e4ceea2d", "score": "0.5982965", "text": "public function applyDefaultValues()\n {\n $this->status = 0;\n $this->is_principal = false;\n $this->confirmation = 0;\n }", "title": "" }, { "docid": "669b547fc520852a971a66ac2b571c34", "score": "0.597679", "text": "protected function initializeModel()\r\n {\r\n }", "title": "" }, { "docid": "3dfd799ea16c6c460310d1455a9e4af8", "score": "0.5890773", "text": "protected function initDefaultValues()\n {\n parent::initDefaultValues();\n\n $this->attributes([]);\n }", "title": "" }, { "docid": "f1c2f88147c8cb4ddcc6a51dcf3019ae", "score": "0.5875699", "text": "public static function _init()\n\t{\n\t\t// \t'default_id' => array(\n\t\t// \t\t'form' => array(\n\t\t// \t\t\t'options' => function($model) {\n\t\t// \t\t\t\t$model->items;\n\t\t// \t\t\t\t$model = $model->to_array();\n\t\t// \t\t\t\treturn \\Arr::pluck($model['items'], 'name', 'id');\n\t\t// \t\t\t}\n\t\t// \t\t)\n\t\t// \t),\n\t\t// ));\n\n\t\tif (\\Auth::has_access('enum.enum[all]'))\n\t\t{\n\t\t\t\\Arr::set(static::$_properties, 'read_only.form', array(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'template' => 'switch',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\tgettext('No'),\n\t\t\t\t\t\tgettext('Yes'),\n\t\t\t\t\t),\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "157c35fbd4ba32023ae58f0062daa2a3", "score": "0.5868981", "text": "public function getStateDefaultValue() {\n //initialize dummy value.. no content header.pure html \n $sql = null;\n $stateId = null;\n if ($this->getVendor() == self::MYSQL) {\n $sql = \" \n SELECT `stateId`\n FROM \t`state`\n WHERE `isActive` = 1\n AND `companyId` = '\" . $this->getCompanyId() . \"'\n AND \t `isDefault` =\t 1\n LIMIT 1\";\n } else if ($this->getVendor() == self::MSSQL) {\n $sql = \" \n SELECT TOP 1 [stateId],\n FROM [state]\n WHERE [isActive] = 1\n AND [companyId] = '\" . $this->getCompanyId() . \"'\n AND \t [isDefault] = 1\";\n } else if ($this->getVendor() == self::ORACLE) {\n $sql = \" \n SELECT STATEID AS \\\"stateId\\\",\n FROM STATE \n WHERE ISACTIVE = 1\n AND COMPANYID = '\" . $this->getCompanyId() . \"'\n AND \t ISDEFAULT\t =\t 1\n AND \t\t ROWNUM\t =\t 1\";\n } else {\n header('Content-Type:application/json; charset=utf-8');\n echo json_encode(array(\"success\" => false, \"message\" => $this->t['databaseNotFoundMessageLabel']));\n exit();\n }\n try {\n $result = $this->q->fast($sql);\n } catch (\\Exception $e) {\n header('Content-Type:application/json; charset=utf-8');\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n if ($result) {\n $row = $this->q->fetchArray($result);\n $stateId = $row['stateId'];\n }\n return $stateId;\n }", "title": "" }, { "docid": "f028ddf6173178444da3f5cdecdc88f0", "score": "0.58603626", "text": "public function applyDefaultValues()\n {\n $this->empresa_estatus = true;\n }", "title": "" }, { "docid": "30d3498cafc405af45787da0eec25f54", "score": "0.5825086", "text": "public function initializeDefaults()\n {\n }", "title": "" }, { "docid": "30d3498cafc405af45787da0eec25f54", "score": "0.5825086", "text": "public function initializeDefaults()\n {\n }", "title": "" }, { "docid": "026d01c9e4a826b932e0c2599b3cd5d7", "score": "0.5817658", "text": "public function testGetDefaultState()\n\t{\n\t\t$marshal= 'marshal';\n\t\t$new\t= 'new';\n\t\t$dirty = 'dirty';\n\t\t$delete = 'delete';\n\t\t\n\t\t$this->assertEquals($new, $this->state->getState());\n\t\t$this->assertTrue($this->state->isNew());\n\t\t$this->assertFalse($this->state->isMarshal());\n\t\t$this->assertFalse($this->state->isDirty());\n\t\t$this->assertFalse($this->state->isDelete());\n\n\t\t$this->assertSame($this->state, $this->state->setState($marshal));\n\t\t$this->assertEquals($marshal, $this->state->getState());\n\t\t$this->assertTrue($this->state->isMarshal());\n\t\t$this->assertFalse($this->state->isNew());\n\t\t$this->assertFalse($this->state->isDirty());\n\t\t$this->assertFalse($this->state->isDelete());\n\n\t\t$this->assertSame($this->state, $this->state->setState($dirty));\n\t\t$this->assertEquals($dirty, $this->state->getState());\n\t\t/*\n\t\t * isDirty is false because we have to add dirty members with\n\t\t * markDirty\n\t\t */\n\t\t$this->assertFalse($this->state->isDirty());\n\t\t$this->assertFalse($this->state->isMarshal());\n\t\t$this->assertFalse($this->state->isNew());\n\t\t$this->assertFalse($this->state->isDelete());\n\n\t\t$this->assertSame($this->state, $this->state->setState($delete));\n\t\t$this->assertEquals($delete, $this->state->getState());\n\t\t$this->assertTrue($this->state->isDelete());\n\t\t$this->assertFalse($this->state->isDirty());\n\t\t$this->assertFalse($this->state->isMarshal());\n\t\t$this->assertFalse($this->state->isNew());\n\n\t\t$this->assertSame($this->state, $this->state->setState($new));\n\t\t$this->assertEquals($new, $this->state->getState());\n\t\t$this->assertTrue($this->state->isNew());\n\t\t$this->assertFalse($this->state->isDelete());\n\t\t$this->assertFalse($this->state->isDirty());\n\t\t$this->assertFalse($this->state->isMarshal());\n\t}", "title": "" }, { "docid": "73f3b6d894e3128b5dc94ffd55b6bf97", "score": "0.5816249", "text": "public function __default()\n \t{\n \t if( self::isArg( 'notifwindow') )\n \t {\n $this->view = \"common_notifwindow\";\n \t $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\n \t }\n \t else\n \t {\n $this->view = \"takaraisland_takaraisland\";\n self::trace( \"Complete reinitialization of board game\" );\n }\n \t}", "title": "" }, { "docid": "4e976040a326fdd9936ccba9368e59ad", "score": "0.57897204", "text": "protected function getDefaultModels()\n {\n }", "title": "" }, { "docid": "0a3521aac18889256901b3e0710f680e", "score": "0.57475823", "text": "protected function makeDefault()\n {\n $this->action = new Action(ActionType::BUTTON(), 'Default name', 'Default button label');\n }", "title": "" }, { "docid": "1f7c7af097a55db205a10cd47f8d9a3a", "score": "0.5747069", "text": "public function isDefault()\n {\n return ($this->getId() === static::DEFAULT_CHANGE);\n }", "title": "" }, { "docid": "79e0aa53b1a31fbe00039c291dad1100", "score": "0.57427984", "text": "public function getDefault();", "title": "" }, { "docid": "79e0aa53b1a31fbe00039c291dad1100", "score": "0.57427984", "text": "public function getDefault();", "title": "" }, { "docid": "efbbe340c5050e728a788818c6a998d7", "score": "0.5737878", "text": "public static function defaults() {\n return array('toggle' => 1);\n }", "title": "" }, { "docid": "94ddaf393c0ac5df0bf4abf43b06b6db", "score": "0.5737154", "text": "public function setDefaults() {\n }", "title": "" }, { "docid": "ba8f4b9171cb7c4b103d13d9757b4ee8", "score": "0.5700912", "text": "public function __default()\r\n \t{\r\n \t if( self::isArg( 'notifwindow') )\r\n \t {\r\n $this->view = \"common_notifwindow\";\r\n \t $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n \t }\r\n \t else\r\n \t {\r\n $this->view = \"cityofthebigshoulders_cityofthebigshoulders\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n \t}", "title": "" }, { "docid": "5e8c252881a901d2f80266aac3986eab", "score": "0.57004535", "text": "public function setDefaultValues()\n\t{\t\t\n\t\t\n\t}", "title": "" }, { "docid": "c66f9e2582ef613a8132f40862fd9b14", "score": "0.5693975", "text": "public function carregaDefault() {\n $this->Model->setCCT_Produtivo('N');\n $this->Model->setPEO_CentroCustoORC(0);\n $this->Model->setPEO_CentroCustoDRT(0);\n $this->Model->setPEO_CentroCustoPEO('N');\n $this->Model->setPEO_CentroCustoBLV('N');\n $this->Model->setMNT_CentroCustoAbreOS('N');\n $this->Model->setMNT_CentroCustoApontaOS('N');\n $this->Model->setPEO_CentroCustoOCE('N');\n $this->Model->setMNT_CentroCustoCriticidade(0);\n $this->Model->setMNT_CentroCustoArea(0);\n $this->Model->setMNT_CentroCustoTipoAprovacao('I');\n $this->Model->setMNT_CentroCustoAprovAutomatica('N');\n $this->Model->setESP_HolambraCCTFilialDestino(0);\n $this->Model->setESP_HolambraCCTPlanoDestino(0);\n $this->Model->setESP_HolambraCCTContaDestino(0);\n }", "title": "" }, { "docid": "977d9b013db364703943051e0e8cda66", "score": "0.56936777", "text": "protected function setDefaultValues()\n {\n parent::setDefaultValues();\n\n $this->isDynamic = 0;\n }", "title": "" }, { "docid": "208e08bed271613023c498dbea0ac2aa", "score": "0.56730205", "text": "public function init()\n {\n $this->defaultItems = !$this->items;\n parent::init();\n }", "title": "" }, { "docid": "f60cdf2b799a8e295d0e499c14e6e6b7", "score": "0.5672356", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n EventDispatcherProxy::trigger(array('construct','model.construct'), new ModelEvent($this));\n }", "title": "" }, { "docid": "b6844a5a57a8255ac8455271c8ca7d06", "score": "0.56621045", "text": "public function defaultValue();", "title": "" }, { "docid": "1e6ad63d37edc0035b4ad01cb000359a", "score": "0.56540394", "text": "public function applyDefaultValues()\n {\n $this->a_bot = '0';\n $this->approval_pengguna = '0';\n $this->aktif = '1';\n $this->last_sync = '1901-01-01 00:00:00';\n }", "title": "" }, { "docid": "ca9ec935f0de8b18e5ed04d1047be460", "score": "0.56537455", "text": "public function __default()\n {\n if (self::isArg('notifwindow')) {\n $this->view = 'common_notifwindow';\n $this->viewArgs['table'] = self::getArg('table', AT_posint, true);\n } else {\n $this->view = 'taluva_taluva';\n self::trace('Complete reinitialization of board game');\n }\n }", "title": "" }, { "docid": "21239b3651043e578652a9735f9a6704", "score": "0.56487685", "text": "public function applyDefaultValues()\n {\n $this->is_admin = false;\n }", "title": "" }, { "docid": "2c8756529392d9add61c766551b597e2", "score": "0.5638043", "text": "public function __construct()\n {\n parent::__construct();\n $this->name = 'default_name';\n $this->address = 'default_address';\n $this->city = 'default_city';\n $this->country = 'default_country';\n }", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.56371003", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.56371003", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.56371003", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.56371003", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.56371003", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.56371003", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.56371003", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.56371003", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.56371003", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "dfbfa3b38024a46d0d88532f2e142d84", "score": "0.5625998", "text": "public function __construct()\n {\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "dfbfa3b38024a46d0d88532f2e142d84", "score": "0.5625998", "text": "public function __construct()\n {\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "dfbfa3b38024a46d0d88532f2e142d84", "score": "0.5625998", "text": "public function __construct()\n {\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "dfbfa3b38024a46d0d88532f2e142d84", "score": "0.5625998", "text": "public function __construct()\n {\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "dfbfa3b38024a46d0d88532f2e142d84", "score": "0.5625998", "text": "public function __construct()\n {\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "dfbfa3b38024a46d0d88532f2e142d84", "score": "0.5625998", "text": "public function __construct()\n {\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "d04f598a7e9c88dc4ff2e834eae4332a", "score": "0.56219846", "text": "public function applyDefaultValues()\n {\n }", "title": "" }, { "docid": "24561f97523a372c817fcd7d58308af0", "score": "0.5620804", "text": "public function state(): State;", "title": "" }, { "docid": "4075b142aed3d882006e63b946434470", "score": "0.56193155", "text": "public function applyDefaultValues()\n {\n $this->map_level = 0;\n $this->map_tier = 0;\n $this->map_layout = 'X';\n $this->map_difficulty = 0;\n $this->map_description = 'No Description Available';\n $this->map_num_bosses = 0;\n }", "title": "" }, { "docid": "219dce81fa06471b4406520d3d807317", "score": "0.5617039", "text": "public function applyDefaultValues()\n\t{\n\t}", "title": "" }, { "docid": "11e7f97b7cceeb8364ad7e403ca0b67f", "score": "0.5605882", "text": "protected function setModel()\n\t{\n\t}", "title": "" }, { "docid": "e3aa0083a9d40682cb42995011ccea8e", "score": "0.55878973", "text": "public function applyDefaultValues()\n {\n $this->kontinuitas_listrik = '1';\n $this->partisipasi_bos = '1';\n $this->last_sync = '1901-01-01 00:00:00';\n }", "title": "" }, { "docid": "9541453ee1f5d4112de063568125b697", "score": "0.55846393", "text": "public function set_default( $default ) {\n\n\t\t$this->data['default'] = $default;\n\t}", "title": "" }, { "docid": "987d706c63e44655a4b2b0daf9395b9d", "score": "0.55828184", "text": "protected function get_default() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8f80087bb17ef67bd003045b9255b95e", "score": "0.557347", "text": "public function setDefaultProperties()\r\n {\r\n\t$this->set(\"_revision\",1);\r\n }", "title": "" }, { "docid": "325bd5831ff28fae28287797aebe931a", "score": "0.5564448", "text": "public function default() {\n \n $this->data = ModuleConfig::language_translets();\n // [Module_Data]\n }", "title": "" }, { "docid": "0b29038b9c34b38dd7d033d6edf2cf91", "score": "0.55631495", "text": "function post_model_init($from_cache = FALSE)\n {\n }", "title": "" }, { "docid": "e4f790c9cbc3deb61c644a8a1891c2f3", "score": "0.5544705", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "title": "" }, { "docid": "e4f790c9cbc3deb61c644a8a1891c2f3", "score": "0.5544705", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "title": "" }, { "docid": "e4f790c9cbc3deb61c644a8a1891c2f3", "score": "0.5544705", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "title": "" }, { "docid": "e4f790c9cbc3deb61c644a8a1891c2f3", "score": "0.5544705", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "title": "" }, { "docid": "9e4da1064349ebaf4292fccbf81a1e33", "score": "0.5542052", "text": "public function stateFunction() {}", "title": "" }, { "docid": "bc7f86cfc75e39d4b1412bf4a012506c", "score": "0.5541902", "text": "function getDefaultValue() { \n }", "title": "" }, { "docid": "235bbe8edc907e254ec4f25e5191fa7a", "score": "0.55401605", "text": "private function setDefaults()\n {\n }", "title": "" }, { "docid": "2cd88692afd4f5e8a46a4398a87098c9", "score": "0.5529302", "text": "public function getStateToPreform()\n>>>>>>> third\n {\n $this->content = '';\n }", "title": "" }, { "docid": "76ae77cf3e0f98f1d05ba52d75e7dea7", "score": "0.55237883", "text": "function model()\n {\n }", "title": "" }, { "docid": "fb0833a3884c63525c185c5b6356e63f", "score": "0.55215526", "text": "public function __construct()\r\n\t{\r\n\t\t$this->applyDefaultValues();\r\n\t}", "title": "" }, { "docid": "d26768a572f3def9cc38545c7c299319", "score": "0.5512676", "text": "protected function setupMakeActiveDefaults()\n {\n $this->crud->allowAccess('makeActive');\n\n $this->crud->operation(['list', 'show'], function () {\n $this->crud->addButton('line', 'makeActive', 'view', 'crud::buttons.make_active', 'beginning');\n });\n }", "title": "" }, { "docid": "3d32c212d9f94380253298645d6f310d", "score": "0.55091393", "text": "public function applyDefaultValues()\n {\n $this->total_price = '0.000000';\n $this->total_price_with_tax = '0.000000';\n $this->discount_without_tax = '0.000000';\n $this->discount_with_tax = '0.000000';\n $this->allow_partial_use = true;\n }", "title": "" }, { "docid": "393e31fdc5d40d8cbb260a39a5bd1502", "score": "0.5508973", "text": "public function getDefaultValue();", "title": "" }, { "docid": "393e31fdc5d40d8cbb260a39a5bd1502", "score": "0.5508973", "text": "public function getDefaultValue();", "title": "" }, { "docid": "393e31fdc5d40d8cbb260a39a5bd1502", "score": "0.5508973", "text": "public function getDefaultValue();", "title": "" }, { "docid": "393e31fdc5d40d8cbb260a39a5bd1502", "score": "0.5508973", "text": "public function getDefaultValue();", "title": "" }, { "docid": "393e31fdc5d40d8cbb260a39a5bd1502", "score": "0.5508973", "text": "public function getDefaultValue();", "title": "" }, { "docid": "393e31fdc5d40d8cbb260a39a5bd1502", "score": "0.5508973", "text": "public function getDefaultValue();", "title": "" }, { "docid": "393e31fdc5d40d8cbb260a39a5bd1502", "score": "0.5508973", "text": "public function getDefaultValue();", "title": "" }, { "docid": "e9990b5b51efe2fefbceaa157580b3ea", "score": "0.5503909", "text": "protected function setDefaults($record)\n\t{\n\t\t$app = JFactory::getApplication();\n\t\t$user = JFactory::getUser();\n\n\t\t// Default -- Dates: current and null.\n\t\t$currentdate = JFactory::getDate();\n\n\t\t// Default -- Created By (Owner).\n\t\t$default_created_by = $user->get('id') ?: flexicontent_db::getSuperUserID();\n\n\t\t// Default -- Access level.\n\t\t// -- NOTE: This default will be forced if user has not access level edit privelege\n\t\t$default_accesslevel = $app->getCfg( 'access', $public_acclevel = 1 );\n\n\t\t// Default -- Publication state.\n\t\t// -- NOTE: this will only be used if user has publish privilege, otherwise items will be forced to (a) pending_approval state for NEW ITEMS and (b) to item's current state for EXISTING ITEMS\n\t\t$default_state = $app->isClient('administrator')\n\t\t\t? $this->_cparams->get('new_item_state', $pubished_state = 1) // Use the configured setting for backend items\n\t\t\t: $this->_cparams->get('new_item_state_fe', $pubished_state = 1); // Use the configured setting for frontend items\n\n\t\t// Default -- Language\n\t\t// -- NOTE: There are language limitations per user / usergroup that may override the defaults ...\n\t\t$default_lang = $this->getDefaultItemLanguage($record);\n\n\t\t// ***\n\t\t// *** DB properties that do not use DB / getTable() defaults\n\t\t// ***\n\n\t\t$record->id = 0; // DB setting: no default value\n\t\t$record->version = 0; // DB setting: 1\n\t\t$record->created = $currentdate->toSql();\n\t\t$record->created_by = $default_created_by;\n\t\t$record->publish_up = $currentdate->toSql();\n\t\t$record->publish_down = FLEXI_J40GE ? NULL : $this->_db->getNullDate();\n\t\t$record->access = $default_accesslevel;\n\t\t$record->state = $default_state;\n\t\t$record->language = $default_lang;\n\n\n\t\t// ***\n\t\t// *** DB properties that use DB / getTable() defaults\n\t\t// ***\n\n\t\t//$record->catid = 0;\n\t\t//$record->title = ''; // required\n\t\t//$record->alias = '';\n\t\t//$record->introtext = null; // required\n\t\t//$record->fulltext = null; // required\n\t\t//$record->metadesc = null;\n\t\t//$record->metakey = null;\n\t\t//$record->hits = 0;\n\n\t\t//$record->images = null;\n\t\t//$record->urls = null;\n\t\t//$record->attribs = null;\n\t\t//$record->metadata = null;\n\n\t\t//$record->modified = FLEXI_J40GE ? NULL : $this->_db->getNullDate();\n\t\t//$record->modified_by = 0;\n\t\t//$record->created_by_alias = null;\n\n\n\t\t// ***\n\t\t// *** (a) Some items_ext DB properties , (b) Type id & main category id, (c) Categories and Tags\n\t\t// ***\n\n\t\t$record->search_index = null;\n\n\t\t$record->type_id = $this->_typeid;\n\t\t$record->catid = $this->_cid;\n\n\t\t$record->categories = array();\n\t\t$record->tags = array();\n\t}", "title": "" }, { "docid": "c6c2e035f570f8274448baa37d47f1ae", "score": "0.54894906", "text": "protected function setDefaults()\n {\n $this->properties['source'] = \"default\";\n $this->properties['category'] = \"default\";\n }", "title": "" }, { "docid": "85f20cf2b4a060a0d37de2fe7b077a48", "score": "0.54850507", "text": "public function setDefault($default) {\n\t\t$this->default = $default;\n\t}", "title": "" }, { "docid": "2c01c494bcbfdcdacb6c08eaefad0d50", "score": "0.5483862", "text": "protected function setDefaults()\r\n {\r\n $this->configuration = array(\r\n 'description' => $this->dql,\r\n 'uncheckedValue' => false,\r\n 'checkedValue' => true,\r\n 'orderEnabled' => true,\r\n 'uncheckedPattern' => '<i class=\"glyphicon glyphicon-remove\"></i>',\r\n 'checkedPattern' => '<i class=\"glyphicon glyphicon-ok\"></i>',\r\n );\r\n }", "title": "" }, { "docid": "a946d2f1bf7b7b2d66cdc3a042dc3eca", "score": "0.5480055", "text": "private function setDefaultValue() {\r\n\t\t$this->Value = $this->Options['default'];\r\n\t}", "title": "" }, { "docid": "664c653ac278278382903e91dc8057dd", "score": "0.5477273", "text": "public function setup(){\n\t\tif($this->hasOption('default')){\n\t\t\t$this->setValue($this->options()->default);\n\t\t}\n\t}", "title": "" }, { "docid": "a94ea9b84dbc606e017a676fe973dc86", "score": "0.54571646", "text": "public function stateType() {}", "title": "" }, { "docid": "1574a7dee917a1b3c2761614f8852ccb", "score": "0.54510266", "text": "public function SetDefaultRequired ($defaultRequired = TRUE);", "title": "" }, { "docid": "d2a977a00f2915255c901281f3334aad", "score": "0.54434663", "text": "public function applyDefaultValues()\r\n\t{\r\n\t\t$this->name = '';\r\n\t\t$this->description = '';\r\n\t\t$this->is_default = 0;\r\n\t\t$this->video_bitrate = 0;\r\n\t\t$this->audio_bitrate = 0;\r\n\t\t$this->audio_channels = 0;\r\n\t\t$this->audio_sample_rate = 0;\r\n\t\t$this->audio_resolution = 0;\r\n\t\t$this->width = 0;\r\n\t\t$this->height = 0;\r\n\t\t$this->frame_rate = 0;\r\n\t\t$this->gop_size = 0;\r\n\t\t$this->two_pass = false;\r\n\t\t$this->creation_mode = 1;\r\n\t}", "title": "" }, { "docid": "0615bef70824e30b32109313a7e71a03", "score": "0.5440897", "text": "protected function _construct()\n {\n $this->_init('dos/states');\n }", "title": "" }, { "docid": "21c3d70b04edd19e398e7d86ced3c082", "score": "0.54387856", "text": "protected function setMainDefault()\n {\n $model = Image::find()->where('model = :model and owner_id = :owner_id and ctg_id = :ctg_id and status = 1 and is_main <> 1', [':model' => $this->model, ':owner_id' => $this->owner_id, ':ctg_id' => $this->ctg_id])->orderBy('weight ASC')->one();\n $rslt = false;\n\n if ($model) {\n $model->is_main = Image::IS_MAIN;\n $rslt = $model->save(true, ['is_main']);\n }\n\n return $rslt;\n }", "title": "" }, { "docid": "7bce1db1130eed934930205ba445b6c0", "score": "0.5438425", "text": "function set_default_value($default_value) {\r\n\t\t$this->default_value = $default_value;\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "97112580495ed217aa0870a06812e4ff", "score": "0.54360193", "text": "public function setDefaults() {\n // segment translation\n $translation = \\Translations_SegmentTranslationDao::\n findBySegmentAndJob( $this->id_segment, $this->id_job );\n $this->translation_version = $translation->version_number ;\n\n $this->penalty_points = $this->getPenaltyPoints();\n $this->id_category = $this->validator->category->id ;\n }", "title": "" } ]
b1d3610879988438deef4ca86a83184e
Get Taxonomy Meta =============================================================================
[ { "docid": "6c9445ddf2bdb282fb4c05b8383b2978", "score": "0.71847093", "text": "function x_get_taxonomy_meta() {\n\n $object = get_queried_object();\n $id = $object->term_id;\n $meta = get_option( 'taxonomy_' . $id );\n\n return wp_parse_args( $meta, array(\n 'archive-title' => '',\n 'archive-subtitle' => '',\n 'archive-accent' => '#ffffff'\n ) );\n\n}", "title": "" } ]
[ { "docid": "4a4df0bd6f8f2c47d17afe169bfb33bc", "score": "0.769608", "text": "abstract public function get_taxonomy();", "title": "" }, { "docid": "59519c1abd1b8599e1a4407e06070ccc", "score": "0.75854385", "text": "function _et_get_taxonomy_meta() {\n\tglobal $et_taxonomy_meta;\n\n\tif ( !isset( $et_taxonomy_meta ) ) {\n\t\t$et_taxonomy_meta = maybe_unserialize( get_option( ET_TAXONOMY_META_OPTION_KEY, null ) );\n\t\tif ( null === $et_taxonomy_meta ) {\n\t\t\tupdate_option( ET_TAXONOMY_META_OPTION_KEY, array() );\n\t\t\t$et_taxonomy_meta = array();\n\t\t}\n\t}\n}", "title": "" }, { "docid": "2a28abdacc7f92de2d7fd8eb0b5abe01", "score": "0.7052899", "text": "public function getTaxonomy() {\n return $this->taxonomy;\n }", "title": "" }, { "docid": "ab873ef7e9a639a3ae2de71af04f5c2d", "score": "0.69693106", "text": "function md_add_taxonomy_meta() {\n\treturn array( 'download_category', 'product_cat' );\n}", "title": "" }, { "docid": "1b36799bc96c115daf63e514a0ac598b", "score": "0.69159144", "text": "public function getTaxonomies(): array\n {\n return $this->getSetting('taxonomy');\n }", "title": "" }, { "docid": "ce11522af5a1f1267a8245c7610d1d07", "score": "0.6857807", "text": "function cptui_get_taxonomy_data() {\n\treturn apply_filters( 'cptui_get_taxonomy_data', get_option( 'cptui_taxonomies', array() ), get_current_blog_id() );\n}", "title": "" }, { "docid": "a0ef7fb0d7575aabd7a6d0b76ccf619b", "score": "0.68042874", "text": "public function getMeta();", "title": "" }, { "docid": "2d192fa868ca86fc591b079c10afa53f", "score": "0.67720866", "text": "public static function taxonomies() {\n\t\treturn apply_filters( 'packaging_preview_taxonomies', array( 'category', 'post_tag' ) );\n\t}", "title": "" }, { "docid": "8a2a3b3e0004e8aa571add3a82eabea2", "score": "0.66356844", "text": "function getMeta();", "title": "" }, { "docid": "e068f95ee6a0f53a57a7578cfe2a7d27", "score": "0.66177213", "text": "abstract public function get_taxonomy_args();", "title": "" }, { "docid": "67a786363a9d87a1cc6270c62fbf639d", "score": "0.66094095", "text": "function taxmeta_init()\n{\n global $wp_version;\n\n\t// Load language file\n if (function_exists('load_plugin_textdomain')) {\n load_plugin_textdomain('asdb-taxmeta', false, dirname(plugin_basename(__FILE__)) . '/languages/');\n } else {\n $locale = get_locale();\n if (!empty($locale)) {\n load_textdomain('asdb-taxmeta', ASDB_TAXMETA_ROOT . 'languages' . '/asdb-taxmeta-' . $locale . '.mo');\n }\n }\n\nadd_action('created_term',\t'taxmeta_save_meta_tags');\nadd_action('edit_term',\t\t'taxmeta_save_meta_tags');\nadd_action('delete_term',\t'taxmeta_delete_meta_tags');\n\n\t$taxmeta_taxonomies = get_taxonomies('', 'names');\n\tif (is_array($taxmeta_taxonomies)) {\n \tforeach ($taxmeta_taxonomies as $taxmeta_taxonomy)\n \t{\n \tadd_action($taxmeta_taxonomy . '_add_form_fields', 'taxmeta_add_meta_textinput');\n \tadd_action($taxmeta_taxonomy . '_edit_form', 'taxmeta_add_meta_textinput');\n \t}\n\t}\n}", "title": "" }, { "docid": "6b939059d8158ca01cbbcf98dcaf57bc", "score": "0.658805", "text": "public function taxonomies()\n {\n return [\n 'category',\n 'post_tag'\n ];\n }", "title": "" }, { "docid": "97176a2ec1867a6c9a0cc710a8023062", "score": "0.6573697", "text": "function getTaxonomies()\n {\n $params = array(1, $this->_username, $this->_password);\n return $this->_sendRequest('wp.getTaxonomies', $params);\n }", "title": "" }, { "docid": "8f31d14275d8318b9559a5b71cc93742", "score": "0.65485543", "text": "function dmst_mc_immediate_get_postTaxAndTerms($post) {\n $result = array();\n $taxonomies = dmst_mc_immediate_get_posttype_taxonomies($post->post_type);\n foreach ($taxonomies as $taxonomy):\n $terms = wp_get_post_terms($post->ID, $taxonomy);\n foreach ($terms as $term):\n $result[$taxonomy . '-' . $term->term_id] = array(\n 'taxonomomy' => $taxonomy,\n 'term_id' => $term->term_id\n );\n endforeach;\n endforeach;\n return $result;\n}", "title": "" }, { "docid": "98edbdc640ea4ea7213d64c96574c89b", "score": "0.65425855", "text": "public function getTaxonomies()\n\t{\n\t\t$taxonomies = $this->client->getTaxonomies();\n\t\tforeach( $taxonomies as $tk => $t ) {\n\t\t\t$array[ $t['name'] ] = $t['label'];\n\t\t}\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "616d31aaee1be989bfeb39e52edc6c75", "score": "0.6540245", "text": "protected function getTaxonomy($content) {\n\n }", "title": "" }, { "docid": "4e590263a38dbbe516b3e27a1e4b9dfc", "score": "0.65215683", "text": "public function getTaxa()\n {\n return $this->taxa;\n }", "title": "" }, { "docid": "b19146f4d130ae3ec1b570327771d8e6", "score": "0.65062976", "text": "function arras_post_taxonomies($content) {\n\tglobal $post;\n\t$postmeta = '';\n\t\n\tif (arras_get_option('single_custom_taxonomies') == '') return $content;\n\t\n\t$arr = explode( ',', arras_get_option('single_custom_taxonomies') );\n\t$final = array();\n\t\n\tif ( !is_array($arr) ) return $content;\n\t\n\tforeach($arr as $term) {\n\t\t$term_list = get_the_term_list($post->ID, $term, '', ', ', '');\n\t\t$term_obj = get_taxonomy($term);\n\t\t\n\t\tif ( !is_wp_error($term_list) && !empty($term_list) ) {\n\t\t\t$postmeta .= '<div class=\"single-post-meta clearfix\">';\n\t\t\t$postmeta .= '<span class=\"single-post-meta-field single-post-meta-' . $term . '\">' . $term_obj->labels->name . ':</span>';\n\t\t\t$postmeta .= '<span class=\"single-post-meta-value single-post-meta-' . $term . '-value\">' . $term_list . '</span>';\n\t\t\t$postmeta .= '</div>';\n\t\t}\n\t}\n\t\n\treturn $content . $postmeta;\n}", "title": "" }, { "docid": "8e8c2f4e80740530545d89a596217ae0", "score": "0.64958113", "text": "public function get_associated_taxonomies() {\n\t\t$postmeta = get_post_meta( $this->get_id(), self::POSTMETA_ASSOCIATED_TAXONOMY, false );\n\t\treturn wpcf_ensarr( $postmeta );\n\t}", "title": "" }, { "docid": "be0bf591874fcc9f35f2c18d22ca8805", "score": "0.64804137", "text": "public function get_taxonomy_object(){\n\t\t\n\t\tif ( !isset($this->taxonomyObject) ){\n\t\t\t$this->taxonomyObject =& wp_get_taxonomy_object( $this->taxonomy );\n\t\t}\n\t\t\n\t\treturn $this->taxonomyObject;\n\t}", "title": "" }, { "docid": "f551b0c81159789879954a17793b2931", "score": "0.6457029", "text": "function bcg_get_taxonomies() {\n\n\t$taxonomy = ( bcg_get_option( 'allowed_taxonomies' ) ) ? bcg_get_option( 'allowed_taxonomies' ) : 'category';\n\treturn apply_filters( 'bcg_get_taxonomies', (array) $taxonomy );\n}", "title": "" }, { "docid": "6a0e43f76f5ea8705d452de0a63dd272", "score": "0.64547354", "text": "public function getTaxa() {\n return $this->taxa;\n }", "title": "" }, { "docid": "b1f217716ff446c07f32ac67811b441f", "score": "0.6430968", "text": "public function show_field_taxonomy($field, $meta) {\n global $post;\n \n if (!is_array($meta)) $meta = (array) $meta;\n $this->show_field_begin($field, $meta);\n $options = $field['options'];\n $terms = get_terms($options['taxonomy'], $options['args']);\n \n // checkbox_list\n if ('checkbox_list' == $options['type']) {\n foreach ($terms as $term) {\n echo \"<input type='checkbox' \".( isset($field['style'])? \"style='{$field['style']}' \" : '' ).\" class='at-tax-checkbox\".( isset($field['class'])? ' ' . $field['class'] : '' ).\"' name='{$field['id']}[]' value='$term->slug'\" . checked(in_array($term->slug, $meta), true, false) . \" /> $term->name<br/>\";\n }\n }\n // select\n else {\n echo \"<select \".( isset($field['style'])? \"style='{$field['style']}' \" : '' ).\" class='at-tax-select at-select\".( isset($field['class'])? ' ' . $field['class'] : '' ).\"' name='{$field['id']}\" . ($field['multiple'] ? \"[]' multiple='multiple' style='height:auto'\" : \"'\") . \">\";\n foreach ($terms as $term) {\n echo \"<option value='$term->term_id'\" . selected(in_array($term->term_id, $meta), true, false) . \">$term->name</option>\";\n }\n echo \"</select>\";\n }\n \n $this->show_field_end($field, $meta);\n }", "title": "" }, { "docid": "78b7a481b2e6dcbdfe414e684d82df06", "score": "0.64288986", "text": "function rlt_custom_taxonomy() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Тип', 'Taxonomy General Name', 'rlt' ),\n\t\t'singular_name' => _x( 'Тип', 'Taxonomy Singular Name', 'rlt' ),\n\t\t'menu_name' => __( 'Типы', 'rlt' ),\n\t\t'all_items' => __( 'Типы', 'rlt' ),\n\t\t'parent_item' => __( 'Parent Item', 'rlt' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'rlt' ),\n\t\t'new_item_name' => __( 'Имя нового типа', 'rlt' ),\n\t\t'add_new_item' => __( 'Добавить новый тип', 'rlt' ),\n\t\t'edit_item' => __( 'Редактировать тип', 'rlt' ),\n\t\t'update_item' => __( 'Обновить тип', 'rlt' ),\n\t\t'view_item' => __( 'Смотреть тип', 'rlt' ),\n\t\t'separate_items_with_commas' => __( 'Separate items with commas', 'rlt' ),\n\t\t'add_or_remove_items' => __( 'Add or remove items', 'rlt' ),\n\t\t'choose_from_most_used' => __( 'Choose from the most used', 'rlt' ),\n\t\t'popular_items' => __( 'Popular Items', 'rlt' ),\n\t\t'search_items' => __( 'Search Items', 'rlt' ),\n\t\t'not_found' => __( 'Not Found', 'rlt' ),\n\t\t'no_terms' => __( 'No items', 'rlt' ),\n\t\t'items_list' => __( 'Items list', 'rlt' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'rlt' ),\n\t);\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'hierarchical' => true,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_tagcloud' => true,\n\t);\n\tregister_taxonomy( 'realty_type', array( 'realty' ), $args );\n\n\t$labels = array(\n\t\t'name' => _x( 'Город', 'Taxonomy General Name', 'rlt' ),\n\t\t'singular_name' => _x( 'Город', 'Taxonomy Singular Name', 'rlt' ),\n\t\t'menu_name' => __( 'Города', 'rlt' ),\n\t\t'all_items' => __( 'Все города', 'rlt' ),\n\t\t'parent_item' => __( 'Parent Item', 'rlt' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'rlt' ),\n\t\t'new_item_name' => __( 'Имя города', 'rlt' ),\n\t\t'add_new_item' => __( 'Добавить новый город', 'rlt' ),\n\t\t'edit_item' => __( 'Редактировать город', 'rlt' ),\n\t\t'update_item' => __( 'Обновить город', 'rlt' ),\n\t\t'view_item' => __( 'Смотреть город', 'rlt' ),\n\t\t'separate_items_with_commas' => __( 'Separate items with commas', 'rlt' ),\n\t\t'add_or_remove_items' => __( 'Add or remove items', 'rlt' ),\n\t\t'choose_from_most_used' => __( 'Choose from the most used', 'rlt' ),\n\t\t'popular_items' => __( 'Popular Items', 'rlt' ),\n\t\t'search_items' => __( 'Search Items', 'rlt' ),\n\t\t'not_found' => __( 'Not Found', 'rlt' ),\n\t\t'no_terms' => __( 'No items', 'rlt' ),\n\t\t'items_list' => __( 'Items list', 'rlt' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'rlt' ),\n\t);\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'hierarchical' => true,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_tagcloud' => true,\n\t);\n\tregister_taxonomy( 'realty_place', array( 'realty' ), $args );\n\n}", "title": "" }, { "docid": "5a04412961fad1f9250813ffdff372e0", "score": "0.6415957", "text": "public function getTaxonomies(){\n $taxonomies = get_taxonomies(array(), 'objects');\n $res = array();\n foreach($taxonomies as $name => $taxonomy){\n if(in_array($this->getType(), $taxonomy->object_type)){\n $res[] = $name;\n }\n }\n\n return $res;\n }", "title": "" }, { "docid": "9e1c82bd10124e9f43434cf1e788d63c", "score": "0.64146054", "text": "public function load_meta()\n {\n if ( $this->term_id ) {\n foreach ( get_term_meta( $this->term_id ) as $key => $value ) {\n $value = is_array( $value ) ? $value[0] : $value;\n // Check for json string\n if ( $this->decode_json_meta\n && is_string( $value )\n && preg_match( '/(\\{|\\[|\\\")(?:[^{}]|(?R))*(\\}|\\]|\\\")/', $value )\n ) {\n $this->meta[$key] = json_decode( $value );\n if ( json_last_error() === JSON_ERROR_NONE )\n continue; // Break loop\n }\n $this->meta[$key] = maybe_unserialize( $value );\n }\n } else {\n $this->attributes['taxonomy'] = 'category';\n }\n }", "title": "" }, { "docid": "97f057fae940444017b0ae21ba4d0580", "score": "0.6401911", "text": "public function setup_taxonomies() {\n\n\t}", "title": "" }, { "docid": "f45a72f0f2881ad31c0a70cd9474ad6a", "score": "0.6392992", "text": "function getTaxonomy($taxonomy)\n {\n $params = array(1, $this->_username, $this->_password, $taxonomy);\n return $this->_sendRequest('wp.getTaxonomy', $params);\n }", "title": "" }, { "docid": "6d52fc002ae24c0567c3480a1d6f5dfb", "score": "0.6382051", "text": "protected function apbf_get_taxonomy_terms() {\n\t\t// the taxonomies to be exluded\n\t\t$exclude = array();\n\t\t$exclude[] = 'post_format';\n\n\t\t// get all the taxonomies\n\t\t$objects = get_taxonomies( array(), 'objects' );\n\t\t$taxonomies = array();\n\n\t\tforeach( $objects as $i => $object ) {\n\t\t\t// don't include if it's in the $exclude array\n\t\t\tif ( in_array( $i, $exclude ) ) continue;\n\n\t\t\t// don't include if it's a private built in type\n\t\t\tif ( $object->_builtin && !$object->public ) continue;\n\n\t\t\t// get taxonomy terms\n\t\t\t$terms = get_terms( array( 'taxonomy' => $i ) );\n\n\t\t\t// if there are terms for this taxonomy...\n\t\t\tif ( !empty( $terms ) ) {\n\t\t\t\t// add taxonomy\n\t\t\t\t$taxonomies[ $i ] = array(\n\t\t\t\t\t'name' => $object->label,\n\t\t\t\t\t'slug' => $i,\n\t\t\t\t\t'terms' => array()\n\t\t\t\t);\n\n\t\t\t\t// add taxonomy terms\n\t\t\t\tforeach( $terms as $term ) {\n\t\t\t\t\t$taxonomies[ $i ][ 'terms' ][] = array(\n\t\t\t\t\t\t'slug' => $term->slug,\n\t\t\t\t\t\t'name' => $term->name,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $taxonomies;\n\t}", "title": "" }, { "docid": "b00a3277fe546a51c09f5b745da7823b", "score": "0.6363438", "text": "function _et_update_taxonomy_meta() {\n\tglobal $et_taxonomy_meta;\n\tupdate_option( ET_TAXONOMY_META_OPTION_KEY, $et_taxonomy_meta );\n}", "title": "" }, { "docid": "632848f8a14b7ed0e68d2a98282c040e", "score": "0.6349192", "text": "function register_taxonomies() {\n }", "title": "" }, { "docid": "7ebd3ed06934796fbb5194f5c4ee5915", "score": "0.6347965", "text": "function register_taxonomies() {\n\n\tregister_extended_taxonomy( 'service', array('project', 'publication', 'team_member') );\n\tregister_extended_taxonomy( 'issue', array('project', 'publication', 'team_member') );\n\tregister_extended_taxonomy( 'location', array('project') );\n\tregister_extended_taxonomy( 'status', array('project'), array( 'meta_box' => 'radio' ), array(\n\t\t# Override the base names used for labels:\n\t\t'singular' => 'Status',\n\t\t'plural' => 'Status',\n\t\t'slug' => 'status',\n\t) );\n\tregister_extended_taxonomy( 'team_role', array('team_member'), array( 'meta_box' => 'radio' ), array(\n\t\t# Override the base names used for labels:\n\t\t'singular' => 'Role',\n\t\t'plural' => 'Roles',\n\t\t'slug' => 'roles'\n\t) );\n\n}", "title": "" }, { "docid": "9a3b0f7341686fe60f316d4671496e94", "score": "0.6332836", "text": "function tfuse_get_property_taxonomies($ID, $in_taxonomy = '')\n {\n if(empty($ID) || (!is_numeric($ID))) return false;\n if(!empty($in_taxonomy)) $in_taxonomy = TF_SEEK_HELPER::get_post_type() . '_' . $in_taxonomy;\n global $wpdb;\n\n $sql = \"SELECT $wpdb->terms.term_id\n , $wpdb->terms.name, $wpdb->terms.slug, $wpdb->term_taxonomy.taxonomy\n FROM\n $wpdb->term_relationships\n INNER JOIN $wpdb->term_taxonomy\n ON $wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id\n INNER JOIN $wpdb->terms\n ON $wpdb->terms.term_id = $wpdb->term_taxonomy.term_id\n WHERE\n $wpdb->term_relationships.object_id = '\" . $ID . \"'\n AND $wpdb->term_taxonomy.taxonomy = '\" . $in_taxonomy . \"'\";\n\n $result = $wpdb->get_results($sql, ARRAY_A );\n return $result;\n }", "title": "" }, { "docid": "9bc4741831665973be0ede70304589d7", "score": "0.6330512", "text": "public function add_taxonomy($tx)\n {\n $config = new Config();\n $labels = [];\n $args = [];\n $capabilities = [];\n $rewrite = [];\n $post_type = $tx['post_type'];\n $singular = $tx['singular'];\n $plural = $tx['plural'];\n $slug = $tx['slug'];\n $pt = $tx['post_type'];\n $translate = $config->language_name;\n\n $labels['name'] = isset($tx['labels']['name']) ? $tx['labels']['name'] : _x($plural, 'Taxonomy general name', $translate);\n $labels['singular_name'] = isset($tx['labels']['singular_name']) ? $tx['labels']['singular_name'] : _x($singular, 'Taxonomy singular name', $translate);\n $labels['search_items'] = isset($tx['labels']['search_items']) ? $tx['labels']['search_items'] : __('Search ' . $singular, $translate);\n $labels['all_items'] = isset($tx['labels']['all_items']) ? $tx['labels']['all_items'] : __('All ' . $singular, $translate);\n $labels['parent_item'] = isset($tx['labels']['parent_item']) ? $tx['labels']['parent_item'] : __('Parent ' . $singular, $translate);\n $labels['parent_item_colon'] = isset($tx['labels']['parent_item_colon']) ? $tx['labels']['parent_item_colon'] : __('Parebt ' . $singular, $translate);\n $labels['edit_item'] = isset($tx['labels']['edit_item']) ? $tx['labels']['edit_item'] : __('Edit ' . $singular, $translate);\n $labels['view_item'] = isset($tx['labels']['view_item']) ? $tx['labels']['view_item'] : __('View ' . $singular, $translate);\n $labels['update_item'] = isset($tx['labels']['update_item']) ? $tx['labels']['update_item'] : __('Update ' . $singular, $translate);\n $labels['add_new_item'] = isset($tx['labels']['add_new_item']) ? $tx['labels']['add_new_item'] : __('Add new ' . $singular, $translate);\n $labels['new_item_name'] = isset($tx['labels']['new_item_name']) ? $tx['labels']['new_item_name'] : __('New ' . $singular, $translate);\n $labels['menu_name'] = isset($tx['labels']['menu_name']) ? $tx['labels']['menu_name'] : _x($plural, $translate);\n $labels['popular_items'] = isset($tx['labels']['popular_items']) ? $tx['labels']['popular_items'] : _x('Popular ' . $plural, $translate);\n\n $args['hierarchical'] = isset($tx['args']['hierarchical']) ? $tx['args']['hierarchical'] : true;\n $args['labels'] = $labels;\n $args['show_ui'] = isset($tx['args']['show_ui']) ? $tx['args']['show_ui'] : true;\n $args['public'] = isset($tx['args']['public']) ? $tx['args']['public'] : true;\n $args['publicly_queryable'] = isset($tx['args']['publicly_queryable']) ? $tx['args']['publicly_queryable'] : true;\n $args['show_admin_column'] = isset($tx['args']['show_admin_column']) ? $tx['args']['show_admin_column'] : true;\n $args['show_in_menu'] = isset($tx['args']['show_in_menu']) ? $tx['args']['show_in_menu'] : true;\n $args['show_in_rest'] = isset($tx['args']['show_in_rest']) ? $tx['args']['show_in_rest'] : ($tx['gutemberg'] == false ? false : true);\n $args['query_var'] = $slug;\n $args['rest_base'] = isset($tx['args']['rest_base']) ? $tx['args']['rest_base'] : $plural;\n $args['rest_controller_class'] = isset($tx['args']['rest_controller_class']) ? $tx['args']['rest_controller_class'] : 'WP_REST_Terms_Controller';\n $args['show_tagcloud'] = isset($tx['args']['show_tagcloud']) ? $tx['args']['show_tagcloud'] : $args['show_ui'];\n $args['show_in_quick_edit'] = isset($tx['args']['show_in_quick_edit']) ? $tx['args']['show_in_quick_edit'] : $args['show_ui'];\n $args['meta_box_cb'] = isset($tx['args']['meta_box_cb']) ? $tx['args']['meta_box_cb'] : null;\n $args['show_admin_column'] = isset($tx['args']['show_admin_column']) ? $tx['args']['show_admin_column'] : false;\n $args['show_in_nav_menus'] = isset($tx['args']['show_in_nav_menus']) ? $tx['args']['show_in_nav_menus'] : true;\n $args['query_var'] = isset($tx['args']['query_var']) ? $tx['args']['query_var'] : true;\n $args['rewrite'] = isset($tx['args']['rewrite']) ? $tx['args']['rewrite'] : (isset($tx['rewrite']) ? $tx['rewrite'] : ['slug' => $slug ]);\n $args['description'] = isset($tx['args']['description']) ? $tx['args']['description'] : '';\n $args['query_var'] = $slug;\n \n\n $rewrite['slug'] = $slug;\n $rewrite['with_front'] = isset($tx['args']['rewrite']['with_front']) ? $tx['args']['rewrite']['with_front'] : (isset($tx['rewrite']['with_front']) ? $tx['rewrite']['with_front'] : true);\n $rewrite['hierarchical'] = isset($tx['args']['rewrite']['hierarchical']) ? $tx['args']['rewrite']['hierarchical'] : (isset($tx['rewrite']['hierarchical']) ? $tx['rewrite']['hierarchical'] : false);\n $rewrite['ep_mask'] = isset($tx['args']['rewrite']['ep_mask']) ? $tx['args']['rewrite']['ep_mask'] : (isset($tx['rewrite']['ep_mask']) ? $tx['rewrite']['ep_mask'] : EP_NONE);\n\n $args['rewrite'] = $rewrite;\n\n $capabilities['manage_terms'] = isset($tx['args']['capabilities']['manage_terms']) ? $tx['args']['capabilities']['manage_terms'] : (isset($tx['capabilities']['manage_terms']) ? $tx['capabilities']['manage_terms'] : 'manage_' . $slug);\n $capabilities['edit_terms'] = isset($tx['args']['capabilities']['edit_terms']) ? $tx['args']['capabilities']['edit_terms'] : (isset($tx['capabilities']['edit_terms']) ? $tx['capabilities']['edit_terms'] : 'manage_' . $slug);\n $capabilities['delete_terms'] = isset($tx['args']['capabilities']['delete_terms']) ? $tx['args']['capabilities']['delete_terms'] : (isset($tx['capabilities']['delete_terms']) ? $tx['capabilities']['delete_terms'] : 'manage_' . $slug);\n $capabilities['assign_terms'] = isset($tx['args']['capabilities']['assign_terms']) ? $tx['args']['capabilities']['assign_terms'] : (isset($tx['capabilities']['assign_terms']) ? $tx['capabilities']['assign_terms'] : 'edit_' . $slug);\n\n register_taxonomy($plural, [$post_type], $args);\n }", "title": "" }, { "docid": "dc9a2e9067fab3dc0fb15d55da50b162", "score": "0.63190454", "text": "function pn_get_first_taxonomie($id, $tax){\n $terms = wp_get_object_terms($id, $tax) ;\n $theme = array();\n if(!empty($terms) && !is_wp_error($terms)){\n foreach($terms as $term){\n $theme[\"name\"] = $term->name;\n $theme[\"ID\"] = $term->term_id; \n }\n } \n \n return (object) $theme;\n}", "title": "" }, { "docid": "9243d0c6379d555db7f79f38a93a66da", "score": "0.63089395", "text": "function boom_taxonomies() {\n\n\t$labels = [\n\t\t\"name\" => __( \"Radio Shows\", \"custom-post-type-ui\" ),\n\t\t\"singular_name\" => __( \"Radio Show\", \"custom-post-type-ui\" ),\n\t];\n\n\n\t$args = [\n\t\t\"label\" => __( \"Radio Shows\", \"custom-post-type-ui\" ),\n\t\t\"labels\" => $labels,\n\t\t\"public\" => true,\n\t\t\"publicly_queryable\" => true,\n\t\t\"hierarchical\" => true,\n\t\t\"show_ui\" => true,\n\t\t\"show_in_menu\" => false,\n\t\t\"show_in_nav_menus\" => false,\n\t\t\"query_var\" => true,\n\t\t\"rewrite\" => [ 'slug' => 'show', 'with_front' => true, 'hierarchical' => true, ],\n\t\t\"show_admin_column\" => false,\n\t\t\"show_in_rest\" => true,\n\t\t\"rest_base\" => \"show\",\n\t\t\"rest_controller_class\" => \"WP_REST_Terms_Controller\",\n\t\t\"show_in_quick_edit\" => false,\n\t\t\"show_in_graphql\" => false,\n\t];\n\tregister_taxonomy( \"show\", [ \"programs\" ], $args );\n\n\t/**\n\t * Taxonomy: Categories - Silvena Lam\n\t */\n\n\t$labels = [\n\t\t\"name\" => __( \"Categories\", \"custom-post-type-ui\" ),\n\t\t\"singular_name\" => __( \"Category\", \"custom-post-type-ui\" ),\n\t];\n\n\n\t$args = [\n\t\t\"label\" => __( \"Categories\", \"custom-post-type-ui\" ),\n\t\t\"labels\" => $labels,\n\t\t\"public\" => true,\n\t\t\"publicly_queryable\" => true,\n\t\t\"hierarchical\" => true,\n\t\t\"show_ui\" => true,\n\t\t\"show_in_menu\" => false,\n\t\t\"show_in_nav_menus\" => true,\n\t\t\"query_var\" => true,\n\t\t\"rewrite\" => [ 'slug' => 'trends_c', 'with_front' => true, 'hierarchical' => true, ],\n\t\t\"show_admin_column\" => false,\n\t\t\"show_in_rest\" => true,\n\t\t\"rest_base\" => \"trends_c\",\n\t\t\"rest_controller_class\" => \"WP_REST_Terms_Controller\",\n\t\t\"show_in_quick_edit\" => false,\n\t\t\"show_in_graphql\" => false,\n\t];\n\tregister_taxonomy( \"trends_c\", [ \"trends\" ], $args );\n}", "title": "" }, { "docid": "b2796c2cdef8c5cbc0a1c095c94b51d9", "score": "0.6303684", "text": "public function getTaxonomy()\n {\n if (!empty($this->taxonomy)) {\n return $this->taxonomy;\n }\n\n return Str::snake((new \\ReflectionClass(static::class))->getShortName());\n }", "title": "" }, { "docid": "743fdabdf075a02077852fb09360f6d7", "score": "0.6294764", "text": "public function taxonomy()\n {\n $response = json_decode($this->walmart->getTaxonomy()->getBody());\n return view('walmart.taxonomy', compact('response'));\n }", "title": "" }, { "docid": "ed36dc00f872946de3db59d487389ee5", "score": "0.6282766", "text": "public function get() {\n\t\t$labels = $this->get_taxonomy_labels();\n\t\t$fields = [\n\t\t\t'noindex' => $this->get_field_config(\n\t\t\t\t/* translators: %s = taxonomy name. */\n\t\t\t\tesc_html( sprintf( __( 'Allow search engines to show this %s in search results?', 'wordpress-seo' ), $labels->singular_name ) ),\n\t\t\t\t'',\n\t\t\t\t'select',\n\t\t\t\t$this->get_noindex_options()\n\t\t\t),\n\t\t\t'bctitle' => $this->get_field_config(\n\t\t\t\t__( 'Breadcrumbs Title', 'wordpress-seo' ),\n\t\t\t\tesc_html__( 'The Breadcrumbs Title is used in the breadcrumbs where this taxonomy appears.', 'wordpress-seo' ),\n\t\t\t\t'text',\n\t\t\t\t'',\n\t\t\t\t( WPSEO_Options::get( 'breadcrumbs-enable' ) !== true )\n\t\t\t),\n\t\t\t'canonical' => $this->get_field_config(\n\t\t\t\t__( 'Canonical URL', 'wordpress-seo' ),\n\t\t\t\tesc_html__( 'The canonical link is shown on the archive page for this term.', 'wordpress-seo' ),\n\t\t\t\t'url'\n\t\t\t),\n\t\t];\n\n\t\treturn $this->filter_hidden_fields( $fields );\n\t}", "title": "" }, { "docid": "7dda34d925af013efae2cff022fdb824", "score": "0.6278113", "text": "abstract public function registerTaxonomies();", "title": "" }, { "docid": "60d7159832d1bde3c3f861e4457bd463", "score": "0.62765616", "text": "function biagiotti_mikado_add_taxonomy_fields( $attributes ) {\n\t\t$scope = array();\n\t\t$name = '';\n\t\t\n\t\textract( $attributes );\n\t\t\n\t\tif ( ! empty( $scope ) ) {\n\t\t\t$tax_obj = new BiagiottiMikadoClassTaxonomyOption( $scope );\n\t\t\tbiagiotti_mikado_framework()->mkdTaxonomyOptions->addTaxonomyOptions( $name, $tax_obj );\n\t\t\t\n\t\t\treturn $tax_obj;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d7e225c8c45f12b763ec865e1f1e84f1", "score": "0.6255469", "text": "public function getMeta(): array {\n return $this->meta;\n }", "title": "" }, { "docid": "0ee5f0165d8e136335aa9dda1b721f28", "score": "0.62519765", "text": "function get_term_meta($term_id, $key = '', $single = false) {\r\n\t return get_metadata('term', $term_id, $key, $single);\r\n\t}", "title": "" }, { "docid": "d5dc0ccdd3e7ec75e39e5ebd383bd29b", "score": "0.6246073", "text": "function register_taxonomies() {\n\t}", "title": "" }, { "docid": "d5dc0ccdd3e7ec75e39e5ebd383bd29b", "score": "0.6246073", "text": "function register_taxonomies() {\n\t}", "title": "" }, { "docid": "d5dc0ccdd3e7ec75e39e5ebd383bd29b", "score": "0.6246073", "text": "function register_taxonomies() {\n\t}", "title": "" }, { "docid": "e5f6647b1852c9767dfa5fc5f6242aa8", "score": "0.62453777", "text": "public function get_taxonomy() {\n\t\treturn 'post_tag';\n\t}", "title": "" }, { "docid": "1ae7f1c7e67e4bab56cd65b28b0ea163", "score": "0.62415916", "text": "static function register_meta() {\n\t\t/**\n\t\t * This post meta field will hold a JSON string of an object,\n\t\t * where keys will be taxonomy names and values will be id of the primary term for that taxonomy,\n\t\t * e.g.: {\"category\":9, \"products_tax\":42}\n\t\t *\n\t\t * Please keep in mind, that the CPTs that use this field\n\t\t * must have `show_in_rest` set to `true`,\n\t\t * and their `supports` array must include `'custom-fields'`.\n\t\t *\n\t\t * Note also, that to have nice permalinks for custom post types,\n\t\t * you can use %category% and custom %taxonomy% placeholders when registering a CPT:\n\t\t * 'rewrite' => array(\n\t\t * 'slug' => '/%category%/%demo_taxonomy%',\n\t\t * 'with_front' => true\n\t\t * )\n\t\t */\n\t\tregister_meta( 'post', self::META_FIELD_NAME, array(\n\t\t\t/**\n\t\t\t * Without `show_in_rest`, Gutenberg would not be able to access this postmeta field!\n\t\t\t */\n\t\t\t'show_in_rest' => true,\n\t\t\t'type' => 'string',\n\t\t\t/**\n\t\t\t * As of WordPress 4.7, you can use `object_subtype` to limit the use of this field to specific post type.\n\t * 'object_subtype' => 'your_custom_post_type_name',\n\t\t\t */\n\t\t\t'single' => true,\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t/**\n\t\t\t * This is necessary when meta key starts with an underscore and is considered \"protected\":\n\t\t\t */\n\t\t\t'auth_callback' => [ __CLASS__, 'current_user_can' ]\n\t\t) );\n\t}", "title": "" }, { "docid": "2392b9fb0a06a7fa011cf6ba56a0acf6", "score": "0.6238883", "text": "public function get_taxonomies() {\r\n\t\t$taxonomies = get_taxonomies( array( 'show_ui' => true ) );\r\n\t\tif ( isset( $taxonomies['post_format'] ) ) {\r\n\t\t\tunset( $taxonomies['post_format'] );\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Filter the post types for which Admin Columns is active\r\n\t\t *\r\n\t\t * @since 2.0\r\n\t\t *\r\n\t\t * @param array $post_types List of active post type names\r\n\t\t */\r\n\t\treturn apply_filters( 'cac/taxonomies', $taxonomies );\r\n\t}", "title": "" }, { "docid": "7d54ba0b03a344665f4ad79a0e74954b", "score": "0.6219095", "text": "function _content_taxonomy_get_all_terms() {\n static $options = array();\n if (!count($options)) {\n\t \n foreach (taxonomy_get_vocabularies() as $vocabulary) {\n \tif ($vocabulary->name==\"Regions\") {\n\t foreach (taxonomy_get_tree($vocabulary->vid) as $term) {\n\t $options[$vocabulary->name][$term->tid] = str_repeat('- ', $term->depth) . $term->name;\n\t }\n\t return $options;\n \t}\n } \n }\n return;\n}", "title": "" }, { "docid": "10e4388c126206367fb5c759145a1402", "score": "0.62035936", "text": "public function getMeta()\n {\n return $this->meta;\n }", "title": "" }, { "docid": "10e4388c126206367fb5c759145a1402", "score": "0.62035936", "text": "public function getMeta()\n {\n return $this->meta;\n }", "title": "" }, { "docid": "10e4388c126206367fb5c759145a1402", "score": "0.62035936", "text": "public function getMeta()\n {\n return $this->meta;\n }", "title": "" }, { "docid": "10e4388c126206367fb5c759145a1402", "score": "0.62035936", "text": "public function getMeta()\n {\n return $this->meta;\n }", "title": "" }, { "docid": "4a2113167452558243ef9edb11ba2e88", "score": "0.6202817", "text": "public function getProperties() {\n return $this->request(\n 'GET',\n \"/application/buyer-taxonomy/nodes/{$this->id}/properties\",\n \"BuyerTaxonomyProperty\"\n );\n }", "title": "" }, { "docid": "a9614cf9c520d51d53cf3c381b274782", "score": "0.6197216", "text": "function GetPostTaxAndTerms($post_id) {\n $taxonomies = get_object_taxonomies( get_post_type($post_id), 'objects' );\n $arr_post_tax = array();\n foreach ( $taxonomies as $slug => $v){\n // get the terms related to post\n $terms = get_the_terms( $post_id, $slug );\n if (!empty($terms)) {\n $arrTerms = array(); \n foreach($terms as $term) {\n $arrTerms[$term->slug] = $term;\n }\n $arr_post_tax[$slug] = $arrTerms;\n }\n }\n\n return $arr_post_tax;\n }", "title": "" }, { "docid": "4a78bdce9b0ddedd7409c0441ca97eed", "score": "0.6195267", "text": "function add_custom_taxonomies() {\n}", "title": "" }, { "docid": "3150f4a824e7bb7a6a1e114b0e913f19", "score": "0.61580014", "text": "public function meta()\n {\n return $this->meta;\n }", "title": "" }, { "docid": "3150f4a824e7bb7a6a1e114b0e913f19", "score": "0.61580014", "text": "public function meta()\n {\n return $this->meta;\n }", "title": "" }, { "docid": "a9e4e75f41b8242b9c54e8283e092dfb", "score": "0.6155677", "text": "public function get_name() {\n\t\treturn 'post-custom-tax';\n\t}", "title": "" }, { "docid": "ce190f1c21cdfba69d0dd14d5a94bb81", "score": "0.6149108", "text": "function itl_get_taxonomies_map() {\n\t$map = array();\n\t$taxonomies = get_taxonomies();\n\tforeach ($taxonomies as $taxonomy) {\n\t\t$map [$taxonomy] = $taxonomy;\n\t}\n\treturn $map;\n}", "title": "" }, { "docid": "1aec96296c66bf54c58efa58a1f194f4", "score": "0.6144325", "text": "public function get_title() {\n\t\treturn __( 'Post custom taxonomy', 'elementor-pro' );\n\t}", "title": "" }, { "docid": "ee37f3b9c5132cff89c786995b44b104", "score": "0.6139231", "text": "private function getTaxonomyFieldConfigs()\n {\n if ($this->type() !== 'default') {\n return [];\n }\n\n // If the configuration has been specifically set to false, there should be none.\n if (! $this->taxonomies()) {\n return [];\n }\n\n return collect(Taxonomy::handles())->map(function ($handle) {\n return [\n 'type' => 'taxonomy',\n 'name' => $handle,\n ];\n })->keyBy('name')->all();\n }", "title": "" }, { "docid": "383b6eeba2bc91f585222f9701fe33f3", "score": "0.6134788", "text": "function mai_get_the_posts_meta( $post = '' ) {\n\n\tif ( ! empty( $post ) ) {\n\t\t$post = get_post( $post );\n\t} else {\n\t\tglobal $post;\n\t}\n\n\t$post_meta = $shortcodes = '';\n\n\t$taxos = get_post_taxonomies($post);\n\tif ( $taxos ) {\n\n\t\t// Skip if Post Formats and Yoast prominent keyworks\n\t\t$taxos = array_diff( $taxos, array( 'post_format', 'yst_prominent_words' ) );\n\n\t\t$taxos = apply_filters( 'mai_post_meta_taxos', $taxos );\n\n\t\tforeach ( $taxos as $tax ) {\n\t\t\t$taxonomy = get_taxonomy($tax);\n\t\t\t$shortcodes .= '[post_terms taxonomy=\"' . $tax . '\" before=\"' . $taxonomy->labels->singular_name . ': \"]';\n\t\t}\n\t\t$post_meta = sprintf( '<p class=\"entry-meta\">%s</p>', do_shortcode( $shortcodes ) );\n\t}\n\treturn $post_meta;\n}", "title": "" }, { "docid": "1bced383ec2919aef4521d7e18283946", "score": "0.6134543", "text": "public function getMeta() {\n\t\treturn $this->meta;\n\t}", "title": "" }, { "docid": "16b7fc5e6b62b3441a5332367b47ecae", "score": "0.61325085", "text": "private function get_taxonomy_labels() {\n\t\t$taxonomy = get_taxonomy( $this->term->taxonomy );\n\n\t\treturn $taxonomy->labels;\n\t}", "title": "" }, { "docid": "6f91ff525b263e8053775cadf816ea20", "score": "0.6132445", "text": "function create_agent_taxonomies() {\n\t// Add new taxonomy, make it hierarchical (like categories)\n\t$labels = array(\n\t\t'name' => _x( 'Details', 'taxonomy general name' ),\n\t\t'singular_name' => _x( 'Detail', 'taxonomy singular name' ),\n\t\t'search_items' => __( 'Search Details' ),\n\t\t'all_items' => __( 'All Details' ),\n\t\t'parent_item' => __( 'Parent Detail' ),\n\t\t'parent_item_colon' => __( 'Parent Detail:' ),\n\t\t'edit_item' => __( 'Edit Detail' ),\n\t\t'update_item' => __( 'Update Detail' ),\n\t\t'add_new_item' => __( 'Add New Detail' ),\n\t\t'new_item_name' => __( 'New Detail Name' ),\n\t\t'menu_name' => __( 'Details' ),\n\t);\n\n\t$args = array(\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => 'details' ),\n\t);\n\n\t//register_taxonomy( 'details', array( 'builder' ), $args );\n}", "title": "" }, { "docid": "b09e6e0a67379a23d5aa12a80a886c9a", "score": "0.613107", "text": "function servicetype_taxonomy() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Service Types', 'Taxonomy General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'Service Type', 'Taxonomy Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'Service Types', 'text_domain' ),\n\t\t'all_items' => __( 'All Service Types', 'text_domain' ),\n\t\t'parent_item' => __( 'Parent Service Type', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n\t\t'new_item_name' => __( 'New Service Type Name', 'text_domain' ),\n\t\t'add_new_item' => __( 'Add New Service Type', 'text_domain' ),\n\t\t'edit_item' => __( 'Edit Service Type', 'text_domain' ),\n\t\t'update_item' => __( 'Update Service Type', 'text_domain' ),\n\t\t'view_item' => __( 'View Service Type', 'text_domain' ),\n\t\t'separate_items_with_commas' => __( 'Separate Service Types with commas', 'text_domain' ),\n\t\t'add_or_remove_items' => __( 'Add or remove Service Types', 'text_domain' ),\n\t\t'choose_from_most_used' => __( 'Choose from the most used', 'text_domain' ),\n\t\t'popular_items' => __( 'Popular Service Types', 'text_domain' ),\n\t\t'search_items' => __( 'Search Service Types', 'text_domain' ),\n\t\t'not_found' => __( 'Not Found', 'text_domain' ),\n\t\t'no_terms' => __( 'No Service Types', 'text_domain' ),\n\t\t'items_list' => __( 'Service Types list', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'Service Types list navigation', 'text_domain' ),\n\t);\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'hierarchical' => true,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_tagcloud' => true,\n\t);\n\tregister_taxonomy( 'servicetype', array( 'properties' ), $args );\n\n}", "title": "" }, { "docid": "12c13574b6923cb6234693de699193c9", "score": "0.6126502", "text": "private function initialize_tax() {\n $args = [];\n foreach( $this->terms as $key => $value ) {\n if( $key == 'hierarchical' ) {\n foreach( $value as $p_key => $p_value ) {\n $args['slug'] = $p_key;\n $args['term'] = $p_value['name'];\n $args['description'] = $p_value['description'];\n $args['taxonomy'] = $p_value['taxonomy'];\n $args['child'] = false;\n $this->insert_term($args);\n foreach( $p_value['children'] as $c_key => $c_value) {\n $args['slug'] = $c_key;\n $args['term'] = $c_value['name'];\n $args['description'] = $c_value['description'];\n $args['child'] = true;\n $args['parent'] = $p_key;\n $this->insert_term($args);\n } \n } \n } else {\n foreach( $value as $s_key => $s_value ) {\n $args['slug'] = $s_key;\n $args['term'] = $s_value['name'];\n $args['description'] = $s_value['description'];\n $args['taxonomy'] = $s_value['taxonomy'];\n $args['child'] = false;\n $this->insert_term($args);\n } \n }\n }\n }", "title": "" }, { "docid": "340d30e46a61be3f249768ca8ba52b1f", "score": "0.6122445", "text": "function ecoiefy_taxonomies() {\n\t$labels = array(\n\t\t'name' => _x( 'Photo Catgory', 'taxonomy general name', 'ecoiefy-companion' ),\n\t\t'singular_name' => _x( 'Photo Catgory', 'taxonomy singular name', 'ecoiefy-companion' ),\n\t\t'search_items' => __( 'Search Photo', 'ecoiefy-companion' ),\n\t\t'all_items' => __( 'All Photos', 'ecoiefy-companion' ),\n\t\t'parent_item' => __( 'Parent Photo', 'ecoiefy-companion' ),\n\t\t'parent_item_colon' => __( 'Parent Photo:', 'ecoiefy-companion' ),\n\t\t'edit_item' => __( 'Edit Photo', 'ecoiefy-companion' ),\n\t\t'update_item' => __( 'Update Photo', 'ecoiefy-companion' ),\n\t\t'add_new_item' => __( 'Add New Photo', 'ecoiefy-companion' ),\n\t\t'new_item_name' => __( 'New Photo Name', 'ecoiefy-companion' ),\n\t\t'menu_name' => __( 'Photo Catgorys', 'ecoiefy-companion' ),\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t);\n\n\tregister_taxonomy( 'egs_tax', array( 'egs' ), $args );\n\t\n}", "title": "" }, { "docid": "9d2792b29ebca4512a54e70cb6b11716", "score": "0.6114836", "text": "public function pmdt_get_metatags() {\r\n\t\t//Distinguishing if we are working on a post --- chapter level or on the main site level\r\n\t\t//The type_level variable is the string we used to create the metabox\r\n\r\n\t\t$is_site; // This bool var is used to identify if the level is site level or any other post level\r\n\t\tif ( $this->type_level == 'metadata' || $this->type_level == 'site-meta' ) { //loading the appropriate metadata depending on the type level\r\n\t\t\t$metadata = gen_func::get_metadata();\r\n\t\t\t$is_site = true;\r\n\t\t} else {\r\n\t\t\t$is_site = false;\r\n\t\t\t$metadata = get_post_meta( get_the_ID() );\r\n\t\t}\r\n\r\n\t\t// array of the items needed to become microtags\r\n\t\t$Event_data = array(\r\n\r\n\t\t\t'about' => 'pb_about',\r\n\t\t\t'actor' => 'pb_actor',\r\n\t\t\t'aggregateRating' => 'pb_aggregateRating',\r\n\t\t\t'attendee' => 'pb_attendee',\r\n\t\t\t'audience' => 'pb_audience',\r\n\t\t\t'composer' => 'pb_composer',\r\n\t\t\t'contributor' => 'pb_contributor',\r\n\t\t\t'director' => 'pb_director',\r\n\t\t\t'doorTime' => 'pb_doorTime',\r\n\t\t\t'duration' => 'pb_duration',\r\n\t\t\t'endDate' => 'pb_endDate',\r\n\t\t\t'eventStatus' => 'pb_eventStatus',\r\n\t\t\t'funder' => 'pb_funder',\r\n\t\t\t'inLanguage' => 'pb_inLanguage',\r\n\t\t\t'isAccessibleForFree' => 'pb_isAccessibleForFree',\r\n\t\t\t'maximumAttendeeCapacity' => 'pb_maximumAttendeeCapacity',\r\n\t\t\t'offers' => 'pb_offers',\r\n\t\t\t'organizer' => 'pb_organizer',\r\n\t\t\t'performer' => 'pb_performer',\r\n\t\t\t'previousStartDate' => 'pb_previousStartDate',\r\n\t\t\t'recordedIn' => 'pb_recordedIn',\r\n\t\t\t'remainingAttendeeCapacity' => 'pb_remainingAttendeeCapacity',\r\n\t\t\t'review' => 'pb_review',\r\n\t\t\t'sponsor' => 'pb_sponsor',\r\n\t\t\t'startDate' => 'pb_startDate',\r\n\t\t\t'subEvent' => 'pb_subEvent',\r\n\t\t\t'superEvent\t' => 'pb_superEvent\t',\r\n\t\t\t'translator' => 'pb_translator',\r\n\t\t\t'typicalAgeRange' => 'pb_typicalAgeRange',\r\n\t\t\t'workFeatured' => 'pb_workFeatured',\r\n\t\t\t'workPerformed' => 'pb_workPerformed'\r\n\t\t);\r\n\r\n\t\t$html = \"<!-- Microtags --> \\n\";\r\n\r\n\t\t$html .= '<div itemscope itemtype=\"http://schema.org/Event\">';\r\n\r\n\t\tforeach ( $Event_data as $itemprop => $content ) {\r\n\t\t\tif ( isset( $metadata[ $content . '_' . $this->type_level ] ) ) {\r\n\r\n\t\t\t\tif ( !$is_site ) { //we are using the get_first function to get the value from the returned array\r\n\t\t\t\t\t$value = $this->pmdt_get_first( $metadata[ $content . '_' . $this->type_level ] );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif($this->type_level == 'site-meta'){\r\n\t\t\t\t\t\t$value = $this->pmdt_get_first($metadata[ $content . '_' . $this->type_level ]);\r\n\t\t\t\t\t}else{//We always use the get_first function except if our level is metadata coming from pressbooks\r\n\t\t\t\t\t\t$value = $metadata[ $content . '_' . $this->type_level ];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$html .= \"<meta itemprop = '\" . $itemprop . \"' content = '\" . $value . \"'>\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$html .= '</div>';\r\n\t\treturn $html;\r\n\t}", "title": "" }, { "docid": "c18453c8ca002bf611058e0449a22869", "score": "0.610573", "text": "public function register_taxonomies() {\n\n\t}", "title": "" }, { "docid": "c18453c8ca002bf611058e0449a22869", "score": "0.610573", "text": "public function register_taxonomies() {\n\n\t}", "title": "" }, { "docid": "e2d3c756be979cb1e7e75550a51228dd", "score": "0.61048776", "text": "public function getMeta() {\n return $this->meta;\n }", "title": "" }, { "docid": "869bd2167f040c98468b25c3a857f57c", "score": "0.6103061", "text": "public function register_taxonomies() {\n\t}", "title": "" }, { "docid": "76e4d210fe4c233336240e1cc5bec1a3", "score": "0.6088384", "text": "public function meta(): array;", "title": "" }, { "docid": "4c6df6f1dc9a9f93922b97160e28916c", "score": "0.608759", "text": "function service_type_master_taxonomy() {\n$args = array (\n'labels'=> array (\n'name' => 'by masters', // label shown in admin menu\n'singular_name' => 'by master',\n),\n'public' => true, // visible both in the admin panel and front end\n'hierarchical' => true, // category-kind taxonomy\n'show_in_rest' => true, // for API endpoint\n);\n\nregister_taxonomy('by master', array('service'), $args);\n}", "title": "" }, { "docid": "51b4a70a0612746240e4ca5aff877c0d", "score": "0.60840607", "text": "public function taxonomies(): \\Illuminate\\Database\\Eloquent\\Relations\\MorphToMany\n {\n return $this->morphToMany(\n BlogTaxonomy::class,\n 'taxonomyable',\n 'taxonomyables',\n 'taxonomyable_id',\n 'taxonomy_id'\n );\n }", "title": "" }, { "docid": "2430914dd9d0994e5a82d1c773c76013", "score": "0.60632324", "text": "function aisee_populate_taxonomy( $request = array() ) {\n\t\t// wp_send_json_success( $this->batch_generate_tax() );\n\t\t// print_r( get_post_types( array( 'public' => true ) ) ); return;\n\t\t// wp_send_json_success( get_taxonomies() );\n\t\tif ( wp_doing_ajax() ) {\n\t\t\tcheck_ajax_referer( 'aisee_populate_taxonomy', 'aisee_generate_tags_nonce' );\n\t\t\t$request = $_REQUEST;\n\t\t}\n\n\t\t$meta = get_post_meta( $request['postid'], '_aisee_keywords', true );\n\n\t\tif ( // attempt to fetch fresh and add them to the post_meta\n\t\t\tempty( $meta ) ||\n\t\t\tempty( $meta['keywords'] ) ||\n\t\t\t! is_array( $meta['keywords'] )\n\t\t) {\n\t\t\tif ( ( defined( 'DOING_CRON' ) && DOING_CRON ) || ( defined( 'WP_CLI' ) && WP_CLI ) ) {\n\t\t\t\taisee_flog( 'Post ID ' . $request['postid'] . ' does not have meta[keywords]. Attempting fresh fetch from GSC' );\n\t\t\t}\n\t\t\t$this->aisee_gsc_fetch( array( 'postid' => $request['postid'] ) );\n\t\t\t$meta = get_post_meta( $request['postid'], '_aisee_keywords', true );\n\n\t\t\tif ( ( defined( 'DOING_CRON' ) && DOING_CRON ) || ( defined( 'WP_CLI' ) && WP_CLI ) ) {\n\t\t\t\taisee_flog( 'New Meta for ' . $request['postid'] . ' is:' );\n\t\t\t\taisee_flog( $meta );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( ( defined( 'DOING_CRON' ) && DOING_CRON ) || ( defined( 'WP_CLI' ) && WP_CLI ) ) {\n\t\t\t\taisee_flog( 'Post ' . $request['postid'] . ' already has:' );\n\t\t\t\taisee_flog( $meta );\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\tempty( $meta ) ||\n\t\t\tempty( $meta['keywords'] ) ||\n\t\t\t! is_array( $meta['keywords'] )\n\t\t) { // no keywords even after a fresh fetch\n\t\t\tif ( ( defined( 'DOING_CRON' ) && DOING_CRON ) || ( defined( 'WP_CLI' ) && WP_CLI ) ) {\n\t\t\t\taisee_flog( 'no keywords even after a fresh fetch for ' . $request['postid'] );\n\t\t\t\taisee_flog( $meta );\n\t\t\t}\n\t\t\tif ( wp_doing_ajax() ) {\n\t\t\t\twp_send_json_error( $request );\n\t\t\t}\n\t\t} else {\n\t\t\t// aisee_flog( \"\\taisee_generate_tags processing Post ID \" . $request['postid'] . ' MAY get Tags: ' . var_export( $meta, 1 ) );\n\t\t\t$kw = $meta['keywords'];\n\t\t\tuasort( $kw, fn( $a, $b ) => $a['impressions'] <=> $b['impressions'] );\n\t\t\t$kw = array_reverse( $kw );\n\t\t\t$gsc_filter = aisee_get_setting( 'gsc_filter' );\n\t\t\t// aisee_flog( $gsc_filter );\n\t\t\t$valid_terms = array();\n\t\t\t$count = 0;\n\t\t\t$limit = apply_filters( 'aisee_term_limit', 10 );\n\t\t\t$aitags = array();\n\t\t\tforeach ( $kw as $index => $stats ) {\n\t\t\t\t$stats['ctr'] = $stats['ctr'] * 100;\n\t\t\t\t// aisee_flog( $gsc_filter );\n\t\t\t\t// aisee_flog( $stats );\n\t\t\t\tif (\n\t\t\t\t\t$stats['ctr'] >= $gsc_filter['ctr']['min'] &&\n\t\t\t\t\t$stats['ctr'] <= $gsc_filter['ctr']['max'] &&\n\t\t\t\t\t$stats['position'] >= $gsc_filter['position']['min'] &&\n\t\t\t\t\t$stats['position'] <= $gsc_filter['position']['max'] &&\n\n\t\t\t\t\t$stats['clicks'] >= $gsc_filter['clicks']['min'] &&\n\t\t\t\t\t$stats['clicks'] <= $gsc_filter['clicks']['max'] &&\n\t\t\t\t\t$stats['impressions'] >= $gsc_filter['impressions']['min'] &&\n\t\t\t\t\t$stats['impressions'] <= $gsc_filter['impressions']['max']\n\t\t\t\t) {\n\n\t\t\t\t\t$valid_terms[] = $stats['keys']; // phrase\n\t\t\t\t\taisee_flog( \"\\tPost ID \" . $request['postid'] . ' will get Tags: ' . $stats['keys'] );\n\t\t\t\t\tif ( $count < $limit ) {\n\t\t\t\t\t\twp_insert_term(\n\t\t\t\t\t\t\t$stats['keys'], // the term\n\t\t\t\t\t\t\t'aisee_term', // the taxonomy\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$explosion = explode( ' ', $stats['keys'] );\n\t\t\t\t\t\taisee_flog( 'EXPLOSION' );\n\t\t\t\t\t\taisee_flog( $explosion );\n\t\t\t\t\t\taisee_flog( '/EXPLOSION' );\n\t\t\t\t\t\t$aitags = array_merge( $aitags, $explosion );\n\t\t\t\t\t\t$aitags = array_diff( $aitags, $this->stop_words() );\n\t\t\t\t\t\taisee_flog( 'Ai Tags Before: ' );\n\t\t\t\t\t\taisee_flog( $aitags );\n\t\t\t\t\t\tforeach ( $aitags as $aitag ) {\n\t\t\t\t\t\t\twp_insert_term(\n\t\t\t\t\t\t\t\t$aitag, // the tag\n\t\t\t\t\t\t\t\t'aisee_tag', // the taxonomy\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// $aitags = implode( ',', $aitags );\n\t\t\t\t\t\t// aisee_flog( 'Ai Terms: ' . $stats['keys'] );\n\t\t\t\t\t\t// aisee_flog( 'Ai Tags After: ' . $aitags );\n\t\t\t\t\t}\n\n\t\t\t\t\t$count++;\n\t\t\t\t\t// aisee_flog( 'Processing for ' . $request['postid'] );\n\t\t\t\t\t// aisee_flog( $stats['keys'] . ' : will be added as a term.' );\n\t\t\t\t\t// aisee_flog( $aitags . ' : will be added as tags.' );\n\t\t\t\t} else {\n\t\t\t\t\taisee_flog( \"\\tPost ID \" . $request['postid'] . ' will NOT GET Tags: ' . $stats['keys'] );\n\t\t\t\t\taisee_flog( $stats );\n\t\t\t\t\taisee_flog( \"\\t\\nBecause of filter config:\" );\n\t\t\t\t\taisee_flog( $gsc_filter );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// wp_set_post_tags( $request['postid'], implode( ',', $valid_terms ), false );\n\t\t\t// aisee_flog( '$valid_terms' );\n\t\t\t// aisee_flog( $valid_terms );\n\n\t\t\tif ( ! empty( $valid_terms ) ) {\n\t\t\t\twp_set_post_terms( $request['postid'], implode( ',', $valid_terms ), 'aisee_term', false );\n\t\t\t}\n\t\t\t$aitags = array_unique( array_filter( array_map( 'trim', $aitags ) ) );\n\t\t\tif ( ! empty( $aitags ) ) {\n\t\t\t\taisee_flog( '$aitags' );\n\t\t\t\taisee_flog( $aitags );\n\t\t\t\twp_set_post_terms( $request['postid'], implode( ',', $aitags ), 'aisee_tag', false );\n\t\t\t}\n\t\t\t// wp_set_post_terms( $request['postid'], implode( ',', $valid_terms ), 'aisee_term', ! wp_doing_ajax() );\n\t\t}\n\n\t\tif ( wp_doing_ajax() ) {\n\t\t\twp_send_json_success( $request );\n\t\t}\n\t}", "title": "" }, { "docid": "17061d691c5f1e30ab65d9aeb347c4ee", "score": "0.6055141", "text": "function my_taxonomies_poi() {\n $labels = array(\n 'name' => _x( 'Poi Categories', 'taxonomy general name' ),\n 'singular_name' => _x( 'Poi Category', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Poi Categories' ),\n 'all_items' => __( 'All Poi Categories' ),\n 'parent_item' => __( 'Parent Poi Category' ),\n 'parent_item_colon' => __( 'Parent Poi Category:' ),\n 'edit_item' => __( 'Edit Poi Category' ),\n 'update_item' => __( 'Update Poi Category' ),\n 'add_new_item' => __( 'Add New Poi Category' ),\n 'new_item_name' => __( 'New Poi Category' ),\n 'menu_name' => __( 'Poi Categories' ),\n 'show_admin_column' => true\n );\n $args = array(\n 'labels' => $labels,\n 'hierarchical' => true,\n 'show_admin_column' => true,\n 'show_in_rest' => true,\n 'rest_base' => 'genre',\n 'rest_controller_class' => 'WP_REST_Terms_Controller'\n\n );\n register_taxonomy( 'poi_category', 'pois', $args );\n }", "title": "" }, { "docid": "f7fb7dbbd1f5363b4a501a258b77cedf", "score": "0.6044832", "text": "function build_taxonomies() {\n/* register_taxonomy( 'event_tag', 'events',\n\t array( \n\t'hierarchical' => false, // true = acts like categories false = acts like tags\n\t'label' => 'Event Type', \n\t'query_var' => true, \n\t'rewrite' => true ,\n\t'show_admin_column' => true,\n\t'public' => true,\n\t'rewrite' => array( 'slug' => 'event-type' ),\n\t'_builtin' => true\n\t) );*/\n\t\n\t// Press Type for Press\n register_taxonomy( 'press_type', 'press',\n\t array( \n\t'hierarchical' => false, // true = acts like categories false = acts like tags\n\t'label' => 'Event Type', \n\t'query_var' => true, \n\t'rewrite' => true ,\n\t'show_admin_column' => true,\n\t'public' => true,\n\t'rewrite' => array( 'slug' => 'press-type' ),\n\t'_builtin' => true\n\t) );\n\t\n}", "title": "" }, { "docid": "a7c7090a3bf1f7fcfde5cc0890deff6b", "score": "0.60383934", "text": "function _get_meta() {\n global $wpdb;\n\n $cache_key = md5( 'termmetarepeater::_get_meta' . $this->term_id . $this->slug );\n $cache_group = 'types_cache';\n $cached_object = wp_cache_get( $cache_key, $cache_group );\n\n if ( $this->use_cache ) {\n\t\t\tif ( false != $cached_object && is_array( $cached_object ) ) {\n\t\t\t\treturn $cached_object;\n\t\t\t}\n }\n\n $this->order_meta_name = '_' . $this->slug . '-sort-order';\n\n $_meta = parent::_get_meta();\n\n $ordered = array();\n $this->order = get_term_meta( $this->term_id, $this->order_meta_name,\n true );\n\n\t\t$cache_key_termfield = md5( 'termmeta::_get_meta' . $this->term_id . $this->slug );\n $cached_object_termfield = wp_cache_get( $cache_key_termfield, $cache_group );\n\n if ( $this->use_cache ) {\n\t\t\tif ( false != $cached_object_termfield && is_array( $cached_object_termfield ) ) {// WordPress cache\n\t\t\t\t$r = $cached_object_termfield;\n\t\t\t} else {\n\t\t\t\t$r = $wpdb->get_results(\n\t\t\t\t\t\t$wpdb->prepare(\n\t\t\t\t\t\t\t\t\"SELECT * FROM {$wpdb->termmeta}\n\t\t\t\t\t\t\t\tWHERE term_id=%d\n\t\t\t\t\t\t\t\tAND meta_key=%s\",\n\t\t\t\t\t\t\t\t$this->term_id, $this->slug )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n if ( !empty( $r ) ) {\n $_meta = array();\n $_meta['by_meta_id'] = array();\n $_meta['by_meta_key'] = array();\n\n // Default order\n foreach ( $r as $meta ) {\n //print_r($meta);exit;\n // This will use last item in array if multiple values exist\n $_meta['single'] = maybe_unserialize( $meta->meta_value );\n // Sort by meta_id column\n $_meta['by_meta_id'][$meta->meta_id]\n = maybe_unserialize( $meta->meta_value );\n // Sort by meta_key\n $_meta['by_meta_key'][] = maybe_unserialize( $meta->meta_value );\n }\n ksort( $_meta['by_meta_id'] );\n\n // Custom order\n if ( !empty( $this->order ) ) {\n foreach ( $this->order as $meta_id ) {\n if ( isset( $_meta['by_meta_id'][$meta_id] ) ) {\n $_meta['custom_order'][$meta_id] = $_meta['by_meta_id'][$meta_id];\n }\n }\n // This ones are orphaned\n foreach ( $_meta['by_meta_id'] as $meta_id => $meta ) {\n if ( !isset( $ordered[$meta_id] ) ) {\n $_meta['custom_order'][$meta_id] = $meta;\n }\n }\n } else {\n $_meta['custom_order'] = $_meta['by_meta_id'];\n }\n } else if ( !is_null( $this->meta_object ) ) {\n $_meta = array();\n $_meta['single'] = maybe_unserialize( $this->meta_object->meta_value );\n // Sort by meta_id column\n $_meta['by_meta_id'][$this->meta_object->meta_id] = maybe_unserialize( $this->meta_object->meta_value );\n // Sort by meta_key\n $_meta['by_meta_key'][] = maybe_unserialize( $this->meta_object->meta_value );\n } else {\n $_meta = array();\n $_meta['single'] = '';\n $_meta['by_meta_id'] = array();\n $_meta['by_meta_key'] = array();\n }\n\n if ( empty( $_meta['custom_order'] ) ) {\n $_meta['custom_order'] = $_meta['by_meta_id'];\n }\n\n wp_cache_add( $cache_key, $_meta, $cache_group );// WordPress cache\n return $_meta;\n }", "title": "" }, { "docid": "96bc41389acffdf1a826ec252b6a9917", "score": "0.60330194", "text": "function get_term_meta( $taxonomy = '', $term_id = 0, $meta_key = '', $single = false ) {\n\t// Taxonomy is valid ?\n\tif ( ! taxonomy_exists( $taxonomy ) ) {\n\t\treturn false;\n\t}\n\n\t// Term ID exist for this taxonomy ?\n\t$term = get_term( (int) $term_id, $taxonomy );\n\tif ( $term == false || is_wp_error( $term ) ) {\n\t\treturn false;\n\t}\n\n\treturn get_term_taxonomy_meta( $term->term_taxonomy_id, $meta_key, $single );\n}", "title": "" }, { "docid": "567f5f51362834de033af7e5d746845a", "score": "0.60272497", "text": "function create_mic_taxonomies()\n{\n $labels = array(\n 'name' => _x( 'Mics', 'taxonomy general name' ),\n 'singular_name' => _x( 'mic', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Mics' ),\n 'popular_items' => __( 'Popular Mics' ),\n 'all_items' => __( 'All Mics' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Mics' ),\n 'update_item' => __( 'Update mic' ),\n 'add_new_item' => __( 'Add New mic' ),\n 'new_item_name' => __( 'New mic' ),\n 'add_or_remove_items' => __( 'Add or remove Mics' ),\n 'choose_from_most_used' => __( 'Choose from the most used Mics' ),\n 'menu_name' => __( 'Mic' ),\n );\n\n//registers taxonomy specific post types - default is just post\n register_taxonomy('Mics',array('room'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'mic' ),\n 'show_in_rest' => true,\n 'rest_base' => 'mic',\n 'rest_controller_class' => 'WP_REST_Terms_Controller',\n 'show_in_nav_menus' => false, \n ));\n}", "title": "" }, { "docid": "b4331e7831b7545430af78ee08e56add", "score": "0.6025361", "text": "public function getMeta() {\n\t\treturn $this->_meta;\n\t}", "title": "" }, { "docid": "9df9c9690d5212f06687f90950eb1c80", "score": "0.6003466", "text": "public static function supported_taxonomy_names(){\n\t\treturn apply_filters( 'stmpc/supported_taxonomy_names', array_keys( self::supported_taxonomies() ));\n\t}", "title": "" }, { "docid": "73d24e381d49bfdfadc821bec50f44cb", "score": "0.6003412", "text": "private function registerTaxonomy()\n {\n register_taxonomy($this->slug, $this->objectType, $this->args);\n }", "title": "" }, { "docid": "43e7f0bd97094bdd5c7643b51bd9fe81", "score": "0.59955394", "text": "public static function get_term_metadata( $value, $object_id, $meta_key, $single ) {\n\t\t_mft_maybe_register_taxometa_table();\n\t\t$backcompat = get_metadata( 'term_taxo', $object_id, $meta_key, $single );\n\t\treturn empty( $backcompat ) ? null : $backcompat;\n\t}", "title": "" }, { "docid": "005342736948af08735fa0d3e08475d3", "score": "0.59937394", "text": "function storefront_child_display_custom_taxonomies() {\n\tglobal $post;\n\t\n\t$custom_taxonomies = array( 'colectii' , 'stil', 'origine', 'dimensiuni', 'materiale', 'sistem de inchidere', \n\t\t\t'accesorii', 'culori', 'instructiuni de intretinere' );\n\t\n\tif ( $term_list = get_the_term_list( $post->ID, 'atentionari', '', ', ', '' ) ) {\n\t\t?>\n\t\t<div class=\"atentionari\">\n\t\t\t<span><?php echo strip_tags( $term_list ); ?></span>\n\t\t</div>\n\t\t<?php\n\t}\n\t\n\t?>\n\t<ul class=\"custom_taxonomies\">\n\t<?php \n\t\tforeach ($custom_taxonomies as $taxonomy) {\n\t\t\tif ( $term_list = get_the_term_list( $post->ID, $taxonomy, '', ', ', '' ) ) {\n\t\t\t\t?>\n\t\t\t\t<li class=\"<?php echo $taxonomy; ?>\">\n\t\t\t\t\t<label><?php echo ucfirst( $taxonomy ); ?>: </label>\n\t\t\t\t\t<span><?php echo $taxonomy == 'colectii' ? $term_list : strip_tags( $term_list ); ?></span>\n\t\t\t\t</li>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\t?>\n\t</ul>\n\t<?php\n}", "title": "" }, { "docid": "32fd071749b670f16d22d9aced62b5b8", "score": "0.5987669", "text": "private static function _taxonomies() : array {\n $tax = array();\n $tax = apply_filters( 'spa_ensemble_cpt_taxonomies', $tax );\n\n foreach( $tax as $t ) {\n if( !taxonomy_exists( $t ) ) {\n unset( $tax[$t] );\n }\n }\n\n return $tax;\n }", "title": "" }, { "docid": "225228a991777fe58c89c678c38f22f5", "score": "0.5983653", "text": "function dmst_mc_immediate_getoption_posttype_taxonomies($p) {\n $t1 = DeMomentSomTresTools::get_option(DMST_MC_IMMEDIATE_OPTIONS, 'lists', array());\n $t = (isset($t1[$p])) ? $t1[$p] : array();\n $taxonomies = array_keys($t);\n return $taxonomies;\n}", "title": "" }, { "docid": "e175cdba7d5acc42d17c8048569c7fec", "score": "0.59731686", "text": "function create_my_genres_taxonomie() {\n\t//first do the translations part for GUI\n\n $labels = array(\n\t\t'name' => _x( 'Genres', 'taxonomy general name' ),\n\t\t'singular_name' => _x( 'Genre', 'taxonomy singular name' ),\n\t\t'search_items' => __( 'Search Genres' ),\n\t\t'all_items' => __( 'All Genres' ),\n\t\t'parent_item' => null,\n\t\t'parent_item_colon' => null,\n\t\t'edit_item' => __( 'Edit Genre' ), \n\t\t'update_item' => __( 'Update Genre' ),\n\t\t'add_new_item' => __( 'Add New Genre' ),\n\t\t'new_item_name' => __( 'New Genre Name' ),\n\t\t'menu_name' => __( 'Genres' ),\n ); \n\n\t// Now register the non-hierarchical taxonomy like tag\n register_taxonomy('my_genres', array('my_movies'), array(\n\t\t'labels' => $labels,\n\t\t'hierarchical' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_rest' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => 'genre' ),\n ));\n \n}", "title": "" }, { "docid": "61cb079f824ea5ba8dc1aa928f1a6b0c", "score": "0.5973129", "text": "function stla_single_taxplace($taxonomy)\n{\n $term = get_field($taxonomy);\n\n if ($term) {\n return $term->name;\n }\n return __('pas de lieu indique', 'stla');\n\n}", "title": "" }, { "docid": "ed3a7d20a85c79665d367f84422865b7", "score": "0.59713674", "text": "function extra_edit_tax_fields($tag) {\n // Check for existing taxonomy meta for term ID.\n $t_id = $tag->term_id;\n $term_meta = get_option( \"taxonomy_$t_id\" ); ?>\n <tr class=\"form-field\">\n <th scope=\"row\" valign=\"top\"><label for=\"cat_Image_url\"><?php _e( 'Font Awesome icon' ); ?></label></th>\n <td>\n <input type=\"text\" name=\"term_meta[img]\" id=\"term_meta[img]\" value=\"<?php echo esc_attr( $term_meta['img'] ) ? esc_attr( $term_meta['img'] ) : ''; ?>\">\n <p class=\"description\"><?php _e( 'Enter the class of font awesome icon for the particular modules.' ); ?></p>\n </td>\n </tr>\n<?php\n}", "title": "" }, { "docid": "2a146355a36b84f82d8a1a54d0596495", "score": "0.59712684", "text": "function _genesis_get_term_meta( $data = [], $term_id = 0 ) {\n\n\t$genesis_data = array_filter( [\n\t\t'doctitle' => \\get_term_meta( $term_id, 'doctitle', true ) ?: false,\n\t\t'description' => \\get_term_meta( $term_id, 'description', true ) ?: false,\n\t\t'noindex' => \\get_term_meta( $term_id, 'noindex', true ) ?: false,\n\t\t'nofollow' => \\get_term_meta( $term_id, 'nofollow', true ) ?: false,\n\t\t'noarchive' => \\get_term_meta( $term_id, 'noarchive', true ) ?: false,\n\t] );\n\n\treturn array_merge( $data, $genesis_data );\n}", "title": "" }, { "docid": "8f553aaad98ac474c16f8e0e671d1024", "score": "0.59680206", "text": "function wponion_get_term_meta( $term_id = '', $unique = '' ) {\n\t\treturn ( function_exists( 'get_term_meta' ) ) ? get_term_meta( $term_id, $unique, true ) : get_option( 'wponion_' . wponion_hash_string( $term_id . '_' . $unique ), true );\n\t}", "title": "" }, { "docid": "c6ae52dc5376811608018cae0e428ec4", "score": "0.59677696", "text": "function classifieds_get_custom_tax_list( $taxonomy, $direction = 'right', $hide_empty = true, $field = 'slug' ) {\r\n\t$terms = get_terms( $taxonomy, array( 'hide_empty' => $hide_empty ) );\r\n\t$term_list = array();\r\n\tif ( ! empty( $terms ) ) {\r\n\t\tforeach ( $terms as $term ) {\r\n\t\t\tif ( $direction == 'right' ) {\r\n\t\t\t\t$term_list[ $term->$field ] = $term->name;\r\n\t\t\t} else {\r\n\t\t\t\t$term_list[ $term->name ] = $term->$field;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn $term_list;\r\n}", "title": "" }, { "docid": "58c85ae7e21e6baeb9621f3a2284d412", "score": "0.59669197", "text": "function wponion_get_term_meta( $term_id = '', $unique = '' ) {\n\t\tif ( function_exists( 'get_term_meta' ) ) {\n\t\t\treturn get_term_meta( $term_id, $unique, true );\n\t\t}\n\t\t$key = 'wponion_' . wponion_hash_string( $term_id . '_' . $unique );\n\t\treturn get_option( $key, true );\n\t}", "title": "" }, { "docid": "07fc353563b5592920a97c141337536a", "score": "0.5956931", "text": "function create_camera_taxonomies()\n{\n $labels = array(\n 'name' => _x( 'Cameras', 'taxonomy general name' ),\n 'singular_name' => _x( 'camera', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Cameras' ),\n 'popular_items' => __( 'Popular Cameras' ),\n 'all_items' => __( 'All Cameras' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Cameras' ),\n 'update_item' => __( 'Update camera' ),\n 'add_new_item' => __( 'Add New camera' ),\n 'new_item_name' => __( 'New camera' ),\n 'add_or_remove_items' => __( 'Add or remove Cameras' ),\n 'choose_from_most_used' => __( 'Choose from the most used Cameras' ),\n 'menu_name' => __( 'Camera' ),\n );\n\n//registers taxonomy specific post types - default is just post\n register_taxonomy('Cameras',array('room'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'camera' ),\n 'show_in_rest' => true,\n 'rest_base' => 'camera',\n 'rest_controller_class' => 'WP_REST_Terms_Controller',\n 'show_in_nav_menus' => false, \n ));\n}", "title": "" }, { "docid": "b2394617a45640cc4541fd34062ec072", "score": "0.59568715", "text": "public static function taxonomies() {\n $taxonomies = array(\n 'category'\n );\n\n $taxonomies = apply_filters( 'jmb_people_taxonomies', $taxonomies );\n\n return $taxonomies;\n }", "title": "" } ]
8320650c54270823b588203ce3f491c8
Convert the xml schema into an actual xml payload by replacing all of its placeholders with data within the xml data array.
[ { "docid": "3c378a535272c57a5de665208a8ce909", "score": "0.8134182", "text": "protected function prepareXmlPayload(){\r\n\t\t\t//\tCombine the schema and the data array\r\n\t\t\t$xml_schema = $this->_xml_schema;\r\n\t\t\t$xml_data = $this->_xml_data;\r\n\t\t\tif(!empty($xml_schema) && is_array($xml_data) && !empty($xml_data)){\r\n\t\t\t\t//\tGrab all of the %%placeholders%% from the schema\r\n\t\t\t\tpreg_match_all('/(?:<(\\w+)>)(%%(\\w+)%%)(?:<\\/\\1>)/', $xml_schema, $matches);\r\n\t\t\t\t$placeholders = $matches[2];\r\n\t\t\t\t$data_keys = $matches[3]; \r\n\t\t\t\tforeach(array_keys($placeholders) as $i){\r\n\t\t\t\t\t$value = '';\r\n\t\t\t\t\tif(isset($xml_data[$data_keys[$i]])){\r\n\t\t\t\t\t\t$value = $xml_data[$data_keys[$i]];\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$xml_schema = str_replace($placeholders[$i], $value, $xml_schema);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $xml_schema;\r\n\t\t}", "title": "" } ]
[ { "docid": "6b8318dea3f62e7dfef6353b1e79ded2", "score": "0.584031", "text": "public function transform($strXmlData);", "title": "" }, { "docid": "4e541379142151b4620ff801a6aa1665", "score": "0.5346614", "text": "private function _format_rawxml($data = array(), $structure = null, $basenode = 'xml')\n\t{\n\t\t// turn off compatibility mode as simple xml throws a wobbly if you don't.\n\t\tif (ini_get('zend.ze1_compatibility_mode') == 1)\n\t\t{\n\t\t\tini_set('zend.ze1_compatibility_mode', 0);\n\t\t}\n\n\t\tif ($structure == null)\n\t\t{\n\t\t\t$structure = simplexml_load_string(\"<?xml version='1.0' encoding='utf-8'?><$basenode />\");\n\t\t}\n\n\t\t// loop through the data passed in.\n\t\t$data = self::_force_loopable($data);\n\t\tforeach ($data as $key => $value)\n\t\t{\n\t\t\t// no numeric keys in our xml please!\n\t\t\tif (is_numeric($key))\n\t\t\t{\n\t\t\t\t// make string key...\n\t\t\t\t//$key = \"item_\". (string) $key;\n\t\t\t\t$key = \"item\";\n\t\t\t}\n\n\t\t\t// replace anything not alpha numeric\n\t\t\t$key = preg_replace('/[^a-z0-9_-]/i', '', $key);\n\n\t\t\t// if there is another array found recrusively call this function\n\t\t\tif (is_array($value) or is_object($value))\n\t\t\t{\n\t\t\t\t$node = $structure->addChild($key);\n\t\t\t\t// recrusive call.\n\t\t\t\tself::_format_rawxml($value, $node, $basenode);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Actual boolean values need to be converted to numbers\n\t\t\t\tis_bool($value) and $value = (int) $value;\n\n\t\t\t\t// add single node.\n\t\t\t\t$value = htmlentities($value, ENT_NOQUOTES, \"UTF-8\");\n\n\t\t\t\t$UsedKeys[] = $key;\n\n\t\t\t\t$structure->addChild($key, $value);\n\t\t\t}\n\t\t}\n\n\t\t// pass back as string. or simple xml object if you want!\n\t\treturn $structure->asXML();\n\t}", "title": "" }, { "docid": "fbc6f8c6c717aea71aff2cfa1b393c0c", "score": "0.51477754", "text": "private function _format_xml($data = array(), $structure = null, $basenode = 'xml')\n\t{\n\t\t// turn off compatibility mode as simple xml throws a wobbly if you don't.\n\t\tif (ini_get('zend.ze1_compatibility_mode') == 1)\n\t\t{\n\t\t\tini_set('zend.ze1_compatibility_mode', 0);\n\t\t}\n\n\t\tif ($structure == null)\n\t\t{\n\t\t\t$structure = simplexml_load_string(\"<?xml version='1.0' encoding='utf-8'?><$basenode />\");\n\t\t}\n\n\t\t// loop through the data passed in.\n\t\t$data = self::_force_loopable($data);\n\t\tforeach ($data as $key => $value)\n\t\t{\n\t\t\t// no numeric keys in our xml please!\n\t\t\tif (is_numeric($key))\n\t\t\t{\n\t\t\t\t// make string key...\n\t\t\t\t//$key = \"item_\". (string) $key;\n\t\t\t\t$key = \"item\";\n\t\t\t}\n\n\t\t\t// replace anything not alpha numeric\n\t\t\t$key = preg_replace('/[^a-z_]/i', '', $key);\n\n\t\t\t// if there is another array found recrusively call this function\n\t\t\tif (is_array($value) or is_object($value))\n\t\t\t{\n\t\t\t\t$node = $structure->addChild($key);\n\t\t\t\t// recrusive call.\n\t\t\t\tself:: _format_xml($value, $node, $basenode);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Actual boolean values need to be converted to numbers\n\t\t\t\tis_bool($value) and $value = (int) $value;\n\n\t\t\t\t// add single node.\n\t\t\t\t$value = htmlentities($value, ENT_NOQUOTES, \"UTF-8\");\n\n\t\t\t\t$UsedKeys[] = $key;\n\n\t\t\t\t$structure->addChild($key, $value);\n\t\t\t}\n\t\t}\n\n\t\t// pass back as string. or simple xml object if you want!\n\t\treturn $structure->asXML();\n\t}", "title": "" }, { "docid": "cfef50c1008fd44ae283c8fac6232854", "score": "0.51215535", "text": "function _explain_with_xml_generate($schema){\n $output = array();\n // Show comments\n if(!empty($schema['#comment'])){\n $output[] = \"COMMENT: \" . $schema['#comment'];\n }\n // Add attributes\n if(!empty($schema['#attributes'])){\n foreach($schema['#attributes'] as $attr_name => $attr_value){\n $output[] = \"SET ATTR $attr_name = $attr_value;\";\n }\n }\n // Add values\n $value_to_set = '';\n if(isset($schema['#value'])){\n $value_to_set = $schema['#value'];\n }else if(!empty($schema['#field'])){\n $value_to_set = $this->_field_name($schema['#field']);\n }\n if($value_to_set){\n if(!isset($schema['#value']) && isset($schema['#merge'])){\n $value_to_set = $schema['#merge'] . '(' . $value_to_set . ')';\n }\n if(isset($schema['#process'])){\n // XXX need to display process arguments\n $value_to_set = $schema['#process'] . '(' . $value_to_set . ')';\n }\n $output[] = \"SET VALUE = \" . $value_to_set . \";\";\n }\n // Add conditions\n $condition = FALSE;\n if(isset($schema['#condition'])){\n if(is_callable($schema['#condition'])){\n $output[] = \"IF \" . $schema['#condition'] . \" {\";\n }else{\n $elem = $this->_field_name($schema['#condition']);\n $condition = \"$elem\";\n $output[] = \"IF ($condition) {\";\n }\n }\n // Load new object\n $has_load = FALSE;\n if(isset($schema['#load'])){\n $elem = $this->_field_name($schema['#field']);\n $path = $schema['#load'] . '(' . $elem;\n if(isset($schema['#load arguments'])){\n $arguments = array();\n foreach($schema['#load arguments'] as $argument){\n if(is_string($argument) && preg_match('/^field:(.+)$/', $argument, $matches)){\n $load_elem = $this->_field_name($matches[1]);\n $arguments[] = $load_elem;\n }else{\n $arguments[] = 'unserialize(\"' . serialize($argument) . '\")';\n }\n }\n $path .= ', ' . implode(', ', $arguments);\n }\n $this->_path[] = $path . ')';\n $has_load = TRUE;\n }\n // Recurse\n $sub = array();\n foreach($schema as $tag => $child_schema){\n if(strpos($tag, '#') === 0){\n continue;\n }\n $sub[] = \"<$tag>\";\n $sub[] = $this->_explain_with_xml_generate($child_schema);\n $sub[] = \"</$tag>\";\n }\n if($condition){\n $output[] = $sub;\n $output[] = \"} /* $condition */\";\n }else{\n $output = array_merge($output, $sub);\n }\n if($has_load){\n array_pop($this->_path);\n }\n return $output;\n }", "title": "" }, { "docid": "6ab41de419e893ae3ba889129e1661bf", "score": "0.5044142", "text": "function array_to_xml($data, &$xml)\n {\n foreach ($data as $element => $value) {\n if (is_array($value)) {\n if (is_assoc($value)) {\n $subnode = $xml->addChild($element);\n array_to_xml($value, $subnode);\n } else {\n // Fast enough.\n while (count($value) > 0) {\n array_to_xml([$element => array_shift($value)], $xml);\n }\n }\n } else {\n $xml->addChild($element, htmlspecialchars($value));\n }\n }\n\n return $xml->asXML();\n }", "title": "" }, { "docid": "a8ec3026b58808225d69737534e72577", "score": "0.50215626", "text": "private function _xml($data = array(), $structure = NULL, $basenode = 'xml')\n {\n \t// turn off compatibility mode as simple xml throws a wobbly if you don't.\n\t\tif (ini_get('zend.ze1_compatibility_mode') == 1)\n\t\t{\n\t\t\tini_set ('zend.ze1_compatibility_mode', 0);\n\t\t}\n\n\t\tif ($structure == NULL)\n\t\t{\n\t\t\t$structure = simplexml_load_string(\"<?xml version='1.0' encoding='utf-8'?><$basenode />\");\n\t\t}\n\n\t\t// loop through the data passed in.\n\t\tforeach($data as $key => $value)\n\t\t{\n\t\t\t// no numeric keys in our xml please!\n\t\t\tif (is_numeric($key))\n\t\t\t{\n\t\t\t\t// make string key...\n\t\t\t\t//$key = \"item_\". (string) $key;\n\t\t\t\t$key = \"item\";\n\t\t\t}\n\n\t\t\t// replace anything not alpha numeric\n\t\t\t$key = preg_replace('/[^a-z0-9_-]/i', '', $key);\n\n\t\t\t// if there is another array found recrusively call this function\n\t\t\tif (is_array($value))\n\t\t\t{\n\t\t\t\t$node = $structure->addChild($key);\n\t\t\t\t// recrusive call.\n\t\t\t\t$this->_xml($value, $node, $basenode);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// add single node.\n\n\t\t\t\t$value = htmlentities($value, ENT_NOQUOTES, \"UTF-8\");\n\n\t\t\t\t$UsedKeys[] = $key;\n\n\t\t\t\t$structure->addChild($key, $value);\n\t\t\t}\n\n\t\t}\n \t\n\t\t// pass back as string. or simple xml object if you want!\n\t\treturn $structure->asXML();\n }", "title": "" }, { "docid": "40185c9eb76450b6dbc7ace0eb8bf3a2", "score": "0.5001934", "text": "function toXML($data, $rootNodeName = 'data', $xml=null)\n\t{\n\t\tif (ini_get('zend.ze1_compatibility_mode') == 1)\n\t\t{\n\t\t\tini_set ('zend.ze1_compatibility_mode', 0);\n\t\t}\n \n\t\tif ($xml == null)\n\t\t{\n\t\t\t$xml = simplexml_load_string(\"<?xml version='1.0' encoding='utf-8'?><$rootNodeName />\");\n\t\t}\n \n\t\t// loop through the data passed in.\n\t\tforeach($data as $key => $value)\n\t\t{\n\t\t\t// no numeric keys in our xml please!\n\t\t\tif (is_numeric($key))\n\t\t\t{\n\t\t\t\t// make string key...\n\t\t\t\t$key = \"unknownNode_\". (string) $key;\n\t\t\t}\n \n\t\t\t// replace anything not alpha numeric\n\t\t\t$key = preg_replace('/[^a-z]/i', '', $key);\n \n\t\t\t// if there is another array found recrusively call this function\n\t\t\tif (is_array($value))\n\t\t\t{\n\t\t\t\t$node = $xml->addChild($key);\n\t\t\t\t// recrusive call.\n\t\t\t\tArrayToXML::toXml($value, $rootNodeName, $node);\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t// add single node.\n $value = htmlentities($value);\n\t\t\t\t$xml->addChild($key,$value);\n\t\t\t}\n \n\t\t}\n\t\t// pass back as string. or simple xml object if you want!\n\t\treturn $xml->asXML();\n\t}", "title": "" }, { "docid": "0f255ab6ba3968feed2a87bd2e23bf80", "score": "0.49816287", "text": "public function convert(\\SimpleXMLElement $xml);", "title": "" }, { "docid": "31f4084661d52f65c25360856723dac3", "score": "0.4955459", "text": "public static function item_get_plugin_schema() {\n $schema = <<<EOS\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" elementFormDefault=\"qualified\">\n <xs:element name=\"surveyfield_autofill\">\n <xs:complexType>\n <xs:sequence>\n <xs:element type=\"xs:string\" name=\"content\"/>\n <xs:element name=\"embedded\" minOccurs=\"0\" maxOccurs=\"unbounded\">\n <xs:complexType>\n <xs:sequence>\n <xs:element type=\"xs:string\" name=\"filename\"/>\n <xs:element type=\"xs:base64Binary\" name=\"filecontent\"/>\n </xs:sequence>\n </xs:complexType>\n </xs:element>\n <xs:element type=\"xs:int\" name=\"contentformat\"/>\n\n <xs:element type=\"xs:string\" name=\"customnumber\" minOccurs=\"0\"/>\n <xs:element type=\"xs:int\" name=\"position\"/>\n <xs:element type=\"xs:string\" name=\"extranote\" minOccurs=\"0\"/>\n <xs:element type=\"xs:int\" name=\"required\"/>\n <xs:element type=\"xs:string\" name=\"variable\" minOccurs=\"0\"/>\n <xs:element type=\"xs:int\" name=\"indent\"/>\n\n <xs:element type=\"xs:int\" name=\"hiddenfield\"/>\n <xs:element type=\"xs:string\" name=\"element01\" minOccurs=\"0\"/>\n <xs:element type=\"xs:string\" name=\"element02\" minOccurs=\"0\"/>\n <xs:element type=\"xs:string\" name=\"element03\" minOccurs=\"0\"/>\n <xs:element type=\"xs:string\" name=\"element04\" minOccurs=\"0\"/>\n <xs:element type=\"xs:string\" name=\"element05\" minOccurs=\"0\"/>\n </xs:sequence>\n </xs:complexType>\n </xs:element>\n</xs:schema>\nEOS;\n\n return $schema;\n }", "title": "" }, { "docid": "7ce43d691603369a2d8b0217f5342e8f", "score": "0.49216688", "text": "protected function dataToXml($data, $rootNodeName = 'data', $elem=null, $xml=null)\n\t{\n\t\t\n\t\tif ($xml === null)\n\t\t{\n\t\t\t$xml = new DOMDocument(\"1.0\", \"UTF-8\");\n\t\t\t$xml->formatOutput = true;\n\t\t\t$elem = $xml->createElement( $rootNodeName );\n \t\t\t$xml->appendChild( $elem );\n\t\t}\n\t\t\n\t\t// loop through the data passed in.\n\t\tforeach($data as $key => $value)\n\t\t{\n\t\t\t// no numeric keys in our xml please!\n\t\t\tif (is_numeric($key))\n\t\t\t{\n\t\t\t\t// make string key...\n\t\t\t\t$key = \"node_\". (string) $key;\n\t\t\t}\n\t\t\t\n\t\t\t// replace anything not alpha numeric\n\t\t\t$key = preg_replace('/[^a-z0-9\\_]/i', '', $key);\n\t\t\t\n\t\t\t// if there is another array found recrusively call this function\n\t\t\tif (is_array($value))\n\t\t\t{\n\t\t\t\t$subelem = $xml->createElement( $key );\n\t\t\t\t$elem->appendChild( $subelem);\n\t\t\t\t// recrusive call.\n\t\t\t\t$this->DataToXml($value, $rootNodeName, $subelem, $xml);\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$subelem = $xml->createElement( $key );\n\t\t\t\t$subelem->appendChild(\n\t\t\t\t\tstrstr($value, array('<','>'))\n\t\t\t\t\t? $xml->createCDATASection( $value )\n\t\t\t\t\t: $xml->createTextNode( $value )\n\t\t\t\t);\n\t\t\t\t$elem->appendChild( $subelem );\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t// pass back as DOMDocument object\n\t\treturn $xml;\n\t}", "title": "" }, { "docid": "4a4ef7de35320ef82a75a14ab3a32baa", "score": "0.4910524", "text": "function _insert_xml_element($schema, $tag, $value, $xml_element){\n // Apply process function\n if(isset($schema['#process'])){\n $f = $schema['#process'];\n if(!function_exists($f)){throw new Exception(\"Process function $f for tag $tag does not exist\");}\n $args = array(\n $value\n );\n if(!empty($schema['#process arguments'])){\n $args = array_merge($args, $schema['#process arguments']);\n }\n $value = call_user_func_array($f, $args);\n }\n // Check for standard drupal field value format. Anything that is a direct value, or\n // an array definined 'value' will need a 'process' function defined.\n if(is_array($value) && isset($value['value'])){\n $value = $value['value'];\n }\n // Create the xml element\n $child_element = $xml_element->appendChild($this->_dom->createElement($tag));\n // Add attributes\n if(!empty($schema['#attributes'])){\n foreach($schema['#attributes'] as $attr_name => $attr_value){\n if(is_callable($attr_value)){\n $attr_value = $attr_value($this->_get_context());\n }\n $child_element->setAttribute($attr_name, $attr_value);\n }\n }\n // Add value\n foreach($this->modifiers as $modifier){\n $value = $modifier->insert_value($tag, $schema, $value);\n }\n if($value !== NULL){\n $fragment = $this->_dom->createDocumentFragment();\n $final_value = $value;\n // Escape the value if needed\n if(empty($schema['#raw'])){\n $final_value = htmlspecialchars($final_value);\n }else{\n $final_value = '<div>' . $final_value . '</div>';\n }\n // Ensure entities are numerical\n $final_value = _publication_xml_translate_entities($final_value);\n $fragment->appendXML($final_value);\n $child_element->appendChild($fragment);\n }\n return $child_element;\n }", "title": "" }, { "docid": "c2342943b353df88175ea8f4afbaaa51", "score": "0.48955938", "text": "public function dataPhp()\n\t{\n\t\treturn $this->xml->asXML();\n\t}", "title": "" }, { "docid": "6ed9813e9d531b65940be06704c721e2", "score": "0.48559883", "text": "private\n function viewXml($data, $rootNodeName = 'data', $xml = null)\n {\n\n // turn off compatibility mode as simple xml throws a wobbly if you don't.\n\n ini_set('zend.ze1_compatibility_mode', 0);\n if ($xml == null) {\n $xml = simplexml_load_string(\"<?xml version='1.0' encoding='utf-8'?><$rootNodeName />\");\n }\n\n // loop through the data passed in.\n\n foreach($data as $key => $value) {\n\n // no numeric keys in our xml please!\n\n if (is_numeric($key)) {\n\n // make string key...\n\n $key = \"unknownNode_\" . (string)$key;\n }\n\n // replace anything not alpha numeric\n\n $key = preg_replace('/[^a-z]/i', '', $key);\n\n // if there is another array found recrusively call this function\n\n if (is_array($value)) {\n $node = $xml->addChild($key);\n\n // recrusive call.\n\n $this->viewXml($value, $rootNodeName, $node);\n }\n else {\n\n // add single node.\n\n $value = htmlentities($value);\n $xml->addChild($key, $value);\n }\n }\n\n // pass back as string. or simple xml object if you want!\n\n return $xml->asXML();\n }", "title": "" }, { "docid": "48c26bd539c8a79d43b0498840d38956", "score": "0.48455143", "text": "private static function arrayToXml($data, &$xml_data)\n {\n foreach ($data as $key => $value) {\n if (is_numeric($key)) {\n $key = 'item' . $key; //dealing with <0/>..<n/> issues\n }\n if (is_array($value)) {\n $subnode = $xml_data->addChild($key);\n self::arrayToXml($value, $subnode);\n } else {\n $xml_data->addChild(\"$key\", htmlspecialchars(\"$value\"));\n }\n }\n }", "title": "" }, { "docid": "189f75909623fcc1e9a2f75f14ef2aa4", "score": "0.48391291", "text": "public function toXml($data, $rootNodeName = 'data', &$xml=null)\n {\n if ( ini_get('zend.ze1_compatibility_mode') == 1 ) ini_set ( 'zend.ze1_compatibility_mode', 0 );\n if ( is_null( $xml ) ) {\n $xml = simplexml_load_string(stripslashes(\"<?xml version='1.0' encoding='UTF-8'?><$rootNodeName></$rootNodeName>\"));\n }\n\n // loop through the data passed in.\n foreach( $data as $key => $value ) {\n\n // no numeric keys in our xml please!\n $numeric = false;\n if ( is_numeric( $key ) ) {\n $numeric = 1;\n $key = $rootNodeName;\n }\n\n // delete any char not allowed in XML element names\n $key = preg_replace('/[^a-z0-9\\-\\_\\.\\:]/i', '', $key);\n\n //check to see if there should be an attribute added (expecting to see _id_)\n $attrs = false;\n\n //if there are attributes in the array (denoted by attr_**) then add as XML attributes\n if ( is_array( $value ) ) {\n foreach($value as $i => $v ) {\n $attr_start = false;\n $attr_start = stripos($i, 'attr_');\n if ($attr_start === 0) {\n $attrs[substr($i, 5)] = $v; unset($value[$i]);\n }\n }\n }\n\n\n // if there is another array found recursively call this function\n if ( is_array( $value ) ) {\n if ( $this->is_assoc( $value ) || $numeric ) {\n // older SimpleXMLElement Libraries do not have the addChild Method\n if (method_exists('SimpleXMLElement','addChild')) {\n $node = $xml->addChild( $key, null);\n if ($attrs) {\n foreach($attrs as $key => $attribute) {\n $node->addAttribute($key, $attribute);\n }\n }\n }\n\n }else{\n $node =$xml;\n }\n\n // recrusive call.\n if ( $numeric ) $key = 'anon';\n\n $this->toXml( $value, $key, $node );\n } else {\n\n // older SimplXMLElement Libraries do not have the addChild Method\n if (method_exists('SimpleXMLElement','addChild')) {\n $childnode = $xml->addChild( $key, $value);\n if ($attrs) {\n foreach($attrs as $key => $attribute) {\n $childnode->addAttribute($key, $attribute);\n }\n }\n }\n }\n }\n\n if ($this->bFormatted) {\n // if you want the XML to be formatted, use the below instead to return the XML\n $doc = new \\DOMDocument('1.0');\n $doc->preserveWhiteSpace = false;\n @$doc->loadXML( $this->fixCDATA($xml->asXML()) );\n $doc->formatOutput = true;\n\n return $doc->saveXML();\n }\n\n // pass back as unformatted XML\n return $xml->asXML();\n }", "title": "" }, { "docid": "4b899dbbaf0de081027ded9f46540f6b", "score": "0.4835695", "text": "function toXML( $data, $rootNodeName = 'api', &$xml=null ) {\n if ( ini_get('zend.ze1_compatibility_mode') == 1 ) ini_set ( 'zend.ze1_compatibility_mode', 0 );\n if ( is_null( $xml ) ) //$xml = simplexml_load_string( \"\" );\n $xml = simplexml_load_string(xml_default($rootNodeName));\n\t\t\n // loop through the data passed in.\n foreach( $data as $key => $value ) {\n\t\t $key = xml_trim($key);\n $numeric = false;\n \n // no numeric keys in our xml please!\n if ( is_numeric( $key ) ) {\n $numeric = 1;\n $key = $rootNodeName;\n }\n\n // delete any char not allowed in XML element names\n $key = preg_replace('/[^a-z0-9\\-\\_\\.\\:]/i', '', $key);\n\n // if there is another array found recrusively call this function\n if ( is_array( $value ) ) {\n $node = isAssoc( $value ) || $numeric ? $xml->addChild( $key ) : $xml;\n\n // recrusive call.\n if ( $numeric ) $key = 'anon';\n toXml( $value, $key, $node );\n } else {\n// \t\t\tvar_dump($value);\n // add single node.\n $value = htmlentities( xml_trim($value) );\n $xml->addChild( $key, $value );\n }\n }\n\n // pass back as XML\n// return $xml->asXML();\n\n // if you want the XML to be formatted, use the below instead to return the XML\n $doc = new DOMDocument('1.0');\n $doc->preserveWhiteSpace = false;\n $doc->loadXML( $xml->asXML() );\n $doc->formatOutput = true;\n return $doc->saveXML();\n }", "title": "" }, { "docid": "55e92514156adfecc39b97b706681a84", "score": "0.48237863", "text": "function main()\n{\n $xml = new \\SimpleXMLElement('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><data\n xmlns:ns2=\"http://www.w3.org/2000/09/xmldsig#\"\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n \"></data>');\n\n $array = [];\n toXml($xml, $array);\n $filename = 'path/filename.xml';\n $xml->asXML($filename);\n}", "title": "" }, { "docid": "a5e12b151942171328a31acdc9910fd1", "score": "0.4804027", "text": "function array2xml($data)\n {\n global $TYPO3_CONF_VARS;\n $config = unserialize($TYPO3_CONF_VARS['EXT']['extConf']['wfqbe']);\n\n if ($config['mode'] == 'xml') {\n $line = \"\";\n\n foreach ($data as $key => $value) {\n\n if (is_numeric($key) && is_array($value)) {\n $key = \"content number='\" . $key . \"'\";\n $key2 = \"content\";\n } elseif (is_numeric($key)) {\n $key = \"item number='\" . $key . \"'\";\n $key2 = \"item\";\n } else {\n $key2 = $key;\n }\n if (is_array($value)) {\n $value = $this->array2xml($value);\n }\n if ($value != \"\")\n $line = $line . \"<$key>\" . $value . \"</$key2>\";\n }\n\n //$line = substr($line, 1);\n return $line;\n } else {\n return addslashes(serialize($data));\n }\n }", "title": "" }, { "docid": "a4751f7a45de7966fde4bab5ce335e54", "score": "0.47990853", "text": "public static function toXml($data, $rootNodeName = 'data', $xml = null) {\n // turn off compatibility mode as simple xml throws a wobbly if you don't.\n if (ini_get('zend.ze1_compatibility_mode') == 1) {\n ini_set('zend.ze1_compatibility_mode', 0);\n }\n\n if ($xml == null) {\n $xml = simplexml_load_string(\"<?xml version='1.0' encoding='utf-8'?><$rootNodeName />\");\n }\n\n // loop through the data passed in.\n foreach ($data as $key => $value) {\n // no numeric keys in our xml please!\n if (is_numeric($key)) {\n // make string key...\n $key = \"unknownNode_\" . (string) $key;\n }\n\n /// var_dump($key);\n // replace anything not alpha numeric\n $key = preg_replace('/[^a-z0-9_-]/i', '', $key);\n// var_dump($key);\n // if there is another array found recrusively call this function\n if (is_array($value)) {\n $node = $xml->addChild($key);\n // recrusive call.\n self::toXml($value, $rootNodeName, $node);\n } else {\n // add single node.\n $value = htmlentities($value);\n $xml->addChild($key, $value);\n }\n }\n // pass back as string. or simple xml object if you want!\n return $xml->asXML();\n }", "title": "" }, { "docid": "a1a81ae2227e3cccd347d513d734398b", "score": "0.47868", "text": "function array_to_xml($data, &$xml) {\n foreach($data as $key => $value) {\n if(is_array($value)) {\n if(!is_numeric($key)){\n $subNode = $xml->addChild(\"$key\");\n array_to_xml($value, $subNode);\n }else{\n $subNode = $xml->addChild(\"beer\");\n array_to_xml($value, $subNode);\n }\n }else {\n $xml->addChild(\"$key\",htmlspecialchars(\"$value\"));\n }\n }\n }", "title": "" }, { "docid": "75d01d2f156265b34a358edb3cfc5f5a", "score": "0.4785136", "text": "public function buildSchemaElement(): void;", "title": "" }, { "docid": "b3a3babce4e4a453f1672b49767f3cee", "score": "0.47814327", "text": "function drush_migration_samples_migration_preprocessing_xml() {\n drush_print(dt('Pre-processing the xmls...'));\n $files = [\n 'wrong_pattern.xml',\n 'right_pattern.xml',\n ];\n\n foreach ($files as $file) {\n // Read the file content.\n $file_path = DRUPAL_ROOT . '/migration_files/' . $file;\n $xml_string = file_get_contents($file_path);\n\n $xml_string = str_replace('my_page', 'page', $xml_string);\n // Saving updated data.\n file_put_contents($file_path, $xml_string);\n }\n\n // Pre-processing done.\n drush_log('Pre-processing is completed.','success');\n}", "title": "" }, { "docid": "e2b9da1fc3db9f84ace777b207ac96d0", "score": "0.47644782", "text": "function array_to_xml($soapRequest, $soapRequestXml)\n{\n foreach ($soapRequest as $key => $value) {\n if (is_array($value)) {\n if (!is_numeric($key)) {\n $subnode = $soapRequestXml->addChild(\"$key\");\n array_to_xml($value, $subnode);\n } else {\n $subnode = $soapRequestXml->addChild(\"item$key\");\n array_to_xml($value, $subnode);\n }\n } else {\n $soapRequestXml->addChild(\"$key\", htmlspecialchars(\"$value\"));\n }\n }\n}", "title": "" }, { "docid": "7083465e1c1ffee79d76ec8af12c974e", "score": "0.4751853", "text": "protected function toXml($data, $rootNodeName='data', $xml=null) {\n\t\t// turn off compatibility mode as simple xml throws a wobbly if you don't.\n\t\tif(ini_get('zend.ze1_compatibility_mode') == 1) {\n\t\t\tini_set ('zend.ze1_compatibility_mode', 0);\n\t\t}\n\t\tif($xml == null) {\n\t\t\t$xml = simplexml_load_string(\"<?xml version='1.0' encoding='utf-8'?><$rootNodeName />\");\n\t\t}\n\t\tforeach($data as $key => $value) {\n\t\t\tif(is_numeric($key)) {\n\t\t\t\t$key = \"unknownNode_\" . (string)$key;//bez liczb jako znaczniki\n\t\t\t}\n\t\t\t//zamiana wszystkiego co nie jest znakiem alfanumerycznym na ciag pusty\n\t\t\t$key = preg_replace('/[^a-z0-9]/i', '', $key);\n\t\t\tif (is_array($value)) { //jesli wartosc jest tablica, wywolanie rekursywne\n\t\t\t\t$node = $xml->addChild($key);\n\t\t\t\t$this->toXml($value, $rootNodeName, $node);\n\t\t\t}\n\t\t\telse { //w innym wypadku dodanie elementu\n //$value = htmlentities($value);\n\t\t\t\t$xml->addChild($key,$value);\n\t\t\t}\n\t\t}\n\t\treturn $xml->asXML();\n\t\t\n\t}", "title": "" }, { "docid": "a052c11adb4cafc806ec0a7e7ebb9603", "score": "0.46671748", "text": "function extractData($xpath, $xml, $schema){\n\t\n\t$newRecs = array();\n\tforeach($schema as $elementKey => $elemArray){\n\t \n\t $query = \"//\".$elemArray[\"xpath\"];\n\t \n\t $result = $xpath->query($query, $xml);\n\t foreach($result as $node){\n\t\t\n\t\t$queryValue = $node->nodeValue;\n\t\t$addNewRec = false;\n\t\t\n\t\t\n\t\tif(is_array($elemArray[\"children\"])){\n\t\t //if there are children elements in schema, don't add query value to results\n\t\t //query children elements\n\t\t $this->extractData($xpath, $xml, $elemArray[\"children\"]);\n\t\t}\n\t\telse{\n\t\t //no child elements in schema to query, add query value to the results array\n\t\t $addNewRec = true;\n\t\t}\n\t\t\n\t\tif($addNewRec){\n\t\t $newRecs[] = array(\"path\" => $elemArray[\"xpath\"],\n\t\t\t\t \"label\" => $elemArray[\"label\"],\n\t\t\t\t \"type\" => $elemArray[\"type\"],\n\t\t\t\t \"value\" => $queryValue\n\t\t\t\t );\n\t\t}\n\t\t\n\t\tif(is_array($elemArray[\"attributes\"])){\n\t\t //if there are attributes, query for these also\n\t\t $this->extractData($xpath, $xml, $elemArray[\"attributes\"]);\n\t\t}\n\t\t\n\t }\n\t}\n\t\n\t$recordData = $this->recordData;\n\tforeach($newRecs as $rec){\n\t $recordData[] = $rec;\n\t}\n\t$this->recordData = $recordData;\n\t\n }", "title": "" }, { "docid": "a80fd8fec4bf612edcba476d433b1314", "score": "0.46460488", "text": "private function to_xml($data){\n // creating object of SimpleXMLElement\n $xml = new SimpleXMLElement(\"<?xml version=\\\"1.0\\\"?><response></response>\");\n\n // function call to convert array to xml\n $this->array_to_xml($data, $xml);\n return $xml->asXML();\n }", "title": "" }, { "docid": "5c1267b691206e8be90a07147e5ab206", "score": "0.46413392", "text": "function _publication_xml_load_replace($value){\n return $value;\n}", "title": "" }, { "docid": "3ee6a9d539db701f91667ef429f0c5ef", "score": "0.46378568", "text": "function convert_schema_list_to_xml($schema_list){\n\t$xml = \"<?xml version=\\\"1.0\\\" encoding=\\\"ISO-8859-1\\\"?>\\n\";\n\t$n_schemas = count($schema_list);\n\t$schema_names = array_keys($schema_list);\n\t$xml .= \"<schemas>\";\n\t// note: the javascript xml parser is picky\n\t// about the newline character, so a \\n after\n\t// opening <schema> will actually register as\n\t// a child of <schema>\n\tfor($i = 0; $i < $n_schemas; $i++)\n\t\t$xml .= \"<schema>\"\n\t\t\t\t. \"<id>\" . $schema_list[$schema_names[$i]] . \"</id>\"\n\t\t\t\t. \"<name>\" . $schema_names[$i] . \"</name>\"\n\t\t\t\t. \"</schema>\\n\";\n\t$xml .= \"</schemas>\";\n\treturn $xml;\n}", "title": "" }, { "docid": "5f5fbf6954f132e707a9d002ed124a88", "score": "0.46209508", "text": "private function setup_xml()\n\t{\n\t\t$db_schema_xml=new \\DOMDocument();\n\t\t$db_schema_xml->load(\"../db/master_db_schema.xml\");\n\t\t$db_schema=$db_schema_xml->documentElement;\n\t\t\n\t\tforeach($db_schema->childNodes as $table)\n\t\t{\n\t\t\t$table_name=$table->nodeName;\n\t\t\tif($table_name!='#text')\n\t\t\t{\n\t\t\t\t$q_string=\"create table $table_name (\";\n\t\t\t\t\t\n\t\t\t\tforeach($table->childNodes as $column)\n\t\t\t\t{\n\t\t\t\t\tif($column->nodeName!='#text' && $column->nodeName!='#comment')\n\t\t\t\t\t\t$q_string.=$column->nodeName.\" \".$column->getAttribute('type').\" ,\";\n\t\t\t\t}\n\t\t\t\t$q_string.=\"PRIMARY KEY (id));\";\n\t\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\t$this->conn->conn->exec($q_string);\n\t\t\t\t}catch(PDOException $ex)\n\t\t\t\t{\n\t\t\t\t\techo \"Could not create table $table_name: \" .$ex->getMessage() .\"</br>\";\n\t\t\t\t}\n\t\t\t\techo \"Table $table_name created successfully</br>\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a56aec9ec5f8fc71519f8e95271988d7", "score": "0.46196696", "text": "function parseXML(){\n\t\n\t$xml = new DOMDocument();\n\t$xml->loadXML($this->xmlString);\n\t$xpath = new DOMXPath($xml);\n\tforeach($this->nameSpaces as $prefix => $uri){\n\t $xpath->registerNamespace($prefix, $uri); //get those namespaces registered!\n\t}\n\t\n\t$SchemaNCScow = new SchemaNCScow;\n\t$SchemaNCScow->getXSD();\n\tif($SchemaNCScow->xsdString != false){\n\t $SchemaNCScow->parseXSD();\n\t}\n\t\n\tif(is_array($SchemaNCScow->schema)){\n\t $recordData = array();\n\t $this->recordData = $recordData;\n\t $this->extractData($xpath, $xml, $SchemaNCScow->schema);\n\t}\n\t\n }", "title": "" }, { "docid": "18895cb2c5654b96e6aa0f8ad086e34d", "score": "0.4618919", "text": "function array_to_xml( $data, &$xml_data ) {\n foreach( $data as $key => $value ) {\n if( is_numeric($key) ){\n $key = 'item'.$key; //dealing with <0/>..<n/> issues\n }\n if( is_array($value) ) {\n $subnode = $xml_data->addChild($key);\n array_to_xml($value, $subnode);\n } else {\n $xml_data->addChild(\"$key\",htmlspecialchars(\"$value\"));\n }\n }\n}", "title": "" }, { "docid": "b23567205319562b6f62f7ad4204e91c", "score": "0.4615266", "text": "function toXml(\\SimpleXMLElement $node, array $data)\n{\n foreach ($data as $key => $value) {\n $key = $value['key'];\n if (isset($value['value'])) {\n $newNode = $node->addChild($key, $value['value']);\n if (isset($value['attributes'])) {\n foreach ($value['attributes'] as $keyAttr => $valueAttr) {\n $newNode->addAttribute($keyAttr, $valueAttr);\n }\n }\n } else {\n $newNode = $node->addChild($key);\n if (isset($value['attributes'])) {\n foreach ($value['attributes'] as $keyAttr => $valueAttr) {\n $newNode->addAttribute($keyAttr, $valueAttr);\n }\n }\n }\n if (isset($value['fields'])) {\n foreach ($value['fields'] as $keyField => $valueField) {\n toXml($newNode, [$keyField => $valueField]);\n }\n }\n }\n}", "title": "" }, { "docid": "bc808125651698918a5d0306d9bdfc8b", "score": "0.46104038", "text": "public function BindDataFromXml($stringXml) {\n\t\tif (empty($stringXml)) {\n\t\t\treturn null;\n\t\t}\n\t\t$temp = simplexml_load_string($stringXml);\n\t\tif (!$temp) {\n\t\t\treturn null;\n\t\t}\n\t\t$data = array();\n\t\tforeach ($temp as $key => $value) {\n\t\t\t// Force the value as string instead of SimpleXmlElement Object.....\n\t\t\t$data[$key] = \"\" . $value;\n\t\t}\n\t\treturn $this->BindData($data);\n\t}", "title": "" }, { "docid": "53f8314ad7fd82bc05c80957640836f5", "score": "0.46090308", "text": "public static function toXml($data, $rootNodeName = 'data', &$xml = NULL) {\n if (is_null($xml)) {\n $xml = new SimpleXMLElement('<' . $rootNodeName . '/>');\n }\n\n // loop through the data passed in.\n foreach($data as $key => $value) {\n // if numeric key, assume array of rootNodeName elements\n if (is_numeric($key)) {\n $key = $rootNodeName;\n }\n // Check if is attribute\n if($key == ArrayToXML::attr_arr_string) {\n // Add attributes to node\n foreach($value as $attr_name => $attr_value) {\n $xml->addAttribute($attr_name, $attr_value);\n }\n } else {\n // delete any char not allowed in XML element names\n $key = preg_replace('/[^a-z0-9\\-\\_\\.\\:]/i', '', $key);\n\n // if there is another array found recrusively call this function\n if (is_array($value)) {\n\n // create a new node unless this is an array of elements\n $node = ArrayToXML::isAssoc($value) ? $xml->addChild($key) : $xml;\n\n // recrusive call - pass $key as the new rootNodeName\n ArrayToXML::toXml($value, $key, $node);\n } else {\n // add single node.\n $value = htmlentities($value);\n $xml->addChild($key,$value);\n }\n }\n }\n // pass back as string. or simple xml object if you want!\n return $xml->asXML();\n }", "title": "" }, { "docid": "2bfd59ae1c665abcd215da899d02e6dc", "score": "0.46066117", "text": "function xmlToObject() {\n\t\t$parser = xml_parser_create();\n\t\txml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\n\t\txml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\n\t\txml_parse_into_struct($parser, $this -> xml, $nodes);\n\t\txml_parser_free($parser);\n\t\t$arr = array();\n\t\t$stack = array();\n\t\tforeach ($nodes as $node) {\n\t\t\t//Fix for the node TryCData\n\t\t\tif ($node['tag'] == 'TryCData') {\n\t\t\t\t$node['value'] = '&lt;![CDATA[' . $node['value'] . ']]&gt;';\n\t\t\t}\n\t\t\t//Fix for the cdata-type returned by the parser\n\t\t\tif ($node['type'] == 'cdata') {\n\t\t\t\t$node['type'] = 'complete';\n\t\t\t}\n\t\t\t$ind = count($arr);\n\t\t\tif ($node['type'] == 'open' || $node['type'] == 'complete') {\n\t\t\t\t$arr[$ind] = array();\n\t\t\t\t$arr[$ind]['name'] = $node['tag'];\n\t\t\t\t$arr[$ind]['attributes'] = isset($node['attributes']) ? $node['attributes'] : array();\n\t\t\t\t$arr[$ind]['Value'] = isset($node['value']) ? $node['value'] : '';\n\t\t\t\tif ($node['type'] == 'open') {\n\t\t\t\t\t$arr[$ind]['children'] = array();\n\t\t\t\t\t$stack[count($stack)] = &$arr;\n\t\t\t\t\t$arr = &$arr[$ind]['children'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($node['type'] == 'close') {\n\t\t\t\t$arr = &$stack[count($stack) - 1];\n\t\t\t\tunset($stack[count($stack) - 1]);\n\t\t\t}\n\t\t}\n\t\t//now checking if there is a node that contained a value but ended up with children (see the cdata-fix)\n\t\t$arr[0] = $this -> correctArray($arr[0]);\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "6522e69c5a96e3777f6b73269684227b", "score": "0.459775", "text": "protected function toXml($data, &$xml)\n {\n foreach ($data as $key => $value) {\n if (is_array($value)) {\n if (is_numeric($key)) {\n $this->toXml($value, $xml);\n } else {\n $this->toXml($value, $xml->addChild($key));\n }\n } else {\n $xml->addChild(\"$key\", \"$value\");\n }\n }\n }", "title": "" }, { "docid": "b47c66b0d5bdfe8c48b2d2f7e8c68d63", "score": "0.45871875", "text": "function set_XML($timeStamp, $traceUniqueId, $ussdString, $msgType, $ussdOpType, $msisdn, $interface, $current_service)\r\n{\r\n return '<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n <soapenv:Header>\r\n <ns1:NotifySOAPHeader xmlns:ns1=\"http://www.huawei.com.cn/schema/common/v2_1\">\r\n <ns1:spId>'.$current_service->sp_id.'</ns1:spId>\r\n <ns1:serviceId>'.$current_service->service_sdp_id.'</ns1:serviceId>\r\n <ns1:timeStamp>'. $timeStamp. '</ns1:timeStamp>\r\n <ns1:linkid>09090943076202503225</ns1:linkid>\r\n <ns1:traceUniqueID>'. $traceUniqueId.'</ns1:traceUniqueID>\r\n <ns1:OperatorID>24201</ns1:OperatorID>\r\n </ns1:NotifySOAPHeader>\r\n </soapenv:Header>\r\n <soapenv:Body>\r\n <ns2:notifyUssdReception xmlns:ns2=\"http://www.csapi.org/schema/parlayx/ussd/notification/v1_0/local\">\r\n <ns2:msgType>'.$msgType.'</ns2:msgType>\r\n <ns2:senderCB>1904855568</ns2:senderCB>\r\n <ns2:receiveCB>FFFFFFFF</ns2:receiveCB>\r\n <ns2:ussdOpType>'.$ussdOpType.'</ns2:ussdOpType>\r\n <ns2:msIsdn>'. $msisdn. '</ns2:msIsdn>\r\n <ns2:serviceCode>166</ns2:serviceCode>\r\n <ns2:codeScheme>15</ns2:codeScheme>\r\n <ns2:ussdString>'.$ussdString.'</ns2:ussdString>\r\n <ns2:ussdInterface>'.$interface.'</ns2:ussdInterface>\r\n </ns2:notifyUssdReception>\r\n </soapenv:Body>\r\n</soapenv:Envelope>';\r\n}", "title": "" }, { "docid": "f38decac61dc5dc6a6b1958043eff3fe", "score": "0.4580116", "text": "function json2array($data) {\r\n $jsonArr = json_decode($data, true);\r\n $convertedXML = array2xml($jsonArr);\r\n echo \"Converted XML: \" . $convertedXML . \"</br></br>\";\r\n return ('\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<?xml-stylesheet type=\"text/xml\" href=\"#stylesheet\"?>\r\n<!DOCTYPE catelog [\r\n<!ATTLIST xsl:stylesheet\r\n id ID #REQUIRED>\r\n]>\r\n<full-response>\r\n<xsl:stylesheet id=\"stylesheet\" version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"> \r\n<xsl:template match=\"/\">\r\n<html>\r\n <body>\r\n <h2 align=\"center\">Results</h2>\r\n <table border=\"1\" width=\"100%\" align=\"center\" style=\"font:10px Arial;\" >\r\n <tr height=\"50px\" bgcolor=\"#00FFFF\">\r\n <xsl:for-each select=\"full-response/list/list-item/item\">\r\n <th style=\"table-layout:fixed; width:50px\">\r\n <xsl:value-of select=\"@key\"/>\r\n </th>\r\n </xsl:for-each>\r\n </tr>\r\n </table>\r\n <table border=\"1\" width=\"100%\" align=\"center\" style=\"font:10px Arial;\">\r\n <tr height=\"100px\">\r\n <xsl:for-each select=\"full-response/list/list-item/item\">\r\n <th style=\"table-layout:fixed; width:50px\">\r\n <xsl:value-of select=\"text()\"/>\r\n </th>\r\n </xsl:for-each>\r\n </tr>\r\n </table>\r\n </body>\r\n</html>\r\n</xsl:template>\r\n</xsl:stylesheet>'\r\n.$convertedXML.\r\n'</full-response>'\r\n);}", "title": "" }, { "docid": "cc7244c7bfe8be5a3eb64bddbfdbafba", "score": "0.45746723", "text": "public function dispatch_schema_data( $data = array() ) {\n\t\t// First up, global stuff\n\t\t$site = $this->get_site_schema_data();\n\t\tif ( ! empty( $site ) ) {\n\t\t\t$data[] = $site;\n\t\t}\n\n\t\t// Next up, individual (if applicable)\n\t\tif ( $this->apply_filters( 'is_singular', is_singular() ) ) {\n\t\t\t$post = $this->get_post_schema_data( $this->apply_filters( 'post', get_post() ) );\n\t\t\tif ( ! empty( $post ) ) {\n\t\t\t\t$data[] = $post;\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "d41b33757912e99444684a907361416e", "score": "0.45701995", "text": "abstract public function toXML();", "title": "" }, { "docid": "50e52fa56c4582b23345711475153a12", "score": "0.45693797", "text": "function do_xml_replace($string)\n{\n $data = str_replace(array('&', '\"', \"'\", '<', '>'), array('&amp;', '&quot;', '&apos;', '&lt;', '&gt;'), $string);\n preg_match_all('/([\\x09\\x0a\\x0d\\x20-\\x7e]' . // ASCII characters\n '|[\\xc2-\\xdf][\\x80-\\xbf]' . // 2-byte (except overly longs)\n '|\\xe0[\\xa0-\\xbf][\\x80-\\xbf]' . // 3 byte (except overly longs)\n '|[\\xe1-\\xec\\xee\\xef][\\x80-\\xbf]{2}' . // 3 byte (except overly longs)\n '|\\xed[\\x80-\\x9f][\\x80-\\xbf])+/', // 3 byte (except UTF-16 surrogates)\n $data, $clean_pieces);\n $clean_output = join('?', $clean_pieces[0]);\n return $clean_output;\n}", "title": "" }, { "docid": "476a38f5f24b2830901a9ae802c2a689", "score": "0.4556163", "text": "private function postData()\n {\n return $this->post->asXML();\n }", "title": "" }, { "docid": "98cac713536736c65afbb4797b88d164", "score": "0.45513588", "text": "private function array_to_xml($data, &$xml) {\n foreach($data as $key => $value) {\n if(is_array($value)) {\n if(!is_numeric($key)){\n $subnode = $xml->addChild(\"$key\");\n $this->array_to_xml($value, $subnode);\n }\n else{\n $this->array_to_xml($value, $xml);\n }\n }\n else {\n $xml->addChild(\"$key\",\"$value\");\n }\n }\n }", "title": "" }, { "docid": "69c9387009f1e94e19bdd69897fd5e9d", "score": "0.4549475", "text": "public function fromXML($value);", "title": "" }, { "docid": "4a1211904ca605f9bdc33a68a2d2a5b7", "score": "0.45221457", "text": "public static function preprocessXml( & $xml) {\t\t\n\t\t\n\t\tif ( empty(PMXI_Plugin::$session->is_csv) and empty(PMXI_Plugin::$is_csv)){ \n\t\t\n\t\t\tself::$cdata = array();\t\t\t\n\n\t\t\t$xml = preg_replace_callback('/<!\\[CDATA\\[[^\\]\\]>]*\\]\\]>/s', 'pmxi_cdata_filter', $xml );\n\n\t\t\t$xml = str_replace(\"&\", \"&amp;\", str_replace(\"&amp;\",\"&\", $xml));\n\n\t\t\tif ( ! empty(self::$cdata) ){\n\t\t\t foreach (self::$cdata as $key => $val) {\n\t\t\t $xml = str_replace('{{CPLACE_' . ($key + 1) . '}}', $val, $xml);\n\t\t\t }\n\t\t\t}\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "5638ebd8f7f00d786c23dde966d7d816", "score": "0.45192665", "text": "function export_prepare_xml($dirty) {\n\n // No need for XML-entities anymore\n // Remark: Due to inconsistent replacing in earlier questions\n // (before my time), sometimes instead of &lt;\n // appears &amp;lt; . We have to fix that first.\n $dirty = preg_replace('/\\&amp;/i', '&', $dirty);\n // Replace certain special characters without\n // representation in ASCII charset by their LaTeX-representation\n $dirty = preg_replace('/\\&#8730;/i', '$\\sqrt{}$', $dirty);\n $dirty = preg_replace('/\\&gamma;/i', '$\\gamma$', $dirty);\n // &#92; stands for a text backslash\n $dirty = preg_replace('/\\&#92;/i', '\\\\textbackslash ', $dirty);\n // Replace other XML-entities\n $dirty = html_entity_decode($dirty, ENT_QUOTES);\n\n // Implement <br> and <br/>\n $dirty = preg_replace('/<br[\\s\\/]*?>/i', '\\\\\\\\\\\\\\\\', $dirty);\n\n // Handle text formatting\n $dirty = preg_replace('/<i>(.*?)<\\/i>/six', '\\\\\\\\emph{\\\\1}', $dirty);\n $dirty = preg_replace('/<span\\s*?style=(?:\\\"|\\')\\s*?font-style\\s*?:' .\n '\\s*?italic\\s*?;(?:\\\"|\\')>(.*?)<\\/span>/is',\n '\\\\\\\\emph{\\\\1}', $dirty);\n $dirty = preg_replace('/<b>(.*?)<\\/b>/six', '\\\\\\\\textbf{\\\\1}', $dirty);\n $dirty = preg_replace('/<span\\s*?style=(?:\\\"|\\')\\s*?font-weight\\s*?:' .\n '\\s*?bold\\s*?;(?:\\\"|\\')>(.*?)<\\/span>/is',\n '\\\\\\\\textbf{\\\\1}', $dirty);\n\n // Handle hyperlinks (simply replace them by their\n // destination, needs to be corrected by hand most probably)\n $dirty = preg_replace('/<a[^>]*?href=(?:\\\"|\\')(.*?)(?:\\\"|\\')[^>]*?>' .\n '.*?<\\/a>/is', '\\\\\\\\emph{\\\\1}', $dirty);\n\n // Handle Umlaute. Here we may simply use str_replace\n $dirty = str_replace('ö', '\\\\\"o', $dirty);\n $dirty = str_replace('Ö', '\\\\\"O', $dirty);\n $dirty = str_replace('ä', '\\\\\"a', $dirty);\n $dirty = str_replace('Ä', '\\\\\"a', $dirty);\n $dirty = str_replace('ü', '\\\\\"u', $dirty);\n $dirty = str_replace('Ü', '\\\\\"U', $dirty);\n $dirty = str_replace('ß', '\\\\\"s', $dirty);\n\n \n \n // Handle formulae depending on the filter used by Moodle. \n if ($this->renderengine === self::FLAG_FILTER_TEX) {\n \t// First we put everything in single $\n \t$dirty = preg_replace('/\\${2}/', '$', $dirty); \t\n \t// Then we add a $ for special paragraphs\n \t$dirty = preg_replace('/<p[^>]*?class=\\'formula\\'>(.*?)<\\/p>/',\n \t\t\t'\\$\\\\1\\$', $dirty);\n } else if ($this->renderengine === self::FLAG_FILTER_JSMATH) {\n \t// First we put everything in single $\n \t$dirty = preg_replace('/\\\\\\\\\\((.*?)\\\\\\\\\\)/', '\\$\\\\1\\$', $dirty);\n \t// Then we add a $ for special paragraphs\n \t$dirty = preg_replace('/<p[^>]*?class=\\'formula\\'>(.*?)<\\/p>/',\n \t\t\t'\\$\\\\1\\$', $dirty);\n } else if ($this->renderengine === self::FLAG_FILTER_MATHJAX) {\n \t// MathJax uses \\( \\) for inline formulae.\n \t$dirty = preg_replace('/\\\\\\\\\\((.*?)\\\\\\\\\\)/', '\\$\\\\1\\$', $dirty);\n \t// MathJax uses $$ $$ for block-format (nothing to be done here).\n }\n \n $dirty = preg_replace('/<p.*?>(.*?)<\\/p>/', '\\\\1', $dirty);\n \n return $dirty;\n }", "title": "" }, { "docid": "93fa86c28b39af75d0d9b899cebc30c1", "score": "0.45104247", "text": "function save_layout_xml($sxe) {\n\n\t\n\n\tif (empty($_POST['page_title']))\n\n $_POST['page_title'] = \"\";\n\n if (empty($_POST['cs_layout']))\n\n $_POST['cs_layout'] = \"\";\n\n if (empty($_POST['cs_sidebar_left']))\n\n $_POST['cs_sidebar_left'] = \"\";\n\n if (empty($_POST['cs_sidebar_right']))\n\n $_POST['cs_sidebar_right'] = \"\";\n\n\t\t$sxe->addChild('page_title', $_POST['page_title']);\n\t\n\t\t$sidebar_layout = $sxe->addChild('sidebar_layout');\n\n\t\t$sidebar_layout->addChild('cs_layout', $_POST[\"cs_layout\"]);\n\n\t\tif ($_POST[\"cs_layout\"] == \"left\") {\n\n\t\t\t$sidebar_layout->addChild('cs_sidebar_left', $_POST['cs_sidebar_left']);\n\n\t\t} else if ($_POST[\"cs_layout\"] == \"right\") {\n\n\t\t\t$sidebar_layout->addChild('cs_sidebar_right', $_POST['cs_sidebar_right']);\n\n\t\t}else if ($_POST[\"cs_layout\"] == \"both_right\" or $_POST[\"cs_layout\"] == \"both_left\" or $_POST[\"cs_layout\"] == \"both\") {\n\n\t\t\t$sidebar_layout->addChild('cs_sidebar_left', $_POST['cs_sidebar_left']);\n\n\t\t\t$sidebar_layout->addChild('cs_sidebar_right', $_POST['cs_sidebar_right']);\n\n\t\t}\n\n return $sxe;\n\n}", "title": "" }, { "docid": "dc1da1155265ac80bfbfbcc14a9aac8b", "score": "0.4495787", "text": "function arr2xml(&$arr, &$xml){\n if(is_array($arr)){\n foreach ($arr as $key => $value){\n $value = $value == NULL ? 'NULL' :$value; // converting NULL to 'NULL'\n $type = gettype($value);\n if($type == 'array'){\n $arr_child = $arr[$key];\n $xml_child = $xml->addChild($key);\n arr2xml($arr_child, $xml_child);\n }elseif($type==\"boolean\" or $type==\"integer\" or $type==\"double\" or $type==\"string\"){\n $xml->addChild($key, $value);\n }\n }\n }elseif(is_string($arr)){\n $xml->addChild('MESSAGE', $arr);\n }\n}", "title": "" }, { "docid": "b2c538d2b8ba45029108a990ba307d37", "score": "0.44884458", "text": "function to_xml(SimpleXMLElement $object, array $data)\r\n{ \r\n foreach ($data as $key => $value) {\r\n if (is_array($value)) {\r\n $new_object = $object->addChild($key);\r\n to_xml($new_object, $value);\r\n } else {\r\n // if the key is an integer, it needs text with it to actually work.\r\n if ($key == (int) $key) {\r\n $key = \"key_$key\";\r\n }\r\n\r\n $object->addChild($key, $value);\r\n } \r\n } \r\n return $object;\r\n}", "title": "" }, { "docid": "515cb72b4022fd899f1973d8b032c3fc", "score": "0.4488019", "text": "public function xml(): \\SimpleXMLElement|null\n {\n $xml = null;\n if (str_starts_with($this->content_type, 'application/xml')) {\n $r = simplexml_load_string($this->raw_data);\n if ($r instanceof \\SimpleXMLElement) {\n $xml = $r;\n }\n }\n\n return $xml;\n }", "title": "" }, { "docid": "77aa2a4d2bb9ce95cba395f3f8ac0d3f", "score": "0.44777402", "text": "public function formatXML() {\n $orig = $this->text;\n\n // check for <p> tags, and if none, then add them to each line\n if (strpos($orig, \"<p>\") === false && strpos($orig, \"<objectXML\") === false) {\n $new = \"\";\n foreach (preg_split(\"/((\\r?\\n)|(\\r\\n?))/\", $orig) as $par) {\n if (!empty(trim($par))) {\n $new .= \"<p>\".htmlentities(trim($par), ENT_COMPAT|ENT_XML1).\"</p>\\n\"; \n }\n } \n $orig = $new;\n } else if (strpos($orig, \"<objectXML\") !== false) {\n $orig = str_replace(\"xmlns=\\\"\\\"\", \"xmlns=\\\"http://socialarchive.iath.virginia.edu/control/term#snacAdHocRandD\\\"\", $orig);\n }\n\n $this->text = $orig;\n }", "title": "" }, { "docid": "c18ffb951b63c5a6d52c16d80242d63b", "score": "0.4476088", "text": "protected function setXMLSchema($xml){\r\n\t\t\t$this->_xml_schema = $xml;\r\n\t\t}", "title": "" }, { "docid": "ed03e01189501fa68d917763897a1184", "score": "0.44719493", "text": "protected static function convertXmlToArray(\\SimpleXMLElement $data) {\n $result = array();\n foreach ((array) $data as $index => $node) {\n $result[$index] = (is_object($node)) ? static::convertXmlToArray($node) : trim(strval($node));\n }\n return $result;\n }", "title": "" }, { "docid": "de37092bac929588e1be44d2d40891ff", "score": "0.44645128", "text": "function create_xml($records) {\n\t\t\t//before creating new xml, first filter the xml\n\t\t\t$xml = new SimpleXMLElement('<data></data>');\n\t\t\tforeach($records as $record) {\n\t\t\t\t$xml_record = $xml->addChild('record');\n\t\t\t\tforeach ($record as $key => $value) {\n\t\t\t\t\t$xml_record->addChild($key, $value);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $xml->asXML();\n\t\t}", "title": "" }, { "docid": "c61b8ed35bb6a4991b30a644bc93aaa5", "score": "0.44576094", "text": "function to_xml($object, $root = 'data', $xml = NULL, $unknown = 'element', $doctype = \"<?xml version = '1.0' encoding = 'utf-8'?>\") {\n if (is_null($xml)) {\n $xml = simplexml_load_string(\"$doctype<$root/>\");\n }\n\n foreach ((array) $object as $k => $v) {\n if (is_int($k)) {\n $k = $unknown;\n }\n\n if (is_scalar($v)) {\n $xml->addChild($k, h($v));\n } else {\n $v = (array) $v;\n $node = array_diff_key($v, array_keys(array_keys($v))) ? $xml->addChild($k) : $xml;\n $this->from($v, $k, $node);\n }\n }\n\n return $xml;\n}", "title": "" }, { "docid": "4874701fb34e36bdd984dcff39bbf3c4", "score": "0.44548726", "text": "function createPayload()\n {\n $this->payload = $this->xml_header();\n $this->payload .= '<methodName>' . $this->methodname . \"</methodName>\\n\";\n $this->payload .= \"<params>\\n\";\n for ($i = 0; $i < sizeof($this->params); $i++) {\n $p = $this->params[$i];\n $this->payload .= \"<param>\\n\" . $p->serialize() . \"</param>\\n\";\n }\n $this->payload .= \"</params>\\n\";\n $this->payload .= $this->xml_footer();\n if ($this->remove_extra_lines) {\n $this->payload = preg_replace(\"@[\\r\\n]+@\", \"\\r\\n\", $this->payload);\n } else {\n $this->payload = preg_replace(\"@\\r\\n|\\n|\\r|\\n\\r@\", \"\\r\\n\", $this->payload);\n }\n if ($this->convert_payload_encoding) {\n $this->payload = mb_convert_encoding($this->payload, $this->send_encoding);\n }\n }", "title": "" }, { "docid": "fe9071f9bbbb799c51384c4123623ad2", "score": "0.44523305", "text": "public static function from_plain_array($params = array(), $root_node='data', $use_cdata = false)\n\t{\n\t\tif (!is_array($params))\n\t\t\treturn null;\n\t\t\t\t\n\t\t$xml_string = '<'.$root_node.'></'.$root_node.'>';\n\t\t$document = new SimpleXMLElement($xml_string);\n\n\t\tif (!is_array($params))\n\t\t\treturn $document;\n\n\t\tforeach ($params as $field=>$value)\n\t\t{\n\t\t\tself::create_node($document, null, $field, $value, $use_cdata);\n\t\t}\n\n\t\treturn Xml::beautify_xml($document);\n\t}", "title": "" }, { "docid": "c0dfe6abe0a28d1e867e6671b8667ad1", "score": "0.44508505", "text": "function DoXML() {\n global $DB;\n\n $fp = fopen($this->FilePath, 'wb');\n fputs($fp, \"<?xml version=\\\"1.0\\\"?>\\n\");\n fputs($fp, \"<dataxml>\\n\");\n\n foreach ($this->SqlString as $strqry) {\n if ($strqry == \"\") {\n $this->IsError = 1;\n $this->ErrorString = \"Error the query can't be a null string\";\n return -1;\n }\n $result = $DB->query($strqry);\n\n if ($result == false) {\n $this->IsError = 1;\n $this->ErrorString = \"Error in SQL Query: \".$strqry;\n return -1;\n }\n // OK... let's create XML;)\n fputs($fp, \" <fields>\\n\");\n $i = 0;\n $FieldsVector = [];\n while ($i < $DB->numFields ($result)) {\n $name = $DB->fieldName($result, $i);\n fputs($fp, \" <field>\".$name.\"</field>\\n\");\n $FieldsVector[] = $name;\n $i++;\n }\n\n fputs($fp, \" </fields>\\n\");\n // And NOW the Data ...\n fputs($fp, \" <rows>\\n\");\n while ($row = $DB->fetchRow($result)) {\n fputs($fp, \" <row>\\n\");\n for ($j=0; $j<$i; $j++) {\n $FieldName = \"\"; // Name of TAG\n $Attributes = \"\";\n switch ($this->Type) {\n case 1 :\n $FieldName = \"data\";\n break;\n\n case 2 :\n $FieldName = \"data\".$j;\n break;\n\n case 3 :\n $FieldName = $FieldsVector[$j];\n break;\n\n case 4 :\n $FieldName = \"data\";\n $Attributes = \" fieldname=\\\"\".$FieldsVector[$j].\"\\\"\";\n }\n fputs($fp, \" <\".$FieldName.$Attributes.\">\".\n Toolbox::encodeInUtf8(htmlspecialchars($row[$j])).\"</\".$FieldName.\">\\n\");\n }\n fputs($fp, \" </row>\\n\");\n }\n fputs($fp, \" </rows>\\n\");\n\n $DB->freeResult($result);\n }\n fputs($fp, \"</dataxml>\");\n //OK free ...;)\n fclose($fp);\n\n }", "title": "" }, { "docid": "524f4502fc719766118c1f937362f89f", "score": "0.44441736", "text": "public function insert_value_array($schema, $tag, $values);", "title": "" }, { "docid": "0ea9d01186dc1140e0eab3d3c3c8b0b1", "score": "0.44328448", "text": "function _presto_xml2array(array $arr, SimpleXMLElement $sxml)\n{\n foreach ($arr as $k => $v) {\n if (is_array($v)) {\n _presto_xml2array($v, $sxml->addChild($k));\n }\n else if (is_int($k)) {\n $sxml->addChild(\"var\", $v);\n }\n else {\n $sxml->addChild($k, $v);\n }\n }\n \n return $sxml;\n}", "title": "" }, { "docid": "9d75b424ba898e3eb740efd17343224d", "score": "0.44325903", "text": "public static function transformData($content);", "title": "" }, { "docid": "ed69d6846e78f256026dd9aee2ef8da6", "score": "0.44265875", "text": "public function Xss_Clean($data) \n { \n // If its empty there is no point cleaning it :\\ \n if(empty($data)) \n return $data; \n \n // Recursive loop for arrays \n if(is_array($data)) \n { \n foreach($data as $key => $value) \n { \n $data[$key] = $this->Xss_Clean($data); \n } \n \n return $data; \n } \n \n // http://svn.bitflux.ch/repos/public/popoon/trunk/classes/externalinput.php \n // +----------------------------------------------------------------------+ \n // | Copyright (c) 2001-2006 Bitflux GmbH | \n // +----------------------------------------------------------------------+ \n // | Licensed under the Apache License, Version 2.0 (the \"License\"); | \n // | you may not use this file except in compliance with the License. | \n // | You may obtain a copy of the License at | \n // | http://www.apache.org/licenses/LICENSE-2.0 | \n // | Unless required by applicable law or agreed to in writing, software | \n // | distributed under the License is distributed on an \"AS IS\" BASIS, | \n // | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | \n\n // | implied. See the License for the specific language governing | \n // | permissions and limitations under the License. | \n // +----------------------------------------------------------------------+ \n // | Author: Christian Stocker <[email protected]> | \n // +----------------------------------------------------------------------+ \n \n // Fix &entity\\n; \n $data = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $data); \n $data = preg_replace('/(&#*\\w+)[\\x00-\\x20]+;/u', '$1;', $data); \n $data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data); \n $data = html_entity_decode($data, ENT_COMPAT, 'UTF-8'); \n\n // Remove any attribute starting with \"on\" or xmlns \n $data = preg_replace('#(<[^>]+?[\\x00-\\x20\"\\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data); \n\n // Remove javascript: and vbscript: protocols \n $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 $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 $data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*-moz-binding[\\x00-\\x20]*:#u', '$1=$2nomozbinding...', $data); \n\n // Only works in IE: <span style=\"width: expression(alert('Ping!'));\"></span> \n $data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?expression[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data); \n $data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?behaviour[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data); \n $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 // Remove namespaced elements (we do not need them) \n $data = preg_replace('#</*\\w+:\\w[^>]*+>#i', '', $data); \n\n do \n { \n // Remove really unwanted tags \n $old_data = $data; \n $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 } \n while ($old_data !== $data); \n \n return $data; \n }", "title": "" }, { "docid": "7ab2b20bd63db5bf45a683f1b5feb32a", "score": "0.44247243", "text": "function arr2xml(&$arr, &$xml){\n foreach ($arr as $key => $value){\n $value = $value == NULL ? 'NULL' :$value; // converting NULL to 'NULL'\n $type = gettype($value);\n if($type == 'array'){\n arr2xml($arr[$key], $xml->addChild($key));\n }elseif($type==\"boolean\" or $type==\"integer\" or $type==\"double\" or $type==\"string\"){ \n $xml->addChild($key, $value);\n }\n }\n}", "title": "" }, { "docid": "ade0fe464d13ef3c231c3645b53bd6a3", "score": "0.44212416", "text": "function parseXSD(){\n \n\t\t $xml = new DOMDocument();\n\t\t $xml->loadXML($this->xsdString);\n\t\t $xpath = new DOMXPath($xml);\n\t\t foreach($this->nameSpaces as $prefix => $uri){\n\t\t\t\t$xpath->registerNamespace($prefix, $uri); //get those namespaces registered!\n\t\t }\n\t\t \n\t\t $this->doRefElement = false;\n\t\t $this->doneElementTypes = array();\n\t\t $schema = $this->extractSchema($xpath, $xml, \"recordType\", self::cowNSprefix.\":\".\"record\");\n\t\t //$schema = $this->extractSchema($xpath, $xml, \"cowItemType\", \"cowItem\");\n\t\t \n\t\t $this->schema = $schema;\n\t}", "title": "" }, { "docid": "551e3ee20bdc2ae5cef75e5b4140de05", "score": "0.4411957", "text": "function array2xml(array $data, $startElement = 'xml', $xml_version = '1.0', $xml_encoding = 'UTF-8')\n{\n if (! is_array($data)) {\n return false; // return false error occurred\n }\n $xml = new \\XmlWriter();\n $xml->openMemory();\n $xml->startDocument($xml_version, $xml_encoding);\n $xml->startElement($startElement);\n\n write_xml($xml, $data);\n // write end element\n $xml->endElement();\n\n // Return the XML results\n return $xml->outputMemory(true);\n}", "title": "" }, { "docid": "83b9a0601f56acd342f196de9383fc4e", "score": "0.4410218", "text": "function xml_encode($data, &$xml_data) {\n\tforeach( $data as $key => $value )\n\t{\n\t\tif( is_array($value) )\n\t\t{\n\t\t\tif( is_numeric($key) )\n\t\t\t{\n\t\t\t\t$key = 'item'.$key; //Elements can't be purely numeric\n\t\t\t}\n\t\t\t$subnode = $xml_data->addChild($key);\n\t\t\txml_encode($value, $subnode);\n\t\t} else {\n\t\t\t$xml_data->addChild(\"$key\",htmlspecialchars(\"$value\"));\n\t\t}\n\t}\n\n\treturn $xml_data->asXML();\n}", "title": "" }, { "docid": "a9ef0e69ceaa97a626136dbbbcf33129", "score": "0.44005817", "text": "public final function getXmlString($template = '', $data = array()) {\n if (empty($data)) {\n // Log perfomance data.\n $start_time = microtime(TRUE);\n $mem = memory_get_usage();\n\n // Mapping array.\n $root = $this->getRootStucture();\n\n $data = $root['ea_data'];\n $version = SOAP_1_1;\n $template = $root['ea_template'][$version];\n }\n\n // Generate xml string.\n $xml = $this->dataToXml($template, $data);\n $this->xmlString = $xml;\n\n // Return updated xml template.\n return $xml;\n }", "title": "" }, { "docid": "eb45b8c1116744e8c155c65e379b457e", "score": "0.4399161", "text": "function transform($xslt, $params=null) {\r\n\t \r\n\t $xslDoc = new DOMDocument('1.0','UTF-8');\r\n\t $xslDoc->loadXML($xslt);\r\n\t \r\n\t $proc = new XSLTProcessor();\r\n $proc->importStylesheet($xslDoc);\r\n \r\n // Set stylesheet parameter values\r\n if ($params!=null) {\r\n foreach ($params as $paramname => $paramvalue) {\r\n \t $proc->removeParameter('', $paramname);\r\n $proc->setParameter('', $paramname, $paramvalue);\r\n }\r\n }\r\n \r\n return $proc->transformToXML($this->xmlDoc);\r\n\t}", "title": "" }, { "docid": "e6486d27f46f6002ecf178834b7a15df", "score": "0.43845448", "text": "function f_XmlConv($x)\n\t{\n\t\treturn htmlspecialchars(utf8_encode($x));\n\t}", "title": "" }, { "docid": "f5f5d4794c1289e838f64dd8ea834a08", "score": "0.4380569", "text": "private function setXml(){\n \n $uri = str_replace('{action}', 'ZoekProducten', $this->getApi());\n \n $response = \\Drupal::httpClient()->get($uri, ['headers' => ['Accept' => 'application/xml'], 'query' => ['_format' => 'xml_extended']]);\n \n if(!empty($response->getBody()) && $response->getStatusCode() == 200)\n $this->xml = simplexml_load_string($response->getBody());\n \n \n }", "title": "" }, { "docid": "df3a1db4e2dbdd2005f6e76d84a6700e", "score": "0.4365518", "text": "static function arrayToXML($data, $doc, $node=null, $nodeName = 'data') {\n\t\tif($node == null) $node = $doc->documentElement;\n\n\t\tif(method_exists($data, 'to_array')) {\n\t\t\t$data = $data->to_array();\n\t\t}\n\n\t\tif(is_array($data) || is_object($data)) {\n\t\t\t$assoc = self::isAssoc($data);\n\n\t\t\tif(!$assoc) {\n\t\t\t\tforeach($data as $value) {\n\t\t\t\t\t$child = $doc->createElement($nodeName);\n\t\t\t\t\t$node->appendChild($child);\n\t\t\t\t\tself::arrayToXML($value, $doc, $child, $nodeName);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforeach($data as $key => $value) {\n\t\t\t\t\tif(self::isAssoc($value) || !is_array($value)) {\n\t\t\t\t\t\t$child = $doc->createElement($key);\n\t\t\t\t\t\t$node->appendChild($child);\n\t\t\t\t\t\tself::arrayToXML($value, $doc, $child, $key);\n\t\t\t\t\t} else self::arrayToXML($value, $doc, $node, $key);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif(htmlspecialchars($data) != $data) $textNode = $doc->createCDATASection($data);\n\t\t\telse $textNode = $doc->createTextNode($data);\n\n\t\t\t$node->appendChild($textNode);\n\t\t}\n\n\t\treturn $node;\n\t}", "title": "" }, { "docid": "362a89dc90d0d26ded3fa51c7f0b536c", "score": "0.43646887", "text": "private function fix_saved_schema($schema)\n {\n\n \tforeach($schema as $table_name => $columns)\n \t{\n \t\tforeach($columns as $column_name => $properties)\n \t\t{\n \t\t\tif(!isset($properties['default']))\n \t\t\t{\n \t\t\t\t$schema[$table_name][$column_name]['default'] = NULL;\n \t\t\t}\n \t\t\tif(!isset($properties['null']))\n \t\t\t{\n \t\t\t\t$schema[$table_name][$column_name]['null'] = 'yes';\n \t\t\t}\n \t\t\tif(!isset($properties['primary_key']))\n \t\t\t{\n \t\t\t\t$schema[$table_name][$column_name]['primary_key'] = 0;\n \t\t\t}\n \t\t}\n \t}\n \treturn $schema;\n }", "title": "" }, { "docid": "8d7e661299bfbb723dd6d29356fb7bf6", "score": "0.43642008", "text": "function toXML(){\n \n }", "title": "" }, { "docid": "b9872dff3f39d94bc893c98a2cfb7c69", "score": "0.43468183", "text": "abstract public function fromXML($xmlElement);", "title": "" }, { "docid": "d9a19d84d5019c55b7a23a42d5e673ad", "score": "0.43444535", "text": "function write_xml(\\XMLWriter $xml, $data)\n{\n foreach ($data as $key => $value) {\n if (is_array($value)) {\n $xml->startElement($key);\n write_xml($xml, $value);\n $xml->endElement();\n continue;\n }\n $xml->writeElement($key, $value);\n }\n}", "title": "" }, { "docid": "9b4609904b18ff72cb301ed4e19df4e4", "score": "0.43430007", "text": "public function createPayload()\n {\n $this->payload = '<?xml version=\"1.0\"?'.\">\\r\\n<methodCall>\\r\\n\"\n .'<methodName>'.$this->method_name.\"</methodName>\\r\\n\"\n .\"<params>\\r\\n\";\n\n for ($i = 0, $c = count($this->params); $i < $c; $i++)\n {\n // $p = XML_RPC_Values\n $p = $this->params[$i];\n $this->payload .= \"<param>\\r\\n\".$p->serialize_class().\"</param>\\r\\n\";\n }\n\n $this->payload .= \"</params>\\r\\n</methodCall>\\r\\n\";\n }", "title": "" }, { "docid": "3afe7abe79b7affd0ca12f02df9ace1f", "score": "0.4335728", "text": "function xml($request, $payload, $kwargs=array()) {\n\t$res = new Response;\n\t\n\t// gather up the comments... yo\t\n\t$comments = \\foundry\\model::init('gryphon:comment')\n\t\t->where('self:item_type = :ty and self:item_id = :iid')\n\t\t->where('self:status = 1')\n\t\t->bind(array(\n\t\t\t':ty' => 'article',\n\t\t\t':iid' => $payload['article']->uid\n\t\t))\n\t\t->order('self:created asc')\n\t\t->find();\n\n\t$entries = $comments->serialize('atom');\n\t$lastUpdate = date('c', $comments->peekBack()->created);\n$res->content = <<<ATOM\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<feed xmlns=\"http://www.w3.org/2005/Atom\">\n\t<title>Comment feed for {$payload['article']->headline}</title>\n\t<link href=\"{$payload['article']->url}.xml\" rel=\"self\" />\n\t<id>{$payload['article']->url}.xml</id>\n\t<updated>{$lastUpdate}</updated>\n\t$entries\n</feed>\nATOM;\n\n\t$res->setHeader('Content-Type', 'application/atom+xml');\n\t\n\treturn $res;\n}", "title": "" }, { "docid": "9d759db4a2bb7d2afad157afd19886c2", "score": "0.4334137", "text": "public function dumpSchema(Schema $schema)\n {\n $rootNode = $this->document->createElement('app-data');\n $this->document->appendChild($rootNode);\n foreach ($schema->getDatabases() as $database) {\n $this->appendDatabaseNode($database, $rootNode);\n }\n\n return trim($this->document->saveXML());\n }", "title": "" }, { "docid": "ee03200f8bdce87b5d20a3262aab6bd5", "score": "0.43333477", "text": "abstract protected function generateXML(): void;", "title": "" }, { "docid": "d833cccf5a4ace9ed49ca14548712fda", "score": "0.4333153", "text": "protected function dumpParamsTemplate() {\n return create(new \\xml\\XslTemplate())->matching('/')\n ->withChild(create(new \\xml\\Node('html'))\n ->withChild(create(new \\xml\\Node('body'))\n ->withChild(new \\xml\\Node('xsl:value-of', null, array('select' => 'concat(\n \"state=\", $__state, \", \",\n \"page=\", $__page, \", \",\n \"lang=\", $__lang, \", \",\n \"product=\", $__product, \", \",\n \"sess=\", $__sess, \", \",\n \"query=\", $__query\n )')))\n )\n )\n ;\n }", "title": "" }, { "docid": "c91256b6fc856b427fb977834ad7822f", "score": "0.43302822", "text": "private function postData($parameters = array())\n {\n $this->post['CustomerID'] = $this->options['login'];\n\n $xml = new \\SimpleXMLElement('<ewaygateway></ewaygateway>');\n\n foreach ($this->post as $name => $value) {\n $xml->addChild(\"eway$name\", $value);\n }\n\n return $xml->asXML();\n }", "title": "" }, { "docid": "198930de0b09b36ccf774597403cf1f6", "score": "0.43293467", "text": "private function __ggBuildXML($data) {\n \n \n\t\t$fields = Configure::read('Ggapi.apiFields');\n\n\t\t$dom = new DomDocument;\n\t\t$order = $dom->appendChild($dom->createElement('order'));\n\t\tforeach ($fields as $key => $val) {\n\t\t\t$$key = $order->appendChild($dom->createElement($key));\n\t\t\tforeach ($val as $k => $v) {\n\t\t\t\t$kk = $$key->appendChild($dom->createElement($v));\n\t\t\t\t$kk->appendChild($dom->createTextNode(isset($data[$v]) ? $data[$v] : ''));\n\t\t\t}\n\t\t}\n\n\t\t$dom->formatOutput = false;\n\t\t$xml = $dom->saveXML();\n\t\t$xml = str_replace('<?xml version=\"1.0\"?>', '', $xml);\n\t\treturn $xml;\n\t}", "title": "" }, { "docid": "79ee0f09a536a6783b817681950b8046", "score": "0.43281534", "text": "function array_to_xml($array, &$xml_user_info, $old_key = null, $arrayType = 1) {\n foreach($array as $key => $value) {\n if(is_array($value)) {\n if(!is_numeric($key)){\n\n // if next array have key : 0, then array type is default and\n // xml not create child, else array type is not default and create new child\n if(array_key_exists('0', $value)){ $subnode = $xml_user_info; $arrayType = 0; }\n else { $subnode = $xml_user_info->addChild(\"$key\"); $arrayType = 1; }\n\n array_to_xml($value, $subnode, $key, $arrayType);\n }else{\n\n // if array type is not default, create new child with prefix 'id_'\n // else create child with previous key\n if($arrayType == 1) $subnode = $xml_user_info->addChild(\"id_$key\");\n else $subnode = $xml_user_info->addChild(\"$old_key\");\n\n array_to_xml($value, $subnode, $old_key, $arrayType);\n }\n }else {\n $xml_user_info->addChild(\"$key\",htmlspecialchars(\"$value\"));\n }\n }\n}", "title": "" }, { "docid": "02da149bba1c50d6b3e432c924eed174", "score": "0.43267563", "text": "public function fromXmlDoc($xml) {\n //TODO parse Data from xml doc\n }", "title": "" }, { "docid": "9f10507f26ad80eb67cb349100faf399", "score": "0.43098933", "text": "public function process($data=null) \n {\n \tif (empty($data)) throw new Transform_Exception(\"Unable to start XSL transformation : No data supplied\");\n \tif ($this->chainInput) $data = $this->chainInput->process($data);\n \t\n \t$data = $this->getCleanedData($data);\n $xsltProcessor = $this->getXSLTProcessor();\n $xmlDoc = $this->loadXMl($data); \n return $xsltProcessor->transformToXML($xmlDoc);\r\n }", "title": "" }, { "docid": "6c6722b545ad6b8aab2a44fe5c35b612", "score": "0.43092453", "text": "function log_XML($xml_data) {\r\n\r\n $dir_path= PROJECT_DIR.'/demo/';\r\n $filename = $dir_path. 'xml_cache.log';\r\n $sdpConvertedRequest = $xml_data;\r\n if (!is_array($xml_data)){\r\n $sdpXMLRequest = preg_replace(\"/(<\\/?)(\\w+):([^>]*>)/\", \"$1$2$3\", $xml_data);\r\n $xml = new SimpleXMLElement($sdpXMLRequest);\r\n $sdpConvertedRequest = json_encode((array)$xml, true);\r\n } else {\r\n $sdpConvertedRequest = json_encode($xml_data, true);\r\n }\r\n\r\n\r\n if (!file_exists($dir_path)){\r\n mkdir($dir_path, 0744);\r\n }\r\n /* insert xml data */\r\n return file_put_contents($filename, $sdpConvertedRequest);\r\n}", "title": "" }, { "docid": "1051ae7453865b5ce13ab49ce81c2d1d", "score": "0.4306028", "text": "public static function xml(array $payload, $httpCode = 200, $headers = [])\n\t{\n\t\thttp_response_code($httpCode);\n\t\tforeach ($headers as $key => $value) {\n\t\t\tif (is_int($key)) {\n\t\t\t\theader($value);\n\t\t\t} else {\n\t\t\t\theader($key . \": \" . $value);\n\t\t\t}\n\t\t}\n\t\theader('Content-Type: application/xml');\n\t\treturn ArrayToXml::convert($payload);\n\t}", "title": "" }, { "docid": "91c3f2c6ac535bdcca4920a8a518ec54", "score": "0.4303229", "text": "function lingotek_entity_xml_body($entity_type, $entity) {\n $translatable = array();\n\n $translate = variable_get('lingotek_enabled_fields', array());\n list($id, $vid, $bundle) = lingotek_entity_extract_ids($entity_type, $entity);\n $fields_desired = isset($translate[$entity_type][$bundle]) ? $translate[$entity_type][$bundle] : array();\n if (empty($fields_desired)) {\n $fields_desired = lingotek_get_translatable_fields_by_content_type($entity_type, $bundle);\n }\n\n foreach ($fields_desired as $value) {\n $field = field_info_field($value);\n if (isset($field)) {\n array_push($translatable, $value);\n }\n }\n\n $content_obj = lingotek_xml_fields($entity_type, $entity, $translatable, $entity->language);\n if ($entity_type == 'node') {\n //URL Alias related to the page:\n if (!empty($entity->lingotek['url_alias_translation'])) {\n $conditions = array('source' => 'node/' . $entity->nid);\n if ($entity->language != LANGUAGE_NONE) {\n $conditions['language'] = $entity->language;\n }\n $path = path_load($conditions);\n if ($path !== FALSE) {\n $url = $path['alias'];\n $url_alias_obj = $content_obj->addChild('url_alias');\n $url_alias_obj->addCData($url);\n }\n }\n }\n\n try {\n $hook_params = array(\n 'entity_type' => $entity_type,\n 'entity' => $entity,\n 'xml' => $content_obj,\n 'langcode' => $entity->language,\n );\n\n // Allow other modules to manipulate the uploaded content.\n drupal_alter('lingotek_entity_upload', $hook_params);\n }\n catch (Exception $e) {\n LingotekLog::error(\"Failed to parse or modify XML before uploading. Error: @error. Text: !xml.\", array('!xml' => $text, '@error' => $e->getMessage()));\n }\n return $content_obj->asXML();\n}", "title": "" }, { "docid": "0690aa2509b8c3ec8abe7688abbe94dc", "score": "0.4299356", "text": "public function format(array $data)\r\n {\r\n $result = null;\r\n\r\n // SimpleXML is installed but default\r\n // but best to check, and then provide a fallback.\r\n if (! extension_loaded('simplexml'))\r\n {\r\n throw new \\RuntimeException('The SimpleXML extension is required to format XML.');\r\n }\r\n\r\n $output = new \\SimpleXMLElement(\"<?xml version=\\\"1.0\\\"?><response></response>\");\r\n\r\n $this->arrayToXML($data, $output);\r\n\r\n return $output->asXML();\r\n }", "title": "" }, { "docid": "aa9254398910c164b1dbf3841d1426a1", "score": "0.4297746", "text": "public function xml($data, $node_block = 'root') {\n\t\t\n\t\tfunction generateValidXmlFromObj(stdClass $obj, $node_block = 'root') {\n\t $arr = get_object_vars($obj);\n\t return generateValidXmlFromArray($arr, $node_block);\n\t }\n\t\tfunction generateValidXmlFromArray($array, $node_block = 'root') {\n\t $xml = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" ?>\\r\\n\";\n\n\t if ($node_block) $xml .= '<' . $node_block . \">\\r\\n\";\n\t $xml .= generateXmlFromArray($array);\n\t if ($node_block) $xml .= '</' . $node_block . \">\\r\\n\";\n\n\t return $xml;\n\t }\n\t function generateXmlFromArray($array) {\n\t $xml = '';\n\n\t if (is_array($array) || is_object($array)) {\n\t foreach ($array as $key=>$value) {\n\t \tif (is_numeric($key)) $key = numtochars($key); \n\t \t$xml .= '<' . $key . \">\\r\\n\" . generateXmlFromArray($value, false) . '</' . $key . \">\\r\\n\";\n\t }\n\t } else {\n\t $xml = htmlspecialchars($array, ENT_QUOTES);\n\t }\n\n\t return $xml;\n\t }\n\n\t $xml = '';\n\n\t if (is_object($data))\n\t \t$xml .= generateValidXmlFromObj($data, $node_block);\n \telseif (is_array($data))\n \t\t$xml .= generateValidXmlFromArray($data, $node_block);\n\t\telse\n\t\t\t$xml .= generateValidXmlFromArray(array($data), $node_block);\n\n\t\t$this->set_output($xml);\n\t\t$this->render();\n\t}", "title": "" }, { "docid": "e6b4ef299af0bd1d28b4ade1184adf3b", "score": "0.42964527", "text": "protected static function _createTestSchema()\n {\n static::_deleteTestSchema();\n $modulemanager = static::getServiceManager()->get('ModuleManager');\n $moduleObj = $modulemanager->loadModule(static::getModule());\n $module_config = $moduleObj->getConfig();\n $module_schema_path = realpath($module_config['propel']['paths']['schema']);\n $xsltFile = realpath(dirname(dirname(dirname(dirname(__DIR__)))) . '/config/translate.xsl');\n $output = static::getPath() . '/config/schema.xml';\n $xml = static::fileToDomDoc($module_schema_path . '/schema.xml');\n $xsl = static::fileToDomDoc($xsltFile);\n $processor = new \\XSLTProcessor;\n $processor->importStyleSheet($xsl);\n $fp = fopen($output, 'w');\n fwrite($fp, $processor->transformToXML($xml));\n fclose($fp);\n }", "title": "" }, { "docid": "2ed3f6cba3d42abb4fdc90f82e1f7b73", "score": "0.4293509", "text": "final public function json2xml($jsonData)\r\n\t{\r\n\t\treturn $this->array2xml(json_decode(json_encode($jsonData), true));\r\n\t}", "title": "" }, { "docid": "d4cb32bd8567a843011862b8dc078a3b", "score": "0.42886132", "text": "public function constructXml()\n {\n $this->xml = '<?xml version=\"1.0\" encoding=\"UTF-8\"?><soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">';\n $this->xml .= $this->xmlBody;\n $this->xml .= '</soapenv:Envelope>';\n }", "title": "" }, { "docid": "8876614a7f8b970d39605b62f9e9e2b5", "score": "0.42798433", "text": "function _feed_template($data)\n {\n foreach ($data as $key => $value) {\n $this->template[$key] = $value;\n }\n }", "title": "" }, { "docid": "438027270ea675771133ce9f7d83000a", "score": "0.42794678", "text": "function recreateXML($new_rrd) {\n\t$rrd = \"<rrd>\\n\";\n\t$rrd .= \"\\t<version> \" . $new_rrd['version'] . \" </version>\\n\";\n\t$rrd .= \"\\t<step> \" . $new_rrd['step'] . \" </step>\\n\";\n\t$rrd .= \"\\t<lastupdate> \" . $new_rrd['lastupdate'] . \" </lastupdate>\\n\";\n\n\tforeach($new_rrd['ds'] as $dsnum => $ds) {\n\t\t$rrd .= \"\\t<ds>\\n\";\n\t\t$rrd .= \"\\t\\t<name> \" . $ds['name'] . \" </name>\\n\";;\n\t\t$rrd .= \"\\t\\t<type> \" . $ds['type'] . \" </type>\\n\";;\n\t\t$rrd .= \"\\t\\t<minimal_heartbeat> \" . $ds['minimal_heartbeat'] . \" </minimal_heartbeat>\\n\";;\n\t\t$rrd .= \"\\t\\t<min> \" . $ds['min'] . \" </min>\\n\";;\n\t\t$rrd .= \"\\t\\t<max> \" . $ds['max'] . \" </max>\\n\";;\n\t\t$rrd .= \"\\t\\t<last_ds> \" . $ds['last_ds'] . \" </last_ds>\\n\";;\n\t\t$rrd .= \"\\t\\t<value> \" . $ds['value'] . \" </value>\\n\";;\n\t\t$rrd .= \"\\t\\t<unknown_sec> \" . $ds['unknown_sec'] . \" </unknown_sec>\\n\";;\n\t\t$rrd .= \"\\t</ds>\\n\";\n\t}\n\n\tforeach($new_rrd['rra'] as $rra_num => $rra) {\n\t\t$rrd .= \"\\t<rra>\\n\";\n\t\t$rrd .= \"\\t\\t<cf> \" . $rra['cf'] . \" </cf>\\n\";\n\t\t$rrd .= \"\\t\\t<pdp_per_row> \" . $rra['pdp_per_row'] . \" </pdp_per_row>\\n\";\n\t\t$rrd .= \"\\t\\t<params>\\n\";\n\t\t$rrd .= \"\\t\\t\\t<xff> \" . $rra['params']['xff'] . \" </xff>\\n\";\n\t\t$rrd .= \"\\t\\t</params>\\n\";\n\t\t$rrd .= \"\\t\\t<cdp_prep>\\n\";\n\n\t\tforeach($new_rrd['rra'][$rra_num]['cdp_prep'] as $cdp_ds_num => $pdp) {\n\t\t\t$rrd .= \"\\t\\t\\t<ds>\\n\";\n\t\t\t$rrd .= \"\\t\\t\\t\\t<primary_value> \" . $pdp['primary_value'] . \" </primary_value>\\n\";\n\t\t\t$rrd .= \"\\t\\t\\t\\t<secondary_value> \" . $pdp['secondary_value'] . \" </secondary_value>\\n\";\n\t\t\t$rrd .= \"\\t\\t\\t\\t<value> \" . $pdp['value'] . \" </value>\\n\";\n\t\t\t$rrd .= \"\\t\\t\\t\\t<unknown_datapoints> \" . $pdp['unknown_datapoints'] . \" </unknown_datapoints>\\n\";\n\t\t\t$rrd .= \"\\t\\t\\t</ds>\\n\";\n\n\t\t\t$output = array();\n\t\t\tforeach($new_rrd['rra'][$rra_num]['database'] as $dsnum => $v) {\n\t\t\t\tforeach($v as $time => $value) {\n\t\t\t\t\t$output[$time][$dsnum] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$rrd .= \"\\t\\t</cdp_prep>\\n\";\n\t\t$rrd .= \"\\t\\t<database>\\n\";\n\n\t\tforeach($output as $time => $v) {\n\t\t\t$rrd .= \"\\t\\t\\t<row>\";\n\t\t\tforeach($v as $dsnum => $value) {\n\t\t\t\t$rrd .= \"<v> \" . $value . \" </v>\";\n\t\t\t}\n\t\t\t$rrd .= \"</row>\\n\";\n\t\t}\n\n\t\t$rrd .= \"\\t\\t</database>\\n\";\n\t\t$rrd .= \"\\t</rra>\\n\";\n\t}\n\n\t$rrd .= \"</rrd>\";\n\n\treturn $rrd;\n}", "title": "" }, { "docid": "0c1224e3b45b4bece44bb1b0929a203b", "score": "0.42751998", "text": "protected function parse_xml() {\n\t\t\n\t\t$response = wp_remote_get( self::$powerreviews_url . 'pwr/dgw9fped/rawdata/review_data_summary.xml' );\n\t\tif( is_array($response) ) {\n\t\t\t// $header = $response['headers']; // array of http header lines\n\t\t\t$body = $response['body']; // use the content\n\t\t\tself::$_xml = simplexml_load_string( $body );\n\t\t}\n\n\n\t\t// if( WP_DEBUG ){\n\t\t// $json = json_encode( $xml );\n\t\t// $array = json_decode( $json, TRUE );\n\t\t// \techo '<pre>';\n\t\t// \twp_die( 'PARSING XML: ' . print_r($array) . '</pre>' );\n\t\t// }\n\n\t\t// if( WP_DEBUG ){\n\t\t// \techo '<pre>';\n\t\t// \twp_die( 'PARSING XML: ' . print_r($_xml->product[1]) . '</pre>' );\n\t\t// }\n\n\t}", "title": "" }, { "docid": "946801bbce4cc92a0bc65f0846540cff", "score": "0.42750764", "text": "private function decomposeXml() {\n\t\tif ($this->xmlRequest->otokou) {\n\t\t\tif ($this->xmlRequest->otokou->attributes()->version) {\n\t\t\t\t$this->requestApiVersion = $this->xmlRequest->otokou->attributes()->version;\n\t\t\t\tif ($this->xmlRequest->otokou->header->request) {\n\t\t\t\t\tswitch ($this->requestType) {\n\t\t\t\t\t\tcase self::GET_USER_REQUEST:\n\t\t\t\t\t\t\tif ($this->xmlRequest->otokou->header->request == self::GET_USER_REQUEST_STRING) {\n\t\t\t\t\t\t\t\t$this->decomposeGetUserRequest();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse $this->setError(210);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase self::GET_VEHICLES_REQUEST:\n\t\t\t\t\t\t\tif ($this->xmlRequest->otokou->header->request == self::GET_VEHICLES_REQUEST_STRING) {\n\t\t\t\t\t\t\t\t$this->decomposeGetVehiclesRequest();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse $this->setError(210);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase self::SET_CHARGE_REQUEST:\n\t\t\t\t\t\t\tif ($this->xmlRequest->otokou->header->request == self::SET_CHARGE_REQUEST_STRING) {\n\t\t\t\t\t\t\t\t$this->decomposeSetChargeRequest();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse $this->setError(210);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse $this->setError(132);\n\t\t\t}\n\t\t\telse $this->setError(131);\n\t\t}\n\t\telse $this->setError(130);\n\t}", "title": "" }, { "docid": "7828e7f8914be90f294f732282e2c1d3", "score": "0.427473", "text": "private function parseXml() {\n\t\tif ($this -> xml !== false) {\n\t\t\techo '<prE>' . print_r($this -> xmlToObject(), true) . '</prE>';\n\t\t\t$this -> xmlArray = $this -> xmlToObject();\n\t\t}\n\t}", "title": "" }, { "docid": "4f69eec8e01af6924eb972f55317fe0f", "score": "0.4274519", "text": "final public function serializeXml(array $fields) : array\n {\n return $this->cleanParams($fields);\n }", "title": "" }, { "docid": "25a44cdfdd328c62d12e46fe3d305fab", "score": "0.42723846", "text": "public function getParsed(string $schema): string\n {\n foreach ($this->defaultMarkupFields as $field) {\n if (isset($this->defaultMarkup[$field])) {\n $schema = str_replace($field, $this->defaultMarkup[$field], $schema);\n }\n }\n return $schema;\n }", "title": "" } ]
6d015d01b2a3802d7c24ee55aaa9bbe0
pode ter ate 100 tarefas fixas
[ { "docid": "245a823e2090316364a31a78c12157c0", "score": "0.0", "text": "function __construct($id = 0, $id_empresa = 0) {\n if ($id_empresa > 0) {\n\n $id = -1 * (($id_empresa * 1000) + $id);\n }\n $this->classes = array();\n $this->id = $id;\n $this->nome = \"\";\n $this->tempo_medio = 1;\n $this->prioridade = 1;\n $this->empresa = null;\n $this->observacao_padrao = \"\";\n $this->excluido = false;\n $this->cargos = array();\n }", "title": "" } ]
[ { "docid": "020958f605450c0a44bddcbf52175cca", "score": "0.6213811", "text": "function tva($prix, $tva){\n\t$prix += $prix * $tva/100;\n\treturn $prix;\n}", "title": "" }, { "docid": "b5010b34b9644321f0a5b7241ae2eaa5", "score": "0.5935467", "text": "function penyebut($nilai)\n{\n $nilai = abs($nilai);\n $huruf = array(\"\", \"satu\", \"dua\", \"tiga\", \"empat\", \"lima\", \"enam\", \"tujuh\", \"delapan\", \"sembilan\", \"sepuluh\", \"sebelas\");\n $temp = \"\";\n if ($nilai < 12) {\n $temp = \" \" . $huruf[$nilai];\n } else if ($nilai < 20) {\n $temp = penyebut($nilai - 10) . \" belas\";\n } else if ($nilai < 100) {\n $temp = penyebut($nilai / 10) . \" puluh\" . penyebut($nilai % 10);\n } else if ($nilai < 200) {\n $temp = \" seratus\" . penyebut($nilai - 100);\n } else if ($nilai < 1000) {\n $temp = penyebut($nilai / 100) . \" ratus\" . penyebut($nilai % 100);\n } else if ($nilai < 2000) {\n $temp = \" seribu\" . penyebut($nilai - 1000);\n } else if ($nilai < 1000000) {\n $temp = penyebut($nilai / 1000) . \" ribu\" . penyebut($nilai % 1000);\n } else if ($nilai < 1000000000) {\n $temp = penyebut($nilai / 1000000) . \" juta\" . penyebut($nilai % 1000000);\n } else if ($nilai < 1000000000000) {\n $temp = penyebut($nilai / 1000000000) . \" milyar\" . penyebut(fmod($nilai, 1000000000));\n } else if ($nilai < 1000000000000000) {\n $temp = penyebut($nilai / 1000000000000) . \" trilyun\" . penyebut(fmod($nilai, 1000000000000));\n }\n return $temp;\n}", "title": "" }, { "docid": "6252b3d4dca238304125e027fa857a5a", "score": "0.5902742", "text": "function get_pmin_theo($t100,$v100,$v0) {\r\n\tglobal $mw,$mw_zu,$F_haft,$evmail;\r\n\t# Wieviel Leistung noetig für Beschleunigung 0-100km/h in x Sekunden?\r\n\t# Ausgangsbasis: Annahme nur Haftgrenze:\r\n\t$Pmin=$F_haft*$v100/1000; \t\t\t\t\t # 0-100km/h\r\n\t# 1.Bereich: Konstante Reifenkraftschlussgrenze\r\n\t#\t\tv=a*t ergibt: t=vx*mw/F_haft\r\n\t$vx=$Pmin*1000/$F_haft; # Schnittpunkt von F_haft mit plot_data_hyp - vx in m/s\r\n\t$tx=($vx-$v0)*($mw+$mw_zu)/$F_haft;\t\t\t\t# 0-100km/h\r\n\tif ($tx > $t100) { ### Fall 2 ### \r\n\t\t$error= \"ERROR: Traction not enough for \".$v0*3.6.\"-\".$v100*3.6.\"km/h in $t100\".\"s! Even with drag NOT taken into account.Increase traction by coeff. or axleload, minimize weight or change to AWD.\"; \r\n\t return $error;\r\n\t} else {\t### Fall 3 ### \r\n\t if ($v0 == 0) {$Pmin=ceil($Pmin*$tx/$t100);} # Anpassen von Pmin anhand von Verhaeltnis t100 zu tx, nicht bei 80-120km/h\r\n\t $n=1; $switch=false; $a=$Pmin/20; $b=$Pmin/100; $c=0.5; $d=0.01; # Genauigkeit d # Anfangswerte fuer while-Schleife - $Pmin in kW\r\n\t\twhile (abs($t100-$tx)>$d) {\r\n\t\t\t# Veraenderlicher Teil $Pmin \r\n\t\t\t# -->\r\n\t\t\tif ($t100 > $tx and $switch==false) { # $switch als check zum Schleifen sparen\r\n\t\t\t \t$Pmin=$Pmin-$a; \r\n\t\t\t} elseif ($t100 > $tx and $switch==true) {\r\n\t\t\t \t$Pmin=$Pmin-$c; \r\n\t\t\t} else {$Pmin=$Pmin+$b; $switch=true;}\t\r\n\t\t\t# <-- ENDE Veraenderlicher Teil\t\r\n\t\t\t# Erzeugen des Arrays fuer function getacctimebyforce () // tbd kuerzer mit $plot_data_hyp, weil Abschneiden aller Werte groeßer als F_haft in der Funktion\r\n\t\t\t# -->\t\r\n\t\t\t$plot_data_max = array(); //empty previous array first\r\n\t\t\t$vx=$Pmin*1000/$F_haft; # Schnittpunkt von F_haft mit plot_data_hyp - vx in m/s\r\n\t\t\tfor ($v = 0; $v <= 300 && $v < $vx*3.6; $v += 10) { # $v in km/h\r\n\t\t\t $plot_data_max[] = array('',$v,$F_haft);\r\n\t\t\t}\r\n\t\t\tif ($vx*3.6!=ceil($vx*3.6/10)*10) {\r\n\t\t\t\t$plot_data_max[] = array('',$vx*3.6,$F_haft); # Einfuegen des Schnittpunkts \r\n\t\t\t\t}\r\n\t\t\tfor ($v = ceil($vx*3.6/10)*10; $v <= 300; $v += 10) { # $v in km/h\r\n\t\t\t\t$Fmax=round($Pmin*1000/($v/3.6),1); # $v in m/s\r\n\t\t\t $plot_data_max[] = array('',$v,$Fmax);\r\n\t\t\t}\r\n\t\t\t# <-- ENDE Erzeugen des Arrays\r\n\t if ($v0 != 0) { // tbd static if? or switch-case? for not calling if in every loop\r\n\t\t\t $tx= round(getacctimebyforce($plot_data_max,$v100)-getacctimebyforce($plot_data_max,$v0),3); \r\n\t\t\t} else {\r\n\t\t\t \t$tx= round(getacctimebyforce($plot_data_max,$v100),3);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// echo \"$n: $t100, $tx , $vx , $Pmin <br>\";\t// for checking while loop\t\r\n\t\t\t\r\n\t\t\t//////////////// Troubleshooting: --> ////////////////\r\n\t\t\tif ($Pmin >= ($F_haft*$v100/1000)+1) { # falls Traktion inkl. Fahrtwiderstaende nicht ausreicht\r\n\t\t\t\t$error= \"ERROR: Traction not enough for \".$v0*3.6.\"-\".$v100*3.6.\"km/h in $t100\".\"s! Drag taken into account. Increase traction by coeff. or axleload, minimize weight or change to AWD.\";\r\n\t\t\t \treturn $error;\r\n\t\t\t}\t\r\n\t\t\t$n++; // for counting while loops \t\t\t\r\n\t\t\tif ($n > 40) { $c=0.1;};\r\n\t\t\tif ($n > 80) { $d=0.05;};\r\n\t\t\tif ($n > 200) { //tbd 3.8 @ average throws this ERROR\r\n\t\t\t\t$error= \"ERROR: Minimum Power required \".$v0*3.6.\"-\".$v100*3.6.\"km/h in $t100\".\"s could not be calculated. Please contact EV Wizard via email: $evmail.\"; \r\n\t\t\t return $error;} \r\n\t\t\t//////////////// <-- Troubleshooting ////////////////\r\n\t\t}; // <-- END while\r\n\t\tif (isset($Pmin) && is_float($Pmin)) { \r\n\t\t\t$Pmin100=ceil($Pmin);\r\n\t\t\treturn $Pmin100;\r\n\t\t} else {\r\n\t\t\t $error= \"ERROR: Have you just found a bug??? O_o Please tell us about it via email: $evmail.\"; \r\n\t\t\t return $error;\r\n\t\t}\t\t \t\r\n};}", "title": "" }, { "docid": "f7dd10f140004fc27b73f769ff279a2e", "score": "0.5818637", "text": "function rp($nominal) {\n //mengupdate nominal menjadi string, takutnya yang dimasukkan bertipe data int (angka)\n //mengeset string kosong buat penampung nanti, dan counter $c = 0\n $nominal = strval($nominal); $r = ''; $c = 0;\n $nominal = explode('.', $nominal); //memisah jika terdapat titik, takutnya ada titik seperti 4000.00\n $nominal = $nominal[0]; //mengambil data index pertama sebelum titik, berarti mengambil 4000-nya\n $nominal = explode('-', $nominal); //jika ada tanda minus di depan, maka akan dipecah lagi berdasarkan tanda minus tsb\n if (sizeof($nominal)>1) { //jika ternyata array yang dihasilkan oleh pemecahan tanda minus berjumlah lebih dari 1, berarti angka tersebut memang minus\n $min = '-'; $nominal = $nominal[1]; //dilakukan pemisahan dengan index 0 nin dan nominalnya di array index 1\n } else {\n $min = ''; $nominal = $nominal[0]; //jika tidak, maka memang bukan angka minus dan $min diset string kosong agar tidak berpengaruh saat direturn\n }\n for ($x=strlen($nominal)-1; $x>=0; $x--) { //diulang sebanyak string tapi dari belakang\n $r = $nominal[$x].$r; $c++; //menambah string kosong $r dengan index nominal dari belakang sambil menambah counter ($c)\n //jika counter kelipatan 3, maka saatnya ditambahkan dengan titik\n //misalnya 10000000, maka tiap perulangan 3x dari belakang akan ditambah titik, sehingga menjadi 10.000.000\n if ($c%3==0 & $x>0) $r = \".\".$r;\n }\n //mereturn hasil tadi, dengan tanda minusnya, tetapi jika tidak minus makan tidak akan mengganggu, karena variabel $min diisi string kosong di atas\n //return ditambahkan dengan ,00 dibelakang dan tanda Rp di depan sehingga berformat Rp ##.###,00\n return 'Rp '.$min.$r.',00';\n}", "title": "" }, { "docid": "d79c58e420099811001d84c064dbf300", "score": "0.57968414", "text": "function precio($precioUnidad, $cantidad, $descuento = 0 ){ // las variables que tenemos son arbitrarias, por lo cual hay que mirar bien si ponerlas en () de la funcion\n\n\n\n$multiplicar = $precioUnidad * $cantidad;\n\n// $descuento es un porcentaje\n\n// $restar = $multiplicar - $descuento; // este descuento debe ir en % por lo cual no es lo mismo que un entero, por lo cual lo colocaremos en entero\n\n\n// si esto fuera un porcentaje entonces seria $multiplicar = $precioUnidad * $cantidad; // $porcentaje = $multiplicar - $descuento; // $solucion = $multiplicar - $porcentaje; lo cual es lo que haremos\n\n$porcentaje = $multiplicar * $descuento;\n\n$solucion = $multiplicar - $porcentaje;\nreturn $solucion;\n// si colocamos todos los datos en solo sitio o una sola linea, sin especificar es e novatos, porque hay que haber un orden\n\n}", "title": "" }, { "docid": "94973a1934f0bbfbba44877b796484ec", "score": "0.5720761", "text": "function Tn_tec($level,$MBn) // ->tang dung\n{\n\treturn round((2000+350*($level-1)+pow(2*($level-1),3))*$MBn);\n}", "title": "" }, { "docid": "a83a1148c075767ec616ae6ba7ac99bd", "score": "0.57118875", "text": "function penyebut($nilai) {\n\t\t$nilai = abs($nilai);\n\t\t$huruf = array(\"\", \"satu\", \"dua\", \"tiga\", \"empat\", \"lima\", \"enam\", \"tujuh\", \"delapan\", \"sembilan\", \"sepuluh\", \"sebelas\");\n\t\t$temp = \"\";\n\t\tif ($nilai < 12) {\n\t\t\t$temp = \" \". $huruf[$nilai];\n\t\t} else if ($nilai <20) {\n\t\t\t$temp = penyebut($nilai - 10). \" belas\";\n\t\t} else if ($nilai < 100) {\n\t\t\t$temp = penyebut($nilai/10).\" puluh\". penyebut($nilai % 10);\n\t\t} else if ($nilai < 200) {\n\t\t\t$temp = \" seratus\" . penyebut($nilai - 100);\n\t\t} else if ($nilai < 1000) {\n\t\t\t$temp = penyebut($nilai/100) . \" ratus\" . penyebut($nilai % 100);\n\t\t} else if ($nilai < 2000) {\n\t\t\t$temp = \" seribu\" . penyebut($nilai - 1000);\n\t\t} else if ($nilai < 1000000) {\n\t\t\t$temp = penyebut($nilai/1000) . \" ribu\" . penyebut($nilai % 1000);\n\t\t} else if ($nilai < 1000000000) {\n\t\t\t$temp = penyebut($nilai/1000000) . \" juta\" . penyebut($nilai % 1000000);\n\t\t} else if ($nilai < 1000000000000) {\n\t\t\t$temp = penyebut($nilai/1000000000) . \" milyar\" . penyebut(fmod($nilai,1000000000));\n\t\t} else if ($nilai < 1000000000000000) {\n\t\t\t$temp = penyebut($nilai/1000000000000) . \" trilyun\" . penyebut(fmod($nilai,1000000000000));\n\t\t} \n\t\treturn $temp;\n\t}", "title": "" }, { "docid": "74504e59bc81635477c6a23f00a236ca", "score": "0.5682334", "text": "public function changeToOrdine()\n {\n\n //crea la tabella degli ordini verso i fornitori\n //Rielabora\n $preventivatore = $this->getPreventivatore();\n $result = $preventivatore->elabora();\n $imponibile = $result['prezzo_cliente_senza_iva'];\n $iva = $result['prezzo_cliente_con_iva'] - $result['prezzo_cliente_senza_iva'];\n $importo_trasportatore = $result['costo_trazione'];\n $importo_depositario = $result['deposito'];\n $importo_traslocatore_partenza = $result['costo_scarico_totale'] ;\n $importo_traslocatore_destinazione = $result['costo_salita_piano_totale'] + $result['costo_montaggio_totale'] + $result['costo_scarico_ricarico_hub_totale'];\n\n $totali = array();\n $totali[$this->id_trasportatore] = 0;\n $totali[$this->id_depositario] = 0;\n $totali[$this->id_traslocatore_destinazione] = 0;\n $totali[$this->id_traslocatore_partenza] = 0;\n\n $totaliMC = array();\n $totaliMC[$this->id_trasportatore] = 0;\n $totaliMC[$this->id_depositario] = 0;\n $totaliMC[$this->id_traslocatore_destinazione] = 0;\n $totaliMC[$this->id_traslocatore_partenza] = 0;\n\n\n $totali[$this->id_trasportatore] = $totali[$this->id_trasportatore] + $importo_trasportatore;\n $totali[$this->id_depositario] = $totali[$this->id_depositario] + $importo_depositario;\n $totali[$this->id_traslocatore_partenza] = $totali[$this->id_traslocatore_partenza] + $importo_traslocatore_partenza;\n $totali[$this->id_traslocatore_destinazione] = $totali[$this->id_traslocatore_destinazione] + $importo_traslocatore_destinazione;\n\n\n $mc = $preventivatore->getMC();\n\n $totaliMC[$this->id_trasportatore] = $totaliMC[$this->id_trasportatore] + $mc;\n $totaliMC[$this->id_depositario] = $totaliMC[$this->id_depositario] + $mc;\n $totaliMC[$this->id_traslocatore_destinazione] = $totaliMC[$this->id_traslocatore_destinazione] + $mc;\n $totaliMC[$this->id_traslocatore_partenza] = $totaliMC[$this->id_traslocatore_partenza] + $mc;\n\n $imponibile = round($totali[$this->id_trasportatore]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_trasportatore] - $imponibile,2);\n\n $ordine_trasportatore = new OrdineFornitore($this->id_preventivo, $this->id_trasportatore, $totali[$this->id_trasportatore], $imponibile, $iva, $totaliMC[$this->id_trasportatore], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASPORTO);\n $ordine_trasportatore->save();\n\n $imponibile = round($totali[$this->id_traslocatore_partenza]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_traslocatore_partenza] - $imponibile,2);\n\n $ordine_traslocatore_partenza = new OrdineFornitore($this->id_preventivo, $this->id_traslocatore_partenza, $totali[$this->id_traslocatore_partenza], $imponibile, $iva, $totaliMC[$this->id_traslocatore_destinazione], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASLOCO_PARTENZA);\n $ordine_traslocatore_partenza->save();\n\n $imponibile = round($totali[$this->id_traslocatore_destinazione]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_traslocatore_destinazione] - $imponibile,2);\n $ordine_traslocatore_destinazione = new OrdineFornitore($this->id_preventivo, $this->id_traslocatore_destinazione, $totali[$this->id_traslocatore_destinazione], $imponibile, $iva, $totaliMC[$this->id_traslocatore_partenza], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASLOCO_DESTINAZIONE);\n $ordine_traslocatore_destinazione->save();\n\n if ($this->giorni_deposito>10) {\n $imponibile = round($totali[$this->id_depositario]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_depositario] - $imponibile,2);\n\n $ordine_depositario = new OrdineFornitore($this->id_preventivo, $this->id_depositario, $totali[$this->id_depositario], $imponibile, $iva, $totaliMC[$this->id_depositario], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_DEPOSITO);\n $ordine_depositario->save();\n }\n\n\n\n $data_ordine = date('Y-m-d');\n $con = DBUtils::getConnection();\n $sql =\"UPDATE preventivi SET tipo=\".OrdineBusiness::TIPO_ORDINE.\" , data='\".$data_ordine.\"' ,\n importo_commessa_trasportatore ='\".$totali[$this->id_trasportatore].\"',\n importo_commessa_traslocatore_partenza ='\".$totali[$this->id_traslocatore_partenza].\"',\n importo_commessa_traslocatore_destinazione ='\".$totali[$this->id_traslocatore_destinazione].\"',\n importo_commessa_depositario ='\".$totali[$this->id_depositario].\"',\n imponibile ='\".$imponibile.\"',\n iva ='\".$iva.\"'\n WHERE id_preventivo=\".$this->id_preventivo;\n\n $res = mysql_query($sql);\n //echo \"\\nSQL: \".$sql;\n DBUtils::closeConnection($con);\n\n return new OrdineCliente($this->id_preventivo);\n }", "title": "" }, { "docid": "83439f94ece45468ddd3b6765cac43fe", "score": "0.5628524", "text": "public function darCostos(){\n\t\t/*variables: int $valor, float $costo*/\n\t\t$valor = parent::darCostos();\n\t\t$costo = $valor + ($valor * $this->getPorcentajeIncremento()); //45% incremento \n\t\treturn $costo;\n\t}", "title": "" }, { "docid": "e211625a00bae1ef092ea9d37bc5901f", "score": "0.5619809", "text": "public function testTarjetita() {\n\t\tprint (\"--Cargando 100:\\n\");\n\t\t$saldoInicial = $this->tarjeta->getSaldo();\n\t\t$this->tarjeta->recargar(100);\n\t\t$this->assertEquals(100, $this->tarjeta->getSaldo() - $saldoInicial);\n\n\t\t// probando cargar la tarjeta con un monto especial\n\t\tprint (\"--Cargando 290:\\n\");\n\t\t$saldoInicial = $this->tarjeta->getSaldo();\n\t\t$this->tarjeta->recargar(290);\n\t\t$this->assertEquals(340, $this->tarjeta->getSaldo() - $saldoInicial);\n\n\t\t// probando cargar la tarjeta con otro monto especial\n\t\tprint (\"--Cargando 544:\\n\");\n\t\t$saldoInicial = $this->tarjeta->getSaldo();\n\t\t$this->tarjeta->recargar(544);\n\t\t$this->assertEquals(680, $this->tarjeta->getSaldo() - $saldoInicial);\n\n\t\t// probando un boleto comun\n\t\tprint (\"--Normal:\\n\");\n\t\t$saldoInicial = $this->tarjeta->getSaldo();\n\t\t$this->tarjeta->pagar($this->colectivo, \"21-09-2016 16:00\");\n\t\t$this->assertEquals($saldoInicial-8.5, $this->tarjeta->getSaldo());\n\n\t\t// probando un trasbordo\n\t\tprint (\"--Trasbordo:\\n\");\n\t\t$this->colectivo = new Colectivo(\"129 Rojo\", \"Rosario Bus\");\n\t\t$saldoInicial = $this->tarjeta->getSaldo();\n\t\t$this->tarjeta->pagar($this->colectivo, \"21-09-2016 16:21\");\n\t\t$this->assertEquals($saldoInicial-2.81, $this->tarjeta->getSaldo());\n\n\t\t// probando una bicicleta\n\t\tprint (\"--Bicicleta:\\n\");\n\t\t$saldoInicial = $this->tarjeta->getSaldo();\n\t\t$this->tarjeta->pagar($this->bicicleta, \"21-09-2016 16:50\");\n\t\t$this->assertEquals($saldoInicial-12, $this->tarjeta->getSaldo());\n\n\t\t// probando el pase libre\n\t\tprint (\"--Libre:\\n\");\n\t\t$this->tarjetaAlternativa = new PaseLibre();\n\t\t$this->tarjetaAlternativa->recargar(50);\n\t\t$saldoInicial = $this->tarjetaAlternativa->getSaldo();\n\t\t$this->tarjetaAlternativa->pagar($this->colectivo, \"12-03-2016 18:32\");\n\t\t$this->assertEquals($saldoInicial, $this->tarjetaAlternativa->getSaldo());\n\n\t\t// probando el medio\n\t\tprint (\"--Medio:\\n\");\n\t\t$this->tarjetaAlternativa = new MedioBoleto();\n\t\t$this->tarjetaAlternativa->recargar(50);\n\t\t$saldoInicial = $this->tarjetaAlternativa->getSaldo();\n\t\t$this->tarjetaAlternativa->pagar($this->colectivo, \"12-03-2016 18:32\");\n\t\t$this->assertEquals($saldoInicial-4.25, $this->tarjetaAlternativa->getSaldo());\n\n\t\t// probando los plus\n\t\tprint (\"--Viaje PLUS 2:\\n\");\n\t\t$this->tarjetaAlternativa = new Tarjetita();\n\t\tprint ($this->tarjetaAlternativa->getPlus() . \" PLUS RESTANTES\\n\");\n\t\t$this->tarjetaAlternativa->recargar(4);\n\t\t$saldoInicial = $this->tarjetaAlternativa->getSaldo();\n\t\t$this->tarjetaAlternativa->pagar($this->colectivo, \"12-03-2016 18:12\");\n\t\t$this->assertEquals($saldoInicial, $this->tarjetaAlternativa->getSaldo());\n\t\t$this->assertEquals(1, $this->tarjetaAlternativa->getPlus());\n\n\t\t// probando que la bici no funcione sin saldo suficiente\n\t\tprint ($this->tarjetaAlternativa->getPlus() . \" PLUS RESTANTES\\n\");\n\t\tprint (\"--Pagando bici sin saldo:\\n\");\n\t\t$viajesIniciales = $this->tarjetaAlternativa->getViajesRealizados();\n\t\t$this->tarjetaAlternativa->pagar($this->bicicleta, \"12-03-2016 20:22\");\n\t\t$this->assertEquals($viajesIniciales, $this->tarjetaAlternativa->getViajesRealizados());\n\n\t\t// probando que no se pueda seguir pagando colectivo luego de 2 plus\n\t\tprint ($this->tarjetaAlternativa->getPlus() . \" PLUS RESTANTES\\n\");\n\t\tprint (\"--Viaje PLUS #1:\\n\");\n\t\t$this->tarjetaAlternativa->pagar($this->colectivo, \"12-03-2016 22:39\");\n\t\t$this->assertEquals(0, $this->tarjetaAlternativa->getPlus());\n\t\tprint (\"--Viaje Negado:\\n\");\n\t\t$viajesIniciales = $this->tarjetaAlternativa->getViajesRealizados();\n\t\t$this->tarjetaAlternativa->pagar($this->colectivo, \"12-04-2016 12:18\");\n\t\t$this->assertEquals($viajesIniciales, $this->tarjetaAlternativa->getViajesRealizados());\n\t}", "title": "" }, { "docid": "9c93b84aa1c35a5d0799a6ccc0cf7565", "score": "0.56082684", "text": "function CalculMontantArticle($numserie, $prix, $qte) {\n\n $this->article[$numserie]['montantHT'] += $prix * $qte;\n $this->article[$numserie]['montantTTC'] += $prix * $qte * (1 + ($this->TVA / 100));\n\n }", "title": "" }, { "docid": "248b5a950a176d8460b4e6d7b1a2ae38", "score": "0.56069213", "text": "public function perimetre()\n {\n // section -64--88--103-1-2c9bd139:16deeff2ef5:-8000:000000000000099C begin\n // section -64--88--103-1-2c9bd139:16deeff2ef5:-8000:000000000000099C end\n }", "title": "" }, { "docid": "b03cbd60e7aa33b43732ead5e704c076", "score": "0.5603589", "text": "function tong($p_tuso, $p_mauso)\n {\n $ps = new PHAN_SO();\n $ps->khoitao_ps($p_tuso, $p_mauso);\n $ps->tuso = ($this->tuso*$ps->mauso) + ($ps->tuso*$this->mauso);\n $ps->mauso = $this->mauso * $ps->mauso;\n // $ps->toigian_ps();\n return $ps;\n }", "title": "" }, { "docid": "88cd1710b5985e963df92c7fca02b7b1", "score": "0.56005037", "text": "public function calcul_com($palier, $montant_vnt_ht, $ca, $niveau)\n{\n\n $commission = 0;\n $tab = array();\n \n // on retire l'encaissé actuel parcequ'il fait déjà partir du ca encaissé\n $ca -= $montant_vnt_ht;\n // dd($montant_vnt_ht);\n // à partir du niveau actuel, on avance sur le palier\n for ($i=$niveau; $i<count($palier);$i++){\n if ($ca + $montant_vnt_ht <= ($palier[$i])[3] || $i == count($palier) - 1){\n $commission += ($montant_vnt_ht / 100) * ($palier[$i])[1];\n $tab[] = array($montant_vnt_ht,($palier[$i])[1]);\n break;\n }\n else {\n $diff = ($palier[$i])[3] - $ca;\n $commission += ($diff / 100) * ($palier[$i])[1];\n $montant_vnt_ht -= $diff;\n\n $tab[] = array($diff,($palier[$i])[1]);\n \n // echo(\"Ajout à la commission:\". ($diff / 100) * ($palier[$i])[1]);\n // echo(\"reste:\". $montant_vnt_ht);\n $ca += $diff;\n }\n }\n\n $tabs = array($tab,$commission);\n return $tabs;\n}", "title": "" }, { "docid": "0f809f028a79705271497a20a21e1e20", "score": "0.5591203", "text": "function topten_articles_periode($periode) {\r\n\tglobal $couleur_claire;\r\n\r\n\tif ($periode == '8') {\r\n\t\t$top = $GLOBALS['actijour']['nbl_topsem'];\r\n\t} elseif ($periode == '30') {\r\n\t\t$top = $GLOBALS['actijour']['nbl_topmois'];\r\n\t} else {\r\n\t\t$top = '10';\r\n\t}\r\n\r\n\t$q = sql_select(\"sva.id_article, SUM(sva.visites) AS volume, \r\n\t\t\t\tMAX(sva.visites) AS picvis, sa.statut, sa.titre, sa.visites \r\n\t\t\t\tFROM spip_visites_articles sva \r\n\t\t\t\tLEFT JOIN spip_articles sa ON sva.id_article=sa.id_article \r\n\t\t\t\tWHERE sa.statut='publie' AND sva.date > DATE_SUB(NOW(),INTERVAL $periode DAY) \r\n\t\t\t\tGROUP BY sva.id_article \r\n\t\t\t\tORDER BY volume DESC \r\n\t\t\t\tLIMIT 0,$top\"\r\n\t);\r\n\t$ifond = 0;\r\n\t$aff = '';\r\n\r\n\t$aff .= debut_cadre_relief(\"article-24.gif\", true)\r\n\t\t. \"<table align='center' border='0' cellpadding='2' cellspacing='1' width='100%'>\\n\"\r\n\t\t. \"<tr><td colspan='5' class='cart_titre_bold verdana3'>\" . _T('actijour:top_ten_article_' . $periode . '_j')\r\n\t\t. \"</td></tr>\";\r\n\r\n\t$aff .= \"<tr class='legend_topten'><td>A</td><td>B</td><td>C</td><td>D</td><td>E</td></tr>\\n\";\r\n\r\n\twhile ($row = sql_fetch($q)) {\r\n\t\t$ifond = $ifond ^ 1;\r\n\t\t$couleur = ($ifond) ? $couleur_claire : '#FFFFFF';\r\n\r\n\t\t$aff .= \"<tr bgcolor='$couleur'><td width='7%'>\\n\"\r\n\t\t\t. \"<div align='right' class='verdana2'>\"\r\n\t\t\t. affiche_lien_graph($row['id_article'], $row['titre'], $row['statut'], 'spip')\r\n\t\t\t. \"</div></td>\\n\"\r\n\t\t\t. \"<td width='70%'>\\n<div align='left' class='verdana2'><b>\"\r\n\t\t\t. affiche_lien_graph($row['id_article'], $row['titre'], $row['statut'])\r\n\t\t\t. \"</b></div></td>\\n\"\r\n\t\t\t. \"<td width='6%'>\\n<div align='right' class='verdana1' style='margin-right:3px;'><b>\"\r\n\t\t\t. $row['volume'] . \"</b></div></td>\\n\"\r\n\t\t\t. \"<td width='7%'>\\n<div align='right' class='verdana1' style='margin-right:3px;'><b>\"\r\n\t\t\t. $row['picvis'] . \"</b></div>\\n</td>\\n\"\r\n\t\t\t. \"<td width='10%'>\\n<div align='right' class='verdana1' style='margin-right:3px;'><b>\"\r\n\t\t\t. $row['visites'] . \"</b></div>\\n</td>\\n</tr>\\n\";\r\n\t}\r\n\t$aff .= \"</table>\";\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}", "title": "" }, { "docid": "95beb5636e036e38f00b02de9e52c978", "score": "0.5589303", "text": "function p3_ex8() {\n function p3_ex8_loop() {\n for ($i = 200; $i >= 0; $i -= 12)\n $return .= \"C'est presque bon.<br />\";\n return $return;\n }\n // Just add p3_ex8_loop().\"<br />\".\n return 'XX fois'; // 17\n}", "title": "" }, { "docid": "c6ce58653c797680681988767c7cbe01", "score": "0.558727", "text": "function Tn_tro($level,$MBn) // Ct dung\n{\n\treturn\tround((2000+350*($level-1)+pow(2*($level-1),3))*$MBn);\n}", "title": "" }, { "docid": "477c0f28bb519d980e880397401413dd", "score": "0.55777836", "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": "62056c52cea8486fdb0807e1448d84a0", "score": "0.5571623", "text": "function valorDoBtcComEncargosSaque($param_valor)\n{\n\n//pega o btc e soma valor final do btc com todos encargos\n\n\t$percentual = 0.70 / 100.0; // 15%\n\t$valor_final = $param_valor - ($percentual * $param_valor);\n\t//comissoes 1,99 + 2,90\n\t$percentual2 = 2.0 / 100.0;\n\t$valorTotal = $percentual2 * $param_valor;\n\t\n\t\n\t\n\t$finalTodos = $valor_final - $valorTotal - 3;\n\n\t\treturn $finalTodos;\n}", "title": "" }, { "docid": "ecddd8943ea8e5b77a88a5d1fe310d9e", "score": "0.5568978", "text": "public function traerCualquiera()\n {\n }", "title": "" }, { "docid": "47b80ef5e8a1ebfc27aa6806d56bc765", "score": "0.55526793", "text": "public function contarTempo(){\n $this->barraProgresso->set_fraction(($this->segundos)*(1.0/$this->tempoMax));\n //Coloca a contagem regressiva na tela de progesso\n $this->barraProgresso->set_text($this->tempoMax-$this->segundos);\n //$this->barraProgresso->set_show_tex(true);\n $this->segundos++;\n //Chama a tela de alerta caso o tempo máximo seja atingindo.\n if ($this->segundos ==$this->tempoMax+1){\n $this->zerarTempo();\n //Faz parar a contagem de tempo\n $this->pararContagem();\n $this->telaCampo->perder();\n }\n return $this->contar;\n }", "title": "" }, { "docid": "d0e2cd0bb37067ecd7d47a8b0f0877fa", "score": "0.5541433", "text": "public function engordar($quilos){\n $this->peso = $this->peso + $quilos;\n}", "title": "" }, { "docid": "8f597fb5d76397a8c0c4b8d7b62599b9", "score": "0.55403376", "text": "function temporalidad_rcp($rm_id){\n for ($i=0; $i <=12 ; $i++) { \n $mes[$i]='mes'.$i.'';\n $prog[1][$i]=0; /// p\n $prog[2][$i]=0; /// pa\n $prog[3][$i]=0; /// %pa\n }\n\n $resultado=$this->model_mestrategico->get_resultado_mplazo($rm_id); \n $programado=$this->model_mestrategico->get_resultado_mplazo_programado_gestion($rm_id);\n\n \n if(count($programado)!=0){\n $programado_mensual=$this->model_mestrategico->get_resultado_cplazo_programado($programado[0]['rmp_id']);\n if(count($programado_mensual)!=0){\n\n $pa=0;\n for ($i=1; $i <=12 ; $i++) { \n $prog[1][$i]=$programado_mensual[0][$mes[$i]];\n $pa=$pa+$prog[1][$i];\n $prog[2][$i]=$pa+$resultado[0]['rm_linea_base'];\n if($resultado[0]['rm_meta']!=0){\n $prog[3][$j]=round((($prog[2][$i]/$resultado[0]['rm_meta'])*100),2);\n }\n }\n \n }\n }\n return $prog;\n }", "title": "" }, { "docid": "5a96db6f94b510e1c6cfe5e2b8c63919", "score": "0.5528971", "text": "function NUMERO_LUNES_FECHA($_ARGS) {\r\n\t$_FECHA_EGRESO = FECHA_EGRESO($_ARGS);\r\n\t\r\n\tif (ESTADO($_ARGS) == \"A\") {\r\n\t\tif ($_ARGS['FECHA_INGRESO'] <= $_ARGS['DESDE']) {\r\n\t\t\tif ($_ARGS['FECHA_INGRESO'] < $_ARGS['HASTA']) list($ae, $me, $de) = SPLIT('[/.-]', $_ARGS['HASTA']);\r\n\t\t\telse list($ae, $me, $de) = SPLIT('[/.-]', $_ARGS['FECHA_INGRESO']);\r\n\r\n\t\t\tlist($ap, $mp) = SPLIT('[/.-]', $_ARGS['PERIODO']); $periodo_inicio = \"01-$mp-$ap\";\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t$dia_inicio = 1;\r\n\t\t\t$dia_fin = DIAS_DEL_MES(\"$de-$me-$ae\");\r\n\t\t} else {\r\n\t\t\tlist($ae, $me, $de) = SPLIT('[/.-]', $_ARGS['HASTA']);\r\n\t\t\tlist($ai, $mi, $di) = SPLIT('[/.-]', $_ARGS['FECHA_INGRESO']); $periodo_inicio = \"$di-$mi-$ai\";\t$diai = (int) $di;\r\n\t\t\t\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t\r\n\t\t\tif ($dia_semana == 1) {\r\n\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t} else {\r\n\t\t\t\tif ($dia_semana == 0) $restar_dia_semana = $diai - 7;\r\n\t\t\t\telse $restar_dia_semana = $diai - $dia_semana;\r\n\t\t\t\t\r\n\t\t\t\tif ($restar_dia_semana < 1) $dia_inicio = (int) $di;\r\n\t\t\t\telse {\r\n\t\t\t\t\t$diferencia_dias = $dia_semana - 1;\r\n\t\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t\t\t$dia_inicio -= $diferencia_dias;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$dia_fin = DIAS_DEL_MES(\"$de-$me-$ae\");\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tlist($ae, $me, $de) = SPLIT('[/.-]', $_FECHA_EGRESO);\r\n\t\t\r\n\t\tif ($_ARGS['FECHA_INGRESO'] <= $_ARGS['DESDE']) {\r\n\t\t\tlist($ap, $mp) = SPLIT('[/.-]', $_ARGS['PERIODO']); $periodo_inicio = \"01-$mp-$ap\";\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t$dia_inicio = 1;\r\n\t\t\t$dia_fin = (int) $de;\r\n\t\t} else {\t\r\n\t\t\tlist($ai, $mi, $di) = SPLIT('[/.-]', $_ARGS['FECHA_INGRESO']); $periodo_inicio = \"$di-$mp-$ap\";\t$diai = (int) $di;\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t\r\n\t\t\tif ($dia_semana == 1) {\r\n\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t} else {\r\n\t\t\t\tif ($dia_semana == 0) $restar_dia_semana = $diai - 7;\r\n\t\t\t\telse $restar_dia_semana = $diai - $dia_semana;\r\n\t\t\t\t\r\n\t\t\t\tif ($restar_dia_semana < 1) $dia_inicio = (int) $di;\r\n\t\t\t\telse {\r\n\t\t\t\t\t$diferencia_dias = $dia_semana - 1;\r\n\t\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t\t\t$dia_inicio -= $diferencia_dias;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$dia_fin = (int) $de;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$lunes = 0;\r\n\tfor ($dia=$dia_inicio; $dia<=$dia_fin; $dia++) {\r\n\t\tif ($dia_semana == 7) $dia_semana = 0;\r\n\t\tif ($dia_semana == 1) $lunes++;\r\n\t\t$dia_semana++;\r\n\t}\r\n\treturn $lunes;\r\n}", "title": "" }, { "docid": "392140c27318fc544dd48d1d3300bdfe", "score": "0.5518109", "text": "public function calcula13o()\n {\n }", "title": "" }, { "docid": "392140c27318fc544dd48d1d3300bdfe", "score": "0.5518109", "text": "public function calcula13o()\n {\n }", "title": "" }, { "docid": "35596b329525574a4ea6cfcda242f2e2", "score": "0.5502788", "text": "public function totalcp()\r\n\t{\r\n\t\t$date=date('d/m/Y');\r\n\t\tlist($jour_actuel, $mois_actuel, $annee_actuelle) = explode(\"/\", $date);\r\n\t\t$date_entree = $this->personne->getDate_entree();\r\n\t\tlist( $annee_entree, $mois_entree,$jour_entree) = explode(\"-\", $date_entree);\r\n\t\t$cemule_annees =$annee_actuelle - $annee_entree ;\r\n\t\t$supplument_anciennete =0;\r\n\t\tif (01<=$mois_entree && $mois_entree <=05 && ($annee_actuelle -1 >= $annee_entree) )\r\n\t\t{\r\n\t\t\tif($cemule_annees >=2 )\r\n\t\t\t{\r\n\t\t\t\t$supplument_anciennete = 1;\r\n\t\t\t}\r\n\t\t\tif ($cemule_annees >=3 )\r\n\t\t\t{\r\n\t\t\t\t$supplument_anciennete = 2;\r\n\t\t\t}\r\n\t\t\tif ($cemule_annees >=5 )\r\n\t\t\t{\r\n\t\t\t\t$supplument_anciennete = 3;\r\n\t\t\t}\r\n\t\t\tif ($cemule_annees >=8 )\r\n\t\t\t{\r\n\t\t\t\t$supplument_anciennete = 4;\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif (06<=$mois_entree && $mois_entree <=12 && $cemule_annees >= 3)\r\n\t\t{\r\n\t\t\tif($cemule_annees >=3)\r\n\t\t\t{\r\n\t\t\t\t$supplument_anciennete = 1;\r\n\t\t\t}\r\n\t\t\tif ($cemule_annees >=4)\r\n\t\t\t{\r\n\t\t\t\t$supplument_anciennete = 2;\r\n\t\t\t}\r\n\t\t\tif ($cemule_annees >=6)\r\n\t\t\t{\r\n\t\t\t\t$supplument_anciennete = 3;\r\n\t\t\t}\r\n\t\t\tif ($cemule_annees >=9)\r\n\t\t\t{\r\n\t\t\t\t$supplument_anciennete = 4;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\tif ( $jour_entree <15)\r\n\t\t\t{\r\n\t\t\t$cp = (12-$mois_entree)* 2.25;\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\t$cp = (11-$mois_entree)* 2.25;\r\n\t\t\t}\r\n\t\t\treturn $cp_total = $cp + $supplument_anciennete;\r\n\t}", "title": "" }, { "docid": "8c0c6f9192734b338bdb4dea70fa7ad0", "score": "0.5502486", "text": "function gestiondegats($idvaisseauquisefaittirerdessus, $pvvaisseau, $degatdutir, $idarme, $idvaisseauquitire, $idflotteattaquant, $idflottedefenseur, $sensbataille)\r\n {\r\n require __DIR__ . '/../include/bddconnection.php';\r\n $reqdiminuernbtir = $bd->prepare(\"UPDATE c_composantvaisseau SET tirrestant = tirrestant-1 WHERE idtable = ?\");\r\n $reqdiminuernbtir->execute(array($idarme));\r\n\r\n $nvpv = $pvvaisseau - $degatdutir;\r\n $Commentairestour = 'Le vaisseau '.$idvaisseauquisefaittirerdessus.' se fait tirer dessus par le vaisesau '.$idvaisseauquitire.', il perd '.$degatdutir.' PV.<br>';\r\n \r\n $texte1 = '<br>Votre vaisseau ('.$idvaisseauquitire.') vient de tirer sur un vaisseau ennemi ('.$idvaisseauquisefaittirerdessus.'). '.$degatdutir.' dégâts infligés.';\r\n $texte2 = '<br>Votre vaisseau ('.$idvaisseauquisefaittirerdessus.') se fait tirer dessus par un vaisseau ennemi ('.$idvaisseauquitire.'). '.$degatdutir.' dégâts recus.';\r\n\r\n if ($nvpv < 0)\r\n {\r\n $texte1 .= ' Vaisseau détruit.';\r\n $texte2 .= ' Vaisseau détruit.';\r\n\r\n $Commentairestour .= 'Le vaisseau '.$idvaisseauquisefaittirerdessus.' vient de se faire détruire.<br>';\r\n $reqinfopvvaisseau = $bd->prepare(' SELECT p.idjoueurplanete, v.nomvaisseau, f.xflotte, f.yflotte, f.universflotte, v.biensvaisseau, v.titanevaisseau, f.idplaneteflotte\r\n FROM c_vaisseau v\r\n INNER JOIN c_flotte f ON f.idflotte = v.idflottevaisseau\r\n LEFT JOIN c_planete p ON p.idplanete = f.idplaneteflotte\r\n WHERE v.idvaisseau = ?');\r\n $reqinfopvvaisseau->execute(array($idvaisseauquisefaittirerdessus));\r\n $repinfopvvaisseau = $reqinfopvvaisseau->fetch();\r\n\r\n $reqcreerasteroides = $bd->prepare('INSERT INTO c_champsasteroides (xaste , yaste , uniaste, typeitemsaste, quantite) VALUES (?, ?, ?, ?, ?)');\r\n\r\n if ($repinfopvvaisseau['idjoueurplanete'] != 0)\r\n { // On envoit ce message uniquement aux joueurs.\r\n $textemessage = 'Nous avons perdu le vaisseau ' . $repinfopvvaisseau['nomvaisseau'] . ' en ' . $repinfopvvaisseau['xflotte'] . '-' . $repinfopvvaisseau['yflotte'] . ' lors d\\'une bataille spatiale.' ; \r\n $reqmessageinterne = $bd->prepare('INSERT INTO c_messagerieinterne (expediteur , destinataire , lu , titre , texte) VALUES (?, ?, ?, ?, ?)');\r\n $reqmessageinterne->execute(array('Amirauté', $repinfopvvaisseau['idjoueurplanete'], 0, 'Perte d\\'un vaisseau', $textemessage));\r\n }\r\n \r\n // Créer champs d'astéroides : Reprendre le prix du vaisseau\r\n $nbchampsastebien = floor(($repinfopvvaisseau['biensvaisseau'] / 150));\r\n $nbchampsastetitane = floor(($repinfopvvaisseau['titanevaisseau'] / 30));\r\n\r\n if ($nbchampsastebien > 0)\r\n {\r\n $reqcreerasteroides->execute(array($repinfopvvaisseau['xflotte'], $repinfopvvaisseau['yflotte'], $repinfopvvaisseau['universflotte'], 6, $nbchampsastebien));\r\n }\r\n if ($nbchampsastetitane > 0)\r\n {\r\n $reqcreerasteroides->execute(array($repinfopvvaisseau['xflotte'], $repinfopvvaisseau['yflotte'], $repinfopvvaisseau['universflotte'], 8, $nbchampsastetitane));\r\n }\r\n\r\n $reqinfocargo = $bd->prepare(\"SELECT typeitems, quantiteitems FROM c_cargovaisseau WHERE idvaisseaucargo = ?\");\r\n $reqinfocargo->execute(array($idvaisseauquisefaittirerdessus));\r\n while ($repinfocargo = $reqinfocargo->fetch())\r\n { // Cas d'un vaisseau trouvé dans le 1er univers\r\n $reqcreerasteroides->execute(array($repinfopvvaisseau['xflotte'], $repinfopvvaisseau['yflotte'], $repinfopvvaisseau['universflotte'], $repinfocargo['typeitems'], $repinfocargo['quantiteitems']));\r\n }\r\n\r\n // cargovaisseau\r\n $reqdeletecargo = $bd->prepare(\"DELETE FROM c_cargovaisseau WHERE idvaisseaucargo = ?\");\r\n $reqdeletecargo->execute(array($idvaisseauquisefaittirerdessus));\r\n\r\n // composantvaisseau\r\n $reqdeletecomposant = $bd->prepare(\"DELETE FROM c_composantvaisseau WHERE idvaisseaucompo = ?\");\r\n $reqdeletecomposant->execute(array($idvaisseauquisefaittirerdessus));\r\n\r\n // vaisseau\r\n $reqdeletevaisseau = $bd->prepare(\"DELETE FROM c_vaisseau WHERE idvaisseau = ?\");\r\n $reqdeletevaisseau->execute(array($idvaisseauquisefaittirerdessus));\r\n }\r\n else\r\n {\r\n $reqdiminuerpvvaisseau = $bd->prepare('UPDATE c_vaisseau SET HPvaisseau = ? WHERE idvaisseau = ?');\r\n $reqdiminuerpvvaisseau->execute(array($nvpv, $idvaisseauquisefaittirerdessus));\r\n }\r\n\r\n $reqtrouverrapportdecombat = $bd->prepare('SELECT idrapportcombat FROM c_rapportcombat WHERE idflotteattaquant = ? AND idflottedefenseur = ?');\r\n $reqtrouverrapportdecombat->execute(array($idflotteattaquant, $idflottedefenseur));\r\n $reptrouverrapportdecombat = $reqtrouverrapportdecombat->fetch();\r\n\r\n // Vérifier si le rapport existe. Si ce n'est pas le cas, le créer.\r\n if (!isset($reptrouverrapportdecombat['idrapportcombat']))\r\n {\r\n $reqcreerrapportcombat = $bd->prepare('INSERT INTO c_rapportcombat(idflotteattaquant, idflottedefenseur, texteattaquant, textedefenseur) VALUES(?, ?, ?, ?)');\r\n $texteattaquant = 'Début du rapport de combat. Vous attaquez une flotte ('.$idflottedefenseur.').';\r\n $textedefenseur = 'Début du rapport de combat. Vous êtes attaqués par une flotte ('.$idflotteattaquant.').';\r\n $reqcreerrapportcombat->execute(array($idflotteattaquant, $idflottedefenseur, $texteattaquant, $textedefenseur));\r\n }\r\n\r\n if($sensbataille == 1)\r\n {\r\n $textesupplementaireattaquant = $texte1;\r\n $textesupplementairedefenseur = $texte2;\r\n }\r\n elseif($sensbataille == 2)\r\n {\r\n $textesupplementaireattaquant = $texte2;\r\n $textesupplementairedefenseur = $texte1;\r\n }\r\n\r\n // Le compléter.\r\n $requpdaterapportcombat = $bd->prepare('UPDATE c_rapportcombat\r\n SET texteattaquant = concat(texteattaquant, ?), textedefenseur = concat(textedefenseur, ?)\r\n WHERE idflotteattaquant = ? AND idflottedefenseur = ?');\r\n $requpdaterapportcombat->execute(array($textesupplementaireattaquant, $textesupplementairedefenseur, $idflotteattaquant, $idflottedefenseur));\r\n\r\n return $Commentairestour;\r\n }", "title": "" }, { "docid": "507b7372455ef32a7e8ab38aa29563e7", "score": "0.5500571", "text": "function paludisme($nb_susp,$nb_tdr_moins,$nb_tdr_plus,$nb_traite){\n $this->SetFont('Arial','',15);\n $this->Cell(0,6,\"Tableau de Paludisme\");\n $this->Ln();\n $this->SetFont('Times','',12);\n $this->Cell(140,5,\"Nombre de supect de paludisme \",1);\n $this->Cell(14,5,$nb_susp,1,0,'R');\n $this->Ln();\n $this->Cell(140,5,utf8_decode(\"Nombre de cas de paludisme testés\"),1);\n $this->Cell(14,5,$nb_tdr_moins + $nb_tdr_plus,1,0,'R');\n $this->Ln();\n $this->Cell(140,5,\"Nombre de cas de TDR+\",1);\n $this->Cell(14,5,$nb_tdr_plus,1,0,'R');\n $this->Ln();\n $this->Cell(140,5,utf8_decode(\"Nombre de cas de paludisme traités (confirmé)\"),1);\n $this->Cell(14,5,$nb_traite,1,0,'R');\n $this->Ln();\n $this->Ln();\n }", "title": "" }, { "docid": "176e45d5cbea4cafa917074668e7876b", "score": "0.5488263", "text": "function formel_kampf($a_count,$v_count,$a_ang,$v_def,$trefferQuote = 10,$rapidfire = 1)\n{\n $schaden = rand(60,100);\n //28.12.2011 - nun echtes RF\n $schuss = $a_count;// * max(1,$rapidfire);\n \n if($schuss < 0)\n\t\techo \"komische anzahl $a_count<br>\";\n\t$treffer = ($schuss * (rand($trefferQuote,100)/100));\n \n\t\n\t$angWert = $treffer * ($schaden / 100) * $a_ang;\n\t\n\t//$iRest = max(round((1 / ($v_def)) * (($v_count * $v_def) - ($angWert)) ),0);\n $iTmp = ((($v_def * $v_count) - $angWert) / ($v_def * $v_count)) * $v_count;\n $iTmp = max($iTmp,0);\n $iAbsorb = $v_def * ($v_count - $iTmp);\n \n $iRest = ceil($iTmp);\n //$iRest = (round(($v_count / ($v_count * $v_def)) * (($v_count * $v_def) - ($angWert)) ));\n\n\t//echo \"($v_count / ($v_count * $v_def)) * (($v_count * $v_def) - ($angWert)) = $iRest<br/>\";\n\t\n\treturn array(\"rest\" => $iRest, \"schuss\" => $schuss, \"treffer\" => $treffer, \"schaden\" => $angWert, \"absorb\" => $iAbsorb);\n}", "title": "" }, { "docid": "c4b7ced6683078364a3b93fb3996d55b", "score": "0.5479591", "text": "function valore_costo_trasporto_ordine_gas($id_ordine,$id_gas){\r\n $valore_globale_attuale_netto_qarr = valore_totale_ordine_qarr($id_ordine);\r\n $valore_gas_attuale_netto_qarr = valore_totale_mio_gas($id_ordine,$id_gas);\r\n $percentuale_mio_gas = ($valore_gas_attuale_netto_qarr / $valore_globale_attuale_netto_qarr) *100;\r\n $costo_globale_trasporto = valore_trasporto($id_ordine,100);\r\n $costo_trasporto = ($costo_globale_trasporto / 100) * $percentuale_mio_gas;\r\n return (float)$costo_trasporto;\r\n}", "title": "" }, { "docid": "4b507779b18d78d96e29f0e8cc0776f0", "score": "0.5477628", "text": "function valore_totale_mio_ordine_lordo($idu,$usr){\r\n$mio_o = valore_totale_mio_ordine($idu,$usr);\r\n//echo \"mio=\".$mio_o.\"<br>\";\r\n\r\n$vto = valore_totale_ordine_qarr($idu);\r\n\r\n//echo \"vto=\".$vto.\"<br>\"; \r\nif ($vto>0){ \r\n$perc = (float)($mio_o/$vto)*100;\r\n\r\n$tras = valore_trasporto($idu,$perc);\r\n//echo \"perc=\".$perc.\"<br>\";\r\n//echo \"tras=\".$tras.\"<br>\"; \r\n$gest =valore_gestione($idu,$perc);\r\n//echo \"perc=\".$perc.\"<br>\"; \r\n//echo $perc;\r\nreturn (float)round($mio_o + $tras + $gest,4);\r\n}else{\r\nreturn \"\"; \r\n\t\r\n}\r\n}", "title": "" }, { "docid": "5592c9b1ac79088588649fa514d25921", "score": "0.54669243", "text": "function venta($mysqli,$fecha,$ref,$monto16,$monto0,$iva,$tipo,$factu,$cte){\n\t\t//en todos los casos\n\t\t$table='diario';\n\t\t$tmonto=$monto16+$monto0;\n\t\t$montof=$tmonto+$iva;\n\t\t//inicializa variable resultados\n\t\t\t//calculo del costo de ventas\n\t\t $costoc=$mysqli->query(\"SELECT SUM(haber)FROM inventario WHERE tipomov = 2 AND idoc= $ref\");\n\t\t\t$row=mysqli_fetch_row($costoc);\n\t\t\t$costo=$row[0];\n\t\t\t$costoc->close();\t\n\t\t\t//si existe el costo de ventas?\n\t\t\tif($costo!=''){\n\t\t\t\ttry {\n\t\t\t\t\t$mysqli->autocommit(false);\n\t\t\t\t\t//abono a inventario 115.01\n\t\t\t\t\t$abono=\"115.01\";\n\t\t\t\t\toperdiario($mysqli,$abono,1,1,$ref,$costo,$fecha,$factu);\n\t\t\t\t\t//cargo a costo de ventas 501.01\n\t\t\t\t\t$cargo=\"501.01\";\n\t\t\t\t\toperdiario($mysqli,$cargo,1,0,$ref,$costo,$fecha,$factu);\n\t\t\t\t\t//abono a ventas segun tasa\n\t\t\t\t\t//ventas tasa general \n\t\t\t\t\t\t$abono=\"401.01\";\n\t\t\t\t\t\toperdiario($mysqli,$abono,1,1,$ref,$monto16,$fecha,$factu,$cte);\n\t\t\t\t\t//ventas tasa 0 \n\t\t\t\t\t\t$abono=\"401.04\";\n\t\t\t\t\t\toperdiario($mysqli,$abono,1,1,$ref,$monto0,$fecha,$factu,$cte);\n\t\t\t\t\t//movimientos por tipo de venta\n\t\t\t\t\t\tswitch($tipo){\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t//mostrador- cargo a caja y efectivo 101.01\n\t\t\t\t\t\t\t\t$cargo=\"101.01\";\n\t\t\t\t\t\t\t\toperdiario($mysqli,$cargo,1,0,$ref,$montof,$fecha,$factu);\n\t\t\t\t\t\t\t\t//iva trasladado cobrado 208.01\n\t\t\t\t\t\t\t\t$abono=\"208.01\";\n\t\t\t\t\t\t\t\toperdiario($mysqli,$abono,1,1,$ref,$iva,$fecha,$factu);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t//contado x ahora igual a anterior, luego se manda al cobro\n\t\t\t\t\t\t\t\t//mostrador- cargo a caja y efectivo 101.01\n\t\t\t\t\t\t\t\t$cargo=\"101.01\";\n\t\t\t\t\t\t\t\toperdiario($mysqli,$cargo,1,0,$ref,$montof,$fecha,$factu);\n\t\t\t\t\t\t\t\t//iva trasladado cobrado 208.01\n\t\t\t\t\t\t\t\t$abono=\"208.01\";\n\t\t\t\t\t\t\t\toperdiario($mysqli,$abono,1,1,$ref,$iva,$fecha,$factu);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t//credito cargo a clientes\n\t\t\t\t\t\t\t\t$cargo=\"105.01\";\n\t\t\t\t\t\t\t\toperdiario($mysqli,$cargo,1,0,$ref,$montof,$fecha,$factu,$cte);\n\t\t\t\t\t\t\t\t//iva trasladado no cobrado 209.01\n\t\t\t\t\t\t\t\t$abono=\"209.01\";\n\t\t\t\t\t\t\t\toperdiario($mysqli,$abono,1,1,$ref,$iva,$fecha,$factu);\t\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//efectuar la operacion\n\t\t\t\t\t$mysqli->commit();\n\t\t\t\t $resul=0;\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t//error en las operaciones de bd\n\t\t\t\t $mysqli->rollback();\n\t\t\t\t \t$resul=-2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t//no hay costo de ventas\n\t\t\t\t$resul=-1;\n\t\t\t}\n\t\t\n\t\t return $resul;\n}", "title": "" }, { "docid": "de0585a329f090904b2c5c61f99f5c61", "score": "0.5465705", "text": "function contenu()\n{\n // reprendre l'exercice sur Celsius\n\t$cels= -50;\n\t$far = -58;\n\n\tprint(\"<h1>\" .'Correspondance Celsius\tFahrenheit'.\"</h1>\");\n\tprint(\"\\n\");\n\n\tprint(\"\\t\". \"<table>\" .\"\\n\");\n\tprint(\"\\t\\t\". \"<thead>\" .\"\\n\");\n\n\tprint(\"\\t\\t\" .\"<tr>\". \"\\n\");\n\t\tprint(\"\\t\\t\". \"<th>\" .\"Celsius\". \"</th>\" .\"\\n\");\n\t\tprint(\"\\t\\t\". \"<th>\" .\"Fahrenheit\". \"</th>\" .\"\\n\");\n\tprint(\"\\t\\t\" .\"</tr>\". \"\\n\");\n\n\tprint(\"\\t\\t\". \"</thead>\" .\"\\n\");\n\n\tfor($cpt=0; $cpt<21; $cpt++)\n\t{\n\t\tprint(\"\\t\\t\". \"<tr class=\\\"bleu_fonc\\\">\" .\"\\n\");\n\n\t\tprint(\"\\t\\t\\t\". \"<td>\");\n\t\tprint($cels);\n\t\tprint(\"\\t\\t\". \"</td>\" .\"\\n\");\n\t\t//print(\"\\t\");\n\t\tprint(\"\\t\\t\\t\". \"<td>\");\n\t\tprint($far);\n\t\tprint(\"\\t\\t\". \"</td>\" .\"\\n\");\n\t\t//print(\"<br />\" .\"\\n\");\n\t\tprint(\"\\t\\t\". \"</tr>\" .\"\\n\");\n\n\t\t$cels += 5;\n\t\t$far += 9;\n\t}\n\n\tprint(\"\\t\". \"</table>\" .\"\\n\");\n}", "title": "" }, { "docid": "78d9c064ffdc8163c43050ce7ea5de1a", "score": "0.5448594", "text": "function calcularPrecioPedido($tipoPizza,$tamanoPizza,$masaPizza,$extrasPizza,$numeroPizzas){\r\n $precio = 0.0;\r\n //TIPO PIZZA\r\n switch ($tipoPizza) {\r\n case 'margarita':\r\n $precio = $precio + 4;\r\n break;\r\n case 'barbacoa':\r\n $precio = $precio + 4.5;\r\n break;\r\n case '4estaciones':\r\n $precio = $precio + 5;\r\n break;\r\n case '4quesos':\r\n $precio = $precio + 3.75;\r\n break;\r\n case 'carbonara':\r\n $precio = $precio + 4;\r\n break;\r\n case 'romana':\r\n $precio = $precio + 5;\r\n break;\r\n case 'mediterranea':\r\n $precio = $precio + 4.25;\r\n break;\r\n }\r\n //TAMAÑO PIZZA\r\n switch ($tamanoPizza) {\r\n case 'normal':\r\n $precio = $precio + 4;\r\n break;\r\n case 'grande':\r\n $precio = $precio + 5;\r\n break;\r\n case 'familiar':\r\n $precio = $precio + 6.5;\r\n break;\r\n }\r\n //MASA PIZZA\r\n switch ($masaPizza) {\r\n case 'fina':\r\n $precio = $precio + 2;\r\n break;\r\n case 'familiar':\r\n $precio = $precio + 2.5;\r\n break;\r\n }\r\n //EXTRAS PIZZA\r\n foreach ($extrasPizza as $key => $extras) {\r\n switch ($extras) {\r\n case 'queso':\r\n $precio += 1;\r\n break;\r\n case 'pimiento':\r\n $precio += 1;\r\n break;\r\n case 'cebolla':\r\n $precio += 1;\r\n break;\r\n case 'jamon':\r\n $precio += 1;\r\n break;\r\n case 'pollo':\r\n $precio += 1;\r\n break;\r\n }\r\n }\r\n $resultado = $precio*$numeroPizzas;\r\n return $resultado;\r\n}", "title": "" }, { "docid": "5b86d1ce4067302100e2a2b2966239d4", "score": "0.54414505", "text": "function Tn_tro_sta($level,$MBn) // CT dung\n{\n\treturn round((2000+500*($level-1)+pow(2*($level-1),3))*$MBn);\n}", "title": "" }, { "docid": "ac64bb55aa9fb2189dd506dc923f6d0d", "score": "0.54395175", "text": "function porcentaje($dias) {\r\n $porcentaje = (($dias * 100) / 20);\r\n return 100-$porcentaje;\r\n }", "title": "" }, { "docid": "c5b69a2dc2737a092c7d45074fb3b6be", "score": "0.5438955", "text": "function pagoMonedas($precio){\n $pago = 0;\n \n $monedas = array_fill(0,6,0); // ind 0: 1€; ind 1: 0,50€; ind 2: 0,20€; ind 3: 0,10€; ind 4: 0,05€; ind 5: 0,01€;\n \n $vueltas = 0;\n \n while($precio != $pago){\n $vueltas ++;\n echo sprintf(\"vuelta %d - pago %f<br>\",$vueltas, $pago);\n echo sprintf(\"diferencia: %f<br>\",$precio - $pago);\n if($precio - $pago >= 1){\n $monedas[0]++;\n $pago++;\n }\n elseif($precio - $pago >= 0.5){\n $monedas[1]++;\n $pago += 0.5;\n }\n elseif($precio - $pago >= 0.2){\n $monedas[2]++;\n $pago += 0.2;\n }\n elseif($precio - $pago >= 0.1){\n $monedas[3]++;\n $pago += 0.1;\n }\n elseif($precio - $pago >= 0.05){\n $monedas[4]++;\n $pago += 0.05;\n }\n elseif($precio - $pago >= 0.01){\n $monedas[5]++;\n $pago += 0.01;\n }\n else{\n echo 'Precio no válido<br>';\n break;\n }\n \n }\n return $monedas;\n}", "title": "" }, { "docid": "f25ab18703651a5530fa1053325cf881", "score": "0.5427008", "text": "function largura($nPorcentagem = 0) {\n\n $iColuna = 0;\n $iTotalLinha = 276;\n\n if ( $nPorcentagem == 0 ) {\n return $iTotalLinha;\n }\n\n $iColuna = $nPorcentagem / 100 * $iTotalLinha;\n $iColuna = round($iColuna, 2);\n\n return $iColuna;\n}", "title": "" }, { "docid": "5ec377fee44af38d56722ea26d4710e5", "score": "0.54193133", "text": "function recruterPaysans($nb){\r\n $recrut = 0;\r\n for($x=0;$x<$nb;$x++){\r\n if($this->ors >= COUT_PAYSANS_ORS AND $this->bois >= COUT_PAYSANS_BOIS){\r\n $this->ors-=COUT_PAYSANS_ORS;\r\n $this->bois-=COUT_PAYSANS_BOIS;\r\n $recrut++;\r\n }\r\n }\r\n $this->save();\r\n $stat=new Stat();\r\n $stat->load($this->id);\r\n $stat->calculHab();\r\n $stat->save();\r\n return $recrut;\r\n }", "title": "" }, { "docid": "7b7070af1bb61f13ee18c7a8dbda993a", "score": "0.5413985", "text": "function p3_ex7() {\n function p3_ex7_loop() {\n for ($i = 1; $i <= 100; $i += 15)\n $return .= \"C'est presque bon.<br />\";\n return $return;\n }\n // Just add p3_ex7_loop().\"<br />\".\n return \"XX fois (y'a aussi les boucles mais en comm aussi)\"; // 7\n}", "title": "" }, { "docid": "313ea5f1dfabab28efe1df950e99bf79", "score": "0.54112196", "text": "function Feriados1($ano, $posicao) {\n $dia = 86400;\n $datas = array();\n $datas['pascoa'] = easter_date($ano);\n $datas['sexta_santa'] = $datas['pascoa'] - (2 * $dia);\n $datas['carnaval'] = $datas['pascoa'] - (47 * $dia);\n $datas['corpus_cristi'] = $datas['pascoa'] + (60 * $dia);\n $feriados = array(\n '01/01',\n '02/02', // Navegantes\n date('d/m', $datas['carnaval']),\n date('d/m', $datas['sexta_santa']),\n date('d/m', $datas['pascoa']),\n '21/04',\n '01/05',\n date('d/m', $datas['corpus_cristi']),\n '07/09',\n '20/09', // Revolução Farroupilha \\m/\n '12/10',\n '02/11',\n '15/11',\n '25/12',\n );\n\n return $feriados[$posicao] . \"/\" . $ano;\n}", "title": "" }, { "docid": "d2260929167cdf87ead885b1b8bd363f", "score": "0.54003215", "text": "public function index()\n {\n $tiempos = Tiempo::all();//todos los datos de la tabla tiempo\n\n $sumaMinutosTotales = 0;\n $sumaHorasTotales=0;\n $cantidadMinutos = 0;\n $cantidadHoras = 0;\n $horaFalta = 0;\n $minutosFalta = 0;\n\n //sacar las horas y minutos por cada lapso\n foreach ($tiempos as $key => $value) {//SACAR INFORMACION DE tiempos de la BD\n if($value->estado != 0){\n //datos de tiempo comienzo y final\n $comienzo = $value->comienzo;\n $final = $value->final;\n \n if($final != null){\n $cantidadMinutos = 0;\n $cantidadHoras = 0;\n // minutos de la hora de comienzo y final\n $minutosInicial = $comienzo[3] . $comienzo[4];\n $minutosFinal = $final[3] . $final[4];\n\n\n //horas de las horas comienzo y final\n $horaComienzo = $comienzo[0] . $comienzo[1];\n $horaFinal = $final[0] . $final[1];\n\n \n //mminutos auxiliares\n $minutosInicialaux =$minutosInicial;\n $minutosFinalaux = $minutosFinal;\n \n //horas auxiliares\n\n $horaInicialAux = $horaComienzo;\n $horaFinalAux = $horaFinal;\n \n \n\n if($minutosFinal == 0){\n \n \n for ($i=$minutosFinalaux; $i < $minutosInicialaux; $i++) { \n $cantidadMinutos++;\n \n }\n\n if($minutosInicial != 0){\n $cantidadMinutos = 60 - $cantidadMinutos;\n }\n \n if($horaComienzo > $horaFinal){\n $lapsoMinuto24 = 24 - $horaComienzo;\n \n for ($i=0; $i < $horaFinalAux; $i++) { \n $cantidadHoras++;\n \n }\n $cantidadHoras = $cantidadHoras + $lapsoMinuto24;\n }else{\n\n if($minutosInicial > $minutosFinal){\n $cantidadHoras = $horaFinal - $horaComienzo - 1;\n }else{\n $cantidadHoras = $horaFinal - $horaComienzo;\n }\n\n \n \n } \n \n \n }\n \n\n //calculo de tiempo por lapsos\n if($minutosInicial > $minutosFinal && $minutosFinal!=0 && $minutosInicial!=0) {\n\n \n for ($i=$minutosFinalaux; $i < $minutosInicialaux; $i++) { \n $cantidadMinutos++;\n }\n \n \n if($horaComienzo > $horaFinal){\n $lapsoMinuto24 = 24 - $horaComienzo;\n \n $cantidadHoras = $horaComienzo - $horaFinal;\n $cantidadHoras = 24 - $cantidadHoras -1;\n \n $cantidadMinutos = 60- $cantidadMinutos;\n }else{\n $cantidadMinutos = 60- $cantidadMinutos;\n $cantidadHoras= $horaFinal - $horaComienzo;\n\n if($cantidadHoras == 1){\n $cantidadHoras = 0;\n }else{\n $cantidadHoras = $cantidadHoras-1;\n }\n }\n \n }\n \n if($minutosInicial < $minutosFinal && $minutosFinal!=0 && $minutosInicial!=0){\n \n for ($i=$minutosInicialaux; $i < $minutosFinalaux; $i++) { \n $cantidadMinutos++;\n \n }\n if($horaComienzo > $horaFinal){\n $lapsoMinuto24 = 24 - $horaComienzo;\n \n for ($i=0; $i < $horaFinalAux; $i++) { \n $cantidadHoras++;\n \n }\n $cantidadHoras = $cantidadHoras + $lapsoMinuto24;\n }else{\n $cantidadHoras = $horaFinal - $horaComienzo;\n /*if($cantidadHoras == 1){\n $cantidadHoras = 0;\n }*/ \n } \n \n } \n\n //si la hora de comienzo es igual a la hora final \n\n if($minutosInicial == $minutosFinal){\n \n if($horaComienzo > $horaFinal){\n $cantidadHoras = $horaComienzo - $horaFinal;\n $cantidadHoras = 24 - $cantidadHoras;\n }else{\n $cantidadHoras = $horaFinal - $horaComienzo;\n }\n \n var_dump(\"jola\");\n }\n\n //\n if($minutosInicial == 0 && $minutosFinal!=0 ){\n for ($i=$minutosInicialaux; $i < $minutosFinalaux; $i++) { \n $cantidadMinutos++;\n \n }\n \n if($horaComienzo > $horaFinal){\n $lapsoMinuto24 = 24 - $horaComienzo;\n \n for ($i=0; $i < $horaFinalAux; $i++) { \n $cantidadHoras++;\n \n }\n $cantidadHoras = $cantidadHoras + $lapsoMinuto24;\n }else{\n $cantidadHoras = $horaFinal - $horaComienzo;\n \n } \n }\n\n $sumaMinutosTotales = $sumaMinutosTotales + $cantidadMinutos;\n \n }else{\n \n $cantidadMinutos = 0;\n $horaComienzo = $comienzo[0] . $comienzo[1];\n $minutosInicial = $comienzo[3] . $comienzo[4];\n\n $horaFinal= date('H');\n $minutosFinal = date('i');\n\n //minutos auxiliares\n\n $minutosInicialaux =$minutosInicial;\n $minutosFinalaux = $minutosFinal;\n \n //horas auxiliares\n\n $horaInicialAux = $horaComienzo;\n $horaFinalAux = $horaFinal;\n \n if($minutosFinal == 0){\n \n \n for ($i=$minutosFinalaux; $i < $minutosInicialaux; $i++) { \n $cantidadMinutos++;\n \n }\n\n if($minutosInicial != 0){\n $cantidadMinutos = 60 - $cantidadMinutos;\n }\n \n if($horaComienzo > $horaFinal){\n $lapsoMinuto24 = 24 - $horaComienzo;\n \n for ($i=0; $i < $horaFinalAux; $i++) { \n $cantidadHoras++;\n \n }\n $cantidadHoras = $cantidadHoras + $lapsoMinuto24;\n }else{\n $cantidadHoras++;\n } \n \n }\n \n\n //calculo de tiempo por lapsos\n if($minutosInicial > $minutosFinal && $minutosFinal!=0 && $minutosFinal!=0 && $minutosInicial!=0){\n\n \n for ($i=$minutosFinalaux; $i < $minutosInicialaux; $i++) { \n $cantidadMinutos++;\n }\n \n /*\n if($horaComienzo==$horaFinal){\n if($minutosInicial == $minutosFinal){\n $cantidadHoras =24;\n }else{\n $cantidadHoras = 23;\n \n \n }\n }*/\n \n if($horaComienzo > $horaFinal){\n \n $lapsoMinuto24 = 24 - $horaComienzo;\n \n for ($i=0; $i < $horaFinalAux; $i++) { \n $cantidadHoras++;\n \n }\n $cantidadHoras = $cantidadHoras + $lapsoMinuto24;\n }else{\n $cantidadMinutos = 60- $cantidadMinutos;\n $cantidadHoras= $horaFinal - $horaComienzo;\n\n if($cantidadHoras == 1){\n $cantidadHoras = 0;\n }else{\n $cantidadHoras = $horaFinal - $horaComienzo -1;\n }\n }\n \n }\n \n //Si minuto Inicial es menor que minutos del final\n \n if($minutosInicial < $minutosFinal && $minutosFinal!=0 && $minutosInicial!=0){\n \n for ($i=$minutosInicialaux; $i < $minutosFinalaux; $i++) { \n $cantidadMinutos++;\n \n }\n if($horaComienzo > $horaFinal){\n $lapsoMinuto24 = 24 - $horaComienzo;\n \n for ($i=0; $i < $horaFinalAux; $i++) { \n $cantidadHoras++;\n \n }\n $cantidadHoras = $cantidadHoras + $lapsoMinuto24;\n }else{\n \n $cantidadHoras = $horaFinal - $horaComienzo;\n /* if($cantidadHoras == 1){\n $cantidadHoras = 0;\n }*/ \n } \n \n } \n\n //si la hora de comienzo es igual a la hora final \n\n if($minutosInicial == $minutosFinal){\n \n $cantidadHoras = $horaFinal - $horaComienzo;\n \n }\n //\n if($minutosInicial == 0 && $minutosFinal!=0 ){\n for ($i=$minutosInicialaux; $i < $minutosFinalaux; $i++) { \n $cantidadMinutos++;\n \n }\n \n if($horaComienzo > $horaFinal){\n $lapsoMinuto24 = 24 - $horaComienzo;\n \n for ($i=0; $i < $horaFinalAux; $i++) { \n $cantidadHoras++;\n \n }\n $cantidadHoras = $cantidadHoras + $lapsoMinuto24;\n }else{\n $cantidadHoras = $horaFinal - $horaComienzo;\n \n } \n }\n \n $sumaMinutosTotales = $sumaMinutosTotales + $cantidadMinutos;\n \n }\n // calculo de horas totales de todos los lapsos\n if($sumaMinutosTotales >=60){\n \n $sumaMinutosTotales = $sumaMinutosTotales - 60;\n $sumaHorasTotales = $sumaHorasTotales + 1;\n \n }\n if($sumaHorasTotales <= 60 && $cantidadHoras >0){\n $sumaHorasTotales = $sumaHorasTotales + $cantidadHoras;\n }\n\n \n //var_dump('tiempo lapso: '.$cantidadHoras.':'.$cantidadMinutos);\n //var_dump((string)$sumaHorasTotales.':'.(string)$sumaMinutosTotales);\n }\n \n //calculo de tiempo que falta en 15 horas\n \n $horaFalta = 15 - $sumaHorasTotales;\n $minutosFalta = 60 - $sumaMinutosTotales;\n\n if($minutosFalta == 60){\n $minutosFalta = 0;\n }\n \n }\n \n \n \n if(session('success')){\n Alert::success('Éxito',session('success') );\n }\n\n if(session('error')){\n Alert::error('Error',session('error') );\n }\n return view('tiempo.index', compact('tiempos','sumaHorasTotales','sumaMinutosTotales', 'horaFalta', 'minutosFalta'));\n }", "title": "" }, { "docid": "63c705c61b811ad9e23350b4487cc648", "score": "0.5390814", "text": "function hieu($p_tuso, $p_mauso)\n {\n $ps = new PHAN_SO();\n $ps->khoitao_ps($p_tuso, $p_mauso);\n $ps->tuso = ($this->tuso*$ps->mauso) - ($ps->tuso*$this->mauso);\n $ps->mauso = $this->mauso*$ps->mauso;\n // $ps->toigian_ps();\n return $ps;\n }", "title": "" }, { "docid": "8f0e7cee70b540a62e251ae028b32143", "score": "0.5378147", "text": "function fantacalcio_calcola_totali($vote_round) {\n drupal_set_title(filter_xss('Risultati ' . $vote_round . '&ordf; giornata'));\n\n// $vote_round = get_last_votes();\n $teams = get_teams();\n $votes = get_votes($vote_round);\n $competitions = get_competitions();\n\n $matches = array();\n foreach ($competitions as $c_id => $competition) {\n $competition_round = get_last_competition_round($c_id);\n $matches_competitions = get_round_matches($competition_round, '', $c_id);\n\n $matches = array_merge($matches, $matches_competitions);\n }\n\n $out = '';\n\n $header = array(\"Comp\", \"Team1\", \"Voti\", \"Mod Dif\", \"Mod Centr\", \"+\", \"Tot\", \"Gol\", \"Team1\", \"Voti\", \"Mod Dif\", \"Mod Centr\", \"+\", \"Tot\", \"Gol\", \"W\");\n\n foreach ($matches as $m_id => $match) {\n $t1_id = $match->t1_id;\n $t2_id = $match->t2_id;\n $competition_round = $match->round;\n $c_id = get_cid_by_gid($match->g_id);\n\n $mod_por_1 = $match->mod_por_1;\n $mod_por_2 = $match->mod_por_2;\n $mod_dif_1 = $match->mod_dif_1;\n $mod_dif_2 = $match->mod_dif_2;\n $mod_centr_1 = $match->mod_centr_1;\n $mod_centr_2 = $match->mod_centr_2;\n $mod_att_1 = $match->mod_att_1;\n $mod_att_2 = $match->mod_att_2;\n \n $bonus_t1 = $match->bonus_t1;\n $bonus_t2 = $match->bonus_t2;\n\n $tot_voti_1 = get_totale($t1_id, $competition_round, $vote_round, $c_id, variable_get(\"fantacalcio_votes_provider\", 1));\n $tot_voti_2 = get_totale($t2_id, $competition_round, $vote_round, $c_id, variable_get(\"fantacalcio_votes_provider\", 1));\n\n $tot_1 = $tot_voti_1 + $mod_por_1 + $mod_dif_2 + $mod_centr_1 + $mod_att_1 + $bonus_t1;\n $tot_2 = $tot_voti_2 + $mod_por_2 + $mod_dif_1 + $mod_centr_2 + $mod_att_2 + $bonus_t2;\n\n $goals_1 = floor(($tot_1 -60) / 6);\n $goals_2 = floor(($tot_2 -60) / 6);\n $goals_1 = ($goals_1 >= 0) ? $goals_1 : 0;\n $goals_2 = ($goals_2 >= 0) ? $goals_2 : 0;\n \n //vittoria con scarto\n if (variable_get('fantacalcio_scarto', '0') && variable_get('fantacalcio_scarto_punti', '0') > 0) {\n if ( ($goals_1 == $goals_2) && ($tot_1 - $tot_2) > variable_get('fantacalcio_scarto_punti', '0') ) $goals_1++;\n if ( ($goals_1 == $goals_2) && ($tot_2 - $tot_1) > variable_get('fantacalcio_scarto_punti', '0') ) $goals_2++;\n }\n\n $winner_id = ($goals_1 > $goals_2) ? $t1_id : $t2_id;\n $winner_id = ($goals_1 == $goals_2) ? -1 : $winner_id;\n\n //aggiorno partite\n $sql = \"UPDATE {fanta_matches} SET \n pt_1 = '%f', \n pt_2 = '%f', \n tot_1 = '%f', \n tot_2 = '%f', \n goals_1 = '%d', \n goals_2 = '%d', \n played = 1, \n winner_id = '%d' \n WHERE m_id = '%d'\";\n $result = db_query($sql, $tot_voti_1, $tot_voti_2, $tot_1, $tot_2, $goals_1, $goals_2, $winner_id, $match->m_id);\n \n }\n\n $sqlx = \"SELECT * FROM {fanta_rounds_competitions} WHERE round = '%d'\";\n $resultx = db_query($sqlx, $vote_round);\n while ($rowx = db_fetch_array($resultx)) {\n $c_id = $rowx['c_id'];\n $competition_round = $rowx['competition_round'];\n\n $sql = \"SELECT * FROM {fanta_matches} \" .\n \"WHERE g_id IN (SELECT g_id FROM {fanta_groups} WHERE c_id = '%d') \" .\n \"AND round = '%d' \";\n $result = db_query($sql, $c_id, $competition_round);\n $out .= \"<h3>\" . check_plain($competitions[$c_id]->name) . \"</h3>\";\n\n $header = array(\"Squadra\", \"Punti\", \"Totale\", \"Goal\", \"Vincitore\");\n $rows = array();\n\n while ($row = db_fetch_array($result)) {\n $rows[$row['m_id'] . \"_1\"][] = $teams[$row['t1_id']]->name;\n $rows[$row['m_id'] . \"_1\"][] = $row['pt_1'];\n $rows[$row['m_id'] . \"_1\"][] = $row['tot_1'];\n $rows[$row['m_id'] . \"_1\"][] = $row['goals_1'];\n //$rows[$row['m_id'] . \"_1\"][] = $row['mod_att_1'];\n $rows[$row['m_id'] . \"_2\"][] = $teams[$row['t2_id']]->name;//squadra 2\n $rows[$row['m_id'] . \"_2\"][] = $row['pt_2'];\n $rows[$row['m_id'] . \"_2\"][] = $row['tot_2'];\n $rows[$row['m_id'] . \"_2\"][] = $row['goals_2'];\n $rows[$row['m_id'] . \"_2\"][] = ($row['winner_id'] == -1) ? \" - \" : $teams[$row['winner_id']]->name;\n \n $rows[$row['m_id'] . \"_3\"][] = array(\"data\" => \"<hr>\", \"colspan\" => 5);//separatore\n }\n $out .= theme_table($header, $rows);\n\n }\n\n return $out;\n}", "title": "" }, { "docid": "f854c06ad777b340a4051f097a2fc7b1", "score": "0.5368241", "text": "function ponerHorasTaller(){\n // y precios 15 1h, 21, 1.5h, 31 2h.\n $sql=\"SELECT id,precio_trimestre FROM casal_talleres WHERE id_curso=4 AND tipo_taller='Professional'\";\n $result=$this->db->query($sql)->result();\n foreach($result as $k=>$v){\n $horasSesion=0;\n $id=$v->id;\n if($v->precio_trimestre=='21') $horasSesion=1.5*1100;\n if($v->precio_trimestre=='31') $horasSesion=2*1100;\n if($v->precio_trimestre=='15') $horasSesion=1*1100;\n $sql=\"UPDATE casal_talleres SET horas_taller_T1='$horasSesion', horas_taller_T2='$horasSesion', horas_taller_T3='$horasSesion'WHERE id='$id'\";\n $this->db->query($sql);\n }\n }", "title": "" }, { "docid": "42015f28bf3edbf39c69e5576b8ce334", "score": "0.53588194", "text": "function cotag($argumento, $precisao, $maxIteracoes, &$numIteracoes, &$codErro)\n{\n //removendo as voltas completas do argumento para que os valores\n //estejam dentro do intervalo [0 - 2PI]\n $argumento = getValorSemVoltasCompletas($argumento);\n\n //arrumando parametro precisao\n $casasDecimais = arrumaPrecisao($precisao);\n\n //inicializando os indices de Seno e Cosseno, para que as iteracoes deles\n //nao comecem com indices errados\n $numIteracoesSeno = 1;\n $numIteracoesCosseno = 2;\n\n //variaveis para pegar o codErro das funcoes seno e cosseno\n $codErroSeno = 0;\n $codErroCosseno = 0;\n\n //Calculando cotan x = cos x / sen x;\n $senoNoPto = seno($argumento, $precisao, $maxIteracoes, $numIteracoesSeno, $codErroSeno);\n $cossenoNoPto = cosseno($argumento, $precisao, $maxIteracoes, $numIteracoesCosseno, $codErroCosseno);\n $valor = $cossenoNoPto / $senoNoPto;\n\n // no caso de cotangente, tenho que checar os códigos de erro das funcoes seno e cosseno\n // ja que nao uso da formula de series de tangente e sim das series de seno e cosseno\n if (!$codErroSeno || !$codErroCosseno) {\n //como 0 é o codigo de sucesso, se ambos os códigos de erro forem 0 entao funcionou\n $codErro = 0;\n } else {\n $codErro = $codErroSeno ? $codErroSeno : $codErroCosseno;\n }\n\n return $valor;\n}", "title": "" }, { "docid": "d42c1eb224c7c021054b2e522b12182e", "score": "0.5357477", "text": "function cariPosisi($batas){\nif(empty($_GET['halagenda'])){\n\t$posisi=0;\n\t$_GET['halagenda']=1;\n}\nelse{\n\t$posisi = ($_GET['halagenda']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "d42c1eb224c7c021054b2e522b12182e", "score": "0.5357477", "text": "function cariPosisi($batas){\nif(empty($_GET['halagenda'])){\n\t$posisi=0;\n\t$_GET['halagenda']=1;\n}\nelse{\n\t$posisi = ($_GET['halagenda']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "2599de1715165d09c04fae3534d20552", "score": "0.5355045", "text": "public function dequigetProgressByArea()\n {\n\n\n \n\n\n\n }", "title": "" }, { "docid": "f4c10a0e8b44dcd0cbfeaf7c50a882be", "score": "0.5342088", "text": "function potencias($base, $cant)\n{\n $retorno =\"\";\n\n for($i=1;$i<=$cant;$i++)\n {\n $retorno = \" \".$retorno.pow($base, $i).\" -\";\n }\n\n return $retorno;\n\n}", "title": "" }, { "docid": "917723b745dad8739b09ddd578de8476", "score": "0.53410494", "text": "function calculaFrete($sCep) {\n $peso = ($this->getPeso() < 1? 1 : $this->getPeso());\n $aFrete = calculaFrete($sCep, $this->getTotalProdutos(), $peso, $this->getTipoEntrega());\n $fValorEntrega = $aFrete['frete'];\n $iPrazoEntrega = $aFrete['prazo_entrega'];\n\t\t$this->setConfig(\"erro_descricao\",$aFrete['erro_descricao']);\n \n \n // RETIRA LOJA\n if($this->getConfig(\"tipo_entrega\") == 3){\n\t\t\t\n\t\t\tif($this->isCrossDocking($this->getItens(), \"TODOS\"))\n\t\t\t{\n\t\t\t\t$this->setConfig(\"prazo_entrega\", $this->getTempoCrossDocking().\" dias úteis\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->setConfig(\"prazo_entrega\", \"Imediato\");\n\t\t\t}\n return $this->setConfig(\"valor_entrega\", \"0\");\n\t\t}\n \n \n /* MENSAGEM DE ERRO */\n if(!empty($aFrete['erro_descricao'])){\n return $this->setErroCalculoFrete($aFrete[\"erro_descricao\"]); \n }\n \n \n /* SE ALGUM PRODUTO É CROSSDOCKING, ACRESCENTA DOIS DIAS NO PRAZO DE ENTREGA */\n if($this->isCrossDocking($this->getItens(), \"TODOS\") && TEM_FAIXA_FRETE === false && !getSessionVar(\"calculaTransportadora\")){\n $iPrazoEntrega += $this->getTempoCrossDocking();\n }\n\t\t\n\t\t\n\t\t$this->setConfig(\"prazo_entrega\", \"Prazo de Entrega: \".$iPrazoEntrega . ( !getSessionVar(\"calculaTransportadora\") ? ($iPrazoEntrega == 1 ? \" dia útil\": \" dias úteis\") : \"\"));\n \n \n /* IMPOSTO ICMS SOBRE COMPRA - DE ACORDO COM O ESTADO */\n if(TEM_IMPOSTO === true){\n \n $aInfoImposto = $this->getImpostoPorEstado($sCep);\n $this->setConfig(\"imposto_estado\",$aInfoImposto); \n }\n\t\t\n\t\t\n\t\t//----------------------------------------------------------------------\n\t\t// TEM FRETE PRÓPRIO\n\t\t//----------------------------------------------------------------------\n\t\t\n\t\tif($this->getConfig(\"tipo_entrega\") == 8 && TEM_FRETE_PROPRIO === true){\n\t\t\t\n\t\t\tglobal $aFretesEntregaRapida;\n\t\t\t$bCalculou = false;\n\t\t\tforeach($aFretesEntregaRapida as $sCidade => $sCeps){\n\t\t\t\t\n\t\t\t\t$aFaixas = explode(\"|\",$sCeps);\n\t\t\t\t\n\t\t\t\tif($sCep >= $aFaixas[0] && $sCep <= $aFaixas[1]){\n\t\t\t\t\t$this->setConfig(\"prazo_entrega\", \"Prazo de Entrega: 4 Horas para $sCidade!\"); \n\t\t\t\t\t$fValorEntrega = $aFaixas[2];\n\t\t\t\t\t$bCalculou = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!$bCalculou){\n\t\t\t\treturn $this->setErroCalculoFrete(\"Tipo de Entrega não disponível para sua região.\");\n\t\t\t}\n\t\t}\n \n \n if(getSessionVar(\"freteGratis\")){\n $fValorEntrega = 0;\n }\n\n return $this->setConfig(\"valor_entrega\", $fValorEntrega);\n }", "title": "" }, { "docid": "36e97aeb4ee4be6100d345ad1d9c6e85", "score": "0.5339961", "text": "function porcentaje( $valor ){\n $ver=\"\";\n if ( $valor > 100) {\n $ver ='<div data-toggle=\"tooltip\" title=\"Sobrepasa el indicador\" style=\"background:#84c3be;color:white;text-align:center;width:55px\">'.round($valor,2).'%</div>';\n } else if ( $valor > 75 && $valor < 101) {\n $ver ='<div data-toggle=\"tooltip\" title=\"Muy alto\" style=\"background:blue;color:white;text-align:center;width:55px\">'.round($valor,2).'%</div>';\n } else if ( $valor > 50 && $valor <= 75) {\n $ver ='<div data-toggle=\"tooltip\" title=\"Alto\" style=\"background:green;color:white;text-align:center;width:55px\">'.round($valor,2).'%</div>';\n } else if ($valor > 25 && $valor <= 50) {\n $ver = '<div data-toggle=\"tooltip\" title=\"Medio\" style=\"background:yellow;color:black;text-align:center;width:55px\">'.round($valor,2).'%</div>';\n } else if ($valor < 26) {\n $ver ='<div data-toggle=\"tooltip\" title=\"Bajo\" style=\"background:red;color:white;text-align:center;width:55px\">'.round($valor,2).'%</div>';\n }\n return $ver;\n}", "title": "" }, { "docid": "c071b35f7a86f89b5daf94b06909ce61", "score": "0.5335542", "text": "function hitungDenda(){\n\n return 0;\n }", "title": "" }, { "docid": "40a16553a6d6a7a2528c295ab094d658", "score": "0.5334414", "text": "public function attaquerPerso(Personnage $otherPerso){\n\n // calculs attaque\n $attaque_name = $this->getTheName();\n $attaque_this = $this->getTheAttac();\n $desAt3 = $this->lancerDes(3)[0];\n $tot_attaque = $attaque_this+$desAt3;\n\n\n // calculs défense\n $defense_name = $otherPerso->getTheName();\n $defense_otherPerso = $otherPerso->getThedefense();\n $desDef3 = $otherPerso->lancerDes(3)[0];\n $tot_defense = $defense_otherPerso+$desDef3;\n\n // Attaque plus forte que la défense\n if($tot_attaque>$tot_defense){\n $blesse = $tot_attaque-$tot_defense;\n $reste_vie = $otherPerso->getTheEndurance()-$blesse;\n $otherPerso->setTheEndurance($reste_vie);\n\n echo \"<p>$defense_name a été blessé par $attaque_name:<br>Défense: $defense_otherPerso + $desDef3 (3 dés de 6) = <strong>$tot_defense</strong> | Contre | Attaque: $attaque_this + $desAt3 (3 dés de 6) = <strong>$tot_attaque</strong> = -$blesse pour $defense_name</p>\";\n\n // le défenseur est mort\n if($otherPerso->getTheEndurance()<=0){\n $otherPerso->estMort($this);\n exit();\n }\n }else{\n echo \"<p>$defense_name n'a pas été blessé par $attaque_name:<br>Défense: $defense_otherPerso + $desDef3 (3 dés de 6) = <strong>$tot_defense</strong> | Contre | Attaque: $attaque_this + $desAt3 (3 dés de 6) = <strong>$tot_attaque</strong></p>\";\n }\n\n }", "title": "" }, { "docid": "df06342d47fc97f5d044fdd53427924e", "score": "0.53321475", "text": "function Tn_eco_oth($level,$MBn) // CT dung\n{\n\treturn round((2000+350*($level-1)+pow(2*($level-1),3))*$MBn);\n}", "title": "" }, { "docid": "3c1682d849415167e71dce554d358cde", "score": "0.5326151", "text": "function Tn_tro_her($level,$MBn) // Ct dung\n{\n\treturn round((2300+450*($level-1)+pow(1.6*($level-1),3))*$MBn);\n}", "title": "" }, { "docid": "feedddc498f31af2e2a094423aaeb0a7", "score": "0.5320493", "text": "function fct_calcul_proximite_taille($tmini, $tmaxi, $taille_observee) {\n\tif ($taille_observee <= 0) { \n\t\t$valtaille = 0;\n\t} else {\n \tif ($taille_observee < $tmini) { \n \t$valtaille = log(4 * ($taille_observee / ($tmini * 1.01))) * 10;\n \t} else {\n \t\tif ($taille_observee < $tmaxi) $valtaille = log(4) * 10;\n \t\telse $valtaille = log(4 * ($tmaxi / ($taille_observee * 1.01))) * 10;\n\t\t}\n \tif ($taille_observee < ($tmini / 2)) $valtaille = $valtaille - 20;\n \t if ($taille_observee < ($tmini / 3)) $valtaille = $valtaille - 30;\n \t \tif ($taille_observee > ($tmaxi * 1.5)) $valtaille = $valtaille - 10;\n \t \tif ($taille_observee > ($tmaxi * 2)) $valtaille = $valtaille - 25;\n \tif ($taille_observee > ($tmaxi * 3)) $valtaille = $valtaille - 45;\n }\n\tif ($valtaille < 0) $valtaille = 0;\n\treturn $valtaille;\n}", "title": "" }, { "docid": "57ce08806961dece3e9861263762a89f", "score": "0.5309157", "text": "function calculaFrete($peso, $comprimento, $altura, $largura, $cep) {\n \n//\n// echo '<br />';\n\n\n $servico = array(\n 40010 => 'Expresso', //SEDEX sem contrato.\n 40045 => 'SEDEX a Cobrar, sem contrato.',\n 40126 => 'SEDEX a Cobrar, com contrato.',\n 40215 => 'SEDEX 10, sem contrato.',\n 40290 => 'SEDEX Hoje, sem contrato.',\n 40096 => 'SEDEX com contrato.',\n 40436 => 'SEDEX com contrato.',\n 40444 => 'SEDEX com contrato',\n 40568 => 'SEDEX com contrato.',\n 40606 => 'SEDEX com contrato.',\n 41106 => 'Normal', //PAC sem contrato\n 41068 => 'PAC com contrato.',\n 81019 => 'e-SEDEX, com contrato.',\n 81027 => 'e-SEDEX Prioritário, com conrato.',\n 81035 => 'e-SEDEX Express, com contrato.',\n 81868 => '(Grupo 1) e-SEDEX, com contrato.',\n 81833 => '(Grupo 2) e-SEDEX, com contrato.',\n 81850 => '(Grupo 3) e-SEDEX, com contrato.',\n );\n\n $peso = ($peso != \"0\" || $peso != \"0.00\" || $peso != \"0.0\") ? $peso : 1;\n $comprimento = ($comprimento != \"0\" || $comprimento != \"0.00\" || $comprimento != \"0.0\") ? $comprimento : 16;\n $altura = ($altura != \"0\" || $altura != \"0.00\" || $altura != \"0.0\") ? $altura : 2;\n $largura = ($largura != \"0\" || $largura != \"0.00\" || $largura != \"0.0\") ? $largura : 11;\n \n\n $data['nCdEmpresa'] = '';\n $data['sDsSenha'] = '';\n $data['sCepOrigem'] = $cep;\n $data['sCepDestino'] = '26015-005';\n $data['nVlPeso'] = $peso;\n $data['nCdFormato'] = '1';\n $data['nVlComprimento'] = $comprimento;\n $data['nVlAltura'] = $altura;\n $data['nVlLargura'] = $largura;\n $data['nVlDiametro'] = '0';\n $data['sCdMaoPropria'] = 'n';\n $data['nVlValorDeclarado'] = '0';\n $data['sCdAvisoRecebimento'] = 'n';\n $data['StrRetorno'] = 'xml';\n $data['nCdServico'] = '40010,41106';\n $data = http_build_query($data);\n\n $url = 'http://ws.correios.com.br/calculador/CalcPrecoPrazo.aspx';\n\n $curl = curl_init($url . '?' . $data);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n $result = curl_exec($curl);\n $result = simplexml_load_string($result);\n $linhas = array();\n\n $i = 0;\n foreach ($result->cServico as $row) {\n\n if ($row->Erro !== '0') {\n $descricaoServico = $servico[(int) $row->Codigo];\n\n $linha = array('codigo' => (string) $row->Codigo, 'servico' => $descricaoServico, 'valor' => (string) $row->Valor, 'prazoEntrega' => (string) $row->PrazoEntrega);\n\n $linhas[] = json_decode(json_encode((array) $linha), TRUE);\n }\n }\n\n return $linhas;\n}", "title": "" }, { "docid": "d73bc0cf98c5754299412d3a550932a0", "score": "0.53022784", "text": "function qtdDiasUteis($hoje, $vencto) {\r\n $proxDia = proximoDiaUtil($vencto);\r\n $proxDia = retornaData($proxDia, 2);\r\n //$inicio = new DateTime($vencto);\r\n $inicio = new DateTime($proxDia);\r\n $fim = new DateTime($hoje);\r\n $fim->modify('+1 day');\r\n $diasUt = 0;\r\n\r\n $interval = new DateInterval('P1D');\r\n $periodo = new DatePeriod($inicio, $interval, $fim);\r\n\r\n foreach ($periodo as $data) {\r\n $tdy = strtotime($data->format(\"d-m-Y\"));\r\n //if (date('N', $tdy) <= 5) {\r\n $diasUt++;\r\n //}\r\n }\r\n return $diasUt;\r\n }", "title": "" }, { "docid": "7e9a7ae12b4e38be617b1fc40ea58dbb", "score": "0.530054", "text": "function Tn_eco($level,$MBn) // CT sai neu level >=7\n{\n\treturn round(3000*pow(2-($level-1)/10,$level-1)*$MBn);\n}", "title": "" }, { "docid": "7559c4dddea6e0c0190417c80ce638ea", "score": "0.529865", "text": "function covertirNumLetras()\r\n{\r\n\r\n\t$number = $this->monto;\r\n\r\n\t//number = number_format (number, 2);\r\n $number1=$number;\r\n\r\n\r\n //settype (number, \"integer\");\r\n $cent = strpos($number1,\".\");\r\n\r\n if($cent > 0){\r\n\t\r\n\t$centavos = substr($number1,$cent+1,2);\r\n\t\r\n }else{\r\n\r\n \t$centavos = \"00\";\r\n\t\r\n\t}\r\n\t/* \r\n\t $cent = split(\".\",$number1,7); \r\n\r\n\t\techo $cent[4];\r\n\t\texit();\r\n\r\n\t $centavos = $cent[1];\r\n\r\n\t if ($centavos == 0 || empty($centavos)){\r\n\t \t$centavos = \"00\";\r\n\t }\r\n\t*/\r\n\t/*\r\n\t \r\n\t if (number == 0 || number == \"\") \r\n\t { // if amount = 0, then forget all about conversions, \r\n\t centenas_final_string=\" cero \"; // amount is zero (cero). handle it externally, to \r\n\t // function breakdown \r\n\t } \r\n\t else \r\n\t { \r\n \r\n \r\n\r\n\t \r\n millions = ObtenerParteEntDiv(number, 1000000); // first, send the millions to the string \r\n number = mod(number, 1000000); // conversion function \r\n \r\n\t alert(millions);\r\n\t \r\n if (millions != 0)\r\n { \r\n // This condition handles the plural case \r\n if (millions == 1) \r\n { // if only 1, use 'millon' (million). if \r\n descriptor= \" millon \"; // > than 1, use 'millones' (millions) as \r\n } \r\n else \r\n { // a descriptor for this triad. \r\n descriptor = \" millones \"; \r\n } \r\n } \r\n else \r\n { \r\n descriptor = \" \"; // if 0 million then use no descriptor. \r\n } \r\n millions_final_string = string_literal_conversion(millions)+descriptor; \r\n */ \r\n\r\n\r\n $thousands = $this->ObtenerParteEntDiv($number, 1000); // now, send the thousands to the string \r\n $number = fmod($number, 1000); // conversion function. \r\n //print \"Th:\".thousands;\r\n if ($thousands != 1) \r\n { // This condition eliminates the descriptor \r\n $thousands_final_string = $this->string_literal_conversion($thousands) . \" mil \"; \r\n // descriptor = \" mil \"; // if there are no thousands on the amount \r\n } \r\n if ($thousands == 1)\r\n {\r\n $thousands_final_string = \" mil \"; \r\n }\r\n if ($thousands < 1) \r\n { \r\n $thousands_final_string = \" \"; \r\n } \r\n \r\n // this will handle numbers between 1 and 999 which \r\n // need no descriptor whatsoever. \r\n\r\n\r\n $centenas = $number; \r\n $centenas_final_string = $this->string_literal_conversion($centenas) ; \r\n \r\n\t// } //end if (number ==0) \r\n\r\n /*if (ereg(\"un\",centenas_final_string))\r\n {\r\n centenas_final_string = ereg_replace(\"\",\"o\",centenas_final_string); \r\n }*/\r\n //finally, print the output. \r\n\r\n /* Concatena los millones, miles y cientos*/\r\n\r\n\r\n $cad = $thousands_final_string.$centenas_final_string; \r\n \r\n /* Convierte la cadena a Mayúsculas*/\r\n $cad = strtoupper($cad); \r\n\r\n\r\n\r\n\t/*\r\n\t if (strlen($centavos) > 2)\r\n\t { \r\n\t if(substr($centavos.substring,2,3) >= 5){\r\n\t $centavos = substr($centavos,0,1).(parseInt(centavos.substring(1,2)).1).toString();\r\n\t }else{\r\n\t centavos = centavos.substring(0,2);\r\n\t }\r\n\t }\r\n\r\n\t*/\r\n\r\n\r\n if (strlen($centavos) == 1)\r\n {\r\n $centavos = $centavos.\"0\";\r\n }\r\n $centavos = $centavos. \"/100\"; \r\n\r\n\r\n if ($number == 1)\r\n {\r\n $moneda = \" PESO \"; \r\n }\r\n else\r\n {\r\n $moneda = \" PESOS \"; \r\n }\r\n \r\n /* Regresa el número en cadena entre paréntesis y con tipo de moneda y la fase M.N.*/\r\n\r\n return $cad.$moneda.\" \".$centavos.\" M.N.\";\r\n \r\n}", "title": "" }, { "docid": "1f2c291b38359bcd1e9e70b61a16cf2b", "score": "0.5296216", "text": "function temporalidad_ptcp($ptm_id){\n for ($i=0; $i <=12 ; $i++) { \n $mes[$i]='mes'.$i.'';\n $prog[$i]=0;\n }\n\n $pterminal=$this->model_mestrategico->get_pterminal_mplazo($ptm_id); \n $programado=$this->model_mestrategico->get_pterminal_mplazo_programado_gestion($ptm_id);\n \n\n if(count($programado)!=0){\n $programado_mensual=$this->model_mestrategico->get_pterminal_cplazo_programado($programado[0]['ptmp_id']);\n if(count($programado_mensual)!=0){\n\n for ($i=1; $i <=12 ; $i++) { \n $prog[$i]=$programado_mensual[0][$mes[$i]];\n }\n $prog[0]=$programado_mensual[0]['programado_total'];\n }\n }\n \n return $prog;\n }", "title": "" }, { "docid": "79433e8a2ce4e86d6e4cf316553ce171", "score": "0.5288708", "text": "function Tn_eco_cra($level,$MBn) // CT dung\n{\n\treturn round((2000+350*($level-1)+pow(2*($level-1),3))*$MBn/2);\n}", "title": "" }, { "docid": "07ec886b43a21624bf173f25f9a1805d", "score": "0.5285861", "text": "function cariPosisi($batas){\nif(empty($_GET['halpengumuman'])){\n\t$posisi=0;\n\t$_GET['halpengumuman']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengumuman']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "d44025660a87472ddf4d704303c0a8b0", "score": "0.52811605", "text": "function Tn_eco_iro($level,$MBn) // -> CT sai neu test level >=7\n{\n\treturn round(6000*pow(2-($level-1)/10,$level-1)*$MBn);\n}", "title": "" }, { "docid": "7a8652f512f2e3204a5a1cdba3d03078", "score": "0.52800685", "text": "function longtermrise(){ //riserate in decimal eg. 1.2\n global $names, $rows, $lastRow, $tax;\n for ($col=1; $col<14; $col++) {\n $new = $rows[$lastRow][$col];\n $old = $rows[0][$col];\n if (($new*$tax > 10*$old) && ($rows[$lastRow-1][$col]*$tax < 10*$old) ) {\n $msg=\"\\\"$names[$col]\\\" rose since the beginning (Org x\".round(($new*$tax/$old),2).\" at a price of \".round($new*$tax,2).\")!\";\n pushbullet(\"CSGO Skin Notification! :)\", $msg);\n }else if (($new*$tax > 5*$old) && ($rows[$lastRow-1][$col]*$tax < 5*$old) ) {\n $msg=\"\\\"$names[$col]\\\" rose since the beginning (Org x\".round(($new*$tax/$old),2).\" at a price of \".round($new*$tax,2).\")!\";\n pushbullet(\"CSGO Skin Notification! :)\", $msg);\n }else if (($new*$tax > 2*$old) && ($rows[$lastRow-1][$col]*$tax < 2*$old) ) {\n $msg=\"\\\"$names[$col]\\\" rose since the beginning (Org x\".round(($new*$tax/$old),2).\" at a price of \".round($new*$tax,2).\")!\";\n pushbullet(\"CSGO Skin Notification! :)\", $msg);\n }\n }\n}", "title": "" }, { "docid": "ab632f6afe5fc6eaa87669afddddca98", "score": "0.5279325", "text": "function valor_extenso($valor=0, $maiusculas=false)\n{\n if (strpos($valor,\",\") > 0)\n {\n // retira o ponto de milhar, se tiver\n $valor = str_replace(\".\",\"\",$valor);\n \n // troca a virgula decimal por ponto decimal\n $valor = str_replace(\",\",\".\",$valor);\n }\n$singular = array(\"centavo\", \"real\", \"mil\", \"milhao\", \"bilhao\", \"trilhao\", \"quatrilhao\");\n$plural = array(\"centavos\", \"reais\", \"mil\", \"milhoes\", \"bilhoes\", \"trilhoes\",\n\"quatrilhões\");\n \n$c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\",\n\"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\n$d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\",\n\"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\n$d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\",\n\"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\n$u = array(\"\", \"um\", \"dois\", \"tres\", \"quatro\", \"cinco\", \"seis\",\n\"sete\", \"oito\", \"nove\");\n \n $z=0;\n \n $valor = number_format($valor, 2, \".\", \".\");\n $inteiro = explode(\".\", $valor);\n\t\t$cont=count($inteiro);\n\t\t for($i=0;$i<$cont;$i++)\n for($ii=strlen($inteiro[$i]);$ii<3;$ii++)\n $inteiro[$i] = \"0\".$inteiro[$i];\n \n $fim = $cont - ($inteiro[$cont-1] > 0 ? 1 : 2);\n for ($i=0;$i<$cont;$i++) {\n $valor = $inteiro[$i];\n $rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\n $rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\n $ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\n \n $r = $rc.(($rc && ($rd || $ru)) ? \" e \" : \"\").$rd.(($rd &&\n$ru) ? \" e \" : \"\").$ru;\n $t = $cont-1-$i;\n $r .= $r ? \" \".($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\n if ($valor == \"000\")$z++; elseif ($z > 0) $z--;\n if (($t==1) && ($z>0) && ($inteiro[0] > 0)) $r .= (($z>1) ? \" de \" : \"\").$plural[$t];\n if ($r) $rt = $rt . ((($i > 0) && ($i <= $fim) &&\n($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\n }\n \n if(!$maiusculas)\n\t\t {\n return($rt ? $rt : \"zero\");\n } elseif($maiusculas == \"2\") {\n return (strtoupper($rt) ? strtoupper($rt) : \"Zero\");\n } else {\n return (ucwords($rt) ? ucwords($rt) : \"Zero\");\n }\n \n}", "title": "" }, { "docid": "d02743b55ad34615122f2995b317f41e", "score": "0.52770704", "text": "static public function mdlCalcularUtilidad5($tabla){\r\n\r\n\t\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla set utilidad5 = ((precioUnitario5-precioCompra5)/precioUnitario5)*100 where idPedido = :idPedido and serie = :serie\");\r\n\r\n\t\t\t$stmt -> bindParam(\":idPedido\", $datos[\"idPedido\"], PDO::PARAM_INT);\r\n\t\t\t$stmt -> bindParam(\":serie\", $datos[\"serie\"], PDO::PARAM_STR);\r\n\r\n\t\t\tif ($stmt -> execute()) {\r\n\r\n\t\t\t\treturn \"ok\";\r\n\r\n\t\t\t}else {\r\n\r\n\t\t\t\treturn \"error\";\r\n\r\n\t\t\t}\r\n\t\t\t$stmt -> close();\r\n\r\n\t\t\t$stmt = null;\r\n\r\n\r\n\t}", "title": "" }, { "docid": "3717ca19d81d6dbe3c7344182e7f2a84", "score": "0.5275599", "text": "function tabla_filas_proyecto($filas,$moneda,$cant,$tip,$barc,$artc,$desc,$prev,$mon,$mons,$monc,$tfdsc,$fdsc,$tdsc,$dsc,$IVA){\n\t\t$monchunk = explode(\"/\",$moneda); \n\t\t$Vmond = trim($monchunk[0]); // Nombre de Moneda\n\t\t$Vmons = trim($monchunk[1]); // Simbolo de Moneda\n\t\t$Vmonc = trim($monchunk[2]); // Tipo de Cambio\n\t\t$Vmonc = str_replace(\"(\",\"\",$Vmonc); //le quita el primer parentesis que rodea el tipo de cambio\n\t\t$Vmonc = str_replace(\" x 1)\",\"\",$Vmonc); //le quita el 2do. parentesis y el x 1\n\t\t\t$salida = '<br>';\n\t\t\t$salida.= '<table class = \"tablegrid\">';\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"30px\" height = \"30px\">No.</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"75px\">Cant.</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"300px\">Descipción</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"75px\">P. Unitario</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"75px\">Descuento</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"75px\">P. Total</td>';\n\t\t\t$salida.= '<th class = \"thgrid\" align = \"center\" width = \"30px\"></td>';\n\t\t\t$salida.= '</tr>';\n\t$STotal = 0;\n\t$Total = 0;\n\t$Rtotal = 0;\n\t$DescU = 0;\n\tif($filas>0){\n\t\tfor($i = 1; $i <= $filas; $i ++){\n\t\t\t//No.\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">'.$i.'.</td>';\n\t\t\t//Cantidad\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spancant'.$i.'\">'.$cant[$i].'</span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"cant'.$i.'\" id = \"cant'.$i.'\" value = \"'.$cant[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"tip'.$i.'\" id = \"tip'.$i.'\" value = \"'.$tip[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//Descripcion o Articulo\n\t\t\t$desc[$i] = utf8_decode($desc[$i]);\n\t\t\t$desc[$i] = trim($desc[$i]);\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"left\">'.$desc[$i];\n\t\t\t$salida.= '<input type = \"hidden\" name = \"barc'.$i.'\" id = \"barc'.$i.'\" value = \"'.$barc[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"artc'.$i.'\" id = \"artc'.$i.'\" value = \"'.$artc[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"desc'.$i.'\" id = \"desc'.$i.'\" value = \"'.$desc[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//Precio U.\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">'.trim($mons[$i]).' '.$prev[$i];\n\t\t\t$salida.= '<input type = \"hidden\" name = \"prev'.$i.'\" id = \"prev'.$i.'\" value = \"'.$prev[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"mon'.$i.'\" id = \"mon'.$i.'\" value = \"'.trim($mon[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"mons'.$i.'\" id = \"mons'.$i.'\" value = \"'.trim($mons[$i]).'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"monc'.$i.'\" id = \"monc'.$i.'\" value = \"'.trim($monc[$i]).'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//Descuento\n\t\t\t$dsign = ($tdsc[$i] == \"P\")?\"%\":trim($mons[$i]);\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spandsc'.$i.'\">'.$dsign.' '.$dsc[$i].'</span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"tdsc'.$i.'\" id = \"tdsc'.$i.'\" value = \"'.$tdsc[$i].'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"dsc'.$i.'\" id = \"dsc'.$i.'\" value = \"'.$dsc[$i].'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//sub Total\n\t\t\t$rtot = ($prev[$i] * $cant[$i]);\n\t\t\tif($tdsc[$i] == \"P\"){\n\t\t\t\t$descuento = ($rtot *($dsc[$i])/100);\n\t\t\t}else if($tdsc[$i] == \"M\"){\n\t\t\t $descuento = $dsc[$i];\n\t\t\t}\n\t\t\t$Dcambiar = Cambio_Moneda($monc[$i],$Vmonc,$descuento);\n\t\t\t$DescU += $Dcambiar;\n\t\t\t$stot = $rtot - $descuento;\n\t\t\t$Dcambiar = Cambio_Moneda($monc[$i],$Vmonc,$stot);\n\t\t\t$STotal+= $Dcambiar;\n\t\t\t$Rcambiar = Cambio_Moneda($monc[$i],$Vmonc,$rtot);\n\t\t\t$Rtotal+= $Rcambiar;\n\t\t\t$stot = round($stot, 2);\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spanstot'.$i.'\">'.trim($mons[$i]).' '.$stot.'</span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"stot'.$i.'\" id = \"stot'.$i.'\" value = \"'.$stot.'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"rtot'.$i.'\" id = \"rtot'.$i.'\" value = \"'.$rtot.'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t//---\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">';\n\t\t\t$salida.= '<a href = \"javascript:void(0);\" onclick = \"QuitarFilaVenta('.$i.')\" title = \"Quitar Fila\" style = \"border:none;\" ><img src = \"../../CONFIG/images/icons/delete.png\" style = \"vertical-align:middle;border:none;\"></a>';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '</tr>';\n\t\t}\n\t}\t\t\n\t\t\t//----\n\t\t\tif($tfdsc == \"P\"){\n\t\t\t\t$descuento = ($STotal *($fdsc)/100);\n\t\t\t}else if($tfdsc == \"M\"){\n\t\t\t $descuento = $fdsc;\n\t\t\t}\n\t\t\t$Total = $STotal - $descuento;\n\t\t\t$STotal = round($STotal, 2); //total sin iva\n\t\t\t$Total = round($Total, 2); //total sin iva\n\t\t\t$DescU = round($DescU, 2); //promedio de descuento\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"tdgrid\" colspan = \"3\" rowspan = \"4\">';\n\t\t\t$salida.= '<span id = \"spannota\">';\n\t\t\t$salida.= '<b>NOTA:</b> MONEDA PARA COTIZACI&Oacute;N: <b>'.$Vmond.'</b>. TIPO DE CAMBIO '.$Vmonc.' x 1';\n\t\t\t$salida.= '</span></td>';\n\t\t\t$salida.= '<td class = \"thgrid\">Desc/Unitarios</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spanpromdesc\"><b>'.$Vmons.' '.$DescU.'</b></span>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">-</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"promdesc\" id = \"promdesc\" value = \"'.$DescU.'\" /></td>';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"thgrid\">Subtotal</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">-</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spanstotal\"><b>'.$Vmons.' '.$STotal.'</b></span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"stotal\" id = \"stotal\" value = \"'.$STotal.'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" colspan = \"2\"></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"thgrid\">Desc/General</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">-</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spandscgeneral\"><b>'.$Vmons.' '.$descuento.'</b></span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"ttotal\" id = \"tdescuento\" value = \"'.$descuento.'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"ttotal\" id = \"ttdescuento\" value = \"'.$tfdsc.'\" />';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" colspan = \"2\"></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<td class = \"thgrid\">TOTAL</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\">-</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" align = \"center\"><span id = \"spanttotal\"><b>'.$Vmons.' '.$Total.'</b></span>';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"ttotal\" id = \"ttotal\" value = \"'.$Total.'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"Rtotal\" id = \"Rtotal\" value = \"'.$Rtotal.'\" />';\n\t\t\t$salida.= '<input type = \"hidden\" name = \"filas\" id = \"filas\" value = \"'.$filas.'\"/></td>';\n\t\t\t$salida.= '</td>';\n\t\t\t$salida.= '<td class = \"tdgrid\" colspan = \"2\"></td>';\n\t\t\t$salida.= '</tr>';\n\t\t\t//----\n\t\t\t$salida.= '</table>';\n\t\t\t$salida.= '</form>';\n\t\t\t$salida.= '<br>';\n\t\n\treturn $salida;\n}", "title": "" }, { "docid": "0f5078d53810abc9afc43c730ddf469b", "score": "0.52755743", "text": "function temporalidad_pt($ptm_id){\n $pterminal=$this->model_mestrategico->get_pterminal_mplazo($ptm_id); \n $programado=$this->model_mestrategico->get_pterminal_mplazo_programado($ptm_id);\n $configuracion=$this->model_proyecto->configuracion_session();\n $tabla = '';\n $nro=0;\n foreach($programado as $row) {\n $nro++;\n $matriz [1][$nro]=$row['g_id'];\n $matriz [2][$nro]=$row['ptmp_prog'];\n }\n\n $g=$configuracion[0]['conf_gestion_desde'];\n for($j = 1; $j<=5; $j++){\n $matriz_r[1][$j]=$g;\n $matriz_r[2][$j]='0'; //// P\n $matriz_r[3][$j]='0'; //// PA\n $matriz_r[4][$j]='0'; //// %PA\n $g++;\n }\n\n for($i = 1 ;$i<=$nro ;$i++){\n for($j = 1 ;$j<=5 ;$j++){\n if($matriz[1][$i]==$matriz_r[1][$j]){\n $matriz_r[2][$j]=round($matriz[2][$i],2);\n }\n }\n }\n\n $pa=0;\n for($j = 1 ;$j<=5 ;$j++){\n $pa=$pa+$matriz_r[2][$j];\n $matriz_r[3][$j]=$pa+$pterminal[0]['ptm_linea_base'];\n if($pterminal[0]['ptm_meta']!=0){\n $matriz_r[4][$j]=round(((($pa+$pterminal[0]['ptm_linea_base'])/$pterminal[0]['ptm_meta'])*100),2);\n }\n }\n return $matriz_r;\n }", "title": "" }, { "docid": "ad964a8cb9738de781a6be8e1e5d1b35", "score": "0.52731246", "text": "public static function redondearDian($numero)\n {\n $resultado = 0;\n $parte_entera = $numero;\n $parte_decimal = 0;\n $siguiente_menos_significativo = 0;\n $segundo__siguiente_menos_significativo = 0;\n $digito_menos_significativo = 0;\n\n $pos = strpos($numero, '.');\n\n if ($pos !== false) { //si contiene decimales\n $parte_numero = explode(\".\", $numero); //separamos decimales separados por coma\n $parte_entera = $parte_numero[0];\n $parte_decimal = $parte_numero[1];\n }\n\n if (strlen($parte_decimal) <= 2) {\n $resultado = $numero;\n } else //si es mayor o igual que 3\n {\n\n $siguiente_menos_significativo = $parte_decimal[2]; //cogemos el tercer digito de la parte decimal\n\n if ($siguiente_menos_significativo >= 0 && $siguiente_menos_significativo <= 4) {\n $digito_menos_significativo = $parte_decimal[0] .$parte_decimal[1];\n }\n\n if ($siguiente_menos_significativo >= 6 && $siguiente_menos_significativo <= 9) {\n $digito_menos_significativo = ($parte_decimal[0] . $parte_decimal[1]) + 1;\n }\n\n if ($siguiente_menos_significativo == 5) {\n\n if (strlen($parte_decimal) == 3) {\n $segundo__siguiente_menos_significativo = 0;\n } else {\n $segundo__siguiente_menos_significativo = $parte_decimal[3];\n }\n\n if ($segundo__siguiente_menos_significativo % 2 == 0) { //si es par redondea hacia abajo\n $digito_menos_significativo = $parte_decimal[0] .$parte_decimal[1];\n } else {\n $digito_menos_significativo = ($parte_decimal[0] . $parte_decimal[1]) + 1; //si es impar se redondea hacia arriva\n }\n }\n\n $resultado = $parte_entera . \".\" . $digito_menos_significativo;\n }\n\n\n return $resultado;\n }", "title": "" }, { "docid": "a6595007171f77d972f1128a5311df6d", "score": "0.5270551", "text": "function changer_etat(&$var_etat, $coef) {\n $var_etat += ($coef / 10);\n if ($var_etat > 100)\n $var_etat = 100;\n else if ($var_etat < 0)\n $var_etat = 0;\n /*\n else\n $var_etat = intval($var_etat);\n */\n\n }", "title": "" }, { "docid": "116ac7acd2a72f6d96acaacdcafab705", "score": "0.52661365", "text": "function getMontantTVAArticle($numserie) {\n // if ($this->calculmontant) return (sprintf(\"%.2f\", ($this->article[$numserie]['montantTTC'] - $this->article[$numserie]['montantHT'])));\n if (isset($this->calculmontant) && $this->calculmontant == true) return (sprintf(\"%.2f\", ($this->article[$numserie]['montantHT'] * ($this->TVA / 100))));\n else return 0;\n }", "title": "" }, { "docid": "500898ff76074e084e9ed494d3e4c3af", "score": "0.5262586", "text": "static public function mdlActualizarTiempoProcesoGenerales($tabla, $datos){\r\n\r\n\t\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla set tiempoProceso = TIMEDIFF(fechaTermino, fechaRecepcion) where idPedido = :idPedido and serie = :serie\");\r\n\r\n\t\t\t$stmt -> bindParam(\":idPedido\", $datos[\"idPedido\"], PDO::PARAM_INT);\r\n\t\t\t$stmt -> bindParam(\":serie\", $datos[\"serie\"], PDO::PARAM_STR);\r\n\r\n\t\t\tif ($stmt -> execute()) {\r\n\r\n\t\t\t\treturn \"ok\";\r\n\r\n\t\t\t}else {\r\n\r\n\t\t\t\treturn \"error\";\r\n\r\n\t\t\t}\r\n\t\t\t$stmt -> close();\r\n\r\n\t\t\t$stmt = null;\r\n\r\n\r\n\t}", "title": "" }, { "docid": "41e4294f9cb906fd95638dbc62fb41ad", "score": "0.52575815", "text": "function determinaFechosVazios()\n{\n\tglobal $mTransicoes, $lAlfabeto, $fechoVazio, $lEstados, $lTokens; \t\n\n\t//Variáveis\n\t$arrayEstados = NULL; //array com as diversas transições vazias de um mesmo estado\n\t$arrayEstados2 = NULL;\t\n\t$transConcatenadas = NULL; //array com a string inteira da transição, pode ter diversas transições vazias\n\n\techo \"------------------------------------<br>\";\n\techo \"Passo 1: Fechos dos estados<br>\";\n\t\n\tfor($i = 1; $i <= sizeof($lEstados); $i++) //determina o fecho para cada estado do autômato\n\t{ \n\t\t//echo \"Fecho de \".$lEstados[$i].\":<br>\";\n\t\t//echo \"&nbsp;&nbsp;Transicoes vazias: \".$mTransicoes[$lEstados[$i]][$lAlfabeto[0]].\"<br>\";\n\t\tif($mTransicoes[$lEstados[$i]][$lAlfabeto[0]] != '-') //mtransicoes[\"q0\"][\"e\"] != \"-\" \n\t\t{\n\t\t\t//echo \"&nbsp;&nbsp;Diferente de '-'<br>\";\n\t\t\t$fechoVazio[$lEstados[$i]][] = $lEstados[$i]; //coloca ele mesmo na lista //fechoVazio[\"q0\"][0] = \"q0'\n\t\t\t$lTokens = NULL; //limpa conteúdo de $lTokens\n\t\t\ttokeniza($mTransicoes[$lEstados[$i]][$lAlfabeto[0]]); //\"tokeniza\" vai deixar em $lTokens todos os estados de transição vazia\n\t\t\t$arrayEstados = $lTokens;\t\n\t\n\t\t\tfor($j = 0; $j < sizeof($arrayEstados); $j++)\n\t\t\t{\n\t\t\t\t//echo \"&nbsp;&nbsp;arrayEstados[$j] = \".$arrayEstados[$j].\"<br>\";\t\t\t\t\n\t\t\t\t//ve se o estado está no fecho, se não estiver coloca\n\t\t\t\tif(array_search($arrayEstados[$j], $fechoVazio[$lEstados[$i]]) == NULL \t\n\t\t\t\t\t\t\t\t&& $arrayEstados[$j] != '-'\n\t\t\t\t\t\t\t\t&& $arrayEstados[$j] != $fechoVazio[$lEstados[$i]][0])\t\n\t\t\t\t{ //o teste é igual a NULL, logo não achou o estado no fecho\n\t\t\t\t\t$fechoVazio[$lEstados[$i]][sizeof($fechoVazio[$lEstados[$i]])] = $arrayEstados[$j];\n\t\t\t\t\t//echo \"&nbsp;&nbsp;&nbsp;&nbsp;1fechoVazio[$lEstados[$i]][\".sizeof($fechoVazio[$lEstados[$i]]).\"]: \".$arrayEstados[$j].\"<br>\";\n\t\t\t\t\t//agora precisamos ver as transições vazias do arrayEstados[$j]\n\t\t\t\t\t$lTokens = NULL; //limpa conteúdo de $lTokens\n\t\t\t\t\ttokeniza($mTransicoes[$arrayEstados[$j]][$lAlfabeto[0]]); \n\t\t\t\t\t$arrayEstados2 = NULL;\n\t\t\t\t\t$arrayEstados2 = $lTokens;\n\t\t\t\t\t//echo \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\";\t\n\t\t\t\t\t//echo \"transicao: \".$arrayEstados2[0].\"<br>\";\n\t\n\t\t\t\t\tfor($k = 0; $k < sizeof($arrayEstados2); $k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(array_search($arrayEstados2[$j], $fechoVazio[$lEstados[$i]]) == NULL \n\t\t\t\t\t\t\t\t\t\t&& $arrayEstados2[$j] != '-' \n\t\t\t\t\t\t\t\t\t\t&& $arrayEstados2[$j] != $fechoVazio[$lEstados[$i]][0])\t\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t$fechoVazio[$lEstados[$i]][sizeof($fechoVazio[$lEstados[$i]])] = $arrayEstados2[$k];\n\t\t\t\t\t\t\t//echo \"&nbsp;&nbsp;&nbsp;&nbsp;2fechoVazio[$lEstados[$i]][\".sizeof($fechoVazio[$lEstados[$i]]).\"]: \".$arrayEstados2[$j].\"<br>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t} \t\n\t\t}\n\t\telse //estado sem transições vazias, logo o fecho vazio é vazio\n\t\t{\n\t\t\t$fechoVazio[$lEstados[$i]][] = $lEstados[$i]; //o fecho de um estado contém ele próprio sempre\n\t\t\t//echo \"&nbsp;&nbsp;&nbsp;&nbsp;Eh vazio, coloca so ele mesmo<br>\";\n\t\t}\n\t}\t\n\n\tfor($i = 1; $i <= sizeof($lEstados); $i++) //determina o fecho para cada estado do autômato\n\t{ \n\t\tsort($fechoVazio[$lEstados[$i]]);\n\t\techo $lEstados[$i].\": \";\n\t\tfor($j = 0; $j < sizeof($fechoVazio[$lEstados[$i]]); $j++)\n\t\t{\n\t\t\techo $fechoVazio[$lEstados[$i]][$j].\".\";\n\t\t}\n\t\techo \"<br>\";\n\t}\n\n\techo \"------------------------------------<br>\";\n\treturn;\n}", "title": "" }, { "docid": "2f26169efe52d382c056987546ef2639", "score": "0.5255118", "text": "function MESES_ANTIGUEDAD($_ARGS) {\r\n\t$fingreso = FECHA_INGRESO($_ARGS);\r\n\t$periodo_actual = $_ARGS['HASTA'];\r\n\tlist($anios, $meses, $dias) = TIEMPO_DE_SERVICIO(formatFechaDMA($fingreso), formatFechaDMA($periodo_actual));\r\n\t$cantidad = $meses + ($anios * 12);\r\n\treturn $cantidad;\r\n}", "title": "" }, { "docid": "5c0f8cf4ec1bde80f39cf2362ed453b8", "score": "0.5254205", "text": "function miTabla($numero)\n\t{\n\t\tfor($multiplicador=0;$multiplicador<=10;$multiplicador++)\n\t\t{\n\t\t\techo $numero.\" x \".$multiplicador.\" = \".$numero*$multiplicador.\"<br>\";\n\t\t}\n\t}", "title": "" }, { "docid": "7af7832f1957646ab918ee79a94bdb4f", "score": "0.5253105", "text": "public function puestaACero() {\n $this -> horas = 0;\n $this -> minutos = 0;\n $this -> segundos = 0;\n }", "title": "" }, { "docid": "612d1ad2c3da819e8fe51c8aa89f380d", "score": "0.5252227", "text": "public function cortesia()\n {\n $this->costo = 0;\n }", "title": "" }, { "docid": "abf6d1ea6b45d5ddb387c08687ef9092", "score": "0.5250995", "text": "function p3_ex3() {\n $hundred = 100;\n $rand = mt_rand(1, 100);\n for ($i = 20; $hundred >= $i; $hundred--) {\n if ($hundred % 5 == 0 && $hundred != 100)\n $return .= 'resultat : '.($hundred * $rand).'<br />';\n else\n $return .= 'resultat : '.($hundred * $rand).', ';\n }\n\n return $return;\n}", "title": "" }, { "docid": "aa84d08db6efd06fb8f81a0abc09f187", "score": "0.52459097", "text": "function calcularPonderacion($instanciaActual=\"\",$instanciaPonderar)\n\t{\n\t\t$personajesutil = new personajepar($this->BG->con);\n\t\t$personajesutil->setronda($instanciaActual);\n\t\t$personajesutil = $personajesutil->read(true,1,array(\"ronda\"));\n\t\t\n\t\t$batallutil = new batalla($this->BG->con);\n\t\t$batallutil->setronda($instanciaPonderar);\n\t\t$batallutil = $batallutil->read(true,1,array(\"ronda\"));\n\t\t\n\t\t$totalponderacion=0;\n\t\tfor($i=0;$i<count($batallutil);$i++)\n\t\t{\n\t\t\t$pos[0] = 1500;\n\t\t\t$pos[1] = 600;\n\t\t\t$pos[2] = 400;\n\t\t\t$pos[3] = 300;\n\t\t\t$pos[4] = 200;\n\t\t\t$pos[5] = 100;\n\t\t\t$pos[6] = 100;\n\t\t\t$pos[7] = 20;\n\t\t\t$peleapersonaje = new pelea($this->BG->con);\n\t\t\t$peleapersonaje->setidbatalla($batallutil[$i]->getid());\n\t\t\t$peleapersonaje = $peleapersonaje->read(true,1,array(\"idbatalla\"),1,array(\"votos\",\"DESC\"));\n\t\t\t$k=0;\n\t\t\t$calponderacion = 0;\n\t\t\tfor($j=0;$j<count($peleapersonaje);$j++)\n\t\t\t{\n\t\t\t\tif(comprobararray($personajesutil,\"id\",$peleapersonaje[$j]->getidpersonaje()))\n\t\t\t\t{\n\t\t\t\t\tif($j>0 && $peleapersonaje[$j]->getvotos() == $peleapersonaje[$j-1]->getvotos())\n\t\t\t\t\t{}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif(count($pos)<=$j)\n\t\t\t\t\t\t\t$calponderacion = $pos[count($pos)-1];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$calponderacion = $pos[$j];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$calponderacion += $peleapersonaje[$j]->getvotos();\n\t\t\t\t\t}\t\t\n\t\t\t\t\t$totalponderacion+=$calponderacion;\n\t\t\t\t\t$personajemod = arrayobjeto($personajesutil,\"id\",$peleapersonaje[$j]->getidpersonaje());\n\t\t\t\t\t$personajemod->setponderacion($calponderacion);\n\t\t\t\t\t$personajemod->update(1,array(\"ponderacion\"),1,array(\"id\"));\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t$torneoActual = new torneo($this->BG->con);\n\t\t$torneoActual->setactivo(1);\n\t\t$torneoActual = $torneoActual->read(false,1,array(\"activo\"));\n\t\t$torneoActual->setponderacionprom(round($totalponderacion/count($personajesutil)));\n\t\t$torneoActual->update(1,array(\"ponderacionprom\"),1,array(\"id\"));\n\t}", "title": "" }, { "docid": "27e386f7c50e3a942e2a90aeb007281c", "score": "0.5235106", "text": "function toigian_ps()\n {\n $uscln = $this->USCLN($this->tuso, $this->mauso);\n $this->tuso = $this->tuso/$uscln;\n $this->mauso = $this->mauso/$uscln;\n }", "title": "" }, { "docid": "71baabdd4c5decfa6082ae689ae633eb", "score": "0.5234728", "text": "function muestra($valor,$renglon)\n\t{\n\n\t\tif($renglon % 2){\n\t\t\t$fondo = \"#bbbbbb\";\n\t\t}else{\n\t\t\t$fondo = \"#ffffff\";\n\t\t}\n\t\tif ($valor < 0.5) {\n\t\t\t$color = \"red\";\n\t\t}else{\n\t\t\t$color = \"blue\";\n\t\t}\n\t\techo \"<td bgcolor='$fondo'><font color='$color'>$valor</font></td>\\n\";\n\t}", "title": "" }, { "docid": "b3305024e05fce07e348910481759167", "score": "0.52294147", "text": "function kira2($dulu,$kini)\n{\n return @number_format((($kini-$dulu)/$dulu)*100,0,'.',',');\n //@$kiraan=(($kini-$dulu)/$dulu)*100;\n}", "title": "" }, { "docid": "2cba2f22d7fc8d848e101818912517b4", "score": "0.5227385", "text": "function valorDoBtcComEncargos($param_valor)\n{\n\n//pega o btc e soma valor final do btc com todos encargos\n\n\t$percentual = 0.70 / 100.0; // 15%\n\t$valor_final = $param_valor + ($percentual * $param_valor);\n\t//comissoes 1,99 + 2,90\n\t$percentual2 = 2.0 / 100.0;\n\t$valorTotal = $percentual2 * $param_valor;\n\t\n\t\n\t\n\t$finalTodos = $valor_final + $valorTotal + 3;\n\n\t\treturn $finalTodos;\n}", "title": "" }, { "docid": "a26b854f8796b8a69ea793388c795101", "score": "0.52263683", "text": "function valore_costo_trasporto_ordine_amico($id_ordine,$id_user,$id_amico){\r\n $valore_globale_attuale_netto_qarr = valore_totale_ordine_qarr($id_ordine);\r\n $valore_personale_attuale_netto_qarr = valore_netto_singolo_amico($id_ordine,$id_user,$id_amico);\r\n $percentuale_mio_ordine = ($valore_personale_attuale_netto_qarr / $valore_globale_attuale_netto_qarr) *100;\r\n $costo_globale_trasporto = valore_trasporto($id_ordine,100);\r\n $costo_trasporto = ($costo_globale_trasporto / 100) * $percentuale_mio_ordine;\r\n return (float)$costo_trasporto;\r\n}", "title": "" }, { "docid": "347c32c08119376fd1be68a070a23f2a", "score": "0.5222208", "text": "public function calcularSueldo(){\n $this->horas_trabajadas * 540;\n }", "title": "" }, { "docid": "c1f788ab9591afbc8da2c0935ea65464", "score": "0.52190375", "text": "function bank($bedrag){\n $jaar = 1;\n for ($jaar;$jaar<=10;++$jaar){\n $nieuwbedrag = $bedrag *pow(1.08,$jaar);\n echo 'na '.$jaar.' jaar heeft Hans '.$nieuwbedrag.'euro <br>';\n }\n }", "title": "" }, { "docid": "d58ef835e5f46316faa90b34ed0fc89c", "score": "0.5212741", "text": "function evaporator($content, $evap_per_day, $threshold) {\n $result = 0;\n $percentage = 100; \n while ($percentage > $threshold) {\n $percentage = $percentage - $percentage * ($evap_per_day / 100);\n $result += 1;\n }\n return $result;\n}", "title": "" }, { "docid": "f99dabfe927172473e4bb32800075a57", "score": "0.5212045", "text": "public function test_pagar_monto_viaje_plus_doble() {\n $tiempo = new Tiempo();\n $tiempo->avanzar( 36000 );\n $medio_boleto = new Tarjeta_Medio_Boleto( Null );\n $colectivo = new Colectivo( 'mixta', '133', 420 );\n $medio_boleto->recargar( 50.0 );\n $medio_boleto->gastarPlus();\n $medio_boleto->gastarPlus();\n $this->assertEquals( $medio_boleto->getViajesPlus(), 0 );\n $boleto = $medio_boleto->pagarConTarjeta( $colectivo , $tiempo );\n $this->assertEquals( $boleto->getValor(), $this->getCostoMedioBoleto() + (2 * $this->getCostoViaje() ) );\n }", "title": "" }, { "docid": "d214ea283092e33afe94bf5aa2b9cf1a", "score": "0.52089906", "text": "function valorDoBtcComEncargos30($param_valor3)\n{\n\n//pega o btc e soma valor final do btc com todos encargos\n\n\t$percentual = 0.30 / 100.0; // 15%\n\t$valor_final = $param_valor3 + ($percentual * $param_valor3);\n\t//comissoes 1,99 + 2,90\n\t$percentual2 = 2.0 / 100.0;\n\t$valorTotal = $percentual2 * $param_valor3;\n\t\n\t\n\t\n\t$finalTodos3 = $valor_final + $valorTotal + 3;\n\n\t\treturn $finalTodos3;\n}", "title": "" }, { "docid": "c1606a74e39db346237ef80148d66b54", "score": "0.5197563", "text": "function xuLyThuatToan1B($from, $to, $flag) {\r\n for ($i = $from; $i <= $to; $i++) {\r\n if ($flag != 0 && $flag != 1) {\r\n echo \"Flag chi duoc nhan 2 gia tri 0 hoac 1\";\r\n return;\r\n }\r\n //if (is_integer($from)== false || is_integer($to) == false) {\r\n if (!is_integer($from) || !is_integer($to)) { \r\n echo '$from & $to khong duoc la so thuc';\r\n return;\r\n }\r\n if ($flag == 0 && $i%2 == 0) {\r\n echo \"$i: la so chan <br/>\";\r\n }\r\n if ($flag == 1 && $i%2 == 1) {\r\n echo \"$i: la so le <br/>\";\r\n }\r\n }\r\n }", "title": "" }, { "docid": "a435240d018f8eea2c4d96191f0ade34", "score": "0.51940453", "text": "function cariPosisi($batas){\nif(empty($_GET['haldatasiswa'])){\n\t$posisi=0;\n\t$_GET['haldatasiswa']=1;\n}\nelse{\n\t$posisi = ($_GET['haldatasiswa']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "e7938cda019340794b5de651be447694", "score": "0.519365", "text": "public function testPagarTransbordoNormal(){\n $tarjetaMedioUni= new TarjetaMedioUni;\n $tarjetaMedioUni->recargar(50);\n $tarjetaMedioUni->normalTransbordo();\n $this->assertEquals($tarjetaMedioUni->obtenerSaldo(), 50-$tarjetaMedioUni->obtenerValor()*2*33/100);\n }", "title": "" }, { "docid": "a8c0035c9d2e9d637034d81cd0fabdfe", "score": "0.51891077", "text": "function epagoped($mysqli,$fecha,$ref,$monto,$iva,$total,$saldoi,$factu,$mpago,$sfactu,$cte,$saldof,$arch=NULL){\n\t//define los montos de pago\n $pagoiva = defiva($monto,$saldoi,$monto);\n //definicion del status de pago\n if($monto<$saldoi){$status = 35;}else{$status = 40;};\n\t\t\ttry{\n\t\t\t\t$mysqli->autocommit(false);\n\t\t\t//la referencia es pedido\n\t\t\t\t$tipoper=1;\n\t\t\t//movimientos de diario\n\t\t\t\t//cargo en entrada de efectivo segun metodo de pago\n\t\t\t\t\t$cuenta1=metpago($mpago);\n\t\t\t\t\t$tipom1=0;\n\t\t\t\t\toperdiario($mysqli, $cuenta1, $tipoper, $tipom1, $ref, $monto, $fecha,$sfactu);\n\t\t\t//abono a clientes\n\t\t\t\t\t$cuenta4=\"105.01\";\n\t\t\t\t\t$tipom4=1;\n\t\t\t\t\toperdiario($mysqli,$cuenta4,$tipoper,$tipom4,$ref,$monto,$fecha,$sfactu,$cte);\n\t\t\t\t//cargo a iva trasladado no cobrado\n\t\t\t\t\t$cuenta2=\"209.01\";\n\t\t\t\t\t$tipom2=0;\n\t\t\t\t\toperdiario($mysqli,$cuenta2,$tipoper,$tipom2,$ref,$iva,$fecha,$sfactu);\n\t\t\t\t//abono a iva trasladado\n\t\t\t\t\t$cuenta3=\"208.01\";\n\t\t\t\t\t$tipom3=1;\n\t\t\t\t\toperdiario($mysqli,$cuenta3,$tipoper,$tipom3,$ref,$iva,$fecha,$sfactu);\n\t\t\t//actualizacion en pedidos\n\t\t\t\t\tif($arch!=NULL){\n\t\t\t\t\t $mysqli->query(\"UPDATE pedidos SET status=$status,fechapago='$fecha',\n factura='$factu',saldo=$saldof,arch='$arch' WHERE idpedidos='$ref'\");}else {\n $mysqli->query(\"UPDATE pedidos SET status=$status,fechapago='$fecha',\n factura='$factu',saldo=$saldof WHERE idpedidos='$ref'\");\n\t\t\t\t\t }\n\t\t\t//efectuar la operacion\n\t\t\t\t$mysqli->commit();\n\t\t\t\t$resul=0;\n\t\t\t}catch (Exception $e) {\n\t\t\t\t\t//error en las operaciones de bd\n\t\t\t\t $mysqli->rollback();\n\t\t\t\t \t$resul=-2;\n\t\t\t\t}\n\treturn $resul;\n}", "title": "" }, { "docid": "f9fb2d1467b564085d20e20ce4d5909e", "score": "0.51876515", "text": "function ProjetosPendentes() {\n\n $count = 0;\n $conexao = new classeConexao();\n\n //selecionando id dos projetos\n $projetos = $conexao::fetch(\"SELECT id FROM tb_projetos\");\n\n foreach ($projetos as $projeto) {\n\n //Qtd tarefas a fazer\n $tarefasFazer = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=0 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Qtd tarefas feitas\n $tarefasFeitas = $conexao::fetchuniq(\"SELECT COUNT(id) as qtd FROM tb_tarefas WHERE tb_tarefas_status=1 AND tb_tarefas_projeto = \".$projeto['id']);\n\n //Porcentagem\n if(($tarefasFeitas['qtd'] + $tarefasFazer['qtd']) == 0){\n $qtd3 = 1;\n }else{\n $qtd3 = ($tarefasFeitas['qtd'] + $tarefasFazer['qtd']);\n }\n $porcentagem = ($tarefasFeitas['qtd'] * 100) / ($qtd3);\n\n if($porcentagem!=100) {\n $count++;\n }\n }\n\n return $count;\n}", "title": "" }, { "docid": "8375a2816347dc905cf7c826ef11b29f", "score": "0.5183812", "text": "function Tn_eco_bri($level,$MBn) // -> CT sai neu test level >=7\n{\n\treturn round(2000*pow(2-($level-1)/10,$level-1)*$MBn);\n}", "title": "" }, { "docid": "3f406fffbc7048a98e3d2862dbb3fa4e", "score": "0.51824975", "text": "function appliquerTVA($prixHT, $TVA) {\n $prixTTC = $prixHT + ($prixHT * $TVA / 100);\n echo \"Le prix TTC est de \";\n return $prixTTC . \"€\";\n}", "title": "" }, { "docid": "15873437809f306a1e9222020b728e07", "score": "0.5181268", "text": "function cariPosisi($batas){\nif(empty($_GET['halberita'])){\n\t$posisi=0;\n\t$_GET['halberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halberita']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" }, { "docid": "15873437809f306a1e9222020b728e07", "score": "0.5181268", "text": "function cariPosisi($batas){\nif(empty($_GET['halberita'])){\n\t$posisi=0;\n\t$_GET['halberita']=1;\n}\nelse{\n\t$posisi = ($_GET['halberita']-1) * $batas;\n}\nreturn $posisi;\n}", "title": "" } ]
02af667eaa36bfd975c3c18b78cc519c
Create the Etag and returns the render source it.
[ { "docid": "231345b87563d88c6da31f910498b1b0", "score": "0.0", "text": "public function run($tag, $id, $lang, $params = null, $isCreateJsonFile = false)\n {\n // we create the tag value\n $this->createEtag($tag, $id, $lang, $params);\n // we register the tag value in the json file if does not exist.\n if ($isCreateJsonFile) {\n $this->setJsonFileEtag($tag, $id, $lang, $params);\n }\n //print_r($this->Etag);\n \n // we return the render (cache or not)\n return $this->render($lang);\n }", "title": "" } ]
[ { "docid": "f81a8394c0eb7abb6dc9d548ca11fe79", "score": "0.5919743", "text": "public function render() {\n $element = $this->_getBuilder()->createElement($this->getTag());\n\n foreach ($this->getAllAttributes() as $attr => $value) {\n $element->setAttribute($attr, $value);\n }\n\n if ( $content = $this->getContent() ) {\n $element->appendChild($this->_getBuilder()->createTextNode($content));\n }\n\n $this->_getBuilder()->appendChild($element);\n\n return trim($this->_getBuilder()->saveHTML());\n }", "title": "" }, { "docid": "2931dee784739c90a29b57e779220558", "score": "0.58411515", "text": "protected function _create()\n {\n $this->getParameters()->setModel('cms/block');\n /** @var Parser $configParser */\n $configParser = Parser::getInstance();\n $data = $this->getParameters()->getData(self::F_DATA);\n\n $data['content'] = $configParser->convert(\n $data['content'],\n Parser::CONVERT_FROM_EXTID\n );\n $this->getParameters()->setData(self::F_DATA, $data);\n\n return parent::_create();\n }", "title": "" }, { "docid": "cbe8cbd05762ae6c8bc2277263382a7b", "score": "0.56730527", "text": "public function create()\n {\n $tag = new \\StdClass();\n\n return view('setup.tag.create', compact('tag'));\n }", "title": "" }, { "docid": "8e69af858e0b65adc4889a3ca9215191", "score": "0.5654735", "text": "private function createUrl()\n {\n $url = $this->dom->createElement('url');\n\n return $this->getUrlset()->appendChild($url);\n }", "title": "" }, { "docid": "7a7746b370927ac9c7c7f22679462eb1", "score": "0.55811036", "text": "public function create() {\n\t\t$steps = $this->getRenderingSteps();\n\n\t\t$result = '';\n\t\twhile ($step = array_shift($steps)) {\n\t\t\t$result = $this->$step($result);\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "a6a3975762fb3e289d80192d181135e0", "score": "0.55556065", "text": "private function getTag()\n {\n $tpl = '<a href=\"%s\"%s%s>%s</a>';\n $class = '';\n $target = '';\n\n if ($this->options['class'])\n {\n $class = ' class=\"' . $this->options['class'] . '\"';\n }\n\n if ($this->options['target'])\n {\n $target = ' target=\"' . $this->options['target'] . '\"';\n }\n\n return vsprintf($tpl, [\n '$0',\n $class,\n $target,\n '$0'\n ]);\n }", "title": "" }, { "docid": "ccf680560481773da2c8cb4fe1f7b6ec", "score": "0.5549885", "text": "protected function create() {\n // map the end object to the end parameters in the DB\n $end = [\n 'elTitle' => $this->getTitle(),\n 'elContent' => $this->getContent(),\n 'treeID' => $this->getTreeID(),\n 'elTypeID' => $this->db->getElementTypeID('end')\n ];\n\n $result = $this->db->createElement($end);\n\n // it's hopefully returning the ID of the end it inserted\n if(Utility\\isID($result)) {\n $endID = $result;\n // we're good! Build the end again and return it\n return $this->build($endID);\n }\n // oops. Return the errors.\n return $result;\n }", "title": "" }, { "docid": "9fe6ee75f2b40d634b270e966f883e19", "score": "0.547701", "text": "public function render(){\n $tag=$this->getTag();\n $text=$this->getText();\n $attributes=$this->buildAttributes();\n if($this->renderHtml)\n {\n return \"<$tag $attributes>\".($text).\"</$tag>\";\n }\n else{\n $escaper = $this->getView()->plugin('escapehtml');\n return \"<$tag $attributes>\".$escaper($text).\"</$tag>\";\n }\n }", "title": "" }, { "docid": "44cf1348a68a4b467fb40e3e78746739", "score": "0.5450919", "text": "public function generate()\n {\n $template = new \\FrontendTemplate($this->template);\n $this->render($template);\n\n return $template->parse();\n }", "title": "" }, { "docid": "c4bc8778b4d41fa3baf90318ffd5386c", "score": "0.5441144", "text": "public function create()\n {\n return $this->createEdit([\n 'name' => null,\n 'asset_tag_prefix' => null,\n 'license_tag_prefix' => null,\n ]);\n }", "title": "" }, { "docid": "28cfb1cdd3eec1cbf27b1a3235246c12", "score": "0.54389817", "text": "public function createTag()\n {\n $tag = new StackTag();\n $this->tags[] = $tag;\n return $tag;\n }", "title": "" }, { "docid": "bf2d8aa8ff9438fd26bf31431f792cb1", "score": "0.5395701", "text": "public function create()\n {\n return Inertia::render('Admin/Tags/Create');\n }", "title": "" }, { "docid": "789afe39a252c45489aab50aa0f58d35", "score": "0.53636706", "text": "public function create()\n {\n return view('backend.tag.create');\n }", "title": "" }, { "docid": "095b282e332d1bdb54aa956d29d5f4c0", "score": "0.5345042", "text": "public function createNode(): Node\n {\n //Content of node to be imported\n $node = $this->compiler->createNode($this->path, $this->token);\n\n //Let's register user defined blocks (context and attributes) as placeholders\n $node->mountBlock(\n self::CONTEXT_BLOCK,\n [],\n [$this->createPlaceholder(self::CONTEXT_BLOCK, $contextID)],\n true\n );\n\n foreach ($this->token[HtmlTokenizer::TOKEN_ATTRIBUTES] as $attribute => $value) {\n //Attributes counted as blocks to replace elements in included node\n $node->mountBlock($attribute, [], [$value], true);\n }\n\n //We now have to compile node content to pass it's body to parent node\n $content = $node->compile($dynamic);\n\n //Outer blocks (usually user attributes) can be exported to template using non default\n //rendering technique, for example every \"extra\" attribute can be passed to specific\n //template location. Stempler to decide.\n foreach ($this->compiler->getExports() as $exporter) {\n /** @var array $dynamic */\n $content = $exporter->mountBlocks($content, $dynamic);\n }\n\n //Let's parse complied content without any imports (to prevent collision)\n $compiler = clone $this->compiler;\n\n //Outer content must be protected using unique names\n $rebuilt = new Node($compiler, $compiler->generateID(), $content);\n\n if (!empty($contextBlock = $rebuilt->findNode($contextID))) {\n //Now we can mount our content block\n $contextBlock->mountNode($this->contextNode());\n }\n\n return $rebuilt;\n }", "title": "" }, { "docid": "3da7cfa667e162e32afd122538177bb8", "score": "0.5344834", "text": "public function create()\n\t{\n\t\t$document = new DOMDocument;\n\n\t\t$url_node = $document->createElement('url');\n\n\t\tforeach($this->attributes as $name => $value)\n\t\t{\n\t\t\t// The loc attribute is required.\n\t\t\tif(NULL === $this->attributes['loc'])\n\t\t\t{\n\t\t\t\tthrow new RuntimeException('loc is required');\n\t\t\t}\n\n\t\t\t// Add attributes that aren't empty.\n\t\t\tif (NULL !== $value)\n\t\t\t{\n\t\t\t\t$url_node->appendChild(new DOMElement($name, $value));\n\t\t\t}\n\t\t}\n\n\t\t// If a specialised sitemap was used, import it's data here.\n\t\tif (NULL !== $this->driver)\n\t\t{\n\t\t\t$url_node->appendChild($document->importNode($this->driver->create(), TRUE));\n\t\t}\n\n\t\treturn $url_node;\n\t}", "title": "" }, { "docid": "22fa5b25ba3a9e7970ff1f9cb97f5ac6", "score": "0.5338982", "text": "public function renderTag()\n {\n if (method_exists($this, 'executeAlter')) {\n static::executeAlter(\"/.*?_before_render_\".$this->tag.\"_alter$/i\", [&$this]);\n }\n $reserved_attributes = \"\";\n foreach ($this->reserved_attributes as $key) {\n if (property_exists(get_class($this), $key)\n && (!empty($this->{$key}) || ($key == 'value' && $this->getValueNeeded()))\n ) {\n $reserved_attributes .= ' '.$key.'=\"'.$this->{$key}.'\"';\n }\n }\n $attributes = $this->getAttributes($this->reserved_attributes);\n return \"<{$this->tag}{$reserved_attributes}{$attributes}\".($this->has_close ? \">\" : \"/>\").\n $this->text.\n ($this->has_close ? $this->renderChildren().\"</{$this->tag}>\" : \"\");\n }", "title": "" }, { "docid": "93562ca0e1c6d7edad659639492a35db", "score": "0.53274345", "text": "public function create()\n {\n return view('Backend.Modules.Article.Source.create');\n }", "title": "" }, { "docid": "9abc97d069baef3d041ba451b65a9754", "score": "0.5319458", "text": "public static function create(string $tagName, array $attributes, string $innerHtml = '', $escape = false): string\n {\n $innerHtml = $escape ? Html::escape($innerHtml) : $innerHtml;\n $open = Html::open($tagName, $attributes);\n $close = Html::close($tagName);\n return \"$open$innerHtml$close\";\n }", "title": "" }, { "docid": "2b607e72d0422fe7c05c32bd34107b62", "score": "0.53002363", "text": "public function create()\n\t{\n\t\treturn view('admin.tag.create');\n\t}", "title": "" }, { "docid": "2d3d8bbb37998845b0d7e38546eb0a10", "score": "0.52894384", "text": "protected function compile()\n {\n //parse all extra attributes\n $attributes = '';\n $helper = new Helper();\n\n if ($this->sh5_additional) {\n /** @var array $additionalAttributes */\n $additionalAttributes = deserialize($this->sh5_additional, true);\n $attributes = $helper->convertAttributesToString($additionalAttributes, 'tl_content'); \n\n }\n\n $this->Template->sh5_additional = $attributes;\n\n //render BE-Template\n if (TL_MODE == 'BE') {\n $this->Template = new \\BackendTemplate('be_wildcard');\n $this->Template->wildcard = sprintf(\"&lt;%s%s%s%s&gt;\",\n $this->sh5_type,\n ($this->cssID[0]) ? ' id=\"' . $this->cssID[0] . '\"' : '',\n ' class=\"' . trim('ce_' . $this->type . ' ' . $this->cssID[1]) . '\"',\n $attributes\n );\n\n return $this->Template->parse();\n }\n }", "title": "" }, { "docid": "6dcc6621398cb05cae2fb88a2a88ad54", "score": "0.5262816", "text": "public function render() {\n\n /** @var \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage $images */\n $images = $this->arguments['images'];\n $images->rewind();\n\n /** @var \\TYPO3\\CMS\\Extbase\\Domain\\Model\\FileReference $firstImage */\n $firstImage = $images->current();\n $imageFile = $firstImage->getOriginalResource();\n\n $this->tag->addAttribute(\n 'src',\n $imageFile->getPublicUrl()\n );\n\n if(true === $this->arguments['addItemProp']) {\n $this->tag->addAttribute(\n 'itemprop',\n $firstImage\n );\n }\n\n return $this->tag->render();\n }", "title": "" }, { "docid": "dee1ce7cc3e1407a60cf12114275cf79", "score": "0.5251089", "text": "protected function _getSource()\n {\n if($this->_source == null)\n {\n $this->_source = self::getDefaultGraphicAdapter();\n }\n $textSize = $this->_source->getTextSize($this->_fontSize, $this->_angle, $this->_font, $this->_text);\n $this->_source\n ->createNewResource($textSize->width, $textSize->height, $this->_backgroundColor)\n ->drawText($this->_text, $this->_fontSize, $this->_angle, $this->_color, $this->_font, 0, 0);\n return $this->_source;\n }", "title": "" }, { "docid": "ed147d1f3e74fc16be32d71ba2fff7b5", "score": "0.5229664", "text": "public function render()\n {\n $this->tag->addAttribute('class', 't3js-contextmenutrigger ' . $this->arguments['class']);\n $this->tag->addAttribute('data-uid', $this->arguments['table']);\n $this->tag->addAttribute('data-table', 'sys_file');\n $this->tag->addAttribute('href', '#');\n\n $this->tag->setContent($this->renderChildren());\n\n return $this->tag->render();\n }", "title": "" }, { "docid": "2af9002035f9f03624d951429d87958f", "score": "0.5224082", "text": "public function createEvent()\n {\n $entityClass = 'MU\\\\YourCityModule\\\\Entity\\\\EventEntity';\n\n $entity = new $entityClass();\n\n $this->entityInitialiser->initEvent($entity);\n\n return $entity;\n }", "title": "" }, { "docid": "76c54e833695a40328a8284d0a6a914b", "score": "0.52154094", "text": "public function generate()\n {\n if (TL_MODE == 'BE') {\n $objTemplate = new BackendTemplate('be_wildcard');\n\n $objTemplate->wildcard = '### EVENT REGISTRATION ###';\n $objTemplate->title = $this->headline;\n $objTemplate->id = $this->id;\n $objTemplate->link = $this->name;\n $objTemplate->href = 'typolight/main.php?do=modules&amp;act=edit&amp;id=' . $this->id;\n\n return $objTemplate->parse();\n }\n\n return parent::generate();\n }", "title": "" }, { "docid": "4a5222d2800be84a8a6aa34d0f2e4187", "score": "0.5210494", "text": "protected function initTag()\n {\n $this->di->setShared(\n 'tag',\n function () {\n $tag = new Tag;\n\n $tag->setDocType(Tag::HTML5);\n $tag->setTitleSeparator(' :: ');\n $tag->setTitle('Phalcon WebTools');\n\n return $tag;\n }\n );\n }", "title": "" }, { "docid": "096992ac4be4ea707a686f7266a59d6f", "score": "0.5208031", "text": "private function post_template() {\nreturn <<<HTML\n<article class=\"wm-article-content\">\n <div id=\"wm-article-header\">\n <div class=\"wm-article-title\">\n {{post-header}}\n </div>\n <div class=\"wm-article-meta\">\n <div class=\"wm-time\">\n {{post-time}}\n </div>\n <div class=\"wm-author\">\n {{post-author}}\n </div>\n </div>\n </div>\n {{post-content}}\n <div id=\"wm-article-cite\">\n <div id=\"wm-qr-code-wrapper\"></div>\n <div class=\"wm-article-meta\">\n <div class=\"wm-title\">\n {{cite-header}}\n </div>\n <div class=\"wm-time\">\n {{cite-time}}\n </div>\n <div class=\"wm-author\">\n {{cite-author}}\n </div>\n <div class=\"wm-message\">\n {{cite-message}}\n </div>\n </div>\n </div>\n</article>\nHTML;\n }", "title": "" }, { "docid": "1e8e9a0f4aeb5d6e8cc1431857e094b6", "score": "0.52072656", "text": "final public function create ($tag, $content = null, $attribs = array()) {\n\n\t\t\t$element = $this->createElement($tag);\n\n\t\t\tif (is_object($content)) {\n\n\t\t\t\t$element->appendChild($content);\n\n\t\t\t} else {\n\n\t\t\t\t$element->appendChild($this->createTextNode((string)$content));\n\n\t\t\t}\n\n\t\t\tforeach ($attribs as $key => $value) {\n\n\t\t\t\tif (!is_string($key)) {\n\n\t\t\t\t\t$key = (string)$value;\n\n\t\t\t\t}\n\n\t\t\t\t$element->setAttribute($key, $value);\n\n\t\t\t}\n\n\t\t\treturn $element;\n\n\t\t}", "title": "" }, { "docid": "f16275f1e5028c41903832768d777d6b", "score": "0.5191951", "text": "public function create()\n {\n return view('admin.tag.create');\n }", "title": "" }, { "docid": "f16275f1e5028c41903832768d777d6b", "score": "0.5191951", "text": "public function create()\n {\n return view('admin.tag.create');\n }", "title": "" }, { "docid": "f16275f1e5028c41903832768d777d6b", "score": "0.5191951", "text": "public function create()\n {\n return view('admin.tag.create');\n }", "title": "" }, { "docid": "f16275f1e5028c41903832768d777d6b", "score": "0.5191951", "text": "public function create()\n {\n return view('admin.tag.create');\n }", "title": "" }, { "docid": "5c87465c2fbe79389a7758d96ce130a4", "score": "0.51887727", "text": "public function render()\n {\n return <<<'blade'\n<{{$tag}} {{$attributes->merge($attrs)}}>{{$slot}}</{{$tag}}>\nblade;\n }", "title": "" }, { "docid": "04d62c6b722167fd4fde2aa081594706", "score": "0.51857466", "text": "public function generate() {\n\n global $objPage;\n\n if( TL_MODE == 'FE' ) {\n\n // check license\n if( !djeuvnxger::hasFeature('tag_settings', $objPage->trail[0]) || !djeuvnxger::hasFeature('tag'.substr($this->type, 3), $objPage->trail[0]) ) {\n return '';\n }\n\n // check if configured to be a frontend module\n if( $this->id && CMSConfig::get('cms_tag_type') != 'cms_tag_modules' ) {\n return '';\n }\n\n // handle form data\n $this->handleFormData();\n\n // check if it should be shown at all\n if( !$this->shouldBeShown() ) {\n return '';\n }\n }\n\n return parent::generate();\n }", "title": "" }, { "docid": "2e7041040a0657b748b8ff38d5cc6d69", "score": "0.51834923", "text": "public function render($params = null)\n {\n\n if ($this->html)\n return $this->html;\n\n $codeEntr = '';\n\n /**\n * title:\n * content:\n */\n if ($this->data) {\n foreach ($this->data as $entry) {\n\n $codeEntr .= <<<HTML\n\n <span class=\"tag\" wgt_eid=\"{$entry['ref_id']}\" wgt_tid=\"{$entry['tag_id']}\" >{$entry['label']}</span>\n\nHTML;\n\n }\n }\n\n $id = $this->getId();\n\n $settings = array();\n\n if ($this->refId)\n $settings[] = '\"refid\":\"'.$this->refId.'\"';\n\n if ($this->urlAutoComplete)\n $settings[] = '\"url_auto_complete\":\"'.SFormatStrings::cleanCC($this->urlAutoComplete).'\"';\n\n if ($this->urlCreate)\n $settings[] = '\"url_tag_create\":\"'.SFormatStrings::cleanCC($this->urlCreate).'\"';\n\n if ($this->urlDisconnect)\n $settings[] = '\"url_tag_disconnect\":\"'.SFormatStrings::cleanCC($this->urlDisconnect).'\"';\n\n $codeSetings = '{'.implode(',', $settings).'}';\n\n\n $settingsAuto = '';\n $classAuto = '';\n\n if ($this->urlAutoComplete) {\n $urlAutoComplete = SFormatStrings::cleanCC($this->urlAutoComplete);\n\n $settingsAuto = <<<HTML\n\n <var class=\"wgt-settings\" >{\n \"url\":\"{$urlAutoComplete}&amp;refid={$this->refId}&amp;key=\",\n \"type\":\"entity\"}\n </var>\n\n <input\n type=\"hidden\"\n id=\"{$id}-autoc\" />\n\nHTML;\n\n $classAuto = 'wcm wcm_ui_autocomplete ';\n }\n\n $html = <<<HTML\n\n<section\n class=\"wgt-content_box wgt-tag-cloud wcm wcm_widget_tag_cloud\"\n id=\"{$id}\"\n style=\"width:{$this->width}px;\" >\n\n <header>\n <div class=\"left\" style=\"width:210px;\" ><h2>{$this->label}</h2></div>\n <div class=\"right\" style=\"width:250px;\" >\n <input\n type=\"text\"\n class=\"{$classAuto} c_input_add medium wgt-ignore\"\n id=\"{$id}-autoc-tostring\" />\n {$settingsAuto}\n <button\n id=\"{$id}-trigger\"\n tabindex=\"-1\"\n class=\"wgt-button c_cntrl_add append\" ><i class=\"fa fa-plus-circle\" ></i></button>\n </div>\n <div class=\"do-clear tiny\" >&nbsp;</div>\n </header>\n\n <div class=\"content\" >\n {$codeEntr}\n </div>\n\n <var id=\"{$id}-cfg-tag_cloud\" >{$codeSetings}</var>\n</section>\n\nHTML;\n\n return $html;\n\n }", "title": "" }, { "docid": "65a203ade544de822be46c17f523ef53", "score": "0.51426274", "text": "public function generateMarkup()\n {\n $arrValues = array_values($this->value ?: []);\n\n $objT = new \\FrontendTemplate($this->strTemplate);\n $objT->setData($this->arrData);\n $objT->id = $this->id;\n $objT->uploadMultiple = $this->uploadMultiple;\n $objT->initialFiles = json_encode($arrValues);\n $objT->initialFilesFormatted = $this->prepareValue();\n $objT->uploadedFiles = '[]';\n $objT->deletedFiles = '[]';\n $objT->attributes = $this->getAttributes($this->getDropZoneOptions());\n $objT->widget = $this->objWidget;\n\n // store in session to validate on upload that field is allowed by user\n $fields = \\Session::getInstance()->get(static::SESSION_FIELD_KEY);\n $dca = $this->objWidget->arrDca;\n if (!$dca)\n {\n $dca = $GLOBALS['TL_DCA'][$this->objWidget->strTable]['fields'][$this->objWidget->strField];\n }\n $fields[$this->strTable][$this->id] = $dca;\n \\Session::getInstance()->set(static::SESSION_FIELD_KEY, $fields);\n\n return $objT->parse();\n }", "title": "" }, { "docid": "cfd13a811b921ef479ce25d1831cbbcf", "score": "0.5140971", "text": "public function create()\n {\n return view('tag.create');\n }", "title": "" }, { "docid": "cfd13a811b921ef479ce25d1831cbbcf", "score": "0.5140971", "text": "public function create()\n {\n return view('tag.create');\n }", "title": "" }, { "docid": "cdd6b3ea408f3a571164b207b52b3b5d", "score": "0.5136719", "text": "public function __toString(){\n\t\treturn $this->render($this->filename,$this->extension);\n\t}", "title": "" }, { "docid": "204cbaac10c5a3201f467c62a0172b21", "score": "0.51313955", "text": "public function render()\n {\n $sizes = $this->sizesPresets['Default'];\n\n $srcSetString = $this->srcSetService->getSrcSetAttribute(\n $this->arguments['image'],\n $this->arguments['ratio'],\n $this->arguments['maximumWidth'],\n $this->arguments['maximumHeight'],\n $this->arguments['allowCropping'],\n $this->arguments['quality'],\n $sizes,\n null\n );\n\n $classNames = ['lazyload'];\n if (isset($this->arguments['class'])) {\n $classNames[] = $this->arguments['class'];\n }\n\n $this->tag->addAttributes(\n [\n 'class' => implode(' ', $classNames),\n 'data-sizes' => 'auto',\n 'data-srcset' => $srcSetString,\n ]\n );\n\n // alt argument must be set because it is required (see $this->initializeArguments())\n if ($this->arguments['alt'] === '') {\n // has to be added explicitly because empty strings won't be added as attributes in general (see parent::initialize())\n $this->tag->addAttribute('alt', '');\n }\n\n return $this->tag->render();\n }", "title": "" }, { "docid": "cb38f2c31a71b58866c39a718e1f0413", "score": "0.5127524", "text": "function create() {\n\t\t$LegalAttributes = $this->getLegalAttributes();\n\n\t\t$Html = '<input ';\n\n\t\tforeach($LegalAttributes AS $k => $v) {\n\t\t\t$Html .= \"$k=\\\"$v\\\" \";\n\t\t}\n\n\t\t$Html .= '/>';\n\n\t\treturn $Html;\n\t}", "title": "" }, { "docid": "026fd910052c788d84fa97dc2c551a79", "score": "0.5120549", "text": "function makeTAG($TAG, $content, $args=\"\") \n{\n return ('<'.$TAG.' '.$args.'>'.$content.'</'.$TAG.'>');\n}", "title": "" }, { "docid": "76cffccde60c5c140e98cfcbb345a72a", "score": "0.511803", "text": "function parse() {\n $this->_template = $this->_parseFragment($this->_template);\n return $this->_template;\n }", "title": "" }, { "docid": "a63f2cfd9b155a0d557517aa37e96eae", "score": "0.5117592", "text": "public function element( ) : \\DOMElement\n {\n $generator = $this->createElement( 'generator', $this->name );\n\n if ( $this->uri ) {\n $generator->setAttribute( 'uri', $this->uri );\n }\n\n if ( $this->version ) {\n $generator->setAttribute( 'version', $this->version );\n }\n\n return $generator;\n }", "title": "" }, { "docid": "2010b8dc5021421630dca928fe0bc84a", "score": "0.5105877", "text": "public function create()\n {\n //\n return view('tag.create');\n }", "title": "" }, { "docid": "5e82c74b669d31efe62b63a8c85d6404", "score": "0.5105039", "text": "public function createTag(array $data);", "title": "" }, { "docid": "4deefe8dbaed19a7510b8bf3c424263d", "score": "0.508779", "text": "public function generate()\n\t{\n\t\t$this->strTemplate = $this->customTpl ?: $this->type;\n\n\t\t// Return output for the backend if in BE mode\n\t\tif (($output = $this->rsceGetBackendOutput()) !== null) {\n\t\t\treturn $output;\n\t\t}\n\n\t\ttry {\n\t\t\treturn parent::generate();\n\t\t}\n\t\tcatch (\\Exception $exception) {\n\n\t\t\tif (System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest(System::getContainer()->get('request_stack')->getCurrentRequest() ?? Request::create(''))) {\n\n\t\t\t\t$template = new CustomTemplate($this->strTemplate);\n\t\t\t\t$template->setData($this->Template->getData());\n\t\t\t\t$this->Template = $template;\n\n\t\t\t\treturn $this->Template->parse();\n\n\t\t\t}\n\n\t\t\tthrow $exception;\n\t\t}\n\t}", "title": "" }, { "docid": "1cca132b436925b91ee5af8ec644e181", "score": "0.5083764", "text": "public function create()\n {\n //\n return view('pages.admin.tag.create', [\n ]);\n }", "title": "" }, { "docid": "701d89231d6e5e66397616cf0f9e6573", "score": "0.50836116", "text": "public function build( )\n {\n if(Log::$levelDebug)\n Log::start( __file__ , __line__ ,__method__ );\n\n try\n {\n $this->load();\n }\n catch( LibDb_Exception $e )\n {\n return I18n::s('wbf.error.failedToLoadData');\n }\n\n $html = '<div id=\"'.$this->preId.'\" class=\"wgtTagCloud\" >'.NL;\n $html .= $this->buildJsCode();\n $html .= $this->buildForm( );\n $html .= $this->buildCloud( );\n $html .= '</div>';\n\n return $html;\n\n }", "title": "" }, { "docid": "4039083abb17ffcb196dcbcbac724dcc", "score": "0.50828433", "text": "protected function compile()\n {\n $this->text = \\StringUtil::toHtml5($this->text);\n // Add the static files URL to images\n if ($staticUrl = \\System::getContainer()->get('contao.assets.files_context')->getStaticUrl()) {\n $path = \\Config::get('uploadPath') . '/';\n $this->text = str_replace(' src=\"' . $path, ' src=\"' . $staticUrl . $path, $this->text);\n }\n $this->Template->text = \\StringUtil::encodeEmail($this->text);\n $this->Template->addImage = false;\n // Add an image\n if ($this->addImage && '' !== $this->singleSRC) {\n $objModel = \\FilesModel::findByUuid($this->singleSRC);\n if (null !== $objModel && is_file(TL_ROOT . '/' . $objModel->path)) {\n $this->singleSRC = $objModel->path;\n $this->addImageToTemplate($this->Template, $this->arrData, null, null, $objModel);\n }\n }\n\n if (0 === strpos($this->url, 'mailto:')) {\n $this->url = \\StringUtil::encodeEmail($this->url);\n } else {\n $this->url = ampersand($this->url);\n }\n\n if ($this->rel) {\n $this->Template->attribute = ' data-lightbox=\"' . $this->rel . '\"';\n }\n if ('' === $this->linkTitle) {\n if (strpos($this->url, 'link_url')) {\n $this->linkTitle = str_replace('link_url::', 'link_name::', $this->url);\n } else {\n $this->linkTitle = $this->url;\n }\n }\n $this->Template->href = $this->url;\n $this->Template->link = $this->linkTitle;\n $this->Template->target = '';\n $this->Template->rel = '';\n if ($this->titleText) {\n $this->Template->linkTitle = \\StringUtil::specialchars($this->titleText);\n }\n\n // Override the link target\n if ($this->target) {\n $this->Template->target = ' target=\"_blank\"';\n $this->Template->rel = ' rel=\"noreferrer noopener\"';\n }\n // Unset the title attributes in the back end (see #6258)\n if (TL_MODE === 'BE') {\n $this->Template->title = '';\n $this->Template->linkTitle = '';\n }\n }", "title": "" }, { "docid": "72eded7b18de9e1984156a40f5673607", "score": "0.5082231", "text": "function getTagString() {\n\t\t$formatTagBegin = \"\";\n\t\t$formatTagEnd = \"\";\n\t\t$formatContent = \"\";\n\t\tif($this->tagFormat == $this->FORMAT_INDENT) {\n\t\t\tif($this->tagFormatIndentLevel > 0)\n\t\t\t\t$formatTagBegin = $this->tagFormatNewLine . str_repeat($this->tagFormatIndent, $this->tagFormatIndentLevel);\n\t\t\tif($this->tagFormatEndTag)\n\t\t\t\t$formatTagEnd = $this->tagFormatNewLine . str_repeat($this->tagFormatIndent, $this->tagFormatIndentLevel);\n\t\t}\n\t\t$tagString = $formatTagBegin . $this->getTagStringBegin() . $formatContent . $this->tagContent . $formatTagEnd . $this->getTagStringEnd();\n\t\treturn $tagString;\n\t}", "title": "" }, { "docid": "67fe56f93d710fcd43c9d294f638bc71", "score": "0.5081922", "text": "function asset_template()\n {\n return Asset::template();\n }", "title": "" }, { "docid": "4236662844269d5688ff3a4ba102810e", "score": "0.5070616", "text": "public function create()\n {\n return view('admin.tag.tag');\n }", "title": "" }, { "docid": "aa51fe6a8863cd955ed012a615049891", "score": "0.5068407", "text": "protected function setUp()\n\t{\n\t\tif (isset($this->configurator->tags[$this->tagName]))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$tag = $this->configurator->tags->add($this->tagName);\n\t\tforeach (['seq', 'tseq'] as $attrName)\n\t\t{\n\t\t\t$tag->attributes->add($attrName)->filterChain->append(\n\t\t\t\t$this->configurator->attributeFilters['#identifier']\n\t\t\t);\n\t\t}\n\t\t$tag->template = '<img alt=\"{.}\" class=\"emoji\" draggable=\"false\" src=\"https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/{@tseq}.svg\"/>';\n\t}", "title": "" }, { "docid": "65b5490171ab83de796caf5a5003ae9e", "score": "0.5061171", "text": "public function build()\n {\n if (isset($this->component)) {\n return $this->component;\n }\n\n $this->component = BuildUtil::removeNullElements([\n 'type' => ComponentType::IMAGE,\n 'url' => $this->url,\n 'flex' => $this->flex,\n 'margin' => $this->margin,\n 'align' => $this->align,\n 'gravity' => $this->gravity,\n 'size' => $this->size,\n 'aspectRatio' => $this->aspectRatio,\n 'aspectMode' => $this->aspectMode,\n 'backgroundColor' => $this->backgroundColor,\n 'action' => BuildUtil::build($this->actionBuilder, 'buildTemplateAction'),\n 'position' => $this->position,\n 'offsetTop' => $this->offsetTop,\n 'offsetBottom' => $this->offsetBottom,\n 'offsetStart' => $this->offsetStart,\n 'offsetEnd' => $this->offsetEnd,\n 'animated' => $this->animated,\n ]);\n\n return $this->component;\n }", "title": "" }, { "docid": "3dfc3a595867adaf8a6538d118ec1776", "score": "0.5060833", "text": "public function encodeEETags($options = [])\n\t{\n\t\t$encode_vars = (isset($options['encode_vars'])) ? $options['encode_vars'] : TRUE;\n\n\t\tif ($this->content != '' && strpos($this->content, '{') !== FALSE)\n\t\t{\n\t\t\tif ($encode_vars === TRUE)\n\t\t\t{\n\t\t\t\t$this->content = str_replace(array('{', '}'), array('&#123;', '&#125;'), $this->content);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->content = preg_replace(\"/\\{(\\/){0,1}exp:(.+?)\\}/\", \"&#123;\\\\1exp:\\\\2&#125;\", $this->content);\n\t\t\t\t$this->content = str_replace(array('{exp:', '{/exp'), array('&#123;exp:', '&#123;\\exp'), $this->content);\n\t\t\t\t$this->content = preg_replace(\"/\\{embed=(.+?)\\}/\", \"&#123;embed=\\\\1&#125;\", $this->content);\n\t\t\t\t$this->content = preg_replace(\"/\\{path:(.+?)\\}/\", \"&#123;path:\\\\1&#125;\", $this->content);\n\t\t\t\t$this->content = preg_replace(\"/\\{redirect=(.+?)\\}/\", \"&#123;redirect=\\\\1&#125;\", $this->content);\n\t\t\t\t$this->content = str_replace(array('{if', '{/if'), array('&#123;if', '&#123;/if'), $this->content);\n\t\t\t\t$this->content = preg_replace(\"/\\{(\\/)?layout:(.+?)\\}/\", \"&#123;\\\\1layout:\\\\2&#125;\", $this->content);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "022032e67a08c828996198c4c1138da6", "score": "0.50528586", "text": "public function buildElement()\n\t{\n\t\t$e = $this->getElement();\n\t\t$view = $e->getView();\n\t\t$helper = $e->helper;\t\t\n\t\t\n\t\t$type = $e->getType();\n\t\t\n\t\t$attribs = $e->getAttribs();\n\t\t\n\t\t$selectorMode = self::MODE_FILE;\n\t\tif (is_string($attribs['selectorMode']) && in_array($attribs['selectorMode'], $this->_modes)) {\n\t\t\t$selectorMode = $attribs['selectorMode'];\n\t\t\t\n\t\t}\n\t\tunset($attribs['selectorMode']);\n\t\t\n\t\t$buttonLabel = 'Select ' . $selectorMode;\n\t\tif (is_string($attribs['buttonLabel'])) {\n\t\t\t$buttonLabel = $attribs['buttonLabel'];\n\t\t\t\n\t\t}\n\t\tunset ($attribs['buttonLabel']);\n\t\t\n\t\t$selectMultiple = 'false';\n\t\t$jsMultiple = 'Single';\n\t\tif (isset($attribs['selectMultiple']) && !!$attribs['selectMultiple']) {\n\t\t\t$selectMultiple = 'true';\n\t\t\t$jsMultiple = 'Many';\n\t\t}\n\t\tunset($attribs['selectMultiple']);\n\t\t\n\t\t$imgType = '';\n\t\tif (is_string($attribs['media-type'])) {\n\t\t\t$imgType = $attribs['media-type'];\n\t\t\tunset ($attribs['media-type']);\n\t\t}\n\t\t\n\t\t$path = '';\n\t\tif (is_string($attribs['media-path'])) {\n\t\t\t$path = $attribs['media-path'];\n\t\t\tunset ($attribs['media-path']);\n\t\t}\n\t\t\n\t\t$jsMethod = 'render' . ucfirst($selectorMode) . $jsMultiple;\n\t\t\n\t\t$xhtml = '<div class=\"' . $this->_namespace . '-tag\">'\n\t\t\t . $view->formHidden($e->getName(), $e->getValue(), array('media-type' => $imgType, 'media-path' => $path, 'selector-mode' => $selectorMode, 'select-multiple' => $selectMultiple, 'autocomplete' => \"off\"))\n\t\t\t . $view->$helper($e->getName() . '-button', $buttonLabel, $attribs, $e->options)\n\t\t\t . '<div class=\"' . $e->getName() . '-list-container ' . $this->_namespace . '-mode-' . $selectorMode . '\">'\n\t\t\t . '<ul class=\"' . $e->getName() . '-list\"></ul>'\n\t\t\t . '</div>'\n\t\t\t . '<script>$(document).ready(function(){ $.fn.cmsManager(\\'' . $jsMethod . '\\', null, \\'' . $e->getName() . '\\'); })</script>'\n\t\t\t . '</div>';\t\t\t\n\t\n\t\treturn $xhtml;\n\t}", "title": "" }, { "docid": "7b6ebfecb41fdb3fb9e1a86833ce53ad", "score": "0.50442445", "text": "public function render(): string\n {\n $doc = new \\DOMDocument('1.0', 'utf-8');\n\n foreach ($this->getData() as $key => $value) {\n $doc->appendChild($doc->createElement($key, $value));\n }\n\n return $doc->saveXML();\n }", "title": "" }, { "docid": "46182fe6cf3303c96b815435e5a21ff0", "score": "0.5003641", "text": "public function create()\n {\n return view('backend.tags.create');\n }", "title": "" }, { "docid": "3c9befe8997069929652befe16125e2f", "score": "0.4996643", "text": "function create() {\n\n $this->html = implode(\"\",(file('/data/ap/templates/quiz/answer.html')));\n\n\n\t foreach($this->qdata as $key => $value) { \t \n\t $template_name = '<!--{'. $key . '}-->';\n\t $this->html = str_replace($template_name, $value, $this->html);\n }\n \n return $this->html;\n }", "title": "" }, { "docid": "78e09de4cf69b97f7eaf9c165d8cef6e", "score": "0.4993762", "text": "protected function tagContentGenerator()\n {\n if (!$this->useMultipleSources)\n return false;\n\n $content = false;\n\n // handle adding our sources, if any\n if (isset($this->sources)) {\n foreach ($this->sources as $item) {\n $content .= CHtml::tag('source', $item);\n }\n\n // now, clear our main tag's src option, it's no longer useful, as we've added in source fallbacks instead\n // we'll let MediaElement handle that appropriately for us instead\n unset($this->htmlOptions['src']);\n }\n\n // now handle adding in a flash fallback as well\n $options = (isset($this->objectTag['htmlOptions']))\n ? $this->objectTag['htmlOptions']\n : array(\n 'type' => 'application/x-shockwave-flash',\n 'data' => $this->scriptUrl . '/flashmediaelement.swf',\n );\n $contentTags = (isset($this->objectTag['contentTags']))\n ? $this->objectTag['contentTags']\n : array(\n array(\n 'tag' => 'param',\n 'options' => array(\n 'name' => 'movie',\n 'value' => $this->scriptUrl . '/flashmediaelement.swf',\n ),\n ),\n array(\n 'tag' => 'param',\n 'options' => array(\n 'name' => 'flashvars',\n 'value' => 'controls=true&file=' . $this->url,\n ),\n ),\n// @TODO: add img fallback implementation, love to have feedback/pull back here\n// array(\n// 'tag' => 'img',\n// 'options' => array(\n// 'src' => 'fallback.jpg'\n// )\n// ),\n );\n\n $optionsContent = '';\n foreach ($contentTags as $tag) {\n $optionsContent .= CHtml::tag($tag['tag'], $tag['options']);\n }\n\n $content .= CHtml::tag('object', $options, $optionsContent);\n\n return $content;\n }", "title": "" }, { "docid": "3d90d14741657e9320283f1a2cc1d74f", "score": "0.4991143", "text": "public function createExpression() {\n\t\t$expression = new \\Hoathis\\GraphicTools\\Svg();\n\t\t$expression->setWrappingLayout();\n\t\t$expression->setMargin( self::BIG_MARGIN );\n\t\t$expression->addDots();\n\t\t$expression->addStandard();\n\t\t$expression->addVersion();\n\t\treturn $expression;\n\t}", "title": "" }, { "docid": "bdbf90d9e961104c36ec45ba4943eb17", "score": "0.4990491", "text": "public function create()\n {\n return view('back.tags.create');\n }", "title": "" }, { "docid": "04eddb0284238c884461ac2a51cd82b6", "score": "0.49894527", "text": "public function generate(){\r\n\t\t\tob_start();\r\n\t\t\t$this->render();\r\n\t\t\treturn ob_get_clean();\r\n\t\t}", "title": "" }, { "docid": "12def28cabfd616a106bd980a1efe772", "score": "0.49848863", "text": "public function createTEIHeader()\n {\n $this->DocumentRoot = $this->DOMDocument->getElementsByTagName('TEI')->item(0);\n // <teiHeader>\n $teiHeader = $this->DOMDocument->createElement('teiHeader');\n // <teiHeader><fileDesc>\n $teiHeader_fileDesc = $this->DOMDocument->createElement('fileDesc');\n $teiHeader->appendChild($teiHeader_fileDesc);\n // <teiHeader><fileDesc><titleStmt>\n $teiHeader_titleStmt = $this->createTitleStmt();\n $teiHeader_fileDesc->appendChild($teiHeader_titleStmt);\n // <teiHeader><fileDesc><publicationStmt>\n $teiHeader_publicationStmt = $this->createPublicationStmt();\n $teiHeader_fileDesc->appendChild($teiHeader_publicationStmt);\n // <teiHeader><fileDesc><seriesStmt>\n $teiHeader_seriesStmt = $this->createSeriesStmt();\n $teiHeader_fileDesc->appendChild($teiHeader_seriesStmt);\n // <teiHeader><fileDesc><sourceDesc>\n $teiHeader_sourceDesc = $this->createSourceDesc();\n $teiHeader_fileDesc->appendChild($teiHeader_sourceDesc);\n\n $this->DocumentRoot->appendChild($teiHeader);\n\n return $this->DOMDocument;\n }", "title": "" }, { "docid": "a4a1ece4d92ed36ea17b5811c1739b90", "score": "0.49739218", "text": "public function create()\n {\n //\n $sidearr=$this->sidearr;\n return view('admin.tag.create',compact('sidearr'));\n }", "title": "" }, { "docid": "9668c18f9a899205171a25df0aa73d38", "score": "0.49709675", "text": "private function add_tag() {\n \n }", "title": "" }, { "docid": "0b59311f977d3e6030f1095497c31191", "score": "0.496925", "text": "public function create()\n {\n $type = 'create';\n return view('backend.tags_create_edit', compact('type'));\n }", "title": "" }, { "docid": "f34e5b8eab48dfc1eef220535cc2ac41", "score": "0.4968269", "text": "public function create()\n {\n return view('articles.create', ['tags' => Tag::all()]);\n }", "title": "" }, { "docid": "ab3b128c0137f11a7f4360c104ff4d25", "score": "0.49654093", "text": "protected function create() {\n\t\t$handle = @fopen( $this->file_path, 'w' );\n\t\t$ics = $this->generate();\n\t\t@fwrite( $handle, $ics );\n\t\t@fclose( $handle );\n\t}", "title": "" }, { "docid": "a622de314009bdf00464ea49f44d1b5a", "score": "0.49618682", "text": "public function create()\n\t{\n\t\t$data = $this->createViewEditData(new Event(), 'store', 'post');\n\t\treturn \\View::make('events.edit')->with($data);\n\t}", "title": "" }, { "docid": "3e35e6efd1a24fa769243fab0a091a92", "score": "0.49575466", "text": "public function generate()\n {\n $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/dc-general/html/js/vanillaGeneral.js';\n\n $environment = $this->getEnvironment();\n $translator = $environment->getTranslator();\n $template = (TL_MODE === 'BE')\n ? new BackendTemplate('widget_treepicker')\n : new FrontendTemplate('widget_treepicker');\n\n $icon = new GenerateHtmlEvent($this->titleIcon);\n $environment->getEventDispatcher()->dispatch(ContaoEvents::IMAGE_GET_HTML, $icon);\n\n $template->id = $this->strId;\n $template->name = $this->strName;\n $template->class = ($this->strClass ? ' ' . $this->strClass : '');\n $template->icon = $icon->getHtml();\n $template->title = $translator->translate(\n $this->title ?: 'MSC.treePicker',\n '',\n array($this->sourceName)\n );\n\n $template->changeSelection = $translator->translate('MSC.changeSelection');\n $template->dragItemsHint = $translator->translate('MSC.dragItemsHint');\n $template->fieldType = $this->fieldType;\n $template->values = $this->renderItemsPlain();\n $template->popupUrl = 'system/modules/dc-general/backend/generaltree.php?' .\n sprintf(\n 'do=%s&amp;table=%s&amp;field=%s&amp;act=show&amp;id=%s&amp;value=%s&amp;rt=%s',\n \\Input::get('do'),\n $this->strTable,\n $this->strField,\n $environment->getInputProvider()->getParameter('id'),\n implode(',', array_keys($template->values)),\n REQUEST_TOKEN\n );\n\n // Load the fonts for the drag hint.\n $GLOBALS['TL_CONFIG']['loadGoogleFonts'] = true;\n\n return $template->parse();\n }", "title": "" }, { "docid": "fe9348ab25226b6625a28f430b74a025", "score": "0.4956558", "text": "public function generate()\n\t{\n\t\tglobal $objPage;\n\t\t$GLOBALS['TL_LANGUAGE'] = $objPage->language;\n\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$objTemplate = new \\BackendTemplate('be_wildcard');\n\n\t\t\t$objTemplate->wildcard = '### AEO JavaScript Fallback ###';\n\t\t\t$objTemplate->title = $this->headline;\n\t\t\t$objTemplate->id = $this->id;\n\t\t\t$objTemplate->link = $this->name;\n\t\t\t$objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\t\t\n\t\t$this->use_rot_13 = $GLOBALS['TL_CONFIG']['aeo_use_rot_13'] === true;\n\t\t\n\t\t// Fallback auf default template\n\t\t$strTemplate = deserialize($this->getParent()->aeo_custom_template, true);\n\t\tif (!is_array($strTemplate) || count($strTemplate) < 1) {\n\t\t\t$this->strTemplate = 'aeo_default_no_js';\n\t\t} else {\n\t\t\t$this->strTemplate = $strTemplate[0];\n\t\t}\n\t\t\n\t\t// Default Info für Frontend-User anzeigen\n\t\t$numShowInfo = deserialize($this->getParent()->aeo_show_info, true);\n\t\tif (is_array($numShowInfo) && count($numShowInfo) >= 1) {\n\t\t\t$this->show_standard_info = $numShowInfo[0];\n\t\t} else {\n\t\t\t$this->show_standard_info = false;\n\t\t}\n\t\t\n\t\t// Eigene Info für Frontend-User anzeigen\n\t\t$strInfo = deserialize($this->getParent()->aeo_info_text, true);\n\t\tif (is_array($strInfo) && count($strInfo) >= 1) {\n\t\t\t$this->info = $strInfo[0];\n\t\t}\n\t\tif (strlen($this->info) == 0) {\n\t\t\t$this->show_standard_info = true;\n\t\t}\n\t\t\n\t\treturn parent::generate();\n\t}", "title": "" }, { "docid": "c5ac0618577a2046910b595adf90aaa8", "score": "0.4951011", "text": "public function render(): string\n {\n $insert = '';\n if (is_array($this->insert)) {\n if (isset($this->insert['image'])) {\n $insert = \"<img src=\\\"{$this->escape($this->insert['image'])}\\\" />\";\n }\n } else {\n $insert = $this->escape($this->insert);\n }\n return \"<{$this->tag} href=\\\"{$this->attributes['link']}\\\" target=\\\"_blank\\\">{$insert}</{$this->tag}>\";\n }", "title": "" }, { "docid": "3a0d59fcc78135c3df7d9ab53393058e", "score": "0.49475667", "text": "public function compile()\n\t{\n\t\t// Add an image\n\t\tif ($this->addImage && trim($this->singleSRC)) {\n\t\t\t$figure = System::getContainer()\n\t\t\t\t->get('contao.image.studio')\n\t\t\t\t->createFigureBuilder()\n\t\t\t\t->from($this->singleSRC)\n\t\t\t\t->setSize(StringUtil::deserialize($this->arrData['size'] ?? null) ?: null)\n\t\t\t\t->enableLightbox((bool) ($this->arrData['fullsize'] ?? false))\n\t\t\t\t->setLightboxSize(StringUtil::deserialize($this->arrData['lightboxSize'] ?? null) ?: null)\n\t\t\t\t->setMetadata((new ContentModel())->setRow($this->arrData)->getOverwriteMetadata())\n\t\t\t\t->buildIfResourceExists();\n\n\t\t\tif ($figure) {\n\t\t\t\t$figure->applyLegacyTemplateData($this->Template, null, $this->arrData['floating'] ?? null);\n\t\t\t}\n\t\t}\n\n\t\t$data = array();\n\t\tif ($this->rsce_data && substr($this->rsce_data, 0, 1) === '{') {\n\t\t\t$data = json_decode($this->rsce_data);\n\t\t}\n\n\t\t$data = $this->deserializeDataRecursive($data);\n\n\t\tforeach ($data as $key => $value) {\n\t\t\t$this->Template->$key = $value;\n\t\t}\n\n\t\t$self = $this;\n\n\t\t$this->Template->getImageObject = function() use($self) {\n\t\t\treturn call_user_func_array(array($self, 'getImageObject'), func_get_args());\n\t\t};\n\t\t$this->Template->getColumnClassName = function() use($self) {\n\t\t\treturn call_user_func_array(array($self, 'getColumnClassName'), func_get_args());\n\t\t};\n\t}", "title": "" }, { "docid": "44aa76c6e9bbed27bd1d648466c092b4", "score": "0.49444556", "text": "public function render(){\n\n //if there is a cache value avalible, use it.\n \n if($this->useCacheValue){\n \n return self::$cacheArray[$this->cacheID][0];\n }\n \n //get a rendering of this tags contents\n \n $this->renderedHtmlTag = $this->renderObjectData();\n \n //perform required replacements\n \n if($this->replacements){\n \n $outputStr = $this->applyReplacements();\n $this->renderedHtmlTagWithReplacements = $outputStr;\n \n }else{\n $outputStr = $this->renderedHtmlTag;\n }\n \n //apply the correct indentation\n\n $outputStr = $this->applyIndent($outputStr);\n \n //update the cache \n \n if($this->cacheID !== false){\n self::$cacheArray[$this->cacheID] = array();\n self::$cacheArray[$this->cacheID][0] = $outputStr;\n self::$cacheArray[$this->cacheID][1] = time();\n self::$cacheUpdate = true;\n }\n \n //add notations.\n \n if(self::$blockNotation){\n $outputStr = $this->getNotation(true).$outputStr.$this->getNotation();\n }\n\n return $outputStr;\n \n }", "title": "" }, { "docid": "1f157410ebfb4e0148f1b869ecfccd42", "score": "0.49361143", "text": "public function run()\n {\n $block = ob_get_clean() . $this->content;\n\n $id = $this->getId();\n $content = [];\n\n $content[] = <<<EOD\n <script id=\"{$id}\" type=\"text/x-my-template\">\n {$block}\n </script>\nEOD;\n $content[] = <<<JS_REPLACE\n <script type=\"text/javascript\">\n document.getElementById(\"{$this->targetId}\").innerHTML =\n document.getElementById(\"{$id}\").innerHTML ;\n </script>\nJS_REPLACE;\n return implode(\"\\n\",$content) ;\n\n }", "title": "" }, { "docid": "d8ed6f84f13380615922e8d691ec09bf", "score": "0.49344462", "text": "public function getHtmlTag()\n {\n switch ($this->type) {\n case 'image':\n return '<img data-mediaid=\"' . $this->id . '\" src=\"' . $this->getMediaPath() . '\">';\n case 'video':\n return '<iframe data-mediaid=\"' . $this->id . '\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen src=\"' . $this->getMediaPath() . '\"></iframe>';\n case 'embedvideo':\n return '<iframe data-mediaid=\"' . $this->id . '\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen src=\"' . $this->getMediaPath() . '\"></iframe>';\n default:\n return '<a data-mediaid=\"' . $this->id . '\" href=\"' . $this->getMediaPath() . '\">' . $this->name . '</a>';\n }\n }", "title": "" }, { "docid": "be235c351942c8274539d5aea4381404", "score": "0.49290577", "text": "public function createEpub(TransformModel $transform, array $options = null) \n {\n $epub = $this->converter;\n //if ((!isset($options['customOptions'])) && (!$options['customOptions']['html'])) { //if no html has been passed, transform the Word Document\n $html = strip_tags($transform->getDocumentHTML($options['src']), \"<p><script><style><span>\"); //an example of basic 'content cleansing'\n //} else {\n // $html = $options['customOptions']['html'];\n //}\n $epub->setTitle($options['options']['Title']); //setting specific options to the EPub library\n $epub->setIdentifier($options['options']['Identifier'], EPub::IDENTIFIER_URI); \n $epub->addChapter(\"Body\", \"Body.html\", $html);\n $epub->finalize();\n $zipData = $epub->sendBook(\"Example\");\n }", "title": "" }, { "docid": "e82264904f98e80ddf87a5ba31f8846b", "score": "0.49230328", "text": "public function render() {\n\n $str = \"\";\n $attributes = array();\n\n $str .= \"<\" . $this->tagname;\n\n\n foreach ($this as $att => $value) {\n\n $att = str_replace(\"_\", \"-\", $att);\n\n if ($att == \"tagname\" || $att == \"content\" || $att == \"atts\")\n continue;\n\n $attributes[$att] = $value;\n }\n\n foreach ($this->atts as $att => $value) {\n $attributes[$att] = $value;\n }\n\n foreach ($attributes as $att => $value) {\n $str .= $this->render_att($att, $value);\n }\n\n $str .= \">\";\n\n foreach ($this->content as $i => $value) {\n\n if ($value === NULL)\n continue;\n\n if ($value instanceOf Tag) {\n $str .= $value->render();\n } else {\n $str .= $value;\n }\n }\n\n if (sizeof($this->content) > 0 || $this->mustClose()) {\n $str .= '</' . $this->tagname . '>';\n }\n\n return $str;\n }", "title": "" }, { "docid": "167ab3b3784d34dd51fe7d9232c6934f", "score": "0.49226654", "text": "public function create()\n {\n return view('cms.tags.create');\n }", "title": "" }, { "docid": "0af09f4187757cbe625d9f560e8b9881", "score": "0.49178174", "text": "public function renderOpenTag(){\n\n if($this->hasTagName() === false){\n $this->log->debug(\"component \".$this->component->getId().\" has no tagname, ignoring\");\n return;\n }\n $tag = \"<\".$this->tagName.\" \";\n\n $attributes = $this->component->getAttributes();\n\n foreach(array_keys($attributes) as $attribute){\n $tag.=$attribute.\"=\\\"\".$attributes[$attribute].\"\\\" \";\n }\n $tag.=\">\";\n\n return $tag;\n }", "title": "" }, { "docid": "f93a4c4381849a9e9aa3c79ec21efcb9", "score": "0.49153134", "text": "private function getOpenTag()\n {\n $content = trim(\"{$this->tagname} \" . (string) $this->attributes);\n return \"<{$content}>\";\n }", "title": "" }, { "docid": "0feb6a89b7fc46bede63d225d6ea75cc", "score": "0.4901505", "text": "public function read()\n {\n // Set up some paths\n $paths = array(\n 'publicPath' => rtrim($_SERVER['DOCUMENT_ROOT'], '/') . '/',\n 'sysPath' => SYSPATH,\n 'pathThird' => PATH_THIRD,\n 'pathCache' => PATH_CACHE,\n 'pathTmpl' => PATH_TMPL,\n 'pathThirdThemes' => PATH_THIRD_THEMES\n );\n\n // Get template class\n /** @var \\EE_Template $tmpl */\n $tmpl = ee()->TMPL;\n\n // Fetch tag parameters\n $pathToFile = $tmpl->fetch_param('path_to_file');\n $basePath = $tmpl->fetch_param('base_path');\n\n // Set the basePath\n $basePath = isset($paths[$basePath]) ?\n $paths[$basePath] :\n $paths['publicPath'];\n\n // Normalize path to file\n $pathToFile = ltrim($pathToFile, '/');\n\n // Set full file path\n $fullFilePath = \"{$basePath}{$pathToFile}\";\n\n // Get file contents if it exists\n $fileContents = '';\n if (is_file($fullFilePath)) {\n $fileContents = file_get_contents($fullFilePath);\n }\n\n // Parse tag pair\n return $tmpl->parse_variables($tmpl->tagdata, array(array(\n 'contents' => $fileContents\n )));\n }", "title": "" }, { "docid": "8af4d2ead42fcbe662a7009dc7102e1b", "score": "0.49009052", "text": "public function generate()\n\t{\n\t\t$arrAttributes = array();\n\t\t$arrConfig = $this->arrConfiguration;\n\t\t$this->arrSliderConfig = $arrConfig['slider'];\n\n\t\t$arrAttributes['strId'] = $this->strId;\n\t\t$arrAttributes['strName'] = $this->strName;\n\n\t\tforeach ($this->arrSliderConfig as $key => $varConfig)\n\t\t{\n\t\t\tif ($varConfig != null && $varConfig != '')\n\t\t\t{\n\t\t\t\tswitch ($key)\n\t\t\t\t{\n\t\t\t\t\tcase 'min_callback' :\n\t\t\t\t\t\t$arrSliderConfig['min'] = $this->getConfigValue($varConfig);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'max_callback' :\n\t\t\t\t\t\t$arrSliderConfig['max'] = $this->getConfigValue($varConfig);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'value_callback' :\n\t\t\t\t\t\t$arrSliderConfig['value'] = $this->getConfigValue($varConfig);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'step_callback' :\n\t\t\t\t\t\t$arrSliderConfig['step'] = $this->getConfigValue($varConfig);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\t$arrSliderConfig[$key] = $varConfig;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$arrSliderConfig[$key] = 0;\n\t\t\t}\n\t\t}\n\n\t\t$arrSliderConfig['id'] = 'slider-' . $arrAttributes['strId'];\n\n\t\t$this->Template = new \\FrontendTemplate($this->strTemplate);\n\t\t$this->Template->setData($arrAttributes);\n\t\t$this->Template->slider = $arrSliderConfig;\n\n\t\treturn $this->Template->parse();\n\t}", "title": "" }, { "docid": "1ca7ab969e58cd4ed7b3f96386135fc0", "score": "0.48990023", "text": "public function ToVEvent() {\n \n $vevent = \"BEGIN:VEVENT\\r\\n\";\n $vevent .= \"CREATED:\" . Helper::GetUTCFormattedStringFromTimestamp($this->_creationdate) . \"\\r\\n\";\n $vevent .= \"LAST-MODIFIED:\" . Helper::GetUTCFormattedStringFromTimestamp($this->_lastmodified) . \"\\r\\n\";\n $vevent .= \"DTSTAMP:\" . Helper::GetUTCFormattedStringFromTimestamp($this->_dtstamp) . \"\\r\\n\";\n echo \"Going in:\" . $this->_dtstamp . \"<BR>\";\n $vevent .= \"UID:\" . $this->_uid . \"\\r\\n\";\n $vevent .= \"SUMMARY:\" . $this->_summary . \"\\r\\n\";\n if($this->_rrule != null && $this->_rrule != \"\") {\n $vevent .= \"RRULE:\" . $this->_rrule . \"\\r\\n\";\n }\n \n $vevent .= \"DTSTART;TZID=\" . $this->_timezone . \":\" . Helper::GetFormattedStringFromTimestamp($this->_startdate) . \"\\r\\n\";\n $vevent .= \"DTEND;TZID=\" . $this->_timezone . \":\" . Helper::GetFormattedStringFromTimestamp($this->_enddate) . \"\\r\\n\";\n echo \"Verify: \" . $this->_enddate . \"<BR>\";\n \n if($this->_location != null && $this->_location != \"\") {\n $vevent .= \"LOCATION:\" . $this->_location . \"\\r\\n\";\n }\n if($this->_description != null && $this->_description != \"\") {\n $vevent .= \"DESCRIPTION:\" . $this->_description . \"\\r\\n\";\n }\n $vevent .= \"END:VEVENT\\r\\n\";\n \n \n \n return $vevent; \n }", "title": "" }, { "docid": "57fad79799f539623361de3d8dd20882", "score": "0.48975587", "text": "private function createEventHTML($event){\n\t\t $venue_name = $event->getVenue();\n\t\t\t$title = $event->getTitle();\n\t\t\t$html = \"<span>{$title} @ {$venue_name}</span><br><br>\";\n\t\t\treturn $html;\n\t}", "title": "" }, { "docid": "90a91ca0be94058111cf0cb007b01b5e", "score": "0.48955935", "text": "function make_tag($tag, $content='', $attrs=array()){\n\t$html_void= array(\"area\", \"base\", \"br\", \"col\", \"command\", \"embed\", \"hr\", \"img\", \"input\", \"keygen\", \"link\", \"meta\", \"param\", \"source\", \"track\", \"wbr\");\n\t$mytag =''; \n\t$mytag ='<'.$tag;\n\tif (in_array($tag, $html_void)){\n\t\t$mytag .= ' />';\n\t\t}\n\telse {\n\t\t$mytag .= \">$content</$tag>\";\n\t\t}\n\treturn $mytag;\n\t}", "title": "" }, { "docid": "44a4b454cecf9c06f81b74317aa4bbbd", "score": "0.48954198", "text": "public function create()\n {\n return view('admin.tag.add');\n }", "title": "" }, { "docid": "7b1cfada85ff5ea93a11b6a13e718bcd", "score": "0.48933604", "text": "public function create()\n {\n //标签添加页面\n return view('admin.tag.create');\n }", "title": "" }, { "docid": "eded27898e2b62413a906995037f397e", "score": "0.48913336", "text": "public function __toString() {\n\t\t# Return content\n\t\treturn $this->render();\n\t}", "title": "" }, { "docid": "d8e68a0ad231362242b8968de9decba5", "score": "0.48907602", "text": "public function create() : ?string\n\t{\n\t\t$view = $this->getObject()->addData( $this->getView() );\n\t\t$siteid = $this->getContext()->getLocale()->getSiteId();\n\t\t$data = $view->param( 'price', [] );\n\n\t\tforeach( $data as $idx => $entry )\n\t\t{\n\t\t\t$data[$idx]['slider.lists.siteid'] = $siteid;\n\t\t\t$data[$idx]['price.siteid'] = $siteid;\n\t\t}\n\n\t\t$view->priceData = $data;\n\t\t$view->priceBody = '';\n\n\t\tforeach( $this->getSubClients() as $client ) {\n\t\t\t$view->priceBody .= $client->create();\n\t\t}\n\n\t\treturn $this->render( $view );\n\t}", "title": "" }, { "docid": "e383e4c7c02c096dfc53f90136a41ead", "score": "0.4888052", "text": "private function makeNode($tagName, $tagContent, $attributes = null) {\n // setup attributes\n $attrText = '';\n if (is_array($attributes))\n foreach ($attributes as $key => $value) \n $attrText .= \" $key=\\\"$value\\\"\";\n if (is_array($tagContent) && $this->version == RSS1)\n $attrText = ' rdf:parseType=\"Resource\"';\n $attrText .= (in_array($tagName, $this->CDATAEncoding) && $this->version == ATOM) ? ' type=\"html\"' : '';\n\n // setup content\n if ( empty($tagContent) ) {\n $nodeText = \"<{$tagName}{$attrText} />\";\n } else {\n $nodeText = (in_array($tagName, $this->CDATAEncoding)) ? \"<{$tagName}{$attrText}><![CDATA[\" : \"<{$tagName}{$attrText}>\";\n if (is_array($tagContent)) {\n foreach ($tagContent as $key => $value) \n $nodeText .= $this->makeNode($key, $value);\n } else {\n $nodeText .= (in_array($tagName, $this->CDATAEncoding)) ? $tagContent : htmlentities($tagContent);\n } \n $nodeText .= (in_array($tagName, $this->CDATAEncoding)) ? \"]]></$tagName>\" : \"</$tagName>\";\n }\n\n return $nodeText . PHP_EOL;\n }", "title": "" }, { "docid": "6b284dd3a343829ae90f116cba89b61e", "score": "0.48788413", "text": "public function create()\n {\n //\n $event = new Event;\n return view('events.create')->withEvent($event);\n }", "title": "" }, { "docid": "65edab50c7a9798f3fd610d0b7ee2e0e", "score": "0.4867683", "text": "public function createRun() {\n\t\t$data = array(\n\t\t\t'tags' => $this->get_tags()\n\t\t);\n\t\t$this->result_json = $this->_send('/run', $data);\n\t\t$this->result = json_decode($this->result_json);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "c53e3216bb024e1b6276530c08966ff3", "score": "0.48633963", "text": "public static function createxml($tag) {\n if (is_string($tag)) return htmlentities($tag);\n if (!is_array($tag)) throw new InvalidArgumentException(\"String::createtag() expects parameter 1 to be an array, \" . gettype($tag) . \" given\");\n \n $text = \"<\";\n if (array_key_exists(\"name\", $tag)) $text .= htmlentities($tag[\"name\"]);\n if (array_key_exists(\"attributes\", $tag) && is_array($tag[\"attributes\"]) && count($tag[\"attributes\"])) {\n $text .= \" \";\n $attributelist = array();\n foreach ($tag[\"attributes\"] as $name => $value) {\n array_push($attributelist, htmlentities($name) . '=\"' . htmlentities($value) . '\"');\n }\n $text .= implode(\" \", $attributelist);\n }\n if (array_key_exists(\"tag\", $tag)) {\n if (count($text) > 1) $text .= \" \";\n $text .= $tag[\"tag\"];\n }\n \n if (array_key_exists(\"contents\", $tag)) {\n $text .= \">\";\n \n if (!is_array($tag[\"contents\"])) $text .= $tag[\"contents\"];\n else {\n foreach ($tag[\"contents\"] as $itm) {\n $text .= self::createxml($itm);\n }\n }\n \n $text .= \"<\";\n if (array_key_exists(\"name\", $tag)) $text .= htmlentities($tag[\"name\"]);\n else if (array_key_exists(\"tag\", $tag)) {\n $exploded = explode(\" \", $tag[\"tag\"]);\n if (count($exploded)) $text .= $exploded[0];\n }\n $text .= \">\";\n } else $text .= \" />\";\n \n return $text;\n }", "title": "" }, { "docid": "0d72d293c3f38e238e620d7323839d68", "score": "0.4857559", "text": "public function generate() {\n\t\t// Loads an HTML string\n\t\t$this->render_content() ;\n\t\texit() ;\n\t}", "title": "" }, { "docid": "323fa73dfbc15b9790a6347caec2b188", "score": "0.4856752", "text": "public function __toString(){\n extract($this->vars); // extract our template variables ex: $value\n // print_r($this->vars ) ; testing\n ob_start(); // store as internal buffer\n\n include $this->template; // include the template into our file\n\n return ob_get_clean();\n }", "title": "" }, { "docid": "d6d3fe29e7691403efabe55428de4a4b", "score": "0.4849555", "text": "public function generate()\n {\n $strWidget = parent::generate();\n\n return $strWidget;\n }", "title": "" }, { "docid": "a3553260069f052ee77e3ca500e7f3db", "score": "0.4849303", "text": "public function ___render() {\n $content = $this->getContent();\n $script = $this->getScriptTag();\n $jsData = $this->getJsData();\n return \"<div class='RockMarkup2Output' $jsData>\" . $content.$script . \"</div>\";\n }", "title": "" }, { "docid": "e62fd385bec86dc62b16aafb8d836b92", "score": "0.48458642", "text": "public function create()\n {\n //\n return view('source.add');\n }", "title": "" } ]
9a5756edacb5f3a944d0bd3b1db79d66
Get related product IDs for given products.
[ { "docid": "8ef5d4e4f4e8b36adf506e4828bade7d", "score": "0.0", "text": "public function getRelations(array $products, int $linkType): array\r\n {\r\n //Links use real IDs for root products, we need to get them\r\n $actualIdField = $this->metadataPool->getMetadata(ProductInterface::class)->getLinkField();\r\n $hydrator = $this->hydratorPool->getHydrator(ProductInterface::class);\r\n /** @var ProductInterface[] $productsByActualIds */\r\n $productsByActualIds = [];\r\n foreach ($products as $product) {\r\n $productsByActualIds[$hydrator->extract($product)[$actualIdField]] = $product;\r\n }\r\n //Load all links\r\n /** @var Link $link */\r\n $link = $this->linkFactory->create(['data' => ['link_type_id' => $linkType]]);\r\n $collection = $link->getLinkCollection();\r\n $collection->addFieldToFilter('product_id', ['in' => array_keys($productsByActualIds)]);\r\n $collection->addLinkTypeIdFilter();\r\n\r\n //Prepare map\r\n $map = [];\r\n /** @var Link $item */\r\n foreach ($collection as $item) {\r\n $productId = $productsByActualIds[$item->getProductId()]->getId();\r\n if (!array_key_exists($productId, $map)) {\r\n $map[$productId] = [];\r\n }\r\n $map[$productId][] = $item->getLinkedProductId();\r\n }\r\n\r\n return $map;\r\n }", "title": "" } ]
[ { "docid": "3d8f27d510ee6d948070ddf0a6cb96b9", "score": "0.8118667", "text": "public function getRelatedProductIds()\n {\n if (!$this->hasRelatedProductIds()) {\n $ids = array();\n foreach ($this->getRelatedProducts() as $product) {\n $ids[] = $product->getId();\n }\n $this->setRelatedProductIds($ids);\n }\n return $this->getData('related_product_ids');\n }", "title": "" }, { "docid": "d231681986c0c7d79facfe9498937c83", "score": "0.7061717", "text": "public function availableProductIds($products)\n {\n $available_product_ids = $products->filter(function ($product) {\n return $product->available;\n })->pluck('id')->toArray();\n \n return $available_product_ids;\n }", "title": "" }, { "docid": "753be08ab39300a096ab0ebfab1099b7", "score": "0.6934339", "text": "public function getProductIds(): array\n {\n return $this->product_ids;\n }", "title": "" }, { "docid": "f272ff3dfd7fa97d768baa9668b49d15", "score": "0.6858265", "text": "public static function fetch_all_product_ids() {\r\n\t\t\tglobal $wpdb;\r\n\r\n\t\t\t$product_ids = $wpdb->get_results( \"SELECT ID FROM $wpdb->posts WHERE post_type = 'product' AND post_status = 'publish';\" );\r\n\r\n\t\t\treturn $product_ids;\r\n\t\t}", "title": "" }, { "docid": "2d25a731fc6a461d4576e2cbe2c2cdf4", "score": "0.68087995", "text": "public function relatedProductsAction()\n {\n $productId = Mage::app()->getRequest()->getParam('productId');\n $relatedProducts = [];\n\n if ($productId != null) {\n $product = Mage::getModel('catalog/product')->load($productId);\n $relatedProductsId = $product->getRelatedProductIds();\n foreach ($relatedProductsId as $relatedProductId) {\n $relatedProducts[] = Mage::getModel('catalog/product')->load($relatedProductId)->getData();\n }\n }\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($relatedProducts));\n $this->getResponse()->setHeader('Content-type', 'application/json');\n }", "title": "" }, { "docid": "fc15dd164cf9b6373cd418cfe8692306", "score": "0.67821944", "text": "private function _getCartProductIds()\n {\n if ($this->_products === null) {\n $this->_products = [];\n foreach ($this->getQuote()->getAllItems() as $quoteItem) {\n /* @var $quoteItem \\Magento\\Quote\\Model\\Quote\\Item */\n $product = $quoteItem->getProduct();\n $this->_products[] = $product->getEntityId();\n }\n }\n\n return $this->_products;\n }", "title": "" }, { "docid": "03a5cf54887e30d7612d9046dcb7f70a", "score": "0.6692", "text": "public function getRelatedProducts()\n {\n if (!$this->hasRelatedProducts()) {\n $products = array();\n $collection = $this->getRelatedProductCollection();\n foreach ($collection as $product) {\n $products[] = $product;\n }\n $this->setRelatedProducts($products);\n }\n return $this->getData('related_products');\n }", "title": "" }, { "docid": "1fe31f9c7905fd1d672de27fefe95395", "score": "0.6648828", "text": "protected function collect_product_identifiers() {\n\n\t\t// Get all the products stored as Events in tribe\n\t\t// with their associated identifiers (ISBN etc)\n\t\t$args = [\n\t\t\t'post_type'=> 'tribe_events',\n\t\t\t'post_status' => 'publish',\n\t\t\t'posts_per_page' => -1,\n\t\t\t'order' => 'ASC',\n\t\t\t'fields'\t=> 'ids',\n\t\t\t'meta_query' => [\n\t\t\t\t[ \n\t\t\t\t\t'key' => '_EventStartDate',\n\t\t\t\t\t'value' => (new DateTime())->format('Y-m-d H:i:s'),\n\t\t\t\t\t'compare' => '>=',\n\t\t\t\t],\n\t\t\t]\n\t\t]; \n\n\t\t$posts = get_posts( $args );\n\t\t$product_ids = [];\n\t\t\n\t\tforeach ( $posts as $post ) {\n\t\t\t$id = get_post_meta($post, 'amazon_identifier', true);\n\n\t\t\tif ( !empty($id) ) {\n\t\t\t\t$product_ids[$id] = $post;\n\t\t\t}\n\t\t}\n\n\t\treturn $product_ids;\n\t}", "title": "" }, { "docid": "774aec3ebc1d191faf73af39b2ebe42d", "score": "0.66076016", "text": "public function getProdIds() \n {\n return array_keys($this->_products);\n }", "title": "" }, { "docid": "5c6b7e0a6245e3449e30b7d54ced1060", "score": "0.6561591", "text": "public function getProductsId()\n {\n return $this->productsId;\n }", "title": "" }, { "docid": "e73c402594cddc3463c2c2e93495390c", "score": "0.65457386", "text": "public function getProducts()\n {\n foreach ($this->productIds as $id) {\n // Use a generator to save on memory/resources\n // load accounts from DB one at a time only when required\n yield (new ProductModel())->load($id);\n }\n }", "title": "" }, { "docid": "5b26ae0af85d1ab68be42c844e9c5493", "score": "0.64908725", "text": "public function products_ids_callback()\n {\n /**\n * Get products.\n */\n $products = new WP_Query(array(\n 'post_type' => $this->post_type,\n 'posts_per_page' => -1,\n 'post_status' => 'any',\n 'fields' => 'ids',\n ));\n\n /*\n * No products.\n */\n if (!$products->have_posts()) {\n return false;\n }\n\n /**\n * Prepare response.\n */\n $data = array(\n 'count' => $products->post_count,\n 'ids' => $products->posts,\n );\n\n /**\n * Response.\n */\n $response = rest_ensure_response($data);\n $response->set_status(200);\n\n return $response;\n }", "title": "" }, { "docid": "c1c5e3c2c0bc6da8beb9f78f74f4e29e", "score": "0.6442486", "text": "protected function getRefCatalogIds( array $productIds ) : array\n\t{\n\t\tif( empty( $productIds ) ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t$manager = \\Aimeos\\MShop::create( $this->getContext(), 'catalog' );\n\t\t$search = $manager->createSearch();\n\t\t$expr = [];\n\n\t\tforeach( $productIds as $id )\n\t\t{\n\t\t\t$func = $search->createFunction( 'catalog:has', ['product', 'default', $id] );\n\t\t\t$expr[] = $search->compare( '!=', $func, null );\n\t\t}\n\n\t\t$search->setConditions( $search->combine( '||', $expr ) );\n\t\treturn $manager->searchItems( $search )->keys()->toArray();\n\t}", "title": "" }, { "docid": "a26ff6683367f30b1a6d2538a08a88b2", "score": "0.64314806", "text": "protected function _getProcessedProductIds()\r\n {\r\n $maxLimit = $this->_getProductLimit();\r\n $orderBy = Mage::getStoreConfig('progos_partialindex/index/setOrder');\r\n $collection = Mage::getModel('partialindex/product_index')->getCollection()->distinct(true);\r\n $collection = $collection->getSelect()->reset(Zend_Db_Select::COLUMNS)->columns('product_id as product_id');\r\n //$collection = $collection->order('sort_order DESC');\r\n\r\n if($orderBy) {\r\n $collection = $collection->order('sort_order ASC');\r\n }\r\n else {\r\n $collection = $collection->order('sort_order DESC');\r\n }\r\n if($maxLimit > 0){\r\n $collection = $collection->limit($maxLimit);\r\n }\r\n\r\n $connection = $this->_getReadAdapter();\r\n return $connection->fetchCol($collection);\r\n }", "title": "" }, { "docid": "67277d8d1b0fea227aa780c46ff8447a", "score": "0.6391365", "text": "protected function getAllProductIds()\n {\n $om = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $connection = $om->get('Magento\\Framework\\App\\ResourceConnection')->getConnection();\n // TODO: use getTable()\n \n $visibilityAttrId = 99; // TODO: get it dynamically: visibility\n $select = $connection->select()\n ->from(['main_table' => 'catalog_product_entity'], ['entity_id'])\n ->join(\n 'catalog_product_entity_int as avisib',\n 'main_table.entity_id = avisib.entity_id AND avisib.attribute_id = '.$visibilityAttrId,\n []\n )\n ->where('avisib.value IN(?)', [\n \\Magento\\Catalog\\Model\\Product\\Visibility::VISIBILITY_IN_SEARCH,\n \\Magento\\Catalog\\Model\\Product\\Visibility::VISIBILITY_BOTH\n ]);\n \n return $connection->fetchCol($select);\n }", "title": "" }, { "docid": "c38c85f00fbe3c2a5995c241db5d91ff", "score": "0.63389444", "text": "protected function getConfigurableProductLinks()\n {\n if (!empty($this->fields['associated_product_ids'])) {\n return $this->fields['associated_product_ids'];\n }\n\n /** @var ConfigurableAttributesData $configurableAttributesData */\n $configurableAttributesData = $this->fixture->getDataFieldConfig('configurable_attributes_data')['source'];\n $associatedProductIds = [];\n\n $configurableAttributesData->generateProducts();\n foreach ($configurableAttributesData->getProducts() as $product) {\n $associatedProductIds[] = $product->getId();\n $this->fields['product']['attribute_set_id'] = $product->getDataFieldConfig('attribute_set_id')['source']\n ->getAttributeSet()->getAttributeSetId();\n }\n\n return $associatedProductIds;\n }", "title": "" }, { "docid": "e6eefa837a06db8227dbd311fbc0de78", "score": "0.63339186", "text": "protected function set_product_ids() {\n\n\t\t// get the products selected for the report\n\t\t$this->product_ids = isset( $_GET['product_ids'] ) ? array_filter( array_map( 'absint', (array) $_GET['product_ids'] ) ) : array();\n\t}", "title": "" }, { "docid": "0a2898457b7a2989fa3584a58befe647", "score": "0.6312454", "text": "public function getAllIds()\n {\n if (is_null($this->_allProductIds)) {\n if (!$this->isShuffled()) {\n $this->_allProductIds = array_keys($this->getItemCollection());\n return $this->_allProductIds;\n }\n\n $targetRuleProductIds = $this->_getTargetRuleProductIds();\n $linkProductCollection = $this->_getPreparedTargetLinkCollection();\n $linkProductIds = array();\n foreach ($linkProductCollection as $item) {\n $linkProductIds[] = $item->getEntityId();\n }\n $this->_allProductIds = array_unique(array_merge($targetRuleProductIds, $linkProductIds));\n shuffle($this->_allProductIds);\n }\n\n return $this->_allProductIds;\n }", "title": "" }, { "docid": "5882ae9999c5c0384c6506be92e59403", "score": "0.6297877", "text": "public function getAllRelatedProducts($product)\n {\n static $products = [];\n\n if (array_key_exists($product->id, $products)) {\n return $products[$product->id];\n }\n\n $products[$product->id] = [$product];\n\n if ($product->type == 'simple') {\n if ($product->parent_id) {\n $products[$product->id][] = $product->parent;\n }\n\n $products[$product->id] = array_merge(\n $products[$product->id],\n $this->getParentBundleProducts($product),\n $this->getParentGroupProducts($product)\n );\n } elseif ($product->type == 'configurable') {\n foreach ($product->variants as $variant) {\n $products[$product->id][] = $variant;\n }\n }\n\n return $products[$product->id];\n }", "title": "" }, { "docid": "a5b0c13a339a54168ab2b7b9cb405b77", "score": "0.6217172", "text": "public function getSelectedProducts()\n {\n if (!empty($this->object->products)) {\n $productsIds = explode('|', $this->object->products);\n $sql = 'SELECT p.`id_product`, p.`reference`, pl.`name`\n\t\t\t\tFROM `' . _DB_PREFIX_ . 'product` p\n\t\t\t\t' . Shop::addSqlAssociation('product', 'p') . '\n\t\t\t\tLEFT JOIN `' . _DB_PREFIX_ . 'product_lang` pl \n\t\t\t\t ON (p.`id_product` = pl.`id_product` ' . Shop::addSqlRestrictionOnLang('pl') . ')\n\t\t\t\tWHERE pl.`id_lang` = ' . (int)$this->context->language->id . '\n\t\t\t\tAND p.`id_product` IN (' . implode(',', $productsIds) . ')\n\t\t\t\tORDER BY FIELD(p.`id_product`, '.implode(',', $productsIds).')';\n\n return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);\n }\n\n return array();\n }", "title": "" }, { "docid": "4ce94e85a5cc693489064f86d7b9ce1a", "score": "0.6213217", "text": "public function get_related_productes($product_category_id, $chosen_product_id) {\n $this->db->select(array('product.product_id', 'product.name', 'product.url_slug', 'product.price', 'product.image'));\n $this->db->from('product');\n $this->db->join('product_category', 'product_category.product_category_id = product.product_category_id');\n $this->db->where(array('product.status' => 1, 'product.deleted' => 0, 'product_category.status' => 1, 'product_category.deleted' => 0, 'product.product_category_id' => $product_category_id, 'product_id !=' => $chosen_product_id));\n $this->db->limit(4);\n $this->db->order_by('rand()');\n\n return $this->db->get()->result_array();\n }", "title": "" }, { "docid": "530efa05882bb363afbb04d9f493f778", "score": "0.6180584", "text": "public function getCrossSellProductIds()\n {\n if (!$this->hasCrossSellProductIds()) {\n $ids = array();\n foreach ($this->getCrossSellProducts() as $product) {\n $ids[] = $product->getId();\n }\n $this->setCrossSellProductIds($ids);\n }\n return $this->getData('cross_sell_product_ids');\n }", "title": "" }, { "docid": "5723897fd0ce8ad48b3a8c6e645f5224", "score": "0.61717045", "text": "public function products()\n {\n if(empty($this->products)) {\n return Product::where('id',0);\n }\n $ids_ordered = implode(',', $this->products);\n return Product::whereIn('id', $this->products)\n ->orderByRaw(DB::raw(\"FIELD(id, $ids_ordered)\"));\n }", "title": "" }, { "docid": "4e7b306b7c35ebee8c1d65d0d6197daf", "score": "0.61490464", "text": "public function getRelatedIds()\n {\n $related = $this->getRelated ();\n $fullKey = $related->getQualifiedKeyName ();\n return $this->getQuery ()->select ( $fullKey )->lists ( $related->getKeyName () );\n }", "title": "" }, { "docid": "db3b42e6b4035485bac33d5056bae211", "score": "0.61162347", "text": "public function getIdentities()\n {\n $identities = [];\n foreach ($this->getChildProducts() as $item) {\n $identities = array_merge($identities, $item->getIdentities());\n }\n return $identities;\n }", "title": "" }, { "docid": "d33ca360675e055c65b4c5c6db4b1e67", "score": "0.61084384", "text": "public function getSimilarProducts()\n {\n if ($this->_oSimilarProducts === null) {\n $this->_oSimilarProducts = false;\n if ($oProduct = $this->getProduct()) {\n $this->_oSimilarProducts = $oProduct->getSimilarProducts();\n }\n }\n\n return $this->_oSimilarProducts;\n }", "title": "" }, { "docid": "c9b5f86e7f7416ee998742e3d9652911", "score": "0.610737", "text": "protected function _findRelatedProductTags($productId) {\n $productRelation = Mage::getResourceModel('catalog/product_relation');\n $writeConnection = Mage::getSingleton('core/resource')->getConnection('core_write');\n\n $childIds = array($productId);\n $tags = array(Brim_PageCache_Model_Engine::FPC_TAG . '_PRODUCT_' . $productId);\n do {\n // following product relations up the chain.\n $select = $writeConnection->select()\n ->from($productRelation->getMainTable(), array('parent_id'))\n ->where(\"child_id IN (?)\", $childIds);\n ;\n if (($childIds = $select->query()->fetchAll(Zend_Db::FETCH_COLUMN, 0))) {\n foreach ($childIds as $id) {\n $tags[] = Brim_PageCache_Model_Engine::FPC_TAG . '_PRODUCT_' . $id;\n }\n }\n } while($childIds != null);\n\n return $tags;\n }", "title": "" }, { "docid": "4bd7c1f0ff6fe86510598d507f454e9e", "score": "0.60972244", "text": "function edd_social_discounts_get_shared_product_ids() {\n\t// get all discount IDs\n\t$discounts = edd_get_discounts();\n\t$discount_ids = array();\n\t$share_ids = array();\n\t\n\tif ( $discounts ) {\n\t\tforeach ( $discounts as $discount ) {\n\t\t\t$discount_ids[] = $discount->ID;\n\t\t}\n\t}\n\n\tforeach ( $discount_ids as $id ) {\n\t\t$products = get_post_meta( $id, '_edd_discount_social_discount_products', true );\n\n\t\tif ( $products ) {\n\t\t\tforeach ($products as $product) {\n\t\t\t\tarray_push( $share_ids, $product );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (array) apply_filters( 'edd_social_discounts_get_share_array', $share_ids );\n}", "title": "" }, { "docid": "459a3ad1496610695b1c713fe067e208", "score": "0.6077453", "text": "public function get_related_products() {\n if('product' != get_post_type()) {\n\n // Get an array of the resource types\n\n // Query the relationship field on all 'products' associated with the current post type\n $return = get_posts(array(\n 'post_type' => 'product',\n 'suppress_filters' => 0,\n 'meta_query' => array(\n array(\n 'key' => get_post_type(), // name of custom field\n 'value' => '\"' . get_the_ID() . '\"', // matches exactly \"123\", not just 123. This prevents a match for \"1234\"\n 'compare' => 'LIKE'\n )\n )\n ));\n } else {\n $return = get_field('related_products');\n }\n return $return;\n }", "title": "" }, { "docid": "4a8b74568043fe6593a0d23eb6e8808d", "score": "0.6063951", "text": "public function get_products() {\n $product_ids = array();\n\n\t\tforeach ( $this->get_conditions() as $condition ) {\n\t\t\tif ( isset( $condition['product_ids'] ) && is_array( $condition['product_ids'] ) ) {\n\t\t\t\t$product_ids = array_merge( $product_ids, $condition['product_ids'] );\n\t\t\t}\n\t\t}\n\n\t\t$products = array();\n\t\tforeach ( $product_ids as $product_id ) {\n\t\t\t$product = wc_get_product( $product_id );\n\t\t\tif ( $product ) {\n\t\t\t\t$products[$product_id] = wp_kses_post( $product->get_formatted_name() );\n\t\t\t}\n\t\t}\n\n\t\treturn $products;\n }", "title": "" }, { "docid": "3d9815894c51346343fb705db5abe549", "score": "0.60577106", "text": "function relatedProducts($people_cat_id, $product_type_id, $product_id)\n\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t$sql= 'SELECT product. *\n\t\t\t\tFROM product\n\t\t\t\tJOIN product_people ON product_people.product_id = product.product_id\n\t\t\t\tWHERE product.product_type_id = '.$people_cat_id.'\n\t\t\t\tAND product_people.people_cat_id = '.$product_type_id.'\n\t\t\t\tAND product.product_id != '.$product_id.'\n\t\t\t\tORDER BY product.product_id DESC';\n\t\t\t\t\n\t\t\t\t$Q = $this-> db-> query($sql);\n\t\t\t\tforeach ($Q-> result_array() as $row){\n\t\t\t\t}\n\t\t\t\treturn $Q;\n\t\t\t\t\n\t\t\t\t}", "title": "" }, { "docid": "a9959919c8aa086e9ab223da82ce476f", "score": "0.6024965", "text": "private function get_convention_product_ids() : array {\n\t\t$all_convention_ids = get_transient( 'ghc-all-convention-variation-ids' );\n\t\tif ( false === $all_convention_ids ) {\n\t\t\t$all_convention_ids = $this->set_convention_variation_ids_transient();\n\t\t}\n\n\t\treturn $all_convention_ids;\n\t}", "title": "" }, { "docid": "f39ae2762c2cd7ef38a60ae4737476c3", "score": "0.5990915", "text": "public function related_products($product_id)\n\t{\n\t\t//retrieve all users\n\t\t$this->db->from('product, category, brand');\n\t\t$this->db->select('product.*, category.category_name, brand.brand_name');\n\t\t$this->db->where('product.category_id = category.category_id AND product.brand_id = brand.brand_id AND product.category_id = (SELECT category_id FROM product WHERE product_id = '.$product_id.') AND product.product_id != '.$product_id);\n\t\t$query = $this->db->get('', 10);\n\t\t\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "f251e90875572f25a48538f845debf80", "score": "0.59762704", "text": "public function getListOfProdsByIds($ids)\n {\n $ProductsArr = Product::whereIn('id', $ids)->get();\n\n return $ProductsArr;\n }", "title": "" }, { "docid": "3ee91b4a4b53b82e7f8624e31d1fd501", "score": "0.59759355", "text": "public function getSimilarProducts()\n {\n return $this->similar_products;\n }", "title": "" }, { "docid": "2b8ffe55a75de5da14e68e9717f6f7b2", "score": "0.5967535", "text": "function getProducts()\n {\n $db = $this->getPearDb();\n\n // The query is big, but it does use indexes. Anyway, the involved\n // tables almost never change, so we utilize MySQL's query cache\n $sql = \"(\n # User permissions\n SELECT DISTINCT pe_u.parameterValue AS productId\n FROM user u\n JOIN permission pe_u\n ON pe_u.doerId = u.id\n AND pe_u.allowed = '1'\n AND pe_u.actionId = 6 # 6 = use_product\n WHERE u.customerId = \" . $this->id . \"\n\n ) UNION (\n\n # Customer permissions\n SELECT DISTINCT pe_c.parameterValue AS productId\n FROM permission pe_c\n WHERE pe_c.doerId = \" . $this->id . \"\n AND pe_c.allowed = '1'\n AND pe_c.actionId = 6 # 6 = use_product\n\n ) UNION (\n\n SELECT productId\n FROM site s\n WHERE s.customerId = \" . $this->id . \"\n\n ) UNION (\n\n # Kollage is always on\n SELECT 1\n\n )\";\n $productIds = $db->getCol($sql);\n $productIds = array_filter(array_unique($productIds), 'intval');\n\n $product = new Vip_Product;\n $product->columnIn('id', $productIds);\n // Customer-specific products are only enabled for that customer.\n $product->addWhereSql('customerId IN (0, ' . $this->id . ')');\n $product->setOrderBySql('sortOrder,title');\n $products = $product->findAll();\n foreach ($products as $product) {\n $product->setCustomer($this);\n }\n\n return $products;\n }", "title": "" }, { "docid": "e061f59a0035c6c30ec6a8d7ef937753", "score": "0.59385246", "text": "public function getIdProduct()\n {\n return $this->idProduct;\n }", "title": "" }, { "docid": "e061f59a0035c6c30ec6a8d7ef937753", "score": "0.59385246", "text": "public function getIdProduct()\n {\n return $this->idProduct;\n }", "title": "" }, { "docid": "e061f59a0035c6c30ec6a8d7ef937753", "score": "0.59385246", "text": "public function getIdProduct()\n {\n return $this->idProduct;\n }", "title": "" }, { "docid": "23b13733b6b84c1e4db5c8116a83bc6a", "score": "0.59379303", "text": "public function products()\n {\n return $this->belongsToMany(\n Product::class,\n 'order_product',\n 'order_id',\n 'product_id'\n );\n }", "title": "" }, { "docid": "9177a3913021d82ca218c61c2248bf55", "score": "0.59320146", "text": "public function getRelatedProductsByChart()\r\n {\r\n $chartId = $this->getChart()->getId();\r\n return $this->getChart()->getRelatedProductsByChart($chartId);\r\n }", "title": "" }, { "docid": "7e06d3e23f7a9f39af642536fab75dce", "score": "0.5894464", "text": "public function config_ids_2($products)\n {\n $arr = array();\n\n if ($products) {\n foreach ($products as $item) {\n if ($item['type'] == 'config') {\n array_push($arr, $item['id']);\n }\n }\n\n if ($arr) {\n $rs = $this->db->distinct()\n ->select('parent_id')\n ->where_in('parent_id', $arr)\n ->get('product_configurable_link');\n\n if ($rs->num_rows()) {\n $rs = $rs->result_array();\n $result = array();\n\n foreach ($rs as $item) {\n array_push($result, $item['parent_id']);\n }\n\n return $result;\n }\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "ce5500ef3c5838efc76e75f2767b9203", "score": "0.5865616", "text": "public function products()\n {\n return $this->hasMany('App\\Models\\Product', 'gproduct_id', 'id');\n }", "title": "" }, { "docid": "06a67443e393bf2a33f28db91fcb37d1", "score": "0.58640635", "text": "public function getOrderIds() {\n\t\tif (!Mage::registry('current_product')) {\n\t\t\treturn;\n\t\t}\n\t\t$product_id = Mage::registry('current_product')->getId();\n\t\t$orderItems = Mage::getResourceModel('sales/order_item_collection')\n\t\t\t\t\t->addFieldToFilter('product_id', $product_id)\n\t\t\t\t\t->toArray(array('order_id'))\n\t\t\t\t\t;\n\t\t$orderIds = array_unique(array_map(\n\t\t\tfunction($orderItem) {\n\t\t\t\treturn $orderItem['order_id'];\n\t\t\t},\n\t\t\t$orderItems['items']\n\t\t));\n\t\treturn $orderItems;\n\t}", "title": "" }, { "docid": "d1318a651cedcc65c67669b6cee2535a", "score": "0.58522624", "text": "public function relatedProducts (){\n #reviews...\n $product= Product::with('reviews')\n ->whereIndumentariaId($this->indumentaria->id)\n ->where('id', '!=', $this->id)\n ->where('status', Product::PUBLISHED)\n ->latest()\n ->limit(6)\n ->get();\n return $product;\n }", "title": "" }, { "docid": "926464c8add8ee82c88e329e27d2cdd7", "score": "0.58275867", "text": "public function products() {\n\t\treturn $this->hasOne('App\\Product', 'id', 'product_id');\n\t}", "title": "" }, { "docid": "4c8e81f9bfb753b055329acf744ed2f2", "score": "0.58271444", "text": "public static function get_variation_ids($product)\n {\n $ids = array();\n if (isset($product['variations']) and !empty($product['variations'])) {\n foreach ($product['variations'] as $item) {\n $ids[] = $item['id'];\n }\n }\n\n return $ids;\n }", "title": "" }, { "docid": "1cad0f2c87339384bb42a7337d599dc1", "score": "0.58120126", "text": "function wcs_get_subscriptions_for_product( $product_ids, $fields = 'ids' ) {\n\tglobal $wpdb;\n\n\t// If we have an array of IDs, convert them to a comma separated list and sanatise them to make sure they're all integers\n\tif ( is_array( $product_ids ) ) {\n\t\t$ids_for_query = implode( \"', '\", array_map( 'absint', array_unique( array_filter( $product_ids ) ) ) );\n\t} else {\n\t\t$ids_for_query = absint( $product_ids );\n\t}\n\n\t$subscription_ids = $wpdb->get_col( \"\n\t\tSELECT DISTINCT order_items.order_id FROM {$wpdb->prefix}woocommerce_order_items as order_items\n\t\t\tLEFT JOIN {$wpdb->prefix}woocommerce_order_itemmeta AS itemmeta ON order_items.order_item_id = itemmeta.order_item_id\n\t\t\tLEFT JOIN {$wpdb->posts} AS posts ON order_items.order_id = posts.ID\n\t\tWHERE posts.post_type = 'shop_subscription'\n\t\t\tAND itemmeta.meta_value IN ( '\" . $ids_for_query . \"' )\n\t\t\tAND itemmeta.meta_key IN ( '_variation_id', '_product_id' )\"\n\t);\n\n\t$subscriptions = array();\n\n\tforeach ( $subscription_ids as $post_id ) {\n\t\t$subscriptions[ $post_id ] = ( 'ids' !== $fields ) ? wcs_get_subscription( $post_id ) : $post_id;\n\t}\n\n\treturn apply_filters( 'woocommerce_subscriptions_for_product', $subscriptions, $product_ids, $fields );\n}", "title": "" }, { "docid": "fd19268647820314922f3d9f0fc2f43f", "score": "0.5799099", "text": "public function setProductIds(array $product_ids): self\n {\n $this->product_ids = $product_ids;\n return $this;\n }", "title": "" }, { "docid": "21dbf9bb51d69ca6294ccd13c71218ea", "score": "0.578869", "text": "public function products()\n {\n return $this->hasMany('App\\Product', 'id');\n }", "title": "" }, { "docid": "4407e699f5e3aab37f2d9247f7ba8fe3", "score": "0.5784787", "text": "public static function count_product_ids() {\r\n\r\n\t\t\tif ( false === $count_product_ids = get_transient( 'cptpro_number_of_product_ids' ) ) {\r\n\r\n\t\t\t\t$count_product_ids = count( YIKES_Custom_Product_Tabs_Pro_Admin::fetch_all_product_ids() );\r\n\r\n\t\t\t\tset_transient( 'cptpro_number_of_product_ids', $count_product_ids, 10 * MINUTE_IN_SECONDS );\r\n\t\t\t}\r\n\r\n\t\t\treturn $count_product_ids;\r\n\t\t}", "title": "" }, { "docid": "ed9877a01f5c9f9dc8e2d35a5376d151", "score": "0.57785404", "text": "function woo_related_products_limit() {\n global $product;\n \n $args = array(\n 'post_type' => 'product',\n 'no_found_rows' => 1,\n 'posts_per_page' => 3,\n 'ignore_sticky_posts' => 1,\n 'orderby' => $orderby,\n 'post__in' => $related,\n 'post__not_in' => array($product->id)\n );\n return $args;\n}", "title": "" }, { "docid": "64cb30e5839c92c99363b961b60fe894", "score": "0.57783103", "text": "public function get_id_product()\n\t{\n\t\treturn $this->id_product;\n\t}", "title": "" }, { "docid": "c56d702e389fd6ae58247391366cc884", "score": "0.5772631", "text": "protected function get_product_reference_list () {\n global $_ud_license_updater;\n //echo \"<pre>\"; print_r( $_ud_license_updater ); echo \"</pre>\"; die();\n $response = array();\n if( \n isset( $_ud_license_updater[ $this->slug ] ) \n && is_callable( array( $_ud_license_updater[ $this->slug ], 'get_products' ) ) \n ) {\n $response = $_ud_license_updater[ $this->slug ]->get_products();\n }\n return $response;\n }", "title": "" }, { "docid": "8106a2811a467aec5da9a403321f5c76", "score": "0.5763081", "text": "public function relations()\n {\n return $this->belongsToMany(Product::class, 'product_relations', 'product_id', 'related_product_id')\n ->using(ProductRelation::class);\n }", "title": "" }, { "docid": "2144198954459a62de7587b38cdc71b0", "score": "0.5758901", "text": "public function products()\n {\n return $this->morphedByMany(Product::class, 'bundleable');\n }", "title": "" }, { "docid": "2861aee65ba00c25f8ebaebd7803d8ae", "score": "0.5745204", "text": "function get_product_ids($voucher_id)\n\t{\n\t\t$this->db->select('product_id');\n\t\t$this->db->where('voucher_id', $voucher_id);\n\t\t$res = $this->db->get('vouchers_products')->result_array();\n\n\t\t$list = array();\n\t\tforeach($res as $item)\n\t\t{\n\t\t\tarray_push($list, $item[\"product_id\"]);\t\n\t\t}\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "c22fc50adf1530bf1f02ee366c03ba50", "score": "0.57418925", "text": "public function products()\n {\n return $this->hasMany('App\\Core\\Catalog\\Entities\\Product', 'company_id', 'id');\n }", "title": "" }, { "docid": "e7d5f72e6c78400a43fdcf741161e4c9", "score": "0.57310134", "text": "public function products() {\n return $this->hasMany(Product::class, 'invoice_id', 'id');\n }", "title": "" }, { "docid": "35a186456dc8497f775e21ca30d6463a", "score": "0.57174146", "text": "public function getMatchingProductIds($rule, $product = null)\n {\n $qb = $this->productRepository->scopeQuery(function($query) use($rule, $product) {\n $qb = $query->distinct()\n ->addSelect('products.*')\n ->leftJoin('product_flat', 'products.id', '=', 'product_flat.product_id')\n ->leftJoin('channels', 'product_flat.channel', '=', 'channels.code')\n ->where('product_flat.status', 1)\n ->whereIn('channels.id', $rule->channels()->pluck('id')->toArray());\n\n if ($product)\n $qb->where('products.id', $product->id);\n\n if (! $rule->conditions)\n return $qb;\n\n $appliedAttributes = [];\n\n foreach ($rule->conditions as $condition) {\n if (! $condition['attribute']\n || ! isset($condition['value'])\n || is_null($condition['value'])\n || $condition['value'] == ''\n || in_array($condition['attribute'], $appliedAttributes))\n continue;\n \n $appliedAttributes[] = $condition['attribute'];\n\n $chunks = explode('|', $condition['attribute']);\n\n $qb = $this->addAttributeToSelect(end($chunks), $qb);\n }\n\n return $qb;\n });\n\n $validatedProductIds = [];\n\n foreach ($qb->get() as $product) {\n if ($this->validator->validate($rule, $product)) {\n if ($product->type == 'configurable') {\n $validatedProductIds = array_merge($validatedProductIds, $product->variants()->pluck('id')->toArray());\n } else {\n $validatedProductIds[] = $product->id;\n }\n }\n }\n\n return array_unique($validatedProductIds);\n }", "title": "" }, { "docid": "3daf2b8c78fe97e244aa7388e91c8cc5", "score": "0.5701837", "text": "public function getProductIds($coupon_id)\n {\n CI::db()->select('product_id');\n CI::db()->where('coupon_id', $coupon_id);\n $res = CI::db()->where('coupon_id', $coupon_id)->get('coupons_products')->result();\n\n $list = [];\n foreach($res as $item)\n {\n $list[] = $item->product_id;\n }\n return $list;\n }", "title": "" }, { "docid": "5fbc826e72a2a2816cbce951ad09fc04", "score": "0.56896985", "text": "public function getProducts()\n {\n return $this->products;\n }", "title": "" }, { "docid": "5fbc826e72a2a2816cbce951ad09fc04", "score": "0.56896985", "text": "public function getProducts()\n {\n return $this->products;\n }", "title": "" }, { "docid": "5fbc826e72a2a2816cbce951ad09fc04", "score": "0.56896985", "text": "public function getProducts()\n {\n return $this->products;\n }", "title": "" }, { "docid": "5fbc826e72a2a2816cbce951ad09fc04", "score": "0.56896985", "text": "public function getProducts()\n {\n return $this->products;\n }", "title": "" }, { "docid": "a7f457624afa58226164c18d0dbedcfd", "score": "0.568353", "text": "public function getProductIds()\n {\n $cartItems = $this->session->get('cart');\n if(empty($cartItems)){\n throw new \\Exception('The cart is empty!');\n }\n\n $cartProductIds = [];\n foreach ($cartItems as $cartItem) {\n $cartProductIds[] = $cartItem['product_id'];\n }\n\n return $cartProductIds;\n }", "title": "" }, { "docid": "bc9a39eac9dea39dd625378a0407ea2f", "score": "0.56762403", "text": "public function getCategsProdsIds($id_categ, $id_prod) {\n try{\n $relationid = DB::table('categs_prods')->where('id_categ', '=', $id_categ)->where('id_prod', '=', $id_prod)->get();\n return response()->json(['status' => 1, 'relations by id_categ AND id_prod' => $relationid]);\n } catch(\\Exception $e) {\n return response()->json(['status' => 0, 'relations by id_categ AND id_prod' => []], 500);\n }\n }", "title": "" }, { "docid": "81e392a98a99e9c5b2959e99e761f772", "score": "0.5665848", "text": "public function getIdentities()\n {\n $identities = [];\n foreach ($this->_getProductCollection() as $item) {\n $identities = array_merge($identities, $item->getIdentities());\n }\n\n return $identities;\n }", "title": "" }, { "docid": "7905960a8b4184366d2ea067ec24d43e", "score": "0.5663038", "text": "public function related_products($id)\n {\n if ($this->product->get($id)) {\n return response()->json(\n [\n 'related_products' => $this->product->related_products($id, 10),\n 'brands' => $this->brands->all('indexed'),\n 'categories' => $this->categories->all('indexed')\n ]\n );\n }\n }", "title": "" }, { "docid": "54d0ce613ba3e8ee710b4c60b80dbc93", "score": "0.56484455", "text": "public function products()\n {\n return $this->belongsToMany(Product::class, 'product_promotions');\n }", "title": "" }, { "docid": "fcae6bb5aee70a657f3ad6e525ba0d01", "score": "0.56336725", "text": "public function getProducts() {\n\n $dbData = new DBData();\n $array_products = [];\n foreach ($this->items as $item) {\n $array_products[] = $dbData->getProductDetails($item['id']);\n }\n return $array_products;\n }", "title": "" }, { "docid": "f5ae5f38c65eaace511eff3dd51d4d45", "score": "0.56278086", "text": "public function getId_product()\n {\n return $this->id_product;\n }", "title": "" }, { "docid": "6a51d25f11bb04a939e7d8da93604598", "score": "0.56177413", "text": "protected function _getTargetRuleProductIds($limit = null)\n {\n $excludeProductIds = $this->getExcludeProductIds();\n if (!is_null($this->_items)) {\n $excludeProductIds = array_merge(array_keys($this->_items), $excludeProductIds);\n }\n $indexModel = $this->_getTargetRuleIndex()\n ->setType($this->getProductListType())\n ->setProduct($this->getProduct())\n ->setExcludeProductIds($excludeProductIds);\n if (!is_null($limit)) {\n $indexModel->setLimit($limit);\n }\n\n return $indexModel->getProductIds();\n }", "title": "" }, { "docid": "2705135311cf78f8fe4420c28d585c0a", "score": "0.5613447", "text": "public function getMatchingProductForId($request);", "title": "" }, { "docid": "b481e73413841365122833b0cb4b46a9", "score": "0.5597771", "text": "public function relatedIdItems()\n {\n $query = Menu::find();\n if ($this->menuRelatedType != self::ALL_MENU_TYPES) {\n $query->andWhere(['type' => $this->menuRelatedType]);\n }\n if ($this->menuRelatedLevel != self::ALL_MENU_LEVELS) {\n $query->andWhere(['level' => $this->menuRelatedLevel]);\n }\n\n $relatedIdnotin = [];\n\n if ($this->relatedType == ArticleType::RELATE_MENU_UNIQUE) {\n $relatedIdnotin = ArticleRelate::find()->select('related_id')->where(['type_id' => ArticleType::RELATE_MENU_UNIQUE])->column();\n }\n\n // exclude related id for edit themself\n if ($this->scenario == self::SCENARIO_EDIT && $this->relatedId) {\n unset($relatedIdnotin[array_search($this->relatedId, $relatedIdnotin)]);\n }\n\n if ($relatedIdnotin) {\n $query->andWhere(['not in', 'id', $relatedIdnotin]);\n }\n\n $items = ArrayHelper::map($query->asArray()->all(), 'id', 'title');\n return $items;\n }", "title": "" }, { "docid": "3a899945788387c2de4b5c8b18e0e9b3", "score": "0.5595024", "text": "public function findUsersBoughtProduct($productId)\n {\n $result = array();\n \n $data = $this->defineFindUsersBoughtProductQuery($productId)->getResult();\n\n if ($data) {\n foreach ($data as $row) {\n $result[] = intval($row['profile_id']);\n }\n $result = array_unique($result);\n }\n\n return $result;\n }", "title": "" }, { "docid": "96029e6451b4b1751b62bd2a5ccdc4b3", "score": "0.55906", "text": "public function DetalleProductosPorId()\n\t{\n\t\tself::SetNames();\n\t\t$sql = \" SELECT * FROM productos INNER JOIN categorias ON productos.codcategoria = categorias.codcategoria LEFT JOIN proveedores ON productos.codproveedor=proveedores.codproveedor WHERE productos.codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\techo \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f8b9b941bf628520948a4782b7bc760c", "score": "0.55881894", "text": "public function getProdRelated()\n {\n return $this->prod_related;\n }", "title": "" }, { "docid": "3ec617347a244ac04a85869029a6c13f", "score": "0.55871075", "text": "function getRelatedProdsById($pId){\n\t\t$query = \"SELECT GROUP_CONCAT(DISTINCT relatedto_id ORDER BY relatedto_id ASC SEPARATOR ',') AS prodRelated, GROUP_CONCAT(DISTINCT relatedto_offerid ORDER BY relatedto_offerid ASC SEPARATOR ',') AS offerRelated FROM product_related WHERE `relatedfrom_id`=$pId\";\n\t\t//$data = mysql_query($query);\n\t\t//print_r($data);\n\t\t$result = $this->selectQueryForAssoc($query);\n\t\treturn $result;\t\n\t}", "title": "" }, { "docid": "b0089e51ee5745f709807548e1ed1a2a", "score": "0.55847013", "text": "public function getAllProductTypeIds()\n {\n if (!isset($this->_allProductTypeIds)) {\n $this->_allProductTypeIds = [];\n\n foreach ($this->getAllProductTypes() as $productType) {\n $this->_allProductTypeIds[] = $productType->id;\n }\n }\n\n return $this->_allProductTypeIds;\n }", "title": "" }, { "docid": "fb75362a9b9ccdcb4de62898bf0efad2", "score": "0.55834645", "text": "public function populate_stocks($products) {\n\n foreach($products as &$p) {\n $this->db->select('s.id, s.name, st.stock');\n $this->db->from('stores AS s');\n $this->db->join('stocks AS st', 's.id = st.store_id', 'left');\n $this->db->where('st.products_id', $p->id);\n $p->stocks = $this->db->get()->result();\n }\n\n return $products;\n }", "title": "" }, { "docid": "2833823e6e2a424b2d663954bee8d119", "score": "0.55797184", "text": "public function getProducts()\n {\n return $this->products;\n }", "title": "" }, { "docid": "3821c692b7c6edf80fa348e7a759e9bc", "score": "0.55733263", "text": "public function relatedproducts($typeids = array(), $type = NULL){\n \t$relatedproducts = array();\n global $base_url;\n switch ($type) {\n \tcase 'cat':\n \t\tbreak;\n \t\n \tdefault:\n\t\t if (!empty($typeids)) {\n\t\t $product_ids = array();\n\t\t $products = \\Drupal::database()->select('node__field_product_reference', 'frc');\n\t\t $products->join('node_field_data','nfd','nfd.nid=frc.entity_id');\n\t\t //$products->leftjoin('node__field_product_type', 'fpt', 'fpt.entity_id=frc.field_product_reference_target_id');\n\t\t $products->leftjoin('node__field_category', 'nfc', 'nfc.entity_id=frc.field_product_reference_target_id');\n\t\t $products->fields('frc', array('field_product_reference_target_id'));\n\t\t $products->condition('frc.entity_id', $typeids, 'IN');\n\t\t $products->condition('nfd.status', 1);\n\t\t //$products->orderBy('fpt.field_product_type_value', 'ASC');\n\t\t $products->orderBy('nfc.field_category_target_id', 'ASC');\n\t\t $products_id = $products->execute()->fetchAll();\n\t\t foreach ($products_id as $pid) {\n\t\t $product_ids[$pid->field_product_reference_target_id] = $pid->field_product_reference_target_id;\n\t\t }\n\t\t \n\t\t $product_ids = array_unique($product_ids);\n\t\t //print_r($product_ids);\n\t\t $product_counter = count($product_ids);\n\n\t\t\t\t\tif (!empty($product_ids)) {\n\t\t foreach ($product_ids as $productid) { \n\t\t $proimg =''; \n\t\t $nodeload = Node::load($productid); \n\t\t $product_image = \\Drupal\\image\\Entity\\ImageStyle::load('related_products')->buildUrl($nodeload->field_banner_image->entity->getFileUri());\n\t\t if ($nodeload->get('field_select_series')->target_id != '') {\n\t\t $serieslink = $nodeload->get('field_select_series')->target_id;\n\n\t\t } else {\n\t\t $serieslink = $nodeload->id();\n\t\t }\n\t\t $alias = \\Drupal::service('path.alias_manager')->getAliasByPath('/node/' . $serieslink);\n\t\t if(($nodeload->get('field_product_type')->value!='2') && ($nodeload->get('field_product_type')->value!='4')){ //2 for assay kits, 4=labware\n\t\t $proimg = $product_image;\n\t\t }\n\t\t $relatedproducts[$productid]['nodeid'] = $serieslink;\n\t\t $relatedproducts[$productid]['title'] = $nodeload->getTitle(); \n\t\t $relatedproducts[$productid]['body'] = trim_text($nodeload->get('field_product_summary')->value, $length = 100, $ellipses = true, $strip_html = true);\n\t\t $relatedproducts[$productid]['productalias'] = $base_url.$alias;\n\t\t $relatedproducts[$productid]['product_image'] = $proimg;\n\t\t }\n\t\t }\n\t\t \treturn $relatedproducts;\n\t\t } \n \t\tbreak;\n }\n }", "title": "" }, { "docid": "067db04f3fe5eb53ed879eb02ecf9a32", "score": "0.55688363", "text": "public function getProductReviews()\n {\n return $this->hasMany(ProductReview::className(), ['review_uuid' => 'uuid']);\n }", "title": "" }, { "docid": "b95de9de2ef5e8d33adc53e6a22bfd9e", "score": "0.5566281", "text": "public function products()\n {\n return $this->morphedByMany('App\\Models\\Product', 'taggable');\n }", "title": "" }, { "docid": "6b66c9ccda39e8b322ca9af5383019d4", "score": "0.55616724", "text": "function custom_numberpro_related_products_args( $args ) {\n\tglobal $sh_option;\n\t$args['posts_per_page'] = $sh_option['number-product-related']; // number related products\n\t// $args['columns'] \t= 2; // arranged in number columns\n\treturn $args;\n}", "title": "" }, { "docid": "dc7ab8c4ff4bed6cc8189f26ca3b32ae", "score": "0.5560764", "text": "public function products()\n {\n return $this->belongsToMany(Product::class);\n }", "title": "" }, { "docid": "dc7ab8c4ff4bed6cc8189f26ca3b32ae", "score": "0.5560764", "text": "public function products()\n {\n return $this->belongsToMany(Product::class);\n }", "title": "" }, { "docid": "dc7ab8c4ff4bed6cc8189f26ca3b32ae", "score": "0.5560764", "text": "public function products()\n {\n return $this->belongsToMany(Product::class);\n }", "title": "" }, { "docid": "dc7ab8c4ff4bed6cc8189f26ca3b32ae", "score": "0.5560764", "text": "public function products()\n {\n return $this->belongsToMany(Product::class);\n }", "title": "" }, { "docid": "df91bdfb19912fd8e0c8dc1f9cc768ef", "score": "0.5559483", "text": "private function getOldProductIds($shopId) {\n \n return $this->_Product->find('list', array(\n 'conditions' => array('Product.shop_id' => $shopId),\n 'fields' => array('id'),\n 'cache' => false\n ));\n }", "title": "" }, { "docid": "5773f9aea4eb378f171dd879731d0041", "score": "0.5555876", "text": "public function getSimilarRecommListIds()\n {\n if ($this->_aSimilarRecommListIds === null) {\n $this->_aSimilarRecommListIds = false;\n\n if ($oProduct = $this->getProduct()) {\n $this->_aSimilarRecommListIds = array($oProduct->getId());\n }\n }\n\n return $this->_aSimilarRecommListIds;\n }", "title": "" }, { "docid": "b9702d5a1859530d8a1f3919b172eb08", "score": "0.55550563", "text": "public function afterGetIdentities(Product $subject, array $identities): array\n {\n foreach ($this->configurableType->getParentIdsByChild($subject->getId()) as $parentId) {\n $parentProduct = $this->productRepository->getById($parentId);\n $identities = array_merge($identities, $parentProduct->getIdentities());\n }\n\n return array_unique($identities);\n }", "title": "" }, { "docid": "168273d6118813e1fc38095cb0647065", "score": "0.5554244", "text": "public function products()\n {\n return $this->morphedByMany(Product::class, 'categorables');\n }", "title": "" }, { "docid": "5e86e35a38de1066c2d5aac213c30dfa", "score": "0.5548713", "text": "protected function _getTargetRuleProducts()\n {\n $limit = $this->getPositionLimit();\n\n $productIds = $this->_getTargetRuleProductIds($limit);\n\n $items = array();\n if ($productIds) {\n /** @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection */\n $collection = Mage::getResourceModel('catalog/product_collection');\n $collection->addFieldToFilter('entity_id', array('in' => $productIds));\n $this->_addProductAttributesAndPrices($collection);\n\n $collection->setFlag('is_link_collection', true);\n Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection);\n $collection->setPageSize($limit)->setFlag('do_not_use_category_id', true);\n foreach ($collection as $item) {\n $items[$item->getEntityId()] = $item;\n }\n }\n\n return $items;\n }", "title": "" }, { "docid": "0992e8e4bbd92767d07ce37f973628c3", "score": "0.5530835", "text": "public function get_products()\n {\n return $this->belongsToMany('App\\Product')->orderBy('id', 'desc')->take(6);\n }", "title": "" }, { "docid": "da7092bfb9f3c873f2803c25e1435e7d", "score": "0.5530046", "text": "public function get_product_id() : array {\n\t\tif ( ! empty( $this->product_id ) ) {\n\t\t\treturn [ 'ID' => $this->product_id ];\n\t\t}\n\n\t\tpreg_match( '/runParams\\.productId=\"(.*?)\";/s', $this->request, $matches );\n\t\tif ( empty( $matches[1] ) ) {\n\t\t\treturn [ 'ID' => '' ];\n\t\t}\n\n\t\t$this->product_id = $matches[1];\n\n\t\treturn [ 'ID' => $matches[1] ];\n\t}", "title": "" }, { "docid": "6059bd36490908ea27de2d4e0f895203", "score": "0.55297214", "text": "public function getProducts()\n {\n return $this->_products;\n }", "title": "" }, { "docid": "e74f53d2ad4b5fb720a54da69841a25e", "score": "0.5526579", "text": "public function getProductIds($sku)\n\t{\n\t\t$tname=$this->tablename(\"catalog_product_entity\");\n\t\t$result=$this->selectAll(\n\t\t\"SELECT sku,entity_id as pid,attribute_set_id as asid FROM $tname WHERE sku=?\",\n\t\t$sku);\n\t\tif(count($result)>0)\n\t\t{\n\t\t\treturn $result[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "a3233fc96fdd3a02b990f89a91eef81c", "score": "0.5525833", "text": "public function ProductosPorId()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM productos INNER JOIN categorias ON productos.codcategoria = categorias.codcategoria LEFT JOIN proveedores ON productos.codproveedor=proveedores.codproveedor WHERE productos.codproducto = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "title": "" }, { "docid": "07a978cfd92a079708307d80bb194810", "score": "0.5523308", "text": "protected function products()\r\n {\r\n return $this->hasMany('App\\Models\\Product');\r\n }", "title": "" } ]
643ffc2a2e58007d5904a03bb90ef8c8
Push an Index onto the index stack
[ { "docid": "1ba57296f1e9a9da92318f1473094c5c", "score": "0.72031915", "text": "public function pushIndex($index): void\n {\n $this->index[] = $index;\n }", "title": "" } ]
[ { "docid": "6b31ef5ef6d6323ded8afaff69f649e1", "score": "0.63445127", "text": "public function pushStack() {\n\t\t$this->_stacks[] = $this->_stack;\n\t\t$this->_stack_tops[] = $this->_top;\n\t\t\n\t\t$this->_stack = array();\n\t\t$this->_top = -1;\n\t}", "title": "" }, { "docid": "48c6a8f5e1e024c814415c4bb97952f1", "score": "0.6169074", "text": "public function insert(int $index, $value): void;", "title": "" }, { "docid": "060751094482a470d294ae23b671a724", "score": "0.6012651", "text": "public function add($index, $newval) {}", "title": "" }, { "docid": "3d9d8d233b1dc3479f3069bf9647198d", "score": "0.5854545", "text": "public function into(string $index): self;", "title": "" }, { "docid": "44146fdd225662f46858ee54d6e1ef76", "score": "0.5676273", "text": "function insert($index, $item);", "title": "" }, { "docid": "dfdd22672317f9227b45a06df7ffa7b1", "score": "0.56694454", "text": "public function pushOffset(int $count);", "title": "" }, { "docid": "53a96b908a86697b0c25ec0ed02a4599", "score": "0.5657548", "text": "public function pushHeadToStackOfOpenElements()\n {\n $this->stackOfOpenElements->add($this->getHeadPointer());\n }", "title": "" }, { "docid": "fe2f79dc9b1aac8287c6682b36d12a15", "score": "0.5638964", "text": "public function setIndex($index);", "title": "" }, { "docid": "f368d6bc54a57fc13f69c761ea5ccde7", "score": "0.5633686", "text": "public function addChild(self $node, $index = NULL);", "title": "" }, { "docid": "5669f4e50363de71861fc89f0179edf8", "score": "0.56304085", "text": "public function at($index);", "title": "" }, { "docid": "27a2b703e91a80e92a6f3d7a5e3dcdf7", "score": "0.5604768", "text": "public function add($param,$index = null) {\n if($index == null)\n {\n $this->data[$this->size] = $param; \n $this->size++;\n }\n else\n {\n for($i = $this->size; $i > $index; $i--)\n {\n $this->data[$i] = $this->data[$i - 1];\n }\n $this->data[$index] = $param;\n }\n }", "title": "" }, { "docid": "bb1c6a56adfe8726b5db96993207fe99", "score": "0.55726147", "text": "public function push($val) {\n\t\t$this->_stack[] = $val;\n\t\t$this->_top++;\n\t}", "title": "" }, { "docid": "d211040a2e0c5be348f6cdd0b3a021ba", "score": "0.5562538", "text": "function push($x)\n {\n $this->stackIn->push($x);\n }", "title": "" }, { "docid": "64336e6ea7e91329e161395799aec36e", "score": "0.55119056", "text": "public function push();", "title": "" }, { "docid": "ce793f295d10672b5f0996aaf57e4c5f", "score": "0.54341155", "text": "public function lIndex($key, $index) {}", "title": "" }, { "docid": "79d3b99808a619cc1034b272af103898", "score": "0.5394253", "text": "public function pushIndexSettings(array $settings, Index $index = null, $indexName = null): array;", "title": "" }, { "docid": "3d6fb61471dd349aa134efc1451a6ac7", "score": "0.5319426", "text": "public function push(Shop $shop, array $data, $indexName): bool;", "title": "" }, { "docid": "dc6cec5ce0e1cc016fa2f79d3cbc7c71", "score": "0.5318479", "text": "public function pushToken() \n {\n array_push($this->tokenStack, array($this->type, $this->token));\n }", "title": "" }, { "docid": "d8e9c6993c7effdccc804dd0b124e946", "score": "0.5281833", "text": "public function add($index, $newval)\n {\n $this->validateIndex($index);\n\n if (0 === $index) {\n $this->unshift($newval);\n return;\n }\n\n $node = new Node($index, $newval);\n $prevNode = $this->getNodeWithIndex($index - 1);\n $targetNode = $prevNode->next();\n\n $prevNode->add($node);\n $node->add($targetNode);\n $this->count++;\n $this->reindexList();\n }", "title": "" }, { "docid": "fb56ab43ca20b0fc277710314f33c06a", "score": "0.52339005", "text": "public function lIndex($key, $index) { }", "title": "" }, { "docid": "917243ed6e2fe98879811204603cbcae", "score": "0.5221911", "text": "public function add($item,$index = 0)\n {\n \n if($index == 0)\n {\n $this->addFirst($item);\n }\n else\n {\n $this->addAfter($this->getNode($index-1), $item);\n }\n }", "title": "" }, { "docid": "63dc0e03989525931e25c3eeaf19954b", "score": "0.5204561", "text": "public function Insert(tx_icslibnavitia_Node $item, $index);", "title": "" }, { "docid": "1c762184b9ea52e59f1e73ee9b5c9245", "score": "0.5197023", "text": "public function setIndex(IndexInterface $index);", "title": "" }, { "docid": "1bd6dd27bd87ca1dc21f1cfaf593b0c9", "score": "0.519366", "text": "public function push($el)\n\t{\n\t\tif($this->isLimit()) {\n\t\t\tthrow new Exception(\"Stack size are reaching limit\");\n\t\t}\n\n\t\treturn array_unshift($this->stack,$el);\n\t}", "title": "" }, { "docid": "0560a6de34eaae57e9d3e8cededfe232", "score": "0.51910186", "text": "protected function push($element)\n {\n try\n {\n if (count($this->stack) < $this->limit)\n {\n array_unshift($this->stack, $element);\n }\n else\n {\n throw new \\RunTimeException('Cannot add element to stack');\n }\n }\n catch (\\RunTimeException $e)\n {\n echo $e->getMessage();\n }\n\n }", "title": "" }, { "docid": "ac6cceb365fdfd50de0ad5b476c14b70", "score": "0.5184679", "text": "function bbcode_array_push(&$stack, $value)\n{\n $stack[] = $value;\n return(sizeof($stack));\n}", "title": "" }, { "docid": "62013a3fa3fd9e97f539cfb44f2c582c", "score": "0.5183055", "text": "function addAtIndex($index, $val) {\n $node = $this->getNodeAtIndex($index);\n if ($node === -1) {\n return;\n }\n $newNode = new MyListNode($node, $node->prev, $val);\n $node->prev->next = $newNode;\n $node->prev = $newNode;\n $this->length++;\n }", "title": "" }, { "docid": "23fcf0c5285bce03d908182af07a26ad", "score": "0.51493096", "text": "public function initIndex() {}", "title": "" }, { "docid": "f79d3caeed2c65fbf3615c575d0e4c31", "score": "0.51282203", "text": "public function item(int $index);", "title": "" }, { "docid": "bf885bd0b0c53961b8514649a0fbad17", "score": "0.51282084", "text": "public function insertAt($index, $item)\n\t{\n\t\t$this->collapseDiscardInvalid();\n\t\t$this->scrubWeakReferences();\n\t\tif (is_object($item)) {\n\t\t\t$this->weakCustomAdd($item);\n\t\t}\n\t\t$this->filterItemForInput($item);\n\t\tparent::insertAt($index, $item);\n\t}", "title": "" }, { "docid": "335c856999a63e30d14ba981b91ac06d", "score": "0.5120809", "text": "public function setIndex($index) {\n\t\t$this->currentToken = (integer) $index;\n\t}", "title": "" }, { "docid": "6f77d09a79cce3bf1455355ac12cc37c", "score": "0.51159394", "text": "function push($entry);", "title": "" }, { "docid": "3699c0dc2edcfaf25df0fb48c7b5c4f0", "score": "0.50836337", "text": "public function addSegment1Index($index) {\n\t\t$s = new Segment($this->context);\n\t\tarray_splice($this->segments, $index, 0, array($s));\n\t\treturn $s;\n\t}", "title": "" }, { "docid": "d42b8b9a4f281f04b932d339019daf4e", "score": "0.5079915", "text": "function push($item);", "title": "" }, { "docid": "cdab15d1e52a6f4147d94b39b645b86f", "score": "0.50783837", "text": "public function insert(int $index, $middleware, array $options = []): self\n {\n return $this->insertAt($index, $middleware, $options);\n }", "title": "" }, { "docid": "3b310da446d1b71fcaaa9829fb396999", "score": "0.5040309", "text": "public function __invoke(string $index): array;", "title": "" }, { "docid": "adbde5cf32e45398d1902cf396919ad9", "score": "0.5040286", "text": "protected function doIndexAdd(AbstractIndex $index)\n {\n $this->driver->statement(\"CREATE {$index->sqlStatement()}\");\n }", "title": "" }, { "docid": "5a056b097e51399b1a44018764c04550", "score": "0.503889", "text": "function add($object, $index = -1)\n {\n if (is_integer($index) && $index >= 0) {\n $this->map[$index] = $object;\n } else {\n $this->map[] = $object;\n }\n\n return $this;\n }", "title": "" }, { "docid": "1204f878056ad4f9893b0137a3b4a0c6", "score": "0.50338435", "text": "public function getIndexShift();", "title": "" }, { "docid": "80fa814d329f733507d756168fe48d22", "score": "0.50270236", "text": "public function push($item) {\n\t\t\tif (count($this->stack) < $this->limit) {\n // prepend item to the start of the array\n\t\t\t\tarray_unshift($this->stack, $item);\n\t\t\t} else {\n \t// throw error exception if the limited of stack are full\n\t\t\t\tthrow new RunTimeException('Stack is full!');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8a8672a001a967827baf244cefff89af", "score": "0.50235045", "text": "function regNewEntry($k, $index) {\n\t\tif (! is_array ( $this->wizard->wizArray [$k] [$index] )) {\n\t\t\t$this->wizard->wizArray [$k] [$index] = array ();\n\t\t}\n\t}", "title": "" }, { "docid": "0acd6adcedd8b0b3a51d43d81c9a2beb", "score": "0.49975315", "text": "public function addIndex( $type, $name, $property );", "title": "" }, { "docid": "6b4c0a44bb71d7bcc277b11fce01b57b", "score": "0.49908328", "text": "public function push( int $v ) : self {\n $this->gotoEnd()->write( $v );\n $this->length++;\n return $this;\n }", "title": "" }, { "docid": "2acb1250868a8c5b75f8db56010760b6", "score": "0.4987053", "text": "abstract function addIndex($idxname, $idxType, $tablename, $colList);", "title": "" }, { "docid": "5e478a7826075b908d680d0c3946ec28", "score": "0.49824545", "text": "public function push($data)\n\t{\n\t\ttry {\n\t\t\tif(!$this->is_full()){\n\t\t\t\t$this->top++;\n\t\t\t\t$this->stack[$this->top]=$data;\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\techo $e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "64108bc4fe3a8bda12a14dd5875b8d3b", "score": "0.49762014", "text": "public function push($element);", "title": "" }, { "docid": "4713e24d09e861141b5e2f25b5ca76c2", "score": "0.49726433", "text": "public function insertAt(int $index, $middleware)\n {\n array_splice($this->queue, $index, 0, [$middleware]);\n\n return $this;\n }", "title": "" }, { "docid": "9da587b1b127f64fd9977e7b7e00994c", "score": "0.49688628", "text": "function insert(int $index, ...$values): void\n {\n if ($values) {\n array_splice($this->values, $index, 0, $values);\n }\n }", "title": "" }, { "docid": "4e5091e687c39e726c7878c141688a6e", "score": "0.49683374", "text": "public function setIndex($var)\n {\n GPBUtil::checkUint32($var);\n $this->index = $var;\n\n return $this;\n }", "title": "" }, { "docid": "9b824ee0e6cce72684a4ad34e1259653", "score": "0.4961422", "text": "public function addEntryWithPosition($document, int $position): IndexInterface;", "title": "" }, { "docid": "b1d03e20e07eddebd0e0db05cff8588e", "score": "0.49328855", "text": "public function insert($index, $value) {\n\t\t\n\t\tif($this->_ReadOnly){\n\t\t\tthrow new ReadOnlyException(\\get_called_class() . ' is read only');\n\t\t}\n\t\t\n\t\t//Permit 0-index insertion\n\t\tif(!$this->offsetExists($index)){\n\t\t\tthrow new \\OutOfRangeException('$index is invalid');\n\t\t}\n\t\t\n\t\t\\array_splice($this->_Arr, $index, 0, array($value));\n\t\t\n\t\treturn $this;\n\t\t\n\t}", "title": "" }, { "docid": "e960f9deec77766913149a0d869203ba", "score": "0.48724133", "text": "public function buildAstArrayIndexExpression();", "title": "" }, { "docid": "abea1123d5b3abf59b0f4f1809e4ce7e", "score": "0.48669732", "text": "public function push( $values ) {\n\t\t\t$original = $this->top();\n\t\t\t$values += $original;\n\t\t\tparent::push( $values );\n\t\t}", "title": "" }, { "docid": "5c4170fd62959a2031fd993b7889075b", "score": "0.48664838", "text": "abstract public function addIndex($idxname, $idxType, $tablename, $colList);", "title": "" }, { "docid": "4d1fc9e32905c0effe8b201ddfdb3bd7", "score": "0.48655945", "text": "public function push ($value) {}", "title": "" }, { "docid": "4cea85506251d3799cde2e9a7cfc07c3", "score": "0.48614866", "text": "function push_context ()\n {\n if (!isset ($this->context_stack)) {\n\t $this->context_stack = array ();\n\t $this->dirtype_stack = array ();\n }\n\n array_push ($this->context_stack, $this->parent_context);\n array_push ($this->dirtype_stack, $this->parent_dirtype);\n\n $this->parent_context = $this->context;\n $this->parent_dirtype = $this->dirtype;\n }", "title": "" }, { "docid": "36346d0015317a190136cef3b8cd6607", "score": "0.48603526", "text": "public static function at(int $index): \\PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtIndex {}", "title": "" }, { "docid": "6efe3d92bbd12e1abaab0b1ef6189621", "score": "0.48506328", "text": "public function push($value): void\n {\n $this->stack[] = $value;\n }", "title": "" }, { "docid": "0a830a77fbfda28b43efeacb5b5c9391", "score": "0.48241314", "text": "public function set($index, $item);", "title": "" }, { "docid": "694da843c553c917da6c49b8bb0a620f", "score": "0.48233536", "text": "abstract public function item($index);", "title": "" }, { "docid": "eb5bec2d090ca3e1980d1e34c4f29413", "score": "0.4822439", "text": "public function push(Token $token)\n {\n array_push($this->stack, $token);\n }", "title": "" }, { "docid": "1e0970de0c42d258a9119e254a04ed2e", "score": "0.48212168", "text": "function regNewEntry($k, $index) {\n\t\tif (!is_array($this->wizard->wizArray[$k][$index])) {\n\t\t\t$this->wizard->wizArray[$k][$index] = array();\n\t\t}\n\t}", "title": "" }, { "docid": "2275f8bc440bd35686a9db5e5f6264ab", "score": "0.48166308", "text": "abstract public function GetIndex();", "title": "" }, { "docid": "5f41907cd822c648eb8393d49d011bcb", "score": "0.48154834", "text": "public function lpushx($key, $value) {}", "title": "" }, { "docid": "1c9ba6308dc32883293cbd49aa9c96f7", "score": "0.4810931", "text": "function push($x)\n {\n $this->items[] = $x;\n }", "title": "" }, { "docid": "29a7dfd7656cb958f8122111ebfd024f", "score": "0.48029104", "text": "public function lPushx($key, $value) { }", "title": "" }, { "docid": "a86834f47d415c7a6a0506b11ece3747", "score": "0.4797556", "text": "public function store(StoreBodyIndexRequest $request, $id)\n {\n $this->body_indexes->create($id, $request);\n\n return redirect()->back();\n }", "title": "" }, { "docid": "a6dcce528ad55a72baa80bb32c2b827f", "score": "0.47959223", "text": "function push($x) {\n $this->queue[] = $x;\n $this->count++;\n if ($this->count > 1) {\n // 栈是先进后出 所以每次入栈都把最后进队列的值移到首位\n for ($i=$this->count-1;$i>0;$i--) {\n $tmp = $this->queue[$i-1];\n $this->queue[$i-1] = $this->queue[$i];\n $this->queue[$i] = $tmp;\n }\n }\n }", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.4792433", "text": "public function getIndex() {}", "title": "" }, { "docid": "5f4f7a50d29b66feb954a50fe8580118", "score": "0.47895762", "text": "function addIndex(DBIndex $index) {\n if($this->isLoaded()) {\n DB::execute(\"ALTER TABLE $this->name ADD \" . $index->prepareDefinition());\n } // if\n \n $index->setTable($this);\n $this->getIndices()->add($index->getName(), $index);\n }", "title": "" }, { "docid": "7adb4710bd3015be27238296d570156f", "score": "0.47783592", "text": "public function index($index, $type = null);", "title": "" }, { "docid": "971b85d205c7ad378a0ea82bc36fd244", "score": "0.47731915", "text": "public function push($item, $whichEnd) \n {\n $position = $this->__get($whichEnd);\n return parent::insert($item,$position);\n }", "title": "" }, { "docid": "59ec244c9be0cb6f6396d838c1375caf", "score": "0.4764744", "text": "public static function create(IndexInterface $index, array $options = array());", "title": "" }, { "docid": "dc74930bf01437786040d07ac3094d54", "score": "0.4754951", "text": "public function push($value) {\n if (!is_string($value) && !is_int($value) && !is_array($value)) {\n $this->errorno = self::ERR_INPUT_PARAM;\n $this->error = self::MSG_TYPE_NOT_SUPPORTED;\n return $this->errorno;\n }\n $status = $this->db->apply($this->key, 'lstack', 'push', array($this->bin, $value));\n $this->processStatusCode($status);\n return $this->errorno;\n }", "title": "" }, { "docid": "509c90d91b07bd240f6878d333729af9", "score": "0.4753743", "text": "private function getCurrentStashIndex()\n {\n // If this is the first time the index is needed we need to init the stack\n if (null === $this->contextFieldsStack) {\n $this->contextFieldsStack = [[]];\n }\n\n return key(array_slice($this->contextFieldsStack, -1));\n }", "title": "" }, { "docid": "bcb1c1da34d13a02a64b6a5d53e4b892", "score": "0.47523686", "text": "public function push($item);", "title": "" }, { "docid": "6dd6f9201ea6601be0761a8e366528ba", "score": "0.4746646", "text": "function diy_array_insert_new($array, $index, $val) {\n\t\t$size = count($array);\n\t\tif (!is_int($index) || $index <0 || $index > $size) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\t$temp = array_slice($array, 0, $index);\n\t\t\t$temp[] = $val;\n\t\t\t\n\t\t\treturn array_merge($temp, array_slice($array, $index, $size));\n\t\t}\n\t}", "title": "" }, { "docid": "feeaa4c901d3e7bd10edcdad8bd7ffc6", "score": "0.47374612", "text": "public function insertAt($index,$item)\n\t{\n\t\tif(!$this->_r)\n\t\t{\n\t\t\tif($index===$this->_c)\n\t\t\t\t$this->_d[$this->_c++]=$item;\n\t\t\telseif($index>=0 && $index<$this->_c)\n\t\t\t{\n\t\t\t\tarray_splice($this->_d,$index,0,array($item));\n\t\t\t\t$this->_c++;\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new CException(Yii::t('yii','List index \"{index}\" is out of bound.',\n\t\t\t\t\tarray('{index}'=>$index)));\n\t\t}\n\t\telse\n\t\t\tthrow new CException(Yii::t('yii','The list is read only.'));\n\t}", "title": "" }, { "docid": "479827b8664259a254eecac5a17b42e1", "score": "0.47311744", "text": "public function pushRef($obj) {\n $key = array_search($obj, $this->refpool, true);\n if($key !== false) return $key;\n\n $this->refpool[] = $obj;\n return count($this->refpool) - 1;\n }", "title": "" }, { "docid": "53148d7cb72beb0d6abab87bb567e451", "score": "0.47241494", "text": "public function getIndex();", "title": "" }, { "docid": "53148d7cb72beb0d6abab87bb567e451", "score": "0.47241494", "text": "public function getIndex();", "title": "" }, { "docid": "53148d7cb72beb0d6abab87bb567e451", "score": "0.47241494", "text": "public function getIndex();", "title": "" }, { "docid": "53148d7cb72beb0d6abab87bb567e451", "score": "0.47241494", "text": "public function getIndex();", "title": "" }, { "docid": "53148d7cb72beb0d6abab87bb567e451", "score": "0.47241494", "text": "public function getIndex();", "title": "" }, { "docid": "53148d7cb72beb0d6abab87bb567e451", "score": "0.47241494", "text": "public function getIndex();", "title": "" }, { "docid": "1cb266a6a0fd9bbd24d9a252c97a4f3c", "score": "0.46985707", "text": "function reset_index() {\n $this->_index=array();\n $this->_write_index();\n }", "title": "" }, { "docid": "cee25602a9e810e4b9a813dc4fcdb94f", "score": "0.46941063", "text": "public function addIndex(string $indexName, $fields, array $options = []): void;", "title": "" }, { "docid": "91c2b30c2beddfab3b4eb772011671b0", "score": "0.46908247", "text": "function _indexOpr(&$statement,$k,$ind,$mode){\r\n\t\t// determine position in adequate index\r\n\t\tswitch($ind){\r\n\t\t\tcase 1:\r\n\t\t\t$s=$statement->getSubject();\r\n\t\t\t$p=$statement->getPredicate();\r\n\t\t\t$o=$statement->getObject();\r\n\t\t\t$pos=$s->getLabel().$p->getLabel().$o->getLabel();\r\n\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t$s=$statement->getSubject();\r\n\t\t\t$p=$statement->getPredicate();\r\n\t\t\t$pos=$s->getLabel().$p->getLabel();\r\n\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t$s=$statement->getSubject();\r\n\t\t\t$o=$statement->getObject();\r\n\t\t\t$pos=$s->getLabel().$o->getLabel();\r\n\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t$s=$statement->getSubject();\r\n\t\t\t$pos=$s->getLabel();\r\n\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t$p=$statement->getPredicate();\r\n\t\t\t$pos=$p->getLabel();\r\n\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t$o=$statement->getObject();\r\n\t\t\t$pos=$o->getLabel();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tswitch($mode){\r\n\t\t\t// add in Index\r\n\t\t\tcase 1:\r\n\t\t\tif(isset($this->indexArr[$ind][$pos])){\r\n\t\t\t\t$this->indexArr[$ind][$pos][] = $k;\r\n\t\t\t}else{\r\n\t\t\t\t$this->indexArr[$ind][$pos][0] = $k;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t// remove from Index\r\n\t\t\tcase 0:\r\n\t\t\t$subject=$statement->getSubject();\r\n\t\t\t$predicate=$statement->getPredicate();\r\n\t\t\t$object=$statement->getObject();\r\n\t\t\t$k=-1;\r\n\t\t\tif(!isset($this->indexArr[$ind][$pos])){\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t\t$num=count($this->indexArr[$ind][$pos]);\r\n\t\t\tforeach($this->indexArr[$ind][$pos] as $key => $value){\r\n\t\t\t\t$t=$this->triples[$value];\r\n\t\t\t\tif($this->matchStatement($t,$subject,$predicate,$object)){\r\n\t\t\t\t\t$k=$value;\r\n\t\t\t\t\tif($num==1){\r\n\t\t\t\t\t\tunset($this->indexArr[$ind][$pos]);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tunset($this->indexArr[$ind][$pos][$key]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn $k;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn $k;\r\n\t}", "title": "" }, { "docid": "58a2e3396d08aeea3ab336ea21018074", "score": "0.46797016", "text": "protected function addToIndex($key)\n {\n if (!($index = $this->index())->contains($key)) {\n Cache::put(\n $this->model->getKeyPrefix() . '_index',\n $index->merge($key)->toArray()\n );\n }\n }", "title": "" }, { "docid": "df0526a00b0e2ae835897c44b46983b5", "score": "0.46766967", "text": "public function push($value)\n {\n // list length it's count, starter from 0, count - 1 + 1\n $index = $this->count;\n $node = new Node($index, $value);\n\n if ($this->checkIsEmpty()) {\n $this->start = $node;\n } else {\n $tail = $this->getTail();\n $tail->add($node);\n }\n\n $this->current = $node;\n $this->count++;\n }", "title": "" }, { "docid": "66ed2be84c8b2bcf856f604c6daccbe7", "score": "0.46517655", "text": "public function setIndex($var)\n {\n GPBUtil::checkInt32($var);\n $this->writeOneof(2, $var);\n\n return $this;\n }", "title": "" }, { "docid": "d88dd545f43e39ae3aaa2c901e571db3", "score": "0.46503842", "text": "public function lPush($key, $value) { }", "title": "" }, { "docid": "e9e530dd641c48987c185dc26f7c6bb5", "score": "0.46475518", "text": "function set_index($aContainer) {\n\t $this->aContainer = $aContainer;\n\t}", "title": "" }, { "docid": "b737ed66b6d2e0fd824e418e0f0b1db4", "score": "0.46463063", "text": "public function buildIndex()\n {\n $indexes = $this->getIndexes();\n if(!empty($indexes))\n {\n foreach($this->getIndexes() as $indexData)\n {\n $this->getCommand()->createIndex($indexData[0], $this->tableName, $indexData[1], $indexData[2])->execute();\n }\n }\n }", "title": "" }, { "docid": "8546bf870cf268550ebc6c974d4ce6e2", "score": "0.46426505", "text": "public function insert_item_at( $item, $index ) {\r\n\t\t$items = $this->get_items();\r\n\t\tif ( ! is_array( $item ) ) {\r\n\t\t\t$item = array( $item );\r\n\t\t}\r\n\r\n\t\t$before = array_slice( $items, 0, $index );\r\n\t\t$after = array_slice( $items, $index );\r\n\t\t$new_items = array_merge( $before, $item, $after );\r\n\r\n\t\t$this->set_items( $new_items );\r\n\t}", "title": "" }, { "docid": "83015b20814e10eede756a40b9e5c510", "score": "0.46380168", "text": "public function setIteratorIndex($index);", "title": "" }, { "docid": "1fcb48d73f577cd04662f58ec338a20d", "score": "0.46363983", "text": "public function idx ( ) { return $this->index; }", "title": "" }, { "docid": "1644480862fb1504163bd111efb0a7b0", "score": "0.4625491", "text": "public function setIndex(?int $value): void {\n $this->getBackingStore()->set('index', $value);\n }", "title": "" }, { "docid": "9999b1744973275671a53533627ceef4", "score": "0.46254486", "text": "public function lpush($key, $value) {}", "title": "" }, { "docid": "a250c2914bfbabe98e26e076a087fd3d", "score": "0.46251234", "text": "abstract public function set($index, $value);", "title": "" } ]
37170ab4a1b491e11aaece227ba7381e
Encodes a header as per RFC2047
[ { "docid": "d250d8df9ffbf65cc0fd40f1074edea0", "score": "0.66639423", "text": "function encodeHeader($name, $value, $charset='ISO-8859-1',\n $encoding='quoted-printable', $eol=\"\\r\\n\"\n ) {\n // Structured headers\n $comma_headers = array(\n 'from', 'to', 'cc', 'bcc', 'sender', 'reply-to',\n 'resent-from', 'resent-to', 'resent-cc', 'resent-bcc',\n 'resent-sender', 'resent-reply-to',\n 'mail-reply-to', 'mail-followup-to',\n 'return-receipt-to', 'disposition-notification-to',\n );\n $other_headers = array(\n 'references', 'in-reply-to', 'message-id', 'resent-message-id',\n );\n $name = strtolower($name);\n if (in_array($name, $comma_headers)) {\n $separator = ',';\n } else if (in_array($name, $other_headers)) {\n $separator = ' ';\n }\n if (!$charset) {\n $charset = 'ISO-8859-1';\n }\n // Structured header (make sure addr-spec inside is not encoded)\n if (!empty($separator)) {\n // Simple e-mail address regexp\n $email_regexp = '([^\\s<]+|(\"[^\\r\\n\"]+\"))@\\S+';\n $parts = Mail_mimePart::_explodeQuotedString(\"[\\t$separator]\", $value);\n $value = '';\n foreach ($parts as $part) {\n $part = preg_replace('/\\r?\\n[\\s\\t]*/', $eol . ' ', $part);\n $part = trim($part);\n if (!$part) {\n continue;\n }\n if ($value) {\n $value .= $separator == ',' ? $separator . ' ' : ' ';\n } else {\n $value = $name . ': ';\n }\n // let's find phrase (name) and/or addr-spec\n if (preg_match('/^<' . $email_regexp . '>$/', $part)) {\n $value .= $part;\n } else if (preg_match('/^' . $email_regexp . '$/', $part)) {\n // address without brackets and without name\n $value .= $part;\n } else if (preg_match('/<*' . $email_regexp . '>*$/', $part, $matches)) {\n // address with name (handle name)\n $address = $matches[0];\n $word = str_replace($address, '', $part);\n $word = trim($word);\n // check if phrase requires quoting\n if ($word) {\n // non-ASCII: require encoding\n if (preg_match('#([^\\s\\x21-\\x7E]){1}#', $word)) {\n if ($word[0] == '\"' && $word[strlen($word)-1] == '\"') {\n // de-quote quoted-string, encoding changes\n // string to atom\n $search = array(\"\\\\\\\"\", \"\\\\\\\\\");\n $replace = array(\"\\\"\", \"\\\\\");\n $word = str_replace($search, $replace, $word);\n $word = substr($word, 1, -1);\n }\n // find length of last line\n if (($pos = strrpos($value, $eol)) !== false) {\n $last_len = strlen($value) - $pos;\n } else {\n $last_len = strlen($value);\n }\n $word = Mail_mimePart::encodeHeaderValue(\n $word, $charset, $encoding, $last_len, $eol\n );\n } else if (($word[0] != '\"' || $word[strlen($word)-1] != '\"')\n && preg_match('/[\\(\\)\\<\\>\\\\\\.\\[\\]@,;:\"]/', $word)\n ) {\n // ASCII: quote string if needed\n $word = '\"'.addcslashes($word, '\\\\\"').'\"';\n }\n }\n $value .= $word.' '.$address;\n } else {\n // addr-spec not found, don't encode (?)\n $value .= $part;\n }\n // RFC2822 recommends 78 characters limit, use 76 from RFC2047\n $value = wordwrap($value, 76, $eol . ' ');\n }\n // remove header name prefix (there could be EOL too)\n $value = preg_replace(\n '/^'.$name.':('.preg_quote($eol, '/').')* /', '', $value\n );\n } else {\n // Unstructured header\n // non-ASCII: require encoding\n if (preg_match('#([^\\s\\x21-\\x7E]){1}#', $value)) {\n if ($value[0] == '\"' && $value[strlen($value)-1] == '\"') {\n // de-quote quoted-string, encoding changes\n // string to atom\n $search = array(\"\\\\\\\"\", \"\\\\\\\\\");\n $replace = array(\"\\\"\", \"\\\\\");\n $value = str_replace($search, $replace, $value);\n $value = substr($value, 1, -1);\n }\n $value = Mail_mimePart::encodeHeaderValue(\n $value, $charset, $encoding, strlen($name) + 2, $eol\n );\n } else if (strlen($name.': '.$value) > 78) {\n // ASCII: check if header line isn't too long and use folding\n $value = preg_replace('/\\r?\\n[\\s\\t]*/', $eol . ' ', $value);\n $tmp = wordwrap($name.': '.$value, 78, $eol . ' ');\n $value = preg_replace('/^'.$name.':\\s*/', '', $tmp);\n // hard limit 998 (RFC2822)\n $value = wordwrap($value, 998, $eol . ' ', true);\n }\n }\n return $value;\n }", "title": "" } ]
[ { "docid": "a6887d362c57ff2f1c64243fffad335d", "score": "0.7398285", "text": "function rfc2047EncodeHeader($value, $charset) {\n return \"=?$charset?b?\" . base64_encode($value) . \"?=\";\n }", "title": "" }, { "docid": "534953fa7337cc8e9b50a8fbcf33515e", "score": "0.6451905", "text": "function _encodeHeader($input, $charset = 'ISO-8859-1')\r\n {\r\n $output = $input;\r\n $routput = false;\r\n preg_match_all('/(\\w*([\\x80-\\xFF]+)\\w*)/', $output, $matches);\r\n for ($i = 0, $ct = count ($matches[1]); $i < $ct; $i++) {\r\n $value = $matches[1][$i];\r\n $routput = true;// |= (!ereg(\"^[ ]+$\", $matches[2][$i]));\r\n $replacement = preg_replace('/([\\x80-\\xFF])/e', '\"=\" . strtoupper(dechex(ord(\"\\1\")))', $value);\r\n $output = str_replace($value, '=?' . $charset . '?Q?' . $replacement . '?=', $output);\r\n }\r\n if ($routput) $output = str_replace (\" \", '=?' . $charset . '?Q?=20?=', $output);\r\n if (strlen ($output) > 1000) {\r\n $parts = split (\"\\=\\?\" . $charset . \"\\?Q\\?\", $output);\r\n $wrappedoutput = \"\";\r\n for ($i = 0, $ct = count ($parts); $i < $ct; $i++) {\r\n if (strlen ($wrappedoutput . '=?' . $charset . '?Q?' . $parts[$i]) > 1000) {\r\n break;\r\n }\r\n if (strlen ($parts[$i]) ) $wrappedoutput .= '=?' . $charset . '?Q?' . $parts[$i];\r\n }\r\n $output = $wrappedoutput;\r\n $routput = true;\r\n }\r\n // die($output);\r\n\r\n // Only return encoded output if more than spaces have been changed, or if size exceeds limit\r\n return $routput? $output: $input;\r\n }", "title": "" }, { "docid": "2795ecb98c85485d931e2694d8a28632", "score": "0.64437973", "text": "private static function encodeHeader($subject)\n\t{\n\t\t$subject = mb_convert_encoding($subject, self::MAIL_ENCODING, self::INTERNAL_ENCODING);\n\t\tmb_internal_encoding(self::MAIL_ENCODING);\n\t\t$subject = mb_encode_mimeheader($subject, self::MAIL_ENCODING);\n\t\tmb_internal_encoding(self::INTERNAL_ENCODING);\n\t\treturn $subject;\n\t}", "title": "" }, { "docid": "9af9ac8dcb71564456692091fe0bf41b", "score": "0.6396213", "text": "function mb_encode_mimeheader () {}", "title": "" }, { "docid": "9ea83af91ca041ad0c2c12aa108c8773", "score": "0.6373184", "text": "function mb_encode_mimeheader($str, $charset = 'mb_internal_encoding()', $transfer_encoding = 'quotBquot', $linefeed = 'quot\\\\r\\\\nquot', $indent = false)\n{\n}", "title": "" }, { "docid": "0e2acc2cdc4e968e6d1e20bbdf757ad0", "score": "0.62226224", "text": "function encodeHeaderValue($value, $charset, $encoding, $prefix_len=0, $eol=\"\\r\\n\")\n {\n // #17311: Use multibyte aware method (requires mbstring extension)\n if ($result = Mail_mimePart::encodeMB($value, $charset, $encoding, $prefix_len, $eol)) {\n return $result;\n }\n // Generate the header using the specified params and dynamicly\n // determine the maximum length of such strings.\n // 75 is the value specified in the RFC.\n $encoding = $encoding == 'base64' ? 'B' : 'Q';\n $prefix = '=?' . $charset . '?' . $encoding .'?';\n $suffix = '?=';\n $maxLength = 75 - strlen($prefix . $suffix);\n $maxLength1stLine = $maxLength - $prefix_len;\n if ($encoding == 'B') {\n // Base64 encode the entire string\n $value = base64_encode($value);\n // We can cut base64 every 4 characters, so the real max\n // we can get must be rounded down.\n $maxLength = $maxLength - ($maxLength % 4);\n $maxLength1stLine = $maxLength1stLine - ($maxLength1stLine % 4);\n $cutpoint = $maxLength1stLine;\n $output = '';\n while ($value) {\n // Split translated string at every $maxLength\n $part = substr($value, 0, $cutpoint);\n $value = substr($value, $cutpoint);\n $cutpoint = $maxLength;\n // RFC 2047 specifies that any split header should\n // be separated by a CRLF SPACE.\n if ($output) {\n $output .= $eol . ' ';\n }\n $output .= $prefix . $part . $suffix;\n }\n $value = $output;\n } else {\n // quoted-printable encoding has been selected\n $value = Mail_mimePart::encodeQP($value);\n // This regexp will break QP-encoded text at every $maxLength\n // but will not break any encoded letters.\n $reg1st = \"|(.{0,$maxLength1stLine}[^\\=][^\\=])|\";\n $reg2nd = \"|(.{0,$maxLength}[^\\=][^\\=])|\";\n if (strlen($value) > $maxLength1stLine) {\n // Begin with the regexp for the first line.\n $reg = $reg1st;\n $output = '';\n while ($value) {\n // Split translated string at every $maxLength\n // But make sure not to break any translated chars.\n $found = preg_match($reg, $value, $matches);\n // After this first line, we need to use a different\n // regexp for the first line.\n $reg = $reg2nd;\n // Save the found part and encapsulate it in the\n // prefix & suffix. Then remove the part from the\n // $value_out variable.\n if ($found) {\n $part = $matches[0];\n $len = strlen($matches[0]);\n $value = substr($value, $len);\n } else {\n $part = $value;\n $value = '';\n }\n // RFC 2047 specifies that any split header should\n // be separated by a CRLF SPACE\n if ($output) {\n $output .= $eol . ' ';\n }\n $output .= $prefix . $part . $suffix;\n }\n $value = $output;\n } else {\n $value = $prefix . $value . $suffix;\n }\n }\n return $value;\n }", "title": "" }, { "docid": "ed2e183592361f1991cbebbf901fe03c", "score": "0.6124624", "text": "function encode($text)\n{\n $b1 = 0x80 | (0x1 & 0x0f);\n $length = strlen($text);\n \n if($length <= 125) \t\t$header = pack('CC', $b1, $length); \telseif($length > 125 && $length < 65536) \t\t$header = pack('CCS', $b1, 126, $length); \telseif($length >= 65536)\n $header = pack('CCN', $b1, 127, $length);\n \n return $header.$text;\n}", "title": "" }, { "docid": "00868f30bc72f34551bf7afd7cc3e2f8", "score": "0.60749173", "text": "public function setRawHeader($header) {}", "title": "" }, { "docid": "164e2ebc33fcc72e00d1ac7fd8b2fb90", "score": "0.60577303", "text": "function encode($text) {\n $b1 = 0x80 | (0x1 & 0x0f);\n $length = strlen($text);\n\n if ($length <= 125)\n $header = pack('CC', $b1, $length);\n elseif ($length > 125 && $length < 65536)\n $header = pack('CCS', $b1, 126, $length);\n elseif ($length >= 65536)\n $header = pack('CCN', $b1, 127, $length);\n\n return $header . $text;\n}", "title": "" }, { "docid": "354301872ae1548e0adf6e47ede4ba14", "score": "0.5898458", "text": "public function setRaw($header){ }", "title": "" }, { "docid": "68d2c83387e309a0742378d048e25449", "score": "0.5882502", "text": "function build_part($header)\n {\n $cnt = $header[\"content\"];\n $cnt = chunk_split(base64_encode($cnt));\n $encoding = \"base64\";\n if ($header[\"encode\"]==\"text/html\" or $header[\"encode\"]==\"text/plain\") {\n $charset = '; charset=\"UTF-8\"';\n }\n return \"Content-Type: \".$header[\"encode\"].\n ($header[\"name\"]? \"; name = \\\"\".$header[\"name\"].\"\\\"\" : \"\").\"$charset\\nContent-Transfer-Encoding: $encoding\".($header['cid']?\"\\nContent-ID: <\".$header['cid'].\">\":\"\").\"\\n\\n$cnt\\n\";\n }", "title": "" }, { "docid": "34f8106d320020e730e9ed0489352a5b", "score": "0.58529973", "text": "public function setRaw($header);", "title": "" }, { "docid": "801c19d5ce6271f62b41ff8bfc10ec82", "score": "0.5830449", "text": "public function test_encode_mimeheader() {\n $str = \"Žluťoučký koníček\";\n $this->assertSame(textlib::encode_mimeheader($str), '=?utf-8?B?xb1sdcWlb3XEjWvDvSBrb27DrcSNZWs=?=');\n }", "title": "" }, { "docid": "d09e264916a4bb0af4fda1900c56f603", "score": "0.5803139", "text": "function makeHeader()\n {\n /* $cnonce should be an int between 0 and 99999. */\n $cnonce = rand(0, 99999);\n\n /* $timestamp should include milliseconds. */\n $timestamp = round(microtime(true) * 1000);\n\n $auth = array();\n $auth['Mauth realm'] = 'http://webrtc.intel.com';\n $auth['mauth_signature_method'] = 'HMAC_SHA256';\n $auth['mauth_serviceid'] = $this->config->owt->serviceId;\n $auth['mauth_cnonce'] = $cnonce;\n $auth['mauth_timestamp'] = $timestamp;\n\n /* Generate the signature and convert to base64. */\n $rawSignature = hash_hmac('sha256', $timestamp . ',' . $cnonce, $this->config->owt->serviceKey);\n $auth['mauth_signature'] = base64_encode($rawSignature);\n\n /* Implode the keys and values of the $auth array into a string connected by comma and linebreak along with contentType json. */\n return array('Authorization: ' . urldecode(http_build_query($auth, null, \",\")), 'Content-Type: application/json');\n }", "title": "" }, { "docid": "e722e8f2c3cd50a6b85205224c55cfe8", "score": "0.5792078", "text": "public function createHeader() {\n // TODO check for max size!\n $header = '';\n // set ID\n $header = $header.\"ID3\";\n // set Version\n $header = $header.pack(\"cc\", $this->_maxVersion, $this->_minVersion);\n // set flags\n // TODO use numbers\n $f=bindec('00000000');\n if ($this->isUnsynchronisation()) {\n $f = $f | bindec('10000000');\n }\n if ($this->isExtendedHeader()) {\n $f = $f | bindec('01000000');\n }\n if ($this->isExperimental()) {\n $f = $f | bindec('00100000');\n }\n $header = $header.pack(\"c\", $f);\n\n // set Size\n $size = $this->sync8to7($this->getSize());\n $sb = str_pad(decbin($size), 32, '0', STR_PAD_LEFT);\n $sa = array();\n for ($i=3; $i>=0; $i--) {\n $sa[$i] = bindec(substr($sb, $i*8, 8));\n }\n $header = $header.pack(\"cccc\", $sa[0],$sa[1],$sa[2],$sa[3]);\n if ($this->isExtendedHeader()) {\n $header = $header.$this->createExtendedHeader();\n }\n return $header;\n }", "title": "" }, { "docid": "575bbb0f710d6442204d04f08a7d7f5e", "score": "0.5771569", "text": "public function addHeader($header, $value);", "title": "" }, { "docid": "7c5b75ae5c1e3735e3a8104073f70093", "score": "0.5732213", "text": "function addHeader($header) {\n\t\t$this->raw_headers .= $header;\n\t}", "title": "" }, { "docid": "443d712966532eb0310246a7d1730ccb", "score": "0.5729816", "text": "public function testGettingEncodedString()\n {\n $headers = [\n 'typ' => 'JWT',\n 'alg' => 'HS512'\n ];\n $this->assertEquals(\n rtrim(strtr(base64_encode(json_encode($headers)), '+/', '-_'), '='),\n $this->header->encode()\n );\n $this->header->add('foo', 'bar');\n $headers['foo'] = 'bar';\n $this->assertEquals(\n rtrim(strtr(base64_encode(json_encode($headers)), '+/', '-_'), '='),\n $this->header->encode()\n );\n }", "title": "" }, { "docid": "41816882b6ebe12bd0b9dcd09b68f598", "score": "0.57109773", "text": "public abstract function addHeader($header);", "title": "" }, { "docid": "86806cb948ab33fe18d3872e042f4286", "score": "0.5710674", "text": "public function setHeader($key, $value);", "title": "" }, { "docid": "2f886f333bae3dda57fc4fbe9997702b", "score": "0.57058185", "text": "public function setHeader($name, $value) {}", "title": "" }, { "docid": "b93cddf87562a49cb805f74c9fcb7ffd", "score": "0.5671301", "text": "protected function createHeader()\n {\n if ($this->host === '127.0.0.1' || $this->host === '0.0.0.0') {\n $this->host = 'localhost';\n }\n\n $origin = $this->origin ? $this->origin : \"null\";\n\n return\n \"GET {$this->path} HTTP/1.1\" . \"\\r\\n\" .\n \"Origin: {$origin}\" . \"\\r\\n\" .\n \"Host: {$this->host}:{$this->port}\" . \"\\r\\n\" .\n \"Sec-WebSocket-Key: {$this->key}\" . \"\\r\\n\" .\n \"User-Agent: PHPWebSocketClient/\" . self::VERSION . \"\\r\\n\" .\n \"Upgrade: websocket\" . \"\\r\\n\" .\n \"Connection: Upgrade\" . \"\\r\\n\" .\n \"Sec-WebSocket-Protocol: wamp.2.json\" . \"\\r\\n\" .\n \"Sec-WebSocket-Version: 13\" . \"\\r\\n\" .\n \"\\r\\n\";\n }", "title": "" }, { "docid": "f43121678c74735f34cdde7a2dbcff80", "score": "0.5660951", "text": "public function decodeHeader(string $input): string;", "title": "" }, { "docid": "c333cdf44a4facb0ac308210f83a4598", "score": "0.56370085", "text": "function iconv_mime_decode_headers ($encoded_headers, $mode = null, $charset = null) {}", "title": "" }, { "docid": "de9308fc7ccd0cc2170112e560733ff9", "score": "0.5634477", "text": "function header ($string, $replace = null, $http_response_code = null) {}", "title": "" }, { "docid": "05f0e0e1c7048f5629281627fc802686", "score": "0.5587911", "text": "public function addHeader($header);", "title": "" }, { "docid": "ed9dfa10dcbdb6869dc439381a408f9f", "score": "0.55545384", "text": "public function withHeader(string $name, $value);", "title": "" }, { "docid": "2b45bce3b5572de198ea1cd6fe44ff9b", "score": "0.5536695", "text": "public function createExtendedHeader() {\n $extheader = '';\n $exthcontent = '';\n // set flags\n $f = bindec('00000000');\n if ($this->_useCRC) {\n $f = $f | bindec('10000000');\n $sb = str_pad(decbin($this->_extCRC), 32, '0', STR_PAD_LEFT);\n $sa = array();\n for ($i=3; $i>=0; $i--) {\n $sa[$i] = bindec(substr($sb, $i*8, 8));\n }\n $exthcontent = $exthcontent.pack(\"cccc\", $sa[0],$sa[1],$sa[2],$sa[3]);\n }\n $flag = pack('cc', $f, 0);\n // set padding - is 0, we set no padding\n $padd = \"\\0\\0\\0\\0\";\n // set size\n $sb = str_pad(decbin(strlen($exthcontent)), 32, '0', STR_PAD_LEFT);\n $sa = array();\n for ($i=3; $i>=0; $i--) {\n $sa[$i] = bindec(substr($sb, $i*8, 8));\n }\n $size = pack(\"cccc\", $sa[0],$sa[1],$sa[2],$sa[3]);\n return $size.$flag.$padd.$exthcontent;\n }", "title": "" }, { "docid": "4933818ab774cee5790216aa509d4bd6", "score": "0.55346096", "text": "function _decodeHeader($input)\n {\n if (!$this->_decode_headers) {\n return $input;\n }\n // Remove white space between encoded-words\n $input = preg_replace('/(=\\?[^?]+\\?(q|b)\\?[^?]*\\?=)(\\s)+=\\?/i', '\\1=?', $input);\n $encodedwords = false;\n $charset = '';\n // For each encoded-word...\n while (preg_match('/(=\\?([^?]+)\\?(q|b)\\?([^?]*)\\?=)/i', $input, $matches)) {\n $encodedwords = true;\n $encoded = $matches[1];\n $charset = $matches[2];\n $encoding = $matches[3];\n $text = $matches[4];\n switch (strtolower($encoding)) {\n case 'b':\n $text = base64_decode($text);\n break;\n case 'q':\n $text = str_replace('_', ' ', $text);\n preg_match_all('/=([a-f0-9]{2})/i', $text, $matches);\n foreach ($matches[1] as $value)\n $text = str_replace('=' . $value, chr(hexdec($value)), $text);\n break;\n }\n $text = $this->_autoconvert_encoding($text, $charset);\n $input = str_replace($encoded, $text, $input);\n }\n if (!$encodedwords) {\n $input = $this->_autoconvert_encoding($input, $charset);\n }\n return $input;\n }", "title": "" }, { "docid": "094a9c7423fd3b2259839ebafe9ec516", "score": "0.5515782", "text": "public function fsockopen_header(&$out) {\n\t\t$out .= sprintf(\"Proxy-Authorization: Basic %s\\r\\n\", base64_encode($this->get_auth_string()));\n\t}", "title": "" }, { "docid": "99fcb3c7335fddcbad7736633f175c1f", "score": "0.54953593", "text": "function encode($data, $format);", "title": "" }, { "docid": "aa8c822fbd5a6235e4ce570f14f626ba", "score": "0.5491032", "text": "function addRequestHeader($key, $value);", "title": "" }, { "docid": "056baaa581a9f51334d9f6724eb0ad84", "score": "0.5474923", "text": "function _buildHeaderParam($name, $value, $charset=null, $language=null,\n $encoding=null, $maxLength=75\n ) {\n // RFC 2045:\n // value needs encoding if contains non-ASCII chars or is longer than 78 chars\n if (!preg_match('#[^\\x20-\\x7E]#', $value)) {\n $token_regexp = '#([^\\x21\\x23-\\x27\\x2A\\x2B\\x2D'\n . '\\x2E\\x30-\\x39\\x41-\\x5A\\x5E-\\x7E])#';\n if (!preg_match($token_regexp, $value)) {\n // token\n if (strlen($name) + strlen($value) + 3 <= $maxLength) {\n return \" {$name}={$value}\";\n }\n } else {\n // quoted-string\n $quoted = addcslashes($value, '\\\\\"');\n if (strlen($name) + strlen($quoted) + 5 <= $maxLength) {\n return \" {$name}=\\\"{$quoted}\\\"\";\n }\n }\n }\n // RFC2047: use quoted-printable/base64 encoding\n if ($encoding == 'quoted-printable' || $encoding == 'base64') {\n return $this->_buildRFC2047Param($name, $value, $charset, $encoding);\n }\n // RFC2231:\n $encValue = preg_replace_callback(\n '/([^\\x21\\x23\\x24\\x26\\x2B\\x2D\\x2E\\x30-\\x39\\x41-\\x5A\\x5E-\\x7E])/',\n array($this, '_encodeReplaceCallback'), $value\n );\n $value = \"$charset'$language'$encValue\";\n $header = \" {$name}*={$value}\";\n if (strlen($header) <= $maxLength) {\n return $header;\n }\n $preLength = strlen(\" {$name}*0*=\");\n $maxLength = max(16, $maxLength - $preLength - 3);\n $maxLengthReg = \"|(.{0,$maxLength}[^\\%][^\\%])|\";\n $headers = array();\n $headCount = 0;\n while ($value) {\n $matches = array();\n $found = preg_match($maxLengthReg, $value, $matches);\n if ($found) {\n $headers[] = \" {$name}*{$headCount}*={$matches[0]}\";\n $value = substr($value, strlen($matches[0]));\n } else {\n $headers[] = \" {$name}*{$headCount}*={$value}\";\n $value = '';\n }\n $headCount++;\n }\n $headers = implode(';' . $this->_eol, $headers);\n return $headers;\n }", "title": "" }, { "docid": "773fa87892a0e476060a9ff202322568", "score": "0.54589915", "text": "function add_header( $str, $code=null ) {\n header( $str , true, $code );\n}", "title": "" }, { "docid": "f16d8f82fc336ebcab53a3c1d39c7dd9", "score": "0.5443281", "text": "function setHeader($name, $value) { $this->headers[$name] = $value; }", "title": "" }, { "docid": "c38fb8c7bdc9cf47db48df3a35a39e5c", "score": "0.54360086", "text": "public function getHeader($header);", "title": "" }, { "docid": "c38fb8c7bdc9cf47db48df3a35a39e5c", "score": "0.54360086", "text": "public function getHeader($header);", "title": "" }, { "docid": "f1cd4c1f87b1fcd0a937eacfb35bcaac", "score": "0.5435712", "text": "function setHeader($name, $value) {\n\t\t$this->outgoing_headers[$name] = $value;\n\t\t$this->debug(\"set header $name: $value\");\n\t}", "title": "" }, { "docid": "705304ef7e5e443fb576eb6dd12f444b", "score": "0.543451", "text": "public function testWriteHeader()\n {\n }", "title": "" }, { "docid": "a514df29665d906ccfee252b1e1b57ca", "score": "0.5409268", "text": "function setHeader($key,$value)\n {\n $key = _transform($key,new T_Filter_HeaderKey('mb_trim'));\n // detect content-type (optionally with encoding)\n if (strcasecmp($key,'Content-Type')===0) {\n $charset = new T_Pattern_Regex('/^(.*);\\s?charset\\s?=\\s?([^\\s]+)$/');\n if ($match = $charset->getFirstMatch($value)) {\n $this->contentType = $match[1];\n $this->encoding = $match[2];\n } else {\n $this->contentType = $value;\n }\n } else {\n $this->headers[$key] = $value;\n }\n }", "title": "" }, { "docid": "9180c256d4a651769cb54680c7bfabb0", "score": "0.5398306", "text": "function getHeader($ch, $header) {\r\n $i = strpos($header, ':');\r\n if (!empty($i)) {\r\n $key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\r\n $value = trim(substr($header, $i + 2));\r\n $this->http_header[$key] = $value;\r\n }\r\n return strlen($header);\r\n }", "title": "" }, { "docid": "8bc7798a47a8f76cca316e394c889d2c", "score": "0.53905654", "text": "function testBuildHeader() {\n\t\t$this->Socket->reset();\n\n\t\t$r = $this->Socket->buildHeader(true);\n\t\t$this->assertIdentical($r, false);\n\n\t\t$r = $this->Socket->buildHeader('My raw header');\n\t\t$this->assertIdentical($r, 'My raw header');\n\n\t\t$r = $this->Socket->buildHeader(array('Host' => 'www.cakephp.org'));\n\t\t$this->assertIdentical($r, \"Host: www.cakephp.org\\r\\n\");\n\n\t\t$r = $this->Socket->buildHeader(array('Host' => 'www.cakephp.org', 'Connection' => 'Close'));\n\t\t$this->assertIdentical($r, \"Host: www.cakephp.org\\r\\nConnection: Close\\r\\n\");\n\n\t\t$r = $this->Socket->buildHeader(array('People' => array('Bob', 'Jim', 'John')));\n\t\t$this->assertIdentical($r, \"People: Bob,Jim,John\\r\\n\");\n\n\t\t$r = $this->Socket->buildHeader(array('Multi-Line-Field' => \"This is my\\r\\nMulti Line field\"));\n\t\t$this->assertIdentical($r, \"Multi-Line-Field: This is my\\r\\n Multi Line field\\r\\n\");\n\n\t\t$r = $this->Socket->buildHeader(array('Multi-Line-Field' => \"This is my\\r\\n Multi Line field\"));\n\t\t$this->assertIdentical($r, \"Multi-Line-Field: This is my\\r\\n Multi Line field\\r\\n\");\n\n\t\t$r = $this->Socket->buildHeader(array('Multi-Line-Field' => \"This is my\\r\\n\\tMulti Line field\"));\n\t\t$this->assertIdentical($r, \"Multi-Line-Field: This is my\\r\\n\\tMulti Line field\\r\\n\");\n\n\t\t$r = $this->Socket->buildHeader(array('Test@Field' => \"My value\"));\n\t\t$this->assertIdentical($r, \"Test\\\"@\\\"Field: My value\\r\\n\");\n\n\t}", "title": "" }, { "docid": "7619834fb78c028a125e393ce8250e33", "score": "0.53838325", "text": "function getHeader($ch, $header) {\r\n\t\t$i = strpos($header, ':');\r\n\t\tif (!empty($i)) {\r\n\t\t\t$key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\r\n\t\t\t$value = trim(substr($header, $i + 2));\r\n\t\t\t$this->http_header[$key] = $value;\r\n\t\t}\r\n\t\treturn strlen($header);\r\n\t}", "title": "" }, { "docid": "d4437e476023cc7fa147e76362991de9", "score": "0.53812885", "text": "public function setHeader($key, $value = null);", "title": "" }, { "docid": "1e0ff650dae161858d21d2b25d8e2348", "score": "0.5376642", "text": "private static function header($header)\n {\n $header['Content-Language'] = app()->getLocale();\n $header['X-Powered-By'] = config('main.api_auth');\n $header['X-Version'] = config('main.api_version');\n\n return $header;\n }", "title": "" }, { "docid": "f0f419f25afb5f4ede4686727418e623", "score": "0.53745604", "text": "function header($header, $value) {\n\t\t$this->headers[$header] = \"$header: $value\";\n\t}", "title": "" }, { "docid": "0fe022c9561066863542a862d00e0720", "score": "0.53725487", "text": "public function toHeader() {\n $out = '\"Authorization: OAuth realm=\"\",';\n return $out . OAuth_Utils::normalizeKeyValueParameters($this->getParameters(), ',');\n }", "title": "" }, { "docid": "dbbabfb15e5497966a476b135612b2b6", "score": "0.5368115", "text": "public function getHeader ($header) {}", "title": "" }, { "docid": "b5351f611f3bc4ea4c59c91518eb807e", "score": "0.53505397", "text": "public function addheader($headern,$headervalue='')\r\n\t{\r\n\t\t// $this->addheader(\"name\",\"value\");\r\n\t\tif(!empty($headervalue))\r\n\t\t{\r\n\t\t\tif(!empty($this->header))\r\n\t\t\t{\r\n\t\t\t\tif(preg_match(\"/$headern:/\",$this->header))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->header = preg_replace(\"/$headern: (\\S*)/\",\"$headern: $headervalue\",$this->header);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->header .= \"\\r\\n\".$headern.\": \".$headervalue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->header=$headern.\": \".$headervalue;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// $this->addheader(\"name: value\");\r\n\t\telse \r\n\t\t{\r\n\t\t\tif(!empty($this->header))\r\n\t\t\t{\r\n\t\t\t\t$headarr = explode(\": \",$headern);\r\n\t\t\t\t$headern = $headarr[0];\r\n\t\t\t\t$headerv = $headarr[1];\r\n\t\t\t\t$this->addheader($headern,$headerv);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->header=$headern;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b5351f611f3bc4ea4c59c91518eb807e", "score": "0.53505397", "text": "public function addheader($headern,$headervalue='')\r\n\t{\r\n\t\t// $this->addheader(\"name\",\"value\");\r\n\t\tif(!empty($headervalue))\r\n\t\t{\r\n\t\t\tif(!empty($this->header))\r\n\t\t\t{\r\n\t\t\t\tif(preg_match(\"/$headern:/\",$this->header))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->header = preg_replace(\"/$headern: (\\S*)/\",\"$headern: $headervalue\",$this->header);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->header .= \"\\r\\n\".$headern.\": \".$headervalue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->header=$headern.\": \".$headervalue;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// $this->addheader(\"name: value\");\r\n\t\telse \r\n\t\t{\r\n\t\t\tif(!empty($this->header))\r\n\t\t\t{\r\n\t\t\t\t$headarr = explode(\": \",$headern);\r\n\t\t\t\t$headern = $headarr[0];\r\n\t\t\t\t$headerv = $headarr[1];\r\n\t\t\t\t$this->addheader($headern,$headerv);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->header=$headern;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6ec1a049c4f6b427ca2ab308535e6406", "score": "0.5334238", "text": "public function getHeaderValue($header, $glue = '');", "title": "" }, { "docid": "25014c6c55dedf3f8848307ea33ba8b1", "score": "0.53334534", "text": "protected function _writeHeader($string) {\n\t\theader($string, true);\n\t}", "title": "" }, { "docid": "5a059a0ddc937758479f5f822fb0be32", "score": "0.5328276", "text": "protected function _digestHeader()\n {\n return 'Digest realm=\"' . $this->_realm . '\", '\n . 'domain=\"' . $this->_domains . '\", '\n . 'nonce=\"' . $this->_calcNonce() . '\", '\n . ($this->_useOpaque ? 'opaque=\"' . $this->_calcOpaque() . '\", ' : '')\n . 'algorithm=\"' . $this->_algo . '\", '\n . 'qop=\"' . implode(',', $this->_supportedQops) . '\"';\n }", "title": "" }, { "docid": "5f20a8b161d7e156d8128fe9ba7aa4c9", "score": "0.5324741", "text": "public function toHeaderValue() : string\n {\n return \\json_encode(ObjectSerializer::sanitizeForSerialization($this), JSON_THROW_ON_ERROR);\n }", "title": "" }, { "docid": "5f20a8b161d7e156d8128fe9ba7aa4c9", "score": "0.5324741", "text": "public function toHeaderValue() : string\n {\n return \\json_encode(ObjectSerializer::sanitizeForSerialization($this), JSON_THROW_ON_ERROR);\n }", "title": "" }, { "docid": "5f20a8b161d7e156d8128fe9ba7aa4c9", "score": "0.5324741", "text": "public function toHeaderValue() : string\n {\n return \\json_encode(ObjectSerializer::sanitizeForSerialization($this), JSON_THROW_ON_ERROR);\n }", "title": "" }, { "docid": "5f20a8b161d7e156d8128fe9ba7aa4c9", "score": "0.5324741", "text": "public function toHeaderValue() : string\n {\n return \\json_encode(ObjectSerializer::sanitizeForSerialization($this), JSON_THROW_ON_ERROR);\n }", "title": "" }, { "docid": "5f20a8b161d7e156d8128fe9ba7aa4c9", "score": "0.5324741", "text": "public function toHeaderValue() : string\n {\n return \\json_encode(ObjectSerializer::sanitizeForSerialization($this), JSON_THROW_ON_ERROR);\n }", "title": "" }, { "docid": "5f20a8b161d7e156d8128fe9ba7aa4c9", "score": "0.5324741", "text": "public function toHeaderValue() : string\n {\n return \\json_encode(ObjectSerializer::sanitizeForSerialization($this), JSON_THROW_ON_ERROR);\n }", "title": "" }, { "docid": "56305496a70204e01191d73c3c980a64", "score": "0.53177327", "text": "public function testEncodedParamDataIncludesCharsetAndLanguage()\n {\n\n $value = str_repeat('a', 20).pack('C', 0x8F).str_repeat('a', 10);\n $header = new ParameterizedHeader('Content-Disposition', 'attachment');\n $header->setCharset('iso-8859-1');\n $header->setValue('attachment');\n $header->setParameters(['filename' => $value]);\n $header->setLanguage($this->lang);\n $this->assertEquals(\n 'attachment; filename*='.$header->getCharset().\"'\".$this->lang.\"'\".\n str_repeat('a', 20).'%8F'.str_repeat('a', 10),\n $header->getBodyAsString()\n );\n }", "title": "" }, { "docid": "0a3ad229f29028055a75061200d6b86e", "score": "0.5311069", "text": "public function addHeader(string $key, string $value, int $type): bool {}", "title": "" }, { "docid": "0d964078ca9020f7508ba531f1a4f469", "score": "0.5305913", "text": "function getHeader($ch, $header) {\n\t\t$i = strpos ( $header, ':' );\n\t\tif (! empty ( $i )) {\n\t\t\t$key = str_replace ( '-', '_', strtolower ( substr ( $header, 0, $i ) ) );\n\t\t\t$value = trim ( substr ( $header, $i + 2 ) );\n\t\t\t$this->http_header [$key] = $value;\n\t\t}\n\t\treturn strlen ( $header );\n\t}", "title": "" }, { "docid": "29acb56331175e9790038721f9a1aecf", "score": "0.52949244", "text": "function imap_headers ($imap_stream) {}", "title": "" }, { "docid": "f59b18b057685dfae63a9e25b497f0e9", "score": "0.5293413", "text": "function addOutgoingHeader(&$header)\n {\n //$len = array_push($this->_outgoingHeaders, $header);\n $this->_outgoingHeaders[] = $header;\n }", "title": "" }, { "docid": "b091bd2ae992a0b4d2b9160710686519", "score": "0.52929616", "text": "public function header($key, $value, $replace = true);", "title": "" }, { "docid": "a9ae52c4937962ba9ceb5e6a96fd1ded", "score": "0.5289078", "text": "protected function createIdTagV24Header ()\n {\n $header = \"ID3\";\n $header .= pack('hhC', 0x04, 0x00, decbin(0));\n return $header;\n }", "title": "" }, { "docid": "041f4ab75011ba168a00821fb578dc24", "score": "0.52868813", "text": "public function getHeaderValue()\n {\n $key = static::$headerMap[$this->type];\n\n return \"{$key}=\\\"{$this->id}\\\"\";\n }", "title": "" }, { "docid": "f7a6496b21118d36e20d91a71075c9a3", "score": "0.52751696", "text": "public function testLanguageInformationAppearsInEncodedWords()\n {\n\n $value = 'fo'.pack('C', 0x8F).'bar';\n $header = new UnstructuredHeader('Subject', $value);\n $header->setLanguage('en');\n $header->setCharset('iso-8859-1');\n $this->assertEquals('Subject: =?iso-8859-1*en?Q?fo=8Fbar?=', $header->toString());\n }", "title": "" }, { "docid": "ce73011c7cf04dd2a1e62f48ad59819a", "score": "0.5274178", "text": "public function formatForHeader() {\r\n\t\treturn sprintf('%s=%s', $this->name, $this->value);\r\n\t}", "title": "" }, { "docid": "dce8de111a23714ee409fed3bcc0aa7f", "score": "0.5268663", "text": "public function addRequestHeader($key, $value);", "title": "" }, { "docid": "f4b51a84d833b903479abb08d6594c6c", "score": "0.5259296", "text": "public static function setHeader ($name, $value = null, $replace = null) {}", "title": "" }, { "docid": "16d7ea74297a9e30c30eb3f6d039e459", "score": "0.52571887", "text": "public function toHeaderValue(): string\n {\n return json_encode(ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "16d7ea74297a9e30c30eb3f6d039e459", "score": "0.52571887", "text": "public function toHeaderValue(): string\n {\n return json_encode(ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "16d7ea74297a9e30c30eb3f6d039e459", "score": "0.52571887", "text": "public function toHeaderValue(): string\n {\n return json_encode(ObjectSerializer::sanitizeForSerialization($this));\n }", "title": "" }, { "docid": "726b9dd1a808d4c127183d6e8dbdc5b7", "score": "0.5256892", "text": "function ToHeader() \n { \n $attachmentData = $this->GetContent(); //** get content for the header.\n if($attachmentData == null) //** no valid attachment content.\n return null; //** no header can be generted. \n\n//** add the content type and file name of the attachment. \n\n $header = \"Content-Type: $this->ContentType;\"; \n\n//** if an attachment then add the appropriate disposition and file name(s).\n \n if(!$this->HasLiteralContent())\n {\n $header .= \" name=\\\"\" . basename($this->FilePath) . \"\\\"\" . EmailNewLine .\n \"Content-Disposition: attachment; filename=\\\"\" . \n basename($this->FilePath) . \"\\\"\"; \n }\n $header .= EmailNewLine;\n\n//** add the key for the content encoding of the attachment body to follow. \n\n $header .= \"Content-Transfer-Encoding: base64\" . EmailNewLine . \n EmailNewLine; \n\n//** add the attachment data to the header. encode the binary data in BASE64 \n//** and break the encoded data into the appropriate chunks. \n\n $header .= chunk_split(base64_encode($attachmentData), 76, EmailNewLine) .\n EmailNewLine; \n\n return $header; //** return the headers generated by file. \n }", "title": "" }, { "docid": "ab6a6c6bd4b781a0436cb2823e806005", "score": "0.5246872", "text": "public function generateBaseAuthHeader(){\n // return base64_encode($this->generateToken($this->_authHeaderUsername).':'.$this->generateToken($this->_authHeaderPassword));\n\t return base64_encode('GYVZtuegzYLytAkL5F7EnDHqvyYSfTZ2xBpeKPa6S5W:Cd3DrgUAmwWesykbQ4fGzRLQf5JuYW3Y8cGn3vSd9W5');\n }", "title": "" }, { "docid": "3de330d548165f39cc5bb483cf8af13c", "score": "0.5246808", "text": "public static function generate($name, $value, $charset = \"UTF-8\") {\n\t\tif (preg_match_all('/(\\w*[\\x80-\\xFF]+\\w*)/', $value, $matches)) {\n\t\t\tmb_internal_encoding($charset);\n\t\t\t$value = mb_encode_mimeheader($value, $charset, \"B\");\n\t\t}\n\t\treturn new RFC5322SingleHeader($name, $value);\n\t}", "title": "" }, { "docid": "39f6e5cdc45c0fb21aced7b520acb987", "score": "0.52437186", "text": "public function sendHeaders();", "title": "" }, { "docid": "4451b4697311e571d2c32a806c0b3fbd", "score": "0.5243397", "text": "public function testLanguageInformationAppearsInEncodedWords()\n {\n\n $value = 'fo'.pack('C', 0x8F).'bar';\n $header = new ParameterizedHeader('X-Foo', $value);\n $header->setCharset('iso-8859-1');\n $header->setLanguage('en');\n $header->setParameters(['says' => $value]);\n $this->assertEquals('X-Foo: =?'.$header->getCharset().'*en?Q?fo=8Fbar?=; says*='.$header->getCharset().\"'en'fo%8Fbar\", $header->toString());\n }", "title": "" }, { "docid": "7b3d2ecb4006ff939f56397e4b44c709", "score": "0.5240892", "text": "public function set_header($header, $value)\n {\n $this->_headers[$header] = $value;\n }", "title": "" }, { "docid": "b1effec39be583208bb402156953c948", "score": "0.52208", "text": "public function getHeader();", "title": "" }, { "docid": "b1effec39be583208bb402156953c948", "score": "0.52208", "text": "public function getHeader();", "title": "" }, { "docid": "45dd79797d0ff818efb6fba3402ea582", "score": "0.52207285", "text": "public function testEncodedWordIncludesCharsetAndEncodingMethodAndText()\n {\n\n $nonAsciiChar = pack('C', 0x8F);\n $header = new UnstructuredHeader('X-Test', $nonAsciiChar);\n $header->setCharset('iso-8859-1');\n $this->assertEquals('X-Test: =?'.$header->getCharset().'?Q?=8F?=', $header->toString());\n }", "title": "" }, { "docid": "95a41ccb0a1cfd652c8646740f6610fe", "score": "0.52174693", "text": "abstract protected function headers();", "title": "" }, { "docid": "0ac0a3577de010bf8beb402e06f133cb", "score": "0.52117157", "text": "function toHeaderName($name) {\n return 'HTTP_' . str_replace('-', '_', strtoupper($name));\n}", "title": "" }, { "docid": "8c34f3c207176e35b6621bbbf8205b49", "score": "0.5211422", "text": "public function escapeHeaderAttribute($attribute);", "title": "" }, { "docid": "8d62d413bd7c7bc9f172257ec268defe", "score": "0.520805", "text": "public function decodeHeader($header) {\n $result = \"\";\n $headerObj = imap_mime_header_decode ($header);\n foreach ($headerObj as $part) {\n $encoding = ($part->charset === 'default' ? \"ISO-8859-1\" : $part->charset);\n $text = @mb_convert_encoding($part->text, 'UTF-8', $encoding);\n $result .= $text;\n }\n return $result;\n }", "title": "" }, { "docid": "84402a85c979315230ef7b486eea15a4", "score": "0.51971555", "text": "public function getRequestHeader();", "title": "" }, { "docid": "d6ed9b66ca971f7989d1adc313851e9a", "score": "0.51963264", "text": "function iconv_mime_encode ($field_name, $field_value, array $preferences = null) {}", "title": "" }, { "docid": "2f03b6d5bc05c2202045814dd30b51d1", "score": "0.5188244", "text": "public static function toHeaderValue($value)\n {\n return self::toString($value);\n }", "title": "" }, { "docid": "61739ee3592eba4b4643bd7e70c986d8", "score": "0.51881063", "text": "public function encode();", "title": "" }, { "docid": "61739ee3592eba4b4643bd7e70c986d8", "score": "0.51881063", "text": "public function encode();", "title": "" }, { "docid": "61739ee3592eba4b4643bd7e70c986d8", "score": "0.51881063", "text": "public function encode();", "title": "" }, { "docid": "f805e733f68d096ce2592c87595227e0", "score": "0.51879", "text": "public function add_header($header){\n $this->headers[] = $header;\n }", "title": "" }, { "docid": "9ae14b554335ba544e47b6830d8126fd", "score": "0.5175135", "text": "protected function assembleHeaders() {\r\n $output = '';\r\n foreach ($this->headers as $name => &$value) {\r\n $output .= \"{$name}: {$value}\\r\\n\"; \r\n }\r\n return $output;\r\n }", "title": "" }, { "docid": "0399dc51e8ba2f7db640804abb7f5c73", "score": "0.5168818", "text": "function header(string $value)\n{\n Output::$headers[] = $value;\n}", "title": "" }, { "docid": "222477c27b4fb08033eabd4411afe887", "score": "0.51654", "text": "public function getHeader($name);", "title": "" }, { "docid": "c786e68a9c6bcad7dc6511319b19dcc5", "score": "0.516411", "text": "public function set($header);", "title": "" }, { "docid": "6c3cb05ef5eb36397511dabd7fba41e2", "score": "0.51631314", "text": "protected function generateAuthHeader()\n {\n if ($this->resolver->isDefined('token')) {\n return $this->generateBillingoTokenHeader();\n } else {\n return $this->generateJWTHeader();\n }\n }", "title": "" }, { "docid": "367884d690c18e33d99de920bdb5de4f", "score": "0.5158057", "text": "function buildHeader($header, $mode = 'standard') {\n\t\treturn parent::_buildHeader($header, $mode);\n\t}", "title": "" } ]
5a9250d1d6b1f006031e5708ab6144f1
Optimize styles and scripts
[ { "docid": "2f4cfd0e9875389267c1de164a8a3515", "score": "0.0", "text": "public function optimize()\n {\n $this->deoptimize();\n $modules = $this->getAllModules();\n $id_header = Hook::getIdByName('displayHeader');\n foreach ($modules as $module) {\n $module_obj = Module::getInstanceById($module['id_module']);\n if (!$this->checkModuleInFrontHooks($module_obj)) {\n $pages = $this->checkModuleInLayouts($module_obj);\n if (count($pages) > 0) {\n $this->editExceptions($module_obj, $id_header, $this->id_shop, $pages);\n }\n }\n }\n }", "title": "" } ]
[ { "docid": "9e7acac172c3b2311e2a394b88d74894", "score": "0.7088814", "text": "protected function doCompressCss() {}", "title": "" }, { "docid": "a8e125f57e565e2b53e374b53235080b", "score": "0.70098484", "text": "public function frontEndStyleScripts(): void\n {\n wp_enqueue_style('users-data-bootstrap', plugin_dir_url(dirname(__FILE__)) . 'assets/css/bootstrap.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-fontawsome', plugin_dir_url(dirname(__FILE__)) . 'assets/css/font-awesome.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-styles', plugin_dir_url(dirname(__FILE__)) . 'assets/css/users-data.css', [], UsersListing::getVersion());\n //\n wp_enqueue_script('jquery-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/jquery.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('jquery-popper', plugin_dir_url(dirname(__FILE__)) . 'assets/js/popper.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('bootstrap-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/bootstrap.min.js', ['jquery'], UsersListing::getVersion(), false);\n }", "title": "" }, { "docid": "30fc656cc84e9378e8ce333034387a64", "score": "0.6822124", "text": "function minimize_code($obj, $codetype='javascript')\n{\n\tif($codetype == 'javascript')\n\t{\n\t\t$obj->load->library(\"jsmin\");\n\t\n\t\t$combined_file_name = HOME_URL.\"js/combined.js\"; \n\t\tif (!MINIFY_JS) {\n\t\t\t// remove the combined JS file so that it can be regenerated \n\t\t\tunlink($combined_file_name); \n\t\t} \n\t\tif (!file_exists($combined_file_name)) {\n\t\t\t$files = glob(HOME_URL.\"js/*.js\");\n\t\t\t$js = \"\";\n\t\t\t\n\t\t\tforeach($files AS $file) \n\t\t\t{\n\t\t\t\tif(strpos($file, 'easyui') == FALSE && strpos($file, '.min.') == FALSE && strpos($file, '.datepick.') == FALSE){\n\t\t\t\t\tif (MINIFY_JS) {\n\t\t\t\t\t\t$js .= JSMin::minify(file_get_contents($file));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$js .= file_get_contents($file);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfile_put_contents($combined_file_name, $js);\n\t\t} \n\t\treturn \"<script type='text/javascript' src='\".base_url().\"js/combined.js'></script>\";\n\t\n\t} \n\telse if($codetype == 'stylesheets')\n\t{\n\t\t\n\t\t$obj->load->library(\"xmlrpc\");\n\t\t\n\t\t$obj->load->library(\"cssmin\");\n\t\t\n\t\t$combined_file_name = HOME_URL.\"css/combined.css\"; \n\t\tif (!MINIFY_JS) {\n\t\t\t// remove the combined JS file so that it can be regenerated \n\t\t\tunlink($combined_file_name); \n\t\t}\n\t\t\n\t\tif (!file_exists($combined_file_name)) \n\t\t{\n\t\t\t$files = glob(HOME_URL.\"css/*.css\");\n\t\t\t$css = \"\";\n\t\t\n\t\t\t\t\t\n\t\t\tforeach($files as $file) \n\t\t\t{\n\t\t\t\tif(strpos($file, 'easyui') == FALSE && strpos($file, '.min.') == FALSE && strpos($file, '.datepick.') == FALSE)\n\t\t\t\t{\n\t\t\t\t\tif (MINIFY_JS)\n\t\t\t\t\t{\n\t\t\t\t\t\t$css .= CssMin::minify(file_get_contents($file));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$css .= file_get_contents($file);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfile_put_contents($combined_file_name, $css);\n\t\t} \n\t\t\n\t\treturn \"<link href='\".base_url().\"css/combined.css' rel='stylesheet' type='text/css' />\";\n\t}\t\n}", "title": "" }, { "docid": "6e56217201323343a546eb8d91d4d2ea", "score": "0.6797548", "text": "function scripts_styles() {\n\n\t\t// No need to process if in admin.\n\t\tif ( is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$theme_url = get_template_directory_uri();\n\t\t$main_css_url = $theme_url . '/style.css';\n\t\t$main_css_path = get_template_directory() . '/style.css';\n\t\t$main_css_ver = file_exists( $main_css_path ) ? filemtime( $main_css_path ) : '';\n\n\t\twp_enqueue_style( 'superiocity-style', $main_css_url, null, $main_css_ver );\n\t\twp_deregister_script( 'wp-embed' );\n\t}", "title": "" }, { "docid": "c06a302e0e56ef11b503be01f1c9ceaa", "score": "0.66958493", "text": "public function set_script_styling(){\r\n /**\r\n * enqueue css styling here\r\n */\r\n wp_enqueue_style('before-after-comparison-styling', plugin_dir_url( __FILE__ ) . 'css/before-after.css', array(), '1.0');\r\n\r\n /**\r\n * enqueue custom js / javascript library here\r\n */\r\n wp_enqueue_script('before-after-comparison-javascript', plugin_dir_url( __FILE__ ) . 'js/before-after.js', array('jquery'), '1.0' , false);\r\n\r\n \r\n }", "title": "" }, { "docid": "adfa1e39ce2cb1e21818cf92a77ac75c", "score": "0.6693201", "text": "public function enableCompressCss() {}", "title": "" }, { "docid": "aece566cb9b3da386c3efc8c2b744701", "score": "0.66588175", "text": "protected function renderJavaScriptAndCss() {}", "title": "" }, { "docid": "9261ce1bdb7900128830363dc0997618", "score": "0.6621952", "text": "public function minify()\n {\n $this->load->driver('minify');\n \n $contents = $this->minify->css->min('css/frontend/styles.css');\n $this->minify->save_file($contents, 'css/frontend/styles.min.css');\n \n $contents = $this->minify->css->min('css/backend/admin.css');\n $this->minify->save_file($contents, 'css/backend/admin.min.css');\n \n $contents = $this->minify->css->min('css/backend/login.css');\n $this->minify->save_file($contents, 'css/backend/login.min.css');\n \n $contents = $this->minify->css->min('css/frontend/styles.css');\n $this->minify->save_file($contents, 'css/frontend/styles.min.css');\n \n $contents = $this->minify->css->min('css/frontend/styles.css');\n $this->minify->save_file($contents, 'css/frontend/styles.min.css');\n }", "title": "" }, { "docid": "6f63dd8d376d5fcd82dc21510d52b455", "score": "0.66191185", "text": "function howes_scripts_styles() {\n\tglobal $howes;\n\t/*\n\t * Adds JavaScript to pages with the comment form to support\n\t * sites with threaded comments (when in use).\n\t */\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ){\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\t\n\t/*\n\t * Adds RTL CSS file\n\t */\n\tif ( is_rtl() ) {\n\t\twp_enqueue_style( 'howes-rtl', get_template_directory_uri() . '/rtl'.TM_MIN.'.css' );\n\t}\n\t\n\t// Add page translation effect\n\tif( isset($howes['pagetranslation']) && $howes['pagetranslation']!='no'){\n\t\twp_enqueue_script( 'animsition', get_template_directory_uri() . '/js/jquery.animsition'.TM_MIN.'.js', array( 'jquery' ) );\n\t\twp_enqueue_style( 'animsition', get_template_directory_uri() . '/css/animsition'.TM_MIN.'.css' );\n\t}\n\t\n\t// Loads JavaScript file with functionality specific to Howes.\n\twp_enqueue_script( 'howes-script', get_template_directory_uri() . '/js/functions'.TM_MIN.'.js', array( 'jquery', 'isotope' ), '2013-07-18', true );\n\t\n\t// Hover effect\n\twp_enqueue_style( 'hover', get_template_directory_uri() . '/css/hover'.TM_MIN.'.css' );\n\t\n\t// IsoTope\n\twp_enqueue_script( 'isotope', get_template_directory_uri() . '/js/jquery.isotope'.TM_MIN.'.js', array( 'jquery' ) );\n\t\n\t// Flex Slider\n\twp_enqueue_script( 'flexslider', get_template_directory_uri() . '/js/jquery.flexslider'.TM_MIN.'.js', array( 'jquery' ) );\n\twp_enqueue_style( 'flexslider', get_template_directory_uri() . '/css/flexslider'.TM_MIN.'.css' );\n\t\n\t// Tooltip\n\twp_enqueue_script( 'bootstrap-tooltip', get_template_directory_uri() . '/js/bootstrap-tooltip'.TM_MIN.'.js', array( 'jquery', 'howes-script' ) );\n\t\n\t// Sticky\n\tif( $howes['stickyheader']=='y' ){\n\t\twp_enqueue_script( 'sticky', get_template_directory_uri() . '/js/jquery.sticky'.TM_MIN.'.js', array( 'jquery' ) );\n\t}\n\t\n\t// Load font icon library CSS files\n\tif( isset($howes['fonticonlibrary']) && is_array($howes['fonticonlibrary']) && count($howes['fonticonlibrary'])>0 ){\n\t\tforeach( $howes['fonticonlibrary'] as $library=>$val ){\n\t\t\tif( $library!='fontawesome' ){\n\t\t\t\tif( $val == '1' ){\n\t\t\t\t\twp_enqueue_style( $library, get_template_directory_uri() . '/css/fonticon-library/'.$library.'/css/thememount-'.$library.TM_MIN.'.css' );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\twp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/css/fonticon-library/font-awesome/css/thememount-font-awesome'.TM_MIN.'.css' ); // Font Awesome\n\t\n\t// Nivo Slider\n\twp_enqueue_script( 'nivo-slider', get_template_directory_uri() . '/js/jquery.nivo.slider'.TM_MIN.'.js', array( 'jquery' ) );\n\twp_enqueue_style( 'nivo-slider-css', get_template_directory_uri() . '/css/nivo-slider'.TM_MIN.'.css' );\n\twp_enqueue_style( 'nivo-slider-theme', get_template_directory_uri() . '/css/nivo-default'.TM_MIN.'.css' );\n\t\n\t// Numinate plugin\n\tif ( !wp_script_is( 'waypoints', 'registered' ) ) { // If Waypoints library is not registered\n\t\twp_register_script( 'waypoints', get_template_directory_uri() . '/js/waypoints'.TM_MIN.'.js', array( 'jquery' ) );\n\t}\n\twp_register_script( 'numinate', get_template_directory_uri() . '/js/numinate'.TM_MIN.'.js', array( 'jquery' ) );\n\t\n\t// owl carousel\n\twp_enqueue_script( 'owl-carousel', get_template_directory_uri() . '/js/owl.carousel'.TM_MIN.'.js', array( 'jquery' ) );\n\twp_enqueue_style( 'owl-carousel', get_template_directory_uri() . '/css/owl.carousel'.TM_MIN.'.css' );\n\n\t\n\t// Swipebox\n\twp_enqueue_script( 'prettyphoto', get_template_directory_uri() . '/js/jquery.prettyPhoto'.TM_MIN.'.js', array( 'jquery' ) );\n\twp_enqueue_style( 'prettyphoto', get_template_directory_uri() . '/css/prettyPhoto'.TM_MIN.'.css' );\n\t\n\t// Pace Loader\n\t//wp_enqueue_script( 'pace', get_template_directory_uri() . '/js/pace'.TM_MIN.'.js', array( 'jquery' ) );\n\t//wp_enqueue_style( 'pace', get_template_directory_uri() . '/css/prettyPhoto'.TM_MIN.'.css' );\n\t\n\tglobal $howes;\n\tif( isset($howes['scroller_enable']) ){\n\t\tif( $howes['scroller_enable']=='1'){\n\t\t\t// NiceScroll\n\t\t\twp_enqueue_script( 'nicescroll', get_template_directory_uri() . '/js/jquery.nicescroll'.TM_MIN.'.js', array( 'jquery' ) );\n\t\t\twp_enqueue_script( 'nicescroll-plus', get_template_directory_uri() . '/js/jquery.nicescroll.plus'.TM_MIN.'.js', array( 'jquery' , 'nicescroll' ) );\n\t\t} else if( $howes['scroller_enable']=='2'){\n\t\t\t// SmoothScroll\n\t\t\twp_enqueue_script( 'SmoothScroll', get_template_directory_uri() . '/js/SmoothScroll'.TM_MIN.'.js', array( 'jquery' ) );\n\t\t}\n\t}\n\t\n}", "title": "" }, { "docid": "d3500344da2ef2eeacd987714ceb52c0", "score": "0.6615037", "text": "function massively_theme_assets() {\n\n\t\t$var = '1.0.0';\n\n\t\t/* CSS */\n\t\twp_enqueue_style( 'main-css', get_theme_file_uri('/assets/css/main.css'), '', $var );\n\t\twp_enqueue_style( 'noscript-css', get_theme_file_uri('/assets/css/noscript.css'), '', $var );\n\t\twp_enqueue_style( 'theme-css', get_stylesheet_uri(), '', $var );\n\n\t\t/* JavaScripts */\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script( 'scrollex-js', get_theme_file_uri('/assets/js/jquery.scrollex.min.js'), '', $var );\n\t\twp_enqueue_script( 'scrolly-js', get_theme_file_uri('/assets/js/jquery.scrolly.min.js'), '', $var );\n\t\twp_enqueue_script( 'browser-js', get_theme_file_uri('/assets/js/browser.min.js'), '', $var );\n\t\twp_enqueue_script( 'breakpoints-js', get_theme_file_uri('/assets/js/breakpoints.min.js'), '', $var );\n\t\twp_enqueue_script( 'util-js', get_theme_file_uri('/assets/js/util.js'), '', $var );\n\t\twp_enqueue_script( 'main-js', get_theme_file_uri('/assets/js/main.js'), array('jquery'), $var, true );\n\t}", "title": "" }, { "docid": "3fdf7191b6a5ba12b4847bfbb7a6b79b", "score": "0.65951204", "text": "private function _include_css()\n {\n if ( !$this->cache['css'] )\n {\n $this->EE->cp->add_to_head('<style type=\"text/css\">\n .vz_range { padding-bottom:0.5em; }\n .vz_range input { width:97%; padding:4px; }\n .vz_range_min { float:left; width:46%; }\n .vz_range_max { float:right; width:46%; }\n .vz_range_sep { float:left; width:8%; text-align:center; line-height:2; }\n</style>');\n\n $this->cache['css'] = TRUE;\n }\n }", "title": "" }, { "docid": "0d218d849f3fa4a3a7d4263fa2369ac4", "score": "0.65857077", "text": "function nameless_sheep_scripts() {\n\t\t// Get the theme data.\n\t\t$the_theme = wp_get_theme();\n\t\t$theme_version = $the_theme->get( 'Version' );\n\n\t\t$css_version = $theme_version . '.' . filemtime( get_template_directory() . '/css/theme.min.css' );\n\t\twp_enqueue_style( 'nameless_sheep-styles', get_template_directory_uri() . '/css/theme.min.css', array(), $css_version );\n\n\t\twp_enqueue_script( 'jquery' );\n\t}", "title": "" }, { "docid": "4375faed10b7e46bfb6ad138087860f2", "score": "0.65631425", "text": "function clean_and_sober_scripts() {\n\tglobal $post;\n\n\twp_enqueue_style( 'reset', get_stylesheet_directory_uri() . '/reset.css' );\n\twp_enqueue_style( 'style', get_stylesheet_uri() );\n\twp_enqueue_style( 'responsive', get_stylesheet_directory_uri() . '/responsive.css' );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\n\tif ( is_singular() && wp_attachment_is_image( $post->ID ) ) {\n\t\twp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );\n\t}\n}", "title": "" }, { "docid": "41d8eeeaff5f7f394e321a45d9a8e4ce", "score": "0.6554723", "text": "function html5reset_scripts_styles() {\n\t\tglobal $wp_styles;\n\n\t\t// Load Comments\t\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) )\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\n\t\t// Load Stylesheets\n//\t\twp_enqueue_style( 'html5reset-reset', get_template_directory_uri() . '/reset.css' );\n//\t\twp_enqueue_style( 'html5reset-style', get_stylesheet_uri() );\n\t\n\t\t// Load IE Stylesheet.\n//\t\twp_enqueue_style( 'html5reset-ie', get_template_directory_uri() . '/css/ie.css', array( 'html5reset-style' ), '20130213' );\n//\t\t$wp_styles->add_data( 'html5reset-ie', 'conditional', 'lt IE 9' );\n\n\t\t// Modernizr\n\t\t// This is an un-minified, complete version of Modernizr. Before you move to production, you should generate a custom build that only has the detects you need.\n\t\t// wp_enqueue_script( 'html5reset-modernizr', get_template_directory_uri() . '/_/js/modernizr-2.6.2.dev.js' );\n\t\t\n\t}", "title": "" }, { "docid": "6aa077fcfda1df4185c0f71a512c24fd", "score": "0.65441436", "text": "public function admin_enqueue_scripts() {\n\t\t$pagenow = $GLOBALS['pagenow'];\n\n\t\tif ( ! ( self::is_term_edit( $pagenow ) || self::is_term_overview( $pagenow ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$asset_manager = new WPSEO_Admin_Asset_Manager();\n\t\t$asset_manager->enqueue_style( 'scoring' );\n\n\t\t$tab = new WPSEO_Help_Center_Template_Variables_Tab();\n\t\t$tab->enqueue_assets();\n\n\t\t$tag_id = filter_input( INPUT_GET, 'tag_ID' );\n\t\tif (\n\t\t\tself::is_term_edit( $pagenow ) &&\n\t\t\t! empty( $tag_id ) // After we drop support for <4.5 this can be removed.\n\t\t) {\n\t\t\twp_enqueue_media(); // Enqueue files needed for upload functionality.\n\n\t\t\t$asset_manager->enqueue_style( 'metabox-css' );\n\t\t\t$asset_manager->enqueue_style( 'snippet' );\n\t\t\t$asset_manager->enqueue_style( 'scoring' );\n\t\t\t$asset_manager->enqueue_script( 'metabox' );\n\t\t\t$asset_manager->enqueue_script( 'term-scraper' );\n\n\t\t\twp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'term-scraper', 'wpseoTermScraperL10n', $this->localize_term_scraper_script() );\n\t\t\t$yoast_components_l10n = new WPSEO_Admin_Asset_Yoast_Components_l10n();\n\t\t\t$yoast_components_l10n->localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'term-scraper' );\n\n\t\t\twp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'replacevar-plugin', 'wpseoReplaceVarsL10n', $this->localize_replace_vars_script() );\n\t\t\twp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoSelect2Locale', WPSEO_Utils::get_language( WPSEO_Utils::get_user_locale() ) );\n\t\t\twp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoAdminL10n', WPSEO_Help_Center::get_translated_texts() );\n\n\t\t\t$asset_manager->enqueue_script( 'admin-media' );\n\n\t\t\twp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-media', 'wpseoMediaL10n', array(\n\t\t\t\t'choose_image' => __( 'Use Image', 'wordpress-seo' ),\n\t\t\t) );\n\t\t}\n\n\t\tif ( self::is_term_overview( $pagenow ) ) {\n\t\t\t$asset_manager->enqueue_script( 'edit-page-script' );\n\t\t}\n\t}", "title": "" }, { "docid": "078fa1a3859a908f80f80ad15a6379d4", "score": "0.654068", "text": "protected function doConcatenateCss() {}", "title": "" }, { "docid": "1ec87cc91d308308ef490d4d463e4598", "score": "0.6538272", "text": "public function enableConcatenateCss() {}", "title": "" }, { "docid": "1ddeb86243cfd3714eff22714f0ed6d0", "score": "0.6519177", "text": "public function build_css() {\n\t\t\t\n\t\t}", "title": "" }, { "docid": "93058a8e93e1213ecefa1145dc8eccb0", "score": "0.6499797", "text": "function aitEnqueueScriptsAndStyles(){\r\n\tif(!is_admin()){\r\n\t\t// just shortcuts\r\n\t\t$s = THEME_CSS_URL;\r\n\t\t$j = THEME_JS_URL;\r\n\r\n\t\taitAddStyles(array(\r\n\t\t\t'ait-colorbox' => array('file' => \"$s/libs/colorbox.css\"),\r\n\t\t\t'ait-fancybox' => array('file' => \"$s/libs/fancybox.css\"),\r\n\t\t\t'jquery-ui' \t => array('file' => \"$s/libs/jquery-ui.css\"),\r\n\t\t\t'prettysociable' => array('file' => \"$s/libs/prettySociable.css\"),\r\n\t\t\t'hoverzoom' \t => array('file' => \"$s/libs/hoverZoom.css\"),\r\n\t\t));\r\n\r\n\t\taitAddScripts(array(\r\n\t\t\t'jquery-ui-tabs' \t\t\t=> true,\r\n\t\t\t'jquery-ui-accordion' \t\t\t=> true,\r\n\t\t\t'jquery-infieldlabel' \t\t\t=> array('file' => \"$j/libs/jquery-infieldlabel.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-iconmenu' \t\t\t\t=> array('file' => \"$j/libs/jquery-iconmenu.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-plugins'\t \t\t\t=> array('file' => \"$j/libs/jquery-plugins.js\", 'deps' => array('jquery')),\r\n\t\t\t'modernizr'\t\t\t\t\t\t=> array('file' => \"$j/libs/modernizr-2.6.1-custom.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\r\n\t\t\t'ait-gridgallery' \t\t\t=> array('file' => \"$j/gridgallery.js\", 'deps' => array('jquery', 'jquery-plugins'), 'inFooter' => true),\r\n\t\t\t'ait-testimonials' \t\t\t=> array('file' => \"$j/testimonials.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'ait-script' \t\t\t=> array('file' => \"$j/script.js\", 'deps' => array('jquery', 'jquery-infieldlabel', 'jquery-iconmenu', 'jquery-plugins', 'modernizr'), 'inFooter' => true),\r\n\t\t));\r\n\t}\r\n}", "title": "" }, { "docid": "713ec1a899473989b685cb1707e4dc0f", "score": "0.6496872", "text": "function elegance_scripts()\n {\n /**\n * Stylesheet Enqueue\n * @version 1.0.0\n */\n wp_enqueue_style( 'elegance-style', get_stylesheet_uri() );\n wp_enqueue_style( 'bootstrap-css', get_template_directory_uri() . '/assets/dist/css/bootstrap.min.css', array(), '4.3.1', 'all');\n wp_enqueue_style( 'font-awesome-css', get_template_directory_uri() . '/assets/dist/fonts/font-awesome.min.css', array(), '4.0.0', 'all');\n\n /**\n * Scripts Enqueue\n * @version 1.0.0\n */\n wp_enqueue_script( 'bootstrap-js', get_template_directory_uri() . '/assets/dist/js/bootstrap.min.js', array( 'jquery' ), '4.3.1', true );\n\n /**\n * Woocommerce Stylesheet\n * @version 1.0.0\n */\n wp_enqueue_style( 'woocommerce-css', get_template_directory_uri() . '/assets/dist/css/woocommerce.css', array(), '1.0.0', 'all');\n \n }", "title": "" }, { "docid": "e2075cd5734aae19f604f1e932b48d47", "score": "0.6477379", "text": "public function load_admin_scripts_styles(){\n\t\t\n\t}", "title": "" }, { "docid": "7ec52eb62426717076924c3903aa7710", "score": "0.6477069", "text": "function assets() {\n\t\tif ( ! is_admin() ) {\n\t\t\twp_enqueue_style( '_yourthemename-style', get_theme_file_uri( '/dist/css/bundle.css' ), array(), _YOURTHEMENAME_VER );\n\n\t\t\twp_deregister_script( 'jquery' );\n\t\t\twp_enqueue_script( '_yourthemename-scripts', get_theme_file_uri( '/dist/js/bundle.min.js' ), array(), _YOURTHEMENAME_VER, true );\n\t\t}\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t}", "title": "" }, { "docid": "fcc75fdfdedca85cfc96610842c46e3e", "score": "0.64679533", "text": "function onemax_vc_js_css()\n{\n if (!is_admin()) {\n wp_enqueue_style('onemax-interactive', ONEMAX_URI.'/css/interactive.css');\n wp_enqueue_script('onemax-aos', ONEMAX_URI.'/js/library/aos.js');\n wp_enqueue_script('onemax-owl-carousel', ONEMAX_URI.'/js/component/portfolio_carousel/owl.carousel.js');\n wp_enqueue_script('onemax-image-setting', ONEMAX_URI.'/js/component/image/image.js');\n wp_enqueue_script('onemax-conter', ONEMAX_URI.'/js/component/counters/conter.js', '', '', true);\n }\n}", "title": "" }, { "docid": "ec20668565ee3ce58c6a15576e4c0527", "score": "0.64233065", "text": "function loadJSCSS() {\n\tif (!is_admin()) {\n\t\twp_enqueue_script( 'jquery' );\n\t\n\t// Load Theme Options\n\t\t$themeoptions = array_merge(get_option(\"tb_longwave_theme_general_options\"),get_option(\"tb_longwave_theme_header_options\"));\t\n\t\t\n\t\n\t// Enqueue the Theme Styles\n\n\t\t \n\t\t//Basic \n\t\twp_enqueue_style( 'tb_base_style',get_stylesheet_directory_uri().'/style.css');\n\t\t\n\t\t//Responsive?\n\t\tif(isset($themeoptions[\"tb_longwave_responsive_active\"])){\n\t\t\twp_enqueue_style( 'tb_mediaquery_style',T_CSS.'/media-queries.css');\n\t\t}\n\t\t\n\n\t\t//Google Font\n\t\t$google_font = $themeoptions[\"tb_longwave_main_font\"];\n\t if(!empty($google_font)) wp_enqueue_style( 'tb_googlefont_style',$google_font);\n\t \n\t //Fontello Icons\n\t wp_enqueue_style( 'tb_fontello_style',T_TYPE.'/fontello.css');\n\t \n\t //Main Color Style\n\t\tif(!empty($themeoptions[\"tb_longwave_main_style\"])) wp_enqueue_style( 'tb_longwave_main_style',T_CSS.\"/\".$themeoptions[\"tb_longwave_main_style\"].\".css\");\n\t\t \n\t \n\t// Enqueue the Theme JS \n\t\t\n\t\t//Navigation\n\t\twp_enqueue_script('tb_ddsmoothmenu_script', T_JS.\"/ddsmoothmenu.js\", array('jquery'),false,true);\n\t\twp_enqueue_script('tb_selectnav_script', T_JS.\"/selectnav.js\", array('jquery'),false,true);\n\t\t\n\t\t//Basics\n\t\twp_enqueue_script('tb_easytabs_script', T_JS.\"/jquery.easytabs.min.js\", array('jquery'),false,true);\n\t\twp_enqueue_script('tb_hoverdir_script', T_JS.\"/jquery.hoverdir.min.js\", array('jquery'),false,true);\n\t\twp_enqueue_script('tb_isotope_script', T_JS.\"/jquery.isotope.min.js\", array('jquery'),false,true);\n\t\twp_enqueue_script('tb_twitter_script', T_JS.\"/twitter.min.js\", array('jquery'),false,true);\n\t\twp_enqueue_script('tb_fitvids_script', T_JS.\"/jquery.fitvids.js\", array('jquery'),false,true);\n\t\twp_enqueue_script('tb_jribble_script', T_JS.\"/jquery.jribbble-0.11.0.ugly.js\", array('jquery'),false,true);\t\t\n\t\twp_enqueue_script('tb_sharrre_script', T_JS.\"/jquery.sharrre-1.3.3.php\", array('jquery'),false,true);\t\t\n\t\twp_enqueue_script('tb_portfolio_script', T_JS.\"/jquery.sliderportfolio.js\", array('jquery'),false,true);\n\t\twp_enqueue_script('tb_retina_script', T_JS.\"/retina.js\", array('jquery'),false,true);\t\n\t\t\t\t\t\n\t\t//Main Script\n\t\twp_enqueue_script('tb_longwave_script', T_JS.\"/scripts.js\", array('jquery'),false,true);\n\t\t\n\t\t//Comments\n\t\tif(is_singular() && get_option(\"thread_comments\")) wp_enqueue_script(\"comment-reply\");\n\t\t\n\t}\n}", "title": "" }, { "docid": "e38bd19afc7e87c1a46e44b6d3d00026", "score": "0.641227", "text": "function add_admin_styles(){\n\t?>\t\n\t<script type=\"text/javascript\" src=\"<?php echo BBO_POSTS_URL ?>scripts.js\"></script>\n\t<script type=\"text/javascript\" src=\"<?php echo BBO_POSTS_URL ?>smille-script.js\"></script>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"<?php echo BBO_POSTS_URL ?>styles.css\" />\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"<?php echo BBO_POSTS_URL ?>simple-styles.css\" />\n\t<?php\n}", "title": "" }, { "docid": "e357088cf603e7c12848fa9d12f5ba4d", "score": "0.6409325", "text": "public function scripts_styles_footer() {\n\t\tif ( is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$theme_url = get_template_directory_uri();\n\t\t$fa_ver = '4.7.0';\n\t\t$fa_url = \"//maxcdn.bootstrapcdn.com/font-awesome/$fa_ver/css/font-awesome.min.css\";\n\t\t$main_js_url = $theme_url . '/js/main.min.js';\n\t\t$main_js_path = get_template_directory() . '/js/main.min.js';\n\t\t$main_js_ver = file_exists( $main_js_path ) ? filemtime( $main_js_path ) : '';\n\n\t\twp_enqueue_style( 'fa-style', $fa_url, null, $fa_ver );\n\t\twp_enqueue_style( 'gfont', 'https://fonts.googleapis.com/css?family=Handlee' );\n\t\twp_enqueue_script( 'superiocity-script', $main_js_url, null, $main_js_ver, true );\n\t}", "title": "" }, { "docid": "79274e5146170c991563f874312eddc9", "score": "0.6406477", "text": "static function include_scripts(){\n\t\t//self::include_css();\n\t\tself::include_js();\n\t}", "title": "" }, { "docid": "e4e46e7c3bf7019935567eee256cfb7b", "score": "0.63973856", "text": "protected function _css()\n\t{\n\t\tif ( !self::$_firstRun ) return '';\n\t\tself::$_firstRun = FALSE;\n\n\t\t$dir = KINT_DIR . 'view/' . ( self::$devel ? 'src/' : '' ); // load uncompressed sources if in devel mode\n\n\t\treturn '<script>' . file_get_contents( $dir . 'kint.js' ) . '</script>'\n\t\t\t. '<style>' . file_get_contents( $dir . 'kint.css' ) . '</style>';\n\t}", "title": "" }, { "docid": "5554f032b69b096370d0dc878d721ee1", "score": "0.6394749", "text": "function accelerate_child_scripts() {\r\n\twp_enqueue_style( 'accelerate-style', get_template_directory_uri() . '/style.css' );\r\n wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'accelerate-style' ));\r\n wp_enqueue_style( 'accelerate-child-google-fonts', '//fonts.googleapis.com/css?family=Londrina+Solid:400,900' );\r\n\twp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');\r\n}", "title": "" }, { "docid": "356e3ff4081d2d2f15c5b43c7e2099ae", "score": "0.6384689", "text": "public function disableCompressCss() {}", "title": "" }, { "docid": "67371b86d7c445437c8cdd5bee7951ae", "score": "0.63819903", "text": "public function css() {\r\n\t\tif ($this->cssLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.BASE_REQUEST.'/default/skin/'.pzk_app()->name.'/css/'.$this->cssLink.'.css\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page())\r\n\t\t\t\t\t$page->addObjCss($this->cssLink);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif ($this->cssExternalLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.$this->cssExternalLink.'\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page()) {\r\n\t\t\t\t\t$page->addExternalCss($this->cssExternalLink);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "e5930dc3c591a4caf00e8f6856cace2d", "score": "0.6371037", "text": "function thememount_min_css(){\n\tglobal $howes;\n\t\n\t// Checking if MIN enabled\n\tif(!is_admin()) {\n\t\tif( isset($howes['minify-css-js']) && $howes['minify-css-js']=='0' ){\n\t\t\tdefine('TM_MIN', '');\n\t\t} else {\n\t\t\tdefine('TM_MIN', '.min');\n\t\t}\n\t}\n}", "title": "" }, { "docid": "4e784402eac1c37f27f02309c2f6a593", "score": "0.63637847", "text": "private function set_styles()\n {\n\n if (count($this->assets_css['global']) > 0)\n {\n $this->template->append_metadata('<!-- BEGIN GLOBAL MANDATORY STYLES -->');\n foreach($this->assets_css['global'] as $asset)\n {\n $this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . '../../themes/public/css/' . $asset . '\" media=\"screen\" />');\n }\n }\n if (isset($this->assets_css['page_style']) && count($this->assets_css['page_style']) > 0)\n {\n $this->template->append_metadata('<!-- BEGIN PAGE STYLES -->');\n foreach($this->assets_css['page_style'] as $asset)\n {\n $this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . '../../themes/public/css/' . $asset . '\" media=\"screen\" />');\n }\n }\n\n // Webkit based browsers\n //$this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/webkit.css\" media=\"screen\" />');\n\n // Internet Explorer styles\n $this->template->append_metadata('<!--[if IE 6]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie6.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 7]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie7.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 8]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie8.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 9]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie9.css\" media=\"screen\" /><![endif]-->');\n }", "title": "" }, { "docid": "68ccff8a373123d89c3c6d6d62b47dde", "score": "0.6334348", "text": "function script_concat_settings() {\n\tglobal $concatenate_scripts, $compress_scripts, $compress_css;\n\n\t$compressed_output = ( ini_get('zlib.output_compression') || 'ob_gzhandler' == ini_get('output_handler') );\n\n\tif ( ! isset($concatenate_scripts) ) {\n\t\t$concatenate_scripts = defined('CONCATENATE_SCRIPTS') ? CONCATENATE_SCRIPTS : true;\n\t\tif ( ! is_admin() || ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) )\n\t\t\t$concatenate_scripts = false;\n\t}\n\n\t$concatenate_scripts = false;\n\t$compress_scripts = false;\n\t$compress_css = false;\n/*\tif ( ! isset($compress_scripts) ) {\n\t\t$compress_scripts = defined('COMPRESS_SCRIPTS') ? COMPRESS_SCRIPTS : true;\n\t\tif ( $compress_scripts && ( ! get_site_option('can_compress_scripts') || $compressed_output ) )\n\t\t\t$compress_scripts = false;\n\t}\n\n\tif ( ! isset($compress_css) ) {\n\t\t$compress_css = defined('COMPRESS_CSS') ? COMPRESS_CSS : true;\n\t\tif ( $compress_css && ( ! get_site_option('can_compress_scripts') || $compressed_output ) )\n\t\t\t$compress_css = false;\n\t}\n*/\n}", "title": "" }, { "docid": "9faae0f3d4d3cf129427fbd830b9d825", "score": "0.6332201", "text": "function webbusiness_scripts() {\n\twp_enqueue_style('webbusiness-style', get_stylesheet_uri());\n\twp_enqueue_style('webbusiness-framework', get_template_directory_uri() . '/css/framework.css');\n\t$style = get_theme_mod(\"style\");\n\tif (!$style || $style == \"default\") {\n\t\t$style = \"dark\";\n\t}\n\t$wp_customize = \"\";\n\tif (isset($_POST[\"wp_customize\"])) $wp_customize = $_POST[\"wp_customize\"];\n\tif ($wp_customize == \"on\") {\n\t\twp_enqueue_style('webbusiness-color-dynamic', get_template_directory_uri() . '/css/dynamic-css-customizer.php');\n\t} else {\n\t\twebbusiness_save_css();\n\t\t$uploads = wp_upload_dir();\n\t\t$uploads_dir = trailingslashit($uploads[\"basedir\"]);\n\t\t$uploads_path = trailingslashit($uploads[\"baseurl\"]);\n\t\tif (file_exists($uploads_dir . \"webbusiness.css\") /* && !$save_custom_css */) {\n\t\t\twp_enqueue_style('webbusiness-color-dynamic', $uploads_path . \"webbusiness.css\");\n\t\t} else {\n\t\t\twp_enqueue_style('webbusiness-color-dynamic', get_template_directory_uri() . '/css/dynamic-css.php');\n\t\t}\n\t}\n\n\twp_enqueue_style('webbusiness-layout', get_template_directory_uri() . '/css/webbusiness.css');\n\t\n\tif (!get_theme_mod(\"googlefonts_link\")) {\n\t\twp_enqueue_style('webbusiness-googlefonts', \"http://fonts.googleapis.com/css?family=Ubuntu\");\n\t}\n\t\n\twp_enqueue_script('webbusiness-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true);\n\n\twp_enqueue_script('webbusiness-jquery-cycle', get_template_directory_uri() . '/js/jquery.cycle.all.js', array(), '20120206', true);\n\twp_enqueue_script('webbusiness-superfish', get_template_directory_uri() . '/js/superfish.js', array(), '20120206', true);\n\twp_enqueue_script('webbusiness-tinynav', get_template_directory_uri() . '/js/tinynav.min.js', array(), '20120206', true);\n\twp_enqueue_script('webbusiness-script', get_template_directory_uri() . '/js/script.js', array(), '20120206', true);\n\twp_enqueue_script('webbusiness-retina', get_template_directory_uri() . '/js/retina-1.1.0.min.js', array(), '20120206', true);\n\twp_enqueue_script('webbusiness-modernizr', get_template_directory_uri() . '/js/modernizr-2.0.6.min.js', array(), '20120206', false);\n\n\tif (is_singular() && comments_open() && get_option('thread_comments')) {\n\t\twp_enqueue_script('comment-reply');\n\t}\n\n\tif (is_singular() && wp_attachment_is_image()) {\n\t\twp_enqueue_script('webbusiness-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array('jquery'), '20120202');\n\t}\n}", "title": "" }, { "docid": "eba9426585591c634a112fd761377e06", "score": "0.63217705", "text": "function uwmadison_frontend_assets() {\n\n\t\t// enqueue fonts CSS\n\t\t$use_verlag = get_theme_mod( 'uwmadison_use_official_uw_type', false ); \n\t\t$production_type = get_theme_mod( 'uwmadison_type_production', false ); \n\t\tif ( $use_verlag ) { \n\t\t\tif ( $production_type ) {\n\t\t\t\t// production fonts\n\t\t\t\t// TODO: Enqueu final production CloudTypography CSS link\n\t\t\t\twp_enqueue_style( 'uwmadison-production-fonts', 'https://cloud.typography.com/6462674/7207552/css/fonts.css', array(), '2.0.0' );\n\t\t\t} else {\n\t\t\t\t// development fonts\n\t\t\t\twp_enqueue_style( 'uwmadison-dev-fonts', 'https://cloud.typography.com/6462674/6639152/css/fonts.css', array(), '2.0.0' );\n\t\t\t}\n\t\t}\n\n\t\twp_enqueue_script( 'uwmadison-theme', get_template_directory_uri().'/js/uwmadison-theme.min.js', array('jquery'), '2.0.0', TRUE );\n\n\t\t// enqueue CSS based om environment; defaults to minified\n\t\t// uncomment the line below if you want unminified CSS\n\t\t// Define WP_ENV in wp-config.php to be \"development\" if \n\t\t// you want sourcemapped CSS\n\t\t$css_file = \"style.min.css\";\n\t\t// $css_file = \"style.css\";\n\t\tif ( defined('WP_ENV') && WP_ENV == \"development\") {\n\t\t\t$css_file = \"style-sourcemapped.css\";\n\t\t}\n\t\twp_enqueue_style( 'uwmadison-theme', get_template_directory_uri().\"/$css_file\", array(), '2.0.0' );\n\n\t\tif ( get_theme_mod( 'uwmadison-lightbox-images', true ) ) {\n\t\t\twp_enqueue_script( 'uwmadison-lightbox', get_template_directory_uri().'/js/uwmadison-lightbox.min.js', array('jquery'), '2.0.0', TRUE );\n\t\t\twp_enqueue_style( 'uwmadison-lightbox', get_template_directory_uri().'/css/uwmadison-lightbox.min.css', array('uwmadison-theme'), '2.0.0' );\n\t\t}\n\t\t\n\t\twp_enqueue_style( 'uwmadison-theme-print', get_template_directory_uri().\"/css/print.css\", array(), '2.0.0', 'print' );\n\n\t}", "title": "" }, { "docid": "2c1adb11eb47eb1b27bf8e292e8158a6", "score": "0.6319019", "text": "function styles() {\n\t/**\n\t * Flag whether to enable loading uncompressed/debugging assets. Default false.\n\t *\n\t * @param bool project_style_debug\n\t */\n\t$debug = apply_filters( 'project_style_debug', false );\n\t$min = ( $debug || defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\twp_enqueue_style(\n\t\t'project',\n\t\tProject_URL . \"/assets/css/project-theme{$min}.css\",\n\t\tarray(),\n\t\tProject_VERSION\n\t);\n}", "title": "" }, { "docid": "c962f02e041592ab0e8833e5cf1447cc", "score": "0.6309158", "text": "public function js_css_public(){\n\n wp_enqueue_style('asRange', plugin_dir_url(__FILE__). 'libs/assets/css/asRange.min.css', false, $this->version());\n wp_enqueue_style('select2', plugin_dir_url(__FILE__). 'libs/assets/css/select2.min.css', false, $this->version());\n wp_enqueue_style('flatpickr', plugin_dir_url(__FILE__). 'libs/assets/css/flatpickr.min.css', false, $this->version());\n wp_enqueue_style('metform-ui', plugin_dir_url(__FILE__). 'libs/assets/css/metform-ui.css', false, $this->version());\n wp_enqueue_style('font-awesome', plugin_dir_url(__FILE__). 'libs/assets/css/font-awesome.min.css', false, $this->version());\n wp_enqueue_style('metform-style', plugin_dir_url(__FILE__). 'libs/assets/css/style.css', false, $this->version());\n \n wp_enqueue_script('asRange', plugin_dir_url(__FILE__) . 'libs/assets/js/jquery-asRange.min.js', array(), $this->version(), true);\n wp_enqueue_script('select2', plugin_dir_url(__FILE__) . 'libs/assets/js/select2.min.js', array(), $this->version(), true);\n wp_enqueue_script('flatpickr', plugin_dir_url(__FILE__) . 'libs/assets/js/flatpickr.js', array(), $this->version(), true);\n \n wp_register_script('recaptcha', 'https://www.google.com/recaptcha/api.js?onload=onloadMetFormCallback&render=explicit', array(), $this->version(), true);\n wp_enqueue_script('metform-submission', plugin_dir_url(__FILE__) . 'libs/assets/js/submission.js', array(), $this->version(), true);\n \n\n }", "title": "" }, { "docid": "8ca8ed9763923ccd802261637252ce74", "score": "0.63083524", "text": "function load_dev_styles_scripts() {\n // Theme styles\n wp_enqueue_style( 'themename', CHILD_SS_URI . '/assets/dev/style.css', false, null, 'all' );\n\n // Header Scripts\n wp_enqueue_script( 'header_scripts', CHILD_SS_URI . '/assets/dev/header.js', array(), null, false );\n\n // Footer Scripts\n wp_enqueue_script( 'footer_scripts', CHILD_SS_URI . '/assets/dev/footer.js', array( 'jquery' ), null, true );\n\n // Single Scripts\n if ( is_single() ) {\n wp_enqueue_script( 'single_scripts', CHILD_SS_URI . '/assets/dev/single.js', array( 'jquery' ), null, true );\n }\n}", "title": "" }, { "docid": "0429e64be504bf7c2b1a8d2f7e731ea4", "score": "0.63000816", "text": "private function \t\t\t\tbuild_style_tags() {\n\t\t$load=array(\n\t\t\t\"assets/css/bootstrap/bootstrap-grid.min.css\",\n\t\t\t\"assets/css/bootstrap/bootstrap-reboot.min.css\",\n\t\t\t\"assets/css/bootstrap/bootstrap.min.css\",\n\t\t\t\"assets/css/fontawesome/all.min.css\",\n\t\t\t\"assets/css/style.css\"\n\t\t);\n\n\n\t\treturn array_reduce(array_unique(array_merge($load, $this->section_css)), function($_acum, $_item) {\n\t\t\t$_acum.=<<<R\n\n\t\t<link rel=\"stylesheet\" title=\"estilos\" type=\"text/css\" href=\"{$_item}\" media=\"screen\" />\nR;\n\t\t\treturn $_acum;\n}, '');\n\t}", "title": "" }, { "docid": "55bb3f18f30ca86fc0f80bc29ea81f78", "score": "0.6295911", "text": "function admin_include_scripts() {\n\n\t\t\twp_register_style('wa_wcc_admin',get_template_directory_uri().'/plugin/collapse/assets/css/admin.css');\n\t\t\twp_enqueue_style('wa_wcc_admin');\n\n\t}", "title": "" }, { "docid": "bb5c9083c6a0b63f25d7025cf61cb271", "score": "0.6288414", "text": "function cssAndJs() {\r\n\t\t$siteurl = get_bloginfo('wpurl');\r\n\t\t// include css in any case. e.g. for widget\r\n\t\tprint '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$siteurl.'/wp-content/plugins/uwr1results/uwr1results.css\" />'.\"\\n\";\r\n\t\tif (!defined('IS_UWR1RESULTS_VIEW')) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$siteurlPath = substr($siteurl, strlen('http://'.$_SERVER['HTTP_HOST']));\r\n\t\tif ('/' != $siteurlPath{0}) {\r\n\t\t\t$siteurlPath = '/'.$siteurlPath;\r\n\t\t}\r\n\t\t//print '<script type=\"text/javascript\" src=\"'.$siteurl.'/wp-content/plugins/uwr1results/uwr1results.js.php?siteurl='.urlencode($siteurlPath)./*($https?'ssl=1':'').*/'\"></script>'.\"\\n\";\r\n\t}", "title": "" }, { "docid": "b115369365d71b8c0198437097a165ed", "score": "0.62828", "text": "function wagw_scripts() {\n\t\t$theme = wp_get_theme();\n\t\t$ver = $theme->get( 'Version' );\n\t$themecsspath = get_stylesheet_directory() . '/style.css';\n\t$style_ver = filemtime( $themecsspath );\n\twp_enqueue_style( 'wagw-style', get_stylesheet_uri(),array(),$style_ver );\n\n\twp_enqueue_script( 'wagw-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );\n\n\twp_enqueue_script( 'wagw-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\n\twp_enqueue_script( 'thickbox', true );\n\twp_enqueue_style( 'thickbox' );\n\n\tif ( is_page_template( 'slider-page.php' ) ) {\n\t\twp_enqueue_style( 'flexslider-css', get_stylesheet_directory_uri() . '/flexslider/flexslider.css' );\n\t}\n\n}", "title": "" }, { "docid": "51be865ec3b8007459d235fea6d3fd6b", "score": "0.62814474", "text": "function _s_scripts() {\n\twp_enqueue_style( 'main.css', get_stylesheet_directory_uri() . '/dist/src/style.css', false, '6.9' );\n\twp_enqueue_script( 'main.js', get_stylesheet_directory_uri() . '/dist/main.js', false, false, true );\n}", "title": "" }, { "docid": "1111f79ec0ef23659c3c1c29c1d7b8ec", "score": "0.62790924", "text": "function farmhouse_enqueue_scripts_styles() {\n\n wp_enqueue_style(\n genesis_get_theme_handle() . '-fonts',\n '//fonts.googleapis.com/css2?family=Montserrat:wght@500&family=Nanum+Myeongjo:wght@400;800&display=swap',\n [],\n null\n );\n\n wp_enqueue_style( 'dashicons' );\n\n wp_enqueue_script(\n 'farmhouse-block-effects',\n get_stylesheet_directory_uri() . '/assets/js/block-effects.js',\n array(),\n filemtime( get_stylesheet_directory() . '/assets/js/block-effects.js' ),\n true\n );\n\n $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n wp_enqueue_script(\n genesis_get_theme_handle() . '-smooth-scroll',\n get_stylesheet_directory_uri() . '/assets/js/smooth-scroll.js',\n [ 'jquery' ],\n filemtime( get_stylesheet_directory() . \"/assets/js/smooth-scroll{$suffix}.js\" ),\n true\n );\n\n if ( class_exists( 'FacetWP' ) ) {\n wp_enqueue_style(\n genesis_get_theme_handle() . '-facetwp',\n get_stylesheet_directory_uri() . '/lib/facetwp/facetwp.css',\n [ genesis_get_theme_handle() ],\n genesis_get_theme_version()\n );\n }\n\n // Setup page if has top banner.\n if ( get_theme_mod( 'farmhouse-top-banner-visibility', true ) ) {\n\n wp_enqueue_script(\n 'top-banner-js',\n get_stylesheet_directory_uri() . \"/assets/js/top-banner{$suffix}.js\",\n array( 'jquery' ),\n filemtime( get_stylesheet_directory() . \"/assets/js/top-banner{$suffix}.js\" ),\n true\n );\n\n }\n\n}", "title": "" }, { "docid": "113874247813a71c09f6d18b286cd25a", "score": "0.6267401", "text": "public function register_styles_scripts(){\n\t\t\tglobal $eventon_rs;\n\t\t\t\n\t\t\tif(is_admin()) return false;\n\t\t\t\n\t\t\t$evOpt = evo_get_options('1');\n\t\t\tif( evo_settings_val('evcal_concat_styles',$this->evoopt1, true))\n\t\t\t\twp_register_style( 'evo_RS_styles',$eventon_rs->assets_path.'RS_styles.css', '', $eventon_rs->version);\n\t\t\t\n\t\t\twp_register_script('evo_RS_script',$eventon_rs->assets_path.'RS_script.js', \n\t\t\t\tarray('jquery','jquery-ui-core'), \n\t\t\t\t$eventon_rs->version, true );\n\n\t\t\twp_localize_script( \n\t\t\t\t'evo_RS_script', \n\t\t\t\t'evors_ajax_script', \n\t\t\t\tarray( \n\t\t\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ) , \n\t\t\t\t\t'postnonce' => wp_create_nonce( 'evors_nonce' )\n\t\t\t\t)\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "506c694b431f43ce5411cda6211e2bde", "score": "0.6263624", "text": "function load_prod_styles_scripts() {\n // Theme styles\n wp_enqueue_style( 'themename', CHILD_SS_URI . '/assets/dist/style.min.css', false, null, 'all' );\n\n // Header Scripts\n wp_enqueue_script( 'header_scripts', CHILD_SS_URI . '/assets/dist/header.min.js', array(), null, false );\n\n // Footer Scripts\n wp_enqueue_script( 'footer_scripts', CHILD_SS_URI . '/assets/dist/footer.min.js', array( 'jquery' ), null, true );\n\n // Single Scripts\n if ( is_single() ) {\n wp_enqueue_script( 'single_scripts', CHILD_SS_URI . '/assets/dist/single.min.js', array( 'jquery' ), null, true );\n }\n}", "title": "" }, { "docid": "b87c27def9572984d465d8cebe752574", "score": "0.62635225", "text": "public function enqueue_scripts() {\n\t\twp_add_inline_style( 'at-main', $this->inline_css() );\n\t}", "title": "" }, { "docid": "1e6f1dacf0732fa7f4f5531bf3cc3b8b", "score": "0.626321", "text": "public function minify() {\n\t\tif (!$this->cacheFolder()) {\n\t\t\t$this->modx->log(modX::LOG_LEVEL_ERROR, '[MinifyX] Could not create cache dir \"'.$this->config['cacheFolder'].'\"');\n\t\t\treturn;\n\t\t}\n\n\t\t$cacheFolderUrl = DIRECTORY_SEPARATOR . str_replace(MODX_BASE_PATH, '', $this->config['cacheFolder']);\n\t\t$time = time();\n\n\t\tif ($js = $this->prepareFiles($this->config['jsSources'], 'js')) {\n\t\t\t$js = $this->Munee($js, array(\n\t\t\t\t'minify' => $this->config['minifyJs'] ? 'true' : 'false',\n\t\t\t));\n\n\t\t\tif (!empty($js)) {\n\t\t\t\t$file = $this->config['jsFilename'] . '_' . $time . $this->config['jsExt'];\n\t\t\t\tfile_put_contents($this->config['cacheFolder'] . $file, $js);\n\t\t\t}\n\t\t\telseif (count($this->current['js'])) {\n\t\t\t\t$tmp = array_pop($this->current['js']);\n\t\t\t\t$file = $tmp['file'];\n\t\t\t}\n\n\t\t\tif (!empty($file)) {\n\t\t\t\tif ($this->config['registerJs'] == 'placeholder' && !empty($this->config['jsPlaceholder'])) {\n\t\t\t\t\t$this->modx->setPlaceholder(\n\t\t\t\t\t\t$this->config['jsPlaceholder'],\n\t\t\t\t\t\t'<script type=\"text/javascript\" src=\"' . $cacheFolderUrl . $file . '\"></script>'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telseif ($this->config['registerJs'] == 'startup') {\n\t\t\t\t\t$this->modx->regClientStartupScript($cacheFolderUrl . $file);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->modx->regClientScript($cacheFolderUrl . $file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($css = $this->prepareFiles($this->config['cssSources'], 'css')) {\n\t\t\t$css = $this->Munee($css, array(\n\t\t\t\t'minify' => $this->config['minifyCss'] ? 'true' : 'false',\n\t\t\t));\n\n\t\t\tif (!empty($css)) {\n\t\t\t\t$file = $this->config['cssFilename'] . '_' . $time . $this->config['cssExt'];\n\t\t\t\tfile_put_contents($this->config['cacheFolder'] . $file, $css);\n\t\t\t}\n\t\t\telseif (count($this->current['css'])) {\n\t\t\t\t$tmp = array_pop($this->current['css']);\n\t\t\t\t$file = $tmp['file'];\n\t\t\t}\n\n\t\t\tif (!empty($file)) {\n\t\t\t\tif ($this->config['registerCss'] == 'placeholder' && !empty($this->config['cssPlaceholder'])) {\n\t\t\t\t\t$this->modx->setPlaceholder(\n\t\t\t\t\t\t$this->config['cssPlaceholder'],\n\t\t\t\t\t\t'<link rel=\"stylesheet\" href=\"' . $cacheFolderUrl . $file . '\" type=\"text/css\" />'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->modx->regClientCSS($cacheFolderUrl . $file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->current as $tmp) {\n\t\t\tforeach ($tmp as $tmp2) {\n\t\t\t\tunlink($this->config['cacheFolder'] . $tmp2['file']);\n\t\t\t}\n\t\t}\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "0d736e77d1dc0951baa8d36e6791ba98", "score": "0.6259235", "text": "function wpdocs_scripts_method() {\n\twp_enqueue_script( 'html5shiv.js', EBOR_THEME_DIRECTORY . 'style/js/html5shiv.js', array( 'jquery' ), $version, false );\n\twp_enqueue_script( 'es6-shim.min.js', EBOR_THEME_DIRECTORY . 'style/js/es6-shim.min.js', array( 'jquery' ), $version, false );\n\twp_enqueue_script( 'smooth-scroll.min.js', EBOR_THEME_DIRECTORY . 'style/js/smooth-scroll.min.js' );\n\twp_enqueue_script( 'smooth-scroll.polyfills.min.js', EBOR_THEME_DIRECTORY . 'style/js/smooth-scroll.polyfills.min.js' );\n}", "title": "" }, { "docid": "7767489d7b4fd2a5da04876fb07180bf", "score": "0.6256471", "text": "protected function addFilteringJsAndCss()\n {\n $this->setStylesheets('');\n $this->setJavascripts('');\n }", "title": "" }, { "docid": "70f4389efb95054742850fa944c2fd08", "score": "0.6253962", "text": "public function getCompressCss() {}", "title": "" }, { "docid": "d6d5de7fc1d9bf2b4c2427950a72a470", "score": "0.6248805", "text": "public function loadScripts() {\n $graphcss = $this->getProperty('graphcss');\n $customcss = $this->getProperty('customcss');\n $loadjquery = $this->getProperty('loadjquery');\n\n $cssUrl = $this->sekug->config['cssUrl'].'web/';\n $jsUrl = $this->sekug->config['jsUrl'].'web/';\n\n if($loadjquery == 1){\n $this->modx->regClientStartupScript($jsUrl.'libs/'.$this->sekug->config['jqueryFile']);\n }\n if($customcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$customcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'gallery.structure.css');\n }\n if($graphcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$graphcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'directory.graph.css');\n }\n }", "title": "" }, { "docid": "00afa5289f4c7a310a453a800bb56bbc", "score": "0.6247163", "text": "function ct_remove_assets() {\n wp_dequeue_style( 'bigcommerce-styles' );\n\n if ( ct_is_pagespeed() ) {\n wp_dequeue_script( 'bigcommerce-manifest' );\n wp_dequeue_script( 'bigcommerce-vendors' );\n wp_dequeue_script( 'bigcommerce-scripts' );\n } else {\n wp_enqueue_script( 'smile.io', 'https://cdn.sweettooth.io/assets/storefront.js', array(), '1.0', true );\n }\n}", "title": "" }, { "docid": "d8f56d7ce2897a1c3c860738e7bd77f0", "score": "0.6246286", "text": "function studeon_vc_frontend_scripts() {\n\t\tif (studeon_exists_visual_composer()) {\n\t\t\tif (studeon_is_on(studeon_get_theme_option('debug_mode')) && studeon_get_file_dir('plugins/js_composer/js_composer.css')!='')\n\t\t\t\twp_enqueue_style( 'studeon-js-composer', studeon_get_file_url('plugins/js_composer/js_composer.css'), array(), null );\n\t\t}\n\t}", "title": "" }, { "docid": "0aef6796637dd7f2818ed40cb5e178c3", "score": "0.6240791", "text": "function alm_filters_admin_enqueue_scripts(){\n\t \t$screen = get_current_screen();\n\t \t// Only load on settings page\n\t \tif($screen->base === 'toplevel_page_ajax-load-more'){\n \t\twp_enqueue_style( 'alm-filters-frontend', ALM_FILTERS_URL. '/dist/css/styles.css', '');\n \t}\n \t}", "title": "" }, { "docid": "b91b940198b42ecaa5496081b11168dd", "score": "0.6239836", "text": "private function _include_jscss()\n {\n if (!$this->cache['jscss'])\n {\n $styles = '<style type=\"text/css\">' . file_get_contents(PATH_THIRD . '/vz_regulator/assets/styles.min.css') . '</style>' . NL;\n $scripts = '<script type=\"text/javascript\">// <![CDATA[ ' . file_get_contents(PATH_THIRD . '/vz_regulator/assets/scripts.min.js') . ' // ]]></script>';\n $this->EE->cp->add_to_head($styles . $scripts);\n\n $this->cache['jscss'] = TRUE;\n }\n }", "title": "" }, { "docid": "e0f826fbe573a5f1575c584e0a3b7354", "score": "0.6233357", "text": "function tcsn_theme_scripts_styles() {\n\n\t\twp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/modernizr.min.js', array('jquery'), '2.6.2', false );\n\t\twp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '3.0.2', true );\n\t\twp_enqueue_script( 'theme-scripts', get_template_directory_uri() . '/js/theme-scripts.js', array('jquery'), '1.0.0', true );\n\t\twp_enqueue_script( 'theme-custom', get_template_directory_uri() . '/js/custom.js', array('jquery'), '1.0.0', true );\n\t\twp_enqueue_style( 'bootstrap-style', get_template_directory_uri() . '/css/bootstrap.css', null, '3.0.2', 'all' );\n\t\twp_enqueue_style( 'font', get_template_directory_uri() . '/css/iconfont.css' );\n\t\twp_enqueue_style( 'style-main', get_stylesheet_directory_uri() . '/style.css', null, '1.0.0' );\n\t\twp_enqueue_style( 'prettyPhoto-style', get_template_directory_uri() . '/css/prettyPhoto.css', null, '3.1.4', 'all ');\n\t\twp_enqueue_style( 'owlcarousel-style', get_template_directory_uri() . '/css/owl.carousel.css' );\n\t\twp_enqueue_style( 'elastislide-style', get_template_directory_uri() . '/css/elastislide.css', null, '1.0.0', 'all' );\n\t\twp_enqueue_style( 'isotope-style', get_template_directory_uri() . '/css/isotope.css', null, '1.5.25' );\n\t\twp_enqueue_style( 'bootstrap-override', get_template_directory_uri() . '/css/bootstrap-override.css', null, '1.0.0' );\n\t\twp_enqueue_style( 'rev-custom-style', get_template_directory_uri() . '/css/rev-custom.css', null, '1.0.0', 'all' );\n\t\twp_enqueue_style( 'responsive', get_template_directory_uri() . '/css/responsive.css', null, '1.0.0', 'all' );\n\t\t\n\t\t\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n\t\t\n\t\t// To disable responsiveness\n\t\twp_register_style( 'bootstrap-nonrs-style', get_template_directory_uri() . '/css/non-responsive.css', null, '1.0.0', 'all' );\n\t\tglobal $smof_data;\n\t\tif( $smof_data['tcsn_layout_responsive'] == 0 ) {\n\t\t\twp_enqueue_style( 'bootstrap-nonrs-style' );\n\t\t}\n}", "title": "" }, { "docid": "17da2b8c213e2c99c3fac859bad42739", "score": "0.62301725", "text": "function styles( $debug = false ) {\n\t$min = ( $debug || defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\twp_enqueue_style(\n\t\t'wpd',\n\t\tWPDOC_HLTR_TEMPLATE_URL . \"/assets/css/wp-documenter{$min}.css\",\n\t\tarray(),\n\t\tWPDOC_HLTR_VERSION\n\t);\n\n\twp_enqueue_style( \n\t\t'prism',\n\t\tWPDOC_HLTR_TEMPLATE_URL . \"/assets/css/prism.css\",\n\t\tarray(),\n\t\tWPDOC_HLTR_VERSION\n\t);\n}", "title": "" }, { "docid": "590060a42172306cb29476933fa97b06", "score": "0.6226453", "text": "function scripts() {\n\t/**\n\t * Flag whether to enable loading uncompressed/debugging assets. Default false.\n\t *\n\t * @param bool project_script_debug\n\t */\n\t$debug = apply_filters( 'project_script_debug', false );\n\t$min = ( $debug || defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\twp_enqueue_script(\n\t\t'modernizr-custom',\n\t\tProject_TEMPLATE_URL . '/assets/js/vendor/modernizr-custom.min.js',\n\t\tfalse, '2.7.2'\n\t);\n\twp_enqueue_script(\n\t\t'project',\n\t\tProject_TEMPLATE_URL . \"/assets/js/project-theme{$min}.js\",\n\t\tarray(),\n\t\tProject_VERSION,\n\t\ttrue\n\t);\n}", "title": "" }, { "docid": "29688b55d4d99a82f46de8574a93d087", "score": "0.6217986", "text": "function inject_scripts() {\n\n\tglobal $wp_styles, $wp_scripts;\n\n\t//Default way of loading styles. Version number added to ensure\n\t//the correct version is sent to the client regardless of caching.\n\twp_register_style( 'style', get_stylesheet_uri(), false, '1.0.0' );\n\twp_enqueue_style( 'style' );\n\n\t// Adds an ie8 and below stylesheet:\t\n\twp_enqueue_style( 'ie8_style', get_stylesheet_directory_uri() . '/css/ie8.css', array( 'style' ) );\n\twp_style_add_data( 'ie8_style', 'conditional', 'lte IE 8' );\n\n\n\t$js_dir = get_template_directory_uri() . '/js';\n\t$js_libs = $js_dir . '/bower_components';\n\n\t//Loads requirejs, all scripts are set true to push them into the footer:\n\twp_enqueue_script( 'requrejs', $js_libs . '/requirejs/require.js', array(), '', true );\n\n\n\t//config file that depends on requirejs.\n\twp_register_script( 'optimize', $js_dir . '/optimize.min.js', '', '', true );\n\n\n\t//Creates a json object so the configjs knows its directory. \n\twp_localize_script( 'optimize', 'dir', array(\n\t\t'path'\t\t=> $js_dir,\n\t\t'ajax_url'\t=> admin_url( 'admin-ajax.php' )\n\t));\n\n\n\twp_enqueue_script( 'optimize', '', '', '', true );\n\n\t// Styles for the lightbox plugin.\n\twp_register_style('lightbox-style', $js_libs . '/lightbox2/dist/css/lightbox.min.css' );\n\twp_enqueue_style( 'lightbox-style' );\n\n}", "title": "" }, { "docid": "33ed0d1938428950cd76a16ae5fe9664", "score": "0.6211121", "text": "function cs_style_and_scripts() {\n \n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/vendor.css' );\n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/app.css' );\n wp_enqueue_style( 'main-css', get_stylesheet_uri() );\n\n /*wp_enqueue_script( 'myscripts', get_stylesheet_directory_uri() . '/assets/js/app.js', '', '1.0.0', true );\n wp_localize_script('myscripts', 'cs_obj', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n ));*/\n\n }", "title": "" }, { "docid": "a06ee15db4ba810436cfb2ddae299de5", "score": "0.62103295", "text": "protected function generateCSS() {}", "title": "" }, { "docid": "1b3ee704c1d978f8fe8adb2bc38db9cb", "score": "0.6208323", "text": "public function compile() {\n\t\t\n\t\t$path = $this -> _front ->getApp() ->getConfig() ->controller ->module ->path;\n\t\t$path .= $this -> _front ->getApp() ->getConfig() ->subdomain ? $this -> _front ->getApp() ->getConfig() ->subdomain . DIRECTORY_SEPARATOR : '';\n\t\t$path .= \\FMW\\Utilities\\File\\Util::rslash( $this -> _front ->getRouter() ->getModule() ) . 'cache';\n\t\t\n\t\t$fcache = new FileCache(array(\n\t\t\t\t'path' \t=> $path,\n\t\t\t\t'ext' \t=> 'js'\n\t\t\t)\n\t\t);\n\t\t\n\t\tif ( $fcache->contains( $this -> _front ->getRouter() ->getController() ) === false ) {\n\t\t\t\n\t\t\t$js = '';\n\t\t\t\n\t\t\tforeach ($this->_javascriptCache as $value) {\n\t\t\t\t$js .= file_get_contents( $value );\n\t\t\t}\n\t\t\t\n\t\t\t$js = \\FMW\\Utilities\\Minify\\JSMin::minify($js);\n\t\t\t$fcache->save( $this -> _front ->getRouter() ->getController(), $js, $this->_cachetime );\n\t\t\t\n\t\t}\n\n\t\t$fcache = new FileCache(array(\n\t\t\t\t'path' \t=> $path,\n\t\t\t\t'ext' \t=> 'css'\n\t\t\t)\n\t\t);\n\t\t\n\t\tunset($js);\n\t\t\n\t\tif ( $fcache->contains( $this -> _front ->getRouter() ->getController() ) === false ) {\n\t\t\t\n\t\t\t$css = \\FMW\\Utilities\\Minify\\CSSMin::minify( $this->_cssCache, $this->_front->getApp()->getConfig() );\n\t\t\t\n\t\t\t$fcache->save( $this -> _front ->getRouter() ->getController(), $css, $this->_cachetime );\n\t\t\t\t\n\t\t}\n\t\t\n\t\tunset($css);\n\t}", "title": "" }, { "docid": "d99aebbbb7b57506963a5646ee469b8a", "score": "0.62081826", "text": "function assets(){\n\t\t\twp_enqueue_style( 'sp-2020-styles', get_template_directory_uri() .'/assets/css/main.css', array(), SPUTZNIK_2020_THEME_VERSION );\n\t\t\twp_enqueue_script( 'sp-2020-js', get_template_directory_uri() . '/assets/js/main.js', array('jquery'), SPUTZNIK_2020_THEME_VERSION, true );\n\n\t\t}", "title": "" }, { "docid": "74ed3a51e74975a3458a23620dbbbb4e", "score": "0.6205089", "text": "function load_js_css() {\n\n\t\t\twp_register_script( 'fontawesome-all', get_stylesheet_directory_uri() . '/js/fontawesome-all.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'owl', get_stylesheet_directory_uri() . '/js/owl.carousel.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'selectric', get_stylesheet_directory_uri() . '/js/jquery.selectric.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'select', get_stylesheet_directory_uri() . '/js/select.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'jquery-ui', get_stylesheet_directory_uri() . '/js/jquery-ui.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'tab_menu', get_stylesheet_directory_uri() . '/js/tab_menu.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'aos', get_stylesheet_directory_uri() . '/js/aos.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'rangeslider', get_stylesheet_directory_uri() . '/js/rangeslider.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'bootstrap', get_stylesheet_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'easymap', get_stylesheet_directory_uri() . '/js/easymap.plugin.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'markerclusterer', get_stylesheet_directory_uri() . '/js/markerclusterer.min.js', array(), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'customscrollbar', get_stylesheet_directory_uri() . '/js/jquery.mCustomScrollbar.concat.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'ddslick', get_stylesheet_directory_uri() . '/js/jquery.ddslick.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'project045-main', get_stylesheet_directory_uri() . '/js/main.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\n\t\t\twp_enqueue_script( 'fontawesome-all' );\n\t\t\twp_enqueue_script( 'owl' );\n\t\t\twp_enqueue_script( 'selectric' );\n\t\t\twp_enqueue_script( 'select' );\n\t\t\twp_enqueue_script( 'jquery-ui' );\n\t\t\twp_enqueue_script( 'tab_menu' );\n\t\t\twp_enqueue_script( 'aos' );\n\t\t\twp_enqueue_script( 'rangeslider' );\n\t\t\twp_enqueue_script( 'bootstrap' );\n\t\t\twp_enqueue_script( 'easymap' );\n\t\t\twp_enqueue_script( 'markerclusterer' );\n\t\t\twp_enqueue_script( 'customscrollbar' );\n\t\t\twp_enqueue_script( 'ddslick' );\n\t\t\twp_enqueue_script( 'project045-main' );\n\n\t\t}", "title": "" }, { "docid": "00e500352ec186d8529d785713e364ca", "score": "0.6199375", "text": "function add_style_script(){\r\n wp_enqueue_style('glv-style', plugins_url(\"GLV-Prospectos/admin/include/css/\").'glv-style.css');\r\n wp_enqueue_style('select2-style', plugins_url(\"GLV-Prospectos/admin/include/css/\").'select2.css');\r\n wp_enqueue_script('select-script', plugins_url(\"GLV-Prospectos/admin/include/js/\").'select2.js');\r\n wp_enqueue_script('glv-script', plugins_url(\"GLV-Prospectos/admin/include/js/\").'function.js');\r\n \r\n }", "title": "" }, { "docid": "cea39c4345b28c053384e986a06cb6c1", "score": "0.61989987", "text": "public function wcufd_load_styles_scripts() {\n //main script file of the plugin\n wp_register_script( 'wcufd-front-end-js', plugins_url( 'js/wcufd-script.js',__FILE__ ), array('jquery'), '', true );\n wp_localize_script( 'wcufd-front-end-js', 'wcufd_vars', array(\n 'ajaxurl' => admin_url('admin-ajax.php'),\n 'current_user_can' => current_user_can('administrator')\n )\n );\n wp_register_style( 'wcufd-front-end-style', plugins_url( 'css/wcufd-style.css',__FILE__ ) );\n }", "title": "" }, { "docid": "6605b34d5c6f6714bfd60432818a2bbb", "score": "0.6194773", "text": "function accvent_scripts() {\n\t wp_enqueue_style( 'main', get_stylesheet_uri() );\n\t wp_enqueue_script( 'bundle', get_template_directory_uri() . '/js/build.min.js', array(), '1.0.0', true );\n\t}", "title": "" }, { "docid": "a1feb248d9681783ce811491f083ad80", "score": "0.61940336", "text": "public function theme_scripts() {\n\t\t$suffix = !TALEMY_DEV_MODE ? '.min' : '';\n\n\t\t// stylesheets\n\t\twp_register_style(\n\t\t\t'font-awesome-5-all',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/font-awesome/css/all.min.css',\n\t\t\tfalse,\n\t\t\t'5.10.1'\n\t\t);\n\n\t\twp_register_style(\n\t\t\t'font-awesome-5-shim',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/font-awesome/css/v4-shims.min.css',\n\t\t\tfalse,\n\t\t\t'5.10.1'\n\t\t);\n\t\t\n\t\twp_register_style(\n\t\t\t'fancybox',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/css/fancybox.min.css'\n\t\t);\n\n\t\twp_register_style(\n\t\t\t'talemy',\n\t\t\tTALEMY_THEME_URI . 'assets/css/style'. $suffix . '.css',\n\t\t\tfalse,\n\t\t\tTALEMY_THEME_VERSION\n\t\t);\n\n\t\twp_enqueue_style( 'font-awesome-5-all' );\n\t\twp_enqueue_style( 'font-awesome-5-shim' );\n\t\twp_enqueue_style( 'talemy' );\n\t\twp_style_add_data( 'talemy', 'rtl', 'replace' );\n\n\t\t// scripts\n\n \twp_register_script(\n \t\t'fancybox',\n \t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.fancybox.min.js',\n \t\tarray( 'jquery' ),\n \t\tTALEMY_THEME_VERSION,\n \t\ttrue\n \t);\n\n\t\twp_register_script(\n\t\t\t'jquery-fitvids',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.fitvids.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.1',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-matchheight',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.matchHeight.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'0.7.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-placeholder',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.placeholder.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'2.3.1',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-requestanimationframe',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.requestanimationframe.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'0.2.3',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-selectric',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.selectric.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.13.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-superfish',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.superfish.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.7.10',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'jquery-throttle-debounce',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/jquery.throttle-debounce.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.1',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'resize-sensor',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/ResizeSensor.min.js',\n\t\t\tarray(),\n\t\t\tnull,\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'theia-sticky-sidebar',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/theia-sticky-sidebar.min.js',\n\t\t\tarray( 'jquery', 'resize-sensor' ),\n\t\t\t'1.7.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'talemy-modernizr',\n\t\t\tTALEMY_THEME_URI . 'assets/lib/js/modernizr.js',\n\t\t\tarray(),\n\t\t\t'3.6.0',\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'talemy-block',\n\t\t\tTALEMY_THEME_URI . 'assets/js/talemy-block.min.js',\n\t\t\tarray( 'jquery', 'imagesloaded', 'jquery-matchheight' ),\n\t\t\tTALEMY_THEME_VERSION,\n\t\t\ttrue\n\t\t);\n\n\t\twp_register_script(\n\t\t\t'talemy',\n\t\t\tTALEMY_THEME_URI . 'assets/js/talemy' . $suffix . '.js',\n\t\t\tarray(\n\t\t\t\t'jquery',\n\t\t\t\t'imagesloaded',\n\t\t\t\t'jquery-fitvids',\n\t\t\t\t'jquery-superfish',\n\t\t\t\t'jquery-selectric',\n\t\t\t\t'jquery-throttle-debounce',\n\t\t\t\t'jquery-requestanimationframe',\n\t\t\t\t'jquery-matchheight',\n\t\t\t\t'jquery-placeholder',\n\t\t\t\t'theia-sticky-sidebar',\n\t\t\t\t'talemy-modernizr'\n\t\t\t),\n\t\t\tTALEMY_THEME_VERSION,\n\t\t\ttrue\n\t\t);\n\n\t\twp_enqueue_script( 'jquery-fitvids' );\n\t\twp_enqueue_script( 'jquery-superfish' );\n\t\twp_enqueue_script( 'jquery-selectric' );\n\t\twp_enqueue_script( 'jquery-throttle-debounce' );\n\t\twp_enqueue_script( 'jquery-requestanimationframe' );\n\t\twp_enqueue_script( 'jquery-matchheight' );\n\t\twp_enqueue_script( 'jquery-placeholder' );\n\t\twp_enqueue_script( 'theia-sticky-sidebar' );\n\t\twp_enqueue_script( 'talemy-modernizr' );\n\t\twp_enqueue_script( 'talemy' );\n\t\twp_localize_script( 'talemy', 'talemy_js_data', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );\n\n\t\tif ( is_single() ) {\n\t\t\tif ( talemy_get_option( 'post_comments' ) && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t\t}\n\t\t\tif ( is_singular( 'sfwd-courses' ) ) {\n\t\t\t\twp_enqueue_style( 'fancybox' );\n\t\t\t\twp_enqueue_script( 'fancybox' );\n\t\t\t} else {\n\t\t\t\t$in_focus_mode = false;\n\t\t\t\tif ( class_exists( 'LearnDash_Settings_Section' ) ) {\n\t\t\t\t\t$in_focus_mode = LearnDash_Settings_Section::get_section_setting( 'LearnDash_Settings_Theme_LD30', 'focus_mode_enabled' );\n\t\t\t\t}\n\t\t\t\tif ( !$in_focus_mode && in_array( get_post_type(), array( 'sfwd-lessons', 'sfwd-topic' ) ) ) {\n\t\t\t\t\twp_enqueue_style( 'fancybox' );\n\t\t\t\t\twp_enqueue_script( 'fancybox' );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( is_page() && !is_front_page() ) {\n\t\t\tif ( talemy_get_option( 'page_comments' ) && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a3de8ae666de6fd8d22efe5a4e1a50d3", "score": "0.61833316", "text": "function wp_roni_photo_contest_frontend_scripts_and_styles() {\n wp_enqueue_style( 'wpphotocontest_frontend_bootstrap_css', plugins_url( 'css/bootstrap.min.css', __FILE__ ) );\n wp_enqueue_style( 'wpphotocontest_frontend_font_awesome_css', plugins_url( 'css/font-awesome.min.css', __FILE__ ) );\n wp_enqueue_style( 'wpphotocontest_frontend_lightbox_css', plugins_url( 'css/lightbox.css', __FILE__ ) );\n wp_enqueue_style( 'wpphotocontest_frontend_custom_css', plugins_url( 'css/styles.css', __FILE__ ) );\n wp_enqueue_script( 'wpphotocontest_frontend_custom_script', plugins_url( 'wp_roni_photo_contest/js/scripts.js' ), array('jquery'), '', true);\n wp_enqueue_script( 'wpphotocontest_frontend_lightbox_script', plugins_url( 'wp_roni_photo_contest/js/lightbox.js' ), array('jquery'), '', true);\n }", "title": "" }, { "docid": "30818c010cd80f39f4f022d8f0df4730", "score": "0.6180048", "text": "function cs_front_scripts_enqueue() {\n\tglobal $cs_theme_option;\n if (!is_admin()) {\n\t\twp_enqueue_style('style_css', get_template_directory_uri() . '/style.css');\n\t\twp_enqueue_style('widget_css', get_template_directory_uri() . '/css/widget.css');\n \t\tif ( $cs_theme_option['color_switcher'] == \"on\" ) {\n\t\t\twp_enqueue_style('color-switcher_css', get_template_directory_uri() . '/css/color-switcher.css');\n\t\t}\n \t\twp_enqueue_style('bootstrap_css', get_template_directory_uri() . '/css/bootstrap.min.css');\n \t\twp_enqueue_style('font-awesome_css', get_template_directory_uri() . '/css/font-awesome.css');\n\t\t// Register stylesheet\n \twp_register_style( 'ie6_css', get_template_directory_uri() . '/css/ie.css' );\n \t// Apply IE conditionals\n \t$GLOBALS['wp_styles']->add_data( 'ie6_css', 'conditional', 'lte IE 9' );\n\t\t$GLOBALS['wp_styles']->add_data( 'font-awesome-ie7_css', 'conditional', 'lte IE 9' );\n \t// Enqueue stylesheet\n \twp_enqueue_style( 'ie6_css' );\n\t\t\n\t\twp_enqueue_style( 'font-awesome-ie7_css' );\n \t\twp_enqueue_style( 'wp-mediaelement' );\n \t\t wp_enqueue_script('jquery');\n\t\t\twp_enqueue_script( 'wp-mediaelement' );\n\t\t\twp_enqueue_script('bootstrap_js', get_template_directory_uri() . '/scripts/frontend/bootstrap.min.js', '', '', true);\n\t\t\twp_enqueue_script('bscrolltofixed_js', get_template_directory_uri() . '/scripts/frontend/jquery-scrolltofixed.js', '', '', true);\n \t\t\twp_enqueue_script('jquery.nicescroll_js', get_template_directory_uri() . '/scripts/frontend/jquery.nicescroll.js', '0', '', true);\n\t\t\twp_enqueue_script('jquery.nicescrollpjus_js', get_template_directory_uri() . '/scripts/frontend/jquery.nicescroll.plus.js', '0', '', true);\n\t\t\twp_enqueue_script('functions_js', get_template_directory_uri() . '/scripts/frontend/functions.js', '0', '', true);\n \t\t\tif ( $cs_theme_option['style_rtl'] == \"on\"){\n\t\t\t\twp_enqueue_style('rtl_css', get_template_directory_uri() . '/css/rtl.css');\n \t\t\t}\n\t\t\tif \t($cs_theme_option['responsive'] == \"on\") {\n\t\t\t\techo '<meta name=\"viewport\" content=\"width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\">';\n\t\t\t\twp_enqueue_style('responsive_css', get_template_directory_uri() . '/css/responsive.css');\n\t\t\t}\n }\n}", "title": "" }, { "docid": "238f99e800cca5e6a4a6237c41213dbd", "score": "0.6179139", "text": "function jn_scripts_styles() {\n // Loads our main stylesheet.\n wp_enqueue_style( 'jn-style', get_stylesheet_uri() );\n // Loads jQuery\n\twp_enqueue_script( 'jquery' );\n\t// Loads javascript file\n wp_enqueue_script('jn-js-responsive', get_template_directory_uri() . '/js/responsive.js');\n}", "title": "" }, { "docid": "1f52ccff3cf236279df2e841be37a719", "score": "0.6169119", "text": "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "title": "" }, { "docid": "1f52ccff3cf236279df2e841be37a719", "score": "0.6169119", "text": "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "title": "" }, { "docid": "fa8d73f2ba6a75503dfb894761a9b1d2", "score": "0.616692", "text": "function head_css()\n\t{\n\t\tqa_html_theme_base::head_css();\n\t\t// if if already added widgets have a css file activated\n\t\t$styles = array();\n\t\tforeach ($this->content['widgets'] as $region_key => $regions) {\n\t\t\tforeach ($regions as $template_key => $widgets) {\n\t\t\t\t$position = strtoupper(substr($region_key,0,1) . substr($template_key,0,1) );\n\t\t\t\tforeach ($widgets as $key => $widget) {\n\t\t\t\t\t$widget_name = get_class ($widget);\n\t\t\t\t\t$widget_key = $widget_name.'_'.$position;\n\t\t\t\t\t$file = get_widget_option($widget_key, 'uw_styles');\n\t\t\t\t\t// if file existed then put it into an array to prevent duplications\n\t\t\t\t\tif($file)\n\t\t\t\t\t\t$styles[$widget_name][$file]=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// add styling files to theme\n\t\tif($styles)\n\t\t\tforeach ($styles as $widget_name => $files)\n\t\t\t\tforeach ($files as $file => $verified)\n\t\t\t\t\tif( $file != 'none' )\n\t\t\t\t\t\t$this->output('<link rel=\"stylesheet\" href=\"'.UW_URL.'widgets/'.$widget_name.'/styles/'.$file.'\"/>');\n\t}", "title": "" }, { "docid": "85100c66450fedfebb374245f2ec60af", "score": "0.61659163", "text": "public function disableConcatenateCss() {}", "title": "" }, { "docid": "ba09e10522263dff5fd11ecd60f2f0d2", "score": "0.61658704", "text": "function inhabitant_files() {\n wp_enqueue_style('inhabitant_styles', get_stylesheet_uri('/build/css/style.min.css'), NULL, microtime());\n wp_enqueue_style('fonts', \"https://fonts.googleapis.com/css?family=Lato&display=swap\");\n\nwp_enqueue_script('inhabitent-search-toggle', \nget_template_directory_uri() . '/build/js/search-toggle.min.js', \narray('jquery'), NULL, true);\n}", "title": "" }, { "docid": "3fc0802d210d6ed4b773bba644090e28", "score": "0.6160571", "text": "public function LargeStylesheetNotMinified()\n {\n\t\t//the savings in total filesize can be shared..etc. there's some work to-do.\n\t\tglobal $ft_dom;\n\t\t$code = array('');\n\t\t$elements = $ft_dom->getElementsByTagName('link');\n\t\t$code[1] = 0;\n\t\t$code[2] = '';\n foreach ($elements as $element) { \n\t\t\tif ($element->hasAttribute('href') && strpos(strtolower($element->getAttribute('href')),'.css') !==false && strpos($element->getAttribute('href'),'.min.') ===false) {\n//\t\t\tif ($element->hasAttribute('href') && strpos($element->getAttribute('href'),'.min.') ===false) {\n\t\t\t\t//if \".min.\" is in the name, don't bother :)\t\t\t\t\n\t\t\t\tif(strpos($element->getAttribute('href'),'.min.') !==false) { continue; }\n\t\t\t\tif(strpos($element->getAttribute('href'),'googleapis') !==false) { continue; }\n\t\t\t\t$link = Helper::getAbsoluteResourceLink($element->getAttribute('href'));\t\t\t\t\t\n\t\t\t\t$bytes_size = floatval(Helper::getResourceSizeBytes($link));\n\n\t\t\t\t//echo '<br>' . $bytes_size . ' (' . round($bytes_size/1024,2, PHP_ROUND_HALF_UP) .'K)' . ': ' . $element->getAttribute('href') . '<br>';\n\t\t\t\t\n\t\t\t\tif($bytes_size > (5 * 1024))\n\t\t\t\t{\t\n\t\t\t\t\t//see if the script is not minified.\n\t\t\t\t\tif(!Helper::isMinified($link))\n\t\t\t\t\t{\n\t\t\t\t\t\t$code[1]++;\n\t\t\t\t\t\t//$code[0] .= '`'.Helper::printCodeWithLineNumber($element,false) . ' (' . round($bytes_size/1024,2, PHP_ROUND_HALF_UP) .'K)`';\n\t\t\t\t\t\t$code[0] .= Helper::printCodeWithLineNumber($element);\n\t\t\t\t\t} \n\t\t\t\t}\t\n\t\t\t}\t\n\t\t}\n\t\tif($code[0] != '') {\n\t\t\tif($code[1] > 1) { $code[2] = 's'; }\n\t\t\treturn $code;\n\t\t}\t\t\t\n\t return false;\n }", "title": "" }, { "docid": "8db322b6f88ca246c532bdc7d25b018d", "score": "0.615593", "text": "public function styles() {\n $this->addStyle(CORE_WWW_ROOT.\"ressources/css/externals/bootstrap.core.min.css\", true);\n\n\n $this->addStyle($this->directory().\"css/reset.less\");\n $this->addStyle($this->directory().\"css/animations.less\");\n $this->addStyle($this->directory().\"css/main.less\");\n $this->addStyle($this->directory().\"css/overlay.less\");\n $this->addStyle($this->directory().\"css/header.less\");\n $this->addStyle($this->directory().\"css/footer.less\");\n\n // externals\n $this->addStyle(\"//fonts.googleapis.com/css?family=Lora:400,400i,700,700i\", true);\n $this->addStyle('//fonts.googleapis.com/css?family=Roboto:700', true);\n\n // blocks\n $this->addStyle($this->directory().\"css/blocks/rd_arrow.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_button.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_bigteaser.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_smallteaser.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_longtext.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_forms.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_listings.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_collection.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_components.less\");\n\n $this->addStyle($this->directory().\"css/responsive.less\");\n }", "title": "" }, { "docid": "5000d83b7707b5b955cf2bc5cd35fd24", "score": "0.61545074", "text": "function my_scripts_styles() {\r\n wp_enqueue_style('semantic-css', get_template_directory_uri() . '/css/semantic.min.css');\r\n\r\n\r\n\r\n wp_enqueue_style('reset-css', get_template_directory_uri().'/css/components/reset.css');\r\n wp_enqueue_style('site-css', get_template_directory_uri().'/css/components/site.css');\r\n wp_enqueue_style('container-css', get_template_directory_uri().'/css/components/container.css');\r\n wp_enqueue_style('grid-css', get_template_directory_uri().'/css/components/grid.css');\r\n wp_enqueue_style('image-css', get_template_directory_uri().'/css/components/image.css');\r\n wp_enqueue_style('menu-css', get_template_directory_uri().'/css/components/menu.css');\r\n wp_enqueue_style('divider-css', get_template_directory_uri().'/css/components/divider.css');\r\n wp_enqueue_style('dropdown-css', get_template_directory_uri().'/css/components/dropdown.css');\r\n wp_enqueue_style('segment-css', get_template_directory_uri().'/css/components/segment.css');\r\n wp_enqueue_style('button-css', get_template_directory_uri().'/css/components/button.css');\r\n wp_enqueue_style('list-css', get_template_directory_uri().'/css/components/list.css');\r\n wp_enqueue_style('icon-css', get_template_directory_uri().'/css/components/icon.css');\r\n wp_enqueue_style('sidebar-css', get_template_directory_uri().'/css/components/sidebar.css');\r\n wp_enqueue_style('transition-css', get_template_directory_uri().'/css/components/transition.css');\r\n\r\n wp_enqueue_style('main-style', get_template_directory_uri().'/css/customstyle.css');\r\n\r\n\r\n\r\n wp_enqueue_script('jquery-js', get_template_directory_uri() . '/js/jquery.min.js');\r\n wp_enqueue_script('semantic-js', get_template_directory_uri() . '/js/semantic.min.js');\r\n wp_enqueue_script('visibility-js', get_template_directory_uri() . '/css/components/visibility.min.js');\r\n wp_enqueue_script('sidebar-js', get_template_directory_uri() . '/css/components/sidebar.min.js');\r\n wp_enqueue_script('transition-js', get_template_directory_uri() . '/css/components/transition.min.js');\r\n\r\n}", "title": "" }, { "docid": "33df1f1183fe1c16c30460c36e7b7877", "score": "0.61538917", "text": "function styles() {\n\t/**\n\t * Flag whether to enable loading uncompressed/debugging assets. Default false.\n\t *\n\t * @param bool additive_style_debug\n\t */\n\t$debug = apply_filters( 'additive_style_debug', false );\n\t$min = ( $debug || defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\twp_enqueue_style( 'additive-fonts',\n\t\t\"https://fonts.googleapis.com/css?family=Arvo:400,700|Lato:300,400,700\",\n\t\tarray(),\n\t\tnull\n\t);\n\n\twp_enqueue_style(\n\t\t'normalize',\n\t\tADDITIVE_URL . \"/assets/css/normalize{$min}.css\",\n\t\tarray(),\n\t\tADDITIVE_VERSION\n\t);\n\n\twp_enqueue_style(\n\t\t'skeleton',\n\t\tADDITIVE_URL . \"/assets/css/skeleton{$min}.css\",\n\t\tarray(),\n\t\tADDITIVE_VERSION\n\t);\n\n\twp_enqueue_style(\n\t\t'additive',\n\t\tADDITIVE_URL . \"/assets/css/additive{$min}.css\",\n\t\tarray(),\n\t\tADDITIVE_VERSION\n\t);\n\n\twp_enqueue_style(\n\t\t'font-awesome',\n\t\tADDITIVE_URL . \"/assets/css/font-awesome{$min}.css\",\n\t\tarray(),\n\t\tADDITIVE_VERSION\n\t);\n}", "title": "" }, { "docid": "ae979a6a0cd3f926f169e5ee65df7c32", "score": "0.6152066", "text": "public function process()\n {\n $this->minifier = AssetMinifier::createObjet($this->minifier, Minifier::className());\n foreach (Yii::$app->view->assetBundles as $key => $assetBundle) {\n if ($this->minifyJs && $assetBundle->js) {\n Yii::$app->view->assetBundles[$key] = $this->minifier->minifyJs($assetBundle);\n }\n\n if ($this->minifyCss && $assetBundle->css) {\n Yii::$app->view->assetBundles[$key] = $this->minifier->minifyCss($assetBundle);\n }\n }\n\n if ($this->combine) {\n $this->combiner = AssetMinifier::createObjet($this->combiner, Combiner::className());\n $this->combiner->process($this->minifyJs, $this->minifyCss);\n }\n }", "title": "" }, { "docid": "1c3c67b340bf017507529f54b64202a6", "score": "0.61506945", "text": "function rhapsody_scripts() {\n\twp_enqueue_style( 'rhapsody-style', get_stylesheet_uri() );\n\n if (!is_admin()) add_action(\"wp_enqueue_scripts\", \"wrmc_jquery_enqueue\", 11);\n function wrmc_jquery_enqueue() {\n wp_deregister_script('jquery');\n wp_register_script('jquery', \"http\" . ($_SERVER['SERVER_PORT'] == 443 ? \"s\" : \"\") . \"://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js\", false, null);\n wp_enqueue_script('jquery');\n }\n\n wp_enqueue_script( 'rhapsody-modernizr', get_template_directory_uri() . '/assets/js/modernizr.custom.js',array(), '3.3.1', false);\n wp_enqueue_script( 'rhapsody-app', get_template_directory_uri() . '/assets/js/all.js', array(), '1.0.0', true );\n\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "title": "" }, { "docid": "7e7c1b0d634d59ff9449d5cb67a08622", "score": "0.6140891", "text": "function ecomaster_scripts() {\n wp_enqueue_style( 'ecomaster-style', get_stylesheet_uri(), array(), wp_get_theme()->get( 'Version' ) );\n}", "title": "" }, { "docid": "52289bc2a5e983c599b11da31b2e3963", "score": "0.6138235", "text": "function Serialize_description_shop_script_style(){\n if (get_admin_page_title() === 'Modifier la catégorie') {\n\twp_enqueue_style('Serialize_description_shop_style', get_template_directory_uri() . '-child/css/serialize-description-shop.css');\n \twp_enqueue_script( 'Serialize_description_shop_script', get_template_directory_uri(). '-child/js/serialize-description-shop.js', array('jquery', 'wp-color-picker') );\n }\n}", "title": "" }, { "docid": "b05e801f30cdcf717940dcabecd77cb7", "score": "0.6136258", "text": "function scripts() {\n\t/**\n\t * Flag whether to enable loading uncompressed/debugging assets. Default false.\n\t *\n\t * @param bool additive_script_debug\n\t */\n\t$debug = apply_filters( 'additive_script_debug', false );\n\t$min = ( $debug || defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\twp_enqueue_script(\n\t\t'additive',\n\t\tADDITIVE_TEMPLATE_URL . \"/assets/js/additive{$min}.js\",\n\t\tarray(),\n\t\tADDITIVE_VERSION,\n\t\ttrue\n\t);\n}", "title": "" }, { "docid": "82c207066cc30b53a9648a1229a0f440", "score": "0.61357594", "text": "function beaver_extender_fe_style_editor_load_scripts() {\n\n\twp_enqueue_style( 'dashicons' );\n\twp_enqueue_style( 'beaver_extender_fe_style_editor_styles' );\n\twp_enqueue_style( 'beaver_extender_jquery_ui_css', '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css', false, BBEXT_VERSION, false );\n\twp_enqueue_script( 'jquery-ui-resizable' );\n\twp_enqueue_script( 'beaver_extender_fe_style_editor' );\n\twp_enqueue_script( 'beaver_extender_ace' );\n\twp_enqueue_script( 'beaver_extender_ace_autocomplete' );\n\t\t\n}", "title": "" }, { "docid": "d0fe947fb140ebe16050025a15fbf82e", "score": "0.61356515", "text": "function cjpopups_frontend_scripts(){\n\t$wp_version = get_bloginfo('version');\n\t$item_version = cjpopups_item_info('item_version');\n\tif(!is_admin()){\n\t\twp_register_style( 'cj-frontend-css', cjpopups_item_path('framework_url').'/assets/frontend/css/cj-global.css', null, $item_version, 'screen' );\n\t\twp_enqueue_style( 'cj-frontend-css' );\n\t}\n}", "title": "" }, { "docid": "6832a569747a199d9cf0454274f8dcbf", "score": "0.6133154", "text": "public function optimize() {}", "title": "" }, { "docid": "b361e869dda3d7c882617df302dc601e", "score": "0.6130255", "text": "function prosody_queue_scripts ()\n{\n\n wp_enqueue_style(\n 'normalize',\n get_template_directory_uri() . '/css/normalize.css',\n array(),\n null,\n false\n );\n\n wp_enqueue_style(\n 'bootstrap',\n get_template_directory_uri() . '/css/bootstrap.min.css',\n array(),\n null,\n false\n );\n\n wp_enqueue_style(\n 'jquery-ui-css',\n get_template_directory_uri() . '/css/jquery-ui.css',\n array(),\n null,\n false\n );\n\n wp_enqueue_style(\n 'screen',\n get_template_directory_uri() . '/css/screen.css',\n array('normalize', 'bootstrap', 'jquery-ui-css'),\n null,\n false\n );\n\n wp_register_script(\n 'prosody-jquery',\n get_template_directory_uri().'/js/jquery-3.3.1.min.js',\n array('jquery'), null, false\n );\n wp_enqueue_script('prosody-jquery');\n\n wp_register_script(\n 'prosody-jquery-ui',\n get_template_directory_uri().'/js/jquery-ui-1.12.1.min.js',\n array(), null, false\n );\n wp_enqueue_script('prosody-jquery-ui');\n\n if ( is_front_page() ) {\n wp_enqueue_script(\n 'prosody-jquery-cycle',\n get_template_directory_uri(). '/js/jquery.cycle.js',\n array('prosody-jquery'),\n null,\n false\n );\n }\n\n wp_enqueue_script(\n 'popup',\n get_template_directory_uri() . '/js/popup.js',\n array('prosody-jquery', 'prosody-jquery-ui'),\n null,\n true\n );\n\n wp_enqueue_script(\n 'utility',\n get_template_directory_uri() . '/js/utility.js',\n array('prosody-jquery', 'prosody-jquery-ui'),\n null,\n true\n );\n}", "title": "" }, { "docid": "3a49dbefb7f81a9a56136a326a0055cf", "score": "0.612541", "text": "public function loadStylesAndScripts() {\n\t\tglobal $upload_url;\n\n\t\tif ( !$this->is_admin ) {\n\t\t\t// Add minified css of all themes or the selected theme css\n\t\t\tif ( ( !empty( $this->settings->themes['themes'] ) && $this->settings->themes['themes'] == 'true' ) && file_exists( $upload_url['basedir'] . '/good-old-gallery-themes.css') ) {\n\t\t\t\twp_enqueue_style( 'good-old-gallery-themes', $upload_url['baseurl'] . '/good-old-gallery-themes.css' );\n\t\t\t}\n\t\t\t// Add selected themes css\n\t\t\telse if ( !empty( $this->settings->themes['default'] ) && empty( $this->settings->themes['all'] ) ) {\n\t\t\t\twp_enqueue_style( 'good-old-gallery-theme', $this->settings->themes['theme']['url'] . '/' . $this->settings->themes['default'] );\n\t\t\t}\n\n\t\t\t// Include selected slider plugin files\n\t\t\tif ( !empty( $this->settings->settings['plugin'] ) ) {\n\t\t\t\tforeach ( $this->settings->plugin['setup']['files'] as $file ) {\n\t\t\t\t\twp_enqueue_script( 'slider', GOG_PLUGIN_URL . 'plugins/' . $this->settings->settings['plugin'] . '/' . $file, array( 'jquery' ), '', FALSE );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Includ default good-old-gallery.css\n\t\t\tif ( $this->settings->themes['default_css'] == 'true' ) {\n\t\t\t\twp_enqueue_style( 'good-old-gallery', GOG_PLUGIN_URL . 'assets/css/good-old-gallery.css' );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4e17c2dfbfa91ed567ca5c3ab96b01f8", "score": "0.612365", "text": "function _getCSSscripts(&$scriptList, $filenames)\n\t{\n\t\tclearstatcache();\n\t\t$cssfile_path = JPATH_SITE.DS.\"components\".DS.\"com_jbolo\".DS.\"css\".DS.\"jbolocss.php\";\n\t\t//combine and minify css\n\n\t\t//echo $this->params->get('comb_mini');\n\t\t//var_dump(is_writable($cssfile_path)); die;\n\n\t\tif($this->params->get('comb_mini') && is_writable($cssfile_path))\n\t\t{\n\n\t\t\t//$sitepath=JPATH_SITE;\n\t\t\t$sitepath=JPATH_SITE.'/';\n\t\t\tforeach($filenames as $file){\n\t\t\t\t//$css_script[]=\"include('\".$sitepath.\"/components/com_jbolo/css/\".$file.\"');\";\n\t\t\t\t$css_script[]=\"include('\".$sitepath.$file.\"');\";\n\t\t\t}\n\t\t\t$css_script=implode(\"\\n\",$css_script);\n\t\t\t$cssfile_path=JPATH_SITE.DS.\"components\".DS.\"com_jbolo\".DS.\"css\".DS.\"jbolocss.php\";\n\t\t\t$cssgzip='header(\"Content-type: text/css\");\n\t\t\t\tob_start(\"compress\");\n\t\t\t\tfunction compress($buffer){\n\t\t\t\t\t/* remove comments */\n\t\t\t\t\t$buffer = preg_replace(\"!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!\", \"\", $buffer);\n\t\t\t\t\t/* remove tabs, spaces, newlines, etc. */\n\t\t\t\t\t$buffer = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\", \" \", \" \", \" \"), \"\", $buffer);\n\t\t\t\t\treturn $buffer;\n\t\t\t\t}';\n\n\t\t\t$data=\"<?php \".$cssgzip .\"\\n\".$css_script.\"\\n ob_end_flush();?>\";\n\t\t\tif(JFile::write($cssfile_path, $data)){\n\t\t\t\t$scriptList[]='<link rel=\"stylesheet\" href=\"'.JURI::root().'components/com_jbolo/css/jbolocss.php\" type=\"text/css\" />';\n\t\t\t}\n\t\t\telse{\n\t\t\t\tforeach($filenames as $file){\n\t\t\t\t\t//$scriptList[]='<link rel=\"stylesheet\" href=\"'.JURI::root().'components/com_jbolo/css/'.$file.'\" type=\"text/css\" />';\n\t\t\t\t\t$scriptList[]='<link rel=\"stylesheet\" href=\"'.JURI::root().$file.'\" type=\"text/css\" />';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tforeach($filenames as $file){\n\t\t\t\t//$scriptList[]='<link rel=\"stylesheet\" href=\"'.JURI::root().'components/com_jbolo/css/'.$file.'\" type=\"text/css\" />';\n\t\t\t\t$scriptList[]='<link rel=\"stylesheet\" href=\"'.JURI::root().$file.'\" type=\"text/css\" />';\n\t\t\t}\n\t\t}\n\t\t//die(\"hrr\");\n\t}", "title": "" }, { "docid": "6e7af2932f3099aacbbbcdf4e6e44ddf", "score": "0.61185604", "text": "private function setup_assets() {\n\t\t$this->prefix = sanitize_title($this->theme_name) . '-';\n\t\t$public_lib = '/lib/pub/';\n\t\t$source_lib = '/lib/src/';\n\n\t\t//IF WP DEBUG Is ON, load source maps and assets\n\t\tif (constant(\"WP_DEBUG\") === true) {\n\t\t\t//Style Resources\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'styles',\n\t\t\t\t'path' => $source_lib . 'css/master.css',\n\t\t\t\t'deps' => array()\n\t\t\t);\n\t\t\t\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'scss',\n\t\t\t\t'path' => $source_lib . 'scss/master.scss',\n\t\t\t\t'deps' => array( $this->prefix . 'styles')\n\t\t\t);\n\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'css-map',\n\t\t\t\t'path' => $source_lib . 'maps/master.css.map',\n\t\t\t\t'deps' => array( $this->prefix . 'styles', $this->prefix . 'scss')\n\t\t\t);\n\t\t\n\t\n\t\t\t$this->scripts[] = array(\n\t\t\t\t'slug' => $this->prefix . 'plugins',\n\t\t\t\t'path' => $source_lib . 'js/plugins.js',\n\t\t\t\t'deps' => array(\n\t\t\t\t\t'jquery'\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->scripts[] = array(\n\t\t\t\t'slug' => $this->prefix . 'the-script',\n\t\t\t\t'path' => $source_lib . 'js/script.js',\n\t\t\t\t'deps' => array(\n\t\t\t\t\t'jquery'\n\t\t\t\t)\n\t\t\t);\n\n\n\n\t\t\t// $this->scripts[] = array(\n\t\t\t// \t'slug' => $this->prefix . 'script-map',\n\t\t\t// \t'path' => $source_lib . 'maps/scripts.js.map',\n\t\t\t// \t'deps' => array(\n\t\t\t// \t\t'jquery',\n\t\t\t// \t\t$this->prefix . 'script'\n\t\t\t// \t)\n\t\t\t// );\n\t\n\t\t// Otherwise load only minified assets\n\t\t} else {\n\n\t\t\t$this->styles[] = array(\n\t\t\t\t'slug' => $this->prefix . 'styles-min',\n\t\t\t\t'path' => $public_lib . 'css/master.min.css',\n\t\t\t\t'deps' => array()\n\t\t\t);\n\n\t\t\t$this->scripts[] = array(\n\t\t\t\t\t'slug' => $this->prefix . 'scripts-min',\n\t\t\t\t\t'path' => $public_lib . 'js/master.min.js',\n\t\t\t\t\t'deps' => array(\n\t\t\t\t\t\t'jquery'\n\t\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t}\n\t\t\n\t\t$this->add_wp_script('jquery');\n\t\t\n\t\tadd_action('wp_enqueue_scripts', array( $this, 'theme_assets_handler' ));\n\t}", "title": "" }, { "docid": "60581c6e6e4c8426cb5c83990397cdb4", "score": "0.61115557", "text": "function modshrink_s_scripts() {\n\twp_enqueue_style( 'modshrink_s-style', get_stylesheet_uri(), array(), date('YmdHis') );\n\twp_enqueue_script( 'jquery' );\n\twp_enqueue_script( 'modshrink_s-navigation', get_template_directory_uri() . '/js/modshrink_s.js', array(), '20120206', true );\n\t//wp_enqueue_style( 'dashicons', site_url('/').\"/wp-includes/css/dashicons.min.css\");\n\n\t//wp_enqueue_script( 'modshrink_s-doubletaptogo', get_template_directory_uri() . '/js/doubletaptogo.js', array( 'jquery' ));\n/*\n\twp_enqueue_script( 'modshrink_s-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\n\tif ( is_singular() && wp_attachment_is_image() ) {\n\t\twp_enqueue_script( 'modshrink_s-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );\n\t}\n*/\n}", "title": "" }, { "docid": "c8018a44ec930900cef317736ee30032", "score": "0.6108269", "text": "public function enqueue_scripts_styles_front(){\n\n wp_enqueue_style( $this->main_style_slug, THEME_URL.$this->main_style, THEME_VERSION );\n\n wp_enqueue_style( 'owl-carousel', THEME_URL.'/assets/libs/owlcarousel/css/owl.carousel.min.css', THEME_VERSION );\n\n wp_enqueue_style( 'daterangepicker', THEME_URL.'/assets/libs/datepicker/daterangepicker.css', THEME_VERSION );\n\n // wp_enqueue_script('vuej-js','https://cdn.jsdelivr.net/npm/vue/dist/vue.js', array(), THEME_VERSION, true);\n\n wp_enqueue_script('owl-carousel',THEME_URL.'/assets/libs/owlcarousel/js/owl.carousel.min.js', array(), THEME_VERSION, true);\n\n wp_enqueue_script('moment',THEME_URL.'/assets/libs/datepicker/moment.min.js', array(), THEME_VERSION, true);\n\n wp_enqueue_script('velesh-daterangepicker',THEME_URL.'/assets/libs/datepicker/daterangepicker.js', array(), THEME_VERSION, true);\n\n wp_enqueue_script($this->main_script_slug, THEME_URL.$this->main_script, array('jquery'), THEME_VERSION, true);\n\n // wp_dequeue_style( 'vc_tta_style' );\n // wp_deregister_style( 'vc_tta_style' );\n\n $js_translations = array(\n 'gallery' => array(\n 'load_fullsize' => __('Download High Quality Image', 'theme-translations'),\n ),\n );\n\n wp_localize_script($this->main_script_slug, 'js_translations', $js_translations);\n\n // wp_localize_script($this->main_script_slug, 'previous_page_season', $season);\n\n wp_localize_script($this->main_script_slug, 'theme_locale',get_locale());\n }", "title": "" }, { "docid": "d2a706b709349aeb55d1af242824fa8e", "score": "0.6105491", "text": "function hugomitoire_scripts() {\n wp_enqueue_style( 'appStyles', get_template_directory_uri() . '/dist/css/style.min.css' );\n wp_enqueue_script( 'Js', get_template_directory_uri() . '/dist/js/all.js', array(), '1.0.0', true );\n wp_enqueue_script( 'Swiper', get_template_directory_uri() . '/dis/js/all.js', array(), '4.4.2', true);\n}", "title": "" }, { "docid": "50450cdadb4496b5bed3f36771dbd2d5", "score": "0.6094891", "text": "public function enqueue_styles_scripts() {\n\t\tif ( nyscaa_is_nyscaa_group() ) {\n\t\t\t// Styles\n\t\t\twp_enqueue_style( $this->plugin_slug . '-plugin-styles', plugins_url( 'css/public.css', __FILE__ ), array(), $this->version );\n\n\t\t\t// IE specific\n\t\t\t// global $wp_styles;\n\t\t\t// wp_enqueue_style( $this->plugin_slug . '-ie-plugin-styles', plugins_url( 'css/public-ie.css', __FILE__ ), array(), $this->version );\n\t\t\t// $wp_styles->add_data( $this->plugin_slug . '-ie-plugin-styles', 'conditional', 'lte IE 9' );\n\n\t\t\t// Scripts\n\t\t\twp_enqueue_script( $this->plugin_slug . '-plugin-script', plugins_url( 'js/public.min.js', __FILE__ ), array( 'jquery' ), $this->version );\n\t\t}\n\t}", "title": "" }, { "docid": "0562ab1428a7a212686297a37343e7d0", "score": "0.60921437", "text": "function prolingua_essential_grid_frontend_scripts() {\n\t\tif (prolingua_is_on(prolingua_get_theme_option('debug_mode')) && prolingua_get_file_dir('plugins/essential-grid/essential-grid.css')!='')\n\t\t\twp_enqueue_style( 'prolingua-essential-grid', prolingua_get_file_url('plugins/essential-grid/essential-grid.css'), array(), null );\n\t}", "title": "" }, { "docid": "b78b0ac7d4b596a8f5a44826e32eb4de", "score": "0.6089469", "text": "function wp_common_block_scripts_and_styles()\n {\n }", "title": "" }, { "docid": "06deeb67cb8eab07c946cddb0b1a7fde", "score": "0.608872", "text": "public function merge_scripts() {\n\n\t\t//Init vars\n\t\t$args \t\t= array();\n\t\t$exceptions = array();\n\n\t\t//Get vars from config.php\n\t\tif( isset($this->theme_script_merge_args) ) {\n\t\t\t$args = $this->theme_script_merge_args;\n\t\t}\n\n\t\tif( isset($this->theme_script_merge_exceptions) ) {\n\t\t\t$exceptions = $this->theme_script_merge_exceptions;\n\t\t}\n\n\t\tif( isset($args['merged_path']) && !empty($args['merged_path']) ) {\n\n\t\t\t//Before calling the merge action prepend the theme's stylesheet dir and uri to args\n\t\t\t$args['merged_url'] = get_stylesheet_directory_uri() . $args['merged_path'];\n\t\t\t$args['merged_path'] = get_stylesheet_directory() . $args['merged_path'];\n\n\t\t\tdo_action( 'prso_minify_merge_scripts', $args, $exceptions );\n\t\t}\n\n\t}", "title": "" } ]
2a5b712fe7ef9013862b5dc52e532cb9
Gets the public 'locale_listener' shared service.
[ { "docid": "ab25af602ed252f8aba62bab54ce8a02", "score": "0.83738154", "text": "protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->get('request_stack')) && false ?: '_'}, 'es', ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE)) && false ?: '_'});\n }", "title": "" } ]
[ { "docid": "1a25fc0e4a6f0444eeb854819756df94", "score": "0.8492592", "text": "protected function getLocaleListenerService()\n {\n return $this->privates['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener(($this->services['request_stack'] ?? $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()), 'zh_CN', ($this->services['router'] ?? $this->getRouterService()));\n }", "title": "" }, { "docid": "685d7f779737eb830cc1c0da37006d5c", "score": "0.816711", "text": "protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener('Europe
ondon', $this->get('router'));\n }", "title": "" }, { "docid": "4054310e0adebb35758a67167323de81", "score": "0.75436616", "text": "protected function getApplicationUser_LocaleListenerService()\n {\n return $this->services['application_user.locale_listener'] = new \\AppBundle\\EventListener\\User\\LocaleListener('es');\n }", "title": "" }, { "docid": "70167d1d03a08070d1875ff1df5c2a31", "score": "0.73242533", "text": "protected function getApplicationUser_UserLocaleListenerService()\n {\n return $this->services['application_user.user_locale_listener'] = new \\AppBundle\\EventListener\\User\\UserLocaleListener(${($_ = isset($this->services['session']) ? $this->services['session'] : $this->get('session')) && false ?: '_'});\n }", "title": "" }, { "docid": "9d5f02656d9ae3e0e960140d42857990", "score": "0.7186282", "text": "protected function getLanguageService()\r\n {\r\n return $GLOBALS['LANG'];\r\n }", "title": "" }, { "docid": "0dc65c29d07e8c19c0b433c4678c924e", "score": "0.7143289", "text": "protected function getTranslatorListenerService()\n {\n return $this->privates['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(($this->services['translator'] ?? $this->getTranslatorService()), ($this->services['request_stack'] ?? $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()));\n }", "title": "" }, { "docid": "1032264a27a78724217d0629fd03e7c9", "score": "0.7134841", "text": "protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }", "title": "" }, { "docid": "1032264a27a78724217d0629fd03e7c9", "score": "0.7134841", "text": "protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }", "title": "" }, { "docid": "1032264a27a78724217d0629fd03e7c9", "score": "0.7134841", "text": "protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }", "title": "" }, { "docid": "1032264a27a78724217d0629fd03e7c9", "score": "0.7134841", "text": "protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }", "title": "" }, { "docid": "49d959d9622b119b794ddc28f5094fb7", "score": "0.70752794", "text": "protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator']) ? $this->services['translator'] : $this->get('translator')) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->get('request_stack')) && false ?: '_'});\n }", "title": "" }, { "docid": "f60cf2f3eb12210f583dbb80f269cb1a", "score": "0.6453943", "text": "public static function getInstance(): LocalizationService\n {\n if (!isset(static::$instance)) {\n $class = __CLASS__;\n static::$instance = new $class;\n }\n return static::$instance;\n }", "title": "" }, { "docid": "941ff57c29d7fb7cda16c38915a8d158", "score": "0.6283335", "text": "protected function getTranslatorService()\n {\n return $this->services['translator'] = new \\Symfony\\Component\\Translation\\DataCollectorTranslator(new \\Symfony\\Component\\Translation\\LoggingTranslator(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->get('translator.default')) && false ?: '_'}, ${($_ = isset($this->services['monolog.logger.translation']) ? $this->services['monolog.logger.translation'] : $this->get('monolog.logger.translation')) && false ?: '_'}));\n }", "title": "" }, { "docid": "22ef8ace8fcad255b0cfc4d4e60e0da2", "score": "0.6102718", "text": "protected function getSonata_Intl_Templating_Helper_LocaleService()\n {\n return $this->services['sonata.intl.templating.helper.locale'] = new \\Sonata\\IntlBundle\\Templating\\Helper\\LocaleHelper('UTF-8', ${($_ = isset($this->services['sonata.intl.locale_detector.request_stack']) ? $this->services['sonata.intl.locale_detector.request_stack'] : $this->get('sonata.intl.locale_detector.request_stack')) && false ?: '_'});\n }", "title": "" }, { "docid": "decd1062064cd3fdb7b2b60be8d13501", "score": "0.60981154", "text": "public function _getServTranslator() {\n if (!$this->_servTranslator) {\n $this->_servTranslator = $this->_service->get('translator');\n }\n return $this->_servTranslator;\n }", "title": "" }, { "docid": "00efb4e9cef12784e6c9638af6091b39", "score": "0.59911776", "text": "public static function getInstance()\n {\n if (self::$instance === null) {\n self::$instance = new Lari18n();\n }\n\n return self::$instance;\n }", "title": "" }, { "docid": "b3922d74fa620c8c4d3c570235b615a2", "score": "0.59463173", "text": "protected function getForm_Type_LocaleService()\n {\n @trigger_error('The \"form.type.locale\" service is deprecated since Symfony 3.1 and will be removed in 4.0.', E_USER_DEPRECATED);\n\n return $this->services['form.type.locale'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\LocaleType();\n }", "title": "" }, { "docid": "5e16224b711176eda71772e0250c5a9a", "score": "0.5941445", "text": "protected function getTranslatorService()\n {\n $a = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('translation.loader.csv' => function () {\n return ($this->privates['translation.loader.csv'] ?? $this->privates['translation.loader.csv'] = new \\Symfony\\Component\\Translation\\Loader\\CsvFileLoader());\n }, 'translation.loader.dat' => function () {\n return ($this->privates['translation.loader.dat'] ?? $this->privates['translation.loader.dat'] = new \\Symfony\\Component\\Translation\\Loader\\IcuDatFileLoader());\n }, 'translation.loader.ini' => function () {\n return ($this->privates['translation.loader.ini'] ?? $this->privates['translation.loader.ini'] = new \\Symfony\\Component\\Translation\\Loader\\IniFileLoader());\n }, 'translation.loader.json' => function () {\n return ($this->privates['translation.loader.json'] ?? $this->privates['translation.loader.json'] = new \\Symfony\\Component\\Translation\\Loader\\JsonFileLoader());\n }, 'translation.loader.mo' => function () {\n return ($this->privates['translation.loader.mo'] ?? $this->privates['translation.loader.mo'] = new \\Symfony\\Component\\Translation\\Loader\\MoFileLoader());\n }, 'translation.loader.php' => function () {\n return ($this->privates['translation.loader.php'] ?? $this->privates['translation.loader.php'] = new \\Symfony\\Component\\Translation\\Loader\\PhpFileLoader());\n }, 'translation.loader.po' => function () {\n return ($this->privates['translation.loader.po'] ?? $this->privates['translation.loader.po'] = new \\Symfony\\Component\\Translation\\Loader\\PoFileLoader());\n }, 'translation.loader.qt' => function () {\n return ($this->privates['translation.loader.qt'] ?? $this->privates['translation.loader.qt'] = new \\Symfony\\Component\\Translation\\Loader\\QtFileLoader());\n }, 'translation.loader.res' => function () {\n return ($this->privates['translation.loader.res'] ?? $this->privates['translation.loader.res'] = new \\Symfony\\Component\\Translation\\Loader\\IcuResFileLoader());\n }, 'translation.loader.xliff' => function () {\n return ($this->privates['translation.loader.xliff'] ?? $this->privates['translation.loader.xliff'] = new \\Symfony\\Component\\Translation\\Loader\\XliffFileLoader());\n }, 'translation.loader.yml' => function () {\n return ($this->privates['translation.loader.yml'] ?? $this->privates['translation.loader.yml'] = new \\Symfony\\Component\\Translation\\Loader\\YamlFileLoader());\n })), new \\Symfony\\Component\\Translation\\Formatter\\MessageFormatter(new \\Symfony\\Component\\Translation\\MessageSelector()), 'zh_CN', array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yaml', 1 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini'), 'translation.loader.json' => array(0 => 'json')), array('cache_dir' => ($this->targetDirs[0].'/translations'), 'debug' => true, 'resource_files' => array('af' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.af.xlf'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.af.yml')), 'ar' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ar.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ar.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ar.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.ar.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.ar.xliff'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ar.yml'), 6 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ar.yml')), 'az' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.az.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.az.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.az.xlf')), 'bg' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.bg.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.bg.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.bg.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.bg.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.bg.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.bg.xliff'), 6 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.bg.yml'), 7 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.bg.yml'), 8 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.bg.xliff')), 'ca' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ca.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ca.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ca.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.ca.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.ca.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.ca.xliff'), 6 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ca.yml'), 7 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ca.yml'), 8 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.ca.xliff')), 'cs' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.cs.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.cs.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.cs.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.cs.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.cs.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/formatter-bundle/src/Resources/translations/SonataFormatterBundle.cs.xliff'), 6 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.cs.yml'), 7 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.cs.yml'), 8 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.cs.xliff')), 'cy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.cy.xlf')), 'da' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.da.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.da.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.da.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.da.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.da.yml')), 'de' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.de.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.de.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.de.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.de.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/block-bundle/src/Resources/translations/SonataBlockBundle.de.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/block-bundle/src/Resources/translations/validators.de.xliff'), 6 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.de.xliff'), 7 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.de.xliff'), 8 => ($this->targetDirs[3].'/vendor/sonata-project/formatter-bundle/src/Resources/translations/SonataFormatterBundle.de.xliff'), 9 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.de.yml'), 10 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.de.yml'), 11 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.de.xliff')), 'el' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.el.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.el.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.el.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.el.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.el.yml')), 'en' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.en.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.en.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.en.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.en.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/block-bundle/src/Resources/translations/SonataBlockBundle.en.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/block-bundle/src/Resources/translations/validators.en.xliff'), 6 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.en.xliff'), 7 => ($this->targetDirs[3].'/vendor/picoss/sonata-extra-admin-bundle/Resources/translations/PicossSonataExtraAdminBundle.en.xliff'), 8 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.en.xliff'), 9 => ($this->targetDirs[3].'/vendor/sonata-project/formatter-bundle/src/Resources/translations/SonataFormatterBundle.en.xliff'), 10 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.en.yml'), 11 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.en.yml'), 12 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.en.xliff')), 'es' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.es.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.es.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.es.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.es.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.es.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.es.xliff'), 6 => ($this->targetDirs[3].'/vendor/sonata-project/formatter-bundle/src/Resources/translations/SonataFormatterBundle.es.xliff'), 7 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.es.yml'), 8 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.es.yml'), 9 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.es.xliff')), 'et' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.et.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.et.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.et.yml')), 'eu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.eu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.eu.xlf'), 2 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.eu.xliff'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.eu.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.eu.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.eu.yml')), 'fa' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fa.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fa.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.fa.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.fa.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.fa.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.fa.xliff'), 6 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fa.yml'), 7 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fa.yml'), 8 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.fa.xliff')), 'fi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fi.xlf'), 2 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.fi.xliff'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.fi.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fi.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fi.yml'), 6 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.fi.xliff')), 'fr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.fr.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.fr.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/block-bundle/src/Resources/translations/SonataBlockBundle.fr.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/block-bundle/src/Resources/translations/validators.fr.xliff'), 6 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.fr.xliff'), 7 => ($this->targetDirs[3].'/vendor/picoss/sonata-extra-admin-bundle/Resources/translations/PicossSonataExtraAdminBundle.fr.xliff'), 8 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.fr.xliff'), 9 => ($this->targetDirs[3].'/vendor/sonata-project/formatter-bundle/src/Resources/translations/SonataFormatterBundle.fr.xliff'), 10 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fr.yml'), 11 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fr.yml'), 12 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.fr.xliff')), 'gl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.gl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.gl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.gl.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.gl.yml')), 'he' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.he.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.he.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.he.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.he.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.he.yml')), 'hr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.hr.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.hr.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.hr.xliff'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.hr.yml'), 6 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.hr.yml'), 7 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.hr.xliff')), 'hu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hu.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.hu.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.hu.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/block-bundle/src/Resources/translations/SonataBlockBundle.hu.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.hu.xliff'), 6 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.hu.xliff'), 7 => ($this->targetDirs[3].'/vendor/sonata-project/formatter-bundle/src/Resources/translations/SonataFormatterBundle.hu.xliff'), 8 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.hu.yml'), 9 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.hu.yml'), 10 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.hu.xliff')), 'hy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hy.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hy.xlf')), 'id' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.id.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.id.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.id.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.id.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.id.yml')), 'it' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.it.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.it.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.it.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.it.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/block-bundle/src/Resources/translations/SonataBlockBundle.it.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.it.xliff'), 6 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.it.xliff'), 7 => ($this->targetDirs[3].'/vendor/sonata-project/formatter-bundle/src/Resources/translations/SonataFormatterBundle.it.xliff'), 8 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.it.yml'), 9 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.it.yml'), 10 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.it.xliff')), 'ja' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ja.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ja.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ja.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.ja.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.ja.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.ja.xliff'), 6 => ($this->targetDirs[3].'/vendor/sonata-project/formatter-bundle/src/Resources/translations/SonataFormatterBundle.ja.xliff'), 7 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ja.yml'), 8 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ja.yml'), 9 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.ja.xliff')), 'lb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lb.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.lb.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.lb.xliff'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lb.yml')), 'lt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lt.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lt.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.lt.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.lt.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.lt.xliff'), 6 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lt.yml'), 7 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.lt.yml'), 8 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.lt.xliff')), 'lv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lv.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.lv.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lv.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.lv.yml')), 'mn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.mn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.mn.xlf')), 'nb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nb.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.nb.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.nb.yml')), 'nl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nl.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.nl.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.nl.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.nl.xliff'), 6 => ($this->targetDirs[3].'/vendor/sonata-project/formatter-bundle/src/Resources/translations/SonataFormatterBundle.nl.xliff'), 7 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.nl.yml'), 8 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.nl.yml'), 9 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.nl.xliff')), 'nn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nn.xlf')), 'no' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.no.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.no.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.no.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.no.xliff')), 'pl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pl.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.pl.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.pl.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.pl.xliff'), 6 => ($this->targetDirs[3].'/vendor/sonata-project/formatter-bundle/src/Resources/translations/SonataFormatterBundle.pl.xliff'), 7 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pl.yml'), 8 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pl.yml'), 9 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.pl.xliff')), 'pt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pt.xlf'), 2 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.pt.xliff'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.pt.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pt.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pt.yml'), 6 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.pt.xliff')), 'pt_BR' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pt_BR.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pt_BR.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.pt_BR.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.pt_BR.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.pt_BR.xliff'), 6 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pt_BR.yml'), 7 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pt_BR.yml'), 8 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.pt_BR.xliff')), 'ro' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ro.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ro.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ro.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.ro.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.ro.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.ro.xliff'), 6 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ro.yml'), 7 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ro.yml'), 8 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.ro.xliff')), 'ru' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ru.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ru.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ru.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.ru.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/block-bundle/src/Resources/translations/SonataBlockBundle.ru.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.ru.xliff'), 6 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.ru.xliff'), 7 => ($this->targetDirs[3].'/vendor/sonata-project/formatter-bundle/src/Resources/translations/SonataFormatterBundle.ru.xliff'), 8 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ru.yml'), 9 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ru.yml'), 10 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/FOSUserBundle.ru.xliff'), 11 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.ru.xliff')), 'sk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sk.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sk.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.sk.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.sk.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/formatter-bundle/src/Resources/translations/SonataFormatterBundle.sk.xliff'), 6 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sk.yml'), 7 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sk.yml'), 8 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.sk.xliff')), 'sl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sl.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.sl.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.sl.xliff'), 5 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.sl.xliff'), 6 => ($this->targetDirs[3].'/vendor/sonata-project/formatter-bundle/src/Resources/translations/SonataFormatterBundle.sl.xliff'), 7 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sl.yml'), 8 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sl.yml'), 9 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.sl.xliff')), 'sq' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sq.xlf')), 'sr_Cyrl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sr_Cyrl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sr_Cyrl.xlf')), 'sr_Latn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sr_Latn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sr_Latn.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sr_Latn.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sr_Latn.yml')), 'sv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sv.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sv.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sv.yml')), 'th' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.th.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.th.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.th.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.th.yml')), 'tl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.tl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.tl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.tl.xlf')), 'tr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.tr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.tr.xlf'), 2 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.tr.xliff'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.tr.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.tr.yml')), 'uk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.uk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.uk.xlf'), 2 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.uk.xliff'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.uk.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/media-bundle/src/Resources/translations/SonataMediaBundle.uk.xliff'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.uk.yml'), 6 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.uk.yml'), 7 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.uk.xliff')), 'vi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.vi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.vi.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.vi.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.vi.yml')), 'zh_CN' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.zh_CN.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.zh_CN.xlf'), 3 => ($this->targetDirs[3].'/vendor/sonata-project/core-bundle/src/Resources/translations/SonataCoreBundle.zh_CN.xliff'), 4 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.zh_CN.xliff'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.zh_CN.yml'), 6 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.zh_CN.yml'), 7 => ($this->targetDirs[3].'/translations/PicossSonataExtraAdminBundle.zh_CN.xliff'), 8 => ($this->targetDirs[3].'/translations/SonataAdminBundle.zh_CN.xliff'), 9 => ($this->targetDirs[3].'/translations/SonataMediaBundle.zh_CN.xliff'), 10 => ($this->targetDirs[3].'/translations/SonataUserBundle.zh_CN.xliff'), 11 => ($this->targetDirs[3].'/translations/messages.zh_CN.xliff'), 12 => ($this->targetDirs[3].'/translations/PicossSonataExtraAdminBundle.zh_CN.xliff'), 13 => ($this->targetDirs[3].'/translations/SonataAdminBundle.zh_CN.xliff'), 14 => ($this->targetDirs[3].'/translations/SonataMediaBundle.zh_CN.xliff'), 15 => ($this->targetDirs[3].'/translations/SonataUserBundle.zh_CN.xliff'), 16 => ($this->targetDirs[3].'/translations/messages.zh_CN.xliff')), 'zh_TW' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf'), 1 => ($this->targetDirs[3].'/vendor/sonata-project/user-bundle/src/Resources/translations/SonataUserBundle.zh_TW.xliff')), 'pt_PT' => array(0 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pt_PT.xlf')), 'ua' => array(0 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ua.xlf')), 'sv_SE' => array(0 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.sv_SE.xliff')), 'zh_HK' => array(0 => ($this->targetDirs[3].'/vendor/sonata-project/admin-bundle/src/Resources/translations/SonataAdminBundle.zh_HK.xliff')), 'bn' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.bn.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.bn.yml')), 'bn_BD' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.bn_BD.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.bn_BD.yml')), 'eo' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.eo.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.eo.yml')), 'ky' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ky.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ky.yml')))));\n $a->setConfigCacheFactory(($this->privates['config_cache_factory'] ?? $this->getConfigCacheFactoryService()));\n $a->setFallbackLocales(array(0 => 'zh_CN', 1 => 'zh_CN'));\n\n return $this->services['translator'] = new \\Symfony\\Component\\Translation\\DataCollectorTranslator($a);\n }", "title": "" }, { "docid": "3e8fb667e58aa51699080a38536fd330", "score": "0.5929885", "text": "protected function volatile_get_locale()\n\t{\n\t\treturn I18n\\get_locale();\n\t}", "title": "" }, { "docid": "500cd0d5b5db140b42cac67efc0da017", "score": "0.5924156", "text": "protected function getResponseListenerService()\n {\n return $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }", "title": "" }, { "docid": "500cd0d5b5db140b42cac67efc0da017", "score": "0.5924156", "text": "protected function getResponseListenerService()\n {\n return $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }", "title": "" }, { "docid": "3a65cc727fc837cfcb573175e7534cb2", "score": "0.5915282", "text": "protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->get('router')) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->get('request_stack')) && false ?: '_'}, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ${($_ = isset($this->services['monolog.logger.request']) ? $this->services['monolog.logger.request'] : $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE)) && false ?: '_'});\n }", "title": "" }, { "docid": "04a61fdec2bd9c9e1ba93a67c656abcb", "score": "0.5874995", "text": "protected function getRouterListenerService()\n {\n return $this->privates['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(($this->services['router'] ?? $this->getRouterService()), ($this->services['request_stack'] ?? $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()), ($this->privates['router.request_context'] ?? $this->getRouter_RequestContextService()), ($this->privates['monolog.logger.request'] ?? $this->getMonolog_Logger_RequestService()), $this->targetDirs[3], true);\n }", "title": "" }, { "docid": "8c4b7228cae64b96b522d6ab2011188c", "score": "0.5861534", "text": "public function getLocale()\n {\n return $this['config']->get('app.locale');\n }", "title": "" }, { "docid": "ef72686fea43531a358ea9551815eaad", "score": "0.5857159", "text": "protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('router.request_context'), NULL);\n }", "title": "" }, { "docid": "552b65367b545dc8e9d5048f3c752e8a", "score": "0.58456373", "text": "protected function getSonata_Intl_TimezoneDetector_LocaleService()\n {\n return $this->services['sonata.intl.timezone_detector.locale'] = new \\Sonata\\IntlBundle\\Timezone\\LocaleBasedTimezoneDetector(${($_ = isset($this->services['sonata.intl.locale_detector.request_stack']) ? $this->services['sonata.intl.locale_detector.request_stack'] : $this->get('sonata.intl.locale_detector.request_stack')) && false ?: '_'}, array());\n }", "title": "" }, { "docid": "4c60f2a0516da8d80caa5d2b875737ca", "score": "0.5823616", "text": "protected function getSessionListenerService()\n {\n return $this->privates['session_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SessionListener(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('initialized_session' => function () {\n return ($this->services['session'] ?? null);\n }, 'session' => function () {\n return ($this->services['session'] ?? $this->load('getSessionService.php'));\n })));\n }", "title": "" }, { "docid": "4ef6cf60062169f1c59269b6eb6642aa", "score": "0.58066314", "text": "protected function getDataCollector_TranslationService()\n {\n return $this->services['data_collector.translation'] = new \\Symfony\\Component\\Translation\\DataCollector\\TranslationDataCollector(${($_ = isset($this->services['translator']) ? $this->services['translator'] : $this->get('translator')) && false ?: '_'});\n }", "title": "" }, { "docid": "dcdf2e58d842d96a63fb742df5fe5d53", "score": "0.57546604", "text": "protected function getTranslatorService()\n {\n return $this->services['translator'] = new \\Symfony\\Component\\Translation\\IdentityTranslator($this->get('translator.selector'));\n }", "title": "" }, { "docid": "a81d7fce27ea72fe4bb1c4f49e0e9f4a", "score": "0.5749191", "text": "public function getLocale()\r\n {\r\n return $this->sessionContainer->locale;\r\n }", "title": "" }, { "docid": "b12c63fbc9c8d98912da091b5350b419", "score": "0.57243526", "text": "public static function getLocale()\n {\n return static::translator()->getLocale();\n }", "title": "" }, { "docid": "95c8dda928ebc24caa39922290cade93", "score": "0.56903374", "text": "protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\n }", "title": "" }, { "docid": "4cb5996d5ea083ca1b8c5ffc34a8c96e", "score": "0.5667806", "text": "public function getLocale()\n {\n }", "title": "" }, { "docid": "325849a4163ccd1966c25a42ea2c877b", "score": "0.56449646", "text": "public function getLanguageManager() {\n return $this->languageManager ?: \\Drupal::service('language_manager');\n }", "title": "" }, { "docid": "4f4430099c19dc1b7b8128e036f4599a", "score": "0.5641657", "text": "protected function getFosRest_FormatListenerService()\n {\n return $this->services['fos_rest.format_listener'] = new \\FOS\\RestBundle\\EventListener\\FormatListener(${($_ = isset($this->services['fos_rest.format_negotiator']) ? $this->services['fos_rest.format_negotiator'] : $this->get('fos_rest.format_negotiator')) && false ?: '_'});\n }", "title": "" }, { "docid": "9d6351a0dd74563e39e02d2f40a66ee8", "score": "0.5636368", "text": "protected function getMonolog_Logger_TranslationService()\n {\n $this->services['monolog.logger.translation'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('translation');\n\n $instance->pushProcessor(${($_ = isset($this->services['debug.log_processor']) ? $this->services['debug.log_processor'] : $this->getDebug_LogProcessorService()) && false ?: '_'});\n $instance->pushHandler(${($_ = isset($this->services['monolog.handler.server_log']) ? $this->services['monolog.handler.server_log'] : $this->get('monolog.handler.server_log')) && false ?: '_'});\n $instance->pushHandler(${($_ = isset($this->services['monolog.handler.console']) ? $this->services['monolog.handler.console'] : $this->get('monolog.handler.console')) && false ?: '_'});\n $instance->pushHandler(${($_ = isset($this->services['monolog.handler.main']) ? $this->services['monolog.handler.main'] : $this->get('monolog.handler.main')) && false ?: '_'});\n\n return $instance;\n }", "title": "" }, { "docid": "1a2975c90034510c95a72cc73f4ef7e5", "score": "0.56211174", "text": "protected function getTranslation_LoaderService()\n {\n $a = $this->get('translation.loader.xliff');\n\n $this->services['translation.loader'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\TranslationLoader();\n\n $instance->addLoader('php', $this->get('translation.loader.php'));\n $instance->addLoader('yml', $this->get('translation.loader.yml'));\n $instance->addLoader('xlf', $a);\n $instance->addLoader('xliff', $a);\n $instance->addLoader('po', $this->get('translation.loader.po'));\n $instance->addLoader('mo', $this->get('translation.loader.mo'));\n $instance->addLoader('ts', $this->get('translation.loader.qt'));\n $instance->addLoader('csv', $this->get('translation.loader.csv'));\n $instance->addLoader('res', $this->get('translation.loader.res'));\n $instance->addLoader('dat', $this->get('translation.loader.dat'));\n $instance->addLoader('ini', $this->get('translation.loader.ini'));\n\n return $instance;\n }", "title": "" }, { "docid": "9d74a2eed4e0a205de6d0f1def1b11c3", "score": "0.56128186", "text": "public function getLocale()\n {\n if ($this->_locale === \"\") {\n $this->_locale = $this->_getDependencies()->getTranslationFacade()->getLocale();\n }\n return $this->_locale;\n }", "title": "" }, { "docid": "27dcecea8bca6c4be409725497717b73", "score": "0.5587667", "text": "protected function getTranslation_Loader_PhpService()\n {\n return $this->services['translation.loader.php'] = new \\Symfony\\Component\\Translation\\Loader\\PhpFileLoader();\n }", "title": "" }, { "docid": "27dcecea8bca6c4be409725497717b73", "score": "0.5587667", "text": "protected function getTranslation_Loader_PhpService()\n {\n return $this->services['translation.loader.php'] = new \\Symfony\\Component\\Translation\\Loader\\PhpFileLoader();\n }", "title": "" }, { "docid": "8321d1d1c2dd88e39756bebed542aee9", "score": "0.5572758", "text": "public function getLocale();", "title": "" }, { "docid": "8321d1d1c2dd88e39756bebed542aee9", "score": "0.5572758", "text": "public function getLocale();", "title": "" }, { "docid": "8321d1d1c2dd88e39756bebed542aee9", "score": "0.5572758", "text": "public function getLocale();", "title": "" }, { "docid": "8321d1d1c2dd88e39756bebed542aee9", "score": "0.5572758", "text": "public function getLocale();", "title": "" }, { "docid": "8321d1d1c2dd88e39756bebed542aee9", "score": "0.5572758", "text": "public function getLocale();", "title": "" }, { "docid": "8321d1d1c2dd88e39756bebed542aee9", "score": "0.5572758", "text": "public function getLocale();", "title": "" }, { "docid": "8321d1d1c2dd88e39756bebed542aee9", "score": "0.5572758", "text": "public function getLocale();", "title": "" }, { "docid": "8321d1d1c2dd88e39756bebed542aee9", "score": "0.5572758", "text": "public function getLocale();", "title": "" }, { "docid": "d59d050ea158bfc197fd71c22890378b", "score": "0.5545826", "text": "protected function getDebug_DeprecationLoggerListenerService()\n {\n return $this->services['debug.deprecation_logger_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DeprecationLoggerListener(NULL);\n }", "title": "" }, { "docid": "195cb9677c80a040cd1531fbf6445994", "score": "0.554428", "text": "public function getSystemLocale()\n\t{\n\t\treturn $this->_systemLocale;\n\t}", "title": "" }, { "docid": "64baca587db27658b34b65e4d038c757", "score": "0.5539546", "text": "public function getListener()\n {\n return $this->listener;\n }", "title": "" }, { "docid": "d1ed7f00b09c70257127aca822ad7823", "score": "0.5523796", "text": "public static function getInstance() {\n\t\tstatic $instance = array ();\n\t\tif (! $instance) {\n\t\t\t$instance [0] = new I18n ();\n\t\t}\n\t\treturn $instance [0];\n\t}", "title": "" }, { "docid": "69b6537d7e7c15beb4360ae281a0d459", "score": "0.5517236", "text": "protected function getSwiftmailer_EmailSender_ListenerService()\n {\n return $this->services['swiftmailer.email_sender.listener'] = new \\Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener($this, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE)) && false ?: '_'});\n }", "title": "" }, { "docid": "2e12c28afc07b8a34dfc098038b6bb41", "score": "0.5515038", "text": "protected function getSensioFrameworkExtra_Converter_ListenerService()\n {\n return $this->services['sensio_framework_extra.converter.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener(${($_ = isset($this->services['sensio_framework_extra.converter.manager']) ? $this->services['sensio_framework_extra.converter.manager'] : $this->get('sensio_framework_extra.converter.manager')) && false ?: '_'}, true);\n }", "title": "" }, { "docid": "e26de42519c447832a8724f6e71cc3b5", "score": "0.55145043", "text": "protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SessionListener(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('session' => function () {\n return ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->get('session', ContainerInterface::NULL_ON_INVALID_REFERENCE)) && false ?: '_'};\n })));\n }", "title": "" }, { "docid": "aa62761afe088daea81f2b99a8d2d22e", "score": "0.5511113", "text": "public function getLocale()\n {\n if (array_key_exists(\"locale\", $this->_propDict)) {\n return $this->_propDict[\"locale\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "d1b34877b4d9ba6ba92e675a2e1eab4f", "score": "0.55020815", "text": "protected function getTranslator_DefaultService()\n {\n $this->services['translator.default'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('translation.loader.csv' => function () {\n return ${($_ = isset($this->services['translation.loader.csv']) ? $this->services['translation.loader.csv'] : $this->get('translation.loader.csv')) && false ?: '_'};\n }, 'translation.loader.dat' => function () {\n return ${($_ = isset($this->services['translation.loader.dat']) ? $this->services['translation.loader.dat'] : $this->get('translation.loader.dat')) && false ?: '_'};\n }, 'translation.loader.ini' => function () {\n return ${($_ = isset($this->services['translation.loader.ini']) ? $this->services['translation.loader.ini'] : $this->get('translation.loader.ini')) && false ?: '_'};\n }, 'translation.loader.json' => function () {\n return ${($_ = isset($this->services['translation.loader.json']) ? $this->services['translation.loader.json'] : $this->get('translation.loader.json')) && false ?: '_'};\n }, 'translation.loader.mo' => function () {\n return ${($_ = isset($this->services['translation.loader.mo']) ? $this->services['translation.loader.mo'] : $this->get('translation.loader.mo')) && false ?: '_'};\n }, 'translation.loader.php' => function () {\n return ${($_ = isset($this->services['translation.loader.php']) ? $this->services['translation.loader.php'] : $this->get('translation.loader.php')) && false ?: '_'};\n }, 'translation.loader.po' => function () {\n return ${($_ = isset($this->services['translation.loader.po']) ? $this->services['translation.loader.po'] : $this->get('translation.loader.po')) && false ?: '_'};\n }, 'translation.loader.qt' => function () {\n return ${($_ = isset($this->services['translation.loader.qt']) ? $this->services['translation.loader.qt'] : $this->get('translation.loader.qt')) && false ?: '_'};\n }, 'translation.loader.res' => function () {\n return ${($_ = isset($this->services['translation.loader.res']) ? $this->services['translation.loader.res'] : $this->get('translation.loader.res')) && false ?: '_'};\n }, 'translation.loader.xliff' => function () {\n return ${($_ = isset($this->services['translation.loader.xliff']) ? $this->services['translation.loader.xliff'] : $this->get('translation.loader.xliff')) && false ?: '_'};\n }, 'translation.loader.yml' => function () {\n return ${($_ = isset($this->services['translation.loader.yml']) ? $this->services['translation.loader.yml'] : $this->get('translation.loader.yml')) && false ?: '_'};\n })), new \\Symfony\\Component\\Translation\\MessageSelector(), 'es', array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini'), 'translation.loader.json' => array(0 => 'json')), array('cache_dir' => (__DIR__.'/translations'), 'debug' => true, 'resource_files' => array('af' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.af.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.af.yml')), 'ar' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ar.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ar.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ar.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.ar.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ar.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ar.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ar.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ar.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.ar.yml'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.ar.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.ar.yml'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.ar.yml')), 'az' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.az.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.az.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.az.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.az.xliff')), 'bg' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.bg.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.bg.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.bg.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.bg.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.bg.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.bg.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.bg.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.bg.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.bg.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.bg.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.bg.yml'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.bg.yml')), 'ca' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ca.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ca.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ca.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ca.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ca.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.ca.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.ca.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ca.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ca.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.ca.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.ca.xliff')), 'cs' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.cs.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.cs.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.cs.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.cs.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.cs.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.cs.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.cs.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.cs.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.cs.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.cs.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.cs.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.cs.yml'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.cs.yml')), 'cy' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.cy.xlf')), 'da' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.da.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.da.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.da.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.da.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.da.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.da.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.da.xliff')), 'de' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.de.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.de.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.de.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.de.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.de.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.de.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.de.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.de.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.de.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.de.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.de.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.de.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\validators.de.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.de.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.de.xliff'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.de.yml'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.de.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.de.xliff'), 18 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.de.yml'), 19 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.de.yml')), 'el' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.el.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.el.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.el.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.el.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.el.yml')), 'en' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.en.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.en.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.en.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.en.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.en.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.en.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\FOSUserBundle.en.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.en.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.en.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.en.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.en.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.en.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.en.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\validators.en.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.en.xliff'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.en.xliff'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.en.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.en.yml'), 18 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.en.xliff'), 19 => ($this->targetDirs[3].'\\\\app/Resources/DataDogAuditBundle/translations\\\\DataDogAuditBundle.en.xlf'), 20 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.en.yml'), 21 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.en.yml'), 22 => ($this->targetDirs[3].'\\\\app/Resources/AppBundle/translations\\\\AppBundle.en.xliff')), 'es' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.es.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.es.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.es.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.es.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.es.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.es.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.es.xliff'), 7 => ($this->targetDirs[3].'\\\\app/Resources/SonataUserBundle/translations\\\\SonataUserBundle.es.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.es.xliff'), 9 => ($this->targetDirs[3].'\\\\app/Resources/SonataMediaBundle/translations\\\\SonataMediaBundle.es.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.es.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.es.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.es.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.es.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.es.xliff'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.es.yml'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.es.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.es.xliff'), 18 => ($this->targetDirs[3].'\\\\app/Resources/DataDogAuditBundle/translations\\\\DataDogAuditBundle.es.xlf'), 19 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.es.yml'), 20 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.es.yml'), 21 => ($this->targetDirs[3].'\\\\app/Resources/GregwarCaptchaBundle/translations\\\\GregwarCaptchaBundle.es.xliff'), 22 => ($this->targetDirs[3].'\\\\app/Resources/AppBundle/translations\\\\AppBundle.es.xliff'), 23 => ($this->targetDirs[3].'\\\\app/Resources/translations\\\\messages.es.xliff')), 'et' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.et.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.et.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.et.yml')), 'eu' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.eu.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.eu.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.eu.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.eu.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.eu.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.eu.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.eu.xliff')), 'fa' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.fa.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.fa.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.fa.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.fa.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fa.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.fa.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.fa.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.fa.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.fa.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.fa.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.fa.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.fa.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.fa.xliff')), 'fi' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.fi.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.fi.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fi.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.fi.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fi.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.fi.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.fi.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.fi.xliff')), 'fr' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.fr.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.fr.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.fr.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.fr.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fr.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.fr.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fr.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.fr.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.fr.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.fr.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.fr.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.fr.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.fr.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\validators.fr.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.fr.xliff'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.fr.xliff'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.fr.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.fr.yml'), 18 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.fr.xliff'), 19 => ($this->targetDirs[3].'\\\\app/Resources/DataDogAuditBundle/translations\\\\messages.fr.xlf'), 20 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.fr.yml'), 21 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.fr.yml')), 'gl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.gl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.gl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.gl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.gl.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.gl.xliff')), 'he' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.he.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.he.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.he.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.he.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.he.yml')), 'hr' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.hr.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.hr.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.hr.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.hr.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.hr.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\FOSUserBundle.hr.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.hr.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.hr.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.hr.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.hr.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.hr.xliff')), 'hu' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.hu.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.hu.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.hu.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.hu.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.hu.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.hu.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.hu.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.hu.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.hu.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.hu.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.hu.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.hu.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.hu.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.hu.xliff')), 'hy' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.hy.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.hy.xlf')), 'id' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.id.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.id.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.id.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.id.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.id.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.id.yml')), 'it' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.it.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.it.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.it.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.it.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.it.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.it.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\FOSUserBundle.it.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.it.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.it.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.it.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.it.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.it.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.it.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.it.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.it.xliff'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.it.yml'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.it.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.it.xliff'), 18 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.it.yml'), 19 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.it.yml')), 'ja' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ja.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ja.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ja.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ja.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ja.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.ja.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.ja.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ja.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ja.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.ja.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.ja.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.ja.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.ja.yml')), 'lb' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.lb.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.lb.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.lb.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.lb.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.lb.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.lb.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.lb.xliff')), 'lt' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.lt.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.lt.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.lt.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.lt.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.lt.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.lt.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.lt.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.lt.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.lt.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.lt.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.lt.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.lt.yml')), 'lv' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.lv.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.lv.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.lv.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.lv.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.lv.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.lv.xliff')), 'mn' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.mn.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.mn.xlf')), 'nb' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.nb.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.nb.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.nb.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.nb.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.nb.yml')), 'nl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.nl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.nl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.nl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.nl.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.nl.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.nl.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.nl.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.nl.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.nl.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.nl.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.nl.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.nl.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.nl.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.nl.yml'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.nl.yml'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.nl.xliff'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.nl.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.nl.yml')), 'nn' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.nn.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.nn.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.nn.xlf')), 'no' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.no.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.no.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.no.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.no.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.no.xliff')), 'pl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.pl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.pl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.pl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.pl.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.pl.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.pl.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.pl.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.pl.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.pl.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.pl.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.pl.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.pl.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.pl.yml'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.pl.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.pl.yml'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.pl.yml')), 'pt' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.pt.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.pt.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.pt.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.pt.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.pt.xliff'), 5 => ($this->targetDirs[3].'\\\\app/Resources/SonataUserBundle/translations\\\\SonataUserBundle.pt.xliff'), 6 => ($this->targetDirs[3].'\\\\app/Resources/SonataMediaBundle/translations\\\\SonataMediaBundle.pt.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.pt.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.pt.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.pt.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.pt.yml'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.pt.xliff'), 12 => ($this->targetDirs[3].'\\\\app/Resources/AppBundle/translations\\\\AppBundle.pt.xliff')), 'pt_BR' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.pt_BR.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.pt_BR.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.pt_BR.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.pt_BR.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.pt_BR.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.pt_BR.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.pt_BR.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.pt_BR.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.pt_BR.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.pt_BR.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.pt_BR.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.pt_BR.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.pt_BR.yml'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.pt_BR.yml'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.pt_BR.yml')), 'ro' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ro.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ro.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ro.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.ro.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ro.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ro.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.ro.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.ro.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ro.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ro.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.ro.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.ro.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.ro.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.ro.yml'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.ro.yml')), 'ru' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ru.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ru.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ru.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.ru.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ru.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ru.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.ru.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.ru.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ru.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ru.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.ru.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.ru.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.ru.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.ru.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.ru.yml'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.ru.yml'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.ru.xliff'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.ru.yml'), 18 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.ru.yml')), 'sk' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sk.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sk.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sk.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.sk.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.sk.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.sk.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.sk.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.sk.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.sk.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.sk.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.sk.yml'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.sk.yml'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.sk.xliff')), 'sl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.sl.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.sl.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.sl.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.sl.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.sl.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.sl.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.sl.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.sl.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.sl.yml'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.sl.xliff')), 'sq' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sq.xlf')), 'sr_Cyrl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sr_Cyrl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sr_Cyrl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sr_Cyrl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.sr_Cyrl.xliff')), 'sr_Latn' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sr_Latn.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sr_Latn.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sr_Latn.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.sr_Latn.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.sr_Latn.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.sr_Latn.xliff')), 'sv' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sv.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sv.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sv.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.sv.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.sv.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.sv.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.sv.yml')), 'th' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.th.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.th.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.th.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.th.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.th.xliff')), 'tr' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.tr.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.tr.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.tr.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.tr.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.tr.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.tr.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.tr.yml'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.tr.yml')), 'uk' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.uk.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.uk.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.uk.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.uk.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.uk.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.uk.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.uk.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.uk.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.uk.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.uk.yml'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.uk.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.uk.yml'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.uk.yml')), 'vi' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.vi.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.vi.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.vi.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.vi.yml')), 'zh_CN' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.zh_CN.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.zh_CN.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.zh_CN.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.zh_CN.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.zh_CN.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.zh_CN.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.zh_CN.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.zh_CN.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.zh_CN.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.zh_CN.yml'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.zh_CN.yml')), 'zh_TW' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.zh_TW.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.zh_TW.xliff')), 'pt_PT' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.pt_PT.xlf')), 'ua' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ua.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.ua.yml')), 'ky' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.ky.xliff'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ky.yml'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ky.yml')), 'sw' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.sw.xliff')), 'bn' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.bn.yml'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.bn.yml')), 'bn_BD' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.bn_BD.yml'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.bn_BD.yml')), 'eo' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.eo.yml'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.eo.yml')), 'sv_SE' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.sv_SE.xliff')), 'oc' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.oc.xliff')))));\n\n $instance->setConfigCacheFactory(${($_ = isset($this->services['config_cache_factory']) ? $this->services['config_cache_factory'] : $this->get('config_cache_factory')) && false ?: '_'});\n $instance->setFallbackLocales(array(0 => 'es'));\n\n return $instance;\n }", "title": "" }, { "docid": "29330e7a2056f71d694f8397ac15ce1e", "score": "0.5500024", "text": "function locale()\n{\n\treturn app()->make(App\\Classes\\Locale::class);\n}", "title": "" }, { "docid": "639e62db3b989878323bc31245fc7826", "score": "0.54872024", "text": "public function getLocale()\n {\n $locale = explode('_', Mage::app()->getLocale()->getLocaleCode());\n if (is_array($locale) && !empty($locale) && in_array($locale[0], $this->_supportedLocales)) {\n return $locale[0];\n }\n return $this->getDefaultLocale();\n }", "title": "" }, { "docid": "555d1feb8cd11f8b906469bf814acf84", "score": "0.54673165", "text": "public static function getLocale() {\n\t\treturn self::$locale;\n\t}", "title": "" }, { "docid": "7299d22c86c67c317b92606c70081d42", "score": "0.5438579", "text": "protected function getLocale() {\n\t\tif ($this->authService->hasIdentity ()) {\n\t\t\t$user = $this->authService->getIdentity ();\n\t\t\tif (isset ( $user->locale )) {\n\t\t\t\treturn $user->locale;\n\t\t\t} else {\n\t\t\t\t$Session = new \\Zend\\Session\\Container ( 'language' );\n\t\t\t\tif ($Session && $Session->locale) {\n\t\t\t\t\treturn $Session->locale;\n\t\t\t\t} else {\n\t\t\t\t\treturn 'en_US';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$Session = new \\Zend\\Session\\Container ( 'language' );\n\t\t\tif ($Session && $Session->locale) {\n\t\t\t\treturn $Session->locale;\n\t\t\t}\n\t\t}\n\t\t// throw new Exception('Nao foi possivel verificar sua sessao');\n\t\t// return $this->redirect ()->toRoute ( \"login\" );\n\t}", "title": "" }, { "docid": "379d6717721e4b3f512b8ba3b52829b7", "score": "0.54360783", "text": "protected function getTranslation_LoaderService()\n {\n $a = ${($_ = isset($this->services['translation.loader.xliff']) ? $this->services['translation.loader.xliff'] : $this->get('translation.loader.xliff')) && false ?: '_'};\n\n $this->services['translation.loader'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\TranslationLoader();\n\n $instance->addLoader('php', ${($_ = isset($this->services['translation.loader.php']) ? $this->services['translation.loader.php'] : $this->get('translation.loader.php')) && false ?: '_'});\n $instance->addLoader('yml', ${($_ = isset($this->services['translation.loader.yml']) ? $this->services['translation.loader.yml'] : $this->get('translation.loader.yml')) && false ?: '_'});\n $instance->addLoader('xlf', $a);\n $instance->addLoader('xliff', $a);\n $instance->addLoader('po', ${($_ = isset($this->services['translation.loader.po']) ? $this->services['translation.loader.po'] : $this->get('translation.loader.po')) && false ?: '_'});\n $instance->addLoader('mo', ${($_ = isset($this->services['translation.loader.mo']) ? $this->services['translation.loader.mo'] : $this->get('translation.loader.mo')) && false ?: '_'});\n $instance->addLoader('ts', ${($_ = isset($this->services['translation.loader.qt']) ? $this->services['translation.loader.qt'] : $this->get('translation.loader.qt')) && false ?: '_'});\n $instance->addLoader('csv', ${($_ = isset($this->services['translation.loader.csv']) ? $this->services['translation.loader.csv'] : $this->get('translation.loader.csv')) && false ?: '_'});\n $instance->addLoader('res', ${($_ = isset($this->services['translation.loader.res']) ? $this->services['translation.loader.res'] : $this->get('translation.loader.res')) && false ?: '_'});\n $instance->addLoader('dat', ${($_ = isset($this->services['translation.loader.dat']) ? $this->services['translation.loader.dat'] : $this->get('translation.loader.dat')) && false ?: '_'});\n $instance->addLoader('ini', ${($_ = isset($this->services['translation.loader.ini']) ? $this->services['translation.loader.ini'] : $this->get('translation.loader.ini')) && false ?: '_'});\n $instance->addLoader('json', ${($_ = isset($this->services['translation.loader.json']) ? $this->services['translation.loader.json'] : $this->get('translation.loader.json')) && false ?: '_'});\n\n return $instance;\n }", "title": "" }, { "docid": "8d1a3b4fbc87e6ba81d32519cd74ff5e", "score": "0.5425331", "text": "protected function getTranslation_Loader_ResService()\n {\n return $this->services['translation.loader.res'] = new \\Symfony\\Component\\Translation\\Loader\\IcuResFileLoader();\n }", "title": "" }, { "docid": "8d1a3b4fbc87e6ba81d32519cd74ff5e", "score": "0.5425331", "text": "protected function getTranslation_Loader_ResService()\n {\n return $this->services['translation.loader.res'] = new \\Symfony\\Component\\Translation\\Loader\\IcuResFileLoader();\n }", "title": "" }, { "docid": "6894b757afe21d8a169ce717c702eeff", "score": "0.54233307", "text": "public function getLocale()\n {\n return $this->laravel[Translator::class]->getLocale();\n }", "title": "" }, { "docid": "6894b757afe21d8a169ce717c702eeff", "score": "0.54233307", "text": "public function getLocale()\n {\n return $this->laravel[Translator::class]->getLocale();\n }", "title": "" }, { "docid": "61ce35832e4bf37380a044c3fb581691", "score": "0.54228747", "text": "public function localizer()\n {\n return $this->get('localizer');\n }", "title": "" }, { "docid": "43da1e518387dd506414cb273ca4669b", "score": "0.54085934", "text": "public static function getService() {\n\t\tif( !static::$service ) {\n\t\t\tstatic::$service = new static();\n\t\t}\n\t\treturn static::$service;\n\t}", "title": "" }, { "docid": "448d2025bbe1ce2e16ca8c39d6176e9b", "score": "0.5406505", "text": "protected function getFragment_ListenerService()\n {\n return $this->services['fragment.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener(${($_ = isset($this->services['uri_signer']) ? $this->services['uri_signer'] : $this->get('uri_signer')) && false ?: '_'}, '/_fragment');\n }", "title": "" }, { "docid": "f4b5dbdb4c4dc24e057db07e98124305", "score": "0.5403464", "text": "static public function getCurrentLocale() { return self::$currentLocale; }", "title": "" }, { "docid": "20af1f14548dde02988cd053c5a7f1f1", "score": "0.54033864", "text": "protected function getTranslation_Loader_IniService()\n {\n return $this->services['translation.loader.ini'] = new \\Symfony\\Component\\Translation\\Loader\\IniFileLoader();\n }", "title": "" }, { "docid": "20af1f14548dde02988cd053c5a7f1f1", "score": "0.54033864", "text": "protected function getTranslation_Loader_IniService()\n {\n return $this->services['translation.loader.ini'] = new \\Symfony\\Component\\Translation\\Loader\\IniFileLoader();\n }", "title": "" }, { "docid": "615970e80a0762de67178ae2b8b8fee7", "score": "0.5401338", "text": "protected function getResolveControllerNameSubscriberService()\n {\n return $this->privates['resolve_controller_name_subscriber'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\ResolveControllerNameSubscriber(($this->privates['controller_name_converter'] ?? $this->privates['controller_name_converter'] = new \\Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerNameParser(($this->services['kernel'] ?? $this->get('kernel', 1)))));\n }", "title": "" }, { "docid": "cfc8dc88e035d7e20811e48c47b76cdd", "score": "0.53900546", "text": "private function getSm() {\r\n return $this->getEvent()->getApplication()->getServiceManager();\r\n }", "title": "" }, { "docid": "12c011e7312b631a732b5b7def81ac31", "score": "0.53887415", "text": "protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }", "title": "" }, { "docid": "68ae6e10f81f36cc07a0949a4230cfb4", "score": "0.53777057", "text": "protected function getTranslation_Loader_PoService()\n {\n return $this->services['translation.loader.po'] = new \\Symfony\\Component\\Translation\\Loader\\PoFileLoader();\n }", "title": "" }, { "docid": "68ae6e10f81f36cc07a0949a4230cfb4", "score": "0.53777057", "text": "protected function getTranslation_Loader_PoService()\n {\n return $this->services['translation.loader.po'] = new \\Symfony\\Component\\Translation\\Loader\\PoFileLoader();\n }", "title": "" }, { "docid": "21dba65c8db756dc1d172670b10fd58c", "score": "0.5370892", "text": "public function registerAsGlobalInstance() : Locale\n {\n\n static::$instance = $this;\n return $this;\n\n }", "title": "" }, { "docid": "f01fab3d3befb9326a4f54d8657c9886", "score": "0.5361267", "text": "public function getLocale()\n {\n return $this->locale ?: i18n::get_locale();\n }", "title": "" }, { "docid": "bfae8890e4623d39c92ac4bab7296679", "score": "0.5351331", "text": "protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->services['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(NULL, new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.role_hierarchy']) ? $this->services['security.role_hierarchy'] : $this->get('security.role_hierarchy', ContainerInterface::NULL_ON_INVALID_REFERENCE)) && false ?: '_'}, ${($_ = isset($this->services['security.token_storage']) ? $this->services['security.token_storage'] : $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE)) && false ?: '_'}, ${($_ = isset($this->services['security.authorization_checker']) ? $this->services['security.authorization_checker'] : $this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE)) && false ?: '_'});\n }", "title": "" }, { "docid": "bb61a2baa3448386a7956c3a9151f19c", "score": "0.53513163", "text": "public function getLanguagePreferenceService(): LanguagePreference\n {\n return $this->languagePreferenceService;\n }", "title": "" }, { "docid": "902b39398c14bb80255d0acc9ed38b75", "score": "0.5344701", "text": "protected function getTranslator_SelectorService()\n {\n return $this->services['translator.selector'] = new \\Symfony\\Component\\Translation\\MessageSelector();\n }", "title": "" }, { "docid": "6cc2e5f94f2b543e47a13d995e449b2e", "score": "0.5344216", "text": "protected function getProfilerListenerService()\n {\n return $this->privates['profiler_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener(($this->services['profiler'] ?? $this->getProfilerService()), ($this->services['request_stack'] ?? $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()), NULL, false, false);\n }", "title": "" }, { "docid": "c0b966f24cbd6428ac0718629da26b11", "score": "0.53314626", "text": "public function getLocale()\n {\n $locale = explode('_', Mage::app()->getLocale()->getLocaleCode());\n if (is_array($locale) && !empty($locale) && in_array($locale[0], $this->_supportedLocales)) {\n\t\t\tif($locale[0] == 'ko'){\n\t\t\t\treturn 'kr';\n\t\t\t}\n\t\t\telse if($locale[0] == 'zh'){\n\t\t\t\treturn 'cn';\n\t\t\t}\n\t\t\telse if($locale[0] == 'ja'){\n\t\t\t\treturn 'jp';\n\t\t\t}\n\t\t\telse if($locale[0] == 'sv'){\n\t\t\t\treturn 'se';\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn $locale[0];\n\t\t\t}\n }\n return $this->getDefaultLocale();\n }", "title": "" }, { "docid": "346c5ebedf9b1112fb7a4c327ee7ff44", "score": "0.5329992", "text": "protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }", "title": "" }, { "docid": "ceaa2426fe59679e430f26baf84836d1", "score": "0.5325816", "text": "public function getLocale()\n {\n $locale = $this->localeMap[$this->resolver->getLocale()] ?? $this->resolver->getLocale();\n $allowedLocales = $this->config->getValue('supported_locales');\n\n return strpos($allowedLocales, (string) $locale) !== false ? $locale : 'en_US';\n }", "title": "" }, { "docid": "7494039e3c0822130b6e6197b95800e9", "score": "0.53252053", "text": "protected function getTranslation_Loader_MoService()\n {\n return $this->services['translation.loader.mo'] = new \\Symfony\\Component\\Translation\\Loader\\MoFileLoader();\n }", "title": "" }, { "docid": "7494039e3c0822130b6e6197b95800e9", "score": "0.53252053", "text": "protected function getTranslation_Loader_MoService()\n {\n return $this->services['translation.loader.mo'] = new \\Symfony\\Component\\Translation\\Loader\\MoFileLoader();\n }", "title": "" }, { "docid": "7fbbf2fc1fbbe4b44dfc15ea135673ca", "score": "0.53204095", "text": "public function getLocale()\n {\n return $this->currentLocale;\n }", "title": "" }, { "docid": "2d2c0035360e0263db96e428360b8551", "score": "0.5310595", "text": "protected function getTranslator_DefaultService()\n {\n return $this->services['translator.default'] = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator($this, $this->get('translator.selector'), array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini')), array('cache_dir' => '/Users/pete.robinson/Sites/wam/image/tests/SupportFiles/app/../../../tmp/cache/translations', 'debug' => true));\n }", "title": "" }, { "docid": "790050b9ddaaa097b0eba7d0c5a4890c", "score": "0.53097826", "text": "public static function getLocale() {\r\n if (!self::$locale) {\r\n $locale = new Zend_Locale('en-us');\r\n try {\r\n $option = OptionHelper::getOption('nlsLanguage', 'auto');\r\n if(!$option){\r\n $option = 'auto';\r\n }\r\n $locale = new Zend_Locale('auto' == $option? Zend_Locale::BROWSER: $option);\r\n } catch (Zend_Locale_Exception $e) {\r\n $locale = new Zend_Locale('en-us');\r\n }\r\n self::$locale = $locale;\r\n Zend_Registry::set('Zend_Locale', $locale);\r\n// Util::print_r($locale);\r\n }\r\n return self::$locale;\r\n }", "title": "" }, { "docid": "a7e2f5409e7a4e92815f3c984a9deff1", "score": "0.5307373", "text": "protected function getTranslator() {\n return I18n::getInstance()->getTranslator();\n }", "title": "" }, { "docid": "02e433cfafeb40fa18bffc883d5f6f11", "score": "0.5305716", "text": "static public function get_locale() {\r\n\t\t\t$options = self::get_options();\r\n\t\t \treturn $options['locale'];\r\n\t\t}", "title": "" }, { "docid": "52c23068a28d105b64983b211621e26c", "score": "0.5303333", "text": "protected static function translator()\n {\n if (static::$translator === null) {\n static::$translator = new Translator('en');\n static::$translator->addLoader('php', new PhpFileLoader());\n static::setLocale('en');\n }\n\n return static::$translator;\n }", "title": "" }, { "docid": "8353a3fd48282fcb4776840602e85916", "score": "0.5301541", "text": "protected static function getFacadeAccessor()\n {\n return 'xannn94.localization';\n }", "title": "" }, { "docid": "a7213d6e25a79c1254881586a531da78", "score": "0.5295375", "text": "protected function getApiPlatform_Listener_Request_DeserializeService()\n {\n return $this->privates['api_platform.listener.request.deserialize'] = new \\ApiPlatform\\Core\\EventListener\\DeserializeListener(($this->services['serializer'] ?? $this->getSerializerService()), ($this->privates['api_platform.serializer.context_builder.filter'] ?? $this->getApiPlatform_Serializer_ContextBuilder_FilterService()), ($this->privates['api_platform.formats_provider'] ?? $this->getApiPlatform_FormatsProviderService()));\n }", "title": "" }, { "docid": "6083ad2ad23316aa6b90c2034c570153", "score": "0.5291275", "text": "protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListenerService('kernel.controller', array(0 => 'data_collector.router', 1 => 'onKernelController'), 0);\n $instance->addSubscriberService('response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ResponseListener');\n $instance->addSubscriberService('streamed_response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\StreamedResponseListener');\n $instance->addSubscriberService('locale_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\LocaleListener');\n $instance->addSubscriberService('fragment.handler', 'Symfony\\\\Component\\\\HttpKernel\\\\Fragment\\\\FragmentHandler');\n $instance->addSubscriberService('debug.deprecation_logger_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\DeprecationLoggerListener');\n $instance->addSubscriberService('test.session.listener', 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\EventListener\\\\TestSessionListener');\n $instance->addSubscriberService('session_listener', 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\EventListener\\\\SessionListener');\n $instance->addSubscriberService('profiler_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ProfilerListener');\n $instance->addSubscriberService('data_collector.request', 'Symfony\\\\Component\\\\HttpKernel\\\\DataCollector\\\\RequestDataCollector');\n $instance->addSubscriberService('router_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\RouterListener');\n\n return $instance;\n }", "title": "" }, { "docid": "e21c624cdb89e992104f8b008c6b3f59", "score": "0.5281754", "text": "public function getLocale()\n {\n return $this->locale === 'auto'\n ? $this->translator->getLocale()\n : $this->locale;\n }", "title": "" }, { "docid": "75df2bf4f8a0ffcc12e61b93af684c6a", "score": "0.5268938", "text": "protected function getResolveControllerNameSubscriberService()\n {\n return $this->services['resolve_controller_name_subscriber'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\ResolveControllerNameSubscriber(${($_ = isset($this->services['controller_name_converter']) ? $this->services['controller_name_converter'] : $this->getControllerNameConverterService()) && false ?: '_'});\n }", "title": "" }, { "docid": "82d1ad5488696e38640f339c082d9621", "score": "0.52597004", "text": "protected function getLanguageManager()\n {\n if (!$this->languageManager) {\n $this->languageManager = \\Drupal::service('language_manager');\n }\n\n return $this->languageManager;\n }", "title": "" } ]
ea77fbd12cc2433ff48f275775768d4c
Show all the invalid properties with reasons.
[ { "docid": "e811591e96873915531dbe0e54ff1d2b", "score": "0.7621177", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getAppTypeAllowableValues();\n if (!is_null($this->container['app_type']) && !in_array($this->container['app_type'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'app_type', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getCurrencyCodeAllowableValues();\n if (!is_null($this->container['currency_code']) && !in_array($this->container['currency_code'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'currency_code', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" } ]
[ { "docid": "7fed39667d839c08102ac22f697eafc2", "score": "0.7953434", "text": "public function listInvalidProperties();", "title": "" }, { "docid": "7fed39667d839c08102ac22f697eafc2", "score": "0.7953434", "text": "public function listInvalidProperties();", "title": "" }, { "docid": "7fed39667d839c08102ac22f697eafc2", "score": "0.7953434", "text": "public function listInvalidProperties();", "title": "" }, { "docid": "7fed39667d839c08102ac22f697eafc2", "score": "0.7953434", "text": "public function listInvalidProperties();", "title": "" }, { "docid": "519d9da57eb2833f8fc5ce370ff86b5e", "score": "0.78832287", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getTypeAllowableValues();\n \n if (!is_null($this->container['type']) && !in_array(strtolower($this->container['type']), $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'type', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n if (!is_null($this->container['reason']) && (mb_strlen($this->container['reason']) > 64)) {\n $invalidProperties[] = \"invalid value for 'reason', the character length must be smaller than or equal to 64.\";\n }\n\n $allowedValues = $this->getStateAllowableValues();\n \n if (!is_null($this->container['state']) && !in_array(strtolower($this->container['state']), $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'state', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "0758ee57603812dbb9754b35616d7625", "score": "0.78612113", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['code'] === null) {\n $invalidProperties[] = \"'code' can't be null\";\n }\n $allowedValues = $this->getCodeAllowableValues();\n if (!is_null($this->container['code']) && !in_array($this->container['code'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'code', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n if ($this->container['reason'] === null) {\n $invalidProperties[] = \"'reason' can't be null\";\n }\n $allowedValues = $this->getReasonAllowableValues();\n if (!is_null($this->container['reason']) && !in_array($this->container['reason'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'reason', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "b036e2aa6c43b5c48fced00caf2be093", "score": "0.7813678", "text": "public function listInvalidProperties()\n {\n $invalid_properties = parent::listInvalidProperties();\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "b036e2aa6c43b5c48fced00caf2be093", "score": "0.7813678", "text": "public function listInvalidProperties()\n {\n $invalid_properties = parent::listInvalidProperties();\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "ee0fb5056933ed87e7687e0b4643347c", "score": "0.7807181", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getExpandAllowableValues();\n if (!is_null($this->container['expand']) && !in_array($this->container['expand'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'expand', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getErrorPolicyAllowableValues();\n if (!is_null($this->container['errorPolicy']) && !in_array($this->container['errorPolicy'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'errorPolicy', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "8bffc3ffe4ddeb386251df2489dd7c4b", "score": "0.7800417", "text": "public function listInvalidProperties()\n {\n $invalid_properties = array();\n return $invalid_properties;\n }", "title": "" }, { "docid": "8bffc3ffe4ddeb386251df2489dd7c4b", "score": "0.7800417", "text": "public function listInvalidProperties()\n {\n $invalid_properties = array();\n return $invalid_properties;\n }", "title": "" }, { "docid": "8bffc3ffe4ddeb386251df2489dd7c4b", "score": "0.7800417", "text": "public function listInvalidProperties()\n {\n $invalid_properties = array();\n return $invalid_properties;\n }", "title": "" }, { "docid": "8bffc3ffe4ddeb386251df2489dd7c4b", "score": "0.7800417", "text": "public function listInvalidProperties()\n {\n $invalid_properties = array();\n return $invalid_properties;\n }", "title": "" }, { "docid": "343c14a564bb2e864d93e5dd24bdf2ce", "score": "0.77815336", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n return $invalid_properties;\n }", "title": "" }, { "docid": "343c14a564bb2e864d93e5dd24bdf2ce", "score": "0.77815336", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n return $invalid_properties;\n }", "title": "" }, { "docid": "d7aeff97ef9e55272649fd9d7fb5bee5", "score": "0.7767669", "text": "public function listInvalidProperties()\r\n {\r\n $invalid_properties = [];\r\n return $invalid_properties;\r\n }", "title": "" }, { "docid": "d7aeff97ef9e55272649fd9d7fb5bee5", "score": "0.7767669", "text": "public function listInvalidProperties()\r\n {\r\n $invalid_properties = [];\r\n return $invalid_properties;\r\n }", "title": "" }, { "docid": "701abdd9f96795f775c013d6e3e9c053", "score": "0.7757561", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "701abdd9f96795f775c013d6e3e9c053", "score": "0.7757561", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "701abdd9f96795f775c013d6e3e9c053", "score": "0.7757561", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "4c593a5898abbb7defb5c066e89857e5", "score": "0.77454484", "text": "public function listInvalidProperties()\n {\n $invalid_properties = array();\n $allowed_values = array(\"NO_APP_KEY\", \"INVALID_APP_KEY\", \"NO_SESSION\", \"INVALID_SESSION_INFORMATION\", \"NOT_AUTHORIZED\", \"INVALID_INPUT\", \"INVALID_CLOCK\", \"UNEXPECTED_ERROR\", \"TIMEOUT\", \"SUBSCRIPTION_LIMIT_EXCEEDED\", \"INVALID_REQUEST\", \"CONNECTION_FAILED\", \"MAX_CONNECTION_LIMIT_EXCEEDED\");\n if (!in_array($this->container['error_code'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'error_code', must be one of #{allowed_values}.\";\n }\n\n $allowed_values = array(\"SUCCESS\", \"FAILURE\");\n if (!in_array($this->container['status_code'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'status_code', must be one of #{allowed_values}.\";\n }\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.7735858", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.7735858", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.7735858", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.7735858", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.7735858", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.7735858", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.7735858", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.7735858", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.7735858", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.7735858", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.7735858", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.7735858", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.7735858", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.7735858", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "9ed2ad6784bf9484c1b7f5f27e236b95", "score": "0.7727888", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getStatusAllowableValues();\n if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'status', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getStatusDetailAllowableValues();\n if (!is_null($this->container['status_detail']) && !in_array($this->container['status_detail'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'status_detail', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "a8052c7cda3437586251b0c0da12cbbe", "score": "0.7726792", "text": "public function listInvalidProperties()\n {\n $invalid_properties = array();\n $allowed_values = array(\"B\", \"L\");\n if (!in_array($this->container['side'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'side', must be one of #{allowed_values}.\";\n }\n\n $allowed_values = array(\"L\", \"P\", \"MOC\");\n if (!in_array($this->container['pt'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'pt', must be one of #{allowed_values}.\";\n }\n\n $allowed_values = array(\"L\", \"LOC\", \"MOC\");\n if (!in_array($this->container['ot'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'ot', must be one of #{allowed_values}.\";\n }\n\n $allowed_values = array(\"E\", \"EC\");\n if (!in_array($this->container['status'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'status', must be one of #{allowed_values}.\";\n }\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "37e8e95ae00bcd37109f2956d29ff27b", "score": "0.7719853", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getCarrierAllowableValues();\n if (!in_array($this->container['carrier'], $allowedValues)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'carrier', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getModeAllowableValues();\n if (!in_array($this->container['mode'], $allowedValues)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'mode', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getStatusAllowableValues();\n if (!in_array($this->container['status'], $allowedValues)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'status', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "eb8dccb4aeb399ee8778ae29fb8899fe", "score": "0.77043563", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n $allowed_values = [\"valid\", \"invalid\", \"unknown\"];\n if (!in_array($this->container['status'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'status', must be one of 'valid', 'invalid', 'unknown'.\";\n }\n\n $allowed_values = [\"perm\", \"temp\"];\n if (!in_array($this->container['duration'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'duration', must be one of 'perm', 'temp'.\";\n }\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "40831014ca18a9470e0bf127fc0c5a5c", "score": "0.7699869", "text": "public function listInvalidProperties()\n {\n $invalidProperties = parent::listInvalidProperties();\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "40831014ca18a9470e0bf127fc0c5a5c", "score": "0.7699869", "text": "public function listInvalidProperties()\n {\n $invalidProperties = parent::listInvalidProperties();\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "40831014ca18a9470e0bf127fc0c5a5c", "score": "0.7699869", "text": "public function listInvalidProperties()\n {\n $invalidProperties = parent::listInvalidProperties();\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "40831014ca18a9470e0bf127fc0c5a5c", "score": "0.7699869", "text": "public function listInvalidProperties()\n {\n $invalidProperties = parent::listInvalidProperties();\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "90c87b90875e251383cc4a5db190eeb7", "score": "0.76986825", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if (!is_null($this->container['editEngine']) && (mb_strlen($this->container['editEngine']) > 128)) {\r\n $invalidProperties[] = \"invalid value for 'editEngine', the character length must be smaller than or equal to 128.\";\r\n }\r\n if (!is_null($this->container['editEngine']) && (mb_strlen($this->container['editEngine']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'editEngine', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['modelId']) && (mb_strlen($this->container['modelId']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'modelId', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['modelId']) && (mb_strlen($this->container['modelId']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'modelId', the character length must be bigger than or equal to 1.\";\r\n }\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "4302e98aee44edcbe8ccb2e24ce24b47", "score": "0.76949286", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n if ($this->container['name'] === null) {\n $invalid_properties[] = \"'name' can't be null\";\n }\n if ((strlen($this->container['name']) > 30)) {\n $invalid_properties[] = \"invalid value for 'name', the character length must be smaller than or equal to 30.\";\n }\n\n if ($this->container['amount_caption'] === null) {\n $invalid_properties[] = \"'amount_caption' can't be null\";\n }\n if ($this->container['bill_expenses'] === null) {\n $invalid_properties[] = \"'bill_expenses' can't be null\";\n }\n $allowed_values = [\"Billable\", \"DoNotBill\", \"NoCharge\"];\n if (!in_array($this->container['bill_expenses'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'bill_expenses', must be one of #{allowed_values}.\";\n }\n\n if ($this->container['invoice_markup_option'] === null) {\n $invalid_properties[] = \"'invoice_markup_option' can't be null\";\n }\n $allowed_values = [\"Percent\", \"Amount\", \"Mile\"];\n if (!in_array($this->container['invoice_markup_option'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'invoice_markup_option', must be one of #{allowed_values}.\";\n }\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "258c8da57a64edd67dcd271354d1a0f1", "score": "0.7673375", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getFrameRateAllowableValues();\n if (!in_array($this->container['frame_rate'], $allowedValues)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'frame_rate', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getIngestionTypeAllowableValues();\n if (!in_array($this->container['ingestion_type'], $allowedValues)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'ingestion_type', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getResolutionAllowableValues();\n if (!in_array($this->container['resolution'], $allowedValues)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'resolution', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "b8dc8aab03f1c458149e312a79774213", "score": "0.76681995", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getLevelAllowableValues();\n if (!is_null($this->container['level']) && !in_array($this->container['level'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'level', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getCategoryAllowableValues();\n if (!is_null($this->container['category']) && !in_array($this->container['category'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'category', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "38551e975a428be8c66de8bfd7165485", "score": "0.7654543", "text": "public function listInvalidProperties()\n {\n $invalid_properties = array();\n if ($this->container['branch_code'] === null) {\n $invalid_properties[] = \"'branch_code' can't be null\";\n }\n $allowed_values = array(\"Sale\", \"Return\");\n if (!in_array($this->container['invoice_type'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'invoice_type', must be one of #{allowed_values}.\";\n }\n\n $allowed_values = array(\"Open\", \"Closed\", \"Cancelled\", \"Voided\");\n if (!in_array($this->container['status'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'status', must be one of #{allowed_values}.\";\n }\n\n if ($this->container['channel'] === null) {\n $invalid_properties[] = \"'channel' can't be null\";\n }\n if (!is_null($this->container['item_count']) && ($this->container['item_count'] < 0.0)) {\n $invalid_properties[] = \"invalid value for 'item_count', must be bigger than or equal to 0.0.\";\n }\n\n if ($this->container['items'] === null) {\n $invalid_properties[] = \"'items' can't be null\";\n }\n return $invalid_properties;\n }", "title": "" }, { "docid": "9c9c2488e009c5df558616c9b99759f0", "score": "0.765174", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n return $invalidProperties;\n }", "title": "" }, { "docid": "9c9c2488e009c5df558616c9b99759f0", "score": "0.765174", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n return $invalidProperties;\n }", "title": "" }, { "docid": "9c9c2488e009c5df558616c9b99759f0", "score": "0.765174", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n return $invalidProperties;\n }", "title": "" }, { "docid": "9c9c2488e009c5df558616c9b99759f0", "score": "0.765174", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n return $invalidProperties;\n }", "title": "" }, { "docid": "9c9c2488e009c5df558616c9b99759f0", "score": "0.765174", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n return $invalidProperties;\n }", "title": "" }, { "docid": "9c9c2488e009c5df558616c9b99759f0", "score": "0.765174", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n return $invalidProperties;\n }", "title": "" }, { "docid": "bfaaef144ff81404cc0fc51150770a52", "score": "0.7643509", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getConsoleAllowableValues();\n if (!is_null($this->container['console']) && !in_array($this->container['console'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'console', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getFileAllowableValues();\n if (!is_null($this->container['file']) && !in_array($this->container['file'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'file', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getSyslogAllowableValues();\n if (!is_null($this->container['syslog']) && !in_array($this->container['syslog'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'syslog', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "5adbc8c8fe3d8c36258001600e592866", "score": "0.763609", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getStateAllowableValues();\n if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'state', must be one of '%s'\",\n $this->container['state'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getStatusAllowableValues();\n if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'status', must be one of '%s'\",\n $this->container['status'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.7635166", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.7635166", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.7635166", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.7635166", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.7635166", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.7635166", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.7635166", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "827d80435d4fc0f4d45334b7532cfdd1", "score": "0.76325935", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getTitleAllowableValues();\n if (!is_null($this->container['title']) && !in_array($this->container['title'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'title', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n if ($this->container['first_name'] === null) {\n $invalidProperties[] = \"'first_name' can't be null\";\n }\n if ($this->container['last_name'] === null) {\n $invalidProperties[] = \"'last_name' can't be null\";\n }\n $allowedValues = $this->getGenderAllowableValues();\n if (!is_null($this->container['gender']) && !in_array($this->container['gender'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'gender', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n if ($this->container['candidate_email'] === null) {\n $invalidProperties[] = \"'candidate_email' can't be null\";\n }\n return $invalidProperties;\n }", "title": "" }, { "docid": "fcb63826c056e2a0182524a40a0c96fe", "score": "0.7630781", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if (!is_null($this->container['referralCode']) && (mb_strlen($this->container['referralCode']) > 100)) {\n $invalidProperties[] = \"invalid value for 'referralCode', the character length must be smaller than or equal to 100.\";\n }\n\n $allowedValues = $this->getStateAllowableValues();\n if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'state', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "a0648c6d4eee13855786b0e31d5376bb", "score": "0.76168925", "text": "public function listInvalidProperties()\n\t{\n\t\t$invalid_properties = [];\n\n\t\tif ($this->container['currency'] === null) {\n\t\t\t$invalid_properties[] = \"'currency' can't be null\";\n\t\t}\n\t\t$allowed_values = $this->getCurrencyAllowableValues();\n\t\tif (!in_array($this->container['currency'], $allowed_values)) {\n\t\t\t$invalid_properties[] = sprintf(\n\t\t\t\t\"invalid value for 'currency', must be one of '%s'\",\n\t\t\t\timplode(\"', '\", $allowed_values)\n\t\t\t);\n\t\t}\n\n\t\tif ($this->container['register'] === null) {\n\t\t\t$invalid_properties[] = \"'register' can't be null\";\n\t\t}\n\t\tif ($this->container['renew'] === null) {\n\t\t\t$invalid_properties[] = \"'renew' can't be null\";\n\t\t}\n\t\tif ($this->container['transfer'] === null) {\n\t\t\t$invalid_properties[] = \"'transfer' can't be null\";\n\t\t}\n\t\tif ($this->container['redeem'] === null) {\n\t\t\t$invalid_properties[] = \"'redeem' can't be null\";\n\t\t}\n\t\treturn $invalid_properties;\n\t}", "title": "" }, { "docid": "c54f8ccac15cf7188b1e8a9bcfc7cd5b", "score": "0.75976264", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getTypeAllowableValues();\n if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'type', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getPrivilegeAllowableValues();\n if (!is_null($this->container['privilege']) && !in_array($this->container['privilege'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'privilege', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "48fe7f92dc51199f550eb3598764eca1", "score": "0.75958735", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getIdAllowableValues();\n if (!is_null($this->container['id']) && !in_array($this->container['id'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'id', must be one of '%s'\",\n $this->container['id'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n $allowedValues = $this->getNameAllowableValues();\n if (!is_null($this->container['name']) && !in_array($this->container['name'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'name', must be one of '%s'\",\n $this->container['name'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.75937396", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" } ]
e8a06d89ddd74b123bd139f98b931af6
Does the user have an avatar.
[ { "docid": "c73742fdb3522972f8ee4ddfb15e9d8e", "score": "0.8269849", "text": "public function hasAvatar(): bool ;", "title": "" } ]
[ { "docid": "413925e6ee896f293aac80e944e05d89", "score": "0.8270429", "text": "public function hasAvatar()\n {\n return (bool) $this->avatar();\n }", "title": "" }, { "docid": "52a691f3dc406a55f56f34241b53625d", "score": "0.7568815", "text": "public function hasCustomAvatar()\n {\n if ($this->avatar !== null) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "2ebdb9cfd3c8a710c5718f75fadb9219", "score": "0.70049417", "text": "protected function avatarFetchEnabled(): bool\n {\n $fetchUrl = $this->getAvatarUrl();\n\n return is_string($fetchUrl) && strpos($fetchUrl, 'http') === 0;\n }", "title": "" }, { "docid": "ec0abb040bdfd3d0def9a01a9861a23d", "score": "0.69755465", "text": "function has_custom_avatar( $author_id ) {\r\n\t\t\t$has_custom_avatar = false;\r\n\t\t\tif ( ! is_int( $author_id ) ) {\r\n\t\t\t\t$user = get_user_by( 'email', $author_id );\r\n\t\t\t\tif ( $user ) {\r\n\t\t\t\t\t$author_id = $user->ID;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$avatar_id = get_the_author_meta( 'wpa_avatar_id', $author_id );\r\n\t\t\tif ( $avatar_id ) {\r\n\t\t\t\t$has_custom_avatar = true;\r\n\t\t\t}\r\n\r\n\t\t\treturn $has_custom_avatar;\r\n\t\t}", "title": "" }, { "docid": "8e36be1b28277b2d44cc3c85a4d58483", "score": "0.6958944", "text": "public function hasImage()\n {\n return $this->user->HasImage;\n }", "title": "" }, { "docid": "3fa08cc56400d41725dfc4394d49494c", "score": "0.68515784", "text": "public function avatar(){\n\t\treturn $this->exists() ? 'comedy/'.$this->profile_link().'/img/prof/'.$this->data()->avatar_link : false;\n\t}", "title": "" }, { "docid": "18bb959bf8f214864b5b99038fbb7b15", "score": "0.6774413", "text": "public function getAvatarImage()\n {\n return false;\n }", "title": "" }, { "docid": "daae1fb699b768194823ba9e81144915", "score": "0.67269546", "text": "public function avatar() {\n if ($this->_aSession['user']['id'] == 0)\n return Helper::errorMessage(I18n::get('error.session.create_first'), '/sessions/create');\n\n elseif ($this->_aSession['user']['id'] !== $this->_iId && $this->_aSession['user']['role'] < 4)\n return Helper::redirectTo('/errors/401');\n\n else\n return isset($this->_aRequest[$this->_sController]) ||\n isset($this->_aRequest['type']) && 'json' == $this->_aRequest['type'] ?\n $this->_updateAvatar() :\n $this->_showFormTemplate();\n }", "title": "" }, { "docid": "f6e10d268f95c776aca8fb6e7137c8cc", "score": "0.6706297", "text": "public function hasProfilePicture()\n {\n return !is_null($this->profilePicture);\n }", "title": "" }, { "docid": "4106a509558febfe6acc4c5dad7d2356", "score": "0.66791755", "text": "public function _avatar_exists($user_id = 0, $is_middle = 0)\n {\n $avatar_path = _gen_dir_path($user_id, INCLUDE_PATH . SITE_AVATARS_DIR, 1, 0777) . (int) $user_id . ($is_middle ? '_m' : '') . '.jpg';\n return file_exists($avatar_path);\n }", "title": "" }, { "docid": "1669efb303c109699a44ebcdeaf2bfd2", "score": "0.66734624", "text": "public function getHasMediaAttribute()\n {\n return $this->hasMedia('avatar') ? true : false;\n }", "title": "" }, { "docid": "a0107c1a4aa472a90fd72d8c92e17ceb", "score": "0.66603184", "text": "function hasProfileImage($id, $photoname){\n\t$real_path = APPLICATION_PATH.\"/../public/uploads/users/user_\";\n \tif (APPLICATION_ENV == \"production\") {\n \t\t$real_path = str_replace(\"public/\", \"\", $real_path); \n \t}\n\t$real_path = $real_path.$id.DIRECTORY_SEPARATOR.\"avatar\".DIRECTORY_SEPARATOR.\"base_\".$photoname;\n\tif(file_exists($real_path) && !isEmptyString($photoname)){\n\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "7f4a1e95d3e13f6088ab905d7c42d64a", "score": "0.6651649", "text": "public function isAvatarImage($filename)\n {\n switch (get_file_extension($filename)) {\n case 'jpeg':\n case 'jpg':\n case 'png':\n case 'gif':\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a2297849da570e627b2971e3d978e9c9", "score": "0.65819657", "text": "protected function userPictureEnabled() {\n $field_definitions = $this->entityFieldManager->getFieldDefinitions('user', 'user');\n return isset($field_definitions['user_picture']);\n }", "title": "" }, { "docid": "8442e9116925757679672e5690c640d3", "score": "0.64927876", "text": "function mod_user_avatar_current_user_has_permission($type)\n{\n $perm = $GLOBALS['PHORUM']['mod_user_avatar']['permission_'.$type];\n\n $permission_granted = TRUE;\n\n switch ($perm)\n {\n case AVATAR_PERM_NOBODY:\n $permission_granted = FALSE;\n break;\n\n case AVATAR_PERM_ADMIN:\n if (empty($GLOBALS['PHORUM']['user']['admin'])) {\n $permission_granted = FALSE;\n }\n break;\n\n case AVATAR_PERM_MODERATOR:\n if (empty($GLOBALS['PHORUM']['user']['admin']) &&\n empty($GLOBALS['PHORUM']['DATA']['MESSAGE_MODERATOR'])) {\n $permission_granted = FALSE;\n }\n break;\n\n default:\n // No further operation required. Permission is granted.\n break;\n }\n\n return $permission_granted;\n}", "title": "" }, { "docid": "0f7662bf2145585d4bd74e65d7cdb63c", "score": "0.6471637", "text": "public static function hasProviderAvatarsFeature()\n {\n return Features::hasProviderAvatarsFeature();\n }", "title": "" }, { "docid": "70f04b757831a976a6fb0bd9be7fab81", "score": "0.6312572", "text": "public function isExists()\n {\n return $this->getEmail() ? $this->validateGravatar($this->getEmail()) : false;\n }", "title": "" }, { "docid": "1e37f0ad02166cb8ebe84746701128c6", "score": "0.6205285", "text": "public function hasImage()\n {\n return file_exists($this->getPath(\"_org\"));\n }", "title": "" }, { "docid": "542b321d2af3132debab8fb698811ada", "score": "0.619772", "text": "public function avatar($user_id)\n {\n $result = $this->db->query_collector($query =null,'SELECT', 'avatar', 'users', 'WHERE', 'id', $user_id);\n if ($result)\n return $result->fetch_assoc()['avatar'];\n return false;\n }", "title": "" }, { "docid": "41fb18794cc3378db23a908293895f70", "score": "0.6183406", "text": "public function getAvatar();", "title": "" }, { "docid": "037f94e70ffbba686db92537a4eb86a8", "score": "0.61781585", "text": "public function hasPicture()\n {\n return $this->_picture->hasPicture();\n }", "title": "" }, { "docid": "b673dd06d4a8555d2f75fa017f54a568", "score": "0.61174077", "text": "public function isUploadedDefaultAvatar($avatar) {\n return (strpos($avatar, self::DEFAULT_AVATAR_FOLDER.'/') !== false);\n }", "title": "" }, { "docid": "cde92d47ec82047e540a41ca324267ce", "score": "0.6067974", "text": "public static function hasImage($request)\n\t{\n\t\t// verifica se tem alguma imagem anexa\n\t\tif (empty($request->photo) || $request->hasFile('photo') === false) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f7ec82e0d0521dee5918ccc8b9a163d4", "score": "0.6050317", "text": "function avatar()\n{\n global $chkMe;\n if ($chkMe >= 1)\n return show(\"menu/avatars\", array(\"avatar_show\" => useravatar(0, 70, 70)));\n\n return '';\n}", "title": "" }, { "docid": "8c5884d0785fcaea39f8d147197d9b1e", "score": "0.60392165", "text": "function hasProfilePicture()\n\t{\n\t\treturn $this->ppic;\n\t}", "title": "" }, { "docid": "814b100e2f26b25dd4e35a1e56e76b46", "score": "0.59875864", "text": "public function hasImage()\n {\n return $this->image_filename && !empty($this->image_filename);\n }", "title": "" }, { "docid": "d0dacd65d434aa9d1b67164af906d4fc", "score": "0.5949104", "text": "public function exists()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $info = $this->_get_user_attributes();\n return TRUE;\n } catch (User_Not_Found_Exception $e) {\n return FALSE;\n }\n }", "title": "" }, { "docid": "74367bc7c604940541b738e4302a94a4", "score": "0.5937048", "text": "public function hasImage() {\n\t\treturn ! empty( $this->meta['og:image'] );\n\t}", "title": "" }, { "docid": "d0fc3ce41b561b0824022bcfeed7f682", "score": "0.5876939", "text": "public function has_image() {\n\t\treturn (bool) $this->get_image_url();\n\t}", "title": "" }, { "docid": "12ce72b85f1c88fd00be205997a0114c", "score": "0.58722156", "text": "public function getAvatar()\n {\n }", "title": "" }, { "docid": "ff57bcfb13928b4b19dfcbbc07f0e2fc", "score": "0.585842", "text": "public function hasImage()\n {\n return !is_null($this->image);\n }", "title": "" }, { "docid": "10731694c33c520e82117604487d3970", "score": "0.5854115", "text": "public function hasImage()\n {\n if (is_null($this->image)) {\n return false;\n }\n if (!strlen(trim($this->image))) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "c8d236ae3709ed36aa3b2981e853dfce", "score": "0.5830469", "text": "public function hasImage(): bool\n {\n return isset($this->image);\n }", "title": "" }, { "docid": "f44b58665d745b2d39fec7b217456a2a", "score": "0.5828251", "text": "public function avatar()\n {\n return $this->hasOne(Avatar::class);\n }", "title": "" }, { "docid": "89a0fb5de68c59667e7d79a2a3e58528", "score": "0.5824753", "text": "public function hasImage($id, $connection){\n $query = \"SELECT * FROM user_image WHERE user_id='$id'\";\n $result = $connection->query($query);\n return $result;\n }", "title": "" }, { "docid": "4e9de101653504e295ae01987ae20d71", "score": "0.58196956", "text": "public function hasImage(): bool\n {\n return $this->hasImageType(\n $this->getMimeType()\n );\n }", "title": "" }, { "docid": "9c7e64ff56b3b3713dc54b00f13a9c8e", "score": "0.5814842", "text": "function _hasAccess()\n {\n // create user object\n $user = \\User::singleton();\n return $user->hasPermission('imaging_uploader');\n }", "title": "" }, { "docid": "cd300eecda6e66296a7315e7d7b4c91f", "score": "0.5786079", "text": "public function hasImage()\n {\n return $this->getImage() && $this->getImage()->getPath();\n }", "title": "" }, { "docid": "50bb1ec3a3c0d146fb20c8fcbd048fd2", "score": "0.57748216", "text": "public function hasImage()\n {\n return !!$this->image;\n }", "title": "" }, { "docid": "477b8ce95a0a3c1eeeda963636de1fac", "score": "0.57737297", "text": "function isOwner( $user, $imagecategory )\n {\n if( get_class( $user ) != \"ezuser\" )\n return false;\n \n $database =& eZDB::globalDatabase();\n $database->query_single( $res, \"SELECT UserID from eZImageCatalogue_Category WHERE ID='$imagecategory'\");\n $userID = $res[ \"UserID\" ];\n if( $userID == $user->id() )\n return true;\n\n return false;\n }", "title": "" }, { "docid": "97d8a00213aaa634ba00ecf3ede1c836", "score": "0.57692057", "text": "function user_avatar( $avatar, $id_or_email, $size, $default, $alt ) {\n\n\t\t$user = '';\n\n\t\t// Get user by id or email.\n\t\tif ( is_numeric( $id_or_email ) ) {\n\t\t\t$id = (int) $id_or_email;\n\t\t\t$user = get_user_by( 'id' , $id );\n\t\t} elseif ( is_object( $id_or_email ) ) {\n\t\t\tif ( ! empty( $id_or_email->user_id ) ) {\n\t\t\t\t$id = (int) $id_or_email->user_id;\n\t\t\t\t$user = get_user_by( 'id' , $id );\n\t\t\t}\n\t\t} else {\n\t\t\t$user = get_user_by( 'email', $id_or_email );\n\t\t}\n\n\t\t// Bail if no user.\n\t\tif ( ! $user ) {\n\t\t\treturn $avatar;\n\t\t}\n\n\t\t// Get the user id.\n\t\t$user_id = $user->ID;\n\n\t\t// Get the file id.\n\t\t$image_id = get_user_meta($user_id, 'user_avatar', true); // CHANGE TO YOUR FIELD NAME\n\n\t\t// Bail if we don't have a local avatar.\n\t\tif ( ! $image_id ) {\n\t\t\treturn $avatar;\n\t\t}\n\t\t// Get the file size.\n\t\t$image_url = wp_get_attachment_image_src( $image_id, 'thumbnail' ); // Set image size by name\n\n\t\t// Get the file url.\n\t\t$avatar_url = $image_url[0];\n\n\t\t// Get the img markup.\n\t\t$avatar = '<img alt=\"' . $alt . '\" src=\"' . $avatar_url . '\" class=\"avatar avatar-' . $size . '\" height=\"' . $size . '\" width=\"' . $size . '\"/>';\n\n\t\t// Return our new avatar.\n\t\treturn $avatar;\n\t}", "title": "" }, { "docid": "8035d6b54fc4626fb63150fc4103df7b", "score": "0.5764929", "text": "public function hasCompleteProfile()\n {\n /** @var User $user */\n $user = $this->security->getUser();\n\n if (null === $user->getPersonalInfos()) {\n return false;\n }\n\n if (null === $user->getPersonalInfos()->getFirstname() || null === $user->getPersonalInfos()->getLastname()) {\n return false;\n }\n\n if (null === $user->getPersonalInfos()->getAddress()) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "54c565a6e372b2e0f2bc66fef64e4e67", "score": "0.5761358", "text": "public function authorize()\n {\n if ($this->user && $this->user->hasPermission('associate_photos') ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "08c602104bc5ecd5fe7eec89d910cf52", "score": "0.575635", "text": "public static function validate_gravatar($email){\n\n $hash = md5(strtolower(trim($email)));\n $uri = 'http://www.gravatar.com/avatar/' . $hash . '?d=404';\n $headers = @get_headers($uri);\n if (!$headers) {\n $has_valid_avatar = FALSE ;\n } else {\n $has_valid_avatar = TRUE;\n }\n return $has_valid_avatar;\n\n }", "title": "" }, { "docid": "133e181451f8cb2cef9c7cef9439e48e", "score": "0.57133263", "text": "protected function is_image()\n\t{\n\t\tif(!empty($this->error)){\n\t\t\treturn false;\n\t\t}\n\t\tif(empty($this->filename) || empty($this->tmp_path)){\n\t\t\t$this->error[]= \"the file was not available\";\n\t\t\treturn false;\n\t\t}\n\t\tif (file_exists($this->picture_path()) && filesize($this->picture_path()) === $this->size){\n\t\t\t$this->error[]= \"the file { $this->filename } was already available\";\n\t\t\treturn false;\n\t\t}\n\t\tif ($this->size > 5000000) {\n $this->error[]= \"Sorry, your file is too large.\";\n return false;\n }\n\t\tif(false == getimagesize($this->tmp_path) ){\n\t\t\t$this->error[]= \"File is not an image.\";\n\t\t\treturn false;\n\t\t}\n\t\tif(!in_array($this->imageFileType, $this->fileExtension)) {\n $this->error[]= \"Sorry, only JPG, JPEG, PNG & GIF files are allowed.\";\n header(\"Http/1.1 400 Invalid extension\");\n return false;\n }\n return true;\n\t}", "title": "" }, { "docid": "d751bfd11f9b856df15d1a001d48c6e2", "score": "0.5710177", "text": "public function hasCustomImage() {\n return \\File::exists($this->image_path);\n }", "title": "" }, { "docid": "fbb56e08d923f96196738ce38abbabce", "score": "0.56902635", "text": "public function getAvatar(): string ;", "title": "" }, { "docid": "d4601893e27cbb5c84b5585b102ea7bb", "score": "0.5684301", "text": "public function avatar() {\n\t\treturn $this->hasOne(Image::class, 'id', 'avatar_id');\n\t}", "title": "" }, { "docid": "0247bac3391eb27ddfe477055ce81efe", "score": "0.5669239", "text": "public function hasProfile(): bool\n {\n return $this->getProfileVisible();\n }", "title": "" }, { "docid": "d20634d969c74ac73f6bb69c234ecc14", "score": "0.5653461", "text": "public function avatar()\n {\n //default user avatar\n $avatar_url = url('/images/avatar.jpg');\n\n //try obtain from user profile\n if (isset($this->avatar)) {\n $avatar_url = $this->avatar;\n }\n\n return $avatar_url;\n\n }", "title": "" }, { "docid": "2e6e166f8fc55a8bf0316911d35ea01c", "score": "0.5632911", "text": "function getAllAvatarsList()\r\n {\r\n $avatars = array();\r\n $dirlist = array();\r\n $dirlist = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . '/images/avatar/');\r\n if (count($dirlist) > 0) {\r\n foreach($dirlist as $dir) {\r\n $avatars[$dir] = &XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . '/images/avatar/' . $dir . '/', $dir . '/');\r\n }\r\n } else {\r\n return false;\r\n }\r\n return $avatars;\r\n }", "title": "" }, { "docid": "53efb84f96c6b900084da55442be9912", "score": "0.5625847", "text": "function isPhotoUploaded($id_user)\r\n{\r\n\tglobal $dbconn;\r\n\t$rs = $dbconn->Execute('SELECT icon_path FROM '.USERS_TABLE.' WHERE id = ?', array($id_user));\r\n\treturn !empty($rs->fields[0]);\r\n}", "title": "" }, { "docid": "476a8ff21c3950b8247c34438cab81c8", "score": "0.5624861", "text": "function getAvatar($user_id) {\n\t$avatar_images_path = 'images/avatars/';\n\t$fileList = glob( $avatar_images_path . intval($user_id) . \"[_.]*{png,jpg,jpeg,gif,bmp}\" , GLOB_BRACE);\n\tif (isset($fileList) && count($fileList) > 0) {\n\t\tforeach ($fileList as $file) {\n\t\t\tif (preg_match(\"/^(\" . preg_quote($avatar_images_path, '/') . \")(\" . preg_quote(intval($user_id)) . \"(_\\d+)?\\.(jpg|gif|png|jpeg,bmp))$/\", $file, $matches)) {\n\t\t\t//var_dump($matches);\n\t\t\t\t$filename = $matches[2];\n\t\t\t\tif (file_exists($avatar_images_path.$filename))\n\t\t\t\t\treturn array($avatar_images_path, $filename, $avatar_images_path.$filename);\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "3001601327f8b81364aa9b51a6bff488", "score": "0.5596222", "text": "private function hasProfileData() {\n return isset($this->input['profile']);\n }", "title": "" }, { "docid": "c9f592f57bf743ade8ccd9ee723c42db", "score": "0.5592825", "text": "public function getAvatarUrl()\n {\n return !empty($this->user['picture']) ? $this->user['picture'] : '';\n }", "title": "" }, { "docid": "de164717915039d85cb8006ff6785446", "score": "0.5592204", "text": "function uploadProfileImage() {\n\t\timport('classes.file.PublicFileManager');\n\t\t$publicFileManager = new PublicFileManager();\n\n\t\t$user = $this->getUser();\n\t\t$type = $publicFileManager->getUploadedFileType('uploadedFile');\n\t\t$extension = $publicFileManager->getImageExtension($type);\n\t\tif (!$extension) return false;\n\n\t\t$uploadName = 'profileImage-' . (int) $user->getId() . $extension;\n\t\tif (!$publicFileManager->uploadSiteFile('uploadedFile', $uploadName)) return false;\n\t\t$filePath = $publicFileManager->getSiteFilesPath();\n\t\tlist($width, $height) = getimagesize($filePath . '/' . $uploadName);\n\n\t\tif ($width > PROFILE_IMAGE_MAX_WIDTH || $height > PROFILE_IMAGE_MAX_HEIGHT || $width <= 0 || $height <= 0) {\n\t\t\t$userSetting = null;\n\t\t\t$user->updateSetting('profileImage', $userSetting);\n\t\t\t$publicFileManager->removeSiteFile($filePath);\n\t\t\treturn false;\n\t\t}\n\n\t\t$user->updateSetting('profileImage', array(\n\t\t\t'name' => $publicFileManager->getUploadedFileName('uploadedFile'),\n\t\t\t'uploadName' => $uploadName,\n\t\t\t'width' => $width,\n\t\t\t'height' => $height,\n\t\t\t'dateUploaded' => Core::getCurrentDate(),\n\t\t));\n\t\treturn true;\n\t}", "title": "" }, { "docid": "90e8045ba98a79817c85f52600ed2117", "score": "0.5585432", "text": "function func_is_image_userfile($userfile, $userfile_size, $userfile_type) {\n\treturn ($userfile != \"none\")\n\t\t&& ($userfile != \"\")\n\t\t&& ($userfile_size > 0)\n\t\t&& (substr($userfile_type, 0, 6) == 'image/' || $userfile_type == 'application/x-shockwave-flash');\n}", "title": "" }, { "docid": "5d39c8e2fcd0c8eadd2e9fd7d3f7a419", "score": "0.557791", "text": "function imageExists()\n {\n if (isset($this->unsplash) and $this->unsplash) {\n $tmpFilename = $this->unsplash;\n $file_headers = @get_headers($tmpFilename);\n $exists = ($file_headers[0] == 'HTTP/1.1 404 Not Found' ? false : true);\n } else {\n $type = string_strtolower($this->type);\n $tmpFilename = $this->IMAGE_DIR.\"/\".$this->prefix.\"photo_\".$this->id.\".\".$type;\n $exists = (file_exists($tmpFilename) && is_readable($tmpFilename));\n }\n\n return $exists;\n }", "title": "" }, { "docid": "8b5460cf5998b2ff24c214a02119724c", "score": "0.5565834", "text": "public function setAvatar($var)\n {\n GPBUtil::checkString($var, True);\n $this->avatar = $var;\n\n return $this;\n }", "title": "" }, { "docid": "1329f72cfdb5b3d1ce3a7a2b2ad2f713", "score": "0.5563944", "text": "public function get($id)\r\n\t{\r\n\t\t//Loop the rank tables\r\n\t\tforeach ($this->data as $rank => $avatars)\r\n\t\t{\r\n\t\t\t//found the avatar\r\n\t\t\tif (isset($avatars[(int)$id]))\r\n\t\t\t{\r\n\t\t\t\t//Setup the avatar object\r\n\t\t\t\treturn new Avatar((int)$id, $avatars[(int)$id], $rank, AVATAR_TYPE_GALLERY);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "5a38ba0d078a3de9c851fda29db1ca15", "score": "0.5542622", "text": "function validate_gravatar($email) {\n\t$hash = md5(strtolower(trim($email)));\n\t$uri = 'http://www.gravatar.com/avatar/' . $hash . '?d=404';\n\t$headers = @get_headers($uri);\n\tif (!preg_match(\"|200|\", $headers[0])) {\n\t\t$has_valid_avatar = FALSE;\n\t} else {\n\t\t$has_valid_avatar = TRUE;\n\t}\n\treturn $has_valid_avatar;\n}", "title": "" }, { "docid": "275269580e17b7b6cef23e4295ab7bae", "score": "0.5539937", "text": "function mgm_get_avatar($avatar, $id_or_email) {\t\r\n\r\n\t$user_id = 0;\r\n\r\n\t$email = '';\r\n\r\n\tif ( is_numeric($id_or_email) ) {\r\n\r\n\t\t$user_id = (int) $id_or_email;\t\r\n\r\n\t} elseif ( is_object($id_or_email) ) {\r\n\r\n\t \tif ( isset($id_or_email->user_id) && !empty($id_or_email->user_id) ) {\r\n\r\n\t \t\t$user_id = $id_or_email->user_id;\r\n\r\n\t \t}elseif (!empty($id_or_email->comment_author_email)) {\r\n\r\n\t\t\t$email = $id_or_email->comment_author_email;\r\n\r\n\t \t}\r\n\r\n\t}else {\r\n\r\n\t\t$email = $id_or_email;\r\n\r\n\t}\r\n\r\n\tif(!empty($email)) {\r\n\r\n\t\t//find user id from email:\r\n\r\n\t\t$user = get_user_by('email', $email);\r\n\r\n\t\tif(isset($user->ID))\r\n\r\n\t\t\t$user_id = $user->ID;\r\n\r\n\t}\r\n\r\n\t\r\n\r\n\tif($user_id > 0) {\r\n\r\n\t\t$member = mgm_get_member($user_id);\r\n\r\n\t\tif(isset($member->custom_fields) && !empty($member->custom_fields)) {\t\t\t\r\n\r\n\t\t\tforeach ($member->custom_fields as $field => $value) {\r\n\r\n\t\t\t\tif($field == 'photo' && !empty($value)) {\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t//use thumb image:\r\n\r\n\t\t\t\t\t$value = preg_replace(\"/_medium/\", \"_thumb\", $value);\t\t\t\t\t\r\n\r\n\t\t\t\t\t$arr_size = @getimagesize(MGM_FILES_UPLOADED_IMAGE_DIR . basename($value));\r\n\r\n\t\t\t\t\t$avatar = preg_replace(\"/src='(.*?)'/i\", \"src='\".$value.\"'\", $avatar);\r\n\r\n\t\t\t\t\t//select width:\r\n\r\n\t\t\t\t\tif($arr_size[0] >= $arr_size[1]) {\r\n\r\n\t\t\t\t\t\t//format: height='32' width='32'\r\n\r\n\t\t\t\t\t\t$avatar = preg_replace(\"/width='(.*?)'/i\", \"width='\".$arr_size[0].\"'\", $avatar);\t\t\r\n\r\n\t\t\t\t\t\t$avatar = preg_replace(\"/height='(.*?)'/i\", \"\", $avatar);\t\t\r\n\r\n\t\t\t\t\t}else {//select height\r\n\r\n\t\t\t\t\t\t$avatar = preg_replace(\"/width='(.*?)'/i\", \"\", $avatar);\t\t\r\n\r\n\t\t\t\t\t\t$avatar = preg_replace(\"/height='(.*?)'/i\", \"width='\".$arr_size[1].\"'\", $avatar);\t\r\n\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\t\t\t\t\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t\t\r\n\r\n\treturn $avatar;\r\n\r\n}", "title": "" }, { "docid": "42e441cccdc2cda49c642ec4bc8737d1", "score": "0.55272925", "text": "public function getAvatar()\n {\n return $this->avatar;\n }", "title": "" }, { "docid": "42e441cccdc2cda49c642ec4bc8737d1", "score": "0.55272925", "text": "public function getAvatar()\n {\n return $this->avatar;\n }", "title": "" }, { "docid": "42e441cccdc2cda49c642ec4bc8737d1", "score": "0.55272925", "text": "public function getAvatar()\n {\n return $this->avatar;\n }", "title": "" }, { "docid": "81a4e7e80595dcf9a8b488b4ed9e699a", "score": "0.5526017", "text": "public function hasUser();", "title": "" }, { "docid": "9b56c3299720d591811d864027e5b2f3", "score": "0.5513046", "text": "public function UserAvatar(){\n $this->_init();\n if(Zend_Registry::isRegistered(\"user\")){\n $this->_user = Zend_Registry::get(\"user\"); \n\n $name = $this->_user->getName();\n\n $first_name = explode(\" \", $name);\n\n $last_name = trim(str_replace($first_name[0], \"\", $name) );\n\n return $this->view->partial(\"user-avatar.phtml\", array(\"user_first_name\" => $first_name[0], \"user_last_name\" => $last_name));\n }\n }", "title": "" }, { "docid": "bb01668b364e9a2d6e56525a872f97a2", "score": "0.55068666", "text": "public function getAvatar()\r\n {\r\n return $this->avatar;\r\n }", "title": "" }, { "docid": "d885e22bfa3f3436e3396d1b557a19ef", "score": "0.5492731", "text": "function usedAvatar($userID, $db) {\r\n$fetchAvatar = $db->query(\"SELECT avatarPic FROM users WHERE id='$userID';\");\r\n$resultFetchAvatar = $fetchAvatar->fetchColumn();\r\nreturn $resultFetchAvatar;\r\n}", "title": "" }, { "docid": "28b938868953fd7d338874dfcd6a425f", "score": "0.5474545", "text": "public function hasImage() {\n\t\treturn ($this->isEventDate())\n\t\t\t? $this->getTopic()->hasImage()\n\t\t\t: $this->hasString('image');\n\t}", "title": "" }, { "docid": "29dbbb1dac12fb3c9a9a53f83ade466d", "score": "0.5459272", "text": "function getHasPicture()\n {\n return (bool) $this->_bHasPicture;\n }", "title": "" }, { "docid": "64432c71946db2d4b08a8d6510ed991d", "score": "0.5449709", "text": "public function isImage()\n {\n return Arr::has(self::$imageExtensions, $this->file_extension);\n }", "title": "" }, { "docid": "0206cbe9b1ff10b0782d4ec62c0f4901", "score": "0.54491", "text": "public function testAvatarUpload()\n {\n $this->markTestSkipped(\"not sure why it fails on circleci\");\n return;\n Storage::fake('avatar');\n\n $response = $this->json('POST', '/api/profile/avatar', [\n 'avatar' => UploadedFile::fake()->image('avatar.jpg')\n ]);\n\n $response->assertStatus(200);\n $response->assertJsonStructure(['data' => [\n 'avatar'\n ]]);\n\n\n // Assert the file was stored...\n Storage::disk('avatar')->assertExists(\"avatars/\" . time() . '.jpg');\n\n // Assert a file does not exist...\n // Storage::disk('avatar')->assertMissing('missing.jpg');\n }", "title": "" }, { "docid": "0194a0fffb20cf62994bbdbb1bc19dd4", "score": "0.5446856", "text": "function mod_user_avatar_read($messages)\n{\n return mod_user_avatar_apply_avatar_to_messages($messages);\n}", "title": "" }, { "docid": "7d35635f36f88babd9ea6b4a3d65084c", "score": "0.5443859", "text": "public function authorize()\n {\n if(!$this->has('hasBeenEdited') && !$this->hasFile('image')){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "aaf1764bd5b6cde3fb0936ccdeea0395", "score": "0.5429322", "text": "public function getHaveImageAttribute()\n {\n foreach($this->items as $item){\n if(isset($item->image) && $item->image != null){\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "574f4f5cc92c341668b51841f471e102", "score": "0.54162115", "text": "function addGravatarForCurrentUserProfile()\n{\n global $modSettings, $context;\n\n if (!empty($modSettings['gravatar_enabled']) && !empty($context['member']) && (empty($context['member']['avatar']['image']) || !empty($modSettings['gravatar_forced']))) {\n $context['member']['avatar']['image'] = getGravatar($context['member']['email'], true);\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "5da80c4037088f7d3aafd84e062e82ea", "score": "0.5403158", "text": "public function getAvatar($instance=false){\n if ($instance && !is_object($this->_data['avatar'])){\n $this->setAvatar('',array('required'=>false));\n }\n return $this->_data['avatar'];\n }", "title": "" }, { "docid": "b040326e858d50b35de3eab6aec7ea87", "score": "0.53945994", "text": "public function isRatedByAnyUser(): bool\n {\n return $this->avgRating() > 0;\n }", "title": "" }, { "docid": "517bc81d627f0859992ad3c7eb29f0a0", "score": "0.53945947", "text": "function magazilla_author_avatar($template_type = 'page') {\n\t$user_email = get_the_author_meta('user_email') ? get_the_author_meta('user_email') : false;\n\t\n\t\n\tif ($template_type == 'page') {\n\t\tif (get_the_tags()) {\n\t\t\techo '<figure>' . \n\t\t\t\tget_avatar($user_email, 75, get_option('avatar_default')) . \n\t\t\t'</figure>';\n\t\t}\n\t} else if ($template_type == 'post') {\n\t\tif (get_the_tags()) {\n\t\t\techo '<figure>' . \n\t\t\t\tget_avatar($user_email, 75, get_option('avatar_default')) . \n\t\t\t'</figure>';\n\t\t}\n\t}\n}", "title": "" }, { "docid": "3baa6a4231f56e7bbf113dd4dc04c253", "score": "0.5375247", "text": "public function getIsImage()\n {\n $src = is_object($this->file) ? $this->file : $this;\n\n return in_array(strtolower($src->getExtensionName()), self::getAllowedExtensions());\n }", "title": "" }, { "docid": "af7b2f902d8b9363492bf458be6d7b2b", "score": "0.53611225", "text": "public function user_exists() {\n return (($this->get_user_key()) !== NULL) ? true : false;\n }", "title": "" }, { "docid": "75407979e3af5f4371617577a0a21f18", "score": "0.5355818", "text": "public function profile()\n {\n return !Auth::user()->activation_token && !Auth::user()->temp_password;\n }", "title": "" }, { "docid": "2cc2b19d473eda6e63bcfb78ec4e7b01", "score": "0.53520924", "text": "function _ws_custom_avatar($avatar, $default) {\n\t$custom_avatar = get_the_author_meta('custom_avatar');\n if (isset($custom_avatar) && $custom_avatar) {\n return $custom_avatar;\n } else if ($avatar) {\n\t\treturn $avatar;\n\t} else {\n\t\treturn $default;\n }\n}", "title": "" }, { "docid": "8adff4be3e97fbf752b0fd6ee8a3f490", "score": "0.5349935", "text": "public function avatars()\n {\n \n $mimes = ['jpg','jpeg','bmp','png'];\n $fileUploaded = \"error\";\n \n if(request()->file('photo'))\n {\n \n $file = request()->file('photo');\n $ext = $file->guessClientExtension();\n \n if(in_array($ext, $mimes))\n $fileUploaded = $file->storeAs(\"avatars/\". auth()->id(), \"avatar.jpg\",'public');\n }\n\n return $fileUploaded;\n\n }", "title": "" }, { "docid": "a592263287f41dd25eb53ff36dd1e6e1", "score": "0.5348036", "text": "public function commitAvatar($filter) {\r\n if(!$this->isAuthed()) {\r\n throw new Exception('Requires oauth authorization');\r\n }\r\n\r\n // generate the image and get the path\r\n $path = $this->processImage($filter);\r\n if(file_exists($path)) {\r\n\r\n // send a multipart POST request with the image file data\r\n $this->tmhOAuth->request('POST', $this->tmhOAuth->url('1/account/update_profile_image'), array(\r\n // format: @local/path.png;type=mime/type;filename=file_name.png\r\n 'image' => '@' . $path . ';type=image/png;filename=' . basename($path)\r\n ), true, true);\r\n\r\n return ($this->tmhOAuth->response['code'] == 200);\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "cf627cf3b79966ed8e7be73e1d391214", "score": "0.53477085", "text": "public function hasUser()\n\t{\n\t\treturn $this->user !== null;\n\t}", "title": "" }, { "docid": "0d278bf56178a6fad30a2a83fde17b95", "score": "0.53476834", "text": "public function hasImage($username, $checksum) {\n\n // connect\n $this->connect();\n\n $query = \"SELECT * FROM dt161g_project.image\n INNER JOIN dt161g_project.member_image_category ON dt161g_project.image.id = dt161g_project.member_image_category.image_id\n INNER JOIN dt161g_project.member ON dt161g_project.member.id = dt161g_project.member_image_category.member_id\n AND checksum=$1 AND username=$2\";\n $result = pg_query_params($this->dbConn, $query, array($checksum, $username));\n\n if ($result && pg_num_rows($result) > 0)\n $success = true;\n else\n $success = false;\n\n // Delete resources to free up memory\n pg_free_result($result);\n\n // disconnect\n $this->disconnect();\n\n return $success;\n }", "title": "" }, { "docid": "9fdba9fa692f5bc0e4afc7cc62158612", "score": "0.5344928", "text": "function addGravatarForCurrentUser()\n{\n global $modSettings, $user_info;\n\n if (!empty($modSettings['gravatar_enabled']) && ((empty($user_info['avatar']['url']) && empty($user_info['avatar']['filename'])) || !empty($modSettings['gravatar_forced']))) {\n $user_info['avatar']['url'] = getGravatar($user_info['email']);\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "101f07ec0f3a6e79175675f9fbd05f63", "score": "0.5334244", "text": "public function getAvatarImageUrl()\n {\n return empty($this->avatar) ? asset('img/default-avatar.png') : url('users/'.$this->id.'/avatar');\n }", "title": "" }, { "docid": "f1a51932ca91865a39a3d159d42ea1cb", "score": "0.5332875", "text": "public function isProfileOwner ($username)\n {\n \t#First check if user is logged in\n \tif($this->security->isGranted('IS_AUTHENTICATED_FULLY'))\n\t\t{\n\t\t\t$user = $this->security->getToken()->getUser();\n\t\t\t\n\t \t$em = $this->doctrine->getManager();\n\t\t $userAccount = $em->getRepository('MaximCMSBundle:Useraccounts')->findOneBy(array(\"accountname\" => $username, \"user\" => $user));\n\t\t\t\n\t\t\tif(!$userAccount)\n\t\t\t{\n\t\t\t\treturn \"false\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"true\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"false\";\n\t\t}\n }", "title": "" }, { "docid": "02a9a17f941f59c787b549470a98e0a8", "score": "0.5330104", "text": "protected function userHasControlOverThisImage($userId)\n {\n return $this->aclControllerPlugin()->getPresentUserId() == $userId || $this->aclControllerPlugin()->userIsAllowed('manage-users', 'can-access-all-user-photos');\n }", "title": "" }, { "docid": "bde139225ba4543b136763db0bbecd92", "score": "0.5325458", "text": "public function getIsAlbumThumb() {\n\t\tif (!is_null($this->album) && !is_null($this->album->getThumb()) && $this->album->getThumb()->getUid() == $this->uid) return 1;\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "7e0d6bc5715d5b09582abbef34348dbc", "score": "0.53223485", "text": "private function validateProfilePic() {\r\n\t\t$this->profile_pic = $this->extractForm('profile_pic');\r\n\t\t\r\n\t\tif (!empty($this->profile_pic)) {\r\n\t\t\tif(!filter_var($this->profile_pic, FILTER_VALIDATE_REGEXP,\r\n\t\t\t\tarray(\"options\"=>array(\"regexp\" =>\"/\\.(bmp|jpg|jpeg|png|gif|tif)$/\")) )) {\r\n\t\t\t\t\t$this->setError('profile_pic', 'PROFILE_PIC_WRONG_TYPE');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// TODO: figure out a better way of verifying filetype\r\n\t\t\t/*$finfo = new finfo;\r\n\t\t\t\r\n\t\t\t$fileinfo = $finfo->file($file, FILEINFO_MIME);\r\n\t\t\t\r\n\t\t\t// Verify that the mime type specifies an image\r\n\t\t\tif (!(strpos($fileinfo, \"image/\") == 0)) {\r\n\t\t\t\t$this->setError('profile_pic', 'PROFILE_PIC_WRONG_TYPE');\r\n\t\t\t}*/\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "193a9712a01e78594d2e7477c6a6b83d", "score": "0.5321073", "text": "public function avatar($id)\n {\n // encontrar primero que imágen es el avatar actual\n $imagenes = $this->imagenNegocio->get('imagennegocios.imagenId = '.$id);\n if(!empty($imagenes))\n {\n $imagen = $imagenes[0];\n //check if the flag is set\n if($imagen->imagenNegocioAvatar == 1)\n {\n return;\n }else{\n $this->imagenNegocio->edit(array('imagenNegocioAvatar'=>0), \n 'imagennegocios.imagenNegocioAvatar = 1 AND imagennegocios.imagenNegocioAlbumId = ' . $imagen->imagenNegocioAlbumId);\n $this->imagenNegocio->edit(array('imagenNegocioAvatar'=>1), \n 'imagennegocios.imagenId = '.$id);\n }\n }\n else\n {\n redirect('http://www.pulzos.com/inicio.php/negocios/perfil#http://www.pulzos.com/index.php/negocios/principal/'.$this->session->userdata('id').'/'.$this->session->userdata('idN'));\n }\n }", "title": "" }, { "docid": "47e3c3c4124ff15a13122074b3e78cc4", "score": "0.5320258", "text": "function get_wp_user_avatar_image($id_or_email=\"\", $size='96', $align=\"\", $alt=\"\", $email='[email protected]'){\r\n\r\n global $avatar_default, $blog_id, $post, $wpdb, $_wp_additional_image_sizes;\r\n // Checks if comment\r\n if(is_object($id_or_email)){\r\n // Checks if comment author is registered user by user ID\r\n if($id_or_email->user_id != 0){\r\n $email = $id_or_email->user_id;\r\n // Checks that comment author isn't anonymous\r\n } elseif(!empty($id_or_email->comment_author_email)){\r\n // Checks if comment author is registered user by e-mail address\r\n $user = get_user_by('email', $id_or_email->comment_author_email);\r\n // Get registered user info from profile, otherwise e-mail address should be value\r\n $email = !empty($user) ? $user->ID : $id_or_email->comment_author_email;\r\n }\r\n\r\n $alt = $id_or_email->comment_author;\r\n } else {\r\n\r\n if(!empty($id_or_email)){\r\n // Find user by ID or e-mail address\r\n $user = is_numeric($id_or_email) ? get_user_by('id', $id_or_email) : get_user_by('email', $id_or_email);\r\n } else {\r\n // Find author's name if id_or_email is empty\r\n $author_name = get_query_var('author_name');\r\n if(is_author()){\r\n // On author page, get user by page slug\r\n $user = get_user_by('slug', $author_name);\r\n } else {\r\n // On post, get user by author meta\r\n $user_id = get_the_author_meta('ID');\r\n $user = get_user_by('id', $user_id);\r\n }\r\n }\r\n\r\n // Set user's ID and name\r\n if(!empty($user)){\r\n $email = $user->ID;\r\n $alt = $user->display_name;\r\n }\r\n }\r\n\r\n // Checks if user has avatar\r\n $wpua_meta = get_the_author_meta($wpdb->get_blog_prefix($blog_id).'user_avatar', $email);\r\n $wpua_meta = get_the_author_meta('be_custom_avatar',$email);\r\n\r\n // Add alignment class\r\n $alignclass = !empty($align) && ($align == 'left' || $align == 'right' || $align == 'center') ? ' align'.$align : ' alignnone';\r\n\r\n // User has avatar, bypass get_avatar\r\n if(!empty($wpua_meta)){\r\n // Numeric size use size array\r\n $get_size = is_numeric($size) ? array($size,$size) : $size;\r\n // Get image src\r\n $wpua_image = wp_get_attachment_image_src($wpua_meta, $get_size);\r\n $dimensions = is_numeric($size) ? ' width=\"'.$wpua_image[1].'\" height=\"'.$wpua_image[2].'\"' : \"\";\r\n // Construct the img tag\r\n\r\n $avatar = '<img src=\"'.$wpua_image[0].'\"'.$dimensions.' alt=\"'.$alt.'\" />';\r\n } else {\r\n // Get numeric sizes for non-numeric sizes based on media options\r\n if(!function_exists('get_intermediate_image_sizes')){\r\n require_once(ABSPATH.'wp-admin/includes/media.php');\r\n }\r\n // Check for custom image sizes\r\n $all_sizes = array_merge(get_intermediate_image_sizes(), array('original'));\r\n if(in_array($size, $all_sizes)){\r\n if(in_array($size, array('original', 'large', 'medium', 'thumbnail'))){\r\n $get_size = ($size == 'original') ? get_option('large_size_w') : get_option($size.'_size_w');\r\n } else {\r\n $get_size = $_wp_additional_image_sizes[$size]['width'];\r\n }\r\n } else {\r\n // Numeric sizes leave as-is\r\n $get_size = $size;\r\n }\r\n\r\n // User with no avatar uses get_avatar\r\n $avatar = get_avatar($email, $get_size, $default=\"\", $alt=\"\");\r\n // Remove width and height for non-numeric sizes\r\n if(in_array($size, array('original', 'large', 'medium', 'thumbnail'))){\r\n $avatar = preg_replace('/(width|height)=\"d*\"s/', \"\", $avatar);\r\n $avatar = preg_replace(\"/(width|height)='d*'s/\", \"\", $avatar);\r\n }\r\n $str_replacemes = array('wp-user-avatar ', 'wp-user-avatar-'.$get_size.' ', 'wp-user-avatar-'.$size.' ', 'avatar-'.$get_size, 'photo');\r\n $str_replacements = array(\"\", \"\", \"\", 'avatar-'.$size, 'wp-user-avatar wp-user-avatar-'.$size.$alignclass.' photo');\r\n\r\n $avatar = str_replace($str_replacemes, $str_replacements, $avatar);\r\n }\r\n return $avatar;\r\n}", "title": "" }, { "docid": "2bf5c7c85a514dc9d31f67202dabf20c", "score": "0.5319085", "text": "public function getAvatar()\n {\n $avatars = Yii::getAlias('@avatars');\n $files = FileHelper::findFiles($avatars);\n if (isset($files[0])) {\n foreach ($files as $file) {\n $archivo = substr($file, strrpos($file, DIRECTORY_SEPARATOR) + 1);\n $nombre = substr($archivo, 0, strrpos($archivo, '.'));\n if (intval($nombre) === $this->user_id) {\n return \"/$avatars/$archivo\";\n }\n }\n }\n return \"/$avatars/default.png\";\n }", "title": "" }, { "docid": "6cf46b43fc1ffecbdcd74ffecc9180a3", "score": "0.5318478", "text": "public function getAvatar( $id );", "title": "" }, { "docid": "0ec33939cae1a5d524a53db3cfaeda72", "score": "0.5317702", "text": "public function hasUser(): bool;", "title": "" }, { "docid": "13ab72d4810e81f040786e98cb8f5ab7", "score": "0.5314239", "text": "public function getAvatar()\n {\n // if the user has a gravatar linked to his\n // email\n return 'https://gravatar.com/avatar/' . md5($this->email) . '/?s=45&d=mm';\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "9602db91f24ee78dadc82b7794cf3f5f", "score": "0.0", "text": "public function index(Request $request, Province $province)\n {\n $this->authorize('view', Regency::class);\n\n return new RegencyCollection(\n $province->regencys()->filterOn($request)->paginate($request->itemsPerPage)\n );\n }", "title": "" } ]
[ { "docid": "edfccc7675941363f15cdfa73ea568e7", "score": "0.7933918", "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.7549297", "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.74973136", "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.74336374", "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.7348067", "text": "public function list() {\n \t\treturn show();\n \t}", "title": "" }, { "docid": "7d3d5ea98fecbcdaa728156240d52501", "score": "0.7318585", "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.72634786", "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.724677", "text": "public function actionList() {\n $this->_getList();\n }", "title": "" }, { "docid": "db140407717335f4b2c74a2a874b1895", "score": "0.7209592", "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.71681887", "text": "public function index()\n {\n return ListsResource::collection(RecipeList::all());\n }", "title": "" }, { "docid": "0e190fa7a00dd0393b6c0e0a91b52874", "score": "0.7130203", "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.7124122", "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.71215767", "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.70770437", "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.707274", "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.70151275", "text": "public function index()\n {\n $listings = Listing::all();\n\n return ListingResource::collection($listings);\n }", "title": "" }, { "docid": "a856150f3c67d1457d548f91c75da7da", "score": "0.7001297", "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.6988621", "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.69579756", "text": "public function showList()\r\n\t{\r\n\t\t$this->items = $this->itemRepo->getAll();\r\n\t}", "title": "" }, { "docid": "acacf315b0baff673a36b2ca7e24d31e", "score": "0.6952432", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'asc')->get();\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "65fbe1cd513c1906884a8cf3b31fcaf5", "score": "0.69501245", "text": "public function list ()\n {\n $this->jsonResponse($this->model->findAll());\n }", "title": "" }, { "docid": "c2135d6cafa652d036ae3308bd00e68c", "score": "0.6948324", "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": "7982715eae8987f6e04898265db32a84", "score": "0.69336075", "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.69085884", "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.6896785", "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.6884704", "text": "public function index()\n {\n $resources = Resource::all();\n\n return view('admin.resources.index', ['resources' => $resources]);\n }", "title": "" }, { "docid": "4b7e3c233f60e23a7dbb5f593395b76c", "score": "0.6869259", "text": "public function actionIndex() {\r\n\t\t$this -> toPage('list');\r\n\t}", "title": "" }, { "docid": "d1036519a5edd84e78f3b5c9d42b2f9c", "score": "0.68583953", "text": "public function index() {\n\t\treturn \\Response::view('git/listing');\n\t}", "title": "" }, { "docid": "00a08afebd209b80aaef61ff37d6a46b", "score": "0.6853997", "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.68332815", "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.6807206", "text": "public function index()\n {\n $resources = Resource::get();\n return view('resources.index', ['resources'=>$resources]);\n }", "title": "" }, { "docid": "abaacf9f1fa05faf4fd840689138551b", "score": "0.6802537", "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.67923576", "text": "public function index()\n {\n\n $items = Items::paginate(12);\n return ItemsResource::collection($items);\n }", "title": "" }, { "docid": "c2cb369270f6fcd0fe01f7c05c39893d", "score": "0.677109", "text": "public function index()\n {\n \t$staff = Staff::paginate(50);\n \treturn StaffResources::collection($staff);\n }", "title": "" }, { "docid": "998c769364dc4c666498430759971c31", "score": "0.67701566", "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.676914", "text": "public function index()\n\t{\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "6d38830f96381c6d3f6705200be0b0ce", "score": "0.67674345", "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.676708", "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.6766058", "text": "public function listAction()\n {\n $this->view->persons = PersonCatalog::getInstance()->getActives();\n $this->setTitle('List the Person');\n }", "title": "" }, { "docid": "587f352425474ce109a45e636208d7d7", "score": "0.6747335", "text": "public function list()\n {\n return response()->json($this->listAction->run());\n }", "title": "" }, { "docid": "e350e7299f802c9cf32b414dc945ac34", "score": "0.67421454", "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": "1fe41c52dd75a6340ba0e7415a6acc25", "score": "0.6741967", "text": "public function index()\n {\n return TodoResource::collection(Todo::paginate(10));\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6739739", "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": "f5b2a3a3d01e82cedd6efa95f22e9cec", "score": "0.6728996", "text": "public function index()\n {\n return ContactListResource::collection(Contact::all()->paginate(25));\n }", "title": "" }, { "docid": "106d7df8332c0494258eddc388469da7", "score": "0.6723926", "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": "c455819674d3f353cb9e20703ef52803", "score": "0.67237014", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "b3dfa38d778d7b973135f3c279d4eed4", "score": "0.6717747", "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.6708648", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6708648", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "a8928e5ccc1f4e236f4a00c06b0a7026", "score": "0.6702465", "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.6696478", "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.6696366", "text": "public function index()\n {\n\n return OfferResource::collection(Offer::paginate(10));\n }", "title": "" }, { "docid": "7e86107f54f4f68d3d2ea122badfb72e", "score": "0.6692635", "text": "public function list() {\n include \"ROOT_PATH\" . \"../../../resource/views/user/list.php\";\n }", "title": "" }, { "docid": "a08b224cecded9fbbd98e9690a25697b", "score": "0.669092", "text": "public function index()\n {\n return TodoResource::collection(Todo::orderBy('id', 'desc')->paginate());\n }", "title": "" }, { "docid": "d2a02cceaa38bd17888a8559051bf99d", "score": "0.66895145", "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": "3d5e84310d037c96dff096d60146afc3", "score": "0.66773003", "text": "public function index()\n {\n $storie = Stories::paginate(15);\n\n return StoriesResource::collection($storie);\n }", "title": "" }, { "docid": "c47e31fef88d7be6059d14e6bf3e7d3b", "score": "0.667416", "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.6660258", "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.6652856", "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.6649963", "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.66472775", "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.6644635", "text": "public function index()\n {\n //\n return Resource::all();\n }", "title": "" }, { "docid": "7a84ee612e4a05b429aaef9c4ed361d6", "score": "0.6639094", "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.66330266", "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.66307163", "text": "function overview()\n {\n $data['files'] = $this->files->get_all();\n $this->view('content/files_list', $data);\n }", "title": "" }, { "docid": "cb88c28d2d3774b001750c6aab518891", "score": "0.66212493", "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.662031", "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.66201586", "text": "public function index()\n {\n return ProviderResource::collection(Provider::paginate());\n }", "title": "" }, { "docid": "64b9fc22016f4b9a739c18a02478cdd0", "score": "0.6616604", "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.66131794", "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": "35692a0ab217d82c0f91016d22be4979", "score": "0.6610424", "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.6609989", "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": "15031eb36d46b41edbdfa84a0c42bb01", "score": "0.660973", "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": "41589d7dcb96a7716421880c470b44b4", "score": "0.6605893", "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.6593533", "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.6588112", "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.658785", "text": "public function index()\n {\n //\n $albums = Album::paginate();\n return AlbumIndexResource::collection($albums);\n }", "title": "" }, { "docid": "5c9e2a1b72736e4dcd1233a696308ec8", "score": "0.65819114", "text": "public function index()\n {\n $records = Record::paginate(10);\n return $this->response->paginator($records,new RecordTransformer());\n }", "title": "" }, { "docid": "246c2fdf450c470dd098e3882419854d", "score": "0.65757376", "text": "public function index()\n {\n $accounts = Accounts::all()->sortBy('account_id');\n return AccountResource::collection($accounts);\n }", "title": "" }, { "docid": "ec0e4aa9e49eb0795b7e6a8be1b41989", "score": "0.6575463", "text": "public function index()\n {\n $articles = Article::all()->paginate();\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "d97fb91a2aee3ffda67b936f3ec1530c", "score": "0.657307", "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": "218a3bcc6c3ba48283149f8614d45562", "score": "0.6572906", "text": "public function index() {\n\t\t$this->get ();\n\t}", "title": "" }, { "docid": "52d4724f47f90e2c76c949609866ae4f", "score": "0.657142", "text": "public function index()\n {\n $activities = Activity::paginate(10);\n\n return ActivityResource::collection($activities);\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.6562939", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "e128a7f6c946e062e77ee7d1989bf5d8", "score": "0.65613836", "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": "c6aa0bf17a52ccba8cef81895f7d4743", "score": "0.6558845", "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": "fc610d852bef476f1af745c4c2af61e5", "score": "0.6558216", "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": "8054960a74546fc23b5d2f35f62311f9", "score": "0.6555664", "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.6547761", "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.6542361", "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.6542066", "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": "bed8333589debc932ee4e761c485f848", "score": "0.6541247", "text": "public function index()\n {\n $menus = Menu::paginate(5);\n\n return MenuResource::collection($menus);\n }", "title": "" }, { "docid": "55d08c8376aee349e27945fa819f675a", "score": "0.6539257", "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": "bc7e32d2dc7868c5cd4ab0e5ac368f4f", "score": "0.65342826", "text": "public function listAction() {\n $this->_datatable();\n return $this->render('BackendBundle:Stage:list.html.twig');\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.6527979", "text": "public function list()\n {\n }", "title": "" }, { "docid": "2624e2ced80d3c035b447f1814374386", "score": "0.652611", "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.6525415", "text": "public function index()\n {\n $items = Item::all();\n return response([ 'items' => ItemResource::collection( $items ), 'message' => 'Retrieved successfully.'], 200);\n }", "title": "" }, { "docid": "c233c1a42dce20a9ec5ced0ce2fbcab1", "score": "0.6522966", "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": "e6ed7387b2f7ef94c4ddb847772440e7", "score": "0.6522668", "text": "public function index()\n {\n $listings = Listing::with('users')->latest()->paginate(10);\n\n return view('listing.index', compact('listings'));\n }", "title": "" }, { "docid": "d9f7814c3200d468243c1c9ffbb2953c", "score": "0.6514034", "text": "public function index()\n {\n\n //Con risorsa e relazioni\n return ArticleResource::collection(Article::with([\"category\", \"tags\"])->paginate());\n\n }", "title": "" }, { "docid": "afe78dff3214bed74d61a58d722b860d", "score": "0.65138745", "text": "public function index()\n {\n $collections = Collection::all();\n return view(\"list.index\",compact(\"collections\"));\n }", "title": "" } ]
01088761e63ed60608f8d5b81a261eac
Clears message values and sets default ones
[ { "docid": "a5eb4973203bfdea7e86fc67ff8cb94d", "score": "0.0", "text": "public function reset()\n {\n $this->values[self::IGUILDID] = null;\n }", "title": "" } ]
[ { "docid": "6572da2cf7fb2005f6542ecb4aecd75b", "score": "0.75940275", "text": "public function reset()\n {\n $this->values[self::MESSAGE] = null;\n $this->values[self::NESTED_MESSAGE] = null;\n $this->values[self::PRINTT] = null;\n }", "title": "" }, { "docid": "658e14b5d7559b75d197963dadeafa67", "score": "0.72586113", "text": "private function resetMessage()\n {\n $this->subject = '';\n $this->from = [];\n $this->sender = [];\n $this->to = [];\n $this->cc = [];\n $this->bcc = [];\n $this->reply_to = [];\n $this->attachments = [];\n $this->message_layout->setViewLayout('');\n $this->message_layout->setViewTemplate('');\n $this->message_layout->clearVariables();\n }", "title": "" }, { "docid": "cef454e1b5432e0ecc61db0ff016242f", "score": "0.72496086", "text": "function clear()\n {\n $this->base_messages = array();\n $this->messages = array();\n }", "title": "" }, { "docid": "898965fab0dfc8cfee5de9f6ec8f226a", "score": "0.70618457", "text": "public function clearMessage()\n {\n self::$message = '';\n }", "title": "" }, { "docid": "52eed4c251f607b297db7ace364a00f7", "score": "0.7055747", "text": "function clear() {\r\n\r\n\t\t$this->messages = array();\r\n\r\n\t}", "title": "" }, { "docid": "2a9a6f2d6de682910d408092b5394c05", "score": "0.7046373", "text": "public function resetMessage()\n {\n $this->setMessage('');\n }", "title": "" }, { "docid": "200a3ffd86589185ade8f56e4192136d", "score": "0.7037205", "text": "public function reset()\n {\n $this->values[self::IMAILID] = null;\n $this->values[self::STRTITLE] = null;\n $this->values[self::STRCONTEXT] = null;\n $this->values[self::ISENDTIME] = null;\n $this->values[self::IROLEID] = array();\n $this->values[self::STATTACHMENT] = null;\n }", "title": "" }, { "docid": "ab4fcd261cfbbeb68a1b73efa5960d54", "score": "0.696687", "text": "public function reset()\n {\n // Reset old message;\n unset($this->msg);\n }", "title": "" }, { "docid": "42ff3224f567c6fc9731156632a7b765", "score": "0.6963943", "text": "public function clear ()\n {\n $this->_messages = array ();\n }", "title": "" }, { "docid": "e74bd26c8a1e496cb1fa4e05191e659b", "score": "0.6909828", "text": "public function resetMessages()\n {\n $this->errorMessage = null;\n $this->successMessage = null;\n }", "title": "" }, { "docid": "533545219123ac08940e7bd1538fdb9f", "score": "0.6828942", "text": "private function resetInputFields()\n {\n $this->title = '';\n $this->description = '';\n $this->message_id = '';\n }", "title": "" }, { "docid": "c5460b86cb8377b31620e35e0d6f18e3", "score": "0.6802992", "text": "static public function clear()\n {\n self::$messages = array();\n }", "title": "" }, { "docid": "3aac1bcae3bce2918068fcfc055034ad", "score": "0.67482", "text": "public function reset()\n {\n $this->values[self::REQUESTTYPE] = self::$fields[self::REQUESTTYPE]['default'];\n $this->values[self::AUTHOR] = null;\n $this->values[self::TARGET] = null;\n $this->values[self::RESOLVEDWITH] = null;\n }", "title": "" }, { "docid": "f30e4d8e6025b00f016cae4358f242a0", "score": "0.6725714", "text": "public function clear() {\n $this->messages = [];\n }", "title": "" }, { "docid": "c1d13d80cb71a38ef1c9126a977c5e38", "score": "0.6702416", "text": "public function reset()\n {\n $this->values[self::ICHANNAL] = null;\n $this->values[self::STRSENDERNAME] = null;\n $this->values[self::ISENDERPIC] = null;\n $this->values[self::ISENDERLV] = null;\n $this->values[self::ISENDERID] = null;\n $this->values[self::STRRECIEVERNAME] = null;\n $this->values[self::IRECIEVERID] = null;\n $this->values[self::STRMSG] = null;\n $this->values[self::ISENDTIME] = null;\n $this->values[self::ISENDERTALENT] = null;\n $this->values[self::IRECIEVERTALENT] = null;\n $this->values[self::ISENDERVIP] = null;\n $this->values[self::IRECIEVERVIP] = null;\n $this->values[self::ISOUNDID] = null;\n $this->values[self::ISOUNDTIME] = null;\n $this->values[self::IISREAD] = null;\n $this->values[self::STRHTTP] = null;\n }", "title": "" }, { "docid": "1f83ebf42aaa8db286865a9d073c96da", "score": "0.67012316", "text": "public function reset()\n {\n $this->values[self::ISSUES_AS_ERROR] = self::$fields[self::ISSUES_AS_ERROR]['default'];\n $this->values[self::TYPE] = array();\n $this->values[self::FEATURE] = array();\n }", "title": "" }, { "docid": "8a1dbc46d31f45a5ae76dddab6b7774a", "score": "0.6688684", "text": "private function fromNothing() {\n $this->message = $DEFAULT_MSG;\n $this->timestamp = $DEFAULT_TIMESTAMP;\n $this->piority = 0;\n $this->target = 0;\n $this->encoded = 0;\n }", "title": "" }, { "docid": "fedc6f27fe09aa67271682cc4b3bf967", "score": "0.6667759", "text": "public function reset()\n {\n $this->values[self::IBOARDID] = null;\n $this->values[self::ISTARTTIME] = null;\n $this->values[self::IENDTIME] = null;\n $this->values[self::ILABLE] = null;\n $this->values[self::ISBNT] = null;\n $this->values[self::STRTITLE] = null;\n $this->values[self::STRCONTEXT] = null;\n $this->values[self::STRBTNTEXT] = null;\n $this->values[self::ILINK] = null;\n $this->values[self::STRLINKTEXT] = null;\n }", "title": "" }, { "docid": "549e555b9cceab13cfa734e768ea1f61", "score": "0.6663039", "text": "function clear() {\n \n $this->from_name = '';\n \t$this->from_address = '';\n \t\n \t$this->_to_name = '';\n \t$this->_to_address = '';\n \t\n \t$this->_cc_name = '';\n \t$this->_cc_address = '';\n \t\n \t$this->_subject = '';\n \t$this->_message_plain = '';\n \t$this->_message_html = '';\n \t\n \t$this->_tag = '';\t\n \n $this->_attachments = array();\n \t\n\t}", "title": "" }, { "docid": "81e9e64bf9a55732158f1d9bbdca8d61", "score": "0.66570574", "text": "protected function setDefaultValues()\n {\n parent::setDefaultValues();\n\n $this->siteId = $this->channelId = 0;\n $this->title = '';\n }", "title": "" }, { "docid": "bad9ef34b65cfd62afe9c5388f4265f8", "score": "0.66233265", "text": "function clear() {\n $this->_setDefaultProperties($this->_getRawProperties());\n \n }", "title": "" }, { "docid": "f4d6fe68e6c2e2cb347f79ff229369df", "score": "0.6610195", "text": "public function reset()\n {\n $this->values = array();\n $this->ignore = TRUE;\n $this->valid = TRUE;\n $this->errorMessages = array();\n $this->optional = FALSE;\n }", "title": "" }, { "docid": "eb1d239498476a493b2f64592f1220e5", "score": "0.65933996", "text": "public function reset()\n {\n $this->_header_fields = array();\n $this->_envelope_from = null;\n $this->_recipients = array();\n $this->_subject = null;\n $this->_body = null;\n $this->_messages = array();\n }", "title": "" }, { "docid": "24ffcb299ceb4dabc796c48f329fd4e2", "score": "0.65883946", "text": "public function unsetMessage(): void\n {\n $this->message = [];\n }", "title": "" }, { "docid": "2d3d425b9ac9abac706b3349cbecf750", "score": "0.6587113", "text": "function resetProperties() {\n\t\t$this->setBody('');\n\t\t$this->setFromDate('');\n\t\t$this->setFromId('');\n\t\t$this->setFromIp('');\n\t\t$this->setFromType('');\n\t\t$this->setId('');\n\t\t$this->setImage('');\n\t\t$this->setIsRead('');\n\t\t$this->setIsSent('');\n\t\t$this->setName('');\n\t\t$this->setOwnerCd('');\n\t\t$this->setReadDate('');\n\t\t$this->setToId('');\n\t\t$this->setToType('');\n\t}", "title": "" }, { "docid": "10945328a12c74ea2bfc95baa39949ae", "score": "0.6586363", "text": "public function clearLastMessage(){\n $this->message = null;\n }", "title": "" }, { "docid": "2c3ee526e42def9ed10c5965cf11785f", "score": "0.6550276", "text": "public function applyDefaultValues()\n {\n $this->inititemnbr = '';\n $this->intbwhse = '';\n }", "title": "" }, { "docid": "8e9f9e7f0fe4ba4246ff383b4a0362a9", "score": "0.65383214", "text": "public function resetToDefault();", "title": "" }, { "docid": "35a176ddb13c8acbde632efbaa9757f2", "score": "0.6521913", "text": "public function resetMessage() {\r\n\t\t$this->message = new MailerMessage();\r\n\t\t$this->textBody = $this->htmlBody = null;\r\n\t\t$this->inlineFiles = $this->attachedFiles = null;\r\n\t}", "title": "" }, { "docid": "8ea5cd0b745bc57d8feffe4dbe71b02c", "score": "0.6428358", "text": "function reset() \n {\n //set default params\n $this->_setDefaultParams();\n \n //set flags\n $this->flg = isset($this->params['flag']) ? $this->_getFlag($this->params['flag']) : '';\n \n //set template\n $this->_setTemplate();\n }", "title": "" }, { "docid": "f3b5ba3dcd8085452f4b359ec6e06500", "score": "0.64273876", "text": "public function reset()\n {\n $this->values[self::IID] = null;\n $this->values[self::ISTARTTIME] = null;\n $this->values[self::IENDTIME] = null;\n $this->values[self::STRBTNTEXT] = null;\n $this->values[self::STRTITLE] = null;\n $this->values[self::STRCONTEXT] = null;\n }", "title": "" }, { "docid": "c4d1cfb3685fb10762fb3e44f76d6427", "score": "0.6420395", "text": "public static function reset(): void\n {\n self::$deliveredMessages = [];\n }", "title": "" }, { "docid": "6e7bfa1547cc1982179f5463aacdab8f", "score": "0.6394434", "text": "function clear() {\n $this->messages = array();\n $this->addMessage(new Message(\"admin\",\"The chat document is now cleared.\"));\n }", "title": "" }, { "docid": "d7ec314a47bd2b54ccb184160727d1de", "score": "0.63775176", "text": "public function reset()\n {\n $this->values[self::RSAREQDATA] = null;\n $this->values[self::AESREQDATA] = null;\n }", "title": "" }, { "docid": "8139cb7e7b2dbe31bd0c8cc54465ddb5", "score": "0.63772744", "text": "public function reset()\n {\n $this->values[self::IGUILDID] = null;\n $this->values[self::STRGUILDNAME] = null;\n $this->values[self::STAPPLYGUILDLIST] = array();\n $this->values[self::IFORBIDTIME] = null;\n }", "title": "" }, { "docid": "cb09d01e8c76f89815945711f0e445e1", "score": "0.63744295", "text": "public function reset()\n {\n $this->values[self::STRACCOUNT] = null;\n $this->values[self::IFETCHTYPE] = null;\n $this->values[self::STRPARAM] = null;\n $this->values[self::IWORLDID] = null;\n $this->values[self::IEVENT] = null;\n }", "title": "" }, { "docid": "38b4a73ccbd6d75fddafb8056a1b1198", "score": "0.6344468", "text": "public function reset() {\n $this->values[self::OPTION] = null;\n $this->values[self::CONTENT] = null;\n }", "title": "" }, { "docid": "5377b04dfd0e1fa8dbe5c41d24d4fd64", "score": "0.6334449", "text": "public function reset()\n {\n $this->values[self::STRACCOUNT] = null;\n $this->values[self::STMAIL] = null;\n $this->values[self::IRETURN] = null;\n }", "title": "" }, { "docid": "1552eae4047cad3805692502a9434ced", "score": "0.6323624", "text": "protected function clearData()\n {\n $this->sender = Ewebify::ADMIN_EMAIL;\n $this->recipients = [];\n $this->subject = null;\n $this->ccList = [];\n $this->body = '';\n $this->bodyIsSet = false;\n $this->contentType = 'text/html';\n }", "title": "" }, { "docid": "9a3545063227adf8cbe3d1cf83688704", "score": "0.63177836", "text": "public function reset()\n {\n $this->values[self::BOXID] = null;\n $this->values[self::DRAFTDOCUMENTS] = array();\n $this->values[self::DOCUMENTS] = array();\n }", "title": "" }, { "docid": "4b358fb649ead59274c8ad940d549aab", "score": "0.63141984", "text": "public function reset()\n {\n $this->values[self::NAME] = null;\n $this->values[self::ID] = null;\n $this->values[self::EMAIL] = null;\n $this->values[self::PHONE] = array();\n }", "title": "" }, { "docid": "35c74f7eb4de9a208a676ab55121bba8", "score": "0.63119566", "text": "public function reset()\n {\n $this->values[self::ERRMSG] = null;\n $this->values[self::ERRCODE] = null;\n }", "title": "" }, { "docid": "bb5d51cd1cdd88053cfc269f318e9d79", "score": "0.63021725", "text": "public function reset()\n {\n $this->values[self::REQUEST_ID] = null;\n $this->values[self::API_VERSION] = null;\n $this->values[self::ADSLOT] = null;\n $this->values[self::APP] = null;\n $this->values[self::DEVICE] = null;\n $this->values[self::NETWORK] = null;\n $this->values[self::GPS] = null;\n $this->values[self::IS_DEBUG] = self::$fields[self::IS_DEBUG]['default'];\n $this->values[self::REQUEST_NUM] = null;\n }", "title": "" }, { "docid": "d6630096d770537c9ca549819a42a1da", "score": "0.6295679", "text": "function clearMessages ()\n\n\t{\n\n\t\tunset ($this->messageList);\n\n\t}", "title": "" }, { "docid": "d0fd210dd19676ceefbcba1889d8da6c", "score": "0.62913394", "text": "public function resetFields()\n {\n $this->name = '';\n $this->email = '';\n $this->phone_number = '';\n $this->status = '';\n $this->member_id = '';\n }", "title": "" }, { "docid": "f67c7b615a1ed7e114380847d8b7537d", "score": "0.6289532", "text": "public function reset()\n {\n $this->values[self::IRESULT] = null;\n $this->values[self::UIN] = null;\n $this->values[self::IZONEID] = null;\n $this->values[self::IWORLDID] = null;\n $this->values[self::STLOGININFO] = null;\n $this->values[self::UROLEID] = null;\n $this->values[self::IUPDATETIME] = null;\n $this->values[self::STRGUILDNAME] = null;\n }", "title": "" }, { "docid": "cb9069dcc41af00a09db6cf0e8d46156", "score": "0.62799674", "text": "public function reset()\n {\n $this->values[self::NAME] = null;\n $this->values[self::ID] = null;\n $this->values[self::EMAIL] = null;\n $this->values[self::MONEY] = null;\n }", "title": "" }, { "docid": "a0eb11418552076159000f83eb5d3bef", "score": "0.6268589", "text": "public function reset()\n {\n $this->values[self::STBOARD] = null;\n $this->values[self::STRACCOUNT] = null;\n }", "title": "" }, { "docid": "b018cfc95b6f1737d903497ba9c6bb56", "score": "0.6265694", "text": "public function reset() {\n $this->values[self::STATUS] = null;\n $this->values[self::TOTAL] = null;\n $this->values[self::SIZE] = null;\n $this->values[self::CONTENTS] = array();\n }", "title": "" }, { "docid": "de194fd665f962f1a80bd1e6588cc6ab", "score": "0.6265384", "text": "public function reset()\n {\n $this->values[self::UIN] = null;\n $this->values[self::WORLDID] = null;\n $this->values[self::STRHANDBOOK] = null;\n }", "title": "" }, { "docid": "707fc79f21fb3375ab23d784347ccbbd", "score": "0.6264088", "text": "function clear()\n\t{\n\t\t$this->_email_list = array();\n\t\t$this->_vars = array();\n\t\t$this->_list_id = 0;\n\t\t$this->_html = '';\n\t\t$this->_text = '';\n\t\t$this->errors = array();\n\t\t$this->_subject = '';\n\t\t$this->_from_email = '';\n\t\t$this->_from_name = '';\n\t\t$this->_to_name = '';\n\t}", "title": "" }, { "docid": "15b640544fc948a0836bc5b522d48113", "score": "0.62547064", "text": "public function reset()\n {\n $this->values[self::STRACCOUNT] = null;\n $this->values[self::ISELECTTYPE] = null;\n $this->values[self::STPARAM] = null;\n $this->values[self::IFETCHTYPE] = null;\n $this->values[self::IWORLDID] = null;\n $this->values[self::STRROLE] = null;\n }", "title": "" }, { "docid": "6d5d06486f949975d1bb76e30444c84e", "score": "0.62507445", "text": "public function reset()\n {\n $this->values[self::IFUNCTYPE] = null;\n $this->values[self::IDAILYBUYAMT] = null;\n $this->values[self::ILASTBUYTIME] = null;\n $this->values[self::IBUYAMT] = null;\n }", "title": "" }, { "docid": "c07f2507275c9e1b2e486f01060d9029", "score": "0.6250322", "text": "public function reset()\n {\n $this->values[self::IROLEID] = null;\n $this->values[self::ILASTSENDTIME] = null;\n $this->values[self::ILASTASKTIME] = null;\n $this->values[self::STBASICSUMMARY] = null;\n }", "title": "" }, { "docid": "f0675536d450084faca193d275acb9fb", "score": "0.62489647", "text": "public function reset()\n {\n $this->status = self::STATUS_PENDING;\n $this->startTime = 0;\n $this->endTime = 0;\n $this->message = '';\n $this->store();\n }", "title": "" }, { "docid": "95e64f43535fae50dbd22bebbdeda71b", "score": "0.623423", "text": "protected function restoreDefaultMessageType()\n {\n $this->resetMessage();\n $this->loadConfigType('default');\n }", "title": "" }, { "docid": "2c3fbee1483d868db13a1ab8840faa51", "score": "0.6233496", "text": "public function reset() {\n $this->values[self::LOGO] = null;\n $this->values[self::URL] = null;\n $this->values[self::CATEGORY] = null;\n $this->values[self::INFOWINDOW_STYLE] = null;\n $this->values[self::ID] = null;\n $this->values[self::DEFAULT_GEOTABLE_ID] = null;\n }", "title": "" }, { "docid": "f641a47a05dc8667b1a66700d4e20cae", "score": "0.62299424", "text": "public static function resetValues() {\r\n\r\n\t\tself::errorReset();\r\n\r\n\t\tself::$DEFAULT = null;\r\n\t\tself::$ITEMS = array();\r\n\t\tself::$USED = null;\r\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62271863", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62271863", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62271863", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62271863", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62271863", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62271863", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62271863", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62271863", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62271863", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62271863", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62271863", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62271863", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62271863", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62271863", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62271863", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "979aa92d7ea37139cd278c0e81cbaf73", "score": "0.6220756", "text": "public function reset()\n {\n $this->values[self::STRACCOUNT] = null;\n $this->values[self::STONEMAIL] = null;\n $this->values[self::IMINROLE] = null;\n $this->values[self::IMAXROLE] = null;\n $this->values[self::IMINVIP] = null;\n $this->values[self::IMAXVIP] = null;\n $this->values[self::IGUILD] = null;\n $this->values[self::ILOGINBEGIN] = null;\n $this->values[self::ILOGINEND] = null;\n }", "title": "" }, { "docid": "56425c14be22cbd727c54e65452e6269", "score": "0.62200683", "text": "public function reset()\n {\n $this->values[self::IROLEID] = null;\n $this->values[self::IROLELEVEL] = null;\n $this->values[self::STRNICKNAME] = null;\n $this->values[self::ICROSSSTARS] = null;\n $this->values[self::ILASTLOGOUTTIME] = null;\n $this->values[self::IFRIENDSNUM] = null;\n $this->values[self::IHEADIMGID] = null;\n $this->values[self::IVIPLV] = null;\n $this->values[self::IISONLINE] = null;\n $this->values[self::IMAXCROSSID] = null;\n $this->values[self::IFIGHTVALUE] = null;\n $this->values[self::ITALENT] = null;\n $this->values[self::IUIN] = null;\n $this->values[self::IPVPNOTIFY] = null;\n $this->values[self::IMASTERNOTIFY] = null;\n $this->values[self::IWRESTNOTIFY] = null;\n $this->values[self::IGUILDID] = null;\n $this->values[self::STRGUILDNAME] = null;\n }", "title": "" }, { "docid": "2c9171b975826f47a1c74f91a172f2f6", "score": "0.62098587", "text": "public function reset()\n {\n $this->values[self::ISERVERID] = null;\n $this->values[self::IPLATFORMID] = null;\n $this->values[self::ITYPE] = null;\n }", "title": "" }, { "docid": "d1264768ab5d0da51d5de01c469e6a73", "score": "0.6207736", "text": "public function Clear(){$this->values=Array();$this->prebuffer=Array();$this->forms=Array();}", "title": "" }, { "docid": "a8a53eb7903b7feb7b0dbd35a776d326", "score": "0.6190048", "text": "public function reset()\n {\n $this->values[self::IBOXID] = array();\n }", "title": "" }, { "docid": "2dee3e52f2f6681f171ea4fc98a084c8", "score": "0.6183411", "text": "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "title": "" }, { "docid": "2dee3e52f2f6681f171ea4fc98a084c8", "score": "0.6183411", "text": "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "title": "" }, { "docid": "2dee3e52f2f6681f171ea4fc98a084c8", "score": "0.6183411", "text": "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "title": "" }, { "docid": "2dee3e52f2f6681f171ea4fc98a084c8", "score": "0.6183411", "text": "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "title": "" }, { "docid": "2dee3e52f2f6681f171ea4fc98a084c8", "score": "0.6183411", "text": "function ClearMessage() {\r\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\r\n\t}", "title": "" }, { "docid": "1ffcad26d25687cf8abaf2b9b7166b06", "score": "0.6174049", "text": "public function reset()\n {\n $this->values[self::REGEX] = null;\n $this->values[self::ERROR_MESSAGE] = null;\n }", "title": "" }, { "docid": "34fe1d5e09b3bcc8a4e2f4f377c1d22c", "score": "0.6172492", "text": "public function reset(){\r\n\r\n\t\t$this->validationStatus = self::VALIDATION_OK;\r\n\t\t$this->failedMessagesList = [];\r\n\t\t$this->failedStatusList = [];\r\n\t\t$this->lastMessage = '';\r\n\t}", "title": "" }, { "docid": "dec269c4c406d182271b2d7020b7d47a", "score": "0.6170703", "text": "public function clear()\n\t{\n\t\t$this->set_value($this->initial_value);\n\t}", "title": "" }, { "docid": "4e02205a5fe9fcb1346df4b20d011617", "score": "0.61619025", "text": "public function reset()\n {\n $this->values[self::IROLEID] = null;\n $this->values[self::BFETCHBASICSUMMARY] = null;\n $this->values[self::BHEROFORMSUMMARY] = null;\n }", "title": "" }, { "docid": "eec5ea2f5b1f1e1bb5b3478936254d33", "score": "0.6161457", "text": "public function reset()\n {\n $this->values[self::ITYPE] = null;\n $this->values[self::IWORLDID] = null;\n $this->values[self::IROLEUIN] = null;\n $this->values[self::STFORBID] = null;\n $this->values[self::ITIME] = null;\n $this->values[self::STRACCOUNT] = null;\n }", "title": "" }, { "docid": "c294bca491e73073385ae06a4a61b1c9", "score": "0.61339396", "text": "public function reset()\n {\n $this->values[self::ISOCIALTYPE] = null;\n $this->values[self::IROLEID] = null;\n $this->values[self::ITIME] = null;\n $this->values[self::STBASICSUMMARY] = null;\n }", "title": "" }, { "docid": "582e74ed5e60528f482993b95aee32aa", "score": "0.61291456", "text": "public function reset()\n {\n $this->values[self::QUERY_WORD] = null;\n $this->values[self::QUERYID] = null;\n $this->values[self::RESULTLANG] = null;\n $this->values[self::PRE_QUERY] = null;\n $this->values[self::URI_MD5] = null;\n $this->values[self::URL_CANNOT_CLUSTER_SRCID_LIST] = array();\n $this->values[self::SITE_CANNOT_CLUSTER_SRCID_LIST] = array();\n $this->values[self::SIDS] = array();\n $this->values[self::SRCID_LIST] = array();\n $this->values[self::DEBUGINFO] = null;\n $this->values[self::CLICK_FEATURES] = null;\n }", "title": "" }, { "docid": "a6c6ba2ce2142b8736ca3f8e9770a0c7", "score": "0.6120329", "text": "public function reset()\n {\n $this->values[self::ISOUNDID] = null;\n $this->values[self::STRSOUND] = null;\n }", "title": "" }, { "docid": "3d7101dd39f5cea6421a58c800c5a6cd", "score": "0.61149025", "text": "function reset() {\n $this->allQuestioner = '0';\n $this->command = '';\n $this->diskQuota = '1000'; // 預設每個人1000MB(但沒測過超過1000MB會發生什麼事)\n $this->duration = '';\n $this->guaranteed = '0'; // 預設不限制連線人數(預約會議會用到可連線人數,此時此參數設成1,但我的程式好像沒把它設成1)\n $this->jointBrowsingUrl = '';\n $this->maxoutconnection = '200'; // 預設一個會議最多為200人(沒實際測過)\n $this->meetingId = '';\n $this->meetingTitle = '';\n $this->recording = '';\n $this->ownerId = '';\n $this->ownerEmail = '';\n $this->ownerName = '';\n $this->timestamp = '';\n $this->courseId = '';\n $this->continueRecordingId ='';\n $this->continueType = '';\n $this->agenda = '';\n $this->numofConnection = '';\n }", "title": "" }, { "docid": "a101d25923677948f14441158f012f45", "score": "0.6111709", "text": "public function reset()\n {\n $this->values[self::IID] = null;\n $this->values[self::STRNAME] = null;\n $this->values[self::IFLAG] = null;\n $this->values[self::IMEMBERAMT] = null;\n $this->values[self::IMEMBERMAX] = null;\n $this->values[self::IFIGHTVALUE] = null;\n }", "title": "" }, { "docid": "05cd02538679db280ccea2c9bac43789", "score": "0.6101019", "text": "public function reset()\n {\n $this->values[self::top_fixed_banner] = array();\n $this->values[self::tag] = null;\n $this->values[self::second_fixed_banner] = array();\n $this->values[self::quick_entry_module] = null;\n $this->values[self::topic_blocks] = array();\n $this->values[self::product_blocks] = array();\n $this->values[self::store_block] = null;\n $this->values[self::brand_block] = null;\n $this->values[self::camber_banner] = null;\n }", "title": "" }, { "docid": "b451934a6eb4cad3babddc3e580f75fd", "score": "0.6097668", "text": "public function reset()\n {\n $this->values[self::IBEGINTIME] = null;\n $this->values[self::IENDTIME] = null;\n $this->values[self::ISTATU] = null;\n }", "title": "" }, { "docid": "2d1cc17d794f70f48b2234fce9857d52", "score": "0.6091847", "text": "public function unsetDefault();", "title": "" }, { "docid": "c7f34ef426f4fc97f7ca539213798b5e", "score": "0.60913706", "text": "public function reset()\n {\n $this->values[self::ICHIPID] = null;\n $this->values[self::ICOUNT] = null;\n }", "title": "" }, { "docid": "7c37b3cd054b52a1d931a4da2d7286da", "score": "0.60799277", "text": "public function reset()\n {\n $this->values[self::order_id] = null;\n $this->values[self::customer_id] = null;\n $this->values[self::auth_token] = null;\n $this->values[self::wholesaler_id] = null;\n $this->values[self::partial] = self::$fields[self::partial]['default'];\n $this->values[self::products] = array();\n }", "title": "" }, { "docid": "daf3076dfb5655a5d32d9ea0a0f8719b", "score": "0.6075397", "text": "public function reset()\n {\n $this->values[self::STGUILDAPPLYS] = array();\n }", "title": "" }, { "docid": "d5d701de60985f93b88bf9bae9c189d3", "score": "0.6073979", "text": "public function reset()\n {\n $this->values[self::TYPE] = null;\n $this->values[self::GID] = null;\n $this->values[self::POS] = null;\n $this->values[self::INDEX] = null;\n $this->values[self::USERES] = null;\n $this->values[self::HKEY] = null;\n }", "title": "" }, { "docid": "5516ebe0b80455996850b265a5380ac9", "score": "0.60661334", "text": "private function clearVariables()\n {\n $this->_options = array();\n $this->_attributes = array();\n $this->_tag = '';\n $this->_text = '';\n $this->_value = '';\n\n }", "title": "" } ]
144b139d35836fd961732230e9286be5
get all the counts for dashboard
[ { "docid": "fe714c961a580767999ed8e07ddedadd", "score": "0.0", "text": "public function getallcounts($specialistId)\n {\n\t\t\n\t\t\n $data = array(\n 'averageRating' => \"0\", 'totalCustomers' => \"0\",\n\t\t\t\"notificationCount\" => $this->getNotificationcount($specialistId),\n \"allmessageCount\"=> $this->allmessageCount($specialistId),\n \"userInfo\" => $this->getusermetainfo($specialistId),\n \"reviewsCount\" => $specialistId,\n // \"sendmenotification\" => (String)$this->send_me_notification($specialistId),\n \"productsCount\" => array(\"total\" => \"0\", \"newProducts\" => \"0\"),\n \"mostSellingProducts\" => [],\n /// \"images\"=>$this->get_images($specialistId)\n );\n $data['averageRating'] \t= $this->getratingforspecialist($specialistId);\n $data['reviewsCount'] = $this->getReviewCountforspecialist($specialistId);\n $data['totalCustomers'] = $this->getTotalCustomers($specialistId);\n $data['productsCount']['total'] = (String)sizeof($this->view_product($specialistId,'',[]));\n $data['connectedColleagues'] = (String)sizeof($this->get_my_colleagues($specialistId,1));\n $data['mySentRequests'] = (String)sizeof($this->get_requests($specialistId));\n $data['mostSellingProducts'] = $this->getTopSellingProducts($specialistId);\n\t\t$data['facialThisMonth'] = '2';\n return $data;\n }", "title": "" } ]
[ { "docid": "b19a96d555f170e9a7e9f0ba02135057", "score": "0.7146661", "text": "public function getTotalCount();", "title": "" }, { "docid": "e5222be55593a4eb49b6c08e3e3b9948", "score": "0.701695", "text": "public function countList()\r\n {\r\n \t$objects = [];\r\n \t$objects['total'] = $this->createQuery()->execute()->count();\r\n return $objects;\r\n }", "title": "" }, { "docid": "2c8c0f32796b2582f91de387394120d0", "score": "0.70163095", "text": "public function getCount()\n {\n $countPost = DB::select('select count(*) as totalPost from blog_posts');\n\n $countPackage = DB::select('select count(*) as totalPackage from tour_packages');\n\n $countMember = DB::select('select count(*) as totalMember from club_members');\n\n $countPendingReservation = DB::select('select count(*) as pendingReservation from reservations where reservation_status=\"Pending\" ');\n\n $countMessages = DB::select('select count(*) as totalMessage from visitor_messages');\n\n return response()->json(['countPost' => $countPost[0]->totalPost, 'countPackage' => $countPackage[0]->totalPackage, 'countMember' => $countMember[0]->totalMember, 'countPendingReservation' => $countPendingReservation[0]->pendingReservation, 'countMessages' => $countMessages[0]->totalMessage, 'status' => 'success']);\n }", "title": "" }, { "docid": "b1619cdab50cc384c4ac0c2ab1d9d38c", "score": "0.68794423", "text": "public function countAll();", "title": "" }, { "docid": "b2743c0bf0ecbc029cf3015f66c4af48", "score": "0.6874457", "text": "public function index()\n {\n $users = User::count();\n $borrower = Borrower::count();\n $loan = Loan::count();\n $caseleadofficer = Caseleadofficer::count();\n $caseofficer = Caseofficer::count();\n $advocate = Advocate::count();\n $valuer = Valuer::count();\n $resolutionagent = Resolutionagent::count();\n\n $counts = [\n 'users' => $users,\n 'borrowers' => $borrower,\n 'loans' => $loan,\n 'case_lead_officers' => $caseleadofficer,\n 'case_officers' => $caseofficer,\n 'advocates' => $advocate,\n 'valuers' => $valuer,\n 'resolution_agents' => $resolutionagent,\n ];\n \n return response()->json($counts);\n }", "title": "" }, { "docid": "e709536c972ab11480134cd2fbd1fe88", "score": "0.685987", "text": "public function countDataAction() {\n $type = $this->getDataType();\n $total = 1000;\n $response = array('total' => $total,\n 'msgs' => array('start' => $this->helper()->__('Starting %s.', $type),\n 'total' => $this->helper()->__('Found %s record(s).', $total),\n 'finish' => $this->helper()->__('Finished %s process.', $type))\n );\n return $this->getResponse()->setBody(json_encode($response));\n }", "title": "" }, { "docid": "abe53dcfa8325c085a808f03b5b09663", "score": "0.68513316", "text": "public function count_all(){\r\n\t\treturn $this->db->count_all($this->tbl_incident);\r\n\t}", "title": "" }, { "docid": "e0a1941eaa3f443bbbd6413429feb5f2", "score": "0.6818003", "text": "public function counts()\n {\n $folios = Folio::active()->count();\n $clientes = Cliente::enabled()->count();\n $empresas = Empresa::enabled()->count();\n\n return HttpResponse::ok(compact(['folios', 'clientes', 'empresas']));\n }", "title": "" }, { "docid": "8747cd60fb2ca4335b7c1cf4a2e6a1d6", "score": "0.68006355", "text": "protected function getKeyMetricsWithCount() {\n\t\tglobal $current_user, $adb;\n\t\t$current_user = Users_Record_Model::getCurrentUserModel();\n\t\t\n\t\trequire_once 'modules/CustomView/ListViewTop.php';\n\t\t$metriclists = getMetricList();\n\t\t\n\t\tforeach ($metriclists as $key => $metriclist) {\n\t\t\t$metricresult = NULL;\n\t\t\t$queryGenerator = new EnhancedQueryGenerator($metriclist['module'], $current_user);\n\t\t\t$queryGenerator->initForCustomViewById($metriclist['id']);\n if($metriclist['module'] == \"Calendar\") {\n // For calendar we need to eliminate emails or else it will break in status empty condition\n $queryGenerator->addCondition('activitytype', \"Emails\", 'n', QueryGenerator::$AND);\n\t\t\t}\n\t\t\t$metricsql = $queryGenerator->getQuery();\n\t\t\t$metricresult = $adb->query(Vtiger_Functions::mkCountQuery($metricsql));\n\t\t\tif($metricresult) {\n\t\t\t\t$rowcount = $adb->fetch_array($metricresult);\n\t\t\t\t$metriclists[$key]['count'] = $rowcount['count'];\n\t\t\t}\n\t\t}\n\t\treturn $metriclists;\n\t}", "title": "" }, { "docid": "38781f78db40a7be36138cb59ef4982b", "score": "0.6800507", "text": "function get_all_statuss_count()\n {\n $this->db->from('status');\n return $this->db->count_all_results();\n }", "title": "" }, { "docid": "75d8001f9c0eb108af668c96e4156379", "score": "0.67951155", "text": "public function getCount();", "title": "" }, { "docid": "75d8001f9c0eb108af668c96e4156379", "score": "0.67951155", "text": "public function getCount();", "title": "" }, { "docid": "75d8001f9c0eb108af668c96e4156379", "score": "0.67951155", "text": "public function getCount();", "title": "" }, { "docid": "987ed5f0a27fad4be85754fbaa25ee9a", "score": "0.6763907", "text": "function visitorGetCount(){\n $s = $this->Mdl_visitor->visitorCount()->result();\n\n $td = $this->Mdl_visitor->visitorCountToday();\n $tM = $this->Mdl_visitor->visitorCountMonth();\n $tY = $this->Mdl_visitor->visitorCountYear();\n \n\n $this->o_put[\"get\"] = $s;\n $this->o_put[\"today\"] = $td[\"visit_today\"];\n $this->o_put[\"yesterday\"] = $td[\"visit_yesterday\"];\n $this->o_put[\"thisMonth\"] = $tM[\"visit_thisMonth\"];\n $this->o_put[\"lastMonth\"] = $tM[\"visit_lastMonth\"];\n $this->o_put[\"thisYear\"] = $tY[\"visit_thisYear\"];\n $this->o_put[\"lastYear\"] = $tY[\"visit_lastYear\"];\n $this->runOutput();\n }", "title": "" }, { "docid": "735bb18c48bab85bd6c477a65f21af26", "score": "0.67272294", "text": "private function getTableCount()//get row counts from any of da tables\n\t{\n\t\t if($this->get_request_method() != \"GET\"){\n\t\t\t$this->response('',406,\"\");\n\t\t }\t\n \t $tbl = $this->_request['tbl'];//request for the sanitized waterpoint id\t\n\t\t //set the xml nodes just in case xml is requested\t\n\t\t$this->pnode = 'counts';\n\t\t$this->cnode = 'count'; \n\t\t $sql = \"SELECT count(*) as cnt FROM \".$tbl;\t\t\n\t\t $this->getQueryData($sql);\t//get query results\t\n\t}", "title": "" }, { "docid": "57b6a252c4e6c8ff5a9f2cc5b6cc9fe7", "score": "0.67271495", "text": "public function get_collector_stats()\n {\n if(! $this->authorized()) {\n $obj->view('json', array('msg' => array('error' => 'Not authenticated')));\n return;\n }\n\n $collector_stats = new Insight_idr_model();\n $sql = \"SELECT sorted_collectors_list\n FROM insight_idr\n LEFT JOIN reportdata USING (serial_number)\n \".get_machine_group_filter();\n\n $out = [];\n foreach ($collectors as $collector) {\n $location = array_search($collector, array_column($out, \"collector\"));\n if ($location === False) {\n array_push($out, array(\"collector\" => $collector, \"count\" => 1));\n } else {\n $out[$location][\"count\"]++;\n }\n }\n\n $obj = new View();\n $obj->view('json', array('msg' => $out));\n }", "title": "" }, { "docid": "d0de39f6a7c2f63a5f6dedd3fafcb73b", "score": "0.66714436", "text": "protected function count_all() { \n\t\treturn 0; \n\t}", "title": "" }, { "docid": "0bb65bf9e090a9f01fb295f761cd61b9", "score": "0.6637143", "text": "public function index()\n {\n return $this->countService->index();\n }", "title": "" }, { "docid": "f706f556bd0584dd73528669087159a8", "score": "0.66221595", "text": "public function getListOverallCount()\n\t{\n\t\t//$dependency = new CGlobalStateCacheDependency($this->_listQuery->text);\n\t\t//$q = Yii::app()->{self::$dbConnection}->cache(600, $dependency)->createCommand();\n\t\t$q = Yii::app()->{self::$dbConnection}->createCommand();\n\t\t$q->select(new CDbExpression(\"COUNT(*)\"));\n\t\t$q->from($this->tableName);\n\t\tif($this->_listQuery->join)\n\t\t\t$q->join = $this->_listQuery->join;\n\t\tif($this->_listQuery->where)\n\t\t\t$q->where = $this->_listQuery->where;\n\t\tif($this->_listQuery->params)\n\t\t\t$q->params = $this->_listQuery->params;\n\t\treturn $q->queryScalar();\n\t}", "title": "" }, { "docid": "08dda3d261195ff3ed08c09b96752338", "score": "0.66072214", "text": "public static function countAll();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.65817094", "text": "public function count();", "title": "" }, { "docid": "c667c6772f672c86a913d41e40aa6be1", "score": "0.6580722", "text": "function count()\n { \n $output['success'] = FALSE;\n $ceklogin = $this->cek_session->islogin();\n $output['logged_in'] = $ceklogin;\n if($ceklogin)\n {\n $this->mongo_db->select_db(\"Game\");\n $this->mongo_db->select_collection(\"Gesticon\"); \n $tempdata = $this->mongo_db->count2(array());\n if($tempdata)\n {\n $output['success'] = TRUE;\n $output['count'] = (int)$tempdata;\n }\n }\n echo json_encode($output);\n }", "title": "" }, { "docid": "8a0758a548369b9749043dc061aaca3b", "score": "0.6578007", "text": "protected function dashboards()\n {\n return [\n //new UserInsights\n ];\n }", "title": "" }, { "docid": "5dce6a55adc59cab78a93d6b2e81045b", "score": "0.6554907", "text": "public function count(){\n $count = Url::forCurrentUser()->count();\n return response()->json($count);\n }", "title": "" }, { "docid": "9559185336bf88b90bcb32948635dc2f", "score": "0.6539387", "text": "public function get_count_all()\n {\n // $query = $this->db->get();\n $query = $this->db->query('SELECT * FROM patient');\n return $query->num_rows();\n // return $this->db->count_all_results('patient');\n }", "title": "" }, { "docid": "8c00d40a87d521b6f19908987344ad28", "score": "0.65380526", "text": "public function getTotalCount()\n {\n }", "title": "" }, { "docid": "b8fe8ee7e066c0616be9f555286bb6cd", "score": "0.65342164", "text": "public function countFrontend(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"count\"));\n\t\t\t\t\t }", "title": "" }, { "docid": "a9feed6d05d6dd1eb992cd341cead345", "score": "0.6529611", "text": "public function index()\n {\n $data=[];\n $data['count_blogs']=Blog::all()->count();\n $data['count_advertisement']=Advertisement::all()->count();\n $data['count_acoustic']=Acoustic::all()->count();\n $data['count_visual']=Visual::all()->count();\n $data['count_user']=User::where('type','=','user')->get()->count();\n $data['count_admin']=User::where('type','=','admin')->get()->count();\n $data['count_slider']=Slider::get()->count();\n $data['count_subjects']=Subject::get()->count();\n $data['count_stages']=Stage::get()->count();\n\n return view('admin.dashboard',$data);\n }", "title": "" }, { "docid": "5013762bc17b4636ed57891c96abe9cc", "score": "0.651846", "text": "public static function countAll() {\n\t\t}", "title": "" }, { "docid": "182ff6bc0ddf92f4aa175099fae5ac65", "score": "0.64984125", "text": "function countAllNot()\n\t {\n\t // This shows the module name user is accessing, as a tiltle in the browser. \n\t\t$data['title'] = \"Usage\";\n\t\t// This shows the module name you are accessing, as a header(tab name) in the browser. \n $data['header'] = \"Usage\";\n\t\t// count candidates not added to worksheet\n\t\t$data['worksheet'] = $this->MUsage->countWorksheetNot();\n\t\t// count consulidated data\n\t\t$data['total_cand'] = $this->MUsage->countAllCand();\n\t\t$data['consolWork'] = $this->MUsage->countConsolWork();\n\t\t$data['consolCV'] = $this->MUsage->countConsolCV();\n\t\t // This is how Mirus-HRMS loads views\n $data['page'] = $this->config->item('backendpro_template_admin') . \"admin_count_page\";\n $data['module'] = 'usage';\n $this->load->view($this->_container,$data);\n\t\t\t\t //\n\t }", "title": "" }, { "docid": "b10e8cc39b7701904173449034c267cf", "score": "0.64966285", "text": "function count_all(){\n\t\n return $this->db->count_all($this->tbl_coustomerinfo);\n }", "title": "" }, { "docid": "69b569f3106a6a316243aa9f7d8537c1", "score": "0.6489882", "text": "function dokan_get_withdraw_count() {\n global $wpdb;\n\n $cache_key = 'dokan_withdraw_count';\n $counts = wp_cache_get( $cache_key );\n\n if ( false === $counts ) {\n\n $counts = array( 'pending' => 0, 'completed' => 0, 'cancelled' => 0 );\n $sql = \"SELECT COUNT(id) as count, status FROM {$wpdb->dokan_withdraw} GROUP BY status\";\n $result = $wpdb->get_results( $sql );\n\n if ( $result ) {\n foreach ($result as $row) {\n if ( $row->status == '0' ) {\n $counts['pending'] = (int) $row->count;\n } elseif ( $row->status == '1' ) {\n $counts['completed'] = (int) $row->count;\n } elseif ( $row->status == '2' ) {\n $counts['cancelled'] = (int) $row->count;\n }\n }\n }\n }\n\n return $counts;\n}", "title": "" }, { "docid": "ab39b6342c51d77e1b5ae0aa3de63f0f", "score": "0.6484436", "text": "public function index()\n {\n return view('admin.dashboard')\n ->with('product_count', Product::all()->count())\n ->with('purchase_count', PurchaseOrder::all()->count())\n ->with('payment_count', Payment::all()->count())\n ->with('waiting_payment_count', PurchaseOrder::where('status', '=', 'Menunggu Pembayaran')->get()->count())\n ->with('purchase_payed_count', PurchaseOrder::where('status', '=', 'Menunggu Verifikasi Pembayaran')->get()->count())\n ->with('processed_purchase_count', PurchaseOrder::where('status', '=', 'Sedang di Proses')->get()->count())\n ->with('shipped_purchase_count', PurchaseOrder::where('status', '=', 'Sedang Dikirim')->get()->count())\n ->with('finished_purchase_count', PurchaseOrder::where('status', '=', 'Transaksi Selesai')->get()->count())\n ->with('user_count', User::all()->count());\n }", "title": "" }, { "docid": "cc0f884f37a8a5ad2bd3c8148778d4d1", "score": "0.64776576", "text": "function ca_get_total_logs(){\n\t\tglobal $wpdb;\n\t\t$table_name = $wpdb->prefix . 'ca_ips';\n\t\treturn count($wpdb->get_results(\"SELECT * FROM $table_name\", ARRAY_A));\n\t}", "title": "" }, { "docid": "fc0ea3bf68939b72e9ca2d91fad2748b", "score": "0.6468674", "text": "public function getIndex()\n\t{\n\t\t$range = Carbon::now()->subDays(30);\n\n\t\t $stats = DB::table('albums')\n\t\t ->where('created_at', '>=', $range)\n\t\t ->groupBy('date')\n\t\t ->orderBy('date', 'ASC')\n\t\t ->get([\n\t\t DB::raw('Date(created_at) as date'),\n\t\t DB::raw('COUNT(*) as value')\n\t\t ]);\n\n\t\t return $stats;\n\t}", "title": "" }, { "docid": "d44fc2c7409e57b23b6b0cbaee44051b", "score": "0.6463031", "text": "public function counts ()\r\n {\r\n if (! isset ($this->_counts))\r\n {\r\n $this->_generate ();\r\n }\r\n return $this->_counts;\r\n }", "title": "" }, { "docid": "2359b3b0f5d778ffd8bcfec6236a4de9", "score": "0.64264894", "text": "function count_users(){\r\n return $this->db->where(['status'=>'active'])->from(\"admin\")->count_all_results();\r\n }", "title": "" }, { "docid": "86972ce1dc2a210cf6f2137f072b6c03", "score": "0.6408166", "text": "public function action_resultcount() {\n $this->auto_render = false;\n Helper_Article::saveFilterParams();\n\n $mobile = new Helper_Mobile();\n $typeCount = Helper_Article::getArticleResultCount();\n\n if($mobile->isMobile() && !$mobile->isTablet()) {\n $count = 0;\n foreach($typeCount as $counts) {\n $count += $counts;\n }\n\n $msg = Helper_Message::get(\"module.planning.result_button\", array('count' => '<strong>'.$count.'</strong>'));\n $this->response->body(\"<span class=\\\"result-text\\\">{$msg}</span>\");\n } else {\n $this->response->body(json_encode($typeCount));\n }\n\t}", "title": "" }, { "docid": "bca2032cc07a798ad79e04362de354f8", "score": "0.6407427", "text": "public function getCount(){\n return $this->db->count_all_results($this->table, FALSE);\n }", "title": "" }, { "docid": "e2df97f964145ab61adc6714ac0d6858", "score": "0.6405414", "text": "public function getAllCount(){\n\t\t$query = \"select count(*) from (select dc.*,count(bookings.seq) as usedtimes from discountcoupons dc left JOIN bookings on dc.seq = bookings.couponseq group by dc.seq) as c\";\n\t\t$count = self::$dataStore->executeCountQueryWithSql($query,true);\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "9410c4623d06bf463dc1844466086774", "score": "0.63988274", "text": "public function count()\n {\n $authorized = Auth::check('default');\n if (!$authorized)\n return $this->render(array('json' => null, 'status' => 500));\n\n $count = UserNotifications::CountUserNotifications($authorized['id']);\n return $this->render(array('json' => $count, 'status' => 200));\n }", "title": "" }, { "docid": "ba2918f745034dca868da4ad33241af4", "score": "0.6396984", "text": "function getCountsByCC()\n {\n return $this->counts;\n }", "title": "" }, { "docid": "4af6388410dcb0d08e6549fb5b44aa07", "score": "0.6387976", "text": "public function adminCount()\n {\n $token = session('token');\n\n // Sending request to API for counting total admins.\n $response = Http::withToken($token)->get('https://api.jujutsu.xyz/api/v1/admin-count');\n\n // Getting the response from API.\n $admins = $response['data'];\n\n // Returning the response to AJAX request.\n return response($admins);\n }", "title": "" }, { "docid": "53da85fdd5910303488fc4d57c6f01cb", "score": "0.6370355", "text": "public function statistics() {\n $countAll = $this->count();\n\n $kiswahili = new CDbCriteria;\n $kiswahili->condition = 'wortart_id!=4 AND wortart_id!=5'; //keine Beispiele und Ausdrücke\n $kiswahili->select = 'kiswahili';\n $kiswahili->group = 'kiswahili';\n $countKiswahili = count($this->findAll($kiswahili));\n\n $deutsch = new CDbCriteria;\n $deutsch->condition = 'wortart_id!=4 AND wortart_id!=5'; //keine Beispiele und Ausdrücke\n $deutsch->select = 'deutsch';\n $deutsch->group = 'deutsch';\n $countDeutsch = count($this->findAll($deutsch));\n\n $beispiele = new CDbCriteria;\n $beispiele->condition = 'wortart_id=4 OR wortart_id=5'; //nur Beispiele und Ausdrücke\n $countBeispiele = count($this->findAll($beispiele));\n\n return array(\n 'countAll' => $countAll,\n 'countKiswahili' => $countKiswahili,\n 'countDeutsch' => $countDeutsch,\n 'countBeispiele' => $countBeispiele,\n );\n }", "title": "" }, { "docid": "057c6103b47aa788e7fbd22ec058faa3", "score": "0.6369691", "text": "function get_all_tamanhos_count()\n {\n $this->db->from('tamanhos');\n return $this->db->count_all_results();\n }", "title": "" }, { "docid": "d8d47d8e536795e49ad1db358afb1341", "score": "0.63664097", "text": "public function getStatistics();", "title": "" }, { "docid": "631aa2558cce0fb8cbc7d9167eade01d", "score": "0.6362159", "text": "private function load_dashboard_data(){\n\n // Number of Departments\n $departments = $this->model('Departments')\n ->ready()\n ->find()\n ->result_set();\n\n // Current Number of Working Scholars\n $no_of_ws = $this->model('WS')\n ->ready()\n ->find([\n 'columns' => ['count(*) as \\'wsCount\\'']\n ])\n ->go()[0]->get_fields()['wsCount'];\n\n\n // Working Scholars with Overtime\n $ws_with_ot = $this->model('Overtime')\n ->ready()\n ->find([\n 'distinct' => true,\n 'columns' => ['count(idnumber) as \\'ws_with_ot\\'']\n ])\n ->go()[0]->get_fields()['ws_with_ot'];\n\n return [\n 'no_of_ws' => $no_of_ws,\n 'ws_with_ot' => $ws_with_ot,\n 'departmentCount'=> count($departments)\n ];\n\n }", "title": "" }, { "docid": "77c15833dd6e9af4fbbb9054ce223df7", "score": "0.63532007", "text": "public function newsCount(){\n $query = '\n SELECT\n ge_languages.EnglishName AS name,\n SUM( IF( nw_items.OwnerType = \"game\", 1, 0 ) ) AS game,\n SUM( IF( nw_items.OwnerType = \"company\", 1, 0 ) ) AS company,\n SUM( IF( nw_items.OwnerType = \"group\", 1, 0 ) ) AS groups,\n COUNT(1) AS count\n FROM\n ge_languages\n INNER JOIN\n nw_itemlocales\n ON\n ge_languages.ID_LANGUAGE = nw_itemlocales.ID_LANGUAGE\n INNER JOIN\n nw_items\n ON\n nw_itemlocales.ID_NEWS = nw_items.ID_NEWS\n GROUP BY\n ge_languages.EnglishName\n ORDER BY\n count\n DESC\n ';\n return Doo::db()->fetchAll($query);\n }", "title": "" }, { "docid": "f9ba0836894982460d1c37d43f152263", "score": "0.6348591", "text": "function get_stats() {\n $results = array();\n\n //--------------------------------------------------------------\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'Dataset_Count' AND label = 'All'\");\n $allDatasets = $builder->get();\n $results['d_total'] = ($allDatasets) ? $allDatasets->getRow()->total : 0;\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'Dataset_Count' AND label = 'Last 7 days'\");\n $datasetsLast7Days = $builder->get();\n $results['ld_total'] = ($datasetsLast7Days) ? $datasetsLast7Days->getRow()->total : 0;\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'Dataset_Count' AND label = 'Last 30 days'\");\n $datasetsLast30Days = $builder->get();\n $results['md_total'] = ($datasetsLast30Days) ? $datasetsLast30Days->getRow()->total : 0;\n\n //--------------------------------------------------------------\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'Experiment_Count' AND label = 'All'\");\n $allExperiments = $builder->get();\n $results['e_total'] = ($allExperiments) ? $allExperiments->getRow()->total : 0;\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'Experiment_Count' AND label = 'Last 7 days'\");\n $experimentsLast7Days = $builder->get();\n $results['le_total'] = ($experimentsLast7Days) ? $experimentsLast7Days->getRow()->total : 0;\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'Experiment_Count' AND label = 'Last 30 days'\");\n $experimentsLast30Days = $builder->get();\n $results['me_total'] = ($experimentsLast30Days) ? $experimentsLast30Days->getRow()->total : 0;\n\n //--------------------------------------------------------------\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'Campaign_Count' AND label = 'All'\");\n $allCampaigns = $builder->get();\n $results['c_total'] = ($allCampaigns) ? $allCampaigns->getRow()->total : 0;\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'Campaign_Count' AND label = 'Last 7 days'\");\n $campaignsLast7Days = $builder->get();\n $results['lc_total'] = ($campaignsLast7Days) ? $campaignsLast7Days->getRow()->total : 0;\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'Campaign_Count' AND label = 'Last 30 days'\");\n $campaignsLast30Days = $builder->get();\n $results['mc_total'] = ($campaignsLast30Days) ? $campaignsLast30Days->getRow()->total : 0;\n\n //--------------------------------------------------------------\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'Job_Count' AND label = 'All'\");\n $allJobs = $builder->get();\n $results['a_total'] = ($allJobs) ? $allJobs->getRow()->total : 0;\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'Job_Count' AND label = 'New'\");\n $newJobs = $builder->get();\n $results['na_total'] = ($newJobs) ? $newJobs->getRow()->total : 0;\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'Job_Count' AND label = 'Last 7 days'\");\n $jobsLast7Days = $builder->get();\n $results['la_total'] = ($jobsLast7Days) ? $jobsLast7Days->getRow()->total : 0;\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'Job_Count' AND label = 'Last 30 days'\");\n $jobsLast30Days = $builder->get();\n $results['ma_total'] = ($jobsLast30Days) ? $jobsLast30Days->getRow()->total : 0;\n\n //--------------------------------------------------------------\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'CellCulture_Count' AND label = 'All'\");\n $allBiomaterial = $builder->get();\n $results['b_total'] = ($allBiomaterial) ? $allBiomaterial->getRow()->total : 0;\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'CellCulture_Count' AND label = 'Last 7 days'\");\n $biomaterialLast7Days = $builder->get();\n $results['lb_total'] = ($biomaterialLast7Days) ? $biomaterialLast7Days->getRow()->total : 0;\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'CellCulture_Count' AND label = 'Last 30 days'\");\n $biomaterialLast30Days = $builder->get();\n $results['mb_total'] = ($biomaterialLast30Days) ? $biomaterialLast30Days->getRow()->total : 0;\n\n //-----------------------------------------------------\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'Organism_Count' AND label = 'All'\");\n $allOrganisms = $builder->get();\n $results['o_total'] = ($allOrganisms) ? $allOrganisms->getRow()->total : 0;\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'Organism_Count' AND label = 'Last 7 days'\");\n $organismsLast7Days = $builder->get();\n $results['lo_total'] = ($organismsLast7Days) ? $organismsLast7Days->getRow()->total : 0;\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'Organism_Count' AND label = 'Last 30 days'\");\n $organismsLast30Days = $builder->get();\n $results['mo_total'] = ($organismsLast30Days) ? $organismsLast30Days->getRow()->total : 0;\n\n //-----------------------------------------------------\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'RawDataTB' AND label = 'All'\");\n $allRawDataTB = $builder->get();\n $rawDataTBToUse = ($allRawDataTB) ? $allRawDataTB->getRow()->total : 0;\n $results['r_total'] = sprintf(\"%8.2f\", $rawDataTBToUse);\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'RawDataTB' AND label = 'Last 7 days'\");\n $rawDataTBLast7Days = $builder->get();\n $rawDataTBToUseLast7Days = ($rawDataTBLast7Days) ? $rawDataTBLast7Days->getRow()->total : 0;\n $results['lr_total'] = sprintf(\"%8.2f\", $rawDataTBToUseLast7Days);\n\n $builder = $this->db->table(\"t_general_statistics\")->select(\"value AS total\")->where(\"category = 'RawDataTB' AND label = 'Last 30 days'\");\n $rawDataTBLast30Days = $builder->get();\n $rawDataTBToUseLast30Days = ($rawDataTBLast30Days) ? $rawDataTBLast30Days->getRow()->total : 0;\n $results['mr_total'] = sprintf(\"%8.2f\", $rawDataTBToUseLast30Days);\n\n return $results;\n }", "title": "" }, { "docid": "b8c6e9ef3e5568077271898380758fc4", "score": "0.6348279", "text": "public function index()\n {\n $admin_count = User::count();\n return $admin_count;\n }", "title": "" }, { "docid": "216bf1cb56c3a645a3173de4f8c9c1ac", "score": "0.6340823", "text": "static public function countAll() {\n\t\t$mPage=new Maerdo_Model_Page();\n\t\treturn(count($mPage->fetchAll()));\n\t}", "title": "" }, { "docid": "ef848df9c63a374400c03081744b6ca8", "score": "0.6333559", "text": "public static function count()\n {\n $resp = self::call(static::$classUrl.'/count', 'GET');\n return Util\\ObjectSet::createObjectFromJson($resp);\n }", "title": "" }, { "docid": "9c28a7c19483b8eef1eb5d6569226e65", "score": "0.63298035", "text": "function count()\n { \n $output['success'] = FALSE;\n $ceklogin = $this->cek_session->islogin();\n $output['logged_in'] = $ceklogin;\n if($ceklogin)\n {\n $this->mongo_db->select_db(\"Game\");\n $this->mongo_db->select_collection(\"Contest\"); \n $tempdata = $this->mongo_db->count2(array(\"valid\"=>TRUE));\n if($tempdata)\n {\n $output['success'] = TRUE;\n $output['count'] = (int)$tempdata;\n }\n }\n echo json_encode($output);\n }", "title": "" }, { "docid": "d207d4e264359c1def0208e4e7d5123f", "score": "0.6326762", "text": "public function index()\n {\n $servers = Server::all();\n\n $counts = $servers->groupBy('server_type')->map->count();\n\n return response()->json($counts);\n }", "title": "" }, { "docid": "8f2c7c267daabc33db54de99e80c6b25", "score": "0.63238734", "text": "function _vl_mls_get_listing_statistics() {\n\n $sql = 'select count(*) as totalrecs from {mlsdata_cc} where ifnull(nid,0) > 0';\n $results = db_query($sql);\n \n $row = db_result($results);\n $msg = 'Total Records:' . $row . '.';\n \n return drupal_json(array('status' => TRUE, 'data' => 'Stats:' .$msg ));\n}", "title": "" }, { "docid": "d275d32af2b2579558ea1beda7c49b36", "score": "0.63212", "text": "public function index()\n {\n return view('dashboard',[\n 'active_course'=>count(Course::where('status','1')->get()),\n 'total_course'=>count(Course::all()),\n 'users'=>count(User::all()),\n\n\n ]);\n }", "title": "" }, { "docid": "46c262f95b0cbb90ad009b4d91a4e4bf", "score": "0.63161814", "text": "protected function dashboards()\n {\n return [];\n }", "title": "" }, { "docid": "46c262f95b0cbb90ad009b4d91a4e4bf", "score": "0.63161814", "text": "protected function dashboards()\n {\n return [];\n }", "title": "" }, { "docid": "c2a3f914bcf75293e6d9ed561d1f8f58", "score": "0.63130575", "text": "private function count_results() {\n\t $count = 0;\n\n\t foreach($this->data as $roles) {\n\t\t$count = $count + count($roles['aspects']);\n\t }\n\n\t return $count;\n\t}", "title": "" }, { "docid": "1d47c24e1a9a07880173813b4f1bcf17", "score": "0.63125366", "text": "function userDashboardCount($userid){\n\t\t$info=database::singlerec(\"select count(*) as tot from sent_enquiry where senter_id='$userid' and role='1' and prof_response!='4' and status!='6' and status='0'\");\n\n\t\t$ordercount=$info['tot'];\n\t\t$req=database::singlerec(\"select count(*) as tot from sent_enquiry where senter_id='$userid' and role='0' and status!='6' and prof_response!='4' and status='0'\");\n\t\t$reqordercount=$req['tot'];\n\t\t$fav=database::singlerec(\"select count(*) as tot from favourite where userid='$userid' and status='0'\");\n\t\t$favcount=$fav['tot'];\n\t\t$rev=database::singlerec(\"select count(*) as tot from review where user_id='$userid' and active_status='0'\");\n\t\t$revcount=$rev['tot'];\n\t\treturn array(\"ordercount\" => $ordercount, \"reqcount\" => $reqordercount, \"favcount\" => $favcount, \"revcount\" => $revcount);\n\t}", "title": "" }, { "docid": "0b70eed8cad0109bbe0efcbddec12322", "score": "0.6312099", "text": "private function resultAll() {\n $result = $this->summary->countRows();\n\n return $result;\n }", "title": "" }, { "docid": "8dbcb8b38df33f5c87a333087234b3f6", "score": "0.6303551", "text": "public function countdataall($table){\n\t\t$total = $this->db->get($table)->num_rows();\n\t\treturn $total;\n\t}", "title": "" }, { "docid": "3673cfca76d84112afac3207f4e87a7f", "score": "0.62994385", "text": "public function dashboard_stats() {\n $user_status = $this->get_count_of_user_statuses();\n ?>\n <div>\n <p>\n <span style=\"font-weight:bold;\">\n <a href=\"<?php echo apply_filters( 'new_user_approve_dashboard_link', 'users.php' ); ?>\"><?php _e( 'Users', 'new-user-approve' ); ?></a>\n </span>:\n <?php foreach ( $user_status as $status => $count ) :\n print __( ucwords($status), 'new-user-approve' ) . \"(\" .$count . \")&nbsp;&nbsp;&nbsp;\";\n endforeach; ?>\n </p>\n </div>\n <?php\n }", "title": "" }, { "docid": "ffe8bc70ce424eff1a59d646c7f31bbc", "score": "0.62890035", "text": "function getCount();", "title": "" }, { "docid": "f088e18fd70d58974c5016a8fb8449d8", "score": "0.6288565", "text": "function get_all_guru_count()\n {\n $this->db->from('guru');\n return $this->db->count_all_results();\n }", "title": "" }, { "docid": "f5cc8677061d37c2b5299cd34c370c46", "score": "0.62783986", "text": "public function analytics()\n\t{\n $stats = [];\n\n $stats['users'] = DB::table('users')->count();\n $stats['files'] = DB::table('files')->count();\n $stats['files_size'] = abs(DB::table('files')->sum('file_size'));\n\n return $stats;\n\t}", "title": "" }, { "docid": "68880fc6955293b0cc161224533c33da", "score": "0.6276755", "text": "public function index()\n {\n $package=Package::count();\n $booking=Booking::count();\n $customer=Customer::count();\n $tour_leader=TourLeader::count();\n $tour_group=TourGroup::count();\n $hotel=Hotel::count();\n\n $hotel_bookings=HotelBooking::orderBy('created_at','DESC')->get();\n $data=$hotel_bookings->unique('hotel_booking_id');\n $hotel_booking=$data->values()->count();\n return view('backend.dashboard',compact('hotel_booking','package','booking','customer','tour_leader','tour_group','hotel'));\n }", "title": "" }, { "docid": "0e871d1e927b5aaac127401886fae3b4", "score": "0.62757105", "text": "public function count() {\n // TODO: Implement count() method.\n }", "title": "" }, { "docid": "f4fcdc2bb77edf09692ddbce482228ca", "score": "0.6275484", "text": "public function collectionCount() {\n $shop = ShopifyApp::shop();\n $collections = $shop->api()->rest('GET', '/admin/api/2019-10/custom_collections/count.json');\n\n return view('app', compact('collections'));\n }", "title": "" }, { "docid": "d59185727ff55852cdfaec27ed593886", "score": "0.6264799", "text": "protected function dashboards()\n {\n return [\n\n ];\n }", "title": "" }, { "docid": "a04be06c2a267d2be83e076f8d69dcf2", "score": "0.6255683", "text": "public static function countAll(){\n global $db;\n $result = $db->row('SELECT COUNT(*) FROM '.self::$table.'');\n return $result;\n }", "title": "" }, { "docid": "c58143351fa31ebb3539a6ac4ad5deb3", "score": "0.6250166", "text": "public static function count_all() {\r\n\t\tglobal $database;\r\n\t\t$sql = \"SELECT COUNT(*) FROM \".self::$table_name;\r\n\t\t$result_set = $database->query($sql); //returns it as a row anyway\r\n\t\t$row = $database->fetch_array($result_set);\r\n\t\treturn array_shift($row);\r\n\t}", "title": "" }, { "docid": "f7953508a3882a768fc11f1605de31f7", "score": "0.6249937", "text": "private function total_activities() {\n\n\t\treturn $this->client->totals( 'activities' );\n\n\t}", "title": "" }, { "docid": "cefeae05e375d4d36d0de5fa6ef16b7a", "score": "0.6249223", "text": "public function index()\n {\n //Dashboard statistics\n return view('dashboard.index', [\n 'services' => \\App\\Models\\Booking::latest('created_at')->limit(10)->get(),\n 'name' => auth()->user()->name ?? \"Unavailable\",\n 'userCount' => \\App\\Models\\User::count(),\n ]);\n }", "title": "" }, { "docid": "5ed3d0fda9da4b6b8f6cc3d88704e5c9", "score": "0.62363464", "text": "public static function getCount(){\n\t\t\treturn self::$count;\n\t\t}", "title": "" }, { "docid": "12d31684f3d184ccfd39a8e031247287", "score": "0.62340325", "text": "public function getDashboard()\n {\n return view('admin.dashboard', [\n 'articles' => Article::count(),\n 'events' => Event::count(),\n 'eventsUpcoming' => Event::upcoming()->count(),\n 'forumCategories' => ForumCategory::count(),\n 'users' => User::count(),\n 'usersUnconfirmed' => User::unconfirmed()->count(),\n 'usersUnapproved' => User::unapproved()->count()\n ]);\n }", "title": "" }, { "docid": "66af5f68b267f1462b60ca5df19a4378", "score": "0.621777", "text": "public function statsAction() {\n $en = $this->getDoctrine()->getManager();\n $query = $en->createQuery('SELECT COUNT(a) FROM AppBundle\\Entity\\User a');\n $userCount =$query->getSingleScalarResult();\n $query = $en->createQuery('SELECT COUNT(a) FROM AppBundle\\Entity\\Event a');\n $eventCount =$query->getSingleScalarResult();\n $query = $en->createQuery('SELECT COUNT(a) FROM AppBundle\\Entity\\Pediatrician a');\n $pediatciciansCount =$query->getSingleScalarResult();\n $res = array(\n 'userCount' => $userCount,\n 'eventCount' => $eventCount,\n 'pediatciciansCount' => $pediatciciansCount\n );\n $normalizer = new ObjectNormalizer();\n\n $serializer = new Serializer([$normalizer]);\n $formatted = $serializer->normalize($res);\n return new JsonResponse($formatted);\n }", "title": "" }, { "docid": "37f87a511bd5fe003c35c1568fa3c09e", "score": "0.62167823", "text": "public function fetch_counts() {\n\t\t_deprecated_function( __METHOD__, 'WPSEO 12.5' );\n\t}", "title": "" }, { "docid": "d160f6b2d76d60018c65b7336ff12517", "score": "0.62146866", "text": "public function countStoreListings()\n {\n $request = new Request();\n $request->clearParams()\n ->setParam('show', 'store')\n ->setParam('user_id', $this->getData('id'));\n\n $listingsService = new Service\\Listings();\n $select = $listingsService->select(Service\\Listings::SELECT_LISTINGS, $request);\n\n $select->reset(Select::COLUMNS)\n ->reset(Select::ORDER);\n\n $select->columns(array('nb_rows' => new Expr('count(*)')));\n\n $stmt = $select->query();\n\n return (integer)$stmt->fetchColumn('nb_rows');\n }", "title": "" }, { "docid": "68817ec4f9d355f726ea986b89470a9b", "score": "0.6212265", "text": "function get_all_clientes_count()\n {\n $this->db->from('clientes');\n return $this->db->count_all_results();\n }", "title": "" } ]
162dea2a015e74e2e0756558863ac79f
Convert a string to camelCase format.
[ { "docid": "c8e96f50aa448335697e03922f9722d1", "score": "0.6914447", "text": "public function toCamel($string, $capitalise = true)\n {\n if ($capitalise) {\n $string = ucfirst($string);\n }\n\n return preg_replace_callback('/_([a-z])/', function ($char) {\n return strtoupper($char[1]);\n }, $string);\n }", "title": "" } ]
[ { "docid": "955bb94572e31efee5a2d8c1cf1e919f", "score": "0.8056098", "text": "public static function camelCase(string $string) : string\n\t{\n\t\treturn lcfirst(self::studlyCase($string));\n\t}", "title": "" }, { "docid": "3b93f3a4ccc2056f61d495869ee55dea", "score": "0.7974769", "text": "public static function toCamelCase($str) {\n\t\t$spaced = str_replace('-', ' ', $str);\n\t\t$capitalised = ucwords($spaced);\n\t\t$camelCaseStr = str_replace(' ', '', $capitalised);\n\t\t\n\t\treturn $camelCaseStr;\n\t}", "title": "" }, { "docid": "cc8c8062eaaf843aa271cb905c4c20e1", "score": "0.7972589", "text": "public static function camelCase($str)\n {\n return lcfirst(static::StudlyCase($str));\n }", "title": "" }, { "docid": "073212e64e4c21a891988123c116348e", "score": "0.7918843", "text": "function camelCase($string){\n\t\t\t\t\n\t\t\t\t $cc = new ligreFunctions();\n\t\t\t\t \t\t\t\t \n\t\t\t\t $stringCamel = $cc->noAccents(ucwords($string),get_bloginfo('charset'));\n\t\t\t\t $stringCamel = str_replace (\" \", \"\",$stringCamel);\n\t\t\t\t $noCan \t = array('?','!','_');\t\n\t\t\t\t $stringCamel = str_replace ($noCan,\"\",$stringCamel);\n\t\t\t\t \t\t\t\t\n\t\t\t\t return $stringCamel;\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "bf524d125b904ca4463a1700ed739a74", "score": "0.7735955", "text": "public static function camelCase($str)\n {\n if (isset(static::$camelCaseCache[$str])) {\n return static::$camelCaseCache[$str];\n }\n\n return static::$camelCaseCache[$str] = lcfirst(static::camelCaps($str));\n }", "title": "" }, { "docid": "72ed5dce730aa707d8bec7e008794662", "score": "0.7709897", "text": "protected static function underscoreToCamelCase($string) {\n \n // validate the provided names\n $invalid = preg_match('/[^a-z0-9_]/', $string);\n if ($invalid)\n throw new \\InvalidArgumentException(\"Only lowercase alphanumeric characters and an underscore are allowed in the underscore cased name.\");\n \n // split the string by words, divided by underscores\n preg_match_all('/([a-z0-9]+)_?/', $string, $matches);\n $words = $matches[1];\n\n // uppercase the words\n array_walk($words, function(&$word){\n $word = ucfirst($word);\n });\n\n // join words\n $camelCased = implode($words);\n\n return $camelCased;\n\n }", "title": "" }, { "docid": "8bae6ab1f00e81eaad9b6f06d95b833e", "score": "0.7660752", "text": "public static function LowerToCamel($str = '') {\n if ( empty($str) ) return $str;\n return str_replace(' ', '', ucwords(str_replace('_', ' ', $str)));\n }", "title": "" }, { "docid": "2e51410389ed6c16bb6d8c5bf1b6eb8e", "score": "0.76563823", "text": "function camel($string)\n {\n return lcfirst(\n preg_replace_callback('/([^\\_]+)_?/i', function ($match) {\n return ucfirst($match[1]);\n }, $string)\n );\n }", "title": "" }, { "docid": "3f49e8c6208a654b76b90b59612a4865", "score": "0.7639895", "text": "public static function camel($str) \r\n {\r\n $value = ucwords(str_replace(['-', '_'], ' ', $str));\r\n return lcfirst(str_replace(' ', '', $value));\r\n }", "title": "" }, { "docid": "ecc8de9e74414131029cb9d52190d850", "score": "0.7609383", "text": "function _toCamel($str) {\r\n if (!is_string($str)) return '';\r\n $func = create_function('$c', 'return strtoupper($c[1]);');\r\n return ucfirst(preg_replace_callback('/_([a-z])/', $func, $str));\r\n}", "title": "" }, { "docid": "5ef8d42d2b249415756c61b2b6143792", "score": "0.75895226", "text": "function toCamelCase($string)\n{\n return lcfirst(str_replace(' ', '', ucwords(preg_replace('/[_-]+/', ' ', $string))));\n}", "title": "" }, { "docid": "ac94e68fdcb9d1705873d41d50963df5", "score": "0.7534119", "text": "public function camelCase($string)\n\t{\n\t\t$string = $this->slug($string); // inscription_nouvel_utilisateur\n\t\t$string = str_replace('_', ' ', $string); // inscription nouvel utilisateur\n\t\t$string = ucwords($string); // Inscription Nouvel Utilisateur\n\t\treturn lcfirst(str_replace(' ', '', $string)); // InscriptionNouvelUtilisateur // inscriptionNouvelUtilisateur\n\t}", "title": "" }, { "docid": "34ead75261840cd15c3a03a0bbcd6f09", "score": "0.7519623", "text": "public static function cCase($str) {\n\t\treturn preg_replace_callback('/_([A-Za-z])/', function($matches) { return strtoupper($matches[1]); }, $str);\n\t}", "title": "" }, { "docid": "f7d775cc0dddb0bf886f660c588dac39", "score": "0.75082296", "text": "public static function toCamelCase($str)\n {\n return str_replace(\n ' ',\n '',\n ucwords(str_replace(array('-', '_'), ' ', $str))\n );\n }", "title": "" }, { "docid": "ab84475226ff2c220ceb085ce5d34956", "score": "0.7496032", "text": "public static function stringToCamelCase($string)\n {\n $string = self::stringToPascalCase($string);\n $string = lcfirst($string);\n return $string;\n }", "title": "" }, { "docid": "2186556250adf1f0f59b07d0e4e434b4", "score": "0.74663585", "text": "public static function dashToCamelCase($str)\n\t{\n\t\t$new_str = '';\n\t\t$str = strtolower($str);\n\n\t\t// Convert some-string to someController\n\t\t$do_upper = false;\n\t\tfor ($i = 0; $i < strlen($str); $i++) {\n\t\t\tif ($str[$i] == '-') {\n\t\t\t\t$do_upper = true;\n\t\t\t} elseif ($do_upper) {\n\t\t\t\t$new_str .= strtoupper($str[$i]);\n\t\t\t\t$do_upper = false;\n\t\t\t} else {\n\t\t\t\t$new_str .= $str[$i];\n\t\t\t}\n\t\t}\n\n\t\treturn $new_str;\n\t}", "title": "" }, { "docid": "6593771431a12e13f2f3ba2b4b509297", "score": "0.74614924", "text": "function to_camel_case($str) {\n $words = explode('_', strtolower($str));\n\n $return = '';\n foreach ($words as $word) {\n $return .= ucfirst(trim($word));\n }\n return $return;\n}", "title": "" }, { "docid": "7079191bc84700df4b89b495d316dc95", "score": "0.7448219", "text": "public static function toCamelCase($string)\n {\n return str_replace(\" \", \"\", ucwords(str_replace(\"_\", \" \", $string)));\n }", "title": "" }, { "docid": "32d96d585026c6423fd082428208795a", "score": "0.73963386", "text": "public static function fromCamelCase($str)\n {\n $str[0] = strtolower($str[0]);\n $func = create_function('$c', 'return \"_\" . strtolower($c[1]);');\n return preg_replace_callback('/([A-Z])/', $func, $str);\n }", "title": "" }, { "docid": "b8f5456ada6535d4bffedb50e5509fa9", "score": "0.7375558", "text": "private function dashesToCamelCase($string) \n {\n\n $str = lcfirst(str_replace('-', '', ucwords($string, '-')));\n\n return $str;\n }", "title": "" }, { "docid": "e92ff2d2180dfb056cf8daf2f0e8879d", "score": "0.7365267", "text": "private function stringToCamelCase(string $string): string\n {\n $str = str_replace('_', '', ucwords($string, '_'));\n\n return lcfirst($str);\n }", "title": "" }, { "docid": "78d2f12ae1543057d17d4a77ba607f44", "score": "0.736044", "text": "public static function toCamel($string)\r\n\t{\r\n\t\tif (empty($string) || !is_string($string)) {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t\t$camelString = '';\r\n\t\t$len = strlen($string);\r\n\t\tfor ($i = 0; $i < $len; $i++) {\r\n\t\t\t$char = $string[$i];\r\n\t\t\tif ($char == '_') {\r\n\t\t\t\t$toCamelFlag = true;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ($toCamelFlag === true) {\r\n\t\t\t\t$camelString .= ucfirst($char);\r\n\t\t\t\t$toCamelFlag = false;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ($i == 0) {\r\n\t\t\t\t$camelString .= lcfirst($char);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t$camelString .= $char;\r\n\t\t}\r\n\t\treturn $camelString;\r\n\t}", "title": "" }, { "docid": "6366e3368dfdde525da034d8f75b83fb", "score": "0.7350581", "text": "public static function snakeToCamel($str)\r\n {\r\n return parent::camelize($str);\r\n }", "title": "" }, { "docid": "f7f192721dfbbcf6f2df90b9a03b537a", "score": "0.73419964", "text": "protected function convertToCamelCase($string) {\n return lcfirst($this->convertToStudlyCaps($string));\n }", "title": "" }, { "docid": "38e5e84a1c08b868433510b36f605fbf", "score": "0.7324464", "text": "public static function convertToCamelCase($string) {\n\n $string = $string ?? \"\";\n\n // Grab all words first of all in a unicode supporting manner\n preg_match_all('/\\pL+/u', $string, $allWords);\n\n $newString = \"\";\n foreach ($allWords[0] as $index => $word) {\n $newString .= ($index == 0 ? lcfirst($word) : ucfirst($word));\n }\n\n return $newString;\n\n }", "title": "" }, { "docid": "ac2a3040285344dfec60db9e38493928", "score": "0.7281887", "text": "public static function camelCase($string, $additionalWhitespace = array('-', '_')) {\n\t\treturn preg_replace('/\\s/', '', ucwords(str_replace($additionalWhitespace, ' ', $string)));\n\t}", "title": "" }, { "docid": "8102bee1f5b8be88f14f50adf3cfea27", "score": "0.7273971", "text": "public static function camelCaseProperties(string $string)\n {\n return lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $string))));\n }", "title": "" }, { "docid": "f0e83953e5c5b9023f02fe22e05c5ab1", "score": "0.72733057", "text": "public static function convertFromCamelCase($string) {\n\n $string = preg_replace_callback('/(^|\\W)([a-zA-Z].*?)($|\\W)/', function ($matches) {\n\n $splitCase = preg_split(\"/([A-Z0-9_]+)/\", ucfirst($matches[2]), -1, PREG_SPLIT_DELIM_CAPTURE);\n\n $replacedString = \"\";\n foreach ($splitCase as $index => $item) {\n if (($index + 1) % 2 == 0) {\n $replacedString .= \" \";\n }\n if ($item !== \"_\")\n $replacedString .= (($splitCase[$index - 1] ?? \"\") == \"_\") ? ucfirst($item) : $item;\n }\n\n return $matches[1] . trim($replacedString) . $matches[3];\n\n }, $string);\n\n\n return $string;\n\n }", "title": "" }, { "docid": "4676e0cfa28271ad427d69a5fb682b2f", "score": "0.7261404", "text": "public static function camelCaseToDash($string){\n\n $string = preg_replace('/([A-Z]+)([A-Z])/', '$1-$2', $string);\n $string = preg_replace('/([a-z])([A-Z])/', '$1-$2', $string);\n return strtolower($string);\n }", "title": "" }, { "docid": "f599fb74792111816628bb0cf1fac4cc", "score": "0.7256133", "text": "public function urlToCamel($str)\r\n {\r\n $camel = str_replace(' ', '', lcfirst(ucwords(str_replace('-', ' ', str_replace('\\\\', ' ', str_replace('/', ' ', $str))))));\r\n\r\n return $camel;\r\n\r\n }", "title": "" }, { "docid": "e7b337d3cdfa09de3286fa36002aac1b", "score": "0.72088534", "text": "protected function convertToCamelCase($string)\n {\n return lcfirst($this->convertToStudlyCaps($string));\n }", "title": "" }, { "docid": "e7b337d3cdfa09de3286fa36002aac1b", "score": "0.72088534", "text": "protected function convertToCamelCase($string)\n {\n return lcfirst($this->convertToStudlyCaps($string));\n }", "title": "" }, { "docid": "e7b337d3cdfa09de3286fa36002aac1b", "score": "0.72088534", "text": "protected function convertToCamelCase($string)\n {\n return lcfirst($this->convertToStudlyCaps($string));\n }", "title": "" }, { "docid": "ba412fd50cbfa3cc90e3f95f926b1388", "score": "0.72071195", "text": "protected static function underscoreToCamelCase($string)\n {\n return \\str_replace(' ', '', \\ucwords(\\strtolower(\\str_replace(['_', '-'], ' ', $string))));\n }", "title": "" }, { "docid": "326d49074d27d6681db49660c1089816", "score": "0.7205848", "text": "public function underscoreToCamelCase($string)\n {\n $filter = new UnderscoreToCamelCase();\n return $filter->filter($string);\n }", "title": "" }, { "docid": "482654137fd7b8e2eebdc3e91d76b048", "score": "0.720042", "text": "protected static function convertToCamelCase(string $str): string\n {\n $callback = function ($match): string {\n return strtoupper($match[2]);\n };\n\n $replaced = preg_replace_callback('/(^|_)([a-z])/', $callback, $str);\n\n if (null === $replaced) {\n throw new RuntimeException(sprintf('preg_replace_callback error: %s', preg_last_error_msg()));\n }\n\n return lcfirst($replaced);\n }", "title": "" }, { "docid": "1ee298540df0362ab5ed927e0cdd6a35", "score": "0.71775335", "text": "private function toCamelCase($snakeCaseString)\n {\n $camelCase = preg_replace_callback(\n '/_([^_])/',\n function (array $m) {\n return ucfirst($m[1]);\n },\n $snakeCaseString\n );\n\n return ucfirst($camelCase);\n }", "title": "" }, { "docid": "dd8570836ce005bb7cc82029d9ecc770", "score": "0.7153767", "text": "protected function dashesToCamelCase($string)\n {\n $str = str_replace('_', '', ucwords($string, '_'));\n return $str;\n }", "title": "" }, { "docid": "6935a1ec674675f31c9d6d3474bb5a38", "score": "0.7141931", "text": "private function convertToCamelCase($originalString)\n {\n $originalString = ucwords($originalString);\n $originalString = str_replace(\" \", \"\", $originalString);\n $camelCaseString = lcfirst($originalString);\n return $camelCaseString;\n }", "title": "" }, { "docid": "5ab20201cef11cdd7b848b4695ccc184", "score": "0.71397805", "text": "function camelTo_($str) {\r\n if (!is_string($str) || empty($str)) return '';\r\n $str[0] = strtolower($str[0]);\r\n $func = create_function('$c', 'return \"_\" . strtolower($c[1]);');\r\n return preg_replace_callback('/([A-Z])/', $func, $str);\r\n}", "title": "" }, { "docid": "3c14db8a0b26bf70c502b45935faa659", "score": "0.7136688", "text": "function changeToCamel($string) {\n $res = \"\";\n $arr = explode(\"_\", $string);\n for($i = 0; $i < count($arr); $i++) {\n if($i == 0) {\n $res .= $arr[$i];\n } else {\n $res .= ucfirst($arr[$i]);\n }\n }\n return $res;\n}", "title": "" }, { "docid": "82c8c4ec36080c92b210ce3325ad17bd", "score": "0.7129886", "text": "function toCamelCase($str)\n{\n if (preg_match('/^_/', $str)) {\n return $str;\n }\n\n $str = str_replace(\n '_',\n '',\n ucwords(strtolower($str),'_')\n );\n $str = lcfirst($str);\n\n return $str;\n}", "title": "" }, { "docid": "e6b68fcbe6f93c6c2022e1902c8e8600", "score": "0.71266186", "text": "protected static function camelize($string)\n {\n $string = str_replace(' ', '', ucwords(str_replace(array('-', '_'), ' ', $string)));\n\n return lcfirst($string);\n }", "title": "" }, { "docid": "ea8b69f60fdfa20585a1630a687cd8fd", "score": "0.7124816", "text": "function camelCaseToUpperCaseSpaces($str) {\n\t$ccWord = $str;\n\t$re = '/(?#! splitCamelCase Rev:20140412)\n\t # Split camelCase \"words\". Two global alternatives. Either g1of2:\n\t (?<=[a-z]) # Position is after a lowercase,\n\t (?=[A-Z]) # and before an uppercase letter.\n\t | (?<=[A-Z]) # Or g2of2; Position is after uppercase,\n\t (?=[A-Z][a-z]) # and before upper-then-lower case.\n\t /x';\n\t$arr = preg_split($re, $ccWord);\n\t$formattedString = \"\";\n\tfor ($j = 0; $j < count($arr); ++$j) {\n\t\t$formattedString = ($formattedString.(ucwords($arr[$j]))).(\" \");\n\t}\n\treturn $formattedString;\n}", "title": "" }, { "docid": "6804379234df9d2158fca333f4a466a4", "score": "0.7123821", "text": "function camelCaseToDash($s) {\n return strtolower(preg_replace('/([^A-Z])([A-Z])/', \"$1-$2\", $s)); \n}", "title": "" }, { "docid": "eb2cc8f3a7bda6b617c97c94a90a2052", "score": "0.71230644", "text": "function camelCase($s, $initalCap = true) {\n if(strpos($s, '_') !== FALSE) {\n // is foo_bar style\n $parts = explode('_', $s);\n } else if(strpos($s, ' ') !== FALSE) {\n // is \"foo bar\" style\n $parts = explode(' ', $s);\n } else if (preg_match(\"/^[A-Z]+[a-z]+/\", $s)) {\n // if already camel cased with initalCap\n if($initalCap) return $s;\n return lowerCase(substr($s, 0, 1)) . substr($s, 1);\n } else if(preg_match(\"/^[a-z][a-z]+[A-Z]/\", $s)) {\n // camel cased with no initalCap\n if(!$initalCap) return $s;\n return upperCase(substr($s, 0, 1)) . substr($s, 1);\n } else {\n // default (single lowercase word)\n $parts = array($s);\n }\n\n foreach ($parts as $index => $value) {\n if(!$initalCap and $index===0) {\n $parts[$index] = lowerCase($value);\n } else {\n $parts[$index] = titleCase($value);\n }\n }\n\n return implode('', $parts);\n}", "title": "" }, { "docid": "7e2da398a18835dfd0b181fc1fd4f479", "score": "0.7120754", "text": "function camelize($s) {\n $s = preg_replace('/[_-]+/', '_', trim($s));\n $s = str_replace(' ', '_', $s);\n\n $camelized = '';\n\n for ($i = 0, $n = strlen($s); $i < $n; ++$i) {\n if ($s[$i] == '_' && $i + 1 < $n)\n $camelized .= strtoupper($s[++$i]);\n else\n $camelized .= $s[$i];\n }\n\n $camelized = trim($camelized, ' _');\n\n if (strlen($camelized) > 0)\n $camelized[0] = strtolower($camelized[0]);\n\n return $camelized;\n}", "title": "" }, { "docid": "20796973a804acae31370e53fbc4d266", "score": "0.71007353", "text": "public static function underscore_to_camel_case( $string ) {\r\n // Split string in words.\r\n $words = explode( '_', strtolower( $string ) );\r\n\r\n $return = '';\r\n\r\n foreach ( $words as $word ) {\r\n $word = trim( $word );\r\n\r\n if ( !empty( $return ) )\r\n $word = ucfirst( $word );\r\n\r\n $return .= $word;\r\n }\r\n\r\n return $return;\r\n }", "title": "" }, { "docid": "da1aa0c1975c61fb7dbbfb84756156ce", "score": "0.7096804", "text": "private function camelize($string)\n {\n return str_replace(' ', '', ucwords(str_replace('_', ' ', $string)));\n }", "title": "" }, { "docid": "46090c78255bfd8f87a8365624021516", "score": "0.70917535", "text": "function convert_to_camel_case($input, $pascal_case = false) {\n\t\t$ret = str_replace(' ', '', ucwords(str_replace('_', ' ', $input)));\n\n\t\tif (!$pascal_case) {\n\t\t\t$ret = strtolower(substr($ret,0,1)) . substr($ret,1);\n\t\t}\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "4daa9c2359a0c4a395d917884c5d07ac", "score": "0.70833534", "text": "public function standardToCamelCase($text){\n\t\treturn str_replace(\" \", \"\", ucwords(strtolower(str_replace(\"_\", \" \", $text))));\n\t}", "title": "" }, { "docid": "3a221663ebbba5aebc68549361cde1ea", "score": "0.70822674", "text": "private function toCamelCase(string $string)\n {\n // Going to lowercase\n $result = strtolower($string);\n\n // Collecting matches (_ followed by letter)\n preg_match_all('/_[a-z]/', $result, $matches);\n\n // Switching Match to uppercase without _\n foreach ($matches[0] as $match) {\n $c = str_replace('_', '', strtoupper($match));\n $result = str_replace($match, $c, $result);\n }\n\n // Returning result\n return $result;\n }", "title": "" }, { "docid": "5663b1174fd35b52587760bc79621ab1", "score": "0.70670617", "text": "public static function toCamelCase($str, $capitalise_first_char = false)\n {\n if ($capitalise_first_char) {\n $str[0] = strtoupper($str[0]);\n }\n $func = create_function('$c', 'return strtoupper($c[1]);');\n return preg_replace_callback('/_([a-z])/', $func, $str);\n }", "title": "" }, { "docid": "d11904eaa30a08697fd5919ff60de5eb", "score": "0.70668083", "text": "public static function camelize($string) {\r\n\r\n return implode(array_map('ucfirst', explode('_', $string)));\r\n\r\n }", "title": "" }, { "docid": "278583489a5f63a89cca75a745b7404e", "score": "0.70618886", "text": "static public function lowerCamel(string $string): string\r\n {\r\n $output = self::upperCamel($string);\r\n return lcfirst($output);\r\n }", "title": "" }, { "docid": "178cc31496d61bf01e04fb5ca772090e", "score": "0.70607", "text": "public static function underscoreToCamelCase($str)\n\t{\n\t\treturn self::dashToCamelCase(str_replace('_', '-', $str));\n\t}", "title": "" }, { "docid": "0fe6db93022b33a9d0a1adc0e341128c", "score": "0.70564616", "text": "static function camelize($str)\n\t{\n\t\treturn str_replace(' ', '', ucwords(str_replace('_', ' ', $str)));\n\t}", "title": "" }, { "docid": "2f61fa194670fbf75284070feafe6486", "score": "0.7049004", "text": "private function camelize(string $string) : string\n {\n return preg_replace_callback('/(^|_|\\.)+(.)/', function ($match) {\n return ('.' === $match[1] ? '_' : '').strtoupper($match[2]);\n }, $string);\n }", "title": "" }, { "docid": "c985ac7b3b16e0662b5bd59e8c66fb29", "score": "0.70455724", "text": "public function camel(): Str\n {\n return static::make(\n lcfirst($this->studly()->value())\n );\n }", "title": "" }, { "docid": "ce88138f0f4a1f9a9ef983bc9e8c6088", "score": "0.7036941", "text": "function createCamel( $string = null )\n\t{\n\t\t//reasons to fail\n\t\tif (is_null($string)) return false;\n\t\t\n\t\t$string = ereg_replace(\"[^A-Za-z0-9 _]\", '', $string);\n\t\n\t\t\n\t\treturn str_replace(\" \",\"\", ucwords(strtolower(str_replace(\"_\", \" \", $string))));\n\t}", "title": "" }, { "docid": "35b0c0e75ef32db1c98ea088e3421a00", "score": "0.7036086", "text": "function underscoreToCamelCase($str) {\n $parts = explode('_', $this->real_field);\n foreach ($parts as &$part) {\n $part = ucfirst($part);\n }\n return lcfirst(join(\"\", $parts));\n }", "title": "" }, { "docid": "9702a9c0ce27657099a549a967d4a41f", "score": "0.7025902", "text": "public function camelCaseToStandard($text){\n\t\treturn strtolower(preg_replace('/\\p{Lu}/u', '_\\0', $text));\n\t}", "title": "" }, { "docid": "a1efad456d35946e9bff8e569a8bca21", "score": "0.70244145", "text": "protected function snakeToCamel(string $input): string\n {\n return lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $input))));\n }", "title": "" }, { "docid": "b1f5f26504b1201b0effda7575fb3715", "score": "0.7021256", "text": "public static function camelize($string)\n {\n return str_replace(' ','',ucwords(str_replace('_',' ', $string)));\n }", "title": "" }, { "docid": "bbdcc23a25bc9e4b685102430af47191", "score": "0.70126885", "text": "protected function camelcase($string)\n {\n $sentence = preg_replace('/[\\W_]+/', ' ', $string);\n return lcfirst(str_replace(' ', '', ucwords($sentence)));\n }", "title": "" }, { "docid": "e89439a655d988d09e9c7083a4ce89b8", "score": "0.7005811", "text": "private function lowerCamelcase($string)\n\t{\n // -- User for php 5.6 -> 7 --\n return preg_replace_callback(\n '/-(.?)/',\n function($match) { return strtoupper($match[1]); },\n $string\n );\n\t}", "title": "" }, { "docid": "1bd8abca4e5031c7498767bd75892bb2", "score": "0.7002464", "text": "public static function camelCaps($str)\n {\n if (isset(static::$camelCapsCache[$str])) {\n return static::$camelCapsCache[$str];\n }\n\n $text = static::normalize($str);\n $text = preg_replace('/((?<=\\s)?[A-Z])/', ' $1', $text);\n $text = preg_replace('/[\\s]+/', ' ', $text);\n $text = trim($text);\n $text = static::slug($text);\n $text = str_replace('-', ' ', $text);\n $text = ucwords($text);\n\n return static::$camelCapsCache[$str] = str_replace(' ', '', $text);\n }", "title": "" }, { "docid": "ab5bc3bbd1b6f8e89b2a52ddd7177f69", "score": "0.6991639", "text": "static public function upperCamel(string $string): string\r\n {\r\n $string = str_replace(' ', '_', $string);\r\n $parts = explode('_', $string);\r\n foreach ($parts as $part) {\r\n $output .= ucfirst($part);\r\n }\r\n return $output;\r\n }", "title": "" }, { "docid": "51ac2538e2a69ea08cb61af07dd004a1", "score": "0.6987094", "text": "public static function snakeToLowerCamel($str)\r\n {\r\n $str = static::snakeToCamel($str);\r\n return strtolower($str[0]) . substr($str, 1);\r\n }", "title": "" }, { "docid": "88cbd071f348740ffecf81719cbe48fc", "score": "0.69822437", "text": "function string_to_camel($text, array $noStrip = array())\n{\n $str = preg_replace('/[^a-z0-9' . implode(\"\", $noStrip) . ']+/i', ' ', $text);\n $str = trim($str);\n // uppercase the first character of each word\n $str = ucwords($str);\n $str = str_replace(\" \", \"\", $str);\n $str = lcfirst($str);\n\n return $str;\n}", "title": "" }, { "docid": "2e02c2e9409bf3cc8b5cd980692ec954", "score": "0.6980261", "text": "public static function CamelCaseToLower($str = '') {\n if ( empty($str) ) return $str;\n return strtolower(implode('_', array_filter(preg_split('/([A-Z][a-z]*)/', $str, -1, PREG_SPLIT_DELIM_CAPTURE))));\n }", "title": "" }, { "docid": "c0bcc990f1f19c10cec3fde7df337327", "score": "0.6978937", "text": "public static function camelize(string $input): string\n {\n $output = '';\n $segments = explode('-', $input);\n foreach ($segments as $segment) {\n $output .= ucfirst(strtolower($segment));\n }\n return $output;\n }", "title": "" }, { "docid": "fcfad7308551a765ecb6b3ffa9ae2418", "score": "0.695948", "text": "private function convertToCamelCase($string) {\n\t\twhile(($position = strpos($string, '_')) !== false) {\n\t\t\t$letter = substr($string, $position + 1, 1);\n\t\t\t$letter = strtoupper($letter);\n\n\t\t\t$string = substr_replace($string, $letter, $position, 2);\n\t\t}\n\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "d42b1d3b574ca1dfac6bab7800c49982", "score": "0.6957762", "text": "public static function getCamelCase($str, $capitalise_first_char = false) {\n if ($capitalise_first_char) {\n $str[0] = strtoupper($str[0]);\n }\n\n return preg_replace_callback('/_([a-z])/', function ($c)\n {\n return strtoupper($c[1]);\n }, $str);\n }", "title": "" }, { "docid": "e60db0ea34a3085db85a3f52464dc462", "score": "0.69567716", "text": "protected function camelize($str)\n {\n return lcfirst(implode('', array_map('ucfirst', explode('_', $str))));\n }", "title": "" }, { "docid": "a9bb97aa4c012a72062fd1055fba5535", "score": "0.6955215", "text": "function capitalize($str)\r\n\t{\r\n\t\treturn mb_convert_case($str, MB_CASE_TITLE, get_bloginfo('charset'));\r\n\t}", "title": "" }, { "docid": "70392f01c549a7f22c0ff951da805d05", "score": "0.69416845", "text": "public function underscores_to_camelcase( $string, $capitalize_first_char = false ) {\n\t\t$str = str_replace( ' ', '', ucwords( str_replace( '_', ' ', $string ) ) );\n\n\t\tif ( ! $capitalize_first_char ) {\n\t\t\t$str[0] = strtolower( $str[0] );\n\t\t}\n\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "f514a2607f1cbbe127e4524701bed598", "score": "0.69311965", "text": "function underscore_to_camel_case( $string, $capitalizeFirstCharacter = false ) {\n\n\t\t$str = str_replace( ' ', '', ucwords( str_replace( '_', ' ', $string ) ) );\n\n\t\tif ( ! $capitalizeFirstCharacter ) {\n\t\t\t$str[0] = strtolower( $str[0] );\n\t\t}\n\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "b3e81dc5a30b6ce954b9134f9e4fbd6b", "score": "0.69075733", "text": "public static function toCamelCase( $string, $delimiter = '\\\\s' )\n\t{\n\t\tif ( $delimiter == '-' || $delimiter == '_' || $delimiter == ' ' ) {\n\t\t\t$delimiter = '\\\\' . $delimiter;\n\t\t}\n\t\t$camelCase = strtolower($string);\n\t\t$camelCase = preg_replace('/(' . $delimiter . '[a-z])/', strtoupper('\\\\1'), $string);\n\t\treturn $camelCase;\n\t}", "title": "" }, { "docid": "a127d73c0371956a7eab36065a4ffc17", "score": "0.68976974", "text": "function dashToCamelCase($s, $ucfirst = true) {\n $s = preg_replace('/-(.?)/e', \"strtoupper('$1')\", $s);\n if ($ucfirst) {\n return ucfirst($s);\n }\n return $s;\n}", "title": "" }, { "docid": "579ac0db651f727ebeffde2ef15e3426", "score": "0.6894214", "text": "function hyphensToCamel($value){\n return preg_replace(\"/\\-(.)/e\", \"strtoupper('\\\\1')\", $value);\n}", "title": "" }, { "docid": "c7d129e2438ba290e2e847168e39f53c", "score": "0.6891823", "text": "public static function camelCase($value = '')\n {\n $result = static::cache(__FUNCTION__, $value);\n if (!$result) {\n $newValue = ucwords(str_replace('_', ' ', $value));\n $result = str_replace(' ', '', strtolower($newValue[0]) . substr($newValue, 1));\n static::cache(__FUNCTION__, $value, $result);\n }\n return $result;\n }", "title": "" }, { "docid": "1648f0652b3ed90c574e05f456e7a2b8", "score": "0.6886873", "text": "protected function underscoreToCamelCase($str)\n {\n $func = function ($c) {\n return strtoupper($c[1]);\n };\n\n return preg_replace_callback('/_([a-zA-Z])/', $func, $str);\n }", "title": "" }, { "docid": "e62564e48242c4aa535041342085f461", "score": "0.6862957", "text": "public static function camelCaseToDash($str)\n\t{\n\t\treturn strtolower(preg_replace('#([a-z0-9])([A-Z])#', '$1-$2', $str));\n\t}", "title": "" }, { "docid": "02cfea4617756dba38ff2d15b0efaedc", "score": "0.68610656", "text": "function camelize($string) {\n\n}", "title": "" }, { "docid": "b6486e62f4356067d429ad974badd984", "score": "0.6846777", "text": "public function getCamelCase($string, $ucFirst = true);", "title": "" }, { "docid": "8deebd5eb1177f171881e93965167ace", "score": "0.6846154", "text": "public static function camel($value)\n {\n if (isset(static::$camelCache[$value])) {\n return static::$camelCache[$value];\n }\n\n $value = ucwords(str_replace([ '-', '_' ], ' ', $value));\n $value = str_replace(' ', '', $value);\n $value = lcfirst($value);\n\n static::$camelCache[$value] = $value;\n return $value;\n }", "title": "" }, { "docid": "2d144583956a5da70cb93d750b0fcf99", "score": "0.6839725", "text": "public static function Camelize($str)\n {\n return str_replace(' ', '', ucwords(str_replace('_', ' ', $str)));\n }", "title": "" }, { "docid": "77ca23175679194697e9ce5e5e991e02", "score": "0.6836508", "text": "public static function toClassCase($string) {\n return str_replace(' ', '', ucwords(str_replace('_', ' ', trim($string))));\n }", "title": "" }, { "docid": "c0aecdbec84129cfa83a277a5b984bc2", "score": "0.6831953", "text": "public function provideStringToCamelCase()\n {\n yield [\n 'lorem ipsum',\n ' ',\n 'loremIpsum',\n ];\n\n yield [\n 'Lorem ipSum Dolor',\n ' ',\n 'loremIpsumDolor',\n ];\n\n yield [\n 'abc;def;ghi',\n ';',\n 'abcDefGhi',\n ];\n }", "title": "" }, { "docid": "58d4e2d1c54cb4e0c08b00fbc91754e9", "score": "0.681031", "text": "public function camelCase($str, array $noStrip = [])\n {\n $str = preg_replace('/[^a-z0-9' . implode(\"\", $noStrip) . ']+/i', ' ', $str);\n $str = trim($str);\n // uppercase the first character of each word\n $str = ucwords($str);\n $str = str_replace(\" \", \"\", $str);\n $str = lcfirst($str);\n\n return $str;\n }", "title": "" }, { "docid": "0cf0c46091ff76fe2d7f75ec331d1237", "score": "0.68093497", "text": "public static function camelCase2Dashed(string $string): string\n {\n return strtolower(preg_replace('/([a-zA-Z])(?=[A-Z])/', '$1-', $string));\n }", "title": "" }, { "docid": "d49ec348f024a6cc7ab0a23f2bdd597f", "score": "0.6803184", "text": "protected static function camelCaseToUnderscore($string) {\n \n // validate the provided name\n $invalid = preg_match('/[^A-Za-z0-9]/', $string);\n if ($invalid)\n throw new \\InvalidArgumentException(\"Only alphanumeric characters are allowed in the camel cased name.\");\n\n // split the string by words, each one starting with an upper case letter\n preg_match_all('/([A-Z][a-z]*)|([0-9]+)/', $string, $matches);\n $words = $matches[0];\n\n // lowercase the words\n array_walk($words, function(&$word){\n $word = lcfirst($word);\n });\n\n // join words with underscores\n $underscoreCased = implode('_', $words);\n\n return $underscoreCased;\n\n }", "title": "" }, { "docid": "5e667b6cb5d199aa3e612b8402c75e07", "score": "0.68011606", "text": "private static function getCamelCaseName($name) {\n return str_replace(\n ' ', '', ucwords(str_replace(array('_', '-'), ' ', $name))\n );\n }", "title": "" }, { "docid": "926f7636bec42b71d62d82d8b76ed285", "score": "0.67936003", "text": "public function attributeNameToCamelCase(string $attribute): string\n {\n $words = explode('_', $attribute);\n\n foreach ($words as $key => $word) {\n $words[$key] = ucfirst($word);\n }\n\n return implode('', $words);\n }", "title": "" }, { "docid": "8938c8855f0c8e8f6cab8c38e11f0658", "score": "0.67915213", "text": "function camel_case($value)\n {\n return Str::camel($value);\n }", "title": "" }, { "docid": "1a9f5ef5aa6398923f9b7223830b7245", "score": "0.678106", "text": "function camelcase2lowercase($string) {\n $regexp = '/(?P<upper>[A-Z])/';\n preg_match_all($regexp, $string, $matches, PREG_OFFSET_CAPTURE);\n $index_mod = 0;\n foreach ($matches['upper'] as $match) {\n $upper = $match[0];\n $pos = $match[1] + $index_mod;\n $length = strlen($upper);\n $upper_replace = $pos == 0 ? $upper : '_' . strtolower($upper);\n $string = substr_replace($string, $upper_replace, $pos, $length);\n $index_mod++;\n }\n\n return strtolower($string);\n}", "title": "" }, { "docid": "6e12e6265ffc7bed7191b3f263bc8d98", "score": "0.676508", "text": "public static function camel_case_to_underscore( $string ) {\r\n return strtolower( preg_replace( '/([a-z])([A-Z])/', \"$1_$2\", preg_replace( '/^[a-z]+([A-Z])/', \"$1\", $string ) ) );\r\n }", "title": "" }, { "docid": "bdc79008a8b2d46bcfb0dcf521cc7516", "score": "0.6763991", "text": "protected function camelToLowerDash($string)\n {\n return\n preg_replace_callback(\n '/(^|[a-z])([A-Z])/',\n function($m){\n return strtolower(strlen($m[1]) ? sprintf('%s-%s', $m[1], $m[2]) : $m[2]);\n },\n $string\n );\n }", "title": "" }, { "docid": "19cae9358ac71f1bb39f602448a64996", "score": "0.67613626", "text": "private static function camelCase($str, array $noStrip = [])\n {\n $str = preg_replace('/[^a-z0-9' . implode(\"\", $noStrip) . ']+/i', ' ', $str);\n $str = trim($str);\n // uppercase the first character of each word\n $str = ucwords($str);\n $str = str_replace(\" \", \"\", $str);\n $str = lcfirst($str);\n\n return $str;\n }", "title": "" } ]
c8aba74a1eea7028858c6e57e8f8115f
Creates a form to edit a Ticket entity.
[ { "docid": "83a21cb72fc245b8f72aed7ddcadead7", "score": "0.80415773", "text": "private function createEditForm(Ticket $entity)\n {\n $form = $this->createForm(new TicketType(), $entity, array(\n 'action' => $this->generateUrl('ticket_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'context' => $this->get('security.context')\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" } ]
[ { "docid": "9deaf4a4472875373c991b99b890a1b5", "score": "0.74620295", "text": "protected function editAction()\n {\n $this->editAction\n ->setAccess($this, Access::CAN_EDIT)\n ->setOwnerAccess($this)\n ->execute($this, TicketEntity::class, TicketActionEvent::class, NULL, __METHOD__)\n ->render()\n ->with(\n [\n ]\n )\n ->form($this->ticketForm)\n ->end();\n }", "title": "" }, { "docid": "34b26db9a35e03017d85829b7f57be4f", "score": "0.7308607", "text": "public function edit(Ticket $ticket)\n {\n //\n }", "title": "" }, { "docid": "34b26db9a35e03017d85829b7f57be4f", "score": "0.7308607", "text": "public function edit(Ticket $ticket)\n {\n //\n }", "title": "" }, { "docid": "34b26db9a35e03017d85829b7f57be4f", "score": "0.7308607", "text": "public function edit(Ticket $ticket)\n {\n //\n }", "title": "" }, { "docid": "34b26db9a35e03017d85829b7f57be4f", "score": "0.7308607", "text": "public function edit(Ticket $ticket)\n {\n //\n }", "title": "" }, { "docid": "fe7dbf3f9b7269805f3a19808cc35d6c", "score": "0.7222534", "text": "public function edit(Ticket $ticket)\n {\n return view('clients.tickets.create_edit', compact('ticket'));\n }", "title": "" }, { "docid": "7b282e3c9962c86d0c9e7c8879d85490", "score": "0.715069", "text": "public function edit(Ticket $ticket)\n {\n return view('admin.tickets.create')->with('ticket',$ticket)->with('airlines',Airline::all())->with('flightticketscategories',FlightTicketsCategory::all());\n }", "title": "" }, { "docid": "994abbd19ad6d79dc7f7a7cfa8a63937", "score": "0.7018121", "text": "private function createEditForm(Actor $entity)\n\t{\n\t\t$form = $this->createForm(new ActorType(), $entity );\n\n\t\t$form->add('submit', 'submit', array('label' => 'Update'));\n\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "de4ae9a2ccb7b997ec940093fb269e5d", "score": "0.6966529", "text": "private function createEditForm(Facture $entity) {\n $form = $this->createForm(new FactureType(), $entity, array(\n 'action' => $this->generateUrl('com_facture_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "7ceeacf4f72594e15befda452a9ea029", "score": "0.6888326", "text": "public function create()\n {\n return view('ticket.create_edit');\n }", "title": "" }, { "docid": "38f0d3fcac05a3d54336e0a04a1445d5", "score": "0.6879639", "text": "private function createEditForm(Entry $entity)\n {\n $form = $this->createForm(new GuestbookType(), $entity, array(\n 'action' => $this->generateUrl('guestbook_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "324c5f2922a1bba3cfe6df707abd2b71", "score": "0.6859121", "text": "private function createCreateForm(Ticket $entity)\r\n {\r\n $form = $this->createForm(new TicketType(), $entity, array(\r\n 'action' => $this->generateUrl('ticket_create'),\r\n 'method' => 'POST',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => 'Envoyer'));\r\n\r\n return $form;\r\n }", "title": "" }, { "docid": "5af11a3d3d7405907759b2cd32808bbf", "score": "0.68101615", "text": "private function createEditForm(Depot $entity) {\n $form = $this->createForm(new DepotType(), $entity, array(\n 'action' => $this->generateUrl('depot_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n //--\n $form->add('submit', 'submit', array('label' => 'Modifier', 'attr' => array('class' => 'btn-primary span2 offset5')));\n //--\n return $form;\n }", "title": "" }, { "docid": "19116ee0e044f628c2db4a55cb5996cd", "score": "0.6735117", "text": "public function edit(Ticket $ticket)\n {\n return view('ticket.edit', compact('ticket'));\n }", "title": "" }, { "docid": "1398e41abea43d2c8cd3c88199c0b346", "score": "0.67317384", "text": "public function create()\n {\n return view('tickets.create_edit');\n }", "title": "" }, { "docid": "2cb26fd10aabdc7bd471332cbbd9afd0", "score": "0.6705725", "text": "private function createEditForm(Action $entity, $espace_id=null) {\r\n \t$form = $this->createCreateForm($entity, 'Action', array('attr'=>array('espace_id'=>$espace_id),\r\n \t\t\t'action' => $this->generateUrl('modifier_action', array('id' => $entity->getId())), 'method' => 'PUT'));\r\n $form->add('submit', 'submit', array('label' => 'Update'));\r\n return $form;\r\n }", "title": "" }, { "docid": "19c3e766ae7ac0bd9dd9d29a92e2b685", "score": "0.6701764", "text": "private function createEditForm(Etude $entity)\n {\n\t\t$this->securityControle();\n $form = $this->createForm(new EtudeType(), $entity, array(\n 'action' => $this->generateUrl('etude_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Valider'));\n\n return $form;\n }", "title": "" }, { "docid": "84267b1aa28e4aeae06aa1014f3e5a92", "score": "0.6699252", "text": "private function createEditForm(Employee $entity)\n {\n $form = $this->createForm(new EmployeeType($this->getDoctrine()->getManager(), 'edit'), $entity, array(\n 'action' => $this->generateUrl('employee_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "fbbf0bc73fe9b59d94bc8ee0610dc31b", "score": "0.668673", "text": "public function editTicketAction($id)\n {\n $repo = $this->getRepository();\n /** @var Netizen */\n $netizen = $repo->findByPk($id);\n $ticket = $netizen->getLastTicket();\n\n $form = $this->createForm(new TicketType(), $ticket);\n\n $form->handleRequest($this->getRequest());\n if ($form->isValid()) {\n try {\n $repo->persist($netizen);\n $this->pushFlash('notice', 'Expiration date of the last ticket successfully edited');\n\n // return to the same page\n return $this->redirectRouteOk('admin_netizen_show', ['id' => $netizen->getId()]);\n } catch (MongoException $e) {\n $this->pushFlash('warning', 'Cannot edit ticket');\n }\n }\n\n return $this->render('TrismegisteSocialBundle:Admin:Netizen/edit.html.twig', [\n 'form' => $form->createView()\n ]);\n }", "title": "" }, { "docid": "9bb2a8a79359b156d52f2f2caf40db56", "score": "0.66817343", "text": "private function createEditForm(Absence $entity) {\n $form = $this->createForm(new AbsenceType(), $entity, array(\n 'action' => $this->generateUrl('absence_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Update'));\n $form->add('submit', 'submit', array('label' => 'Enregistrer', 'attr'=>array('class'=>' btn btn-primary text-center col-md-offset-4 col-sm-2')));\n\n return $form;\n }", "title": "" }, { "docid": "0909e258ecbe1c034651de5fbc57b3e8", "score": "0.6680911", "text": "public function edit(Ticket_empresa $ticket_empresa)\n {\n //\n }", "title": "" }, { "docid": "02b9b780c493c42446b96d0426e23bf9", "score": "0.66785437", "text": "public function editTicketAction($id_ticket) {\n $em = $this->getDoctrine()->getEntityManager();\n $request = $this->getRequest();\n\n $ticket = $em->getRepository('TicketBundle:Ticket')->find($id_ticket);\n $car = $ticket->getCar();\n\n $form = $this->createForm(new TicketType(), $ticket);\n $formC = $this->createForm(new CarType(), $car);\n\n if ($request->getMethod() == 'POST') {\n\n $user = $em->getRepository('UserBundle:User')->find($request->get('user'));\n $asesor = $em->getRepository('UserBundle:User')->find($request->get('asesor'));\n //Define CAR\n $formC->bindRequest($request);\n\n if ($car->getVersion() != \"\") {\n $car = DefaultC::newEntity($car, $user);\n DefaultC::saveEntity($em, $car, $user, false);\n\n $form->bindRequest($request);\n DefaultC::saveEntity($em, $ticket, $asesor);\n\n $sesion = $request->getSession();\n\n return $this->redirect($this->generateUrl('showTicket', array('id_ticket' => $ticket->getId())));\n } else {\n\n $this->get('session')->setFlash('error', '¡Error! No has introducido un vehiculo correctamente');\n }\n }\n\n $workshops = $em->getRepository('WorkshopBundle:Workshop')->findAll();\n $brands = $em->getRepository('CarBundle:Brand')->findAll();\n $models = $em->getRepository('CarBundle:Model')->findByBrand($car->getVersion()->getModel()->getBrand()->getId());\n $versions = $em->getRepository('CarBundle:Version')->findByModel($car->getVersion()->getModel()->getId());\n\n return $this->render('TicketBundle:Ticket:editTicket.html.twig', array(\n 'form' => $form->createView(),\n 'formC' => $formC->createView(),\n 'tickets' => $this->loadTicket(),\n 'ticket' => $ticket,\n 'workshops' => $workshops,\n 'brands' => $brands,\n 'models' => $models,\n 'versions' => $versions\n ));\n }", "title": "" }, { "docid": "ff85d45306563d059fc3402024fb6914", "score": "0.66346097", "text": "private function createEditForm(Tramite $entity)\n {\n $form = $this->createForm(new TramiteType(), $entity, array(\n 'action' => $this->generateUrl('tramite_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "7e3c699d4875e50545e113ac1add6265", "score": "0.66243416", "text": "private function createEditForm($entity) {\n return $this->createForm(new AuthorType(), $entity, array(\n 'action' => $this->generateUrl('update_author', array('id'=>$entity->getId())),\n 'method' => 'PUT'\n ))->add('submit', 'submit', array('label'=>'Save'));\n }", "title": "" }, { "docid": "e4e010ec6a0c27f36548fe9db1ee0202", "score": "0.6618383", "text": "private function createEditForm(Emprendedor $entity)\n {\n $form = $this->createForm(new EmprendedorType(), $entity, array(\n 'action' => $this->generateUrl('emprendedor_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "cc27dfb0e449dd4d15d0b15b0e4773dc", "score": "0.6611439", "text": "private function createEditForm(Factory $entity)\n {\n $form = $this->createForm(new FactoryType(), $entity, array(\n 'action' => $this->generateUrl('factory_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'attr' => array('class'=>\"form-horizontal\"),\n ));\n\n $form->add('submit', 'submit', array('label' => 'Generate'));\n\n return $form;\n }", "title": "" }, { "docid": "b5a3500a4f161054cab0c28cc483441e", "score": "0.6580713", "text": "private function createEditForm(Linea $entity)\n {\n $form = $this->createForm(new LineaType(), $entity, array(\n 'action' => $this->generateUrl('linea_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "37eaaf2fc1889f391114748510c71400", "score": "0.65471965", "text": "public function edit(AddLotteryTicket $addLotteryTicket)\n {\n //\n }", "title": "" }, { "docid": "44dd72d68b347aa43f175768d13b92e3", "score": "0.653627", "text": "private function createCreateForm(Ticket $entity)\n {\n $form = $this->createForm(new TicketType($this->container), $entity, array(\n 'action' => $this->generateUrl('ticket_create'),\n 'method' => 'POST',\n 'context' => $this->get('security.context')\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "title": "" }, { "docid": "63757a2940d645451c65046929771208", "score": "0.6534114", "text": "private function createEditForm(Pdf $entity)\n {\n $form = $this->createForm(new PdfType(), $entity, array(\n 'action' => $this->generateUrl('pdf_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "b52d27a252c54e710a3d9f645f1c4c5d", "score": "0.65326196", "text": "private function createEditForm(Comercial $entity)\n {\n $form = $this->createForm(new ComercialType(), $entity, array(\n 'action' => $this->generateUrl('backend_comercial_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "c52d39fdf86c32b34bceff14893b7362", "score": "0.65289855", "text": "private function createEditForm( PersonaTipo $entity ) {\n\t\t$form = $this->createForm( new PersonaEmpleadoType(),\n\t\t\t$entity,\n\t\t\tarray(\n\t\t\t\t'action' => $this->generateUrl( 'empleados_update', array( 'id' => $entity->getId() ) ),\n\t\t\t\t'method' => 'PUT',\n\t\t\t\t'attr' => array( 'class' => 'box-body' )\n\t\t\t) );\n\n\t\t$form->add(\n\t\t\t'submit',\n\t\t\t'submit',\n\t\t\tarray(\n\t\t\t\t'label' => 'Actualizar',\n\t\t\t\t'attr' => array( 'class' => 'btn btn-primary pull-right' ),\n\t\t\t)\n\t\t);\n\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "f38b8bc9ac82030963b4ca840c88729c", "score": "0.65213966", "text": "private function createEditForm(Messages $entity) {\n $form = $this->createForm(new MessagesType(), $entity, array(\n 'action' => $this->generateUrl('messages_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "72485dca01e01a56d4b1d3ed8a7d97f5", "score": "0.6520403", "text": "public function edit($id)\n {\n $ticket = Ticket::find($id);\n return view('ticket.edit', compact('ticket'));\n }", "title": "" }, { "docid": "9f2a35f7d407857a25ef7e06675b23c9", "score": "0.65189725", "text": "private function createEditForm(Factura $entity)\n {\n $form = $this->createForm(new FacturaType(), $entity, array(\n 'action' => $this->generateUrl('_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "b9f7dfe47fc7ff4edac41a3c01e986ad", "score": "0.6501628", "text": "private function createEditForm(Labeli $entity)\n {\n $form = $this->createForm(new LabeliType(), $entity, array(\n 'action' => $this->generateUrl('labeli_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "50e7d81033284f0d0db5e396deb90d2e", "score": "0.64971274", "text": "private function createEditForm(BlogEntry $entity)\n {\n $form = $this->createForm(new BlogEntryType(), $entity, array(\n 'action' => $this->generateUrl('blogentry_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Обновить'));\n\n return $form;\n }", "title": "" }, { "docid": "e771431e7468bbfdb695ef9200a616d7", "score": "0.6496104", "text": "private function createEditForm(Kosten $entity) {\n $form = $this->createForm(new KostenType(), $entity, array(\n 'action' => $this->generateUrl('kosten_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "fa4553f330164ade2bd52e5a3eb1a901", "score": "0.6490348", "text": "private function createEditForm(Event $entity)\n {\n\n $form = $this->createForm(new EventType(), $entity, array(\n 'action' => $this->generateUrl('backend_event_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'backend.update'));\n\n return $form;\n }", "title": "" }, { "docid": "24b7c4a4a1112a05a14586c2c774279a", "score": "0.647351", "text": "public function edit($id)\n {\n $ticket = Ticket::find($id);\n return View::make('tickets.edit')->with('ticket', $ticket);\n\n }", "title": "" }, { "docid": "0da5145e380a662bc0c5bf6db737b845", "score": "0.647108", "text": "private function createEditForm(Article $entity)\r\n {\r\n $form = $this->createForm(new ArticleType(true), $entity, array(\r\n 'action' => $this->generateUrl('author_article_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => '保存'));\r\n\r\n return $form;\r\n }", "title": "" }, { "docid": "f663892944c9546d7414858b7a07494c", "score": "0.64579976", "text": "private function createEditForm(Curso $entity)\n {\n $form = $this->createForm(new CursoType(), $entity, array(\n 'action' => $this->generateUrl('cursos_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "e14de36dd4dabd3e766489d2a7032243", "score": "0.64377505", "text": "private function createEditForm(Investigador $entity)\n {\n $form = $this->createForm(new InvestigadorType(), $entity, array(\n 'action' => $this->generateUrl('investigador_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n return $form;\n }", "title": "" }, { "docid": "3df3585d02cab6b2b31cdc470355d181", "score": "0.64373493", "text": "private function createEditForm(Demandes $entity) {\n $form = $this->createForm(new DemandesType(), $entity, array(\n 'action' => $this->generateUrl('demandes_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "dae9710ed9f62bc0a1f4c7181102413c", "score": "0.64352584", "text": "private function createEditForm( Encuesta $entity ) {\n\t\t$form = $this->createForm(\n\t\t\tnew EncuestaType(),\n\t\t\t$entity,\n\t\t\tarray(\n\t\t\t\t'action' => $this->generateUrl( 'campania_encuesta_update', array( 'id' => $entity->getId() ) ),\n\t\t\t\t'method' => 'PUT',\n\t\t\t)\n\t\t);\n\n\t\t$form->add( 'submit', 'submit', array( 'label' => 'Update' ) );\n\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "8987812f3fe51e9767eddf3fb5cf4a4f", "score": "0.6434689", "text": "public function edit(Ticket $ticket)\n {\n $terminals = Terminal::all();\n return view('settings.editTicket',compact('ticket','terminals'));\n }", "title": "" }, { "docid": "01452a28ec27f98fd12dd5aea2ad3a20", "score": "0.6432686", "text": "private function createEditForm(Huesped $entity)\n {\n $form = $this->createForm(new HuespedType(), $entity, array(\n 'action' => $this->generateUrl('huesped_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "c232790a0fc2a763259b25f6a4b31cd8", "score": "0.64314294", "text": "public function edit($id)\n {\n $tickets = Ticket::find($id);\n\n if (is_null($tickets))\n {\n return Redirect::route('client.ticket_view');\n }\n return view('client.ticket_edit', compact('tickets'));\n }", "title": "" }, { "docid": "2042b2d95cbfcbcff363c2c466870a27", "score": "0.6427049", "text": "private function createEditForm(Curso $entity)\n {\n $form = $this->createForm(new CursoType(), $entity, array(\n 'action' => $this->generateUrl('curso_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar'));\n\n return $form;\n }", "title": "" }, { "docid": "53828c9070ab6e2481d8f976df0cd92d", "score": "0.6426428", "text": "public function create()\n {\n return view('formTicket');\n }", "title": "" }, { "docid": "3783134a7b365309327933577422b086", "score": "0.64107263", "text": "private function createEditForm(Modelo $entity)\n {\n $form = $this->createForm(new ModeloType(), $entity, array(\n 'action' => $this->generateUrl('modelos_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "12cd57c43ae036db5a8445f5c40fc989", "score": "0.6407905", "text": "protected function createComponentEditArticle()\n\t{\n\t\t$form = new Form;\n\n\t\t$form->addHidden('id');\n\n\t\t$form->addText('title', 'Název článku')\n\t\t\t->setRequired('Prosím vyplňte titulek.')\n\t\t\t->setAttribute('placeholder', 'Název článku');\n\t\t$form->addTextArea('intro', 'Perex')->setAttribute('placeholder', 'Perex');\n\t\t$form->addTextArea('text', 'Obsah')->setAttribute('placeholder', 'Obsah');\n\n\t\t$form->addCheckbox('visible', 'Viditelné');\n\n\t\t$form->addSubmit('save', 'Uložit článek');\n\n\t\t$form->onSuccess[] = callback($this, 'editArticleFormSubmitted');\n\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "030b1bdcaefdb4a7a80a3bcba3f1b569", "score": "0.6406485", "text": "private function createEditForm(Hotel $entity)\n {\n $form = $this->createForm(new HotelType(), $entity, array(\n 'action' => $this->generateUrl('hotel_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "4ec7d5b9ff5ec4e5707938e6f6ee9b62", "score": "0.6394484", "text": "private function createDeleteForm(Ticket $ticket)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ticket_delete_admin', array('id' => $ticket->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "b6024fc547bf84b7cfcdba210056f385", "score": "0.6390561", "text": "public function edit(int $id)\n {\n return view('tickets.edit',[\n 'ticket' => $this->ticketrep->find($id)\n ]);\n }", "title": "" }, { "docid": "ac90089204f06ac2172a3f4f24f8133a", "score": "0.63841623", "text": "private function createEditForm(Threads $entity)\n {\n $form = $this->createForm(new ThreadsType(), $entity, array(\n 'action' => $this->generateUrl('threads_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "fd1b8926025c979a1ec8ee146a43f817", "score": "0.6383934", "text": "public function edit($id)\n {\n $ticket = Ticket::find($id);\n $cliente = Cliente::all()->pluck('nameCli', 'id');\n \n return view('ticket.edit.edit')\n ->with('ticket', $ticket)\n ->with('cliente', $cliente);\n }", "title": "" }, { "docid": "b30a3cff7995af5cd85ec7750ae29f9b", "score": "0.6377051", "text": "private function createEditForm(Article $entity)\n {\n $form = $this->createForm(new ArticleType(), $entity, array(\n 'action' => $this->generateUrl('article_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n return $form;\n }", "title": "" }, { "docid": "71cf0c06d2e6f44d4bede7fc36c0dbd7", "score": "0.6374146", "text": "private function createEditForm(Individual $entity)\n {\n $form = $this->createForm(new IndividualType(), $entity, array(\n 'action' => $this->generateUrl('admin_people_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update', 'attr' => array('class' => 'btn btn-primary')));\n\n return $form;\n }", "title": "" }, { "docid": "a8e3538c05d21b00e5e479b06cb7e67c", "score": "0.636985", "text": "public function edit(MovieTicket $movieTicket)\n {\n //\n }", "title": "" }, { "docid": "f94226c0a9193f819a982a1d359ff903", "score": "0.6359402", "text": "private function createEditForm(Offer $entity) {\n $form = $this->createForm(new OfferType(), $entity, array(\n 'action' => $this->generateUrl('offer_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "89df286e065c6c8165db1b110c8f258f", "score": "0.63568383", "text": "public function edit($id)\n\t{\n\t\t$ticket = Ticket::findOrFail($id);\n\n\t\treturn view('tickets.edit', compact('ticket'));\n\t}", "title": "" }, { "docid": "b864a291c56f16e077d4053673b5c6a9", "score": "0.63562006", "text": "private function createEditForm(Entradas $entity)\n {\n $form = $this->createForm(new EntradasType(), $entity, array(\n 'action' => $this->generateUrl('admin_entradas_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n $form->add('submit', 'submit', array(\n 'label' => 'Actualizar',\n 'attr' => array('class' => 'btn-primary'),\n 'icon' => 'floppy-disk',\n ));\n return $form;\n }", "title": "" }, { "docid": "a4e66cc43e2efff47b2a5325e2b42bb6", "score": "0.6352645", "text": "public function edit(ModeratorTicket $moderatorTicket)\n {\n //\n }", "title": "" }, { "docid": "26640b3a62affdfabe540c2dfda24e74", "score": "0.6351738", "text": "private function createEditForm(cajones $entity)\n {\n $form = $this->createForm(new cajonesType(), $entity, array(\n 'action' => $this->generateUrl('cajones_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "835562a720c7d0fbe367e62c6b111573", "score": "0.634561", "text": "private function createEditForm(Abono $entity)\n {\n $form = $this->createForm(new AbonoType(), $entity, array(\n 'action' => $this->generateUrl('admin_abono_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "6eb215527e41258a44a04e744456f889", "score": "0.63402146", "text": "private function createEditForm(Chamadas $entity) {\n $form = $this->createForm(new ChamadasType(), $entity, array(\n 'action' => $this->generateUrl('chamadas_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "387b56fedb4bdb865476d1aa748541c2", "score": "0.63326883", "text": "private function createEditForm(Concepto $entity)\n {\n $form = $this->createForm(new ConceptoType(), $entity, array(\n 'action' => $this->generateUrl('admin_concepto_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n \n return $form;\n }", "title": "" }, { "docid": "d26bd77c3fb6b079ebdc4e6a2e801693", "score": "0.6319214", "text": "private function createEditForm(announce $entity)\n {\n $form = $this->createForm(new announceType(), $entity, array(\n 'action' => $this->generateUrl('announce_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Mettre à jour'));\n\n return $form;\n }", "title": "" }, { "docid": "14e292297deb63c40625130d1fde2a59", "score": "0.63153315", "text": "private function createEditForm(Documento $entity)\n {\n $form = $this->createForm(new DocumentoType(), $entity, array(\n 'action' => $this->generateUrl('documento_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "5ee8657e41644ee2faac78bb00a55fcc", "score": "0.631469", "text": "public function edit($id)\n {\n $where = array('id_ticket' => $id);\n $data['ticket'] = Ticket::where($where)->first();\n $user['users'] = User::all();\n\n return view('tickets.edit', $data, $user);\n }", "title": "" }, { "docid": "28ad7f90ae0fd7396fc7443d4ad34721", "score": "0.6309176", "text": "private function createEditForm(Experimento $entity)\n {\n $form = $this->createForm(new ExperimentoType(), $entity, array(\n 'action' => $this->generateUrl('experimento_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n return $form;\n }", "title": "" }, { "docid": "7e5c1ab71c2afa336fed97547e1f4a24", "score": "0.63063604", "text": "private function createDeleteForm(Ticket $ticket)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ticket_delete', array('id' => $ticket->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "ac53c5763e3a0b0ec0125039ef9bb509", "score": "0.6301987", "text": "public function edit()\n {\n $this->form();\n }", "title": "" }, { "docid": "0e8b4a91a72d4d23be2abd37546211f4", "score": "0.62954795", "text": "private function createEditForm(Pratica $entity)\n {\n $form = $this->createForm(new PraticaType(), $entity, array(\n 'action' => $this->generateUrl('claims-h-audit_soft_pratica_update', array('slug' => $entity->getSlug())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update', 'attr' => array('class' => 'btn')));\n\n return $form;\n }", "title": "" }, { "docid": "716ecb67a91eebc2d6f0d1445138554a", "score": "0.6287617", "text": "public function edit($id)\n {\n $ticket = Ticket::findOrFail($id);\n\n return view('tickets.edit', compact('ticket'));\n }", "title": "" }, { "docid": "189c571e70777ea71802b60c4d1810a3", "score": "0.628019", "text": "private function createEditForm(LAUREAT $entity)\n {\n $form = $this->createForm(new LAUREATType(), $entity, array(\n 'action' => $this->generateUrl('laureat_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "36bb971991d198e035d9b0362721b06b", "score": "0.6276016", "text": "private function createEditForm(Subject $entity) {\n $form = $this->createForm(new SubjectType(), $entity, array(\n 'action' => $this->generateUrl('subject_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "8ed03790f79876ebd54bd96a0d040066", "score": "0.6269742", "text": "private function createEditForm(Buku $entity) {\n $form = $this->createForm(new BukuType(), $entity, array(\n 'action' => $this->generateUrl('buku_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n $form->add('submit', 'submit', array('label' => 'Update'));\n return $form;\n }", "title": "" }, { "docid": "13c74eeba02eff5bb88d532428a68dde", "score": "0.6267118", "text": "private function createEditForm(Apporteur $entity) {\n $form = $this->createForm(new ApporteurType(), $entity, array(\n 'action' => $this->generateUrl('apporteur_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "a115c7ba29cd1f055eaa2cbc40fdc1aa", "score": "0.6266978", "text": "private function createEditForm(Poboxtype $entity)\n {\n $form = $this->createForm(new PoboxtypeType(), $entity, array(\n 'action' => $this->generateUrl('poboxtype_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar'));\n\n return $form;\n }", "title": "" }, { "docid": "b7526f029fea145108577897d1a106f3", "score": "0.62666345", "text": "private function createEditForm(Cita $entity)\n {\n $form = $this->createForm(new CitaType(), $entity, array(\n 'action' => $this->generateUrl('admin_cita_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "9880085c3bbd2eb3f08623cbc4ea3da4", "score": "0.6265303", "text": "private function createEditForm(Collection $entity)\n {\n $form = $this->createForm(new CollectionType(), $entity, array(\n 'action' => $this->generateUrl('acervo_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "33a10abf61b2254099a5805991974846", "score": "0.6260792", "text": "private function createEditForm(Catador $entity) {\n $form = $this->createForm(new CatadorType(), $entity, array(\n 'action' => $this->generateUrl('catadores_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "062ac82465db832dba5bb7413dfe4a2e", "score": "0.6260587", "text": "private function createEditForm(ContentProvider $entity) {\n $form = $this->createForm(\n new ContentProviderType(),\n $entity,\n array(\n 'action' => $this->generateUrl(\n 'contentprovider_update',\n array('id' => $entity->getId())\n ),\n 'method' => 'PUT',\n )\n );\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "6e35f138501da0917688ea5c6453f4e1", "score": "0.62548447", "text": "private function createEditForm(FaqCategory $entity) {\n $form = $this->createForm(new FaqCategoryType(), $entity, array(\n 'action' => $this->generateUrl('faqcategory_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n return $form;\n }", "title": "" }, { "docid": "fb9b6153b60073ad70e466df9801828f", "score": "0.6253036", "text": "private function createEditForm(NombreModelo $entity)\n {\n $form = $this->createForm(new NombreModeloType(), $entity, array(\n 'action' => $this->generateUrl('nombre_modelo_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'attr' => array('class' => 'box-body')\n ));\n\n $form->add(\n 'submit',\n 'submit',\n array(\n 'label' => 'Actualizar',\n 'attr' => array('class' => 'btn btn-primary pull-right'),\n )\n );\n\n return $form;\n }", "title": "" }, { "docid": "7c137b3adbe6f8b562f412dd5737aaa3", "score": "0.6252156", "text": "private function createEditForm(Produto $entity) {\n $form = $this->createForm(new ProdutoType(), $entity, array(\n 'action' => $this->generateUrl('produto_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "780c03e6c8fd3ebffd9a0805cbe2d7d3", "score": "0.62458974", "text": "private function createEditForm(Marque $entity)\n {\n $form = $this->createForm(new MarqueType(), $entity, array(\n 'action' => $this->generateUrl('marque_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "9526b58cc54f91baf86d45071bbc073a", "score": "0.62425894", "text": "private function createEditForm(Sysparam $entity)\n {\n $form = $this->createForm(new SysparamType(), $entity, array(\n 'action' => $this->generateUrl('sysparam_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'attr' => array('id' => 'form')\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "30978e6fe427ed53f41b3abe0851c967", "score": "0.6241367", "text": "private function createEditForm(Commandes $entity)\n {\n $form = $this->createForm(CommandesType::class, $entity, array(\n 'action' => $this->generateUrl('adminCommandes_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "7754c474b0b8fc3cc53a176cffd17b12", "score": "0.62412256", "text": "public function newTicketAction() {\n\n $em = $this->getDoctrine()->getEntityManager();\n $request = $this->getRequest();\n $ticket = new Ticket();\n $car = new Car();\n $post = new Post();\n $document = new Document();\n\n //Define Forms\n $form = $this->createForm(new TicketType(), $ticket);\n $formC = $this->createForm(new CarType(), $car);\n $formP = $this->createForm(new PostType(), $post);\n $formD = $this->createForm(new DocumentType(), $document);\n\n if ($request->getMethod() == 'POST') {\n\n //campos comunes\n $user = $em->getRepository('UserBundle:User')->find($request->get('user'));\n $status = $em->getRepository('TicketBundle:Status')->find('0');\n $security = $this->get('security.context');\n\n $form->bindRequest($request);\n $formC->bindRequest($request);\n $formP->bindRequest($request);\n $formD->bindRequest($request);\n\n if ($car->getVersion() != \"\") {\n //Define CAR\n $car = DefaultC::newEntity($car, $user);\n DefaultC::saveEntity($em, $car, $user, false);\n\n //Define TICKET\n $ticket = DefaultC::newEntity($ticket, $user);\n if ($security->isGranted('ROLE_ASSESSOR')) {\n //$ticket->setWorkshop($request->get('workshop'));\n } else {\n $ticket->setWorkshop($user->getWorkshop());\n }\n $ticket->setStatus($status);\n $ticket->setCar($car);\n DefaultC::saveEntity($em, $ticket, $user, false);\n\n //Define POST\n $post = DefaultC::newEntity($post, $user);\n $post->setTicket($ticket);\n DefaultC::saveEntity($em, $post, $user, false);\n\n //Define Document\n $document->setPost($post);\n\n if ($document->getFile() != \"\") {\n $em->persist($document);\n }\n\n $em->flush();\n\n return $this->redirect($this->generateUrl('showTicket', array('id_ticket' => $ticket->getId())));\n } else {\n $this->get('session')->setFlash('error', '¡Error! No has introducido un vehiculo correctamente');\n }\n }\n\n $brands = $em->getRepository('CarBundle:Brand')->findAll();\n\n\n return $this->render('TicketBundle:Ticket:newTicket.html.twig', array('ticket' => $ticket,\n 'form' => $form->createView(),\n 'formC' => $formC->createView(),\n 'formP' => $formP->createView(),\n 'formD' => $formD->createView(),\n 'brands' => $brands,));\n }", "title": "" }, { "docid": "78f613786495bb4c492ff61d65137f4f", "score": "0.62354827", "text": "private function createEditForm(Purchase $entity)\n {\n $form = $this->createForm(new PurchaseType(), $entity, array(\n 'action' => $this->generateUrl('Purchase_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "27f14164e02e96ab2304290d4b5ebf93", "score": "0.62217206", "text": "private function createEditForm(Persona $entity)\n {\n $form = $this->createForm(new PersonaType(), $entity, array(\n 'action' => $this->generateUrl('persona_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n return $form;\n }", "title": "" }, { "docid": "90fc75f2f1e5004217d67c46fc5a3ca3", "score": "0.62192607", "text": "private function createEditForm(Concours $entity)\n {\n $form = $this->createForm(new ConcoursType(), $entity, array(\n 'action' => $this->generateUrl('concour_update', array('idConcour' => $entity->getIdConcour())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "05cdb3b09e5c02b75f4b1c685472fd77", "score": "0.6215277", "text": "private function createEditForm(Server $entity)\n {\n \t$form = $this->createForm(new ServerType(), $entity, array(\n \t\t\t'action' => $this->generateUrl('server_update', array('id' => $entity->getId())),\n \t\t\t'method' => 'PUT',\n \t));\n \n \t$form->add('submit', 'submit', array('label' => 'Update'));\n \n \treturn $form;\n }", "title": "" }, { "docid": "331fb8d04496be3832d44717f0763a3f", "score": "0.6213167", "text": "public function edit($id)\n {\n $ticket = $this->ticket->findWithComments($id);\n if(count($ticket->comments) > 0) return back()->withErrors(['You cannot edit ticket after it was commented!']);\n return view('tickets.edit')->with(compact('ticket'));\n }", "title": "" }, { "docid": "d2db374d68634e7a419b9da7d8bdc1b8", "score": "0.6211186", "text": "private function createEditForm(Goal $entity) {\n\n $form = $this->createForm(new GoalType(), $entity, array(\n 'action' => $this->generateUrl('goal_update', array('id' => $entity->getId())),\n 'method' => 'PUT', \n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "6cee434c6a30d098df0472688878c35b", "score": "0.6205153", "text": "private function createEditForm(EmailTemplate $entity)\n {\n $form = $this->createForm(new EmailTemplateType(), $entity, array(\n 'action' => $this->generateUrl('ccc_email_template_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array(\n 'label' => 'ccc.email-template.update', \n 'translation_domain' => 'CCCEmailTemplate',\n 'attr' => array('class' => 'btn')\n ));\n\n return $form;\n }", "title": "" }, { "docid": "eb3dffc1941b0dd9b93e89a0a10a17f0", "score": "0.62018454", "text": "private function createEditForm(calendario $entity)\n {\n $form = $this->createForm(new calendarioType(), $entity, array(\n 'action' => $this->generateUrl('calendario_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" } ]
af4300afbf2815f6fcf77ca5e32166b4
Get the value of cantidad
[ { "docid": "dda6122c5e26126e359dc67891a9a40c", "score": "0.7805358", "text": "public function getCantidad()\n {\n return $this->cantidad;\n }", "title": "" } ]
[ { "docid": "72a9bd8078c322e1d358bb5021417de7", "score": "0.8180082", "text": "public function GetCantidad(){\n\t\treturn $this->Cantidad;\n\t}", "title": "" }, { "docid": "416108cc904a166408ce3f548ef446fc", "score": "0.7960855", "text": "public function getCantidad()\r\n {\r\n return $this->Cantidad;\r\n }", "title": "" }, { "docid": "83431531ce728e0acf1c3c77e229a52d", "score": "0.79456055", "text": "public function getcantidad()\r\n {\r\n return $this->cantidad;\r\n }", "title": "" }, { "docid": "40aacff5eb5a9c44733ad98d5a041632", "score": "0.7778671", "text": "public function getCantidad()\n {\n return $this->cantidad;\n }", "title": "" }, { "docid": "a2d6b278738582ea4d53e7d01486e1b5", "score": "0.7734017", "text": "public function getCantidad() {\n return $this->cantidad;\n }", "title": "" }, { "docid": "0defc5278e4014e24d3af93e273b1be4", "score": "0.76556176", "text": "public function obtenerCantidad();", "title": "" }, { "docid": "f95436668501ecd9707dba1497fb05c4", "score": "0.7351647", "text": "public function cantidad(){\r\n $query = $this->db->query(\"call esp_cantidad_carreras()\");\r\n $data=$query->row();\r\n $query->free_result();\r\n return ($data)?$data->cantidad:0;\r\n }", "title": "" }, { "docid": "4f5dad278282f6150a4b370324b764cf", "score": "0.70134604", "text": "function cantidadDominios()\n {\n $cantidad= SegDominio::obtenercantnomdominio();\n return $cantidad;\n }", "title": "" }, { "docid": "3f3ba8fa4a72af82e91113654f2594bf", "score": "0.7009522", "text": "public function getValorDepreciado();", "title": "" }, { "docid": "7230ba129b7dc4459f85f9e626062996", "score": "0.6952889", "text": "public function getQuantidade(): int;", "title": "" }, { "docid": "4a45e407158bfb21b0a0ded2ded5d699", "score": "0.6913704", "text": "public function cantProductos() {\n $sqlCantidad = $this->db->select(\"select count(*) as cantidad from producto where estado = 1\");\n $cantidad = $sqlCantidad[0]['cantidad'];\n return $cantidad;\n }", "title": "" }, { "docid": "53b19f5e534ec4f6575c1443e754e9e6", "score": "0.6848072", "text": "public function getCantidad() : ?int \n {\n return $this->cantidad;\n }", "title": "" }, { "docid": "582bc3acd9685107c7857405d266c88e", "score": "0.68203723", "text": "public function getCantidadOficina()\n {\n return $this->cantidad_oficina;\n }", "title": "" }, { "docid": "7f91837c183afc187d71a4a3fdd17b49", "score": "0.68076026", "text": "public function getValor() {\n return $this->nValor;\n }", "title": "" }, { "docid": "7f91837c183afc187d71a4a3fdd17b49", "score": "0.68076026", "text": "public function getValor() {\n return $this->nValor;\n }", "title": "" }, { "docid": "4d102601766ea42402d83b937650cbfd", "score": "0.6764816", "text": "public function cantVentas() {\n $sqlCantidad = $this->db->select(\"select count(*) as cantidad from pedido\");\n $cantidad = $sqlCantidad[0]['cantidad'];\n return $cantidad;\n }", "title": "" }, { "docid": "c0fc800bbbada054a6f8d50abc4543fa", "score": "0.673428", "text": "public function getValorCalculado() {\n return $this->nValorCalculado;\n }", "title": "" }, { "docid": "e04706db7a466fa00fc9ebb92e403978", "score": "0.67227566", "text": "public function getValor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "e04706db7a466fa00fc9ebb92e403978", "score": "0.67227566", "text": "public function getValor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "e04706db7a466fa00fc9ebb92e403978", "score": "0.67227566", "text": "public function getValor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "e04706db7a466fa00fc9ebb92e403978", "score": "0.67227566", "text": "public function getValor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "e04706db7a466fa00fc9ebb92e403978", "score": "0.67227566", "text": "public function getValor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "a4da8a7aa1ac6c5b85b3730fce99a5b0", "score": "0.67204124", "text": "public function getCantIndefinidos() {\n $query = $this->db->query(\"\n SELECT\n COUNT(1) AS cant\n FROM\n ot_hija\n where\n k_id_estado_ot = 189\n \");\n\n return $query->row()->cant;\n }", "title": "" }, { "docid": "32813a7081f7a3c76b9f303a7538d370", "score": "0.6662921", "text": "public function BR_CantidadNoFacturado(){\r\n $result = $this->dac->DA_ConsultarNoFacturado();\r\n if($result->rowCount() > 0){\r\n return $result->fields['PreNoAutorizado'];\r\n }\r\n else{\r\n return 0;\r\n }\r\n }", "title": "" }, { "docid": "9b3b157b137c93bcfd874f00327a17a1", "score": "0.6649618", "text": "public function getValor()\n {\n return $this->nValor;\n }", "title": "" }, { "docid": "d6ffba2a6e01c798c35fae831eb02b2c", "score": "0.66454786", "text": "public function getValor() {\n return $this->valor;\n }", "title": "" }, { "docid": "5ee8d8ca56f90e6a7abe5eedc8d84bcf", "score": "0.6614018", "text": "function getDenominazione() {\r\n return $this->denominazione;\r\n }", "title": "" }, { "docid": "172ae864abeeb642080a5520f7618b57", "score": "0.6584092", "text": "function cant_articulos($id_cotizacion)\r\n{\r\n\t$sql=\"SELECT SUM(cantidad_detalle) AS cantidad FROM `detalle` WHERE id_cotizacion='\".$id_cotizacion.\"'\";\r\n\t$result=mysql_query($sql);\r\n\t$row=mysql_fetch_array($result);\r\n\treturn $row['cantidad'];\r\n}", "title": "" }, { "docid": "e4f85416a514eb5001f9a1c5acbb771c", "score": "0.6575129", "text": "public function getValoracion()\n {\n return $v_valoracion;\n \n }", "title": "" }, { "docid": "7d61cd1b5d3ec42a7fa6fc62cc1e2841", "score": "0.65749484", "text": "public function BR_CantidadCuotaFacturar(){\r\n $result = $this->dac->DA_CantidadCuotaFacturar();\r\n\t\tif ($result != false){\r\n\t\t\tif($result->rowCount() > 0){\r\n\t\t\t\treturn $result->fields['ContarCuotaFacturar'];\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n }", "title": "" }, { "docid": "13ca95dcc1a761f941b07b40fd3867f0", "score": "0.6574585", "text": "public function cantClientes() {\n $sqlCantidad = $this->db->select(\"select count(*) as cantidad from cliente\");\n $cantidad = $sqlCantidad[0]['cantidad'];\n return $cantidad;\n }", "title": "" }, { "docid": "37fe71e60b2d0e661ff47fc45b83e5f9", "score": "0.65703183", "text": "public function getCantidadBanio()\n {\n return $this->cantidad_banio;\n }", "title": "" }, { "docid": "78836dc5f653cfd17614950a06060d68", "score": "0.6561218", "text": "public function get_valor($id);", "title": "" }, { "docid": "721d3e2f23acd169b00f63ce0ae02224", "score": "0.64928854", "text": "public function getCantidadJardin()\n {\n return $this->cantidad_jardin;\n }", "title": "" }, { "docid": "5ce39adab9dbc7f474f1797ed0956ddc", "score": "0.64866143", "text": "public function valor(): mixed\n {\n return $this->valor;\n }", "title": "" }, { "docid": "47289cedc9b8e2864994156c81faa14a", "score": "0.6482742", "text": "public function get_valor() {\t\t\t\n\t\t\n\t\tswitch ($this->modo) {\n\t\t\tcase 'dummy':\n\t\t\tcase 'diffusion':\n\t\t\t\t#$dato = $this->get_dato();\n\t\t\t\t$dato = parent::get_dato();\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$dato = parent::get_dato();\t\n\t\t\t\t#dump($dato,'dato');\n\n\t\t\t\t$dato = $this->clean_text($dato);\n\t\t\t\t\t#dump($dato ,'$dato ');\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\t\t\n\n\t\treturn $dato;\n\t}", "title": "" }, { "docid": "819793af2863d048fdac9792b4fb9c86", "score": "0.64824456", "text": "public function getValue(): int;", "title": "" }, { "docid": "819793af2863d048fdac9792b4fb9c86", "score": "0.64824456", "text": "public function getValue(): int;", "title": "" }, { "docid": "33c7dbde1a27e4355cedc26f8ea0080b", "score": "0.645919", "text": "private function getDeterminarMetodologiaCalculo()\r\n\t\t{\r\n\t\t\t$idMetodo = 0;\r\n\t\t\t$idOrdenanza = 0;\r\n\t\t\t$detalle = null;\r\n\t\t\tif ( $this->_añoImpositivo > 0 ) {\r\n\t\t\t\t$idOrdenanza = $this->getIdOrdenanza();\r\n\t\t\t\tif ( count($idOrdenanza) > 0 ) {\r\n\t\t\t\t\t$id = $idOrdenanza[0]['id_ordenanza'];\r\n\t\t\t\t\t$detalle = OrdenanzaBase::getDetalleOrdenanza($id, self::IMPUESTO);\r\n\t\t\t\t\tif ( count($detalle) > 0 ) {\r\n\t\t\t\t\t\t$idMetodo = $detalle['id_metodo'];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $idMetodo;\r\n\t\t}", "title": "" }, { "docid": "eba076fdd38fa427b150f89583745481", "score": "0.6448147", "text": "public function get_ultima_necesidad() {\t\n $necesidades = $this->db->query('SELECT MAX(id_necesidad) AS id FROM necesidades WHERE status_necesidad = 1');\n return $necesidades->result();\n\n }", "title": "" }, { "docid": "ae86602b26c9679b95193e8a5878ed27", "score": "0.6443908", "text": "public function getMontoCancelado() {\n\t\t$sql = \"Select sum(monto) as total from abono where factura_id in (Select id from factura where clientes_id=\" . $this -> id . \" )\";\n\t\t$sqlFactura = Yii::app() -> db -> createCommand($sql) -> queryRow();\n\t\treturn $sqlFactura['total'];\n\t}", "title": "" }, { "docid": "eaea714172ddd4da99a48498261fc053", "score": "0.6420181", "text": "public function BR_CantidadCuotaAnulada(){\r\n $result = $this->dac->DA_CantidadCuotaAnulada();\r\n if ($result != false){\r\n\t\t\tif($result->rowCount() > 0){\r\n\t\t\t\treturn $result->fields['CuotaAnulada'];\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n }", "title": "" }, { "docid": "cc509c4cde5bff83cdbeaa239496ed77", "score": "0.6404577", "text": "public function getCantidadSala()\n {\n return $this->cantidad_sala;\n }", "title": "" }, { "docid": "7340728a6a182c66ddb57ad90ea99c54", "score": "0.6386632", "text": "public function getcantidad_mp()\r\n {\r\n return $this->cantidad_mp;\r\n }", "title": "" }, { "docid": "d5745f70e05d16ca99b06d08ac1700b5", "score": "0.63850987", "text": "public function getMontoFacturado() {\n\t\t$sql = \"Select SUM(monto) as total from factura where clientes_id=\" . $this -> id;\n\t\t$sqlFactura = Yii::app() -> db -> createCommand($sql) -> queryRow();\n\t\tif ($sqlFactura['total'] == 0)\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn $sqlFactura['total'];\n\t}", "title": "" }, { "docid": "417c764b0e8e3c4d5d7d530989e847ef", "score": "0.6378319", "text": "public function getNivelAtuacao() {\n\t\t$query = \"\n\t\t\tselect cd_atu_vlnt as cod_atuacao \n\t\t\tfrom tb_vncl_vlnt_grp\n\t\t\twhere cd_vlntID = :cd_vlnt\n\t\t\tand cd_grpID = :cd_grp\n\t\t\tand cd_sbgrpID = :cd_sbgrp\n\t\t\tand cd_est_vncl = 1\";\n\t\t$stmt = $this->db->prepare($query);\n\t\t$stmt->bindValue(':cd_vlnt', $this->__get('codVoluntario'));\n\t\t$stmt->bindValue(':cd_grp', $this->__get('codGrupo'));\n\t\t$stmt->bindValue(':cd_sbgrp', $this->__get('codSubgrupo'));\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetch(\\PDO::FETCH_ASSOC);\n\n\t}", "title": "" }, { "docid": "42292875a0a250c4ff78a110a139dc34", "score": "0.63752866", "text": "public function getCantidadCocina()\n {\n return $this->cantidad_cocina;\n }", "title": "" }, { "docid": "6260601feaa876b98bfe4c233dfccf4b", "score": "0.6373132", "text": "public function getCantidadComedor()\n {\n return $this->cantidad_comedor;\n }", "title": "" }, { "docid": "8fc74479f04168c9af00419bc14e4293", "score": "0.634934", "text": "public function getValorAnulado() {\n return $this->nValorAnulado;\n }", "title": "" }, { "docid": "ed70b3e9eb6004f8d2ab94b2cafa6ad4", "score": "0.6349014", "text": "Public function cestaticket(){\n\t\t$cupones = Constant::where('code_constant','LIKE','CUPONES')->first();\n\t\treturn $valor = round($cupones->value*30,2);\n\t}", "title": "" }, { "docid": "e32ac7c952ff964f56c74fd240142b80", "score": "0.63460445", "text": "public function getNumeroDiasAntes(){\n\t\treturn Opciones::model()->find(\"opcion = 'DIAS_ANTES'\")['valor'];\n\t}", "title": "" }, { "docid": "71ed88ee03fb60242d59b7a9b797feeb", "score": "0.63228303", "text": "public function BR_CantidadInifacturaAvales(){\r\n $result = $this->dac->DA_CantidadInifacturaAvales();\r\n\t\tif ($result != false){\r\n\t\t\tif($result->rowCount() > 0){\r\n\t\t\t\treturn $result->fields['IniFactura'];\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n }", "title": "" }, { "docid": "adbb76f34ee643e7c102dc8289c23191", "score": "0.6288862", "text": "public function obtener_precio(){\n\t\t$datosController = $_GET[\"id\"];\n\t\t$respuesta = HabitacionesModel::editar_habitacion($datosController, \"practica_06_habitaciones\", \"practica_06_tipo_habitaciones\");\n\t\treturn $respuesta[\"precio\"];\n\t}", "title": "" }, { "docid": "3274f2309ba17ee7b6945a118958db77", "score": "0.6278036", "text": "public function getVal();", "title": "" }, { "docid": "1e0bb0e4c22685c8aecc10e5f27cb5a6", "score": "0.62620395", "text": "public function getValorParcelaIsenta () {\n return $this->nValorParcelaIsenta; \n }", "title": "" }, { "docid": "2e2b418f119ffcbc31496804b49c5b74", "score": "0.62575364", "text": "public function getMaximo()\n {\n return $this->maximo;\n }", "title": "" }, { "docid": "3c286a05d700ae7aabb5e587f3321eaa", "score": "0.62562305", "text": "public function getDIRECCION_TIENDA(){\n return $this->DIRECCION_TIENDA;\n }", "title": "" }, { "docid": "66fa2f86c6f99ef03f99c13494d07057", "score": "0.624745", "text": "public function getNapetiBodnariuc();", "title": "" }, { "docid": "49fa4e9dfcb1ea78d8895f4cac63587c", "score": "0.6247091", "text": "public function BR_CantidadInifacturaUfeg(){\r\n $result = $this->dac->DA_CantidadInifacturaUfeg();\r\n if ($result != false){\r\n\t\t\tif($result->rowCount() > 0){\r\n\t\t\t\treturn $result->fields['IniFactura'];\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n }", "title": "" }, { "docid": "dbd3fe5fc3e2d3c64a53f32cee8d2f0a", "score": "0.6234235", "text": "public function getNiveau() {\n return strval($this->niveau);\n }", "title": "" }, { "docid": "948379b61edeb13f91a79417e309be8d", "score": "0.6227877", "text": "function valor_opcion($opcion_id) {\n $valor_opcion = $this->Pcrn->campo_id('sis_opcion', $opcion_id, 'valor');\n return $valor_opcion;\n }", "title": "" }, { "docid": "36bea9d98f1f99a7e5d20e023521d385", "score": "0.6221805", "text": "public function getQuantidade()\n {\n return $this->quantidade;\n }", "title": "" }, { "docid": "27097cacbddc2a1ceedd90052ec98c45", "score": "0.621395", "text": "public function getDIERECCION_TIENDA(){\n return $this->DIERECCION_TIENDA;\n }", "title": "" }, { "docid": "151304382b5229f59c1d4633c6b25a46", "score": "0.621324", "text": "function DameIdProximoTecnica()\r\n {\r\n return $this->modeltecnica->buscaridproximo();\r\n\r\n }", "title": "" }, { "docid": "badcb76f97635147a8dbb99a310552bd", "score": "0.62113965", "text": "public function getNumerobat()\n {\n return $this->numerobat;\n }", "title": "" }, { "docid": "2800e83e85f94f93fc58c10b06aebdb9", "score": "0.6209642", "text": "private function getMinimo()\n {\n return $this->getImpuestos()->minimo;\n }", "title": "" }, { "docid": "1098699847fa1f3aca09c20c788e9be1", "score": "0.6201445", "text": "public function getCantidadHabitacion()\n {\n return $this->cantidad_habitacion;\n }", "title": "" }, { "docid": "8d054f74397f729be59464b8087b16d3", "score": "0.6199024", "text": "public function getAmountValue();", "title": "" }, { "docid": "952276425cb2ab7f570da535f902ace6", "score": "0.61828667", "text": "public function BR_CantidadFacturadoUfeg(){\r\n $result = $this->dac->DA_CantidadFacturadoUfeg();\r\n if ($result != false){\r\n\t\t\tif($result->rowCount() > 0){\r\n\t\t\t\treturn $result->fields['Facturado'];\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n }", "title": "" }, { "docid": "d638ba2eecb0bf17b33048e39a1f8263", "score": "0.6181507", "text": "function DameIdProximoCatCvil()\r\n {\r\n return $this->modelcatcvil->buscaridproximo();\r\n\r\n }", "title": "" }, { "docid": "b42b325d7cd953e9b25b059e461946f3", "score": "0.61793953", "text": "function getContingencia(){\r\n return $this->contingencia;\r\n }", "title": "" }, { "docid": "5b1ffea61881c13f79127970ac6b6836", "score": "0.6177239", "text": "public function buscaridproximo()\r\n {\r\n\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $query = Doctrine_Query::create($conn);\r\n\r\n // eliminar el campo\r\n $result = $query->select('max(a.idcategcivil) as maximo')\r\n ->from('Nomcategcivil a')\r\n ->execute()\r\n ->toArray();\r\n\r\n $proximo = isset($result[0]['maximo']) ? $result[0]['maximo'] + 1 : 1;\r\n return $proximo;\r\n\r\n }", "title": "" }, { "docid": "34c3ad13ac2ca4ddbb9df790523d4a13", "score": "0.6177029", "text": "public function getCantidad_tickets()\n {\n return $this->cantidad_tickets;\n }", "title": "" }, { "docid": "632cc564b09bf09166ee2040ed9576e1", "score": "0.6170896", "text": "public function get_total(){\n \n $query = $this->db->query(\"SELECT count(*) cantidad FROM franquicias\");\n return $query->row()->cantidad;\t\t\t\t\t\t\t\t\n }", "title": "" }, { "docid": "4a370a272d486d9c6136241da48241e0", "score": "0.6168696", "text": "function cantidadUsuarios()\n {\n $valor = 0;\n $cantidad= SegUsuario::cantUsuarioAsociadoRol();\n\tif(count($cantidad))\n\t{\n\t\tforeach($cantidad as $valores)\n\t\t{\n\t\t\t if($valores['activo']==1)\t\t\t\n\t\t\t{\n\t\t\t \t$valor = 1;\n\t \t\t\treturn $valor;\n\t\t\t}\n \t}\n \t}\n\telse\n return $valor;\n }", "title": "" }, { "docid": "024131ab125c7e30b3bdb961888bd531", "score": "0.615847", "text": "function getStokPerVariasi($variasi_id)\n {\n $variasi = VariasiDetail::where('variasi_id',$variasi_id)->first();\n if($variasi)\n {\n return $variasi->qty_tersedia;\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "fbf8a51899ae069e7ea1f730ebcde05f", "score": "0.61531085", "text": "public function getMoney() : INT // Fonction pour connaitre le solde du joueur\n {\n return $this-> ;\n }", "title": "" }, { "docid": "edc8219c23cc180f298e9e8807bc4e2b", "score": "0.61485326", "text": "public function getNivel_vigilancia(){\n return $this->nivel_vigilancia;\n }", "title": "" }, { "docid": "5412b28963867507043efd8a7d6befe9", "score": "0.61461747", "text": "public function getCantidadPatio()\n {\n return $this->cantidad_patio;\n }", "title": "" }, { "docid": "6aa4a84577b2852aa066e1053170f66a", "score": "0.6140479", "text": "public function getQuantidade():int\n {\n return $this->quantidade;\n }", "title": "" }, { "docid": "2b2f83d4763335c3c012774e82923656", "score": "0.613328", "text": "public function tipo(): int\n {\n return $this->tipo;\n }", "title": "" }, { "docid": "6611a4d93aebf6fecf74d8acacbefc7e", "score": "0.6132243", "text": "public function getMontantTva() {\n return $this->montantTva;\n }", "title": "" }, { "docid": "252f40d751edddd0f9954c87878aa3f8", "score": "0.6132051", "text": "public function getNumConta(){\n return $this->numConta;\n }", "title": "" }, { "docid": "8764e22cb44b21fc8280e4604518bea2", "score": "0.61319894", "text": "public function cantidad($ultimo){\n\t\t$this->db->query(\"SELECT nombre,precio,cantidad,d.id_articulo FROM `detalle_pedidos` d left join articulos c on c.id_articulo = d.id_articulo where id_pedido = $ultimo\");\n\t\treturn $this->db->numRows();\n\t}", "title": "" }, { "docid": "b6021f884dc455eb7466ed219a5d10aa", "score": "0.61293125", "text": "function DameIdProximoCargMltar()\r\n {\r\n return $this->modelcargomitar->buscaridproximo();\r\n\r\n }", "title": "" }, { "docid": "397972128fea2740443d3b87f232e9bd", "score": "0.61218256", "text": "public function getQuantidadeRegistro () {\n return $this->iQuantidadeRegistro;\n }", "title": "" }, { "docid": "28fed79925ba7ce64eecbc7933a791fa", "score": "0.61179036", "text": "public function getQuantidade()\n {\n return $this->quantidade;\n }", "title": "" }, { "docid": "28fed79925ba7ce64eecbc7933a791fa", "score": "0.61179036", "text": "public function getQuantidade()\n {\n return $this->quantidade;\n }", "title": "" }, { "docid": "afeed04257c3684205ad76df492c594a", "score": "0.6116583", "text": "public function consumoIdeale(){\n\n if(empty($this->ultimoConsumo)|| empty($this->annata)){\n die('non hai riempito tutti i campi necessari');\n }\n return $this->ultimoConsumo - $this->annata;\n }", "title": "" }, { "docid": "f6852782968e32c8924fe06a6c3db9e4", "score": "0.6112894", "text": "public function getValue() {}", "title": "" }, { "docid": "f6852782968e32c8924fe06a6c3db9e4", "score": "0.6112894", "text": "public function getValue() {}", "title": "" }, { "docid": "f6852782968e32c8924fe06a6c3db9e4", "score": "0.6112894", "text": "public function getValue() {}", "title": "" }, { "docid": "f6852782968e32c8924fe06a6c3db9e4", "score": "0.6112894", "text": "public function getValue() {}", "title": "" }, { "docid": "f6852782968e32c8924fe06a6c3db9e4", "score": "0.6112894", "text": "public function getValue() {}", "title": "" }, { "docid": "e1fdc1d7a6d2a36a894ea149bf5a7d58", "score": "0.6110119", "text": "public function getCantidadCubiculo()\n {\n return $this->cantidad_cubiculo;\n }", "title": "" }, { "docid": "3a78f40d73b72b61d2a6d7f0e9f000df", "score": "0.6096275", "text": "public function getMilieu()\n {\n # code...\n }", "title": "" } ]
d4fc34c1e62c827e6736e634043d8118
QueueSize Lets us know how many unprocessed recipients are left in the queue.
[ { "docid": "811833845633d6ed8ba97cfdccf22ab5", "score": "0.65559113", "text": "function QueueSize($queueid=0, $queuetype='')\n\t{\n\t\t$queueid = (int)$queueid;\n\t\t$queuetype = strtolower($queuetype);\n\n\t\t$query = \"SELECT COUNT(recipient) AS count FROM \" . SENDSTUDIO_TABLEPREFIX . \"queues WHERE queueid='\" . $queueid . \"' AND queuetype='\" . $this->Db->Quote($queuetype) . \"' AND processed='0'\";\n\t\t$result = $this->Db->Query($query);\n\t\tif (!$result) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$row = $this->Db->Fetch($result);\n\t\treturn $row['count'];\n\t}", "title": "" } ]
[ { "docid": "3e607163d9410bca5678fa05b6e145af", "score": "0.7384427", "text": "public function getQueueSize(): int\n {\n return count($this->queue);\n }", "title": "" }, { "docid": "d22f8bdac0ee964ed4caa804b684fe16", "score": "0.73242974", "text": "function UnsentQueueSize($queueid=0)\n\t{\n\t\t$query = \"SELECT COUNT(recipient) AS count FROM \" . SENDSTUDIO_TABLEPREFIX . \"queues_unsent WHERE queueid='\" . $this->Db->Quote($queueid) . \"'\";\n\t\treturn $this->Db->FetchOne($query, 'count');\n\t}", "title": "" }, { "docid": "14e995b856072edbb48327feb060e229", "score": "0.70105886", "text": "private function getQueueCount() : int {\n $this->refreshQueue();\n return $this->queue->numberOfItems();\n }", "title": "" }, { "docid": "5979d97ca877e8f979c81a2b7ed97fac", "score": "0.68508404", "text": "public function getQueueLength()\n {\n $all = $this->em->getRepository('App:Queue')->tableSize();\n return isset($all[0]['total']) ? $all[0]['total'] : 0;\n }", "title": "" }, { "docid": "c83776302f0ec5d52e7e878729a874ac", "score": "0.6750157", "text": "public function size($queue)\n {\n }", "title": "" }, { "docid": "2d5e01c3b786de1f49bd90da8bee8ad9", "score": "0.6635823", "text": "public function queue_size(&$queue) { \n // Just using count will give the proper number: \n return count($queue); \n}", "title": "" }, { "docid": "d09e70a658561ca596733d8984e59e64", "score": "0.661879", "text": "public function queueTotal()\n {\n return count($this->queue);\n }", "title": "" }, { "docid": "5ed04508f2cd48d84196ad13aefc0572", "score": "0.6549942", "text": "private function getQueueCount() {\n $this->refreshQueue();\n // Get the number of items.\n $number_of_queue = $this->queue->numberOfItems();\n // Wipe things clean so tests are not sitting in the queue later.\n $this->deleteQueue();\n return $number_of_queue;\n }", "title": "" }, { "docid": "c3b143df7da126bcf1379508ce5b837c", "score": "0.64807874", "text": "public function outQueueLength()\n {\n return $this->getSNMP()->walk1d( self::OID_IF_OUT_QUEUE_LENGTH );\n }", "title": "" }, { "docid": "dd3166c0e88c98e5b2adeb86cf61b306", "score": "0.6289226", "text": "public function getNumberOfItems($queue_type): int;", "title": "" }, { "docid": "28cdae35b400f77d87768c1bb2a48b17", "score": "0.627545", "text": "function message_queue_send_emails() {\n\t\n\tset_time_limit(0);\n \t\n\t$max_emails = elgg_get_plugin_setting('max_emails', 'message_queue');\n\tif (!$max_emails) {\n\t\t$max_emails = 200;\n\t}\n \t$emails_sent = 0;\n \t\n \t// start with current jobs (left over from previous cron run)\n \t\n \t$emails_sent = message_queue_send_message_type('sending',$emails_sent,$max_emails);\n \t\n \t$message_limit = $max_emails-$emails_sent;\n \t\n \t// if still within quota, start new jobs\n \tif ($message_limit > 0) { \t\n\t\tmessage_queue_send_message_type('unsent',$emails_sent,$max_emails);\n \t}\n}", "title": "" }, { "docid": "23513fc7d6e9b36bd40d195364ca22d3", "score": "0.62380105", "text": "public function getQueuedInboundCount()\n\t{\n\t\t$qd = $this->getQueueDepthData();\n\t\treturn $qd->getInboundCount();\n\t}", "title": "" }, { "docid": "7393b9a6c78f1d0adc7051316caa88a8", "score": "0.6210626", "text": "public function size($queue = null)\n {\n return 0;\n }", "title": "" }, { "docid": "7393b9a6c78f1d0adc7051316caa88a8", "score": "0.6210626", "text": "public function size($queue = null)\n {\n return 0;\n }", "title": "" }, { "docid": "3edd718e2572dcc8080cd6c785480a45", "score": "0.61597854", "text": "private function queuedItems()\n {\n return Capsule::table('steam_queue')\n ->where('status', 'queued')\n ->count();\n }", "title": "" }, { "docid": "a2bd7061b800820bae2a575dce655ae4", "score": "0.6084554", "text": "public function getNumberOfItemsPerQueue($queue_type): array;", "title": "" }, { "docid": "ead11535b9710d46508fa3315bf3b621", "score": "0.6054828", "text": "private function updateQueueSizeField() {\n\t\treturn '<h2>Updating events queue_size field.</h2>' .\n\t\t\t'<p> Updating ' . tx_oelib_db::update(\n\t\t\t\tSEMINARS_TABLE_SEMINARS,\n\t\t\t\t'queue_size > 1',\n\t\t\t\tarray('queue_size' => 1)\n\t\t\t) . ' events.</p>';\n\t}", "title": "" }, { "docid": "572f203890593d3428c64ba4111fe0fd", "score": "0.6016251", "text": "public function size($queue = null)\n {\n $info = $this->channel->basic_get($this->getQueue());\n return $info ? $info['message_count'] : 0;\n }", "title": "" }, { "docid": "429772246d1e825007ba6def383d32c1", "score": "0.6009748", "text": "public static function queueSize() {\n $ch = curl_init();\n // set URL option\n curl_setopt($ch, CURLOPT_URL, API_URL . 'queue_size');\n // set return transfer to true so that we get data back\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n // execute the curl request and convert from json to an array\n $response = json_decode(curl_exec($ch), true);\n \n // return just the queue_size index of the array\n return intval($response['result']['queue_size']);\n }", "title": "" }, { "docid": "1ded5536dc10d29d87637784e72e071a", "score": "0.6003791", "text": "public function count()\n {\n return $this->queue->count();\n }", "title": "" }, { "docid": "f0427c7411de985b3affa00385c79165", "score": "0.5998276", "text": "public function sizeDelay($queue)\n {\n }", "title": "" }, { "docid": "2465d62abcf33c577738e045ef650113", "score": "0.5965029", "text": "public function size($queue = null)\n {\n $queueInfo = $this->azure->getQueue($this->getQueue($queue));\n return $queueInfo->getMessageCount();\n }", "title": "" }, { "docid": "d17b2eecbca12c21e5725c321fb1dac0", "score": "0.59096414", "text": "public function testQueueCounted()\n {\n $this->expectSuccess();\n\n $this->connection->enableCustomQueue(\"foobar\", 5);\n for ($i = 0; $i < 5; ++$i) {\n $this->expectFailure();\n }\n\n $this->expectSuccess();\n }", "title": "" }, { "docid": "5713127c846e0281aff1064384a80529", "score": "0.5898169", "text": "function countQueued($params = NULL) {\n return Notifications_Queue::queue_count($params);\n }", "title": "" }, { "docid": "18828ab4a76f884bc9855790ca53f26f", "score": "0.5859395", "text": "public function getTotalRequestsCount()\n {\n return count($this->queue);\n }", "title": "" }, { "docid": "82c3ac6632dc7a1664b52a46c5569b6d", "score": "0.5793926", "text": "public function getNumberOfMessages();", "title": "" }, { "docid": "20cc93c9051c6b980edd4d1ec9907c2d", "score": "0.57266414", "text": "public function getQueuedStatusCount()\n\t{\n\t\t$qd = $this->getQueueDepthData();\n\t\treturn $qd->getStatusCount();\n\t}", "title": "" }, { "docid": "761e828ad7514538758e9f57ab861432", "score": "0.5610574", "text": "public function getTotalQtyUndelivered()\n {\n return INF;\n }", "title": "" }, { "docid": "cf57df89c4ddf4035306d6cce6e1ccbe", "score": "0.55848473", "text": "public static function size($queue = null)\n {\n /** @var \\Illuminate\\Support\\Testing\\Fakes\\QueueFake $instance */\n return $instance->size($queue);\n }", "title": "" }, { "docid": "81637492bd5be51d45bbe2c40ceebe86", "score": "0.5579962", "text": "public function sizeDelayed($queue)\n {\n return $this->redis->zcard(self::redisKey($this->getQueue($queue), 'delayed'));\n }", "title": "" }, { "docid": "10c62951b1071c399e1ce4b410097e43", "score": "0.5576692", "text": "public function count()\n\t\t{\n\t\t\t$query = \"\n\t\t\t\tselect count(*)\n\t\t\t\tfrom \" . $this->getQueueEntryTableName() . \"\n\t\t\t\twhere\n\t\t\t\t\tqueue_id = ?\n and date_available <= ?\n and (date_expire IS NULL OR date_expire >= ?)\n \";\n\t\t\treturn DB_Util_1::querySingleValue($this->db,\n $query,\n array(\n $this->model->queue_id,\n\t\t\t\t\t\tdate(\"Y-m-d H:i:s\"),\n\t\t\t\t\t\tdate(\"Y-m-d H:i:s\")\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t}", "title": "" }, { "docid": "548bd076319ebc5748ec018d8c8e2918", "score": "0.5554122", "text": "public function size() {\n return sizeof($this->items);\n }", "title": "" }, { "docid": "548bd076319ebc5748ec018d8c8e2918", "score": "0.5554122", "text": "public function size() {\n return sizeof($this->items);\n }", "title": "" }, { "docid": "548bd076319ebc5748ec018d8c8e2918", "score": "0.5554122", "text": "public function size() {\n return sizeof($this->items);\n }", "title": "" }, { "docid": "8062e19f24ff538047a2807ec5ba1523", "score": "0.5552407", "text": "function messageCount()\r\n {\r\n return $this->_pop3->numMsg();\r\n }", "title": "" }, { "docid": "fc5c62041ecf3375fb519785ab473d97", "score": "0.5546659", "text": "public function size($queue)\n {\n return $this->redis()->llen($this->prefix('queue:' . $queue));\n }", "title": "" }, { "docid": "81a268d23d134b16711432ca8ef18392", "score": "0.55423045", "text": "public function size($queue)\n {\n return $this->redis->llen(self::redisKey($this->getQueue($queue)));\n }", "title": "" }, { "docid": "27ff578937fb3828989078297b886c22", "score": "0.55293214", "text": "public function getQueueType(): int;", "title": "" }, { "docid": "7f634d49a1f26596273c9d298810b4c3", "score": "0.5526511", "text": "public function size()\n {\n return sizeof($this->items);\n }", "title": "" }, { "docid": "46c38301b4ffb59cb835adcbf5768eaa", "score": "0.55226547", "text": "function countMessages() {\n return $this->mail->countMessages();\n }", "title": "" }, { "docid": "e9a7fe01a306fe36683d7c35545ea37a", "score": "0.55196154", "text": "private function _reduceSize() {\n if ($this->size > 0) {\n $this->size--;\n }\n }", "title": "" }, { "docid": "6031f7c2761da45044e0e02cc3ac2d2c", "score": "0.550835", "text": "public function getMessageQueueManager();", "title": "" }, { "docid": "1c2cf82887f01bfe1126f58355d20c63", "score": "0.5499475", "text": "private function validateIfPeopleLargeQueueCanDequeue(): void\n {\n try {\n $this->validateIfQueueHasPenddings('emergencyLarge');\n $this->validateIfQueueHasPenddings('emergencySmall');\n $this->validateIfQueueHasPenddings('vipLarge');\n $this->validateIfQueueHasPenddings('vipSmall');\n } catch (Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "ff7bc189f4af01bdf07deb5d208bdac4", "score": "0.5445739", "text": "public function getQueuedSlots()\n {\n if (isset(self::$_queued['tot'])) {\n return (int)self::$_queued['tot'];\n }\n return (int)self::$_queued['tot'] = self::getClass('TaskManager')\n ->count(\n array(\n 'stateID' => self::getQueuedStates(),\n 'storagenodeID' => $this->get('enablednodes'),\n 'typeID' => $this->get('usedtasks'),\n )\n );\n }", "title": "" }, { "docid": "0515e4ab176953caf0dc9666717a654a", "score": "0.5443338", "text": "protected function fetchInheritanceQueueCount(): int\n {\n /** @var \\TYPO3\\CMS\\Core\\Database\\Query\\QueryBuilder $queryBuilder */\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)\n ->getQueryBuilderForTable(InheritanceQueueRepository::TABLE_NAME);\n $queryBuilder->getRestrictions()->removeAll();\n\n return $queryBuilder\n ->addSelectLiteral('COUNT(*) as cnt')\n ->from(InheritanceQueueRepository::TABLE_NAME)\n ->where(\n $queryBuilder->expr()->eq(\n 'indexed',\n $queryBuilder->createNamedParameter(0, \\PDO::PARAM_INT)\n ),\n $queryBuilder->expr()->eq(\n 'errors',\n $queryBuilder->createNamedParameter('', \\PDO::PARAM_STR)\n )\n )\n ->execute()\n ->fetchOne();\n }", "title": "" }, { "docid": "f801c61e3355f6a88c61c6c7bebaf5d8", "score": "0.54310656", "text": "public function getNumberOfMessages()\n {\n return $this->numberOfMessages;\n }", "title": "" }, { "docid": "e5f21b376b16afc293925ba8c274154c", "score": "0.5427274", "text": "public function getRemainingEmailQuta(){\n $quota = $this->_sesClient->getSendQuota();\n return (int)$quota->get('Max24HourSend') - (int)$quota->get('SentLast24Hours');\n }", "title": "" }, { "docid": "fad72aa541352f1d11355d5620c19e1f", "score": "0.5404436", "text": "public function getPendingEventsCount()\n {\n return inotify_queue_len($this->_inotify);\n }", "title": "" }, { "docid": "727f8f2e30c7e0b468480755e63b48ba", "score": "0.54042554", "text": "public function recoverStuckJobs()\n {\n $queues = $this->queues();\n\n $count = 0;\n\n foreach ($queues as $queue) {\n $jobs_count = $this->countAllJobs($queue);\n $signals_count = $this->countFairSignals($queue, '*');\n\n if($jobs_count > $signals_count) {\n $queue_size = $jobs_count - $signals_count;\n $count += $queue_size;\n $this->generateFakeSignals($queue, $queue_size);\n }\n }\n\n return $count;\n }", "title": "" }, { "docid": "227d0ad39151adff6e1f54f1989853ac", "score": "0.53361756", "text": "public function countMails()\n\t{\n\t\treturn $this->count;\n\t}", "title": "" }, { "docid": "620e4ba42ba086b913d522d3b15a230d", "score": "0.5318615", "text": "public function size(): int\n {\n return count($this->items);\n }", "title": "" }, { "docid": "6fda46ed4ddea0befeb9159637b49da5", "score": "0.5318168", "text": "public function count()\n {\n return $this->size;\n }", "title": "" }, { "docid": "6fda46ed4ddea0befeb9159637b49da5", "score": "0.5318168", "text": "public function count()\n {\n return $this->size;\n }", "title": "" }, { "docid": "53533d9ec5faf64941c46deda6dc2046", "score": "0.5317497", "text": "public function size() {\r\n return $this->count;\r\n }", "title": "" }, { "docid": "98351079dc9a4fc8a9b2afe27d885876", "score": "0.53123957", "text": "public function getHeapSize()\n {\n return parent::getHeapSize() +\n count($this->_progressiveDownloadInfo) * 8;\n }", "title": "" }, { "docid": "ea24556802831c92d31457e975728b88", "score": "0.5312118", "text": "private function getQueueStats() {\n\t\t$queueStats = commsOutboundQueue::getQueueStats();\n\t\tforeach ( $queueStats as $msgType => $count ) {\n\t\t\t$this->setStatusParam($msgType, $count);\n\t\t}\n\t}", "title": "" }, { "docid": "ccf7fb0e446523bd55ad383d0f97f89d", "score": "0.53067845", "text": "private function validateIfCargoLargeQueueCanDequeue(): void\n {\n try {\n $this->validateIfQueueHasPenddings('emergencyLarge');\n $this->validateIfQueueHasPenddings('emergencySmall');\n $this->validateIfQueueHasPenddings('vipLarge');\n $this->validateIfQueueHasPenddings('vipSmall');\n $this->validateIfQueueHasPenddings('peopleLarge');\n $this->validateIfQueueHasPenddings('peopleSmall');\n } catch (Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "b215b6799d9d81e6043651ad9e3ff3ed", "score": "0.53024906", "text": "public function getNumItemsProcessed()\n {\n return $this->tracker->getNumProcessedItems();\n }", "title": "" }, { "docid": "219e4bf567408899380a5a76435e83a7", "score": "0.5282768", "text": "public function count_messages(){\n\n\t\t$check = imap_check($this->inbox);\n\t\treturn $this->email_count = $check->Nmsgs;\n\n\t}", "title": "" }, { "docid": "1e8aad7c9d27dc6bf77753a5d7dfa1fd", "score": "0.52795434", "text": "public function size()\n {\n return count($this->_items);\n }", "title": "" }, { "docid": "1082eb822c78398650254985599f06cd", "score": "0.5279103", "text": "public function attempts()\n {\n return $this->instance->getDequeueCount();\n }", "title": "" }, { "docid": "b013df7eee892b8fdcb6c304bd1db0ad", "score": "0.5274636", "text": "public function size(): int {\n return count($this->products);\n }", "title": "" }, { "docid": "efd489a5450d419a0297221875cfc1f3", "score": "0.52625805", "text": "function emailsQuotaUsed()\n {\n\t\t\t// get the record information\n $quota = getOneAssocArray( 'select sum(records) as emails_sent from campaigns_history where date(created) = curdate()');\n\n return $quota['emails_sent'];\n }", "title": "" }, { "docid": "388e850706af55960f696487e0addd86", "score": "0.5262378", "text": "public function getMaxJobsCount();", "title": "" }, { "docid": "d36d1c9871816baf0d14dd7f311cd66a", "score": "0.5258429", "text": "public function getLength () {\n\t\treturn $this->handlers->used;\n\t}", "title": "" }, { "docid": "db42b65b7dd20ea2a183c88a2f66d777", "score": "0.52458674", "text": "public function size()\n\t{\n\t\treturn count($this->_items);\n\t}", "title": "" }, { "docid": "c32edc6ef4053954d497b83967ab7b7d", "score": "0.52435476", "text": "public function \t\t size() {\n Debug::trace();\n return $this->size;\n }", "title": "" }, { "docid": "49cbbd3e3ee4cff14af99683cc709eda", "score": "0.52382493", "text": "public function size() {\n\t\treturn sizeof($this->elements);\n\t}", "title": "" }, { "docid": "57ae13b47d7fa71c00730fe661380ee6", "score": "0.52271235", "text": "private function validateIfPeopleSmallQueueCanDequeue(): void\n {\n try {\n $this->validateIfQueueHasPenddings('emergencyLarge');\n $this->validateIfQueueHasPenddings('emergencySmall');\n $this->validateIfQueueHasPenddings('vipLarge');\n $this->validateIfQueueHasPenddings('vipSmall');\n $this->validateIfQueueHasPenddings('peopleLarge');\n } catch (Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "0461573eeaa463fe3d5afe472f51c9ff", "score": "0.52238554", "text": "public function size() {}", "title": "" }, { "docid": "081cfcbf202358fa46f1b8b615157753", "score": "0.5219955", "text": "function size()\n\t{\n\t\treturn $this->size;\n\t}", "title": "" }, { "docid": "0994b88565eaf9fb6bb23f83d331aa90", "score": "0.52106255", "text": "public function size()\n\t{\n\t\treturn $this->count;\n\t}", "title": "" }, { "docid": "c03ac2b1f12b78411c550d20f99c1f92", "score": "0.5210232", "text": "public function size()\n\t{\n\t\treturn count($this->_stream);\n\t}", "title": "" }, { "docid": "bdcda4d2fa645bb61cd85ce6a26c4b2a", "score": "0.52086836", "text": "public function size(): int {\n return $this->count();\n }", "title": "" }, { "docid": "599c2ba265992b33b6c635ff33a21acf", "score": "0.52069706", "text": "public function getMessagesCount()\n {\n return $this->getState('__messageCounter', 0);\n }", "title": "" }, { "docid": "37df759538711ad3d55596bcff34c810", "score": "0.5203756", "text": "public function getTotalMaxSize() {\r\n return 0;\r\n }", "title": "" }, { "docid": "9f15112e5be7de81f4fce394c4aa723c", "score": "0.5203121", "text": "private function validateIfEmergencySmallQueueCanDequeue(): void\n {\n try {\n $this->validateIfQueueHasPenddings('emergencyLarge');\n } catch (Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "6fce4fe085d04a291ad12824db820e33", "score": "0.5188418", "text": "public function size() {\n\t\treturn $this->size;\n\t}", "title": "" }, { "docid": "d443fdaacb7b4c1802f4d9dcc3605fb6", "score": "0.5186307", "text": "public function get_email_queue($to) {\n\t\t$query = $this->db->select ( \"MAX(id) as id\" )->where ( \"to = '$to'\" )->limit ( 1 )->get ( \"email_queue\" );\n\t\treturn $query->row ()->id;\n\t}", "title": "" }, { "docid": "a186631b4a5f0cd090aaa7454ecf8e45", "score": "0.5184586", "text": "public function getTotalMails(){\n if(!$this->marubox) return false; \n\n return imap_num_msg($this->marubox); \n }", "title": "" }, { "docid": "587b67aec1f3dce5ef02d131034be95e", "score": "0.51838565", "text": "public function getHeapSize()\n {\n return parent::getHeapSize() + 4 + count($this->_chunkOffsetTable) * 4;\n }", "title": "" }, { "docid": "3a0f257edb6fc9866e3007ec8982e9d0", "score": "0.5181378", "text": "public function count()\n {\n if ($this->hasMessages()) {\n return count($this->getMessages());\n }\n\n return 0;\n }", "title": "" }, { "docid": "a2b537318cecabaeb7fd74c2577d4e16", "score": "0.51811934", "text": "public function getBodySize()\n {\n return $this->bodySize;\n }", "title": "" }, { "docid": "06846b77240707cc87913c0c885107d0", "score": "0.5179599", "text": "public function send()\n {\n\n $_helper = Mage::helper('smtppro');\n\n // if we have a valid queue page size override, use it\n if (is_numeric($_helper->getQueuePerCron()) &&\n intval($_helper->getQueuePerCron()) > 0) {\n\n $percron = $_helper->getQueuePerCron();\n $_helper->log('SMTP Pro using queue override page size: '. $percron);\n } else {\n $percron = self::MESSAGES_LIMIT_PER_CRON_RUN;\n }\n\n\n $pauseMicros = 0;\n // if we have a valid pause, use it\n if (is_numeric($_helper->getQueuePause()) &&\n intval($_helper->getQueuePause()) > 0) {\n\n $pauseMicros = $_helper->getQueuePause() * 1000; // * 1000 for millis => micros\n $_helper->log('SMTP Pro using queue override pause: '. $pauseMicros);\n }\n\n /** @var $collection Mage_Core_Model_Resource_Email_Queue_Collection */\n $collection = Mage::getModel('core/email_queue')->getCollection()\n ->addOnlyForSendingFilter()\n ->addFieldToFilter('failed', array('eq' => '0')) //Add filter in collection. Extract only message with processetAt is null and failed is 0\n ->setPageSize($percron)\n ->setCurPage(1)\n ->load();\n\n\n ini_set('SMTP', Mage::getStoreConfig('system/smtp/host'));\n ini_set('smtp_port', Mage::getStoreConfig('system/smtp/port'));\n\n /** @var $message Mage_Core_Model_Email_Queue */\n foreach ($collection as $message) {\n if ($message->getId()) {\n $parameters = new Varien_Object($message->getMessageParameters());\n if ($parameters->getReturnPathEmail() !== null) {\n $mailTransport = new Zend_Mail_Transport_Sendmail(\"-f\" . $parameters->getReturnPathEmail());\n Zend_Mail::setDefaultTransport($mailTransport);\n }\n\n $mailer = new Zend_Mail('utf-8');\n foreach ($message->getRecipients() as $recipient) {\n list($email, $name, $type) = $recipient;\n switch ($type) {\n case self::EMAIL_TYPE_BCC:\n $mailer->addBcc($email, '=?utf-8?B?' . base64_encode($name) . '?=');\n break;\n case self::EMAIL_TYPE_TO:\n case self::EMAIL_TYPE_CC:\n default:\n $mailer->addTo($email, '=?utf-8?B?' . base64_encode($name) . '?=');\n break;\n }\n }\n\n if ($parameters->getIsPlain()) {\n $mailer->setBodyText($message->getMessageBody());\n } else {\n $mailer->setBodyHTML($message->getMessageBody());\n }\n\n $mailer->setSubject('=?utf-8?B?' . base64_encode($parameters->getSubject()) . '?=');\n $mailer->setFrom($parameters->getFromEmail(), $parameters->getFromName());\n if ($parameters->getReplyTo() !== null) {\n $mailer->setReplyTo($parameters->getReplyTo());\n }\n if ($parameters->getReturnTo() !== null) {\n $mailer->setReturnPath($parameters->getReturnTo());\n }\n\n try {\n\n\n $transport = new Varien_Object();\n Mage::dispatchEvent('aschroder_smtppro_queue_before_send', array(\n 'mail' => $mailer,\n 'transport' => $transport,\n 'message' => $message\n ));\n\n if ($transport->getTransport()) { // if set by an observer, use it\n $mailer->send($transport->getTransport());\n } else {\n $mailer->send();\n }\n\n unset($mailer);\n $message->setProcessedAt(Varien_Date::formatDate(true));\n $message->save();\n\n // loop each email to fire an after send event\n foreach ($message->getRecipients() as $recipient) {\n list($email, $name, $type) = $recipient;\n Mage::dispatchEvent('aschroder_smtppro_after_send', array(\n 'to' => $email,\n 'template' => \"queued email\",\n // TODO: should we preserve the template id in the queue object, in order to include it here?\n 'subject' => $parameters->getSubject(),\n 'html' => !$parameters->getIsPlain(),\n 'email_body' => $message->getMessageBody()));\n }\n\n\n }\n catch (Exception $e) {\n unset($mailer);\n $oldDevMode = Mage::getIsDeveloperMode();\n Mage::setIsDeveloperMode(true);\n Mage::logException($e);\n Mage::setIsDeveloperMode($oldDevMode);\n\n $this->notifyAdmin($message, $e); //call function that notify admin user\n $_helper->log('Error send email with message ID: ' . $message->getMessageId() . ' Message type: '. $message->getEntityType()); //report error in log module\n\n continue;\n }\n\n // after each valid message has been sent - pause if required\n if ($pauseMicros > 0) {\n $_helper->log('SMTP Pro pausing.');\n usleep($pauseMicros);\n }\n\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "adabd0a4f31c47a45ddeb219bb4ebfc5", "score": "0.5171639", "text": "public function testQueueSizeSensorPlugin() {\n\n $this->installSchema('system', ['queue']);\n\n // Create queue sensor.\n $sensor_config = SensorConfig::create(array(\n 'id' => 'core_queue_monitoring_test',\n 'plugin_id' => 'queue_size',\n 'value_type' => 'number',\n 'settings' => array(\n 'queue' => 'monitoring_test'\n )\n ));\n $sensor_config->save();\n\n // Create queue with some items and run sensor.\n $queue = \\Drupal::queue('monitoring_test');\n $queue->createItem(array());\n $queue->createItem(array());\n $result = $this->runSensor('core_queue_monitoring_test');\n $this->assertEqual($result->getValue(), 2);\n }", "title": "" }, { "docid": "2721699eb38533a7d248ebd1ee052118", "score": "0.51669216", "text": "public function size()\n\t{\n\t\treturn $this->size;\n\t}", "title": "" }, { "docid": "f06a3f108422f539d21f66aea9fd947a", "score": "0.51642334", "text": "protected function howBigWasThatQuery()\r\n {\r\n \treturn $this->itemCount;\r\n }", "title": "" }, { "docid": "85879a940b09772cf7befaf83abe65f3", "score": "0.5163494", "text": "private function validateIfVipLargeQueueCanDequeue(): void\n {\n try {\n $this->validateIfQueueHasPenddings('emergencyLarge');\n $this->validateIfQueueHasPenddings('emergencySmall');\n } catch (Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "097b9c33ddaae8a209260f01e36084dd", "score": "0.5163074", "text": "public function count()\n {\n return count($this->messages);\n }", "title": "" }, { "docid": "347515a176aa7e2bc7d8c418259e11ae", "score": "0.516271", "text": "function popstat () {\n // msgs in the mailbox, and the size of the mbox in octets.\n\n $PopArray = $this->last(\"array\");\n\n if($PopArray == -1) { return false; }\n\n if( (!$PopArray) or (empty($PopArray)) )\n {\n return false;\n }\n return $PopArray;\n }", "title": "" }, { "docid": "1909f3137823af6770f99311308059b8", "score": "0.5160464", "text": "private function getSize() { return $this->_size; }", "title": "" }, { "docid": "3c5cfa3de0bb28a422097fe1627dcb59", "score": "0.5160299", "text": "public function size() : int {\n return $this->size;\n }", "title": "" }, { "docid": "2f9b0827404daa49380de656eb559b8f", "score": "0.5156874", "text": "public function queueEmails(\\Neos\\Flow\\Aop\\JoinPointInterface $joinPoint) {\n\n\t\tif ($this->jobContext->isMailQueueingDisabled()) {\n\t\t\treturn $joinPoint->getAdviceChain()->proceed($joinPoint);\n\t\t}\n\n\t\t/** @var Message $email */\n\t\t$email = $joinPoint->getProxy();\n\t\t$job = new MailJob($email);\n\t\t$this->jobManager->queue($email->getQueueName() ? $email->getQueueName() : 'fdmailer-mail-queue', $job);\n\n\t\t// Neos\\SwiftMailer\\Message->send() should return the number of recipients who were accepted for delivery\n\t\t// We dont know that until mail is execured by queue so we assume every recipient was accepted\n\t\t// @todo: read recipient count and return that\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "88dcf4caa7f724c9a7fb74a02824e32d", "score": "0.51544905", "text": "public function size() {\n return $this->count();\n }", "title": "" }, { "docid": "fc0b37fa7f854c88981f3c97b8d19e67", "score": "0.51536804", "text": "public function getMaxMessageSize()\n {\n return $this->max_message_size;\n }", "title": "" }, { "docid": "2674bca6e4a622bec6b3f0e3cf74e5a7", "score": "0.5150928", "text": "public static function getQueueName(): string;", "title": "" }, { "docid": "75425f57f9a789fd826cf491b19f8678", "score": "0.5150558", "text": "public function getMsgCount()\n {\n return $this->count(self::MSG);\n }", "title": "" }, { "docid": "1d108a134fd48d41e93af92538761ff5", "score": "0.51414746", "text": "public function process_mail_que($quiet = false)\n {\n $log_data['runtime_jobname'] = __FUNCTION__;\n $log_data['start'] = $this->get_date();\n\n if (!$quiet) {\n echo \"** PROCESS EMAIL QUE\\n\";\n }\n $this->load->model('emailque_model');\n $mail_que = [];\n $mail_que = $this->emailque_model->get_emailque_list($this->ini_array['emailque']['que_size'], 5);\n if ($mail_que) {\n $log_data['runtime_count'] = count($mail_que);\n foreach ($mail_que as $mail_id => $mail_data) {\n $mail_sent = $this->send_mail($mail_data);\n // $mail_sent=1;\n if (!$quiet) {\n echo $mail_data['emailque_to_address'] . \": \" . fyesNo($mail_sent) . \"\\n\";\n }\n if ($mail_sent) {\n $status_id = 6;\n } else {\n $status_id = 7;\n }\n $this->emailque_model->set_emailque_status($mail_id, $status_id);\n }\n if (!$quiet) {\n echo \"Mailqueue has processed \" . sizeof($mail_que) . \" mail(s): \" . date(\"Y-m-d H:i:s\") . \"\\n\\r\";\n }\n } else {\n if (!$quiet) {\n echo \"Nothing to process in mailqueue: \" . date(\"Y-m-d H:i:s\") . \"\\n\\r\";\n }\n }\n // LOG RUNTIME DATA\n $log_data['end'] = $this->get_date();\n $this->log_runtime($log_data);\n }", "title": "" }, { "docid": "82330ffb4628d214abeda42c9c61879c", "score": "0.5136319", "text": "public function maxQueue($function, $queueSize = null) {\n\t\t$gearman = $this->_connect();\n\n\t\tfputs($gearman, \"maxqueue $function\" . ($queueSize !== null ? \" $queueSize\" : ''));\n\n\t\tfclose($gearman);\n\t}", "title": "" }, { "docid": "a5cdf88657ebf3351acd51358124f77d", "score": "0.5134596", "text": "private function allocateMailSlots()\r\n\t{\r\n\t\tif(isset($_SESSION['current_mail_slot'])) \r\n\t\t{ \r\n\t\t\tif($_SESSION['current_mail_slot'] >= $this->slots) { \r\n\t\t\t\t$this->sessionmessage('Mail slots exceeded. It is not allowed to send more than '.$this->slots.' per session.'); \r\n\t\t\t\treturn FALSE; \r\n\t\t\t\t} else { \r\n\t\t\t\t$_SESSION['current_mail_slot']++; \r\n\t\t\t} \r\n\t\t} else { \r\n\t\t\t$_SESSION['current_mail_slot'] = 1; \r\n\t\t} \r\n\t}", "title": "" } ]
18bb1f4bfca8dcb2baf267b55be4d76c
Returns Assigned Security questions for select user
[ { "docid": "ae97cc79a7a2df99ada79e9ad6b24d8b", "score": "0.6117143", "text": "public static function getAssignedSecurityQuestions($userName,$domain) {\n $client = self::getWebService('CSFAdminWSService');\n $params = new \\CSFAdminWSService\\findAssignedSecurityQuestions();\n $params->userName = $userName;\n $params->domainName = $domain;\n $rt = $client->findAssignedSecurityQuestions($params);\n if (self::checkErrorStatus($rt)) {\n throw new DataModelException(self::$lastErrorCode);\n }\n return $rt->return->longs;\n }", "title": "" } ]
[ { "docid": "7975a5661677e52603d2689169cba6ec", "score": "0.6525271", "text": "public function getUserSecurityAllQuestions() {\n\n $select = $this->select()\n ->setIntegrityCheck(false)\n ->from(\n array('q' => 'AGENTSECURITYQUESTION')\n )\n ->order('q.ordinal ASC');\n $allQuestions = $this->fetchAll($select);\n $returnVal = array();\n foreach ($allQuestions as $questionRow) {\n $returnVal[$questionRow->agentSecurityQuestionID] = $questionRow->question;\n }\n\n return $returnVal;\n }", "title": "" }, { "docid": "02d5a8082f785547e9ccd0d2a7eadd47", "score": "0.6472874", "text": "public function getUserSecurityQuestions() {\n\t\t// only get a random one per login attempt. \n\t\t\n\t\t\n\t\t\n\t\t$db = dbConnect::getInstance();\n\t\t$mysqli = $db->getConnection();\n\t\t\n\t\t//we know we have a valid username so lets get the password hash and compare.\n\t\t$stmt = $mysqli->prepare(\"SELECT questionId,answer FROM securityAnswer WHERE userid=? \");\n\t\t$stmt->bind_param(\"s\", $this->userid);\n\t\t$stmt->execute();\n\t\t$stmt->bind_result($q,$a);\n\t\t\n\t\t$result = $stmt->get_result();\n\t\t\n\t\twhile ($row = $result->fetch_row()){\n\t\t\t$rows[] = $row;\n\t\t}\n\t\t$stmt->free_result();\n\t\t//$mysqli->close();\n\t\t\n\t\treturn $rows;\n\t}", "title": "" }, { "docid": "0306d70c693b3122bf6547973d302d28", "score": "0.6143895", "text": "public function display(){\n\n $query = $this->db->query(\"SELECT security_question.name FROM security_question JOIN user ON security_question.security_question_id = user.security_question_id WHERE email='\".$this->session->userdata['username'].\"'\");\n\n foreach ($query->result() as $row) {\n $this->TPL['security_question'] = $row->name;\n }\n $this->template->show('securityquestion', $this->TPL);\n }", "title": "" }, { "docid": "e34c9f88fb7058ef8a473c78fa4384fc", "score": "0.60006434", "text": "public function getRandomSecurityQuestion() {\n\t\t// only get a random one per login attempt. \n\t\t\n\t\tif(isset($this->securityQuestion) && $this->securityQuestion != ''){\n\t\t\treturn $this->securityQuestion;\n\t\t}\n\t\t\n\t\t$db = dbConnect::getInstance();\n\t\t$mysqli = $db->getConnection();\n\t\t\n\t\t//we know we have a valid username so lets get the password hash and compare.\n\t\t$stmt = $mysqli->prepare(\"SELECT idsecurityQuestions,question FROM securityQuestions INNER JOIN securityAnswer ON securityQuestions.idsecurityQuestions=securityAnswer.questionId WHERE securityAnswer.userid=? ORDER BY RAND()\nLIMIT 1\");\n\t\t$stmt->bind_param(\"s\", $this->userid);\n\t\t$stmt->execute();\n\t\t\n\t\t$stmt->bind_result($randQId, $randQuestion);\n\t\t\n\t\t$stmt->store_result();\n\t\t$result = $stmt->fetch();\n\t\t\n\t\tif($result && !empty($result)){\n\t\t\t//we got a random security Question\n\t\t\t$_SESSION['securityQID'] = $randQId;\n\t\t\t$_SESSION['securityQ'] = $randQuestion;\n\t\t\t$this->setSecurityQID();\n\t\t\t$this->setSecurityQ();\n\t\t\treturn $this->securityQuestion;\n\t\t}\n\t}", "title": "" }, { "docid": "e54ace6898d609da7c3302b58eec92ac", "score": "0.5990916", "text": "public function getAdminSecurityQuestion()\r\n\r\n\t{\r\n\r\n\t\treturn $this->adminSecurityQuestion;\r\n\r\n \t}", "title": "" }, { "docid": "9753b25f1a22d934e796bea4324bdf4d", "score": "0.5977869", "text": "public function getUserSecurityDetails($userId) {\n\n /*\n * SELECT a.agentSecurityQuestionAnswer, q.*\n * FROM agentid AS a JOIN AGENTSECURITYQUESTION AS q\n * ON a.agentSecurityQuestionID = q.agentSecurityQuestionID\n * WHERE a.agentid = $userId;\n */\n $select = $this->select()\n ->setIntegrityCheck(false)\n ->from(\n array('a' => $this->_name),\n array('agentSecurityQuestionAnswer')\n )\n ->join(\n array('q' => 'AGENTSECURITYQUESTION'),\n 'a.agentSecurityQuestionID = q.agentSecurityQuestionID'\n )\n ->where('a.agentid = ?', $userId);\n\n $qaRow = $this->fetchRow($select);\n\n $returnVal = null;\n if (!empty($qaRow)) {\n $returnVal = array(\n 'questionID' => $qaRow->agentSecurityQuestionID,\n 'question' => $qaRow->question,\n 'answer' => $qaRow->agentSecurityQuestionAnswer\n );\n }\n\n return $returnVal;\n }", "title": "" }, { "docid": "0ff35b40af0a9195be739ea4c4a6e5a8", "score": "0.5920693", "text": "public function uac_auth_questions();", "title": "" }, { "docid": "4f5ab6bab3aa6a5888aeab20dd28b4ab", "score": "0.586531", "text": "function get_users_assessments($user) {\n $sql = \"SELECT * FROM `assignment` as A, `courseenrolment` as B WHERE A.CourseID=B.CourseID AND \n\t\t\tA.Semester=B.Semester AND A.InstitutionID=B.InstitutionID AND B.UserID=?\";\n $query = MySQL::getInstance()->prepare($sql);\n $query->execute(array($user));\n return $query->fetchAll(PDO::FETCH_ASSOC);\n}", "title": "" }, { "docid": "bc6966b0a746d3439f984879038fe23c", "score": "0.57425654", "text": "public static function getSecurityQuestions($user) {\n try {\n return securityQuestions::getSecurityQuestions($user);\n } catch (Exception $e) {\n $err = Shared::ERROR_MODE_SYSERR;\n $level = 'ERROR';\n $label = 'Login';\n\n Shared::logRedirectToErrorPage($err, $e, $level, $label);\n }\n return null;\n }", "title": "" }, { "docid": "852ee4e4b3ecb93e9e60e14e6801c66f", "score": "0.57233554", "text": "public function getAssignQuestion(){\n \\UserService::CronUserList();\n }", "title": "" }, { "docid": "1bc6d4ca6912736b914299a737730830", "score": "0.56905836", "text": "public function getAdminSecurityAnswer()\r\n\r\n\t{\r\n\r\n\t\treturn $this->adminSecurityAnswer;\r\n\r\n \t}", "title": "" }, { "docid": "9ab38543b9177e287a8b7c62f3d84091", "score": "0.5654346", "text": "public function getPreference()\n\t{\n\t\t\n\t\t$user_id = $_SESSION['user']; \n\t\t$sql = 'SELECT s.subject, s.id FROM users_subjects us \n\t\t\t\tINNER JOIN subjects s\n\t\t\t\tON s.id = us.subjects_id\n\t\t\t\tWHERE users_id ='.$user_id; \n\n\t\t$query = $this->db->query($sql); \n\t\tif($query->num_rows() > 0)\n\t\t{\n\t\t\treturn json_encode($query->result());\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false; \n\t\t}\n\t}", "title": "" }, { "docid": "ee0441971e88239c59f3df4860134d2a", "score": "0.5631096", "text": "public function surveyselection()\n {\n\n //Check if Patient is logged in.\n if (!Auth::guard('patient')->check()) {\n if (Auth::guard('admin')->check()) {\n\n return redirect('/');\n }\n return redirect('/')->with('message', 'No Patient Logged in');\n }\n //Check if password is temporary redirect to password change if so.\n $tempPassCheck = Auth::guard('patient')->user()->PasswordReset;\n if ((strcmp($tempPassCheck, \"pending\")) === 0) {\n return redirect('/passwordchangepatient')->with('message', 'Temporary password detected please change below.');\n }\n\n\n //Check Condition and only provide survey names that serve the authenticaticated users condition\n $userCondition = Auth::guard('patient')->user()->Condition;\n\n $surveyList = Survey_Questions::select('SurveyName')\n ->where('ConditionServed', $userCondition)\n ->pluck('SurveyName');\n\n return view('survey_select')->with('surveys', $surveyList);\n }", "title": "" }, { "docid": "ad0bf7e9b078e6755865b8202e21dd94", "score": "0.5593417", "text": "public function actionShowAssignments() {\n $userid = Yii::app()->request->getParam('id');\n $user = $this->module->getUserModel()->findByPk($userid);\n $username = $user->fullName;//{$this->module->username}\n $r = array(\"\" => array(0 => array(0 => array())));\n Yii::app()->setGlobalState(\"uniqOper\", array());\n if ($userid > 0) {\n $auth = Yii::app()->authManager;\n /* @var $auth CDbAuthManager */\n $ass = $auth->getAuthItems(2, $userid);\n $r[\"\"] = array();\n foreach ($ass as $i => $role) {\n $r=array_merge($r,$this->bildRole(\"Users\",0,$role->name,$r,\"\",$i));\n } \n \n // Add always allowed opers\n $r[\"\"][\"AlwaysAllowed\"][\"\"] = $this->module->getAlwaysAllowed();\n \n //Add groups for user\n $groups=Helper::getArrayGroupsUser($userid);\n foreach ($groups as $key=>$groupid) {\n $r=array_merge($r,$this->getGroupAssignments($groupid,$key));\n }\n $this->renderPartial('userAssignments', array('data' => $r, 'username' => $username, \"uniqOper\"=>implode(\", \",Yii::app()->getGlobalState(\"uniqOper\"))));\n } \n }", "title": "" }, { "docid": "bef6a2cbf0ceac1d69105fd1a26c9878", "score": "0.55693823", "text": "function questionnaire_get_user_responses($surveyid, $userid) {\n global $CFG;\n\n return get_records_sql (\"SELECT *\n FROM {$CFG->prefix}questionnaire_response\n WHERE survey_id = '$surveyid'\n AND username = '$userid'\n ORDER BY submitted ASC \");\n}", "title": "" }, { "docid": "2cbbf74be5b9295d88b596782415aa7c", "score": "0.5494328", "text": "function quiz_questions() {\n\n $quiz = get_record('quiz', 'id', $this->mainobject->id);\n $courseid = $quiz->course;\n\n $this->mainobject->get_course_students($quiz->course);\n\n global $CFG, $USER;\n\n //permission to grade?\n //$module = get_record('modules','name',$this->type);\n $coursemodule = get_record('course_modules', 'course', $quiz->course, 'module', $this->mainobject->modulesettings['quiz']->id, 'instance', $quiz->id) ;\n $modulecontext = get_context_instance(CONTEXT_MODULE, $coursemodule->id);\n if (!has_capability($this->capability, $modulecontext, $USER->id)) {\n return;\n }\n\n $csv_sql = \"SELECT questions\n FROM {$CFG->prefix}quiz\n WHERE id = {$this->mainobject->id}\";\n $csv_questions = get_record_sql($csv_sql);\n\n $student_sql = $this->get_role_users_sql($this->mainobject->courses[$courseid]->context);\n \n $sql = \"SELECT qst.id as qstid, qa.userid, qst.event, qs.questionid as id, q.name,\n q.questiontext as description, q.qtype, qa.timemodified\n FROM {$CFG->prefix}question_states qst\n INNER JOIN {$CFG->prefix}question_sessions qs\n ON qs.newest = qst.id\n INNER JOIN {$CFG->prefix}question q\n ON qs.questionid = q.id\n INNER JOIN {$CFG->prefix}quiz_attempts qa\n ON qs.attemptid = qa.uniqueid\n \n WHERE qa.quiz = $quiz->id\n AND qa.timefinish > 0\n AND qa.preview = 0\n AND (qa.userid IN ({$student_sql}))\n AND qs.questionid IN ($csv_questions->questions)\n AND q.qtype = 'essay'\n AND qst.event NOT IN (3,6,9)\n ORDER BY qa.timemodified\";\n\n $question_attempts = get_records_sql($sql);\n\n // not the same as $csv_questions as some of those questions will have no attempts\n // needing attention\n $questions = $this->mainobject->list_assessment_ids($question_attempts);\n\n if (!$this->mainobject->group) {\n\n $group_check = $this->mainobject->try_to_make_group_nodes($question_attempts, 'quiz', $this->mainobject->id, $quiz->course);\n \n if (!$group_check) {\n return;\n }\n }\n\n // begin json object. Why course?? Children treatment?\n $this->mainobject->output = '[{\"type\":\"quiz_question\"}'; \n\n foreach ($questions as $question) {\n\n $count = 0;\n\n foreach ($question_attempts as $question_attempt) {\n if (!isset($question_attempt->userid)) {continue;}\n // if we have come from a group node, ignore attempts where the user is not in the\n // right group. Also ignore attempts not relevant to this question\n $groupnode = $this->mainobject->group;\n //echo 'q: '.$this->mainobject->group.' qu: '.$question_attempt->userid;\n $inrightgroup = $this->mainobject->check_group_membership($this->mainobject->group, $question_attempt->userid);\n $rightquestion = ($question_attempt->id == $question->id);\n //echo $groupnode.' '.$inrightgroup.' '.$rightquestion;\n if (($groupnode && !$inrightgroup) || ! $rightquestion) {\n //continue;\n }\n $count = $count + 1;\n }\n\n if ($count > 0) {\n $name = $question->name;\n $questionid = $question->id;\n $sum = $question->description;\n $sumlength = strlen($sum);\n $shortsum = substr($sum, 0, 100);\n if (strlen($shortsum) < strlen($sum)) {\n $shortsum .= \"...\";\n }\n $length = 30;\n $this->mainobject->output .= ',';\n\n $this->mainobject->output .= '{';\n $this->mainobject->output .= '\"label\":\"'.$this->mainobject->add_icon('question');\n $this->mainobject->output .= '(<span class=\\\"AMB_count\\\">'.$count.'</span>) ';\n $this->mainobject->output .= $this->mainobject->clean_name_text($name, $length).'\",';\n $this->mainobject->output .= '\"name\":\"'.$this->mainobject->clean_name_text($name, $length).'\",';\n $this->mainobject->output .= '\"id\":\"'.$questionid.'\",';\n $this->mainobject->output .= '\"icon\":\"'.$this->mainobject->add_icon('question').'\",';\n\n $this->mainobject->output .= $this->mainobject->group ? '\"group\":\"'.$this->mainobject->group.'\",' : '';\n \n $this->mainobject->output .= '\"assid\":\"qq'.$questionid.'\",';\n $this->mainobject->output .= '\"type\":\"quiz_question\",';\n $this->mainobject->output .= '\"summary\":\"'.$this->mainobject->clean_summary_text($shortsum).'\",';\n $this->mainobject->output .= '\"count\":\"'.$count.'\",';\n $this->mainobject->output .= '\"uniqueid\":\"quiz_question'.$questionid.'\",';\n $this->mainobject->output .= '\"dynamic\":\"true\"';\n $this->mainobject->output .= '}';\n }\n }\n // end JSON array\n $this->mainobject->output .= \"]\"; \n }", "title": "" }, { "docid": "c082673324e736d7cdba6b599bfd5ae7", "score": "0.546641", "text": "function tc_legacy_portfolio_module_template_questions_answers($user_id, $course_id){\n\t\t\tglobal $wpdb;\n\t\t\t$activity_answers = $wpdb->get_results($wpdb->prepare(\"SELECT q.questions, a.answer, q.ss_question_session FROM tc_module_activity_answers a, tc_module_activity_questions q, user_link l\n\t\t\tWHERE l.user_id = a.user_id AND l.wp_user_id = %d AND q.module_id = %d AND q.active = 1 AND a.module_activity_questions_id = q.module_activity_questions_id ORDER BY q.ss_question_order ASC\", $user_id, $course_id, OBJECT));\n\t\t\treturn $activity_answers;\n\t\t}", "title": "" }, { "docid": "d92113ccb09f6566d3ab1152fd2e1e2d", "score": "0.53869736", "text": "function get_assign($course,$user,$cur_date,$cur_time){\r\n\t\t$q = \"SELECT * FROM \".TBL_ASSIGNMENTS.\" WHERE course_code='$course' ORDER BY ass_id DESC\";\r\n\t\t$result = mysql_query($q,$this->connection);\r\n\t\t$rows = mysql_numrows($result);\r\n\t\tif($rows > 0){\r\n\t\t\tfor($i=0; $i<$rows; $i++){\r\n\t\t\t\t$ass_id = mysql_result($result, $i, \"ass_id\");\r\n\t\t\t\t$ass_name = mysql_result($result, $i, \"ass_name\");\r\n\t\t\t\t$question = mysql_result($result, $i, \"question\");\r\n\t\t\t\t$date = mysql_result($result, $i, \"date\");\r\n\t\t\t\t$time = mysql_result($result, $i, \"time\");\r\n\t\t\t\t$hide = mysql_result($result, $i, \"hide\");\r\n\r\n\t\t\t\t$q = \"SELECT * FROM \".TBL_ASSIGN_SOLUTIONS.\" WHERE ass_id='$ass_id' AND u_id='$user'\";\r\n\t\t\t\t$result2 = mysql_query($q,$this->connection);\r\n\t\t\t\t$rows2 = mysql_numrows($result2);\r\n\t\t\t\t\r\n\t\t\t\tif($hide == \"0\" || $_SESSION['level'] == 1){\r\n\t\t\t\t\t$string.=\"<div class=\\\"row post\\\" style=\\\"margin: 5px 0;\\\">\";\r\n\t\t\t\t\tif($_SESSION['level'] == 1)\r\n\t\t\t\t\t\t$string.=\t\"<div class=\\\"col-xs-10 col-sm-11 col-md-11 l-post\\\"><div class=\\\"col-xs-12 col-sm-12 col-md-12\\\">\";\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$string.=\t\"<div class=\\\"col-md-12\\\"><div class=\\\"col-xs-12 col-sm-12 col-md-12\\\">\";\r\n\t\t\t\t\t$string.=\t\t\"<div class=\\\"col-xs-2 col-sm-1 col-md-1 right note-font\\\">\".($i+1).\".</div>\";\r\n\t\t\t\t\t$string.=\t\t\"<div class=\\\"col-xs-10 col-sm-11 col-md-11 bold\\\">\".$ass_name.\"</div></div>\";\r\n\t\t\t\t\t$string.=\t\t\"<div class=\\\"col-xs-offset-1 col-xs-10 col-sm-11 col-md-11\\\">\".$question.\"</div>\";\r\n\r\n\t\t\t\t\tif($rows2 > 0){\r\n\t\t\t\t\t\t$location = mysql_result($result2, 0, \"location\");\r\n\t\t\t\t\t\t$date2 = mysql_result($result2, 0, \"date\");\r\n\t\t\t\t\t\t$time2 = mysql_result($result2, 0, \"time\");\r\n\t\t\t\t\t\t$string.=\t\"<div class=\\\"col-xs-12 col-sm-12 col-md-12 pad-top-1 center\\\">\";\r\n\t\t\t\t\t\t$string.=\t\"<a href=\\\"\".$location.\"\\\"><button class=\\\"btn btn-primary\\\">\".basename($location).\"</button></a> <span style=\\\"font-style: italic\\\"><span class=\\\"bold\\\">Uploaded on: </span> \".$date2.\" \".$time2.\" </span></div>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($this->time_left(\"assign\",$_SESSION['course_code'],$ass_id,$cur_date,$cur_time)){\r\n\t\t\t\t\t\t$string.=\t\"<form method=\\\"post\\\" class=\\\"center\\\" action=\\\"includes/process.php\\\" enctype=\\\"multipart/form-data\\\">\";\r\n\t\t\t\t\t\t$string.=\t\"<div class=\\\"col-xs-offset-1 col-sm-offset-3 col-md-offset-4 col-xs-11 col-sm-9 col-md-8 pad-top-1\\\"><input type=\\\"file\\\" name=\\\"assign\\\"/></div>\";\r\n\t\t\t\t\t\t$string.=\t\"<input type=\\\"hidden\\\" name=\\\"ass_id\\\" value=\\\"\".$ass_id.\"\\\" />\";\r\n\t\t\t\t\t\t$string.=\t\"<input type=\\\"hidden\\\" name=\\\"ass_name\\\" value=\\\"\".$ass_name.\"\\\" />\";\r\n\t\t\t\t\t\t$string.=\t\"<input type=\\\"hidden\\\" name=\\\"old_ass_name\\\" value=\\\"\".$location.\"\\\" />\";\r\n\t\t\t\t\t\t$string.=\t\"<div class=\\\"col-xs-12 col-sm-12 col-md-12 pad-top-1\\\">\";\r\n\t\t\t\t\t\t$string.=\t\"<button name=\\\"answer_assign_btn\\\" value=\\\"upload\\\" type=\\\"submit\\\" class=\\\"btn btn-success\\\" style=\\\"width: 10em;\\\">Submit Assignment</button></div></form>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$string.=\t\t\"<div class=\\\"col-xs-12 col-sm-12 col-md-12 right\\\" style=\\\"color: red;\\\">Due Date: \".$date.\" \".$time.\"</div>\";\r\n\t\t\t\t\t$string.=\t\"</div>\";\r\n\t\t\t\t\tif($_SESSION['level'] == 1){\r\n\t\t\t\t\t\t$string.=\t\"<div class=\\\"col-xs-2 col-sm-1 col-md-1 pad-top-2\\\"><form method=\\\"post\\\" action=\\\"includes/process.php\\\">\";\r\n\t\t\t\t\t\t$string.=\t\t\"<input type=\\\"hidden\\\" name=\\\"ass_id\\\" value=\\\"\".$ass_id.\"\\\" />\";\r\n\t\t\t\t\t\tif($hide == 0)\r\n\t\t\t\t\t\t\t$string.=\t\t\"<button name=\\\"hide_assign_btn\\\" value=\\\"hide\\\" type=\\\"submit\\\" class=\\\"btn btn-danger\\\" style=\\\"width: 5em;\\\">Hide</button>\";\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$string.=\t\t\"<button name=\\\"unhide_assign_btn\\\" value=\\\"unhide\\\" type=\\\"submit\\\" class=\\\"btn btn-danger\\\" style=\\\"width: 5em;\\\">UnHide</button>\";\r\n\t\t\t\t\t\t$string.=\t\t\"<button name=\\\"view_assign\\\" value=\\\"show\\\" type=\\\"submit\\\" class=\\\"btn btn-info\\\" style=\\\"width: 5em; margin-top: 5px;\\\">View</button>\";\r\n\t\t\t\t\t\t$string.=\t\"</form></div>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$string.=\t\"</div>\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\treturn $string;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn \"<label class=\\\"font-big col-xs-12 col-md-12 pad-top-4 pad-bottom-2 center\\\">Assignments not found for this Course!</label>\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c33c336b36aba82b8d976f8a400c26b4", "score": "0.5384475", "text": "public static function getAllCommunityQuestion()\r\n\t{\r\n\t\t$questions = array();\r\n\t\t\r\n\t\t//User's influence to find his community\r\n\t\t$myInfluence = DB::table('influence')->where('userId', Auth::user()->id)->first();\r\n\t\t$myCommunity = null;\r\n\t\tif ($myInfluence) \r\n\t\t{\r\n\t\t\t$myInfluenceLevel = $myInfluence->influenceLevel;\r\n\t\t\tif($myInfluenceLevel)\r\n\t\t\t{\r\n\t\t\t\t//if user influence level is 3 or less than 3 then user is able to show and give advice\r\n\t\t\t\t//to their profession domain\r\n\t\t\t\tif ($myInfluenceLevel <= 3) \r\n\t\t\t\t{\r\n\t\t\t\t\t$myCommunity['userProfessionId'] = $myInfluence->profession;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//if user influence level is 2 or less than 2 then user is able to show and give advice\r\n\t\t\t\t//to their industry\r\n\t\t\t\tif ($myInfluenceLevel <= 2) \r\n\t\t\t\t{\r\n\t\t\t\t\t$myCommunity['userIndustryId'] = $myInfluence->industry;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//if user influence level is 1 or less than 1 then user is able to show and give advice\r\n\t\t\t\t//to their continent \r\n\t\t\t\tif ($myInfluenceLevel <= 1) \r\n\t\t\t\t{\r\n\t\t\t\t\t$myCommunity['userContinentId'] = $myInfluence->continent;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$allQuestions = DB::table('questions')->where('userId', '!=', Auth::user()->id)->orderBy('epochCreatedAt', 'desc')->get();\r\n\t\tif ($myCommunity) \r\n\t\t{\r\n\t\t\t$isQuestions = DB::table('questions')->where('userId', '!=', Auth::user()->id)->where($myCommunity)->orderBy('epochCreatedAt', 'desc')->get();\r\n\t\t\tif($isQuestions)\r\n\t\t\t{\r\n\t\t\t\t$allQuestions = $isQuestions;\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach ($allQuestions as $key => $question) \r\n\t\t{\r\n\t\t\t$questions[$key]['id'] = $question->id;\r\n\t\t\t$questions[$key]['linkId'] = $question->id;\r\n\t\t\t$questions[$key]['question'] = $question->question;\r\n\t\t\t$questions[$key]['commentsCount'] = $question->commentsCount;\r\n\t\t\t$questions[$key]['likesCount'] = $question->likesCount;\r\n\t\t\t$commentsOnQuestion = DB::table('comments')->where('questionId', $question->id)->orderBy('epochCreatedAt', 'desc')->get();\r\n\t\t\t$questions[$key]['comments'] = array();\r\n\t\t\tforeach ($commentsOnQuestion as $commentkey => $comment)\r\n\t\t\t{\r\n\t\t\t\t$questions[$key]['comments'][$commentkey]['id'] = $comment->id;\r\n\t\t\t\t$questions[$key]['comments'][$commentkey]['comment'] = $comment->comment;\r\n\t\t\t\t$questions[$key]['comments'][$commentkey]['userId'] = $comment->userId;\r\n\t\t\t\t$user = User::find($comment->userId);\r\n\t\t\t\t$questions[$key]['comments'][$commentkey]['userName'] = $user->designation.' '.$user->uName;\r\n\t\t\t\t$questions[$key]['comments'][$commentkey]['userImage'] = $user->myAvatar;\r\n\t\t\t\t$questions[$key]['comments'][$commentkey]['repliesCount'] = $comment->repliesCount;\r\n\t\t\t\t$questions[$key]['comments'][$commentkey]['likesCount'] = $comment->likesCount;\r\n\t\t\t\t$epochCreatedTime = $comment->epochCreatedAt;\r\n\t\t\t\t$date = date('M d Y', $epochCreatedTime);\r\n\t\t\t\t$questions[$key]['comments'][$commentkey]['created_at']['date'] = ( $date == date('M d Y', time())) ? 'today' : $date;\r\n\t\t\t\t$questions[$key]['comments'][$commentkey]['created_at']['time'] = date('H:i A', $epochCreatedTime);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//breaking the EPOCH time into time and date\r\n\t\t\tdate_default_timezone_set('GMT');\r\n\t\t\t$epochCreatedTime = $question->epochCreatedAt;\r\n\t\t\t$date = date('M d Y', $epochCreatedTime);\r\n\t\t\t$questions[$key]['created_at']['date'] = ( $date == date('M d Y', time())) ? 'today' : $date;\r\n\t\t\t$questions[$key]['created_at']['time'] = date('H:i:s', $epochCreatedTime);\r\n\t\t}\r\n\t\treturn $questions;\r\n\t}", "title": "" }, { "docid": "35956262cc5bf19983ece80304bbe7ac", "score": "0.5370145", "text": "public function confirm_security(){\n\t\t\t\n\t\t\t$email_address = $this->session->userdata('email_address');\n\n\t\t\t$customer = $this->Customers->get_customer($email_address);\n\t\t\t$security_question = '';\n\t\t\t\t\t\n\t\t\tforeach($customer as $user){\n\t\t\t\t$data['security_question'] = $user->security_question;\n\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t//assign page title name\n\t\t\t\t$data['pageTitle'] = 'Confirm Security Information';\n\n\t\t\t\t//assign page ID\n\t\t\t\t$data['pageID'] = 'confirm_security';\n\t\t\t\t\n\t\t\t\t//load header and page title\n\t\t\t\t//$this->load->view('customer_account_pages/header', $data);\n\t\t\t\t\n\t\t\t\t//load main body\n\t\t\t\t$this->load->view('customer_account_pages/confirm_memorable_information_page', $data); \t\t\t\t\t\t\t\t\t\n\t\t}", "title": "" }, { "docid": "078c724c1cb9cae5152bde669b2a912b", "score": "0.533878", "text": "public function getAssignments($userId);", "title": "" }, { "docid": "b6c4e35ea159eb1bd0f7b123446b220c", "score": "0.53242356", "text": "public function listAnsweredQuestionsByStudent () {\n\t\t$questionsList = NULL;\n\t\t$json = NULL;\n\n\t\t$gameId = $_SESSION['jogoid'];\n\t\t$userId = $_POST['userId'];\n\t\tif (empty($gameId) || empty($userId) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$questionsList = $this->model->searchQuestionAnswered($gameId,$userId);\n\t\t$json = json_encode($questionsList);\n\t\techo $json;\n\t}", "title": "" }, { "docid": "7bb245c95be8157e70eb663eb68f5ec1", "score": "0.5318703", "text": "function tc_portfolio_module_get_check_box_selections($user_id, $post_id){\n\t\tglobal $wpdb;\n\t\t$userCheckboxSelections = $wpdb->get_row($wpdb->prepare(\"select * from wp_course_activities where post_id =%d and user_id=%d and description=%s\",$post_id, $user_id,''));\n\t\treturn $userCheckboxSelections;\n\t\t}", "title": "" }, { "docid": "8900cae811bdd03f8c86eac829d705c0", "score": "0.5285489", "text": "function questionnaire_get_participants($questionnaireid) {\n//for a given instance of questionnaire. Must include every user involved\n//in the instance, independient of his role (student, teacher, admin...)\n//See other modules as example.\n global $CFG;\n\n //Get students\n $users = get_records_sql('SELECT DISTINCT u.* '.\n 'FROM '.$CFG->prefix.'user u, '.\n ' '.$CFG->prefix.'questionnaire_attempts qa '.\n 'WHERE qa.qid = \\''.$questionnaireid.'\\' AND '.\n ' u.id = qa.userid');\n return ($users);\n}", "title": "" }, { "docid": "ef94334956b778f5323aa50882b123d1", "score": "0.52751976", "text": "function run(Contact $user, $qreq, $ssel) {\n $Rev = $user;\n if ($qreq->reviewer) {\n $Rev = null;\n foreach ($user->conf->pc_members() as $pcm)\n if (strcasecmp($pcm->email, $qreq->reviewer) == 0\n || (string) $pcm->contactId === $qreq->reviewer) {\n $Rev = $pcm;\n break;\n }\n if (!$Rev)\n return Conf::msg_error(\"No such reviewer\");\n }\n if (!$Rev->isPC)\n return self::EPERM;\n\n $not_me = $user->contactId !== $Rev->contactId;\n $result = $user->paper_result([\"paperId\" => $ssel->selection(), \"topics\" => 1, \"reviewerPreference\" => 1]);\n $texts = array();\n foreach (PaperInfo::fetch_all($result, $user) as $prow) {\n if ($not_me && !$user->allow_administer($prow))\n continue;\n $item = [\"paper\" => $prow->paperId, \"title\" => $prow->title];\n if ($not_me)\n $item[\"email\"] = $Rev->email;\n if ($prow->conflictType > 0)\n $item[\"preference\"] = \"conflict\";\n else\n $item[\"preference\"] = unparse_preference($prow->reviewer_preference($Rev));\n if ($this->extended) {\n $x = \"\";\n if ($Rev->can_view_authors($prow, false))\n $x .= prefix_word_wrap(\" Authors: \", $prow->pretty_text_author_list(), \" \");\n $x .= prefix_word_wrap(\"Abstract: \", rtrim($prow->abstract), \" \");\n if ($prow->topicIds != \"\")\n $x .= prefix_word_wrap(\" Topics: \", $prow->unparse_topics_text(), \" \");\n $item[\"__postcomment__\"] = $x;\n }\n $texts[$prow->paperId][] = $item;\n }\n $fields = array_merge([\"paper\", \"title\"], $not_me ? [\"email\"] : [], [\"preference\"]);\n $title = \"revprefs\";\n if ($not_me)\n $title .= \"-\" . (preg_replace('/@.*|[^\\w@.]/', \"\", $Rev->email) ? : \"user\");\n return new Csv_SearchResult($title, $fields, $ssel->reorder($texts), true);\n }", "title": "" }, { "docid": "928536599cc880728bd0c3c855e2c01f", "score": "0.5264297", "text": "public function getSecurityCriteria()\n {\n return $this->_getField(self::$SECURITY_CRITERIA);\n }", "title": "" }, { "docid": "23ce0b95c0d83cf6bc1e52ff3c3db474", "score": "0.5251458", "text": "public function askProfessor($options = array())\n\t{\n\t\t $name = (isset($options['NAME'])) ? $options['NAME'] : null;\t \n\t\t $student = (isset($options['STUDENT'])) ? $options['STUDENT'] : 'professor';\n\t\t $value = (isset($options['DEFAULT'])) ? $options['DEFAULT'] : null ;\n\t\t \n\t\t if (is_array($name))\n\t\t {\n\t\t\t foreach ($name as $search)\n\t\t\t {\n\t\t\t\t if (isset($this->options['SETTINGS'][$search]))\n\t\t\t\t {\n\t\t\t\t\t $value = $this->options['SETTINGS'][$search];\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t\t else\n\t\t {\n\t\t\t $name = strtoupper($name);\n\t\t\t $value = (isset($this->options['SETTINGS'][$name])) ? $this->options['SETTINGS'][$name] : $value;\n\t\t }\n\n\t\t // $this->logResponse($name,$value,$student);\n\t\t \n\t\t return $value;\n\t}", "title": "" }, { "docid": "40a570c8440daba97298d33a1cce68df", "score": "0.5240286", "text": "public static function allowSecurityQuestionsCheck($user) {\n try {\n $clientService = self::getWebService('CIServiceWS');\n $param = new \\CIServiceWS\\GetUserPreference();\n $param->uid = $user->uid;\n $rt = $clientService->GetUserPreference($param);\n\n\n if (isset($rt->return->error)) {\n\n // handle returned error. for example, SYSERR\n Raxan::loadLangFile('errors');\n $errormsg = Raxan::locale($rt->return->error);\n Raxan::data(\"SYSERRMSG\", $errormsg);\n return false;\n }\n\n $userPreferences = $rt->return->result;\n\n return $userPreferences->aclAllowSecurityQuestions == 1 ||\n $userPreferences->aclAllowSecurityQuestions == 3;\n } catch (Exception $e) {\n $err = Shared::ERROR_MODE_SYSERR;\n $level = 'ERROR';\n $label = 'Login';\n\n Shared::logRedirectToErrorPage($err, $e, $level, $label);\n Raxan::loadLangFile('errors');\n }\n return false;\n }", "title": "" }, { "docid": "9f1fef130dcd968602eab8a85d51cb2c", "score": "0.523782", "text": "function optable(){\n $patient = D('user_assess');\n \n $patientinfo = $patient->find($_SESSION['userInfo']['userid']);\n dump($patientinfo);\n }", "title": "" }, { "docid": "b4d2bcdba87ee3d4ae70982d822f93c5", "score": "0.52323925", "text": "function college_professor($userid, $array) {\n\t\n\t\t$query = $this->db->query(\"SELECT COUNT(id) AS total FROM quiz WHERE user_id='$userid'\")->row()->total;\n\t\t$result = ($query >= 20) ? TRUE : FALSE;\n\t\treturn $this->show_results($userid, 14, $result, $array);\n\t\n\t}", "title": "" }, { "docid": "36381cf0559fea7d3485ecc4a7a27684", "score": "0.52184683", "text": "public function actionUser(){\n\t\t$userClass = $this->module->userClass;\n\t\t\n\t\t$model = CActiveRecord::model($userClass)->findByPk($_GET['id']);\n\t\t// form Model\n\t\t$formModel = new AssignmentForm();\n\t\t\n\t\t//Permission\n\t\t$this->_authorizer->attachUserBehavior($model);\n\t\t$assignedItems = $this->_authorizer->getAuthItems(null, $model->getId());\n\t\t$assignments = array_keys($assignedItems);\n\t\t\n\t\t$assignSelectOptions = Rights::getAuthItemSelectOptions(null, array());\n\t\t\n\t\t$this->render('user',array(\n\t\t\t'model'=>$formModel,\n\t\t\t'user'=>$model,\n\t\t\t'assignSelectOptions'=>$assignSelectOptions,\n\t\t));\n\t}", "title": "" }, { "docid": "d2d4071f56b5e1827f8c9a51c9278183", "score": "0.520013", "text": "function getAllSchoolsAction() {\n\t\tif (! in_array ( \"create_network\", $this->user ['capabilities'] ))\n\t\t\t$this->apiResult [\"message\"] = \"You are not authorized to perform this task.\\n\";\n\t\t\tif(isset($_POST['school_related_to']) && empty($_POST['school_related_to']))\n\t\t\t\t$this->apiResult [\"message\"] = \"Option Type cannot be empty.\\n\";\n\t\t\t\telse {\n\t\t\t\t\t$resourceModel = new resourceModel ();\n\t\t\t\t $option_type = $_POST['school_related_to'];\n // print_r($provience_ids);die;\n\t\t\t\t\t//echo $network_id;\n\t\t\t\t\t$this->apiResult [\"message\"] = $resourceModel->getSchoolsList($option_type);\n\t\t\t\t\t$this->apiResult [\"status\"] = 1;\n\t\t\t\t}\n\t}", "title": "" }, { "docid": "d2d4071f56b5e1827f8c9a51c9278183", "score": "0.520013", "text": "function getAllSchoolsAction() {\n\t\tif (! in_array ( \"create_network\", $this->user ['capabilities'] ))\n\t\t\t$this->apiResult [\"message\"] = \"You are not authorized to perform this task.\\n\";\n\t\t\tif(isset($_POST['school_related_to']) && empty($_POST['school_related_to']))\n\t\t\t\t$this->apiResult [\"message\"] = \"Option Type cannot be empty.\\n\";\n\t\t\t\telse {\n\t\t\t\t\t$resourceModel = new resourceModel ();\n\t\t\t\t $option_type = $_POST['school_related_to'];\n // print_r($provience_ids);die;\n\t\t\t\t\t//echo $network_id;\n\t\t\t\t\t$this->apiResult [\"message\"] = $resourceModel->getSchoolsList($option_type);\n\t\t\t\t\t$this->apiResult [\"status\"] = 1;\n\t\t\t\t}\n\t}", "title": "" }, { "docid": "8a4eed82f146f16d7e4c7d52881e9abb", "score": "0.51989746", "text": "function questionnaire_get_user_grades($questionnaire, $userid=0) {\n global $CFG;\n\n $user = $userid ? \"AND u.id = $userid\" : \"\";\n\n $sql = \"SELECT u.id, u.id AS userid, r.grade AS rawgrade, r.submitted AS dategraded, r.submitted AS datesubmitted\n FROM {$CFG->prefix}user u, {$CFG->prefix}questionnaire_attempts a, {$CFG->prefix}questionnaire_response r\n WHERE u.id = a.userid AND a.qid = $questionnaire->id AND r.id = a.rid $user\";\n\n return get_records_sql($sql);\n}", "title": "" }, { "docid": "e0a7dd9bd04ac5841b8dcc62d1274b09", "score": "0.5175228", "text": "private function issetAllQuestionnairesIDForUser($user_id) {\n\n $submission_query = \\Drupal::database()->select('webform_submission', 'ws');\n $submission_query->fields('ws', ['sid']);\n\n $condition_or = new \\Drupal\\Core\\Database\\Query\\Condition('OR');\n $condition_or->condition('ws.uid', $user_id);\n $condition_or->condition('wsd.value', $user_id);\n\n $submission_query->join('webform_submission_data', 'wsd', 'wsd.sid = ws.sid');\n\n $submission_query->condition($condition_or);\n $submission_query->condition('wsd.name', 'id_timlida');\n\n $submission_query->orderBy('ws.created', 'DESC');\n\n $all_submissions = $submission_query->execute()->fetchCol();\n\n return $all_submissions;\n\n }", "title": "" }, { "docid": "7cdaf76a31731879354f1aa192009c16", "score": "0.5159188", "text": "function questionnaire_get_survey_list($courseid=0, $type='') {\n global $QUESTIONNAIRE_EDITING, $QUESTIONNAIRE_ACTIVE1, $QUESTIONNAIRE_ENDED,\n $QUESTIONNAIRE_ARCHIVED, $QUESTIONNAIRE_TESTING, $QUESTIONNAIRE_ACTIVE2;\n\n if ($courseid == 0) {\n if (isadmin()) {\n $select = '';\n $fields = 'id,name,owner,realm,public,status';\n } else {\n return false;\n }\n } else if (!empty($type)) {\n if ($type == 'public') {\n $select = 'status != '.$QUESTIONNAIRE_ARCHIVED.' AND realm = \\''.$type.'\\' ';\n /// Any survey owned by the user or typed as 'template' can be copied.\n } else if ($type == 'template') {\n $select = 'status != '.$QUESTIONNAIRE_ARCHIVED.' AND '\n .'(realm = \\''.$type.'\\' OR owner = \\''.$courseid.'\\') ';\n }\n $fields = 'id,name,owner,realm,status,title';\n } else {\n $select = 'status != '.$QUESTIONNAIRE_ARCHIVED.' AND owner = \\''.$courseid.'\\' ';\n $fields = 'id,name,owner,realm,status';\n }\n return get_records_select('questionnaire_survey', $select, 'realm,name', $fields);\n}", "title": "" }, { "docid": "7174f8951972676496aea92bd91b9295", "score": "0.5144222", "text": "function retrieve_user_achieves( $user ){\n connect();\n $query = USR_ACHIEVE .\"'\". mysql_real_escape_string($user) . \"'\";\n $result = mysql_query( $query ) or die( \"Query failed:\" . mysql_error() );\n if( !$result ){\n return;\n }\n\n echo \"<ul>\";\n\n while( $a = mysql_fetch_array( $result, MYSQL_ASSOC )){\n echo \"<li>\";\n echo $a['title'];\n echo \" ---- \" . $a['app_id'];\n echo \"</li>\";\n }\n\n echo \"</ul>\";\n }", "title": "" }, { "docid": "28f576859eb45b593bb31d4f25a632ba", "score": "0.5137408", "text": "public function index()\n {\n $questions = Question::all()->sortByDesc('id');\n\n if (Auth::user()->isProfessor()) {\n $enrolls = Enroll::distinct()->select('subject_id')->where('user_id', Auth::id())->get();\n $questions = $questions->whereIn('subject_id', $enrolls->pluck('subject_id'));\n } elseif (Auth::user()->isDepartmentHead()) {\n $departments = Department::distinct()->select('id')->where('user_id', Auth::id())->get();\n $courses = Course::distinct()->select('id')->whereIn('department_id', $departments->pluck('id'))->get();\n $subjects = Subject::distinct()->select('id')->whereIn('course_id', $courses->pluck('id'))->get();\n $questions = $questions->whereIn('subject_id', $courses->pluck('subject_id'));\n }\n\n return view('questions.index', compact('questions'));\n }", "title": "" }, { "docid": "73f977b3940399f69a80fc7adabe929f", "score": "0.51281613", "text": "function getQuestionnaire($assignment_id){\n return $this->database->get(\"reviewerlist\", \"qualtrics_url\", [\"assignment_id\" => $assignment_id]);\n }", "title": "" }, { "docid": "d87efa56ecedf0e1c1f8b598d8051f90", "score": "0.5120923", "text": "public function getAssignments($from_index = 0, array $user_subjects = array())\n{\n //check if the request is send frm the index or ajax\n if ($from_index == 1) {\n //class level subject id of the first subject on the list\n $clsID = $user_subjects['clsID'];\n //the subject name of the first subject on the list of many\n $subName = $user_subjects['subjectName'];\n }else{\n //clsID name to search for\n $clsID = !empty(html_escape($this->input->POST('clsID'))) ? html_escape($this->input->POST('clsID')) : 0;\n //subject name to search for\n $subName = !empty(html_escape($this->input->POST('subjectName'))) ? html_escape($this->input->POST('subjectName')) : '';\n }\n //assignment id to search for\n $assignID = !empty(html_escape($this->input->POST('assignID'))) ? html_escape($this->input->POST('assignID')) : 0;\n //check who is logged in\n if (strpos(identify_user_role($_SESSION['userID']), 'teacher') !== false) {\n //assignment ID teacher clicked\n $search['assign'] = $assignID;\n //the user_id of the teacher who is logged in\n $search['teacher'] = $_SESSION['userID'];\n //check if is learner logged in\n }elseif (identify_user_role($_SESSION['userID'])== 'learner') {\n //the user_id of the learner who is logged in\n $search['learner'] = $_SESSION['userID'];\n $search['assign'] = $assignID;\n $learnerSubmit=$this->assignment->getAssignSubmission($search);\n }\n //use this variable to search for record\n $search['subject'] = $subName;\n //use this variable to search for record\n $search['clsID'] = $clsID;\n //send request for material\n $home_work=$this->assignment->getAssignments($search);\n //use this variable to search for record\n $search['assign'] = $assignID;\n //check if subject was sent\n if($clsID!= 0) {\n //view assignments \n $assignment=$this->viewAssignments($home_work);\n if ($from_index == 1) {\n return $assignment;\n }\n //return to AJAX\n echo json_encode($assignment);\n //if not subject, then they want to edit assignment\n }elseif ($assignID!=0) {\n //get contents of assignment to be editted\n $editAssign=$this->assignment->getAssignments($search);\n //create associative array to send back to AJAX\n $assignData= array(\n 'assignEdit'=>$editAssign,\n 'learnerSubmit'=>$learnerSubmit\n );\n //return to AJAX\n echo json_encode($assignData);\n }\n\n}", "title": "" }, { "docid": "a8999d64e2da318bbcf22b0999b3d7b0", "score": "0.51203966", "text": "public function answer_credibility(){\n\t\t$query = $this->db->query(\"SELECT YES, NO, NS from table2 where COLL_ID = '$college_id' Answer_Node <> 'NULL' AND NODE_VALUE = '$value'\");\n\t\tforeach($query->result() as $info){\n\t\t\t$yes_count = $info->YES;\n\t\t\t$no_count = $info->NO;\n\t\t\t$ns_count = $info->NS;\n\t\t}\n\t\t$pcap = $yes_count / ($yes_count + $no_count);\n\t\t$alpha = 0.95;\n\t\t$n = $yes_count + $no_count;\n\t\t$arg1 = (pow(1.96 , 2))/(2 * $n);\n\t\t$a = $pcap * (1 - $pcap) + ($arg1 / 2);\n\t\t$b = 1.96 * sqrt($a / $n);\n\t\t$d = 1 + 2 * $arg1;\n\t\t$max = ($pcap + $arg1 + $b) / $d;\n\t\t$min = ($pcap + $arg1 - $b) / $d;\n\t\t$mean_cred = ($max + $min) / 2;\n\t\tif($min > 0.5 && $pcap < 0.25){\n\t\t\treturn \"Yes\";\n\t\t}else{\n\t\t\tif($max <= 0.5 && $pcap < 0.25){\n\t\t\t\treturn \"No\";\n\t\t\t}else{\n\t\t\t\treturn \"Not Sure\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1a304756c1af596d2b58ab0fa175f031", "score": "0.5112159", "text": "public function set_security_information(){\n\t\t\t\n\t\t\tif($this->session->userdata('logged_in')){\n\t\t\t\t\n\t\t\t\t//set cart count\n\t\t\t\t$data['cart_count'] = 0;\n\t\t\t\t\t\n\t\t\t\t//check if user has started shopping\n\t\t\t\t//update cart accordingly\n\t\t\t\tif($this->session->userdata('cart_array')){ \n\t\t\t\t\t\n\t\t\t\t\t//obtain the shopping session id\n\t\t\t\t\t$session_id = $this->session->userdata('cart_array');\n\t\t\t\t\t\t\n\t\t\t\t\t$cart_count = $this->Cart->count_cart($session_id);\n\t\t\t\t\tif($cart_count == '' || $cart_count == null){\n\t\t\t\t\t\t$cart_count = 0;\n\t\t\t\t\t}\n\t\t\t\t\t$data['cart_count'] = $cart_count;\n\t\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t$data['list_of_questions'] = $this->Security_questions->get_security_questions();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//security_questions list dropdown\n\t\t\t\t$security_questions = '<select name=\"security_questions\" id=\"security_questions\" class=\"form-control\">';\n\t\t\t\t$security_questions .= '<option value=\"Select A Question\">Select A Question</option>';\n\t\t\t\t$this->db->from('security_questions');\n\t\t\t\t$this->db->order_by('id');\n\t\t\t\t$result = $this->db->get();\n\t\t\t\tif($result->num_rows() > 0) {\n\t\t\t\t\tforeach($result->result_array() as $row){\n\t\t\t\t\t\t$security_questions .= '<option value=\"'.$row['question'].'\">'.$row['question'].'</option>';\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$security_questions .= '</select>';\n\t\t\t\t$data['security_questions'] = $security_questions;\n\t\t\t\t\n\t\t\t\n\t\t\t\t$email_address = $this->session->userdata('email_address');\n\t\t\t\t\n\t\t\t\t$data['users'] = $this->Customers->get_customer($email_address);\n\t\t\t\t\n\t\t\t\t$data['header_messages_array'] = $this->Messages->get_header_messages();\n\t\t\t\t\n\t\t\t\t$messages_unread = $this->Messages->count_unread_messages($email_address);\n\t\t\t\t\n\t\t\t\tif($messages_unread == '' || $messages_unread == null){\n\t\t\t\t\t$messages_unread = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$data['messages_unread'] = $messages_unread;\n\t\t\t\t\n\t\t\t\t//assign page title name\n\t\t\t\t$data['pageTitle'] = 'Set Security Information';\n\t\t\t\t\n\t\t\t\t//assign page title name\n\t\t\t\t$data['pageID'] = 'set_security';\n\t\t\t\t\n\t\t\t\t//load main header\n\t\t\t\t$this->load->view('pages/header', $data);\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t//load main body\n\t\t\t\t$this->load->view('customer_account_pages/set_security_information_page', $data); \t\t\t\t\t\n\t\t\t\t\n\t\t\t\t//load main footer\n\t\t\t\t$this->load->view('customer_account_pages/footer');\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t}else {\n\t\t\t\t//user not logged in, redirects to login page\n\t\t\t\t//$this->login();\t\n\t\t\t\t$url = 'login?redirectURL='.urlencode(current_url());\n\t\t\t\tredirect($url);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t//redirect('home/login/?redirectURL=set_security_information');\n\t\t\t\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8c314446f06d3d76a71de7c5987dd34e", "score": "0.51016563", "text": "public function add_permission_question()\n {\n // Check if functionality is enabled\n if (!$this->opt['woochimp_enabled'] || $this->opt['woochimp_enabled_checkout'] != 3) {\n return;\n }\n\n echo '<p class=\"woochimp_checkout_checkbox\" style=\"padding:15px 0;\"><input id=\"woochimp_user_preference\" name=\"woochimp_data[woochimp_user_preference]\" type=\"checkbox\" ' . ($this->opt['woochimp_default_state'] == '1' ? 'checked=\"checked\"' : '') . '> ' . $this->opt['woochimp_text_checkout'] . '</p>';\n }", "title": "" }, { "docid": "34f7412b640086b084e89191e2d3c8b0", "score": "0.51016134", "text": "public function executeSelectionPage() {\n\t\t$can_update = PNApplication::$instance->selection->canManageExamSubjectQuestions();\n\t\tif(!$can_update[0]){\n\t\t\techo \"<div style ='font-color:red;'>\".$can_update[1].\"</div>\";\n\t\t} else {\n\t\t\t$all_names = SelectionJSON::getAllExamSubjectNames();\n\t\t\t$correct_answer = PNApplication::$instance->selection->getOneConfigAttributeValue(\"set_correct_answer\");\n\t\t\t\n\t\t\t/** Lock the exam table because this page will perform some checks on the\n\t\t\t * exam names, so must be sure that no one is updating it;\n\t\t\t */\n\t\t\t// require_once(\"component/data_model/DataBaseLock.inc\");\n\t\t\t// $campaign_id = PNApplication::$instance->selection->getCampaignId();\n\t\t\t// require_once(\"component/data_model/Model.inc\");\n\t\t\t// $table = DataModel::get()->getTable(\"ExamSubject\");\n\t\t\t// $locked_by = null;\n\t\t\t// $lock_id = null;\n\t\t\t// $lock_id = DataBaseLock::lockTable($table->getSQLNameFor($campaign_id), $locked_by);\n\t\t\t// if($lock_id == null & $locked_by <> null){\n\t\t\t\t// PNApplication::error($locked_by.\" is already managing the exams subjects for this campaign\");\n\t\t\t\t// return;\n\t\t\t// } else {\n\t\t\t\t// DataBaseLock::generateScript($lock_id);\n\t\t\t// }\n\t\t\t//TODO: lock table?\n\t\t\trequire_once(\"component/data_import/page/import_data.inc\");\n\t\t\t$data_list = array();\n\t\t\t$questions = DataModel::get()->getTable(\"ExamSubjectQuestion\");\n\t\t\t$display = $questions->getDisplayHandler(null);\n\t\t\t$data_list = array_merge($data_list, $display->getDisplayableData());\t\n\t\t\t$fixed_data = array();\n\t\t\t$prefilled_data = array();\n\n\t\t\t// import_data($this, $icon, $title, $data_list, $fixed_data, $prefilled_data, $create_button, $create_function);\n\t\t\timport_data(\n\t\t\t\t$this,\n\t\t\t\t\"/static/application/icon.php?main=/static/selection/exam/exam_32.png&small=\".theme::$icons_16[\"add\"].\"&where=right_bottom\",\n\t\t\t\t\"Import Exam Subject\",\n\t\t\t\t$data_list,\n\t\t\t\t$fixed_data,\n\t\t\t\t$prefilled_data,\n\t\t\t\t\"<img src='\".theme::make_icon(\"/static/selection/exam/exam_16.png\",theme::$icons_10[\"add\"]).\"'/> Import Exam\",\n\t\t\t\t\"finishImport\"\n\t\t\t);\n\t\t\t?>\n\t\t\t<script type='text/javascript'>\t\t\t\t\t\t\n\t\t\t\n\t\t\tfunction import_exam_subject(){\n\t\t\t\tvar t = this;\n\t\t\t\tt.step_1 = null; //contains the instance of the import_exam_subject_part_1 object\n\t\t\t\tt.step_2 = null; //contains the instance of the import_exam_subject_part_2 object\n\n\t\t\t\t/**\n\t\t\t\t * Get the user input from the first step\n\t\t\t\t * @returns {Object} infos with two attributes: <ul><li>{String} name</li><li>{Array} questions_by_part</li></ul>\n\t\t\t\t */\n\t\t\t\tt.getExamInfos = function(){\n\t\t\t\t\tvar infos = {};\n\t\t\t\t\tinfos.name = t.step_1.res.name;\n\t\t\t\t\tinfos.questions_by_part = t.step_2.res;\n\t\t\t\t\treturn infos;\n\t\t\t\t};\n\n\t\t\t\t/**\n\t\t\t\t * Method called when the user presses Ok button during the first step\n\t\t\t\t * Close the step 1 popup and create the step 2 instance\n\t\t\t\t */\n\t\t\t\tt._onOkPressStep1 = function(){\n\t\t\t\t\tt.step_1.pop.close();\n\t\t\t\t\tt.step_2 = new import_exam_subject_part_2(t.step_1.res.name,t.step_1.res.parts);\n\t\t\t\t};\n\n\t\t\t\t/**\n\t\t\t\t * Method called when the user wants to step back to first popup\n\t\t\t\t * Close and delete the step_2 popup and open the first one (with the same values)\n\t\t\t\t */\n\t\t\t\tt._onBackToStep1 = function(){\n\t\t\t\t\tt.step_2.pop.close();\n\t\t\t\t\tdelete t.step_2;\n\t\t\t\t\tt.step_2 = null;\n\t\t\t\t\tt.step_1.pop.show();\n\t\t\t\t};\n\n\t\t\t\t/**\n\t\t\t\t * Method called at the end of the step 2 when user clicks on Ok button\n\t\t\t\t */\n\t\t\t\tt._okPressStep2 = function(){\n\t\t\t\t\tt.step_2.pop.close();\n\t\t\t\t\t//TODO: add button \"back\"?\n\t\t\t\t};\n\n\t\t\t\t/**\n\t\t\t\t * Create and manage the step 2 popup, based on the step 1 data\n\t\t\t\t * @param {String} exam_name\n\t\t\t\t * @param {array} parts_number\n\t\t\t\t * The parameters come from the import_exam_subject_part_1#res attributes\n\t\t\t\t */\n\t\t\t\tfunction import_exam_subject_part_2(exam_name, parts_number){\n\t\t\t\t\tvar t2 = this;\n\t\t\t\t\tt2.table = null;\n\t\t\t\t\tt2.res = [];\n\t\t\t\t\tt2.inputs = [];\n\t\t\t\t\tt2.tr_error = null;\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Initiate the process and create the popup_window object\n\t\t\t\t\t * If the step 1 instance still exists, it is deleted\n\t\t\t\t\t */\n\t\t\t\t\tt2._init = function(){\n\t\t\t\t\t\tif(t.step_1 != null){\n\t\t\t\t\t\t\tdelete step_1;\n\t\t\t\t\t\t\tstep_1 = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tt2.table = document.createElement(\"table\");\t\t\t\t\t\t\n\t\t\t\t\t\tt2.pop = new popup_window(\n\t\t\t\t\t\t\t\"Import an exam subject - 2/3\",//build_icon: function(main,small,where)\n\t\t\t\t\t\t\ttheme.build_icon(\"/static/selection/exam/exam_16.png\",theme.icons_10.add,\"right_bottom\"),\n\t\t\t\t\t\t\tt2.table,\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t);\n\t\t\t\t\t\tt2.pop.addButton(\"<img src = '\"+theme.icons_16.left+\"'style='vertical-align:bottom'/> Back\", \"back\",t._onBackToStep1);\n\t\t\t\t\t\tt2.pop.addButton(\"<img src='\"+theme.icons_16.ok+\"' style='vertical-align:bottom'/> Ok\", 'ok', t._okPressStep2);\n\t\t\t\t\t\tt2._setContent();\n\t\t\t\t\t\tt2.pop.show();\n\t\t\t\t\t};\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Method called on each user input\n\t\t\t\t\t * If any input error is detected, the last popup row is updated with a red error message\n\t\t\t\t\t * and the ok button is disabled\n\t\t\t\t\t * If no error, message is deleted and Ok button is enabled\n\t\t\t\t\t */\n\t\t\t\t\tt2._updateErrorRow = function(){\n\t\t\t\t\t\tif(!t2._hasError()){\n\t\t\t\t\t\t\tif(t2.tr_error != null){\n\t\t\t\t\t\t\t\tt2.table.removeChild(t2.tr_error);\n\t\t\t\t\t\t\t\tdelete t2.tr_error;\n\t\t\t\t\t\t\t\tt2.tr_error = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tt2.pop.enableButton(\"ok\");\n\t\t\t\t\t\t\t//update res\n\t\t\t\t\t\t\tfor(var i = 0; i < t2.inputs.length; i++)\n\t\t\t\t\t\t\t\tt2.res[i] = t2.inputs[i].value;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(t2.tr_error == null){\n\t\t\t\t\t\t\t\tt2.tr_error = document.createElement(\"tr\");\n\t\t\t\t\t\t\t\ttd_error = document.createElement(\"td\");\n\t\t\t\t\t\t\t\ttd_error.colSpan = 2;\n\t\t\t\t\t\t\t\ttd_error.innerHTML = \"<img src = '\"+theme.icons_16.error+\"'/> You cannot have any empty part\";\n\t\t\t\t\t\t\t\ttd_error.style.color = \"red\";\n\t\t\t\t\t\t\t\tt2.tr_error.appendChild(td_error);\n\t\t\t\t\t\t\t\tt2.table.appendChild(t2.tr_error);\n\t\t\t\t\t\t\t\tt2.pop.disableButton(\"ok\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//else nothing to do\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Check that there is no error into the inputs\n\t\t\t\t\t * @returns {Boolean} true if any error is detected\n\t\t\t\t\t */\n\t\t\t\t\tt2._hasError = function(){\n\t\t\t\t\t\tfor(var i = 0; i < t2.inputs.length; i++){\n\t\t\t\t\t\t\tif(t2.inputs[i].value == null || t2.inputs[i].value == 0)\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t};\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Create the table displayed in the popup\n\t\t\t\t\t * One input is created for each part declared at first step\n\t\t\t\t\t */\n\t\t\t\t\tt2._setContent = function(){\n\t\t\t\t\t\tvar th = document.createElement(\"th\");\n\t\t\t\t\t\tth.innerHTML = \"Number of question for each part\";\n\t\t\t\t\t\tth.colSpan = 2;\n\t\t\t\t\t\tt2.table.appendChild((document.createElement(\"tr\")).appendChild(th));\n\t\t\t\t\t\tfor(var i = 1; i <= parts_number; i++){\n\t\t\t\t\t\t\tvar td_title = document.createElement(\"td\");\n\t\t\t\t\t\t\tvar td_input = document.createElement(\"td\");\n\t\t\t\t\t\t\tt2.inputs[i-1] = document.createElement(\"input\");\n\t\t\t\t\t\t\tt2.inputs[i-1].type = \"text\";\n\t\t\t\t\t\t\tinputAutoresize(t2.inputs[i-1],5);\n\t\t\t\t\t\t\tt2.inputs[i-1].oninput = function(){\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(this.value == null || this.value == \"\")\n\t\t\t\t\t\t\t\t\t\tthis.value = null;\n\t\t\t\t\t\t\t\t\telse if(isNaN(this.value))\n\t\t\t\t\t\t\t\t\t\tthis.value = null;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\tthis.value = parseInt(this.value);\n\t\t\t\t\t\t\t\t\tt2._updateErrorRow();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tt2.inputs[i-1].onkeypress = function(e) {\n\t\t\t\t\t\t\t\tvar ev = getCompatibleKeyEvent(e);\n\t\t\t\t\t\t\t\tif (ev.isEnter && !t2.pop.getIsDisabled(\"ok\"))\n\t\t\t\t\t\t\t\t\tt2.pop.pressButton('ok');\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\ttd_title.innerHTML = \"Part \"+i;\n\t\t\t\t\t\t\ttd_input.appendChild(t2.inputs[i-1]);\n\t\t\t\t\t\t\tvar tr = document.createElement(\"tr\");\n\t\t\t\t\t\t\ttr.appendChild(td_title);\n\t\t\t\t\t\t\ttr.appendChild(td_input);\n\t\t\t\t\t\t\tt2.table.appendChild(tr);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tt2._updateErrorRow();\n\t\t\t\t\t};\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tt2._init();\n\t\t\t\t}\t\t\t\t\t\n\n\t\t\t\t/**\n\t\t\t\t * Create and manage the step 2 popup\n\t\t\t\t */\n\t\t\t\tfunction import_exam_subject_part_1(){\n\t\t\t\t\tvar t1 = this;\n\t\t\t\t\t/**\n\t\t\t\t\t * res attribute contains the user inputs\n\t\t\t\t\t */\n\t\t\t\t\tt1.res = {};\n\t\t\t\t\tt1.res.name = null;\n\t\t\t\t\tt1.res.parts = null;\n\t\t\t\t\tt1.errors = {};\n\t\t\t\t\tt1.errors.name = \"Name is empty\";\n\t\t\t\t\tt1.errors.parts = \"Parts number is empty\";\n\t\t\t\t\t\n\t\t\t\t\tt1.all_names = <?php echo \"[\";\n\t\t\t\t\t\t$first = true;\n\t\t\t\t\t\tforeach($all_names as $name){\n\t\t\t\t\t\t\tif(!$first)\n\t\t\t\t\t\t\t\techo \", \";\n\t\t\t\t\t\t\t$first = false;\n\t\t\t\t\t\t\techo json_encode($name);\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"]\";\n\t\t\t\t\t?>\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Create the popup_window and add the buttons\n\t\t\t\t\t */\n\t\t\t\t\tt1._init = function(){\n\t\t\t\t\t\tt1.table = document.createElement(\"table\");\n\t\t\t\t\t\tt1._setContent();\n\t\t\t\t\t\tt1.pop = new popup_window(\n\t\t\t\t\t\t\t\"Import an exam subject - 1/3\",\n\t\t\t\t\t\t\ttheme.build_icon(\"/static/selection/exam/exam_16.png\",theme.icons_10.add,\"right_bottom\"),\n\t\t\t\t\t\t\tt1.table,\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t);\n\t\t\t\t\t\tt1.pop.addOkCancelButtons(t._onOkPressStep1,t1._onCancel);\n\t\t\t\t\t\tt1._updateErrorStatus(); //initiate the popup with an error message (empty inputs)\n\t\t\t\t\t\tt1.pop.show();\n\t\t\t\t\t};\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Check if the given name is free or not\n\t\t\t\t\t * @param {String} text the new given name\n\t\t\t\t\t * @returns {Boolean} free true if the new name is free\n\t\t\t\t\t */\n\t\t\t\t\tt1._freeName = function(text){\n\t\t\t\t\t\tvar free = true;\n\t\t\t\t\t\tfor(var i = 0; i < t1.all_names.length; i++){\n\t\t\t\t\t\t\tif(t1.all_names[i].uniformFirstLetterCapitalized() == text.uniformFirstLetterCapitalized()){\n\t\t\t\t\t\t\t\tfree = 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}\n\t\t\t\t\t\treturn free;\n\t\t\t\t\t};\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Method called when the user clicks on cancel button\n\t\t\t\t\t * Set the location to the exam main page\n\t\t\t\t\t */\n\t\t\t\t\tt1._onCancel = function(){\n\t\t\t\t\t\tt1.pop.pressButton(\"ok\");\n\t\t\t\t\t\tlocation.assign(\"/dynamic/selection/page/exam/main_page\");\n\t\t\t\t\t};\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Set the content of the popup window\n\t\t\t\t\t * Two inputs are generated and the error list is put at the bottom\n\t\t\t\t\t */\n\t\t\t\t\tt1._setContent = function(){\n\t\t\t\t\t\tvar th_name = document.createElement(\"th\");\n\t\t\t\t\t\tth_name.innerHTML = \"Enter the name of the new exam\";\n\t\t\t\t\t\tvar tr_name_1 = document.createElement(\"tr\");\n\t\t\t\t\t\ttr_name_1.appendChild(th_name);\n\t\t\t\t\t\ttr_name_2 = document.createElement(\"tr\");\n\t\t\t\t\t\tvar td_name = document.createElement(\"td\");\n\t\t\t\t\t\ttd_name.style.textAlign = \"center\";\n\t\t\t\t\t\tvar input_name = document.createElement(\"input\");\n\t\t\t\t\t\tinput_name.type = \"text\";\n\t\t\t\t\t\tinputAutoresize(input_name, 5);\n\t\t\t\t\t\tinput_name.oninput = function(){\n\t\t\t\t\t\t\tt1.res.name = null;\n\t\t\t\t\t\t\tif(!this.value.checkVisible())\n\t\t\t\t\t\t\t\tt1.errors.name = \"Name is empty\";\n\t\t\t\t\t\t\telse if(!t1._freeName(this.value))\n\t\t\t\t\t\t\t\tt1.errors.name = this.value.uniformFirstLetterCapitalized()+\" already exists in the database\";\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tt1.errors.name = null;\n\t\t\t\t\t\t\t\tt1.res.name = this.value.uniformFirstLetterCapitalized();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tt1._updateErrorStatus();\n\t\t\t\t\t\t};\n\t\t\t\t\t\tinput_name.onkeypress = function(e) {\n\t\t\t\t\t\t\tvar ev = getCompatibleKeyEvent(e);\n\t\t\t\t\t\t\tif (ev.isEnter && !t1.pop.getIsDisabled(\"ok\"))\n\t\t\t\t\t\t\t\tt1.pop.pressButton('ok');\n\t\t\t\t\t\t};\n\t\t\t\t\t\ttd_name.appendChild(input_name);\n\t\t\t\t\t\ttr_name_2.appendChild(td_name);\n\t\t\t\t\t\tt1.table.appendChild(tr_name_1);\n\t\t\t\t\t\tt1.table.appendChild(tr_name_2);\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar tr_parts_1 = document.createElement(\"tr\");\n\t\t\t\t\t\tvar tr_parts_2 = document.createElement(\"tr\");\n\t\t\t\t\t\tvar th_parts = document.createElement(\"th\");\n\t\t\t\t\t\tth_parts.innerHTML = \"Enter the number of parts\";\n\t\t\t\t\t\ttr_parts_1.appendChild(th_parts);\n\t\t\t\t\t\tvar td_parts = document.createElement(\"td\");\n\t\t\t\t\t\ttd_parts.style.textAlign = \"center\";\n\t\t\t\t\t\tvar input_parts = document.createElement(\"input\");\n\t\t\t\t\t\tinput_parts.type = \"text\";\n\t\t\t\t\t\tinputAutoresize(input_parts,5);\n\t\t\t\t\t\tinput_parts.oninput = function(){\n\t\t\t\t\t\t\tt1.res.parts = null;\n\t\t\t\t\t\t\tif(!this.value.checkVisible())\n\t\t\t\t\t\t\t\tt1.errors.parts = \"Parts number is empty\";\n\t\t\t\t\t\t\telse if(isNaN(this.value))\n\t\t\t\t\t\t\t\tt1.errors.parts = \"Parts number is not a number\";\n\t\t\t\t\t\t\telse if(parseInt(this.value) == 0)\n\t\t\t\t\t\t\t\tt1.errors.parts = \"Your exam must have at least one part\";\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tt1.errors.parts = null;\n\t\t\t\t\t\t\t\tt1.res.parts = parseInt(this.value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tt1._updateErrorStatus();\n\t\t\t\t\t\t};\n\t\t\t\t\t\tinput_parts.onkeypress = function(e) {\n\t\t\t\t\t\t\tvar ev = getCompatibleKeyEvent(e);\n\t\t\t\t\t\t\tif (ev.isEnter && !t1.pop.getIsDisabled(\"ok\"))\n\t\t\t\t\t\t\t\tt1.pop.pressButton('ok');\n\t\t\t\t\t\t};\n\t\t\t\t\t\ttd_parts.appendChild(input_parts);\n\t\t\t\t\t\ttr_parts_2.appendChild(td_parts);\n\t\t\t\t\t\tt1.table.appendChild(tr_parts_1);\n\t\t\t\t\t\tt1.table.appendChild(tr_parts_2);\n\t\t\t\t\t\tt1.tr_errors = null;\n\t\t\t\t\t};\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Remove the tr errors from the table and delete it\n\t\t\t\t\t */\n\t\t\t\t\tt1._resetTrErrors = function(){\n\t\t\t\t\t\tif(t1.tr_errors != null){\n\t\t\t\t\t\t\tt1.table.removeChild(t1.tr_errors);\n\t\t\t\t\t\t\tdelete t1.tr_errors;\n\t\t\t\t\t\t\tt1.tr_errors = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Method called on each user input\n\t\t\t\t\t * If an error is detected, the error message displayed is updated and ok button is disabled\n\t\t\t\t\t * else it is removed and ok button is enabled\n\t\t\t\t\t */\n\t\t\t\t\tt1._updateErrorStatus = function(){\n\t\t\t\t\t\tif(t1.errors.name == null && t1.errors.parts == null){\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tt1._resetTrErrors();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tt1.pop.enableButton(\"ok\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tt1._resetTrErrors();\n\t\t\t\t\t\t\tt1.tr_errors = document.createElement(\"tr\");\n\t\t\t\t\t\t\tvar td_errors = document.createElement(\"td\");\n\t\t\t\t\t\t\tvar ul = document.createElement(\"ul\");\n\t\t\t\t\t\t\tfor(i in t1.errors){\n\t\t\t\t\t\t\t\tif(t1.errors[i] != null){\n\t\t\t\t\t\t\t\t\tvar li = document.createElement(\"li\");\n\t\t\t\t\t\t\t\t\tli.innerHTML = t1.errors[i];\n\t\t\t\t\t\t\t\t\tli.style.color = \"red\";\n\t\t\t\t\t\t\t\t\tul.appendChild(li);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttd_errors.appendChild(ul);\n\t\t\t\t\t\t\tt1.tr_errors.appendChild(td_errors);\n\t\t\t\t\t\t\tt1.table.appendChild(t1.tr_errors);\n\t\t\t\t\t\t\tt1.pop.disableButton(\"ok\");\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\t/**\n\t\t\t\t\t * \n\t\t\t\t\t */\n\t\t\t\t\tt1._init();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\trequire([\"input_utils.js\",\"popup_window.js\"],function(){\n\t\t\t\t\t\tt.step_1 = new import_exam_subject_part_1();\n\t\t\t\t});\t\t\t\t\n\t\t\t}\n\t\t\tvar start_import = new import_exam_subject();\n\n\t\t\t/**\n\t\t\t * Method when user clicks on import exam button on step 3\n\t\t\t * This method performs the last checks in the imported data\n\t\t\t * @param {Array} questions given by the import_data method\n\t\t\t * @param {String} locker the id of the lock_screen set by import_data method\n\t\t\t */\n\t\t\tfunction finishImport(questions,locker){\t\t\t\t\n\t\t\t\tvar t = this;\n\t\t\t\tt.exam_infos = start_import.getExamInfos();\n\t\t\t\t// alert(service.generateInput(t.exam_infos));\n\t\t\t\tt.errors = {};\n\t\t\t\tt.errors.number_question = null;\n\n\t\t\t\t/**\n\t\t\t\t * Retrieve the willing data from the questions array\n\t\t\t\t * @param {String} category\n\t\t\t\t * @param {String} data\n\t\t\t\t * @param {Object} question, a row of questions object\n\t\t\t\t */\n\t\t\t\tt._getData = function(category, data, question) {\n\t\t\t\t\tfor (var i = 0; i < question.length; ++i)\n\t\t\t\t\t\tif (question[i].data.category == category && question[i].data.name == data)\n\t\t\t\t\t\t\treturn question[i].value;\n\t\t\t\t};\n\n\t\t\t\t/**\n\t\t\t\t * Start the process\n\t\t\t\t */\n\t\t\t\tt._init = function(){\n\t\t\t\t\t//check the number of question imported matches\n\t\t\t\t\tvar total_questions = 0;\n\t\t\t\t\tfor(var i = 0; i < t.exam_infos.questions_by_part.length; i++)\n\t\t\t\t\t\ttotal_questions = total_questions + parseInt(t.exam_infos.questions_by_part[i]);\n\t\t\t\t\tif(total_questions != questions.length)\n\t\t\t\t\t\tt.errors.number_question = \"The number of question imported (\"+questions.length+\") does not match with the one expected (\"+total_questions+\")\";\n\t\t\t\t\t//check the max_score parameters are numbers > 0\n\t\t\t\t\tvar err_msg = \"\";\n\t\t\t\t\tfor(var i = 0; i < questions.length; i++){\n\t\t\t\t\t\tif(!t._checkMaxScore(t._getData(\"Exam Subject Question\",\"Max Score\",questions[i]))){\n\t\t\t\t\t\t\tif(err_msg == \"\")\n\t\t\t\t\t\t\t\terr_msg += \"The following questions haven't got a <b>number > 0</b> as a score:<br/><ul>\";\n\t\t\t\t\t\t\tvar displayable_index = i+1;\n\t\t\t\t\t\t\terr_msg += \"<li>Question \"+displayable_index+\"</li>\";\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(err_msg != \"\"){\n\t\t\t\t\t\terr_msg += \"</ul>\";\n\t\t\t\t\t\tt.errors.max_score = err_msg;\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(t.errors.max_score != null || t.errors.number_question != null){\n\t\t\t\t\t\tunlock_screen(locker);\n\t\t\t\t\t\tif(t.errors.number_question != null)\n\t\t\t\t\t\t\terror_dialog(t.errors.number_question);\n\t\t\t\t\t\tif(t.errors.max_score != null)\n\t\t\t\t\t\t\terror_dialog(t.errors.max_score);\n\t\t\t\t\t} else\n\t\t\t\t\t\tt._end();\n\t\t\t\t};\n\n\t\t\t\t/**\n\t\t\t\t * Finish the import: create an exam_subject object and call the service exam/save_subject\n\t\t\t\t * If the save exam was properly performed, location is updated to exam/subject page\n\t\t\t\t */\n\t\t\t\tt._end = function(){\n\t\t\t\t\t//create an exam object\n\t\t\t\t\tvar new_parts = [];\n\t\t\t\t\tvar subject_max_score = 0;\n// \t\t\t\t\tsubject.id = -1;\n// \t\t\t\t\tsubject.name = t.exam_infos.name;\n// \t\t\t\t\tsubject.max_score = 0; //TODO update\n// \t\t\t\t\tsubject.parts = [];\n\t\t\t\t\tvar index = 0;\n\t\t\t\t\tfor(var i = 0; i < t.exam_infos.questions_by_part.length; i++){\n\t\t\t\t\t\tvar part_questions = [];\n\t\t\t\t\t\tpart_max_score = 0;\n\t\t\t\t\t\tfor(var j = 1; j <= t.exam_infos.questions_by_part[i]; j++){\n// \t\t\t\t\t\t\tvar q = {};\n// \t\t\t\t\t\t\tq.id = -1;\n// \t\t\t\t\t\t\tq.index = j;//index in the part\n// \t\t\t\t\t\t\tq.max_score = t._getData(\"Exam Subject Question\",\"Max Score\",questions[index]);\n// \t\t\t\t\t\t\tq.correct_answer = t._getData(\"Exam Subject Question\",\"Correct Answer\",questions[index]);\n// \t\t\t\t\t\t\tq.choices = t._getData(\"Exam Subject Question\",\"Choices\",questions[index]);\n\t\t\t\t\t\t\tvar q = new ExamSubjectQuestion(\n\t\t\t\t\t\t\t\t\t-1,\n\t\t\t\t\t\t\t\t\tj,\n\t\t\t\t\t\t\t\t\tt._getData(\"Exam Subject Question\",\"Correct Answer\",questions[index]),\n\t\t\t\t\t\t\t\t\tt._getData(\"Exam Subject Question\",\"Choices\",questions[index])\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\tpart_max_score = part_max_score + parseFloat(q.max_score);\n\t\t\t\t\t\t\tsubject_max_score = subject_max_score + parseFloat(q.max_score);\n\t\t\t\t\t\t\tpart_questions.push(q);\n\t\t\t\t\t\t}\n// \t\t\t\t\t\tvar part = {};\n// \t\t\t\t\t\tpart.id = -1;\n// \t\t\t\t\t\tpart.index = i+1;\n// \t\t\t\t\t\tpart.name = \"\";\n// \t\t\t\t\t\tpart.max_score = part_max_score;\n// \t\t\t\t\t\tpart.questions = subject_questions;\n\t\t\t\t\t\tvar part = new ExamSubjectPart(\n\t\t\t\t\t\t\t\t\t-1,\n\t\t\t\t\t\t\t\t\ti+1,\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\tpart_max_score,\n\t\t\t\t\t\t\t\t\tpart_questions\n\t\t\t\t\t\t\t\t);\n// \t\t\t\t\t\tsubject.parts.push(part);\n\t\t\t\t\t\tnew_parts.push(part);\n\t\t\t\t\t}\n\t\t\t\t\tvar subject = new ExamSubject(-1,t.exam_infos.name,subject_max_score,new_parts);\n\t\t\t\t\t//save\t\t\t\t\t\n\t\t\t\t\tservice.json(\"selection\",\"exam/save_subject\",{exam:subject},function(res){\n\t\t\t\t\t\tunlock_screen(locker);\n\t\t\t\t\t\tif(!res)\n\t\t\t\t\t\t\terror_dialog(\"An error occured, importation failed\");\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tlocation.assign(\"/dynamic/selection/page/exam/exam_subject?id=\"+res.id);\n\t\t\t\t\t});\n\t\t\t\t};\n\n\t\t\t\t/**\n\t\t\t\t * Check that the max_score inputs are valid\n\t\t\t\t * @param {String | Number} score\n\t\t\t\t * @returns {Boolean} true if the score format is valid \n\t\t\t\t */\n\t\t\t\tt._checkMaxScore = function(score){\n\t\t\t\t\tif(score == null || score == \"\")\n\t\t\t\t\t\treturn false;\n\t\t\t\t\telse if(isNaN(score))\n\t\t\t\t\t\treturn false;\n\t\t\t\t\telse\n\t\t\t\t\t\treturn true;\n\t\t\t\t};\n\t\t\t\t//TODO check the other parameters (correct answer, choices)?\n\t\t\t\t\n\t\t\t\trequire(\"exam_objects.js\",function(){\n\t\t\t\t\tt._init();\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\n\t\t\t</script>\n\t\t\t<?php\n\t\t}\n\t}", "title": "" }, { "docid": "1d8a0093480e987ebbda92a559ff1598", "score": "0.5097573", "text": "function getSelectUserToManageChoices(){\n\t\t$user_db = new Users();\n\t\t\n\t\t//initialize the return array of choices\n\t\t$ret = array(array(\"text\"=>\"Create new User...\", \"value\"=>\"NEW\"));\n\n\t\t//Query for the existing users\n\t\t$users = $user_db->getUsers();\n\n\t\treturn $this->createChoices($ret, $users, \"USERNAME\", \"ID\");\n\t}", "title": "" }, { "docid": "56e2ea35407201e06c2d291063d74d1a", "score": "0.5088289", "text": "public function getAssignment($roleName, $userId);", "title": "" }, { "docid": "17f53a4b5cbbdb33958773cae92e4122", "score": "0.5086704", "text": "function get_assignable_roles ($context) {\n\n $options = array();\n\n if ($roles = get_records('role')) {\n foreach ($roles as $role) {\n if (user_can_assign($context, $role->id)) {\n $options[$role->id] = $role->name;\n }\n }\n }\n return $options;\n}", "title": "" }, { "docid": "8ce49c84731a343fa938cb7ab7d2cfa5", "score": "0.5058194", "text": "function getUserRoleChoices(){\n\t\t$role_options_db = new Lt_users_role();\n\n\t\t//get the roles\n\t\t$roles = $role_options_db->getRoles();\n\n\t\treturn $this->createChoices(array(), $roles, \"LABEL\", \"ID\");\n\t}", "title": "" }, { "docid": "fd39eb9ae953dafef588a28aa4a76b6a", "score": "0.5057498", "text": "function isAuthorised() {\r\n global $user;\r\n // check if one of two users: hardcoded as only two, not a whole list\r\n if ($user == \"campbest\" || $user == \"zampaze\") {\r\n return \"style='display:inline'\";\r\n }\r\n return \"style='display:none'\";\r\n}", "title": "" }, { "docid": "efd22f9176ff30e062d3fdbae5beed25", "score": "0.5057375", "text": "function get_security() {\n\t\t\n\t\t$r = $this->db->select($this->table, array(\"user_ID\"=>USER_ID), array(\"security_json\"));\n\t\tif ($r) {\n\t\t\t$json = $this->db->fetch_assoc($r);\n\t\t\treturn json_decode($json['security_json'], true);\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "5d74b3fb247872fc16b36b4d5d99d51e", "score": "0.5057096", "text": "public function askPrivateQuestion($question_id, $expertiseId){\n\n $ask_question = AskQuestion::where('id', $question_id)->first();\n $subject = \"New Private Question Request\";\n\n $array['view'] = 'crm.emails.askQuestion';\n $array['subject'] = $subject;\n $array['from'] = env('MAIL_FROM_ADDRESS');\n $array['question_title'] = $ask_question->question_title;\n $array['description'] = $ask_question->description;\n\n foreach ($expertiseId as $id) {\n $expert = User::where('id', $id)->first();\n $expert_name = $expert->first_name.' '.$expert->last_name;\n $this->sendHtmlMail($expert->email , $array);\n }\n }", "title": "" }, { "docid": "08b378e0327f196f43de6b06cdc77bca", "score": "0.5056618", "text": "public function getStudentTextSop(Request $request) {\n\n // Get School id according to apply by student and then after that sop will be display according school with defualt sop\n $data = []; \n $user_id = $request->user_id;\n\n // One to One Relation Mapping\n $sop = Sop::with('sopAnswer')\n ->whereHas('sopAnswer', function($query) use ($user_id) {\n $query->whereUserId($user_id);\n })\n //->whereSopType('text')\n ->get();\n $allData = array();\n foreach ($sop as $sops) {\n $sopAnswerData = $sops->sopAnswer->toArray();\n $data['sop_id'] = $sops->id;\n $data['name'] = $sops->question;\n $data['answer'] = $sopAnswerData['answer'];\n $allData[] = $data;\n }\n\n return response()->json(['code' => 200, 'data' => $data]);\n }", "title": "" }, { "docid": "99a1ca147f935a971b5df224d2f52d92", "score": "0.5050808", "text": "function get_choices_for_user($user_id){\n\tglobal $wpdb;\n\t$sql = \"SELECT cat_id FROM \".SUBSCRIBE_TABLE.\" WHERE user_id = \".$user_id;\n\t$res = $wpdb->get_results($sql);\n\t$cats = get_all_categories();\n\n\tforeach ($res as $obj) {\n\t\t$cats[$obj->cat_id]['choice'] = true;\n\t}\n\n\treturn $cats;\n}", "title": "" }, { "docid": "22bfcd095a11e12b7ebef76841ec5ccb", "score": "0.5049588", "text": "public function getGrantedByUser();", "title": "" }, { "docid": "d3b6fc2db922c3a53bfe40f78c2beba3", "score": "0.503344", "text": "public function getrestrictedsitesbyuserId($userId) {\n $stmt = $this->conn->prepare(\"SELECT * FROM restricted_sites where userId=?\");\n\t\t$stmt->bind_param(\"i\", $userId);\n if ($stmt->execute()) {\n $user = $stmt->get_result()->fetch_all();\n $stmt->close();\n return $user;\n }else{\n return NULL;\n }\n }", "title": "" }, { "docid": "0523ee63b6c2f8fc701878b6c02ae6c5", "score": "0.5021127", "text": "public function survey_by_id($sid){\n if (!has_permission('view any survey page') && !has_permission('view assigned survey page')) {\n show_403();\n }\n\n $survey = $this->survey_model->get($sid);\n if (!$survey) {\n show_404();\n }\n \n if (has_permission('view any survey page')) {\n if (!$survey->status_allows('view survey page')) {\n show_403();\n }\n }\n else if (!has_permission('view any survey page') && has_permission('view assigned survey page')) {\n // Must be assigned and correct status\n if (!$survey->is_assigned_agent(current_user()->uid) || !$survey->status_allows('view assigned survey page')) {\n show_403();\n }\n }\n\n $data = array();\n $data['survey'] = $survey;\n\n // Agents. Each array element contains the user and\n // properties for the select. (selected, disabled)\n $agents = array();\n // Prepare users.\n $all_agents = $this->user_model->get_with_role(ROLE_CC_AGENT);\n foreach ($all_agents as $index => $user) {\n $agents[$index]['user'] = $user;\n $agents[$index]['properties'] = array();\n\n if ($survey->is_assigned_agent($user->uid)) {\n $agents[$index]['properties'][] = 'selected';\n\n // TODO: Check if the user can be unassigned.\n }\n\n }\n $data['agents'] = $agents;\n \n // Call tasks, statistics and stuff.\n // We need call tasks to compute the progress bars and the cal tasks tables.\n // Instead of doing complicated aggregate queries for each one, we just get all\n // the call tasks and extract all the data we need.\n $all_call_tasks = $this->call_task_model->get_all($survey->sid);\n \n $call_tasks_status_bar = array(\n 'total' => count($all_call_tasks),\n 'success' => 0,\n 'failed' => 0,\n 'pending' => 0,\n 'remaining' => 0,\n );\n \n // Prepare call tasks table by looping over assigned agents.\n $call_tasks_table = array();\n foreach ($survey->agents as $uid) {\n $user = $this->user_model->get($uid); \n $call_tasks_table[$uid] = array(\n 'name' => $user->name,\n 'sum' => 0,\n 'success' => 0,\n 'failed' => 0,\n 'pending' => 0,\n );\n }\n \n // Prepare array for morris chart data.\n $call_tasks_placed_calls = array(\n 'data' => array(),\n 'sum' => 0\n );\n foreach (Call_task_status::$labels as $status_code => $label) {\n $call_tasks_placed_calls['data'][$status_code] = array(\n 'label' => $label,\n 'value' => 0\n );\n }\n \n // The mighty call tasks loop.\n foreach ($all_call_tasks as $call_task) {\n \n // Compute call tasks status bar.\n if ($call_task->is_unresolved()) {\n $call_tasks_status_bar['pending']++;\n }\n else if ($call_task->is_success()) {\n $call_tasks_status_bar['success']++;\n }\n else if ($call_task->is_failed()) {\n $call_tasks_status_bar['failed']++;\n }\n else {\n $call_tasks_status_bar['remaining']++;\n }\n // //END Compute call tasks status bar.\n /**********************************************/\n \n // Prepare table data.\n if ($call_task->is_assigned()) {\n $uid = $call_task->assignee_uid;\n \n if (isset($call_tasks_table[$uid])) {\n if ($call_task->is_unresolved()) {\n $call_tasks_table[$uid]['pending']++;\n $call_tasks_table[$uid]['sum']++;\n }\n else if ($call_task->is_success()) {\n $call_tasks_table[$uid]['success']++;\n $call_tasks_table[$uid]['sum']++;\n }\n else if ($call_task->is_failed()) {\n $call_tasks_table[$uid]['failed']++;\n $call_tasks_table[$uid]['sum']++;\n }\n // else\n // Call tasks that are reserved (assigned but without activity)\n // do not interest us. Skip them.\n }\n // else\n // The agent was probably unassigned. just ignore it.\n }\n // //END Prepare table data.\n /**********************************************/\n \n // Count call activity status for morris chart.\n if (!empty($call_task->activity)) {\n foreach ($call_task->activity as $status) {\n $call_tasks_placed_calls['data'][$status->code]['value']++;\n $call_tasks_placed_calls['sum']++;\n }\n }\n // //END Count call activity status for morris chart.\n /**********************************************/\n \n }\n\n $data['call_tasks_status_bar'] = $call_tasks_status_bar;\n $data['call_tasks_table'] = $call_tasks_table;\n $data['call_tasks_placed_calls'] = $call_tasks_placed_calls;\n\n $this->load->view('base/html_start');\n $this->load->view('components/navigation', array('active_menu' => 'surveys'));\n $this->load->view('surveys/survey_page', $data);\n $this->load->view('base/html_end');\n\n }", "title": "" }, { "docid": "5a13a9c6cb25107dbf1ec1335ffad249", "score": "0.50195605", "text": "function getSchoolUsersRoleAction() {\n\t\tif (! in_array ( \"create_network\", $this->user ['capabilities'] ))\n\t\t\t$this->apiResult [\"message\"] = \"You are not authorized to perform this task.\\n\";\n\t\t\tif(empty($_POST['school_ids']) && empty($_POST['user_role_ids']))\n\t\t\t\t$this->apiResult [\"message\"] = \"School id/User Role cannot be empty.\\n\";\n\t\t\t\telse {\n\t\t\t\t\t$resourceModel = new resourceModel ();\n\t\t\t\t $school_ids = $_POST['school_ids'];\n\t\t\t\t //$user_role_ids = $_POST['user_role_ids'];\n //print_r($school_ids);die;\n\t\t\t\t\t//echo $network_id;\n $user_list = $resourceModel->getSchoolUsersRoles($school_ids);\n $user_list = array_values(array_filter(array_map('array_filter', $user_list)));\n// / echo \"<pre>\"; print_r($user_list);\n if(count($user_list) >= 1) {\n $this->apiResult [\"status\"] = 1; \n $this->apiResult [\"message\"] = 'Success';\n $this->apiResult [\"role_list\"] = $user_list;\n\n }else {\n $this->apiResult [\"status\"] = 0;\n $this->apiResult [\"message\"] = \"User not exist for this schools\";\n }\n\t\t\t\t\t\n\t\t\t\t}\n\t}", "title": "" }, { "docid": "6c7aeffb48d6cbb23028bfb1a60e7935", "score": "0.50033313", "text": "public function show($id){\n//dd(Auth::user()->id);\nif((Auth::user()->role) != \"admin\"){\nif((Auth::user()->testsAllowed) < 1){\n$data['msg'] = \"You Are NOT Authorised To Take Any More Tests\";\nreturn view('errors.general')->with(\"data\",$data);\n} \n//...........................\nif(Auth::user()->enabled !== \"1\"){\n $data['msg'] = \"This account is not enabled Please contact the administrator.\";\n return view('errors.general')->with(\"data\",$data);\n}\n}//if not admin\n\n$d = Paper::where('id',$id)->first();\n$data['paper'] = ($d->toArray());\n$data['items'] = ($d->paperItems->toArray());\n$data['questions'] = [];\n foreach($data['items'] as $k=>$v){\n $step1 = Question::where('subject_id',$v['subject_id'])->where('level_id',$v['level_id'])->where('difficulty',$v['difficulty'])->get();\n $step2 = $this->shuffle_assoc($step1->toArray());\n $step3 = array_slice($step2, 0, $v['quantity']);\n $data['questions'] = array_merge($data['questions'], $step3);\n }\n $this->decAllowedTests(); \n///XXXX remove correctOption from EachQuestion\n$data['attemptsRemaining'] = $this->getAllowedTests();\nreturn view('test.test')->with(\"data\",$data);\n\n}", "title": "" }, { "docid": "7f8e17cbf03958fc326cebfc12e9c93c", "score": "0.5002638", "text": "function aiosc_role_user_page($wp_user) {\n global $aiosc_capabilities;\n $user = new aiosc_User($wp_user->ID);\n $roles = $aiosc_capabilities->get_roles();\n ?>\n <h3><?php _e('Ticket System','aiosc'); ?></h3>\n <table class=\"form-table\">\n <input type=\"hidden\" name=\"aiosc_curr_user_id\" value=\"<?php echo $wp_user->ID ?>\" />\n <tr>\n <th><label for=\"aiosc-role\"><?php printf(__('Ticket System Rol', 'aiosc')); ?></label></th>\n <td>\n <select id=\"aiosc-role\" name=\"aiosc_role\">\n <option value=\"\"><?php _e('- Ningún rol para este usuario -','aiosc')?></option>\n <?php\n foreach($roles as $role_id=>$data) :\n $selected = @$user->aiosc_role == $role_id?\" selected\":\"\";\n echo \"<option value='$role_id'$selected>\".$data['name'].\"</option>\";\n ?>\n <?php endforeach; ?>\n </select>\n </td>\n </tr>\n </table>\n <?php\n }", "title": "" }, { "docid": "c3cc33a382ccfe03c42192bd4c4a7936", "score": "0.4996058", "text": "private function getSecurity()\n {\n if ($this->choices->siteType!=\"CMS\") {\n $choice = $this->prompt->singleSelect(\"[7/7] Will your site have login\", array(\"yes\",\"no\"), 1)==\"yes\";\n if (!$choice) {\n return false;\n }\n }\n \n $features = new SecurityFeatures();\n \n $features->persistenceDrivers = $this->prompt->multipleSelect(\n \"[7/7 1/4] Choose where logged in state is remembered across requests\",\n ($this->choices->siteType != \"RESTful web services\"?array(\"session\",\"remember me\"):array(\"synchronizer token\",\"json web token\")),\n 0\n );\n \n if ($this->choices->siteType==\"CMS\") {\n $features->authenticationMethods = array(\"database\");\n $features->authorizationMethod = \"database\";\n return $features;\n }\n \n $features->authenticationMethods = $this->prompt->multipleSelect(\n \"[7/7 2/4] Choose where authentication will be performed\",\n array(\"database\",\"oauth2 providers\",\"access control list\"),\n 0\n );\n if (in_array(\"access control list\", $features->authenticationMethods) && sizeof($features->authenticationMethods)!=1) {\n $this->prompt->error(\"Access control list is incompatible with other authentication methods\");\n return $this->getSecurity();\n }\n \n if (in_array(\"oauth2 providers\", $features->authenticationMethods)) {\n $oauth2Providers = $this->prompt->multipleSelect(\n \"[7/7 3/4] Choose oauth2 providers you want to support\",\n array(\"Facebook\",\"Google\",\"Instagram\",\"GitHub\",\"LinkedIn\",\"VK\",\"Yahoo\",\"Yandex\"),\n null\n );\n foreach ($oauth2Providers as $provider) {\n $info = new OAuth2Provider();\n $info->driver = $provider;\n $info->clientID = $this->prompt->text(\"[7/7 3/4 1/3] Please write your client id setup in \".$provider.\" site\", null, function ($result) {\n return !empty($result);\n });\n $info->clientSecret = $this->prompt->text(\"[7/7 3/4 2/3] Please write your client secret setup in \".$provider.\" site\", null, function ($result) {\n return !empty($result);\n });\n if ($provider==\"GitHub\") {\n $info->applicationName = $this->prompt->text(\"[7/7 3/4 3/3] Please write your application name setup in \".$provider.\" site\", null, function ($result) {\n return !empty($result);\n });\n }\n $features->oauth2Providers[] = $info;\n }\n }\n \n $features->authorizationMethod = $this->prompt->singleSelect(\n \"[7/7 4/4] Choose where authorization will be performed\",\n array(\"database\",\"access control list\"),\n 1\n );\n \n return $features;\n }", "title": "" }, { "docid": "c9eedd1b1906e6f1e415fcbadd635cd4", "score": "0.49941063", "text": "protected function getEnrolledCampuses() {\n \n $userID = $this->user->getUserID();\n\n return $this->db->query(\"SELECT DISTINCT c.Campus AS Code, s.Campus, s.Emblem, s.Location, s.FullLink AS src\n FROM `Enrollments` AS e\n JOIN Courses AS c ON c.OrgID = e.CourseID\n JOIN Campuses AS s ON s.Code = c.Campus\n WHERE e.StarID = :UserID\", array(\"UserID\" => $userID));\n \n \n }", "title": "" }, { "docid": "8cb767fd686362fabafcd83fb3c8b6e2", "score": "0.49859384", "text": "public function adminsucursal() {\n \n return DB::table('sucursales')->select('id', 'razon_social')->whereNotIn('id', DB::table('user_sucursal')->join('users', 'users.id', '=', 'user_sucursal.user_id')->select('user_sucursal.sucursal_id')->where('users.tipo_usuario', '=', 'Administrador de sucursal'))->pluck('razon_social','id');\n }", "title": "" }, { "docid": "b9983f6042fe97d7484d28d752d1f118", "score": "0.4968998", "text": "function learndash_get_user_assignments( $post_id, $user_id, $course_id = 0 ) {\n\tif ( empty( $course_id ) ) {\n\t\t$course_id = learndash_get_course_id( $post_id );\n\t}\n\n\t$opt = array(\n\t\t'post_type' => 'sfwd-assignment',\n\t\t'posts_per_page' => - 1,\n\t\t'author' => $user_id,\n\t\t'meta_query' => array(\n\t\t\t'relation' => 'AND',\n\t\t\tarray(\n\t\t\t\t'key' => 'lesson_id',\n\t\t\t\t'value' => $post_id,\n\t\t\t\t'compare' => '=',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'course_id',\n\t\t\t\t'value' => $course_id,\n\t\t\t\t'compare' => '=',\n\t\t\t),\n\t\t),\n\t);\n\treturn get_posts( $opt );\n}", "title": "" }, { "docid": "11d2b0eb0ac3427ce739a396fa02082b", "score": "0.4960822", "text": "public function examining(Request $request)\n {\n //return Admin::where('examiner', Auth::user()->id)->leftJoin('users AS u', 'projectdata.studentid', '=', 'u.id')->get(['u.name'])->toJson();\n //return DB::table('projectdata AS p')->leftJoin('users AS u', 'u.id', '=', 'p.studentid')->where('p.examiner', '=', Auth::user()->id )->select('u.*','p.*')->get();\n return DB::table('projectdata AS p')->leftJoin('users AS u', 'u.id', '=', 'p.studentid')->leftJoin('submission AS s', 'p.studentid','=','s.userid')->where('p.examiner', '=', Auth::user()->id )->select('u.*','p.*')->selectRaw('count(s.chapter) AS counter')->groupBy('p.studentid')->get();\n\n //return Admin::where('examiner', '8')->leftJoin('users AS u', 'projectdata.studentid', '=', 'u.id')->select('users.*','projectdata.*')->get();\n //return Admin::where('examiner', '8')->get();\n }", "title": "" }, { "docid": "21ce31901dfa6aa0bd2b6d579f386d1e", "score": "0.49550268", "text": "function codaserver_show_form_permissions($resource_identifier, $user_name = null, $group_name = null, $role_name = null, $where_clause = null, $order_by_clause = null) {\r\n\tif (!empty($group_name) && empty($user_name)) {\r\n\t\tthrow new Exception('Cannot specify a group name without a username');\r\n\t}\r\n\tif (!empty($role_name) && !empty($user_name)) {\r\n\t\tthrow new Exception('Cannot specify both a username and a role name');\r\n\t}\r\n\treturn codaserver_query($resource_identifier, 'SHOW FORM PERMISSIONS '.(!empty($role_name) ? ' FOR ROLE '.$role_name : '').(!empty($user_name) ? ' FOR USER '.$user_name : '').(!empty($group_name) ? ' IN GROUP '.$group_name : '').(!empty($where_clause) ? ' WHERE '.$where_clause : '').(!empty($order_by_clause) ? ' ORDER BY '.$order_by_clause : ''));\r\n}", "title": "" }, { "docid": "8f1bbd2e4de1890d69a5d8b861f52e05", "score": "0.495219", "text": "function attempted_questions()\n {\n $user = $_SESSION['ID'];\n $session = $_GET['ref_content'];\n if ($session != \"\" and $user != \"\") {\n $db = new db;\n $get = $db->get(\"SELECT questionID,answer,status FROM excercise WHERE user='$user' AND sessionID='$session' ORDER BY date DESC\");\n $num = number_rows($get);\n if ($num > 0) {\n\n $config = new config;\n\n echo ('<ul style=\"font-size:14px;margin:0;padding:0;text-align:left;\">');\n for ($x = 1; $x <= $num; $x++) {\n $row = record($get);\n $qn_details = $config->return_question($row['questionID']);\n\n\n echo ('<li style=\"color:gray;\">');\n echo '(' . ($x) . ') ';\n\n echo ucfirst($qn_details['question']);\n echo ('?');\n\n if (isset($_GET['qn_ans'])) {\n if ($qn_details['tag'] == $row['answer']) {\n echo ('<span style=\"color:green;float:right;\">Correct</span>');\n\n } elseif ($qn_details['tag'] != $row['answer']) {\n echo ('<span style=\"color:red; float:right;\">Wrong <strong>(' . ucfirst($row['answer']) .\n ')</strong></span>');\n }\n }\n\n\n echo ('<hr/></li>');\n }\n echo ('</ul>');\n end_get_records($get);\n } else {\n echo ('<span style=\"color:gray;\">No questions attempted</span>');\n }\n }\n }", "title": "" }, { "docid": "0812fc8c6e0720b4783616314820b15b", "score": "0.49507207", "text": "public static function option(){ //verifica si el usuario tiene el privilegio que necesita\n \n $check = \\App\\umedida::all();\n $t = \"\";\n foreach ($check as $k) {\n $t .='<option value=\"'.$k['id'].'\">'.$k['nombre'].' ('.$k['signo'].')'.'</option>';\n }\n return $t; \n }", "title": "" }, { "docid": "df09b434c795a0c27c46933d101822d9", "score": "0.49505275", "text": "private function rolesPermits()\n\t{\n\t\treturn implode(' ', $this->rolesQuery()->pluck('pivot.permissions')->toArray());\n\t}", "title": "" }, { "docid": "510d23ad796145a66e8f6e4e0efb729a", "score": "0.4948618", "text": "public function subject()\n {\n $users = DB::table('subjects')->select('id','subject_name','branch','Standard','subject_code','subject_notes')->get();\n //echo Auth::User();\n return view('student.subject', compact('users'));\n\n // return view('student.subject');\n }", "title": "" }, { "docid": "4646a5ec2ea8ef2418ae7911495bf650", "score": "0.49428192", "text": "function get_submission_details($assignment, $userid) {\n\tglobal $DB, $CFG, $PAGE;\n\trequire_once($CFG->dirroot . '/mod/assignment/lib.php');\n\trequire_once($CFG->libdir.'/plagiarismlib.php');\n\t//$PAGE->requires->js('/mod/assignment/assignment.js');\n\t$course = $DB->get_record('course', array ('id' => $assignment->course), '*', MUST_EXIST);\n\t$module = $DB->get_record_select('modules', 'name = \"assignment\"', null, '*', MUST_EXIST);\n\t$cm = $DB->get_record('course_modules', array ('course' => $course->id, 'module' => $module->id, 'instance' => $assignment->id), '*', MUST_EXIST);\n\t// Copied from /mod/assignment/submissions.php: Load up the required assignment code\n\trequire_once($CFG->dirroot.'/mod/assignment/type/'.$assignment->assignmenttype.'/assignment.class.php');\n\t$assignmentclass = 'assignment_'.$assignment->assignmenttype;\n\t$assignmentinstance = new $assignmentclass($cm->id, $assignment, $cm, $course);\n\treturn $assignmentinstance->print_student_answer($userid);\n}", "title": "" }, { "docid": "193b13944bc075476d3e20e9cce1513d", "score": "0.49382806", "text": "public function supervise(Request $request)\n {\n //return Admin::where('examiner', Auth::user()->id)->leftJoin('users AS u', 'projectdata.studentid', '=', 'u.id')->get(['u.name'])->toJson();\n //return DB::table('projectdata AS p')->leftJoin('users AS u', 'u.id', '=', 'p.studentid')->where('p.examiner', '=', Auth::user()->id )->select('u.*','p.*')->get();\n return DB::table('projectdata AS p')->leftJoin('users AS u', 'u.id', '=', 'p.studentid')->leftJoin('submission AS s', 'p.studentid','=','s.userid')->where('p.supervisor', '=', Auth::user()->id )->select('u.*','p.*')->selectRaw('count(s.chapter) AS counter')->groupBy('p.studentid')->orderBy('p.id', 'ASC')->get();\n\n //return Admin::where('examiner', '8')->leftJoin('users AS u', 'projectdata.studentid', '=', 'u.id')->select('users.*','projectdata.*')->get();\n //return Admin::where('examiner', '8')->get();\n }", "title": "" }, { "docid": "833d49611438444edca3d20fdb0026bb", "score": "0.49349144", "text": "public function getStudents(){\n $query = \"SELECT * FROM user_types WHERE userType IN('Student','Prefect')\";\n $result = $this->db->select($query);\n return $result;\n }", "title": "" }, { "docid": "e9f56efce56a60550a054bd572159f87", "score": "0.49290556", "text": "public function showQuestionAnswerUsers($id = null)\n {\n $limit = Input::get('limit') ?: 20;\n $usersecurityquestions = $id ? User::find($id)->security_question_users : SecurityQuestion::paginate($limit);\n \n return response()->json([\n 'data' => $this->transformCollection($usersecurityquestions),\n ]);\n }", "title": "" }, { "docid": "729590d8f0587f0ee912b2780f80186a", "score": "0.49235168", "text": "public function assigned_user_lists()\n {\n $result = common_select_values('user_id, name', 'users', ' status!=2 AND allow_lead = 1', 'result');\n return $result; \n\n }", "title": "" }, { "docid": "50fafaedfab140bc5daa10def90f2908", "score": "0.49231693", "text": "private function prevent_direct_user_input() {\n global $DB, $USER, $COURSE;\n\n $cansubmit = has_capability('mod/surveypro:submit', $this->context);\n $canseeotherssubmissions = has_capability('mod/surveypro:seeotherssubmissions', $this->context);\n $canignoremaxentries = has_capability('mod/surveypro:ignoremaxentries', $this->context);\n $caneditotherssubmissions = has_capability('mod/surveypro:editotherssubmissions', $this->context);\n $caneditownsubmissions = has_capability('mod/surveypro:editownsubmissions', $this->context);\n\n if (($this->view == SURVEYPRO_READONLYRESPONSE) || ($this->view == SURVEYPRO_EDITRESPONSE)) {\n $where = array('id' => $this->get_submissionid());\n if (!$submission = $DB->get_record('surveypro_submission', $where, '*', IGNORE_MISSING)) {\n throw new \\moodle_exception('incorrectaccessdetected', 'mod_surveypro');\n }\n if ($submission->userid != $USER->id) {\n $groupmode = groups_get_activity_groupmode($this->cm, $COURSE);\n if ($groupmode == SEPARATEGROUPS) {\n $utilitysubmissionman = new utility_submission($cm, $surveypro);\n $mygroupmates = $utilitysubmissionman->get_groupmates($this->cm);\n // If I am a teacher, $mygroupmates is empty but I still have the right to see all my students.\n if (!$mygroupmates) { // I have no $mygroupmates. I am a teacher. I am active part of each group.\n $groupuser = true;\n } else {\n $groupuser = in_array($submission->userid, $mygroupmates);\n }\n }\n }\n }\n\n switch ($this->view) {\n case SURVEYPRO_NEWRESPONSE:\n $timenow = time();\n $allowed = $cansubmit;\n if ($this->surveypro->timeopen) {\n $allowed = $allowed && ($this->surveypro->timeopen < $timenow);\n }\n if ($this->surveypro->timeclose) {\n $allowed = $allowed && ($this->surveypro->timeclose > $timenow);\n }\n\n if (!$canignoremaxentries) {\n // Take care! Let's suppose this scenario:\n // $this->surveypro->maxentries = N\n // $utilitylayoutman->has_submissions(true, SURVEYPRO_STATUSALL, $USER->id) = N - 1.\n // When I fill the FIRST page of a survey, I get $next = N\n // but when I go to fill the SECOND page of a survey I have one more \"in progress\" survey\n // that is the one that I created when I saved the FIRST page, so...\n // when $this->user_sent_submissions(SURVEYPRO_STATUSALL) = N, I get\n // $next = N + 1\n // and I am wrongly stopped here!\n // Because of this, I increase $next only if submissionid == 0.\n $utilitylayoutman = new utility_layout($this->cm, $this->surveypro);\n $next = $utilitylayoutman->has_submissions(true, SURVEYPRO_STATUSALL, $USER->id);\n if (!$this->get_submissionid()) {\n $next += 1;\n }\n\n $allowed = $allowed && (($this->surveypro->maxentries == 0) || ($next <= $this->surveypro->maxentries));\n }\n break;\n case SURVEYPRO_EDITRESPONSE:\n if ($USER->id == $submission->userid) {\n // Whether in progress, always allow.\n $allowed = ($submission->status == SURVEYPRO_STATUSINPROGRESS) ? true : $caneditownsubmissions;\n } else {\n if ($groupmode == SEPARATEGROUPS) {\n $allowed = $groupuser && $caneditotherssubmissions;\n } else { // NOGROUPS || VISIBLEGROUPS.\n $allowed = $caneditotherssubmissions;\n }\n }\n break;\n case SURVEYPRO_READONLYRESPONSE:\n if ($USER->id == $submission->userid) {\n $allowed = true;\n } else {\n if ($groupmode == SEPARATEGROUPS) {\n $allowed = $groupuser && $canseeotherssubmissions;\n } else { // NOGROUPS || VISIBLEGROUPS.\n $allowed = $canseeotherssubmissions;\n }\n }\n break;\n default:\n $allowed = false;\n }\n if (!$allowed) {\n throw new \\moodle_exception('incorrectaccessdetected', 'mod_surveypro');\n }\n }", "title": "" }, { "docid": "39158c01744d951d63444f384721cb60", "score": "0.4908955", "text": "function getMandatoryReviewers() { /* {{{ */\n\t\t$db = $this->_dms->getDB();\n\n\t\t$queryStr = \"SELECT * FROM `tblMandatoryReviewers` WHERE `userID` = \" . $this->_id;\n\t\t$resArr = $db->getResultArray($queryStr);\n\n\t\treturn $resArr;\n\t}", "title": "" }, { "docid": "df5c02c60492b68a04a52bcf7e07b663", "score": "0.4905394", "text": "public function userRatings();", "title": "" }, { "docid": "bc4ee6d61bbb11d19614734c4043a642", "score": "0.49048373", "text": "public function getSecurity(){\n\n\t\t//User login required\n\t\tuser_login_required();\n\n\t\t//Make sure the password is valid\n\t\tcheck_post_password(userID, \"password\");\n\n\t\t//Fetch user security settings\n\t\t$settings = components()->settings->get_security(userID);\n\n\t\t//Check settings validity\n\t\tif(!$settings->isValid())\n\t\t\tRest_fatal_error(500, \"Could not get user security settings!\");\n\t\t\n\t\t//Parse and return settings entry\n\t\treturn $this->SecuritySettingsToAPI($settings);\n\t}", "title": "" }, { "docid": "37fc3f93801dc081d2e6bdd620d7e245", "score": "0.48966423", "text": "public function ask_question()\n\t\t{\t\t\n\t\t\t$data['cat']=$this->auth->fetch_data('neko_category');\n\t\t\t$st['stats']=$this->auth->fetch_data_stats('neko_user_data',$_SESSION['user_email']);\n\t\t\t$this->load->view('layout/two-layer-header',$st);\n\t\t\t$this->load->view('ask-question',$data);\n\t\t\t$this->load->view('layout/footer');\t\t\t\n\t\t}", "title": "" }, { "docid": "4b8fd24d71023ec0e1ce875bc4447bec", "score": "0.4893898", "text": "function getSchoolAllUsersAction() {\n\t\tif (! in_array ( \"create_network\", $this->user ['capabilities'] ))\n\t\t\t$this->apiResult [\"message\"] = \"You are not authorized to perform this task.\\n\";\n\t\t\tif(empty($_POST['school_ids']) && empty($_POST['user_role_ids']))\n\t\t\t\t$this->apiResult [\"message\"] = \"School id/User Role cannot be empty.\\n\";\n\t\t\t\telse {\n\t\t\t\t\t$resourceModel = new resourceModel ();\n\t\t\t\t $school_ids = $_POST['school_ids'];\n\t\t\t\t $user_role_ids = $_POST['user_role_ids'];\n //print_r($school_ids);die;\n\t\t\t\t\t//echo $network_id;\n\t\t\t\t\t$this->apiResult [\"message\"] = $resourceModel->getSchoolUsers($school_ids,$user_role_ids);\n\t\t\t\t\t$this->apiResult [\"status\"] = 1;\n\t\t\t\t}\n\t}", "title": "" }, { "docid": "1e4570ada308717576ff5a0aa9745b71", "score": "0.4893562", "text": "function questionnaire_user_outline($course, $user, $mod, $questionnaire) {\n/// user has done with a given particular instance of this module\n/// Used for user activity reports.\n/// $return->time = the time they did it\n/// $return->info = a short text description\n $result = '';\n if ($responses = questionnaire_get_user_responses($questionnaire->sid, $user->id)) {\n $n = count($responses);\n if ($n == 1) {\n $result->info = $n.' '.get_string(\"response\", \"questionnaire\"); \n } else {\n $result->info = $n.' '.get_string(\"responses\", \"questionnaire\"); \n }\n $lastresponse = array_pop($responses);\n $result->time = $lastresponse->submitted;\n } else {\n $result->info = get_string(\"noresponses\", \"questionnaire\"); \n }\n return $result;\n}", "title": "" }, { "docid": "7f3059ece4788bc2d5e41e0cb9f4cfc2", "score": "0.48927912", "text": "public function getRecommendedMentors($userId)\n {\n // Get interest ids of the current user\n $interests = array_flatten(array_pluck(Interest::select('interest_id')->where('user_id', $userId)->get()->toArray(), 'interest_id'));\n\n }", "title": "" }, { "docid": "d80ace60167f21839609ffe3fa7c8348", "score": "0.48871097", "text": "function selectUser($select=0) {\n\n $levels = get_seclevels(); //is in sysdb\n\t //????calldpc_method('senusers.get_seclevels'); //print_r($levels);\n \n if ($levels) { \n reset ($levels);\n //asort ($levels);\n\n $toprint .= \"<select name=\\\"userlevel\\\">\\n\";//<OPTION value=\\\"1\\\">ALL</OPTION>\\n\";\n\n foreach ($levels as $lan_num => $lan_descr) {\n\t \n\t //not display users above this user\n\t if ($lan_num<=$this->userLevelID) {\t\n\t \n\t //is selected ?\n\t\t if ($lan_num==$select) $issel = 'selected';\n\t\t else $issel = '';\n\t\t //have description\t\t\t\t\t \n if ($lan_descr!='') \n\t\t $toprint .= \"<OPTION value=\\\"$lan_num\\\" $issel>$lan_descr</OPTION>\\n\";\n\t\t } \n }\n\t \n\t $toprint .= \"\\n</select>\";\n }\n \n return ($toprint);\n }", "title": "" }, { "docid": "2e08381172e4aaa73d3f139538093a35", "score": "0.48862755", "text": "public function qa()\n {\n \t// belongsTo(RelatedModel, foreignKey = _id, keyOnRelatedModel = id)\n \treturn $this->belongsTo('App\\User','qa_id');\n }", "title": "" }, { "docid": "5c1618effb701c0c6d9e2905e73facae", "score": "0.4883195", "text": "function bs_get_user_practicetype() {\n $author = wp_get_current_user();\n $user_id = $author->ID;\n $key = 'practice_type';\n $single = true;\n\t$practicetype = get_user_meta( $user_id, $key, $single );\n if( !empty($practicetype) ) {\n\t return $practicetype;\n }\n}", "title": "" }, { "docid": "8f051d4b4b158d867a21e2c6a1126434", "score": "0.48822546", "text": "public function index()\n {\n if(Auth::user()->role == 'superadmin'){\n $subjects = Subject::all();\n $objectives = Objective::all();\n $theories = Theory::all();\n $exam = Exam::all();\n }else if(Auth::user()->role == 'admin'){\n $institution = Auth::user()->institution->id;\n $schools = School::where('institution_id', $institution)->pluck('id');\n $departments = Department::whereIn('school_id', $schools)->pluck('id');\n $subjects1 = Subject::where('subjectable_id', $institution)->where('subjectable_type', 'App\\Institution')->get();\n $subjects2 = Subject::whereIn('subjectable_id', $schools)->where('subjectable_type', 'App\\School')->get();\n $subjects3 = Subject::whereIn('subjectable_id', $departments)->where('subjectable_type', 'App\\Department')->get();\n $subjects = $subjects1->concat($subjects2)->concat($subjects3);\n $users = User::where('institution_id', $institution)->pluck('id')->toArray();\n $objectives = Objective::whereIn('user_id', $users)->get();\n $theories = Theory::whereIn('user_id', $users)->get();\n $exam = Exam::whereIn('user_id', $users)->get();\n }\n else if(Auth::user()->role == 'student'){\n $student = Student::where('user_id', Auth::user()->id)->first();\n //$subjects = Auth::user()->assignedSubjects;\n //$objectives = Objective::where('user_id', Auth::user()->id);\n //$theories = Theory::where('user_id', Auth::user()->id);\n $exams = Exam::all();\n //var_dump($student);\n return view('student_welcome', ['exams' => $exams,'student' => $student]);\n }\n else{\n $subjects = Auth::user()->assignedSubjects;\n $objectives = Objective::where('user_id', Auth::user()->id);\n $theories = Theory::where('user_id', Auth::user()->id);\n $exam = Exam::where('user_id', Auth::user()->id);\n }\n return view('home', ['subjects' => $subjects,\n 'objectives' => $objectives, 'theories' => $theories, 'exam' => $exam]);\n }", "title": "" }, { "docid": "9cf57b45bfad58aaceb32624deb62ce1", "score": "0.48810786", "text": "function updateUserIntroAssAction() {\n\t\t//error_reporting ( ~ E_NOTICE & ~ E_WARNING );\t\n $uniqueID = \"\";\n $user_id = $_POST['user_id'];\n \n \n\t\t\t\t\t\t\t\t \n //if the user has already filled introductory assessment and submitted the form, it will not be reflected in the post data because fields are disabled in the introductory assessement\t\n // echo'<pre>'; print_r($_POST);die;;\n $finalArray = array();\n // foreach($_POST as $data) {\n if(isset($_POST['key_behaviour'])) {\n $questiion_id = array_shift($_POST['key_behaviour']);\n $finalArray['key_behaviour'] = array('question_id'=>$questiion_id,'answer_id'=>$_POST['key_behaviour']);\n //$finalArray[] = $_POST['key_behaviour'];\n //$finalArray['question_id'] = $data[0];\n }\n if(isset($_POST['leader_statement'])) {\n //$finalArray['question_id'] = $_POST['leader_statement'][0];\n $finalArray['leader_statement'] = isset($_POST['leader_statement'][1])?trim($_POST['leader_statement'][1]):'';\n //$finalArray['question_id'] = $data[0];\n }\n if(isset($_POST['statement'])) {\n // $finalArray['question_id'] = $_POST['statement'][0];\n $finalArray['statement'] = isset($_POST['statement'][1])?trim($_POST['statement'][1]):'';\n //$finalArray['question_id'] = $data[0];\n }\n /* if(isset($_POST['chool_rating'])) {\n // $finalArray['question_id'] = $_POST['statement'][0];\n $finalArray['chool_rating'] = $_POST['chool_rating'][1];\n //$finalArray['question_id'] = $data[0];\n }*/\n if(isset($_POST['rating_text'])) {\n // $finalArray['question_id'] = $_POST['statement'][0];\n $finalArray['rating_text'] = isset($_POST['rating_text'][1])?trim($_POST['rating_text'][1]):'';\n //$finalArray['question_id'] = $data[0];\n }\n if(isset($_POST['classroom_observation'])) {\n // $finalArray['question_id'] = $_POST['statement'][0];\n // $finalArray['classroom_observation'] = isset($_POST['classroom_observation'][1])?trim($_POST['classroom_observation'][1]):'';\n //$finalArray['question_id'] = $data[0];\n $questiion_id = array_shift($_POST['classroom_observation']);\n $finalArray['classroom_observation'] = array('question_id'=>$questiion_id,'answer_id'=>$_POST['classroom_observation']);\n }\n if(isset($_POST['stakeholder_text'])) {\n // $finalArray['question_id'] = $_POST['statement'][0];\n // $finalArray['stakeholder_text'] = isset($_POST['stakeholder_text'][1])?trim($_POST['stakeholder_text'][1]):'';\n $questiion_id = array_shift($_POST['stakeholder_text']);\n $finalArray['stakeholder_text'] = array('question_id'=>$questiion_id,'answer_id'=>$_POST['stakeholder_text']);\n //$finalArray['question_id'] = $data[0];\n }\n if(isset($_POST['key_performance'])) {\n $questiion_id = array_shift($_POST['key_performance']);\n $finalArray['key_performance'] = array('question_id'=>$questiion_id,'answer_id'=>$_POST['key_performance']);\n // $finalArray['answer_id'][] = $_POST['key_performance'][1];\n //$finalArray['question_id'] = $data[0];\n }\n if(isset($_POST['key_performance_text'])) {\n //$finalArray['question_id'] = $_POST['key_performance'][0];\n $finalArray['key_performance_text'] = isset($_POST['key_performance_text'][1])?trim($_POST['key_performance_text'][1]):'';\n //$finalArray['question_id'] = $data[0];\n }\n if(isset($_POST['goal'])) {\n // $finalArray['question_id'] = $_POST['key_performance'][0];\n $finalArray['goal'] = isset($_POST['goal'][1])? trim($_POST['goal'][1]):'';\n //$finalArray['question_id'] = $data[0];\n }\n if(isset($_POST['school_rating'])) {\n // $finalArray['question_id'] = $_POST['key_performance'][0];\n $finalArray['school_rating'] = isset($_POST['school_rating'][1])?trim($_POST['school_rating'][1]):'';\n //$finalArray['question_id'] = $data[0];\n }\n if(isset($_POST['rating_text'])) {\n // print_r($_POST['rating_text']);\n // $finalArray['question_id'] = $_POST['statement'][0];\n // $finalArray['stakeholder_text'] = isset($_POST['stakeholder_text'][1])?trim($_POST['stakeholder_text'][1]):'';\n $questiion_id = array_shift($_POST['rating_text']);\n $finalArray['rating_text'] = array('question_id'=>$questiion_id,'answer_id'=>$_POST['rating_text']);\n //$finalArray['question_id'] = $data[0];\n }\n if(isset($_POST['school_rating_txt'])) {\n // print_r($_POST['rating_text']);\n // $finalArray['question_id'] = $_POST['statement'][0];\n // $finalArray['stakeholder_text'] = isset($_POST['stakeholder_text'][1])?trim($_POST['stakeholder_text'][1]):'';\n //$questiion_id = array_shift($_POST['rating_text']);\n $finalArray['school_rating_txt'] = $_POST['school_rating_txt'];\n //$finalArray['question_id'] = $data[0];\n }\n // echo \"<pre>\";print_r($finalArray);die;\n // }\n $postData = array();\n \n //if(isset($finalArray['key_behaviour']['answer_id'])&& count($finalArray['key_behaviour']['answer_id'])>=1 ) {\n // print_r($finalArray['key_behaviour']);\n $score = $this->userModel->calculateScore($finalArray);\n //}\n //echo\"ddd\". $_POST['submit_value'];\n //echo \"<pre>\";print_r($finalArray);DIE;\n if((!empty($_POST['is_submit']) && $_POST['is_submit']==1) || ($_POST['submit_value'] == 1) ){\n //$finalArray['is_submit'] = 1;\n $postData = $this->userModel->validateIntroAss($finalArray);\n $errors = ! empty ( $postData ['errors'] ) ? $postData ['errors'] : array ();\n //echo \"<pre>\";print_r($postData['values']);die;\n // $introductoryAssessment = 1;\n if(isset($postData['errors']) && count($postData['errors'])) {\n $this->apiResult [\"message\"] = \"Data is either incorrect or blank.\\n\";\n $this->apiResult [\"errors\"] = $errors;\n }else{\n $postData['values']['score'] = $score;\n $introductoryAssessment = $this->userModel->saveIntroductoryAssessment ($postData['values'],$user_id,1);\n }\n }\n else {\n $finalArray['score'] = $score;\n $introductoryAssessment = $this->userModel->saveIntroductoryAssessment ($finalArray,$user_id);\t\t\t\t\t\t\t\t\n }\n if (isset($introductoryAssessment) && $introductoryAssessment) {\n $this->apiResult [\"status\"] = 1;\n if(isset($score)) \n $this->apiResult [\"score\"] = $score;\n $this->apiResult [\"message\"] = \"User Profile successfully updated\";\n } else {\n //$this->db->rollback ();\n $this->apiResult [\"message\"] = \"Error occurred, please check the error logs.\\n\";\n }\n \n \n }", "title": "" }, { "docid": "03adb0db245882c2178df747cdeef0ca", "score": "0.48777142", "text": "function getQuesAttemptedforPrac($conn,$testgivenid)\r\n{\r\n\r\n\t\r\n\t$ds=mysqli_query($conn,\"SELECT * FROM `ptestattempted` where `testid`='$testgivenid'\"); \r\n\twhile($resultset=mysqli_fetch_array($ds))\r\n\t{\r\n\t\t\r\n\t\t$data[]=$resultset['questionid'];\r\n\t\t\r\n\t\t\r\n\t}\r\n\t\t\r\n\t\t\r\n\treturn $data;\r\n\t\r\n\t\r\n\t\r\n}", "title": "" }, { "docid": "da027cffe5c1a4e92682738873185e48", "score": "0.48673227", "text": "function tc_pdhub_student_progress_qi_surveys($user_id, $quiz_id){\n\t\t\tglobal $wpdb;\n\t\t\t$surveys=$wpdb->get_results($wpdb->prepare('Select statistic_ref_id, FROM_UNIXTIME(create_time) as createdtime from wp_wp_pro_quiz_statistic_ref where user_id=%d and quiz_id=%d order by statistic_ref_id desc limit 0,1',$user_id,$quiz_id, OBJECT));\n \n\t\t\tif ($wpdb->num_rows <= 0){\n\t\t\treturn \"none\";\n\t\t\t}\n\t\t\telse{\n\t\t\treturn $surveys;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "6c247f34b9c309a8824df5a3f9dceacf", "score": "0.4867027", "text": "public function get_sme_expertise_list(){\n \t \n \t$this->db->select('*');\n \t$this->db->from(sme_expertise_rel);\n \t$query = $this->db->get();\n \t$query_result = $query->result();\n \t \n \treturn $query_result;\n }", "title": "" }, { "docid": "a4820de3a30a657e5254dd78fde31632", "score": "0.48661163", "text": "function getSchoolAllUsersAction() {\n\t\tif (! in_array ( \"create_network\", $this->user ['capabilities'] ))\n\t\t\t$this->apiResult [\"message\"] = \"You are not authorized to perform this task.\\n\";\n\t\t\tif(empty($_POST['school_ids']) && empty($_POST['user_role_ids']))\n\t\t\t\t$this->apiResult [\"message\"] = \"School id/User Role cannot be empty.\\n\";\n\t\t\t\telse {\n\t\t\t\t\t$resourceModel = new resourceModel ();\n\t\t\t\t $school_ids = $_POST['school_ids'];\n\t\t\t\t $user_role_ids = $_POST['user_role_ids'];\n //print_r($school_ids);die;\n\t\t\t\t\t//echo $network_id;\n $user_list = $resourceModel->getSchoolUsers($school_ids,$user_role_ids);\n if(count($user_list) >= 1) {\n $this->apiResult [\"status\"] = 1; \n $this->apiResult [\"message\"] = $resourceModel->getSchoolUsers($school_ids,$user_role_ids);\n }else {\n $this->apiResult [\"status\"] = 0;\n $this->apiResult [\"message\"] = \"User not exist for this schools\";\n }\n\t\t\t\t\t\n\t\t\t\t}\n\t}", "title": "" }, { "docid": "3c41452560194f8d8b149513d182c835", "score": "0.48656067", "text": "public function getQuestionaires() {\n \t$qry = sprintf(\"SELECT itemID, label FROM tblQuestionnaires WHERE hrUserID = '%d' AND sysOpen = '1' AND sysActive = '1'\", (int)$this->userID);\n \t$res = $this->db->query($qry);\n \t\n \t$questionaires = array();\n \tif ($this->db->valid($res)) {\n \twhile ($q = $this->db->fetch_assoc($res)) {\n \t$questionaires[$q['itemID']] = $q['label'];\n \t}\n \t}\n \treturn $questionaires;\n }", "title": "" }, { "docid": "79407cadb3e8650af37b3e67361cbb9e", "score": "0.4862979", "text": "public function rqSeguimiento(){\n\t\t$seguimientoRq = DB::table('tb_requerimiento')\n\t\t->join('users','tb_requerimiento.id_operador', '=' , 'users.id')\n\t\t\n\t\t->select('id_requerimiento', 'tipo_tarea', 'fecha_solicitud', 'tb_requerimiento.tipo', 'hora_solicitud', 'descripcion', 'name', 'ap_paterno', 'accesible')\n\t\t->orderBy('fecha_solicitud', 'DESC')\n\t\t->get();\n\n\t\treturn view('verificador.rq_seguimiento')->with(compact('seguimientoRq'));\n\t}", "title": "" }, { "docid": "1f9a1be94ffe935b7a51a89cec8db1d0", "score": "0.48585668", "text": "public function random()\n\t{\n\t\treturn $this->apiOutput(function(User $user) {\n\t\t\t\t// Obtain random user question using repository\n\t\t\t\t$userQuestionRepository = App::make('UserQuestionRepository', [$user]);\n\t\t\t\t$userQuestion = $userQuestionRepository->randomUserQuestion();\n\n\t\t\t\t// Retur error if user question does not exist\n\t\t\t\tif (!$userQuestion)\n\t\t\t\t{\n\t\t\t\t\treturn $this->errorResponse('user_has_not_created_any_questions_yet');\n\t\t\t\t}\n\n\t\t\t\treturn $this->successResponse([\n\t\t\t\t\t\t'id' => $userQuestion->id,\n\t\t\t\t\t\t'question' => $userQuestion->question->question,\n\t\t\t\t\t\t'answer' => $userQuestion->question->answer,\n\t\t\t\t\t\t'percent_of_good_answers' => $userQuestion->percent_of_good_answers,\n\t\t\t\t\t\t'number_of_good_answers' => $userQuestion->number_of_good_answers,\n\t\t\t\t\t\t'number_of_bad_answers' => $userQuestion->number_of_bad_answers\n\t\t\t\t]);\n\t\t\t}, true);\n\t}", "title": "" }, { "docid": "d309ca76a1d18e9d23ad1ae969ed9cc4", "score": "0.48583388", "text": "public function getQuestions()\n {\n \treturn $this->questions;\n }", "title": "" }, { "docid": "7d2ebc512aa7fc2ed239ddd7535961c6", "score": "0.48508164", "text": "public static function loadSecurityQuestions() {\n try {\n SecurityQuestions::loadSecurityQuestions();\n } catch (Exception $e) {\n $err = Shared::ERROR_MODE_SYSERR;\n $level = 'ERROR';\n $label = 'Login';\n\n Shared::logRedirectToErrorPage($err, $e, $level, $label);\n }\n }", "title": "" }, { "docid": "a169121ad38a019f18aa31196663c50d", "score": "0.48500776", "text": "public function interestQuestion($user_id) {\n\t \t$q = \"SELECT DISTINCT Questions.question_id FROM Questions INNER JOIN Tags_Questions INNER JOIN Users_Tags ON Questions.question_id = Tags_Questions.question_id WHERE Tags_Questions.tag_id = Users_Tags.tag_id AND Users_Tags.user_id=?\";\n\t \t$result = $this->db->query($q, array($user_id));\n\t }", "title": "" }, { "docid": "3a8e26dc6c4a55a9e82b9a0cfe245245", "score": "0.4848042", "text": "public function show(User $user, Quiz $quiz)\n {\n //$choices->max('rating_value') * $questions->count()\n $table = collect();\n foreach($quiz->choices->groupBy('section') as $choices){\n foreach($quiz->questions->groupBy('section') as $key => $questions){\n foreach($choices as $choice){\n if($choice->section == $key){\n $table->push([\n \"score\" => \"Score: \".$key,\n \"total\" => $choices->max('rating_value') * $questions->count(),\n \"answer\" => $questions->sum(function ($question) {\n return $question->sections->sum('answer');\n }),\n ]);\n }\n }\n }\n }\n $data = array(\n 'date' => Carbon::now()->format('Y-m-d'),\n 'user' => $user,\n 'quiz' => $quiz,\n 'questions' => $quiz->questions->groupBy('section')->groupBy('category'),\n 'next' => $quiz->questions->pluck('section')->first(),\n 'designations' => User::all(),\n 'table' => $table,\n );\n return view('users.quizzes.show', $data);\n }", "title": "" }, { "docid": "bf90aa06774ffef182488d35cd3fabe7", "score": "0.48465672", "text": "public function getsubuser()\n {\n\t echo $this->Access->check('SubUser','read') ;\n\t if(!$this->Access->check('SubUser','read')){\n\t \t\techo \"not allow\";\n\t }else{\n\t \t\techo \"allow\";\n\t }\n }", "title": "" }, { "docid": "eacf9c32a09935858334daeba75da7f9", "score": "0.4843668", "text": "public function getAnsweredQuestions()\n {\n return $this->session->get('answered');\n }", "title": "" } ]
c7b89cb56becf0611e15414064d0ed5a
/ Get user by username and password
[ { "docid": "902978dcd4aea1ee4463c85a3feeb2e8", "score": "0.661303", "text": "function get_user($params = array())\n {\n return $this->db->get_where('users',array('username'=>$params['username']))->row_array();\n }", "title": "" } ]
[ { "docid": "06b797a812c9892e1fe70dafd13c1749", "score": "0.7737126", "text": "function getUserByLoginPass() {\r\n return queryOne(\"SELECT * FROM users WHERE login = '{$login}' AND password = '{$pass}'\");\r\n}", "title": "" }, { "docid": "8963b202c10c28466fb1e2cb653f5a7b", "score": "0.75329787", "text": "public function loadUserByCredentials($login, $password);", "title": "" }, { "docid": "35519807838ac9faf3b9afe230a72ac6", "score": "0.73370945", "text": "public function getUserForLogin($username , $password)\n {\n \t//call functio select and pass tableName and the where statement to search for this user\n $this->select($this->_table , \"User_Name = '\" . $username . \"' AND Password = \".$password);\n\n return $this->fetch(); //func return one row || false if no user \n }", "title": "" }, { "docid": "a5a96efb6f1404d9ef81beda99930675", "score": "0.733519", "text": "public function getUserByUsernameAndPassword($username, $password) {\r\n \r\n $stmt = $this->conn->prepare(\"SELECT * FROM users_tb WHERE username = ?\");\r\n \r\n $stmt->bind_param(\"s\", $username);\r\n \r\n if ($stmt->execute()) {\r\n $user = $stmt->get_result()->fetch_assoc();\r\n $stmt->close();\r\n \r\n // verifying user password\r\n \r\n $password_tb = $user['password'];\r\n if ($password == $password_tb) {\r\n // user authentication details are correct\r\n return $user;\r\n }\r\n } else {\r\n return NULL;\r\n }\r\n }", "title": "" }, { "docid": "52906896c84dfea9b0dcd78d1e75cbad", "score": "0.73052233", "text": "public function getUser($usernameOrEmail);", "title": "" }, { "docid": "e9c4da9f3df402a6affc7e58f314a082", "score": "0.72635794", "text": "public function getUserByUsernameAndPassword($username , $password) {\n\n $username = mysqli_real_escape_string($this->conn,$username);\n\n $stmt = $this->conn->prepare(\"SELECT * FROM Users WHERE Name = '$username'\");\n\n $stmt->bind_param(\"s\", $username);\n\n if ($stmt->execute()) {\n\n $user = $stmt->get_result()->fetch_assoc();\n $stmt->close();\n\n // verifying user password\n $salt = $user[\"Salt\"];\n $encrypted_password = $user[\"Password\"];\n $hash = $this -> checkhashSSHA($salt, $password);\n // check for password equality\n if ($encrypted_password == $hash) {\n // user authentication details are correct\n return $user;\n }\n } else {\n return NULL;\n }\n }", "title": "" }, { "docid": "9f578705ed7688dd98da832d5d1780b7", "score": "0.72393084", "text": "public function get_user($arg){\n $usr = $this->user_info($arg);\n if($usr != false){\n if(isset($usr->pass) && password_verify($arg['pass'], $usr->pass)){\n return $usr;\n }\n }\n return false;\n }", "title": "" }, { "docid": "e2e1f80cb3c6705cc0b82c11dae9da17", "score": "0.72252876", "text": "public static function FindByUsernameAndPassword($username, $password)\n {\n //if(count($obj)==0)\n // return null;\n //return User::find($obj[0]->id);\n return User::where(\"username\", $username)->where(\"password\", $password)->first();\n }", "title": "" }, { "docid": "ce588c491ccca831a8e62ed7f3fea037", "score": "0.7209247", "text": "function authenticate_user ($username, $password)\n\t{\n\t\t$query_stmt = $this->database_conn->prepare (\"SELECT * FROM users WHERE username=:username AND password=:password\");\n\t\t$query_stmt->bindParam (':username', $username);\n\t\t$query_stmt->bindParam (':password', $password);\n\t\t$query_stmt->execute ();\n\t\treturn $query_stmt->fetch ();\n\t}", "title": "" }, { "docid": "74b1dbf4cc82ef64a388f9d351f72601", "score": "0.7198871", "text": "public function getUserFromLogin($username, $password)\n {\n $constraints = array();\n $constraints[User::$username] = $username;\n $constraints[User::$password] = sha1($password); //use sha1 password conversion\n $user = $this->getColumnsFromTableWithValues($constraints, self::ALLCOLUMNS, User::$table);\n return $user[0];\n }", "title": "" }, { "docid": "21b6bf6dca358a31f8a769b073ed719a", "score": "0.71980417", "text": "public function getUser($username,$password){\n\n\t\t\t$query = \"SELECT * FROM users WHERE (name=:username AND password=:password)\";\n\n\t\t\t$stmt = $this->conn->prepare($query);\n\n\t\t\t$username = htmlspecialchars(strip_tags($username));\n\t\t\t$password = htmlspecialchars(strip_tags($password));\n\t\t\t$password = md5($password);\n\n\t\t\t$stmt->bindParam(':username',$username);\n\t\t\t$stmt->bindParam(':password',$password);\n\t\t\t\n\t\t\t$stmt->execute();\n\n\t\t\tif($stmt->rowCount()>0){\n\n\t\t\t\treturn $stmt;\n\t\t\t}else{\n\t\t\t\treturn false;\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "04612349a89ed85101d27a49d3dd7542", "score": "0.7127497", "text": "private function getUserFound() {\n\t\treturn $this->user->findUser($this->username, $this->password);\n\t}", "title": "" }, { "docid": "e898d45cdd84841ce5d2bda1a20cfe5b", "score": "0.7108349", "text": "public static function selectUserByLogin($username, $password){\n $username = trim($username);\n $password = trim($password);\n $username = htmlspecialchars($username);\n $password = htmlspecialchars($password);\n $username = database::getConnexion()->real_escape_string($username);\n $password = database::getConnexion()->real_escape_string($password);\n $where = \" WHERE 1=1 \";\n if(!empty($username)){\n $where .= \" AND `name` = '\" . $username. \"'\";\n }\n if(!empty($password)){\n $where .= \" AND `password` = '\" . $password. \"'\";\n }\n $sql = \"SELECT * FROM `user` \".$where;\n $result = database::getData($sql);\n $res = $result->fetch_assoc();\n $retval = new User($res['id']);\n return $retval;\n }", "title": "" }, { "docid": "0415c328c4a70cb2b63941f7d0c7e4c2", "score": "0.7105009", "text": "public function getUser($login, $password){\n\t$sql = \"SELECT * FROM \".$this->_dbTable.\" WHERE login = :login AND password = :password\";\n\t$params = array(':login' => $this->crypt($login), ':password' => $this->crypt($password));\n return $this->load($sql, $params);\n }", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.7089166", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.7089166", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.7089166", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.7089166", "text": "public function getUser();", "title": "" }, { "docid": "15a0cacfaa4a21a35f025bf46b5a4546", "score": "0.7069349", "text": "public function getUser($credentials);", "title": "" }, { "docid": "d1cbd28f783a52d44944ba495b7abd50", "score": "0.70614064", "text": "public function login($username)// check if password entered match hashed password in database\n {\n $db = $this->dbConnect();\n $req = $db->prepare('SELECT id, password, username, role FROM users WHERE username = ?');\n $req->execute(array($username));\n\n $data = $req->fetch();\n\n $user = new User();\n\n $user->setId($data[\"id\"]);\n $user->setPassword($data[\"password\"]);\n $user->setUsername($data[\"username\"]);\n $user->setRole($data[\"role\"]);\n\n return $user;\n }", "title": "" }, { "docid": "2deac28c5c84e29bd0a9d6176ef99110", "score": "0.70342624", "text": "private function get_user_by_username(){\n \n\t\t\n\t\t$array=array('username'=>$this->username,'active'=>1);\n\t\t$result=$this->users_model->get($array);\n\t\t\n\t\tif(!empty($result)){//SUCCESS USERNAME\n\t\t\treturn $result[0];\n\t\t}else{\n\t\t\t\n\t\t\t$agent=$this->agent->browser().' '.$this->agent->version();\n\t\t\tadd_login_attempt(false,'Error username',0,$agent);\n\t\t\t\n\t\t\t$this->return_error(1);//ERROR USERNAME\n\t\t}\n\t}", "title": "" }, { "docid": "d5872264cacb2f40961cd56935779c9e", "score": "0.7033516", "text": "public static function getByUsernameAndPassword($username, $password)\r\n {\r\n $q = Doctrine_Query::create()\r\n ->select('m.id')\r\n ->from('Member m')\r\n ->where('m.username = ?', $username)\r\n ->andWhere('m.password = ?', sha1($password))\r\n ->andWhere('m.state = ?', self::STATE_ENABLED)\r\n ->limit(1);\r\n\r\n return $q->fetchOne();\r\n }", "title": "" }, { "docid": "968c74a474a5753fc03996bff3d1225c", "score": "0.7014185", "text": "public function getUser()\n {\n\n if (!get_magic_quotes_gpc()) {\n $this->sanitizeInput();\n }\n\n //Get info from the form\n extract($_POST);\n $userPassword = sha1($userPassword);\n\n //Set up the Query\n $qry = \"SELECT userID, userName, userPassword, userAccess FROM users WHERE userName = '$userName' AND userPassword = '$userPassword'\";\n\n //Run the query\n $rs = $this->db->query($qry);\n\n //Check the result\n if ($rs) {\n\n if ($rs->num_rows > 0) {\n $user = $rs->fetch_assoc();\n return $user;\n }\n\n } else {\n return false;\n }\n\n return false;\n\n }", "title": "" }, { "docid": "1dc5b874307867fc7ffe476920c8201e", "score": "0.6993693", "text": "static function authenticateUser($username, $password){\n\t\t$userDatabase = new \\PDO(\n\t\t\t'mysql:host='. getenv('MYSQL_HOST'). ';dbname='. getenv('MYSQL_DATABASE'),\n\t\t\t getenv('MYSQL_USER'),\n\t\t\t getenv('MYSQL_PASSWORD')\n\t\t\t);\n\t\t\n\t\t$stmt = $userDatabase->prepare(\"SELECT * FROM tUser WHERE username = ? and password = ?\");\n\t\t$stmt->execute(array($username, hash('sha256', $password)));\n\t\t$user = $stmt->fetch();\n\n\t\treturn $user;\n }", "title": "" }, { "docid": "0d8b97e6eff654f6d49bf51bfd5edf47", "score": "0.69878197", "text": "function auth_user($username,$password){\r\n\t\t$query=$this->db->query(\"SELECT * FROM user WHERE code_user='$username' AND pass=MD5('$password') LIMIT 1\");\r\n\t\treturn $query;\r\n\t}", "title": "" }, { "docid": "e742c52e0ec41e567c5a365964926c40", "score": "0.6969653", "text": "public function getUser()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$sql = \"SELECT * FROM Users WHERE Login=:login\";\n\t\t\t$stmt = $this\n\t\t\t\t->db\n\t\t\t\t->prepare($sql);\n\t\t\t$data = ['login' => $this->_username];\n\t\t\t$stmt->execute($data);\n\t\t\t$result = $stmt->fetch(\\PDO::FETCH_ASSOC);\n\t\t\treturn $result;\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie(\"There's an error in the query!\");\n\t\t}\n\t}", "title": "" }, { "docid": "76bce0aff3881679e50f5aacd4145381", "score": "0.69603324", "text": "function getUser($email, $hashedPassword){\n $database = $this->database;\n\n $sql = \"SELECT *\n FROM User\n WHERE EmailAddress = '$email' AND Password = '$hashedPassword';\";\n\n $res = $database -> select($sql);\n\n\n\n return $res;\n }", "title": "" }, { "docid": "3caa10f0fdb3cb661e2f42b7d0d257ed", "score": "0.6957582", "text": "function getUserInfoByCredential($user_name,$password){\n checkConnectivity();\n\n $query =sprintf(\"select * from user where user_name = '%s' AND password ='%s'\",$user_name,$password);\n $result =mysqli_query($GLOBALS['connection_link'],$query);\n if ($row = mysqli_fetch_assoc($result)) {\n return $row;\n }\n return false;\n\n }", "title": "" }, { "docid": "b71a7ebcf07d5eaaaa2d125792c6921b", "score": "0.6954991", "text": "function getUser($username, $password) {\n\n $sql = \"SELECT * FROM login WHERE username = '$username'\";\n $result = pg_query($this->conn, $sql);\n\n\t //encryption(Assuming encrypted password is saved in database)\n\t $extra = \"admi\";\n \t $pass = base64_encode(sha1($password.$extra, true) . $extra);\n\t\n while($row = pg_fetch_assoc($result)) {\t\n if($row['password'] == $pass) \n return TRUE;\n }\n\n return FALSE;\n\n }", "title": "" }, { "docid": "2263a188bc77eb4a31759dc3a00eb146", "score": "0.6943688", "text": "public function getUser($username , $password)\n\t{\n\t\t$url = $this->url .\"/\". $username;\n\t\t$get = [\n\t\t\t\t 'user_password' => $password,\n\t\t\t\t];\n\t\t$headers = [\n\t\t\t\t\t'Content-Type: application/vnd.api+json',\n\t\t\t\t\t\"User-Agent: $this->userAgent\",\n\t\t\t\t\t\"x-api-key: $this->apiKey\",\n\t\t\t\t\t];\n\t\t$request = Curl::get($url,$get,$headers);\n\t\t$response = json_decode($request->response, true);\n if(isset($response[\"data\"])){\n \t$userArray = array('krc_user_id' => $response[\"data\"][\"id\"], 'username' => $response[\"data\"][\"attributes\"][\"username\"]);\n return $userArray;\n }elseif (isset($response[\"errors\"])) {\n \tif(isset($response[\"errors\"][0][\"code\"])){\n \t\treturn $response[\"errors\"][0];\n \t}else{\n \t\treturn $response[\"errors\"][0];\n \t}\n }else{\n return false;\n }\n\n\t}", "title": "" }, { "docid": "1d1ee547e3f78ee06a6423bac8707f13", "score": "0.69033045", "text": "public function login() {\n $connect = self::connect();\n $stm = $connect->prepare('SELECT * FROM `'.self::entity(false).'` WHERE username = :username LIMIT 1');\n $stm->BindValue(':username',$this->username, PDO::PARAM_STR);\n $stm->execute();\n return $stm->fetch(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "c8d31796c14bc4169ad1cac9bc12a828", "score": "0.68912196", "text": "function auth_client($nmuser,$password){\n $query=$this->db->query(\"SELECT * FROM user WHERE nmuser='$nmuser' AND password='$password' LIMIT 1\");\n return $query;\n }", "title": "" }, { "docid": "18201725fa1084f50f026b31aed65f80", "score": "0.68873096", "text": "public function getUser($username, $password){\n try {\n $sql = \"SELECT * FROM `users_tbl` \n WHERE `username` = :username AND `password` = :password\";\n\n $statement = $this->db->prepare($sql);\n $statement->bindparam(':username', $username);\n $statement->bindparam(':password', $password); \n $statement->execute();\n\n //$result =$this->db->query($sql);\n $result = $statement->fetch();\n return $result;\n } catch (PDOException $e) {\n echo $e->getMessage();\n return false;\n }\n }", "title": "" }, { "docid": "0485aa2a95af265dd20531b1145a9fa8", "score": "0.68867075", "text": "public static function authenticate($username=\"\", $password=\"\") {\n global $db;\n $username = $db->escape_string($username);\n $password = $db->escape_string($password);\n //$password = self::password_encrypt($password);\n //More on note.txt #7 and note #8\n\n $sql = \"SELECT * FROM users \";\n $sql .= \"WHERE username = '{$username}' \";\n $sql .= \"LIMIT 1\";\n\n $result_array = self::find_by_sql($sql); // array...of one User object\n $user = !empty($result_array) ? array_shift($result_array) : false;\n if($user) {\n if (self::password_check($password, $user->hashed_password)) {\n // password matches\n return $user;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "291118919120cbf39d2b27559e6c650f", "score": "0.6886308", "text": "public static function auth($username,$password){\n\t\t$user=RegistrationUserQuery::create()->filterByUsername($username)->filterByPassword(RegistrationUser::encryptPassword($password))->findOne();\n\t\t// Si no son correctos el usuario y password deveuvel null\n\t\tif(is_null($user)) return null;\n\t\t// Si no esta activo o no se ha verificado el email\n\t\tif(!$user->getActive() || !$user->getVerified() || $user->getDeleted()) return false;\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "f873a30b115546a024d5b1d0152fe724", "score": "0.6884838", "text": "function get_user($usr, $pwd)\n\t{\n\t\t$sql = \"select * from us3r where UserName = '\" . $usr . \"' and Password = '\" . md5($pwd) . \"' and status = '\".ACTIVE.\"' limit 1\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->row();\n\t}", "title": "" }, { "docid": "1de5777fbce3a504b612cb352f3cd8e5", "score": "0.68448377", "text": "public function getUser(string $username){\n return $this->execQuery(\"SELECT * FROM utente WHERE username = '$username';\");\n }", "title": "" }, { "docid": "77ef18c3814b639bb4530b3d670894e5", "score": "0.6832634", "text": "function alt_login_user($username,$password){\n $result = mysql_query(\"SELECT TipeUser FROM user WHERE username = '$username' AND Password = '$password'\");\n\n\t}", "title": "" }, { "docid": "9ce63c55765a09c6a756cf381c437710", "score": "0.6826873", "text": "public function get_user() {\n\t\t\treturn $this->build_request( 'user' )->fetch();\n\t\t}", "title": "" }, { "docid": "9fa92fbab8ad0ccaadc3585b2cab742c", "score": "0.6825032", "text": "public function GetUser ();", "title": "" }, { "docid": "7e51e6adc99e3de367f8f0e48ba56d7e", "score": "0.6823294", "text": "function getUser() {\n\tglobal $db;\n\n\tif (!is_object($db))\n\t\treturn false;\n\tif (!($db instanceof MySQLi))\n\t\treturn false;\n\tif (!isset($_COOKIE['user'], $_COOKIE['password']))\n\t\treturn false;\n\n\t$sql = 'SELECT id FROM users WHERE id = ' . $_COOKIE['user'] . ' AND password = \"' . $_COOKIE['password'] . '\"';\n\t$stmt = $db->prepare($sql);\n\tif (!$stmt)\n\t\treturn $db->error;\n\tif (!$stmt->execute())\n\t\tdie($stmt->error);\n\t$stmt->bind_result($user);\n\tif (!$stmt->fetch()) {\n\t\t$stmt->close();\n\t\treturn false;\n\t}\n\t$stmt->close();\n\n\treturn $user;\n}", "title": "" }, { "docid": "56072af0d9933d4c2d5420cdbfa8a0b5", "score": "0.6819066", "text": "function userLogin($username, $password) {\n $str_query = \"SELECT * FROM proximity_users\n\t\t\t WHERE username='$username' and password='$password' \";\n\n return $this->query($str_query);\n }", "title": "" }, { "docid": "90c1c3a9e32a3f57730a772023e65981", "score": "0.68012565", "text": "function authenticate_v2($username='', $password='') {\n global $db;\n $username = $db->escape($username);\n $password = $db->escape($password);\n $sql = sprintf(\"SELECT id,username,password,user_level FROM users WHERE username ='%s' LIMIT 1\", $username);\n $result = $db->query($sql);\n if($db->num_rows($result)){\n $user = $db->fetch_assoc($result);\n $password_request = sha1($password);\n if($password_request === $user['password'] ){\n return $user;\n }\n }\n return false;\n }", "title": "" }, { "docid": "90c1c3a9e32a3f57730a772023e65981", "score": "0.68012565", "text": "function authenticate_v2($username='', $password='') {\n global $db;\n $username = $db->escape($username);\n $password = $db->escape($password);\n $sql = sprintf(\"SELECT id,username,password,user_level FROM users WHERE username ='%s' LIMIT 1\", $username);\n $result = $db->query($sql);\n if($db->num_rows($result)){\n $user = $db->fetch_assoc($result);\n $password_request = sha1($password);\n if($password_request === $user['password'] ){\n return $user;\n }\n }\n return false;\n }", "title": "" }, { "docid": "ceb72f06334232dc2e24232a8a42b069", "score": "0.6794084", "text": "public function fetch_by($username, $password){\n\t\t$this->db->where('username', $username);\n\t\t$this->db->where('password', $password);\n\t\t$row = $this->db->get('view_usuario')->row();\n \treturn $row;\n\t}", "title": "" }, { "docid": "753e32a4b7b81b68baa3c20d6332422d", "score": "0.6793807", "text": "static function retrieveByPassword($value) {\n\t\treturn User::retrieveByColumn('password', $value);\n\t}", "title": "" }, { "docid": "0d02e47d39e1bc1c03df2fbc1245cd78", "score": "0.679333", "text": "public function authenticateUser($username, $password);", "title": "" }, { "docid": "0a543a384f45627d022a02523eb3c5c8", "score": "0.6779845", "text": "public function getUser($username) {\n\t\t$this->stmt = $this->conn->prepare(\"SELECT \".self::$usernameField.\", \".self::$passwordField.\" FROM \".self::$table.\" WHERE \".self::$usernameField.\" = ?\");\n\t\tif ($this->stmt === FALSE) {\n\t\t\tthrow new Exception($this->conn->error);\n\t\t}\n\t\t$this->stmt->bind_param('s', $username);\n\t\t$this->stmt->execute();\n\t $this->stmt->bind_result($name, $pass);\n\t\t$this->stmt->store_result();\n\n\t\t// Fulhack\n\t\tif ($this->stmt->num_rows() == 1) {\n\t\t\t$this->stmt->fetch();\n\t\t\treturn array($name, $pass);\n\t\t}\n\t}", "title": "" }, { "docid": "2167f0486f1877a7b471d54f47d0d944", "score": "0.67737854", "text": "public function getUser() {\n $id = $_GET[\"user\"];\n\n $request = $this->connexion->prepare(\"SELECT * FROM user WHERE id=:id\");\n $request->bindParam(':id', $id);\n \n $result = $request->execute();\n $user = $request->fetch(PDO::FETCH_ASSOC);\n return $user;\n }", "title": "" }, { "docid": "a1c9191cda892ddaf9d5cda9fbe09842", "score": "0.67570543", "text": "public function retrieveUser($email, $password) {\r\n\r\n $qb = $this->getDoctrine()->getRepository(User::class);\r\n return $qb->findOneBy(['email' => $email, 'password' => $password]);\r\n }", "title": "" }, { "docid": "a8bd614971ce773043ba274575685118", "score": "0.67468554", "text": "function getUserByUsername($username) {\n $table = $this->config->database->prefix . 'core_users';\n\n $username = addslashes($username);\n return $this->db->fetchRow(\"SELECT * FROM $table WHERE username='$username' OR email='$username'\");\n }", "title": "" }, { "docid": "a858a391059a91526d276ea84349fabb", "score": "0.6744594", "text": "public function getUserByName($name, $password){\n\t\t$result = mysql_query(\"SELECT * FROM cerebro_users WHERE name = '$name'\") or die(mysql_error());\n // check for result \n $no_of_rows = mysql_num_rows($result);\n\t\tif ($no_of_rows > 0) {\n $result = mysql_fetch_array($result);\n\t\t\t$salt = $result['salt'];\n $encrypted_password = $result['encrypted_password'];\n\t\t\t$hash = $this->checkhashSSHA($salt, $password);\n\t\t\t// check for password equality\n if ($encrypted_password == $hash) {\n // user authentication details are correct\n return $result;\n }\n \n } else {\n // user not found\n return false;\n }\n\t }", "title": "" }, { "docid": "e6495f12db7f88fd563e68a524fafffb", "score": "0.6735207", "text": "function userLogin($user_name, $password) {\r\n\r\n $conn = new Connection();\r\n\r\n $sql = \"select * from tbl_user where user_name='$user_name' && password='$password'\";\r\n\r\n $result = $conn->query($sql);\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "89fe34481865fa61a23a9fd8390d662a", "score": "0.6721978", "text": "abstract public function getUser();", "title": "" }, { "docid": "c94448fd0a4a0a0d5e1dd561d701c6c1", "score": "0.6715892", "text": "public static function getUserByCredentials($email, $password)\n {\n // Open database connection\n $db = init_db();\n\n $req = $db->prepare(\"SELECT * FROM users WHERE email=? AND password=?\");\n $req->execute([\n $email,\n $password\n ]);\n\n // Close database connection\n $db = null;\n\n return $req->fetch();\n }", "title": "" }, { "docid": "edfc35c397fe0f7e0bfe4eab0e898489", "score": "0.67117286", "text": "public function getUserAccount($username, $password)\n\t{\n\t\t$consulta = $this->db->prepare(\"SELECT \n id_user\n , code_user\n , id_tenant\n , name_user\n , id_profile\n FROM cas_user\n WHERE name_user='$username'\n AND password_user='$password'\");\n \n\t\t$consulta->execute();\n\t\t\n\t\t//devolvemos la coleccion para que la vista la presente.\n\t\treturn $consulta;\n\t}", "title": "" }, { "docid": "c6e13ab973a3b6bfc0954ba204f78355", "score": "0.6710301", "text": "public function getUserLogin();", "title": "" }, { "docid": "b65db673bdd27ab05f0b8dec24e5d753", "score": "0.6708056", "text": "abstract function getAuthenticatedUser();", "title": "" }, { "docid": "a29766a6ed87f1a9f913b5b262d43de1", "score": "0.67053396", "text": "function getUser($username) {\n\n if (!userExists($username)) {\n throw new IllegalArgumentException(\"Requested user does not exist (or database-error.)\");\n } else {\n $connection = $GLOBALS[\"_connection\"];\n\n $sql = \"SELECT * FROM UserData WHERE Username = '$username' LIMIT 1\";\n $result = mysql_query($sql);\n\n if (!$result) {\n throw new SqlException(mysql_errno($connection) . \": \" . mysql_error($connection) . \"\\n\");\n }\n\n $userdataarray = mysql_fetch_array($result);\n $user = new User($userdataarray[\"Username\"], $userdataarray[\"Password\"], $userdataarray[\"Email\"], $userdataarray[\"ID\"], $userdataarray[\"activeUser\"], $userdataarray[\"lastAction\"]);\n\n return $user;\n }\n}", "title": "" }, { "docid": "11a2d82ff5f9a174678ca19a5d2d19bd", "score": "0.6705272", "text": "public static function authenticate($username = \"\", $password = \"\"){\n global $database;\n \n $username = $database->escape_value($username);\n $password = $database->escape_value($password);\n \n $query = \"SELECT * FROM users \";\n $query .= \"WHERE username = '{$username}' \";\n $query .= \"AND password = '{$password}' \";\n $query .= \"LIMIT 1\";\n \n //Fucntion inherited from parent class\n $result_array = self::find_by_sql($query);\n return !empty($result_array) ? array_shift($result_array) : false;\n }", "title": "" }, { "docid": "00b49229d86e3c8e449b7b3dabf9833c", "score": "0.67021835", "text": "public function getUser($credentials) {\n $user = null;\n\n //todo: THis is such a hack job, teh credentials should be dynamic.. i have it coded so it finds the user based on email. FIX ME\n if (isset($credentials['email'])) {\n $user = DB::table('users')\n ->where('email', '=', $credentials['email'])\n ->first();\n } else {\n if (isset($credentials['id'])) {\n $user = DB::table('users')\n ->where('id', '=', $credentials['id'])\n ->first();\n\n } else {\n $user = DB::table('users')\n ->where('username', '=', $credentials['username'])\n ->first();\n }\n }\n\n return $user;\n }", "title": "" }, { "docid": "0f072bf8fff92830ac00d15eca3cae5c", "score": "0.66987145", "text": "function get_user($email, $pwd)\n {\n $sql = \"select * from users where email = '\" . $email . \"' and password = '\" . md5($pwd) . \"'\";\n $query = $this->db->query($sql);\n return $query;\n }", "title": "" }, { "docid": "11d6a53c8d71712a8dc0b45eda1838a4", "score": "0.6698259", "text": "final public function loadUserByUsername(\n $username,$password=null){\n\n // get user from database that matches\n // with the $username parameter\n $user = ci()->db->get_where(\n 'alkal_users',\n ['username'=>$username]\n )->result();\n\n // check if we find user in database\n // or if password is null and doesnt match\n // with the hashed password counterpart\n if(empty($user) || ($password!==null && !$this->verifyPassword($password,$user[0]->{'password'}))){\n throw new UserNotFoundException();\n }\n\n $userClass = $this->getUserClass();\n $role = $user[0]->{'role'};\n return new $userClass($user[0],$role,null);\n }", "title": "" }, { "docid": "eea040de44f67d154ee686d1fe3be8c3", "score": "0.6687201", "text": "function login($username, $password)\n{\n $conn = connectDb();\n\n $sql = \"SELECT * FROM Users WHERE UserName='{$username}' AND Password='{$password}'\";\n $result = $conn->query($sql);\n\n if ($result->num_rows > 0) {\n return $result->fetch_assoc();\n }\n\n return null;\n}", "title": "" }, { "docid": "7030d5629af8a1757a972651c430b013", "score": "0.6681525", "text": "function el_user_by_username($username) {\n\t\t$user = new ElUser;\n\t\t$user->username = $username;\n\t\treturn $user->getUser();\n}", "title": "" }, { "docid": "52cd2d3a88253079f9ac768b10f45ba0", "score": "0.6674606", "text": "public function getSpecificUser($username) {\n\t\t$query = \"SELECT * FROM user WHERE Username = '$username'\";\n\t\treturn $this->query($query);\n\t}", "title": "" }, { "docid": "cf9da34b4df951c0cfc054e17cb05fc2", "score": "0.66722375", "text": "function get_user($usr, $pwd)\n {\n $sql = \"select * from users where username = '\" . $usr . \"' and encrypted_pwd = '\" . md5($pwd) . \"' and status = 'active'\";\n echo $sql;\n $query = $this->db->query($sql);\n return $query->row();\n }", "title": "" }, { "docid": "70dc1e22779a1869b5ea21c5d8b0dc04", "score": "0.6667423", "text": "function get_by_nick_passwd($nickname,$passwd) { \n $this->query(\"select * from usr where nick='\".$nickname.\"' and passwd='\".$passwd.\"';\");\n return $this->lst();\n }", "title": "" }, { "docid": "1e4577565b46aeb82a68c08b87e8bb2d", "score": "0.66671634", "text": "public function login($username, $password) {\n\t\t$sentencia = $this->pdo->prepare(\"SELECT id, username, email FROM usuarios WHERE (username=:username OR email=:username) AND password=:password\");\n\t\t\n\t\t$sentencia->bindParam(':username', $username, PDO::PARAM_STR);\n\t\t$sentencia->bindParam(':password', $password, PDO::PARAM_STR);\n\t\t$sentencia->execute();\n\n\t\treturn $sentencia->fetch(PDO::FETCH_ASSOC);\n\t}", "title": "" }, { "docid": "0b8ab197a804840c7cf46eb952957532", "score": "0.66572744", "text": "public abstract function getUser();", "title": "" }, { "docid": "e4eea489699858ba547e231dda2db33b", "score": "0.66522527", "text": "function auth($username, $password) {\n\t// Sending the request to the database\n\t$req = Core\\Queries::execute(\"SELECT * FROM openauth_users WHERE username = :username\", ['username' => $username]);\n\n\t// If the request found a user\n\tif(isset($req) && !empty($req)) {\n\t\t// Hashing the given password\n\t\t$password = hash('sha256', $password);\n\n\t\t// If it is the same as the one of the database\n\t\tif($password == $req->password)\n\t\t\t// Returning true\n\t\t\treturn true;\n\n\t\t// Else if the password aren't the same\n\t\telse\n\t\t\t// Returning false\n\t\t\treturn false;\n\n\t}\n\n\t// Else if the request didn't find an user\n\telse\n\t\t// Returning false\n\t\treturn false;\n}", "title": "" }, { "docid": "b652ff44639442a2fc0a6ee6edbe63be", "score": "0.66475433", "text": "public function getUser($username)\n {\n return $this->select('user_mhs, pass_mhs')->where(['user_mhs' => $username, 'soft_del' => '0'])->first();\n }", "title": "" }, { "docid": "0f0f1651507b2b4c3d38e27b6d1f3d31", "score": "0.6638908", "text": "function get_user_by_username_password() {\n global $db;\n $query = \"SELECT id FROM user WHERE username = '\".$_POST['username'].\"' AND password = '\".$_POST['password'].\"'\";\n $result = $db->query($query);\n \n echo json_encode($result->fetchAll());\n}", "title": "" }, { "docid": "6b00e986e5d55b68430d7ff56cb1f4af", "score": "0.66339564", "text": "public function getUser() {\n if ($this->isLoggedIn() === true) {\n $username = $_SESSION['login'];\n $qF = new QueryFilter(User::USERNAME, $username, \"=\");\n $user = Factory::getUserFactory()->filter([Factory::FILTER => $qF], true);\n if ($user != null) {\n return $user;\n } else {\n throw new Exception('No user with username \\\"' . $username . '\\\" found!');\n }\n } else {\n throw new Exception('Requested data of logged in user, but no user logged in!');\n }\n }", "title": "" }, { "docid": "af7537053cb393a431d10fa7b296a4e2", "score": "0.6632236", "text": "public function findUser()\n {\n return $this->getMapper()->map($this->executeCommand('user.get'));\n }", "title": "" }, { "docid": "28bff7765f4e7449cf016aedbe0c4ec1", "score": "0.6629216", "text": "private function _findUser()\n\t{\n\t\t$id = $this->_getParam('id');\n\t\t$username = $this->_getParam('username');\n\n\t\tif (!empty($id)) {\n\t\t\t$user = Doctrine_Core::getTable('Models_Main_Personnel')->findOneByID_number($id);\n\t\t} elseif (!empty($username)) {\n\t\t\t$user = Doctrine_Core::getTable('Models_Main_Personnel')->findOneByUsername($username);\n\t\t}\n\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "667dfe27aeba56c11a2d4e16b765fbc0", "score": "0.6625277", "text": "public function getUserByUsuarioAndPassword($user, $password){\r\n\t\tmysql_query(\"SELECT * FROM tb_usuario WHERE usu_usuario = '$user' and contrasena_usuario= '$password'\") or die(mysql_error());\r\n\t\t// check for result\r\n\t\t$no_of_rows = mysql_num_rows($result);\r\n\t\tif ($no_of_rows>0) {\r\n\t\t\t$result=mysql_fetch_array($result)\r\n\t\t\treturn $result;\r\n\t\t} else{\r\n\t\t\t//user not found\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "74af826d3773f65a3636476a3dadf9c2", "score": "0.6608058", "text": "public function findForPassport($username)\n {\n $user = static::where('email' , $username)->orWhere('mobile' , $username)->first();\n return $user;\n }", "title": "" }, { "docid": "7e898a1780a96bd913bddee527ca92a9", "score": "0.6604866", "text": "function checkUser($user,$password){\n $db = Xcrud_db::get_instance();\n $db->query(\"SELECT * FROM usuarios WHERE usuario = '\" . $user . \"' AND password='\" . $password .\" '\");\n $resultados = $db->row();\n\n return $resultados; \n}", "title": "" }, { "docid": "e0bdb6ca31594a539df53c4b0adb8686", "score": "0.6604229", "text": "function get_user($username, $password)\n {\n $sql = \"select * from tbl_usrs where username = '\" . $username . \"' and password = '\" . $password . \"' limit 1\";\n\t\t \n\t\t \n $query = $this->db->query($sql);\n return $query->num_rows();\n\t\t \n }", "title": "" }, { "docid": "ae4ed20cdc43620e78872fe844bf4923", "score": "0.66036236", "text": "public function findUserByCredentials(array $credentials);", "title": "" }, { "docid": "4f5332ce13333e1fbe95e8d7735c2b78", "score": "0.6600107", "text": "public static function getUserByCredentials($email, $password) {\n // Build the sql query.\n $sql = \"SELECT * FROM Users WHERE email = '$email' AND password = '$password'\";\n // Query the database.\n $results = parent::queryDatabase($sql);\n\n // Parse the results.\n if ($results->num_rows == 1) {\n while ($row = $results->fetch_assoc()) {\n $instance = new self();\n $instance->id = $row['id'];\n $instance->fname = $row['fname'];\n $instance->lname = $row['lname'];\n $instance->email = $row['email'];\n $instance->password = $row['password'];\n $instance->session_id = $row['session_id'];\n $instance->phone_number = $row['phone_number'];\n }\n\n // Return the user object.\n return $instance;\n }\n }", "title": "" }, { "docid": "0694e78e1b0fa93ff5c4ac9e90181920", "score": "0.6598829", "text": "function fetchUserDetails($username=NULL,$token=NULL, $id=NULL) {\n\tif ($username!=NULL) {\n\t\t$column = \"username\";\n\t\t$data = $username;\n\t} elseif ($id!=NULL) {\n\t\t$column = \"id\";\n\t\t$data = $id;\n\t}\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT * FROM users WHERE $column = $data LIMIT 1\");\n\t$results = $query->first();\n\treturn ($results);\n}", "title": "" }, { "docid": "459a816df059a4f31fa8127c46299f70", "score": "0.6597536", "text": "public function findCustomerIdentifier($username, $password);", "title": "" }, { "docid": "9f791e0cfb0cc35f356e8ad19ba0afad", "score": "0.65971", "text": "public function login($user, $password);", "title": "" }, { "docid": "6b819188ac88db80e40c7183ded9d57c", "score": "0.6596916", "text": "function get_user($username) {\nrequire_once 'Controller/connection.php';\n \n try {\n $results = $pdo->prepare(\"SELECT email, username, password FROM users WHERE username = ?\");\n $results->bindParam(1, $username, PDO::PARAM_STR);\n \n\n\n $results->execute();\n \n } catch (Exception $e) {\n echo \"Error!: \" . $e->getMessage() . \"</br>\";\n \n }\n $account = $results->fetch(PDO::FETCH_ASSOC);\n return $account;\n}", "title": "" }, { "docid": "49e10ad5982600d039c1a561ec3540af", "score": "0.65967536", "text": "function authenticate_v2($username='', $password='') {\n global $db;\n $username = $db->escape($username);\n $password = $db->escape($password);\n $sql = \"SELECT id,name,username,password,user_level,status,reset_password FROM users WHERE username ='$username' OR email ='$username' LIMIT 1\";\n $result = $db->query($sql);\n if($db->num_rows($result)){\n $user = $db->fetch_assoc($result);\n $password_request = sha1($password);\n if($password_request === $user['password'] ){\n return $user;\n }\n }\n return false;\n}", "title": "" }, { "docid": "0f2f8a24fdca4639c9da528de486ece8", "score": "0.6592439", "text": "public function getUserByusernameAndPassword($username_pegawai, $pass_pegawai) {\n \n // Perintah untuk mendapatkan data sesuai dengan username dan password pegawai\n $stmt = $this->conn->prepare(\"SELECT * FROM pegawai_honorer WHERE username_pegawai = ? AND pass_pegawai = ?\");\n $stmt->bind_param(\"ss\", $username_pegawai, $pass_pegawai);\n if ($stmt->execute()) {\n $user = $stmt->get_result()->fetch_assoc();\n $stmt->close();\n return $user;\n } else {\n return NULL;\n }\n }", "title": "" }, { "docid": "076cb706e096c9b40d88313f81a9b32d", "score": "0.659243", "text": "function get_credentials($username){\n \n $connection = dbConnection();\n \n //Query for fetching credentials\n $credentials_query = \"SELECT email FROM user WHERE username = '$username'\";\n $credentials_query_result = $connection->query($credentials_query);\n \n $row = $credentials_query_result->fetch_assoc();\n $email = $row['email'];\n return $email;\n }", "title": "" }, { "docid": "72600e3b68e3c18d318732af03400dd6", "score": "0.65872747", "text": "function authenticate($username='', $password='') {\n global $db;\n $username = $db->escape($username);\n $password = $db->escape($password);\n $sql = sprintf(\"SELECT id,username,password,user_level FROM users WHERE username ='%s' LIMIT 1\", $username);\n $result = $db->query($sql);\n if($db->num_rows($result)){\n $user = $db->fetch_assoc($result);\n $password_request = sha1($password);\n if($password_request === $user['password'] ){\n return $user['id'];\n }\n }\n return false;\n }", "title": "" }, { "docid": "8e054b4d80b9c27484111f0bba4f1d8b", "score": "0.6579026", "text": "public function forgetUser();", "title": "" }, { "docid": "8e054b4d80b9c27484111f0bba4f1d8b", "score": "0.6579026", "text": "public function forgetUser();", "title": "" }, { "docid": "29fa62fd07e59965ead4c513903571d2", "score": "0.65786827", "text": "function auth_member($email, $password) {\n $query = $this->db->query(\"SELECT * FROM tabel_user WHERE email='$email' AND password='$password' LIMIT 1\");\n return $query;\n }", "title": "" }, { "docid": "7111ead7c5b55318204a2d7bcf1b0cae", "score": "0.65738153", "text": "function find_user_by_name($name){\n if($this->_database){\n $sql = \"\nSELECT *\nFROM `user` u\nWHERE u.`username` = '$name';\";\n\n if($users = $this->_database->query($sql)) {\n return $users->fetch_assoc();\n }\n else {\n return $this->_database->error;\n }\n }\n return $this->_database->error;\n }", "title": "" }, { "docid": "217ec9f11f9ac67682c191dffd12b5fb", "score": "0.65686446", "text": "public static function getUserAccount($username,$email,$password){\n if(! empty($username) && !empty($email) && ! empty($password)){\n $user = DBConnection::getInstance()->get('tbl_user', $arrayName = array('username', '=' , $username));\n\n if(!$user->count()){\n echo 'No user';\n }else{\n echo $user->first()->username;\n } \n }\n }", "title": "" }, { "docid": "c541b9541a7b8bf6c69cfef9aa61a1e6", "score": "0.656632", "text": "public function cekUser($username, $password)\n {\n $sql = \"SELECT * FROM users WHERE username = '$username' AND password = '$password'\";\n $query = koneksi()->query($sql);\n return $query->fetch_assoc();\n }", "title": "" }, { "docid": "5226228bdd19c2d3c795c4efdb67cc44", "score": "0.65649575", "text": "function authenticateUser($username,$password)\n {\n }", "title": "" }, { "docid": "0e817f448b24fbd134a9204cbc698e62", "score": "0.6562692", "text": "public static function getUser($dbh, $mail, $password){\n $passwordSha256 = hash(\"sha256\", $password);\n $statement = $dbh->prepare(\"SELECT id,nom, prenom, pseudo, mail, sex, datenaissance,avatar FROM users WHERE mail = :mail AND passwordSha256 = :passwordSha256\"); \n $ok = $statement->execute([\"mail\" => $mail, \"passwordSha256\" => $passwordSha256]);\n if($ok){\n $user = $statement->fetchAll(PDO::FETCH_CLASS, \"User\");\n if(isset($user[0])){\n return $user[0];\n }\n }\n return false;\n }", "title": "" }, { "docid": "bccd8bdadbe5f283aab3b280844377f9", "score": "0.65611255", "text": "function getPassword($username)\r\n\t{\r\n\t\t$qry = \"SELECT * FROM `tab_usr` WHERE itemname = '$username'\";\r\n\t\t$result = $this->executeQuery($qry);\r\n\t\t\t\t\r\n\t\tif ($result != NULL) \r\n\t\t{ \r\n\t\t\twhile ($row = mysql_fetch_row($result))\r\n\t\t\t{\r\n\t\t\t\t$usr = $row[1];\r\n\t\t\t\tif (strtolower($usr) == strtolower($username))\r\n\t\t\t\t\treturn $row[2];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "a4f6bb52d8461632da88d170fe728b58", "score": "0.6560946", "text": "public function findByUserName($username) {\n\n\n $req = $this-> pdo->prepare(\"SELECT * FROM users WHERE username = :username\");\n\n $req->execute(['username' => $username]);\n\n $user = $req->fetchObject(\\Model\\User::class );\n\n return $user;\n\n\n}", "title": "" } ]
01088761e63ed60608f8d5b81a261eac
Clears message values and sets default ones
[ { "docid": "525e89ec3ef5226f06aebc2c612e0882", "score": "0.0", "text": "public function reset()\n {\n $this->values[self::_EXCAVATE_HISTORY] = array();\n }", "title": "" } ]
[ { "docid": "a0ef538ad10320016831b29ac4c8ff1b", "score": "0.72973615", "text": "public function reset()\n {\n $this->values[self::_SAY] = null;\n $this->values[self::_FRESH] = null;\n $this->values[self::_FETCH] = null;\n $this->values[self::_CHAT_ADD_BL] = null;\n $this->values[self::_CHAT_DEL_BL] = null;\n $this->values[self::_CHAT_BLACKLIST] = null;\n $this->values[self::_CHAT_BORAD_SAY] = null;\n }", "title": "" }, { "docid": "0e9c006ba753c16995a5ebb3a0d5b762", "score": "0.7258333", "text": "public function reset()\n {\n $this->values[self::_PLAIN_MAIL] = null;\n $this->values[self::_FORMAT_MAIL] = null;\n }", "title": "" }, { "docid": "01685abfcc022448aad664ed573d379d", "score": "0.7220937", "text": "protected function reset()\n {\n $this->message = null;\n }", "title": "" }, { "docid": "4b049e26b1721f9cab8fb0214762129a", "score": "0.7210891", "text": "public function clearMessage(){\n\t\t$this->message = '';\n\t}", "title": "" }, { "docid": "cf52ced48c97546d31bf73a9e21f007e", "score": "0.71421975", "text": "public function reset()\n {\n $this->values[self::_MAIL_CFG_ID] = null;\n $this->values[self::_PARAMS] = array();\n }", "title": "" }, { "docid": "cf48556a924591e057203f76466ba1d4", "score": "0.7037741", "text": "public function resetMessage() {\n self::$message = '';\n }", "title": "" }, { "docid": "e045500b20d318d30c1b13f41f285c54", "score": "0.70285827", "text": "public function reset()\n {\n $this->messages = [];\n }", "title": "" }, { "docid": "2b5c43d6f82b740c1e60405b73f64dc1", "score": "0.70249987", "text": "public function reset()\n {\n $this->values[self::_CHAT_ID] = null;\n $this->values[self::_SPEAKER_UID] = null;\n $this->values[self::_SPEAKER_SUMMARY] = null;\n $this->values[self::_TARGET_UID] = null;\n $this->values[self::_TARGET_SUMMARY] = null;\n $this->values[self::_SPEAKER_POST] = null;\n $this->values[self::_SPEAK_TIME] = null;\n $this->values[self::_CONTENT_TYPE] = null;\n $this->values[self::_CONTENT] = null;\n }", "title": "" }, { "docid": "5566103d22067c6931ce1e774ed5d0c8", "score": "0.69918084", "text": "public function reset()\n {\n $this->values[self::_LADDER_NOTIFY] = null;\n $this->values[self::_NEW_MAIL] = null;\n $this->values[self::_GUILD_CHAT] = null;\n $this->values[self::_ACTIVITY_NOTIFY] = null;\n $this->values[self::_ACTIVITY_REWARD] = null;\n $this->values[self::_RELEASE_HEROES] = array();\n $this->values[self::_EXCAV_RECORD] = null;\n $this->values[self::_GUILD_DROP] = null;\n $this->values[self::_PERSONAL_CHAT] = null;\n $this->values[self::_SPLITABLE_HEROES] = null;\n }", "title": "" }, { "docid": "14495aefd36f584c49c73fc3513b3ce5", "score": "0.697904", "text": "public function reset()\n {\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CHAT_ID] = null;\n $this->values[self::_ACCESSORY] = null;\n }", "title": "" }, { "docid": "c9d874fa0a2125b5391e89211d198a7f", "score": "0.6965748", "text": "public function reset()\n {\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CONTENTS] = array();\n }", "title": "" }, { "docid": "8981d7cb5ff86c4ed6e2bab027d73a5c", "score": "0.68613017", "text": "public function reset() {\n $this->_set_defaults();\n }", "title": "" }, { "docid": "77d99eeaa80b41752454702907aea13b", "score": "0.68274975", "text": "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CONTENTS] = array();\n }", "title": "" }, { "docid": "77d99eeaa80b41752454702907aea13b", "score": "0.68267244", "text": "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CONTENTS] = array();\n }", "title": "" }, { "docid": "024d62527915f7f12eb0a8a68d40ecef", "score": "0.67366123", "text": "public function clear_messages() {\n\t\t$this->_write_messages( null );\n\t}", "title": "" }, { "docid": "94d15bb1710a48f1ecea6fe0f5f53b3f", "score": "0.6724516", "text": "public function clear()\n {\n $this->messages = [];\n }", "title": "" }, { "docid": "5f11716f188c7bec24446aa11e3409a6", "score": "0.67181194", "text": "public function reset()\n {\n $this->values[self::_WORLDCUP_QUERY_REPLY] = null;\n $this->values[self::_WORLDCUP_SUBMIT_REPLY] = null;\n }", "title": "" }, { "docid": "4194a03240a0c0d80243572b08d190ae", "score": "0.6702474", "text": "public function reset()\n {\n $this->values[self::_FROM] = null;\n $this->values[self::_TITLE] = null;\n $this->values[self::_CONTENT] = null;\n }", "title": "" }, { "docid": "e9ee68b9ec168586f06f0c40dc9255a5", "score": "0.66886175", "text": "public function reset()\n {\n $this->values[self::_INFO] = null;\n $this->values[self::_WORSHIP] = null;\n $this->values[self::_DROP_INFO] = null;\n $this->values[self::_TO_CHAIRMAN] = null;\n }", "title": "" }, { "docid": "4edd97c42283749ed6546916aa12ea67", "score": "0.66672534", "text": "public function reset()\n {\n $this->values[self::_USER_SUMMARY] = null;\n $this->values[self::_GUILD_SUMMARY] = null;\n $this->values[self::_PARAM1] = null;\n }", "title": "" }, { "docid": "30672a44a4e4623b4168e9d59776de3b", "score": "0.6649793", "text": "public function reset()\n {\n $this->values[self::_ITEM_ID] = null;\n $this->values[self::_RECEIVER_NAME] = null;\n $this->values[self::_SEND_TIME] = null;\n $this->values[self::_SENDER_NAME] = null;\n }", "title": "" }, { "docid": "e45ba66a657f63f9a7d7b016f19310af", "score": "0.6639235", "text": "public function reset($clear_attachments=true)\n {\n $this->message = [];\n }", "title": "" }, { "docid": "3b7b7e45d89afe85f4d15e350fffe6a8", "score": "0.6604048", "text": "public function reset()\n {\n $this->values[self::_WORLD_CHAT_TIMES] = null;\n $this->values[self::_LAST_RESET_WORLD_CHAT_TIME] = null;\n $this->values[self::_BLACK_LIST] = array();\n }", "title": "" }, { "docid": "937ab616bde48e8802cf7e150890f0f4", "score": "0.6588375", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->user_broadcast_status = 0;\n\t}", "title": "" }, { "docid": "7b9a216ce76a525f0abd3afc303b12d3", "score": "0.65854067", "text": "public function reset()\n {\n $this->values[self::services] = array();\n $this->values[self::mapping] = array();\n $this->values[self::short_tcp] = self::$fields[self::short_tcp]['default'];\n }", "title": "" }, { "docid": "798f096edc474ef9b0aa95551b9e998c", "score": "0.6571982", "text": "public function reset()\n {\n $this->values[self::_CHALLENGER] = null;\n $this->values[self::_DAMAGE] = null;\n }", "title": "" }, { "docid": "798f096edc474ef9b0aa95551b9e998c", "score": "0.6571982", "text": "public function reset()\n {\n $this->values[self::_CHALLENGER] = null;\n $this->values[self::_DAMAGE] = null;\n }", "title": "" }, { "docid": "9991309efc72098ce1e291ff91835341", "score": "0.6567922", "text": "public function reset()\n {\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_OPPOS] = array();\n $this->values[self::_IS_ROBOT] = null;\n }", "title": "" }, { "docid": "e98048ed129bfadbb53ef8dedb9286eb", "score": "0.6564663", "text": "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_GUILD_INFO] = null;\n }", "title": "" }, { "docid": "8475d3a5ca11985aba39ad1c275f5ab7", "score": "0.6518179", "text": "public function reset()\n {\n $this->values[self::_REQUEST] = null;\n $this->values[self::_CHANGE] = null;\n }", "title": "" }, { "docid": "8cbba6b54838526523ebb417e1dfafb8", "score": "0.6489566", "text": "public function clearMessages() {\n unset($this->messages);\n $this->messages = array();\n }", "title": "" }, { "docid": "711b45af64c262392f6bf78c011dc16c", "score": "0.64885837", "text": "public function reset()\n {\n $this->values[self::_SYS_MAIL_LIST] = array();\n }", "title": "" }, { "docid": "653c1f31a8ac27b91fa1ebca34549dc1", "score": "0.646069", "text": "public function reset()\n {\n $this->values[self::PHONE_NUMBER] = null;\n $this->values[self::GOOGLE_VOICE] = null;\n $this->values[self::VERIFICATION_STATUS] = null;\n $this->values[self::DISCOVERABLE] = null;\n $this->values[self::DISCOVERABILITY_STATUS] = null;\n $this->values[self::PRIMARY] = null;\n }", "title": "" }, { "docid": "dc400c38b6760a0806bb62d8ac0181ca", "score": "0.6460602", "text": "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_BINARY] = null;\n $this->values[self::_REPLAY] = null;\n }", "title": "" }, { "docid": "1b3f9cd8a8b692d9486b4756c3367b85", "score": "0.64552313", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->broker_type = 'R';\n\t\t$this->is_name_different = 'N';\n\t\t$this->is_address_different = 'N';\n\t\t$this->new_broker_type = 'R';\n\t\t$this->new_is_name_different = 'N';\n\t\t$this->new_is_address_different = 'N';\n\t}", "title": "" }, { "docid": "a014dda18c57f7ebdcf94bacbd1bfe47", "score": "0.6454503", "text": "public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_NAME] = null;\n $this->values[self::_JOB] = Down_GuildJobT::member;\n $this->values[self::_REQ_GUILD_ID] = null;\n $this->values[self::_HIRE_HERO] = array();\n }", "title": "" }, { "docid": "3fb607cf4d600de51f6f7e98d4ef92cd", "score": "0.64510584", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->points = '0';\n\t\t$this->type = 0;\n\t\t$this->hidden = 0;\n\t\t$this->relationship_status = 0;\n\t\t$this->show_email = 1;\n\t\t$this->show_gender = 1;\n\t\t$this->show_hometown = 1;\n\t\t$this->show_home_phone = 1;\n\t\t$this->show_mobile_phone = 1;\n\t\t$this->show_birthdate = 1;\n\t\t$this->show_address = 1;\n\t\t$this->show_relationship_status = 1;\n\t\t$this->credit = 0;\n\t\t$this->login = 0;\n\t}", "title": "" }, { "docid": "2b98e933a055a8ffb35f7e42d75f7fce", "score": "0.64281696", "text": "public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_STATUS] = null;\n $this->values[self::_MAIL_TIME] = null;\n $this->values[self::_EXPIRE_TIME] = null;\n $this->values[self::_CONTENT] = null;\n $this->values[self::_MONEY] = null;\n $this->values[self::_DIAMONDS] = null;\n $this->values[self::_SKILL_POINT] = null;\n $this->values[self::_ITEMS] = array();\n $this->values[self::_POINTS] = array();\n }", "title": "" }, { "docid": "7801ae5a6288189a6d35a0b30b015f54", "score": "0.64216936", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->closed = 0;\n\t\t$this->lastfmid = 0;\n\t\t$this->hasphotos = 0;\n\t}", "title": "" }, { "docid": "b50cdf27b591e607810659ef2f217322", "score": "0.6412798", "text": "public function applyDefaultValues()\n {\n $this->deleted = false;\n $this->amount = 1;\n $this->amountevaluation = 0;\n $this->defaultstatus = 0;\n $this->defaultdirectiondate = 0;\n $this->defaultenddate = 0;\n $this->defaultpersoninevent = 0;\n $this->defaultpersonineditor = 0;\n $this->maxoccursinevent = 0;\n $this->showtime = false;\n $this->ispreferable = true;\n $this->isrequiredcoordination = false;\n $this->isrequiredtissue = false;\n $this->mnem = '';\n }", "title": "" }, { "docid": "d329e1ddd833d09afbd121a0f0c579d9", "score": "0.6404823", "text": "public function applyDefaultValues()\n {\n $this->potbconfkey = 0;\n }", "title": "" }, { "docid": "07548af709f1205581e2a9ce4b419807", "score": "0.64043164", "text": "public function reset()\n {\n $this->values[self::FILTER] = null;\n $this->values[self::AFTERINDEXKEY] = null;\n $this->values[self::POPULATEDOCUMENTS] = self::$fields[self::POPULATEDOCUMENTS]['default'];\n $this->values[self::INJECTENTITYCONTENT] = self::$fields[self::INJECTENTITYCONTENT]['default'];\n $this->values[self::POPULATEPREVIOUSDOCUMENTSTATES] = self::$fields[self::POPULATEPREVIOUSDOCUMENTSTATES]['default'];\n }", "title": "" }, { "docid": "e218cacb38b5760315e015697105ae8a", "score": "0.6381278", "text": "public function reset()\n {\n $this->values[self::_AVATAR] = null;\n $this->values[self::_NAME] = null;\n $this->values[self::_VIP] = null;\n $this->values[self::_LEVEL] = null;\n $this->values[self::_GUILD_NAME] = null;\n $this->values[self::_USER_ID] = null;\n }", "title": "" }, { "docid": "a15fe0a0575ca84df7155a9c8bfb05e2", "score": "0.63752776", "text": "public function clearMessage(){\n $this->setMessage([]);\n\n return $this;\n }", "title": "" }, { "docid": "9e7026a2b4944a3c46055e521f1b2897", "score": "0.63705844", "text": "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_PARAM1] = null;\n $this->values[self::_PARAM2] = null;\n }", "title": "" }, { "docid": "9e7026a2b4944a3c46055e521f1b2897", "score": "0.63705844", "text": "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_PARAM1] = null;\n $this->values[self::_PARAM2] = null;\n }", "title": "" }, { "docid": "9e7026a2b4944a3c46055e521f1b2897", "score": "0.6369917", "text": "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_PARAM1] = null;\n $this->values[self::_PARAM2] = null;\n }", "title": "" }, { "docid": "9e7026a2b4944a3c46055e521f1b2897", "score": "0.63695914", "text": "public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_PARAM1] = null;\n $this->values[self::_PARAM2] = null;\n }", "title": "" }, { "docid": "b7867eca15d5eaec6d184127b3f518ac", "score": "0.6363301", "text": "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_JOIN_GUILD_ID] = null;\n $this->values[self::_GUILD_INFO] = null;\n $this->values[self::_CD_TIME] = null;\n $this->values[self::_FAIL_REASON] = null;\n }", "title": "" }, { "docid": "452128d3300149931962b10cbe4ce732", "score": "0.6359638", "text": "public function clearUserMsgs()\n\t{ $this->setUserMsgs(array()); }", "title": "" }, { "docid": "bff8ee10d4586a5825b69a1174fceaa7", "score": "0.6355287", "text": "public function reset() {\n $this->values[self::ERR_NO] = null;\n $this->values[self::ERR_MSG] = null;\n $this->values[self::CONTENTS] = array();\n }", "title": "" }, { "docid": "4ab220e9f35271aed3269f847a8134c2", "score": "0.6342256", "text": "public function reset()\n {\n $this->values[self::_STATUS] = null;\n $this->values[self::_FREQUENCY] = null;\n $this->values[self::_LAST_LOGIN_DATE] = null;\n }", "title": "" }, { "docid": "ef38a7d718c3185a9d357b2c08732b38", "score": "0.6325498", "text": "public function reset()\n {\n $this->values[self::ERRMSG] = null;\n $this->values[self::RET] = null;\n }", "title": "" }, { "docid": "293f11e4e8ed42241bffcb7efb869fca", "score": "0.6322867", "text": "public function reset()\n {\n $this->values[self::_GUILD_LOG] = array();\n }", "title": "" }, { "docid": "174e16ffa7aee5cb5738ffa4e0023671", "score": "0.63216275", "text": "public function reset()\n {\n $this->values[self::_USERS] = array();\n $this->values[self::_HIRE_UIDS] = array();\n $this->values[self::_FROM] = null;\n }", "title": "" }, { "docid": "11193f6398d42141267eb384c2e076ae", "score": "0.6313809", "text": "public function reset()\n {\n $this->values[self::_USER_ID] = null;\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_RANK] = null;\n $this->values[self::_WIN_CNT] = null;\n $this->values[self::_GS] = null;\n $this->values[self::_IS_ROBOT] = null;\n $this->values[self::_HEROS] = array();\n }", "title": "" }, { "docid": "23d8ae2e08625ff03aecbd05c5f5ec7d", "score": "0.63039047", "text": "public function reset(): void\n {\n /** @var array<string, mixed> $fieldsFromConfig */\n $fieldsFromConfig = config('alert.fields', []);\n\n $this->fields = $fieldsFromConfig;\n }", "title": "" }, { "docid": "cb8dfa5514c60b255c0fdb1bf37ce782", "score": "0.6289903", "text": "public function clearMessages()\n {\n $this->collMessages = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "2ebefd348f4e9501146ad3fd41944e15", "score": "0.62835014", "text": "public function resetFields()\n {\n $this->publish = '';\n $this->path_photo = '';\n $this->title = '';\n $this->short_description = '';\n $this->description = '';\n $this->publish_date = '';\n $this->oldPublishdate = '';\n $this->photo = '';\n }", "title": "" }, { "docid": "f9ddb5edc16174a8a1ba2bce2b2a739d", "score": "0.6283025", "text": "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_INCOME] = null;\n }", "title": "" }, { "docid": "1ad98f68a38f1f7e5ef80f6590d66df9", "score": "0.62781066", "text": "public function reset()\n {\n $this->values[self::SIGNEDCONTENT] = null;\n $this->values[self::FILENAME] = null;\n $this->values[self::COMMENT] = null;\n $this->values[self::CUSTOMDOCUMENTID] = null;\n $this->values[self::CUSTOMDATA] = array();\n }", "title": "" }, { "docid": "b56752247b4f6c055b5ab53ce9b48e8b", "score": "0.6267865", "text": "public function reset()\n {\n $this->values[self::_OPEN_PANEL] = null;\n $this->values[self::_APPLY_OPPO] = null;\n $this->values[self::_START_BATTLE] = null;\n $this->values[self::_END_BATTLE] = null;\n $this->values[self::_SET_LINEUP] = null;\n $this->values[self::_QUERY_RECORDS] = null;\n $this->values[self::_QUERY_REPLAY] = null;\n $this->values[self::_QUERY_RANKBORAD] = null;\n $this->values[self::_QUERY_OPPO] = null;\n $this->values[self::_CLEAR_BATTLE_CD] = null;\n $this->values[self::_DRAW_RANK_REWARD] = null;\n $this->values[self::_BUY_BATTLE_CHANCE] = null;\n }", "title": "" }, { "docid": "997d43fc7ab15b258e05563f5e239f1f", "score": "0.62647647", "text": "public function reset()\n {\n $this->values[self::_INFO] = null;\n $this->values[self::_ADDR] = null;\n }", "title": "" }, { "docid": "23238f9c1c60a7a79659ee116ec9b7a0", "score": "0.6264639", "text": "public function reset(): void\n {\n parent::reset();\n\n $this->store[\"FROM\"] = \"\";\n $this->store[\"RETURNING\"] = [];\n }", "title": "" }, { "docid": "18fa3b6632310788a8fe417be6fc329d", "score": "0.6263199", "text": "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_APP_QUEUE] = null;\n }", "title": "" }, { "docid": "18fa3b6632310788a8fe417be6fc329d", "score": "0.62625456", "text": "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_APP_QUEUE] = null;\n }", "title": "" }, { "docid": "9e89977708d6cc6e035685dec5b3c371", "score": "0.6237412", "text": "public function reset()\n {\n $this->values[self::BAR] = null;\n $this->values[self::BAZ] = null;\n $this->values[self::SPAM] = array();\n }", "title": "" }, { "docid": "bdcd7587abdb44d478428893efbc1245", "score": "0.6230314", "text": "public function applyDefaultValues()\n {\n $this->isadministrator = false;\n $this->isenabled = true;\n $this->iscalendardefaultview = false;\n $this->receivealert = true;\n $this->receivenewletter = true;\n $this->receiveresult = true;\n $this->isreminderemailsent = false;\n $this->isresultemailsent = false;\n $this->isemailvalid = false;\n }", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "a5c1197c00206cf21d709b1b95e55ff9", "score": "0.62282777", "text": "function ClearMessage() {\n\t\t$_SESSION[EW_SESSION_MESSAGE] = \"\";\n\t}", "title": "" }, { "docid": "25e4528e58d6d96c20500181ccfb0294", "score": "0.62248176", "text": "public function reset()\n {\n $this->values[self::_CHAT_BLACKLIST_USER] = array();\n }", "title": "" }, { "docid": "b27861e02ef75c46a41105bc40176203", "score": "0.6223792", "text": "public function reset()\n {\n $this->values[self::OPERATIONINFO] = null;\n $this->values[self::TRANSFERDATE] = null;\n $this->values[self::CREATEDTHINGTRANSFERDATE] = null;\n $this->values[self::CREATEDTHINGINFO] = null;\n $this->values[self::ADDITIONALINFOS] = array();\n }", "title": "" }, { "docid": "5c6416db80153808a01299c7695a9efd", "score": "0.6223783", "text": "public function reset()\n {\n $this->values[self::_INFO] = null;\n $this->values[self::_EXIT] = Down_ErrorInfo_Exit::noneed;\n }", "title": "" }, { "docid": "a564583e9426e92aabb368a72266642d", "score": "0.6223025", "text": "public function reset()\n {\n $this->from = [];\n $this->to = [];\n $this->subject = null;\n $this->body = null;\n $this->html = true;\n }", "title": "" }, { "docid": "44246057791a491bfb0f47a9fca698cd", "score": "0.6211072", "text": "public function setDefaultValues()\n\t{\t\t\n\t\t\t \n\t}", "title": "" }, { "docid": "281f013a7bfb35abd2aae91a7e7d7783", "score": "0.6210114", "text": "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_USER] = null;\n $this->values[self::_TIME_ZONE] = null;\n }", "title": "" }, { "docid": "fbf23609e99703c6bad9ca9f44632563", "score": "0.62081075", "text": "public function reset()\n {\n $this->values[self::promotions] = array();\n }", "title": "" }, { "docid": "cea06ac5fdd638fff18f548c458a7ff3", "score": "0.6204328", "text": "public function reset()\n {\n $this->values[self::_UID] = null;\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_JOB] = null;\n $this->values[self::_LAST_LOGIN] = null;\n $this->values[self::_ACTIVE] = null;\n $this->values[self::_JOIN_INSTANCE_TIME] = null;\n }", "title": "" }, { "docid": "c0f4e0bcda6dc27b7413457ed051eda8", "score": "0.62033147", "text": "public function reset()\n {\n $this->values[self::_SERVER_ID] = null;\n $this->values[self::_SERVER_NAME] = null;\n $this->values[self::_PLAYER_NAME] = null;\n $this->values[self::_PLAYER_LEVEL] = null;\n }", "title": "" }, { "docid": "46e4dc7dcdaf79e0be8affadd8ff4598", "score": "0.6203232", "text": "public function reset()\n {\n $this->values[self::_USER_ID] = null;\n $this->values[self::_SUMMARY] = null;\n }", "title": "" }, { "docid": "8f2eff7ff741cffe1d840b8e0969ecdf", "score": "0.61973846", "text": "public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_PARAMS] = array();\n $this->values[self::_TIME] = null;\n }", "title": "" }, { "docid": "424456d8f1aa86a139cf27a9f44a2eb3", "score": "0.619607", "text": "public function reset()\n {\n $this->values[self::_UID] = null;\n $this->values[self::_USER_SUMMARY] = null;\n }", "title": "" }, { "docid": "75e91cef4cf2e20745f3093d1310b328", "score": "0.61947924", "text": "public function reset()\n {\n $this->values[self::_DIAMOND] = null;\n $this->values[self::_GUILDPOINT] = null;\n $this->values[self::_DPS] = null;\n $this->values[self::_OLD_DPS] = null;\n $this->values[self::_OLD_SUMMARY] = null;\n }", "title": "" }, { "docid": "ba685f598ed2e5b8065c4cd582425136", "score": "0.6191852", "text": "public function reset()\n {\n $this->values[self::_ITEM_ID] = null;\n $this->values[self::_TIME_OUT_END] = null;\n $this->values[self::_USER_ID] = array();\n }", "title": "" } ]
a1065ba692f17962452ad7a6e8970e4d
Debug Functions Get css url
[ { "docid": "6cce3a80b8bd358ad9a01abded42b81e", "score": "0.71225053", "text": "function css_uri(){\r\n\treturn get_theme_file_uri('/assets/css/');\r\n}", "title": "" } ]
[ { "docid": "9299849b960b3ca78003a9e5ae62aa90", "score": "0.7988584", "text": "function dirindex_css_url()\n{\n\tglobal $dirindex_fugue;\n\n\techo $dirindex_fugue->css_url();\n}", "title": "" }, { "docid": "efb7abb496a6ef1a3ecc8c29261ce5ff", "score": "0.7706224", "text": "public function get_css_url() {\n\t\treturn $this->final_css_url;\n\t}", "title": "" }, { "docid": "21835d7911537b5cddaea3ff7fc129a5", "score": "0.7368709", "text": "function stylesheet_url() {\n return $this->file( 'url' );\n }", "title": "" }, { "docid": "1fba8f44c5cc9f824b39a88fdf362306", "score": "0.7340046", "text": "function righthere_css_url($url){\n\t\treturn get_option('righthere_styles_url','');\n\t}", "title": "" }, { "docid": "3b190a37dea3703a2c092edde8734d8a", "score": "0.7222692", "text": "function rkf_css_url($rel_path){\n return RKF_CSS_URL . $rel_path;\n }", "title": "" }, { "docid": "21bdc5289844a4810bb83fa1a2c6d553", "score": "0.72183526", "text": "function md_get_the_css_urls() {\n \n // Verify if css urls exists\n if ( isset( (new MidrubBase\\Classes\\Properties)::$the_multilpe_properties['css_urls'] ) ) {\n\n $i = 0;\n\n foreach ( (new MidrubBase\\Classes\\Properties)::$the_multilpe_properties['css_urls'] as $array ) {\n\n if ( !isset($array[0]) || !isset($array[1]) || !isset($array[2]) ) {\n continue;\n }\n\n $media = '';\n\n if ( isset($array[3]) ) {\n\n if ( $array[3] ) {\n\n $media = ' media=\"' . $array[3] . '\"';\n\n }\n\n }\n\n if ( $i > 0 ) {\n echo \"\\x20\\x20\\x20\\x20\";\n }\n\n echo \"<link rel=\\\"\" . $array[0] . \"\\\" href=\\\"\" . $array[1] . \"\\\" type=\\\"\" . $array[2] . \"\\\"\" . $media . \" />\\r\\n\";\n\n $i++;\n\n }\n\n }\n \n }", "title": "" }, { "docid": "32a5eebffd93398732c0a3fd5b469927", "score": "0.71249384", "text": "public function getCss(){ }", "title": "" }, { "docid": "ae09a7e018aeae924aba7f107caed6cc", "score": "0.6886818", "text": "public function getCSSURL()\n {\n $filesInCache = $this->retrieveCssFilesInCache();\n\n // Remove the custom css file if the less file does not exist anymore\n if (isset($filesInCache['custom']) && !in_array('custom', $this->lessFilesToCompile)) {\n unlink($this->getCssFileLocation('custom', $filesInCache['custom']));\n unset($filesInCache['custom']);\n }\n\n //If we found css files in cache we can return css urls\n if (count($filesInCache) === count($this->lessFilesToCompile)) {\n return $this->returnFileLocations($filesInCache);\n }\n\n //Since we did not find css files in cache we have to compile the theme.\n //First check if the theme has metadata, otherwise compile the default theme instead\n if ($this->myTheme !== 'default' && !$this->isDefined()) {\n $clientDefaultTheme = new SidecarTheme($this->myClient, 'default');\n return $clientDefaultTheme->getCSSURL();\n }\n\n //Arrived here we are going to compile missing css files\n $missingFiles = array_diff($this->lessFilesToCompile, array_keys($filesInCache));\n foreach ($missingFiles as $lessFile) {\n $filesInCache[$lessFile] = $this->compileFile($lessFile);\n }\n\n return $this->returnFileLocations($filesInCache);\n }", "title": "" }, { "docid": "fe39d3db33b6130e7b8e04109361bca8", "score": "0.6871896", "text": "function getCss($site){\n\t\tglobal $css, $err_404;\n\t\t$url = $css.$site;\n\t\t$url = addExtension($url, \".css\");\n\t\t\n\t\tif( file_exists($url) ) {\n\t\t\tprint \"ßn\\n<style>\\n\";\n\t\t\tinclude( $url );\n\t\t\tprint \"\\n</style>\\n\";\n\t\t}else err( $err_404, $url );\n\t}", "title": "" }, { "docid": "0540dc702ca130a8c6dc6a7da6172b9a", "score": "0.6865343", "text": "function css_url(){\n\treturn base_url().\"_assets/css/\";\n}", "title": "" }, { "docid": "c17db3aafbf0864805f64c403ce78c7e", "score": "0.67265356", "text": "function obtenerCSS () {\n\t\treturn $this->css;\n\t}", "title": "" }, { "docid": "6772d789792037a658e2bdd2472c7e5e", "score": "0.6719022", "text": "abstract protected function get_css_file_name();", "title": "" }, { "docid": "57d016b66953c49312bab2950535d5e8", "score": "0.6705179", "text": "private function printStyleSrcs(){\n $styles = '';\n foreach($this->styleSrcs as $s){\n $props='';\n foreach($s['props'] as $k=>$v)\n $props.=\"{$k}='{$v}' \";\n $s['src'] = $this->url($s['src']);\n $styles.= \"<link rel='stylesheet' href='{$s['src']}' type='text/css' {$props}/>\";\n }//foreach\n return $styles;\n }", "title": "" }, { "docid": "78262a4621d77b9d2eacb7aacd42955d", "score": "0.6693802", "text": "function getCSS2(){\n\treturn base_url().'assets/css2/';\n}", "title": "" }, { "docid": "f3a4515c4d58f724c2eaebed2fe21be7", "score": "0.66700244", "text": "public function getBaseCssUrl(){\n $this->build();\n\n return $this->getRootUrl() . 'less/' . self::COMPILED_CSS_BASENAME;\n }", "title": "" }, { "docid": "ce7f03ab604edfbe50aeb5b6f43d30ce", "score": "0.6621472", "text": "public function getCustomCssUrl(){\n $file = $this->getCustomCssFile();\n if(!is_dir(dirname($file))) {\n mkdir(dirname($file), 0775, true);\n }\n\n if(!is_file($file)) {\n file_put_contents($file, '');\n }\n\n return $this->getStaticUserfilesUrl(self::CSS_CUSTOM_BASENAME);\n }", "title": "" }, { "docid": "f6affe67a32e5a6134525ceaed86e831", "score": "0.6602599", "text": "public function getCSS() {\r\n\t\treturn $this->linkedCSS;\r\n\t}", "title": "" }, { "docid": "f90542d0f5c2a1f15c4219b4df03ca5b", "score": "0.65283674", "text": "public function get_style_file_url() {\n\t\treturn is_readable($this->get_style_file_path()) && filesize($this->get_style_file_path()) ? $this->get_link() . '/' . $this->style_file_path : null;\n \t}", "title": "" }, { "docid": "b49433bae0007ee43caad341e26299d7", "score": "0.65066886", "text": "private function getStylePage()\n {\n return Configure::read('baseAssets') . 'css/' . $this->action . '.css';\n }", "title": "" }, { "docid": "148cc0925d661d4e6c15e0175099e7cb", "score": "0.6503108", "text": "function getIncludeCssXhtml($url) {\n// $url = resolveUrl($url);\n// $path = url2path($url);\n// if (file_exists($path)) {\n// $mtime = filemtime($path);\n// $url = addQueryStringParameter($url, 'mtime', $mtime);\n// }\n $code = \"<link type='text/css' rel='stylesheet' href='$url' />\\n\";\n return $code;\n}", "title": "" }, { "docid": "53039f71ec863727ef4e98fe753986e7", "score": "0.6485346", "text": "public function getCss(){\n\n\t\t$output = array();\n\n\t\tforeach($this->getApplication()->getCss() as $fileArray){\n\t\t\tlist($file,$allowMtime) = $fileArray;\n\t\t\tif($allowMtime){\n\t\t\t\tif($mtime = \\Smally\\Assets::getInstance()->getAssetMtime($file) ){\n\t\t\t\t\t$file = substr($file,0,strrpos($file, '.')) . '.' . $mtime . strrchr($file, '.');\n\t\t\t\t}\n\t\t\t\tif(strpos($file,'.less') > 0 && !$this->getApplication()->isDev()) {\n\t\t\t\t\t$file .= '.css';\n\t\t\t\t}\n\t\t\t\t$url = $file;\n\t\t\t}else{\n\t\t\t\t$url = $file;\n\t\t\t}\n\t\t\tif(strpos($url,'http')!==0){\n\t\t\t\t$url = $this->urlAssets($url);\n\t\t\t}\n\n\t\t\t$output[] = '<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"'.$url.'\"/>';\n\t\t}\n\t\treturn implode(NN.TT,$output);\n\t}", "title": "" }, { "docid": "bcac3c22d4ef227da38e13d857663c9f", "score": "0.64751476", "text": "public function getCssPath()\n {\n return $this->_path . self::PATH_CSS;\n }", "title": "" }, { "docid": "dc63231d83527d8390941251a29e4780", "score": "0.64709026", "text": "private function getCSS () {\n\t\tif (empty ($this->css_output)) {\n\t\t\t$this->css_output = $this->constructCSS ();\n\t\t}\n\t\t\n\t\treturn ($this->css_output);\n\t}", "title": "" }, { "docid": "d03437ae1d01a0347e9ec4d6b73142a8", "score": "0.64578784", "text": "function _get_css_script_string($src)\n\t{\n\t\t$str = '<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"'.$src.'\">';\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "d33f90af77ee45152b706b45962f391b", "score": "0.6438922", "text": "public function getCss()\n {\n return $this->getCssCode('/izi-toast/1.1.1/iziToast.min.css');\n }", "title": "" }, { "docid": "3bf905d0b814ff152e66fdeb3e8a3037", "score": "0.6436869", "text": "public function getCss() \n\t{\n\t\tif($this->_compressAssets)\n\t\t\treturn $this->_createLink($this->_assetPath . '/css/mini.php?files=' . implode(',', $this->_cssAssets));\n\t\t\n\t\t$return = '';\n\n\t\tforeach($this->_cssAssets as $asset)\n\t\t\t$return .= $this->_createLink($this->_assetPath . '/css/' . $asset . '.css');\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "857863acb01e74dbc4fd15ec2680c4af", "score": "0.6422018", "text": "public function getCss(): string\n {\n return $this->di()->getCodeGenerator()->getCss();\n }", "title": "" }, { "docid": "4437031726612dc240efa67ca3020bd0", "score": "0.64110035", "text": "function css_tag($entry)\n{\n if (is_development()) return '';\n\n $urls = css_urls($entry);\n\n $tags = '';\n foreach ($urls as $url) {\n $tags .= '<link rel=\"stylesheet\" href=\"' . $url . '\">';\n }\n\n return $tags;\n}", "title": "" }, { "docid": "3fe97126d474caa5a138427abb21f66d", "score": "0.6397192", "text": "function includeCss($url) {\n $code = getIncludeCssXhtml($url);\n echo $code;\n}", "title": "" }, { "docid": "7c293d45d7b1a64b869ea4337cf728e3", "score": "0.63347167", "text": "function themeCssUrl($url, $ext='css'){\n return asset('theme/assets/css/' . $url . '.' . $ext);\n }", "title": "" }, { "docid": "b93478d89cc5f6a1853b74c5553edf57", "score": "0.6317672", "text": "public function getCss(): string\n {\n $allCss = '';\n foreach ($this->css as $css) {\n $allCss .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/' . $css . '\" />' . PHP_EOL;\n }\n\n return $allCss;\n }", "title": "" }, { "docid": "74c95e9673cdc9bab84dd79894cd632e", "score": "0.63094634", "text": "public function getStylesheet();", "title": "" }, { "docid": "2c85217f27459efde36fb5d004e5cd25", "score": "0.63092107", "text": "private function set_css() {\n $this->css = BASEPATH.CSSPATH; \n }", "title": "" }, { "docid": "1315e0cf6bab18ed1ef96038043fbdd2", "score": "0.63084596", "text": "private function getPluginCss() {\n $plugincss = '/css/pi.tweets.css';\n if (file_exists($this->theme_root.$plugincss)) {\n return file_get_contents($this->theme_root.$plugincss);\n } else {\n return file_get_contents(dirname(__FILE__).$plugincss);\n }\n }", "title": "" }, { "docid": "c52cce9a79d7abe835cbf3a0e909f530", "score": "0.6304432", "text": "public function getCssPath()\n {\n $config = $this->getConfig();\n return $config['options']['customStyles']['path'];\n }", "title": "" }, { "docid": "0ff0320ab4055bf87d304b40001bb2f8", "score": "0.63038033", "text": "function unique_css()\n {\n return $this->unique_include('css');\n }", "title": "" }, { "docid": "e0069d017e38ad3aa94202986413d9f5", "score": "0.6300654", "text": "function dynamik_get_design_stylesheet_url() {\r\n return apply_filters( 'dynamik_get_design_stylesheet_url', dynamik_get_stylesheet_location( 'url' ) . dynamik_get_design_stylesheet_name() );\r\n}", "title": "" }, { "docid": "e1c32ae2c2e7d15daa47fc352df3e6fb", "score": "0.62580776", "text": "public function get_css()\n\t{\n\t\treturn $this->_css;\n\t}", "title": "" }, { "docid": "d5b153fb19b58bfa657b8734dd5cafc2", "score": "0.6229685", "text": "public function css(): string\n {\n return $this->di()->getCodeGenerator()->getCss();\n }", "title": "" }, { "docid": "c138964a6c3a067063819b9cd40eaf5f", "score": "0.620172", "text": "public function getCssUrl($css_file) {\r\n\t\treturn $this->getBaseAssetsUrl().'css/'.$css_file.'.css';\r\n\t}", "title": "" }, { "docid": "27c8c170945881f6edffda270e08ec4c", "score": "0.6200064", "text": "public function builder_css_url($file = null){\n\t\tif($file === null){\n\t\t\t$file = $this->env_get('preset:build:less_file');\n\t\t\tif(is_array($file)) $file = array_shift($file);\n\t\t\t}\n\n\t\t// abort if not string\n\t\tif(!is_string($file)) return '';\n\n\t\t// convert\n\t\tif(substr($file, -5) == '.less') $file = substr($file, 0, -5).'.css';\n\n\t\t// return url\n\t\treturn $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['SERVER_NAME'].$this->env_get('preset:build:url_prefix').'/'.$this->env_get('preset:build:version').$file.'?'.$this->env_get('preset:build:updatekey');\n\t\t}", "title": "" }, { "docid": "35b07b6a3c175e0cfe579b1ed16f72f4", "score": "0.61995566", "text": "function _get_css_base_url($css_file)\n\t{\n\t\t\n\t\t//need to put the check of the Domain\n\t\t//If css file containg any domain name, I.e if we want to load file from cdn, then we should not chenge the file name and return it as is.\n\t\t\n\t\tif($this->_is_cdn_path($css_file))\n\t\t{\n\t\t\t//yes..it is cdn path...So we will return the path asis.\n\t\t\treturn $css_file;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//since it is not the cdn path...hence we will return the new file name\n\t\t\t\n\t\t\t$md5 = md5_file(css_base_url().$css_file.'.css'); //genrating the md5 of the file so that no need to change the version and automatically new file will be uploaded..\n\t\t\t\n\t\t\treturn css_base_url().$css_file.'.css?v='.$md5;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "95b4b5cf2edb3f1fcfc22dd1860f55a1", "score": "0.6181522", "text": "function ct_get_css_path() {\n\t\n\tif ( !is_admin() ) {\n\t\t$detect = new CT_Mobile_Detect;\n\t\t// Any mobile device excluding tablets.\n\t\tif ( $detect->isMobile() && !$detect->isTablet() ) {\n\t\t\t$path = 'mobile';\n\t\t} else {\n\t\t\t$path = 'combined';\n\t\t}\n\t} else {\n\t\t$path = 'combined';\n\t}\n\n\treturn $path;\n}", "title": "" }, { "docid": "5ba5fb587b4a3fd86dd9427eabe0bc37", "score": "0.6177926", "text": "public static function css($params){\n return file_get_contents(Config::get('basedir').\"/public/css/\".$params);\n }", "title": "" }, { "docid": "b039ded3ccd159b160b7a5c8a47e7112", "score": "0.61672604", "text": "public function getCss()\n\t{\n\t\treturn $this->css;\n\t}", "title": "" }, { "docid": "6f10dab430fa118f772b41d4bacd1f19", "score": "0.6163678", "text": "function include_css()\n\t{\n\t\t$s = '';\n\t\t$this->css = array_unique($this->css);\n\t\tforeach($this->css as $o) $s .= \"<link rel='stylesheet' href='\" . $this->assetsPath . $o . \"'>\\n\";\n\t\treturn $s;\n\t}", "title": "" }, { "docid": "539898e74f428dde15a046501942eff3", "score": "0.6153158", "text": "public function loadCSS(): string\n {\n return file_get_contents($this->templatesDir . DIRECTORY_SEPARATOR . $this->templateName . DIRECTORY_SEPARATOR . 'style.css');\n }", "title": "" }, { "docid": "3b5d9163387e5ff0ec1e58d9c76e77b2", "score": "0.6108706", "text": "function asset_css( $path = null)\n\t{\n\t\t// CodeIgniter instance. We'll store that reference as $CI and use it instead of $this\n\t\t$CI =& get_instance();\n\n\t\tif( is_null($path) )\n // return the asset_url\n return base_url() . $CI->config->item('asset_path') . '/' . $CI->config->item('css_folder');\n\t\telse\n return base_url() . $CI->config->item('asset_path') . '/' . $CI->config->item('css_folder') . $path;\n\t}", "title": "" }, { "docid": "4b5036aea4ed98a48bfad5751c840d0b", "score": "0.6107842", "text": "function loadCssFile($path) {\n echo '<link rel=\"stylesheet\" href=\"' . $this->getUrl($path) . '\">';\n }", "title": "" }, { "docid": "3620fe502b694a3b8ee14b7df756bf99", "score": "0.6099362", "text": "public final function getCSSFile() {\n\t\treturn $this->cssFile;\n\t}", "title": "" }, { "docid": "18d4d69f8d200884c349b0d00e5e5e5c", "score": "0.60980034", "text": "static function includeCSS($url,$have_less=false){\n\t\t$env=App::environment();\n\t\treturn \"<link rel='stylesheet\".(($have_less and $env==\"local\")?\"/less\":\"\").\"' href='\".URL::to($url).($have_less?($env==\"local\"?\".less\":\".min.css\"):\".css\").\"' />\";\n\t}", "title": "" }, { "docid": "c6efb36db87005a1af402eebd4c1a0f1", "score": "0.6089493", "text": "public function getCssVariables();", "title": "" }, { "docid": "cee1892f8f5be9aa7e2b4faa8b481e7a", "score": "0.60695225", "text": "private function getWidgetCssUrl() {\n return 'https://ssl.dotpay.pl/test_payment/widget/payment_widget.css';\n }", "title": "" }, { "docid": "5dc22d01b639bedcdfa29658d4185d4c", "score": "0.6067678", "text": "public function get_url() {\n\n\t\t$url = beans_path_to_url( trailingslashit( $this->cache_dir ) . beans_get( 'filename', $this->compiler ) );\n\n\t\tif ( is_ssl() )\n\t\t\t$url = str_replace('http://', 'https://', $url );\n\n\t\treturn $url;\n\n\t}", "title": "" }, { "docid": "9330df44e0963a680afdb57279452faa", "score": "0.60629696", "text": "function css_link($css_file) {\n\treturn \"<link rel=\\\"stylesheet\\\" href=\\\"\".URL. 'css/'. $css_file.\".css\\\" media=\\\"screen\\\"/>\\n\";\n}", "title": "" }, { "docid": "b520b961b9231516730a31ecadbb757d", "score": "0.6059521", "text": "function get_css_block(){\n\t\treturn \"\\n.\".$this->get_name().\"{background:url(\".$this->url.\") center center no-repeat;}\";\n\t}", "title": "" }, { "docid": "1fef6b83fcde103d1ea3d8d7582a6bf9", "score": "0.6041354", "text": "function mce_css( $mce_css ) {\r\n\t\tif( ! empty( $mce_css ) ) $mce_css .= ',';\r\n\t\t$mce_css .= $this->base_url . 'css/styles.css';\r\n\t\treturn $mce_css;\r\n\t}", "title": "" }, { "docid": "2f8abe7ab27c32eab8a7d65c7be4d741", "score": "0.60391676", "text": "function css(){\n\t\t//Get all files required\n\t\t$files = $this->walker(VENDORS.DS.'css', null, 'css');\n\t\t$files = array_merge($files, $this->walker(APP.DS.'vendors'.DS.'css', null, 'css'));\n\t\t$files = array_merge($files, $this->walker(CSS, null, 'css'));\n\t\t//controller specific\n\t\t$files = array_merge($files, $this->controller_specific('css'));\n\t\t$files = array_unique($files);\n\t\t$files = $this->strip_slash($files);\n\t\t$collection = array();\n\t\tforeach($files as $file){\n\t\t $collection[] = $this->Html->css($file);\n\t\t}\n\t\treturn implode(\"\", $collection);\n }", "title": "" }, { "docid": "e1373ea31354687d84718eb65d236563", "score": "0.60366076", "text": "function captcha_layout_stylesheet_url()\n {\n return LaravelInformation::getBaseUrl() . '/captcha-handler?get=bdc-layout-stylesheet.css';\n }", "title": "" }, { "docid": "302b60c6e25fe77c5c2c4da164d5192d", "score": "0.6023554", "text": "public function getStaticCssFile(){\n return $this->getStaticDir() . 'less/' . self::COMPILED_CSS_BASENAME;\n }", "title": "" }, { "docid": "82f37b7cf07fee98e7f633e418dcfe5c", "score": "0.60149014", "text": "public function getCss(){\n \n $allCss = \"\";\n \n if(sizeof($this->css) > 0){\n foreach($this->css as $css){\n $allCss .= \"\\n <link rel=\\\"stylesheet\\\" href=\\\"\".$css.\"\\\">\";\n }\n }\n \n if(sizeof($this->cssRules) > 0){\n $allCss .= \"\\n <style>\";\n foreach($this->cssRules as $css){\n $allCss .= \"\\n \".$css;\n }\n $allCss .= \"\\n </style>\";\n }\n \n return $allCss;\n }", "title": "" }, { "docid": "65b60745c37f24929dcb5674efc504fd", "score": "0.59958917", "text": "private function _theme_url() {\n\t\t$this->cache['theme_url'] = $this->EE->{$this->addon_name . '_lib'}->define_theme_url($this->addon_name);\n\t\treturn $this->cache['theme_url'];\n\t}", "title": "" }, { "docid": "dac067edaf32220b6e837c431801951a", "score": "0.59909284", "text": "public function getCss()\n {\n return $this->getCssCode('/pgwjs/modal/2.0.0/pgwmodal.min.css');\n }", "title": "" }, { "docid": "341ff9c3024ddbb98d927f63cf14c09b", "score": "0.5987353", "text": "function load_css($css_name) {\n // control if input template name exist in current user's stylepath, else return default\n global $BASEURL, $STYLEPATH, $STYLEURL;\n\n if (@file_exists($STYLEPATH.'/'.$css_name))\n return $STYLEURL.'/'.$css_name;\n return $BASEURL.'/style/xbtit_default/'.$css_name;\n}", "title": "" }, { "docid": "705afb87b8b63477599a2f3251157b4c", "score": "0.5962543", "text": "private function getWidgetCustomCssUrl() {\n $whitelabelService = $this->container->get('e2w_whitelabel_service');\n $whitelabel = $whitelabelService->getCurrentLabel();\n if ($whitelabel) {\n return $whitelabel->getCustomWidgetCssUrl();\n }\n return null;\n }", "title": "" }, { "docid": "5b827067dedc3f1d80c995ffccaf6cc6", "score": "0.59595907", "text": "private function load_css()\n {\n $this->data['css_head'] = '';\n foreach ($this->css as $item) {\n $this->data['css_head'] .= \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"{$item['file']}\\\">\".PHP_EOL;\n }\n }", "title": "" }, { "docid": "b1a371fc32a5ff4f1c68ce03a233fa03", "score": "0.59581894", "text": "protected function getCssFromLink($link)\n {\n return file_get_contents($link);\n }", "title": "" }, { "docid": "1a64765e6d22f70004beb0287ce03c31", "score": "0.59580904", "text": "function _css(string $cssPath) : string\n{\n return '<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/'.$cssPath.'.css\">';\n}", "title": "" }, { "docid": "7158b14ce832921454bf9a7b5c3a2aba", "score": "0.5956912", "text": "static function td_plugin_wpadmin_css() {\n }", "title": "" }, { "docid": "a598217264016bf8d35d7b13b9728abc", "score": "0.59562016", "text": "public function getStyle() {\n\t\treturn Utils::file(\"$this->page/style.css\", \"<style>\", \"</style>\");\n\t}", "title": "" }, { "docid": "659f769451c946940fc821d42351c57e", "score": "0.5952093", "text": "function cssFile($params) {\n // This stops styles inadvertently clashing with the main site.\n if (strpos($_SERVER['REQUEST_URI'], $this->getPluginPath()) === 0) {\n echo '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$this->getThemePath().'/css/style.css\" />';\n }\n }", "title": "" }, { "docid": "ed6b3b7bb49eff227c091368c13913de", "score": "0.59478104", "text": "function dynamik_get_minified_stylesheet_url() {\r\n return apply_filters( 'dynamik_get_minified_stylesheet_url', dynamik_get_stylesheet_location( 'url' ) . dynamik_get_minified_stylesheet_name() );\r\n}", "title": "" }, { "docid": "a32b5476501e75eb737c28dc06d22ff9", "score": "0.5947159", "text": "private function _loadCSS()\n\t{\n\t\tif (!empty($this->_cssCalls))\n\t\t{\n\t\t\t$body = JResponse::getBody();\n\t\t\tforeach ($this->_cssCalls as $position => $cssCalls)\n\t\t\t{\n\t\t\t\tif (!empty($cssCalls))\n\t\t\t\t{\n\t\t\t\t\t// If position is defined we append code (inject) to the desired position\n\t\t\t\t\tif (in_array($position, $this->_htmlPositionsAvailable))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Generate the injected code\n\t\t\t\t\t\t$cssIncludes = implode(\"\\n\\t\", $cssCalls);\n\t\t\t\t\t\t$pattern = $this->_htmlPositions[$position]['pattern'];\n\t\t\t\t\t\t$replacement = str_replace('##CONT##', $cssIncludes, $this->_htmlPositions[$position]['replacement']);\n\t\t\t\t\t\t$body = preg_replace($pattern, $replacement, $body);\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$doc = JFactory::getDocument();\n\t\t\t\t\t\tforeach ($cssCalls as $cssUrl)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$doc->addStyleSheet($cssUrl);\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\tJResponse::setBody($body);\n\t\t\treturn $body;\n\t\t}\n\t}", "title": "" }, { "docid": "5988609ff835e39afe540a634c961fc2", "score": "0.59442407", "text": "private function _getContentCSS( $data ) {\n $ResDIR = THEME_DIR . \"/\" . $data['location'] . \"/resources/\";\n $rVal = 'css-default.html';\n\n if ( $this->settings['_logged_in'] == 'Y' ) {\n $rVal = 'css-' . NoNull($this->settings['PgRoot'], 'main') . '.html';\n if ( file_exists($ResDIR . $rVal) === false ) { $rVal = 'css-default.html'; }\n }\n\n // Return the Required JavaScript File\n return $ResDIR . $rVal;\n }", "title": "" }, { "docid": "b6ee645fc005e1dac41d81cee71c7701", "score": "0.5943673", "text": "function theme_url_shortcode(){\n return get_stylesheet_directory_url();\n}", "title": "" }, { "docid": "b7dcddc716c738649cb5ad1cdde854a6", "score": "0.5926415", "text": "public static function get_css_suffix() {\n\t\tif ( isset( $_GET['debug-css'] ) || ( function_exists( 'rh_is_dev' ) && rh_is_dev() ) ) {\n\t\t\treturn '.css';\n\t\t}\n\t\treturn '.min.css';\n\t}", "title": "" }, { "docid": "c2c2b6b40756783de65b63e35da0c7fe", "score": "0.59246415", "text": "public function loadStylesheet()\n {\n $str = '';\n foreach ($this->stylesheets as $filename => $stylesheet)\n {\n $str .= sprintf(' <link href=\"%s.css%s\" type=\"text/css\" rel=\"stylesheet\" media=\"%s\" >' . \"\\n\",\n $stylesheet['filename'],\n isset($stylesheet['version']) ? '?' . $stylesheet['version'] : '',\n $stylesheet['media']);\n }\n return $str;\n }", "title": "" }, { "docid": "1e151cdba1fa58c12fa04766ea96503b", "score": "0.5923876", "text": "function rdProfilerLoadCss($file = 'rdprofiler')\n{\n $css_file = __DIR__.DIRECTORY_SEPARATOR.$file.'.css';\n if (file_exists($css_file) && is_file($css_file)) {\n // use fopen, fread because it does not consume much memory. ( https://stackoverflow.com/a/2749458/128761 )\n $handle = fopen($css_file, 'r');\n $css_content = fread($handle, filesize($css_file));\n fclose($handle);\n unset($handle);\n\n // remove any new line and multiple spaces. we will put this css file content into js variable.\n $css_content = str_replace([\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\", \" \"], '', $css_content);\n // replace or escape any double quote because it will break js variable (var variable = \"css content here\";)\n $css_content = str_replace('\"', '\\\"', $css_content);\n\n echo ' // '.$file.'.css was loaded into js variable. -------------------'.\"\\n\";\n echo ' var rundizProfilerCss'.' = \"'.$css_content.'\";';\n unset($css_content);\n } else {\n echo ' // '.$file.'.css could not be found. -------------------'.\"\\n\";\n echo ' var rundizProfilerCss = \\'\\';';\n }\n unset($css_file);\n}", "title": "" }, { "docid": "be01457f0394a67f070ef2b4f00db808", "score": "0.59235865", "text": "function ot_load_dynamic_css() {\n if ( is_admin() )\n return;\n\n /* grab a copy of the paths */\n $ot_css_file_paths = get_option( 'ot_css_file_paths', array() );\n if ( is_multisite() ) {\n $ot_css_file_paths = get_blog_option( get_current_blog_id(), 'ot_css_file_paths', $ot_css_file_paths );\n }\n\n if ( ! empty( $ot_css_file_paths ) ) {\n\n $last_css = '';\n\n /* loop through paths */\n foreach( $ot_css_file_paths as $key => $path ) {\n\n if ( '' != $path && file_exists( $path ) ) {\n\n $parts = explode( '/wp-content', $path );\n\n if ( isset( $parts[1] ) ) {\n\n $css = set_url_scheme( WP_CONTENT_URL ) . $parts[1];\n\n if ( $last_css !== $css ) {\n\n /* enqueue filtered file */\n wp_enqueue_style( 'ot-dynamic-' . $key, $css, false, OT_VERSION );\n\n $last_css = $css;\n\n }\n\n }\n\n }\n\n }\n\n }\n\n }", "title": "" }, { "docid": "41a857378ec43911b95261faafef2f8f", "score": "0.59112525", "text": "private static function printStyles(){\n\t\tforeach(self::$store['css'] as $value){\n\t\t\t$css_fields =& $value[1];\n\t\t\trequire_once('css/'.$value[0].'.css');\n\t\t\techo \"\\n\";\n\t\t}\n\t\tEventster::runEvent(self::STAGE_STYLES);\n\t}", "title": "" }, { "docid": "863fe51748a2dfd9d456dfffba2eee36", "score": "0.59072185", "text": "function getCssFromLess() {\n\t\t$code_less = '';\n\t\t\n\t\t// Get LESS content\n\t\tforeach ($this->ressources as $file) {\n\t\t\t$code_less .= file_get_contents($this->path_style . $file);\n\t\t}\n\t\t\n\t\t// Try to replace dynamic base_url\n\t\t$code_less = str_replace( '{theme_url}', $this->url_style, $code_less );\n\t\t\n\t\t// Allow plugin have a default comportement of less\n\t\t$code_less = apply_filters( 'less_before_parse', $code_less );\n\t\t\n\t\t// Get lib\n\t\trequire_once( dirname(__FILE__) . '/lib/lessc.inc.php' );\n\t\t\n\t\t// Build CSS\n\t\t$less = new lessc();\n\t\t$css = $less->parse($code_less);\n\t\t\n\t\t// Fix bug with IE6-IE7\n\t\t$css = str_replace(' / ', '/', $css);\n\t\t\n\t\treturn $this->compress($css);\n\t}", "title": "" }, { "docid": "0d195044ede37589c7be898925663439", "score": "0.5903894", "text": "static function td_plugin_frontend_css() {\n }", "title": "" }, { "docid": "0e863e4dc7d78918957254b74c55d5a8", "score": "0.58971655", "text": "function cssfile($params) {\n if (strpos($_SERVER['REQUEST_URI'], '/projects') === 0) {\n echo ' <link rel=\"stylesheet\" type=\"text/css\" href=\"'.$this->getThemePath().'/css/style.css\" />'.\"\\n\";\n }\n }", "title": "" }, { "docid": "5cebaa45e35a470fd15388ba9dd012dd", "score": "0.58754265", "text": "public function admin_get_frm_style() {\n\t\t\t$css = array();\n\n\t\t\tif( isset($this->cfg['freamwork-css-files'])\n\t\t\t\t&& is_array($this->cfg['freamwork-css-files'])\n\t\t\t\t&& !empty($this->cfg['freamwork-css-files'])\n\t\t\t) {\n\n\t\t\t\tforeach ($this->cfg['freamwork-css-files'] as $key => $value){\n\t\t\t\t\tif( is_file($this->cfg['paths']['freamwork_dir_path'] . $value) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$cssId = $this->alias . '-' . $key;\n\t\t\t\t\t\t$css[\"$cssId\"] = $this->cfg['paths']['freamwork_dir_path'] . $value;\n\t\t\t\t\t\t// wp_enqueue_style( $this->alias . '-' . $key, $this->cfg['paths']['freamwork_dir_url'] . $value );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->errors->add( 'warning', __('Invalid CSS path to file: <strong>' . $this->cfg['paths']['freamwork_dir_path'] . $value . '</strong>. Call in:' . __FILE__ . \":\" . __LINE__ , $this->localizationName) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $css;\n\t\t}", "title": "" }, { "docid": "0729c187b9301ab743e5592c72a33fd2", "score": "0.58735657", "text": "function loadCSS($t) {\n\t\t\t\n\techo '<link href=\"config/css/'.$t.'\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\" />';\n}", "title": "" }, { "docid": "a26c0500a60c8137cc06c27425924d22", "score": "0.5872383", "text": "public function viewsStylesUrl()\n {\n return $this->viewsUrl().\n DirNames::STYLES.\n StrUtils::URL_SEPARATOR;\n }", "title": "" }, { "docid": "0fa7516ca72d9ad6ed3f0e3ca5df014b", "score": "0.58707356", "text": "private function getCSSJSLink( $strFileName ) {\r\n\t\tglobal $wgJSGanttScriptVersion;\r\n\t\t\r\n\t\treturn \"{$this->strSelfURLBase}/{$strFileName}?{$wgJSGanttScriptVersion}\";\r\n\t}", "title": "" }, { "docid": "3175c4bb02d527e67be07e535c9f5a91", "score": "0.586622", "text": "public static function cssScript($params){\n return \"<link rel=\\\"stylesheet\\\" href=\\\"\".Config::get('address').\"/public/css/\".$params.\"\\\" type=\\\"text/css\\\"/>\\n\\t\\t\";\n \n }", "title": "" }, { "docid": "da021d57f4742fedf64fdd1ffff1d958", "score": "0.5865981", "text": "public function appendCssUrl($url) {\n $this->appendToHead(<<<HTML\n <link rel=\"stylesheet\" type=\"text/css\" href=\"{$url}\">\n\nHTML\n) ;\n }", "title": "" }, { "docid": "6b0e7da938b59e6e3ad837abde3f2fba", "score": "0.58641016", "text": "public function get_raw_css() {\n\n\t\tglobal $wpdb;\n\n\t\t$result = Db::getInstance()->executeS(\"SELECT * FROM \" . _DB_PREFIX_ . RevSliderFront::TABLE_CSS, true);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "0907045a83fa556073ae6d57d9b3c78f", "score": "0.5855781", "text": "public static function getCssHash() {\n static $cssHash;\n if (!$cssHash) {\n $content =\n file_get_contents(__DIR__.'/includes/public/assets/js/wf-css.json');\n $data = json_decode($content, true);\n $cssHash = $data['wf-css'];\n }\n\n return $cssHash;\n }", "title": "" }, { "docid": "6c06b4995a342fe37166be40fcd2d195", "score": "0.5854417", "text": "public function getCssDeps()\n /**/\n {\n return $this->files['css'];\n }", "title": "" }, { "docid": "db85eb5832e765d304eaefe0e81d33d0", "score": "0.58467144", "text": "function extract_css() {\n\techo \"\n\t<style type='text/css'>\n\t#extract {\n\t\tposition: absolute;\n\t\ttop: 3.6em;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tright: 10px;\n\t\tfont-size: 10px;\n\t\tcolor: #d5c5c5;\n\t}\n\t</style>\n\t\";\n}", "title": "" }, { "docid": "2a134d50615d4b77380fee206bbda537", "score": "0.58453995", "text": "function laborator_get_custom_css( $ex = '' ) {\n\treturn Kalium_Custom_CSS::get( $ex );\n}", "title": "" }, { "docid": "61677718947eb8a3e82a5656bb417ba3", "score": "0.5842329", "text": "function inserirCss($css)\n{\n return \"<link href='\" . baseUrl(\"bower_components/gentelella/vendors/\" . $css) . \"' rel='stylesheet'> \\n\";\n}", "title": "" }, { "docid": "ae31180c5f0f052aa9e07867879b52c6", "score": "0.58386105", "text": "public static function getExternalCSSContents($html)\n {\n $css = '';\n $links = array();\n preg_match_all('/<(link[^>]*)>/', $html, $links);\n\n if (empty($links) === FALSE) {\n foreach ($links[1] as $link) {\n $cssLink = FALSE;\n $link = strtolower($link);\n if (preg_match('/type=[\\'\"]{1}type\\/css[\\'\"]{1}/', $link) !== 0) {\n $cssLink = TRUE;\n }\n\n if ($cssLink === FALSE\n && preg_match('/rel=[\\'\"]{1}stylesheet[\\'\"]{1}/', $link) !== 0\n ) {\n $cssLink = TRUE;\n }\n\n if ($cssLink === FALSE\n && preg_match('/rev=[\\'\"]{1}stylesheet[\\'\"]{1}/', $link) !== 0\n ) {\n $cssLink = TRUE;\n }\n\n if ($cssLink === TRUE) {\n // Check the CSS link and if the media type is neither of all or screen\n // then dont include it if there is any.\n $match = array();\n $pattern = '/media=\"([^\"]+)\"/';\n preg_match($pattern, $link, $match);\n if (empty($match) === FALSE) {\n if ($match[1] !== 'all' && $match[1] !== 'screen') {\n $cssLink = FALSE;\n }\n }\n }\n\n if ($cssLink === TRUE) {\n $href = array();\n preg_match('/href=[\\'\"]{1}([^\\'\"]+)[\\'\"]{1}/', $link, $href);\n include_once 'Libs/Web/HTTPRequest.inc';\n\n $http = new HTTPRequest($href[1]);\n try {\n $http->sendGetRequest();\n $http->sendRequest();\n } catch (Exception $e) {\n // If this does not work, it doesn't work.\n // We wouldn't log anything at this time.\n }\n\n $response = $http->getData();\n if (strpos($response, '@import url(../?stylesheet=1);') !== FALSE) {\n // This is a style from Design Customisation. We need to include\n // the parent design together.\n $parentDesignCssUrl = preg_replace('/\\/[^\\/]+\\/\\?stylesheet=1$/', '/?stylesheet=1', $href[1]);\n $http = new HTTPRequest($parentDesignCssUrl);\n try {\n $http->sendGetRequest();\n $http->sendRequest();\n } catch (Exception $e) {\n // If this does not work, it doesn't work.\n // We wouldn't log anything at this time.\n }\n\n $designCSS = $http->getData();\n $css .= $designCSS.\"\\n\";\n\n // Remove @import from the parent design CSS.\n $response = str_replace('@import url(../?stylesheet=1);', '', $response);\n }\n\n $css .= $response.\"\\n\";\n }//end if\n }//end foreach\n }//end if\n\n return $css;\n\n }", "title": "" }, { "docid": "0c3a8d438709f4c8c495a9e2ce01f53f", "score": "0.5835105", "text": "function background_change_head_style($string){\n $css = '<link href=\"'.WWW.'plugins/Background_Change/bg_change.css\" type=\"text/css\" rel=\"stylesheet\" />';\n return $string.$css;\n}", "title": "" }, { "docid": "284804249e4f17f854143b473380bf51", "score": "0.58262277", "text": "function dynamik_get_design_stylesheet_path()\r\n{\r\n return apply_filters( 'dynamik_get_design_stylesheet_path', dynamik_get_stylesheet_location( 'path' ) . dynamik_get_design_stylesheet_name() );\r\n}", "title": "" }, { "docid": "1059fe0ef12bd1b7bf4d305584fa3e45", "score": "0.58262193", "text": "private function find_stylesheets() {\n return array(\n array(\n Constants::$PUBLIC_CSS_ID,\n plugins_url(Constants::$PUBLIC_CSS_PATH)\n )\n );\n }", "title": "" }, { "docid": "e7f75a05d40c546052c1e05a8980d757", "score": "0.5824225", "text": "public function css() {\n echo $this->_Css;\n }", "title": "" } ]
e9575fc708a9970c029fbd234779d327
/ Updates the users userid to NULL, sets $this>loggedIn to false regenerates a new session id for the user, and relocates them to the homepage.
[ { "docid": "5eccba2c3b2cb9b394ce1445485ad0d3", "score": "0.0", "text": "public function logout() {\n\t\n\t\tglobal $database;\n\t\n\t\t$logoutTrue = htmlspecialchars(stripslashes(trim($_GET['p'])));\n\t\t$getsID = htmlspecialchars(stripslashes(trim($_GET['sid'])));\n\t\t\n\t\tif ($this->s_id == $getsID && $logoutTrue == 'logout' && $this->loggedIn) {\n\t\t\t\n\t\t\t$database->db_update(\"users\", \"userid = ''\", \"WHERE username = '$this->username'\");\n\t\t\t$this->loggedIn = false;\n\t\t\tsession_regenerate_id(true);\n\t\t\theader('Location: /m');\n\t\t\t\t\t\t\n\t\t} \n\n\t}", "title": "" } ]
[ { "docid": "6abb98e6ebb2737154f74df57171c121", "score": "0.668432", "text": "protected function assignUserId()\n\t{\n\t\tif( isset($_SESSION[\"UserID\"]) && $_SESSION[\"UserID\"] != \"Guest\" )\t\n\t\t\t$this->userID = $_SESSION[\"UserID\"];\n\t}", "title": "" }, { "docid": "d36e7dce9fa467327220a5837434566a", "score": "0.6632695", "text": "public function setUserId($id) {\n \n // Start the session if its not started\n if(!isset($_SESSION)) {\n include 'session.php';\n }\n \n $_SESSION[\"userId\"] = $id;\n }", "title": "" }, { "docid": "b87762759e7ed219d13e5641ea3fb338", "score": "0.64824283", "text": "function cmsSessionUserUpdate($userId=0)\n {\n $this->userId = $userId;\n \\Env::get('db')->Execute('UPDATE `' . DBPREFIX . 'sessions` SET `user_id` = ' . $userId . ' WHERE `sessionid` = \"' . $this->sessionid . '\"');\n return true;\n }", "title": "" }, { "docid": "cb8cf08442f3cfdf226129e1c6d6ec78", "score": "0.6353472", "text": "protected function setLoggedIn(string $userId)\n {\n $this->session->set('logged_in', true);\n $this->session->set('user_id', $userId);\n }", "title": "" }, { "docid": "1f96102cbbcdce25ef4c416499e26695", "score": "0.6318716", "text": "private function refreshUser() {\n $user = User::find($this->currentUser->id);\n $this->currentUser = $user;\n Auth::login($user);\n }", "title": "" }, { "docid": "ed8422eb0efe9f5b9cb33ba615c94ef7", "score": "0.6316285", "text": "private function resetAndSetCoreSession($userId = null) {\n\t$_SESSION = array('user' => array());\n\t$_SESSION['user']['distributor_id'] = $this->distributor->id;\n\t$_SESSION['user']['groups'] = $this->distributor->get_group_ids();\n\t$_SESSION['user']['username'] = (empty($this->distributor->old_username) ? $this->distributor->username : $this->distributor->old_username);\n\t$_SESSION['user']['name'] = $this->distributor->first_name;\n\t$_SESSION['user']['business_center_id'] = $this->distributor->get_business_center_id();\n\t$_SESSION['user']['country_id'] = $this->distributor->get_country_id();\n\t$_SESSION['user']['user_id'] = (is_null($userId) ? $this->distributor->id : $userId);\n }", "title": "" }, { "docid": "255abd781d5846307d340f135fbb1181", "score": "0.6285928", "text": "protected function set_login_user_id($user_id){\n $this->session->set_userdata(SESS_KEY_USER_ID, $user_id);\n }", "title": "" }, { "docid": "0fa1ef0d704936adfe74f25754deacf6", "score": "0.6265809", "text": "function user_login($user_id){\n if(user_is_logged_in()) return;\n $_SESSION['user_id'] = $user_id;\n}", "title": "" }, { "docid": "8fb267f8e72ffb6c7d99b6994c01b339", "score": "0.62474334", "text": "public function userLogin($userId) {\n $this->userId = $userId;\n $_SESSION['user_id'] = $userId;\n }", "title": "" }, { "docid": "3fd74bf51edd266345f746984d6d789c", "score": "0.62129736", "text": "public function removeLoggedInUser()\n {\n $this->loggedInUser = null;\n }", "title": "" }, { "docid": "3d00c96bd9e3cf56f0158feeaa902edf", "score": "0.6177903", "text": "function reload_user() {/*\r\n $this_user = std_query(\"SELECT * FROM `users`\r\n WHERE `userid` = '\".quote_smart($_SESSION['userid']).\"'\r\n LIMIT 1\");\r\n if (!$this_user) {\r\n return false;\r\n }\r\n\r\n $_SESSION = mysql_fetch_assoc($this_user);*/\r\n $_SESSION['logged_in'] = 1;\r\n return true;\r\n}", "title": "" }, { "docid": "6602476ded232530103604821b5214f9", "score": "0.616783", "text": "public function set_user_id() {\n\n\t\t// if the cookie is set\n\n\t\tif ( isset( $_COOKIE[ $this->guest_user_id_cookie_name ] ) ) {\n\n\t\t\t// set the cookie as the user id\n\n\t\t\t$this->user_id = $_COOKIE[ $this->guest_user_id_cookie_name ];\n\n\t\t\t// if the user already has a reservation, we'll leave it there\n\t\t\t// this means if a user sets a reservation, then logs in\n\t\t\t// their reservation will be maintained\n\n\t\t\tif ( $this->has_reservation() ) {\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// if they didn't have a reservation, we'll proceed here\n\n\t\tif ( is_user_logged_in() ) {\n\n\t\t\t$this->user_id = get_current_user_id();\n\n\t\t} else {\n\n\t\t\tif ( isset( $_COOKIE[ $this->guest_user_id_cookie_name ] ) ) {\n\n\t\t\t\t$this->user_id = $_COOKIE[ $this->guest_user_id_cookie_name ];\n\n\t\t\t} else {\n\n\t\t\t\t$this->user_id = uniqid( $this->slug );\n\t\t\t\tsetcookie( $this->guest_user_id_cookie_name, $this->user_id, 0, '/', COOKIE_DOMAIN );\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "3c078378e4b1f1a793ff1c89825557fe", "score": "0.6117442", "text": "function admin_logout() {\n\t\t$_SESSION['user_id'] = 0;\n\t}", "title": "" }, { "docid": "b4bb69ca4baf13f3bdec08038dd53552", "score": "0.61102396", "text": "public function userLogout() {\n $this->userId = null;\n unset($_SESSION['user_id']);\n }", "title": "" }, { "docid": "ac6cab167208bec846737e3838cfe147", "score": "0.60643697", "text": "private function check_the_login(){\n\t\tif(isset($_SESSION['user_id'])){\n\t\t\t$this->user_id = $_SESSION['user_id'];\n\t\t\t$this->signed_in = true;\n\t\t}else{\n\t\t\tunset($this->user_id);\n\t\t\t$this->signed_in = false;\t\n\t\t}\t\n\t}", "title": "" }, { "docid": "541e5e744269aa9b502fa550cdc1d670", "score": "0.60330397", "text": "public function check_logged_in()\n\t{\n\t\tif(isset($_SESSION['user_id']))\n\t\t{\n\t\t\t$this->user_id=$_SESSION['user_id'];\n\t\t\t$this->logged_in=true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tunset($this->user_id);\n\t\t\t$this->logged_in=false;\n\t\t}\n\t}", "title": "" }, { "docid": "be95a5645fe8120170b2be95f9321daf", "score": "0.60288817", "text": "public function RestrictUser(){\nob_start();\n$user_id =0;\n\nif(!isset($_SESSION)){session_start();\n//$user_id =$_SESSION['USER_ID'];\n}\nif($_SESSION['USER_ID']==0){\n $this->pageRedirect(\"signin.php\");\n}else{}\n}", "title": "" }, { "docid": "91b0a15af82ca57326d9271c8f1f8ae0", "score": "0.60213387", "text": "function saveUserId($id)\r\n{\r\n session_start();\r\n $_SESSION[\"USER_ID\"] = $id;\r\n}", "title": "" }, { "docid": "ed7347ae903d5eab0bc24dd4ca33634b", "score": "0.601752", "text": "public function loginUserById($userid)\n {\n $this->initFrontendEuser($this->fetchUserdata($userid));\n\n /**\n * @var $frontend \\TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController\n */\n $frontend = $GLOBALS['TSFE'];\n $frontend->fe_user->createUserSession($this->fetchUserdata($userid));\n $frontend->initUserGroups();\n $frontend->setSysPageWhereClause();\n }", "title": "" }, { "docid": "415d9381f2fd08ec0d1c160cc4734b7d", "score": "0.59920174", "text": "private function reset_and_set_core_session($user_id = null) {\n\t$_SESSION = array('user' => array());\n\t$_SESSION['user']['distributor_id'] = $this->distributor->id;\n\t$_SESSION['user']['groups'] = $this->distributor->get_group_ids();\n\t$_SESSION['user']['username'] = (empty($this->distributor->old_username) ? $this->distributor->username : $this->distributor->old_username);\n\t$_SESSION['user']['name'] = $this->distributor->first_name;\n\t$_SESSION['user']['business_center_id'] = $this->distributor->get_business_center_id();\n\t$_SESSION['user']['country_id'] = $this->distributor->get_country_id();\n\t$_SESSION['user']['user_id'] = (is_null($user_id) ? $this->distributor->id : $user_id);\n }", "title": "" }, { "docid": "479745f421e2841d0c54d8bd2a8bb0c2", "score": "0.59781706", "text": "function saveUserId($id) {\n session_start();\n $_SESSION['USER_ID'] = $id;\n}", "title": "" }, { "docid": "4f91a6e8104e81406804eb4244c15da3", "score": "0.5968292", "text": "private static function setStatusToSession() {\n\t\t\tSession::set('jiaoyu_authed_user_id', self::$user->id);\n\t\t}", "title": "" }, { "docid": "be6a4ba25e834c84188ce011ca0f1fee", "score": "0.594342", "text": "public static function set_lastvisit(int $userid = 0) {\n $userid = !$userid ? self::$userid : $userid;\n if(!self::$sql['default']->rows(\"SELECT `id` FROM `{prefix_users}` WHERE `id` = ? AND (time+1800)>?;\", [(int)($userid),time()])) {\n $_SESSION['lastvisit'] = (int)(self::data(\"time\"));\n }\n }", "title": "" }, { "docid": "2966699cf6c99bab14360818d4e93772", "score": "0.59302914", "text": "function logged_in() {\r\n //checks to see if user is logged in\r\n if ($_SESSION['logged_in'] == 1) {\r\n //reload their session data to keep it up-to-date\r\n reload_user();\r\n return true;\r\n }\r\n else\r\n return false;\r\n}", "title": "" }, { "docid": "9f0e9926ca67e31b1840ee7023d0bc39", "score": "0.5925406", "text": "function updateSession($user,$session_id,$ip=null)\n { \n if ($this->isNotLoaded())\n return null;\n $session=new EmployerUserSession($session_id);\n $session->add(array(\"session\"=>$session_id,\n \"ended_at\"=>date('Y-m-d H:i:s'), \n \"user_id\"=>$this)); \n if ($user->hasLocation())\n $session->setLocation($user->getLocation());\n if ($ip)\n $session->set(\"ip\",$ip);\n $session->save(); \n return $session;\n }", "title": "" }, { "docid": "08c2b96f7c849482a0f95983c2b4ade5", "score": "0.59223795", "text": "function updateuserlogin($id)\n\t{\n\t\t$sql=\"update king_miscusers set `logins`=`logins`+1, lastlogin=NOW() where userid=?\";\n\t\t$this->db->query($sql,array($id));\n\t}", "title": "" }, { "docid": "ddc1316ac6f03df9cf816eafda691054", "score": "0.5914971", "text": "public function setUserid($userid)\n {\n assert('ctype_graph($userid)');\n\n $this->_userid = $userid;\n\n $this->_modified = true;\n }", "title": "" }, { "docid": "3df9e32c39b2560a43159774590611c3", "score": "0.5913197", "text": "public static function unsetUserId()\n\t{\n\t\t(new Container(Session::USER_NAMESPACE))->offsetUnset(Session::USER_KEY_ID);\n\t}", "title": "" }, { "docid": "dad95b5a77065fbf9c8ba24cfc460c58", "score": "0.5912465", "text": "function saveUserId($id)\n{\n session_start();\n $_SESSION[\"USER_ID\"] = $id;\n}", "title": "" }, { "docid": "7e71df0fac7dbd9dd7150b31539b482e", "score": "0.5900975", "text": "function update(){\n\n\n $userid = $this->session->userdata('userid');\n $validate = $this->getuserinfo($userid);\n if($validate->num_rows() > 0){\n $data = $validate->row_array();\n $name = $data['user_name'];\n $userpid = $data['user_pid'];\n $usermid = $data['user_mid'];\n $email = $data['user_email'];\n $level = $data['user_level'];\n $firmaid = $data['users_firmaid'];\n\t $userid = $data['user_id'];\n\t $userlastlogin = $data['user_lastlogin'];\n $sesdata = array(\n 'username' => $name,\n 'userpid' => $userpid,\n 'usermid' => $usermid,\n 'email' => $email,\n 'level' => $level,\n 'firmaid' => $firmaid,\n\t\t 'userid' => $userid,\n\t\t 'lastseen' => $userlastlogin,\n 'logged_in' => TRUE\n );\n $this->session->set_userdata($sesdata);\n }\n }", "title": "" }, { "docid": "65e2c8854028508941bac7ca74dff987", "score": "0.5885292", "text": "public function userLogOut()\n\t{\n\t\t$this->session->sess_destroy(); // Session destroy\n\n\t\t\t\t\t\t\t\t// redirect to login page\n\t\t// $data = array('title' => ' - Home' );\n\t\t// $this->pageLoader('home', $data);\n\t\t$this->defaultPageLoadForUser();\n\t}", "title": "" }, { "docid": "172fb4baf6a661025b879e3c80068d9b", "score": "0.58847815", "text": "public function Index(){\n\t $sess = $this->session->userdata('user_data');\n\t $data_input= array(\n\t\t\t\t\t\t'flag' \t\t\t=> '0',\n\t\t\t\t\t\t'date_login'\t=> date('Y-m-d H:i:s'),\n\t\t\t\t\t);\n\t\t\t\t\t$this->Model_Users->Update_Flag_0($data_input,$sess['username']);\n\t $this->session->unset_userdata('user_data');\n\t $this->session->sess_destroy();\n session_write_close();\n redirect('login','refresh');\n exit;\n }", "title": "" }, { "docid": "4d0136c3ec23205f97956106d7436a5b", "score": "0.58656245", "text": "function logoff() {\n $stmt = self::$_db->prepare(\"UPDATE user SET session='' WHERE session=:sid\");\n $sid = session_id();\n $stmt->bindParam(\":sid\", $sid);\n $stmt->execute();\n }", "title": "" }, { "docid": "2822013b54937c0008a37d7e90d254c6", "score": "0.5864903", "text": "private function setSessionId($id){\n\t\t$_SESSION['userId'] = $id;\n\t}", "title": "" }, { "docid": "c6af803b3c55f12fcbc1901a2f711f6c", "score": "0.586279", "text": "function doLogout()\n{\n unset($_SESSION['user_data']['id']);\n $_SESSION['user_data']['logged_in'] = false;\n}", "title": "" }, { "docid": "7a71173f6f9d0999e71da1c2b7fe4f6f", "score": "0.58581865", "text": "public function setLoggedinState($loggedin){\r\n //this function can be used to set the logged in state to true or false \r\n //when set to false it does not kill the session variables or the session cookie\r\n //it is used for both successful and failed login attempts\r\n //\r\n if($loggedin==TRUE){ \r\n $_SESSION['loggedin'] = TRUE;\r\n $this->loggedin= TRUE; \r\n $this->loginTimestamp=date('d/m/Y h:i:s a', time());\r\n $_SESSION[\"loginTimestamp\"]=$this->loginTimestamp;\r\n \r\n }\r\n else{\r\n $_SESSION['loggedin'] = FALSE;\r\n $this->loggedin=FALSE; \r\n $this->setUserFirstName(NULL);\r\n $this->setUserLastName(NULL);\r\n $this->setUserID(NULL);\r\n $this->setUserType(NULL); \r\n } \r\n }", "title": "" }, { "docid": "fbcb86246ff73a5db90a75969112d805", "score": "0.5854954", "text": "public static function reset($data){\n session_regenerate_id(true);\n $_SESSION = array();\n\n $_SESSION[\"is_logged_in\"] = true;\n $_SESSION[\"user_id\"] = (int)$data[\"user_id\"];\n $_SESSION[\"role\"] = $data[\"role\"];\n\n // save these values in the session,\n // they are needed to avoid session hijacking and fixation\n $_SESSION['ip'] = $data[\"ip\"];\n $_SESSION['user_agent'] = $data[\"user_agent\"];\n $_SESSION['generated_time'] = time();\n\n // update session id in database\n self::updateSessionId($data[\"user_id\"], session_id());\n }", "title": "" }, { "docid": "9d8895b34e8261218570b03cbcbff4af", "score": "0.58505636", "text": "public function set_user_id ($uid)\n {\n $key = $this->CI->config->item('session_uid_key', 'session');\n $_SESSION[$key] = (int) $uid;\n $this->CI->session_model->set_active_session($uid);\n }", "title": "" }, { "docid": "ca2105be308afa29a4691ca9cbae5f42", "score": "0.5824013", "text": "public function set_userid($userid) {\n $this->userid = $userid;\n }", "title": "" }, { "docid": "517fc10790d4e4206e484163ee2a65f2", "score": "0.58124316", "text": "function sess_update()\n {\n\t\t//log_message('error','SESSION UPDATE');\n\t\t\n\t\t//log_message('error', 'USERDATE IN SESS_UPDATE:'.print_r($this->userdata, true));\n\t\t\n // We only update the session every five minutes by default\n if (($this->userdata['last_activity'] + $this->sess_time_to_update) >= $this->now) {\n\t\t\t//log_message('error', 'UPDATE SESSION 5 phut 1 lan, last_activity+5phut = '.($this->userdata['last_activity'] + $this->sess_time_to_update).' thoi gian hien tai = '.$this->now );\n return;\n }\n\t\t\n\t\t//log_message('error','het 5 phut, tao moi session id');\n // Save the old session id so we know which record to\n // update in the database if we need it\n $old_sessid = $this->userdata['session_id'];\n $new_sessid = '';\n while (strlen($new_sessid) < 32) {\n $new_sessid .= mt_rand(0, mt_getrandmax());\n }\n\n // To make the session ID even more secure we'll combine it with the user's IP\n $new_sessid .= $this->CI->input->ip_address();\n\n // Turn it into a hash\n $new_sessid = md5(uniqid($new_sessid, TRUE));\n\n // Update the session data in the session data array\n //$this->userdata['session_id'] = $new_sessid;\n $this->userdata['last_activity'] = $this->now;\n\n // _set_cookie() will handle this for us if we aren't using database sessions\n // by pushing all userdata to the cookie.\n $cookie_data = NULL;\n\n // Update the session ID and last_activity field in the DB if needed\n if ($this->sess_use_database === TRUE) {\n // set cookie explicitly to only have our session data\n $cookie_data = array();\n foreach (array('session_id', 'ip_address', 'user_agent', 'last_activity') as $val) {\n $cookie_data[$val] = $this->userdata[$val];\n }\n\n $this->CI->db->query($this->CI->db->update_string($this->sess_table_name, array('last_activity' => $this->now, 'session_id' => $new_sessid), array('session_id' => $old_sessid)));\n }\n\n // Added by tienhm\n // Update the session in memcached if needed\n if ($this->sess_use_memcached === TRUE) {\n // set cookie explicitly to only have our session data\n $cookie_data = array();\n $memcache_data = $this->CI->cache->memcached->get($old_sessid);\n if(is_null($memcache_data)){\n\t\t\t\tlog_message('error', 'khong get duoc memcache data', false, true);\n $memcache_data_decrypted = array();\n } else {\n\t\t\t\tlog_message('error', 'get duoc memcache data = '.print_r($memcache_data, true), false, true);\n $memcache_data_decrypted = $this->_unserialize($memcache_data);\n }\n foreach (array('session_id', 'ip_address', 'user_agent', 'last_activity') as $val) {\n $cookie_data[$val] = $this->userdata[$val];\n $memcache_data_decrypted[$val] = $this->userdata[$val];\n }\n $cache_data = $this->_serialize($memcache_data_decrypted);\n\t\t\t//log_message(\"error\", 'DELETE OLD SESSION: '.$old_sessid.' AND CREATE NEW SESSION: '.$new_sessid);\n $this->CI->cache->memcached->delete($old_sessid);\n\t\t\t\n\t\t\t\n\t\t\t// [2016-08-14] phongwm add: them cache luu session ID\n\t\t\t$memcache_data_decrypted = $this->_unserialize($cache_data);\n\t\t\tif(isset($memcache_data_decrypted['info_user']['userID']))\n\t\t\t{\n\t\t\t\t$sess_id_cache = $this->CI->cache->memcached->get('USER_SESS_ID'.$memcache_data_decrypted['info_user']['userID']);\n\t\t\t\tif($sess_id_cache == false || empty($sess_id_cache))\n\t\t\t\t{\n\t\t\t\t\t$this->CI->cache->memcached->save('USER_SESS_ID'.$memcache_data_decrypted['info_user']['userID'], $this->userdata['session_id'], MEMCACHE_TTL);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$arr_sess_id_cache = explode(\",\", $sess_id_cache);\n\t\t\t\t\tif(!in_array($this->userdata['session_id'], $arr_sess_id_cache))\n\t\t\t\t\t\t$this->CI->cache->memcached->save('USER_SESS_ID'.$memcache_data_decrypted['info_user']['userID'], $sess_id_cache.','.$this->userdata['session_id'], MEMCACHE_TTL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// [2016-08-14] phongwm add: them cache luu session ID\n\t\t\t\n\t\t\t\n $this->CI->cache->memcached->save($new_sessid, $cache_data, MEMCACHE_TTL);\n } else {\n\t\t\t$cookie_data = array();\n $redis_data = $this->redis->get($old_sessid);\n\t\t\t$this->redis->expire($old_sessid, USER_INFO_REDIS_TTL);\n\t\t\t//log_message('error', 'old sessid: ' . $old_sessid);\n\t\t\t//log_message('error', 'old sessid data: ' . print_r($redis_data, true), false, true);\n if(is_null($redis_data)){\n\t\t\t\t//log_message('error', 'khong get duoc redis data');\n $redis_data_decrypted = array();\n } else {\n\t\t\t\t//log_message('error', 'get duoc redis data = '.print_r($redis_data, true));\n $redis_data_decrypted = $this->_unserialize($redis_data);\n }\n foreach (array('session_id', 'ip_address', 'user_agent', 'last_activity') as $val) {\n $cookie_data[$val] = $this->userdata[$val];\n $redis_data_decrypted[$val] = $this->userdata[$val];\n }\n\t\t\t\n $cache_data = $this->_serialize($redis_data_decrypted);\n\t\t\t//log_message(\"error\", 'DELETE OLD SESSION: '.$old_sessid.' AND CREATE NEW SESSION: '.$new_sessid . \" data: \" .$cache_data, false, true);\n //$this->redis->del($old_sessid);\n\t\t\t\n\t\t\t// [2016-08-14] phongwm add: data user luu redis\n\t\t\t//log_message('error', 'sess_update | update new session' . print_r($cache_data, true), false, true);\n\t\t\t//$this->redis->set($new_sessid, $cache_data);\n\t\t\t//$this->redis->expire($new_sessid, USER_INFO_REDIS_TTL);\n\t\t\t\n\t\t\t// [2016-08-14] phongwm add: them redis luu session ID\n\t\t\t//log_message('error', 'DATA AFTER DELETE SESSION | ' . print_r($cache_data, true), false, true);\n\t\t\t$redis_data_decrypted = $this->_unserialize($cache_data);\n\t\t\tif(isset($redis_data_decrypted['info_user']['userID']))\n\t\t\t{\n\t\t\t\t$sess_id_cache = $this->redis->get('USER_SESS_ID'.$redis_data_decrypted['info_user']['userID']);\n\t\t\t\tif($sess_id_cache == false || empty($sess_id_cache))\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$this->redis->set('USER_SESS_ID'.$redis_data_decrypted['info_user']['userID'], $this->userdata['session_id']);\n\t\t\t\t\t$this->redis->expire('USER_SESS_ID'.$redis_data_decrypted['info_user']['userID'], MEMCACHE_TTL);\n\t\t\t\t\t//$this->redis->exec();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$arr_sess_id_cache = explode(\",\", $sess_id_cache);\n\t\t\t\t\tif(!in_array($this->userdata['session_id'], $arr_sess_id_cache))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->redis->set('USER_SESS_ID'.$redis_data_decrypted['info_user']['userID'], $sess_id_cache.','.$this->userdata['session_id']);\n\t\t\t\t\t\t$this->redis->expire('USER_SESS_ID'.$redis_data_decrypted['info_user']['userID'], MEMCACHE_TTL);\n\t\t\t\t\t\t//$this->redis->exec();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n \n\t\t}\n\t\t\n\t\t//log_message('error', 'new session_id = '.$new_sessid.' new data = '.print_r($cache_data, true));\n // Write the cookie\n $this->_set_cookie($cookie_data);\n }", "title": "" }, { "docid": "ad2abc7c27abcfdf0b4211564690fcb1", "score": "0.57996917", "text": "function setId($id) {\r\n\t\t$this->userid=$id;\r\n\t}", "title": "" }, { "docid": "0694ddd9eab6539a2b561bad510fe9d3", "score": "0.5791475", "text": "public function userSessions()\n {\n // Kill session after 30min of inactivity\n if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] >= 1800)) {\n $this->killSessions();\n }\n\n $_SESSION['LAST_ACTIVITY'] = time();\n\n // Change session ID every 30min\n if (!isset($_SESSION['LAST_ID_CHANGE'])) {\n $_SESSION['LAST_ID_CHANGE'] = time();\n } else if (time() - $_SESSION['LAST_ID_CHANGE'] >= 1800) {\n session_regenerate_id(true);\n $_SESSION['LAST_ID_CHANGE'] = time();\n }\n }", "title": "" }, { "docid": "21bd7be8ee0724e16a1056444dc7603c", "score": "0.5779098", "text": "public function currentUser($id=null)\n\t{\n\t\tif($id!==null)$_SESSION['users']['id'] = $id;\n\n\t\treturn isset($_SESSION['users']['id'])?$_SESSION['users']['id']:0;\n\t}", "title": "" }, { "docid": "975f78e80e56567811056fe6a77070c3", "score": "0.5776901", "text": "public function logOutAction()\r\n\t{\r\n\t\tunset($_SESSION['userID']);\r\n\t\tunset($_SESSION['userName']);\r\n\t\t\\App\\Models\\ModelUser::$userID = FALSE;\r\n\t\t\\App\\Models\\ModelUser::$userName = FALSE;\r\n\t\theader(\"location: /\");\r\n\t}", "title": "" }, { "docid": "ba9185d43ddb57009a62b7a9de40414e", "score": "0.57766545", "text": "public function Flush()\n {\n $_SESSION['userid'] = false;\n $this->DeleteCookie();\n\n }", "title": "" }, { "docid": "8da41b1a74622b7bac81aedf857b98e4", "score": "0.57647204", "text": "function editOld($userId = NULL)\n {\n /*\n\t\tif($this->isAdmin() == TRUE || $userId == 1)\n {\n $this->loadThis();\n }\n\t\t*/\n //else\n //{\n if($userId == null)\n {\n redirect('User/userListing');\n }\n \n $data['roles'] = $this->user_model->getUserRoles();\n $data['userInfo'] = $this->user_model->getUserInfo($userId);\n\t\n \n $this->global['pageTitle'] = 'Edit User';\n \n $this->loadViews(\"editOld\", $this->global, $data, NULL);\n }", "title": "" }, { "docid": "0b7a2f252daa38f7bc82767acc32e789", "score": "0.5758593", "text": "public function logout()\n\t{\n\t\t\n\t\t// Clear the session variable\n\t\t// This session variable is the indicator that the user is logged in\n\t\t$this->session->userID = null;\n\t\t\n\t\t// Redirect to the home page\n\t\theader(\"Location: /\");\n\t\t\n\t}", "title": "" }, { "docid": "3f8ce88f638bfd24105a02dc6d8c945a", "score": "0.5754394", "text": "public function setCurrentUser($user){\n $_SESSION['user'] = $user;\n }", "title": "" }, { "docid": "0e0f008443cbca8d47e079cbab52f209", "score": "0.575072", "text": "public function setLoggedInUser( $user )\n {\n $this->logged_in_user = $user;\n }", "title": "" }, { "docid": "72b47a65c4a591a4b4cbb26ce7acf506", "score": "0.5724819", "text": "public function loggedIn()\n {\n $query = 'UPDATE biz_webuser SET lastLogin=NOW() WHERE id=?';\n $project = wcmProject::getInstance();\n $connector = $project->datalayer->getConnectorByReference(\"biz\");\n $db = $connector->getBusinessDatabase();\n $db->executeStatement($query, array($this->id)); \n }", "title": "" }, { "docid": "3c9581770e0a4dea9efc8bf76ab1d2cc", "score": "0.5708634", "text": "public function logOutUser() {\n if (self::$logged_in) {\n self::$logged_in = FALSE;\n CMS::call('LOG')->logPut('Note', self::$user['user'], 'Logged out');\n $_SESSION['user'] = '';\n $_SESSION['pass'] = '';\n setcookie(self::$cookie_user, '', time() - 3600);\n setcookie(self::$cookie_nick, '', time() - 3600);\n self::$user = [\n 'user' => 'guest',\n 'nick' => __('Guest'),\n 'status' => 'Passer-by',\n 'rights' => '',\n 'tz' => CONFIG::getValue('main', 'tz'),\n 'access' => 0\n ];\n }\n }", "title": "" }, { "docid": "e8e988543c4f0a1e1206dc66e90d3aa7", "score": "0.57025707", "text": "public function refresh(){return;\n\tif($this->properUser()){\n\t $usersModel = $this->db()->getModel(\"users\");\n\t $data = $usersModel->getById($_SESSION[$this->_name]['id']);\n\t if($data){\n\t\t$_SESSION[$this->_name]['id'] = $data->get(\"id\");\n $user_data = array(\n \"login\" => $data->get(\"login\"),\n );\n\t\t$_SESSION[$this->_name]['data'] = $user_data;\n\t\treturn true;\n\t }\n\t else{\n\t\t$this->logout();\n\t }\n\t}\n\telse{\n\t $this->logout();\n\t}\n\treturn false;\n }", "title": "" }, { "docid": "d5ba3872669c8578f056d0858adb0067", "score": "0.569452", "text": "private function _validateUser()\n {\n if (!isset($_SESSION[$this->sessionName][\"userId\"])) {\n return;\n }\n\n if (!$this->_validateUserId()) {\n return;\n }\n\n $this->logged_in = true;\n }", "title": "" }, { "docid": "2f36c286a8095d5741b6fd3eea5f676b", "score": "0.56898826", "text": "public function setCurrentUser($user)\n {\n $_SESSION['user'] = $user;\n $this->currentUser = $_SESSION['user'];\n }", "title": "" }, { "docid": "9296a087a0ec06db1f9444e6b04c1547", "score": "0.56848437", "text": "protected function setUserId(): void\n {\n $this->userId = $this->me()->id;\n }", "title": "" }, { "docid": "0897dfa9b6ce195356caf04dec53aa72", "score": "0.56781435", "text": "protected function setLoggedInUser(User $user) {\n if(!isset($_SESSION)) {\n session_start(); \n } \n $_SESSION['user'] = $user;\n }", "title": "" }, { "docid": "7a184585b314bf0edc928fff4ed8cf47", "score": "0.56774807", "text": "function sess_update()\n {\n // We only update the session every five minutes by default\n if (($this->userdata['last_activity'] + $this->sess_time_to_update) >= $this->now)\n {\n return;\n }\n\n // Save the old session id so we know which record to\n // update in the database if we need it\n $old_sessid = $this->userdata['session_id'];\n $new_sessid = '';\n while (strlen($new_sessid) < 24)\n {\n $new_sessid .= mt_rand(0, mt_getrandmax());\n }\n\n // To make the session ID even more secure we'll combine it with the user's IP\n $new_sessid .= $this->CI->input->ip_address();\n\n // Turn it into a hash\n $new_sessid = substr(md5(uniqid($new_sessid, TRUE)), 0, 24);\n\n // Update the session data in the session data array\n $this->userdata['session_id'] = $new_sessid;\n $this->userdata['last_activity'] = $this->now;\n\n // _set_cookie() will handle this for us if we aren't using database sessions\n // by pushing all userdata to the cookie.\n $cookie_data = NULL;\n\n // Update the session ID and last_activity field in the DB if needed\n if ($this->sess_use_mongo_database === TRUE)\n {\n // set cookie explicitly to only have our session data\n $cookie_data = array();\n foreach (array('session_id', 'ip_address', 'user_agent', 'last_activity') as $val)\n {\n $cookie_data[$val] = $this->userdata[$val];\n }\n\n $current = $this->CI->mongo_db->where( array('_id' => new MongoId($old_sessid)) )->getOne($this->sess_collection_name);\n $current['_id'] = new MongoId($new_sessid);\n \n\t\t\t$this->CI->mongo_db->where(array('_id' => new MongoId($old_sessid)))->delete($this->sess_collection_name);\n\t\t\t\t\t\n $this->CI->mongo_db->insert($this->sess_collection_name, $current);\n }\n\n // Write the cookie\n $this->_set_cookie($cookie_data);\n }", "title": "" }, { "docid": "8b40295d0a48a23797321b1e95998b86", "score": "0.56704265", "text": "public static function auth($userId)\n {\n $_SESSION['user'] = $userId;\n }", "title": "" }, { "docid": "32783f1c39d295c36c6908fabd78bea6", "score": "0.5665803", "text": "public function setIdUser($idUser)\r\n {\r\n $this->idUser = $idUser;\r\n }", "title": "" }, { "docid": "8a39a2964fdd0100b07904ea40ee21b3", "score": "0.5644785", "text": "private function setUser()\n {\n $userId = Helper::getUserIdFromSession();\n\n if ($userId !== false) {\n $user = new UserModel;\n $this->user = $user->findById($userId);\n }\n }", "title": "" }, { "docid": "c556f18fb891bc5ca7d6b2ba57d80c24", "score": "0.56333065", "text": "public function updateUserLastActivity(){\n session_start();\n if(isset($_SESSION[\"userid\"])){\n $id = $_SESSION[\"userid\"];\n $email = $_SESSION[\"email\"];\n $property = \"lastactivity\";\n $value = time();\n $this->editUser($id,$email,$property,$value);\n return TRUE;\n }\nreturn FALSE;\n}", "title": "" }, { "docid": "4b3c2661815cc752713a8bafe601fa83", "score": "0.5631312", "text": "protected function setLoggedIn($user) {\r\n\t\t$this->session->set('user', $user);\r\n\t}", "title": "" }, { "docid": "217696fe1e13b897a2744643559721ee", "score": "0.562814", "text": "function startSession($userid){\n session_start();\n //echo \"Session started for userid: $userid\";\n //assign this userid to the session variable\n $_SESSION['userid'] = $userid;\n header(\"Location: http://localhost:8888/cs135_MAMP/CS135_Project_MAMP/homePage.php\");\n exit();\n}", "title": "" }, { "docid": "22d6d0ab6fba735d2becd2fc5b34e47c", "score": "0.5627515", "text": "protected function saveUserId($userId){\n\t\t$_SESSION[$this->config->sessionVarName] = $userId;\n\t}", "title": "" }, { "docid": "acb2e816ae3d8d41857302ac07ffd9c2", "score": "0.5627198", "text": "public function logOutUser() {\n $_SESSION['admin']['auth'] = null;\n unset($_SESSION['admin']['auth']);\n $_SESSION['admin']['cauth'] = null;\n unset($_SESSION['admin']['cauth']);\n $_SESSION['admin']['superadmin'] = null;\n unset($_SESSION['admin']['superadmin']);\n $_SESSION['admin']['userlevel'] = null;\n unset($_SESSION['admin']['userlevel']);\n $_SESSION['admin']['modules'] = null;\n unset($_SESSION['admin']['modules']);\n $_SESSION['admin']['pages'] = null;\n unset($_SESSION['admin']['pages']);\n\n $this->user->token = null;\n $this->user->token_expires = null;\n\n return $this->user->save();\n }", "title": "" }, { "docid": "688ba3ae62bf2a689d55c4a54f74f89f", "score": "0.56249887", "text": "function log_in_user($user) {\n session_regenerate_id();\n $_SESSION['user_id'] = $user['id'];\n $_SESSION['last_login'] = time();\n $_SESSION['username'] = $user['email'];\n return true;\n}", "title": "" }, { "docid": "642c3e4899595a258bb62725e3a13217", "score": "0.5620116", "text": "public function logout()\n\t{\n\t\tunset($_SESSION['user_id']);\n\t\tunset($this->user_id);\n\t\t$this->logged_in=false;\n\t}", "title": "" }, { "docid": "9cf4ca9fca3a01d596dd29e56abef499", "score": "0.561829", "text": "function login($id,$username) {\r\n //simple redirect if a user tries to access a page they have not logged in to\r\n if ($_SESSION['loggedin'] == 0 and !empty($_SESSION['URI'])) \r\n $uri = $_SESSION['URI']; \r\n else { \r\n $_SESSION['URI'] = 'http://ongaongabandb.epizy.com/login.php'; \r\n $uri = $_SESSION['URI']; \r\n } \r\n\r\n $_SESSION['loggedin'] = 1; \r\n $_SESSION['userid'] = $id; \r\n $_SESSION['username'] = $username; \r\n $_SESSION['URI'] = ''; \r\n header('Location: '.$uri, true, 303); \r\n}", "title": "" }, { "docid": "fe5df385d31aeb967355bc2db8475bd0", "score": "0.56178564", "text": "public function logoff() {\n\t\t\t$this->session->unset_userdata(\"info\");\n\t\t\tredirect(\"UsersDashboard/index\");\n\t\t}", "title": "" }, { "docid": "7d5aa09a125c5bb5612c3b86f30fde2b", "score": "0.56032884", "text": "protected function setUser() {\n session_name(COOKIE_PREFIX . 'sid');\n session_set_cookie_params(0, Util::getRequestPath());\n session_start();\n \n // existing session\n if (isset($_SESSION['userObject'])) {\n $user = unserialize($_SESSION['userObject']);\n if ($user->checkCookieHash()) {\n self::$user = $user;\n return;\n }\n }\n \n // no session but cookie\n elseif (!is_null($userId = Util::getCookie('userId'))) {\n $userData = self::$db->sendQuery(\n 'SELECT userId, userName, email, cookieHash, language\n FROM cc_user\n WHERE userId = ' . intval($userId)\n )->fetch_assoc();\n \n if (!empty($userData)) {\n $user = new User($userData);\n if ($user->checkCookieHash()) {\n self::$user = $user;\n $_SESSION['userObject'] = serialize(self::$user);\n return;\n } else {\n sleep(INVALID_LOGIN_WAIT);\n }\n }\n }\n \n // guest\n self::$user = new User();\n $_SESSION['userObject'] = serialize(self::$user);\n }", "title": "" }, { "docid": "d5f1f2fd06f050b3f354f74713ceadc7", "score": "0.56025726", "text": "function advanced_security_modcp_session_destroyer($userid)\n{\n global $mybb, $db;\n $userid = intval($userid);\n $cutoff = TIME_NOW - 3600;\n $db->query(\"UPDATE \" . TABLE_PREFIX . \"modcp_sessions SET loginkey='' WHERE uid=$userid AND lastmodaction >=$cutoff\");\n}", "title": "" }, { "docid": "1478796b57c198f8cd9070b541da83b4", "score": "0.5599091", "text": "function editOld($userId = NULL)\n {\n if($this->isAdmin() == TRUE || $userId == 1)\n {\n $this->loadThis();\n }\n else\n {\n if($userId == null)\n {\n redirect('userListing');\n }\n\n $data['roles'] = $this->user_model->getUserRoles();\n $data['userInfo'] = $this->user_model->getUserInfo($userId);\n\n $this->global['pageTitle'] = 'Edit User';\n\n $this->loadViews(\"editOld\", $this->global, $data, NULL);\n }\n }", "title": "" }, { "docid": "f9105c86b193081ec3a61791ef8324ed", "score": "0.5597977", "text": "function editOld($userId = NULL)\n {\n if($this->isAdmin() == TRUE || $userId == 1)\n {\n $this->loadThis();\n }\n else\n {\n if($userId == null)\n {\n redirect('userListing');\n }\n \n $data['roles'] = $this->user_model->getUserRoles();\n $data['userInfo'] = $this->user_model->getUserInfo($userId);\n \n $this->global['pageTitle'] = 'CodeInsect : Edit User';\n \n $this->loadViews(\"editOld\", $this->global, $data, NULL);\n }\n }", "title": "" }, { "docid": "47d618bf4827cf4882625fa3038d781f", "score": "0.55976087", "text": "function set_current_user( $user_id )\r\n\t{\r\n\t\t$user = $this->users->get_user( $user_id );\r\n\t\tif ( !$user || is_wp_error( $user ) ) {\r\n\t\t\t$this->current = 0;\r\n\t\t\treturn $this->current;\r\n\t\t}\r\n\r\n\t\t$user_id = $user->ID;\r\n\r\n\t\tif ( isset( $this->current->ID ) && $user_id == $this->current->ID ) {\r\n\t\t\treturn $this->current;\r\n\t\t}\r\n\r\n\t\tif ( class_exists( 'BP_User' ) ) {\r\n\t\t\t$this->current = new BP_User( $user_id );\r\n\t\t} else {\r\n\t\t\t$this->current =& $user;\r\n\t\t}\r\n\r\n\t\t// WP add_action( 'set_current_user', 'setup_userdata', 1 );\r\n\r\n\t\tdo_action( 'set_current_user', $user_id );\r\n\r\n\t\treturn $this->current;\r\n\t}", "title": "" }, { "docid": "3b33457cb802bf1a01dbc3b9ec7faa62", "score": "0.5594662", "text": "private function _resetSessionData(){\n\t\t//We are changing the privilege level, so first we generate a new session id\n\t\tif(!headers_sent())\n\t\t\tsession_regenerate_id();\n\t\t$_SESSION['logged'] = false;\n\t\t$_SESSION['uid'] = 0;\n\t\t$_SESSION['user-agent-hash'] = '';\n\t\t$_SESSION['user-addr'] = 0;\n\t\t$_SESSION['user-data'] = null;\n\t\t$_SESSION['user-languages'] = null;\n\t}", "title": "" }, { "docid": "11ba5b823589a53adada25d8918a19ff", "score": "0.5590344", "text": "public function update($idUser){\n UserController::roleNeed('administrateur');\n $UserSQL = new User();\n $UserSQL->SqlUpdateRole(BDD::GetInstance(),$idUser);\n header('Location:/Admin');\n }", "title": "" }, { "docid": "bbd225d8349104ef15f9885aa178388b", "score": "0.5588678", "text": "public function sair(){\n\t\t$array_unset = array(\n\t\t\t'login', \n \t'senha',\n \t'id_usuario'\n\t\t);\n\t\t$this->session->unset_userdata($array_unset);\n\n\t\theader('location:'.base_url('login'));\n\t}", "title": "" }, { "docid": "4a5c6165fce6ddef1eb2642ca4ef7d79", "score": "0.55788755", "text": "function setUserid($uid)\n {\n $this->userid = $uid;\n }", "title": "" }, { "docid": "418cbdc933883fa06681ceb8fd56c832", "score": "0.55783784", "text": "function setUserId($a_iUserId)\n {\n if (!is_null($this->_iUserId) && $this->_iUserId !== (int) $a_iUserId) {\n $this->_markModified();\n }\n $this->_iUserId = (int) $a_iUserId;\n }", "title": "" }, { "docid": "1f5d0900cb45669b82162c1b1618b7fe", "score": "0.55771947", "text": "public function actionLogInAsUser($id) {\n if (isset($_GET['redirectUrl']))\n $redirectUrl = $_GET['redirectUrl'];\n\n // Admin session roll back - do not do this for Netflix acceptance user\n if (!ClientDetectorComponent::getInstance()->isNetflix() && User::model()->findByPk(Yii::app()->user->id)->role_id != Role::ACCEPTANCE) {\n if (ChangeSessionComponent::instance()->isAdminSession())\n ChangeSessionComponent::instance()->rollBack();\n }\n\n //log in as certain user\n\n $user = User::model()->findByPk($id);\n $admin = User::model()->findByPk(Yii::app()->user->id);\n\n // Add to log\n Yii::app()->accessLogAPI->logAction(\"Admin \".$admin->first_name.\" \".$admin->last_name.\", \".$admin->id.\" logged in as user \".$user->first_name.\" \".$user->last_name.\", \".$user->id.\" at \".date(\"H:i:s\").\", \".date(\"Y-m-d\"));\n\n Yii::app()->getSession()->regenerateID();\n Yii::app()->user->setId($user->id);\n Yii::app()->user->setName($user->email);\n Yii::app()->user->setState(User::ADMIN_USER_SESSION, true);\n Yii::app()->user->setState(User::ADMIN_USER_SESSION_ID, $admin->id);\n Yii::app()->user->setState(User::ADMIN_USER_SESSION_EMAIL, $admin->email);\n Yii::app()->user->saveToPersistentStates(array(\n User::ADMIN_USER_SESSION => true, \n User::ADMIN_USER_SESSION_ID => $admin->id, \n User::ADMIN_USER_SESSION_EMAIL => $admin->email\n ));\n\n\n if (isset($_GET['backUrl'])){\n Yii::app()->user->setState(User::ADMIN_USER_SESSION_URL, $_GET['backUrl']);\n Yii::app()->user->saveToPersistentStates(array(\n User::ADMIN_USER_SESSION_URL => $_GET['backUrl'], \n ));\n }\n\n if (!is_null($user->getAdminRole())) {\n $new_project_notes_notice = $user->getNewProjectNotesCount() > 0 ? true : false;\n Yii::app()->user->setState(User::SHOW_NEW_PROJECT_NOTES_NOTICE, $new_project_notes_notice);\n }\n\n // redirect by user role\n if (isset($redirectUrl)) {\n $this->redirect($redirectUrl);\n } elseif (\n (\n Yii::app()->authManager->isAssigned('client', Yii::app()->user->getId()) ||\n Yii::app()->authManager->isAssigned('admin', Yii::app()->user->getId()) ||\n Yii::app()->authManager->isAssigned('super_admin', Yii::app()->user->getId()) ||\n Yii::app()->authManager->isAssigned('operations_admin', Yii::app()->user->getId()) ||\n Yii::app()->authManager->isAssigned('limited_admin', Yii::app()->user->getId())\n ) && !ClientDetectorComponent::getInstance()->isNetflix()\n ) {\n $this->redirect(array(Yii::app()->params['admin_url']));\n } elseif (Yii::app()->authManager->isAssigned('finance_admin', Yii::app()->user->getId())) {\n $this->redirect(array(Yii::app()->params['finance_admin_url']));\n } elseif (Yii::app()->authManager->isAssigned('moderator', Yii::app()->user->getId())) {\n $this->redirect(array(Yii::app()->params['moderator_url']));\n } elseif (Yii::app()->authManager->isAssigned('paramount', Yii::app()->user->getId())) {\n $this->redirect(array(Yii::app()->params['paramount_url']));\n } elseif (Yii::app()->authManager->isAssigned('paramount_user', Yii::app()->user->getId())) {\n $this->redirect(array(Yii::app()->params['paramount_url']));\n } elseif (Yii::app()->authManager->isAssigned('editor', Yii::app()->user->getId())) {\n $this->redirect(array('admin/projects'));\n } else {\n $user = User::model()->findByPk(Yii::app()->user->id);\n\n $status = ($user->status == User::STATUS_CLOSED &&\n $user->closedUser instanceof ClosedUser) ?\n $user->closedUser->prev_status : $user->status;\n\n switch ($status) {\n case User::STATUS_NEW: {\n $this->redirect(array('/profile/view'));\n break;\n }\n case User::STATUS_ACTIVATED: {\n // Assigning tests if haven't\n if (empty($user->tests) || count($user->tests) < UserQuestion::NTest())\n UserQuestion::model()->generate($user->id);\n\n // Redirect to profile view if user does not have mother language specified\n if (empty($user->mother_language_id)) {\n Yii::app()->user->setDashboardBtnUrl('/qualification/test/dashboard');\n $this->redirect(array('/profile/view'));\n }\n // If user have not 2 penalties\n elseif ($user->isAllowedTakeTests()) {\n Yii::app()->user->setDashboardBtnUrl('/qualification/test/dashboard');\n $this->redirect(array('/qualification/test/dashboard'));\n } else {\n Yii::app()->user->setDashboardBtnUrl('/register/failed');\n $this->redirect(array('/register/failed'));\n }\n break;\n }\n case User::STATUS_APPROVED: {\n // If this type of notification is enabled, and if the\n // user's fee is bigger than 0 percent\n if (Option::getByName('payment_method_paypal_fee_users_notification') && \n Option::getByName('payment_method_paypal_fee_users') > 0\n ) {\n // If user has payment method set\n if ($user->paymentMethod) {\n // If it is paypal\n if ($user->paymentMethod->payment_method === UserPaymentMethod::PAYMENT_METHOD_PAY_PAL) {\n Yii::app()->user->setState(User::SHOW_PAYPAL_FEE_PERCENTAGE_NOTICE, Option::getByName('payment_method_paypal_fee_users_notification'));\n }\n }\n }\n Yii::app()->user->setState(User::SHOW_NEW_MESSAGES_NOTICE, !empty($user->newMessages));\n Yii::app()->user->setState(User::SHOW_SECRET_ANSWER_NOTICE, !$user->is_test_user && ((empty($user->admin_role) && empty($user->secrect_answer)) || $user->isNeedToChangePass(true)));\n Yii::app()->user->setDashboardBtnUrl('/qualification/user/dashboard');\n $this->redirect(array('/qualification/user/dashboard'));\n break;\n }\n case User::STATUS_VERIFIED: {\n Yii::app()->user->setState(User::SHOW_SECRET_ANSWER_NOTICE, !$user->is_test_user && ((empty($user->admin_role) && empty($user->secrect_answer)) || $user->isNeedToChangePass(true)));\n Yii::app()->user->setDashboardBtnUrl('/register/contract');\n $this->redirect(array('/register/contract'));\n break;\n }\n case User::STATUS_WAITLISTED: {\n $this->redirect($user->getActivationUrl(Yii::app()->params['activationUrl']));\n break;\n }\n default: {\n $this->redirect(array('/site/index'));\n break;\n }\n }\n }\n }", "title": "" }, { "docid": "f721a58b9477466fc47274cdb4c9df91", "score": "0.55721855", "text": "public function setId_user($id_user)\n\t\t{\t\t\n\t\t$this->id_user=$id_user;\t\n\t\t}", "title": "" }, { "docid": "5183d0193ca1ac46b74388a01ad8f479", "score": "0.5569085", "text": "function masquerade_as_user_id($user_id = -1)\n{\n // Only admins can masquerade\n if (!is_admin()) { return; }\n\n $original_user = $_SESSION[\"username\"];\n\n if (!is_valid_user_id($user_id)) {\n return;\n }\n\n $username = get_user_attr($user_id, \"username\");\n\n // Destroy current user session\n deinit_session();\n init_session();\n\n // Set up new user session\n $_SESSION[\"user_id\"] = $user_id;\n $_SESSION[\"username\"] = $username;\n\n // Load user session variables (e.g. preferences)\n get_user_meta_session_vars(true);\n\n send_to_audit_log(\"Masqueraded as user '\" . $username . \"'\", AUDITLOGTYPE_SECURITY, AUDITLOGSOURCE_USER_INTERFACE, $original_user);\n}", "title": "" }, { "docid": "d2b8009fd7214629239eed3556d5b611", "score": "0.5562296", "text": "function refreshUser() {\n\t\t$this->user = $this->loadUser($this->active_id);\n\t}", "title": "" }, { "docid": "ad0c1968757d50fcc3ecc5d8bfd3b0a9", "score": "0.55545413", "text": "public function update() {\r\n $this->connection->update(\r\n \"gen_user\", array(\r\n \"login\" => \"'\" . $this->observer->login . \"'\",\r\n \"name\" => \"'\" . $this->observer->name . \"'\",\r\n \"active\" => ($this->observer->active ? \"1\" : \"0\"),\r\n \"email\" => \"'\" . $this->observer->email . \"'\",\r\n \"lastLogin\" => \"'\" . $this->observer->lastLogin->format(\"Y-m-d H:i:s\") . \"'\",\r\n \"logged\" => 0), array(\"iduser\" => $this->observer->iduser), $this->user->iduser\r\n );\r\n }", "title": "" }, { "docid": "ba2fe5469f5819050580ebd32856bf0e", "score": "0.5547386", "text": "protected function authenticated()\n\t{\n\t User::find(Auth::id())->update(['session'=>Session::getId()]);\n\t}", "title": "" }, { "docid": "633ec590cb5d9916b697e89a2800d3a1", "score": "0.55461097", "text": "public function useredit() {\n \t $logged = Session::get('loggedIn');\n\t\tif($logged == 'loggedIn'){\n\t\t$id = Session::get('id');\n\t\t$this->view->user = $this->model->userSingleList($id);\n\t\t$this->view->render('user/useredit');\t\n\t\t}else{$this->view->render('user/restricted');}\n\n\t}", "title": "" }, { "docid": "6655ac2f0d51cd01c7394942ce847434", "score": "0.55409014", "text": "public function LoginUser(&$userID) {\t\t\r\n\t\t//Jorrit Overeem 13-6-2014 11:14\r\n\t\t/*Datum tijd van laatste login registeren in database:*/\r\n\t\t$lastLogin = date('Y/m/d H:i:s');\r\n\t\t$stmt = $this->DBH->prepare('UPDATE users SET Last_Loging = :log WHERE UserID = :userID');\r\n\t\t$stmt->bindParam(':log', $lastLogin);\r\n\t\t$stmt->bindParam(':userID', $userID);\r\n\t\t$stmt->execute();\r\n\t}", "title": "" }, { "docid": "bfb5d424a5e891fb56939c7eeb09e27f", "score": "0.5537918", "text": "public function login($userid)\n {\n if ( isset($userid) && $userid == '' ) {\n $data['title'] = 'Helaas...';\n $data['message'] = 'Je hebt geen credentials aangeleverd.';\n $this->set($data);\n $this->render('afterlogin');\n exit();\n }\n \n if ( isset($_SESSION['account']) && $_SESSION['account']['loggedIn'] === true ) {\n $data['title'] = 'Helaas...';\n $data['message'] = 'Je bent al ingelogd als ' . $_SESSION['account']['name'] . '. Om in te kunnen loggen als iemand anders moet je eerst uitloggen.';\n $this->set($data);\n $this->render('afterlogin');\n exit();\n }\n\n $account = new AccountModel();\n $data = [];\n\n if ( $account->login($userid) === true ) {\n $data['title'] = 'Login succesvol';\n $data['message'] = 'Je bent nu ingelogd als ' . $account->name;\n\n //Store account object in session with logged in state.\n $returnArray = [];\n $returnArray['id'] = $account->id;\n $returnArray['name'] = $account->name;\n $returnArray['profileImage'] = $account->profileImage;\n $returnArray['loggedIn'] = true;\n\n $_SESSION['account'] = $returnArray;\n } else {\n $data['title'] = 'Helaas...';\n $data['message'] = 'Login niet gelukt, de opgegeven gebruiker bestaat niet in de database of er is iets misgegaan tijdens het verwerken van de login.';\n }\n \n $this->set($data);\n $this->render('afterlogin');\n }", "title": "" }, { "docid": "a006473b7f92d8aab93e5e967bb58458", "score": "0.553707", "text": "public function logout(){\r\n //this logout function kills all session variables and expires the session cookie on the client machine\r\n $this->loggedin=FALSE; \r\n $this->setUserFirstName(NULL);\r\n $this->setUserLastName(NULL);\r\n $this->setUserID(NULL);\r\n $this->setUserType(NULL);\r\n $_SESSION = array(); //destroy all of the session variables\r\n\r\n\r\n }", "title": "" }, { "docid": "d7b8c74b5ceab7daae69bd313fd47777", "score": "0.55356854", "text": "protected function setEditedUserId()\n {\n $this->editedUserId = intval($_REQUEST['user_id']);\n if ($this->editedUserId == 0) {\n $this->editedUserId = intval(get_current_user_id());\n }\n $this->editedUser = get_user_by('id', $this->editedUserId);\n if ($this->editedUser->ID > 0) {\n $this->editedUser->profileCategories = ArrayManipulation::forceArray(get_user_meta($this->editedUserId, 'profile-categories', true));\n }\n }", "title": "" }, { "docid": "a3d40326659686b1e9b216857fbb791c", "score": "0.5531637", "text": "function logout_user(){\n require_once('../includes/config.php');\n session_start(); \n date_default_timezone_set(\"Asia/Kolkata\"); //SETTING INDIAN TIME ON SERVER\n $newlogout_ts = date('Y-m-d H:i:s'); //SETTING DATE AND TIME FORMAT\n $actual_userid=$_SESSION[\"username\"];\n \n //UPDATING LOGOUT TIME\n $query_update_lastlogout_ts = \"UPDATE users SET login_lastlogout_ts = '$newlogout_ts' WHERE login_name='$actual_userid'\";\n $result_query_lastlogout_ts = mysqli_query($connect, $query_update_lastlogout_ts);\n if(!$result_query_lastlogout_ts){\n die(\"Database Update Failed\");\n }\n \n session_destroy();\n }", "title": "" }, { "docid": "12591b5bb1d85578a1b3c0d1b6dbeb09", "score": "0.5531093", "text": "function _make_sure_logged_id(){\n $user_id = $this->_get_user_id();\n // echo $user_id;die();\n if(!is_numeric($user_id)){\n redirect('your_account/login');\n }\n return $user_id;\n }", "title": "" }, { "docid": "338c21f1927da8bf162237bd945a9600", "score": "0.55295885", "text": "public function loadNewUser()\n {\n\n \t$this->sessionId = $this->_generateSessionId();\n $this->user->setSessionId($this->sessionId);\n \n //lookup for this user & start session\n $response = $this->dispatcher->trigger('session/start', [\n 'sessionId' => $this->sessionId,\n 'host' => $this->request->getHost(),\n 'user' => $this->user->getInfo()\n ]);\n \n if ($response && $response->status == 'success') {\n $this->user->setScore($response->score);\n } \n }", "title": "" }, { "docid": "6345a5d7fd453333c4a468671d79028a", "score": "0.5520917", "text": "public function setUserid($var)\n {\n GPBUtil::checkInt64($var);\n $this->userid = $var;\n\n return $this;\n }", "title": "" }, { "docid": "c3efc711d7396b70f29416097457bf20", "score": "0.55204934", "text": "public function setUserId( $user_id = null )\n {\n if ( ! $user_id || ! $this->user_id ) {\n $user = User::getInstance();\n $this->user_id = $user->get('id');\n return;\n }\n $this->user_id = $user_id;\n }", "title": "" }, { "docid": "79c3b56a754452570755600843263056", "score": "0.551511", "text": "public function loginUser() {\n SessionUtilities::createSession('User', $this->username);\n /* Added userType */\n $this->setUsersTypeInSession();\n }", "title": "" }, { "docid": "c5713c99cdcf822aff093b9f4aa3a13b", "score": "0.5514526", "text": "protected function setUserId($userId)\n {\n $this->setUserVar(self::USER_UID, $userId);\n }", "title": "" }, { "docid": "6663949f560a7c7600df49fdb98bfdb5", "score": "0.55092406", "text": "public function setIduser($iduser)\n {\n $this->iduser = $iduser;\n }", "title": "" }, { "docid": "74f4693fc484da3af8e07031c4812fef", "score": "0.55074286", "text": "private function _login($user_id) {\n\t\t$user_data = $this->user->get($user_id);\n\t\tassert($user_data !== FALSE);\n\t\t$this->user_info->login($user_id, $user_data->name);\n\t\t$this->save_session();\n\t}", "title": "" }, { "docid": "75e551d7b5511107cdbb0a46d54b404f", "score": "0.55061084", "text": "private function setUserData($row){\n\t\t$_SESSION['is_logged_in'] = true;\n\t\t$_SESSION['user_id'] = $row ->id;\n\t\t$_SESSION['is_logged_in'] = $row ->username;\n\t\t$_SESSION['is_logged_in'] = $row ->name;\n\t}", "title": "" }, { "docid": "6fd8c7c2850df00693383d132454e90f", "score": "0.5505446", "text": "public function setUserID($user_id = \"\")\n {\n $this->user_id = $user_id;\n }", "title": "" } ]
b46dd0b72305b70ba202db55b788431b
set value for extra4_4 type:VARCHAR,size:255,default:null,nullable
[ { "docid": "6f8d91fb915bc3606a017d84d11d3afb", "score": "0.0", "text": "public function &setExtra44($extra44) {\n\t\t$this->notifyChanged(self::FIELD_EXTRA4_4,$this->extra44,$extra44);\n\t\t$this->extra44=$extra44;\n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "1d47c85d0353183142a7f1b832f62946", "score": "0.5688063", "text": "public function setInfoField4($infoField4)\n {\n $this->infoField4 = isset($infoField4) ? $infoField4 : '';\n }", "title": "" }, { "docid": "eda7e2864f220784b56ff3ccc6ef120f", "score": "0.5417289", "text": "public function setExtensionAttribute4(?string $value): void {\n $this->getBackingStore()->set('extensionAttribute4', $value);\n }", "title": "" }, { "docid": "8d0420eda59a25fa83dec826a1578fe0", "score": "0.54149365", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_usuario('');\n $this->setUsuario('');\n $this->setPassword('');\n $this->setEmail('');\n $this->setId_pau('');\n $this->setNom_usuario('');\n $this->setId_role('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "9de14b02120f60d5dc61358edd752419", "score": "0.537473", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setTabla('');\n $this->setId_pau('');\n $this->setId_tipo_dossier('');\n $this->setF_ini('');\n $this->setF_camb_dossier('');\n $this->setStatus_dossier('');\n $this->setF_status('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "cacdc63bbeadb32944acee043bf76c3d", "score": "0.5356885", "text": "function setNullAllAtributes()\n {\n $this->setId_schema('');\n $this->setId_tipo_activ('');\n $this->setNombre('');\n $this->setId_tipo_proceso_sv('');\n $this->setId_tipo_proceso_ex_sv('');\n $this->setId_tipo_proceso_sf('');\n $this->setId_tipo_proceso_ex_sf('');\n }", "title": "" }, { "docid": "edcfbd0ab631ea84b07ab70386af3348", "score": "0.5333809", "text": "public function up()\n {\n $this->dbforge->modify_column('login_attempts', ['ip_address' => ['type' => 'VARCHAR', 'constraint' => '45']]); \t\t\t\t\t\t\t\t\t\t\t\t \n }", "title": "" }, { "docid": "b67aab7b51f8e929ef465e642471cbb7", "score": "0.52242523", "text": "public function safeUp()\n {\n $this->alterColumn($this->tableName, 'api', 'VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL ');\n }", "title": "" }, { "docid": "ea5955be6bee4637b046483e38cf7854", "score": "0.51542", "text": "public function wizardDbType()\n {\n return 'string';\n }", "title": "" }, { "docid": "17f16dc113b8c50fd1f91424277f47a0", "score": "0.5152461", "text": "public function text($name, $size=250, $dafault=null){\n\t\t$this->addColumn($name,'varchar',['size'=>$size,'dafault'=>$dafault]);\n\t}", "title": "" }, { "docid": "f188ea2b4e56e03e06002b56df6e54d2", "score": "0.51292795", "text": "public function safeUp()\n {\n $this->alterColumn('posts', 'preview', Schema::TYPE_STRING.'(100) DEFAULT NULL');\n }", "title": "" }, { "docid": "08788cb98c90df8f67d47bb22be13ca4", "score": "0.51150507", "text": "protected function _prepareTableValueForSave($value, $type) {\n $type = strtolower($type);\n if (($type == 'int' || $type == 'decimal' || $type == 'numeric' || $type == 'float') && $value == '') {\n return null;\n }\n return parent::_prepareTableValueForSave($value, $type);\n }", "title": "" }, { "docid": "9df1da9413106aebbd04adaca4d59050", "score": "0.5084544", "text": "public function toDatabase($value, Driver $driver)\n {\n if ($value === null || $value === '') {\n return null;\n }\n return parent::toDatabase($value, $driver);\n }", "title": "" }, { "docid": "70a042a25614fe7fe1b1037f53ba67a6", "score": "0.5051748", "text": "public function persistCustomerAddressVarcharAttribute($attribute, $name = null);", "title": "" }, { "docid": "a51bee22483265c828801fcdceb138d6", "score": "0.5033329", "text": "public function setExtensionAttribute13(?string $value): void {\n $this->getBackingStore()->set('extensionAttribute13', $value);\n }", "title": "" }, { "docid": "51c8a93d3263a2a563ef42006c5ae8a8", "score": "0.5010859", "text": "public function getExtensionAttribute4(): ?string {\n $val = $this->getBackingStore()->get('extensionAttribute4');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'extensionAttribute4'\");\n }", "title": "" }, { "docid": "1925c86ba7d671cbeaa01c91bc0593c9", "score": "0.49737287", "text": "function setFieldsTypeText(){\n\t\t$this -> tabFieldsTypeText[]=\"varchar\";\n\t\t$this -> tabFieldsTypeText[]=\"tinytext\";\n\t\t$this -> tabFieldsTypeText[]=\"text\";\n\t\t$this -> tabFieldsTypeText[]=\"mediumtext\";\n\t\t$this -> tabFieldsTypeText[]=\"longtext\";\n\t}", "title": "" }, { "docid": "94e9d66b22cff9caa4f7e9f51fabe01a", "score": "0.4955801", "text": "function setAdminInfo4($txt)\n {\n $this->_admin_info_4 = $txt ;\n }", "title": "" }, { "docid": "571aab56cd7138a9c4460eb081b490b8", "score": "0.49548137", "text": "function buildField($name, $generictype, $size=0, $flags=0, $default=NULL)\n {\n if ($generictype == \"string\" && $size > 255)\n $generictype = \"text\";\n\n $result = parent::buildField($name, $generictype, $size, $flags, $default);\n\n // add binary option after varchar declaration to make sure field\n // values are compared in case-sensitive fashion\n if ($generictype == \"string\")\n $result = preg_replace('/VARCHAR\\(([0-9]+)\\)/i', 'VARCHAR(\\1) BINARY', $result);\n\n return $result;\n }", "title": "" }, { "docid": "45b5a4949bc2eb08b3dbcb8eb9537e5e", "score": "0.49362245", "text": "public function setQualityCheck4Attribute($input)\n {\n $this->attributes['quality_check_4'] = $input ? $input : null;\n }", "title": "" }, { "docid": "28f5a55c8ad2e643ef4333c3dac2d95e", "score": "0.49165618", "text": "public function setExtensionAttribute15(?string $value): void {\n $this->getBackingStore()->set('extensionAttribute15', $value);\n }", "title": "" }, { "docid": "735577782f6af857eb5dbc6758aa7ed0", "score": "0.49001548", "text": "function get_field_def()\n {\n $def = parent::get_field_def();\n\n // this field is not stored in the DB.\n $def['source'] = 'non-db';\n $def['dbType'] = '';\n\n //set our field as custom type\n $def['custom_type'] = 'varchar';\n\n // map the extension fields for adding a tooltip.\n $def['tooltip'] = !empty($this->tooltip) ? $this->tooltip : $this->ext1;\n\n return $def;\n }", "title": "" }, { "docid": "362b3bacb24399d528bb1c66fa869d98", "score": "0.488355", "text": "public function defaultSchema(&$schema) {\n foreach($schema as $column => $data) {\n if(!array_key_exists('#type', $data)) {\n $schema[$column]['#type'] = 'varchar';\n }\n\n if(!array_key_exists('#column_constraint', $data)) {\n $schema[$column]['#column_constraint'] = '';\n }\n }\n }", "title": "" }, { "docid": "b31a522d58a95823231fa11e3f74f632", "score": "0.48800886", "text": "function user_extended_type_text($type, $default)\n\t{\n\t global $tp;\n\t if(!is_numeric($type))\n\t {\n\t \treturn false;\n\t }\n\t \n\t switch ($type)\n\t {\n\t\tcase EUF_INTEGER :\n\t\t $db_type = 'INT(11)';\n\t\t break;\n\n\t\tcase EUF_DATE :\n\t\t $db_type = 'DATE NOT NULL';\n\t\t break;\n\n\t\tcase EUF_TEXTAREA:\n\t\t $db_type = 'TEXT';\n\t\t break;\n\n\t\tcase EUF_TEXT :\n\t\tcase EUF_RADIO :\n\t\tcase EUF_DROPDOWN :\n\t\tcase EUF_DB_FIELD :\n\t\tcase EUF_LANGUAGE :\n\t\tcase EUF_PREDEFINED :\n\t\tcase EUF_CHECKBOX :\n\t\t $db_type = 'VARCHAR(255)';\n\t\t break;\n\t\t \n\t\tcase EUF_CATEGORY:\n\t\t\treturn '';\n\t\t break;\n\t\t \n\t\tdefault:\n\t\t\te107::getMessage()->addDebug(\"<strong>Unknown type '{$type}' for user extended field.</strong>\"); \n\t\t\treturn false;\n\t\tbreak;\n\n\t }\n\t if($type != EUF_DB_FIELD && $type != EUF_TEXTAREA && $default != '')\n\t {\n\t\t$default_text = \" DEFAULT '\".$tp -> toDB($default, true).\"'\";\n\t }\n\t else\n\t {\n\t\t$default_text = '';\n\t }\n\t return $db_type.$default_text;\n\t}", "title": "" }, { "docid": "f0657dba7ffb82181b4096cfa54cffd7", "score": "0.48720184", "text": "function store_defcol()\r\n {\r\n $record = 0x0055; // Record identifier\r\n $length = 0x0002; // Number of bytes to follow\r\n $colwidth = 0x0008; // Default column width\r\n\r\n $header = pack(\"vv\", $record, $length);\r\n $data = pack(\"v\", $colwidth);\r\n $this->prepend($header.$data);\r\n }", "title": "" }, { "docid": "6d6f2e91594ddcb21cd0af3ec2c3d948", "score": "0.48681", "text": "function _store_defcol()\n {\n $record = 0x0055; // Record identifier\n $length = 0x0002; // Number of bytes to follow\n $colwidth = 0x0008; // Default column width\n \n $header = pack(\"vv\", $record, $length);\n $data = pack(\"v\", $colwidth);\n $this->_prepend($header.$data);\n }", "title": "" }, { "docid": "1be22fb3ceb1b0ff509bb456eee74479", "score": "0.4860456", "text": "private function DbColumns(){\n\n $this->user_table_columns = explode(',', extras::USER_TB);\n $this->nazaac_property_registration_columns = explode(',', extras::NAZAC_PROPERTY_REGISTRATION_COLUMN);\n $this->property_type_table_columns = explode(',', extras::PROPERTY_TYPE_TABLE_COLUMNS);\n $this->property_listing_table_column = explode(',',extras::PROPERTY_LISTING_TABLE_COLUMN);\n $this->setup_table_column = explode(',',extras::SETUP_TABLE_COLUMN);\n $this->property_location_table_column = explode(',',extras::LOCATION_TABLE_COLUMN);\n $this->property_category_table_column = explode(',',extras::PROPERTY_CATEGORY_TABLE_COLUMN);\n $this->payment_mood_columns = explode(',',extras::PAYMENT_MOOD_TABLE_COLUMN);\n $this->booked_property_columns = explode(',',extras::BOOKED_PROPERTY_TABLE_COLUMNS);\n\n }", "title": "" }, { "docid": "819d3f4178a38d8e35089349a7aa2c92", "score": "0.48539567", "text": "function extraDBFields() {\r\n\t\treturn array(\r\n\t\t\t'db' => array(\r\n\t\t\t\t'PopupWidth' => 'Int',\r\n\t\t\t\t'PopupHeight' => 'Int',\r\n\t\t\t\t'Embed' => 'Boolean',\r\n\t\t\t\t'LimitDimensions' => 'Boolean'\r\n\t\t\t)\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "f0edf39b6f9b2aa332e4a2e8d144708a", "score": "0.48215523", "text": "protected function _setDefault()\n {\n if ($this->_default === null) {\n $this->_table->alter(\n sprintf('ALTER COLUMN %s DROP DEFAULT', $this->_database->prepareIdentifier($this->_name))\n );\n } else {\n $this->_table->alter(\n sprintf(\n 'ALTER COLUMN %s SET DEFAULT %s',\n $this->_database->prepareIdentifier($this->_name),\n $this->_database->prepareValue($this->_default, $this->_datatype)\n )\n );\n }\n }", "title": "" }, { "docid": "ec848a38171b0f3dd9d7a70f0c305259", "score": "0.48201934", "text": "public function set_extra_data($data) {\n $this->extradata = json_encode($data);\n $this->save();\n }", "title": "" }, { "docid": "1c5e05602d3f350822291fafe8c9cdcd", "score": "0.4817887", "text": "public function testGetDefaultValueDeclarationSQL(): void\n {\n self::assertEquals(\" DEFAULT 'non_timestamp'\", $this->platform->getDefaultValueDeclarationSQL([\n 'type' => Type::getType(Types::STRING),\n 'default' => 'non_timestamp',\n ]));\n }", "title": "" }, { "docid": "821ef573fdd4e7e3c62cb8219a6cc658", "score": "0.48049787", "text": "public function getCustomInfo4() : ?string\n {\n return $this->customInfo4;\n }", "title": "" }, { "docid": "c63ee4a5aee987e2b149780499680491", "score": "0.47940364", "text": "public function setExtension($v)\n\t{\n\r\n\t\t// Since the native PHP type for this column is string,\r\n\t\t// we will cast the input to a string (if it is not).\r\n\t\tif ($v !== null && !is_string($v)) {\r\n\t\t\t$v = (string) $v; \r\n\t\t}\r\n\n\t\tif ($this->extension !== $v) {\n\t\t\t$this->extension = $v;\n\t\t\t$this->modifiedColumns[] = PerfilPeer::EXTENSION;\n\t\t}\n\n\t}", "title": "" }, { "docid": "53b0820dcb81de77ec79f2e5b73e40d9", "score": "0.47913793", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->external_id = '';\n\t}", "title": "" }, { "docid": "03632b2b4d0dea72219ea4c3bccfe608", "score": "0.47803187", "text": "function setExtra( $str_extra )\r\n\t{\r\n\t\t$this->extra\t\t= $str_extra;\r\n\t}", "title": "" }, { "docid": "70a0c6de171fab3cad28376980daf54e", "score": "0.47619468", "text": "function ModifyTableField($table,$field,$mySQLType,$pgSqlType,$default,$notnull,$autoincrement)\n{\n include(\"cdash/config.php\");\n \n //$check = pdo_query(\"SELECT \".$field.\" FROM \".$table.\" LIMIT 1\");\n //$type = pdo_field_type($check,0); \n //add_log($type,\"ModifyTableField\");\n if(1)\n {\n add_log(\"Modifying $field to $table\",\"ModifyTableField\");\n if($CDASH_DB_TYPE == \"pgsql\")\n {\n // ALTER TABLE \"buildfailureargument\" ALTER COLUMN \"argument\" TYPE VARCHAR( 255 );\n // ALTER TABLE \"buildfailureargument\" ALTER COLUMN \"argument\" SET NOT NULL;\n // ALTER TABLE \"dynamicanalysisdefect\" ALTER COLUMN \"value\" SET DEFAULT 0;\n pdo_query(\"ALTER TABLE \\\"\".$table.\"\\\" ALTER COLUMN \\\"\".$field.\"\\\" TYPE \".$pgSqlType);\n if($notnull)\n {\n pdo_query(\"ALTER TABLE \\\"\".$table.\"\\\" ALTER COLUMN \\\"\".$field.\"\\\" SET NOT NULL\");\n }\n if(strlen($default)>0)\n {\n pdo_query(\"ALTER TABLE \\\"\".$table.\"\\\" ALTER COLUMN \\\"\".$field.\"\\\" SET DEFAULT \".$default);\n }\n if($autoincrement)\n {\n pdo_query(\"DROP INDEX \\\"\".$table.\"_\".$field.\"_idx\\\"\");\n pdo_query(\"ALTER TABLE \\\"\".$table.\"\\\" ADD PRIMARY KEY (\\\"\".$field.\"\\\")\");\n pdo_query(\"CREATE SEQUENCE \\\"\".$table.\"_\".$field.\"_seq\\\"\");\n pdo_query(\"ALTER TABLE \\\"\".$table.\"\\\" ALTER COLUMN \\\"\".$field.\"\\\" SET DEFAULT nextval('\".$table.\"_\".$field.\"_seq')\");\n pdo_query(\"ALTER SEQUENCE \\\"\".$table.\"_\".$field.\"_seq\\\" OWNED BY \\\"\".$table.\"\\\".\\\"\".$field.\"\\\"\");\n } \n }\n else\n {\n //ALTER TABLE dynamicanalysisdefect MODIFY value INT NOT NULL DEFAULT 0;\n $sql = \"ALTER TABLE \".$table.\" MODIFY \".$field.\" \".$mySQLType;\n if($notnull)\n {\n $sql .= \" NOT NULL\";\n }\n if(strlen($default)>0)\n {\n $sql .= \" DEFAULT '\".$default.\"'\";\n }\n if($autoincrement)\n {\n $sql .= \" AUTO_INCREMENT\";\n }\n pdo_query($sql);\n }\n add_last_sql_error(\"ModifyTableField\");\n add_log(\"Done modifying $field to $table\",\"ModifyTableField\");\n }\n}", "title": "" }, { "docid": "22706e174716ec47b93c73f7d547eb6b", "score": "0.47607046", "text": "public function setValue($value) {\n //if(function_exists('mb_check_encoding') && mb_check_encoding($value, 'UTF-8')) $value = utf8_decode($value);\n $this->value = base64_encode($value);\n }", "title": "" }, { "docid": "9aca7dca5862c4f4282434e78a2a2502", "score": "0.47604907", "text": "public function setCodec($v)\n\t{\n\r\n\t\t// Since the native PHP type for this column is string,\r\n\t\t// we will cast the input to a string (if it is not).\r\n\t\tif ($v !== null && !is_string($v)) {\r\n\t\t\t$v = (string) $v; \r\n\t\t}\r\n\n\t\tif ($this->codec !== $v) {\n\t\t\t$this->codec = $v;\n\t\t\t$this->modifiedColumns[] = PerfilPeer::CODEC;\n\t\t}\n\n\t}", "title": "" }, { "docid": "44934f5bcd96ddfed2c72bbdc5bb6159", "score": "0.4759049", "text": "protected function set_default_table_fields () {\n $this->tfields = array(\n \"id\" => \"ID\",\n \"hostname\" => \"Hostname\",\n \"ip\" => \"IP address\",\n \"oid\" => \"OID\",\n \"date\" => \"Date\",\n \"message\" => \"Message\",\n \"severity\" => \"Severity\",\n \"content\" => \"Content\"\n );\n }", "title": "" }, { "docid": "6ae19c185965b06c266c8392704cb9e7", "score": "0.47517684", "text": "public function up(){\n $sql=\"ALTER TABLE `drivers`\nMODIFY COLUMN `cep` varchar(9);\";\n $this->execute($sql);\n\n }", "title": "" }, { "docid": "9155e93fdcd9a5cd98eaf72ba8746453", "score": "0.47514793", "text": "public function schema_alter(&$schema, $field) { // @codingStandardsIgnoreLine\n $schema['columns']['target_id']['type'] = 'varchar';\n $schema['columns']['target_id']['length'] = 255;\n $schema['columns']['target_id']['default'] = '';\n // Varchar cannot be unsigned so we unset this.\n unset($schema['columns']['target_id']['unsigned']);\n }", "title": "" }, { "docid": "abcc7c08093bd85aba8616eb93ebe8f5", "score": "0.4739621", "text": "function sql_value_entick($value, $key) {\n switch (ArrayCheck::arr_get($this->schema[$key], 'sanitize', 'VARCHAR')) {\n// switch ($this->schema[$key]['sanitize']) {\n // textual types get ticks\n // PASSWORD is expected to have been hashed.\n // DATETIME is expected to be formatted properly by caller.\n case 'VARCHAR':\n case 'PASSWORD':\n case 'DATETIME':\n case 'EMAIL':\n return \"'\" . $value . \"'\";\n }\n return $value;\n }", "title": "" }, { "docid": "b2072dc16ff8c0e26e803578349b969d", "score": "0.47395986", "text": "protected function setNullDefaultDriverName()\n {\n return 'NULL';\n }", "title": "" }, { "docid": "ad47e33c091d95f979731e6d9c66f0e9", "score": "0.47365776", "text": "public function getDesiredFields(): string\r\n {\r\n return 'UID,LOCALE,FIRST_NAME,LAST_NAME,EMAIL,PIC190X190,PIC640X480';\r\n }", "title": "" }, { "docid": "cfe005b39a333f87442bb7d38e0b9297", "score": "0.4735176", "text": "public function setExtensionAttribute14(?string $value): void {\n $this->getBackingStore()->set('extensionAttribute14', $value);\n }", "title": "" }, { "docid": "2027574ec41a658630869cf7af783f87", "score": "0.47298604", "text": "public function setExtensionAttribute3(?string $value): void {\n $this->getBackingStore()->set('extensionAttribute3', $value);\n }", "title": "" }, { "docid": "cbf883ebefda1103bc51c70aa6fdfa7b", "score": "0.4708068", "text": "public function fixed($name, $size=250, $dafault=null){\n\t\t$this->addColumn($name,'char',['size'=>$size,'dafault'=>$dafault]);\n\t}", "title": "" }, { "docid": "9f197c4c2e5e3d11da790e08857cda81", "score": "0.47046566", "text": "public function beforeSave()\n {\n if (!$this->owner instanceof ActiveRecord) {\n throw new InvalidConfigException('Behavior works only with models extends from ActiveRecord');\n }\n\n /** @var ActiveRecord */\n $owner = $this->owner;\n $value = (string)$owner->{$this->attribute};\n\n if ($value === '' && $this->createViaDb) {\n $connection = $owner::getDb();\n if ($connection->getDriverName() === 'pgsql') {\n $value = new Expression('uuid_generate_v4()');\n $this->isSetAttribute = true;\n }\n }\n\n if ($value === '') {\n $value = self::generateUIID4();\n $this->isSetAttribute = true;\n }\n\n $owner->{$this->attribute} = $value;\n }", "title": "" }, { "docid": "2bea4d11e90b7f5cae0f574135ee5a6d", "score": "0.47039083", "text": "function setfechadeshabilitacion($valor)\n {\n $this->fechadeshabilitacion = ($valor == '0000-00-00') ? 'null' : $valor;\n }", "title": "" }, { "docid": "cc5d20181aa187b3f85fa6f2f330e7f3", "score": "0.46790746", "text": "public function setProUid ($v)\n {\n\n // Since the native PHP type for this column is string,\n // we will cast the input to a string (if it is not).\n if ( $v !== null && !is_string ($v) )\n {\n $v = (string) $v;\n }\n\n if ( $this->pro_uid !== $v || $v === '' )\n {\n $this->pro_uid = $v;\n }\n }", "title": "" }, { "docid": "b737b957b57ab9b0c688771166bead5d", "score": "0.46778217", "text": "public function getNewfieldAttribute()\n {\n return $this->config_forme * 4;\n }", "title": "" }, { "docid": "e6e05bc261430a15c56cda97a154ccec", "score": "0.4675166", "text": "function db_normal_field($value) {\n if($value) {\n return \"'\".$value.\"'\";\n } else {\n return \"''\";\n }\n return $value;\n}", "title": "" }, { "docid": "9910cec0768e5973fe34cf02580d7b4b", "score": "0.4667087", "text": "public function setTasDefMessage ($v)\n {\n\n // Since the native PHP type for this column is string,\n // we will cast the input to a string (if it is not).\n if ( $v !== null && !is_string ($v) )\n {\n $v = (string) $v;\n }\n\n if ( $this->tas_def_message !== $v )\n {\n $this->tas_def_message = $v;\n }\n }", "title": "" }, { "docid": "f3944739214eecba4e6a5e1d73b3001e", "score": "0.4648642", "text": "public function set_value($value) {\n parent::set_value(base64_encode($value));\n }", "title": "" }, { "docid": "4d917f8a0d6bb9a26b13a1e9091bdfdc", "score": "0.46477082", "text": "public function getExtensionAttribute15(): ?string {\n $val = $this->getBackingStore()->get('extensionAttribute15');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'extensionAttribute15'\");\n }", "title": "" }, { "docid": "0038e86cdcf11c4f87777462b792fe9f", "score": "0.46464914", "text": "function __setDBFieldValue($fieldDescriptor, $value) {\n\n if (in_array($fieldDescriptor['type'], array('datetime', 'date'))) {\n if (empty($value)) {\n return '0000-00-00';\n }\n //return $this->__getMySqlDate($value);\n return $value;\n }\n \n\t\tif (isset($fieldDescriptor['null']) && !$fieldDescriptor['null']) {\n\t\t\tif (!empty($fieldDescriptor['default']) && empty($value)) {\n\t\t\t\treturn $fieldDescriptor['default'];\n\t\t\t} elseif (in_array($fieldDescriptor['type'], array('datetime', 'date'))) {\n\t\t\t\tif (empty($value)) {\n\t\t\t\t\treturn '0000-00-00';\n\t\t\t\t}\n\t\t\t\t//return $this->__getMySqlDate($value);\n return $value;\n\t\t\t} elseif (in_array($fieldDescriptor['type'], array('float', 'integer', 'binary')) && empty($value)) {\n\t\t\t\treturn 0;\n\t\t\t} elseif (in_array($fieldDescriptor['type'], array('string', 'text')) && strlen($value) === 0) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t} else {\n\t\t\tif (empty($value)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "406d18b4bc3f012ec08dfbbc7006bc6a", "score": "0.46454808", "text": "protected function resetFieldValues()\n {\n if (EncryptHelper::getAadSource() === \"ID\") {\n $db = $this->config()->db;\n foreach ($this->record as $k => $v) {\n $dbClass = $db[$k] ?? null;\n if ($dbClass && EncryptHelper::isEncryptedDbClass($dbClass)) {\n $this->dbObject($k)->setValue($v);\n }\n }\n }\n }", "title": "" }, { "docid": "3635131a2f543c71941fbbe4798edb9f", "score": "0.4645037", "text": "public function onBeforeWrite() {\n\t\tparent::onBeforeWrite();\n\t\tif (0 === strlen($this()->{static::SingleFieldName})) {\n\t\t\t$this()->{static::SingleFieldName} = $this->generateValue();\n\t\t}\n\t}", "title": "" }, { "docid": "07fd6e9c6aa76df3cb495d9917266502", "score": "0.4640084", "text": "public function setEdBairro($value,$options=array('required'=>true)){ \n $this->_data['ed_bairro'] = new ZendT_Type_String($value,array('mask'=>''\n ,'charMask'=>''\n ,'filterDb'=>array (\n 0 => '',\n)\n ,'filter'=>array('strtoupper', 'removeAccent', )));\n if ($options['db'])\n $this->_data['ed_bairro']->setValueFromDb($value);\n \n if (!$options['db']){\n \n $valid = new Zend_Validate_StringLength(array ( 'max' => 50, ) );\n $valueValid = $this->_data['ed_bairro']->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": "b659aab493b53513699e2146ecddc609", "score": "0.46343458", "text": "private function setNull() {\n foreach ($this->data as $Key => $Value):\n $this->data[$Key] = ($Value == \"\" ? null : $Value);\n endforeach;\n }", "title": "" }, { "docid": "b2d3bd4af883ec489bd0ac982932ebb9", "score": "0.46317828", "text": "public function requireField()\n {\n $sql = \"binary(16)\";\n // In postgres, it's bytea, there is also an uuid but we would need some postgres specific logic\n // @link https://stackoverflow.com/questions/26990559/convert-mysql-binary-to-postgresql-bytea\n $class = strtolower(get_class(DB::get_conn()));\n if (strpos($class, 'postgres') !== false) {\n $sql = 'bytea';\n }\n DB::require_field($this->tableName, $this->name, $sql);\n }", "title": "" }, { "docid": "a888ad34ce88ea7af64fac35882cc4d9", "score": "0.46283394", "text": "public function __construct(&$table, $name, $type, $default, $nullable, $length, $charset, $fixed = false)\r\n\t{\r\n\t\t$this->properties['table']\t\t=\t$table;\r\n\t\t$this->properties['name']\t\t=\t$name;\r\n\t\t$this->properties['type']\t\t=\t$type;\r\n\t\t$this->properties['default']\t=\t$default;\r\n\t\t$this->properties['nullable']\t=\t$nullable;\r\n\t\t$this->properties['length']\t\t=\t$length;\r\n\t\t$this->properties['charset']\t=\t$charset;\r\n\t\t$this->properties['fixed']\t\t=\t$fixed;\t\t//\tfixed length - from Doctrine: `fixed (boolean): Whether a string or binary Doctrine type column has a fixed length. Defaults to false.`\r\n\r\n//\tpublic $binary\t\t\t= null; // needed? could be set by collation type: `utf8_bin` or data type `binary` ???\r\n\r\n\t\t$this->required\t\t\t\t\t=\t$default === null && ! $nullable;\r\n\r\n\t\tif (self::$isValid === null) {\r\n\t\t\tself::$isValid\t=\tfunction ($type, $value)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\treturn $value !== null && is_string($value) && ($type->charset === 'latin1' ? strlen($value) : mb_strlen($value, 'utf8')) <= $this->maxlength || $value === null && ($type->nullable || $this->default);\r\n\t\t\t\t\t\t\t\t};\t//\tin_array(null, ['']) === true\t... therefore we MUST test `$value !== null` before the in_array() or we might get false positives\r\n\t\t}\r\n\t\t$this->properties['isValid']\t=\tself::$isValid;\r\n\t}", "title": "" }, { "docid": "2b284d112b44cd885d0c2bcff3080550", "score": "0.46276024", "text": "protected function _beforeSave()\n {\n /**\n * Check for maximum attribute_code length\n */\n if (isset($this->_data['attribute_code']) &&\n !Zend_Validate::is(\n $this->_data['attribute_code'],\n 'StringLength',\n array('max' => self::ATTRIBUTE_CODE_MAX_LENGTH)\n )\n ) {\n throw Mage::exception('Mage_Eav', Mage::helper('eav')->__('Maximum length of attribute code must be less then %s symbols', self::ATTRIBUTE_CODE_MAX_LENGTH));\n }\n\n $defaultValue = $this->getDefaultValue();\n $hasDefaultValue = ((string)$defaultValue != '');\n\n if ($this->getBackendType() == 'decimal' && $hasDefaultValue) {\n $locale = Mage::app()->getLocale()->getLocaleCode();\n if (!Zend_Locale_Format::isNumber($defaultValue, array('locale' => $locale))) {\n throw Mage::exception('Mage_Eav', Mage::helper('eav')->__('Invalid default decimal value'));\n }\n\n try {\n $filter = new Zend_Filter_LocalizedToNormalized(\n array('locale' => Mage::app()->getLocale()->getLocaleCode())\n );\n $this->setDefaultValue($filter->filter($defaultValue));\n } catch (Exception $e) {\n throw Mage::exception('Mage_Eav', Mage::helper('eav')->__('Invalid default decimal value'));\n }\n }\n\n if ($this->getBackendType() == 'datetime') {\n if (!$this->getBackendModel()) {\n $this->setBackendModel('eav/entity_attribute_backend_datetime');\n }\n\n if (!$this->getFrontendModel()) {\n $this->setFrontendModel('eav/entity_attribute_frontend_datetime');\n }\n\n // save default date value as timestamp\n if ($hasDefaultValue) {\n $format = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);\n try {\n $defaultValue = Mage::app()->getLocale()->date($defaultValue, $format, null, false)->toValue();\n $this->setDefaultValue($defaultValue);\n } catch (Exception $e) {\n throw Mage::exception('Mage_Eav', Mage::helper('eav')->__('Invalid default date'));\n }\n }\n }\n\n if ($this->getBackendType() == 'gallery') {\n if (!$this->getBackendModel()) {\n $this->setBackendModel('eav/entity_attribute_backend_media');\n }\n }\n\n return parent::_beforeSave();\n }", "title": "" }, { "docid": "01eafa727e3b2c9c480b74ae430bbd69", "score": "0.46188727", "text": "public function testSqlType()\n {\n $this->obj->setStorageMode('string');\n $this->assertEquals('VARCHAR(15)', $this->obj->sqlType());\n\n $this->obj->setStorageMode('int');\n $this->assertEquals('BIGINT', $this->obj->sqlType());\n }", "title": "" }, { "docid": "47c097f5480be76b66b756f7a86fccb4", "score": "0.4611441", "text": "public function up()\n {\n $this->alterColumn('order', 'address', $this->string(255)->notNull());\n }", "title": "" }, { "docid": "795d312b0a670cd455dd7bc3ab1c14e7", "score": "0.4604628", "text": "public function setLength($value, string $schema = null, string $engineVersion = null): void\n {\n if (is_array($value)) {\n $length = $value;\n } else {\n /** @var array<string|int> $length */\n $length = preg_split('/\\s*,\\s*/', (string)$value);\n }\n\n if (!empty($length[0])) {\n $this->setPrecision((int)$length[0]);\n } else {\n $this->setPrecision(null);\n }\n\n if (!empty($length[1])) {\n $this->setScale((int)$length[1]);\n } else {\n $this->setScale(null);\n }\n }", "title": "" }, { "docid": "b16c82dbed07ff565e9991d623fbd654", "score": "0.46031135", "text": "function ifx_byteasvarchar($mode)\n{\n}", "title": "" }, { "docid": "ec59d042759e6358fef0809ef7418715", "score": "0.45978057", "text": "public function syncAttributeColumn($tableName, $attribute, $multiSeq)\n {\n\n //TODO maybe this should be a \"little\" more genereric\n $orgType = trim($attribute->dbType());\n\n $mapping = $this->nameMapping;\n\n if (isset($mapping[$orgType])) {\n $type = $mapping[$orgType];\n } else {\n Error::addError('missing $orgType'.$orgType);\n $type = 'text';\n }\n\n\n if ($seqName = $attribute->sequence()) {\n $default = \"nextval('{$seqName}'::regclass)\";\n } elseif ($attribute->name('rowid')) {\n $seqName = Db::SEQUENCE;\n $default = \"nextval('{$seqName}'::regclass)\";\n } elseif ($def = $attribute->defaultValue()) {\n\n if (!$attribute->target() )\n $default = $def;\n else\n $default = '';\n } else {\n $default = '';\n }\n\n $precision = null;\n $scale = null;\n $length = null;\n $size = $attribute->size();\n\n if ($orgType == 'numeric') {\n $tmp = explode('.', $size);\n\n Debug::console('numeric size '.$size);\n\n $precision = $tmp[0];\n\n if (isset($tmp[1]))\n $scale = $tmp[1];\n else\n $scale = 0;\n\n } elseif ($orgType == 'smallint') {\n $precision = '16';\n $scale = '0';\n } elseif ($orgType == 'integer' || $orgType == 'int') {\n $precision = '32';\n $scale = '0';\n } elseif ($orgType == 'bigint') {\n $precision = '64';\n $scale = '0';\n } elseif ($orgType == 'char') {\n if (trim($size) == '') {\n $length = '1';\n } else {\n $length = trim($size);\n }\n } else {\n $length = trim($size);\n }\n\n if ($attribute->required()) {\n $nullAble = 'NO';\n } else {\n $nullAble = 'YES';\n }\n\n $colName = $attribute->name();\n\n $checkNegativ = array(\n 'integer',\n 'int2',\n 'smallint',\n 'bigint',\n 'int8',\n 'numeric',\n );\n\n\n if( in_array($type,$checkNegativ) ){\n if($default && $default < 0){\n $default = \"($default)\";\n }\n }\n\n $data = array(\n LibDbAdmin::COL_NAME => $colName,\n LibDbAdmin::COL_DEFAULT => $default,\n LibDbAdmin::COL_NULL_ABLE => $nullAble,\n LibDbAdmin::COL_TYPE => $type,\n LibDbAdmin::COL_LENGTH => $length,\n LibDbAdmin::COL_PRECISION => $precision,\n LibDbAdmin::COL_SCALE => $scale,\n );\n\n if ($diff = $this->diffColumn($colName, $data, $tableName )) {\n try {\n $this->alterColumn($colName, $data, $diff, $tableName);\n Debug::console('Column: '.$colName.' in Tabelle '.$tableName.' wurde angepasst');\n\n return true;\n } catch (LibDb_Exception $e) {\n // error was allready reported in the exception\n return false;\n }\n }\n\n return true;\n\n }", "title": "" }, { "docid": "96982b463b9d7764ffc5f9be112d80a2", "score": "0.45925483", "text": "public function set_atts( $value ) { $this->atts = $value; }", "title": "" }, { "docid": "f2bb169645acf2f1291c3580494e5881", "score": "0.45842364", "text": "public function testDefaultLengthOfThree()\n {\n $l = new Column('A');\n $l->setMaxLength(mb_strlen('ab'));\n $this->assertEquals('A ', $l->createHeader());\n $this->assertEquals('---', $l->createHeaderSeparator());\n $this->assertEquals('ab ', $l->createCell('ab'));\n }", "title": "" }, { "docid": "fbd4d07bcd446af63e09e25b0ed05d88", "score": "0.4576293", "text": "public function convertToDatabaseValue($value, AbstractPlatform $platform) {\n return ($value === null) ? null : gzcompress($value);\n }", "title": "" }, { "docid": "d1e29e731a73adc42436eb1d8306ec12", "score": "0.45730308", "text": "public function setMimeType($v)\n\t{\n\r\n\t\t// Since the native PHP type for this column is string,\r\n\t\t// we will cast the input to a string (if it is not).\r\n\t\tif ($v !== null && !is_string($v)) {\r\n\t\t\t$v = (string) $v; \r\n\t\t}\r\n\n\t\tif ($this->mime_type !== $v) {\n\t\t\t$this->mime_type = $v;\n\t\t\t$this->modifiedColumns[] = PerfilPeer::MIME_TYPE;\n\t\t}\n\n\t}", "title": "" }, { "docid": "90dae076443c3591ff2b01cb3f183a36", "score": "0.4568669", "text": "public static function setCharSet(){\r\n\t\t$tmpArgArr = func_get_args();\r\n\t\tsettype($tmpArgArr[0], 'string');\r\n\t self::$dbCharset = is_string($tmpArgArr[0]) && $tmpArgArr[0] != '' ? $tmpArgArr[0] : 'utf8';\r\n\t}", "title": "" }, { "docid": "a96c80a2be5357fbc5893cff0ba0447b", "score": "0.45599517", "text": "public function time($name,$null=true){\n\t\t$null = $null ? 'DEFAULT NULL':'NOT NULL DEFAULT'; \n\t\t$this->column .= trim($name.' TIME '.$null.',');\n\t}", "title": "" }, { "docid": "d8edb969662b98f8c93c72ff527eafb3", "score": "0.4554916", "text": "function value2db($rec)\n {\n $db = &$this->getDb();\n if ($db->getType() != \"oci9\" || $this->dbFieldType() != 'text')\n return $db->escapeSQL($rec[$this->fieldName()]);\n else\n return $rec[$this->fieldName()]; //CLOB in oci9 don't need quotes to be escaped EVIL HACK! THIS IS NOT ATKTEXTATTRIBUTE's PROBLEM!\n }", "title": "" }, { "docid": "8b73fa4c8af1e3bfd0318a0e57a62843", "score": "0.45503816", "text": "public function createDatabaseColumn()\n {\n $sSql = 'ALTER TABLE oxuser ADD COLUMN ' . $this->sIdFieldName . ' varchar(50)';\n oxDb::getDb()->execute($sSql);\n $oDbHandler = oxNew(\"oxDbMetaDataHandler\");\n $oDbHandler->updateViews();\n }", "title": "" }, { "docid": "03da02e3c6845c4d5c2b11103c7e1ddc", "score": "0.45502487", "text": "public function setExtensionAttribute6(?string $value): void {\n $this->getBackingStore()->set('extensionAttribute6', $value);\n }", "title": "" }, { "docid": "28d4a48d4d694dd77667dc330a4bfaae", "score": "0.45499113", "text": "public function safeUp()\n\t{\n\t\t$sql=\"ALTER TABLE `site` MODIFY COLUMN `value` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL AFTER `name`;\";\n\t\t$this->execute($sql);\n\t\t$this->refreshTableSchema('site');\n\t}", "title": "" }, { "docid": "53fb30abbf9b36c47c94ca82867d08ab", "score": "0.45446315", "text": "public function fillDefaultValues()\n {\n foreach($this->table_desc as $field_name => $field_desc)\n {\n if($this->hasDefaultValue($field_name) && $this->isEmpty($this->$field_name))\n $this->$field_name = $this->getDefaultValue($field_name);\n }\n }", "title": "" }, { "docid": "ae58547cc25e1f67c32e76c63498feb1", "score": "0.45379978", "text": "function ifx_byteasvarchar($mode) {}", "title": "" }, { "docid": "af0087be08c08a26928eba7ca9085d6a", "score": "0.45367435", "text": "protected function resetColumn(){\n\t\t$this->default = null;\n\t\t$this->nullable = null;\n\t\t$this->length = null;\n\t\t$this->name = null;\n\t\t$this->onupdate = null;\n\t\t$this->comment = null;\n\t\t$this->type = 'INTEGER';\n\t}", "title": "" }, { "docid": "aee8ff1cef231dfb67eee10340c4881b", "score": "0.4535597", "text": "private function sanitiseData()\n {\n $this->id = (int) $this->id;\n $this->option = StringValidator::sanitiseString($this->option);\n\n try {\n $this->option = StringValidator::validateLength($this->option, 255);\n } catch (\\Exception $exception) {\n $this->option = substr($this->option, 0, 254);\n }\n \n $this->stageId = (int) $this->stageId;\n $this->deleted = (int) $this->deleted;\n }", "title": "" }, { "docid": "6b865eb891ebbc3e9ba79512236c631a", "score": "0.45348263", "text": "abstract protected function _setDatatype();", "title": "" }, { "docid": "91f4b4e29adb91110b60aaa77579b8fb", "score": "0.4533383", "text": "public function addDefaultValue(string $table, string $name, string $column, mixed $value): string;", "title": "" }, { "docid": "e25a68d92bab868eb6596e94ae7f023d", "score": "0.453254", "text": "function ifx_textasvarchar($mode) {}", "title": "" }, { "docid": "e33f894a9fb697690f531ca091251b47", "score": "0.45282468", "text": "function writeNull() {\n\t\t$this->writeByte(5); // null is only a 0x05 flag\n\t}", "title": "" }, { "docid": "0cd6b2913a33417ac75091b8d91102f3", "score": "0.4521921", "text": "public function convertToDatabaseValue($value, AbstractPlatform $platform)\n {\n if ($value instanceof UUID) {\n return $value->toString();\n }\n\n if (!is_string($value) || $value === '') {\n return null;\n }\n\n\n throw ConversionException::conversionFailed($value, static::NAME);\n }", "title": "" }, { "docid": "beeb5dbc3527b56184c2351daefde37f", "score": "0.45208424", "text": "function ToDBString($value)\n {\n //Typ save:\n return $this->_ToDBString($value);\n }", "title": "" }, { "docid": "c6a73440f2b4715a7034ea93e764fba9", "score": "0.4514366", "text": "public function prepareValue($value, $type = NULL)\n\t{\n\t\t// Only allow scalar values in the method\n\t\tif ( ! is_scalar($value) AND ! is_null($value))\n\t\t\tthrow new UnexpectedValueException('You cannot insert non-scalar values into the database.');\n\n\t\t// Cast the value to the right type if it isn't already\n\t\tif ( ! is_null($value) AND in_array($type, array('string', 'int', 'bool', 'float', 'datetime')))\n\t\t{\n\t\t\tif ($type === 'datetime')\n\t\t\t{\n\t\t\t\t// Handle datetime values\n\t\t\t\t$datetime = strtotime($value);\n\t\t\t\tif ($success = (bool) $datetime)\n\t\t\t\t{\n\t\t\t\t\t$value = date('Y-m-d H:i:s', $datetime);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Handle scalar values\n\t\t\t\t$success = settype($value, $type);\n\t\t\t}\n\n\t\t\tif ( ! $success)\n\t\t\t\tthrow new RuntimeException('There was an error preparing a value before inserting in the database.');\n\t\t}\n\n\t\tif (is_null($value))\n\t\t{\n\t\t\t$value = 'NULL';\n\t\t}\n\t\telseif (is_bool($value))\n\t\t{\n\t\t\t$value = $value ? 1 : 0;\n\t\t}\n\t\telseif (is_string($value))\n\t\t{\n\t\t\t$value = '\"'.$this->_connection->real_escape_string($value).'\"';\n\t\t}\n\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "fc992bf0f6b3ced2e1df2b5305b20966", "score": "0.4512681", "text": "protected function initTableFields()\r\n {\r\n $this->addField(self::$ID, STRING, \"\");\r\n $this->addField(self::$NAME, STRING, \"\");\r\n $this->addField(self::$ACCOUNT, STRING, \"\");\r\n $this->addField(self::$PASSWORD, STRING, sha1(\"123456\"));\r\n $this->addField(self::$CELL_PHONE, INTEGER, \"\");\r\n $this->addField(self::$STATUS, INTEGER, SYSTEM_USER_NORMAL);\r\n $this->addField(self::$E_MAIL, INTEGER, \"\");\r\n $this->addField(self::$CREATE_TIME, STRING, date('Y-m-d H:i:s'));\r\n $this->addField(self::$LAST_MODIFY_TIME, STRING, date('Y-m-d H:i:s'));\r\n $this->addField(self::$IS_CAN_RECHARGE, INTEGER, 0);\r\n $this->addField(self::$RECHARGE_PASSWORD, STRING, \"\");\r\n }", "title": "" }, { "docid": "5a3f75919c7f884a4e79b1bd837d408f", "score": "0.45090607", "text": "public function getExtensionAttribute5(): ?string {\n $val = $this->getBackingStore()->get('extensionAttribute5');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'extensionAttribute5'\");\n }", "title": "" }, { "docid": "62b34f39404a4766cead99afdc656956", "score": "0.4505935", "text": "public function setApelido($value,$options=array('required'=>true)){ \n $this->_data['apelido'] = new ZendT_Type_String($value,array('mask'=>''\n ,'charMask'=>''\n ,'filterDb'=>array (\n 0 => '',\n)\n ,'filter'=>array('strtoupper', 'removeAccent', )));\n if ($options['db'])\n $this->_data['apelido']->setValueFromDb($value);\n \n if (!$options['db']){\n \n $valid = new Zend_Validate_StringLength(array ( 'max' => 45, ) );\n $valueValid = $this->_data['apelido']->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": "45589401ce4445439b755bd764568127", "score": "0.4505104", "text": "public function setAdditionalInformation(?string $value): void {\n $this->getBackingStore()->set('additionalInformation', $value);\n }", "title": "" }, { "docid": "cd95667ca7ba534e8f5f0d02bb8a849f", "score": "0.45035315", "text": "public function setString($name, $value, $default = null)\n {\n }", "title": "" }, { "docid": "578e3101a24035c1fefe15110234f057", "score": "0.4502225", "text": "public function setExtensionAttribute8(?string $value): void {\n $this->getBackingStore()->set('extensionAttribute8', $value);\n }", "title": "" }, { "docid": "a13304126fcd62e201ff40d21e6afe45", "score": "0.44981906", "text": "public function getCustom4(): string\n {\n return $this->custom4;\n }", "title": "" }, { "docid": "f5892426188cba96b8032132153256be", "score": "0.4494095", "text": "public function quoteColValue($value, $type = null, $charset = null) {\n\t\tif (null === $value)\n\t\t\treturn 'null';\n\t\telseif ((null !== $type && in_array ( $type, NonQuotableColumnTypes::getFixedTypes () )) || is_int ( $value ) || is_float ( $value ) || is_bool ( $value )) {\n\t\t\treturn $value;\n\t\t}\n\t\t\n\t\t// escape single quotes\n\t\t$value = str_replace ( \"'\", \"''\", $value );\n\t\t\n\t\t// escape #0, CR, LF, \\, ^Z\n\t\t$value = addcslashes ( $value, \"\\000\\n\\r\\032\" );\n\t\t\n\t\t// escape special chars within blob by E-prefix\n\t\t$is_blob = null !== $type && in_array ( $type, NonQuotableColumnTypes::getBlobTypes () );\n\t\t\n\t\tif ($is_blob) {\n\t\t\tif ($charset)\n\t\t\t\t$value = \"convert_to('$value','$charset')\";\n\t\t\telse\n\t\t\t\t$value = \"E'$value'\";\n\t\t} else\n\t\t\t$value = \"'$value'\";\n\t\t\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "c31774a1d7d7c6e9843ce23398d580f0", "score": "0.44939268", "text": "public function castFields()\n {\n foreach($this->table_desc as $field_name => $field_desc)\n {\n if($field_desc->php_type == 'integer' && $this->isEmpty($this->$field_name))\n $this->_fields[$field_name] = NULL;\n else if(isset($this->_fields[$field_name]) && !is_null($this->_fields[$field_name]))\n settype($this->_fields[$field_name], $field_desc->php_type);\n }\n }", "title": "" }, { "docid": "959de71230f925d6ec9cf9bf816d4b59", "score": "0.44936132", "text": "public function extraFields();", "title": "" }, { "docid": "7343ac932fe5eb3944c2561a6ac1149d", "score": "0.4489632", "text": "public function setNulls() {\n $pptId = $this->promoPrizeType->getPromoPrizeTypeId();\n\n // Depending on type of prize set NULLS\n if ($pptId == 1) {\n $this->factor = NULL;\n $this->name = NULL;\n $this->prize = NULL;\n }\n else if ($pptId == 2) {\n $this->points = NULL;\n $this->name = NULL;\n $this->prize = NULL;\n }\n else if ($pptId == 3) {\n $this->points = NULL;\n $this->factor = NULL;\n $this->prize = NULL;\n }\n else if ($pptId == 4) {\n $this->points = NULL;\n $this->factor = NULL;\n $this->name = NULL;\n }\n\n if (!$this->promo->usesPrMqNm()) {\n // Only 'Sorteo' promo has probability, maxQuantity, notification message\n $this->probability = NULL;\n $this->maxQuantity = NULL;\n $this->notificationMessage = NULL;\n }\n }", "title": "" }, { "docid": "3770d3af0d07c8e95c50a4688e8f0b42", "score": "0.44881365", "text": "public function setExtensionAttribute5(?string $value): void {\n $this->getBackingStore()->set('extensionAttribute5', $value);\n }", "title": "" }, { "docid": "ad69072cbb98a96f295d138b30fd030b", "score": "0.44872573", "text": "public function &setExtra41($extra41) {\n\t\t$this->notifyChanged(self::FIELD_EXTRA4_1,$this->extra41,$extra41);\n\t\t$this->extra41=$extra41;\n\t\treturn $this;\n\t}", "title": "" } ]
135398b84d9038a0090bd019a08e9a97
Add Attribute Description Languages
[ { "docid": "ca4999e9be47733ef72b01464576d652", "score": "0.71523046", "text": "public function addAttributeLanguages(&$data, &$allLanguages) {\n\t\tif (! empty ( $data ['attribute_description'] )) {\n\t\t\t$entered_keys = array_keys ( $data ['attribute_description'] );\n\t\t\tforeach ( $allLanguages as $language ) {\n\t\t\t\tif (! in_array ( $language ['language_id'], $entered_keys )) {\n\t\t\t\t\t$data ['attribute_description'] [$language ['language_id']] = array (\n\t\t\t\t\t\t\t'name' => $data ['attribute_description'] [$entered_keys [0]] ['name'] \n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "cef259ce644467dfdd2f0a10b0cbba3f", "score": "0.6574044", "text": "public function addAttributeGroupLanguages(&$data, &$allLanguages) {\n\t\tif (! empty ( $data ['attribute_group_description'] )) {\n\t\t\t$entered_keys = array_keys ( $data ['attribute_group_description'] );\n\t\t\tforeach ( $allLanguages as $language ) {\n\t\t\t\tif (! in_array ( $language ['language_id'], $entered_keys )) {\n\t\t\t\t\t$data ['attribute_group_description'] [$language ['language_id']] = array (\n\t\t\t\t\t\t\t'name' => $data ['attribute_group_description'] [$entered_keys [0]] ['name'] \n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9b8ceeb4ff3e2f8e30c80353cd3610d1", "score": "0.6455872", "text": "function chemset_language_attributes() {\n\t$attributes = array();\n\t$output = '';\n\t$lang = get_bloginfo('language');\n\tif ($lang && $lang !== 'en-US') {\n\t\t$attributes[] = \"lang=\\\"$lang\\\"\";\n\t} else {\n\t\t$attributes[] = 'lang=\"en\"';\n\t}\n\n\t$output = implode(' ', $attributes);\n\t$output = apply_filters('chemset_language_attributes', $output);\n\treturn $output;\n}", "title": "" }, { "docid": "b2cd495c9c823819a6c7b5bb5d785431", "score": "0.6224623", "text": "public function setDescription(string $description, string $langCode);", "title": "" }, { "docid": "62ac3747a6c43e8ed9b8a3bf1c79e74d", "score": "0.61998785", "text": "protected function getLangAttributes()\n\t{\n\t\treturn language_attributes();\n\t}", "title": "" }, { "docid": "6d7674e838bb6a385034a4c7558891e2", "score": "0.61697614", "text": "public function manageAttrLablesTranslation()\n {\n global $polylang, $woocommerce;\n\n if (!$polylang || !$woocommerce) {\n return false;\n }\n\n $attrs = wc_get_attribute_taxonomies();\n $section = __('Woocommerce Attributes', 'woopoly');\n foreach ($attrs as $attr) {\n pll_register_string(\n $attr->attribute_label\n , $attr->attribute_label\n , $section\n );\n }\n }", "title": "" }, { "docid": "f85ebf7013e1b60b65e850008b226dd2", "score": "0.60388774", "text": "public function getDescriptionAttribute()\n {\n return $this->translateOrNew($this->locale())->description;\n }", "title": "" }, { "docid": "f21388b140165495d0b055bc9a564c05", "score": "0.5998347", "text": "function roots_language_attributes() {\n $attributes = array();\n $output = '';\n\n if (is_rtl()) {\n $attributes[] = 'dir=\"rtl\"';\n }\n\n $lang = get_bloginfo('language');\n\n if ($lang) {\n $attributes[] = \"lang=\\\"$lang\\\"\";\n }\n\n $output = implode(' ', $attributes);\n $output = apply_filters('roots_language_attributes', $output);\n\n return $output;\n}", "title": "" }, { "docid": "aadb8700cfb7b130e1add7e8429b8863", "score": "0.5872694", "text": "public function attributeLabels()\n {\n return static::translatedAttributeLabels(Yii::app()->language);\n }", "title": "" }, { "docid": "98cb513ea819eaef4b0e5946df32da3c", "score": "0.57015544", "text": "public function attributeLabels(){\n\t\n\t}", "title": "" }, { "docid": "d95be8c1dac9f40b9d5a4754a96ca651", "score": "0.56815434", "text": "public function setDescriptionAttribute($value)\n {\n $this->attributes['description'] = ! empty($value) ? json_encode(! is_array($value) ? [app()->getLocale() => $value] : $value) : null;\n }", "title": "" }, { "docid": "a7a50ad36b422ffc7c5b18d474f3330f", "score": "0.5660643", "text": "public function setDescriptionAttribute($value)\n {\n $this->attributes['description'] = ucfirst($value);\n }", "title": "" }, { "docid": "e40b4e67d528e8c41bf2fe790dbe2d17", "score": "0.56468093", "text": "public function getDescription(string $langCode);", "title": "" }, { "docid": "1885faa6ac9af705e6de881a27b3ac0f", "score": "0.56217533", "text": "public function getDescriptionAttribute()\n {\n return $this->translation()->description;\n }", "title": "" }, { "docid": "b9828d89f30c5f335fe083bf3809246b", "score": "0.5621345", "text": "function setDescription($description);", "title": "" }, { "docid": "050d90e52c28fe2292ea6dedbbb57056", "score": "0.5604307", "text": "public function attributeLabels() {\n $newLabels = array(\n 'pic' => '右侧多张图片',\n );\n \n return array_merge(parent::attributeLabels(), $newLabels);\n }", "title": "" }, { "docid": "4dfac0b240ece9c7a74ed25e901acba3", "score": "0.5592373", "text": "public function addAttrsTranslateLinks()\n {\n global $pagenow;\n if ($pagenow !== 'edit.php') {\n return false;\n }\n\n $isAttrPage = isset($_GET['page']) &&\n esc_attr($_GET['page']) === 'product_attributes';\n\n if (!$isAttrPage) {\n return false;\n }\n\n $stringTranslationURL = add_query_arg(array(\n 'page' => 'mlang',\n 'tab' => 'strings',\n 'group' => __('Woocommerce Attributes', 'woopoly')\n ), admin_url('options-general.php'));\n\n /* Add attribute translate button */\n $buttonID = 'attrs-label-translation-button';\n $buttonCode = sprintf(\n '$(\"<a href=\\'%s\\' class=\\'button button-primary button-large\\'>%s</a><br><br>\")'\n . ' .insertBefore(\".attributes-table\");'\n , $stringTranslationURL\n , __('Translate Attributes Lables', 'woopoly')\n );\n\n /* Add attribute translate search link */\n $searchLinkID = 'attr-label-translate-search-link';\n $searchLinkCode = sprintf(\n \"$('.attributes-table .row-actions').each(function () {\\n\"\n . ' var $this = $(this);'\n . ' var attrName = $this.parent().find(\"strong a\").text();'\n . ' var attrTranslateUrl = \"%s&s=\"+attrName ;'\n . ' var attrTranslateHref = '\n . ' \"<span class=\\'translate\\'>\"'\n . ' + \"| \"'\n . ' + \"<a href=\\'\"+attrTranslateUrl+\"\\'>%s</a>\"'\n . ' + \"</span>\";'\n . ' $this.append(attrTranslateHref);'\n . \"\\n});\\n\"\n , $stringTranslationURL\n , __('Translate', 'woopoly')\n );\n\n /* Output code */\n Utilities::jsScriptWrapper($buttonID, $buttonCode);\n Utilities::jsScriptWrapper($searchLinkID, $searchLinkCode);\n }", "title": "" }, { "docid": "2fd911b933c39633d3b602c7845f7f43", "score": "0.55850065", "text": "public function setDescription($description);", "title": "" }, { "docid": "2fd911b933c39633d3b602c7845f7f43", "score": "0.55850065", "text": "public function setDescription($description);", "title": "" }, { "docid": "2fd911b933c39633d3b602c7845f7f43", "score": "0.55850065", "text": "public function setDescription($description);", "title": "" }, { "docid": "2fd911b933c39633d3b602c7845f7f43", "score": "0.55850065", "text": "public function setDescription($description);", "title": "" }, { "docid": "2fd911b933c39633d3b602c7845f7f43", "score": "0.55850065", "text": "public function setDescription($description);", "title": "" }, { "docid": "2fd911b933c39633d3b602c7845f7f43", "score": "0.55850065", "text": "public function setDescription($description);", "title": "" }, { "docid": "83dd73161e946b449db9645b2ff21a27", "score": "0.5575767", "text": "protected function html_buildLanguageDropDown()\n {\n\n }", "title": "" }, { "docid": "b0f1f8366157e17e0457928c2dd46e28", "score": "0.5569508", "text": "#[@xmlmapping(element= '@description')]\n public function setDescription($desc) {\n $this->desc= $desc;\n }", "title": "" }, { "docid": "da7adc89ee28c46d20222837a4162256", "score": "0.55675757", "text": "public function description() {\r\n return get_string('lang_' . $this->name() . '_help' , 'block_formal_langs');\r\n }", "title": "" }, { "docid": "d01938a22e3a8db1f893fb2f2160bb99", "score": "0.55525935", "text": "public static function getDescription() : string\n {\n return 'Translates the text into the language configured for the application.';\n }", "title": "" }, { "docid": "9fb1f220a03b368717a1e80642459dcf", "score": "0.5547602", "text": "function language_strings(&$string) {\n $string['assmgr_resource_text'] = 'Text';\n $string['assmgr_resource_text_description'] = 'Make a text document';\n $string['textresource'] = 'Text Resource';\n return $string;\n }", "title": "" }, { "docid": "88e834aa03e1c6b8e941ac3bdf1f4265", "score": "0.5521182", "text": "private function addCustomLanguage($language, $description = '') {\n\t\tglobal $amp_conf;\n\n\t\t$sql = \"INSERT INTO soundlang_customlangs (language, description) VALUES (:language, :description)\";\n\t\t$sth = $this->db->prepare($sql);\n\t\t$res = $sth->execute(array(\n\t\t\t':language' => $language,\n\t\t\t':description' => $description,\n\t\t));\n\n\t\t$destdir = $amp_conf['ASTVARLIBDIR'] . \"/sounds/\" . str_replace('/', '_', $language) . \"/\";\n\t\t@mkdir($destdir);\n\t}", "title": "" }, { "docid": "4deff67c7c0c009983a669b76281df7a", "score": "0.55119896", "text": "public function attributes()\n {\n return [\n 'accept' => trans('site::register.help.accept'),\n \n \n ];\n }", "title": "" }, { "docid": "166887e90bef2b3f1e302d8d99e6a499", "score": "0.5510422", "text": "public function attributeLabels() {\n return array(\n \"id\" => '#',\n \"name\" => 'Наименование',\n );\n }", "title": "" }, { "docid": "9188ad0d8d5ce78d06b4ea558924f7f3", "score": "0.5495014", "text": "protected function set_description()\n {\n }", "title": "" }, { "docid": "703bbadc6e6e89d12ed04ab7a3901a27", "score": "0.5492051", "text": "public function setDescription($description)\n {\n }", "title": "" }, { "docid": "b20e46f90cbfebd35eca2b049e9676e1", "score": "0.54858", "text": "function addSystemLanguage($attribute, $condition, $expectedValue){\n\n $condicion = new Condition( \"systemLanguage\", $condition, STRING, $expectedValue );\n $data = $condicion->parseConditionIntoAWS();\n \n $this->conditions[] = $data;\n }", "title": "" }, { "docid": "a53c216c37156eb798e10e675fede7e4", "score": "0.5472592", "text": "public function setItemDesc( $desc ){\n $this->setItemElm( 'description', $desc );\n }", "title": "" }, { "docid": "c50c2a1533d8b7f92472661639643307", "score": "0.5472276", "text": "function setDescription($value) {\n $this->description = $value;\n }", "title": "" }, { "docid": "ea1053a3bbf9cc3c4e4309499817d056", "score": "0.5469848", "text": "function setDescription($text) \n {\n $this->description = $text;\n }", "title": "" }, { "docid": "b8eeb0ae420d8261d068786ecabd7330", "score": "0.5444906", "text": "private function generateLangTableAttributes()\r {\r $this->_langTableAttributes['id'] = $this->primaryKey();\r $this->_langTableAttributes['owner_id'] = $this->integer();\r $this->_langTableAttributes['language'] = $this->string(6);\r\r foreach ($this->multilingiualAttributes as $attribute) {\r $type = ArrayHelper::remove($this->_attributes, $attribute);\r if ($attribute != null) {\r $this->_langTableAttributes[$attribute] = $type;\r }\r }\r\r $this->foreignKeys[] = [\r 'name' => $this->baseLangTableName . '_owner_id',\r 'table' => $this->langTableName,\r 'columns' => 'owner_id',\r 'refTable' => $this->tableName,\r 'delete' => 'CASCADE',\r 'update' => 'CASCADE',\r ];\r\r }", "title": "" }, { "docid": "c82806afec5bc672ba19594f36d6562e", "score": "0.5444142", "text": "public function addToLangList($strings)\n {\n $strings['effect'] = __('Effect', 'optimizepress-plus-pack');\n $strings['rotate_x_axis'] = __('Rotate X-Axis', 'optimizepress-plus-pack');\n $strings['letters_slide_from_top'] = __('Letters Slide From Top', 'optimizepress-plus-pack');\n $strings['letters_rotate_y_axis'] = __('Letters Rotate Y-Axis', 'optimizepress-plus-pack');\n $strings['loading_bar'] = __('Loading Bar', 'optimizepress-plus-pack');\n $strings['slide_from_top'] = __('Slide From Top', 'optimizepress-plus-pack');\n $strings['clip'] = __('Clip', 'optimizepress-plus-pack');\n $strings['zoom'] = __('Zoom', 'optimizepress-plus-pack');\n $strings['scale'] = __('Scale', 'optimizepress-plus-pack');\n $strings['push'] = __('Push', 'optimizepress-plus-pack');\n $strings['accent'] = __('Highlight colour', 'optimizepress-plus-pack');\n $strings['static_text'] = __('Static text', 'optimizepress-plus-pack');\n $strings['animated_text'] = __('Animated Text', 'optimizepress-plus-pack');\n $strings['type_fast'] = __('Type Fast', 'optimizepress-plus-pack');\n $strings['line_height_px'] = __('Line Height (px)', 'optimizepress-plus-pack');\n\n return $strings;\n }", "title": "" }, { "docid": "24f3e30a47f8de1cff138fc80e406383", "score": "0.54434943", "text": "function wpseo_save_all_descriptions()\n {\n }", "title": "" }, { "docid": "b52e67c5ec8229c153cea58bb44541bb", "score": "0.54379475", "text": "public function generate_meta_description()\n {\n }", "title": "" }, { "docid": "b52e67c5ec8229c153cea58bb44541bb", "score": "0.54379475", "text": "public function generate_meta_description()\n {\n }", "title": "" }, { "docid": "b52e67c5ec8229c153cea58bb44541bb", "score": "0.54378957", "text": "public function generate_meta_description()\n {\n }", "title": "" }, { "docid": "b52e67c5ec8229c153cea58bb44541bb", "score": "0.54378957", "text": "public function generate_meta_description()\n {\n }", "title": "" }, { "docid": "b52e67c5ec8229c153cea58bb44541bb", "score": "0.54378957", "text": "public function generate_meta_description()\n {\n }", "title": "" }, { "docid": "b6965c124271a6364acb8992c2793783", "score": "0.54263514", "text": "public function attributes()\n {\n return trans('cv_publishment.attributes');\n }", "title": "" }, { "docid": "ed79b2cdc541997f82f6c8f613ab9891", "score": "0.54240924", "text": "function setDescription($description){\n\t \t$this->description = $description;\n\t }", "title": "" }, { "docid": "e2efe0c5fe38a8f3bee5e3c1e4362ea0", "score": "0.54092216", "text": "public function getLangNameAttribute()\n {\n return trans(\\Conf::langPath().$this->attributes['lang']);\n }", "title": "" }, { "docid": "85cc7df9d9922c71f9ec6a988f0d4074", "score": "0.54007936", "text": "public function attraksi();", "title": "" }, { "docid": "b14f27c7d9cd41e882b6bebdc9b5b166", "score": "0.53965545", "text": "public function getDescription(): string {\n return 'Un café arabica';\n }", "title": "" }, { "docid": "8d86409423ade7453f8e949d9ed904ad", "score": "0.5383901", "text": "public function attributes()\n {\n return [\n 'description' => '描述',\n ];\n }", "title": "" }, { "docid": "b4238ad3aea59541f36ccf263521f1d0", "score": "0.5378917", "text": "public function attributes()\n {\n return RuleFactory::make(trans('roles.attributes'));\n }", "title": "" }, { "docid": "d2385ad51ce2b8fcf9acab52002fed55", "score": "0.53629375", "text": "public function addAttribute($data)\n\t{\n\t\t// Create new category entity.\n\t\t$this->attributes[]= new Attribute($data['id'],$data['title']);\n\n\t}", "title": "" }, { "docid": "264a6efc3a07fbbb89a68b2c821d2fc6", "score": "0.534686", "text": "function lang($line, $for = '', $attributes = array())\n\t{\n\t\t$line = get_instance()->lang->line($line);\n\n\t\tif ($for !== '')\n\t\t{\n\t\t\t$line = '<label for=\"'.$for.'\"'._stringify_attributes($attributes).'>'.$line.'</label>';\n\t\t}\n\n\t\treturn $line;\n\t}", "title": "" }, { "docid": "d3fce6a3e5764d589103f2178e680067", "score": "0.53424495", "text": "protected function addDescription( $text ) {\n $this->mDescription = $text;\n }", "title": "" }, { "docid": "2cf8bc2585b5d407af8aa5b63f016748", "score": "0.5340261", "text": "function description($element)\n\t\t{\n\t\t\t$tags = array('div','div');\n\t\t\n\t\t\tif($element['type'] == 'checkbox')\n\t\t\t{\n\t\t\t\t$tags = array('label for=\"'.$element['id'].'\"','label');\n\t\t\t}\n\t\t\n\t\t\t$output = \"<{$tags[0]} class='avia_description'>\";\n\t\t\t$output .= $element['desc'];\n\t\t\t$output .= \"</{$tags[1]}>\"; // <!--end avia_description-->\n\t\t\t$output .= '<div class=\"avia_control\">';\n\t\t\treturn $output;\t\t\n\t\t}", "title": "" }, { "docid": "7b560ab2021569f3b8525f0467fa59a0", "score": "0.533828", "text": "public function custom_category_description_editor()\n {\n }", "title": "" }, { "docid": "482e8e543c6b70a79b400739246b5cc9", "score": "0.5336026", "text": "protected function _addStrings() {\n parent::_addStrings();\n\n $this->string['Building.title'] = __('Gebäudeverwaltung');\n $this->string['Building.add-text'] = __('Es existieren noch keine Gebäude. Jetzt das erste Gebäude');\n }", "title": "" }, { "docid": "4cb747d283b9a0a765d390e1beafae47", "score": "0.53342456", "text": "function getDescription()\r\n\t{\r\n\t\treturn '\r\nLabel your items with one or more labels. \r\nThese labels can be used to categorize your items. \r\nLabels can be used to filter items shown on the index page, archive list page or archive pages of a blog.';\r\n\t}", "title": "" }, { "docid": "05624b08a4ecc9a8dd538e4efc3744a4", "score": "0.5333095", "text": "function abte_add_site_description_class( $attributes ) {\r\n\t$attributes['class'] .= ' screen-reader-text';\r\n\r\n\treturn $attributes;\r\n}", "title": "" }, { "docid": "9a264b34d706ac692d84fe25f87d9f1a", "score": "0.531504", "text": "public function getDescripcionUMAttribute()\n {\n return \"{$this->descripcion} ({$this->unidad_medida})\";\n }", "title": "" }, { "docid": "774aa40fad8736fa06ef6d0d21a292a3", "score": "0.5298285", "text": "public function setDescription( $description ){\r\n \r\n $this->description = $description;\r\n \r\n }", "title": "" }, { "docid": "ae6fdfc41a5c25d6f9060106845884fc", "score": "0.5282926", "text": "function addTranslation($a_title, $a_desc, $a_lang, $a_lang_default) {\n\t\tglobal $ilDB;\n\n\t\tif (empty($a_title)) {\n\t\t\t$a_title = \"NO TITLE\";\n\t\t}\n\n\t\t$query = \"INSERT INTO object_translation \" . \"(obj_id,title,description,lang_code,lang_default) \" . \"VALUES \" . \"(\"\n\t\t\t. $ilDB->quote($this->getId(), 'integer') . \",\" . $ilDB->quote($a_title, 'text') . \",\" . $ilDB->quote($a_desc, 'text') . \",\"\n\t\t\t. $ilDB->quote($a_lang, 'text') . \",\" . $ilDB->quote($a_lang_default, 'integer') . \")\";\n\t\t$res = $ilDB->manipulate($query);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "15b545cbafa408e3a7e58fc9b2791853", "score": "0.528074", "text": "public function setDescription(string $description)\n\t{\n\t\t$this->description=$description; \n\t\t$this->keyModified['description'] = 1; \n\n\t}", "title": "" }, { "docid": "87bb0701865219368954f5a9410dfe35", "score": "0.527513", "text": "public function addAttributeDataProvider()\n {\n return [\n ['eav_setup_test'],\n ['characters_59_characters_59_characters_59_characters_59_59_'],\n ];\n }", "title": "" }, { "docid": "7cb8609cd5202f4addece9898d788517", "score": "0.5274065", "text": "function abte_add_site_description_class( $attributes ) {\n\t$attributes['class'] .= ' screen-reader-text';\n\n\treturn $attributes;\n}", "title": "" }, { "docid": "fe3df7addce5293526a87cc74008c9fa", "score": "0.5255528", "text": "private function updateCustomLanguage($id, $language, $description = '') {\n\t\tglobal $amp_conf;\n\n\t\t$sql = \"UPDATE soundlang_customlangs SET language = :language, description = :description WHERE id = :id\";\n\t\t$sth = $this->db->prepare($sql);\n\t\t$res = $sth->execute(array(\n\t\t\t':id' => $id,\n\t\t\t':language' => $language,\n\t\t\t':description' => $description,\n\t\t));\n\n\t\t$destdir = $amp_conf['ASTVARLIBDIR'] . \"/sounds/\" . str_replace('/', '_', $language) . \"/\";\n\t\t@mkdir($destdir);\n\t}", "title": "" }, { "docid": "d05442e8a806c43f269038aa83f854f6", "score": "0.5250946", "text": "function sara_new_metaboxes_home_languages(){\n add_meta_box('data-languages', __('texto personalizado en la sección idiomas'), 'sara_metabox_languages', 'page', 'normal', 'high');\n}", "title": "" }, { "docid": "ce49964a3768fe6688a1d13a329c0892", "score": "0.5245261", "text": "public function updateDescription()\n {\n }", "title": "" }, { "docid": "fc947d98f4d6795cd5f79f3415c38e51", "score": "0.52303785", "text": "public function setDescription($desc) {\r\n $this->description = $desc;\r\n }", "title": "" }, { "docid": "c4197524fc796d5c28340fd365973f94", "score": "0.5225368", "text": "public function add_piece_language($data)\n {\n }", "title": "" }, { "docid": "4c77fdfd3a1d13b78e6d3dd85ffbf5a1", "score": "0.52144283", "text": "public function getdescription($lang=''){\n\t\treturn $this->getlangvar('description',$lang);\n\t\t}", "title": "" }, { "docid": "d7cff725bb901e7ae7dc67d277f3cffb", "score": "0.5213007", "text": "public function setDescription($description){\r\n\t\t$this->description = $description;\r\n\t}", "title": "" }, { "docid": "5380232bfaf92d04728b59097d851e91", "score": "0.520459", "text": "public function setDescription($description) { $this->_data->Description->Text = $description; return $this; }", "title": "" }, { "docid": "76478c7153bd488a746c9d6d155a94e9", "score": "0.52027345", "text": "public function setDescription($description){\n\t\t$this->description = $description;\n\t}", "title": "" }, { "docid": "5c2f8813f9b5d3b0d1da53345da9155d", "score": "0.5194086", "text": "public function setDescriptions($arrDescriptions)\n {\n $this->description = $arrDescriptions[LANG_ID];\n\n // set descriptions of all languages\n $this->descriptions = $arrDescriptions;\n }", "title": "" }, { "docid": "dcc54f088cd7108561e87c6638d482ba", "score": "0.5192234", "text": "protected function addElements() {\n $this->add([\n 'type' => 'text',\n 'name' => 'name',\n 'attributes' => [\n 'id' => 'name'\n ],\n ]);\n $this->add([\n 'type' => 'text',\n 'name' => 'description',\n 'attributes' => [\n 'id' => 'description'\n ],\n ]);\n }", "title": "" }, { "docid": "1cec0b36781e516072797e2f0e0ae98e", "score": "0.51852036", "text": "public function getdescription() {\n /**\n * Returning the resource Model for 'description'\n */\n return Mage::getResourceModel ( 'eav/entity_attribute' )->getIdByCode ( 'catalog_product', 'description' );\n }", "title": "" }, { "docid": "08517e59d12800e476c65c1d96310a37", "score": "0.5172563", "text": "public function attributeLabels()\n {\n return array_merge(parent::attributeLabels(), array(\n 'title' => \\yii::t('app', 'Title'),\n 'desc' => \\yii::t('app', 'Description'),\n 'type' => \\yii::t('app', 'Type'),\n 'fileExt' => \\yii::t('app', 'File extension'),\n 'isPublished' => \\yii::t('app', 'Is published'),\n 'dateCreated' => \\yii::t('app', 'Registration date'),\n 'const.type' => array(\n static::TYPE_GUIDANCE => \\yii::t('app', 'Guidance'),\n static::TYPE_REGULATIONS => \\yii::t('app', 'Regulations'),\n ),\n ));\n }", "title": "" }, { "docid": "19c759a9562780475b16abd9ac716d88", "score": "0.51694816", "text": "function hook_xmlsitemap_context_info_alter(&$info) {\n $info['vocabulary']['label'] = t('Site vocabularies');\n}", "title": "" }, { "docid": "9ea9f66e12c8471e662c86e674634780", "score": "0.51568186", "text": "public function setDescription($description)\n\t{\n\t\t$this->custom_description = $description;\n\t}", "title": "" }, { "docid": "0e6ee1be512de7f5687b4797dd03ee34", "score": "0.51525867", "text": "function load_Lang($name,$abbrev,$cname,$locale,$enc,$sela,$flag){\n\t\tglobal $language_list;\n\t\t$language_list[] = array('name' => $name ,\n\t\t\t'abbrev' => $abbrev,\n\t\t\t'cname' => $cname,\n\t\t\t'locale' => $locale,\n\t\t\t'enc' => $enc,\n\t\t\t'sela' => $sela,\n\t\t\t'flag' => $flag );\n\t}", "title": "" }, { "docid": "46b9c9a1c7d96f848a7f6579101c6984", "score": "0.51458305", "text": "public function addAtributeProduct($product_attribute)\n {\n foreach ($product_attribute['product_attribute_description'] as $language_id => $product_attribute_description) {\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_attribute WHERE product_id = '\" . (int)$product_attribute['product_id'] . \"' AND attribute_id = '\" . (int)$product_attribute['attribute_id'] . \"' AND language_id = '\" . (int)$language_id . \"'\");\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_attribute SET product_id = '\" . (int)$product_attribute['product_id'] . \"', attribute_id = '\" . (int)$product_attribute['attribute_id'] . \"', language_id = '\" . (int)$language_id . \"', text = '\" . $this->db->escape($product_attribute_description['name']) . \"'\");\n }\n }", "title": "" }, { "docid": "5721956a38d9db77f9f31b91518f9c16", "score": "0.51455283", "text": "public static function getDescription(LanguageInterface $lang): string\n {\n return static::$description ?? $lang->trans('luna.addon.' . static::getType() . '.desc');\n }", "title": "" }, { "docid": "b0096253f33c959fb2eb7a5df135acba", "score": "0.5144597", "text": "public function attributeLabels() {\n return [\n 'name'=>'Название проекта',\n 'url'=>'URL стартовой страницы проекта',\n 'code'=>'PHP-код - обработчик содержимого страницы ($data)',\n 'commited'=>'Готов',\n 'run'=>'Статус'\n ];\n }", "title": "" }, { "docid": "019a3b0cd2d21d7de631918b1de95785", "score": "0.51403385", "text": "public function attributeLabels() {\n return array(\n 'description' => 'Comment',\n 'decline_reason' => 'Reason',\n );\n }", "title": "" }, { "docid": "5de81d545509ac52ab9412c764fe1133", "score": "0.51395404", "text": "public function attributes()\n {\n return [\n 'name' => '\"Название шаблона\"',\n 'title' => '\"Заголовок сообщения\"',\n 'body' => '\"Тело сообщения\"',\n ];\n }", "title": "" }, { "docid": "0009f8257950689f2c4605b567b1b924", "score": "0.51341015", "text": "function wpseo_save_description()\n {\n }", "title": "" }, { "docid": "e5534f7865c1a189f329959f3d1a3479", "score": "0.5133046", "text": "public function attributeLabels(){\n return [\n 'id' => 'ID',\n 'recaptcha' => 'No offense but are you real?'\n ];\n }", "title": "" }, { "docid": "5db4857c0ff3dbbafdf7805763b787db", "score": "0.5128532", "text": "public function attributeLabels() {\n return [\n 'name' => 'Name',\n 'description' => 'Description'\n ];\n }", "title": "" }, { "docid": "b988eaf86d4ecc96120149b75a096d5e", "score": "0.51263976", "text": "function edd_settings_general_description_callback() {\n}", "title": "" }, { "docid": "15b1e1074f60f6753b2e5077ea4998ae", "score": "0.51253885", "text": "public function get_description() {}", "title": "" }, { "docid": "211899a41abba6f42fc564374ca192d7", "score": "0.5124528", "text": "function tool_callbacktest_add_htmlattributes() {\n return array(\n 'xmlns:og' => 'http://ogp.me/ns#', # this should be in the page\n 'escape' => \"some bad chars ' = & < > '\", # this should be in the page\n 'lang' => 'wrong', # don't allow this to be added\n 'dir' => 'up', # don't allow this to be added\n 'xml:lang' => 'wrong', # don't allow this to be added\n );\n}", "title": "" }, { "docid": "15b1e1074f60f6753b2e5077ea4998ae", "score": "0.5124374", "text": "public function get_description() {}", "title": "" }, { "docid": "b87563b1ea9eeef9571c07444d292fee", "score": "0.5123197", "text": "function language() {\n //\n // constructor\n // do not forget to update version\n //\n $this->author = 'Herman Tolentino MD';\n $this->version = \"0.4-\".date(\"Y-m-d\");\n $this->module = \"language\";\n $this->description = \"BBIS Module - Language\";\n }", "title": "" }, { "docid": "729de7bb7ea06bc2eea385020a5af77a", "score": "0.5122811", "text": "public function renderLabelLang($aAttributes=array()){\n return $this->_renderLabel('lang', $aAttributes);\n }", "title": "" }, { "docid": "02b489987aa72b1b45b258df75bf9a33", "score": "0.5118485", "text": "public function attributeLabels()\n {\n return array(\n\t\t\t\t\t'PdfBoxUrl' => 'PDFBox library elérési útja',\n );\n }", "title": "" }, { "docid": "cb78af50bfef4ee33bad1e3fd28548ad", "score": "0.5117732", "text": "public function get_descrizione();", "title": "" }, { "docid": "9835dd46f9ea6e6cbdcea804c65fb642", "score": "0.51088536", "text": "public function message()\n {\n return 'The :attribute requires at least either an English or a Chinese value.';\n }", "title": "" }, { "docid": "6a4bab36b62b4e51a10f36df6e7d30a1", "score": "0.5108831", "text": "public function setDescripcionAttribute($value)\n {\n $this->attributes['descripcion'] = strtoupper($value);\n }", "title": "" }, { "docid": "17b5647d68bf83b8a93a9e28b352a833", "score": "0.5108694", "text": "function get_attribute_description( $attribute, $term_raw ) {\n\t\t$term = get_term_by( 'slug', $term_raw, $attribute );\n\t\t/**\n\t\t * Filters the attribute name returned.\n\t\t *\n\t\t * @since 1.1.1\n\t\t *\n\t\t * @param string\n\t\t */\n\t\treturn apply_filters( 'queryloop_get_attribute_description', $term ? $term->description : '' );\n\t}", "title": "" } ]
a2c759b3973f1a9ea3868e3946375a9e
Get criteria for request.
[ { "docid": "3419fd6c42e0ed3ff1951983050868c6", "score": "0.68050796", "text": "public function getCriteria()\n {\n return $this->criteria;\n }", "title": "" } ]
[ { "docid": "ff472d16db17682850b0e484758c2c1e", "score": "0.7897291", "text": "private function getCriteria(Request $request)\n {\n // TODO implement actual functionality\n\n return [];\n }", "title": "" }, { "docid": "76bd21de0dd2db88c682aa817fbeb55c", "score": "0.7091975", "text": "function getCriteria() {\n $config = $this->getConfiguration();\n $criteria = array();\n if (isset($config['criteria']))\n $criteria = $config['criteria'];\n\n return $criteria;\n }", "title": "" }, { "docid": "fb6a7273b57fdb2a050d3c6abd11858b", "score": "0.69419765", "text": "public function getCriteria()\n {\n // TODO: Implement getCriteria() method.\n }", "title": "" }, { "docid": "cbc00e1152f377555906e599d8cfc4ae", "score": "0.68317425", "text": "public function buildCriteria(Request $request)\n {\n // get all the filters from the session\n $filters = $this->getFilters($request);\n\n // base criteria\n $query = User::orderBy($this->sortBy, $this->sortOrder);\n\n // add the criteria from the session\n // check request for passed filter values\n if (!empty($filters['filter_email'])) {\n // getting name from the request\n $name = $filters['filter_email'];\n $query->where('email', 'like', '%' . $name . '%');\n }\n\n if (!empty($filters['filter_name'])) {\n // getting name from the request\n $name = $filters['filter_name'];\n $query->where('name', 'like', '%' . $name . '%');\n }\n\n if (!empty($filters['filter_status'])) {\n $status = $filters['filter_status'];\n $query->where('user_status_id', '=', $status);\n\n // add to filters array\n $filters['filter_status'] = $status;\n }\n\n // change this - should be seperate\n if (!empty($filters['filter_rpp'])) {\n $this->rpp = $filters['filter_rpp'];\n }\n\n return $query;\n }", "title": "" }, { "docid": "d394bf7ec3c344e3089f28c1da6093c5", "score": "0.6791909", "text": "public function getCriteria() \n {\n return $this->_criteria;\n }", "title": "" }, { "docid": "04359edaf62e2619036115764d6c7811", "score": "0.6781407", "text": "public function criteria();", "title": "" }, { "docid": "32b9ddfa74d2afc1def559365d4bebd2", "score": "0.67463815", "text": "public function buildCriteria(Request $request)\n {\n // get all the filters from the session\n $filters = $this->getFilters($request);\n\n // base criteria\n $query = $this->baseCriteria();\n\n // add the criteria from the session\n // check request for passed filter values\n\n if (!empty($filters['filter_name'])) {\n // getting name from the request\n $name = $filters['filter_name'];\n $query->where('name', 'like', '%'.$name.'%');\n }\n\n if (!empty($filters['filter_occurrence_type'])) {\n $type = $filters['filter_occurrence_type'];\n // add has clause\n $query->whereHas('occurrenceType',\n function ($q) use ($type) {\n $q->where('name', '=', ucfirst($type));\n });\n }\n\n if (!empty($filters['filter_occurrence_week'])) {\n $week = $filters['filter_occurrence_week'];\n // add has clause\n $query->whereHas('occurrenceWeek',\n function ($q) use ($week) {\n $q->where('name', '=', ucfirst($week));\n });\n }\n\n if (!empty($filters['filter_occurrence_day'])) {\n $day = $filters['filter_occurrence_day'];\n // add has clause\n $query->whereHas('occurrenceDay',\n function ($q) use ($day) {\n $q->where('name', '=', ucfirst($day));\n });\n }\n\n if (!empty($filters['filter_tag'])) {\n $tag = $filters['filter_tag'];\n $query->whereHas('tags', function ($q) use ($tag) {\n $q->where('name', '=', ucfirst($tag));\n });\n }\n\n // change this - should be separate\n if (!empty($filters['filter_rpp'])) {\n $this->rpp = $filters['filter_rpp'];\n }\n\n return $query;\n }", "title": "" }, { "docid": "ef239f6148e772f2fd1a2c68deea08c1", "score": "0.67015177", "text": "public function getCriteria() {\n\t\treturn $this->criteria;\n\t}", "title": "" }, { "docid": "cc2fa6a953021007f942ca805975c4b9", "score": "0.66939944", "text": "public function getCriteria(){\n \n if ($this->criteria === false){\n $this->loadCriteria();\n }\n \n return $this->criteria;\n \n }", "title": "" }, { "docid": "7120b056fb2a2556bdb189412b75b4c6", "score": "0.6665214", "text": "public function getCriteria()\n\t{\n\t\treturn $this->criteria; \n\n\t}", "title": "" }, { "docid": "2bd0493572ce500d681b882784f9b229", "score": "0.6528067", "text": "public function buildCriteria(Request $request)\n {\n $hasFilter = 1;\n\n // get all the filters from the session\n $filters = $this->getFilters($request);\n\n // base criteria\n $query = EventReview::query();\n\n // add the criteria from the session\n // check request for passed filter values\n if (!empty($filters['filter_name'])) {\n // getting name from the request\n $name = $filters['filter_name'];\n $query->where('name', 'like', '%' . $name . '%');\n $filters['filter_name'] = $name;\n }\n\n if (!empty($filters['filter_tag'])) {\n $tag = $filters['filter_tag'];\n $query->whereHas('tags', function ($q) use ($tag) {\n $q->where('name', '=', ucfirst($tag));\n });\n\n // add to filters array\n $filters['filter_tag'] = $tag;\n }\n\n if (!empty($filters['filter_venue'])) {\n $venue = $filters['filter_venue'];\n // add has clause\n $query->whereHas('venue', function ($q) use ($venue) {\n $q->where('name', '=', $venue);\n });\n\n // add to filters array\n $filters['filter_venue'] = $venue;\n };\n\n if (!empty($filters['filter_related'])) {\n $related = $filters['filter_related'];\n $query->whereHas('entities', function ($q) use ($related) {\n $q->where('name', '=', ucfirst($related));\n });\n\n // add to filters array\n $filters['filter_related'] = $related;\n }\n\n // change this - should be separate\n if (!empty($filters['filter_rpp'])) {\n $this->rpp = $filters['filter_rpp'];\n }\n\n return $query;\n }", "title": "" }, { "docid": "7ec279a1116fe8ed6b080655d7b186bf", "score": "0.63801926", "text": "public function getQueryCriteria(): array\n {\n return [\n 'assigned' => new BooleanValidator,\n 'assigned_to_user' => new BooleanValidator,\n 'created_after' => new DateValidator,\n 'created_before' => new DateValidator,\n 'deleted' => new BooleanValidator,\n 'grade_equal_to' => new StringValidator,\n 'grade_greater_than' => new StringValidator,\n 'grade_less_than' => new StringValidator,\n 'id_greater_than' => new PositiveIntValidator,\n 'id_less_than' => new PositiveIntValidator,\n 'is_starred' => new BooleanValidator,\n 'last_activity_before' => new DateValidator,\n 'last_activity_after' => new DateValidator,\n 'last_activity_never' => new BooleanValidator,\n 'limit_related_records' => new BooleanValidator,\n 'list_id' => new PositiveIntValidator,\n 'new' => new BooleanValidator,\n 'score_equal_to' => new PositiveIntValidator,\n 'score_greater_than' => new PositiveIntValidator,\n 'score_less_than' => new PositiveIntValidator,\n 'updated_before' => new DateValidator,\n 'updated_after' => new DateValidator\n ];\n }", "title": "" }, { "docid": "7aa731223b6370605c69c6c9982c75be", "score": "0.6194311", "text": "public function getSearchCriteria()\n {\n return [\n 'name' => 'Name of the restaurant',\n 'capacity' => 'Capacity of the restaurant',\n ];\n }", "title": "" }, { "docid": "5d54ae76ff89f7b5af4b91239287ab50", "score": "0.61410403", "text": "public abstract function buildCriteria();", "title": "" }, { "docid": "2e7153303922b25c871db16d3f3f0c9c", "score": "0.6140147", "text": "public function getSearchCriteria() {\n\t\treturn $this->searchCriteria;\n\t}", "title": "" }, { "docid": "3c7ad922ddb95763ba59e0876f022dcc", "score": "0.6033089", "text": "public static function parseWhereFromRequest()\n {\n $name = static::$modelClass;\n $wheres = array();\n\n if (isset($_REQUEST))\n {\n $params = $_REQUEST;\n\n if (isset($params['q']))\n {\n unset($params['q']);\n }\n\n if (isset($params['limit']))\n {\n unset($params['limit']);\n }\n\n if (isset($params['offset']))\n {\n unset($params['offset']);\n }\n\n if (isset($params['orderBy']))\n {\n unset($params['orderBy']);\n }\n\n if (isset($params['orderWay']))\n {\n unset($params['orderWay']);\n }\n\n //put the params in the request, to filters can use\n \\DataHandle\\Request::getInstance()->setData($params);\n //create a model to use in datasource and in page\n $model = new $name();\n //used only to reference filter to work, need rework\n $page = new \\Page\\Crud($model);\n $ds = new \\DataSource\\Model($model);\n $gridColumns = $ds->getColumns();\n\n $filters = \\Component\\Grid\\MountFilter::getFilters($gridColumns, $model);\n\n if (is_array($filters))\n {\n foreach ($filters as $filter)\n {\n $cond = $filter->getDbCond();\n\n if ($cond)\n {\n $wheres[] = $cond;\n }\n }\n }\n }\n\n if (isset($_REQUEST['q']))\n {\n $wheres = $name::smartFilters($_REQUEST['q'], $wheres);\n }\n\n return $wheres;\n }", "title": "" }, { "docid": "37147318b59dc00667c87e6db9dfc7af", "score": "0.6026523", "text": "function criteria(){\n $id = $this->input->post('id', true);\n $key = $this->input->post('key', true);\n $name = $this->input->post('name', true);\n\n $criteria = \" where `deleted` = 0 \";\n if(!empty($id)){\n $criteria .= \" AND id = '\".addslashes($id).\"' \";\n }\n if(!empty($key)){\n $criteria .= \" AND permission_key like '%\".addslashes($key).\"%' \";\n }\n if(!empty($name)){\n $criteria .= \" AND permission_name like '%\".addslashes($name).\"%' \";\n }\n return $criteria;\n }", "title": "" }, { "docid": "5d55ba4237d9096071d1a55b1d42bb71", "score": "0.59917796", "text": "public function getSearchCriteria() {\n if (is_null($this->_searchCriteria))\n if (is_null($this->getRequest()->getParam('searchCriteria')))\n throw new \\Exception('Not found field: searchCriteria');\n else\n $this->_searchCriteria = new \\Magento\\Framework\\DataObject($this->getRequest()->getParam('searchCriteria'));\n\n return $this->_searchCriteria;\n }", "title": "" }, { "docid": "124a2add730250601790dc46f5cdbca7", "score": "0.59890294", "text": "private function getCriteria() {\n\t\t$criteria = new Criteria();\n\n\t\t$criteria->addJoin(RegistrationUserPeer::ID,RegistrationUserInfoPeer::USERID,Criteria::INNER_JOIN);\n\t\t$criteria->setIgnoreCase(true);\n\n\t\t$criterion = $criteria->getNewCriterion(RegistrationUserPeer::USERNAME,\"%\" . $this->searchString . \"%\",Criteria::LIKE);\n\t\t$criterion->addOr($criteria->getNewCriterion(RegistrationUserInfoPeer::NAME,\"%\" . $this->searchString . \"%\", Criteria::LIKE));\n\t\t$criterion->addOr($criteria->getNewCriterion(RegistrationUserInfoPeer::SURNAME,\"%\" . $this->searchString . \"%\", Criteria::LIKE));\n\t\t$criterion->addOr($criteria->getNewCriterion(RegistrationUserInfoPeer::MAILADDRESS,\"%\" . $this->searchString . \"%\", Criteria::LIKE));\n\n\t\t$criteria->addOr($criterion);\n\n\t\treturn $criteria;\n\t\n }", "title": "" }, { "docid": "0fd8a5b80c1ac3f8fe0061b1871af245", "score": "0.5949805", "text": "static function addMoreCriteria() {\n return array();\n }", "title": "" }, { "docid": "dfc3e1196333d7249a35ff6570f7e0ed", "score": "0.58992684", "text": "public function loadCriteria()\n\t{\n\t\t$criteria=new CDbCriteria();\n\t\t$criteria->with = array( 'engineer','jobStatus','customer', 'product');\n\t\t//$criteria->together = true;\n\t\t$criteria->compare('job_status_id',$_GET['job_status_id']);\n\t\t$criteria->compare('engineer.id',$_GET['engineer_id']);\n\n\t\t$criteria->compare( 'product.brand_id', $_GET['brand_id'] );\n\t\t$criteria->compare( 'product.product_type_id', $_GET['product_type_id'] );\n\t\t\n\t\t \n\t\t$criteria->compare( 'product.model_number', $_GET['product_model_number'], true);\n\t\t\n\t\t\n\t\tif ($_GET['fault_dateStartDate']!='')\n\t\t{\n\t\t\t$fault_dateStartDate=strtotime($_GET['fault_dateStartDate']);\n\t\t\t$fault_dateEndDate=strtotime($_GET['fault_dateEndDate']);\n\t\t\t$criteria->addBetweenCondition('fault_date', $fault_dateStartDate, $fault_dateEndDate);\n\t\t}\n\t\tif ($_GET['jobPaymentStartDate']!='')\n\t\t{\n\t\t\t$jobPaymentStartDate=strtotime($_GET['jobPaymentStartDate']);\n\t\t\t$jobPaymentEndDate=strtotime($_GET['jobPaymentEndDate']);\n\t\t\t$criteria->addBetweenCondition('job_payment_date', $jobPaymentStartDate, $jobPaymentEndDate);\n\t\t}\n\t\tif ($_GET['jobFinishedStartDate']!='')\n\t\t{\n\t\t\t$jobFinishedStartDate=strtotime($_GET['jobFinishedStartDate']);\n\t\t\t$jobFinishedEndDate=strtotime($_GET['jobFinishedEndDate']);\n\t\t\t$criteria->addBetweenCondition('job_finished_date', $jobFinishedStartDate, $jobFinishedEndDate);\n\t\t}\n\t\n\t\t\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "ce86bc173b80932066f5e4fff7727bc1", "score": "0.58984494", "text": "public function buildCriteria()\n\t{\n\t\t$criteria = new Criteria(CargoPeer::DATABASE_NAME);\n\n\t\tif ($this->isColumnModified(CargoPeer::ID)) $criteria->add(CargoPeer::ID, $this->id);\n\t\tif ($this->isColumnModified(CargoPeer::NOME)) $criteria->add(CargoPeer::NOME, $this->nome);\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "8d8857dab7be8bc07cf70e89a1a87a8c", "score": "0.5888008", "text": "public function fetchRequestRules()\n {\n if (($this->request->all())) {\n return array_intersect_key($this->rules, $this->request->all());\n }\n\n return;\n }", "title": "" }, { "docid": "8369c8773e038dbead8bf3b817d07e65", "score": "0.5803237", "text": "public function request(): array\n {\n $params = [\n 'params' => '',\n 'subquery' => '',\n ];\n\n $isSearch = false;\n $hasSubquery = false;\n\n //verify the user is searching for something\n if (array_key_exists('q', $this->request)) {\n $params['params'] = $this->request['q'];\n $isSearch = true;\n }\n\n //verify the request has a subquery\n if (array_key_exists('subq', $this->request)) {\n $params['subquery'] = $this->request['subq'];\n $hasSubquery = true;\n }\n\n //initialize the model params\n $modelSearchParams = $this->prepareSearch($params, $isSearch, $hasSubquery);\n\n //filter the field\n if (array_key_exists('fields', $this->request)) {\n $fields = $this->request['fields'];\n\n $modelSearchParams['columns'] = $this->parsePartialFields($fields);\n }\n\n // Set limits and offset, elsewise allow them to have defaults set in the Controller\n $page = array_key_exists('page', $this->request) ? $this->request['page'] : 1;\n if (array_key_exists('limit', $this->request)) {\n $limit = $this->request['limit'];\n }\n\n //sort\n if (array_key_exists('sort', $this->request) && !empty($this->request['sort'])) {\n $sort = $this->request['sort'];\n $sort = str_replace('|', ' ', $sort);\n\n $modelSearchParams['order'] = $sort;\n }\n\n //limit\n if (isset($limit)) {\n $offset = ($page - 1) * $limit;\n\n $modelSearchParams['limit'] = $limit;\n $modelSearchParams['offset'] = $offset;\n }\n\n return $modelSearchParams;\n }", "title": "" }, { "docid": "fc3045d837346890922378cb5e3d195b", "score": "0.57926786", "text": "public function buildCriteria()\n\t{\n\t\t$criteria = new Criteria(MissionRequestTempPeer::DATABASE_NAME);\n\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::ID)) $criteria->add(MissionRequestTempPeer::ID, $this->id);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQUEST_DATE)) $criteria->add(MissionRequestTempPeer::REQUEST_DATE, $this->request_date);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQUEST_BY)) $criteria->add(MissionRequestTempPeer::REQUEST_BY, $this->request_by);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQUEST_ON_BEHALF)) $criteria->add(MissionRequestTempPeer::REQUEST_ON_BEHALF, $this->request_on_behalf);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::APPT_DATE)) $criteria->add(MissionRequestTempPeer::APPT_DATE, $this->appt_date);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::RETURN_DATE)) $criteria->add(MissionRequestTempPeer::RETURN_DATE, $this->return_date);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::BAGGAGE_WEIGHT)) $criteria->add(MissionRequestTempPeer::BAGGAGE_WEIGHT, $this->baggage_weight);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::BAGGAGE_DESC)) $criteria->add(MissionRequestTempPeer::BAGGAGE_DESC, $this->baggage_desc);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_TITLE)) $criteria->add(MissionRequestTempPeer::PASS_TITLE, $this->pass_title);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_FIRST_NAME)) $criteria->add(MissionRequestTempPeer::PASS_FIRST_NAME, $this->pass_first_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_LAST_NAME)) $criteria->add(MissionRequestTempPeer::PASS_LAST_NAME, $this->pass_last_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_ADDRESS1)) $criteria->add(MissionRequestTempPeer::PASS_ADDRESS1, $this->pass_address1);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_ADDRESS2)) $criteria->add(MissionRequestTempPeer::PASS_ADDRESS2, $this->pass_address2);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_CITY)) $criteria->add(MissionRequestTempPeer::PASS_CITY, $this->pass_city);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_COUNTY)) $criteria->add(MissionRequestTempPeer::PASS_COUNTY, $this->pass_county);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_STATE)) $criteria->add(MissionRequestTempPeer::PASS_STATE, $this->pass_state);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_COUNTRY)) $criteria->add(MissionRequestTempPeer::PASS_COUNTRY, $this->pass_country);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_ZIPCODE)) $criteria->add(MissionRequestTempPeer::PASS_ZIPCODE, $this->pass_zipcode);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_DAY_PHONE)) $criteria->add(MissionRequestTempPeer::PASS_DAY_PHONE, $this->pass_day_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_DAY_COMMENT)) $criteria->add(MissionRequestTempPeer::PASS_DAY_COMMENT, $this->pass_day_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_EVE_PHONE)) $criteria->add(MissionRequestTempPeer::PASS_EVE_PHONE, $this->pass_eve_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_EVE_COMMENT)) $criteria->add(MissionRequestTempPeer::PASS_EVE_COMMENT, $this->pass_eve_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_MOBILE_PHONE)) $criteria->add(MissionRequestTempPeer::PASS_MOBILE_PHONE, $this->pass_mobile_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_MOBILE_COMMENT)) $criteria->add(MissionRequestTempPeer::PASS_MOBILE_COMMENT, $this->pass_mobile_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_PAGER_PHONE)) $criteria->add(MissionRequestTempPeer::PASS_PAGER_PHONE, $this->pass_pager_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_PAGER_COMMENT)) $criteria->add(MissionRequestTempPeer::PASS_PAGER_COMMENT, $this->pass_pager_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_OTHER_PHONE)) $criteria->add(MissionRequestTempPeer::PASS_OTHER_PHONE, $this->pass_other_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_OTHER_COMMENT)) $criteria->add(MissionRequestTempPeer::PASS_OTHER_COMMENT, $this->pass_other_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_EMAIL)) $criteria->add(MissionRequestTempPeer::PASS_EMAIL, $this->pass_email);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_DATE_OF_BIRTH)) $criteria->add(MissionRequestTempPeer::PASS_DATE_OF_BIRTH, $this->pass_date_of_birth);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::ILLNESS)) $criteria->add(MissionRequestTempPeer::ILLNESS, $this->illness);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::FINANCIAL)) $criteria->add(MissionRequestTempPeer::FINANCIAL, $this->financial);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_WEIGHT)) $criteria->add(MissionRequestTempPeer::PASS_WEIGHT, $this->pass_weight);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::RELEASING_PHYSICIAN)) $criteria->add(MissionRequestTempPeer::RELEASING_PHYSICIAN, $this->releasing_physician);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::RELEASE_PHONE)) $criteria->add(MissionRequestTempPeer::RELEASE_PHONE, $this->release_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::RELEASE_PHONE_COMMENT)) $criteria->add(MissionRequestTempPeer::RELEASE_PHONE_COMMENT, $this->release_phone_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::RELEASE_FAX)) $criteria->add(MissionRequestTempPeer::RELEASE_FAX, $this->release_fax);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::RELEASE_FAX_COMMENT)) $criteria->add(MissionRequestTempPeer::RELEASE_FAX_COMMENT, $this->release_fax_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::RELEASE_EMAIL)) $criteria->add(MissionRequestTempPeer::RELEASE_EMAIL, $this->release_email);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::TREATING_PHYSICIAN)) $criteria->add(MissionRequestTempPeer::TREATING_PHYSICIAN, $this->treating_physician);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::TREATING_PHONE)) $criteria->add(MissionRequestTempPeer::TREATING_PHONE, $this->treating_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::TREATING_PHONE_COMMENT)) $criteria->add(MissionRequestTempPeer::TREATING_PHONE_COMMENT, $this->treating_phone_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::TREATING_FAX)) $criteria->add(MissionRequestTempPeer::TREATING_FAX, $this->treating_fax);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::TREATING_FAX_COMMENT)) $criteria->add(MissionRequestTempPeer::TREATING_FAX_COMMENT, $this->treating_fax_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_TITLE)) $criteria->add(MissionRequestTempPeer::REQ_TITLE, $this->req_title);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_FIRST_NAME)) $criteria->add(MissionRequestTempPeer::REQ_FIRST_NAME, $this->req_first_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_LAST_NAME)) $criteria->add(MissionRequestTempPeer::REQ_LAST_NAME, $this->req_last_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::AGENCY_NAME)) $criteria->add(MissionRequestTempPeer::AGENCY_NAME, $this->agency_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_ADDRESS1)) $criteria->add(MissionRequestTempPeer::REQ_ADDRESS1, $this->req_address1);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_ADDRESS2)) $criteria->add(MissionRequestTempPeer::REQ_ADDRESS2, $this->req_address2);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_CITY)) $criteria->add(MissionRequestTempPeer::REQ_CITY, $this->req_city);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_COUNTY)) $criteria->add(MissionRequestTempPeer::REQ_COUNTY, $this->req_county);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_STATE)) $criteria->add(MissionRequestTempPeer::REQ_STATE, $this->req_state);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_COUNTRY)) $criteria->add(MissionRequestTempPeer::REQ_COUNTRY, $this->req_country);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_ZIPCODE)) $criteria->add(MissionRequestTempPeer::REQ_ZIPCODE, $this->req_zipcode);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_DAY_PHONE)) $criteria->add(MissionRequestTempPeer::REQ_DAY_PHONE, $this->req_day_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_DAY_COMMENT)) $criteria->add(MissionRequestTempPeer::REQ_DAY_COMMENT, $this->req_day_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_EVE_PHONE)) $criteria->add(MissionRequestTempPeer::REQ_EVE_PHONE, $this->req_eve_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_EVE_COMMENT)) $criteria->add(MissionRequestTempPeer::REQ_EVE_COMMENT, $this->req_eve_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_MOBILE_PHONE)) $criteria->add(MissionRequestTempPeer::REQ_MOBILE_PHONE, $this->req_mobile_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_MOBILE_COMMENT)) $criteria->add(MissionRequestTempPeer::REQ_MOBILE_COMMENT, $this->req_mobile_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_PAGER_PHONE)) $criteria->add(MissionRequestTempPeer::REQ_PAGER_PHONE, $this->req_pager_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_PAGER_COMMENT)) $criteria->add(MissionRequestTempPeer::REQ_PAGER_COMMENT, $this->req_pager_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_OTHER_PHONE)) $criteria->add(MissionRequestTempPeer::REQ_OTHER_PHONE, $this->req_other_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_OTHER_COMMENT)) $criteria->add(MissionRequestTempPeer::REQ_OTHER_COMMENT, $this->req_other_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_EMAIL)) $criteria->add(MissionRequestTempPeer::REQ_EMAIL, $this->req_email);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::ORIGIN_IDENT)) $criteria->add(MissionRequestTempPeer::ORIGIN_IDENT, $this->origin_ident);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::ORIGIN_ID)) $criteria->add(MissionRequestTempPeer::ORIGIN_ID, $this->origin_id);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::ORIGIN_CITY)) $criteria->add(MissionRequestTempPeer::ORIGIN_CITY, $this->origin_city);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::ORIGIN_STATE)) $criteria->add(MissionRequestTempPeer::ORIGIN_STATE, $this->origin_state);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::ORIGIN_ZIPCODE)) $criteria->add(MissionRequestTempPeer::ORIGIN_ZIPCODE, $this->origin_zipcode);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::DEST_IDENT)) $criteria->add(MissionRequestTempPeer::DEST_IDENT, $this->dest_ident);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::DEST_ID)) $criteria->add(MissionRequestTempPeer::DEST_ID, $this->dest_id);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::DEST_CITY)) $criteria->add(MissionRequestTempPeer::DEST_CITY, $this->dest_city);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::DEST_STATE)) $criteria->add(MissionRequestTempPeer::DEST_STATE, $this->dest_state);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::DEST_ZIPCODE)) $criteria->add(MissionRequestTempPeer::DEST_ZIPCODE, $this->dest_zipcode);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM1_NAME)) $criteria->add(MissionRequestTempPeer::COM1_NAME, $this->com1_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM1_RELATIONSHIP)) $criteria->add(MissionRequestTempPeer::COM1_RELATIONSHIP, $this->com1_relationship);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM1_DATE_OF_BIRTH)) $criteria->add(MissionRequestTempPeer::COM1_DATE_OF_BIRTH, $this->com1_date_of_birth);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM1_WEIGHT)) $criteria->add(MissionRequestTempPeer::COM1_WEIGHT, $this->com1_weight);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM1_PHONE)) $criteria->add(MissionRequestTempPeer::COM1_PHONE, $this->com1_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM1_COMMENT)) $criteria->add(MissionRequestTempPeer::COM1_COMMENT, $this->com1_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM2_NAME)) $criteria->add(MissionRequestTempPeer::COM2_NAME, $this->com2_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM2_RELATIONSHIP)) $criteria->add(MissionRequestTempPeer::COM2_RELATIONSHIP, $this->com2_relationship);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM2_DATE_OF_BIRTH)) $criteria->add(MissionRequestTempPeer::COM2_DATE_OF_BIRTH, $this->com2_date_of_birth);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM2_WEIGHT)) $criteria->add(MissionRequestTempPeer::COM2_WEIGHT, $this->com2_weight);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM2_PHONE)) $criteria->add(MissionRequestTempPeer::COM2_PHONE, $this->com2_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM2_COMMENT)) $criteria->add(MissionRequestTempPeer::COM2_COMMENT, $this->com2_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM3_NAME)) $criteria->add(MissionRequestTempPeer::COM3_NAME, $this->com3_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM3_RELATIONSHIP)) $criteria->add(MissionRequestTempPeer::COM3_RELATIONSHIP, $this->com3_relationship);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM3_DATE_OF_BIRTH)) $criteria->add(MissionRequestTempPeer::COM3_DATE_OF_BIRTH, $this->com3_date_of_birth);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM3_WEIGHT)) $criteria->add(MissionRequestTempPeer::COM3_WEIGHT, $this->com3_weight);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM3_PHONE)) $criteria->add(MissionRequestTempPeer::COM3_PHONE, $this->com3_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM3_COMMENT)) $criteria->add(MissionRequestTempPeer::COM3_COMMENT, $this->com3_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM4_NAME)) $criteria->add(MissionRequestTempPeer::COM4_NAME, $this->com4_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM4_RELATIONSHIP)) $criteria->add(MissionRequestTempPeer::COM4_RELATIONSHIP, $this->com4_relationship);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM4_DATE_OF_BIRTH)) $criteria->add(MissionRequestTempPeer::COM4_DATE_OF_BIRTH, $this->com4_date_of_birth);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM4_WEIGHT)) $criteria->add(MissionRequestTempPeer::COM4_WEIGHT, $this->com4_weight);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM4_PHONE)) $criteria->add(MissionRequestTempPeer::COM4_PHONE, $this->com4_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COM4_COMMENT)) $criteria->add(MissionRequestTempPeer::COM4_COMMENT, $this->com4_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::LODGING_NAME)) $criteria->add(MissionRequestTempPeer::LODGING_NAME, $this->lodging_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::LODGING_PHONE)) $criteria->add(MissionRequestTempPeer::LODGING_PHONE, $this->lodging_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::FACILITY_NAME)) $criteria->add(MissionRequestTempPeer::FACILITY_NAME, $this->facility_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::FACILITY_PHONE)) $criteria->add(MissionRequestTempPeer::FACILITY_PHONE, $this->facility_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::FACILITY_PHONE_COMMENT)) $criteria->add(MissionRequestTempPeer::FACILITY_PHONE_COMMENT, $this->facility_phone_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_LANGUAGE_SPOKEN)) $criteria->add(MissionRequestTempPeer::REQ_LANGUAGE_SPOKEN, $this->req_language_spoken);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::BEST_CONTACT)) $criteria->add(MissionRequestTempPeer::BEST_CONTACT, $this->best_contact);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::EMERGENCY_NAME)) $criteria->add(MissionRequestTempPeer::EMERGENCY_NAME, $this->emergency_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::EMERGENCY_PHONE1)) $criteria->add(MissionRequestTempPeer::EMERGENCY_PHONE1, $this->emergency_phone1);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::EMERGENCY_PHONE2)) $criteria->add(MissionRequestTempPeer::EMERGENCY_PHONE2, $this->emergency_phone2);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::EMERGENCY_PHONE1_COMMENT)) $criteria->add(MissionRequestTempPeer::EMERGENCY_PHONE1_COMMENT, $this->emergency_phone1_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::EMERGENCY_PHONE2_COMMENT)) $criteria->add(MissionRequestTempPeer::EMERGENCY_PHONE2_COMMENT, $this->emergency_phone2_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::COMMENT)) $criteria->add(MissionRequestTempPeer::COMMENT, $this->comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PROCESSED_DATE)) $criteria->add(MissionRequestTempPeer::PROCESSED_DATE, $this->processed_date);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::SESSION_ID)) $criteria->add(MissionRequestTempPeer::SESSION_ID, $this->session_id);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::IP_ADDRESS)) $criteria->add(MissionRequestTempPeer::IP_ADDRESS, $this->ip_address);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_FAX_PHONE1)) $criteria->add(MissionRequestTempPeer::PASS_FAX_PHONE1, $this->pass_fax_phone1);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_FAX_COMMENT1)) $criteria->add(MissionRequestTempPeer::PASS_FAX_COMMENT1, $this->pass_fax_comment1);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_FIRST_NAME)) $criteria->add(MissionRequestTempPeer::GUAR_FIRST_NAME, $this->guar_first_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_LAST_NAME)) $criteria->add(MissionRequestTempPeer::GUAR_LAST_NAME, $this->guar_last_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_ADDRESS1)) $criteria->add(MissionRequestTempPeer::GUAR_ADDRESS1, $this->guar_address1);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_ADDRESS2)) $criteria->add(MissionRequestTempPeer::GUAR_ADDRESS2, $this->guar_address2);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_CITY)) $criteria->add(MissionRequestTempPeer::GUAR_CITY, $this->guar_city);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_STATE)) $criteria->add(MissionRequestTempPeer::GUAR_STATE, $this->guar_state);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_ZIPCODE)) $criteria->add(MissionRequestTempPeer::GUAR_ZIPCODE, $this->guar_zipcode);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_DAY_PHONE)) $criteria->add(MissionRequestTempPeer::GUAR_DAY_PHONE, $this->guar_day_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_DAY_COMMENT)) $criteria->add(MissionRequestTempPeer::GUAR_DAY_COMMENT, $this->guar_day_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_EVE_PHONE)) $criteria->add(MissionRequestTempPeer::GUAR_EVE_PHONE, $this->guar_eve_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_EVE_COMMENT)) $criteria->add(MissionRequestTempPeer::GUAR_EVE_COMMENT, $this->guar_eve_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_FAX_PHONE1)) $criteria->add(MissionRequestTempPeer::GUAR_FAX_PHONE1, $this->guar_fax_phone1);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_FAX_COMMENT1)) $criteria->add(MissionRequestTempPeer::GUAR_FAX_COMMENT1, $this->guar_fax_comment1);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_MOBILE_PHONE)) $criteria->add(MissionRequestTempPeer::GUAR_MOBILE_PHONE, $this->guar_mobile_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_MOBILE_COMMENT)) $criteria->add(MissionRequestTempPeer::GUAR_MOBILE_COMMENT, $this->guar_mobile_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_PAGER_PHONE)) $criteria->add(MissionRequestTempPeer::GUAR_PAGER_PHONE, $this->guar_pager_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_PAGER_COMMENT)) $criteria->add(MissionRequestTempPeer::GUAR_PAGER_COMMENT, $this->guar_pager_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_OTHER_PHONE)) $criteria->add(MissionRequestTempPeer::GUAR_OTHER_PHONE, $this->guar_other_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_OTHER_COMMENT)) $criteria->add(MissionRequestTempPeer::GUAR_OTHER_COMMENT, $this->guar_other_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUAR_GUAR_EMAIL)) $criteria->add(MissionRequestTempPeer::GUAR_GUAR_EMAIL, $this->guar_guar_email);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_FAX_PHONE1)) $criteria->add(MissionRequestTempPeer::REQ_FAX_PHONE1, $this->req_fax_phone1);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_FAX_COMMENT1)) $criteria->add(MissionRequestTempPeer::REQ_FAX_COMMENT1, $this->req_fax_comment1);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_ENGLISH)) $criteria->add(MissionRequestTempPeer::PASS_ENGLISH, $this->pass_english);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_LANGUAGE)) $criteria->add(MissionRequestTempPeer::PASS_LANGUAGE, $this->pass_language);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::APPT_TIME)) $criteria->add(MissionRequestTempPeer::APPT_TIME, $this->appt_time);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQUESTER_ID)) $criteria->add(MissionRequestTempPeer::REQUESTER_ID, $this->requester_id);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASSENGER_ID)) $criteria->add(MissionRequestTempPeer::PASSENGER_ID, $this->passenger_id);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::MISSION_ID)) $criteria->add(MissionRequestTempPeer::MISSION_ID, $this->mission_id);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::TREATING_EMAIL)) $criteria->add(MissionRequestTempPeer::TREATING_EMAIL, $this->treating_email);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_HEIGHT)) $criteria->add(MissionRequestTempPeer::PASS_HEIGHT, $this->pass_height);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::RETURN_TIME)) $criteria->add(MissionRequestTempPeer::RETURN_TIME, $this->return_time);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_OXYGEN)) $criteria->add(MissionRequestTempPeer::PASS_OXYGEN, $this->pass_oxygen);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_MEDICAL)) $criteria->add(MissionRequestTempPeer::PASS_MEDICAL, $this->pass_medical);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REFERRAL_SOURCE_ID)) $criteria->add(MissionRequestTempPeer::REFERRAL_SOURCE_ID, $this->referral_source_id);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::FOLLOW_UP_CONTACT_NAME)) $criteria->add(MissionRequestTempPeer::FOLLOW_UP_CONTACT_NAME, $this->follow_up_contact_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::FOLLOW_UP_CONTACT_PHONE)) $criteria->add(MissionRequestTempPeer::FOLLOW_UP_CONTACT_PHONE, $this->follow_up_contact_phone);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::FOLLOW_UP_EMAIL)) $criteria->add(MissionRequestTempPeer::FOLLOW_UP_EMAIL, $this->follow_up_email);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::MISS_REQ_ORIGINATOR_AFA_ORG_ID)) $criteria->add(MissionRequestTempPeer::MISS_REQ_ORIGINATOR_AFA_ORG_ID, $this->miss_req_originator_afa_org_id);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::AFA_ORG_ID)) $criteria->add(MissionRequestTempPeer::AFA_ORG_ID, $this->afa_org_id);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::AFA_ORG_MISSION_ID)) $criteria->add(MissionRequestTempPeer::AFA_ORG_MISSION_ID, $this->afa_org_mission_id);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::MISSION_REQUEST_TYPE)) $criteria->add(MissionRequestTempPeer::MISSION_REQUEST_TYPE, $this->mission_request_type);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::LAST_PAGE_PROCESSED)) $criteria->add(MissionRequestTempPeer::LAST_PAGE_PROCESSED, $this->last_page_processed);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUARDIAN_MIDDLE_NAME)) $criteria->add(MissionRequestTempPeer::GUARDIAN_MIDDLE_NAME, $this->guardian_middle_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUARDIAN_NICKNAME)) $criteria->add(MissionRequestTempPeer::GUARDIAN_NICKNAME, $this->guardian_nickname);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUARDIAN_PAGER_EMAIL)) $criteria->add(MissionRequestTempPeer::GUARDIAN_PAGER_EMAIL, $this->guardian_pager_email);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUARDIAN_SECONDARY_EMAIL)) $criteria->add(MissionRequestTempPeer::GUARDIAN_SECONDARY_EMAIL, $this->guardian_secondary_email);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUARDIAN_SUFFIX)) $criteria->add(MissionRequestTempPeer::GUARDIAN_SUFFIX, $this->guardian_suffix);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUARDIAN_TITLE)) $criteria->add(MissionRequestTempPeer::GUARDIAN_TITLE, $this->guardian_title);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUARDIAN_VETERAN)) $criteria->add(MissionRequestTempPeer::GUARDIAN_VETERAN, $this->guardian_veteran);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_GENDER)) $criteria->add(MissionRequestTempPeer::PASS_GENDER, $this->pass_gender);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_MIDDLE_NAME)) $criteria->add(MissionRequestTempPeer::PASS_MIDDLE_NAME, $this->pass_middle_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_NICKNAME)) $criteria->add(MissionRequestTempPeer::PASS_NICKNAME, $this->pass_nickname);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_PAGER_EMAIL)) $criteria->add(MissionRequestTempPeer::PASS_PAGER_EMAIL, $this->pass_pager_email);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_SECONDARY_EMAIL)) $criteria->add(MissionRequestTempPeer::PASS_SECONDARY_EMAIL, $this->pass_secondary_email);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_SUFFIX)) $criteria->add(MissionRequestTempPeer::PASS_SUFFIX, $this->pass_suffix);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::PASS_VETERAN)) $criteria->add(MissionRequestTempPeer::PASS_VETERAN, $this->pass_veteran);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_MIDDLE_NAME)) $criteria->add(MissionRequestTempPeer::REQ_MIDDLE_NAME, $this->req_middle_name);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_NICKNAME)) $criteria->add(MissionRequestTempPeer::REQ_NICKNAME, $this->req_nickname);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_PAGER_EMAIL)) $criteria->add(MissionRequestTempPeer::REQ_PAGER_EMAIL, $this->req_pager_email);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_SECONDARY_EMAIL)) $criteria->add(MissionRequestTempPeer::REQ_SECONDARY_EMAIL, $this->req_secondary_email);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_SUFFIX)) $criteria->add(MissionRequestTempPeer::REQ_SUFFIX, $this->req_suffix);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_VETERAN)) $criteria->add(MissionRequestTempPeer::REQ_VETERAN, $this->req_veteran);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::LODGING_PHONE_COMMENT)) $criteria->add(MissionRequestTempPeer::LODGING_PHONE_COMMENT, $this->lodging_phone_comment);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::REQ_GENDER)) $criteria->add(MissionRequestTempPeer::REQ_GENDER, $this->req_gender);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::GUARDIAN_GENDER)) $criteria->add(MissionRequestTempPeer::GUARDIAN_GENDER, $this->guardian_gender);\n\t\tif ($this->isColumnModified(MissionRequestTempPeer::AGENCY_POSITION)) $criteria->add(MissionRequestTempPeer::AGENCY_POSITION, $this->agency_position);\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "4888d908a0b8bac29ba7445473fddf8c", "score": "0.57606226", "text": "public function searchCriteriaAction()\n {\n $entity = new Person();\n $form = $this->createSearchForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "title": "" }, { "docid": "84033520c88cd502da04fe2592bb5434", "score": "0.5646206", "text": "public function getCriteria() {\n\t\tif ($this->_criteria == null) {\n\t\t\treturn $this->_criteria = CriteriaAdapter::createOrderBy(\n\t\t\t\t$this->activeRecord->tableSchema->primaryKey\n\t\t\t);\n\t\t} else {\n\t\t\treturn $this->_criteria;\n\t\t}\n\t}", "title": "" }, { "docid": "7a3273e33599e9be74c65e0f4b25f937", "score": "0.5627585", "text": "public function getConditions();", "title": "" }, { "docid": "7684de4547cf8ef0f4137261a74d0e94", "score": "0.5621604", "text": "public function criteriaSearch()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->addBetweenCondition('tanggal',$this->tgl_awal,$this->tgl_akhir);\n if(is_array($this->obatalkes_id)){\n $criteria->addInCondition('obatalkes_id', $this->obatalkes_id);\n }else{\n $criteria->compare('obatalkes_id',$this->obatalkes_id);\n } \n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "4a96c1562c4a9c9d94e172e626b71b38", "score": "0.56139183", "text": "public function getRequest() {\n\n return array(\n \"current\" => $this->_current,\n \"rowCount\" => $this->_rowCount,\n \"sortOrder\" => $this->_sortOrder,\n \"sortColumn\" => $this->_sortColumn,\n \"searchPhrase\" => $this->_searchPhrase\n );\n\n }", "title": "" }, { "docid": "4475484b17032f5c28e6aa97e29fd754", "score": "0.558501", "text": "protected function createCriteria(){\n return new Criteria($this);\n }", "title": "" }, { "docid": "5f74d89b45b7025ef8266ea60f509f36", "score": "0.5576074", "text": "public function buildModelCriteria()\n {\n // Get current user id\n if ($this->securityContext->hasAdminUser()) {\n $adminUser = $this->securityContext->getAdminUser();\n $user_locale = $this->securityContext->getAdminUser()->getLocale();\n $search = ShortcutsQuery::create()->joinWithI18n($user_locale)->orderByPosition();\n $search->where('admin_id = '. $adminUser->getId() . ' OR admin_id IS NULL');\n\n return $search;\n } else {\n return array();\n }\n\n }", "title": "" }, { "docid": "2aabce767bb04102e37b6781002520d1", "score": "0.5566298", "text": "public function criteriaSearch()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('mberitakomentar_id',$this->mberitakomentar_id);\n\t\t$criteria->compare('mberita_id',$this->mberita_id);\n\t\t$criteria->compare('LOWER(tglkomentar)',strtolower($this->tglkomentar),true);\n\t\t$criteria->compare('LOWER(namakomentar)',strtolower($this->namakomentar),true);\n\t\t$criteria->compare('LOWER(emailkomentar)',strtolower($this->emailkomentar),true);\n\t\t$criteria->compare('LOWER(isikomentar)',strtolower($this->isikomentar),true);\n\t\t$criteria->compare('tampilkankomentar',$this->tampilkankomentar);\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "f06c7d68f1d872e19e84aacd9fd420d6", "score": "0.5558575", "text": "public function buildCriteria()\n\t{\n\t\t$criteria = new Criteria(OrgaoPeer::DATABASE_NAME);\n\n\t\tif ($this->isColumnModified(OrgaoPeer::CO_ORGAO)) $criteria->add(OrgaoPeer::CO_ORGAO, $this->co_orgao);\n\t\tif ($this->isColumnModified(OrgaoPeer::NO_ORGAO)) $criteria->add(OrgaoPeer::NO_ORGAO, $this->no_orgao);\n\t\tif ($this->isColumnModified(OrgaoPeer::NU_TELEFONE_ORGAO)) $criteria->add(OrgaoPeer::NU_TELEFONE_ORGAO, $this->nu_telefone_orgao);\n\t\tif ($this->isColumnModified(OrgaoPeer::SG_ORGAO)) $criteria->add(OrgaoPeer::SG_ORGAO, $this->sg_orgao);\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "492ee7faa3f09861b924fc1963048905", "score": "0.5557646", "text": "protected function getRequirementWhereTerms() {\n\t\treturn $this->requirementWhere;\n\t}", "title": "" }, { "docid": "5779357a4fe778063cb45e0771708010", "score": "0.55533355", "text": "public function getSearchCriteria()\n {\n return isset($this->SearchCriteria) ? $this->SearchCriteria : null;\n }", "title": "" }, { "docid": "5779357a4fe778063cb45e0771708010", "score": "0.55533355", "text": "public function getSearchCriteria()\n {\n return isset($this->SearchCriteria) ? $this->SearchCriteria : null;\n }", "title": "" }, { "docid": "14de1a1777f68dfb4bbcbd0625cf70ea", "score": "0.55380267", "text": "public function getConditions()\n {\n return $this->conditions;\n }", "title": "" }, { "docid": "14de1a1777f68dfb4bbcbd0625cf70ea", "score": "0.55380267", "text": "public function getConditions()\n {\n return $this->conditions;\n }", "title": "" }, { "docid": "07afd43cc3399678982b4a938b2e6c5c", "score": "0.5529603", "text": "public function buildModelCriteria()\n {\n /** Get an array composed of the paid and processing order statuses */\n $status = OrderStatusQuery::create()\n ->filterByCode(\n [\n OrderStatus::CODE_PAID,\n OrderStatus::CODE_PROCESSING,\n ],\n Criteria::IN\n )\n ->find()\n ->toArray('code');\n\n /** Verify what modules are installed */\n $moduleIds = [];\n if ($colissimoWS = ModuleQuery::create()->findOneByCode(ColissimoLabel::AUTHORIZED_MODULES[0])) {\n $moduleIds[] = $colissimoWS->getId();\n }\n if ($soColissimo = ModuleQuery::create()->findOneByCode(ColissimoLabel::AUTHORIZED_MODULES[1])) {\n $moduleIds[] = $soColissimo->getId();\n }\n if ($colissimoHomeDelivery = ModuleQuery::create()->findOneByCode(ColissimoLabel::AUTHORIZED_MODULES[2])) {\n $moduleIds[] = $colissimoHomeDelivery->getId();\n }\n if ($colissimoPickupPoint = ModuleQuery::create()->findOneByCode(ColissimoLabel::AUTHORIZED_MODULES[3])) {\n $moduleIds[] = $colissimoPickupPoint->getId();\n }\n\n $query = OrderQuery::create()\n ->filterByDeliveryModuleId(\n $moduleIds,\n Criteria::IN\n )\n ->filterByStatusId(\n [\n $status[OrderStatus::CODE_PAID]['Id'],\n $status[OrderStatus::CODE_PROCESSING]['Id'],\n ],\n Criteria::IN\n );\n\n return $query;\n }", "title": "" }, { "docid": "735ce6b4369bd1e1745a743c4c7bb25f", "score": "0.5517792", "text": "public function getConditions()\n {\n return $this->conditions;\n }", "title": "" }, { "docid": "eb5c9fe70b0723e6d5f9209e4f7442ed", "score": "0.55159533", "text": "static function getDefaultSearchRequest() {\n\n $search = ['criteria' => [0 => ['field' => 12,\n 'searchtype' => 'equals',\n 'value' => 'notold']],\n 'sort' => 19,\n 'order' => 'DESC'];\n\n return $search;\n }", "title": "" }, { "docid": "23633e262dcc5293680bf5887c4ef54f", "score": "0.55006826", "text": "public function getCriteria()\n {\n $this->assertEquals(array('regex' => '/^([a-z]{3})$/'), $this->regexValidator->getCriteria());\n }", "title": "" }, { "docid": "1072919000fdc3ef131a2a26cdbf5ad2", "score": "0.5479527", "text": "public static function getConditions()\n {\n return static::$_conditions;\n }", "title": "" }, { "docid": "52de56bbca6b55aa95a83e5e7840715b", "score": "0.54619485", "text": "public function getFromApiCond(): string\n\t{\n\t\t$searchCriteria = [];\n\t\tif (!empty($this->lastScan['start_date'])) {\n\t\t\t$searchCriteria[] = 'dataCzasModyfikacjiDo=' . $this->getFormattedTime($this->lastScan['start_date']);\n\t\t}\n\t\tif (!empty($this->lastScan['end_date'])) {\n\t\t\t$searchCriteria[] = 'dataCzasModyfikacjiOd=' . $this->getFormattedTime($this->lastScan['end_date']);\n\t\t}\n\t\t$searchCriteria[] = 'limit=' . $this->config->get($this::LIMIT_NAME);\n\t\t$searchCriteria = implode('&', $searchCriteria);\n\t\treturn $searchCriteria ?? '';\n\t}", "title": "" }, { "docid": "5a26eb96bcea1c7c12e7b1effe4275a6", "score": "0.5455903", "text": "public function buildPkeyCriteria()\n\t{\n\t\t$criteria = new Criteria(MissionRequestTempPeer::DATABASE_NAME);\n\n\t\t$criteria->add(MissionRequestTempPeer::ID, $this->id);\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "22f02ba92ca73279e0ffb7a5ab078b6c", "score": "0.5443318", "text": "function query(SearchCriteria $criteria);", "title": "" }, { "docid": "929e95712c1c0b5d8e0bd5fda66714c4", "score": "0.54341197", "text": "public function buildCriteria()\n\t{\n\t\t$criteria = new Criteria(EnumItemPeer::DATABASE_NAME);\n\n\t\tif ($this->isColumnModified(EnumItemPeer::ID)) $criteria->add(EnumItemPeer::ID, $this->id);\n\t\tif ($this->isColumnModified(EnumItemPeer::PARENT_ID)) $criteria->add(EnumItemPeer::PARENT_ID, $this->parent_id);\n\t\tif ($this->isColumnModified(EnumItemPeer::DESCR)) $criteria->add(EnumItemPeer::DESCR, $this->descr);\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "8ff0619dd47e4685b9d2f257eae3f246", "score": "0.5432909", "text": "public function get_wheres() {\r\n\t\treturn $this->wheres;\r\n\t}", "title": "" }, { "docid": "2b8a6cc9963328c291508de5ded23f56", "score": "0.5432888", "text": "public function criteriaSearch()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('antrian_id',$this->antrian_id);\n\t\t$criteria->compare('ruangan_id',$this->ruangan_id);\n\t\t$criteria->compare('carabayar_id',$this->carabayar_id);\n\t\t$criteria->compare('pendaftaran_id',$this->pendaftaran_id);\n\t\t$criteria->compare('profilrs_id',$this->profilrs_id);\n\t\t$criteria->compare('LOWER(noantrian)',strtolower($this->noantrian),true);\n\t\t$criteria->compare('LOWER(statuspasien)',strtolower($this->statuspasien),true);\n\t\t$criteria->compare('LOWER(carabayar_loket)',strtolower($this->carabayar_loket),true);\n\t\t$criteria->compare('panggil_flaq',$this->panggil_flaq);\n\t\t$criteria->compare('loket_id',$this->loket_id);\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "464dd80df1b394d45905fcadf3580146", "score": "0.5427779", "text": "public function buildCriteria()\n\t{\n\t\t$criteria = new Criteria(TbModuloPeer::DATABASE_NAME);\n\n\t\tif ($this->isColumnModified(TbModuloPeer::CO_SEQ_MODULO)) $criteria->add(TbModuloPeer::CO_SEQ_MODULO, $this->co_seq_modulo);\n\t\tif ($this->isColumnModified(TbModuloPeer::CO_PROJETO)) $criteria->add(TbModuloPeer::CO_PROJETO, $this->co_projeto);\n\t\tif ($this->isColumnModified(TbModuloPeer::NO_MODULO)) $criteria->add(TbModuloPeer::NO_MODULO, $this->no_modulo);\n\t\tif ($this->isColumnModified(TbModuloPeer::DS_MODULO)) $criteria->add(TbModuloPeer::DS_MODULO, $this->ds_modulo);\n\t\tif ($this->isColumnModified(TbModuloPeer::ST_MODULO)) $criteria->add(TbModuloPeer::ST_MODULO, $this->st_modulo);\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "9c4e4fe86c6f5233a5b831053732611c", "score": "0.54109913", "text": "public function &conditions(): array {\n return $this->condition->conditions();\n }", "title": "" }, { "docid": "d716fc08361221e600a448d3308fbd23", "score": "0.53890157", "text": "private function getSearchCriteria() {\r\n\t\t$criteria = new Criteria();\r\n\t\t$criteria->setIgnoreCase(true);\r\n\t\t$criteria->setLimit($this->limit);\r\n\t\t$criteria->addDescendingOrderByColumn(HeadlinePeer::ID);\r\n\r\n\t\tif (!empty($this->adminActId)) {\r\n\t\t\t$headlinesParticipatingIds = AdminActParticipantQuery::create()\r\n\t\t\t\t\t\t\t\t\t->filterByAdminActId($this->adminActId)\r\n\t\t\t\t\t\t\t\t\t->filterByObjectType('Headline')\r\n\t\t\t\t\t\t\t\t\t->select('Objectid')\r\n\t\t\t\t\t\t\t\t\t->find();\r\n\t\t\t$criteria->add(HeadlinePeer::ID, $headlinesParticipatingIds,Criteria::NOT_IN);\r\n\t\t}\r\n\r\n\t\tif (!empty($this->issueId)) {\r\n\t\t\t$issue = IssueQuery::create()->findPk($this->issueId);\r\n\t\t\t$issueHeadlinesIds = $issue->getAssignedHeadlinesArray();\r\n\t\t\tif (!empty($this->candidates))\r\n\t\t\t\t$criteria->add(HeadlinePeer::ID, $issueHeadlinesIds,Criteria::NOT_IN);\r\n\t\t\telse\r\n\t\t\t\t$criteria->filterByIssueId($this->issueId);\r\n\t\t}\r\n\r\n\t\tif (!empty($this->headlineId)) {\r\n\t\t\t$headline = HeadlineQuery::create()->findPk($this->headlineId);\r\n\t\t\t$headlineHeadlinesIds = $headline->getAssignedHeadlinesArray();\r\n\t\t\tif (!empty($this->candidates))\r\n\t\t\t\t$criteria->add(HeadlinePeer::ID, $headlineHeadlinesIds,Criteria::NOT_IN);\r\n\t\t\telse\r\n\t\t\t\t$criteria->filterByHeadlineId($this->headlineId);\r\n\t\t}\r\n\r\n\t\tif ($this->searchString) {\r\n\t\t\t$criteria->add(HeadlinePeer::NAME,\"%\" . $this->searchString . \"%\",Criteria::LIKE);\r\n\t\t\t$criterionContent = $criteria->getNewCriterion(HeadlinePeer::CONTENT,\"%\" . $this->searchString . \"%\",Criteria::LIKE);\r\n\t\t\t$criteria->addOr($criterionContent);\r\n\t\t}\r\n\r\n\t\treturn $criteria;\r\n\r\n\t}", "title": "" }, { "docid": "22f86ebb8d791c7f7e7ad3157fe9188b", "score": "0.5346166", "text": "public function getCriteriaWhere($criteria) {\n if ($criteria_value= $this->getCriteriaValue($criteria)) {\n $a = 'A_'. $this->id;\n $b = 'B_'. $this->id;\n $ids_to_search = array_intersect(\n array_values($criteria_value),\n array_merge(array(100),array_keys($this->getBind()->getAllValues())));\n if (count($ids_to_search) > 1) {\n return \" artifact.submitted_by IN(\". implode(',', $ids_to_search) .\") \";\n } else if (count($ids_to_search)) {\n return \" artifact.submitted_by = \". implode('', $ids_to_search) .\" \";\n }\n }\n return '';\n }", "title": "" }, { "docid": "93035205c3af27f07da070c96a643a08", "score": "0.53280437", "text": "protected function getConditions()\n {\n if (!$this->conditions)\n $this->conditions = new CartConditions;\n\n return $this->conditions;\n }", "title": "" }, { "docid": "e02dd975e25d03d3257128cb1cc2ef1d", "score": "0.5327323", "text": "function getCriteria($ID) {\n\n $criterias = $this->getAllCriteria();\n if (isset($criterias[$ID])) {\n return $criterias[$ID];\n }\n return array();\n }", "title": "" }, { "docid": "3968d51697696b050477578c97222ba5", "score": "0.53261214", "text": "public function getConditions(){ }", "title": "" }, { "docid": "023e20baf00ea62d0ed5225e2f6e0b8a", "score": "0.53222966", "text": "public function Query()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$criteria = new ItemCriteria();\n\t\t\t\n\t\t\t// TODO: this will limit results based on all properties included in the filter list \n\t\t\t$filter = RequestUtil::Get('filter');\n\t\t\tif ($filter) $criteria->AddFilter(\n\t\t\t\tnew CriteriaFilter('Iditem,Holder,Level,Institution,Inventoryid,Uritype,Uri,Keywords,Description,Uidtype,Uid,Class,Type,Iseletronic,Creationdate,Acquisitiondate,Scopecontent,Originalexistence,Originallocation,Repositorycode,Copyexistence,Copylocation,Legalaccess,Accesscondition,Reproductionrights,Reproductionrightsdescription,Itemdate,Publishdate,Publisher,Itematributes,Ispublic,Preliminaryrule,Punctuation,Notes,Otherinformation,Idfather,Titledefault,Subitem,Deletecomfirm,Typeitem,Edition,Isexposed,Isoriginal,Ispart,Haspart,Ispartof,Numberofcopies,Tobepublicin,Creationdateattributed,Itemdateattributed,Publishdateattributed,Serachdump,Itemmediadir'\n\t\t\t\t, '%'.$filter.'%')\n\t\t\t);\n\n\t\t\t// TODO: this is generic query filtering based only on criteria properties\r\n\t\t\tforeach (array_keys($_REQUEST) as $prop)\r\n\t\t\t{\r\n\t\t\t\t$prop_normal = ucfirst($prop);\r\n\t\t\t\t$prop_equals = $prop_normal.'_Equals';\r\n\r\n\t\t\t\tif (property_exists($criteria, $prop_normal))\r\n\t\t\t\t{\r\n\t\t\t\t\t$criteria->$prop_normal = RequestUtil::Get($prop);\r\n\t\t\t\t}\r\n\t\t\t\telseif (property_exists($criteria, $prop_equals))\r\n\t\t\t\t{\r\n\t\t\t\t\t// this is a convenience so that the _Equals suffix is not needed\r\n\t\t\t\t\t$criteria->$prop_equals = RequestUtil::Get($prop);\r\n\t\t\t\t}\r\n\t\t\t}\n\n\t\t\t$output = new stdClass();\n\n\t\t\t// if a sort order was specified then specify in the criteria\n \t\t\t$output->orderBy = RequestUtil::Get('orderBy');\n \t\t\t$output->orderDesc = RequestUtil::Get('orderDesc') != '';\n \t\t\tif ($output->orderBy) $criteria->SetOrder($output->orderBy, $output->orderDesc);\n\n\t\t\t$page = RequestUtil::Get('page');\n\n\t\t\tif ($page != '')\n\t\t\t{\n\t\t\t\t// if page is specified, use this instead (at the expense of one extra count query)\n\t\t\t\t$pagesize = $this->GetDefaultPageSize();\n\n\t\t\t\t$items = $this->Phreezer->Query('Item',$criteria)->GetDataPage($page, $pagesize);\r\n\t\t\t\t$output->rows = $items->ToObjectArray(true,$this->SimpleObjectParams());\r\n\t\t\t\t$output->totalResults = $items->TotalResults;\r\n\t\t\t\t$output->totalPages = $items->TotalPages;\r\n\t\t\t\t$output->pageSize = $items->PageSize;\n\t\t\t\t$output->currentPage = $items->CurrentPage;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// return all results\n\t\t\t\t$items = $this->Phreezer->Query('Item',$criteria);\n\t\t\t\t$output->rows = $items->ToObjectArray(true, $this->SimpleObjectParams());\n\t\t\t\t$output->totalResults = count($output->rows);\n\t\t\t\t$output->totalPages = 1;\n\t\t\t\t$output->pageSize = $output->totalResults;\n\t\t\t\t$output->currentPage = 1;\n\t\t\t}\n\n\n\t\t\t$this->RenderJSON($output, $this->JSONPCallback());\n\t\t}\n\t\tcatch (Exception $ex)\n\t\t{\n\t\t\t$this->RenderExceptionJSON($ex);\n\t\t}\n\t}", "title": "" }, { "docid": "b17e03ac9adb9500b9f1d45ca36d9df4", "score": "0.5302857", "text": "public function paginationConditions() {\n $ret = array();\n\n // Enrollment Flow Name Name\n $eof_name = $this->request->params['named']['search.eofName'] ?? \"\";\n // Enrollment Flow Status\n $eof_status = $this->request->params['named']['search.eofStatus'] ?? \"\";\n // Enrollment Flow Authorization\n $eof_authz = $this->request->params['named']['search.eofAuthz'] ?? \"\";\n\n $ret['conditions']['CoEnrollmentFlow.co_id'] = $this->cur_co['Co']['id'];\n if(!empty($eof_name)) {\n $searchterm = str_replace(urlencode(\"/\"), \"/\", $eof_name);\n $searchterm = str_replace(urlencode(\" \"), \" \", $searchterm);\n $searchterm = trim(strtolower($searchterm));\n $ret['conditions']['LOWER(CoEnrollmentFlow.name) LIKE'] = \"%$searchterm%\";\n }\n if(!empty($eof_status)) {\n $ret['conditions']['CoEnrollmentFlow.status'] = $eof_status;\n }\n if(!empty($eof_authz)) {\n $ret['conditions']['CoEnrollmentFlow.authz_level'] = $eof_authz;\n }\n if(isset($this->view_contains)) {\n $ret['contain'] = $this->view_contains;\n }\n\n return $ret;\n }", "title": "" }, { "docid": "f0c8d14451dacf1f6c38ec60fd4c1e23", "score": "0.5297805", "text": "public function conditions()\n\t{\n\t\t$conditions = array\n\t\t(\n\t\t\n\t\t);\n\t\t\n\t\treturn $conditions;\n\t}", "title": "" }, { "docid": "e19f2740b95f23756467e43b782c924d", "score": "0.52747333", "text": "public function get($criteria) {\n $this->assureAllowed('get');\n $qb = $this->getEntityManager()->createQueryBuilder();\n $qb->select('f')->from('HoneySens\\app\\models\\entities\\EventFilter', 'f');\n if(V::key('userID', V::intType())->validate($criteria)) {\n $qb->join('f.division', 'd')\n ->andWhere(':userid MEMBER OF d.users')\n ->setParameter('userid', $criteria['userID']);\n }\n if(V::key('id', V::intVal())->validate($criteria)) {\n $qb->andWhere('f.id = :id')\n ->setParameter('id', $criteria['id']);\n return $qb->getQuery()->getSingleResult()->getState();\n } else {\n $filters = array();\n foreach($qb->getQuery()->getResult() as $filter) {\n $filters[] = $filter->getState();\n }\n return $filters;\n }\n }", "title": "" }, { "docid": "3641776f41f7ae5e3fec0fa404de60fa", "score": "0.5274137", "text": "public function criteriaSearch()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\tif(!empty($this->kegiatanlaboratorium_id)){\n\t\t\t$criteria->addCondition('kegiatanlaboratorium_id = '.$this->kegiatanlaboratorium_id);\n\t\t}\n\t\t$criteria->compare('LOWER(tanggal)',strtolower($this->tanggal),true);\n\t\tif(!empty($this->jenispemeriksaanlab_id)){\n\t\t\t$criteria->addCondition('jenispemeriksaanlab_id = '.$this->jenispemeriksaanlab_id);\n\t\t}\n\t\t$criteria->compare('LOWER(jenispemeriksaanlab_nama)',strtolower($this->jenispemeriksaanlab_nama),true);\n\t\tif(!empty($this->jumlah)){\n\t\t\t$criteria->addCondition('jumlah = '.$this->jumlah);\n\t\t}\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "5b8c4827a24efb57db0acb2ca957d611", "score": "0.52677655", "text": "public function pushCriteria();", "title": "" }, { "docid": "d31ee94842b50cb57cb7da7a3d023aef", "score": "0.5264908", "text": "public function buildPkeyCriteria()\n\t{\n\t\t$criteria = new Criteria(OrgaoPeer::DATABASE_NAME);\n\t\t$criteria->add(OrgaoPeer::CO_ORGAO, $this->co_orgao);\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "a847888b827b847d9cbcc6039861d872", "score": "0.52396977", "text": "protected function _buildWhere() {\r\n return $this->_buildConditions('where');\r\n }", "title": "" }, { "docid": "2c3d43bb576172232f6986f6f6fe8a94", "score": "0.52326405", "text": "public function getRequisites() {\n $this->loadDataFromDegree();\n return $this->data->info->requisites;\n }", "title": "" }, { "docid": "b81adc091aef1764ea11eb9836e20d7e", "score": "0.5208189", "text": "public function defineConditions()\n {\n return $this->conditions;\n }", "title": "" }, { "docid": "36ecadba0160cbd11ae82493e9eb1ff3", "score": "0.52074337", "text": "static function criteria($field, $operator, $value, $unquoted=false) {\n\t\t$criteria = new stdClass;\n\t\t$criteria->field = Inflect::underscore($field);\n\t\t$criteria->operator = $operator;\n\t\t$criteria->value = $value;\n\t\t$criteria->unquoted = $unquoted;\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "d77fddaca59a36b6570bfdc40ef07d86", "score": "0.5194662", "text": "public function get_conditions_for_options() {\n\n\t\t$result = array();\n\n\t\tforeach ( $this->_conditions as $id => $instance ) {\n\t\t\t$result[ $id ] = $instance->get_name();\n\t\t}\n\n\t\treturn $result;\n\n\t}", "title": "" }, { "docid": "4f3747773636dca4070196a9360df02b", "score": "0.51933944", "text": "public function get()\n {\n $get = [];\n\n // @TODO: This could be made recursive to save 6 lines of code.\n foreach ($this->filters as $field => $criteria) {\n if (is_array($criteria)) {\n foreach ($criteria as $op => $val) {\n if ($op == 'eq') {\n $get[] = \"[$field]=$val\";\n } else {\n $get[] = \"[$field][$op]=$val\";\n }\n }\n } else {\n $op = key($criteria);\n $val = current($criteria);\n if ($op == 'eq') {\n $get[] = \"[$field]=$val\";\n } else {\n $get[] = \"[$field][$op]=$val\";\n }\n }\n }\n\n return $get;\n }", "title": "" }, { "docid": "cf0ebeea9c08d7a36c7aea00f9c9092c", "score": "0.51899314", "text": "public function getRequirements();", "title": "" }, { "docid": "751385827286f8a3805200be49576d78", "score": "0.51851153", "text": "public function Query()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$criteria = new SupportCriteria();\n\t\t\t\n\t\t\t// TODO: this will limit results based on all properties included in the filter list \n\t\t\t$filter = RequestUtil::Get('filter');\n\t\t\tif ($filter) $criteria->AddFilter(\n\t\t\t\tnew CriteriaFilter('Id,Position,Firstname,Lastname,Phone,Mobile,Email,Address,Postcode,State,City,CompanyId,CreatedDate,UpdatedDate,Status'\n\t\t\t\t, '%'.$filter.'%')\n\t\t\t);\n\n\t\t\t// TODO: this is generic query filtering based only on criteria properties\n\t\t\tforeach (array_keys($_REQUEST) as $prop)\n\t\t\t{\n\t\t\t\t$prop_normal = ucfirst($prop);\n\t\t\t\t$prop_equals = $prop_normal.'_Equals';\n\n\t\t\t\tif (property_exists($criteria, $prop_normal))\n\t\t\t\t{\n\t\t\t\t\t$criteria->$prop_normal = RequestUtil::Get($prop);\n\t\t\t\t}\n\t\t\t\telseif (property_exists($criteria, $prop_equals))\n\t\t\t\t{\n\t\t\t\t\t// this is a convenience so that the _Equals suffix is not needed\n\t\t\t\t\t$criteria->$prop_equals = RequestUtil::Get($prop);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$output = new stdClass();\n\n\t\t\t// if a sort order was specified then specify in the criteria\n \t\t\t$output->orderBy = RequestUtil::Get('orderBy');\n \t\t\t$output->orderDesc = RequestUtil::Get('orderDesc') != '';\n \t\t\tif ($output->orderBy) $criteria->SetOrder($output->orderBy, $output->orderDesc);\n\n\t\t\t$page = RequestUtil::Get('page');\n\n\t\t\tif ($page != '')\n\t\t\t{\n\t\t\t\t// if page is specified, use this instead (at the expense of one extra count query)\n\t\t\t\t$pagesize = $this->GetDefaultPageSize();\n\n\t\t\t\t$supports = $this->Phreezer->Query('Support',$criteria)->GetDataPage($page, $pagesize);\n\t\t\t\t$output->rows = $supports->ToObjectArray(true,$this->SimpleObjectParams());\n\t\t\t\t$output->totalResults = $supports->TotalResults;\n\t\t\t\t$output->totalPages = $supports->TotalPages;\n\t\t\t\t$output->pageSize = $supports->PageSize;\n\t\t\t\t$output->currentPage = $supports->CurrentPage;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// return all results\n\t\t\t\t$supports = $this->Phreezer->Query('Support',$criteria);\n\t\t\t\t$output->rows = $supports->ToObjectArray(true, $this->SimpleObjectParams());\n\t\t\t\t$output->totalResults = count($output->rows);\n\t\t\t\t$output->totalPages = 1;\n\t\t\t\t$output->pageSize = $output->totalResults;\n\t\t\t\t$output->currentPage = 1;\n\t\t\t}\n\n\n\t\t\t$this->RenderJSON($output, $this->JSONPCallback());\n\t\t}\n\t\tcatch (Exception $ex)\n\t\t{\n\t\t\t$this->RenderExceptionJSON($ex);\n\t\t}\n\t}", "title": "" }, { "docid": "0f8ea1a00255064919c16ac394a58d85", "score": "0.51840764", "text": "public function specifications(): CollectionRequest\n {\n return new SimpleCollectionRequest('specifications', $this->getApiAdapter());\n }", "title": "" }, { "docid": "6f918921b03b9691d5f1e81b37a681d2", "score": "0.51825064", "text": "private function generateRequest()\r\n {\r\n $request = [];\r\n foreach ($this->getSearchableAttributes() as $attribute) {\r\n if (\\in_array($attribute->getAttributeCode(), ['price', 'visibility', 'category_ids'])) {\r\n //some fields have special semantics\r\n continue;\r\n }\r\n $queryName = $attribute->getAttributeCode() . '_query';\r\n $filterName = $attribute->getAttributeCode() . RequestGenerator::FILTER_SUFFIX;\r\n $request['queries'][$this->requestNameWithAggregation]['queryReference'][] = [\r\n 'clause' => 'must',\r\n 'ref' => $queryName,\r\n ];\r\n\r\n switch ($attribute->getBackendType()) {\r\n case 'static':\r\n case 'text':\r\n case 'varchar':\r\n if ($this->isExactMatchAttribute($attribute)) {\r\n $request['queries'][$queryName] = $this->generateFilterQuery($queryName, $filterName);\r\n $request['filters'][$filterName] = $this->generateTermFilter($filterName, $attribute);\r\n } else {\r\n $request['queries'][$queryName] = $this->generateMatchQuery($queryName, $attribute);\r\n }\r\n break;\r\n case 'decimal':\r\n case 'datetime':\r\n case 'date':\r\n $request['queries'][$queryName] = $this->generateFilterQuery($queryName, $filterName);\r\n $request['filters'][$filterName] = $this->generateRangeFilter($filterName, $attribute);\r\n break;\r\n default:\r\n $request['queries'][$queryName] = $this->generateFilterQuery($queryName, $filterName);\r\n $request['filters'][$filterName] = $this->generateTermFilter($filterName, $attribute);\r\n }\r\n $generator = $this->generatorResolver->getGeneratorForType($attribute->getBackendType());\r\n\r\n if ($attribute->getData(EavAttributeInterface::IS_FILTERABLE)) {\r\n $bucketName = $attribute->getAttributeCode() . self::BUCKET_SUFFIX;\r\n $request['aggregations'][$bucketName] = $generator->getAggregationData($attribute, $bucketName);\r\n }\r\n\r\n $this->addSearchAttributeToFullTextSearch($attribute, $request);\r\n }\r\n\r\n return $request;\r\n }", "title": "" }, { "docid": "2450bff8064079f4b0bd8766c7ae4ae1", "score": "0.5181966", "text": "public function getConditions( $name ) {\n\t\t$class = $this->datamodel;\n\n\t\t$conditions = [];\n\t\tif ( isset( $class::$lists[$name] ) ) {\n\t\t\t$conditions = $class::$lists[$name];\n\t\t}\n\n\t\tif ( empty( $conditions ) ) {\n\t\t\t$conditions = [];\n\t\t}\n\n\t\treturn $conditions;\n\t}", "title": "" }, { "docid": "2f1adf6792eacd87b0fee519a5c30b35", "score": "0.51782095", "text": "public function buildPkeyCriteria()\n {\n $criteria = new Criteria(ContactPeer::DATABASE_NAME);\n $criteria->add(ContactPeer::ID, $this->id);\n\n return $criteria;\n }", "title": "" }, { "docid": "0d4e069df36695825efaac7f23c9bc5d", "score": "0.51690114", "text": "public function buildPkeyCriteria()\n\t{\n\t\t$criteria = new Criteria(TbModuloPeer::DATABASE_NAME);\n\t\t$criteria->add(TbModuloPeer::CO_SEQ_MODULO, $this->co_seq_modulo);\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "c18ccde5f25a6b0916e6428e9cc4717e", "score": "0.51677406", "text": "public static function getRequestSpec() {\n // Array structure:\n // * name – request item name.\n // * maxlen – max allowed value for item.\n // * required – is this item is required.\n // * user – if true, user can set value of this item, if false\n // item value is generated.\n // * isrequest – if true, item will be included in request array, if\n // false, item only be used internaly and will not be\n // included in outgoing request array.\n // * regexp – regexp to test item value.\n return array(\n array('projectid', 11, true, true, true, '/^\\d+$/'),\n array('orderid', 40, true, true, true, ''),\n array('lang', 3, false, true, true, '/^[a-z]{3}$/i'),\n array('amount', 11, false, true, true, '/^\\d+$/'),\n array('currency', 3, false, true, true, '/^[a-z]{3}$/i'),\n array('accepturl', 255, true, true, true, ''),\n array('cancelurl', 255, true, true, true, ''),\n array('callbackurl', 255, true, true, true, ''),\n array('payment', 20, false, true, true, ''),\n array('country', 2, false, true, true, '/^[a-z_]{2}$/i'),\n array('paytext', 255, false, true, true, ''),\n array('p_firstname', 255, false, true, true, ''),\n array('p_lastname', 255, false, true, true, ''),\n array('p_email', 255, false, true, true, ''),\n array('p_street', 255, false, true, true, ''),\n array('p_city', 255, false, true, true, ''),\n array('p_state', 20, false, true, true, ''),\n array('p_zip', 20, false, true, true, ''),\n array('p_countrycode', 2, false, true, true, '/^[a-z]{2}$/i'),\n array('sign', 255, true, false, true, ''),\n array('sign_password', 255, true, true, false, ''),\n array('only_payments', 0, false, true, true, ''),\n array('disalow_payments', 0, false, true, true, ''),\n array('repeat_request', 1, false, false, true, '/^[01]$/'),\n array('test', 1, false, true, true, '/^[01]$/'),\n array('version', 9, true, false, true, '/^\\d+\\.\\d+$/'),\n array('time_limit', 19, false, true, true, '/^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$/'),\n );\n }", "title": "" }, { "docid": "e1ab529937209ffe32181fd613150aee", "score": "0.516522", "text": "public function buildCriteria()\n {\n $criteria = new Criteria(TypeHebergementPeer::DATABASE_NAME);\n\n if ($this->isColumnModified(TypeHebergementPeer::ID)) $criteria->add(TypeHebergementPeer::ID, $this->id);\n if ($this->isColumnModified(TypeHebergementPeer::CODE)) $criteria->add(TypeHebergementPeer::CODE, $this->code);\n if ($this->isColumnModified(TypeHebergementPeer::CATEGORY_TYPE_HEBERGEMENT_ID)) $criteria->add(TypeHebergementPeer::CATEGORY_TYPE_HEBERGEMENT_ID, $this->category_type_hebergement_id);\n if ($this->isColumnModified(TypeHebergementPeer::NOMBRE_CHAMBRE)) $criteria->add(TypeHebergementPeer::NOMBRE_CHAMBRE, $this->nombre_chambre);\n if ($this->isColumnModified(TypeHebergementPeer::NOMBRE_PLACE)) $criteria->add(TypeHebergementPeer::NOMBRE_PLACE, $this->nombre_place);\n if ($this->isColumnModified(TypeHebergementPeer::CREATED_AT)) $criteria->add(TypeHebergementPeer::CREATED_AT, $this->created_at);\n if ($this->isColumnModified(TypeHebergementPeer::UPDATED_AT)) $criteria->add(TypeHebergementPeer::UPDATED_AT, $this->updated_at);\n if ($this->isColumnModified(TypeHebergementPeer::ACTIVE)) $criteria->add(TypeHebergementPeer::ACTIVE, $this->active);\n\n return $criteria;\n }", "title": "" }, { "docid": "4a2aa6380d5514999bbc54d714d7f1e1", "score": "0.5154042", "text": "public function getCriteria($attributes = null)\n\t{\n\t\tif($attributes instanceof ElementCriteriaModel)\n\t\t{\n\t\t\t$attributes = $attributes->getAttributes();\n\t\t}\n\n\t\treturn new Neo_CriteriaModel($attributes);\n\t}", "title": "" }, { "docid": "939b61a93e48f2008a09c7bdaefa0690", "score": "0.51529753", "text": "public function getEventRacingExcellence($request)\n {\n // and also any racingExcellence that contains one of their assigned Jockeys?\n \n if($request->type === 're' || !$request->type) {\n return RacingExcellence::with([\n 'jockeys',\n 'location',\n ])\n ->filter($request)\n ->get();\n }\n\n return [];\n }", "title": "" }, { "docid": "13a86ef508b9d86db825f12cdf785c93", "score": "0.5150702", "text": "public function criteriaSearch()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id);\n\t\t$criteria->compare('LOWER(barcode)',strtolower($this->barcode),true);\n\t\t$criteria->compare('LOWER(no_isbn)',strtolower($this->no_isbn),true);\n\t\t$criteria->compare('LOWER(judul)',strtolower($this->judul),true);\n\t\t$criteria->compare('LOWER(penyusun)',strtolower($this->penyusun),true);\n\t\t$criteria->compare('jumlah_stok',$this->jumlah_stok);\n\t\t$criteria->compare('LOWER(harga_beli)',strtolower($this->harga_beli),true);\n\t\t$criteria->compare('LOWER(harga_jual)',strtolower($this->harga_jual),true);\n\t\t$criteria->compare('penerbit_id',$this->penerbit_id);\n\t\t$criteria->compare('golongan_id',$this->golongan_id);\n\t\t$criteria->compare('supplier_id',$this->supplier_id);\n\t\t$criteria->compare('LOWER(create_time)',strtolower($this->create_time),true);\n\t\t$criteria->compare('LOWER(update_time)',strtolower($this->update_time),true);\n\t\t$criteria->compare('create_login',$this->create_login);\n\t\t$criteria->compare('update_login',$this->update_login);\n\t\t$criteria->compare('LOWER(kode_rak)',strtolower($this->kode_rak),true);\n\t\t$criteria->compare('diskon',$this->diskon);\n\t\t$criteria->compare('LOWER(edisi)',strtolower($this->edisi),true);\n\t\t$criteria->compare('jilid',$this->jilid);\n\t\t$criteria->compare('tahun',$this->tahun);\n\t\t$criteria->compare('LOWER(cover)',strtolower($this->cover),true);\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "3433369d92d088dbe4d45c3cc40502a4", "score": "0.51503056", "text": "public function buildModelCriteria()\n {\n $query = new LicenceQuery();\n\n if (null !== $id = $this->getId()) {\n $query->filterById($id);\n }\n\n if (null !== $order_id = $this->getOrderId()) {\n $query->filterByOrderId($order_id);\n }\n\n if (null !== $customer_id = $this->getCustomerId()) {\n $query->filterByCustomerId($customer_id);\n }\n\n if (null !== $product_id = $this->getProductId()) {\n $query->filterByProductId($product_id);\n }\n\n foreach ($this->getOrder() as $order) {\n switch ($order) {\n case \"id\":\n $query->orderById();\n break;\n case \"id-reverse\":\n $query->orderById(Criteria::DESC);\n break;\n case \"order_id\":\n $query->orderByOrderId();\n break;\n case \"order_id-reverse\":\n $query->orderByOrderId(Criteria::DESC);\n break;\n case \"customer_id\":\n $query->orderByCustomerId();\n break;\n case \"customer_id-reverse\":\n $query->orderByCustomerId(Criteria::DESC);\n break;\n case \"product_id\":\n $query->orderByProductId();\n break;\n case \"product_id-reverse\":\n $query->orderByProductId(Criteria::DESC);\n break;\n case \"product_key\":\n $query->orderByProductKey();\n break;\n case \"product_key-reverse\":\n $query->orderByProductKey(Criteria::DESC);\n break;\n case \"active_machine\":\n $query->orderByActiveMachine();\n break;\n case \"active_machine-reverse\":\n $query->orderByActiveMachine(Criteria::DESC);\n break;\n case \"expiration_date\":\n $query->orderByExpirationDate();\n break;\n case \"expiration_date-reverse\":\n $query->orderByExpirationDate(Criteria::DESC);\n break;\n }\n }\n\n return $query;\n }", "title": "" }, { "docid": "1796a458daa484da2fadb9e6fea60638", "score": "0.5145713", "text": "public function getRestrictions() { return $this->_restrictions; }", "title": "" }, { "docid": "93d9e84737b3cd1c4ac4807afd42609f", "score": "0.5145378", "text": "public function rules()\n {\n\n $rules = $this->requestRules;\n\n return $rules;\n\n }", "title": "" }, { "docid": "472731db27d9026642e341949d4a6bfe", "score": "0.51337326", "text": "public function buildPkeyCriteria()\n {\n $criteria = new Criteria(ItemPeer::DATABASE_NAME);\n $criteria->add(ItemPeer::DATA_ID, $this->data_id);\n\n return $criteria;\n }", "title": "" }, { "docid": "abb4cb2e24edd79ade81e6d66b246ef1", "score": "0.5133689", "text": "public function buildCriteria()\n {\n $criteria = new Criteria(ReportPeer::DATABASE_NAME);\n\n if ($this->isColumnModified(ReportPeer::ID)) $criteria->add(ReportPeer::ID, $this->id);\n if ($this->isColumnModified(ReportPeer::RESPONDER)) $criteria->add(ReportPeer::RESPONDER, $this->responder);\n if ($this->isColumnModified(ReportPeer::CALL_DATE)) $criteria->add(ReportPeer::CALL_DATE, $this->call_date);\n if ($this->isColumnModified(ReportPeer::CALL_FROM)) $criteria->add(ReportPeer::CALL_FROM, $this->call_from);\n if ($this->isColumnModified(ReportPeer::CALLER_NAME)) $criteria->add(ReportPeer::CALLER_NAME, $this->caller_name);\n if ($this->isColumnModified(ReportPeer::CALLER_PHONE_NUMBER)) $criteria->add(ReportPeer::CALLER_PHONE_NUMBER, $this->caller_phone_number);\n if ($this->isColumnModified(ReportPeer::CALL_LOCATION)) $criteria->add(ReportPeer::CALL_LOCATION, $this->call_location);\n if ($this->isColumnModified(ReportPeer::CALL_SPECIES)) $criteria->add(ReportPeer::CALL_SPECIES, $this->call_species);\n if ($this->isColumnModified(ReportPeer::WHEN_FIRST_SEEN)) $criteria->add(ReportPeer::WHEN_FIRST_SEEN, $this->when_first_seen);\n if ($this->isColumnModified(ReportPeer::CALL_COMMENTS)) $criteria->add(ReportPeer::CALL_COMMENTS, $this->call_comments);\n if ($this->isColumnModified(ReportPeer::CALL_REFERRED_TO)) $criteria->add(ReportPeer::CALL_REFERRED_TO, $this->call_referred_to);\n if ($this->isColumnModified(ReportPeer::CALL_CONDITION)) $criteria->add(ReportPeer::CALL_CONDITION, $this->call_condition);\n if ($this->isColumnModified(ReportPeer::INVESTIGATOR_SUPPORT)) $criteria->add(ReportPeer::INVESTIGATOR_SUPPORT, $this->investigator_support);\n if ($this->isColumnModified(ReportPeer::INVESTIGATION_DATE)) $criteria->add(ReportPeer::INVESTIGATION_DATE, $this->investigation_date);\n if ($this->isColumnModified(ReportPeer::INVESTIGATION_LAT_LOCATION)) $criteria->add(ReportPeer::INVESTIGATION_LAT_LOCATION, $this->investigation_lat_location);\n if ($this->isColumnModified(ReportPeer::INVESTIGATION_LON_LOCATION)) $criteria->add(ReportPeer::INVESTIGATION_LON_LOCATION, $this->investigation_lon_location);\n if ($this->isColumnModified(ReportPeer::INVESTIGATION_LOCATION_ACCURACY)) $criteria->add(ReportPeer::INVESTIGATION_LOCATION_ACCURACY, $this->investigation_location_accuracy);\n if ($this->isColumnModified(ReportPeer::INVESTIGATION_PHYSICAL_LOCATION)) $criteria->add(ReportPeer::INVESTIGATION_PHYSICAL_LOCATION, $this->investigation_physical_location);\n if ($this->isColumnModified(ReportPeer::INVESTIGATION_SPECIES)) $criteria->add(ReportPeer::INVESTIGATION_SPECIES, $this->investigation_species);\n if ($this->isColumnModified(ReportPeer::ANIMAL_NOT_FOUND)) $criteria->add(ReportPeer::ANIMAL_NOT_FOUND, $this->animal_not_found);\n if ($this->isColumnModified(ReportPeer::INVESTIGATION_CONDITION)) $criteria->add(ReportPeer::INVESTIGATION_CONDITION, $this->investigation_condition);\n if ($this->isColumnModified(ReportPeer::TAGS)) $criteria->add(ReportPeer::TAGS, $this->tags);\n if ($this->isColumnModified(ReportPeer::DISPOSITION)) $criteria->add(ReportPeer::DISPOSITION, $this->disposition);\n if ($this->isColumnModified(ReportPeer::SEAL_PICKUP)) $criteria->add(ReportPeer::SEAL_PICKUP, $this->seal_pickup);\n if ($this->isColumnModified(ReportPeer::SEX)) $criteria->add(ReportPeer::SEX, $this->sex);\n if ($this->isColumnModified(ReportPeer::WEIGHT)) $criteria->add(ReportPeer::WEIGHT, $this->weight);\n if ($this->isColumnModified(ReportPeer::STRAIGHT_LENGTH)) $criteria->add(ReportPeer::STRAIGHT_LENGTH, $this->straight_length);\n if ($this->isColumnModified(ReportPeer::CONTOUR_LENGTH)) $criteria->add(ReportPeer::CONTOUR_LENGTH, $this->contour_length);\n if ($this->isColumnModified(ReportPeer::GIRTH)) $criteria->add(ReportPeer::GIRTH, $this->girth);\n if ($this->isColumnModified(ReportPeer::INVESTIGATION_COMMENTS)) $criteria->add(ReportPeer::INVESTIGATION_COMMENTS, $this->investigation_comments);\n if ($this->isColumnModified(ReportPeer::IS_PHOTO_TAKEN)) $criteria->add(ReportPeer::IS_PHOTO_TAKEN, $this->is_photo_taken);\n if ($this->isColumnModified(ReportPeer::IS_CON_SICK)) $criteria->add(ReportPeer::IS_CON_SICK, $this->is_con_sick);\n if ($this->isColumnModified(ReportPeer::IS_CON_INJURED)) $criteria->add(ReportPeer::IS_CON_INJURED, $this->is_con_injured);\n if ($this->isColumnModified(ReportPeer::IS_CON_OUT_OF_HABITAT)) $criteria->add(ReportPeer::IS_CON_OUT_OF_HABITAT, $this->is_con_out_of_habitat);\n if ($this->isColumnModified(ReportPeer::IS_CON_DEEMED_RELEASABLE)) $criteria->add(ReportPeer::IS_CON_DEEMED_RELEASABLE, $this->is_con_deemed_releasable);\n if ($this->isColumnModified(ReportPeer::IS_CON_ABANDONED)) $criteria->add(ReportPeer::IS_CON_ABANDONED, $this->is_con_abandoned);\n if ($this->isColumnModified(ReportPeer::IS_CON_INACCESSIBLE)) $criteria->add(ReportPeer::IS_CON_INACCESSIBLE, $this->is_con_inaccessible);\n if ($this->isColumnModified(ReportPeer::IS_CON_LOCATION_HAZARD_TO_ANIMAL)) $criteria->add(ReportPeer::IS_CON_LOCATION_HAZARD_TO_ANIMAL, $this->is_con_location_hazard_to_animal);\n if ($this->isColumnModified(ReportPeer::IS_CON_LOCATION_HAZARD_TO_HUMANS)) $criteria->add(ReportPeer::IS_CON_LOCATION_HAZARD_TO_HUMANS, $this->is_con_location_hazard_to_humans);\n if ($this->isColumnModified(ReportPeer::IS_CON_UNKNOWN)) $criteria->add(ReportPeer::IS_CON_UNKNOWN, $this->is_con_unknown);\n if ($this->isColumnModified(ReportPeer::IS_CON_OTHER)) $criteria->add(ReportPeer::IS_CON_OTHER, $this->is_con_other);\n if ($this->isColumnModified(ReportPeer::IS_ACTION_LEFT_AT_SITE)) $criteria->add(ReportPeer::IS_ACTION_LEFT_AT_SITE, $this->is_action_left_at_site);\n if ($this->isColumnModified(ReportPeer::IS_ACTION_IMMEDIATE_RELEASE_AT_SITE)) $criteria->add(ReportPeer::IS_ACTION_IMMEDIATE_RELEASE_AT_SITE, $this->is_action_immediate_release_at_site);\n if ($this->isColumnModified(ReportPeer::IS_ACTION_RELOCATED)) $criteria->add(ReportPeer::IS_ACTION_RELOCATED, $this->is_action_relocated);\n if ($this->isColumnModified(ReportPeer::IS_ACTION_DIED_AT_SITE)) $criteria->add(ReportPeer::IS_ACTION_DIED_AT_SITE, $this->is_action_died_at_site);\n if ($this->isColumnModified(ReportPeer::IS_ACTION_DIED_DURING_TRANSPORT)) $criteria->add(ReportPeer::IS_ACTION_DIED_DURING_TRANSPORT, $this->is_action_died_during_transport);\n if ($this->isColumnModified(ReportPeer::IS_ACTION_EUTHANIZED_AT_SITE)) $criteria->add(ReportPeer::IS_ACTION_EUTHANIZED_AT_SITE, $this->is_action_euthanized_at_site);\n if ($this->isColumnModified(ReportPeer::IS_ACTION_EUTHANIZED_DURING_TRANSPORT)) $criteria->add(ReportPeer::IS_ACTION_EUTHANIZED_DURING_TRANSPORT, $this->is_action_euthanized_during_transport);\n if ($this->isColumnModified(ReportPeer::IS_ACTION_TRANSFERRED_TO_REHAB)) $criteria->add(ReportPeer::IS_ACTION_TRANSFERRED_TO_REHAB, $this->is_action_transferred_to_rehab);\n if ($this->isColumnModified(ReportPeer::IS_ACTION_OTHER)) $criteria->add(ReportPeer::IS_ACTION_OTHER, $this->is_action_other);\n if ($this->isColumnModified(ReportPeer::RELOCATED_LOCATION)) $criteria->add(ReportPeer::RELOCATED_LOCATION, $this->relocated_location);\n if ($this->isColumnModified(ReportPeer::VOLUNTEER_ID)) $criteria->add(ReportPeer::VOLUNTEER_ID, $this->volunteer_id);\n if ($this->isColumnModified(ReportPeer::INVESTIGATION_NUTRITIONAL_CONDITION)) $criteria->add(ReportPeer::INVESTIGATION_NUTRITIONAL_CONDITION, $this->investigation_nutritional_condition);\n if ($this->isColumnModified(ReportPeer::INVESTIGATION_AGE_CLASS)) $criteria->add(ReportPeer::INVESTIGATION_AGE_CLASS, $this->investigation_age_class);\n if ($this->isColumnModified(ReportPeer::LIVE_ANIMALS_COMMENTS)) $criteria->add(ReportPeer::LIVE_ANIMALS_COMMENTS, $this->live_animals_comments);\n\n return $criteria;\n }", "title": "" }, { "docid": "73d1a640daa6bbf505ecc15d7f90c04f", "score": "0.5131109", "text": "public function criteria()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n \n\t\t$criteria=new CDbCriteria; \n\t\t$criteria->compare('id',$this->id); \n $criteria->compare('oid',$this->id); \n $criteria->compare('uid',$this->uid); \n $criteria->compare('sid',$this->sid); \n $criteria->compare('nid',$this->nid,true); \n \n\t\t$criteria->compare('t.district_id',$this->district_id); \n $criteria->compare('t.areas_id',$this->areas_id); \n\n if ($this->metro_id || $this->remoteness || $this->unit_id) {\n $criteria->with = array('metros');\n $criteria->compare('metros.metro_id',$this->metro_id); \n $criteria->compare('metros.remoteness',$this->remoteness); // Открыт по требованию страниц unit Возможно было прикрыто для админки\n $criteria->compare('metros.unit_id',$this->unit_id); \n } else {\n $criteria->compare('t.metro_id',$this->metro_id); \n $criteria->compare('t.remoteness',$this->remoteness); // Открыт по требованию страниц unit Возможно было прикрыто для админки\n $criteria->compare('unit_id',$this->unit_id); \n } \n $criteria->compare('unit_value',$this->unit_value,true);\n\t\t$criteria->compare('number_tax',$this->number_tax);\n \n\t\t$criteria->compare('area',$this->area,true); \n \n\t\t$criteria->compare('price',$this->price,true);\n $criteria->compare('is_resize',$this->is_resize);\n $criteria->compare('pic_oreginal_id',$this->pic_oreginal_id); \n $criteria->compare('picOreginal.id', $this->pic_oreginal_id); \n \n\t\t$criteria->compare('pic_scr_id',$this->pic_scr_id); \n $criteria->compare('pic_anons_id',$this->pic_anons_id);\t\t\n\t\t$criteria->compare('pic_detile_id',$this->pic_detile_id);\t\t\n \n if ($this->date_rang) {\n $criteria->compare('date_rang', $this->date_rang,true);\n }\n if ($this->date_release) {\n $criteria->compare('date_release',date('Y-m-d', strtotime($this->date_release)),true);\n }\n \n if ($this->create_date) {\n $criteria->compare('create_date', date('Y-m-d', strtotime($this->create_date)),true);\n }\n if ($this->update_date) {\n $criteria->compare('update_date',date('Y-m-d', strtotime($this->update_date)),true);\n }\n \n $criteria->compare('in_stock', $this->in_stock, true); \n \n $criteria->compare('t.act', $this->act, true); \n $criteria->compare('t.del', $this->del, true); \n \n\t\t//$criteria->compare('metro_id',$this->metro_id);\n \n $criteria->compare('street_id',$this->street_id);\n if ( !$this->street_id ) {\n $criteria->compare('newstreet',$this->newstreet);\n }\n $criteria->compare('create_user',$this->create_user);\n $criteria->compare('update_user',$this->update_user);\n\n $criteria->compare('planning_id',$this->planning_id);\n\n\t\t$criteria->compare('tax_id',$this->tax_id);\n\n\t\t$criteria->compare('parking_id',$this->parking_id);\n\n\t\t$criteria->compare('cnt_parking_place',$this->cnt_parking_place);\n\t\t$criteria->compare('telephone',$this->telephone,true);\n\t\t$criteria->compare('site',$this->site,true);\n \n\t\t$criteria->compare('t.representative_id',$this->representative_id);\n \n\t\t$criteria->compare('commission_id',$this->commission_id);\n\t\t$criteria->compare('procent_commission',$this->procent_commission);\n\t\t$criteria->compare('contract_type_id',$this->contract_type_id);\n\t\t$criteria->compare('contract_number',$this->contract_number,true);\n\t\t$criteria->compare('fav',$this->fav );\n $criteria->compare('recommend',$this->recommend );\n $criteria->compare('rented',$this->rented );\n $criteria->compare('advertised',$this->advertised );\n\t\t$criteria->compare('realestate_type_id',$this->realestate_type_id);\n \n\t\t$criteria->compare('title',$this->title,true);\n\n\t\t$criteria->compare('realestate_class_id',$this->realestate_class_id);\n\n $criteria->compare('t.realestate_vid_id',$this->realestate_vid_id);\n\n\t\t$criteria->compare('anons',$this->anons,true);\n\t\t$criteria->compare('detile',$this->detile,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('map_latitude',$this->map_latitude,true);\n\t\t$criteria->compare('map_longitude',$this->map_longitude,true);\n $criteria->compare('t.operation_id',$this->operation_id);\n $criteria->compare('address',$this->address,true);\n $criteria->compare('is_separate_entrance',$this->is_separate_entrance); \n $criteria->compare('valute_id',$this->valute_id); \n\n $criteria->compare('coefficient_corridor',$this->coefficient_corridor); \n\n $criteria->compare('seo_title',$this->seo_title,true);\n $criteria->compare('seo_desc',$this->seo_desc,true);\n $criteria->compare('seo_keywords',$this->seo_keywords,true); \n \n //$criteria->compare('district.id',$this->district_id); \n\t\t//$criteria->compare('unit.id',$this->unit_id);\n //$criteria->compare('metro.id',$this->metro_id); \n //$criteria->compare('planning.id',$this->planning_id); \n //$criteria->compare('tax.id',$this->tax_id); \n //$criteria->compare('parking.id',$this->parking_id); \n //$criteria->compare('realestateClass',$this->realestate_class_id); \n //$criteria->compare('realestateVid.id',$this->realestate_vid_id);\t\t \n //$criteria->compare('valute.id',$this->valute_id); \n \n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "d3600c8b6897326f1c5fb43a10a50b4d", "score": "0.51270133", "text": "public function buildCriteria()\n {\n $criteria = new Criteria(AssignmentPeer::DATABASE_NAME);\n\n if ($this->isColumnModified(AssignmentPeer::ID)) $criteria->add(AssignmentPeer::ID, $this->id);\n if ($this->isColumnModified(AssignmentPeer::TEACHER_ID)) $criteria->add(AssignmentPeer::TEACHER_ID, $this->teacher_id);\n if ($this->isColumnModified(AssignmentPeer::COURSE_ID)) $criteria->add(AssignmentPeer::COURSE_ID, $this->course_id);\n if ($this->isColumnModified(AssignmentPeer::ASSIGNMENT_CATEGORY_ID)) $criteria->add(AssignmentPeer::ASSIGNMENT_CATEGORY_ID, $this->assignment_category_id);\n if ($this->isColumnModified(AssignmentPeer::NAME)) $criteria->add(AssignmentPeer::NAME, $this->name);\n if ($this->isColumnModified(AssignmentPeer::DESCRIPTION)) $criteria->add(AssignmentPeer::DESCRIPTION, $this->description);\n if ($this->isColumnModified(AssignmentPeer::MAX_POINTS)) $criteria->add(AssignmentPeer::MAX_POINTS, $this->max_points);\n if ($this->isColumnModified(AssignmentPeer::GRADE_TYPE)) $criteria->add(AssignmentPeer::GRADE_TYPE, $this->grade_type);\n if ($this->isColumnModified(AssignmentPeer::THRESHOLD)) $criteria->add(AssignmentPeer::THRESHOLD, $this->threshold);\n if ($this->isColumnModified(AssignmentPeer::DUE_AT)) $criteria->add(AssignmentPeer::DUE_AT, $this->due_at);\n\n return $criteria;\n }", "title": "" }, { "docid": "0cdc7c5a3c24a486537927f804c23290", "score": "0.51203394", "text": "public function authorize_request(Net_HTTP_Request $request, Service_OpenSocial_Container $container) {\n return $request->query_parameters(array($this->options['st_name'] => $this->options['st_value']));\n }", "title": "" }, { "docid": "c06788ad918af59b28ab27eca26e31be", "score": "0.5115131", "text": "public function getCampaignCriterion()\n {\n return $this->campaign_criterion;\n }", "title": "" }, { "docid": "1e6df7288eb204e347b714b341dec7db", "score": "0.51115143", "text": "public function get_terms_conditions(){\n $pagination = create_pagination();\n $tc = TermCondition::select(\n DB::raw('SQL_CALC_FOUND_ROWS term_condition.tc_id'),\n 'term_condition.title',\n 'term_condition.content'\n )\n ->where('term_condition.franchise_id', $this->franchise_id)\n ->where('term_condition.club_id', $this->club_id)\n ->where(function($query){\n //allow filter by team name\n if( isset($this->request['name']) && !empty($this->request['name']) ) {\n $query->where('term_condition.title', 'like', '%' . $this->request['name'] . '%');\n }\n return $query;\n })\n ->limit($pagination['per_page'])\n ->offset($pagination['offset']);\n\n //if auth user is guardian load only the consents assigned to him/her\n if( Auth::user()->hasRole('guardian') ){\n $tc->select(\n DB::raw('SQL_CALC_FOUND_ROWS term_condition.tc_id'),\n 'term_condition.title',\n 'term_condition.content',\n 'rel_tc_user.agreed_at'\n )\n ->leftJoin('rel_tc_user', 'rel_tc_user.tc_id', '=', 'term_condition.tc_id')\n ->where('rel_tc_user.user_id', $this->user_id);\n }\n\n $tc = $tc->get();\n //count the results so we can use them in pagination\n $requestsCount = DB::select( DB::raw(\"SELECT FOUND_ROWS() AS count;\") );\n $count = reset($requestsCount)->count;\n\n //for admin load the guardians that the consent was assigned to\n if( Auth::user()->hasRole('admin') ){\n $tc->load('guardians');\n }\n\n return format_response($tc, $count);\n }", "title": "" }, { "docid": "6dbec5bd2d9e7ee8b0e95d5e0bd0a4a3", "score": "0.51102865", "text": "public function buildPkeyCriteria()\n\t{\n\t\t$criteria = new Criteria(CargoPeer::DATABASE_NAME);\n\t\t$criteria->add(CargoPeer::ID, $this->id);\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "96cd15f7a4d39b03e49df0fb2859d4a7", "score": "0.5107978", "text": "protected function getWhereClauses()\n {\n return [];\n }", "title": "" }, { "docid": "accce41f2b419783a516ad548755ca43", "score": "0.5105374", "text": "public function withCriteria(...$criteria);", "title": "" }, { "docid": "accce41f2b419783a516ad548755ca43", "score": "0.5105374", "text": "public function withCriteria(...$criteria);", "title": "" }, { "docid": "193bc03d40c65929fb1048bea4e9ebe1", "score": "0.51013696", "text": "public function buildPkeyCriteria()\n {\n $criteria = new Criteria(TypeHebergementPeer::DATABASE_NAME);\n $criteria->add(TypeHebergementPeer::ID, $this->id);\n\n return $criteria;\n }", "title": "" }, { "docid": "9b7bdbf533f24070ec0efedc9d1d2420", "score": "0.5087321", "text": "public function buildCriteria()\n\t{\n\t\t$criteria = new Criteria(sfGuardUserPeer::DATABASE_NAME);\n\n\t\tif ($this->isColumnModified(sfGuardUserPeer::ID)) $criteria->add(sfGuardUserPeer::ID, $this->id);\n\t\tif ($this->isColumnModified(sfGuardUserPeer::USERNAME)) $criteria->add(sfGuardUserPeer::USERNAME, $this->username);\n\t\tif ($this->isColumnModified(sfGuardUserPeer::ALGORITHM)) $criteria->add(sfGuardUserPeer::ALGORITHM, $this->algorithm);\n\t\tif ($this->isColumnModified(sfGuardUserPeer::SALT)) $criteria->add(sfGuardUserPeer::SALT, $this->salt);\n\t\tif ($this->isColumnModified(sfGuardUserPeer::PASSWORD)) $criteria->add(sfGuardUserPeer::PASSWORD, $this->password);\n\t\tif ($this->isColumnModified(sfGuardUserPeer::CREATED_AT)) $criteria->add(sfGuardUserPeer::CREATED_AT, $this->created_at);\n\t\tif ($this->isColumnModified(sfGuardUserPeer::LAST_LOGIN)) $criteria->add(sfGuardUserPeer::LAST_LOGIN, $this->last_login);\n\t\tif ($this->isColumnModified(sfGuardUserPeer::IS_ACTIVE)) $criteria->add(sfGuardUserPeer::IS_ACTIVE, $this->is_active);\n\t\tif ($this->isColumnModified(sfGuardUserPeer::IS_SUPER_ADMIN)) $criteria->add(sfGuardUserPeer::IS_SUPER_ADMIN, $this->is_super_admin);\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "892682b770d126919855a4fb0098aece", "score": "0.5083261", "text": "public function get($criteria = [], $columns = ['*']);", "title": "" } ]
4f637329efea022f5564ec747ce84ff3
Operation employeesReadAsyncWithHttpInfo Read a single Employee.
[ { "docid": "d2003c7f31a00b131e9435315eabf992", "score": "0.6463801", "text": "public function employeesReadAsyncWithHttpInfo($id, $real_estate_agency_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\EmployeesSingleItemResponse';\n $request = $this->employeesReadRequest($id, $real_estate_agency_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" } ]
[ { "docid": "9d6dcd3e1d82f43ea8c9b15d1cd885ca", "score": "0.64076924", "text": "public function employeesReadAsync($id, $real_estate_agency_id)\n {\n return $this->employeesReadAsyncWithHttpInfo($id, $real_estate_agency_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "a7439ea82e7a9046fdd98ede6228d09a", "score": "0.5949592", "text": "public function fetchProfileInfoAsyncWithHttpInfo()\n {\n $returnType = '\\OpenAPI\\Client\\Model\\Employee';\n $request = $this->fetchProfileInfoRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "9aff836d6d982bb9ae36be9cfc2457e1", "score": "0.5942896", "text": "public function loadWebpagesOfEmployeeAsyncWithHttpInfo()\n {\n $returnType = '\\OpenAPI\\Client\\Model\\Webpage[]';\n $request = $this->loadWebpagesOfEmployeeRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "dfacf73488e51a713ac8ba0ac6f85e64", "score": "0.58897406", "text": "public function employeesRead($id, $real_estate_agency_id)\n {\n list($response) = $this->employeesReadWithHttpInfo($id, $real_estate_agency_id);\n return $response;\n }", "title": "" }, { "docid": "c2fa8ce221cfcedc08a4bb3f39901002", "score": "0.55808085", "text": "public function employeesReadWithHttpInfo($id, $real_estate_agency_id)\n {\n $returnType = '\\Swagger\\Client\\Model\\EmployeesSingleItemResponse';\n $request = $this->employeesReadRequest($id, $real_estate_agency_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\EmployeesSingleItemResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\HttpError',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\HttpError',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 409:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\HttpError',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "5ca8988dc1324809568e2884b105a369", "score": "0.5486605", "text": "public function fetchOptInListSourcesCreatedByEmployeeAsyncWithHttpInfo()\n {\n $returnType = '\\OpenAPI\\Client\\Model\\OptInListSource[]';\n $request = $this->fetchOptInListSourcesCreatedByEmployeeRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "e9b8e55f485b74279f84e6b603650dc0", "score": "0.5376596", "text": "public function setAlertsReadAsyncWithHttpInfo()\n {\n $returnType = 'bool';\n $request = $this->setAlertsReadRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "97a80f1767a7fa2aab9ce3ddff7a4666", "score": "0.52574384", "text": "public function loadWebpagesOfEmployeeAsync()\n {\n return $this->loadWebpagesOfEmployeeAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "d6289680ddc5931000e08313a38a0cc0", "score": "0.52346665", "text": "public function getAllEmployeeDetails_get() {\n $result = $this->Employee_model->getAllEmployeeDetails();\n return $this->response($result);\n }", "title": "" }, { "docid": "c5a6b835cd08ae61191722353aba9fc7", "score": "0.5211926", "text": "public function createEmployeePeerAsyncWithHttpInfo($wt_employee_create)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\Employee';\n $request = $this->createEmployeePeerRequest($wt_employee_create);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "56f0e20b6edbeeb439e20f361a735e40", "score": "0.5048251", "text": "function GetEmployees(\r\n\t\t\t$employee_id = null,\r\n\t\t\t$keyword = null,\r\n\t\t\t$page = null,\r\n\t\t\t$item_count = null\r\n\t\t){\r\n\t\t\t$employees = null;\r\n\r\n\t\t\tif($this->conn == null){\r\n\t\t\t\t$error = \"No defined connection.\";\r\n\t\t\t\treturn null;\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$conn = $this->conn;\r\n\r\n\t\t\t\t//Get all info if specifics\r\n\t\t\t\tif($employee_id != null){\r\n\t\t\t\t\t$query = \"SELECT \";\r\n\t\t\t\t\t$query .= \"EmployeeID, EmployeeNumber, \";\r\n\t\t\t\t\t$query .= \"LastName, FirstName, \";\r\n\t\t\t\t\t$query .= \"MiddleName, \";\r\n\t\t\t\t\t$query .= \"Birthday, \";\r\n\t\t\t\t\t$query .= \"EmailAddress, \";\r\n\t\t\t\t\t$query .= \"CityAddress, \";\r\n\t\t\t\t\t$query .= \"ProvincialAddress, \";\r\n\t\t\t\t\t$query .= \"Gender, MaritalStatus, \";\r\n\t\t\t\t\t$query .= \"TelephoneNumber, \";\r\n\t\t\t\t\t$query .= \"MobileNumber, \";\r\n\t\t\t\t\t$query .= \"SocialSecurityNumber, \";\r\n\t\t\t\t\t$query .= \"TaxIdentificationNumber, \";\r\n\t\t\t\t\t$query .= \"DateOfEntry, \";\r\n\t\t\t\t\t$query .= \"EmployeeStatus, \";\r\n\t\t\t\t\t$query .= \"PhilHealthNumber, \";\r\n\t\t\t\t\t$query .= \"PagibigNumber \";\r\n\t\t\t\t\t$query .= \"FROM `sch-employees` \";\r\n\t\t\t\t\t$query .= \"WHERE EmployeeID={$employee_id} \";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//for display on searches\r\n\t\t\t\t\t$query = \"SELECT \";\r\n\t\t\t\t\t$query .= \"EmployeeID, EmployeeNumber, \";\r\n\t\t\t\t\t$query .= \"LastName, FirstName, \";\r\n\t\t\t\t\t$query .= \"MiddleName, \";\r\n\t\t\t\t\t$query .= \"Birthday, \";\r\n\t\t\t\t\t$query .= \"EmailAddress, \";\r\n\t\t\t\t\t$query .= \"CityAddress, \";\r\n\t\t\t\t\t$query .= \"ProvincialAddress, \";\r\n\t\t\t\t\t$query .= \"Gender, MaritalStatus, \";\r\n\t\t\t\t\t$query .= \"TelephoneNumber, \";\r\n\t\t\t\t\t$query .= \"MobileNumber, \";\r\n\t\t\t\t\t$query .= \"SocialSecurityNumber, \";\r\n\t\t\t\t\t$query .= \"TaxIdentificationNumber, \";\r\n\t\t\t\t\t$query .= \"DateOfEntry, \";\r\n\t\t\t\t\t$query .= \"es.Description AS EmployeeStatus, \";\r\n\t\t\t\t\t$query .= \"PhilHealthNumber, \";\r\n\t\t\t\t\t$query .= \"PagibigNumber \";\r\n\t\t\t\t\t$query .= \"FROM `sch-employees` e \";\r\n\t\t\t\t\t$query .= \"LEFT JOIN `sch-employment_status` es ON es.StatusID=e.EmployeeStatus \";\r\n\t\t\t\t\t$query .= \"WHERE 1=1 \";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif($keyword != null){\r\n\t\t\t\t\t$query .= \"AND (\";\r\n\t\t\t\t\t$query .= \"LastName LIKE '%{$keyword}%' \";\r\n\t\t\t\t\t$query .= \"OR FirstName LIKE '%{$keyword}%' \";\r\n\t\t\t\t\t$query .= \"OR MiddleName LIKE '%{$keyword}%' \";\r\n\t\t\t\t\t$query .= \"OR EmployeeNumber LIKE '%{$keyword}%' \";\r\n\t\t\t\t\t$query .= \")\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$query .= \"ORDER BY LastName \";\r\n\r\n\t\t\t\tif($page > 0 && $item_count > 0){\r\n\t\t\t\t\t $limit = $item_count;\r\n\t\t\t\t\t $start = ($page-1) * $item_count;\r\n\t\t\t\t\t $query .= \"LIMIT {$start}, {$limit} \";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$result = $conn->query($query);\r\n\r\n\t\t\t\techo $conn->error;\r\n\t\t\t\t//check for errors first\r\n\t\t\t\tif($conn->error <> \"\"){\r\n\t\t\t\t\t$this->error = $conn->error;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$employees = array();\r\n\t\t\t\t\t$ctr = 0;\r\n\t\t\t\t\tif($result->num_rows > 0){\r\n\t\t\t\t\t\twhile($row = $result->fetch_assoc()){\r\n\r\n\t\t\t\t\t\t\t$employees[$ctr] = new EmployeeInfo(\r\n\t\t\t\t\t\t\t\t$row['EmployeeID'], $row['EmployeeNumber'],\r\n\t\t\t\t\t\t\t\t$row['LastName'], $row['FirstName'],\r\n\t\t\t\t\t\t\t\t$row['MiddleName'], $row['Birthday'],\r\n\t\t\t\t\t\t\t\t$row['EmailAddress'], $row['CityAddress'],\r\n\t\t\t\t\t\t\t\t$row['ProvincialAddress'], $row['Gender'],\r\n\t\t\t\t\t\t\t\t$row['MaritalStatus'], $row['TelephoneNumber'],\r\n\t\t\t\t\t\t\t\t$row['MobileNumber'], $row['SocialSecurityNumber'],\r\n\t\t\t\t\t\t\t\t$row['TaxIdentificationNumber'], $row['DateOfEntry'],\r\n\t\t\t\t\t\t\t\t$row['EmployeeStatus'], $row['PhilHealthNumber'],\r\n\t\t\t\t\t\t\t\t$row['PagibigNumber']\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t$ctr++;\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}\r\n\r\n\t\t\treturn $employees;\r\n\t\t}", "title": "" }, { "docid": "74310b14b3418a8961f938aa287f39be", "score": "0.50466764", "text": "public function setExportDataFilesReadAsyncWithHttpInfo()\n {\n $returnType = 'bool';\n $request = $this->setExportDataFilesReadRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "c36a233ff9d13c5d41f180c49a0041d6", "score": "0.5008786", "text": "public function setAlertsReadAsync()\n {\n return $this->setAlertsReadAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "02de788071e4aa6d3f1828116f57ae9f", "score": "0.4997914", "text": "public function show(Employee $employee)\n {\n return response()->json([\n 'result' => $this->employee->data()->find($employee->NIP)\n ], 200);\n }", "title": "" }, { "docid": "1424a03e5b6e839c2996c6dc2b410d7a", "score": "0.49933875", "text": "public function listUserEnrollmentsAsyncWithHttpInfo($organization_id, $user_id, $page = null, $count = 100)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\InlineResponse2005';\n $request = $this->listUserEnrollmentsRequest($organization_id, $user_id, $page, $count);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "b4d987d53b413489335ad2c3025a8963", "score": "0.499006", "text": "public function show(Employee $employee)\n {\n return new EmployeeResource($employee);\n }", "title": "" }, { "docid": "53d9be3c9883c22c9c4b6de7d412b410", "score": "0.4983298", "text": "private function getEmployeeInfo()\n {\n return $this->_dbr->getRow(\n '\n SELECT *\n FROM `employee`\n WHERE `username` = ?\n ',\n null,\n [$this->data->username]\n );\n }", "title": "" }, { "docid": "4990d687e39f203d36d451bc95d64f93", "score": "0.49475583", "text": "public function getIncidentsAsyncWithHttpInfo($body)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\ApiMsaExternalIncidentResponse';\n $request = $this->getIncidentsRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "258eab9236910bc02df4482d5e3886ad", "score": "0.48724204", "text": "function GetAssignedEmployees(\r\n\t\t\t$employee_id = null,\r\n\t\t\t$keyword = null,\r\n\t\t\t$page = null,\r\n\t\t\t$item_count = null\r\n\t\t){\r\n\t\t\t$employees = null;\r\n\r\n\t\t\tif($this->conn == null){\r\n\t\t\t\t$error = \"No defined connection.\";\r\n\t\t\t\treturn null;\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$conn = $this->conn;\r\n\r\n\t\t\t\t//Get all info if specifics\r\n\t\t\t\tif($employee_id != null){\r\n\t\t\t\t\t$query = \"SELECT \";\r\n\t\t\t\t\t$query .= \"EmployeeID, EmployeeNumber, \";\r\n\t\t\t\t\t$query .= \"LastName, FirstName, \";\r\n\t\t\t\t\t$query .= \"MiddleName, \";\r\n\t\t\t\t\t$query .= \"Birthday, \";\r\n\t\t\t\t\t$query .= \"EmailAddress, \";\r\n\t\t\t\t\t$query .= \"CityAddress, \";\r\n\t\t\t\t\t$query .= \"ProvincialAddress, \";\r\n\t\t\t\t\t$query .= \"Gender, MaritalStatus, \";\r\n\t\t\t\t\t$query .= \"TelephoneNumber, \";\r\n\t\t\t\t\t$query .= \"MobileNumber, \";\r\n\t\t\t\t\t$query .= \"SocialSecurityNumber, \";\r\n\t\t\t\t\t$query .= \"TaxIdentificationNumber, \";\r\n\t\t\t\t\t$query .= \"DateOfEntry, \";\r\n\t\t\t\t\t$query .= \"EmployeeStatus, \";\r\n\t\t\t\t\t$query .= \"PhilHealthNumber, \";\r\n\t\t\t\t\t$query .= \"PagibigNumber \";\r\n\t\t\t\t\t$query .= \"FROM `sch-employees` \";\r\n\t\t\t\t\t$query .= \"WHERE EmployeeID={$employee_id} AND IsFaculty=1 \";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//for display on searches\r\n\t\t\t\t\t$query = \"SELECT \";\r\n\t\t\t\t\t$query .= \"EmployeeID, EmployeeNumber, \";\r\n\t\t\t\t\t$query .= \"LastName, FirstName, \";\r\n\t\t\t\t\t$query .= \"MiddleName, \";\r\n\t\t\t\t\t$query .= \"Birthday, \";\r\n\t\t\t\t\t$query .= \"EmailAddress, \";\r\n\t\t\t\t\t$query .= \"CityAddress, \";\r\n\t\t\t\t\t$query .= \"ProvincialAddress, \";\r\n\t\t\t\t\t$query .= \"Gender, MaritalStatus, \";\r\n\t\t\t\t\t$query .= \"TelephoneNumber, \";\r\n\t\t\t\t\t$query .= \"MobileNumber, \";\r\n\t\t\t\t\t$query .= \"SocialSecurityNumber, \";\r\n\t\t\t\t\t$query .= \"TaxIdentificationNumber, \";\r\n\t\t\t\t\t$query .= \"DateOfEntry, \";\r\n\t\t\t\t\t$query .= \"es.Description AS EmployeeStatus, \";\r\n\t\t\t\t\t$query .= \"PhilHealthNumber, \";\r\n\t\t\t\t\t$query .= \"PagibigNumber \";\r\n\t\t\t\t\t$query .= \"FROM `sch-employees` e \";\r\n\t\t\t\t\t$query .= \"LEFT JOIN `sch-employment_status` es ON es.StatusID=e.EmployeeStatus \";\r\n\t\t\t\t\t$query .= \"WHERE 1=1 AND IsFaculty=1 \";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif($keyword != null){\r\n\t\t\t\t\t$query .= \"AND (\";\r\n\t\t\t\t\t$query .= \"LastName LIKE '%{$keyword}%' \";\r\n\t\t\t\t\t$query .= \"OR FirstName LIKE '%{$keyword}%' \";\r\n\t\t\t\t\t$query .= \"OR MiddleName LIKE '%{$keyword}%' \";\r\n\t\t\t\t\t$query .= \"OR EmployeeNumber LIKE '%{$keyword}%' \";\r\n\t\t\t\t\t$query .= \")\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$query .= \"ORDER BY LastName \";\r\n\r\n\t\t\t\tif($page > 0 && $item_count > 0){\r\n\t\t\t\t\t $limit = $item_count;\r\n\t\t\t\t\t $start = ($page-1) * $item_count;\r\n\t\t\t\t\t $query .= \"LIMIT {$start}, {$limit} \";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$result = $conn->query($query);\r\n\r\n\t\t\t\techo $conn->error;\r\n\t\t\t\t//check for errors first\r\n\t\t\t\tif($conn->error <> \"\"){\r\n\t\t\t\t\t$this->error = $conn->error;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$employees = array();\r\n\t\t\t\t\t$ctr = 0;\r\n\t\t\t\t\tif($result->num_rows > 0){\r\n\t\t\t\t\t\twhile($row = $result->fetch_assoc()){\r\n\r\n\t\t\t\t\t\t\t$employees[$ctr] = new EmployeeInfo(\r\n\t\t\t\t\t\t\t\t$row['EmployeeID'], $row['EmployeeNumber'],\r\n\t\t\t\t\t\t\t\t$row['LastName'], $row['FirstName'],\r\n\t\t\t\t\t\t\t\t$row['MiddleName'], $row['Birthday'],\r\n\t\t\t\t\t\t\t\t$row['EmailAddress'], $row['CityAddress'],\r\n\t\t\t\t\t\t\t\t$row['ProvincialAddress'], $row['Gender'],\r\n\t\t\t\t\t\t\t\t$row['MaritalStatus'], $row['TelephoneNumber'],\r\n\t\t\t\t\t\t\t\t$row['MobileNumber'], $row['SocialSecurityNumber'],\r\n\t\t\t\t\t\t\t\t$row['TaxIdentificationNumber'], $row['DateOfEntry'],\r\n\t\t\t\t\t\t\t\t$row['EmployeeStatus'], $row['PhilHealthNumber'],\r\n\t\t\t\t\t\t\t\t$row['PagibigNumber']\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t$ctr++;\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}\r\n\r\n\t\t\treturn $employees;\r\n\t\t}", "title": "" }, { "docid": "d3bf4ceb0a63e5264794c2f0363e005b", "score": "0.4867432", "text": "public function show(Employee $employee)\n {\n return response()->json($employee, 200);\n }", "title": "" }, { "docid": "5601de59d770cfc81df6a44f987f6ce2", "score": "0.47832468", "text": "public function importClubMembersAsyncWithHttpInfo($wt_employee_import_records)\n {\n $returnType = 'string';\n $request = $this->importClubMembersRequest($wt_employee_import_records);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "0c1b91d8284c39453867594a7c4e7006", "score": "0.4777485", "text": "public function show(Employees $employees)\n {\n //\n }", "title": "" }, { "docid": "165c3dbd56426e83beeac3a2d1b320a6", "score": "0.4776814", "text": "public function show(Employee $employee)\n {\n return $employee;\n }", "title": "" }, { "docid": "165c3dbd56426e83beeac3a2d1b320a6", "score": "0.4776814", "text": "public function show(Employee $employee)\n {\n return $employee;\n }", "title": "" }, { "docid": "ef81760435a65e92648ab9db16b4039b", "score": "0.47581017", "text": "protected function employeesReadRequest($id, $real_estate_agency_id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling employeesRead'\n );\n }\n // verify the required parameter 'real_estate_agency_id' is set\n if ($real_estate_agency_id === null || (is_array($real_estate_agency_id) && count($real_estate_agency_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $real_estate_agency_id when calling employeesRead'\n );\n }\n\n $resourcePath = '/v3/{RealEstateAgencyId}/Employees';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($id !== null) {\n $queryParams['id'] = ObjectSerializer::toQueryValue($id);\n }\n\n // path params\n if ($real_estate_agency_id !== null) {\n $resourcePath = str_replace(\n '{' . 'RealEstateAgencyId' . '}',\n ObjectSerializer::toPathValue($real_estate_agency_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // 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": "c91db40507986b4135986e8efd756e74", "score": "0.47322673", "text": "public function show(Employee $employee)\n {\n $showEmployee = Employee::where('id', $employee->id)->first();\n\n return response()->json($showEmployee);\n }", "title": "" }, { "docid": "4e0d1e558289f5d2f07df402dd85275d", "score": "0.47271618", "text": "public function show(Employee $employee)\n {\n // return $post;\n return new EmployeeResource($employee); //for 1 only\n }", "title": "" }, { "docid": "c33abb2da10ed729209149fcf2bf66e2", "score": "0.46851766", "text": "public function show(Employee $employee)\n {\n return response()->json(['employee'=>$employee]);\n }", "title": "" }, { "docid": "f77da4022bf0c65820a90c5cacbcf54f", "score": "0.4667803", "text": "public function markAllNotificationReadAsyncWithHttpInfo()\n {\n $returnType = '';\n $request = $this->markAllNotificationReadRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "fc15d6ea7840deac210a52ccdc497fe9", "score": "0.46607974", "text": "public function fetchSpecialOffersAsyncWithHttpInfo()\n {\n $returnType = 'mixed[]';\n $request = $this->fetchSpecialOffersRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "8ae599c05cf5e2c26bcd39193055fe50", "score": "0.4648693", "text": "public function soloGetAsyncWithHttpInfo($position = null)\n {\n $returnType = '\\VATUSA\\Client\\Model\\InlineResponse20015';\n $request = $this->soloGetRequest($position);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "9085918ff856195738127985110c6b07", "score": "0.46372843", "text": "public function markNotificationReadAsyncWithHttpInfo($body)\n {\n $returnType = '';\n $request = $this->markNotificationReadRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "d37f120c0d1a508e43da5713dff7e4b8", "score": "0.46292073", "text": "public function listIdentitiesAsyncWithHttpInfo($organization_id, $where_provider = null, $where_user = null, $where_first_name = null, $where_last_name = null, $where_registered_by = null, $where_fiscal_code = null, $page = null, $count = 100)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\InlineResponse2001';\n $request = $this->listIdentitiesRequest($organization_id, $where_provider, $where_user, $where_first_name, $where_last_name, $where_registered_by, $where_fiscal_code, $page, $count);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "8c1ed4a91db7ec8b11caec45514e4dd6", "score": "0.46260667", "text": "public function fetchIndustryAsyncWithHttpInfo()\n {\n $returnType = '\\OpenAPI\\Client\\Model\\InlineResponse200';\n $request = $this->fetchIndustryRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "8738c047dbc83b8ffd4edb62eee1b1bb", "score": "0.46235013", "text": "public function show($id) {\n return Employee::find($id);\n }", "title": "" }, { "docid": "fa55fc917288f97482672ec686edaf19", "score": "0.4621735", "text": "public function setMessagesReadAsyncWithHttpInfo()\n {\n $returnType = 'bool';\n $request = $this->setMessagesReadRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "0e5cb9ac00bd575b29dfb36f2c3880d1", "score": "0.46159714", "text": "public function fetchAddOnsAsyncWithHttpInfo()\n {\n $returnType = 'mixed[]';\n $request = $this->fetchAddOnsRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "7b13c3e88744c77c2500cb43bf9adeda", "score": "0.46091887", "text": "public function fetchPeerActivityAsyncWithHttpInfo($employee_id)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\EmployeeActivityLog[]';\n $request = $this->fetchPeerActivityRequest($employee_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "495f2a5c197fc51813aebd4ea8868ceb", "score": "0.45950034", "text": "public function show(EmployeeInfo $employeeInfo) {\n //\n }", "title": "" }, { "docid": "df5680ce95086a6ded689d0604086458", "score": "0.4580965", "text": "public function load(Employee $employee): array\n {\n\n $url = 'https://tomcat2.bloomington.in.gov/timetrack/NewEmployeeService?employee_number='.$employee->number;\n\n $client = new Client();\n $request = new Request('GET', $url);\n $signed = parent::signRequest($request);\n $response = $client->send($signed);\n $body = $response->getBody()->__toString();\n\n $list = json_decode($body, true);\n if (!$list) {\n throw new \\Exception('Server did not return json '.__CLASS__);\n }\n\n return $list;\n }", "title": "" }, { "docid": "dbf449398c57c89476a9a722afab6ea5", "score": "0.45598927", "text": "public function employeesDeleteAsyncWithHttpInfo($id, $real_estate_agency_id)\n {\n $returnType = '';\n $request = $this->employeesDeleteRequest($id, $real_estate_agency_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "ce735ae861c64d91069dd0a299d4aaf1", "score": "0.4556333", "text": "function GetUnassignedEmployees(\r\n\t\t\t$employee_id = null,\r\n\t\t\t$keyword = null,\r\n\t\t\t$page = null,\r\n\t\t\t$item_count = null\r\n\t\t){\r\n\t\t\t$employees = null;\r\n\r\n\t\t\tif($this->conn == null){\r\n\t\t\t\t$error = \"No defined connection.\";\r\n\t\t\t\treturn null;\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$conn = $this->conn;\r\n\r\n\t\t\t\t//Get all info if specifics\r\n\t\t\t\tif($employee_id != null){\r\n\t\t\t\t\t$query = \"SELECT \";\r\n\t\t\t\t\t$query .= \"EmployeeID, EmployeeNumber, \";\r\n\t\t\t\t\t$query .= \"LastName, FirstName, \";\r\n\t\t\t\t\t$query .= \"MiddleName, \";\r\n\t\t\t\t\t$query .= \"Birthday, \";\r\n\t\t\t\t\t$query .= \"EmailAddress, \";\r\n\t\t\t\t\t$query .= \"CityAddress, \";\r\n\t\t\t\t\t$query .= \"ProvincialAddress, \";\r\n\t\t\t\t\t$query .= \"Gender, MaritalStatus, \";\r\n\t\t\t\t\t$query .= \"TelephoneNumber, \";\r\n\t\t\t\t\t$query .= \"MobileNumber, \";\r\n\t\t\t\t\t$query .= \"SocialSecurityNumber, \";\r\n\t\t\t\t\t$query .= \"TaxIdentificationNumber, \";\r\n\t\t\t\t\t$query .= \"DateOfEntry, \";\r\n\t\t\t\t\t$query .= \"EmployeeStatus, \";\r\n\t\t\t\t\t$query .= \"PhilHealthNumber, \";\r\n\t\t\t\t\t$query .= \"PagibigNumber \";\r\n\t\t\t\t\t$query .= \"FROM `sch-employees` \";\r\n\t\t\t\t\t$query .= \"WHERE EmployeeID={$employee_id} AND IsFaculty=0 \";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//for display on searches\r\n\t\t\t\t\t$query = \"SELECT \";\r\n\t\t\t\t\t$query .= \"EmployeeID, EmployeeNumber, \";\r\n\t\t\t\t\t$query .= \"LastName, FirstName, \";\r\n\t\t\t\t\t$query .= \"MiddleName, \";\r\n\t\t\t\t\t$query .= \"Birthday, \";\r\n\t\t\t\t\t$query .= \"EmailAddress, \";\r\n\t\t\t\t\t$query .= \"CityAddress, \";\r\n\t\t\t\t\t$query .= \"ProvincialAddress, \";\r\n\t\t\t\t\t$query .= \"Gender, MaritalStatus, \";\r\n\t\t\t\t\t$query .= \"TelephoneNumber, \";\r\n\t\t\t\t\t$query .= \"MobileNumber, \";\r\n\t\t\t\t\t$query .= \"SocialSecurityNumber, \";\r\n\t\t\t\t\t$query .= \"TaxIdentificationNumber, \";\r\n\t\t\t\t\t$query .= \"DateOfEntry, \";\r\n\t\t\t\t\t$query .= \"es.Description AS EmployeeStatus, \";\r\n\t\t\t\t\t$query .= \"PhilHealthNumber, \";\r\n\t\t\t\t\t$query .= \"PagibigNumber \";\r\n\t\t\t\t\t$query .= \"FROM `sch-employees` e \";\r\n\t\t\t\t\t$query .= \"LEFT JOIN `sch-employment_status` es ON es.StatusID=e.EmployeeStatus \";\r\n\t\t\t\t\t$query .= \"WHERE 1=1 AND IsFaculty=0 \";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif($keyword != null){\r\n\t\t\t\t\t$query .= \"AND (\";\r\n\t\t\t\t\t$query .= \"LastName LIKE '%{$keyword}%' \";\r\n\t\t\t\t\t$query .= \"OR FirstName LIKE '%{$keyword}%' \";\r\n\t\t\t\t\t$query .= \"OR MiddleName LIKE '%{$keyword}%' \";\r\n\t\t\t\t\t$query .= \"OR EmployeeNumber LIKE '%{$keyword}%' \";\r\n\t\t\t\t\t$query .= \")\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$query .= \"ORDER BY LastName \";\r\n\r\n\t\t\t\tif($page > 0 && $item_count > 0){\r\n\t\t\t\t\t $limit = $item_count;\r\n\t\t\t\t\t $start = ($page-1) * $item_count;\r\n\t\t\t\t\t $query .= \"LIMIT {$start}, {$limit} \";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$result = $conn->query($query);\r\n\r\n\t\t\t\techo $conn->error;\r\n\t\t\t\t//check for errors first\r\n\t\t\t\tif($conn->error <> \"\"){\r\n\t\t\t\t\t$this->error = $conn->error;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$employees = array();\r\n\t\t\t\t\t$ctr = 0;\r\n\t\t\t\t\tif($result->num_rows > 0){\r\n\t\t\t\t\t\twhile($row = $result->fetch_assoc()){\r\n\r\n\t\t\t\t\t\t\t$employees[$ctr] = new EmployeeInfo(\r\n\t\t\t\t\t\t\t\t$row['EmployeeID'], $row['EmployeeNumber'],\r\n\t\t\t\t\t\t\t\t$row['LastName'], $row['FirstName'],\r\n\t\t\t\t\t\t\t\t$row['MiddleName'], $row['Birthday'],\r\n\t\t\t\t\t\t\t\t$row['EmailAddress'], $row['CityAddress'],\r\n\t\t\t\t\t\t\t\t$row['ProvincialAddress'], $row['Gender'],\r\n\t\t\t\t\t\t\t\t$row['MaritalStatus'], $row['TelephoneNumber'],\r\n\t\t\t\t\t\t\t\t$row['MobileNumber'], $row['SocialSecurityNumber'],\r\n\t\t\t\t\t\t\t\t$row['TaxIdentificationNumber'], $row['DateOfEntry'],\r\n\t\t\t\t\t\t\t\t$row['EmployeeStatus'], $row['PhilHealthNumber'],\r\n\t\t\t\t\t\t\t\t$row['PagibigNumber']\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t$ctr++;\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}\r\n\r\n\t\t\treturn $employees;\r\n\t\t}", "title": "" }, { "docid": "8bf6594701dfe1301358fab6a09846a6", "score": "0.45482373", "text": "public function show(employee $employee)\n {\n //\n }", "title": "" }, { "docid": "f49777fc013ad5a891887372f707194c", "score": "0.45396438", "text": "public function getEmployeeInfo()\n {\n return $this->employeeInfo;\n }", "title": "" }, { "docid": "5c306ca83ff37fc2f3af3816574a805b", "score": "0.45346144", "text": "public function show(Employee $employee)\n {\n return $this->successResponse($employee);\n }", "title": "" }, { "docid": "2a4bc15397ab06488e4815a783989160", "score": "0.45327297", "text": "public function show(Request $request, $employee_id)\n {\n $withChildren = $request->get('with_children', false);\n\n $employee = Employee::query();\n\n if ($withChildren) {\n $employee->with('children');\n }\n\n $employee = $employee->findOrFail($employee_id);\n $employee->isLeaf = $employee->isLeaf();\n\n return $this->jsonResponse($employee);\n }", "title": "" }, { "docid": "92656012c8abd29d02e79f2cc328ed89", "score": "0.4525475", "text": "public function employeesUnarchiveAsyncWithHttpInfo($request, $real_estate_agency_id)\n {\n $returnType = '';\n $request = $this->employeesUnarchiveRequest($request, $real_estate_agency_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "69bd29221e1b9e51a0b39f8d67c6bc2c", "score": "0.44835487", "text": "public function importMerchantCreditsAsyncWithHttpInfo($wt_employee_import_records)\n {\n $returnType = 'string';\n $request = $this->importMerchantCreditsRequest($wt_employee_import_records);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "a745f52a2796b309559ad0e5abd05dac", "score": "0.44800088", "text": "public function show(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "a745f52a2796b309559ad0e5abd05dac", "score": "0.44800088", "text": "public function show(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "a745f52a2796b309559ad0e5abd05dac", "score": "0.44800088", "text": "public function show(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "a745f52a2796b309559ad0e5abd05dac", "score": "0.44800088", "text": "public function show(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "a745f52a2796b309559ad0e5abd05dac", "score": "0.44800088", "text": "public function show(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "a745f52a2796b309559ad0e5abd05dac", "score": "0.44800088", "text": "public function show(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "a745f52a2796b309559ad0e5abd05dac", "score": "0.44800088", "text": "public function show(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "4e6b39fa6e01d2b8dad6d7ba13090961", "score": "0.4463701", "text": "public function fetchInvoicesAsyncWithHttpInfo()\n {\n $returnType = 'mixed';\n $request = $this->fetchInvoicesRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "835d2e6074ccc54e69b010ea9dfbdd31", "score": "0.44570386", "text": "public function getEmployees()\n {\n // If Employee Instance not setted,\n // then load it otherwise Not.\n if (False == $this->employees) {\n $this->loadEmployees();\n }\n // Return Employee Details.\n return $this->employees;\n }", "title": "" }, { "docid": "e8c4eb04ce307fe4448dc9a1001f1f71", "score": "0.44320962", "text": "public function show($employee_id)\n {\n $employee = Employee::with('timesheet')->find($employee_id);\n return response()->json(['employee_timesheets' => $employee]);\n }", "title": "" }, { "docid": "5534166157622e1e50eacd9f38f66307", "score": "0.44240648", "text": "public function searchByEmployees()\n {\n $employee = factory(Employee::class)->create();\n $expectedNovelties = factory(Novelty::class, 2)->create(['employee_id' => $employee->id]);\n factory(Novelty::class, 3)->create();\n\n $this->json('GET', $this->endpoint, ['employees' => [['id' => $employee->id]]])\n ->assertOk()\n ->assertJsonHasPath('data.0.id')\n ->assertJsonHasPath('data.1.id')\n ->assertJsonMissingPath('data.2.id')\n ->assertJsonMissingPath('data.3.id')\n ->assertJsonMissingPath('data.4.id')\n ->assertJsonFragment(['id' => $expectedNovelties[0]->id])\n ->assertJsonFragment(['id' => $expectedNovelties[1]->id]);\n }", "title": "" }, { "docid": "83561fa5c0af1dbd21decb4e732f4125", "score": "0.4423092", "text": "public function updateClubMembersAsyncWithHttpInfo($wt_employee_update_records)\n {\n $returnType = 'string';\n $request = $this->updateClubMembersRequest($wt_employee_update_records);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "a2b96cfe44ce2905e57489ee593074eb", "score": "0.4421821", "text": "public function updateEmployeePeerAsyncWithHttpInfo($user_id, $wt_employee_update)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\Employee';\n $request = $this->updateEmployeePeerRequest($user_id, $wt_employee_update);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "6a9d6b5943bc5b2f68b5f2cfed801192", "score": "0.44061708", "text": "public function lookmlModelExploreAsyncWithHttpInfo($lookml_model_name, $explore_name, $fields = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\LookmlModelExplore';\n $request = $this->lookmlModelExploreRequest($lookml_model_name, $explore_name, $fields);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "f70d35f74de0e697b110d00fc82ea721", "score": "0.4395621", "text": "public function inventoryAllocationInquiryGetListAsyncWithHttpInfo($select = null, $filter = null, $expand = null, $custom = null, $skip = null, $top = null)\n {\n $returnType = '\\Hut6\\CranaplusAcumaticaSdk\\Model\\InventoryAllocationInquiryModel[]';\n $request = $this->inventoryAllocationInquiryGetListRequest($select, $filter, $expand, $custom, $skip, $top);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "e850c678ff6d6d05a074e8190cfb71ca", "score": "0.43823814", "text": "public function employeesArchiveAsyncWithHttpInfo($request, $real_estate_agency_id)\n {\n $returnType = '';\n $request = $this->employeesArchiveRequest($request, $real_estate_agency_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "5a43734265311d5c2b19a3664c879402", "score": "0.43768987", "text": "public function show(int $id): EmployeeRole\n {\n $response = $this->guzzle->request('GET', $this->endpoint . '/' . $id, [\n 'headers' => $this->getHeaders(),\n ]);\n\n $decoded = json_decode($response->getBody()->getContents());\n\n return new EmployeeRole($decoded);\n }", "title": "" }, { "docid": "6bb0b840b1aee5a2a17c14a91d2ed043", "score": "0.43743062", "text": "public function findEmployeeById(int $id) : Employee\n {\n try {\n return $this->findOneOrFail($id);\n } catch (ModelNotFoundException $e) {\n throw new EmployeeNotFoundException;\n }\n }", "title": "" }, { "docid": "fd7f5ff9bb5c7d0e41d55047d04150d0", "score": "0.4374124", "text": "public function getOvertimeEmployees()\n {\n return CHtml::listData(\n OvertimeEmployee::model()->findAll(\n array('condition'=>\"overtime_id = $this->overtime_id\")\n ),\n 'employee_id',\n 'fullName'\n );\n }", "title": "" }, { "docid": "d3d26b74769664fd697378fd52884b7e", "score": "0.43709427", "text": "public function show($id)\n {\n return Employee::findOrFail($id);\n }", "title": "" }, { "docid": "d3d26b74769664fd697378fd52884b7e", "score": "0.43709427", "text": "public function show($id)\n {\n return Employee::findOrFail($id);\n }", "title": "" }, { "docid": "d3d26b74769664fd697378fd52884b7e", "score": "0.43709427", "text": "public function show($id)\n {\n return Employee::findOrFail($id);\n }", "title": "" }, { "docid": "a0178289372e5cf5ee23241de91c26d7", "score": "0.43644363", "text": "public function showEmployee($EmployID,$EmployFirstName)\n {\n $result= $this->viewEmployee($EmployID,$EmployFirstName);\n }", "title": "" }, { "docid": "7983a22b089dc5f6a0e0ea84c02b6b05", "score": "0.43603358", "text": "public function index()\n {\n $emp = Employee::all();\n return EmployeeResource::collection($emp);\n }", "title": "" }, { "docid": "5b82b65f1b934223f05ce9cca00464eb", "score": "0.43562686", "text": "public function retrieveEmailsByCIDAsyncWithHttpInfo()\n {\n $returnType = '\\OpenAPI\\Client\\Model\\MsaQueryResponse';\n $request = $this->retrieveEmailsByCIDRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "8d6c483910a24fe86af3ae383176fa3b", "score": "0.43519726", "text": "public function fetchOptInListSourcesCreatedByEmployeeAsync()\n {\n return $this->fetchOptInListSourcesCreatedByEmployeeAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "094ea773421b396d8572038954043ef6", "score": "0.4351549", "text": "public function listUserIdentitiesAsyncWithHttpInfo($organization_id, $user_id, $page = null, $count = 100)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\InlineResponse2001';\n $request = $this->listUserIdentitiesRequest($organization_id, $user_id, $page, $count);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "b149f41fa296b2d0c80028e905a591c3", "score": "0.4339983", "text": "public function index() {\n $employee = Employee::orderBy( 'id', 'desc' )->get();\n return response()->json( $employee );\n }", "title": "" }, { "docid": "6e92ce8331caab189249f55288ee0eff", "score": "0.4325086", "text": "public function index($id = null) {\n if ($id == null) {\n return Employee::orderBy('id', 'asc')->get();\n } else {\n return $this->show($id);\n }\n }", "title": "" }, { "docid": "273c8fd14963dccda2056babacc691d1", "score": "0.43189132", "text": "public function getEmployeeData($id){\n echo Employee::findOrFail($id);\n }", "title": "" }, { "docid": "1abcb431f71b91308d8b128d475598de", "score": "0.43057758", "text": "public function getAllEmployees()\n {\n $head = Position::model()->findByAttributes(array(\n 'employee_id'=>($this->head_id) ? $this->head_id : Yii::app()->user->getId()\n ));\n\n return CHtml::listData(\n User::model()->findAll(array(\n 'join'=>'JOIN position ON user_id = position.employee_id',\n 'condition'=>\"status = 'ACTIVE' AND \n user_id != $head->employee_id AND \n position.department_id = $head->department_id\",\n 'order'=>'last_name'\n )),\n 'user_id',\n 'fullName'\n );\n }", "title": "" }, { "docid": "62671c262e9c42d2417f8240421b21a6", "score": "0.42933667", "text": "public function index(EmployeeService $employeeService, Request $request)\n {\n $data = $employeeService->getAll(10, $request->page);\n return $this->responseSuccess('', EmployeeResource::collection($data), [\n 'current_page' => (integer)$data->currentPage(),\n 'last_page' => (integer)$data->lastPage(),\n 'items' => (integer)$data->items(),\n 'total_items' => (integer)$data->total(),\n 'has_more_pages' => (integer)$data->hasMorePages(),\n 'from' => (integer)$data->firstItem(),\n 'to' => (integer)$data->lastItem(),\n ]);\n }", "title": "" }, { "docid": "29b26e233a4555c48cf3c599e9d1b691", "score": "0.4287785", "text": "public function show($employee_id)\n {\n //\n }", "title": "" }, { "docid": "4f02c0b1f1b61e6443007ffcf84651b6", "score": "0.42715162", "text": "public function index()\n {\n $employee = Employee::all();\n\n return response()->json($employee);\n }", "title": "" }, { "docid": "16cdfaf6c142489e163fd84d8f39ab9f", "score": "0.4267302", "text": "public function testGetEmployeeFound()\n {\n $dbRepo = new \\Structure\\Employees\\EmployeesRepositoryInMemory();\n $data = GetEmployee::get($dbRepo, '2a57bdf5-edf8-4276-a50f-f4370cf82bbd');\n $this->assertIsArray($data);\n }", "title": "" }, { "docid": "d5f866a02d4ba85d6534f0a4c2788295", "score": "0.42641982", "text": "public function createFileAsyncWithHttpInfo($wt_employee_file_create)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\InlineResponse2001';\n $request = $this->createFileRequest($wt_employee_file_create);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "08fbfce65042126aa080dddd5b4836bd", "score": "0.4263292", "text": "public function show(Employee $employee)\n {\n return view('employee.show',compact('users'));\n }", "title": "" }, { "docid": "7abeda4a01bdefc2876931ecdc4d6197", "score": "0.42619482", "text": "function getEmployee($employeenumber){\n $query = \"SELECT * FROM vw_getemployeelist WHERE employeenumber = \" . mysqli_real_escape_string($this->connection, $employeenumber);\n $employee = array();\n\n if($result = $this->connection->query($query)){\n $employee = $result->fetch_assoc();\n }\n\n return $employee;\n }", "title": "" }, { "docid": "606f3e0cfc73d00245f2f44f53169536", "score": "0.42526063", "text": "public function show($id)\n {\n $employee = EmployeeManager::getByIdWithFull($id);\n\n return response()->json($employee);\n }", "title": "" }, { "docid": "979d91d6d2bd927ae9cbb7af7371dace", "score": "0.42517695", "text": "public function show()\n {\n $data = employees::with('employee_address')->with('employee_contacts')->get();\n return $data;\n }", "title": "" }, { "docid": "a01d032722c06d33b59642db3746d498", "score": "0.42440993", "text": "public function findPetsByTagsAsyncWithHttpInfo($tags)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\Pet[]';\n $request = $this->findPetsByTagsRequest($tags);\n\n return $this->httpAsyncClient->sendAsyncRequest($request)\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function (HttpException $exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $exception->getRequest(),\n $exception->getResponse(),\n $exception\n );\n }\n );\n }", "title": "" }, { "docid": "510d418b58b4a456cabf799b486ed413", "score": "0.4242304", "text": "public function getLatestEmailInInboxAsyncWithHttpInfo($inbox_id, $timeout_millis, string $contentType = self::contentTypes['getLatestEmailInInbox'][0])\n {\n $returnType = '\\MailSlurp\\Models\\Email';\n $request = $this->getLatestEmailInInboxRequest($inbox_id, $timeout_millis, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "e583b64ba92a4d9e6baa4c87e1ae1214", "score": "0.42369238", "text": "protected function getEmployeeInfo(Employee $employee) {\n return [\n 'id' => $employee->id,\n 'name' => $employee->name,\n 'text' => $employee->name,\n 'email' => $employee->email,\n 'roleInTeam' => is_null($employee->roleInTeam) ? null : $employee->roleInTeam->name,\n 'avatar_url' => route('home').\"/\".(is_null($employee->avatar_url) ? Constant::DEFAULT_AVATAR_URL : $employee->avatar_url)\n ];\n }", "title": "" }, { "docid": "4cd326842d1fd5e92c6a008d04d0b7f6", "score": "0.42334855", "text": "public function getEmployees()\n {\n $users=App\\User::paginate(5);\n return view('user.employees.employees',compact('users'));\n }", "title": "" }, { "docid": "700e43fbd5df665e46cfe04817b6978a", "score": "0.42287073", "text": "public function show($id)\n {\n $article = Employee::find($id);\n if($article){\n return new EmployeeResource($article);\n }\n return\"Employee Not Found\";\n }", "title": "" }, { "docid": "1aa57f4fab99e8382c9c916b45140c95", "score": "0.42256328", "text": "public function index()\n {\n $employees = Employee::all();\n return $employees;\n }", "title": "" }, { "docid": "904ee5da27b4b193e29b883462a90a88", "score": "0.4213803", "text": "public function getIncidentsAsync($body)\n {\n return $this->getIncidentsAsyncWithHttpInfo($body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "d946fcbbf76533447f75be90ff87c1d7", "score": "0.4207178", "text": "public function index(Employee $model )\n {\n $employees = Employee::orderBy('created_at', 'desc')\n ->where('status', Employee::TYPE_P_TETAP)->paginate(25);\n\n return $this->view('employee.index', compact('employees'));\n // return view('index', ['employees' => $model->paginate(15)]);\n }", "title": "" }, { "docid": "5891730212c842acd56e891e51a45544", "score": "0.42045927", "text": "public function getEmployeeFromEmployer(string $employerId, string $employeeId): array\n {\n $response = $this->guzzleClient->get(\n \"/Employer/{$employerId}/Employee/{$employeeId}\"\n );\n\n return $this->getResponseData($response);\n }", "title": "" }, { "docid": "1053f523b163f5aea768b40cc60da8b5", "score": "0.42034236", "text": "public function listEnrollmentRequestsAsyncWithHttpInfo($organization_id, $where_provider = null, $where_user = null, $where_first_name = null, $where_last_name = null, $where_registered_by = null, $where_fiscal_code = null, $page = null, $count = 100)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\InlineResponse2005';\n $request = $this->listEnrollmentRequestsRequest($organization_id, $where_provider, $where_user, $where_first_name, $where_last_name, $where_registered_by, $where_fiscal_code, $page, $count);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "dde183e688b124bbfc8842ba0ab725f1", "score": "0.41978243", "text": "public function employees()\n\t{\n\t\t\n\t\trequire('models/employee_model.php');\n\t\t$emp = new employee_model();\n\t\t$employees = $emp->get_employees();\n\t\trequire('views/employees.php');\n\t\t\n\t}", "title": "" }, { "docid": "55a6ad24cdec97d303583012a60eefa3", "score": "0.41905853", "text": "public function getById($id)\n {\n return Employee::where('id', $id)->first();\n }", "title": "" } ]
15608ebd3fbf8b752c12b886608ca857
Lists all Answer models.
[ { "docid": "cdd18e81ee67ccc8f5a34fb9e211ce52", "score": "0.0", "text": "public function actionList($slug = null)\n {\n $category = CategorySearch::getCategoryBySlug($slug);\n if (is_null($category)) {\n throw new NotFoundHttpException(Faq::t('base', 'Not found.'));\n }\n\n $searchModel = new AnswerSearch();\n return $this->render('index', [\n 'category' => $category,\n 'categories' => CategorySearch::getFaqLists(false),\n 'models' => $searchModel->search(Yii::$app->request->queryParams, $category->id),\n ]);\n }", "title": "" } ]
[ { "docid": "19be858f2424c6c9d9bc1809becf7272", "score": "0.7134047", "text": "public function list()\n {\n return $this->questionModel::with(['answerStructure', 'answerTypeMetadata'])->get();\n }", "title": "" }, { "docid": "148666a4b3673155ce7cf0dce59144d0", "score": "0.7034722", "text": "public function getAllAnswers();", "title": "" }, { "docid": "a63f6d72fa5fbdadd6396d8c132ca168", "score": "0.69881594", "text": "public function index()\n {\n //\n return answer::all();\n }", "title": "" }, { "docid": "97eac981d149fa79570fde74256e77ac", "score": "0.68176633", "text": "public function index()\n\t{\n\t\treturn new AnswersResource(AnswerResource::collection(Answer::all()));\n\t}", "title": "" }, { "docid": "5fd50d0f109764bb94fc653867d23172", "score": "0.6815522", "text": "public function actionAll()\n {\n $model = new NoAnswerSearch();\n $dataProvider = $model->searchAll(Yii::$app->request->get());\n return [\n 'models' => NoAnswer::allFields($dataProvider->getModels()),\n// 'page_count' => $dataProvider->pagination->pageCount,\n// 'page' => $dataProvider->pagination->page + 1,\n 'count_model' => $dataProvider->getTotalCount()\n ];\n }", "title": "" }, { "docid": "492fa07c294693d8b7aa48cfa803d65a", "score": "0.668284", "text": "public function index()\n {\n $answers = Answer::get();\n\n return view('answers.index', compact('answers'));\n }", "title": "" }, { "docid": "8b39672920d64270defe49e790fabb78", "score": "0.66610694", "text": "public function index()\n {\n $questions = SurveyQuestion::with('answers')->get();\n return $questions;\n }", "title": "" }, { "docid": "658d5ecd88d7bb4f4500c728aa42d799", "score": "0.66340274", "text": "public function index()\n {\n $answer = Answer::all();\n return view('backend.answer.answer', compact('answer'));\n }", "title": "" }, { "docid": "48c21b4208d3fccf26ee3f7471006c93", "score": "0.64654446", "text": "public function answers()\n {\n return $this->hasMany(Answer::class);\n }", "title": "" }, { "docid": "8180f0a4f22ef0b84a945f3ba286c297", "score": "0.64449936", "text": "public function index(){\n return new QuestionCollection(Question::all());\n }", "title": "" }, { "docid": "6597e3db54af6ee067bd9c877e6aae12", "score": "0.64192915", "text": "public function answers()\n\t{\n\t\treturn $this->hasMany('Answer');\n\t}", "title": "" }, { "docid": "a4b001178882b8394dddd258e7061fbf", "score": "0.64068496", "text": "public function model()\n {\n return Answer::class;\n }", "title": "" }, { "docid": "16437ea3447a248bf44040a5fed78f79", "score": "0.63960874", "text": "public function answers() \n {\n return $this->hasMany(Answer::class);\n }", "title": "" }, { "docid": "a04ff41a11d41648a57c726e1a6464eb", "score": "0.6292261", "text": "public function answers()\n {\n return $this->hasMany('App\\Answer');\n }", "title": "" }, { "docid": "82c620a933431eae2d93b21f699ffc0d", "score": "0.6273209", "text": "public function index()\n {\n return Question::getAll()->map(function($question) {\n return $question->parse();\n });\n }", "title": "" }, { "docid": "76304b8c032ff941ffa8bf457bebd2ad", "score": "0.6267441", "text": "public function answers() {\n return $this->hasMany('App\\Answer');\n }", "title": "" }, { "docid": "3b1a348da533dcb6668082a3467f61de", "score": "0.6263692", "text": "public function actionList()\n {\n $this->restObj->loadModels();\n }", "title": "" }, { "docid": "d7cfa3fa5990ee648c1f7c9042daeb31", "score": "0.6234744", "text": "public function index()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "f9b02598bd6247ff437e4a075c683860", "score": "0.6231383", "text": "public function showAllQuestions()\n {\n return response()->json(Question::all());\n }", "title": "" }, { "docid": "af3448de4a8ed73d5b3474f725595dda", "score": "0.6198028", "text": "public function getModel()\n {\n return Answer::class;\n }", "title": "" }, { "docid": "b137dab6954cc5c71d078396a2e71772", "score": "0.6186582", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $answers = $em->getRepository('MainBundle:Answer')->findAll();\n $users = $em->getRepository('MainBundle:User')->findAll();\n\n return $this->render('@FOSUser/answer/index.html.twig', array(\n 'answers' => $answers,\n 'users' => $users,\n ));\n }", "title": "" }, { "docid": "07e2c7035c91e760d4b57cb2296a4571", "score": "0.6166218", "text": "public function listModels(): mixed;", "title": "" }, { "docid": "044153815811f962e878fd1062d9589f", "score": "0.6153751", "text": "public function actionIndex()\n {\n $searchModel = new QuestionSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider = new ActiveDataProvider([\n 'query' => $dataProvider->query,\n 'pagination' => [ 'pageSize' => 5],\n ]);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "10ccc1beeb774910f8a8fc9b12d7d6fb", "score": "0.61335075", "text": "public function getAll()\n {\n return $this->question_set->all();\n }", "title": "" }, { "docid": "38159222321647588f4c75ab57264932", "score": "0.611923", "text": "public function actionListAsso()\n {\n $this->restObj->loadModels();\n }", "title": "" }, { "docid": "15caf5f4920ba377facc2266cf5ce620", "score": "0.6090502", "text": "public function get_index()\n\t{\n\t\t$answers = Answer::with(array('question'))->get();\n\n\t\t$this->layout->title = 'Answers';\n\t\t$this->layout->content = View::make('answers.index')->with('answers', $answers);\n\t}", "title": "" }, { "docid": "11e135ae1b4d0283e2ac0e62a87f616a", "score": "0.6081172", "text": "public function allQuiz(){\n return Quiz::all();\n }", "title": "" }, { "docid": "3bbc108afdd75e89b55b231bbbd052b5", "score": "0.6078364", "text": "public function index()\n {\n //\n try {\n\n return Question::with([\"user\", \"types\"])\n ->withCount(\"questionAnswers\")\n ->orderBy(\"created_at\", \"DESC\")->get();\n\n }catch (\\Exception $exception){\n return $exception->getMessage();\n }\n }", "title": "" }, { "docid": "b031e52fa3aaebd4f3ff5c020173a14d", "score": "0.6073763", "text": "public function index()\n {\n // Order By Desc\n $questions = $this->questionModel->with('user')->orderBy('created_at', 'desc')->get();\n\n return $questions;\n }", "title": "" }, { "docid": "3ac5a742e5aac7ca072cc29695a9e304", "score": "0.6003975", "text": "public function answers() {\n return $this->hasMany('App\\Models\\Api\\Answers', 'id_option', 'id');\n }", "title": "" }, { "docid": "f72d411e0cc23299e9363f49ddba3523", "score": "0.5992378", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('OrganizationEnrollmentBundle:Question')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "449e7c5de26a63cb2fd08b62663e601e", "score": "0.59551287", "text": "public function answers()\n {\n return $this->hasMany(Answers::class, 'survey_id', 'id');\n }", "title": "" }, { "docid": "2a2b81b4cac71e45ef4bdb46d3f3c7b9", "score": "0.59532154", "text": "public function getAll()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "2a2b81b4cac71e45ef4bdb46d3f3c7b9", "score": "0.59532154", "text": "public function getAll()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "2a2b81b4cac71e45ef4bdb46d3f3c7b9", "score": "0.59532154", "text": "public function getAll()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "2a2b81b4cac71e45ef4bdb46d3f3c7b9", "score": "0.59532154", "text": "public function getAll()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "2a2b81b4cac71e45ef4bdb46d3f3c7b9", "score": "0.59532154", "text": "public function getAll()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "494ed28d0542aeefb8c405fbd491663e", "score": "0.5949645", "text": "public function all()\r\n {\r\n return $this->model->get();\r\n }", "title": "" }, { "docid": "4875b46ab9b80f164188af62d0011b83", "score": "0.5910065", "text": "public function all(){\n\n return $this->model->all();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.5905499", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.5905499", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "9777075d5734728c57769451927a836d", "score": "0.59030646", "text": "public function getAll()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "de0c2404b783a33659a3a3c282e9a9a1", "score": "0.5883127", "text": "public function all()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "de0c2404b783a33659a3a3c282e9a9a1", "score": "0.5883127", "text": "public function all()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "de0c2404b783a33659a3a3c282e9a9a1", "score": "0.5883127", "text": "public function all()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "de0c2404b783a33659a3a3c282e9a9a1", "score": "0.5883127", "text": "public function all()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "de0c2404b783a33659a3a3c282e9a9a1", "score": "0.5883127", "text": "public function all()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "de0c2404b783a33659a3a3c282e9a9a1", "score": "0.5883127", "text": "public function all()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "bd14379dea48c71e00ec8b9b4ad1ac11", "score": "0.5881438", "text": "public function index()\n\t{\n\t\t$mutipleAnswers = $this->mutipleAnswerRepository->all();\n\n\t\treturn $this->sendResponse($mutipleAnswers->toArray(), \"MutipleAnswers retrieved successfully\");\n\t}", "title": "" }, { "docid": "e0a49fed35e955d06253077c5e311ec3", "score": "0.5866986", "text": "public function allAction () {\n $EM = new EM();\n $records = $EM->EntityManager()\n ->getRepository('Miyagiiu')\n ->findAll();\n\n return $records;\n }", "title": "" }, { "docid": "6efbe59b45e2ad7c9ab18bcbb05c634b", "score": "0.5848054", "text": "public function all()\n {\n return $this->model->all();\n\n }", "title": "" }, { "docid": "5d45009b76e84bd88f3c1f83349348fd", "score": "0.5847526", "text": "public function all() {\n return $this->model->all();\n }", "title": "" }, { "docid": "8bbc0abe3876d36a6f20ade42e99d66b", "score": "0.5843002", "text": "public function answers()\n {\n return $this->hasMany(GameAnswer::class);\n }", "title": "" }, { "docid": "fcd657ea23b2e8486d9d804b4ec6adce", "score": "0.58343613", "text": "public function index()\n {\n $quizs = $this->model->all(); \n\n return view('quizs.index', compact('quizs'));\n }", "title": "" }, { "docid": "60dc41a07a7cbe39d2db23d04d0c55d1", "score": "0.5832001", "text": "public function index()\n {\n return View::make('backend.quiz.list')->with('attendees', Attendee::paginate(30));\n }", "title": "" }, { "docid": "b25690e5f5dd2448afb8476674b08773", "score": "0.58240336", "text": "public function index()\n {\n $data['list_question'] = question::all();\n return view('admin.pages.list_question', $data);\n }", "title": "" }, { "docid": "a7718b374c1fa513d2b520397006fb6a", "score": "0.58060706", "text": "public function findAll()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "3baafb16e11772b0486fb42aabce76f6", "score": "0.5804948", "text": "public function index()\n\t{\n\t\t$questions = Question::all();\n \treturn view('question.index')->withQuestions($questions);\n\t}", "title": "" }, { "docid": "7c9f88a95d5e3816ff3b469424dbbb97", "score": "0.58036524", "text": "public function index(Answer $answer)\n {\n return $answer->votes()->get();\n }", "title": "" }, { "docid": "947aa2b3213ef89dddd5fa0287910805", "score": "0.5794416", "text": "public function answers()\n {\n return $this->hasMany(Answer::class, 'fk_user');\n }", "title": "" }, { "docid": "4c6b319e397c45d649f8fe5ba2a7bd53", "score": "0.5790701", "text": "public function index()\n {\n $model = $this->resourceModel;\n return $model::all();\n }", "title": "" }, { "docid": "fb5d982ebf7ae2c5469cb6f0fa85baf5", "score": "0.57886493", "text": "public function index()\n\t{\n\t\t//\n\n\t\treturn view('questions/list');\n\t}", "title": "" }, { "docid": "15eac510d3b8c6729e253d07bb272d35", "score": "0.5786264", "text": "public function actionList()\r\n {\r\n // Get the results\r\n $models = Notes::model()->findAll( 'creator_id = ' . Yii::app()->user->id );\r\n\r\n // Detect if we have none...\r\n if( !count( $models ) )\r\n {\r\n // Send response and end nicely\r\n JsonHandler::_sendResponse( 200, sprintf( 'No items where found for API component <b>%s</b>', $this->sThisComponent ) );\r\n }\r\n else\r\n {\r\n // Result\r\n $aRows = array();\r\n \r\n // Load them\r\n foreach( $models as $aThisModel )\r\n {\r\n $aRows[] = $aThisModel->attributes;\r\n }\r\n\r\n // Send response and end nicely\r\n JsonHandler::_sendResponse( 200, CJSON::encode( $aRows ) );\r\n }\r\n }", "title": "" }, { "docid": "8d965c09ae04b385437840d51d4a85bc", "score": "0.5770528", "text": "public function actionIndex()\n {\n $searchModel = new QuestionBankSearch();\n $dataProvider = $searchModel->search(Yii::$app->getRequest()->getQueryParams());\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "b17780a696a307c42a13fd3b52cd9dd1", "score": "0.5761172", "text": "public function index() {\n\n $data = $this->adminAnswerRating->getAnswerRatings();\n $content = view('admin.answers-rating.index', $data)->render();\n $title = 'Admin - Answer Ratings';\n return Admin::view($content, $title);\n }", "title": "" }, { "docid": "dddbf226fb69c21bf5e3e48fb12e0855", "score": "0.5761058", "text": "public function index()\n {\n return Exercises::all();\n }", "title": "" }, { "docid": "8b2f282af3cd7e4e78278ffcc1649eb4", "score": "0.57542694", "text": "public function indexAction() {\n // check the resource type\n $models = $this->orm->getModels();\n\n try {\n // creates a model query based on the document query\n $documentQuery = $this->document->getQuery();\n\n // apply search\n $searchQuery = $documentQuery->getFilter('query', array());\n if ($searchQuery) {\n foreach ($models as $index => $model) {\n if (strpos($model->getName(), $searchQuery) === false) {\n unset($models[$index]);\n }\n }\n }\n\n // get the total count\n $numModels = count($models);\n\n // apply order\n $orderMethod = null;\n foreach ($documentQuery->getSort() as $orderField => $orderDirection) {\n if ($orderField != 'name') {\n $error = $this->api->createError(Response::STATUS_CODE_BAD_REQUEST, 'index.order', 'Order field does not exist');\n $error->setDetail('Order field \\'' . $orderField . '\\' does not exist in resource type \\'models\\'');\n $error->setSourceParameter(JsonApiQuery::PARAMETER_SORT);\n\n $this->document->addError($error);\n } elseif ($orderDirection == 'ASC') {\n $orderMethod = array($this, 'sortModelAscending');\n } elseif ($orderDirection == 'DESC') {\n $orderMethod = array($this, 'sortModelDescending');\n }\n }\n\n if ($orderMethod) {\n usort($models, $orderMethod);\n }\n\n // apply limit\n $limit = $documentQuery->getLimit(50);\n $offset = $documentQuery->getOffset();\n\n $models = array_slice($models, $offset, $limit, true);\n\n // no errors, assign the result to the document\n if (!$this->document->getErrors()) {\n $this->document->setLink('self', $this->request->getUrl());\n $this->document->setResourceCollection('models', $models);\n $this->document->setMeta('total', $numModels);\n\n if ($this->request->getQueryParameter('list') == 1) {\n $list = array();\n foreach ($models as $model) {\n $list[$model->getName()] = $model->getName();\n }\n\n $this->document->setMeta('list', $list);\n }\n }\n } catch (BadRequestJsonApiException $exception) {\n $this->getLog()->logException($exception);\n\n $error = $this->api->createError(Response::STATUS_CODE_BAD_REQUEST, 'index.input', $exception->getMessage());\n $error->setSourceParameter($exception->getParameter());\n\n $this->document->addError($error);\n }\n }", "title": "" }, { "docid": "9b5710112556328747425b2f3edfdcdc", "score": "0.5753754", "text": "public function answers()\n {\n return $this->morphedByMany('App\\Answer', 'taggable');\n }", "title": "" }, { "docid": "c47747da41037cffb7ca6030eb0269ad", "score": "0.57457244", "text": "public function listAll()\n {\n echo view('{name}/listAll', [\n 'rows' => $this->model->paginate(20),\n ]);\n }", "title": "" }, { "docid": "cc2c2be2147ec66082543056cc53ed89", "score": "0.5745504", "text": "public function index()\n\t{\n $answers = Answer::with('user')->get();\n //return view('courses.index')->with('courses', $courses); =\n return view('answers.index', compact('answers'));\n\t}", "title": "" }, { "docid": "6d8e03c9367b47a0ed6911f78c9f7cb7", "score": "0.57427126", "text": "public static function listModels(){\n\t\treturn self::model()->findAllByAttributes(array(),array('order'=>'position ASC'));\n\t}", "title": "" }, { "docid": "73848175387224af19ce01070d846660", "score": "0.5730973", "text": "public function getQuestionListe() {\n return $this->QuestionGenerale->find('all');\n }", "title": "" }, { "docid": "ec93b9b34058c1960e0ce685e8b1625e", "score": "0.5725114", "text": "public function index()\n {\n $absences = Absences::join(\n \"employees\",\n \"employees.id\",\n \"=\",\n \"absences.employees_id\"\n )->select(\n \"absences.id\",\n \"absences.motivoAusencia\",\n \"absences.urlArchivo\",\n \"absences.fecha\",\n \"employees.nombreCompleto\"\n )->get();\n // $absences = Absences::all();\n return $absences;\n }", "title": "" }, { "docid": "907597a95b78e9d2d7170089db5b2df3", "score": "0.57180285", "text": "public function answers()\n {\n return $this->hasMany('Shop\\Answers','question_id');\n }", "title": "" }, { "docid": "9819d444c2233c4f31e831768fc5a625", "score": "0.5715452", "text": "public function listAll()\n {\n $query = $this->model->with('author');\n $posts = $this->listData($query);\n\n return $posts;\n }", "title": "" }, { "docid": "e6bb01d9f49c6a22bab36df4cd194464", "score": "0.5706868", "text": "public function index()\n {\n return Ateneo::all( );\n }", "title": "" }, { "docid": "f4158e123d6576936fd71bd2d449d222", "score": "0.56955665", "text": "public function index()\n {\n return Article::all();\n }", "title": "" }, { "docid": "f4158e123d6576936fd71bd2d449d222", "score": "0.56955665", "text": "public function index()\n {\n return Article::all();\n }", "title": "" }, { "docid": "f799d7e4f0ec7fba7a904ffc727d5f8f", "score": "0.5691066", "text": "public function allFaqListAction()\n {\n $faqRepository = $this->getDoctrine()->getRepository('AppBundle:Faq');\n\n $faq = $faqRepository->getAllEnabled();\n\n return $this->render('frontend/default/faq.html.twig', [\n 'faq' => $faq,\n ]);\n }", "title": "" }, { "docid": "e7dda03d4c2cac31643c75447497bb91", "score": "0.568854", "text": "public function getQuestionList();", "title": "" }, { "docid": "6ce8e66bc7d72fbb93780ff6bcdfe17f", "score": "0.56874394", "text": "public function list()\n {\n return $this->question_set->all()->pluck('name', 'id')->all();\n }", "title": "" }, { "docid": "0e4ff76c4edd1f47839255e8a1d694dc", "score": "0.56823194", "text": "public function showAll()\n\t{\n\t\t$this->allowTo('admin');\n\t\t$termManager = new \\Manager\\TermManager();\n\t\t// debug(get_class_methods($termManager));\n\t\t$terms = $termManager->findAll(\"modifiedDate\", \"DESC\");\n\n\t\t// debug($terms);\n\n\t\t$this->show('term/show_all_terms', ['terms' => $terms]);\n\t}", "title": "" }, { "docid": "d59294cbe74fdd434fa8c39bcff3422a", "score": "0.56791365", "text": "public function getAllModels()\n {\n return $this->models;\n }", "title": "" }, { "docid": "80b761167c5e9cd63c31abb018bff012", "score": "0.5678173", "text": "public function all()\n {\n return $this->job_question->all();\n }", "title": "" }, { "docid": "0048fa4bd3df0319f5f5fde87527a144", "score": "0.5672335", "text": "public function answers()\n {\n return $this->belongsToMany(Answer::class, 'answer_question_types')\n ->withPivot(['score', 'factor'])\n ->withTimestamps();\n }", "title": "" }, { "docid": "4ebe228852805142e610c971faf71d13", "score": "0.5671627", "text": "public function answer() {\n return $this->hasMany('App\\answer');\n }", "title": "" }, { "docid": "44034352eac843423f8836654fd5fda2", "score": "0.5668845", "text": "public function answers(){\n return $this->hasMany('App\\Answer','question_id','id');\n }", "title": "" }, { "docid": "21907dda7f4b588d51c096cb94998ce8", "score": "0.5668455", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM question';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "256a3b008b1e4b6d8b5685bb9840cb13", "score": "0.56676185", "text": "public function actionIndex($list_id)\n {\n $searchModel = new QuestionSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'list_id' => $list_id,\n ]);\n }", "title": "" }, { "docid": "511ba50d3ba624abcff165652a7161fe", "score": "0.56657124", "text": "public function actionIndex()\n {\n $searchModel = new TbPernyataanSurveySearch();\n $searchModel->all = true;\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "352c5a2f5e29cb24ad7724c2b5d2a703", "score": "0.5658914", "text": "public function index()\n {\n $questions = Question::all();\n \n return view('question.index', ['questions' => $questions]);\n }", "title": "" }, { "docid": "be15128b28ef5ca4199cd8348e280876", "score": "0.56580997", "text": "public function index()\n {\n $questioner = new Questioner();\n $lists = $questioner->get();\n $datas = [];\n foreach ($lists as $key => $value) {\n $datas['questionItems'][$value->category_name][] = [\n 'question'=> $value->question,\n 'answer_items'=> $value->answer_items,\n 'category_name'=> $value->category_name\n ];\n }\n $datas = json_encode($datas);\n return view('application.survey.index',compact('datas'));\n }", "title": "" }, { "docid": "53d6cf59d3c53aada898cc33f1d09d67", "score": "0.56572247", "text": "public function index()\n {\n $models = AdvModel::all();\n return view('admin.model.index')->with(['models' => $models]);\n }", "title": "" }, { "docid": "958aa43bc697c96de2c0d84d08bb1229", "score": "0.5654169", "text": "public function all()\n {\n return $this->getModel()->query()->get();\n }", "title": "" }, { "docid": "1367018964d2868a831b6a81dfaac6ea", "score": "0.5651887", "text": "public function answers(){\n \treturn $this->HasMany('App\\Answer', 'id_question');\n }", "title": "" }, { "docid": "8178265a30538bc227b5f1f5a3a6fef1", "score": "0.5650211", "text": "public function getAll() {\n return $this->database->table('questions');\n }", "title": "" }, { "docid": "03b1ff4cfeda3c8cceae9a74f3c34ae6", "score": "0.56500834", "text": "public function Answer()\n {\n return $this->hasMany('App\\Models\\AnswerInit','question_id','id');\n }", "title": "" }, { "docid": "14fb911a0c82dbb883ce82ae04fed72f", "score": "0.5646039", "text": "public function index()\n\t{\n\t\t$questions = Question::all();\n\t\treturn View::make('questions.index', ['questions'=>$questions]);\n\t}", "title": "" }, { "docid": "aa12f45d515ff539a572040088bc5b2b", "score": "0.5643726", "text": "public function index()\n\t{\n\t\t$questions = Question::all();\n\t\treturn View::make('questions.index')->with('questions', $questions);\n\t}", "title": "" }, { "docid": "58c13e73d38716db74e15fb895659883", "score": "0.5640886", "text": "public function index()\n {\n $models = Modelo::all();\n return view('models.index')\n ->with(\n [\n 'title' => 'Lista de Modelos', 'models' => $models,\n 'new' => route('models.create')\n ]\n );\n }", "title": "" }, { "docid": "ffefe5a80047f8560d596ba85ac87c84", "score": "0.563734", "text": "public function index()\n {\n $exams=Exam::all();\n return view('Admin.exams.index',compact('exams'));\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "4bac3188558c3acab53dd8d5175c1d4e", "score": "0.0", "text": "public function show($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.819168", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e5152a75698da8d87238a93648112fcf", "score": "0.7288952", "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": "87649d98f1656cc542e5e570f7f9fd1f", "score": "0.66155934", "text": "public function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t\t$this->setHeaderData();\n\t\t\tparent::display($resource_name, $cache_id, $compile_id);\n\t\t}", "title": "" }, { "docid": "b08b6bb501370e4c42f069ea734388a0", "score": "0.65008235", "text": "public function get($resource);", "title": "" }, { "docid": "dd518b422828ccdfc7b932a34e62225d", "score": "0.6274739", "text": "public function show(Resource $resource)\n {\n return response()->json($resource);\n \n }", "title": "" }, { "docid": "51a1c3499847de81938cf22e3e336bf2", "score": "0.62216103", "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": "cbf3bf22b6453f9015dd8d3552392655", "score": "0.6155698", "text": "protected function showResourceView($id)\n\t{\n\n\t\t$element = $this->getElements($id);\n\t\treturn Response::view('adm/IAS/element', array('data' => $element));\n\n\t}", "title": "" }, { "docid": "04d35d47081d101fff17d30acb1f2178", "score": "0.61417025", "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.61189145", "text": "public function displayAction($id)\n { }", "title": "" }, { "docid": "0243c17e457a131b89a485445f1cee26", "score": "0.60688365", "text": "public function show()\n {\n $this->getView($this->view_name);\n }", "title": "" }, { "docid": "f0d6bc8f87110dac3699808a11a93b8f", "score": "0.60563254", "text": "public function render()\n {\n $this->bindResource($this->resource);\n return parent::render();\n }", "title": "" }, { "docid": "66bedfeb611b91813c98a7e106a95902", "score": "0.5965739", "text": "private function displayImageResource($image) {\n if($image) {\n if($image->getExtension() == 'jpg' || $image->getExtension() == 'jpeg') {\n header('Content-Type: image/jpeg');\n imagejpeg($image->getResource(), null, 100);\n }\n else if($image->getExtension() == 'png') {\n header('Content-Type: image/png');\n imagepng($image->getResource(), null, 9);\n }\n else if($image->getExtension() == 'gif') {\n header('Content-Type: image/gif');\n imagegif($image->getResource(), null, 100);\n }\n }\n }", "title": "" }, { "docid": "d8bcb4a6a484fbd4595bf60c13751c5f", "score": "0.5915166", "text": "public function display()\n {\n $this->_getAdapter()->display();\n }", "title": "" }, { "docid": "df778faf9f0b4d88cab1a7ccf83e7502", "score": "0.5908281", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n $url = $em->getRepository('KtIoWebInterfaceBundle:Url')->find($id);\n\n if (!$url)\n throw $this->createNotFoundException();\n\n // TODO check we own this url\n return $this->render(\n 'KtIoWebInterfaceBundle:Url:show.html.twig',\n array('url' => $url)\n );\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.5903327", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.5903327", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "4e4b4802386aefba7de0e06d94dac1a8", "score": "0.586246", "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.5851207", "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": "c77fbba2f7b7f5018f4471f75871b57a", "score": "0.5843134", "text": "public function edit(Resource $resource)\n {\n return view(\n 'resources.edit', \n [\n 'resource' => $resource\n ]\n );\n }", "title": "" }, { "docid": "bebff39922dfa3f37a3d7a6997a89e2f", "score": "0.5843009", "text": "function show()\n\t{\n\t\t$this->postObject->display();\n\t}", "title": "" }, { "docid": "8aae95d60d936382831b42a40edb3397", "score": "0.582378", "text": "public function show()\r\n\t{\r\n\t\techo $this->template;\r\n\t}", "title": "" }, { "docid": "7c5c6f9fff24e84ba0d3b00444a0acc7", "score": "0.5821155", "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": "2f33e89741ba0a19b898dc9a1f9026fc", "score": "0.58116716", "text": "public function showResource($value, bool $justOne = false);", "title": "" }, { "docid": "d6af1b1d4946c54112fc9b7ca038cb20", "score": "0.5810573", "text": "public function display()\n\t{\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "baf449cd82447c0bffb577fe732c4f2b", "score": "0.57940876", "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": "ef3fb32b359d85e91687f25572082d98", "score": "0.57937366", "text": "public function display()\r\n {\r\n\r\n echo $this->get_display();\r\n\r\n }", "title": "" }, { "docid": "f7584132221ad89383b2964e2bd53fe5", "score": "0.57909745", "text": "public function show(Request $request, $id)\n {\n \n if($request->session()->exists('resources') && isset($request->session()->get('resources')[$id])){\n $resource = $request->session()->get('resources')[$id];\n \n $data = [];\n $data['resource']= $resource;\n return view('resource.show', $data);\n }\n return redirect('resource');\n }", "title": "" }, { "docid": "59b26eccbeb80415b27d312ada1ffed8", "score": "0.57814395", "text": "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "title": "" }, { "docid": "21604cc50e9ca2b999b8c59635c9346b", "score": "0.5778081", "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": "b5cf19a61f4df8b352f4c5245148ed8c", "score": "0.5773524", "text": "public function show()\n\t{\n\t\t// Set user states\n\t\t$this->setUserStates();\n\n\t\t// Set pagination\n\t\t$this->setPagination();\n\n\t\t// Set rows\n\t\t$this->setRows();\n\n\t\t// Set filters\n\t\t$this->setFilters();\n\n\t\t// Set toolbar\n\t\t$this->setToolbar();\n\n\t\t// Set menu\n\t\t$this->setMenu();\n\n\t\t// Set Actions\n\t\t$this->setListActions();\n\n\t\t// Render\n\t\t$this->render();\n\t}", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.57557684", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "e7bae91f4e998eac5e73657c932c48d7", "score": "0.575239", "text": "public function show($id) {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "e7bae91f4e998eac5e73657c932c48d7", "score": "0.575239", "text": "public function show($id) {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "f18ebc5f8b08ddef340fa4f0d3eeea2f", "score": "0.5750162", "text": "public static function show() {\n\t\treturn static::$instance->display();\n\t}", "title": "" }, { "docid": "e6492f335ada5179a4fe15779fa54555", "score": "0.5746409", "text": "public function show($id)\n\t{\n\t\t//\t\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.57188773", "text": "public function show($id) {}", "title": "" }, { "docid": "cb9307a32f6d22a33b956aed56db49ba", "score": "0.57178605", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\n\t}", "title": "" }, { "docid": "6ad29c72212e149d40619613cbacfe13", "score": "0.5710721", "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.5705416", "text": "public function show($id)\n\t{\n\t\t//No need for showing\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57009894", "text": "public function show(){}", "title": "" }, { "docid": "98910c6c774dc1299639c448306ea157", "score": "0.5694267", "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.56906986", "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.5688399", "text": "public function show($id)\n\t{ \n \t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
8544527b4b8774a32258b343a5981fe8
Gets query for [[BookAuthors]].
[ { "docid": "026a0eddc11e1986fc2b82584ce74fce", "score": "0.7692269", "text": "public function getBookAuthors()\n {\n return $this->hasMany(BookAuthor::class, ['book_id' => 'id']);\n }", "title": "" } ]
[ { "docid": "8039c96e1e00925349dad63b101be4f5", "score": "0.7938021", "text": "public function obtainAuthors()\n {\n return $this->performRequest('GET', '/books');\n }", "title": "" }, { "docid": "5086ce375ed368dfc640b010d7fc1ed6", "score": "0.7683035", "text": "public function getBookAuthors()\n {\n return $this->hasMany(BookAuthor::className(), ['book_id' => 'id']);\n }", "title": "" }, { "docid": "5086ce375ed368dfc640b010d7fc1ed6", "score": "0.7683035", "text": "public function getBookAuthors()\n {\n return $this->hasMany(BookAuthor::className(), ['book_id' => 'id']);\n }", "title": "" }, { "docid": "0fd2a99b9fb8ecb6fe7b58f23f0d8722", "score": "0.7638002", "text": "public function getBookAuthors()\n {\n return $this->hasMany(BookAuthor::className(), ['author_id' => 'id']);\n }", "title": "" }, { "docid": "258832a9aec2a51913dc71ddd91258ac", "score": "0.7571576", "text": "public function getAuthors();", "title": "" }, { "docid": "258832a9aec2a51913dc71ddd91258ac", "score": "0.7571576", "text": "public function getAuthors();", "title": "" }, { "docid": "4945eae1db52319445c50e466ea128e6", "score": "0.7445875", "text": "public function obtainAuthors()\n {\n return $this->performRequest('GET', '/authors');\n }", "title": "" }, { "docid": "4945eae1db52319445c50e466ea128e6", "score": "0.7445875", "text": "public function obtainAuthors()\n {\n return $this->performRequest('GET', '/authors');\n }", "title": "" }, { "docid": "b8597b9d715315dbc720cbb41b09ab57", "score": "0.7370944", "text": "public function listOfAuthors() {\n $queryStr = \"SELECT b.book_id AS bookId, b.title AS bookTitle, a.author_id AS authorId, a.image, c.cat_id, c.category, COUNT(ba.book_id) AS booksNumber, \"\n . \"CONCAT(a.first_name, ' ', a.last_name) AS authorName, \"\n . \"(SELECT COUNT(r.book_id) FROM reviews r WHERE b.book_id = r.book_id GROUP BY r.book_id) AS totalReviews \"\n . \"FROM books b \"\n . \"JOIN book_authors ba ON b.book_id = ba.book_id \"\n . \"JOIN authors a ON a.author_id = ba.author_id \"\n . \"JOIN categories c ON a.cat_id = c.cat_id GROUP BY a.author_id ORDER BY date_published DESC\";\n $authors = $this->_registry->getObject('db')->makeMultiDataArray($queryStr, 'authorName');\n $this->_countAll = $this->_registry->getObject('db')->affectedRows();\n return $authors;\n }", "title": "" }, { "docid": "716cff7eef3e87f63d76e1657684379b", "score": "0.7261711", "text": "public function getAuthorBooks()\n {\n return $this->hasMany(AuthorBook::className(), ['author_id' => 'id']);\n }", "title": "" }, { "docid": "0c9f17f9b25c7fa8381aeb561878ecc3", "score": "0.7222247", "text": "public function getAllAuthors() {\n $queryStr = \"SELECT a.author_id, a.first_name, a.last_name, CONCAT(a.place_of_birth, ', ', a.country) AS bornIn, \"\n . \"a.gender, c.category FROM authors a \"\n . \"JOIN categories c ON a.cat_id = c.cat_id ORDER BY a.author_id ASC\";\n return $this->_registry->getObject('db')->makeMultiDataArray($queryStr, 'author_id');\n }", "title": "" }, { "docid": "3a824c82afe2d28fb04c139feae4b632", "score": "0.7182269", "text": "static function getAuthors()\n {\n $sql = \"SELECT * FROM users ORDER BY lastName, firstName\";\n $q = self::getConn()->query($sql);\n $q->setFetchMode(PDO::FETCH_CLASS, 'Author', array());\n return $q;\n }", "title": "" }, { "docid": "c5046497ebf1e7acd8e7afc857dd7743", "score": "0.6937554", "text": "public static function getAuthorByBook( $db, $books ){\n try{\n $sql = \"select * from BookAuthors where book_id = :bid;\";\n $stmt = $db->prepare( $sql );\n $authors = array();\n for( $i = 0; $i < count( $books); $i++ ){ \n $stmt->bindValue( \":bid\", $books[ $i ]->getId(), PDO::PARAM_INT );\n $stmt->execute();\n $auth = array();\n $row = $stmt->fetch( PDO::FETCH_ASSOC );\n while( $row ){\n array_push( $auth, $row[ \"name\"] );\n $row = $stmt->fetch( PDO::FETCH_ASSOC );\n }\n array_push( $authors, $auth );\n }\n }\n catch( PDOException $e ){\n Logger::log( \"Error in getAuthorByBook: \".$e->getMessage(), \"270\" );\n }\n return $authors;\n }", "title": "" }, { "docid": "50d9d0e44ddb2220fb6c4630229849a4", "score": "0.68659693", "text": "public function getAuthors()\n {\n return $this->authors;\n }", "title": "" }, { "docid": "5cc677c3948ef17897e3cfb68fe61b40", "score": "0.6855996", "text": "public function selectAuthorsForUrl() {\n $queryStr = \"SELECT author_id, CONCAT(first_name, ' ', last_name) AS authorName FROM authors\";\n return $this->_registry->getObject('db')->makeMultiDataArray($queryStr, 'author_id');\n }", "title": "" }, { "docid": "d87c4c21b26da454426e9bf9e8085b78", "score": "0.6819986", "text": "public function get_authors()\n\t{\n\t\t$strsql = \"\n\t\t\tselect,\n\t\t\t\tb.id, \n\t\t\t\tb.author_name \n\t\t\tfrom \n\t\t\t\tsite_blog_entries a, \n\t\t\t\tsite_blog_authors b\n\t\t\twhere \n\t\t\t\ta.site_id = ? \n\t\t\t\tand a.blog_id = ? \n\t\t\t\tand b.site_id = a.site_id\n\t\t\t\tand a.active = 1\n\t\t\t\tand a.{$this->ver_field} > 0\n\t\t\torder by \n\t\t\t\tb.author_name\n\t\t\";\n\n\t\t$params = array('ii', $this->site_id, $this->blog_id);\n\t\treturn QDB::qdb_exec($this->data_source, $strsql, $params, 'id:author_name');\n\t}", "title": "" }, { "docid": "52151bed9e6c223a3fa24d1de02777be", "score": "0.6797954", "text": "public static function getAuthorsList()\r\n {\r\n $result = Db::getConnection()->query(\r\n 'SELECT id, first_name as fname, last_name as lname\r\n FROM ' . self::TABLE_NAME . ' ORDER BY fname ASC, lname ASC'\r\n );\r\n return $result->fetchAll();\r\n }", "title": "" }, { "docid": "2a4e35d49386d41e0ea0d20384219d67", "score": "0.6761899", "text": "public function index(Book $book): AuthorsCollection\n {\n return new AuthorsCollection($book->authors);\n }", "title": "" }, { "docid": "54161ed58fccc4d81737fa5880790765", "score": "0.67252356", "text": "public function getAuthorList()\n {\n return $this->authorDao->getAuthorList();\n }", "title": "" }, { "docid": "a12446d75e56de3d534021b74bee7970", "score": "0.67188734", "text": "public function getAuthors() {\n\t\treturn $this->pagedata['author'];\n\t}", "title": "" }, { "docid": "03ea2f993a43d0b6b26e315a490b9d54", "score": "0.6702126", "text": "public function getAuthors()\n {\n $this->_loadAuthors();\n return $this->authors;\n }", "title": "" }, { "docid": "0ad93061312217a592264d690c62e973", "score": "0.66790885", "text": "public function booksOfAuthor($authorName) {\n $queryStr = \"SELECT b.book_id AS bookId, b.title, DATE_FORMAT(b.date_published, '%M %e, %Y') AS datePublished, b.image, p.name AS publisherName, \"\n . \"(SELECT IFNULL(ROUND(sum(rating)/count(*), 2), 0) FROM book_ratings br WHERE br.book_id = b.book_id) AS averageRating, \"\n . \"CONCAT(a.first_name, ' ', a.last_name) AS authorName \"\n . \"FROM books b \"\n . \"JOIN publisher p ON b.publisher_id = p.publisher_id \"\n . \"JOIN book_authors ba ON b.book_id = ba.book_id \"\n . \"JOIN authors a ON a.author_id = ba.author_id \"\n . \"WHERE CONCAT(a.first_name, ' ', a.last_name) = ? \"\n . \"ORDER BY b.date_published DESC\";\n $books = $this->_registry->getObject('db')->makeMultiDataArray($queryStr, 'title', [$authorName]);\n $this->_countAll = $this->_registry->getObject('db')->affectedRows();\n return $books;\n }", "title": "" }, { "docid": "eca44aab0c7aca826b3c178b38a16f5b", "score": "0.66068447", "text": "public function showAuthor() : array {\n return $this->repository->selectAllAuthor();\n }", "title": "" }, { "docid": "e413706590f484466ce112c5e69afe0f", "score": "0.658565", "text": "public function getAuthors()\n {\n $authors = $this->modelBook->getAuthors()->orderBy(['last_name' => SORT_ASC])->asArray()->all();\n $allAuthors = [];\n foreach ($authors as $a) {\n $allAuthors[] = $a['first_name'] . ' ' . $a['last_name'];\n }\n\n return implode(', ', $allAuthors);\n }", "title": "" }, { "docid": "48a54e25979439662c978ba6daf49e6d", "score": "0.6574066", "text": "public function getAuthors() {\r\n $db = $this->getDbo();\r\n $query = $db->getQuery(true);\r\n \r\n // Construct the query\r\n $query->select('u.id AS value, u.name AS text');\r\n $query->from('#__users AS u');\r\n $query->join('INNER', '#__filauti AS f ON f.created_by = u.id');\r\n $query->group('u.id');\r\n $query->order('u.name');\r\n \r\n // Setup the query\r\n $db->setQuery($query->__toString());\r\n \r\n // Return the result\r\n return $db->loadObjectList();\r\n }", "title": "" }, { "docid": "437dbbd9a21eb545b9c4d1c910e2635e", "score": "0.65645254", "text": "public function getAuthors() {\r\r\n return self::$authors;\r\r\n }", "title": "" }, { "docid": "64454ae4695a16771049efbf7f48e196", "score": "0.65233827", "text": "public function getBooks()\n {\n return $this->hasMany(Book::className(), ['id' => 'book_id'])->viaTable('author_book', ['author_id' => 'id']);\n }", "title": "" }, { "docid": "55f3d1cf423c56f0f9e4330c7c7e0c85", "score": "0.6504675", "text": "public function authors()\n {\n return $this->authors;\n }", "title": "" }, { "docid": "6012a518dec58885778fe4bc34306d79", "score": "0.6487974", "text": "public function author_books()\n {\n return $this->hasMany('AuthorBook');\n }", "title": "" }, { "docid": "ba422cdce637b21673f2e5f0ca5fb2e9", "score": "0.6484351", "text": "public function getBooks()\n {\n return $this->hasMany(Books::className(), ['id' => 'book_id'])->viaTable('book_author', ['author_id' => 'id']);\n }", "title": "" }, { "docid": "831de695fc5c9481eac25c23e20b3728", "score": "0.64750654", "text": "public function getAuthorTitleEbooks($author, $title)\r\n\t{\r\n\t\t$author2 = $author;\r\n\t\t$arrAuthor = explode(', ', $author2);\r\n\t\tif (2 === count($arrAuthor))\r\n\t\t{\r\n\t\t\t$author2 = $arrAuthor[1] . ' ' . $arrAuthor[0];\r\n\t\t}\r\n\t\t\r\n\t\t$title = preg_replace('([^\\p{L}0-9])u', ' ', $title);\r\n\t\t$title = preg_replace('( +)', ' ', $title);\r\n\t\t$title = trim($title);\r\n\t\t\r\n\t\t$query = $this->book_db->query(\"\r\n\t\t\tSELECT\r\n\t\t\t\t`Boeken`.`Ean`,\r\n\t\t\t\t`Boeken`.`Samenvatting`,\r\n\t\t\t\t`Boeken`.`Taalvermelding`,\r\n\t\t\t\t`BoekAuteurs`.`AuteurAchternaam`\r\n\t\t\tFROM\r\n\t\t\t\t`Boeken`\r\n\t\t\tINNER JOIN `BoekAuteurs` ON `BoekAuteurs`.`Ean` = `Boeken`.`Ean`\r\n\t\t\tWHERE `Boeken`.`TitelNormalized` LIKE '\" . $this->book_db->escape($title) . \"%'\r\n\t\t\tAND (\r\n\t\t\t\t`BoekAuteurs`.`AuteurVolledigenaam` = '\" . $this->book_db->escape($author) . \"'\r\n\t\t\t\t\tOR\r\n\t\t\t\t`BoekAuteurs`.`AuteurVolledigenaam` = '\" . $this->book_db->escape($author2) . \"'\r\n\t\t\t)\r\n\t\t\tAND\r\n\t\t\t(\r\n\t\t\t\t `Boeken`.`Bindwijze` LIKE '%E-boek%'\r\n\t\t\t\tOR `Boeken`.`Bindwijze` IN (\r\n\t\t\t\t\t'Diversen',\r\n\t\t\t\t\t'Boek - ongespecificeerd',\r\n\t\t\t\t\t'Onbekend',\r\n\t\t\t\t\t'digitaal'\r\n\t\t\t\t)\r\n\t\t\t)\r\n\t\t\");\r\n\t\t\r\n\t\treturn $query->rows;\r\n\t}", "title": "" }, { "docid": "b0b1f487be3af7c341e72bf0ae3ebdbc", "score": "0.6467297", "text": "public function searchByAuthor($author) {\n $result = pg_query(\"SELECT name, author, last_edited FROM library WHERE author='$author';\");\n if(pg_num_rows($result) == 0)\n {\n return null;\n } else {\n return pg_fetch_array($result);\n }\n }", "title": "" }, { "docid": "8939791368bf3211ef952b07fc573a0e", "score": "0.6465762", "text": "public static function getAuthorsWithBookCount()\r\n {\r\n $result = Db::getConnection()->query(\r\n 'SELECT a.id as id, a.first_name as fname, a.last_name as lname, IFNULL(COUNT(b.id), 0) as bookCount\r\n FROM ' . self::TABLE_NAME . ' as a \r\n LEFT JOIN ' . Book::TABLE_NAME . ' as b ON b.author_id = a.id\r\n GROUP BY id, fname, lname\r\n ORDER BY fname, lname'\r\n );\r\n return $result->fetchAll();\r\n }", "title": "" }, { "docid": "5bd80b3fde20f555e9d72d15e51d093c", "score": "0.64471275", "text": "public function getAuthors()\n {\n return self::$authors;\n }", "title": "" }, { "docid": "92d84151786ca08eb8e8c229424b7fd4", "score": "0.6396636", "text": "abstract protected function getPageAuthors ();", "title": "" }, { "docid": "b518d493b88d35680c1b1c3d66a17f54", "score": "0.6394554", "text": "public function getAuthors()\n {\n $result = [];\n $authors = $this->livre->getAllAuthor();\n\n foreach ($authors as $author){\n $result[] = $author['nom'];\n }\n echo json_encode($result);\n }", "title": "" }, { "docid": "957a638fb1ae9c295e4c6230cf5d5295", "score": "0.6368124", "text": "public function getAuthors()\n\t{\n\t\tif ($this->_authors !== null) {\n\t\t\treturn $this->_authors;\n\t\t}\n\n\t\t$this->_authors = array();\n\n\t\tif ($this->person) {\n\t\t\t$this->_authors[$this->person['id']] = $this->person;\n\t\t}\n\n\t\t$ent = $this->getEntityName() . 'Revision';\n\t\t$field = strtolower(str_replace('DeskPRO:', '', $this->getEntityName()));\n\n\t\t$revs = App::getOrm()->createQuery(\"\n\t\t\tSELECT r, p\n\t\t\tFROM $ent r\n\t\t\tLEFT JOIN r.person p\n\t\t\tWHERE r.$field = ?1 AND r.person IS NOT NULL\n\t\t\tORDER BY r.date_created DESC\n\t\t\")->setParameter(1, $this)->execute();\n\n\t\tforeach ($revs as $r) {\n\t\t\tif ($r->person) {\n\t\t\t\t$this->_authors[$r->person->id] = $r->person;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_authors;\n\t}", "title": "" }, { "docid": "e226525cee3a7bb740f3ddf01be01e7c", "score": "0.63331676", "text": "public function getAuthors() {\n\t\tif(!$this->authors) {\n\t\t\t$sql = $this->safesql->query(\"SELECT\n\t\t\t\t\t\t\t\t\t\t\tarticle_author.author as author\n\t\t\t\t\t\t\t\t\t\t\tFROM `article_author`\n\t\t\t\t\t\t\t\t\t\t\tINNER JOIN `article`\n\t\t\t\t\t\t\t\t\t\t\tON (article_author.article=article.id)\n\t\t\t\t\t\t\t\t\t\t\tWHERE article.id=%i\", array($this->getId()));\n\t\t\t$authors = $this->db->get_results($sql);\n\t\t\tforeach($authors as $author) {\n\t\t\t\t$this->authors[] = new User($author->author);\n\t\t\t}\n\t\t}\n\t\treturn $this->authors;\n\t}", "title": "" }, { "docid": "eef33bfb52caeaea627a18c163cbbc11", "score": "0.6321455", "text": "public function getAllAuthor() {\n $result = array();\n $sql = 'SELECT * FROM author';\n $author = $this->db->query($sql);\n \n foreach ($author as $row) {\n $authorTemp = new Author($row['author_Id'],$row['author_Name'],$row['author_Age']);\n $result[] = $authorTemp;\n }\n return $result;\n }", "title": "" }, { "docid": "501bdc98e95fa25c09319204fd9e3fe0", "score": "0.6318325", "text": "public function authors()\n {\n return $this->belongsToMany('App\\Models\\Author', 'author_books')\n ->orderBy('authors.name', 'asc')\n ->withTimestamps();\n }", "title": "" }, { "docid": "7b9856821e772b3dfe541cb4255cc94d", "score": "0.62932616", "text": "public function loadAuthors()\n {\n $this->author_ids = [];\n // if (!empty($this->author_id)) {\n $rows = BookAuthor::find()\n ->select(['author_id'])\n ->where(['book_id' => $this->book_id])\n ->asArray()\n ->all();\n foreach($rows as $row) {\n $this->author_ids[] = $row['author_id'];\n }\n // }\n }", "title": "" }, { "docid": "c522275f003c9d1893a20250d10e42cb", "score": "0.62739384", "text": "function getAuthors() {\n\t\tglobal $wgContLang;\n\n\t\t$articleText = $this->pageContent;\n\t\t$categoryName = $wgContLang->getNsText( NS_CATEGORY );\n\t\t$blogCat = wfMsgForContent( 'blog-category' );\n\n\t\t// This unbelievably weak and hacky regex is used to find out the\n\t\t// author's name from the category. See also getBlurb(), which uses a\n\t\t// similar regex.\n\t\tpreg_match_all(\n\t\t\t\"/\\[\\[(?:(?:c|C)ategory|{$categoryName}):\\s?\" .\n\t\t\t\twfMsgForContent( 'blog-by-user-category', $blogCat ) .\n\t\t\t\" (.*)\\]\\]/\",\n\t\t\t$articleText,\n\t\t\t$matches\n\t\t);\n\t\t$authors = $matches[1];\n\n\t\tforeach( $authors as $author ) {\n\t\t\t$authorUserId = User::idFromName( $author );\n\t\t\t$this->authors[] = array(\n\t\t\t\t'user_name' => trim( $author ),\n\t\t\t\t'user_id' => $authorUserId\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "9abc4f4188dff85bd0acf66ab96e36a9", "score": "0.62672806", "text": "public function getAuthor();", "title": "" }, { "docid": "d9c615179070b46f07a030adf23de9bc", "score": "0.61956006", "text": "function get_authors()\n {\n # Query that selects all the authors from the table\n $query = \"SELECT * FROM Autor WHERE activo = 1\";\n if ($result = mysqli_query($this->db, $query)) {\n # Check for the number of authors\n if ($result->num_rows > 0) {\n $authors = array();\n while ($row = mysqli_fetch_assoc($result)) {\n array_push($authors, $row);\n }\n $authors['status'] = 1;\n return ($authors);\n } else {\n # The authors table is empty\n return (array(\"status\" => 2, \"message\" => \"No se han agregado autores.\"));\n }\n } else {\n # Something went wrong\n return (array(\"status\" => 0, \"message\" => \"Algo salió mal obtener la información de los autores.\"));\n }\n }", "title": "" }, { "docid": "dc582c4514c4e28b2a43b9b473ca4085", "score": "0.61930525", "text": "function &getAuthors() {\n\t\treturn $this->authors;\n\t}", "title": "" }, { "docid": "b3cacbec31c41f1b66bc26adb5af69fb", "score": "0.6152581", "text": "public function getBooksByAuthorId ( $id ) {\n if ( $this -> connectDB ) {\n try {\n $sql = 'SELECT books.* FROM books\n JOIN author_book ON books.id = author_book.book_id\n JOIN authors ON author_book.author_id = authors.id\n WHERE authors.id = :id\n ORDER BY books.title';\n $pdoStmnt = $this -> connectDB -> prepare( $sql );\n $pdoStmnt -> execute( [ ':id' => $id ] );\n\n return $pdoStmnt -> fetchAll();\n } catch ( \\PDOException $e ) {\n return $e -> getMessage();\n }\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "c1a175ef4c1bb6b951f5bf3e6e23c8e1", "score": "0.61107653", "text": "public function index(BookSearchRequest $request)\n {\n return BookResource::collection($books = $this->_bookRepository->searchByAuthor($request));\n }", "title": "" }, { "docid": "bcc2734d814ddd7dd817d63d71318cdb", "score": "0.60802615", "text": "public function getBooksByAuthor($authorId, $page = 1)\n {\n return $this->path('author/list')->id($authorId)->page($page)->send()->getResponse();\n }", "title": "" }, { "docid": "5dc7a77b76ee008ba9bb79ca151c465a", "score": "0.6058939", "text": "public function authors()\n {\n return $this->hasMany('App\\Models\\Author');\n }", "title": "" }, { "docid": "70720c8575f0ce7e2fff36aba12957fc", "score": "0.6041903", "text": "function get_authors() {\n\t\tif ( '' == $this->all_authors ) {\n\t\t\t$role = array('fields' => array('ID', 'display_name'), 'role' => 'administrator');\n\t\t\t$administrators = get_users( $role );\n\t\t\t$role = array('fields' => array('ID', 'display_name'), 'role' => 'editor');\n\t\t\t$editors = get_users( $role );\n\t\t\t$role = array('fields' => array('ID', 'display_name'), 'role' => 'author');\n\t\t\t$authors = get_users( $role );\n\n\t\t\t$this->all_authors = array_merge($administrators, $editors, $authors);\n\t\t}\n\t\treturn apply_filters('s2_authors', $this->all_authors);\n\t}", "title": "" }, { "docid": "a5d524f243a9b624505b8ce1cc1f91ac", "score": "0.60271126", "text": "function getAuthorNames() {\n\t\treturn $this->aAuthorNames;\n\t}", "title": "" }, { "docid": "e70ba048787db77c90206acc0ea37873", "score": "0.60223204", "text": "public function getId_Authors()\n {\n return $this->id_Authors;\n }", "title": "" }, { "docid": "a0cc92d843144788a7fa90f2e3069221", "score": "0.60204726", "text": "public function authors(Person $persons){\n\t\t\n\t\t$this->authors=$persons->authorsname();\n\t\treturn $this->authors;\n\t}", "title": "" }, { "docid": "d323db70baefa05c5b013d6c2e6427d6", "score": "0.59689957", "text": "function getAllAuthors($db) {\n $arr = [];\n $authors = $db->select(getAuthorsSQL());\n while ($row = $authors->fetch_array(MYSQLI_ASSOC)) {\n $author = new Author($row[\"author_id\"], $row[\"author_name\"], $row[\"author_period\"], $row[\"author_added_when\"]);\n $aliases = $db->select(getAuthorAliasesSQL($author->getAuthorID()));\n while ($row = $aliases->fetch_array(MYSQLI_ASSOC)) {\n $alias = new Alias($row[\"alias_id\"], $row[\"alias_name\"], $row[\"alias_added_when\"]);\n $author->addAlias($alias);\n }\n array_push($arr, $author->getAuthorAsArray());\n }\n if (sizeof($arr) == 0) {\n throw new ServiceException(ACTIVEAUTHORNOTFOUND[\"message\"], ACTIVEAUTHORNOTFOUND[\"code\"]); \n }\n return $arr;\n}", "title": "" }, { "docid": "c382dd1cade34ae6ab73f517c4222151", "score": "0.59495807", "text": "function TBauthors(){\n\t\t $output = \"<table>\".chr(13);\n\t\t $db = $this->startDB();\n\t\t $sql = \"SELECT TrenchBookID, label, Authors FROM z_tb_names \";\n\t\t $result = $db->fetchAll($sql);\n\t\t foreach($result as $row){\n\t\t\t\t$id = $row[\"TrenchBookID\"];\n\t\t\t\t$rawAuthors = $row[\"Authors\"];\n\t\t\t\t$label = $row[\"label\"];\n\t\t\t\t$allAuthorArray = array();\n\t\t\t\t$allAuthorArray = $this->authorSplit($allAuthorArray, \",\", $rawAuthors);\n\t\t\t\t$allAuthorArray = $this->authorSplit($allAuthorArray, \"/\", $rawAuthors);\t \n\t\t\t\t$allAuthorArray = $this->authorSplit($allAuthorArray, \" and \", $rawAuthors);\n\t\t\t\tif(count($allAuthorArray)<1){\n\t\t\t\t\t $allAuthorArray[] = $rawAuthors;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach($allAuthorArray as $author){\n\t\t\t\t\t $author = trim($author);\n\t\t\t\t\t $output.= \"<tr><td>$label</td><td>$author</td></tr>\".chr(13);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tunset($allAuthorArray);\n\t\t }\n\t\t \n\t\t $output.= \"</table>\".chr(13);\n\t\t return $output;\n\t }", "title": "" }, { "docid": "319d3f27a924358c8a9bee1d3905e79c", "score": "0.5949186", "text": "public function getAuthorChoices()\n {\n if ($this->authorChoices) \n {\n return $this->authorChoices;\n }\n $q = Doctrine::getTable('aBlogItem')->queryForAuthors();\n $authors = $q->fetchArray();\n $choices = array();\n foreach ($authors as $author) {\n $choices[$author['id']] = aTools::getUniqueName($author);\n }\n return $choices;\n }", "title": "" }, { "docid": "d71426f42660dfd19957cddfb53baf1e", "score": "0.59327126", "text": "public function index()\n {\n $list = $this->bookService->listWithAuthors();\n return view('admin.book.list')->with(\n [\n 'list'=>$list\n ]);\n }", "title": "" }, { "docid": "8a7cf550a31c8e2da95f9699e3aa1720", "score": "0.5929378", "text": "public function getAuthorslist()\n\t{\n\t\t$query = $this->_db->getQuery(true)\n\t\t\t->select('a.' . $this->created_by_col . ' AS id, ua.name AS name')\n\t\t\t->from('#__' . $this->records_dbtbl . ' AS a')\n\t\t\t->join('LEFT', '#__users as ua ON ua.id = a.' . $this->created_by_col)\n\t\t\t->group('a.' . $this->created_by_col)\n\t\t\t->order('ua.name');\n\n\t\treturn $this->_db->setQuery($query)->loadObjectList();\n\t}", "title": "" }, { "docid": "21f14f1777b15189220a112e3d3ec243", "score": "0.5914264", "text": "public function authors()\n {\n return $this->hasMany(User::class, 'id', 'publisher_id');\n }", "title": "" }, { "docid": "9448d0da4cdc1f014328bba0fd214a27", "score": "0.5911932", "text": "public function obtainBooks(){\n\t\treturn $this->performRequest('GET', '/books');\n\t}", "title": "" }, { "docid": "8b23b1f32d54c4079969bad5af25ffa3", "score": "0.5905996", "text": "function genetic_show_authors() {\r\n\tglobal $CFG;\r\n\t$query = \"SELECT * \r\n\t\t FROM {$CFG->prefix}genetic_authors\r\n\t\t ORDER BY name ASC\";\r\n\treturn $query;\r\n}", "title": "" }, { "docid": "d194a2ffaf72bd5770a19b8a21dae170", "score": "0.5886219", "text": "public static function getBooks(){\n $db = self::db();\n \n // run query\n $sql = \"SELECT book_code AS id, title, publisher_code AS publisherCode, type AS genre, price, paperback\n\t\t\t\tFROM book\n\t\t\t\tORDER BY book_code\";\n \n $query = $db->query($sql);\n\t\t$result = $query->custom_result_object('Book');\n\t\t\n\t\treturn $result;\n }", "title": "" }, { "docid": "3ae3ed7afeca7a1a592cffa368208de7", "score": "0.58730847", "text": "public function index(Request $request)\n {\n if(!isset($request->page))\n $request->page = 1;\n\n return $this->model->getAllAuthorsWithBooks(true, $request->page);\n }", "title": "" }, { "docid": "df6beee1a6578e98df4b4100ad82dfc9", "score": "0.58667946", "text": "public function findCoAuthor($book_id)\n\t{\n\t\t$coauthor = DB::table('book_author')->where('book_id',$book_id)->where('is_main','!=',2)->get();\n\t\tforeach ($coauthor as $key => $value) {\n\t\t\t$user = User::find($value->author_id);\n\t\t\t$coauthor[$key]->objAuthor = $user;\n\t\t}\n\t\treturn $coauthor;\n\t}", "title": "" }, { "docid": "770065a9a4df766bab66ac39969ac28d", "score": "0.58532524", "text": "public function obtainBooks()\n {\n return $this->perfomRequest('GET','books/list');\n }", "title": "" }, { "docid": "110142c231e7a73f9d1e7a7f44675bbb", "score": "0.58348256", "text": "public function obtainAuthor($author)\n {\n return $this->performRequest('GET', '/authors/'.$author);\n }", "title": "" }, { "docid": "18f9c7c4f3b3b6deca111421d3c34342", "score": "0.58302754", "text": "public function authors($query = [], $letter = DEFAULT_LETTER) {\n\t\t// listing/authors/A\n\t\t$url = BASE_URL . 'api/distinct/author.name?author.name=@^' . $letter;\n\t\t$result = json_decode($this->model->getDataFromApi($url), true);\n\t\t$result['pageTitle'] = ARCHIVE . ' > ' . AUTHORS;\n\t\t$result['subTitle'] = AUTHORS;\n\t\t$result['nextUrl'] = BASE_URL . 'articles/author/';\n\n\t\t// getting alphabet list\n\t\t$url = BASE_URL . 'api/alphabet/';\n\t\t$result['alphabet'] = json_decode($this->model->getDataFromApi($url), true)['author'];\n\n\t\t($result) ? $this->view('listing/items', json_encode($result)) : $this->view('error/index');\n\t}", "title": "" }, { "docid": "9dc7db89787455904d241114ef72c774", "score": "0.5822546", "text": "public function getAuthors($data=\"\", $viewType=\"\")\n {\n $this->restResponse(\"200\");\n $this->showResponse($data, $viewType);\n }", "title": "" }, { "docid": "43da86ff42e93e131c564348f8a02cf0", "score": "0.58203083", "text": "public function get_authors()\n {\n return unserialize($this->get_default_property(self::PROPERTY_AUTHORS));\n }", "title": "" }, { "docid": "deef6fd00d942525a09dd4cefa9a1228", "score": "0.5820126", "text": "function islandora_bibilgraphy_solr_form_get_title_authors($pid) {\n $title = $authors = 'Missing';\n\n $solr_query = 'http://localhost:8080/solr/select/?q=PID:' . (str_replace(':', '?', ($pid))) . '&fl=dc.title,author&rows=10000';\n $solr_result = file_get_contents($solr_query);\n $xml = new SimpleXMLElement($solr_result);\n $array = $xml->xpath('//doc');\n $array = array_filter($array);\n $names = array();\n foreach ($array as $arr) {\n if ($arr->arr[0]['name'] == 'author') {\n $names_array = $arr->arr[0]->str;\n foreach ($names_array as $name) {\n $names[] = str_replace(',', ', ', (string) $name);\n }\n $authors = implode('; ', $names);\n }\n if ($arr->arr[1]['name'] == 'dc.title') {\n $title = $arr->arr[1]->str;\n }\n }\n return array($title, $authors);\n}", "title": "" }, { "docid": "519036cb726d15c039b86f93852c3fc4", "score": "0.57962364", "text": "public function obtainAuthor($author)\n {\n return $this->performRequest('GET', \"/authors/{$author}\");\n }", "title": "" }, { "docid": "1d498f7523738350b119ca948e73b24b", "score": "0.57940197", "text": "public function books()\n {\n return $this->belongsToMany('books', 'BookAuthors');\n }", "title": "" }, { "docid": "6a760ea2387f9d9499c264c09a7030c9", "score": "0.5775529", "text": "public function getCandidateAuthors()\n {\n if ($this->config()->get('restrict_authors_to_group')) {\n return Group::get()->filter('Code', $this->config()->get('restrict_authors_to_group'))->first()->Members();\n }\n\n $list = Member::get();\n $this->extend('updateCandidateAuthors', $list);\n return $list;\n }", "title": "" }, { "docid": "3077a9be937655ffc1b61a1709b54c56", "score": "0.57735294", "text": "function fetch_author_surnames ( ) {\n\t\t$aT =& $this->authorTable;\n\t\t$ata =& $this->authorTableAlias;\n\t\t$names = array();\n\n\t\t$query = $this->get_reference_select_clause ( 'distinct('.$ata.'.surname)', $ata.'.surname ASC', $ata.'.uid' );\n\t\t//t3lib_div::debug( $query );\n\t\t$res = $GLOBALS['TYPO3_DB']->sql_query ( $query );\n\t\twhile ( $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc ( $res ) ) {\n\t\t\t$names[] = $row['surname'];\n\t\t}\n\t\treturn $names;\n\t}", "title": "" }, { "docid": "99a157782a5ec5f91b06177d23fd7ac4", "score": "0.5771777", "text": "public abstract static function getAuthor();", "title": "" }, { "docid": "77d87eff1e2d1a30250a37cd6594fd3f", "score": "0.5766987", "text": "public function books()\n {\n return $this\n ->author\n ->belongsToMany('MyLibrary\\Book\\Models\\Book')\n ->withTimestamps()\n ->select(['books.id', 'books.title']);\n }", "title": "" }, { "docid": "5a702a85f9a3d7cce019d694b91d6b2c", "score": "0.576601", "text": "public function getOtherBooksFromAuthor ( $bookId, $authorId ) {\n if ( $this -> connectDB ) {\n try {\n $sql = 'SELECT books.title, books.id FROM books\n JOIN author_book ON books.id = author_book.book_id\n JOIN authors ON author_book.author_id = authors.id\n WHERE authors.id = :authorId\n AND books.id != :bookId\n ORDER BY books.title';\n $pdoStmnt = $this -> connectDB -> prepare( $sql );\n $pdoStmnt -> execute( [\n ':authorId' => $authorId,\n ':bookId' => $bookId\n ] );\n\n return $pdoStmnt -> fetchAll();\n } catch ( \\PDOException $e ) {\n return $e -> getMessage();\n }\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "9c6b08ea6fb32e08ae1b31f84686fd71", "score": "0.57647526", "text": "public function getAuthorList()\n {\n $list = '';\n foreach ($this->getAuthors() as $author) {\n $list .= ucfirst($author->display_name) . ', ';\n }\n return rtrim($list, ', ');\n }", "title": "" }, { "docid": "41c74777c9f53813aa2a9c8ce2652238", "score": "0.5758669", "text": "function search_authors ( $words, $pids, $fields = array ( 'forename', 'surname' ) ) {\n\t\t$aT =& $this->authorTable;\n\t\t$all_fields = array ( 'forename', 'surname', 'url' );\n\t\t$authors = array();\n\t\t$WC = array();\n\t\t$wca = array();\n\t\tforeach ( $words as $word ) {\n\t\t\t$word = trim ( strval ( $word ) );\n\t\t\tif ( strlen ( $word ) > 0 ) {\n\t\t\t\t$word = $GLOBALS['TYPO3_DB']->fullQuoteStr ( $word , $aT );\n\t\t\t\tforeach ( $all_fields as $field ) {\n\t\t\t\t\tif ( in_array ( $field, $fields ) )\n\t\t\t\t\t\t//t3lib_div::debug( $word );\n\t\t\t\t\t\tif ( preg_match ( '/(^%|^_|[^\\\\\\\\]%|[^\\\\\\\\]_)/', $word ) ) {\n\t\t\t\t\t\t\t//t3lib_div::debug( 'Wildcard' );\n\t\t\t\t\t\t\t$wca[] = $field . ' LIKE ' . $word;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$wca[] = $field . '=' . $word;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$WC[] = '(' . implode ( ' OR ', $wca ) . ')';\n\t\tif ( is_array ( $pids ) ) {\n\t\t\t$csv = tx_sevenpack_utility::implode_intval ( ',', $pids );\n\t\t\t$WC[] = 'pid IN ('.$csv.')';\n\t\t} else {\n\t\t\t$WC[] = 'pid='.intval ( $pids );\n\t\t}\n\n\t\t$WC = implode ( ' AND ', $WC );\n\t\t$WC .= $this->enable_fields ( $aT );\n\n\t\t$field_csv = implode ( ',', $this->authorAllFields );\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery ( $field_csv, $aT, $WC );\n\t\twhile ( $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc ( $res ) ) {\n\t\t\t$authors[] = $row;\n\t\t}\n\n\t\t//t3lib_div::debug ( array ( 'authors' => $authors ) );\n\t\treturn $authors;\n\t}", "title": "" }, { "docid": "b656f8cde3a5479826f413a1e15ffa5e", "score": "0.5758023", "text": "function islandora_bibilgraphy_solr_form_get_title_authors($pid) {\n\n $solr_location = variable_get('islandora_solr_search_block_url', 'localhost:8080/solr');\n\n $title = $authors = 'Missing';\n\n $solr_query = 'http://' . $solr_location . '/select/?q=PID:' . (str_replace(':', '?', ($pid))) . '&fl=dc.title,author&rows=10000';\n $solr_result = file_get_contents($solr_query);\n $xml = new SimpleXMLElement($solr_result);\n $array = $xml->xpath('//doc');\n $array = array_filter($array);\n $names = array();\n foreach ($array as $arr) {\n if ($arr->arr[0]['name'] == 'author') {\n $names_array = $arr->arr[0]->str;\n foreach ($names_array as $name) {\n $names[] = str_replace(',', ', ', (string) $name);\n }\n $authors = implode('; ', $names);\n }\n if ($arr->arr[1]['name'] == 'dc.title') {\n $title = $arr->arr[1]->str;\n }\n }\n return array($title, $authors);\n}", "title": "" }, { "docid": "bf18380ce790f0b7370c3e9416037e90", "score": "0.5735035", "text": "protected function selectAuthors()\n {\n $options = $this->getAuthorsAsOptions();\n $this->getOutput()->writeln('');\n $this->getOutput()->writeln(\n '<info>Multiple authors found on ' .\n 'project\\'s composer.json file.</info>'\n );\n $question = new ChoiceQuestion(\n 'Please select the author from the list above:',\n $options,\n 0\n );\n $question->setErrorMessage('The choice %s is invalid.');\n $selected = $this->getQuestionHelper()\n ->ask($this->input, $this->output, $question);\n $parts = explode('<', $selected);\n return [\n 'authorName' => trim($parts[0]),\n 'authorEmail' => trim($parts[1], '>'),\n ];\n }", "title": "" }, { "docid": "bf36ba8563ebd0b59036d758cc291947", "score": "0.5723895", "text": "public function actionGetBookList()\n {\n $books = Book::find()->with('author')->all();\n $book_list = [];\n if ($books) {\n foreach ($books as $book) {\n $book_list[] = ['book_name' => $book->name, 'author_name' => $book->author->name];\n }\n }\n return $book_list;\n }", "title": "" }, { "docid": "2df929cc0631c84038d1dc63f048304a", "score": "0.5700699", "text": "function genetic_search_author($auid) {\r\n\tglobal $CFG;\r\n\t$query = \"SELECT *\r\n\t\t FROM {$CFG->prefix}genetic_rel_headerauthor\r\n\t\t WHERE idauthor='$auid'\";\r\n\treturn $query;\r\n}", "title": "" }, { "docid": "df1f7236dfc0c599c90f11b8b197bc69", "score": "0.56808877", "text": "function getAuthors() {\n\n include \"vars.php\" ;\n\n //creating an sql conntection\n $conn = new mysqli(\"localhost\", $dbuser, $dbpass, $db) ;\n\n $stmt = $conn->prepare(\"SELECT author_name, author_id FROM authors\") ;\n\n if($stmt->execute()) {\n $stmt->bind_result($authorName, $authorId) ;\n $index = 0 ;\n while($stmt->fetch()) {\n $authors[$index] = $authorName ;\n $index++ ;\n }\n\n }\n\n return $authors ;\n\n}", "title": "" }, { "docid": "e6ab361605daa0dfe26ff8cd8997f2a1", "score": "0.56761235", "text": "public function author() {\n\t\treturn $this->belongsToMany('App\\User', 'book_author', 'book_id', 'author_id')\n\t\t\t\t\t\t\t\t->where('is_accepted', 1);\n\t}", "title": "" }, { "docid": "543067b63b60c0358b06863cd299646c", "score": "0.5675557", "text": "public function testViewAllAuthors()\n {\n $authors = factory(Author::class)->create();\n $response = $this->get('/api/v1/authors');\n\n $response->assertResponseStatus(200);\n $response->seeJson([\n 'name' => $authors->name,\n 'email' => $authors->email,\n 'bio' => $authors->bio,\n 'books' => []\n ]);\n }", "title": "" }, { "docid": "204988baec8e581d7d914c5b39f1a658", "score": "0.5662143", "text": "public function authors()\n {\n $authors = Author::all();\n\n return view('authors', compact('authors'));\n }", "title": "" }, { "docid": "860294ed8a1d2b0afa7a8b6037e96478", "score": "0.56478125", "text": "public function get_authors( DModuleRequest $Request ) : DModuleResponseView\n {\n $table = $this->table(\"authors\");\n $data[\"authors\"] = DB::table( $table ) -> get();\n\n $data[\"Module\"] = $this;\n\n return $this->responseTypeView( \"authors_list\" , $data , [\"css/style.css\"] , [\"js/code.js\"] );\n }", "title": "" }, { "docid": "c6d5ff72479753c5c09d4881b40a27f3", "score": "0.5645052", "text": "function fetch_pub_authors ( $pub_id ) {\n\t\t$authors = array ( );\n\t\t$sta =& $this->aShipTableAlias;\n\t\t$ata =& $this->authorTableAlias;\n\n\t\t$WC = '';\n\n\t\t$WC .= $sta.'.pub_id='.intval ( $pub_id ).\"\\n\";\n\t\t//$WC .= ' AND '.$sta.'.pid='.$ata.'.pid'.\"\\n\";\n\t\t$WC .= $this->enable_fields ( $this->aShipTable, $sta );\n\t\t$WC .= $this->enable_fields ( $this->authorTable, $ata );\n\n\t\t$OC = $sta.'.sorting ASC';\n\n\t\t$field_csv = $ata.'.'.implode( ','.$ata.'.', $this->authorAllFields );\n\t\t$q = $this->select_clause_start ( array ( $field_csv, $sta.'.sorting' ), \n\t\t\tarray ( $this->t_au_default, $this->t_as_default ) );\n\t\t$q .= ' WHERE '. $WC.\"\\n\";\n\t\t$q .= ' ORDER BY '.$OC.\"\\n\";\n\t\t$q .= ';';\n\t\t//t3lib_div::debug ($q);\n\t\t$res = $GLOBALS['TYPO3_DB']->sql_query ( $q );\n\t\twhile ( $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc ( $res ) ) {\n\t\t\t$authors[] = $row;\n\t\t}\n\t\treturn $authors;\n\t}", "title": "" }, { "docid": "e2e4c292836d6d7fe69f755354e9f233", "score": "0.56252706", "text": "function read_booksAN($aname){\n\t\treturn $this->mongo_db->get_where('books', array('author' => $aname));\n\t}", "title": "" }, { "docid": "2a107b9285f982d135ed86fab900c3ed", "score": "0.5624372", "text": "public function getBooks()\n {\n return $this->books;\n }", "title": "" }, { "docid": "28c82c4d78535d9bce0749ddf84fe469", "score": "0.56242955", "text": "public function author($query = [], $author = DEFAULT_STRING) {\n\t\t// articles/author/author1\n\n\t\t// Get data from api\n\t\t// get('api/articles?author=author1\n\n\t\t$url = BASE_URL . 'api/articles?author.name=' . $this->model->filterSpecialChars($author);\n\t\t$result = json_decode($this->model->getDataFromApi($url), true);\n\t\t$result['pageTitle'] = ARCHIVE . ' > ' . AUTHORS . ' > ' . $author;\n\t\t($result) ? $this->view('articles/articles', json_encode($result)) : $this->view('error/index');\n\t}", "title": "" }, { "docid": "d239521f6df907439a928ace5b08e7b5", "score": "0.5619512", "text": "public function index(Request $request)\n {\n\n $author = Author::find($request->author);\n\n\n function getAuthor()\n {\n if (request()->filled('author')) {\n return $author_id = request()->author;\n }\n };\n\n if ($request->filled('author')) {\n \n $bookQuery = Book::whereHas('authors', function ($q) {\n\n $q->where('author_id', getAuthor()); //this refers id field from categories table\n\n })\n ->get();\n\n } else {\n $bookQuery = Book::get();\n };\n\n return view('books', [\n 'books' => $bookQuery,\n 'authors' => Author::get(),\n 'selectedAuth' => $author\n ]);\n }", "title": "" }, { "docid": "b45ac3d20428a5f344735d2d2bd1a2e2", "score": "0.5616081", "text": "public function getAuthorListAttribute()\n {\n return $this->authors->implode('name', ', ');\n }", "title": "" }, { "docid": "fc5a6c69e347a4ce0c4e1200c1e34496", "score": "0.5596431", "text": "public function collaborator_author() {\n\t\treturn $this->belongsToMany('App\\User', 'book_author', 'book_id', 'author_id')\n\t\t\t\t\t\t\t\t->where('is_main', 0)\n\t\t\t\t\t\t\t\t->where('is_accepted', 1);\n\t}", "title": "" }, { "docid": "bbaeca365b3d99b46dae6036cbb2814b", "score": "0.5589282", "text": "public function authorsForSidebar() {\n $queryStr = \"SELECT author_id, CONCAT(`first_name`, ' ', `last_name`) AS author FROM `authors` ORDER BY RAND() LIMIT 12\";\n return $this->_registry->getObject('db')->makeMultiDataArray($queryStr, 'author_id');\n }", "title": "" }, { "docid": "376d269c9b29de55f1b46a51a0153aaf", "score": "0.55779874", "text": "public function a_relationship_link_to_authors_returns_all_related_authors_as_resource_id_object()\n {\n\n $book = factory(Book::class)->create();\n $authors = factory(Author::class, 2)->create();\n // print_r($authors->pluck('id')->toArray());\n $book->authors()->sync($authors->pluck('id'));\n\n $user = factory(User::class)->create();\n Passport::actingAs($user);\n\n $this->getJson('/api/v1/books/1/relationships/authors', [\n 'accept' => 'application/vnd.api+json',\n 'content-type' => 'application/vnd.api+json',\n ])->assertStatus(200)->assertJson([\n 'data' => [\n\n [\n 'id' => $authors->get(0)->id,\n 'type' => 'authors'\n ],\n [\n 'id' => $authors->get(1)->id,\n 'type' => 'authors'\n ]\n ]\n\n ]);\n\n\n // $response->assertStatus(200);\n }", "title": "" }, { "docid": "056d52c7ddc34fa8a4650937313eed5f", "score": "0.557219", "text": "public function index()\n {\n return $this->successResponse($this->authorsService->obtainAuthors()); \n }", "title": "" }, { "docid": "2d7f893baf9a6398f372669f13afb086", "score": "0.55714", "text": "public function authorInfo($authorName) {\n $queryStr = \"SELECT CONCAT(a.first_name, ' ', a.last_name) AS authorName, \"\n . \"CONCAT(a.place_of_birth, ', ', co.country_name) AS bornIn, \"\n . \"a.gender, a.about, a.image, a.website, c.category FROM authors a \"\n . \"JOIN categories c ON a.cat_id = c.cat_id \"\n . \"JOIN countries co ON a.country = co.country_abbrev \"\n . \"WHERE CONCAT(a.first_name, ' ', a.last_name) = ?\";\n return $this->_registry->getObject('db')->makeMultiDataArray($queryStr, 'authorName', [$authorName]);\n }", "title": "" }, { "docid": "b4ebc2799d854348d93c3dde69ba2cfe", "score": "0.5569345", "text": "public function byAuthorID($authorID)\n {\n return $this->where('author', $authorID);\n }", "title": "" } ]