query
stringlengths
9
43.3k
document
stringlengths
17
1.17M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Releases all locked aquired by this process. Will be called during process shutdown. (register_shutdown_function)
public function releaseLocks() { foreach ($this->lockedKeys as $key => $value) { self::appRelease($key); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __destruct()\n {\n foreach ($this->acquiredLocks as $key => $true) {\n $this->release($key);\n }\n }", "private function release(): void\n {\n if ($this->lock) {\n $this->lock->release();\n $this->lock = null;\n }\n }", "public function __destruct()\n {\n if ($this->isLocked()) {\n $this->unlock();\n }\n }", "private function unlockConcurrentExecution()\n\t{\n\t\t$app = \\Bitrix\\Main\\Application::getInstance();\n\t\t$managedCache = $app->getManagedCache();\n\t\t$managedCache->clean($this->getLockTag());\n\t}", "function __destruct() {\n\t\tif (count($this->locks) > 0) {\n\t\t\tif (DEBUG > 0) {\n\t\t\t\tforeach ($this->locks as $id=>$fp) {\n\t\t\t\t\t$this->unlock($id);\n\t\t\t\t}\n\t\t\t\twriteLog(\"these locks have not been unlocked:\".print_r($this->locks, true),KATA_ERROR);\n\t\t\t}\n\t\t}\n\t}", "public function release() {\n if ($this->isAquired()) {\n if (!sem_remove(self::$hSemaphores[$this->key])) throw new RuntimeException('Cannot remove semaphore for key \"'.$this->key.'\"');\n unset(self::$hSemaphores[$this->key]);\n }\n }", "private function lock_cleanup() {\n\t\tif (\n\t\t\t$this->lock !== NULL\n\t\t\t&& $this->lock->is_expired()\n\t\t) {\n\t\t\t$this->lock = NULL;\n\t\t}\n\t\t$this->write();\n\t}", "public function release($lockHandle);", "private function unlock() {\n\t\tif (file_exists($this -> lockfile)) {\n\t\t\tunlink($this -> lockfile);\n\t\t}\n\t}", "protected function releaseLock() \n {\n $log = FezLog::get();\n $db = DB_API::get();\n \n $sql = \"DELETE FROM \".$this->_dbtp.\"locks WHERE \".$this->_dblp.\"name=?\";\n try {\n $db->query($sql, $this->_lock);\n }\n catch(Exception $ex) {\n $log->err($ex);\n $log->err(array(\"Queue releaseLock failed\", $res));\n } \n }", "public function ensureFreeHandle() {}", "public function __destruct()\n {\n if ($this->handle !== null) {\n $this->processRunner->destroy($this->handle);\n }\n }", "public function releaseAll($lockId = NULL);", "public function unlock() {\n }", "public function __destruct() {\n unset($this->_pidManager);\n unset($this->_pidFile);\n unset($this->_ipc);\n unset($this->_tasks);\n }", "public function unlock(): void {}", "public function unlock(): void {}", "public function unlock(): void {}", "public function unlock(): void {}", "public function unlock(): void {}", "public function unlock(): void;", "public function __destruct()\n {\n while ($this->isAcquired()) {\n $released = $this->releaseLock();\n if (!$released) {\n throw new UnrecoverableMutexException(sprintf(\n 'Cannot release lock in Mutex __destruct(): %s',\n $this->name\n ));\n }\n }\n }", "function lock_release_all($lock_id = NULL) {\n global $locks;\n\n $locks = array();\n if (empty($lock_id)) {\n $lock_id = _lock_id();\n }\n db_delete('semaphore')\n ->condition('value', $lock_id)\n ->execute();\n}", "public function release() {\n $this->locked = 0;\n $this->save();\n }", "public function release() {\n $this->locked = 0;\n $this->save();\n }", "public function clear_all_locks();", "protected function unlock_session() {\n \\core\\session\\manager::write_close();\n ignore_user_abort(true);\n }", "public function close() {\n\t\tparent::close();\n\t\tif ($this->lockFileName == null) {\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\t// Close the lock file channel (Which will also free any locks)\n\t\t\t$this->lockFileChannel->close();\n\t\t} catch ( \\Exception $e ) {\n\t\t\t// Problems closing the stream. Punt.\n\t\t}\n\t\tself::$locks->remove( $this->lockFileName );\n\t\t\n\t\t// Unlink (delete) the lock file\n\t\t$f = new File( $this->lockFileName );\n\t\t$f->delete();\n\t\t\n\t\t$this->lockFileName = null;\n\t\t$this->lockFileChannel = null;\n\t}", "public function __destruct() {\n\t\t$this->unregister();\n\t}", "function lock_release($name) {\n global $locks;\n\n unset($locks[$name]);\n db_delete('semaphore')\n ->condition('name', $name)\n ->condition('value', _lock_id())\n ->execute();\n}" ]
[ "0.71152633", "0.6703821", "0.64991945", "0.64624995", "0.6440424", "0.6398026", "0.6287097", "0.6195872", "0.61939", "0.6113046", "0.6100914", "0.60864055", "0.60691756", "0.60613245", "0.60594404", "0.60155815", "0.60155815", "0.60155815", "0.60155815", "0.60155815", "0.5966078", "0.5956362", "0.59460074", "0.58562255", "0.58562255", "0.5848296", "0.58280855", "0.5792564", "0.5781784", "0.57738185" ]
0.7234906
0
Locks the process until the lock of $id has been acquired for this process. If no lock has been acquired for this id, it returns without waiting true. Waits max 15seconds.
public function appLock($id, $timeout = 15) { //when we'll be caleed, then we register our releaseLocks //to make sure all locks are released. register_shutdown_function([$this, 'releaseLocks']); if (self::appTryLock($id, $timeout)) { return true; } else { for ($i = 0; $i < 1000; $i++) { usleep(15 * 1000); //15ms if (self::appTryLock($id, $timeout)) { return true; } } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function waitForLock($key) {\n $tries = 20;\n $cnt = 0;\n do {\n // 250 ms is a long time to sleep, but it does stop the server from burning all resources on polling locks..\n usleep(250);\n $cnt ++;\n } while ($cnt <= $tries && $this->isLocked());\n if ($this->isLocked()) {\n // 5 seconds passed, assume the owning process died off and remove it\n $this->removeLock($key);\n }\n }", "private function waitForLock($key) {\n $tries = 20;\n $cnt = 0;\n do {\n // 250 ms is a long time to sleep, but it does stop the server from burning all resources on polling locks..\n usleep ( 250 );\n $cnt ++;\n } while ( $cnt <= $tries && $this->isLocked ( $key ) );\n if ($this->isLocked ( $key )) {\n // 5 seconds passed, assume the owning process died off and remove it\n $this->removeLock ( $key );\n }\n }", "function lock_wait($name, $delay = 30) {\n // Pause the process for short periods between calling\n // lock_may_be_available(). This prevents hitting the database with constant\n // database queries while waiting, which could lead to performance issues.\n // However, if the wait period is too long, there is the potential for a\n // large number of processes to be blocked waiting for a lock, especially\n // if the item being rebuilt is commonly requested. To address both of these\n // concerns, begin waiting for 25ms, then add 25ms to the wait period each\n // time until it reaches 500ms. After this point polling will continue every\n // 500ms until $delay is reached.\n\n // $delay is passed in seconds, but we will be using usleep(), which takes\n // microseconds as a parameter. Multiply it by 1 million so that all\n // further numbers are equivalent.\n $delay = (int) $delay * 1000000;\n\n // Begin sleeping at 25ms.\n $sleep = 25000;\n while ($delay > 0) {\n // This function should only be called by a request that failed to get a\n // lock, so we sleep first to give the parallel request a chance to finish\n // and release the lock.\n usleep($sleep);\n // After each sleep, increase the value of $sleep until it reaches\n // 500ms, to reduce the potential for a lock stampede.\n $delay = $delay - $sleep;\n $sleep = min(500000, $sleep + 25000, $delay);\n if (lock_may_be_available($name)) {\n // No longer need to wait.\n return FALSE;\n }\n }\n // The caller must still wait longer to get the lock.\n return TRUE;\n}", "function lock($id, $waitForTimeout= true) {\n\t\tif (substr(PHP_OS, 0, 3) == 'WIN') {\n\t\t\treturn true;\n\t\t}\n\n\t\t$this->garbageCollect();\n\n\t\t$timeout= time() + $this->timeout;\n\t\t$lockname= KATATMP.'sessions'.DS.'lockfile'.urlencode($id);\n\t\t$fplock= null;\n\n\t\tdo {\n\t\t\t$fplock = fopen($lockname, \"w+\");\n\t\t\tif ($fplock) {\n\t\t\t\tif (flock($fplock, LOCK_EX | LOCK_NB)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ($fplock) {\n\t\t\t\t\tfclose($fplock);\n\t\t\t\t\t$fplock= null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tusleep(100000);\n\t\t} while ((time() < $timeout) && $waitForTimeout);\n\n\t\tif ($fplock) {\n\t\t\t$this->locks[$id]= $fplock;\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function lock($wait = -1) {}", "public function lock($wait = -1) {}", "public function appTryLock($id, $timeout = 30)\n {\n //already aquired by this process?\n if ($this->lockedKeys[$id] === true) {\n return true;\n }\n\n $now = ceil(microtime(true) * 1000);\n $timeout2 = $now + $timeout;\n\n dbDelete('system_app_lock', 'timeout <= ' . $now);\n\n try {\n dbInsert('system_app_lock', array('id' => $id, 'timeout' => $timeout2));\n $this->lockedKeys[$id] = true;\n\n return true;\n } catch (\\Exception $e) {\n return false;\n }\n }", "private function waitForUnlocking()\n\t{\n\t\t$times = self::LOCK_TTL;\n\t\t$i = 0;\n\t\twhile ($this->isExecutionLocked() && $i < $times)\n\t\t{\n\t\t\tsleep(1);\n\t\t\t$i++;\n\t\t}\n\t}", "public function acquireLock(int $id): void;", "private function _acquire(int $timeout): void {\n\t\t$timer = new Timer();\n\t\t// Defaults to 0.5 seconds\n\t\t$sleep = $this->optionFloat('sleep_seconds', 0.5);\n\t\tif ($timeout > 0 && $timeout < $sleep) {\n\t\t\t$sleep = $timeout;\n\t\t}\n\t\t$sleep = intval($sleep * 1000000);\n\t\t$delete_attempt = false;\n\t\twhile (true) {\n\t\t\tif (!$delete_attempt) {\n\t\t\t\tself::deleteDeadProcesses($this->application);\n\t\t\t\t$delete_attempt = true;\n\t\t\t} else {\n\t\t\t\tusleep($sleep);\n\t\t\t}\n\t\t\tif ($this->isFree()) {\n\t\t\t\tif ($this->_acquireOnce()) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (!$this->fetch()->_isLocked()) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($timeout > 0 && $timer->elapsed() > $timeout) {\n\t\t\t\tthrow new TimeoutExpired('Waiting for Lock \"{code}\" ({timeout} seconds)', [\n\t\t\t\t\t'method' => __METHOD__, 'timeout' => $timeout, 'code' => $this->code,\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "private function _acquireLock()\n {\n // set the correct path to the lock resource based on dir and file name.\n $lockResource = $this->_lockPath . \"/\" . self::PID_FILE_NAME;\n echo \"Acquiring exclusive lock $lockResource\\n\";\n\n // Check to see if lock file exists.\n if (file_exists($lockResource)) {\n // If the lock file exists and is not stale, the process is running,\n // leave the process and don't release current lock.\n if (!((filectime($lockResource) + self::PID_FILE_MAX_TIME) <= time())) {\n $this->leave(\n \"Error: database manager is either already running or it did \" .\n \"not exit cleanly during the previous run.\\nPID: $lockResource\\n\",\n false);\n }\n }\n\n // Touches the pid file in order to create it if it does not exist.\n return touch($lockResource);\n }", "function lock_acquire($name, $timeout = 30.0) {\n global $locks;\n\n // Insure that the timeout is at least 1 ms.\n $timeout = max($timeout, 0.001);\n $expire = microtime(TRUE) + $timeout;\n if (isset($locks[$name])) {\n // Try to extend the expiration of a lock we already acquired.\n $success = (bool) db_update('semaphore')\n ->fields(array('expire' => $expire))\n ->condition('name', $name)\n ->condition('value', _lock_id())\n ->execute();\n if (!$success) {\n // The lock was broken.\n unset($locks[$name]);\n }\n return $success;\n }\n else {\n // Optimistically try to acquire the lock, then retry once if it fails.\n // The first time through the loop cannot be a retry.\n $retry = FALSE;\n // We always want to do this code at least once.\n do {\n try {\n db_insert('semaphore')\n ->fields(array(\n 'name' => $name,\n 'value' => _lock_id(),\n 'expire' => $expire,\n ))\n ->execute();\n // We track all acquired locks in the global variable.\n $locks[$name] = TRUE;\n // We never need to try again.\n $retry = FALSE;\n }\n catch (PDOException $e) {\n // Suppress the error. If this is our first pass through the loop,\n // then $retry is FALSE. In this case, the insert must have failed\n // meaning some other request acquired the lock but did not release it.\n // We decide whether to retry by checking lock_may_be_available()\n // Since this will break the lock in case it is expired.\n $retry = $retry ? FALSE : lock_may_be_available($name);\n }\n // We only retry in case the first attempt failed, but we then broke\n // an expired lock.\n } while ($retry);\n }\n return isset($locks[$name]);\n}", "function Spinlock( $query, $id = -1, $set = FALSE, $spin = FALSE, $name = \"\" )\n\t{\n\t\t$log = new Logger( PAYPAL_IPN_LOG, \"Utils::Spinlock\", FALSE, $name );\n\t\t$log->debug( \"Attempting to lock tables...\" );\n\t\t$myResponse = \"\";\n\t\t$result = mysql_query( \"LOCK TABLES session WRITE, $query\" );\n\t\t\n\t\t// Table access locked?\n\t\tif ( $result == FALSE )\n\t\t{\n\t\t\t$myResponse = 'Lock_wait' . mysql_error();\n\t\t\t$log->error( $myResponse );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Table locked by another guestID?\n\t\t\t$result = mysql_query( \"SELECT locked, timeout FROM session\" );\n\t\t\t$row = mysql_fetch_row( $result );\n\t\t\t$timeLeft = $row[1] - time();\n\t\t\tif ( $row[0] != -1 && $row[0] != $id && $timeLeft > 0 )\n\t\t\t{\n\t\t\t\t// locked by someone else, still within timeout\n\t\t\t\t$myResponse = \"Locked by guest #{$row[0]} for $timeLeft more seconds. You are #$id\";\n\t\t\t\t$log->error( $myResponse );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// not locked or lock timed out\n\t\t\t\t$newID = $set ? $id : -1;\n\t\t\t\t$timeout = (time() + LOCK_TIMEOUT);\n\t\t\t\t$result = mysql_query( \"UPDATE session SET locked='$newID', timeout='$timeout'\" );\n\t\t\t\tif ( $result == FALSE )\n\t\t\t\t{\n\t\t\t\t\t$qerr = \"Error setting/clearing lock to $newID: \" . mysql_error();\n\t\t\t\t\t$log->error( $qerr );\n\t\t\t\t\treturn $qerr;\n\t\t\t\t}\n\t\t\t\t$log->debug( \"Lock set for $newID with timeout of $timeout\" );\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t\t// if we get here then there's an existing lock, so spin, if requested, at 5-second intervals\n\t\tif ( $spin )\n\t\t{\n\t\t\t$log->debug( \"Spinning for 5 seconds...\" );\n\t\t\tsleep(5);\n\t\t\treturn Utils::Spinlock( $query, $id, $set, $spin, $name, FALSE );\n\t\t}\n\t\treturn $myResponse;\n\t}", "public function lock($id)\n {\n $locker = $this->checklock($id);\n\n if ($locker !== self::LOCKED) {\n lock($id);\n } else {\n throw new FileIsLockedException();\n }\n }", "public function isLocked(string $id = null) : bool {\n return $this->hasExclusiveLock($id) || $this->hasSharedLock($id);\n }", "public function acquire($name, $timeout = 0)\n {\n if (!in_array($name, $this->_locks, true) && $this->acquireLock($name, $timeout)) {\n $this->_locks[] = $name;\n\n return true;\n }\n\n return false;\n }", "public function wait(int $timeout = 0) : bool{}", "abstract protected function acquireLock($name, $timeout = 0);", "public function isLocked()\n {\n if ($this->_isLocked !== null) {\n return $this->_isLocked;\n }\n\n $fp = $this->_getLockFile();\n if (flock($fp, LOCK_EX | LOCK_NB)) {\n flock($fp, LOCK_UN);\n return false;\n }\n\n //if the lock exists and exists for longer then 5minutes then remove lock & return false\n if($this->_lockIsExpired()){\n $varDir = Mage::getConfig()->getVarDir('locks');\n $lockFile = $varDir . DS . 'buckaroo_process_' . $this->getId() . '.lock';\n unlink($lockFile);\n\n $this->_getLockFile();//create new lock file\n return false;\n }\n\n return true;\n }", "function lock() {\n global $_Query_lock_depth;\n if ($_Query_lock_depth < 0) {\n Fatal::internalError('Negative lock depth');\n }\n if ($_Query_lock_depth == 0) {\n $row = $this->select1($this->mkSQL('select get_lock(%Q, %N) as locked',\n OBIB_LOCK_NAME, OBIB_LOCK_TIMEOUT));\n if (!isset($row['locked']) or $row['locked'] != 1) {\n Fatal::cantLock();\n }\n }\n $_Query_lock_depth++;\n }", "private function mutex_acquire () {\n $pid = getmypid();\n if ($pid == $this->mutex_acquired)\n return true;\n\n if (sem_acquire($this->mutex))\n $this->daemon->log(\"Mutex Granted\");\n else\n $this->daemon->log(\"Mutex Grant Failed\");\n\n //throw new Exception(\"Cannot acquire mutex: Unknown Error.\");\n\n $this->mutex_acquired = $pid;\n return true;\n }", "public function trylock() {}", "public function readlock($wait = -1) {}", "public function waitAndAllow($string,$timeOut=300)\n\t{\n\t\t$allow=$this->isLock($string);\n\t\tif($allow==1) {\n\t\t\t$this->getLock($string);\n\t\t\treturn $allow; }\n\t\telse{\n\t\t\tif($string) {\n\t\t\tset_time_limit(3600);\n\t\t\t$allow=0;\n\t\t\t$phase1_microSec=rand(100,200);\n\t\t\t$phase1_limit=rand(16000,17000);\n\t\t\tfor($i=0;$i<$phase1_limit;$i++){\n\t\t\t\t$allow=$this->isLock($string);\n\t\t\t\tif($allow==1){ $this->getLock($string,$timeOut);\n\t\t\t\t\treturn $allow;}\n\t\t\t\telse usleep($phase1_microSec);}\n\t\t\t$phase2_microSec=rand(10,50);\n\t\t\t$phase2_limit=rand(12000,13000);\n\t\t\tfor($i=0;$i<$phase2_limit;$i++){\n\t\t\t\t$allow=$this->isLock($string);\n\t\t\t\tif($allow==1){ $this->getLock($string,$timeOut);\n\t\t\t\t\treturn $allow;}\n\t\t\t\telse usleep($phase2_microSec);}\n\t\t\t$phase3_microSec=rand(1,10);\n\t\t\t$phase3_limit=rand(10000,11000);\n\t\t\tfor($i=0;$i<$phase3_limit;$i++){\n\t\t\t\t$allow=$this->isLock($string);\n\t\t\t\tif($allow==1){ $this->getLock($string,$timeOut);\n\t\t\t\treturn $allow;}\n\t\t\t\telse usleep($phase3_microSec);}\n\t\t\t}\n\t\t\telse\n\t\t\t\techo \"No String passed to check lock status\";\n\t\t}\n\t\treturn $allow;\n\t}", "public function testLockTimeout() {\n\n\t\t\t$lockName = uniqid();\n\n\t\t\t$this->fork(\n\t\t\t\tfunction ($sh) use ($lockName) {\n\t\t\t\t\t// parent\n\n\t\t\t\t\t// wait for lock to be acquired\n\t\t\t\t\t$this->assertNextMessage('acquired', $sh);\n\n\t\t\t\t\t$this->assertDurationLessThan(4, function() use ($lockName) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tSharedLock::lock($lockName, 3, 10);\n\n\t\t\t\t\t\t\t$this->fail('Lock was acquired but should be held by other process');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (SharedLockTimeoutException $ex) {\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t},\n\t\t\t\tfunction ($sh) use ($lockName) {\n\t\t\t\t\t//child\n\n\t\t\t\t\tSharedLock::lock($lockName, 0, 10);\n\n\t\t\t\t\t$this->sendMessage('acquired', $sh);\n\n\t\t\t\t\t// avoid implicit release before test finished\n\t\t\t\t\tsleep(4);\n\t\t\t\t}\n\t\t\t);\n\t\t}", "public function lockAndBlock()\n {\n $this->lock();\n }", "public function lock($id, $group = null, $locktime = null)\n\t{\n\t\t$returning = new stdClass;\n\t\t$returning->locklooped = false;\n\t\t// Get the default group\n\t\t$group = ($group) ? $group : $this->_options['defaultgroup'];\n\n\t\t// Get the default locktime\n\t\t$locktime = ($locktime) ? $locktime : $this->_options['locktime'];\n\n\t\t// Allow storage handlers to perform locking on their own\n\t\t// NOTE drivers with lock need also unlock or unlocking will fail because of false $id\n\t\t$handler = $this->_getStorage();\n\t\tif (!($handler instanceof Exception) && $this->_options['locking'] == true && $this->_options['caching'] == true)\n\t\t{\n\t\t\t$locked = $handler->lock($id, $group, $locktime);\n\t\t\tif ($locked !== false)\n\t\t\t{\n\t\t\t\treturn $locked;\n\t\t\t}\n\t\t}\n\n\t\t// Fallback\n\t\t$curentlifetime = $this->_options['lifetime'];\n\n\t\t// Set lifetime to locktime for storing in children\n\t\t$this->_options['lifetime'] = $locktime;\n\n\t\t$looptime = $locktime * 10;\n\t\t$id2 = $id . '_lock';\n\n\t\tif ($this->_options['locking'] == true && $this->_options['caching'] == true)\n\t\t{\n\t\t\t$data_lock = $this->get($id2, $group);\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data_lock = false;\n\t\t\t$returning->locked = false;\n\t\t}\n\n\t\tif ($data_lock !== false)\n\t\t{\n\t\t\t$lock_counter = 0;\n\n\t\t\t// Loop until you find that the lock has been released.\n\t\t\t// That implies that data get from other thread has finished\n\t\t\twhile ($data_lock !== false)\n\t\t\t{\n\n\t\t\t\tif ($lock_counter > $looptime)\n\t\t\t\t{\n\t\t\t\t\t$returning->locked = false;\n\t\t\t\t\t$returning->locklooped = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tusleep(100);\n\t\t\t\t$data_lock = $this->get($id2, $group);\n\t\t\t\t$lock_counter++;\n\t\t\t}\n\t\t}\n\n\t\tif ($this->_options['locking'] == true && $this->_options['caching'] == true)\n\t\t{\n\t\t\t$returning->locked = $this->store(1, $id2, $group);\n\t\t}\n\n\t\t// Revert lifetime to previous one\n\t\t$this->_options['lifetime'] = $curentlifetime;\n\n\t\treturn $returning;\n\t}", "public static function checkLock()\n {\n $_lastExecutionTime = Mage::app()->loadCache(self::LOCK_CACHE_INDEX);\n if (self::HDU_LOCK_TIMEOUT > (time() - $_lastExecutionTime)) {\n return false;\n }\n Mage::app()->saveCache(time(), self::LOCK_CACHE_INDEX, array(), self::HDU_LOCK_TIMEOUT);\n return true;\n }", "protected function updateLock() \n {\n $log = FezLog::get();\n $db = DB_API::get();\n \n $my_process = $this->getProcessInfo();\n $my_pid = $my_process['pid'];\n\n if (!is_numeric($my_pid)) {\n $my_pid = 'null';\n }\n\n $db->beginTransaction();\n\n $stmt = \"SELECT \".$this->_dblp.\"value, \".$this->_dblp.\"pid FROM \".$this->_dbtp.\"locks \".\n \"WHERE \".$this->_dblp.\"name=?\";\n \n try {\n $res = $db->fetchRow($stmt, $this->_lock, Zend_Db::FETCH_ASSOC);\n \n $pid = $res[$this->_dblp.'pid'];\n $lock_value = $res[$this->_dblp.'value'];\n $acquire_lock = true;\n $log->debug(\n \"Queue got lockValue=\".$lock_value.\", pid=\".$pid.\" with \".$stmt.\" and \".print_r($res, true)\n );\n \n if ($lock_value != -1 && (!empty($pid)) && is_numeric($pid)) {\n // check if process is still running or if this is an invalid lock\n $psinfo = $this->getProcessInfo($pid);\n $log->debug(\"checking for lock on lock \".$pid);\n $log->debug(array(\"psinfo\",$psinfo));\n if (!empty($psinfo)) {\n // override existing lock\n $acquire_lock = false;\n $log->debug(\"overriding existing lock \".$psinfo);\n }\n }\n \n // worst case: a background process is started, but the queue already\n // empty at this point\n if ($acquire_lock) {\n $sql = \"UPDATE \".$this->_dbtp.\"locks SET \".$this->_dblp.\"pid=? \".\n \"WHERE \".$this->_dblp.\"name=?\"; \n $db->query($sql, array($my_pid, $this->_lock));\n $db->commit();\n } else {\n return false;\n }\n }\n catch(Exception $ex) {\n $db->rollBack(); \n $log->err($ex);\n return false;\n }\n return true;\n }", "protected function acquireLock($name, $timeout = 0)\n {\n return (bool)$this->db->createCommand(\n 'SELECT GET_LOCK(:name, :timeout)',\n [':name' => $this->hashLockName($name), ':timeout' => $timeout]\n )->queryScalar();\n }" ]
[ "0.6572031", "0.6527288", "0.6359277", "0.63404727", "0.62178606", "0.62178606", "0.61966294", "0.59971434", "0.5893653", "0.587575", "0.5751817", "0.56876385", "0.5642514", "0.55994385", "0.5499179", "0.5473752", "0.54396224", "0.54181707", "0.5390619", "0.5390556", "0.5377647", "0.53735316", "0.5373049", "0.536377", "0.53613204", "0.53429586", "0.53394955", "0.5322461", "0.5302413", "0.5300586" ]
0.67317903
0
datatable verifikasi transaksi rembug
public function datatable_verifikasi_trx_rembug() { /* Array of database columns which should be read and sent back to DataTables. Use a space where * you want to insert a non-database field (for example a counter or static image) */ $branch_id = @$_GET['branch_id']; $branch_code = @$_GET['branch_code']; $trx_date = @$_GET['trx_date']; $trx_date = str_replace('/', '', $trx_date); $tgl_trx_date = substr($trx_date,0,2); $bln_trx_date = substr($trx_date,2,2); $thn_trx_date = substr($trx_date,4,4); if($trx_date!="") $trx_date = "$thn_trx_date-$bln_trx_date-$tgl_trx_date"; // echo $trx_date; // die(); $aColumns = array( 'mfi_cm.cm_name','mfi_trx_cm_save.trx_date','mfi_gl_account_cash.account_cash_name',''); /* * Paging */ $sLimit = ""; if ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' ) { $sLimit = " OFFSET ".intval( $_GET['iDisplayStart'] )." LIMIT ". intval( $_GET['iDisplayLength'] ); } /* * Ordering */ $sOrder = ""; if ( isset( $_GET['iSortCol_0'] ) ) { $sOrder = "ORDER BY "; for ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ ) { if ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == "true" ) { $sOrder .= "".$aColumns[ intval( $_GET['iSortCol_'.$i] ) ]." ". ($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc') .", "; } } $sOrder = substr_replace( $sOrder, "", -2 ); if ( $sOrder == "ORDER BY" ) { $sOrder = ""; } } /* * Filtering */ $sWhere = ""; if ( isset($_GET['sSearch']) && $_GET['sSearch'] != "" ) { $sWhere = "WHERE ("; for ( $i=0 ; $i< count($aColumns) ; $i++ ) { if ( $aColumns[$i] != '' ) $sWhere .= "LOWER(CAST(".$aColumns[$i]." AS VARCHAR)) LIKE '%".strtolower( $_GET['sSearch'] )."%' OR "; } $sWhere = substr_replace( $sWhere, "", -3 ); $sWhere .= ')'; $sWhere .= "LOWER(CAST(".$aColumns[$i]." AS VARCHAR)) LIKE '%".strtolower($_GET['sSearch_'.$i])."%' "; } /* Individual column filtering */ for ( $i=0 ; $i<count($aColumns) ; $i++ ) { if ( $aColumns[$i] != '' ) { if ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == "true" && $_GET['sSearch_'.$i] != '' ) { if ( $sWhere == "" ) { $sWhere = "WHERE "; } else { $sWhere .= " AND "; } $sWhere .= "LOWER(CAST(".$aColumns[$i]." AS VARCHAR)) LIKE '%".strtolower($_GET['sSearch_'.$i])."%' "; } } } $rResult = $this->model_transaction->datatable_verifikasi_trx_rembug($sWhere,$sOrder,$sLimit,$branch_id,$branch_code,$trx_date); // query get data to view $rResultFilterTotal = $this->model_transaction->datatable_verifikasi_trx_rembug($sWhere,'','',$branch_id,$branch_code,$trx_date); // get number of filtered data $iFilteredTotal = count($rResultFilterTotal); $rResultTotal = $this->model_transaction->datatable_verifikasi_trx_rembug('','','',$branch_id,$branch_code,$trx_date); // get number of all data $iTotal = count($rResultTotal); /* * Output */ $output = array( "sEcho" => intval($_GET['sEcho']), "iTotalRecords" => $iTotal, "iTotalDisplayRecords" => $iFilteredTotal, "aaData" => array() ); foreach($rResult as $aRow) { $row = array(); $row[] = $aRow['cm_name']; $row[] = $this->format_date_detail($aRow['trx_date'],'id',false,'/'); $row[] = $aRow['account_cash_name']; $row[] = '<div align="center"><a href="javascript:;" trx_cm_save_id="'.$aRow['trx_cm_save_id'].'" fa_code = "'.$aRow['fa_code'].'" account_cash_code = "'.$aRow['account_cash_code'].'" account_cash_name = "'.$aRow['account_cash_name'].'" cm_code = "'.$aRow['cm_code'].'" cm_name = "'.$aRow['cm_name'].'" branch_name = "'.$aRow['branch_name'].'" branch_code = "'.$aRow['branch_code'].'" branch_id = "'.$aRow['branch_id'].'" infaq = "'.$aRow['infaq'].'" kas_awal = "'.$aRow['kas_awal'].'" tanggal2 = "'.$aRow['trx_date'].'" trx_date = "'.$this->format_date_detail($aRow['trx_date'],'id',false,'/').'" id="link-verifikasi">Verifikasi</a></div>'; $output['aaData'][] = $row; } echo json_encode( $output ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function datatable_verifikasi_transaksi_kas_petugas()\n\t{\n\n\t\t$from_date = str_replace('/','',@$_GET['from_date']);\n\t\t$from_date = substr($from_date,4,4).'-'.substr($from_date,2,2).'-'.substr($from_date,0,2);\n\t\t$thru_date = str_replace('/','',@$_GET['thru_date']);\n\t\t$thru_date = substr($thru_date,4,4).'-'.substr($thru_date,2,2).'-'.substr($thru_date,0,2);\n\t\t$aColumns = array( '','trx_date','account_cash_code','account_teller_code','mfi_trx_gl_cash.trx_gl_cash_type','mfi_trx_gl_cash.amount','mfi_trx_gl_cash.description','');\n\t\t\t\t\n\t\t/* \n\t\t * Paging\n\t\t */\n\t\t$sLimit = \"\";\n\t\tif ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )\n\t\t{\n\t\t\t$sLimit = \" OFFSET \".intval( $_GET['iDisplayStart'] ).\" LIMIT \".\n\t\t\t\tintval( $_GET['iDisplayLength'] );\n\t\t}\n\t\t\n\t\t/*\n\t\t * Ordering\n\t\t */\n\t\t$sOrder = \"\";\n\t\tif ( isset( $_GET['iSortCol_0'] ) )\n\t\t{\n\t\t\t$sOrder = \"ORDER BY \";\n\t\t\tfor ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == \"true\" )\n\t\t\t\t{\n\t\t\t\t\t$sOrder .= \"\".$aColumns[ intval( $_GET['iSortCol_'.$i] ) ].\" \".\n\t\t\t\t\t\t($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc') .\", \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$sOrder = substr_replace( $sOrder, \"\", -2 );\n\t\t\tif ( $sOrder == \"ORDER BY\" )\n\t\t\t{\n\t\t\t\t$sOrder = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* \n\t\t * Filtering\n\t\t */\n\t\t$sWhere = \"\";\n\t\tif ( isset($_GET['sSearch']) && $_GET['sSearch'] != \"\" )\n\t\t{\n\t\t\t$sWhere = \"WHERE (\";\n\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower( $_GET['sSearch'] ).\"%' OR \";\n\t\t\t}\n\t\t\t$sWhere = substr_replace( $sWhere, \"\", -3 );\n\t\t\t$sWhere .= ')';\n\t\t}\n\t\t\n\t\t/* Individual column filtering */\n\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t{\n\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t{\n\t\t\t\tif ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" && $_GET['sSearch_'.$i] != '' )\n\t\t\t\t{\n\t\t\t\t\tif ( $sWhere == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$sWhere = \"WHERE \";\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$sWhere .= \" AND \";\n\t\t\t\t\t}\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower($_GET['sSearch_'.$i]).\"%' \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$rResult \t\t\t= $this->model_transaction->datatable_verifikasi_transaksi_kas_petugas($sWhere,$sOrder,$sLimit,$from_date,$thru_date); // query get data to view\n\t\t$rResultFilterTotal = $this->model_transaction->datatable_verifikasi_transaksi_kas_petugas($sWhere,'','',$from_date,$thru_date); // get number of filtered data\n\t\t$iFilteredTotal \t= count($rResultFilterTotal); \n\t\t$rResultTotal \t\t= $this->model_transaction->datatable_verifikasi_transaksi_kas_petugas('','','',$from_date,$thru_date); // get number of all data\n\t\t$iTotal \t\t\t= count($rResultTotal);\t\n\t\t\n\t\t/*\n\t\t * Output\n\t\t */\n\t\t$output = array(\n\t\t\t\"sEcho\" => intval($_GET['sEcho']),\n\t\t\t\"iTotalRecords\" => $iTotal,\n\t\t\t\"iTotalDisplayRecords\" => $iFilteredTotal,\n\t\t\t\"aaData\" => array()\n\t\t);\n\t\t\n\t\tforeach($rResult as $aRow)\n\t\t{\n\t\t\t$row = array();\n\t\t\tif ($aRow['trx_gl_cash_type']==1) \n\t\t\t{\n\t\t\t\t$jenis_trx = \"droping kas\";\n\t\t\t} \n\t\t\telse if ($aRow['trx_gl_cash_type']==2) \n\t\t\t{\n\t\t\t\t$jenis_trx = \"setoran rembug\";\n\t\t\t}\n\t\t\telse if ($aRow['trx_gl_cash_type']==3) \n\t\t\t{\n\t\t\t\t$jenis_trx = \"penarikan rembug\";\n\t\t\t}\n\t\t\telse if ($aRow['trx_gl_cash_type']==4) \n\t\t\t{\n\t\t\t\t$jenis_trx = \"setor ke teller\";\n\t\t\t}\n\t\t\t\n\t\t\t$row[] = '<input type=\"checkbox\" value=\"'.$aRow['trx_gl_cash_id'].'\" id=\"checkbox\" class=\"checkboxes\" >';\n\t\t\t$row[] = '<div align=\"center\">'.$aRow['trx_date'].'</div>';\n\t\t\t$row[] = $aRow['kode_kas_petugas'];\n\t\t\t$row[] = $aRow['kode_kas_teller'];\n\t\t\t$row[] = $jenis_trx;\n\t\t\t$row[] = '<div align=\"right\">'.number_format($aRow['amount'],0,',','.').'</div>';\n\t\t\t$row[] = $aRow['description'];\n\t\t\t$row[] = '<a href=\"javascript:;\" trx_gl_cash_id=\"'.$aRow['trx_gl_cash_id'].'\" id=\"link-verifikasi\">Verifikasi</a>';\n\n\t\t\t$output['aaData'][] = $row;\n\t\t}\n\t\t\n\t\techo json_encode( $output );\n\t}", "public function datatable_transaksi_kas_petugas()\n\t{\n\t\t$aColumns = array( '','trx_date','account_cash_code','account_teller_code','mfi_trx_gl_cash.trx_gl_cash_type','mfi_trx_gl_cash.amount','mfi_trx_gl_cash.description','');\n\t\t\t\t\n\t\t/* \n\t\t * Paging\n\t\t */\n\t\t$sLimit = \"\";\n\t\tif ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )\n\t\t{\n\t\t\t$sLimit = \" OFFSET \".intval( $_GET['iDisplayStart'] ).\" LIMIT \".\n\t\t\t\tintval( $_GET['iDisplayLength'] );\n\t\t}\n\t\t\n\t\t/*\n\t\t * Ordering\n\t\t */\n\t\t$sOrder = \"\";\n\t\tif ( isset( $_GET['iSortCol_0'] ) )\n\t\t{\n\t\t\t$sOrder = \"ORDER BY \";\n\t\t\tfor ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == \"true\" )\n\t\t\t\t{\n\t\t\t\t\t$sOrder .= \"\".$aColumns[ intval( $_GET['iSortCol_'.$i] ) ].\" \".\n\t\t\t\t\t\t($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc') .\", \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$sOrder = substr_replace( $sOrder, \"\", -2 );\n\t\t\tif ( $sOrder == \"ORDER BY\" )\n\t\t\t{\n\t\t\t\t$sOrder = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* \n\t\t * Filtering\n\t\t */\n\t\t$sWhere = \"\";\n\t\tif ( isset($_GET['sSearch']) && $_GET['sSearch'] != \"\" )\n\t\t{\n\t\t\t$sWhere = \"WHERE (\";\n\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower( $_GET['sSearch'] ).\"%' OR \";\n\t\t\t}\n\t\t\t$sWhere = substr_replace( $sWhere, \"\", -3 );\n\t\t\t$sWhere .= ')';\n\t\t}\n\t\t\n\t\t/* Individual column filtering */\n\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t{\n\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t{\n\t\t\t\tif ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" && $_GET['sSearch_'.$i] != '' )\n\t\t\t\t{\n\t\t\t\t\tif ( $sWhere == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$sWhere = \"WHERE \";\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$sWhere .= \" AND \";\n\t\t\t\t\t}\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower($_GET['sSearch_'.$i]).\"%' \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$rResult \t\t\t= $this->model_transaction->datatable_transaksi_kas_petugas($sWhere,$sOrder,$sLimit); // query get data to view\n\t\t$rResultFilterTotal = $this->model_transaction->datatable_transaksi_kas_petugas($sWhere); // get number of filtered data\n\t\t$iFilteredTotal \t= count($rResultFilterTotal); \n\t\t$rResultTotal \t\t= $this->model_transaction->datatable_transaksi_kas_petugas(); // get number of all data\n\t\t$iTotal \t\t\t= count($rResultTotal);\t\n\t\t\n\t\t/*\n\t\t * Output\n\t\t */\n\t\t$output = array(\n\t\t\t\"sEcho\" => intval($_GET['sEcho']),\n\t\t\t\"iTotalRecords\" => $iTotal,\n\t\t\t\"iTotalDisplayRecords\" => $iFilteredTotal,\n\t\t\t\"aaData\" => array()\n\t\t);\n\t\t\n\t\tforeach($rResult as $aRow)\n\t\t{\n\t\t\t$row = array();\n\t\t\tif ($aRow['trx_gl_cash_type']==1) \n\t\t\t{\n\t\t\t\t$jenis_trx = \"droping kas\";\n\t\t\t} \n\t\t\telse if ($aRow['trx_gl_cash_type']==2) \n\t\t\t{\n\t\t\t\t$jenis_trx = \"setoran rembug\";\n\t\t\t}\n\t\t\telse if ($aRow['trx_gl_cash_type']==3) \n\t\t\t{\n\t\t\t\t$jenis_trx = \"penarikan rembug\";\n\t\t\t}\n\t\t\telse if ($aRow['trx_gl_cash_type']==4) \n\t\t\t{\n\t\t\t\t$jenis_trx = \"setor ke teller\";\n\t\t\t}\n\t\t\t\n\t\t\t$row[] = '<input type=\"checkbox\" value=\"'.$aRow['trx_gl_cash_id'].'\" id=\"checkbox\" class=\"checkboxes\" >';\n\t\t\t$row[] = $aRow['trx_date'];\n\t\t\t$row[] = $aRow['kode_kas_petugas'];\n\t\t\t$row[] = $aRow['kode_kas_teller'];\n\t\t\t$row[] = $jenis_trx;\n\t\t\t$row[] = '<div align=\"right\">'.number_format($aRow['amount'],0,',','.').'</div>';\n\t\t\t$row[] = $aRow['description'];\n\t\t\t$row[] = '<a href=\"javascript:;\" trx_gl_cash_id=\"'.$aRow['trx_gl_cash_id'].'\" id=\"link-edit\">Edit</a>';\n\n\t\t\t$output['aaData'][] = $row;\n\t\t}\n\t\t\n\t\techo json_encode( $output );\n\t}", "public function f_get_confirmation_tableData()\n {\n\n $sql = $this->db->query(\" SELECT a.trans_id, a.trans_dt, a.order_no, a.sdo_memo, a.bdo_memo, a.pb_no, a.bill_no as sb_no, a.bill_dt as sb_dt,\n b.order_dt, c.bill_dt as pb_dt FROM td_dm_sale a, td_dm_work_order b, td_dm_delivery c\n WHERE a.order_no = b.order_no\n AND a.dist_cd = b.dist_cd\n AND a.order_no = c.order_no\n AND a.sdo_memo = c.sdo_memo\n AND a.dist_cd = c.dist_cd\n AND a.point_no = c.point_no\n AND a.challan_from = c.challan_from\n AND a.challan_to = c.challan_to\n AND a.pb_no = c.bill_no\n AND a.cnf_status = 0 \");\n return $sql->result();\n\n }", "public function datatable()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'detailfasilitaskesehatan', 'read')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\t$table = 'detailfasilitaskesehatan';\n\t\t$primarykey = 'id';\n\t\t$columns = array(\n\t\t\tarray('db' => $primarykey, 'dt' => '0', 'field' => $primarykey,\n\t\t\t\t'formatter' => function($d, $row, $i){\n\t\t\t\t\treturn \"<div class='text-center'>\n\t\t\t\t\t\t<input type='checkbox' id='titleCheckdel' />\n\t\t\t\t\t\t<input type='hidden' class='deldata' name='item[\".$i.\"][deldata]' value='\".$d.\"' disabled />\n\t\t\t\t\t</div>\";\n\t\t\t\t}\n\t\t\t),\n\t\t\tarray('db' => $primarykey, 'dt' => '1', 'field' => $primarykey),\n\t\t\tarray('db' => 'b.namakategori', 'dt' => '2', 'field' => 'namakategori'),\n\t\t\tarray('db' => 'nama', 'dt' => '3', 'field' => 'nama'),\n\t\t\tarray('db' => 'kodefaskes', 'dt' => '4', 'field' => 'kodefaskes'),\n\t\t\t// array('db' => 'kelas', 'dt' => '5', 'field' => 'kelas'),\n\t\t\t// array('db' => 'direktur', 'dt' => '6', 'field' => 'direktur'),\n\t\t\tarray('db' => 'alamat', 'dt' => '5', 'field' => 'alamat'),\n\t\t\tarray('db' => 'kecamatan', 'dt' => '6', 'field' => 'kecamatan'),\n\t\t\t// array('db' => 'pemilik', 'dt' => '9', 'field' => 'pemilik'),\n\t\t\t// array('db' => 'telpon', 'dt' => '10', 'field' => 'telpon'),\n\t\t\t// array('db' => 'email', 'dt' => '11', 'field' => 'email'),\n\t\t\t// array('db' => 'website', 'dt' => '12', 'field' => 'website'),\n\t\t\t// array('db' => 'fax', 'dt' => '13', 'field' => 'fax'),\n\t\t\t// array('db' => 'ugd', 'dt' => '14', 'field' => 'ugd'),\n\t\t\t// array('db' => 'vip', 'dt' => '15', 'field' => 'vip'),\n\t\t\t// array('db' => 'vvip', 'dt' => '16', 'field' => 'vvip'),\n\t\t\t// array('db' => 'kelas1', 'dt' => '17', 'field' => 'kelas1'),\n\t\t\t// array('db' => 'kelas2', 'dt' => '18', 'field' => 'kelas2'),\n\t\t\t// array('db' => 'kelas3', 'dt' => '19', 'field' => 'kelas3'),\n\t\t\t// array('db' => 'jumdokter', 'dt' => '20', 'field' => 'jumdokter'),\n\t\t\t// array('db' => 'jumperawat', 'dt' => '21', 'field' => 'jumperawat'),\n\t\t\t// array('db' => 'foto', 'dt' => '22', 'field' => 'foto'),\n\t\t\t// array('db' => 'seourl', 'dt' => '7', 'field' => 'seourl'),\n\t\t\tarray('db' => $primarykey, 'dt' => '7', 'field' => $primarykey,\n\t\t\t\t'formatter' => function($d, $row, $i){\n\t\t\t\t\treturn \"<div class='text-center'>\n\t\t\t\t\t\t<div class='btn-group btn-group-xs'>\n\t\t\t\t\t\t\t<a href='admin.php?mod=detailfasilitaskesehatan&act=edit&id=\".$d.\"' class='btn btn-xs btn-default' id='\".$d.\"' data-toggle='tooltip' title='{$GLOBALS['_']['action_1']}'><i class='fa fa-pencil'></i></a>\n\t\t\t\t\t\t\t<a class='btn btn-xs btn-danger alertdel' id='\".$d.\"' data-toggle='tooltip' title='{$GLOBALS['_']['action_2']}'><i class='fa fa-times'></i></a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\";\n\t\t\t\t}\n\t\t\t),\n\t\t);\n\t\t$joinquery = \"FROM detailfasilitaskesehatan AS a JOIN katfasilitaskesehatan AS b ON (b.idkategori = a.idkategori)\";\n\t\techo json_encode(SSP::simple($_POST, $this->poconnect, $table, $primarykey, $columns, $joinquery));\n\t}", "public function datatable_rekening_ver_deposito_setup()\n\t{\n\t\t/* Array of database columns which should be read and sent back to DataTables. Use a space where\n\t\t * you want to insert a non-database field (for example a counter or static image)\n\t\t */\n\t\t$aColumns = array('','account_deposit_no','mfi_cif.nama','nominal','jangka_waktu','');\n\t\t$cm_code = @$_GET['cm_code'];\n\t\t\t\t\n\t\t/* \n\t\t * Paging\n\t\t */\n\t\t$sLimit = \"\";\n\t\tif ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )\n\t\t{\n\t\t\t$sLimit = \" OFFSET \".intval( $_GET['iDisplayStart'] ).\" LIMIT \".\n\t\t\t\tintval( $_GET['iDisplayLength'] );\n\t\t}\n\t\t\n\t\t/*\n\t\t * Ordering\n\t\t */\n\t\t$sOrder = \"\";\n\t\tif ( isset( $_GET['iSortCol_0'] ) )\n\t\t{\n\t\t\t$sOrder = \"ORDER BY \";\n\t\t\tfor ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == \"true\" )\n\t\t\t\t{\n\t\t\t\t\t$sOrder .= \"\".$aColumns[ intval( $_GET['iSortCol_'.$i] ) ].\" \".\n\t\t\t\t\t\t($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc') .\", \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$sOrder = substr_replace( $sOrder, \"\", -2 );\n\t\t\tif ( $sOrder == \"ORDER BY\" )\n\t\t\t{\n\t\t\t\t$sOrder = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* \n\t\t * Filtering\n\t\t */\n\t\t$sWhere = \"\";\n\t\tif ( isset($_GET['sSearch']) && $_GET['sSearch'] != \"\" )\n\t\t{\n\t\t\t$sWhere = \"WHERE (\";\n\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower( $_GET['sSearch'] ).\"%' OR \";\n\t\t\t}\n\t\t\t$sWhere = substr_replace( $sWhere, \"\", -3 );\n\t\t\t$sWhere .= ')';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sWhere = \"where mfi_account_deposit.status_rekening ='0'\";\n\t\t}\n\n\t\tif($sWhere==\"\"){\n\t\t\t$sWhere = \" WHERE mfi_cif.cm_code = '\".$cm_code.\"' \";\n\t\t}else{\n\t\t\t$sWhere .= \" AND mfi_cif.cm_code = '\".$cm_code.\"' \";\n\t\t}\n\t\t\n\t\t/* Individual column filtering */\n\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t{\n\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t{\n\t\t\t\tif ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" && $_GET['sSearch_'.$i] != '' )\n\t\t\t\t{\n\t\t\t\t\tif ( $sWhere == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$sWhere = \"WHERE \";\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$sWhere .= \" AND \";\n\t\t\t\t\t}\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower($_GET['sSearch_'.$i]).\"%' \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$rResult \t\t\t= $this->model_transaction->datatable_rekening_ver_deposito_setup($sWhere,$sOrder,$sLimit); // query get data to view\n\t\t$rResultFilterTotal = $this->model_transaction->datatable_rekening_ver_deposito_setup($sWhere); // get number of filtered data\n\t\t$iFilteredTotal \t= count($rResultFilterTotal); \n\t\t$rResultTotal \t\t= $this->model_transaction->datatable_rekening_ver_deposito_setup(); // get number of all data\n\t\t$iTotal \t\t\t= count($rResultTotal);\t\n\t\t\n\t\t/*\n\t\t * Output\n\t\t */\n\t\t$output = array(\n\t\t\t\"sEcho\" => intval($_GET['sEcho']),\n\t\t\t\"iTotalRecords\" => $iTotal,\n\t\t\t\"iTotalDisplayRecords\" => $iFilteredTotal,\n\t\t\t\"aaData\" => array()\n\t\t);\n\t\t\n\t\tforeach($rResult as $aRow)\n\t\t{\n\t\t\t$row = array();\n\t\t\t$row[] = '<input type=\"checkbox\" value=\"'.$aRow['account_deposit_id'].'\" id=\"checkbox\" class=\"checkboxes\" >';\n\t\t\t$row[] = $aRow['account_deposit_no'];\n\t\t\t$row[] = $aRow['nama'];\n\t\t\t$row[] = '<div align=\"right\">Rp '.number_format($aRow['nominal'],0,',','.').',-</div>';\n\t\t\t$row[] = $aRow['jangka_waktu'].\" Bulan\";\n\t\t\t$row[] = '<a href=\"javascript:;\" account_deposit_id=\"'.$aRow['account_deposit_id'].'\" id=\"link-edit\">Verifikasi</a>';\n\n\t\t\t$output['aaData'][] = $row;\n\t\t}\n\t\t\n\t\techo json_encode( $output );\n\t}", "function info_rekening($nomor_rekening) {\n global $conn; //memanggil global variabel koneksi\n //melakukan select di tabel rekening dan dijoin dengan nama pemilik rekening tersebut berdasarkan nama-pengguna yang dimiliki rekening\n //saldo diperoleh dari tabel transaksi dengan rumus (total pemasukan)-(total pengeluaran) sbb:\n //pemasukan = saldo awal (kode 0) dan ditrasferi orang (kode 1 dengan nomor tujuan si rekening tersebut)\n //pengeluaran = melakukan transfer ke orang lain (kode 1 dengan rekening asal si rekening tersebut)\n $q = $conn->prepare(\"SELECT *, IFNULL((SELECT SUM(nominal) FROM transaksi WHERE rekening_asal=r.nomor_rekening AND jenis_transaksi='0'), 0) + IFNULL((SELECT SUM(nominal) FROM transaksi WHERE rekening_tujuan=r.nomor_rekening AND jenis_transaksi='1'), 0) - IFNULL((SELECT SUM(nominal) FROM transaksi WHERE rekening_asal=r.nomor_rekening AND jenis_transaksi='1'), 0)'saldo' FROM rekening r JOIN pengguna p ON r.nama_pengguna=p.nama_pengguna WHERE r.nomor_rekening='$nomor_rekening'\");\n $q->execute();\n return @$q->fetchAll()[0]; //return array 1 dimensi dari hasil tersebut/false jika tidak ada\n}", "public function transaction_datatable()\n\t\t{\n\t\t\t\n\t\t\t$list = $this->Transactions->get_datatables();\n\t\t\t$data = array();\n\t\t\t$no = $_POST['start'];\n\t\t\t\n\t\t\tforeach ($list as $transaction) {\n\t\t\t\t$no++;\n\t\t\t\t$row = array();\n\t\t\t\t\n\t\t\t\t$url = 'admin/transaction_details';\n\t\t\t\t\n\t\t\t\t$row[] = '<div class=\"checkbox checkbox-primary pull-left\"><input type=\"checkbox\" name=\"cb[]\" class=\"cb\" onclick=\"enableButton(this)\" value=\"'.$transaction->id.'\"><label for=\"cb\"></label></div><div class=\"\" style=\"margin-left:40%; margin-right:40%;\"><a data-toggle=\"modal\" href=\"#\" data-target=\"#viewTransactionModal\" class=\"link\" onclick=\"viewTransaction('.$transaction->id.',\\''.$url.'\\');\" title=\"View\">'.$transaction->order_reference.'</a></div>';\n\t\t\t\t\n\t\t\t\t//$row[] = $no;\n\t\t\t\t\n\t\t\t\t$row[] = '$'.number_format($transaction->order_amount, 2);\n\t\t\t\t\n\t\t\t\t$row[] = '$'.number_format($transaction->shipping_and_handling_costs, 2);\n\t\t\t\t\n\t\t\t\t$row[] = '$'.number_format($transaction->total_amount, 2);\n\t\t\t\t\n\t\t\t\t$user_array = $this->Users->get_user($transaction->email);\n\t\t\t\t\t\n\t\t\t\t$fullname = '';\n\t\t\t\tif($user_array){\n\t\t\t\t\tforeach($user_array as $user){\n\t\t\t\t\t\t$fullname = $user->first_name.' '.$user->last_name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//CUSTOMER\n\t\t\t\t$row[] = $fullname;\n\t\t\t\t\n\t\t\t\t$status = '';\n\t\t\t\tif($transaction->status == '0'){\n\t\t\t\t\t$status = 'Pending';\n\t\t\t\t}else{\n\t\t\t\t\t$status = 'Paid';\n\t\t\t\t}\n\t\t\t\t//STATUS\n\t\t\t\t$row[] = $status;\n\t\t\t\t\t\n\t\t\t\t$transaction_date = $transaction->created;\n\t\t\t\t\n\t\t\t\tif($transaction_date == '0000-00-00 00:00:00'){\n\t\t\t\t\t$transaction_date = 'Not Paid';\n\t\t\t\t}else{\n\t\t\t\t\t$transaction_date = date('l, F j, Y g:i a', strtotime($transaction_date));\n\t\t\t\t}\n\t\t\t\t$row[] = $transaction_date;\n\t\t\t\t\n\t\t\t\t//$row[] = '<a data-toggle=\"modal\" data-target=\"#editModal\" class=\"btn btn-info btn-xs\" onclick=\"editTransaction('.$transaction->id.');\" id=\"'.$transaction->id.'\" title=\"Edit\"><i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i></a>';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t \n\t\t\t$output = array(\n\t\t\t\t\n\t\t\t\t\"draw\" => $_POST['draw'],\n\t\t\t\t\"recordsTotal\" => $this->Transactions->count_all(),\n\t\t\t\t\"recordsFiltered\" => $this->Transactions->count_filtered(),\n\t\t\t\t\"data\" => $data,\n\t\t\t);\n\t\t\t//output to json format\n\t\t\techo json_encode($output);\n\t\t}", "public function paydata() {\n\t\t$column=['idtrans','tdate','tnotrans','a.uname as mem','a.unim','transname','tpaid','b.uname'];\n\t\t$header = $this->returncolomn($column);\n\t\tunset($header[0]);\n\t\t$header[]='Menu';\n\t\t$tmpl = array ( 'table_open' => '<table class=\"table table-hover\">' );\n\t\t$this->table->set_template($tmpl);\n\t\t$this->table->set_heading($header);\n\t\t\t\n\t\t\n\t//================== catch all value ================\n\t\t$durl= $_SERVER['QUERY_STRING'];\n\t\tparse_str($durl, $filter);\n\t\t$tempfilter=$filter;\n\t\t$addrpage = '';\n\t\t$offset= isset($tempfilter['view']) ? $tempfilter['view'] : 10;\n\t\t$perpage= isset($tempfilter['page']) ? $tempfilter['page'] : 1;\n\t\t\n\t\tif ($durl!=null){\n\t\t\tunset($filter['view']);\n\t\t\tunset($filter['id']);\n\t\t\tunset($filter['page']);\n\t\t\t$filter= array_filter($filter, function($filter) \n\t\t\t\t\t\t\t\t\t\t{return ($filter !== null && $filter !== false && $filter !== '');\n\t\t\t\t\t\t\t});\n\t\t\t//implode query address\n\t\t\t$addrpage= http_build_query($filter);\n\t\t\t$addrpage = empty($addrpage)? null:$addrpage.'&';\n\t\t\tif ((array_key_exists('column',$filter)) and (array_key_exists('search',$filter))){\n\t\t\t\t$vc = $filter['column'];\n\t\t\t\t$vq = $filter['search'];\n\t\t\t\tunset($filter['column']);\n\t\t\t\tunset($filter['search']);\n\t\t\t\t$filter[$vc]=$vq;\n\t\t\t\t$data['d']='';\n\t\t\t\t}\n\t\t\telse if ((empty($filter['view'])) and (!empty($filter))){\n\t\t\t$data['d']='d';\n\t\t\t}\n\t\t\t//count rows of data (with filter/search)\n\t\t\t$rows = $this->Mpay->countpay($filter);\n\t\t\t\n\t\t} else {\n\t\t\t//count rows of data (no filter/search)\n\t\t\t$rows = $this->Mpay->countpay();\t\n\t\t}\n\t\t//================ filter handler ================\n\t\t$fq = array('name'=>'search',\n\t\t\t\t\t\t'id'=>'search',\n\t\t\t\t\t\t'required'=>'required',\n\t\t\t\t\t\t'placeholder'=>'Search Here',\n\t\t\t\t\t\t'value'=> isset($tempfilter['search']) ? $tempfilter['search'] : null ,\n\t\t\t\t\t\t'class'=>'form-control');\n\t\t$data['inq'] = form_input($fq);\n\t\t\t$optf = array(\n\t\t\t\t\t\t'tdate' => 'Date Issued',\n\t\t\t\t\t\t'tnotrans' => 'Invoice Number',\n\t\t\t\t\t\t'tnomi' => 'Cash Given',\n\t\t\t\t\t\t'tpaid' => 'Nominal Paid',\n\t\t\t\t\t\t'uname' => 'Name',\n\t\t\t\t\t\t'unim' => 'NIM',\n\t\t\t\t\t\t'pic' => 'PIC',\n\t\t\t\t\t\t'valid_to' => 'Valid Date'\n\t\t\t\t\t\t);\n\t\t$fc = array('name'=>'column',\n\t\t\t\t\t\t'id'=>'col',\n\t\t\t\t\t\t'class'=>'form-control'\n\t\t\t\t\t);\n\t\t$data['inc'] = form_dropdown($fc,$optf,isset($tempfilter['column']) ? $tempfilter['column'] : null);\n\t\t$data['inv'] = form_hidden('view',isset($tempfilter['view']) ? $tempfilter['view'] : 10);\n\t\t\n\t\t$fbq = array(\t'id'=>'bsearch',\n\t\t\t\t\t\t'value'=>'search',\n\t\t\t\t\t\t'class'=>'btn btn-primary',\n\t\t\t\t\t\t'type'=>'submit');\n\t\t$data['bq'] = form_submit($fbq);\n\t\t\n\t\t// ============= advanced filter ===============\n\t\t$adv['Period'] = form_input(\n\t\t\t\t\t\tarray('name'=>'period',\n\t\t\t\t\t\t'id'=>'period',\n\t\t\t\t\t\t'placeholder'=>'Period',\n\t\t\t\t\t\t'value'=>isset($tempfilter['period']) ? $tempfilter['period'] : null,\n\t\t\t\t\t\t'class'=>'form-control'));\n\t\t$adv['Date Issued '] = form_input(\n\t\t\t\t\t\tarray('name'=>'tdate',\n\t\t\t\t\t\t'id'=>'sissuedon',\n\t\t\t\t\t\t'placeholder'=>'Date Issued (YYYY-MM-DD)',\n\t\t\t\t\t\t'value'=>isset($tempfilter['tdate']) ? $tempfilter['tdate'] : null,\n\t\t\t\t\t\t'class'=>'form-control'));\n\t\t\n\t\t$adv['Invoice Number'] = form_input(\n\t\t\t\t\t\tarray('name'=>'tnotrans',\n\t\t\t\t\t\t'id'=>'snotrans',\n\t\t\t\t\t\t'placeholder'=>'Invoice Number',\n\t\t\t\t\t\t'value'=>isset($tempfilter['tnotrans']) ? $tempfilter['tnotrans'] : null,\n\t\t\t\t\t\t'class'=>'form-control'));\n\t\t\n\t\t$adv['Full Name'] = form_input(\n\t\t\t\t\t\tarray('name'=>'uname',\n\t\t\t\t\t\t'id'=>'sfullname',\n\t\t\t\t\t\t'placeholder'=>'Full Name',\n\t\t\t\t\t\t'value'=>isset($tempfilter['uname']) ? $tempfilter['uname'] : null,\n\t\t\t\t\t\t'class'=>'form-control'));\n\t\t\n\t\t$adv['NIM'] = form_input(\n\t\t\t\t\t\tarray('name'=>'unim',\n\t\t\t\t\t\t'id'=>'sNIM',\n\t\t\t\t\t\t'placeholder'=>'NIM',\n\t\t\t\t\t\t'value'=>isset($tempfilter['unim']) ? $tempfilter['unim'] : null,\n\t\t\t\t\t\t'class'=>'form-control'));\n\t\t$adv['Nominal Paid'] = form_input(\n\t\t\t\t\t\tarray('name'=>'tpaid',\n\t\t\t\t\t\t'id'=>'spaid',\n\t\t\t\t\t\t'placeholder'=>'Nominal Paid',\n\t\t\t\t\t\t'value'=>isset($tempfilter['tpaid']) ? $tempfilter['tpaid'] : null,\n\t\t\t\t\t\t'class'=>'form-control'));\n\t\t\n\t\t$adv['Cash Given'] = form_input(\n\t\t\t\t\t\tarray('name'=>'tnomi',\n\t\t\t\t\t\t'id'=>'scash',\n\t\t\t\t\t\t'placeholder'=>'Cash Given',\n\t\t\t\t\t\t'value'=>isset($tempfilter['tnomi']) ? $tempfilter['tnomi'] : null,\n\t\t\t\t\t\t'class'=>'form-control'));\n\t\t\n\t\t$adv['Nominal Change'] = form_input(\n\t\t\t\t\t\tarray('name'=>'tchange',\n\t\t\t\t\t\t'id'=>'schange',\n\t\t\t\t\t\t'placeholder'=>'Nominal Change',\n\t\t\t\t\t\t'value'=>isset($tempfilter['tchange']) ? $tempfilter['tchange'] : null,\n\t\t\t\t\t\t'class'=>'form-control'));\n\t\t\t\t\t\t\n\t\t\t$opttrans = $this->Mpay->optjtrans();\n\t\t$adv['Transaction Type'] = form_dropdown(\n\t\t\t\t\t\tarray('name'=>'idjnstrans',\n\t\t\t\t\t\t'id'=>'sjnstrans',\n\t\t\t\t\t\t'placeholder'=>'Transaction Type',\n\t\t\t\t\t\t'value'=>'',\n\t\t\t\t\t\t'class'=>'form-control'),$opttrans,isset($tempfilter['idjnstrans']) ? $tempfilter['idjnstrans'] : null);\n\t\t\n\t\t$adv['Fully Paid/Not'] = form_dropdown(array(\n\t\t\t\t\t\t\t'name'=>'ulunas',\n\t\t\t\t\t\t\t'id'=>'slunas',\n\t\t\t\t\t\t\t'class'=>'form-control'),\n\t\t\t\t\t\t\tarray(''=>'No filter','1'=>'Fully Paid',\n\t\t\t\t\t\t\t'0'=>'Not Yet'),isset($tempfilter['ulunas']) ? $tempfilter['ulunas'] : null);\n\t\t$adv['PIC Name'] = form_input(\n\t\t\t\t\t\tarray('name'=>'pic',\n\t\t\t\t\t\t'id'=>'spicname',\n\t\t\t\t\t\t'placeholder'=>'PIC Name',\n\t\t\t\t\t\t'value'=>isset($tempfilter['pic']) ? $tempfilter['pic'] : null,\n\t\t\t\t\t\t'class'=>'form-control'));\n\t\t$adv['Invoice Valid Until'] = form_input(\n\t\t\t\t\t\tarray('name'=>'valid_to',\n\t\t\t\t\t\t'id'=>'svalid',\n\t\t\t\t\t\t'placeholder'=>'Date Valid (YYYY-MM-DD)',\n\t\t\t\t\t\t'value'=>isset($tempfilter['valid_to']) ? $tempfilter['valid_to'] : null,\n\t\t\t\t\t\t'class'=>'form-control'));\n\t\t\n\t\t$dtfilter = '';\n\t\t\n\t\tforeach($adv as $a=>$v){\n\t\t\t$dtfilter = $dtfilter.'<div class=\"input-group\"><label>'.$a.': </label>'.$v.'</div> ';\n\t\t}\n\t\t$data['advance'] = $dtfilter;\n\t\t\n\t\t//=============== paging handler ==========\n\t\t$data[\"urlperpage\"] = base_url().'Admin/Viewpay/paydata?view=';\n\t\t$config = array(\n\t\t\t\t'base_url' => $data['urlperpage'].$offset.$addrpage,\n\t\t\t\t'total_rows' => $rows,\n\t\t\t\t'per_page' => $offset,\n\t\t\t\t'use_page_numbers' => true,\n\t\t\t\t'page_query_string' =>true,\n\t\t\t\t'query_string_segment' =>'page',\n\t\t\t\t'num_links' => $rows,\n\t\t\t\t'cur_tag_open' => '<span class=\"disabled\"><a href=\"#\">',\n\t\t\t\t'cur_tag_close' => '<span class=\"sr-only\"></span></a></span>',\n\t\t\t\t'next_link' => 'Next',\n\t\t\t\t'prev_link' => 'Prev'\n\t\t\t\t);\n\t\t$data[\"perpage\"] = ['10','25','50','100','all'];\n\t\t$this->pagination->initialize($config);\n\t\t$str_links = $this->pagination->create_links();\n\t\t$data[\"links\"] = explode('&nbsp;',$str_links );\n\n\t\t//========== data manipulation =========\n\t\t$temp = $this->Mpay->datapay($column,$config['per_page'],$perpage,$filter);\t\n\t\t\t\tforeach($temp as $key=>$value){\n\t\t\t\t$temp[$key]['tdate']=date('d-M-Y H:i:s',strtotime($temp[$key]['tdate']));\n\t\t\t\t$temp[$key]['tpaid']=$this->convertmoney->convert($temp[$key]['tpaid']);\n\t\t\t\t//manipulation menu\n\t\t\t\t$enc = $value['idtrans'];\n\t\t\t\t$temp[$key]['menu']='<small><a href=\"'.base_url('Admin/Viewpay/paydetail?id=').$enc.'\" data-target=\"#DetailModal\" data-toggle=\"modal\" role=\"button\" alt=\"Full Data\" class=\"btn-primary btn-sm\"><i class=\"fa fa-list-alt\"></i> Details</a></small>';\n\t\t\t\tunset($temp[$key]['idtrans']);\n\t\t\t\t}\n\t\t\n\t\t$data['datalist'] = $this->table->generate($temp);\n\t\t\n\t\t//=============== Template ============\n\t\t$data['jsFiles'] = array(\n\t\t\t\t\t\t\t);\n\t\t$data['cssFiles'] = array(\n\t\t\t\t\t\t\t); \n\t\t// =============== view handler ============\n\t\t$data['title']=\"Payment Data\";\n\t\t$data['topbar'] = $this->load->view('dashboard/topbar', NULL, TRUE);\n\t\t$data['sidebar'] = $this->load->view('dashboard/admin/sidebar', NULL, TRUE);\n\t\t$data['content'] = $this->load->view('dashboard/admin/pay/paylist', $data, TRUE);\n\t\t$this->load->view ('template/main', $data);\n\t}", "public function kasirtoday($id)\n {\n$tunda = 'Tunda';\n $payment = 'Payment';\n $tglkasir = Transaksiheader::where('kasir', $id)->where('status', '!=', 'Hold')->where('tanggal', $today)->orderBy('id','desc')->paginate(8);\n\n\n echo '<table id=\"table\" class=\"display dataTable table table-hover\" cellspacing=\"0\" style=\"margin-top:0px; margin-left:0px;width:1300px;position:relative;background:white;\">';\n echo '<thead>';\n echo '<tr style=\"background:#3498db; color: white; font-size:16px;\">';\n echo '<td align=\"center\">No Ref</td>';\n echo '<td align=\"center\">Tanggal</td>';\n echo '<td align=\"center\">Jumlah</td>';\n echo '<td align=\"center\">Type Pembayaran</td>';\n echo '</tr>';\n echo '</thead>';\n echo '<tbody style=\"overflow:auto; height: 50px;\">';\n foreach ($tglkasir as $value) {\n $jml = $value->jumlah;\n echo '<tr style=\"background-color: white; font-size:18px; color:black;\">';\n echo '<td align=\"center\">'.$value->noref.'</td>';\n echo '<td align=\"center\">'.$value->tanggal.'</td>';\n echo '<td align=\"center\"> Rp. '.number_format($jml, 2, ',', '.').'</td>';\n echo '<td align=\"center\">'.$value->type_pembayaran.'</td>';\n echo '</tr>';\n }\n echo '</tbody>';\n echo '</table> ';\n\n }", "public function paydetail(){\n\t\t$col = ['tnotrans','tdate','valid_to','transname','a.uname as mem','a.unim','tnomi','tpaid','tchange','b.uname'];\n\t\t$id = $this->input->get('id');\n\t\t$dbres = $this->Mpay->detailpay($col,$id);\n\t\t\n\t\t//set row title\n\t\t$row = $this->returncolomn($col);\n\t\t$col[4]='mem';\n\t\t$col[5]='unim';\n\t\t$col[9]='uname';\n\t\t\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\tarray_unshift($row,'QR Code'); //set qr label \n\t\tarray_unshift($col,'QR Code'); //set qr label \n\t\t$notrans = $dbres[0]['tnotrans'];\n\t\t$dbres[0]['QR Code']= '<img src=\"'.base_url('upload/qr/'.$notrans).'.png\" class=\"img-thumbnail\" style=\"height:100px;\"/>'; //set qr data \t\t\n\t\t\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\"=>'<b>'.$key.'</b>',\n\t\t\t\t\"dtval\"=>' : '.$dbres[0][$col[$a]]\n\t\t\t\t);\n\t\t\t\t\n\t\t\tif (($key=='Nominal Given') or ($key=='Nominal Paid') or ($key=='Nominal Change')){\n\t\t\t\t\t$dtable[$a] = array(\n\t\t\t\t\t\t\"dtcol\"=>'<b>'.$key.'</b>',\n\t\t\t\t\t\t\"dtval\"=>' : '.$this->convertmoney->convert($dbres[0][$col[$a]])\n\t\t\t\t\t\t);\n\t\t\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/admin/pay/paydetail', $data);\n\t\t\n\t}", "public function tabel_pengantaran(){\r\n $result = $this->darat->get_tabel_transaksi();\r\n $data = array();\r\n $no = 1;\r\n\r\n if (is_array($result) || is_object($result)){\r\n foreach ($result as $row){\r\n $aksi = \"\";\r\n \r\n if($row->waktu_mulai_pengantaran == NULL){\r\n $aksi = '&nbsp;<a class=\"btn btn-sm btn-info glyphicon glyphicon-road\" href=\"javascript:void(0)\" title=\"Pengantaran\" onclick=\"pengantaran('.\"'\".$row->id_transaksi.\"'\".');\"></a>';\r\n }else if($row->waktu_selesai_pengantaran != NULL){\r\n $aksi = \"\";\r\n }else{\r\n $aksi = '&nbsp;<a class=\"btn btn-sm btn-primary glyphicon glyphicon-ok\" href=\"javascript:void(0)\" title=\"Realisasi\" onclick=\"realisasi('.\"'\".$row->id_transaksi.\"'\".')\"></a>';\r\n }\r\n $format_tgl = date('d-m-Y H:i', strtotime($row->tgl_transaksi ));\r\n $format_tgl_pengantaran = date('d-m-Y H:i', strtotime($row->tgl_perm_pengantaran ));\r\n \r\n if($row->status_delivery == 1){\r\n $status_pengantaran = \"Sudah Diantar\";\r\n }else if($row->waktu_mulai_pengantaran != NULL){\r\n $status_pengantaran = \"Sedang Dalam Pengantaran\";\r\n }else{\r\n $status_pengantaran = \"Belum Diantar\";\r\n }\r\n \r\n if(($row->status_pembayaran == 1 || $row->status_invoice == 1) && $row->status_delivery == 0 && $row->batal_nota == 0 && $row->batal_kwitansi == 0){\r\n $data[] = array(\r\n 'no' => $no,\r\n 'nama' => $row->nama_pemohon,\r\n 'alamat' => $row->alamat,\r\n 'no_telp' => $row->no_telp,\r\n 'tanggal' => $format_tgl,\r\n 'tanggal_permintaan' => $format_tgl_pengantaran,\r\n 'total_pengisian' => $row->total_permintaan,\r\n 'status_pengantaran' => $status_pengantaran,\r\n 'aksi' => $aksi\r\n );\r\n $no++;\r\n }\r\n }\r\n }\r\n \r\n echo json_encode($data);\r\n }", "function transaksi_post() {\n \t$response['post'] = $this->post();\n \ttry {\n\t\t\t$tglJam = $this->post('tgl_jam');\n\t $dispenser = $this->post('dispenser');\n\t $nozle = $this->post('nozle');\n\t $bbm = $this->post('bbm');\n\t $liter = $this->post('liter');\n\t $harga = $this->post('harga');\n\t $totalHarga = $this->post('total_harga');\n\t $idKartu = $this->post('id_kartu');\n\t $idRing = $this->post('id_ring');\n\t $odometer = $this->post('odometer');\n\t $ctr = $this->post('ctr');\n\t $idSpbu = $this->post('idspbu');\n\t $konsumenIdJenis = $this->post('konsumen_id_jenis');\n\t $bayarIdJenis = $this->post('bayar_id_jenis');\n\t $totalizer = $this->post('totalizer');\n\t $type_procedure = $this->post('type_procedure');\n\t \n\t $existinDb = $this->get_model->getTTransaksi($idSpbu, strval(strtotime($tglJam)));\n\t if ($existinDb == NULL || $existinDb[0] == NULL){\n\t\t\t\t$response['insert_result'] = $this->insert_model->insertTTransaksi($tglJam, $dispenser, $nozle, $bbm, $liter, $harga, $totalHarga, \n\t\t\t\t\t$idKartu, $idRing, $odometer, $ctr, $idSpbu, $konsumenIdJenis, $bayarIdJenis, $totalizer, $type_procedure);\n\t\t\t\t\n\t\t\t\tif ($response['insert_result'] == 1){\n\t\t\t\t\t// transaksi sudah tercatat di database\n\t\t\t\t\t$ring = $this->get_model->getMRing($idRing);\n\t\t\t\t\tif ($ring != NULL){\n\t\t\t\t\t\t$this->update_model->updateKuotaRing($idRing, $ring[0]['sisa_quota'] - $liter);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$this->response($response, 200);\n\t\t\t} else {\n\t\t\t\t$this->response(array( 'status' => \"ERROR INSERT :: Record with the same spbu and datetime already existed\" ), 406);\n\t\t\t}\n\t\t} catch (Exception $ex) {\n\t\t\t$this->response(array( 'status' => \"Caught in exception :: \" . $ex->getMessage() ), 406);\n\t\t}\n }", "public function jurnal_update_tanggal_transaksi()\n\t{\n\t\t$trx_gl_id = $this->input->post('trx_gl_id');\n\t\t$trx_date = $this->input->post('trx_date');\n\t\t$voucher_date = $this->input->post('voucher_date');\n\t\t$jurnal_trx_type = $this->input->post('jurnal_trx_type');\n\t\t$jurnal_trx_id = $this->input->post('jurnal_trx_id');\n\n\t\t// converting date from fromat id(dd/mm/yyyy) to en(yyyy-mm-dd)\n\t\t$trx_date = $this->datepicker_convert(true,$trx_date,'/');\n\t\t$voucher_date = $this->datepicker_convert(true,$voucher_date,'/');\n\n\t\t/*\n\t\t| get trx detail id di tabungan by jurnal trx id\n\t\t| get trx detail id di pembiayaan by jurnal trx id\n\t\t\n\t\tif($jurnal_trx_type=='1'){\n\t\t\t$trx_detail_id=$this->model_transaction->get_trx_detail_id_di_tabungan_by_jurnal_trx_id($jurnal_trx_id);\n\t\t}\n\t\tif($jurnal_trx_type=='3'){\n\t\t\t$trx_detail_id=$this->model_transaction->get_trx_detail_id_di_pembiayaan_by_jurnal_trx_id($jurnal_trx_id);\n\t\t}\n\t\t*/\n\t\t\n\t\t$data = array('trx_date'=>$trx_date,'voucher_date'=>$voucher_date);\n\t\t$param = array('trx_gl_id'=>$trx_gl_id);\n\n\t\t/*\n\t\t$data_tabungan = array('trx_date'=>$voucher_date);\n\t\t$param_tabungan = array('trx_account_saving_id'=>$jurnal_trx_id);\n\n\t\t$data_pembiayaan = array('trx_date'=>$voucher_date);\n\t\t$param_pembiayaan = array('trx_account_financing_id'=>$jurnal_trx_id);\n\n\t\t$data_trx_detail = array('trx_date'=>$voucher_date);\n\t\t$param_trx_detail = array('trx_detail_id'=>$trx_detail_id);\n\t\t*/\n\n\t\t$this->db->trans_begin();\n\t\t$this->model_transaction->update_trx_gl($data,$param);\n\t\t/*\n\t\t| execute update tabungan\n\t\t| execute update pembiayaan\n\t\t\n\t\tif($jurnal_trx_type=='1') {\n\t\t\t$this->model_transaction->update_trx_account_saving($data_tabungan,$param_tabungan);\n\t\t\tif($trx_detail_id!=false){\n\t\t\t\t$this->model_transaction->update_trx_detail($data_trx_detail,$param_trx_detail);\n\t\t\t}\n\t\t}\n\t\telse if($jurnal_trx_type=='3') {\n\t\t\t$this->model_transaction->update_trx_account_financing($data_pembiayaan,$param_pembiayaan); //pembiayaan\n\t\t\tif($trx_detail_id!=false){\n\t\t\t\t$this->model_transaction->update_trx_detail($data_trx_detail,$param_trx_detail);\n\t\t\t}\n\t\t}\n\t\t*/\n\t\tif($this->db->trans_status()===true){\n\t\t\t$this->db->trans_commit();\n\t\t\t$return = array('success'=>true);\n\t\t}else{\n\t\t\t$this->db->trans_rollback();\n\t\t\t$return = array('success'=>false);\n\t\t}\n\t\techo json_encode($return);\n\t}", "public function datatable_penarikan_tunai_tabungan()\n\t{\n\t\t$aColumns = array( 'c.cif_no','c.nama','a.account_saving_no','a.amount','a.trx_date','');\n\t\t\t\t\n\t\t/* \n\t\t * Paging\n\t\t */\n\t\t$sLimit = \"\";\n\t\tif ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )\n\t\t{\n\t\t\t$sLimit = \" OFFSET \".intval( $_GET['iDisplayStart'] ).\" LIMIT \".\n\t\t\t\tintval( $_GET['iDisplayLength'] );\n\t\t}\n\t\t\n\t\t/*\n\t\t * Ordering\n\t\t */\n\t\t$sOrder = \"\";\n\t\tif ( isset( $_GET['iSortCol_0'] ) )\n\t\t{\n\t\t\t$sOrder = \"ORDER BY \";\n\t\t\tfor ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == \"true\" )\n\t\t\t\t{\n\t\t\t\t\t$sOrder .= \"\".$aColumns[ intval( $_GET['iSortCol_'.$i] ) ].\" \".\n\t\t\t\t\t\t($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc') .\", \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$sOrder = substr_replace( $sOrder, \"\", -2 );\n\t\t\tif ( $sOrder == \"ORDER BY\" )\n\t\t\t{\n\t\t\t\t$sOrder = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* \n\t\t * Filtering\n\t\t */\n\t\t$sWhere = \"\";\n\t\tif ( isset($_GET['sSearch']) && $_GET['sSearch'] != \"\" )\n\t\t{\n\t\t\t$sWhere = \"AND (\";\n\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower( $_GET['sSearch'] ).\"%' OR \";\n\t\t\t}\n\t\t\t$sWhere = substr_replace( $sWhere, \"\", -3 );\n\t\t\t$sWhere .= ')';\n\t\t}\n\t\t\n\t\t/* Individual column filtering */\n\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t{\n\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t{\n\t\t\t\tif ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" && $_GET['sSearch_'.$i] != '' )\n\t\t\t\t{\n\t\t\t\t\tif ( $sWhere == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$sWhere = \"AND \";\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$sWhere .= \" AND \";\n\t\t\t\t\t}\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower($_GET['sSearch_'.$i]).\"%' \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$rResult \t\t\t= $this->model_transaction->datatable_penarikan_tunai_tabungan($sWhere,$sOrder,$sLimit); // query get data to view\n\t\t$rResultFilterTotal = $this->model_transaction->datatable_penarikan_tunai_tabungan($sWhere); // get number of filtered data\n\t\t$iFilteredTotal \t= count($rResultFilterTotal); \n\t\t$rResultTotal \t\t= $this->model_transaction->datatable_penarikan_tunai_tabungan(); // get number of all data\n\t\t$iTotal \t\t\t= count($rResultTotal);\t\n\t\t\n\t\t/*\n\t\t * Output\n\t\t */\n\t\t$output = array(\n\t\t\t\"sEcho\" => intval($_GET['sEcho']),\n\t\t\t\"iTotalRecords\" => $iTotal,\n\t\t\t\"iTotalDisplayRecords\" => $iFilteredTotal,\n\t\t\t\"aaData\" => array()\n\t\t);\n\t\t\n\t\tforeach($rResult as $aRow)\n\t\t{\n\t\t\t$row = array();\n\t\t\t$row[] = $aRow['cif_no'];\n\t\t\t$row[] = $aRow['nama'];\n\t\t\t$row[] = $aRow['account_saving_no'];\n\t\t\t$row[] = '<div align=\"right\">Rp '.number_format($aRow['amount'],0,',','.').',-</div>';\n\t\t\t$row[] = $this->format_date_detail($aRow['trx_date'],'id',false,'/');\n\t\t\t$row[] = '<div align=\"center\"><a href=\"javascript:;\" class=\"btn mini red\" trx_detail_id=\"'.$aRow['trx_detail_id'].'\" nama=\"'.$aRow['nama'].'\" account_saving_no=\"'.$aRow['account_saving_no'].'\" id=\"link-delete\">Delete</a></div>';\n\n\t\t\t$output['aaData'][] = $row;\n\t\t}\n\t\t\n\t\techo json_encode( $output );\n\t}", "public function datatable_trx_setoran_pokok_setup()\n\t{\n\t\t$aColumns = array( '','mfi_cif.cif_no','mfi_cif.nama','setor_tunai','setor_tabungan_wajib','setor_tabungan_kelompok','setor_tabungan_sukarela','trx_date','');\n\t\t\t\t\n\t\t/* \n\t\t * Paging\n\t\t */\n\t\t$sLimit = \"\";\n\t\tif ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )\n\t\t{\n\t\t\t$sLimit = \" OFFSET \".intval( $_GET['iDisplayStart'] ).\" LIMIT \".\n\t\t\t\tintval( $_GET['iDisplayLength'] );\n\t\t}\n\t\t\n\t\t/*\n\t\t * Ordering\n\t\t */\n\t\t$sOrder = \"\";\n\t\tif ( isset( $_GET['iSortCol_0'] ) )\n\t\t{\n\t\t\t$sOrder = \"ORDER BY \";\n\t\t\tfor ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == \"true\" )\n\t\t\t\t{\n\t\t\t\t\t$sOrder .= \"\".$aColumns[ intval( $_GET['iSortCol_'.$i] ) ].\" \".\n\t\t\t\t\t\t($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc') .\", \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$sOrder = substr_replace( $sOrder, \"\", -2 );\n\t\t\tif ( $sOrder == \"ORDER BY\" )\n\t\t\t{\n\t\t\t\t$sOrder = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* \n\t\t * Filtering\n\t\t */\n\t\t$sWhere = \"\";\n\t\tif ( isset($_GET['sSearch']) && $_GET['sSearch'] != \"\" )\n\t\t{\n\t\t\t$sWhere = \"WHERE (\";\n\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower( $_GET['sSearch'] ).\"%' OR \";\n\t\t\t}\n\t\t\t$sWhere = substr_replace( $sWhere, \"\", -3 );\n\t\t\t$sWhere .= ')';\n\t\t}\n\t\t\n\t\t/* Individual column filtering */\n\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t{\n\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t{\n\t\t\t\tif ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" && $_GET['sSearch_'.$i] != '' )\n\t\t\t\t{\n\t\t\t\t\tif ( $sWhere == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$sWhere = \"WHERE \";\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$sWhere .= \" AND \";\n\t\t\t\t\t}\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower($_GET['sSearch_'.$i]).\"%' \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$rResult \t\t\t= $this->model_transaction->datatable_trx_setoran_pokok_setup($sWhere,$sOrder,$sLimit); // query get data to view\n\t\t$rResultFilterTotal = $this->model_transaction->datatable_trx_setoran_pokok_setup($sWhere); // get number of filtered data\n\t\t$iFilteredTotal \t= count($rResultFilterTotal); \n\t\t$rResultTotal \t\t= $this->model_transaction->datatable_trx_setoran_pokok_setup(); // get number of all data\n\t\t$iTotal \t\t\t= count($rResultTotal);\t\n\t\t\n\t\t/*\n\t\t * Output\n\t\t */\n\t\t$output = array(\n\t\t\t\"sEcho\" => intval($_GET['sEcho']),\n\t\t\t\"iTotalRecords\" => $iTotal,\n\t\t\t\"iTotalDisplayRecords\" => $iFilteredTotal,\n\t\t\t\"aaData\" => array()\n\t\t);\n\t\t\n\t\tforeach($rResult as $aRow)\n\t\t{\n\t\t\t$row = array();\n\t\t\t$row[] = '<input type=\"checkbox\" value=\"'.$aRow['trx_id'].'\" id=\"checkbox\" class=\"checkboxes\" >';\n\t\t\t$row[] = $aRow['cif_no'];\n\t\t\t$row[] = $aRow['nama'];\n\t\t\t$row[] = '<div align=\"right\">Rp '.number_format($aRow['setor_tunai'],0,',','.').',-</div>';\n\t\t\t$row[] = $this->format_date_detail($aRow['trx_date'],'id',false,'/');\n\t\t\t// $row[] = '<a href=\"javascript:;\" trx_id=\"'.$aRow['trx_id'].'\" id=\"link-edit\">Edit</a>';\n\n\t\t\t$output['aaData'][] = $row;\n\t\t}\n\t\t\n\t\techo json_encode( $output );\n\t}", "public function datatable_pencairan_deposito_setup()\n\t{\n\t\t/* Array of database columns which should be read and sent back to DataTables. Use a space where\n\t\t * you want to insert a non-database field (for example a counter or static image)\n\t\t */\n\t\t$aColumns = array('','mfi_account_deposit.account_deposit_no','mfi_cif.nama','mfi_account_deposit.nominal','mfi_account_deposit.jangka_waktu','');\n\t\t$cm_code = @$_GET['cm_code'];\n\t\t/* \n\t\t * Paging\n\t\t */\n\t\t$sLimit = \"\";\n\t\tif ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )\n\t\t{\n\t\t\t$sLimit = \" OFFSET \".intval( $_GET['iDisplayStart'] ).\" LIMIT \".\n\t\t\t\tintval( $_GET['iDisplayLength'] );\n\t\t}\n\t\t\n\t\t/*\n\t\t * Ordering\n\t\t */\n\t\t$sOrder = \"\";\n\t\tif ( isset( $_GET['iSortCol_0'] ) )\n\t\t{\n\t\t\t$sOrder = \"ORDER BY \";\n\t\t\tfor ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == \"true\" )\n\t\t\t\t{\n\t\t\t\t\t$sOrder .= \"\".$aColumns[ intval( $_GET['iSortCol_'.$i] ) ].\" \".\n\t\t\t\t\t\t($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc') .\", \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$sOrder = substr_replace( $sOrder, \"\", -2 );\n\t\t\tif ( $sOrder == \"ORDER BY\" )\n\t\t\t{\n\t\t\t\t$sOrder = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* \n\t\t * Filtering\n\t\t */\n\t\t$sWhere = \"\";\n\t\tif ( isset($_GET['sSearch']) && $_GET['sSearch'] != \"\" )\n\t\t{\n\t\t\t$sWhere = \"WHERE (\";\n\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower( $_GET['sSearch'] ).\"%' OR \";\n\t\t\t}\n\t\t\t$sWhere = substr_replace( $sWhere, \"\", -3 );\n\t\t\t$sWhere .= ')';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sWhere = \"where mfi_account_deposit_break.status_break = '0'\";\n\t\t}\n\n\t\tif($sWhere==\"\"){\n\t\t\t$sWhere = \" WHERE mfi_cif.cm_code = '\".$cm_code.\"' \";\n\t\t}else{\n\t\t\t$sWhere .= \" AND mfi_cif.cm_code = '\".$cm_code.\"' \";\n\t\t}\n\t\t\n\t\t/* Individual column filtering */\n\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t{\n\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t{\n\t\t\t\tif ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" && $_GET['sSearch_'.$i] != '' )\n\t\t\t\t{\n\t\t\t\t\tif ( $sWhere == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$sWhere = \"WHERE \";\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$sWhere .= \" AND \";\n\t\t\t\t\t}\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower($_GET['sSearch_'.$i]).\"%' \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$rResult \t\t\t= $this->model_transaction->datatable_pencairan_deposito_setup($sWhere,$sOrder,$sLimit); // query get data to view\n\t\t$rResultFilterTotal = $this->model_transaction->datatable_pencairan_deposito_setup($sWhere); // get number of filtered data\n\t\t$iFilteredTotal \t= count($rResultFilterTotal); \n\t\t$rResultTotal \t\t= $this->model_transaction->datatable_pencairan_deposito_setup(); // get number of all data\n\t\t$iTotal \t\t\t= count($rResultTotal);\t\n\t\t\n\t\t/*\n\t\t * Output\n\t\t */\n\t\t$output = array(\n\t\t\t\"sEcho\" => intval($_GET['sEcho']),\n\t\t\t\"iTotalRecords\" => $iTotal,\n\t\t\t\"iTotalDisplayRecords\" => $iFilteredTotal,\n\t\t\t\"aaData\" => array()\n\t\t);\n\t\t\n\t\tforeach($rResult as $aRow)\n\t\t{\n\t\t\t$row = array();\n\t\t\t$row[] = '<input type=\"checkbox\" value=\"'.$aRow['account_deposit_break_id'].'\" id=\"checkbox\" class=\"checkboxes\" >';\n\t\t\t$row[] = $aRow['account_deposit_no'];\n\t\t\t$row[] = $aRow['nama'];\n\t\t\t$row[] = $aRow['nominal'];\n\t\t\t$row[] = $aRow['jangka_waktu'];\n\t\t\t$row[] = '<a href=\"javascript:;\" account_deposit_break_id=\"'.$aRow['account_deposit_break_id'].'\" id=\"link-edit\">Verifikasi</a>';\n\n\t\t\t$output['aaData'][] = $row;\n\t\t}\n\t\t\n\t\techo json_encode( $output );\n\t}", "function confirm($id=\"\"){\r\n \t\t\t//$bitcoin_isvalid = $bitcoin->listtransactions();\r\n\r\n \t\t\t/*$bal=$bitcoin->getbalance();*/\r\n\r\n \r\n\r\n\t\t$id=insep_decode($id);\r\n\t\t$condition=array(\"transactionId\"=>$id,\"status\"=>\"Pending\");\r\n\t\t$transdata=$this->CommonModel->getTableData(\"tansation\",$condition);\r\n\t\tif($transdata->num_rows() >0){\t\t\r\n\r\n\r\n if($this->input->post(\"witdraw_submit\")){ \r\n\r\n\r\n \t\t$currecncy=$transdata->row()->currency;\r\n \t \t$currency=$transdata->row()->currency;\r\n \r\n\r\n \tif($currency==\"BTC\"){\r\n\r\n \t\t$txn_id=$this->transfer_coin(\"BTC\",$transdata);\r\n\r\n\r\n \t}else if($currency==\"LTC\"){ \r\n\r\n \t\t$txn_id=$this->transfer_coin(\"LTC\",$transdata);\r\n\r\n \t}else if($currency==\"DGB\"){ \r\n\r\n \t\t$txn_id=$this->transfer_coin(\"DGB\",$transdata);\r\n\r\n \t}else if($currency==\"DASH\"){ \r\n\r\n \t\t$txn_id=$this->transfer_coin(\"DASH\",$transdata);\r\n\r\n \t}else if($currency==\"ETH\"){\r\n \t\t$txn_id=$this->transfer_eth(\"ETH\",$transdata);\r\n\r\n \t}else if($currency==\"XRP\"){\r\n\r\n \t\t$txn_id=$this->transfer_xrp($transdata);\r\n\r\n \t} else if($currency==\"BTG\"){\r\n\r\n \t\t$txn_id=$this->transfer_coin(\"BTG\",$transdata);\r\n\r\n \t}\r\n\t\telse if($currency==\"BCH\"){\r\n\r\n \t\t$txn_id=$this->transfer_coin(\"BCH\",$transdata);\r\n\r\n \t}\r\n\t\telse if($currency==\"ETC\"){\r\n\r\n \t\t$txn_id=$this->transfer_etc(\"ETC\",$transdata);\r\n\r\n \t}else if($currency==\"XMR\"){\r\n\r\n \t \t$txn_id=$this->transfer_xmr($transdata);\r\n\r\n \t}\r\n\t\t \t\r\n \t\t$status=\"Success\";\r\n\r\n \t\tif($status==\"Success\"){\r\n\r\n\t\t\t\t$transdata=$transdata->row();\r\n\t\t\t\t$currecncy=$transdata->currency;\r\n\t\t\t\t$amount=$transdata->total_amount;\r\n\t\t\t\t$update[\"status\"]=\"Completed\";\r\n\t\t\t\t$update[\"transation_hash\"]=$txn_id;\r\n\t\t\t\t$this->CommonModel->updateTableData(\"tansation\",$update,$condition);\r\n\t\t\t\t$email_data=getEmailTeamplete(10);\r\n\t\t\t\t$subject=$email_data->subject;\r\n\t\t\t\t$template=$email_data->template;\r\n\t\t\t\t$site_data=site_settings();\r\n\t\t\t\t$sitename=$site_data->site_name;\r\n\t\t\t\t$trans_data=$transdata;\r\n\t\t \t $trans_data->total_amount;\t\t\t\t\t\r\n\t\t\t\t\t$data=array(\r\n\t\t\t\t\t\t\"###TRANSID###\"=>$trans_data->transactionId,\t\t\t\r\n\t\t\t\t\t\t\"###AMOUNT###\"=>$trans_data->total_amount.$trans_data->currency,\r\n\t\t\t\t\t\t\"###LOGOIMG###\"=> base_url().\"assets/frontend/images/mail_logo.png\",\r\n\t\t\t\t\t\t\"###FBIMG###\"=> base_url().\"assets/frontend/images/facebook.png\",\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\"###STATUS###\"=> \"Completed\",\t\t\r\n\t\t\t\t\t);\r\n\t\t\t\t\t$data[\"###LOGOIMG###\"]=getSiteLogo();\r\n\t\t\t\t\t$data[\"###EMAILIMG###\"]= base_url().\"assets/frontend/images/email_send.png\";\r\n\t\t\t\t\t$data[\"###FBIMG###\"]= base_url().\"assets/frontend/images/facebook.png\";\t\t\t\r\n\t\t\t\t\t$data[\"###TWIMG###\"]= base_url().\"assets/frontend/images/twitter.png\";\r\n\t\t\t\t\t$data[\"###GPIMG###\"]= base_url().\"assets/frontend/images/gplus.png\";\r\n\t\t\t\t\t$data[\"###LEIMG###\"]= base_url().\"assets/frontend/images/linkedin.png\";\t\r\n\t\t\t\t\t$data[\"###HDIMG###\"]= base_url().\"assets/frontend/images/email.png\";\r\n\t\t\t\t\t$data[\"###FBLINK###\"]= $site_data->facebooklink;\t\t\t\t\r\n\t\t\t\t\t$data[\"###TWLINK###\"]= $site_data->twitterlink;\t\r\n\t\t\t\t\t$data[\"###GPLINK###\"]= $site_data->googlelink;\r\n\t\t\t\t\t$data[\"###LELINK###\"]= $site_data->linkedinlink;\r\n\t\t\t\t$email=get_user_email($trans_data->user_id);\r\n\t\t\t\t $message=strtr($template,$data);\t\t\r\n\t\t\t\tsend_mail($email,$subject,$message);\r\n\t\t\t\t$this->session->set_flashdata(\"success\",\"Withdraw request Completed successfully\");\t\t\r\n\t\t\t\tredirect(\"BoAdmin_Transation/withdraw\");\r\n\r\n\t\t\t}else{\r\n\r\n\r\n\t\t\t\t$this->session->set_flashdata(\"error\",\"Withdraw request error, Tray again after some time\");\t\t\r\n\r\n\t\t\t\tredirect(\"BoAdmin_Transation/withdraw\");\r\n\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\r\n\t\t\t$transdata=$transdata->row();\r\n\t\t\t$user_id=$transdata->user_id;\r\n\t\t\t$condition=array(\"user_id\"=>$user_id);\r\n\t\t\t$userdata=$this->CommonModel->getTableData(\"userdetails\",$condition)->row();\t\r\n\t\t\t$data['withdraw']=$transdata;\t\r\n\r\n\t\t\t $data['user_name']=$userdata->username;\t\t\r\n\t\t\t\r\n\t\t\t$this->load->view(\"admin/transation/withdaw_request_details\",$data);\t\r\n\r\n\t\t}\r\n\r\n\r\n\t\t}else{\r\n\r\n\t\t\t$this->session->set_flashdata(\"error\",\"Invalid link or already used link\");\t\t\r\n\t\r\n\t\t\tredirect(\"BoAdmin_Transation/withdraw\");\r\n\r\n\t\t}\r\n\r\n\r\n\r\n\r\n\r\n\t}", "public function cetak_bku($id_saldo)\n {\n // FROM tb_transaksi JOIN tb_saldoawal ON tb_saldoawal.id_saldo = tb_transaksi.id_saldo \n // JOIN tb_jnspengeluaran ON tb_transaksi.kdjnspengeluaran = tb_jnspengeluaran.kdjnspengeluaran\n // JOIN tb_pajak ON tb_transaksi.notransaksi = tb_pajak.notransaksi\n // WHERE tb_saldoawal.id_saldo = $id_saldo \")->result();\n\n // $data['jumtot'] = $this->db->query(\" SELECT SUM(saldomasuk) as tot FROM tb_saldoawal \")->result();\n // $data['jumkel'] = $this->db->query(\" SELECT SUM(tb_transaksi.jumlah) as totkel \n // FROM tb_saldoawal JOIN tb_transaksi ON tb_saldoawal.id_saldo = tb_transaksi.id_saldo \")->result();\n\n // $data['idsaldo'] = $this->db->query(\" SELECT * FROM tb_saldoawal WHERE id_saldo = $id_saldo LIMIT 1\")->result();\n\n $data['laporan'] = $this->db->query(\" SELECT tb_transaksi.kode_rekening, tb_jnspengeluaran.uraian, tb_transaksi.tgltransaksi, tb_transaksi.notransaksi, tb_transaksi.jumlah, tb_transaksi.carapembayaran, tb_transaksi.namatoko, tb_transaksi.alamattoko, tb_pajak.ppn, tb_pajak.pph21, tb_pajak.pph22, tb_pajak.pph23, tb_pajak.pphlain\n FROM tb_transaksi JOIN tb_saldoawal ON tb_saldoawal.id_saldo = tb_transaksi.id_saldo \n JOIN tb_jnspengeluaran ON tb_transaksi.kdjnspengeluaran = tb_jnspengeluaran.kdjnspengeluaran\n JOIN tb_pajak ON tb_transaksi.notransaksi = tb_pajak.notransaksi\n WHERE tb_saldoawal.id_saldo = $id_saldo \")->result();\n\n $data['idsaldo'] = $this->db->query(\" SELECT * FROM tb_saldoawal WHERE id_saldo = $id_saldo LIMIT 1\")->result();\n $data['jumsisa'] = $this->db->query(\" SELECT SUM(jumlahsaldosisa) as jumsis FROM tb_saldoawal WHERE id_saldo = $id_saldo\")->result();\n $data['jumtunai'] = $this->db->query(\" SELECT SUM(tb_transaksi.jumlah) as tunai FROM tb_transaksi JOIN tb_jnspengeluaran ON tb_transaksi.kdjnspengeluaran = tb_jnspengeluaran.kdjnspengeluaran WHERE tb_transaksi.id_saldo = $id_saldo AND tb_transaksi.carapembayaran = 'Tunai' \")->result();\n $data['jumnontunai'] = $this->db->query(\" SELECT SUM(tb_transaksi.jumlah) as nontunai FROM tb_transaksi JOIN tb_jnspengeluaran ON tb_transaksi.kdjnspengeluaran = tb_jnspengeluaran.kdjnspengeluaran WHERE tb_transaksi.id_saldo = $id_saldo AND tb_transaksi.carapembayaran = 'Non-Tunai' \")->result();\n\n $data['jumppn'] = $this->db->query(\" SELECT SUM(ppn) as ppn FROM tb_pajak WHERE id_saldo = $id_saldo \")->result();\n $data['jumpph21'] = $this->db->query(\" SELECT SUM(pph21) as pph21 FROM tb_pajak WHERE id_saldo = $id_saldo \")->result();\n $data['jumpph22'] = $this->db->query(\" SELECT SUM(pph22) as pph22 FROM tb_pajak WHERE id_saldo = $id_saldo \")->result();\n $data['jumpph23'] = $this->db->query(\" SELECT SUM(pph23) as pph23 FROM tb_pajak WHERE id_saldo = $id_saldo \")->result();\n $data['jumpphlain'] = $this->db->query(\" SELECT SUM(pphlain) as pphlain FROM tb_pajak WHERE id_saldo = $id_saldo \")->result();\n\n $data['bendahara'] = $this->db->query(\" SELECT * FROM tb_user WHERE hakakses = 'bendahara' LIMIT 1 \")->result();\n$data['pembantu'] = $this->db->query(\"SELECT * FROM tb_user WHERE hakakses = 'pembantu' LIMIT 1 \")->result();\n $data['kadin'] = $this->db->query(\"SELECT * FROM tb_user WHERE hakakses = 'kadin' LIMIT 1\")->result(); \n\n\n $this->load->view('bendahara/cetak_laporan', $data);\n }", "public function datatable_setor_tunai_tabungan()\n\t{\n\t\t$aColumns = array( 'c.cif_no','c.nama','a.account_saving_no','a.amount','a.trx_date','');\n\t\t\t\t\n\t\t/* \n\t\t * Paging\n\t\t */\n\t\t$sLimit = \"\";\n\t\tif ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )\n\t\t{\n\t\t\t$sLimit = \" OFFSET \".intval( $_GET['iDisplayStart'] ).\" LIMIT \".\n\t\t\t\tintval( $_GET['iDisplayLength'] );\n\t\t}\n\t\t\n\t\t/*\n\t\t * Ordering\n\t\t */\n\t\t$sOrder = \"\";\n\t\tif ( isset( $_GET['iSortCol_0'] ) )\n\t\t{\n\t\t\t$sOrder = \"ORDER BY \";\n\t\t\tfor ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == \"true\" )\n\t\t\t\t{\n\t\t\t\t\t$sOrder .= \"\".$aColumns[ intval( $_GET['iSortCol_'.$i] ) ].\" \".\n\t\t\t\t\t\t($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc') .\", \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$sOrder = substr_replace( $sOrder, \"\", -2 );\n\t\t\tif ( $sOrder == \"ORDER BY\" )\n\t\t\t{\n\t\t\t\t$sOrder = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* \n\t\t * Filtering\n\t\t */\n\t\t$sWhere = \"\";\n\t\tif ( isset($_GET['sSearch']) && $_GET['sSearch'] != \"\" )\n\t\t{\n\t\t\t$sWhere = \"AND (\";\n\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower( $_GET['sSearch'] ).\"%' OR \";\n\t\t\t}\n\t\t\t$sWhere = substr_replace( $sWhere, \"\", -3 );\n\t\t\t$sWhere .= ')';\n\t\t}\n\t\t\n\t\t/* Individual column filtering */\n\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t{\n\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t{\n\t\t\t\tif ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" && $_GET['sSearch_'.$i] != '' )\n\t\t\t\t{\n\t\t\t\t\tif ( $sWhere == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$sWhere = \"AND \";\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$sWhere .= \" AND \";\n\t\t\t\t\t}\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower($_GET['sSearch_'.$i]).\"%' \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$rResult \t\t\t= $this->model_transaction->datatable_setor_tunai_tabungan($sWhere,$sOrder,$sLimit); // query get data to view\n\t\t$rResultFilterTotal = $this->model_transaction->datatable_setor_tunai_tabungan($sWhere); // get number of filtered data\n\t\t$iFilteredTotal \t= count($rResultFilterTotal); \n\t\t$rResultTotal \t\t= $this->model_transaction->datatable_setor_tunai_tabungan(); // get number of all data\n\t\t$iTotal \t\t\t= count($rResultTotal);\t\n\t\t\n\t\t/*\n\t\t * Output\n\t\t */\n\t\t$output = array(\n\t\t\t\"sEcho\" => intval($_GET['sEcho']),\n\t\t\t\"iTotalRecords\" => $iTotal,\n\t\t\t\"iTotalDisplayRecords\" => $iFilteredTotal,\n\t\t\t\"aaData\" => array()\n\t\t);\n\t\t\n\t\tforeach($rResult as $aRow)\n\t\t{\n\t\t\t$row = array();\n\t\t\t$row[] = $aRow['cif_no'];\n\t\t\t$row[] = $aRow['nama'];\n\t\t\t$row[] = $aRow['account_saving_no'];\n\t\t\t$row[] = '<div align=\"right\">Rp '.number_format($aRow['amount'],0,',','.').',-</div>';\n\t\t\t$row[] = $this->format_date_detail($aRow['trx_date'],'id',false,'/');\n\t\t\t$row[] = '<div align=\"center\"><a href=\"javascript:;\" class=\"btn red mini\" trx_detail_id=\"'.$aRow['trx_detail_id'].'\" account_saving_no=\"'.$aRow['account_saving_no'].'\" nama=\"'.$aRow['nama'].'\" id=\"link-delete\">Delete</a></div>';\n\n\t\t\t$output['aaData'][] = $row;\n\t\t}\n\t\t\n\t\techo json_encode( $output );\n\t}", "public function tabel_pembayaran(){\r\n $result = $this->darat->get_tabel_transaksi();\r\n\r\n $data = array();\r\n $no = 1;\r\n\r\n if (is_array($result) || is_object($result)){\r\n foreach ($result as $row){\r\n $color = '';\r\n $aksi = \"\";\r\n\r\n if($row->diskon != NULL || $row->diskon != 0){\r\n $row->tarif -= $row->diskon/100 * $row->tarif;\r\n $total_pembayaran = $row->tarif * $row->total_permintaan;\r\n }else{\r\n $total_pembayaran = $row->tarif * $row->total_permintaan;\r\n }\r\n \r\n if($this->session->userdata('role_name') == 'loket' || $this->session->userdata('role_name') == 'admin'){\r\n $aksi = '<a class=\"btn btn-sm btn-success glyphicon glyphicon-list-alt\" title=\"Cetak Form Permintaan\" target=\"_blank\" href=\"'.base_url(\"darat/cetakFPermintaan/\".$row->id_transaksi.\"\").'\"></a>&nbsp;';\r\n $aksi .= '<span class=\"\"><a class=\"btn btn-sm btn-info glyphicon glyphicon-list-alt\" title=\"Cetak Perhitungan\" target=\"_blank\" href=\"'.base_url(\"darat/cetakPerhitunganPiutang/\".$row->id_transaksi.\"\").'\"> </a>&nbsp;</span>';\r\n \r\n if($row->status_pembayaran == 0 && $row->status_invoice == 0){\r\n $aksi .= '<span class=\"\"><a class=\"btn btn-sm btn-danger glyphicon glyphicon-remove\" title=\"Batal Transaksi\" href=\"javascript:void(0)\" onclick=\"batal('.\"'\".$row->id_transaksi.\"'\".');\"></a></span>';\r\n }\r\n }\r\n \r\n if($row->batal_nota == 1){\r\n $aksi .= '<span class=\"\"><a class=\"btn btn-sm btn-danger glyphicon glyphicon-remove\" title=\"batal kwitansi\" target=\"_blank\" href=\"javascript:void(0)\" onclick=\"cancel_kwitansi('.\"'\".$row->id_transaksi.\"'\".');\"> </a></span>';\r\n $color = '#ff0000';\r\n } else if($row->waktu_mulai_pengantaran == NULL || $row->waktu_selesai_pengantaran == NULL){\r\n if($row->status_invoice == 1){\r\n $aksi .= '<span class=\"\"><a class=\"btn btn-sm btn-danger glyphicon glyphicon-remove\" title=\"Batal Transaksi\" href=\"javascript:void(0)\" onclick=\"batal('.\"'\".$row->id_transaksi.\"'\".');\"></a></span>';\r\n }else{\r\n if($this->session->userdata('role_name' == 'keuangan' || $this->session->userdata('role_name') == 'admin')){\r\n $aksi .= '<span class=\"\"><a class=\"btn btn-sm btn-info glyphicon glyphicon-list-alt\" title=\"cetak kwitansi\" target=\"_blank\" href=\"'.base_url(\"darat/cetakKwitansi/\".$row->id_transaksi.\"\").'\"> </a></span>';\r\n $aksi .= '&nbsp;<span class=\"\"><a class=\"btn btn-sm btn-danger glyphicon glyphicon-remove\" title=\"batal transaksi\" href=\"javascript:void(0)\" onclick=\"batal('.\"'\".$row->id_transaksi.\"'\".');\"></a></span>';\r\n }\r\n }\r\n } else{\r\n //$aksi = \"\";\r\n }\r\n \r\n if($row->waktu_mulai_pengantaran == NULL){\r\n $row->waktu_mulai_pengantaran = \"\";\r\n }\r\n \r\n if($row->waktu_selesai_pengantaran == NULL){\r\n $row->waktu_selesai_pengantaran = \"\";\r\n }\r\n \r\n if($row->tgl_perm_pengantaran == NULL){\r\n $row->tgl_perm_pengantaran = \"\";\r\n }\r\n\r\n if($row->status_invoice == \"1\"){\r\n $status_invoice = \"Piutang\";\r\n }else{\r\n $status_invoice = \"Cash\";\r\n }\r\n \r\n if($row->soft_delete == 0 && ($row->status_pembayaran == 0 && $row->batal_kwitansi == 0) || $row->status_invoice == 1){\r\n $data[] = array(\r\n 'no' => $no,\r\n 'nama' => $row->nama_pengguna_jasa.\" / \".$row->nama_pemohon,\r\n 'tgl_transaksi' => $row->tgl_transaksi,\r\n 'tgl_permintaan' => $row->tgl_perm_pengantaran,\r\n 'jenis' => $row->tipe_pengguna_jasa,\r\n 'pembayaran' => $status_invoice,\r\n 'tarif' => $this->Ribuan($row->tarif),\r\n 'total_pengisian' => $row->total_permintaan,\r\n 'total_pembayaran' => $this->Ribuan($total_pembayaran),\r\n 'waktu_mulai_pengantaran' => date(\"H:i:s\", strtotime($row->waktu_mulai_pengantaran)),\r\n 'waktu_selesai_pengantaran' => date(\"H:i:s\", strtotime($row->waktu_selesai_pengantaran)),\r\n 'aksi' => $aksi,\r\n 'color' => $color\r\n );\r\n $no++;\r\n }\r\n \r\n }\r\n }\r\n \r\n echo json_encode($data);\r\n }", "function konfirmasiTerima()\n {\n $data_pengajuan = array(\n 'status_pengajuan' => 'VERIFIKASI'\n );\n $this->db->where('id_pengajuan', $this->input->post('id_pengajuan'));\n $this->db->update('tbl_pengajuan', $data_pengajuan);\n }", "public function list_pinversion($estado_ppto){\n $proyectos=$this->model_proyecto->list_proy_inversion();\n $tabla='';\n\n $color=''; \n if($estado_ppto==1){\n $color='#e2f4f9';\n }\n\n $tabla.='\n <table id=\"dt_basic\" class=\"table table-bordered\" style=\"width:100%;\">\n <thead>\n <tr style=\"height:50px;\">\n <th style=\"width:1%;\" bgcolor=\"#474544\" title=\"#\">#</th>\n <th style=\"width:5%;\" bgcolor=\"#474544\" title=\"VER PARTIDAS\"></th>\n <th style=\"width:5%;\" bgcolor=\"#474544\" title=\"VER PARTIDAS\">VER PARTIDAS</th>\n <th style=\"width:10%;\" bgcolor=\"#474544\" title=\"APERTURA PROGRAM&Aacute;TICA\">CATEGORIA PROGRAM&Aacute;TICA '.$this->gestion.'</th>\n <th style=\"width:20%;\" bgcolor=\"#474544\" title=\"NOMBRE DEL PROYECTO DE INVERSI&Oacute;N\">NOMBRE_PROYECTO_INVERSI&Oacute;N</th>\n <th style=\"width:10%;\" bgcolor=\"#474544\" title=\"C&Oacute;DIGO SISIN\">C&Oacute;DIGO_SISIN</th>\n <th style=\"width:10%;\" bgcolor=\"#474544\" title=\"UNIDAD ADMINISTRATIVA\">UNIDAD_ADMINISTRATIVA</th>\n <th style=\"width:10%;\" bgcolor=\"#474544\" title=\"UNIDAD EJECUTORA\">UNIDAD_EJECUTORA</th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n foreach($proyectos as $row){\n $aper=$this->model_ptto_sigep->partidas_proyecto($row['aper_id']);\n $tabla.='<tr bgcolor='.$color.'>';\n $tabla.='<td style=\"height:30px;\" align=center><b>'.$row['aper_id'].'</b></td>';\n $tabla.='<td align=center>';\n if($row['pfec_estado']==1){\n if($estado_ppto==0){\n if(count($aper)!=0){\n $tabla .='\n <center><a data-toggle=\"modal\" data-target=\"#'.$row['aper_id'].'\" title=\"PARTIDAS ASIGNADAS\" ><img src=\"'.base_url().'assets/img/select.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a></center>\n <div class=\"modal fade bs-example-modal-lg\" tabindex=\"-1\" id=\"'.$row['aper_id'].'\" role=\"dialog\" aria-labelledby=\"myLargeModalLabel\">\n <div class=\"modal-dialog modal-lg\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close text-danger\" data-dismiss=\"modal\" aria-hidden=\"true\">\n &times;\n </button>\n <h4 class=\"modal-title\">\n '.$row['proy_nombre'].'\n </h4>\n </div>\n <div class=\"modal-body no-padding\">\n <div class=\"well\">\n '.$this->partidas($row['aper_id'],1).' \n </div>\n </div>\n <div class=\"modal-footer\">\n <a href=\"javascript:abreVentana(\\''.site_url(\"\").'/mnt/rep_partidas/'.$row['aper_id'].'\\');\" class=\"btn btn-primary\" title=\"IMPRIMIR PARTIDAS\">IMPRIMIR PARTIDAS</a>\n </div>\n </div>\n </div>\n </div>';\n }\n }\n }\n else{\n $tabla.='<b>FASE NO ACTIVA</b>';\n }\n $tabla.='</td>';\n $tabla.='<td>';\n if($this->tp_adm==1 & $row['pfec_estado']==1){\n\n if($estado_ppto==0){\n if(count($aper)!=0){\n $tabla .='<center><a href=\"'.site_url(\"\").'/mnt/edit_ptto_asig/'.$row['proy_id'].'\" title=\"MODIFICAR PRESUPUESTO ASIGNADO\" class=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/faseetapa.png\" WIDTH=\"34\" HEIGHT=\"34\"/></a></center>';\n }\n }\n else{\n $tabla.='<center><a href=\"'.site_url(\"\").'/mnt/ver_ptto_asig_final/'.$row['proy_id'].'\" id=\"myBtnn'.$row['proy_id'].'\" title=\"VER PRESUPUESTO ASIGNADO INICIAL - PROGRAMADO - APROBADO\" iclass=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/faseetapa.png\" WIDTH=\"34\" HEIGHT=\"34\"/></a></center>';\n }\n }\n $tabla.='</td>';\n $tabla.='<td><center>'.$row['aper_programa'].''.$row['proy_sisin'].''.$row['aper_actividad'].'</center></td>';\n $tabla.='<td>'.$row['proy_nombre'].'</td>';\n $tabla.='<td>'.$row['proy_sisin'].'</td>';\n $tabla.='<td>'.$row['dep_cod'].' '.strtoupper($row['dep_departamento']).'</td>';\n $tabla.='<td>'.$row['dist_cod'].' '.strtoupper($row['dist_distrital']).'</td>';\n $tabla.='</tr>';\n }\n $tabla.='\n </tbody>\n </table>';\n \n return $tabla;\n }", "public function datatable_pinbuk_tabungan()\n\t{\n\t\t$aColumns = array( 'a.account_no','a.account_no_dest','a.amount','a.trx_date','');\n\t\t\t\t\n\t\t/* \n\t\t * Paging\n\t\t */\n\t\t$sLimit = \"\";\n\t\tif ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )\n\t\t{\n\t\t\t$sLimit = \" OFFSET \".intval( $_GET['iDisplayStart'] ).\" LIMIT \".\n\t\t\t\tintval( $_GET['iDisplayLength'] );\n\t\t}\n\t\t\n\t\t/*\n\t\t * Ordering\n\t\t */\n\t\t$sOrder = \"\";\n\t\tif ( isset( $_GET['iSortCol_0'] ) )\n\t\t{\n\t\t\t$sOrder = \"ORDER BY \";\n\t\t\tfor ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == \"true\" )\n\t\t\t\t{\n\t\t\t\t\t$sOrder .= \"\".$aColumns[ intval( $_GET['iSortCol_'.$i] ) ].\" \".\n\t\t\t\t\t\t($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc') .\", \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$sOrder = substr_replace( $sOrder, \"\", -2 );\n\t\t\tif ( $sOrder == \"ORDER BY\" )\n\t\t\t{\n\t\t\t\t$sOrder = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* \n\t\t * Filtering\n\t\t */\n\t\t$sWhere = \"\";\n\t\tif ( isset($_GET['sSearch']) && $_GET['sSearch'] != \"\" )\n\t\t{\n\t\t\t$sWhere = \"AND (\";\n\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower( $_GET['sSearch'] ).\"%' OR \";\n\t\t\t}\n\t\t\t$sWhere = substr_replace( $sWhere, \"\", -3 );\n\t\t\t$sWhere .= ')';\n\t\t}\n\t\t\n\t\t/* Individual column filtering */\n\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t{\n\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t{\n\t\t\t\tif ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" && $_GET['sSearch_'.$i] != '' )\n\t\t\t\t{\n\t\t\t\t\tif ( $sWhere == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$sWhere = \"AND \";\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$sWhere .= \" AND \";\n\t\t\t\t\t}\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower($_GET['sSearch_'.$i]).\"%' \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$rResult \t\t\t= $this->model_transaction->datatable_pinbuk_tabungan($sWhere,$sOrder,$sLimit); // query get data to view\n\t\t$rResultFilterTotal = $this->model_transaction->datatable_pinbuk_tabungan($sWhere); // get number of filtered data\n\t\t$iFilteredTotal \t= count($rResultFilterTotal); \n\t\t$rResultTotal \t\t= $this->model_transaction->datatable_pinbuk_tabungan(); // get number of all data\n\t\t$iTotal \t\t\t= count($rResultTotal);\t\n\t\t\n\t\t/*\n\t\t * Output\n\t\t */\n\t\t$output = array(\n\t\t\t\"sEcho\" => intval($_GET['sEcho']),\n\t\t\t\"iTotalRecords\" => $iTotal,\n\t\t\t\"iTotalDisplayRecords\" => $iFilteredTotal,\n\t\t\t\"aaData\" => array()\n\t\t);\n\t\t\n\t\tforeach($rResult as $aRow)\n\t\t{\n\t\t\t$row = array();\n\t\t\t$row[] = $aRow['no_rek_tabungan_sumber'].'-'.$aRow['nama_tabungan_sumber'];\n\t\t\t$row[] = $aRow['no_rek_tabungan_tujuan'].'-'.$aRow['nama_tabungan_tujuan'];\n\t\t\t$row[] = '<div align=\"right\">Rp '.number_format($aRow['amount'],0,',','.').',-</div>';\n\t\t\t$row[] = '<div align=\"center\">'.$this->format_date_detail($aRow['trx_date'],'id',false,'/').'</div>';\n\t\t\t$row[] = '<div align=\"center\"><a href=\"javascript:;\" trx_detail_id=\"'.$aRow['trx_detail_id'].'\" no_rek_tabungan_sumber=\"'.$aRow['no_rek_tabungan_sumber'].'\" nama_tabungan_sumber=\"'.$aRow['nama_tabungan_sumber'].'\" id=\"link-delete\" class=\"btn mini red\">Delete</a></div>';\n\n\t\t\t$output['aaData'][] = $row;\n\t\t}\n\t\t\n\t\techo json_encode( $output );\n\t}", "public function aktifPaket()\n {\n $user = $this->session->userdata('IdPerusahaan');\n\n $this->db->select('*');\n $this->db->from('tb_perusahaan as tph');\n $this->db->join('tb_paket as tp', 'tp.IdPaket = tph.IdPaket');\n $this->db->join('tb_aktivasi as ta', 'ta.IdPerusahaan = tph.IdPerusahaan');\n $this->db->where('tph.IdPerusahaan', $user);\n $this->db->order_by('ta.IdAktivasi', 'DESC');\n\n $query = $this->db->get();\n return $query;\n }", "public function datatable_deposito_setup()\n\t{\n\t\t/* Array of database columns which should be read and sent back to DataTables. Use a space where\n\t\t * you want to insert a non-database field (for example a counter or static image)\n\t\t */\n\t\t$aColumns = array( '','mfi_cif.cif_no','mfi_cif.nama','account_deposit_no','' );\n\t\t\t\t\n\t\t/* \n\t\t * Paging\n\t\t */\n\t\t$sLimit = \"\";\n\t\tif ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )\n\t\t{\n\t\t\t$sLimit = \" OFFSET \".intval( $_GET['iDisplayStart'] ).\" LIMIT \".\n\t\t\t\tintval( $_GET['iDisplayLength'] );\n\t\t}\n\t\t\n\t\t/*\n\t\t * Ordering\n\t\t */\n\t\t$sOrder = \"\";\n\t\tif ( isset( $_GET['iSortCol_0'] ) )\n\t\t{\n\t\t\t$sOrder = \"ORDER BY \";\n\t\t\tfor ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == \"true\" )\n\t\t\t\t{\n\t\t\t\t\t$sOrder .= \"\".$aColumns[ intval( $_GET['iSortCol_'.$i] ) ].\" \".\n\t\t\t\t\t\t($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc') .\", \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$sOrder = substr_replace( $sOrder, \"\", -2 );\n\t\t\tif ( $sOrder == \"ORDER BY\" )\n\t\t\t{\n\t\t\t\t$sOrder = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* \n\t\t * Filtering\n\t\t */\n\t\t$sWhere = \"\";\n\t\tif ( isset($_GET['sSearch']) && $_GET['sSearch'] != \"\" )\n\t\t{\n\t\t\t$sWhere = \"WHERE (\";\n\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t\t\t$sWhere .= \"LOWER(\".$aColumns[$i].\") LIKE '%\".strtolower($_GET['sSearch']).\"%' OR \";\n\t\t\t}\n\t\t\t$sWhere = substr_replace( $sWhere, \"\", -3 );\n\t\t\t$sWhere .= ')';\n\t\t}\n\t\t\n\t\t/* Individual column filtering */\n\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t{\n\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t{\n\t\t\t\tif ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" && $_GET['sSearch_'.$i] != '' )\n\t\t\t\t{\n\t\t\t\t\tif ( $sWhere == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$sWhere = \"WHERE \";\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$sWhere .= \" AND \";\n\t\t\t\t\t}\n\t\t\t\t\t$sWhere .= \"LOWER(\".$aColumns[$i].\") LIKE '%\".strtolower($_GET['sSearch_'.$i]).\"%' \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$rResult \t\t\t= $this->model_transaction->datatable_deposito_setup($sWhere,$sOrder,$sLimit); // query get data to view\n\t\t$rResultFilterTotal = $this->model_transaction->datatable_deposito_setup($sWhere); // get number of filtered data\n\t\t$iFilteredTotal \t= count($rResultFilterTotal); \n\t\t$rResultTotal \t\t= $this->model_transaction->datatable_deposito_setup(); // get number of all data\n\t\t$iTotal \t\t\t= count($rResultTotal);\t\n\t\t\n\t\t/*\n\t\t * Output\n\t\t */\n\t\t$output = array(\n\t\t\t\"sEcho\" => intval($_GET['sEcho']),\n\t\t\t\"iTotalRecords\" => $iTotal,\n\t\t\t\"iTotalDisplayRecords\" => $iFilteredTotal,\n\t\t\t\"aaData\" => array()\n\t\t);\n\t\t\n\t\tforeach($rResult as $aRow)\n\t\t{\n\t\t\t$row = array();\n\t\t\t$row[] = '<input type=\"checkbox\" value=\"'.$aRow['account_deposit_id'].'\" id=\"checkbox\" class=\"checkboxes\" >';\n\t\t\t$row[] = $aRow['cif_no'];\n\t\t\t$row[] = $aRow['nama'];\n\t\t\t$row[] = $aRow['account_deposit_no'];\n\t\t\t$row[] = '<a href=\"javascript:;\" account_deposit_id=\"'.$aRow['account_deposit_id'].'\" id=\"link-edit\">Edit</a>';\n\n\t\t\t$output['aaData'][] = $row;\n\t\t}\n\t\t\n\t\techo json_encode( $output );\n\t}", "public function saldo_tarjeta();", "public function selesai()\n\t{\n\n\t\t$this->db->select('*');\n\t\t$this->db->from('tbl_transaksi');\n\t\t$this->db->where(\n\t\t\t'id_pelanggan',\n\t\t\t$this->session->userdata('id_pelanggan'),\n\t\t);\n\t\t$this->db->where('status_order=3');\n\n\n\t\t$this->db->order_by('id_transaksi', 'desc');\n\t\treturn $this->db->get()->result();\n\t}", "public function verifikasi_pendebetan_angsuran_pembiayaan_koptel()\n\t{\n\t\t$debug = false; // debug non aktif\n\t\t$nik = $this->input->post('nik');\n\t\t$filename = $this->input->post('filename');\n\t\t$akun = $this->input->post('akun');\n\t\t$referensi = $this->input->post('referensi');\n\t\t$seq = $this->input->post('seq');\n\t\t$angsuran_id = $filename;\n\t\tdate_default_timezone_set('Asia/Jakarta');\n\t\t$trx_date = $this->datepicker_convert(true,$this->input->post('trx_date'),'/');\n\t\t$ins_data = array();\n\t\t$ins_data_trx = array();\n\n\t\t$this->db->trans_begin();\n\n\t\t/* get angsuran */\n\t\t$angsurans = $this->model_transaction->get_angsuran_temp_by_id($angsuran_id);\n\t\tfor ($i = 0 ;$i < count($angsurans) ; $i++)\n\t\t{\n\t\t\t$angsuran = $angsurans[$i];\n\t\t\t$a_account_financing_no = $angsuran['account_financing_no'];\n\t\t\t$a_jumlah_angsuran = $angsuran['pokok']+$angsuran['margin'];\n\n\t\t\t$data_financing = $this->model_transaction->get_account_financing_by_account($a_account_financing_no,$a_jumlah_angsuran);\n\t\t\tif ($angsuran['pokok'] > 0 || $angsuran['margin']>0)\n\t\t\t{\n\t\t\t\t$b_account_financing_no = $angsuran['account_financing_no'];\n\t\t\t\t$b_angsuran_pokok = $angsuran['pokok'];\n\t\t\t\t$b_angsuran_margin = $angsuran['margin'];\n\t\t\t\t$b_jtempo_angsuran_last = $data_financing['jto_last'];\n\t\t\t\t$b_jtempo_angsuran_next = $data_financing['jto_next'];\n\t\t\t\t$b_jangka_waktu = $data_financing['jangka_waktu'];\n\t\t\t\t$b_counter_angsuran = $data_financing['counter_angsuran'];\n\t\t\t\t$b_saldo_pokok = $data_financing['saldo_pokok'];\n\t\t\t\t$b_saldo_margin = $data_financing['saldo_margin'];\n\t\t\t\t$b_flag_jadwal_angsuran = $data_financing['flag_jadwal_angsuran'];\n\t\t\t\t$b_periode_jangka_waktu = $data_financing['periode_jangka_waktu'];\n\t\t\t\t$b_tanggal_jtempo = $data_financing['tanggal_jtempo'];\n\n\t\t\t\t// generate uuid for history\n\t \t\t$b_trx_detail_id = uuid(false);\n\t\t \t$b_trx_account_financing_id = uuid(false);\n\n\t\t \t// new declare\n\t\t\t\t$b_jumlah_angsuran = $b_angsuran_pokok+$b_angsuran_margin;\n\t\t\t\t// $b_new_counter_angsuran = $b_counter_angsuran+1;\n\t\t\t\t$b_new_counter_angsuran = $b_counter_angsuran;\n\t\t\t\t$b_trx_type = 3;\n\t\t\t\t$b_trx_account_type = 1;\n\t\t\t\t$is_pelunasan = false;\n\t\t\t\t$jtempo_angsuran_next = $b_jtempo_angsuran_next;\n\n\t\t\t\tif ($b_flag_jadwal_angsuran==1) {\n\t\t\t\t\tif($b_periode_jangka_waktu==0){\n\t\t\t\t\t\t$jtempo_angsuran_next = date(\"Y-m-d\",strtotime($jtempo_angsuran_next.' +1 days'));\n\t\t\t\t\t}else if($b_periode_jangka_waktu==1){\n\t\t\t\t\t\t$jtempo_angsuran_next = date(\"Y-m-d\",strtotime($jtempo_angsuran_next.' +1 weeks'));\n\t\t\t\t\t}else if($b_periode_jangka_waktu==2){\n\t\t\t\t\t\t$jtempo_angsuran_next = date(\"Y-m-d\",strtotime($jtempo_angsuran_next.' +1 month'));\n\t\t\t\t\t}\n\t\t\t\t\tif($b_jangka_waktu==$b_new_counter_angsuran) {\n\t\t\t\t\t\t$jtempo_angsuran_next = $b_tanggal_jtempo;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif($b_jangka_waktu==$b_new_counter_angsuran) {\n\t\t\t\t\t\t$jtempo_angsuran_next = $b_tanggal_jtempo;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$jtempo_angsuran_next = $data_financing['jto_next2'];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// collect array for angsuran\n\t\t \t// if this angsuran is pelunasan then this condition will not run\n\t\t \t// else will insert to trx_detail and trx_account_financing\n\t\t \tif ($b_new_counter_angsuran!=$b_jangka_waktu) {\n\t\t \t\t$data_trx = array(\n\t\t\t\t\t\t\t 'b_trx_detail_id' => $b_trx_detail_id\n\t\t\t\t\t\t\t,'b_trx_type' => $b_trx_type\n\t\t\t\t\t\t\t,'b_trx_account_type' => $b_trx_account_type\n\t\t\t\t\t\t\t,'b_account_financing_no' => $b_account_financing_no\n\t\t\t\t\t\t\t,'b_jumlah_angsuran' => $b_jumlah_angsuran\n\t\t\t\t\t\t\t,'b_trx_account_financing_id' => $b_trx_account_financing_id\n\t\t\t\t\t\t\t,'trx_date' => $trx_date\n\t\t\t\t\t\t\t// ,'b_jtempo_angsuran_next' => $b_jtempo_angsuran_last\n\t\t\t\t\t\t\t,'b_jtempo_angsuran_next' => $b_jtempo_angsuran_next\n\t\t\t\t\t\t\t,'b_angsuran_pokok' => $b_angsuran_pokok\n\t\t\t\t\t\t\t,'b_angsuran_margin' => $b_angsuran_margin\n\t\t\t\t\t\t\t,'referensi' => $referensi\n\t\t\t\t\t\t\t,'seq' => $seq\n\t\t\t\t\t\t\t,'akun' => $akun\n\t\t\t\t\t\t\t,'b_new_counter_angsuran' => $b_new_counter_angsuran\n\t\t \t\t\t);\n\n\t\t \t\t$ins = $this->get_trx_angsuran_data($data_trx);\n\t\t \t\t$ins_data_trx[] = $ins['ins_data_trx'];\n\t\t \t\t$ins_data[] = $ins['ins_data'];\n\t\t\t\t} else {\n\t\t \t\t$is_pelunasan = true;\n\t\t\t\t}\n\n\t\t\t\tif ($is_pelunasan) {\n\t\t\t\t\t$jtempo_angsuran_next = $b_tanggal_jtempo;\n\t\t\t\t}\n\n\t\t\t\t// update saldo account pembiayaan\n\t\t\t\t$pembiayaan = array(\n\t\t\t\t\t'saldo_pokok'=>$b_saldo_pokok-$b_angsuran_pokok,\n\t\t\t\t\t'saldo_margin'=>$b_saldo_margin-$b_angsuran_margin,\n\t\t\t\t\t'jtempo_angsuran_last'=>$b_jtempo_angsuran_next,\n\t\t\t\t\t'jtempo_angsuran_next'=>$jtempo_angsuran_next,\n\t\t\t\t\t'counter_angsuran'=>$b_new_counter_angsuran\n\t\t\t\t);\n\n\t\t\t\t// begin\n\t\t\t\t// do this section if flag_jadwal_angsuran = non reguler ( 0 )\n\t\t\t\t$param_pembiayaan_schedulle=array();\n\t\t\t\t$pembiayaan_schedulle=array();\n\t\t\t\tif ($b_flag_jadwal_angsuran==0){\n\t\t\t\t\t$param_pembiayaan_schedulle = array(\n\t\t\t\t\t\t'account_no_financing'=>$b_account_financing_no\n\t\t\t\t\t\t,'tangga_jtempo'=>$b_jtempo_angsuran_next\n\t\t\t\t\t);\n\t\t\t\t\t$pembiayaan_schedulle = array(\n\t\t\t\t\t\t\t'status_angsuran'=>1,\n\t\t\t\t\t\t\t'tanggal_bayar'=>$trx_date,\n\t\t\t\t\t\t\t'bayar_pokok'=>$b_angsuran_pokok,\n\t\t\t\t\t\t\t'bayar_margin'=>$b_angsuran_margin\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// end \n\n\t\t\t\tif ($is_pelunasan) {\n\t\t\t\t\t$pembiayaan['status_rekening'] = 2;\n\n\t\t\t\t\t$pembiayaan_lunas = array(\n\t\t\t\t\t\t\t'account_financing_lunas_id'=>$b_trx_account_financing_id,\n\t\t\t\t\t\t\t'account_financing_no'=>$b_account_financing_no,\n\t\t\t\t\t\t\t'saldo_pokok'=>$b_saldo_pokok,\n\t\t\t\t\t\t\t'saldo_margin'=>$b_saldo_margin,\n\t\t\t\t\t\t\t'potongan_margin'=>0,\n\t\t\t\t\t\t\t'status_pelunasan'=>1,\n\t\t\t\t\t\t\t'tanggal_lunas'=>$trx_date,\n\t\t\t\t\t\t\t'create_by'=>$this->session->userdata('user_id'),\n\t\t\t\t\t\t\t'created_date'=>date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t'verify_by'=>$this->session->userdata('user_id'),\n\t\t\t\t\t\t\t'verifiy_date'=>date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t'saldo_catab'=>0\n\t\t\t\t\t\t);\n\n\t\t\t\t\t$trx_pembiayaan_lunas = array(\n\t\t\t\t\t\t\t'trx_account_financing_id'=>$b_trx_account_financing_id\n\t\t\t\t\t\t\t,'branch_id' => $this->session->userdata('branch_id')\n\t\t\t\t\t\t\t,'trx_detail_id' => $b_trx_detail_id\n\t\t\t\t\t\t\t,'account_financing_no' => $b_account_financing_no\n\t\t\t\t\t\t\t,'trx_financing_type' => '2'\n\t\t\t\t\t\t\t,'trx_date' => $trx_date\n\t\t\t\t\t\t\t,'jto_date' => $b_jtempo_angsuran_next\n\t\t\t\t\t\t\t,'pokok' => $b_saldo_pokok\n\t\t\t\t\t\t\t,'margin' => $b_saldo_margin\n\t\t\t\t\t\t\t,'catab' => '0'\n\t\t\t\t\t\t\t,'description' => 'PELUNASAN PEMBIAYAAN Rek.'.$b_account_financing_no\n\t\t\t\t\t\t\t,'created_date' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t,'created_by' => $this->session->userdata('user_id')\n\t\t\t\t\t\t\t,'verify_by' => $this->session->userdata('user_id')\n\t\t\t\t\t\t\t,'verify_date' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t,'trx_status' => 1\n\t\t\t\t\t\t\t,'freq' => 1\n\t\t\t\t\t\t\t,'angsuran_ke' => $b_jangka_waktu\n\t\t\t\t\t\t\t,'account_cash_code'=>$akun\n\t\t\t\t\t\t\t,'tipe_angsuran'=>'2'\n\t\t\t\t\t\t);\n\n\t\t\t\t\t$trx_detail = array(\n\t\t\t\t\t\t\t'trx_detail_id' => $b_trx_detail_id\n\t\t\t\t\t\t\t,'trx_type' => '2'\n\t\t\t\t\t\t\t,'trx_account_type' => '3'\n\t\t\t\t\t\t\t,'account_no' => $b_account_financing_no\n\t\t\t\t\t\t\t,'flag_debit_credit' => 'C'\n\t\t\t\t\t\t\t,'amount' => ($b_saldo_pokok+$b_saldo_margin)\n\t\t\t\t\t\t\t,'trx_date' => $trx_date\n\t\t\t\t\t\t\t,'description' => 'PELUNASAN PEMBIAYAAN Rek.'.$b_account_financing_no\n\t\t\t\t\t\t\t,'created_date' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t,'created_by' => $this->session->userdata('user_id')\n\t\t\t\t\t\t);\n\n\t\t\t\t\tif ($debug==true) {\n\t\t\t\t\t\techo 'Pelunasan-------------------------------------<br>';\n\t\t\t\t\t\techo \"<pre>\";\n\t\t\t\t\t\tprint_r($pembiayaan_lunas);\n\t\t\t\t\t\tprint_r($trx_detail);\n\t\t\t\t\t\tprint_r($trx_pembiayaan_lunas);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->model_transaction->insert_account_financing_lunas($pembiayaan_lunas);\n\t\t\t\t\t\t$this->model_transaction->insert_trx_detail($trx_detail);\n\t\t\t\t\t\t$this->model_transaction->insert_trx_account_financing($trx_pembiayaan_lunas);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t// end check of if pelunasan\n\n\t\t\t\t$param_pembiayaan = array('account_financing_no'=>$b_account_financing_no);\n\n\t\t\t\tif ($debug==true) {\n\t\t\t\t\techo 'ANGSURAN NORMAL '.$i.' -------------------------------------<br>';\n\t\t\t\t\techo \"<pre>\";\n\t\t\t\t\tprint_r($pembiayaan);\n\t\t\t\t\tprint_r($param_pembiayaan);\n\t\t\t\t\tprint_r($pembiayaan_schedulle);\n\t\t\t\t} else {\n\t\t\t\t\t$this->model_transaction->update_account_financing($pembiayaan,$param_pembiayaan);\n\t\t\t\t\tif (count($pembiayaan_schedulle)>0) {\n\t\t\t\t\t\t$this->model_transaction->update_account_financing_schedulle($pembiayaan_schedulle,$param_pembiayaan_schedulle);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$log_payed_data = $this->model_transaction->get_log_payed_data($angsuran_id,$trx_date);\n\t\tif ($debug==true) {\n\t\t\techo \"<pre>\";\n\t\t\tprint_r($ins_data);\n\t\t\tprint_r($ins_data_trx);\n\t\t\tdie();\n\t\t} else {\n\t\t\tif(count($ins_data)>0){\n\t\t\t\t$this->model_transaction->insert_angsuran_into_mfi_trx_financing($ins_data);\n\t\t\t}\n\t\t\tif(count($ins_data_trx)>0){\n\t\t\t\t$this->model_transaction->insert_angsuran_into_trx_detail($ins_data_trx);\n\t\t\t}\n\t\t\tif(count($log_payed_data)>0){\n\t\t\t\t$this->model_transaction->insert_log_trx_pendebetan($log_payed_data);\n\t\t\t}\n\t\t}\n\n\t\tif ($debug==true) {\n\t\t\techo \"<pre>\";\n\t\t\tprint_r($angsuran_id);\n\t\t\tprint_r($akun);\n\t\t\tprint_r($referensi);\n\t\t\tprint_r($param_temp);\n\t\t\t// print_r($param_temp_detail);\n\t\t\tdie();\n\t\t} else {\n\t\t\t$this->model_transaction->fn_proses_jurnal_angsuran_pyd_koptel($angsuran_id,$akun,$referensi); // proses jurnal transaksi pembiayaan\n\t\t\t// $this->model_transaction->delete_from_mfi_angsuran_temp_detail_unins($param_temp_detail);\n\t\t\t$this->db->update('mfi_angsuran_temp',array('status'=>2),array('angsuran_id'=>$angsuran_id));\n\n\t\t\t$check_tab = $this->model_transaction->get_mfi_angsuran_temp_tab($angsuran_id);\n\t\t\tif($check_tab->num_rows() > 0)\n\t\t\t{\n\t\t\t\tforeach($check_tab->result_array() as $list){\n\t\t\t\t\t$arrdata = json_decode($list['data'], true);\n\t\t\t\t\t$this->add_setoran_tunai($arrdata);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->db->update('mfi_angsuran_temp_tab',array('status'=>1),array('angsuran_id'=>$angsuran_id));\n\t\t}\n\n\t\tif($this->db->trans_status()==true){\n\t\t\t$this->db->trans_commit();\n\n\t\t\t$this->db->query(\"UPDATE mfi_trx_account_financing SET seq='$seq', reference_no='$no_ref' WHERE trx_account_financing_id='$id_transaksi'\");\n\n\t\t\t$return = array('success'=>true,'trx_date'=>$trx_date);\n\t\t}else{\n\t\t\t$this->db->trans_rollback();\n\t\t\t$return = array('success'=>false);\n\t\t}\n\n\t\techo json_encode($return);\n\t}", "function tampil_data($tabel)\n {\n $row = $this->db->prepare(\"SELECT * FROM sms\");\n $row->execute();\n return $hasil = $row->fetchAll();\n }", "public function operaciones2019($proy_id,$com_id){\n $proyecto = $this->model_proyecto->get_id_proyecto($proy_id); \n $fase = $this->model_faseetapa->get_id_fase($proy_id); //// recupera datos de la tabla fase activa\n $productos = $this->model_producto->list_producto_programado($com_id,$this->gestion); // Lista de productos\n $tabla ='';\n $tabla .='<thead>\n <tr class=\"modo1\">\n <th style=\"width:1%; text-align=center\"><b>COD.</b></th>\n <th style=\"width:1%; text-align=center\"><b>E/B</b></th>\n <th style=\"width:20%;\"><b>OPERACI&Oacute;N</b></th>\n <th style=\"width:20%;\"><b>RESULTADO</b></th>\n <th style=\"width:10%;\"><b>TIP. IND.</b></th>\n <th style=\"width:10%;\"><b>INDICADOR</b></th>\n <th style=\"width:1%;\"><b>LINEA BASE</b></th>\n <th style=\"width:1%;\"><b>META</b></th>\n <th style=\"width:5%;\"><b>PONDERACI&Oacute;N</b></th>\n <th style=\"width:4%;\"><b>ENE.</b></th>\n <th style=\"width:4%;\"><b>FEB.</b></th>\n <th style=\"width:4%;\"><b>MAR.</b></th>\n <th style=\"width:4%;\"><b>ABR.</b></th>\n <th style=\"width:4%;\"><b>MAY.</b></th>\n <th style=\"width:4%;\"><b>JUN.</b></th>\n <th style=\"width:4%;\"><b>JUL.</b></th>\n <th style=\"width:4%;\"><b>AGO.</b></th>\n <th style=\"width:4%;\"><b>SEP.</b></th>\n <th style=\"width:4%;\"><b>OCT.</b></th>\n <th style=\"width:4%;\"><b>NOV.</b></th>\n <th style=\"width:4%;\"><b>DIC.</b></th>\n <th style=\"width:7%;\"><b>MEDIO DE VERIFICACI&Oacute;N</b></th>\n <th style=\"width:7%;\"><b>DELETE</b></th>\n <th style=\"width:7%;\"><b>NRO. REQ.</b></th>\n </tr>\n </thead>\n <tbody>';\n $cont = 0;\n foreach($productos as $rowp){\n $cont++;\n $sum=$this->model_producto->meta_prod_gest($rowp['prod_id']);\n $color='';\n if(($sum[0]['meta_gest']+$rowp['prod_linea_base'])!=$rowp['prod_meta']){\n $color='#fbd5d5';\n }\n $tabla .='<tr bgcolor=\"'.$color.'\" class=\"modo1\">';\n $tabla.='<td title=\"C&Oacute;DIGO OPERACI&Oacute;N : '.$rowp['prod_cod'].'\" align=\"center\"><font color=\"blue\" size=\"2\"><b>'.$rowp['prod_cod'].'</b></font></td>';\n $tabla.='<td align=\"center\">';\n $tabla.='<a href=\"'.site_url(\"admin\").'/prog/mod_prod/'.$rowp['prod_id'].'\" title=\"MODIFICAR OPERACI&Oacute;N\" class=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/modificar.png\" WIDTH=\"33\" HEIGHT=\"34\"/></a>';\n $tabla.='<a href=\"'.site_url(\"\").'/prog/requerimiento/'.$proy_id.'/'.$rowp['prod_id'].'\" target=\"_blank\" title=\"REQUERIMIENTOS DE LA OPERACI&Oacute;N\" class=\"btn btn-default\"><img src=\"'.base_url().'assets/ifinal/insumo.png\" WIDTH=\"33\" HEIGHT=\"33\"/></a>';\n\n $tabla.='</td>';\n $tabla.='<td style=\"width:20%;\">'.$rowp['prod_producto'].'</td>';\n $tabla.='<td style=\"width:20%;\">'.$rowp['prod_resultado'].'</td>';\n $tabla.='<td style=\"width:10%;\">'.$rowp['indi_abreviacion'].'</td>';\n $tabla.='<td style=\"width:10%;\">'.$rowp['prod_indicador'].'</td>';\n $tabla.='<td style=\"width:10%;\">'.$rowp['prod_linea_base'].'</td>';\n $tabla.='<td style=\"width:10%;\">'.$rowp['prod_meta'].'</td>';\n $tabla.='<td style=\"width:10%;\">'.$rowp['prod_ponderacion'].'%</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['enero'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['febrero'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['marzo'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['abril'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['mayo'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['junio'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['julio'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['agosto'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['septiembre'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['octubre'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['noviembre'].'</td>';\n $tabla.='<td style=\"width:4%;\" bgcolor=\"#e5fde5\">'.$rowp['diciembre'].'</td>';\n $tabla.='<td style=\"width:7%;\" bgcolor=\"#e5fde5\">'.$rowp['prod_fuente_verificacion'].'</td>';\n $tabla.='<td style=\"width:7%;\">';\n $tabla.='<a href=\"#\" data-toggle=\"modal\" data-target=\"#modal_del_ff\" class=\"btn btn-default del_ff\" title=\"ELIMINAR OPERACI&Oacute;N\" name=\"'.$rowp['prod_id'].'\" id=\"'.$proy_id.'\"><img src=\"' . base_url() . 'assets/ifinal/eliminar.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a><br><br>';\n $tabla.='<center>\n <input type=\"checkbox\" name=\"req[]\" value=\"'.$rowp['prod_id'].'\" onclick=\"scheck'.$cont.'(this.checked);\"/>\n </center>';\n $tabla.='</td>';\n $tabla.='<td style=\"width:7%;\" align=\"center\"><font color=\"blue\" size=\"2\"><b>'.count($this->model_producto->insumo_producto($rowp['prod_id'])).'</b></font></td>';\n $tabla .='</tr>';\n ?>\n <script>\n function scheck<?php echo $cont;?>(estaChequeado) {\n val = parseInt($('[name=\"tot\"]').val());\n if (estaChequeado == true) {\n val = val + 1;\n } else {\n val = val - 1;\n }\n $('[name=\"tot\"]').val((val).toFixed(0));\n }\n </script>\n <?php\n }\n $tabla.='</tbody>';\n\n return $tabla;\n }" ]
[ "0.66840273", "0.6668304", "0.66328496", "0.65924084", "0.6560142", "0.65459955", "0.6532512", "0.65041924", "0.633446", "0.63340306", "0.6244683", "0.6238859", "0.6237984", "0.6226346", "0.6182707", "0.61717683", "0.61163753", "0.6114558", "0.6113364", "0.60850656", "0.6079537", "0.60764766", "0.6068167", "0.6056798", "0.6055129", "0.6052297", "0.6028588", "0.60216", "0.6021034", "0.60157573" ]
0.7296796
0
AJAX GET DATA PENGAJUAN BY REGISTRATION NO
function ajax_get_data_pengajuan_by_registration_no() { $registration_no=$this->input->post('registration_no'); $data=$this->model_transaction->get_data_pengajuan_by_registration_no($registration_no); echo json_encode($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_ajax_value_from_no_reg()\n\t{\n\t\t$cif_no = $this->input->post('cif_no');\n\t\t$data = $this->model_transaction->get_ajax_value_from_no_reg($cif_no);\n\n\t\techo json_encode($data);\n\t}", "function getRegistroAJAX() {\n switch (@$_POST['operacao']) {\n /**\n * Retorna registro solicitado por parametro.\n * @return array\n */\n case 'getRegistroErroLog':\n $retorno = [];\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1 || Sessao::getPermissaoUsuario($this->ID_PERMISSAO)) {\n $erroDAO = new ErroLogDAO();\n $retorno = $erroDAO->getVetor(@$_POST['registroID']);\n }\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna registro solicitado por parametro.\n * @return array\n */\n case 'getRegistroErroApi':\n $retorno = [];\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1 || Sessao::getPermissaoUsuario($this->ID_PERMISSAO)) {\n $apiDAO = new ErroAPIDAO();\n $retorno = $apiDAO->getVetor(@$_POST['registroID']);\n }\n print_r(json_encode($retorno));\n die();\n /**\n * Lista de registro cadastrados com paginação.\n * @var array\n */\n case 'getListaRegistroControleErroLog' :\n $retorno = [];\n $erroDAO = new ErroLogDAO();\n //DAO\n $retorno['totalRegistro'] = 0;\n $retorno['listaRegistro'] = [];\n $retorno['paginaSelecionada'] = @$_POST['paginaSelecionada'] ? $_POST['paginaSelecionada'] : 0;\n $retorno['registroPorPagina'] = @$_POST['registroPorPagina'] ? intval($_POST['registroPorPagina']) : 30;\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1 || Sessao::getPermissaoUsuario($this->ID_PERMISSAO)) {\n $retorno['totalRegistro'] = $erroDAO->getListaControleTotal(\n @$_POST['dataInicial'] ? $_POST['dataInicial'] : date('Y-m-01'),\n @$_POST['dataFinal'] ? $_POST['dataFinal'] : date('Y-m-31'),\n @$_POST['pesquisa'] ? $_POST['pesquisa'] : ''\n );\n $retorno['listaRegistro'] = $erroDAO->getListaControle(\n @$_POST['dataInicial'] ? $_POST['dataInicial'] : date('Y-m-01'),\n @$_POST['dataFinal'] ? $_POST['dataFinal'] : date('Y-m-31'),\n @$_POST['pesquisa'] ? $_POST['pesquisa'] : '',\n @$_POST['paginaSelecionada'] ? $_POST['paginaSelecionada'] : 1,\n @$_POST['registroPorPagina'] ? $_POST['registroPorPagina'] : 30\n );\n }\n print_r(json_encode($retorno));\n die();\n /**\n * Lista de registro cadastrados com paginação.\n * @var array\n */\n case 'getListaRegistroControleErroApi' :\n $retorno = [];\n $erroApiDAO = new ErroAPIDAO();\n //DAO\n $retorno['totalRegistro'] = 0;\n $retorno['listaRegistro'] = [];\n $retorno['paginaSelecionada'] = @$_POST['paginaSelecionada'] ? $_POST['paginaSelecionada'] : 0;\n $retorno['registroPorPagina'] = @$_POST['registroPorPagina'] ? intval($_POST['registroPorPagina']) : 30;\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1 || Sessao::getPermissaoUsuario($this->ID_PERMISSAO)) {\n $retorno['totalRegistro'] = $erroApiDAO->getListaControleTotal(\n @$_POST['dataInicial'] ? $_POST['dataInicial'] : date('Y-m-01'),\n @$_POST['dataFinal'] ? $_POST['dataFinal'] : date('Y-m-31'),\n @$_POST['pesquisa'] ? $_POST['pesquisa'] : ''\n );\n $retorno['listaRegistro'] = $erroApiDAO->getListaControle(\n @$_POST['dataInicial'] ? $_POST['dataInicial'] : date('Y-m-01'),\n @$_POST['dataFinal'] ? $_POST['dataFinal'] : date('Y-m-31'),\n @$_POST['pesquisa'] ? $_POST['pesquisa'] : '',\n @$_POST['paginaSelecionada'] ? $_POST['paginaSelecionada'] : 1,\n @$_POST['registroPorPagina'] ? $_POST['registroPorPagina'] : 30\n );\n }\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna estatistica de registros durante o semestre.\n * @return array\n */\n case 'getQuantidadeSemestral':\n $retorno[0] = [0, 0, 0, 0, 0, 0];\n $retorno[1] = [0, 0, 0, 0, 0, 0];\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1 || Sessao::getPermissaoUsuario($this->ID_PERMISSAO)) {\n $erroDAO = new ErroLogDAO();\n $retorno[0] = $erroDAO->getEstatisticaSemestral();\n $apiDAO = new ErroAPIDAO();\n $retorno[1] = $apiDAO->getEstatisticaSemestral();\n }\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna quantidade de registros cadastrado.\n * @return integer\n */\n case 'getQuantidadeErroLog':\n $retorno = 0;\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1 || Sessao::getPermissaoUsuario($this->ID_PERMISSAO)) {\n $erroDAO = new ErroLogDAO();\n $retorno = $erroDAO->getQuantidadeRegistro(\n @$_POST['dataInicial'] ? $_POST['dataInicial'] : date('d/m/Y'),\n @$_POST['dataFinal'] ? $_POST['dataFinal'] : date('d/m/Y')\n );\n }\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna quantidade de registros cadastrado.\n * @return integer\n */\n case 'getQuantidadeErroApi':\n $retorno = 0;\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1 || Sessao::getPermissaoUsuario($this->ID_PERMISSAO)) {\n $apiDAO = new ErroApiDAO();\n $retorno = $apiDAO->getQuantidadeRegistro(\n @$_POST['dataInicial'] ? $_POST['dataInicial'] : date('d/m/Y'),\n @$_POST['dataFinal'] ? $_POST['dataFinal'] : date('d/m/Y')\n );\n }\n print_r(json_encode($retorno));\n die();\n }\n echo 1;\n }", "function getRegistroAJAX() {\n if (@$_POST['operacao']) {\n switch ($_POST['operacao']) {\n /**\n * Retorna quantidade de permissões por departamento cadastrado.\n */\n case 'getEstatisticaPermissaoDepartamento':\n $retorno = [];\n $permissaoDAO = new PermissaoDAO();\n $retorno = $permissaoDAO->getQuantidadePermissaoPadraoDepartamento(15);\n print_r(json_encode($retorno));\n die();\n /**\n * Efetua edição do registro informado por parametro.\n */\n case 'getListaControleRegistro':\n $retorno = [];\n $permissaoDAO = new PermissaoDAO();\n $retorno = $permissaoDAO->getListaRegistroControle($_POST['pesquisa']);\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna quantidade de registros cadastrados dentro do sistema\n */\n case 'getTotalRegistro':\n $permissaoDAO = new PermissaoDAO();\n print_r(json_encode($permissaoDAO->getTotalCadastro()));\n die();\n /**\n * Retorna registro solicitado por parametro.\n */\n case 'getRegistro':\n $retorno = [];\n $permissaoDAO = new PermissaoDAO();\n $retorno = $permissaoDAO->getRegistroVetor(@$_POST['idPermissao']);\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna os cargos que possuem permissão informada.\n */\n case 'getDepartamentoPermissao':\n $retorno = [];\n $departamentoDAO = new DepartamentoDAO();\n $retorno = $departamentoDAO->getListaDepartamentoPermissao(@$_POST['idPermissao']);\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna lista de permissões do usuário.\n */\n case 'getPermissaoUsuario':\n $retorno = [];\n $permissaoDAO = new PermissaoDAO();\n $retorno = $permissaoDAO->getListaUsuarioPermissao(@$_POST['idPermissao']);\n print_r(json_encode($retorno));\n die();\n /**\n * Lista de registros vinculados ao departamento informado.\n */\n case 'getListaDepartamentoRegistroPadrao':\n $retorno = [];\n if (@$_POST['id']) {\n $departamentoDAO = new DepartamentoDAO();\n $resultado = $departamentoDAO->getListaDepartamentoPermissao(intval($_POST['id']));\n foreach ($resultado as $value) {\n $registro['id'] = $value->getId();\n $registro['nome'] = $value->getNome();\n array_push($retorno, $registro);\n }\n }\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna estatistica do controle de permissões.\n */\n case 'getEstatisticaControle':\n $permissaoDAO = new PermissaoDAO();\n print_r(json_encode($permissaoDAO->getRegistroControle()));\n die();\n /**\n * Retorna lista de permissoes disponiveis de acordo com o \n * departamento do usuario.\n */\n case 'getListaPermissaoDisponivel':\n $retorno = [];\n $permissaoDAO = new PermissaoDAO();\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1) {\n $retorno = $permissaoDAO->getListaPermissaoVetor();\n } else {\n $retorno = $permissaoDAO->getListaPermissaoVetor(Sessao::getUsuario()->getId());\n }\n print_r(json_encode($retorno));\n die();\n /**\n * Retorna lista de permissoes do usuario informado por parametro.\n */\n case 'getListaPermissaoUsuario':\n $retorno = [];\n if (@$_POST['idUsuario']) {\n $permissaoDAO = new PermissaoDAO();\n $usuarioDAO = new UsuarioDAO();\n if ($usuarioDAO->getUsuarioAdministrador($_POST['idUsuario'])) {\n $retorno = $permissaoDAO->getListaPermissaoVetor();\n } else {\n $retorno = $permissaoDAO->getListaPermissaoVetor($_POST['idUsuario']);\n }\n }\n print_r(json_encode($retorno));\n die();\n }\n }\n echo 1;\n }", "function consultarOtro(){\n $queryconsultarOtro=$this->mdlOrdenes->consultarOtro(base64_decode($_POST[\"idAtencion\"]));\n echo json_encode($queryconsultarOtro);\n }", "public function peticion(){\n\t\t//1' el nombre del nonce que creamos\n\t\t//2' par es el argumento de la consulta recibida desde la peticion de js con ajax\n\t\tcheck_ajax_referer('mp_seg', 'nonce');\n\t\t\n\t\tif( isset($_POST['action'] ) ) {\n\t\t\t\n\t\t\n\t\t\t//procesar informacion\n\t\t\t//guardad DDBB, guardar algunas opciomnes un USER_meta, metadato\n\t\t\t$nombre = $_POST['nombre'];\n\t\t\techo json_encode([\"resultado\" => \"Hemos recibido correctamente el nombre: $nombre\"]);\n\t\t\t\n\t\t\twp_die();//cortar toda comunicacion\n\t\t}\n\t}", "function consultarExamenEspecializado(){\n $queryconsultarExamenE=$this->mdlOrdenes->consultarExamenEspecializado(base64_decode($_POST[\"idAtencion\"]));\n echo json_encode($queryconsultarExamenE);\n }", "public function buscaSalidaAjax($codigo){\n\n $res = Datos::mdlSalidasAjax($codigo);\n //echo $res[\"noOperacion\"];\n if ($res==\"\"){\n \t//echo $res[\"noOperacion\"];\n echo 0;\n }\n else {\n \t //echo $res[\"noOperacion\"];\n echo 1;\n }\n\n }", "public function get_resultado_final(){\n if($this->input->is_ajax_request() && $this->input->post()){\n $post = $this->input->post();\n $rf_id = $this->security->xss_clean($post['rf_id']);\n\n $dato_rfinal = $this->model_mestrategico->get_resultado_final($rf_id);\n \n $result = array(\n 'resultado' => $dato_rfinal\n );\n\n echo json_encode($result);\n }else{\n show_404();\n }\n }", "function consultarIncapacidad(){\n $queryconsultarIncapacidad=$this->mdlOrdenes->consultarIncapacidad(base64_decode($_POST[\"idAtencion\"]));\n echo json_encode($queryconsultarIncapacidad);\n }", "public function ajaxGetAction()\n {\n $this->view->disable();\n $response = new \\Phalcon\\Http\\Response();\n if (!$this->request->isAjax()) {\n echo \"is not Ajax ! \";\n }\n if (!$this->request->isPost()) {\n echo \"is not Post ! \";\n }\n $tokuisaki_bunrui4 = TokuisakiBunrui4Kbns::find(array(\n 'order' => 'cd',\n 'conditions' => ' cd LIKE ?1 ',\n 'bind' => array(1 => $this->request->getPost('cd').'%')\n ));\n $res_flds = [\"id\",\"cd\",\"name\",];\n $resData = array();\n foreach ($tokuisaki_bunrui4 as $bunrui4) {\n $resAdata = array();\n foreach ($res_flds as $res_fld) {\n $resAdata[$res_fld] = $bunrui4->$res_fld;\n }\n $resData[] = $resAdata;\n }\n $response->setContent(json_encode($resData));\n return $response;\n }", "public function get_res_info(){\n $data = M('resources')->where('state = 0 and uid ='.$_SESSION['admin']['id'].' and ocode ='.$_SESSION['admin']['school_id'])->field('id,uptime,size,title,srctitle')->select();\n $this->successajax('',$data);\n }", "public function ajaxTraerEspecialidad(){\n\n\t\t$item = \"idEspecialidad\";\n\t\t$valor = $this->idEspecialidad;\n\t\t$respuesta = ControladorAdmision::ctrMostrarEspecialidad($item, $valor);\n\n\t\techo json_encode($respuesta);\n\n\t}", "function consultarTratamiento(){\n $queryConsultarTratamiento=$this->mdlOrdenes->consultarTratamiento(base64_decode($_POST[\"idAtencion\"]));\n echo json_encode($queryConsultarTratamiento);\n\n }", "function get_formulariorequisitos()\n {\n //if($this->acceso(103)) {\n if ($this->input->is_ajax_request()) {\n $postulante_id = $this->input->post('postulante_id');\n $this->load->model('Formulario_autentificacion_model');\n $datos = $this->Formulario_autentificacion_model->get_all_formulario_postulante($postulante_id);\n echo json_encode($datos);\n }else{ \n show_404();\n }\n //}\n }", "static public function onWpAjaxRecupCodePromo() {\n\n\t//Nouvelle methode search - par hemraj 11/20/2017\n check_ajax_referer( 'recupCodePromo', 'security' );\n\t$search = new search($_POST['data']);\n\t$newSearch = $search->setNewSearch($_POST['data']);\n\t//print_r($newSearch);\n echo json_encode($newSearch);\n \texit;\n\t}", "function ajax_getMensajeros(){\n $query = \"SELECT U.id, U.nombre, U.paterno, U.materno, U.no_empleado, U.puesto, U.correo, U.ultima_sesion, U.departamento, U.activo, U.jefe_directo, U.autorizador_compras, U.autorizador_compras_venta, concat(U.nombre, ' ', U.paterno) as User, concat(U.nombre, ' ', U.paterno, ' ', U.materno) as CompleteName from usuarios U inner join privilegios P on P.usuario = U.id where U.activo = '1'\";// having Name like '%$texto%'\";\n $query .= \" and P.mensajero = '1'\";\n $query .= \" order by User\";\n \n $res = $this->Conexion->consultar($query);\n if($res)\n {\n echo json_encode($res);\n }\n\n }", "public function ajax_details()\n\t{\n\t\t$member_id = $this->input->post(\"id\");\n\t\t\n\t\t$returnAJAX = $this->members_model->read_form($member_id);\n\n\t\techo json_encode($returnAJAX);\n\t}", "function rest_get($request, $data) {\n //Autentikacija\n if(!isset($_SESSION['username'])){\n header(\"Location: http://\" . $_SERVER[\"HTTP_HOST\"]. \"/error.html\");\n }\n $array = explode(\"/\", $request);\n $priv = $array[count($array)-2];\n $tmp = $array[count($array)-1];\n $username = htmlentities($tmp);\n $klasa = htmlentities($priv);\n try{\n $veza = connect();\n }catch (PDOException $ex){\n echo $ex->getMessage();\n die();\n }\n if($klasa===\"admin\"){\n if($username===\"all\"){\n $admini = $veza->query(\n \"SELECT username, registrovan, email FROM korisnici WHERE admin='1'\"\n );\n print \"{ \\\"admini\\\": \" . json_encode($admini->fetchAll()) . \"}\";\n }else{\n $admini = $veza->prepare(\n \"SELECT username, registrovan, email FROM korisnici WHERE admin='1' AND username=?\"\n );\n $admini->execute(\n array($username)\n );\n print \"{ \\\"admin\\\": \" . json_encode($admini->fetchAll()) . \"}\";\n }\n }\n\n}", "public function ajaxCodsPrestamo(){\n\n\t\t$item = \"idPrestamo\";\n\t\t$valor = $this->idPrestamo;\n\n\t\t$respuesta = ControladorArticulos::ctrMostrarArticulosCodPrestados($item, $valor);\n\t\techo json_encode($respuesta);\n\n\t}", "function getData() {\r\n // get srId from URL\r\n $srID = URL::getParameter('sr_id');\r\n if (!$srID) {\r\n // get srID from incident\r\n if (!$incidentID = intval(URL::getParameter('i_id'))) {\r\n echo $this->reportError('Invalid ID');\r\n return;\r\n }\r\n $incident = RNCPHP\\Incident::fetch(intval($incidentID));\r\n if (!is_null($incident)) {\r\n $srID = $incident->CustomFields->Accelerator->siebel_sr_id;\r\n }\r\n }\r\n\r\n // render data to javascript\r\n $this->data['js']['sr_id'] = $srID;\r\n $this->data['js']['ext_server_type'] = $this->extServerType;\r\n $this->data['js']['development_mode'] = IS_DEVELOPMENT;\r\n }", "public function ajaxTraerTExam(){\n\n\t\t$item = \"idExamen\";\n\t\t$valor = $this->idEspecialidad;\n\t\t$respuesta = ModeloAdmision::mdlMostrar(\"examen\",$item, $valor);\n\t\techo json_encode($respuesta);\n\n\t}", "function _dispen_hari(){\n\t\t$CI =& get_instance();\n\t\t$api_url \t= URL_API_SIA.'sia_sistem/data_view';\n\t\t$parameter = array('api_kode' =>200002, 'api_subkode' => 1, 'api_search' => array());\n\t\t$data \t\t= $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\treturn $data[0]->KADALUWARSA_HARI1;\n\t}", "function Grabar_Incidente($modulo,$plataforma,$tipo,$persona,$desc,$prioridad){\n //instanciamos el objeto para generar la respuesta con ajax\n $respuesta = new xajaxResponse();\n $ClsInc = new ClsIncidente();\n //pasa a mayusculas\n\t\t$persona = trim($persona);\n\t\t$desc = trim($desc);\n\t//--------\n\t//decodificaciones de tildes y Ñ's\n\t\t$persona = utf8_encode($persona);\n\t\t$desc = utf8_encode($desc);\n\t\t//--\n\t\t$persona = utf8_decode($persona);\n\t\t$desc = utf8_decode($desc);\n\t//--------\n\tif($modulo != \"\" && $plataforma != \"\" && $tipo != \"\" && $prioridad != \"\" && $desc != \"\"){\n\t\t$codigo = $ClsInc->max_incidente();\n\t\t$codigo++;\n\t\t$sql = $ClsInc->insert_incidente($codigo,$modulo,$plataforma,$tipo,$persona,$desc,$prioridad,'');\n\t\t//$respuesta->alert(\"$sql\");\n\t\t$rs = $ClsInc->exec_sql($sql);\n\t\tif($rs == 1){\n\t\t\t$respuesta->script('swal(\"Excelente!\", \"Reporte registrado satisfactoriamente!!!\", \"success\").then((value)=>{ window.location.href=\"FRMtablero.php\" });');\n\t\t}else{\n\t\t\t$respuesta->script('swal(\"Error\", \"Error en la transacci\\u00F3n\", \"error\").then((value)=>{ cerrar(); });');\n\t\t}\n\t}\n \t\t\n return $respuesta;\n}", "public function getDataByMNic(){\r\n\t\t$this->load->model('gs_admission/ajax_base_model', 'AB');\r\n\t\t\r\n\r\n\t\t$m_nic = $this->input->post(\"m_nic\");\r\n\t\t\r\n\t\tif($m_nic != ''){\r\n\t\t\t\r\n\t\t\t$results = $this->AB->getFamilyDataByMNic($m_nic);\t\r\n\t\t\techo json_encode ( $results );\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public function searchdatacollecteurvalAction()\r\n\t{\r\n Zend_Session::start();\r\n\r\n $this->_helper->layout()->disableLayout();\r\n $dataOperator = $this->operateurORM->getCollecteurPendByCode(\"\",\"\",$_SESSION['utilisateur']['codeCommune'],\"\");\r\n\t\t\r\n foreach ($dataOperator as $keyOperator => $valueOperator) {\r\n $dataOperator[$keyOperator]['NOMEXPLOITANT'] = \"<a href='../validate/operator?code=\".$dataOperator[$keyOperator]['CODEEXPL'].\"' id='id_detail' onclick='detail_ajax(\".$dataOperator[$keyOperator]['CODEEXPL'].\")'>\".$dataOperator[$keyOperator]['NOMEXPLOITANT'].\"</a>\";\r\n $dataOperator[$keyOperator]['type'] = \"\";\r\n\t\t\t\r\n $type = $this->typeORM->getTypeByCode($valueOperator['CODETYP']);\r\n $dataOperator[$keyOperator]['type'] = $type[0]['DESIGNATIO_TYPE'];\r\n\r\n };\r\n\t\t\r\n\t\t$jsonData['data'] = $dataOperator;\r\n echo json_encode($jsonData);\r\n\t}", "function getdata(){\n\t\t$grid = $this->jqdatagrid;\n\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('spre');\n\n\t\t$response = $grid->getData('spre', array(array()), array(), false, $mWHERE, 'id', 'desc' );\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "public function consultarGrilla() {\n if(!$this->input->is_ajax_request()) {\n show_error('Usted no está autorizado para acceder.', 403, 'Acceso no autorizado');\n return false;\n }\n $this->load->model(\"personas/modpersonas\", \"mpers\");\n $this->load->model(\"modform\", \"mform\");\n\n $response['codiError'] = 0;\n $response['mensaje'] = '';\n $response['data'][0]['tipo_docu'] = '';\n $response['data'][0]['nume_docu'] = '';\n $response['data'][0]['fecha_expe'] = '';\n $response['data'][0]['nombre'] = '';\n $response['data'][0]['jefe'] = '';\n $response['data'][0]['sexo'] = '';\n $response['data'][0]['edad'] = '';\n $response['data'][0]['opciones'] = '';\n $arrParam = array(\n 'codiEncuesta' => $this->session->userdata('codiEncuesta'),\n 'codiVivienda' => $this->session->userdata('codiVivienda'),\n 'codiHogar' => $this->session->userdata('codiHogar'),\n 'sidx' => 'PH.P_NRO_PER'\n );\n $arrPers = $this->mpers->consultarPersonas($arrParam);\n //pr($arrPers); exit;\n if(count($arrPers) > 0) {\n $arrTipoDocuPers = $this->mform->consultarRespuestaDominio(array('idDominio' => 26));\n $arrSexos = $this->mform->consultarRespuestaDominio(array('idDominio' => 27));\n $arrCF = $this->mform->consultarOpciones('P_JEFE_HOGAR');\n foreach ($arrPers as $kp => $vp) {\n $tipoDocu = $sexo = '';\n $jefe = 'No';\n foreach ($arrTipoDocuPers as $ktd => $vtd) {\n if($vtd['ID_VALOR'] == $vp['PA_TIPO_DOC']) {\n $tipoDocu = $vtd['ETIQUETA'];\n }\n }\n foreach ($arrSexos as $kse => $vse) {\n if($vse['ID_VALOR'] == $vp['P_SEXO']) {\n $sexo = $vse['ETIQUETA'];\n }\n }\n if(!empty($vp['P_NRO_PER']) && $vp['P_NRO_PER'] == 1) {\n $jefe = 'Sí';\n }\n $response['data'][$kp]['tipo_docu'] = $tipoDocu;\n $response['data'][$kp]['nume_docu'] = $vp['PA1_NRO_DOC'];\n $response['data'][$kp]['fecha_expe'] = $vp['FECHAEXPE'];\n $response['data'][$kp]['nombre'] = $vp['nombre'];\n $response['data'][$kp]['jefe'] = $jefe;\n $response['data'][$kp]['sexo'] = $sexo;\n $response['data'][$kp]['edad'] = $vp['P_EDAD'];\n $response['data'][$kp]['opciones'] = '\n <button class=\"editarPersona btn btn-sm btn-primary\" type=\"button\" data-idpers=\"' . $vp['ID_PERSONA_HOGAR'] . '\" title=\"Editar\">\n <span class=\"glyphicon glyphicon-edit\" aria-hidden=\"true\"></span></button>\n &nbsp;<button class=\"eliminarPersona btn btn-sm btn-danger\" type=\"button\" data-idpers=\"' . $vp['ID_PERSONA_HOGAR'] . '\" title=\"Eliminar\">\n <span class=\"glyphicon glyphicon-remove\" aria-hidden=\"true\"></span></button>';\n }\n }\n //pr($response); exit;\n $this->output->set_content_type('application/json', 'utf-8')->set_output(json_encode($response));\n }", "public function consultarGrilla() {\n if(!$this->input->is_ajax_request()) {\n show_error('Usted no está autorizado para acceder.', 403, 'Acceso no autorizado');\n return false;\n }\n $this->load->model(\"personas/modpersonas\", \"mpers\");\n $this->load->model(\"modform\", \"mform\");\n\n $response['codiError'] = 0;\n $response['mensaje'] = '';\n $response['data'][0]['tipo_docu'] = '';\n $response['data'][0]['nume_docu'] = '';\n $response['data'][0]['fecha_expe'] = '';\n $response['data'][0]['nombre'] = '';\n $response['data'][0]['jefe'] = '';\n $response['data'][0]['sexo'] = '';\n $response['data'][0]['edad'] = '';\n $response['data'][0]['opciones'] = '';\n $arrParam = array(\n 'codiEncuesta' => $this->session->userdata('codiEncuesta'),\n 'codiVivienda' => $this->session->userdata('codiVivienda'),\n 'codiHogar' => $this->session->userdata('codiHogar'),\n 'sidx' => 'PH.P_NRO_PER'\n );\n $arrPers = $this->mpers->consultarPersonas($arrParam);\n //pr($arrPers); exit;\n if(count($arrPers) > 0) {\n $arrTipoDocuPers = $this->mform->consultarRespuestaDominio(array('idDominio' => 26));\n $arrSexos = $this->mform->consultarRespuestaDominio(array('idDominio' => 27));\n $arrCF = $this->mform->consultarOpciones('P_JEFE_HOGAR');\n foreach ($arrPers as $kp => $vp) {\n $tipoDocu = $sexo = '';\n $jefe = 'No';\n foreach ($arrTipoDocuPers as $ktd => $vtd) {\n if($vtd['ID_VALOR'] == $vp['PA_TIPO_DOC']) {\n $tipoDocu = $vtd['ETIQUETA'];\n }\n }\n foreach ($arrSexos as $kse => $vse) {\n if($vse['ID_VALOR'] == $vp['P_SEXO']) {\n $sexo = $vse['ETIQUETA'];\n }\n }\n if(!empty($vp['P_NRO_PER']) && $vp['P_NRO_PER'] == 1) {\n $jefe = 'Sí';\n }\n $response['data'][$kp]['tipo_docu'] = $tipoDocu;\n $response['data'][$kp]['nume_docu'] = $vp['PA1_NRO_DOC'];\n $response['data'][$kp]['fecha_expe'] = $vp['FECHAEXPE'];\n $response['data'][$kp]['nombre'] = $vp['nombre'];\n $response['data'][$kp]['jefe'] = $jefe;\n $response['data'][$kp]['sexo'] = $sexo;\n $response['data'][$kp]['edad'] = $vp['P_EDAD'];\n $response['data'][$kp]['opciones'] = '\n <button class=\"editarPersona btn btn-sm btn-primary\" type=\"button\" data-idpers=\"' . $vp['ID_PERSONA_HOGAR'] . '\" title=\"Editar\">\n <span class=\"glyphicon glyphicon-edit\" aria-hidden=\"true\"></span></button>\n &nbsp;<button class=\"eliminarPersona btn btn-sm btn-danger\" type=\"button\" data-idpers=\"' . $vp['ID_PERSONA_HOGAR'] . '\" title=\"Eliminar\">\n <span class=\"glyphicon glyphicon-remove\" aria-hidden=\"true\"></span></button>';\n }\n }\n //pr($response); exit;\n $this->output->set_content_type('application/json', 'utf-8')->set_output(json_encode($response));\n }", "function ajax()\n {\n $json = \"\";\n $registros = $this->model->getRegistros();\n \n if($registros){\n $url_modificar = \"'\".base_url().\"index.php/\".$this->_subject.\"/abm/\";\n $btn_class = \"'btn btn-default'\";\n $icon_class = \"'fa fa-pencil-square-o'\";\n foreach ($registros as $row) {\n $url_final = $row->id_log.\"'\";\n \n $buttons = '<a class='.$btn_class.' href='.$url_modificar.$url_final.'><i class='.$icon_class.'></i></a> ';\n \n $registro = array(\n $row->date_add,\n $row->accion,\n $row->user_add,\n $row->programa,\n $buttons,\n );\n \n $json .= setJsonContent($registro);\n }\n } \n \n $json = substr($json, 0, -2);\n \n echo '{ \"data\": ['.$json.' ] }';\n }", "public function ajaxVisuaDocente(){\n $item =\"id\";\n $valor = $this->idDocente;\n $respuesta = ControladorDocentes::ctrMostrarDocentes($item,$valor);\n echo json_encode($respuesta);\n\n}" ]
[ "0.67178434", "0.6583864", "0.65572786", "0.62899625", "0.62737375", "0.61827165", "0.6084496", "0.6059378", "0.6057687", "0.6052357", "0.59945935", "0.59898627", "0.59655386", "0.5953913", "0.594476", "0.5921933", "0.5882459", "0.58664733", "0.5855018", "0.58519685", "0.5844024", "0.5842255", "0.58394444", "0.58257407", "0.58179194", "0.5811851", "0.57895005", "0.57895005", "0.57861936", "0.57835925" ]
0.7110775
0
AJAX GET SEQUENCE NUMBER OF ACCOUNT SAVING NO
function get_seq_account_saving_no() { $product_code=$this->input->post('product_code'); $cif_no=$this->input->post('cif_no'); $data=$this->model_transaction->get_seq_account_saving_no($product_code,$cif_no); $jumlah=(int)$data['jumlah']; if(count($data)>0){ $newseq=$jumlah+1; if($jumlah<10){ $newseq='0'.$newseq; } }else{ $newseq='01'; } $return=array('newseq'=>$newseq); echo json_encode($return); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_seq_account_financing_no()\n\t{\n\t\t$product_code=$this->input->post('product_code');\n\t\t$cif_no=$this->input->post('cif_no');\n\t\t$data=$this->model_transaction->get_seq_account_financing_no($product_code,$cif_no);\n\t\t$jumlah=(int)$data['jumlah'];\n\t\tif(count($data)>0){\n\t\t\t$newseq=$jumlah+1;\n\t\t\tif($jumlah<10){\n\t\t\t\t$newseq='0'.$newseq;\n\t\t\t}\n\t\t}else{\n\t\t\t$newseq='01';\n\t\t}\n\t\t$return=array('newseq'=>$newseq);\n\t\techo json_encode($return);\n\t}", "public function getSequenceNo()\n {\n $session = Mage::getSingleton('core/session');\n $number = $session->getSequenceNo() ? : 0;\n $session->setSequenceNo($number + 1);\n return $number;\n }", "public function getSequence_no()\n {\n return $this->sequence_no;\n }", "public function calcularId(){\n\n $registros = PorcentajeBecaArancel::All();\n\n $max_valor = count($registros);\n\n\n if($max_valor > 0){\n\n $max_valor++;\n\n } else {\n\n $max_valor = 1;\n }\n\n return $max_valor;\n\n }", "public function getSequenceNumber();", "public function getSequenceNumber();", "public function getRecurringNumber();", "private function getOrderNumber()\n {\n $number = Shopware()->Db()->fetchOne(\"/*NO LIMIT*/ SELECT number FROM s_order_number WHERE name='invoice' FOR UPDATE\");\n Shopware()->Db()->executeUpdate(\"UPDATE s_order_number SET number = number + 1 WHERE name='invoice'\");\n $number += 1;\n\n return $number;\n }", "public function get_next_id() {\n\n $query = $this->db->query('SELECT getNextSeq(\"company_seq as id\");');\n // print \"<pre>\";\n\n $object = $query->result()[0];\n\n // print_r($object);\n\n $array = get_object_vars($object);\n\n // print_r($array);\n // print_r($array['getNextSeq(\"company_seq as id\")']);\n\n $result_id = $array['getNextSeq(\"company_seq as id\")'];\n //echo $result_id;//[0]['id'];\n // print \"</pre>\";\n // exit(); \n\n return $result_id;\n }", "function getOrdonnanceId($sequenceName){\n $db=new Bdd();\n $bdd=$db->bddConnect();\n \n $retval = $bdd->countersOrdonnance->findOneAndUpdate(\n array('_id' => $sequenceName),\n array('$inc' => array(\"seq\" => 1))\n \n );\n $idIncrement=$retval[\"seq\"]+1;\n \n \n return $idIncrement;\n }", "public function getNumber(){\n if ( is_null($this->number) ){\n $number = $this->getTable()->getNextBillingNumber($this->getCourier(), 'rest');\n $this->number = \"R-\".date('y',$this->from).date('m',$this->from).\"-\".$this->getCourier()->getCustomerNr().\"-\".$number;\n }\n return $this->number;\n }", "public function get_New_CA_NO(){\n\t\t$this->db->select_max('MJ_CA_ID');\n\t\t$query = $this->db->get('MJ_COMPLAINT_ACTION_DTL'); \n\t\t$row = $query->row();\n \t\t\n\t\tif (isset($row))\n\t\t return $row->MJ_CA_ID + 1;\n\t}", "public function numerodocumento(){\n\n $row = DocumentoCabecera::where('id_tipodocumento', '=', '1')->orderbyDesc('fechaemision')->select('numero')->first();\n\n if($row == null){\n $numero = 100;\n }else {\n $numero = $row->numero + 1;\n }\n\n\n return response()->json([\n 'data' => $numero\n ], 200);\n\n }", "function getPharmacienId($sequenceName){\n $db=new Bdd();\n $bdd=$db->bddConnect();\n $collection = $bdd->countersPharmacien;\n \n $retval = $bdd->countersPharmacien->findOneAndUpdate(\n array('_id' => $sequenceName),\n array('$inc' => array(\"seq\" => 1))\n \n );\n $idIncrement=$retval[\"seq\"]+1;\n \n \n return $idIncrement;\n }", "public function getOrderNumber();", "public function getOrderNumber();", "function cria_seq()\n{\n global $db;\n $sql=\"SELECT max(seq_restauro) as valor from restauro where tombo = '$_REQUEST[pNum_registro]' and controle='$_REQUEST[controle]' and tipo=4 and interna='I'\";\n $db->query($sql);\n $res=$db->dados(); \n if($res['valor']==null){\n echo 1;}\n else{\n echo $res['valor']+1;}\n}", "public function get_sequence_no() {\n\n\t\treturn $this->sequence_no;\n\t}", "public static function getLastInvoice() {\r\n \t\r\n \t// Check if a year is passed\r\n \tself::checkSettings();\r\n \t\r\n $record = Doctrine_Query::create ()\r\n ->select ( 'next_number' )\r\n ->from ( 'InvoicesSettings is' )\r\n ->where('is.year = ?', date('Y'))\r\n\t\t\t\t->andWhere('is.isp_id = ?',Shineisp_Registry::get('ISP')->isp_id)\r\n ->limit ( 1 )\r\n\t\t\t\t->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\r\n\r\n if (count ( $record ) > 0) {\r\n return $record[0] ['next_number'];\r\n } else {\r\n return 1;\r\n }\r\n }", "public function getTransactionNumber();", "public function getNumeroCarteAgence()\n {\n $query_rq_numero = \"SELECT agence.idcard FROM agence WHERE agence.rowid = :agence\";\n $numero = $this->getConnexion()->prepare($query_rq_numero);\n $numero ->bindParam(\"agence\",$this->idagence);\n $numero->execute();\n $row_rq_numero= $numero->fetchObject();\n //return $this->idagence;\n return $row_rq_numero->idcard;\n }", "function getMedecinId($sequenceName){\n $db=new Bdd();\n $bdd=$db->bddConnect();\n \n $retval = $bdd->countersMedecin->findOneAndUpdate(\n array('_id' => $sequenceName),\n array('$inc' => array(\"seq\" => 1))\n \n );\n $idIncrement=$retval[\"seq\"]+1;\n \n \n return $idIncrement;\n }", "function GettingNewAccountNumber(){\n$db = new dbconnect;\n$db->connect();\n$sql= \"SELECT AccountNumber FROM bank_accounts Order by AccountNumber ASC \";\n$result\t=$db->executesql($sql);\n\nwhile($row = mysqli_fetch_array($result)){\n$AccountNumb=$row[\"AccountNumber\"];\n}\n$AccountNumb+=1;\nreturn $AccountNumb;\n}", "public static function generateItemNo(){\n $year = '20'.date('y');\n $items = Item::count();\n return $year.($items + 1 ) ;\n }", "function getAssuranceMaladieId($sequenceName){\n $db=new Bdd();\n $bdd=$db->bddConnect();\n \n $retval = $bdd->countersAssuranceMaladie->findOneAndUpdate(\n array('_id' => $sequenceName),\n array('$inc' => array(\"seq\" => 1))\n \n );\n $idIncrement=$retval[\"seq\"]+1;\n \n \n return $idIncrement;\n }", "function getCorrespondreMedicamentId($sequenceName){\n $db=new Bdd();\n $bdd=$db->bddConnect();\n \n $retval = $bdd->countersCorrespondreMedicament->findOneAndUpdate(\n array('_id' => $sequenceName),\n array('$inc' => array(\"seq\" => 1))\n \n );\n $idIncrement=$retval[\"seq\"]+1;\n \n \n return $idIncrement;\n }", "function generate_application_no()\n {\n $token = 'O-AA00001';\n $last = \\DB::table('applications')->orderBy('id','DESC')->lock()->first();\n\n //todo: optimize this function\n if ($last) {\n $token = ++$last->application_no;\n }\n return $token;\n }", "public function get_count_invoice() {\n $id = $this->input->post('pay_id');\n $result = $this->classtraineemodel->get_count_invoice($id);\n \n echo count($result);\n }", "public function getRecordsNumbers() {}", "function gen_ID() {\r\n openDB();\r\n global $db;\r\n $query = \"SELECT lpa_inv_no FROM lpa_invoices ORDER BY lpa_inv_no DESC LIMIT 1\";\r\n $result = $db->query($query);\r\n $row = $result->fetch_assoc();\r\n $ID = (int) $row['lpa_inv_no'];\r\n return $ID + 1;\r\n\r\n}" ]
[ "0.6781912", "0.61204624", "0.60750926", "0.60463876", "0.5989816", "0.5989816", "0.598144", "0.5971348", "0.5900139", "0.58957845", "0.58628964", "0.58603454", "0.58549565", "0.582057", "0.5814559", "0.5814559", "0.5799397", "0.5794567", "0.57906157", "0.5776012", "0.5775988", "0.57255614", "0.5698126", "0.56795233", "0.5677583", "0.5662581", "0.56329936", "0.56308", "0.5616907", "0.5604696" ]
0.71245205
0
AJAX GET SEQUENCE NUMBER OF ACCOUNT FINANCING NO
function get_seq_account_financing_no() { $product_code=$this->input->post('product_code'); $cif_no=$this->input->post('cif_no'); $data=$this->model_transaction->get_seq_account_financing_no($product_code,$cif_no); $jumlah=(int)$data['jumlah']; if(count($data)>0){ $newseq=$jumlah+1; if($jumlah<10){ $newseq='0'.$newseq; } }else{ $newseq='01'; } $return=array('newseq'=>$newseq); echo json_encode($return); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_seq_account_saving_no()\n\t{\n\t\t$product_code=$this->input->post('product_code');\n\t\t$cif_no=$this->input->post('cif_no');\n\t\t$data=$this->model_transaction->get_seq_account_saving_no($product_code,$cif_no);\n\t\t$jumlah=(int)$data['jumlah'];\n\t\tif(count($data)>0){\n\t\t\t$newseq=$jumlah+1;\n\t\t\tif($jumlah<10){\n\t\t\t\t$newseq='0'.$newseq;\n\t\t\t}\n\t\t}else{\n\t\t\t$newseq='01';\n\t\t}\n\t\t$return=array('newseq'=>$newseq);\n\t\techo json_encode($return);\n\t}", "public function getSequenceNo()\n {\n $session = Mage::getSingleton('core/session');\n $number = $session->getSequenceNo() ? : 0;\n $session->setSequenceNo($number + 1);\n return $number;\n }", "public function getSequence_no()\n {\n return $this->sequence_no;\n }", "public function getBillingCycleSequence(): int\n {\n return $this->{self::BILLING_CYCLE_SEQUENCE};\n }", "public function getSequenceNumber();", "public function getSequenceNumber();", "public function getSequenceNumber() \n {\n $iCount = $this->_oFcpoDb->GetOne(\"SELECT MAX(fcpo_sequencenumber) FROM fcpotransactionstatus WHERE fcpo_txid = '{$this->oxorder__fcpotxid->value}'\");\n\n $iReturn = ($iCount === null) ? 0 : $iCount + 1;\n\n return $iReturn;\n }", "public function get_sequence_no() {\n\n\t\treturn $this->sequence_no;\n\t}", "function cria_seq()\n{\n global $db;\n $sql=\"SELECT max(seq_restauro) as valor from restauro where tombo = '$_REQUEST[pNum_registro]' and controle='$_REQUEST[controle]' and tipo=4 and interna='I'\";\n $db->query($sql);\n $res=$db->dados(); \n if($res['valor']==null){\n echo 1;}\n else{\n echo $res['valor']+1;}\n}", "public function calcularId(){\n\n $registros = PorcentajeBecaArancel::All();\n\n $max_valor = count($registros);\n\n\n if($max_valor > 0){\n\n $max_valor++;\n\n } else {\n\n $max_valor = 1;\n }\n\n return $max_valor;\n\n }", "public function getRecurringNumber();", "public function getNumber(){\n if ( is_null($this->number) ){\n $number = $this->getTable()->getNextBillingNumber($this->getCourier(), 'rest');\n $this->number = \"R-\".date('y',$this->from).date('m',$this->from).\"-\".$this->getCourier()->getCustomerNr().\"-\".$number;\n }\n return $this->number;\n }", "public function get_New_CA_NO(){\n\t\t$this->db->select_max('MJ_CA_ID');\n\t\t$query = $this->db->get('MJ_COMPLAINT_ACTION_DTL'); \n\t\t$row = $query->row();\n \t\t\n\t\tif (isset($row))\n\t\t return $row->MJ_CA_ID + 1;\n\t}", "public function getTransactionNumber();", "public static function getLastInvoice() {\r\n \t\r\n \t// Check if a year is passed\r\n \tself::checkSettings();\r\n \t\r\n $record = Doctrine_Query::create ()\r\n ->select ( 'next_number' )\r\n ->from ( 'InvoicesSettings is' )\r\n ->where('is.year = ?', date('Y'))\r\n\t\t\t\t->andWhere('is.isp_id = ?',Shineisp_Registry::get('ISP')->isp_id)\r\n ->limit ( 1 )\r\n\t\t\t\t->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\r\n\r\n if (count ( $record ) > 0) {\r\n return $record[0] ['next_number'];\r\n } else {\r\n return 1;\r\n }\r\n }", "public function get_next_id() {\n\n $query = $this->db->query('SELECT getNextSeq(\"company_seq as id\");');\n // print \"<pre>\";\n\n $object = $query->result()[0];\n\n // print_r($object);\n\n $array = get_object_vars($object);\n\n // print_r($array);\n // print_r($array['getNextSeq(\"company_seq as id\")']);\n\n $result_id = $array['getNextSeq(\"company_seq as id\")'];\n //echo $result_id;//[0]['id'];\n // print \"</pre>\";\n // exit(); \n\n return $result_id;\n }", "function generarNumOC(){\n\t\t$this->procedimiento='adq.f_cotizacion_ime';\n\t\t$this->transaccion='ADQ_GENOCDE_IME';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function generate_application_no()\n {\n $token = 'O-AA00001';\n $last = \\DB::table('applications')->orderBy('id','DESC')->lock()->first();\n\n //todo: optimize this function\n if ($last) {\n $token = ++$last->application_no;\n }\n return $token;\n }", "public function getAccNo()\n {\n return $this->acc_no;\n }", "private function getOrderNumber()\n {\n $number = Shopware()->Db()->fetchOne(\"/*NO LIMIT*/ SELECT number FROM s_order_number WHERE name='invoice' FOR UPDATE\");\n Shopware()->Db()->executeUpdate(\"UPDATE s_order_number SET number = number + 1 WHERE name='invoice'\");\n $number += 1;\n\n return $number;\n }", "public function getSequence(): int\n {\n return $this->sequence;\n }", "function getOrdonnanceId($sequenceName){\n $db=new Bdd();\n $bdd=$db->bddConnect();\n \n $retval = $bdd->countersOrdonnance->findOneAndUpdate(\n array('_id' => $sequenceName),\n array('$inc' => array(\"seq\" => 1))\n \n );\n $idIncrement=$retval[\"seq\"]+1;\n \n \n return $idIncrement;\n }", "protected function _fcpoGetNextOrderNr() \n {\n $oConfig = $this->_oFcpoHelper->fcpoGetConfig();\n $sShopVersion = $oConfig->getVersion();\n\n if (version_compare($sShopVersion, '4.6.0', '>=')) {\n $oCounter = $this->_oFcpoHelper->getFactoryObject('oxCounter');\n $sOrderNr = $oCounter->getNext($this->_getCounterIdent());\n } else {\n $sQuery = \"SELECT MAX(oxordernr)+1 FROM oxorder LIMIT 1\";\n $sOrderNr = $this->_oFcpoDb->GetOne($sQuery);\n }\n\n return $sOrderNr;\n }", "function get_order_number() {\r\n $conn = $this->db->conn_id;\r\n $stmt = oci_parse($conn, \"BEGIN :v_Return := PRODUCT_ACTIONS.NEXT_ORDER_NUMBER(); END;\");\r\n oci_bind_by_name($stmt, ':v_Return', $result, SQLT_STR);\r\n\r\n if (!oci_execute($stmt)) {\r\n return oci_error($stmt);\r\n }\r\n return $result;\r\n }", "public function getSequenceNumber()\n {\n return $this->sequence_number;\n }", "public function getSequenceNumber()\n {\n return $this->sequence_number;\n }", "public function getIdSap() {\r\n\r\n $conn = DBALConnection::getDBALConection();\r\n\r\n $sql = \"select id from lasasap.sequence\";\r\n $stmt = $conn->prepare($sql);\r\n $stmt->execute();\r\n $resultId = $stmt->fetchAll();\r\n\r\n $idSeq = $resultId[0]['id'] + 1;\r\n\r\n if ($idSeq) {\r\n $conn->executeUpdate('UPDATE lasasap.sequence SET id = ? where id =?', array($idSeq, $resultId[0]['id']));\r\n }\r\n\r\n return str_pad($idSeq, 10, 0, STR_PAD_LEFT);\r\n }", "function getMedecinId($sequenceName){\n $db=new Bdd();\n $bdd=$db->bddConnect();\n \n $retval = $bdd->countersMedecin->findOneAndUpdate(\n array('_id' => $sequenceName),\n array('$inc' => array(\"seq\" => 1))\n \n );\n $idIncrement=$retval[\"seq\"]+1;\n \n \n return $idIncrement;\n }", "function nhhl_sequential(){\n global $ninja_forms_processing;\n $form_id = $ninja_forms_processing->get_form_ID();\n if ($form_id == 48) {\n Ninja_Forms()->subs()->get(\n $args = array(\n 'form_id' => $form_id,\n )\n );\n $subs = Ninja_Forms()->subs()->get( $args );\n foreach ( $subs as $sub ) {\n $seq_num = $sub->get_seq_num();\n }\n $subs_count = count($subs);\n $ninja_forms_processing->update_field_value( 1857, strval($seq_num) + $subs_count + 154000);\n }\n}", "function generate_transaction_number()\n {\n $invice_number = uniqid(rand(100000, 999999), true);\n $replace_value = str_replace(\".\", \"\", $invice_number);\n $substr_value = substr($replace_value, 0, 6);\n $query = mysql_query(\"select transaction_no from credit_debit where transaction_no='$substr_value'\");\n if (mysql_num_rows($query) > 0) {\n \n $this->generate_transaction_number();\n } else {\n return $substr_value;\n }\n }" ]
[ "0.71460027", "0.63934135", "0.63779765", "0.62020904", "0.6124516", "0.6124516", "0.61046284", "0.6083677", "0.6082606", "0.6006412", "0.59524333", "0.5854478", "0.58540463", "0.58228225", "0.5794217", "0.5791291", "0.5790428", "0.57806575", "0.5761429", "0.5754749", "0.572461", "0.57207423", "0.5713025", "0.5663198", "0.5629619", "0.5629619", "0.5610548", "0.5609947", "0.5566426", "0.55602384" ]
0.7341702
0
END CETAK ULANG VALIDASI / | Modul : Update Tanggal Transaksi Jurnal | author : Sayyid Nurkilah | Date : 09/10/2014 10:29
public function jurnal_update_tanggal_transaksi() { $trx_gl_id = $this->input->post('trx_gl_id'); $trx_date = $this->input->post('trx_date'); $voucher_date = $this->input->post('voucher_date'); $jurnal_trx_type = $this->input->post('jurnal_trx_type'); $jurnal_trx_id = $this->input->post('jurnal_trx_id'); // converting date from fromat id(dd/mm/yyyy) to en(yyyy-mm-dd) $trx_date = $this->datepicker_convert(true,$trx_date,'/'); $voucher_date = $this->datepicker_convert(true,$voucher_date,'/'); /* | get trx detail id di tabungan by jurnal trx id | get trx detail id di pembiayaan by jurnal trx id if($jurnal_trx_type=='1'){ $trx_detail_id=$this->model_transaction->get_trx_detail_id_di_tabungan_by_jurnal_trx_id($jurnal_trx_id); } if($jurnal_trx_type=='3'){ $trx_detail_id=$this->model_transaction->get_trx_detail_id_di_pembiayaan_by_jurnal_trx_id($jurnal_trx_id); } */ $data = array('trx_date'=>$trx_date,'voucher_date'=>$voucher_date); $param = array('trx_gl_id'=>$trx_gl_id); /* $data_tabungan = array('trx_date'=>$voucher_date); $param_tabungan = array('trx_account_saving_id'=>$jurnal_trx_id); $data_pembiayaan = array('trx_date'=>$voucher_date); $param_pembiayaan = array('trx_account_financing_id'=>$jurnal_trx_id); $data_trx_detail = array('trx_date'=>$voucher_date); $param_trx_detail = array('trx_detail_id'=>$trx_detail_id); */ $this->db->trans_begin(); $this->model_transaction->update_trx_gl($data,$param); /* | execute update tabungan | execute update pembiayaan if($jurnal_trx_type=='1') { $this->model_transaction->update_trx_account_saving($data_tabungan,$param_tabungan); if($trx_detail_id!=false){ $this->model_transaction->update_trx_detail($data_trx_detail,$param_trx_detail); } } else if($jurnal_trx_type=='3') { $this->model_transaction->update_trx_account_financing($data_pembiayaan,$param_pembiayaan); //pembiayaan if($trx_detail_id!=false){ $this->model_transaction->update_trx_detail($data_trx_detail,$param_trx_detail); } } */ if($this->db->trans_status()===true){ $this->db->trans_commit(); $return = array('success'=>true); }else{ $this->db->trans_rollback(); $return = array('success'=>false); } echo json_encode($return); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update_transaksi_jurnal()\n\t{\n\t\t// echo \"<pre>\";\n\t\t// print_r($_POST);\n\n\t\t$branch_code \t\t= $this->input->post('branch_code');\n\t\t$no_referensi \t\t= $this->input->post('no_referensi2');\n\t\t$deskripsi \t\t\t= $this->input->post('deskripsi2');\n\t\t$tanggal \t\t\t= $this->input->post('tanggal2');\n\t\t$tanggal = str_replace('/', '', $tanggal);\n\t\t$tanggal \t\t\t= substr($tanggal,4,4).'-'.substr($tanggal,2,2).'-'.substr($tanggal,0,2);\n\n\t\t$gl_account_id \t\t= $this->input->post('gl_account_id');\n\t\t$account_code \t\t= $this->input->post('account_code');\n\t\t$credit \t\t\t= $this->convert_numeric($this->input->post('credit'));\n\t\t$debet \t\t\t\t= $this->convert_numeric($this->input->post('debet'));\n\t\t$description \t\t= $this->input->post('description');\n\n\t\t$account_group_code = $this->input->post('account_group_code');\n\t\t$account_type \t\t= $this->input->post('account_type');\n\n\t\t$trx_gl_id \t\t\t= $this->input->post('trx_gl_id');\n\n\t\t$data_trx_gl = array(\n\t\t\t\t// 'trx_gl_id' => $trx_gl_id,\n\t\t\t\t// 'trx_date' \t=> date(\"Y-m-d\"),\n\t\t\t\t'voucher_date' => $tanggal,\n\t\t\t\t'voucher_ref' => $no_referensi,\n\t\t\t\t'branch_code' => $branch_code,\n\t\t\t\t// 'created_by' => $this->session->userdata('user_id'),\n\t\t\t\t// 'jurnal_trx_type' => 0,\n\t\t\t\t'description' => $deskripsi\n\t\t\t\t// 'created_date' => date('Y-m-d H:i:s')\n\t\t\t);\n\t\t$param_trx_gl = array('trx_gl_id'=>$trx_gl_id);\n\n\t\t$data_trx_gl_detail = array();\n\t\tfor ( $i = 0 ; $i < count($gl_account_id) ; $i++ )\n\t\t{\n\t\t\t/** 1. mendapatkan flag D/C. Default = X \n\t\t\t * \t2. mencari amount\n\t\t\t */\n\t\t\t$flag_debit_credit = 'X';\n\t\t\t$amount = 0;\n\t\t\tif ( $credit[$i] > $debet[$i] ) {\n\t\t\t\t$flag_debit_credit = 'C';\n\t\t\t\t$amount = $credit[$i];\n\t\t\t}\n\t\t\telse if ( $credit[$i] < $debet[$i] ) {\n\t\t\t\t$flag_debit_credit = 'D';\n\t\t\t\t$amount = $debet[$i];\n\t\t\t}\n\t\t\t\n\n\t\t\t$data_trx_gl_detail[] = array(\n\t\t\t\t\t'trx_gl_id' => $trx_gl_id,\n\t\t\t\t\t'account_code' => $account_code[$i],\n\t\t\t\t\t'flag_debit_credit' => $flag_debit_credit,\n\t\t\t\t\t'amount' => $amount,\n\t\t\t\t\t'description' => $description[$i],\n\t\t\t\t\t'trx_sequence' => $i\n\t\t\t\t);\n\t\t}\n\n\t\t$this->db->trans_begin();\n\t\t$this->model_transaction->update_trx_gl($data_trx_gl,$param_trx_gl);\n\t\t$this->model_transaction->delete_trx_gl_detail($param_trx_gl);\n\t\t$this->model_transaction->insert_trx_gl_detail($data_trx_gl_detail);\n\t\tif($this->db->trans_status()===true){\n\t\t\t$this->db->trans_commit();\n\t\t\t$return = array('success'=>true,'message'=>'JURNAL BERHASIL DI REVISI!');\n\t\t}else{\n\t\t\t$this->db->trans_rollback();\n\t\t\t$return = array('success'=>false,'message'=>'Failed to insert Journal ! please contact your administrator!');\n\t\t}\n\t\techo json_encode($return);\n\t}", "function master_jual_rawat_update(){\r\n\t\t//POST variable here\r\n\t\t$jrawat_id=trim(@$_POST[\"jrawat_id\"]);\r\n\t\t$jrawat_nobukti=trim(@$_POST[\"jrawat_nobukti\"]);\r\n\t\t$jrawat_nobukti=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_nobukti);\r\n\t\t$jrawat_nobukti=str_replace(\"'\", '\"',$jrawat_nobukti);\r\n\t\t$jrawat_grooming=trim(@$_POST[\"jrawat_grooming\"]);\r\n\t\t\r\n\t\t$jrawat_nobukti_medis=trim(@$_POST[\"jrawat_nobukti_medis\"]);\r\n\t\t$jrawat_nobukti_medis=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_nobukti_medis);\r\n\t\t$jrawat_nobukti_medis=str_replace(\"'\", '\"',$jrawat_nobukti_medis);\r\n\t\t$jrawat_nobukti_pajak=trim(@$_POST[\"jrawat_nobukti_pajak\"]);\r\n\t\t$jrawat_nobukti_pajak=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_nobukti_pajak);\r\n\t\t$jrawat_nobukti_pajak=str_replace(\"'\", '\"',$jrawat_nobukti_pajak);\r\n\t\t$jrawat_total_medis=trim($_POST[\"jrawat_total_medis\"]);\r\n\t\t$jrawat_total_nonmedis=trim($_POST[\"jrawat_total_nonmedis\"]);\r\n\t\t\r\n\t\t$jrawat_cust=trim(@$_POST[\"jrawat_cust\"]);\r\n\t\t$jrawat_tanggal=trim(@$_POST[\"jrawat_tanggal\"]);\r\n\t\t$jrawat_diskon=trim(@$_POST[\"jrawat_diskon\"]);\r\n\t\t$jrawat_cara=trim(@$_POST[\"jrawat_cara\"]);\r\n\t\t$jrawat_cara=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_cara);\r\n\t\t$jrawat_cara=str_replace(\"'\", '\"',$jrawat_cara);\r\n\t\t\r\n\t\t$jrawat_cara2=trim(@$_POST[\"jrawat_cara2\"]);\r\n\t\t$jrawat_cara2=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_cara2);\r\n\t\t$jrawat_cara2=str_replace(\"'\", '\"',$jrawat_cara2);\r\n\t\t\r\n\t\t$jrawat_cara3=trim(@$_POST[\"jrawat_cara3\"]);\r\n\t\t$jrawat_cara3=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_cara3);\r\n\t\t$jrawat_cara3=str_replace(\"'\", '\"',$jrawat_cara3);\r\n\t\t\r\n\t\t$jrawat_keterangan=trim(@$_POST[\"jrawat_keterangan\"]);\r\n\t\t$jrawat_keterangan=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_keterangan);\r\n\t\t$jrawat_keterangan=str_replace(\"'\", '\"',$jrawat_keterangan);\r\n\t\t\r\n\t\t$jrawat_ket_disk=trim(@$_POST[\"jrawat_ket_disk\"]);\r\n\t\t$jrawat_ket_disk=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_ket_disk);\r\n\t\t$jrawat_ket_disk=str_replace(\"'\", '\"',$jrawat_ket_disk);\r\n\t\t\r\n\t\t$jrawat_ket_disk_medis=trim(@$_POST[\"jrawat_ket_disk_medis\"]);\r\n\t\t$jrawat_ket_disk_medis=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_ket_disk_medis);\r\n\t\t$jrawat_ket_disk_medis=str_replace(\"'\", '\"',$jrawat_ket_disk_medis);\r\n\t\t\r\n\t\t$jrawat_stat_dok=trim(@$_POST[\"jrawat_stat_dok\"]);\r\n\t\t$jrawat_stat_dok=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_stat_dok);\r\n\t\t$jrawat_stat_dok=str_replace(\"'\", '\"',$jrawat_stat_dok);\r\n\t\t\r\n\t\t$jrawat_cashback=trim($_POST[\"jrawat_cashback\"]);\r\n\t\t$jrawat_cashback_medis=trim($_POST[\"jrawat_cashback_medis\"]);\r\n\t\t\r\n\t\t//tunai\r\n\t\t$jrawat_tunai_nilai=trim($_POST[\"jrawat_tunai_nilai\"]);\r\n\t\t//tunai-2\r\n\t\t$jrawat_tunai_nilai2=trim($_POST[\"jrawat_tunai_nilai2\"]);\r\n\t\t//tunai-3\r\n\t\t$jrawat_tunai_nilai3=trim($_POST[\"jrawat_tunai_nilai3\"]);\r\n\t\t//voucher\r\n\t\t$jrawat_voucher_no=trim($_POST[\"jrawat_voucher_no\"]);\r\n\t\t$jrawat_voucher_cashback=trim($_POST[\"jrawat_voucher_cashback\"]);\r\n\t\t//voucher-2\r\n\t\t$jrawat_voucher_no2=trim($_POST[\"jrawat_voucher_no2\"]);\r\n\t\t$jrawat_voucher_cashback2=trim($_POST[\"jrawat_voucher_cashback2\"]);\r\n\t\t//voucher-3\r\n\t\t$jrawat_voucher_no3=trim($_POST[\"jrawat_voucher_no3\"]);\r\n\t\t$jrawat_voucher_cashback3=trim($_POST[\"jrawat_voucher_cashback3\"]);\r\n\t\t\r\n\t\t//bayar\r\n\t\t$jrawat_total=trim($_POST[\"jrawat_total\"]);\r\n\t\t$jrawat_bayar=trim($_POST[\"jrawat_bayar\"]);\r\n\t\t$jrawat_subtotal=trim($_POST[\"jrawat_subtotal\"]);\r\n\t\t$jrawat_hutang=trim($_POST[\"jrawat_hutang\"]);\r\n\t\t//card\r\n\t\t$jrawat_card_nama=trim($_POST[\"jrawat_card_nama\"]);\r\n\t\t$jrawat_card_edc=trim($_POST[\"jrawat_card_edc\"]);\r\n\t\t$jrawat_card_no=trim($_POST[\"jrawat_card_no\"]);\r\n\t\t$jrawat_card_nilai=trim($_POST[\"jrawat_card_nilai\"]);\r\n\t\t//card-2\r\n\t\t$jrawat_card_nama2=trim($_POST[\"jrawat_card_nama2\"]);\r\n\t\t$jrawat_card_edc2=trim($_POST[\"jrawat_card_edc2\"]);\r\n\t\t$jrawat_card_no2=trim($_POST[\"jrawat_card_no2\"]);\r\n\t\t$jrawat_card_nilai2=trim($_POST[\"jrawat_card_nilai2\"]);\r\n\t\t//card-3\r\n\t\t$jrawat_card_nama3=trim($_POST[\"jrawat_card_nama3\"]);\r\n\t\t$jrawat_card_edc3=trim($_POST[\"jrawat_card_edc3\"]);\r\n\t\t$jrawat_card_no3=trim($_POST[\"jrawat_card_no3\"]);\r\n\t\t$jrawat_card_nilai3=trim($_POST[\"jrawat_card_nilai3\"]);\r\n\t\t//kwitansi\r\n\t\t$jrawat_kwitansi_no=trim($_POST[\"jrawat_kwitansi_no\"]);\r\n\t\t$jrawat_kwitansi_nama=trim(@$_POST[\"jrawat_kwitansi_nama\"]);\r\n\t\t$jrawat_kwitansi_nama=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_kwitansi_nama);\r\n\t\t$jrawat_kwitansi_nama=str_replace(\"'\", '\"',$jrawat_kwitansi_nama);\r\n\t\t$jrawat_kwitansi_nilai=trim($_POST[\"jrawat_kwitansi_nilai\"]);\r\n\t\t$jual_kwitansi_id=trim($_POST[\"jual_kwitansi_id\"]);\r\n\t\t//kwitansi-2\r\n\t\t$jrawat_kwitansi_no2=trim($_POST[\"jrawat_kwitansi_no2\"]);\r\n\t\t$jrawat_kwitansi_nama2=trim(@$_POST[\"jrawat_kwitansi_nama2\"]);\r\n\t\t$jrawat_kwitansi_nama2=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_kwitansi_nama2);\r\n\t\t$jrawat_kwitansi_nama2=str_replace(\"'\", '\"',$jrawat_kwitansi_nama2);\r\n\t\t$jrawat_kwitansi_nilai2=trim($_POST[\"jrawat_kwitansi_nilai2\"]);\r\n\t\t$jual_kwitansi_id2=trim($_POST[\"jual_kwitansi_id2\"]);\r\n\t\t//kwitansi-3\r\n\t\t$jrawat_kwitansi_no3=trim($_POST[\"jrawat_kwitansi_no3\"]);\r\n\t\t$jrawat_kwitansi_nama3=trim(@$_POST[\"jrawat_kwitansi_nama3\"]);\r\n\t\t$jrawat_kwitansi_nama3=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$jrawat_kwitansi_nama3);\r\n\t\t$jrawat_kwitansi_nama3=str_replace(\"'\", '\"',$jrawat_kwitansi_nama3);\r\n\t\t$jrawat_kwitansi_nilai3=trim($_POST[\"jrawat_kwitansi_nilai3\"]);\r\n\t\t$jual_kwitansi_id3=trim($_POST[\"jual_kwitansi_id3\"]);\r\n\t\t//cek\r\n\t\t$jrawat_cek_nama=trim($_POST[\"jrawat_cek_nama\"]);\r\n\t\t$jrawat_cek_no=trim($_POST[\"jrawat_cek_no\"]);\r\n\t\t$jrawat_cek_valid=trim($_POST[\"jrawat_cek_valid\"]);\r\n\t\t$jrawat_cek_bank=trim($_POST[\"jrawat_cek_bank\"]);\r\n\t\t$jrawat_cek_nilai=trim($_POST[\"jrawat_cek_nilai\"]);\r\n\t\t//cek-2\r\n\t\t$jrawat_cek_nama2=trim($_POST[\"jrawat_cek_nama2\"]);\r\n\t\t$jrawat_cek_no2=trim($_POST[\"jrawat_cek_no2\"]);\r\n\t\t$jrawat_cek_valid2=trim($_POST[\"jrawat_cek_valid2\"]);\r\n\t\t$jrawat_cek_bank2=trim($_POST[\"jrawat_cek_bank2\"]);\r\n\t\t$jrawat_cek_nilai2=trim($_POST[\"jrawat_cek_nilai2\"]);\r\n\t\t//cek-3\r\n\t\t$jrawat_cek_nama3=trim($_POST[\"jrawat_cek_nama3\"]);\r\n\t\t$jrawat_cek_no3=trim($_POST[\"jrawat_cek_no3\"]);\r\n\t\t$jrawat_cek_valid3=trim($_POST[\"jrawat_cek_valid3\"]);\r\n\t\t$jrawat_cek_bank3=trim($_POST[\"jrawat_cek_bank3\"]);\r\n\t\t$jrawat_cek_nilai3=trim($_POST[\"jrawat_cek_nilai3\"]);\r\n\t\t//transfer\r\n\t\t$jrawat_transfer_bank=trim($_POST[\"jrawat_transfer_bank\"]);\r\n\t\t$jrawat_transfer_nama=trim($_POST[\"jrawat_transfer_nama\"]);\r\n\t\t$jrawat_transfer_nilai=trim($_POST[\"jrawat_transfer_nilai\"]);\r\n\t\t//transfer-2\r\n\t\t$jrawat_transfer_bank2=trim($_POST[\"jrawat_transfer_bank2\"]);\r\n\t\t$jrawat_transfer_nama2=trim($_POST[\"jrawat_transfer_nama2\"]);\r\n\t\t$jrawat_transfer_nilai2=trim($_POST[\"jrawat_transfer_nilai2\"]);\r\n\t\t//transfer-3\r\n\t\t$jrawat_transfer_bank3=trim($_POST[\"jrawat_transfer_bank3\"]);\r\n\t\t$jrawat_transfer_nama3=trim($_POST[\"jrawat_transfer_nama3\"]);\r\n\t\t$jrawat_transfer_nilai3=trim($_POST[\"jrawat_transfer_nilai3\"]);\r\n\t\t\r\n\t\t$cetak_jrawat=trim($_POST[\"cetak_jrawat\"]);\r\n\t\t\r\n\t\t$drawat_count=trim($_POST[\"drawat_count\"]);\r\n\t\t\r\n\t\t$dcount_drawat_id=trim($_POST[\"dcount_drawat_id\"]);\r\n\t\t\r\n\t\t/*\r\n\t\t * Penambahan Detail Penjualan Perawatan\r\n\t\t*/\r\n\t\t$drawat_id = $_POST['drawat_id']; // Get our array back and translate it :\r\n\t\t$array_drawat_id = json_decode(stripslashes($drawat_id));\r\n\t\t\r\n\t\t$drawat_dtrawat = $_POST['drawat_dtrawat']; // Get our array back and translate it :\r\n\t\t$array_drawat_dtrawat = json_decode(stripslashes($drawat_dtrawat));\r\n\t\t\r\n\t\t$drawat_rawat = $_POST['drawat_rawat']; // Get our array back and translate it :\r\n\t\t$array_drawat_rawat = json_decode(stripslashes($drawat_rawat));\r\n\t\t\r\n\t\t$drawat_jumlah = $_POST['drawat_jumlah']; // Get our array back and translate it :\r\n\t\t$array_drawat_jumlah = json_decode(stripslashes($drawat_jumlah));\r\n\t\t\r\n\t\t$drawat_harga = $_POST['drawat_harga']; // Get our array back and translate it :\r\n\t\t$array_drawat_harga = json_decode(stripslashes($drawat_harga));\r\n\t\t\r\n\t\t$drawat_diskon = $_POST['drawat_diskon']; // Get our array back and translate it :\r\n\t\t$array_drawat_diskon = json_decode(stripslashes($drawat_diskon));\r\n\t\t\r\n\t\t$drawat_diskon_jenis = $_POST['drawat_diskon_jenis']; // Get our array back and translate it :\r\n\t\t$array_drawat_diskon_jenis = json_decode(stripslashes($drawat_diskon_jenis));\r\n\t\t\r\n\t\t$drawat_sales = $_POST['drawat_sales']; // Get our array back and translate it :\r\n\t\t$array_drawat_sales = json_decode(stripslashes($drawat_sales));\r\n\t\t\r\n\t\t$drawat_karyawan = $_POST['drawat_karyawan']; // Get our array back and translate it :\r\n\t\t$array_drawat_karyawan = json_decode(stripslashes($drawat_karyawan));\r\n\t\t\r\n\t\t$result = $this->m_master_jual_rawat->master_jual_rawat_update($jrawat_id ,$jrawat_nobukti ,$jrawat_nobukti_medis,$jrawat_nobukti_pajak,$jrawat_total_medis,$jrawat_total_nonmedis,$jrawat_cust ,$jrawat_tanggal\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_stat_dok, $jrawat_diskon ,$jrawat_cara ,$jrawat_cara2\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_cara3 ,$jrawat_keterangan , $jrawat_cashback, $jrawat_cashback_medis, $jrawat_tunai_nilai\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_tunai_nilai2, $jrawat_tunai_nilai3, $jrawat_voucher_no\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_voucher_cashback, $jrawat_voucher_no2, $jrawat_voucher_cashback2\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_voucher_no3, $jrawat_voucher_cashback3, $jrawat_total\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_bayar, $jrawat_subtotal, $jrawat_hutang, $jrawat_kwitansi_no\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_kwitansi_nama, $jrawat_kwitansi_nilai, $jrawat_kwitansi_no2\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_kwitansi_nama2, $jrawat_kwitansi_nilai2, $jrawat_kwitansi_no3\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_kwitansi_nama3, $jrawat_kwitansi_nilai3, $jrawat_card_nama\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_card_edc, $jrawat_card_no, $jrawat_card_nilai, $jrawat_card_nama2\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_card_edc2, $jrawat_card_no2, $jrawat_card_nilai2, $jrawat_card_nama3\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_card_edc3, $jrawat_card_no3, $jrawat_card_nilai3, $jrawat_cek_nama\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_cek_no, $jrawat_cek_valid, $jrawat_cek_bank, $jrawat_cek_nilai\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_cek_nama2, $jrawat_cek_no2, $jrawat_cek_valid2, $jrawat_cek_bank2\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_cek_nilai2, $jrawat_cek_nama3, $jrawat_cek_no3, $jrawat_cek_valid3\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_cek_bank3, $jrawat_cek_nilai3, $jrawat_transfer_bank\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_transfer_nama, $jrawat_transfer_nilai, $jrawat_transfer_bank2\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_transfer_nama2, $jrawat_transfer_nilai2, $jrawat_transfer_bank3\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_transfer_nama3, $jrawat_transfer_nilai3 ,$cetak_jrawat\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$jrawat_ket_disk, $jrawat_ket_disk_medis, $drawat_count, $dcount_drawat_id\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$array_drawat_id ,$array_drawat_dtrawat ,$array_drawat_rawat\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$array_drawat_jumlah ,$array_drawat_harga ,$array_drawat_diskon\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ,$array_drawat_diskon_jenis, $array_drawat_sales, $array_drawat_karyawan, $jrawat_grooming, $jual_kwitansi_id, $jual_kwitansi_id2, $jual_kwitansi_id3);\r\n\t\techo $result;\r\n\t}", "function _edit_update() {\n\t\t$tpaket = $_POST;\n\t\tunset($tpaket['tpaket_header']['id_tpaket_header']);\n\t\tunset($tpaket['button']);\n\t\t// end of assign variables and delete not used variables\n\n\t\t$count = count($tpaket['tpaket_detail']['id_tpaket_h_detail']) - 1;\n\n\t\t// check, at least one product quantity entered\n\t\t$quantity_exist = FALSE;\n\n\t\tfor($i = 1; $i <= $count; $i++) {\n\t\t\tif(empty($tpaket['tpaket_detail']['quantity'][$i])) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\t$quantity_exist = TRUE;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif($quantity_exist == FALSE)\n\t\t\tredirect('tpaket/edit_error/Anda belum memasukkan data detail. Mohon ulangi');\n\n \tif(isset($_POST['button']['save']) || isset($_POST['button']['approve'])) {\n\n\t\t\t$this->db->trans_start();\n\n \t\t\t$this->session->set_userdata('tpaket_detail', $tpaket['tpaket_detail']);\n\n $id_tpaket_header = $this->uri->segment(3);\n $postingdate = $this->l_general->str_to_date($tpaket['tpaket_header']['posting_date']);\n\n \t\t\t$data = array (\n \t\t\t\t'id_tpaket_header' => $id_tpaket_header,\n \t\t\t\t'posting_date' => $postingdate,\n \t\t\t);\n\t\t\t\t/*$sirah= $id_tpaket_header;\n\t\t\t\t$ti=\"SELECT * FROM t_tpaket_detail_paket WHERE id_tpaket_header='$sirah'\";\n\t\t\t\t$tq=mysql_query($ta);\n\t\t\t\t$count1=mysql_num_rows($tq);*/\n \t\n\t\t\t $this->m_tpaket->tpaket_header_update($data);\n $edit_tpaket_header = $this->m_tpaket->tpaket_header_select($id_tpaket_header);\n\n \t\t\tif ($this->m_tpaket->tpaket_header_update($data)) {\n $input_detail_success = FALSE;\n \t\t\t if($this->m_tpaket->tpaket_details_delete($id_tpaket_header) && $this->m_tpaket->batch_delete($id_tpaket_header) ) {\n \t//\tfor($i = 1; $i <= $count; $i++) {\n \t\t\t\t\tif((!empty($tpaket['tpaket_detail']['quantity'][$i]))&&(!empty($tpaket['tpaket_detail']['material_no'][$i]))) {\n\n \t\t\t\t\t\t/*$tpaket_detail['id_tpaket_header'] = $id_tpaket_header;\n \t\t\t\t\t\t$tpaket_detail['quantity'] = $tpaket['tpaket_detail']['quantity'][$i];\n \t\t\t\t\t\t$tpaket_detail['id_tpaket_h_detail'] = $tpaket['tpaket_detail']['id_tpaket_h_detail'][$i];\n\n \t\t\t\t\t\t$tpaket_detail['material_no'] = $tpaket['tpaket_detail']['material_no'][$i];\n \t\t\t\t\t\t$tpaket_detail['material_desc'] = $tpaket['tpaket_detail']['material_desc'][$i];\n \t\t\t\t\t\t$tpaket_detail['uom'] = $tpaket['tpaket_detail']['uom'][$i];*/\n\n $tpaket_to_approve['item'][$i] = $tpaket_detail['id_tpaket_h_detail'];\n $tpaket_to_approve['material_no'][$i] = $tpaket_detail['material_no'];\n $tpaket_to_approve['quantity'][$i] = $tpaket_detail['quantity'];\n $tpaket_to_approve['uom'][$i] = $tpaket_detail['uom'];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t//\n\t\t\t\t\t\t$tpaket_detail['id_tpaket_header'] = $id_tpaket_header;\n\t\t\t\t\t\t$batch['BaseEntry'] = $id_tpaket_header;\n\t\t\t\t\t\t$tpaket_detail['quantity'] = $tpaket['tpaket_detail']['qty'][1];\n\t\t\t\t\t\t$tpaket_detail['qty'] = $tpaket['tpaket_detail']['qty'][1];\n\t\t\t\t\t\t$batch['Quantity'] = $tpaket['tpaket_detail']['qty'][1];\n\t\t\t\t\t\t$tpaket_detail['id_tpaket_h_detail'] = 1;\n\t\t\t\t\t\t$batch['BaseLinNum'] = 1;\n \t\t\t\t\t\t$tpaket_detail['material_no'] = $tpaket['tpaket_detail']['material_no'];\n\t\t\t\t\t\t$batch['ItemCode'] = $tpaket['tpaket_detail']['material_no'];\n\t\t\t\t\t\t$item=$tpaket['tpaket_detail']['material_no'];\n\t\t\t\t\t\t$date=date('ymd');\n\t\t\t\t\t\t$whs=$this->session->userdata['ADMIN']['plant'];\n\t\t\t\t\t\t$q=\"SELECT * FROM m_batch WHERE ItemCode = '$item' AND Whs ='$whs'\";\n\t\t\t\t\t\t$cek=\"SELECT BATCH,MAKTX FROM m_item WHERE MATNR = '$item'\";\n\t\t\t\t\t\t$cek1=mysql_query($cek);\n\t\t\t\t\t\t$ra=mysql_fetch_array($cek1);\n\t\t\t\t\t\t$b=$ra['BATCH'];\n\t\t\t\t\t\t$tq=mysql_query($q);\n\t\t\t\t\t\t$count1=mysql_num_rows($tq) + 1;\n\t\t\t\t\t\tif ($count1 > 9 && $count1 < 100)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$dg=\"0\";\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$dg=\"00\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$num=$item.$date.$dg.$count1;\n\t\t\t\t\t\tif ($count1 < 2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t$batch['BatchNum'] = $num;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$batch['BaseType'] = 4;\n\t\t\t\t\t\t$tpaket_detail['num'] = $num;\n\t\t\t\t\t\t$batch['Createdate'] = $this->l_general->str_to_date($tpaket['tpaket_header']['posting_date']);\n \t\t\t\t\t\t$tpaket_detail['material_desc'] = $ra['MAKTX'];\n \t\t\t\t\t\t$tpaket_detail['uom'] = $tpaket['tpaket_detail']['uom'][1];\n\t\t\t\t\t\tif ($b=='Y')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t$batch_in=$this->m_tpaket->batch_insert($batch);\n\t\t\t\t\t\t\tif ($count1 < 2)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tmysql_query(\"INSERT INTO m_batch () VALUES ('$item','$num','$batch[Quantity]','$whs')\");\n\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$batch['BaseEntry'] = $id_tpaket_header;\n\t\t\t\t\t\t$batch['Quantity'] = $tpaket['tpaket_detail']['quantity'][$i];\n\t\t\t\t\t\t$batch['BaseLinNum'] = $tpaket['tpaket_detail']['id_tpaket_h_detail'][$i];\n \t\t\t\t\t\t$batch['ItemCode'] = $tpaket['tpaket_detail']['material_no'][$i];\n\t\t\t\t\t\t$batch['BatchNum'] = $tpaket['tpaket_detail']['num'][$i];\n\t\t\t\t\t\t$batch['BaseType'] = 4;\n\t\t\t\t\t\t$batch['Createdate'] = $this->l_general->str_to_date($tpaket['tpaket_header']['posting_date']);*/\n\n if($id_tpaket_detail = $this->m_tpaket->tpaket_detail_insert($tpaket_detail)) {\n /* if($item_pakets = $this->m_mpaket->mpaket_details_select_by_item_paket($tpaket_detail['material_no'])) {\n if($item_pakets !== FALSE) {\n \t\t$k = 1;\n unset($item_paket);\n \t\tforeach ($item_pakets->result_array() as $object['temp']) {\n \t\t\tforeach($object['temp'] as $key => $value) {\n \t\t\t\t$item_paket[$key][$k] = $value;\n \t\t\t}\n \t\t\t$k++;\n \t\t\tunset($object['temp']);\n \t\t}\n \t }*/\n\t\t\t\t\t\t\t\t\t// echo \"$batch[BaseEntry],$batch[Quantity],$batch[BaseLinNum],$batch[ItemCode],$batch[BatchNum],$b <br>\";\n\t\t\t\t\t//\techo $tpaket_detail['id_tpaket_header'].\",\".$tpaket_detail['quantity'].\",\".$tpaket_detail['material_no'].\",\".$tpaket_detail['num'];\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t// $c_item_paket = count($item_paket['id_mpaket_h_detail']);\n \t\t\tfor($i = 1; $i <= $count; $i++) {\n $tpaket_detail_paket['id_tpaket_h_detail_paket'] = $i;\n\t\t\t\t\t\t\t $batch1['BaseLinNum'] =$i;\n $tpaket_detail_paket['id_tpaket_detail'] = $id_tpaket_detail;\n $tpaket_detail_paket['id_tpaket_header'] = $id_tpaket_header;\n\t\t\t\t\t\t\t $batch1['BaseEntry'] = $id_tpaket_header;\n\t\t\t\t\t\t\t $batch1['BaseType'] = 4;\n\t\t\t\t\t\t\t $batch1['ItemCode'] = $tpaket['tpaket_detail']['material_detail'][$i];\n\t\t\t\t\t\t\t $qq=\"SELECT * FROM m_batch WHERE ItemCode = '$batch1[ItemCode]' AND Whs ='$whs'\";\n\t\t\t\t\t\t\t $cekQQ=mysql_query($qq);\n\t\t\t\t\t\t\t $rQ=mysql_num_rows($cekQQ);\n\t\t\t\t\t\t\t $num_detail=$tpaket['tpaket_detail']['num'][$i];\n\t\t\t\t\t\t\t $date=date('ymd');\n\t\t\t\t\t\t\t $cekq=\"SELECT BATCH,MAKTX FROM m_item WHERE MATNR = '$batch1[ItemCode]'\";\n\t\t\t\t\t\t\t $cekr=mysql_query($cekq);\n\t\t\t\t\t\t\t $rai=mysql_fetch_array($cekr);\n\t\t\t\t\t\t\t $tpaket_detail_paket['material_desc'] = $rai['MAKTX'];\n\t\t\t\t\t\t\t $bet=$ra['MAKTX'];\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t $batch1['Createdate'] =$batch['Createdate'] ;\n $tpaket_detail_paket['material_no_paket'] = $tpaket_detail['material_no'];\n $tpaket_detail_paket['material_no'] = $tpaket['tpaket_detail']['material_detail'][$i];\n\t\t\t\t\t\t\t $tpaket_detail_paket['material_desc'] = $item_paket['material_desc'][$i];\n $tpaket_detail_paket['quantity'] = $tpaket['tpaket_detail']['quantity'][$i];\n\t\t\t\t\t\t\t $batch1['Quantity'] = $tpaket['tpaket_detail']['quantity'][$i];\n $tpaket_detail_paket['uom'] = $tpaket['tpaket_detail']['detail_uom'][$i];\n\t\t\t\t\t\t\t $tpaket_detail_paket['num'] = $num_detail;\n\t\t\t\t\t\t\t $tpaket_detail_paket['quantity_total'] = $tpaket['tpaket_detail']['quantity'][$i] * $tpaket['tpaket_detail']['qty'][1];\n\t\t\t\t\t\t\t if ($num_detail != \"\" && $bet == 'Y')\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t $batch1['BatchNum'] = $num_detail;\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t \t\t$count1=$rQ + 1;\n\t\t\t\t\t\t\t\t\t\tif ($count1 > 9 && $count1 < 100)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$dg=\"0\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$dg=\"00\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$num=$batch1['ItemCode'].$date.$dg.$count1;\n\t\t\t\t\t\t\t\t\t\t\t$batch1['BatchNum'] = $num;\n\t\t\t\t\t\t\t\t\t\t\tmysql_query(\"INSERT INTO m_batch () VALUES ('$batch1[ItemCode]','$batch1[BatchNum]','$batch1[Quantity]','$whs')\");\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// echo \"$batch1[BaseEntry],$batch1[Quantity],$batch1[BaseLinNum],$batch1[ItemCode],$batch1[BatchNum],$b <br>\";\n\t\t\t\t\t\t\t if ($batch1['Quantity'] != \"\" && $bet=='Y')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->m_tpaket->batch_insert($batch1);\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 if($this->m_tpaket->tpaket_detail_paket_insert($tpaket_detail_paket)) {\n $input_detail_success = TRUE;\n \t\t\t\t\t } else {\n $input_detail_success = FALSE; } } }\n \n \t else {\n $input_detail_success = FALSE;\n\t\t\t\t\t\t\t\t //echo \"aaaaaaaaaaaaaaaaa\";\n \t}\n// \t\t\t\t\t\tif($this->m_tpaket->tpaket_detail_insert($tpaket_detail))\n// $input_detail_success = TRUE;\n \t\t\t\t\t}\n\n \t \t//}\n }\n }\n\n\t\t\tif (($input_detail_success == TRUE) && (isset($_POST['button']['approve']))) {\n $internal_order = $this->m_tpaket->tpaket_internal_order_select();\n $tpaket_to_approve['plant'] = $edit_tpaket_header['plant'];\n $tpaket_to_approve['internal_order'] = $internal_order['internal_order'];\n $tpaket_to_approve['storage_location'] = $this->session->userdata['ADMIN']['storage_location'];\n $tpaket_to_approve['posting_date'] = date('Ymd',strtotime($edit_tpaket_header['posting_date']));\n $tpaket_to_approve['id_tpaket_header'] = $id_tpaket_header;\n $tpaket_to_approve['plant'] = $edit_tpaket_header['plant'];\n $tpaket_to_approve['id_tpaket_plant'] = $edit_tpaket_header['id_tpaket_plant'];\n $tpaket_to_approve['id_user_input'] = $this->session->userdata['ADMIN']['admin_id'];\n $tpaket_to_approve['web_trans_id'] = $this->l_general->_get_web_trans_id($edit_tpaket_header['plant'],$edit_tpaket_header['posting_date'],\n $edit_tpaket_header['id_tpaket_plant'],'17');\n\t\t\t/* $approved_data = $this->m_tpaket->sap_tpaket_header_approve($tpaket_to_approve);\n \t\t\tif((!empty($approved_data['material_document'])) && ($approved_data['material_document'] !== '') &&\n (!empty($approved_data['material_document_out'])) && ($approved_data['material_document_out'] !== '')) {\n \t\t\t $tpaket_no = $approved_data['material_document'];\n \t\t\t $tpaket_no_out = $approved_data['material_document_out'];*/\n \t\t\t\t$data = array (\n \t\t\t\t\t'id_tpaket_header'\t=>$id_tpaket_header,\n \t\t\t\t\t'material_doc_no'\t=>\t$tpaket_no,\n \t\t\t\t\t'material_doc_no_out'\t=>\t$tpaket_no_out,\n \t\t\t\t\t'status'\t=>\t'2',\n \t\t\t\t\t'id_user_approved'\t=>\t$this->session->userdata['ADMIN']['admin_id'],\n \t\t\t\t);\n \t\t\t\t$tpaket_header_update_status = $this->m_tpaket->tpaket_header_update($data);\n \t\t\t\t $approve_data_success = TRUE;\n\t\t\t\t/*} else {\n\t\t\t\t $approve_data_success = FALSE;\n\t\t\t\t}*/\n }\n\n \t\t\t$this->db->trans_complete();\n if(isset($_POST['button']['save'])) {\n if ($input_detail_success == TRUE) {\n \t\t\t $this->l_general->success_page('Data Transaksi Paket berhasil diubah', site_url('tpaket/browse'));\n } else {\n \t\t\t $this->jagmodule['error_code'] = '006'; \n\t\t$this->l_general->error_page($this->jagmodule, 'Data Transaksi Paket tidak berhasil diubah', site_url($this->session->userdata['PAGE']['next']));\n }\n } else if(isset($_POST['button']['approve']))\n if($approve_data_success == TRUE) {\n \t\t\t $this->l_general->success_page('Data Transaksi Paket berhasil diapprove', site_url('tpaket/browse'));\n } else {\n \t\t $this->jagmodule['error_code'] = '007'; \n\t\t$this->l_general->error_page($this->jagmodule, 'Data Transaksi Paket tidak berhasil diapprove.<br>\n Pesan Kesalahan dari sistem SAP : '.$approved_data['sap_messages'], site_url($this->session->userdata['PAGE']['next']));\n }\n\n\t\t}\n\t}", "public function actionUpdate($id, $tanggal, $bus){\n $today = $tanggal;\n $yesterday = date('Y-m-d', strtotime($tanggal .' -1 day')); //untuk mendapatakan hari kemarin untuk cek karcis dan di +1\n \n $this->layout = 'layout_admin2';\n $model = $this->findModel($id);\n\n $data = (new \\yii\\db\\Query())\n ->select(['karcis_setor.pergi_akhir', 'karcis_setor.pulang_akhir'])\n ->from('karcis_setor')\n ->join('LEFT JOIN', 'setor', 'setor.id_karcis=karcis_setor.id_karcis')\n ->join('LEFT JOIN', 'jadwal_bus', 'jadwal_bus.id_jadwal=karcis_setor.id_jadwal')\n ->where(['jadwal_bus.tanggal'=>$yesterday, 'jadwal_bus.id_bus'=>$bus])\n ->one();\n\n $datatoday = (new \\yii\\db\\Query())\n ->select(['karcis_setor.pergi_akhir', 'karcis_setor.pulang_akhir'])\n ->from('karcis_setor')\n ->join('LEFT JOIN', 'setor', 'setor.id_karcis=karcis_setor.id_karcis')\n ->join('LEFT JOIN', 'jadwal_bus', 'jadwal_bus.id_jadwal=karcis_setor.id_jadwal')\n ->where(['jadwal_bus.tanggal'=>$today, 'jadwal_bus.id_bus'=>$bus])\n ->one();\n\n $new_pergi_awal = $data['pergi_akhir'] + 1;\n $new_pulang_awal = $data['pulang_akhir'] + 1;\n $pergi_akhir = $datatoday['pergi_akhir'];\n $pulang_akhir = $datatoday['pulang_akhir'];\n\n $datas = [\n 'pergi_awal'=>$new_pergi_awal,\n 'pulang_awal'=>$new_pulang_awal,\n 'pergi_akhir'=>$pergi_akhir,\n 'pulang_akhir'=>$pulang_akhir\n ];\n\n if ($model->load(Yii::$app->request->post())) {\n $tpr_sby = $model['tpr_sby'];\n $tpr_caruban = $model['tpr_caruban'];\n $tpr_ngawi = $model['tpr_ngawi'];\n $tpr_solo = $model['tpr_solo'];\n $tpr_kartosuro = $model['tpr_kartosuro'];\n $tpr_salatiga = $model['tpr_salatiga'];\n $tpr_semarang = $model['tpr_semarang'];\n\n $mandor_sby = $model['mandor_sby'];\n $mandor_caruban = $model['mandor_caruban'];\n $mandor_ngawi = $model['mandor_ngawi'];\n $mandor_solo = $model['mandor_solo'];\n $mandor_kartosuro = $model['mandor_kartosuro'];\n $mandor_salatiga = $model['mandor_salatiga'];\n $mandor_semarang = $model['mandor_semarang'];\n $rit_1 = $model['rit_1'];\n $rit_2 = $model['rit_2'];\n $bon_sopir = $model['bon_sopir'];\n $bon_kondektur = $model['bon_kondektur'];\n $solar_pergi = $model['solar_pergi'];\n $nom_solar_pergi = $model['nom_solar_pergi'];\n $solar_plg = $model['solar_plg'];\n $nom_solar_plg = $model['nom_solar_plg'];\n $um_sopir = $model['um_sopir'];\n $um_kond = $model['um_kond'];\n $cuci_bis = $model['cuci_bis'];\n $tpr = $model['tpr2'];\n $tol = $model['tol'];\n $siaran = $model['siaran'];\n $parkir = $model['parkir'];\n $lain_lain = $model['lain_lain'];\n $potong_minum = $model['potong_minum'];\n $pendapatan_kotor = $model['pendapatan_kotor'];\n $bersih_perjalanan = $model['bersih_perjalanan'];\n $dipotong_premi = $model['dipotong_premi'];\n $total_bersih = $model['total_bersih'];\n $premi_sopir = $model['premi_sopir'];\n $premi_kondektur = $model['premi_kondektur'];\n\n $total1 = $mandor_sby+$mandor_caruban+$mandor_ngawi+$mandor_solo+$mandor_kartosuro\n +$mandor_semarang+$mandor_salatiga;\n\n\n $total2 = $nom_solar_pergi+$nom_solar_plg+$um_sopir+$um_kond+$cuci_bis+$tpr+$tol+$siaran\n +$parkir+$lain_lain;\n\n $uang_tiket = $rit_1+$rit_2;\n\n $pendapatan_kotor = $uang_tiket - $potong_minum;\n\n $dipotong = $total1 + $total2;\n\n $bersih_perjalanan = $pendapatan_kotor - $dipotong;\n\n $premi_sopir = (12/100) * $pendapatan_kotor;\n $premi_sopir = (int)$premi_sopir;\n \n $premi_kondektur = (7/100) * $pendapatan_kotor;\n $premi_kondektur = (int)$premi_kondektur;\n\n $total_premi = $premi_sopir + $premi_kondektur;\n\n $total_premi = (int)$total_premi;\n\n $total_bon = $bon_sopir + $bon_kondektur;\n\n $cuci_garasi = 37500;\n\n if($bersih_perjalanan == 0){\n $total_bersih = 0;\n }else{\n $total_bersih = $bersih_perjalanan - $total_bon + $cuci_garasi;\n }\n\n $modelKarcis = Yii::$app->request->post()['KarcisSetor'];\n\n $setorKarcis = KarcisSetor::find()->where(['id_karcis' => $model->id_karcis])->one();\n\n $setorKarcis['pergi_awal'] = $modelKarcis['pergi_awal'];\n $setorKarcis['pergi_akhir'] = $modelKarcis['pergi_akhir']; \n $setorKarcis['pulang_awal'] = $modelKarcis['pulang_awal']; \n $setorKarcis['pulang_akhir'] = $modelKarcis['pulang_akhir'];\n\n $model['pendapatan_kotor'] = $pendapatan_kotor;\n $model['bersih_perjalanan'] = $bersih_perjalanan;\n $model['dipotong_premi'] = $total_premi;\n $model['total_bersih'] = $total_bersih;\n $model['premi_sopir'] = $premi_sopir;\n $model['premi_kondektur'] = $premi_kondektur;\n \n $setorKarcis->save();\n\n $model->save();\n\n return $this->redirect(['view', 'id' => $model->id_setor]);\n }\n return $this->render('update', [\n 'model' => $model, \n 'data' => $datas,\n // 'modelKarcis' => $modelKarcis,\n ]);\n }", "public function updDataMasalah() {\n $d_mslh = new DataMasalah($this->registry);\n //$d_bobot = new DataBobot($this->registry);\n //$this->view->bobot = $d_bobot->get_bobot_pkn_lvl2();\n if (isset($_POST['upd_d_mslh'])) {\n $kd_d_mslh = $_POST['kd_d_mslh'];\n $kd_d_user = Session::get('id_user');\n $tgl_mslh = $_POST['tgl_mslh'];\n $masalah = $_POST['masalah'];\n\n $d_mslh->set_kd_d_mslh($kd_d_mslh);\n $d_mslh->set_kd_d_user($kd_d_user);\n $d_mslh->set_tgl_mslh($tgl_mslh);\n $d_mslh->set_masalah($masalah);\n\n if (!$d_mslh->update_d_mslh()) {\n $this->view->d_ubah = $d_mslh;\n //$this->view->dasbor = $d_pkn->get_d_pkn_per_tgl();\n $this->view->error = $d_mslh->get_error();\n $this->view->data = $d_mslh->get_d_mslh();\n $this->view->render('admin/dataMasalah');\n } else {\n //$this->view->dasbor = $d_pkn->get_d_pkn_per_tgl();\n header('location:' . URL . 'dataMasalah/addDataMasalah');\n }\n }\n }", "function update_surat_keputusan_pemutih_penyalur() {\n//\t\tif (! $this->get_permission('fill_this')) return $this->intruder();\n\t\tglobal ${$GLOBALS['post_vars']};\n\t\t$record = array (\n\t\t\t'id_surat_keputusan_pemutih_penyalur' => ${$GLOBALS['post_vars']}['id_surat_keputusan_pemutih_penyalur']\n\t\t);\n\t\t$_block = new block();\n\t\t$_block->set_config('title', ('Update Surat Keputusan Pemutihan Izin Penyalur Status'));\n\t\t$_block->set_config('width', 595);\n\t\tif ($result = surat_keputusan_pemutih_penyalur::get($record)) {\n\t\t\t$record = $result[0];\n\t\t\tif (${$GLOBALS['post_vars']}['surat_keputusan_pemutih_penyalur']!='') $record['surat_keputusan_pemutih_penyalur'] = ${$GLOBALS['post_vars']}['surat_keputusan_pemutih_penyalur'];\n\t\t\tif (${$GLOBALS['post_vars']}['keputusan_pemutih_penyalur']!='') $record['keputusan_pemutih_penyalur'] = ${$GLOBALS['post_vars']}['keputusan_pemutih_penyalur'];\n\t\t\tif (${$GLOBALS['post_vars']}['nama']!='') $record['nama'] = ${$GLOBALS['post_vars']}['nama'];\n\t\t\t\n\t\t\tif (${$GLOBALS['post_vars']}['nip']!='') $record['nip'] = ${$GLOBALS['post_vars']}['nip'];\n\t\t\tif (${$GLOBALS['post_vars']}['insert_by']!='') $record['insert_by'] = ${$GLOBALS['post_vars']}['insert_by'];\n\t\t\tif (${$GLOBALS['post_vars']}['date_insert']!='') $record['date_insert'] = $this->parsedate(trim(${$GLOBALS['post_vars']}['date_insert']));\n\n\t\t\teval($this->save_config);\n\t\t\tif (surat_keputusan_pemutih_penyalur::update($record)) {\n\n\t\t\t\t$_block->parse(array('+<font color=green><b>'.__('Successfull Updated').'</b></font>'));\n\t\t\t\treturn $_block->get_str();\n\t\t\t}\n\t\t}\n\t\t$GLOBALS['self_close_js'] = $GLOBALS['adodb']->ErrorMsg();\n\t\t$_block->parse(array('+<font color=red><b>'.__('Failed Updated').'</b></font>'.' :'.__('Data doesn\\'t exists')));\n\t\treturn $_block->get_str();\n\t}", "function addUpdateTransaksi(){\n $idUser = $this->input->post('id_user');\n $detailOrder = $this->input->post('detail_order');\n $idProduk = $this->input->post('id_produk');\n $jumlahProduk = $this->input->post('jumlah_produk');\n $hargaProduk = $this->input->post('harga_produk');\n\n $this->db->where('tb_keranjang.id_produk', $idProduk);\n $this->db->where('tb_keranjang.id_user', $idUser);\n $this->db->where('tb_keranjang.detail_order', $detailOrder);\n $this->db->where('tb_keranjang.id_status_transaksi', \"1\");\n\n $q = $this->db->get('tb_keranjang');\n\n if($q -> num_rows() > 0){\n $sql = \"Update tb_keranjang \n INNER JOIN tb_produk ON tb_keranjang.id_produk = tb_produk.id_produk SET tb_keranjang.jumlah_produk = tb_keranjang.jumlah_produk + 1, tb_keranjang.total_harga_produk = tb_produk.harga_produk * tb_keranjang.jumlah_produk + tb_produk.harga_produk WHERE tb_keranjang.id_produk = $idProduk AND tb_keranjang.id_user = $idUser\";\n\n $query = $this->db->query($sql);\n\n if($query){\n $data['status'] = 200;\n $data['message'] = 'Successfully Update Data Produk';\n } \n else{\n $data['status'] = 404;\n $data['message'] = 'Failed Update Data Produk';\n } \n } else {\n $save['id_user'] = $idUser;\n $save['detail_order'] = $detailOrder;\n $save['id_produk'] = $idProduk;\n $save['jumlah_produk'] = $jumlahProduk;\n $save['total_harga_produk'] = $hargaProduk;\n\n $querySaved = $this->db->insert('tb_keranjang', $save);\n\n if($querySaved){\n $data['status'] = 200;\n $data['message'] = 'Successfully Add Produk';\n } else {\n $data['status'] = 404;\n $data['message'] = 'Failed Add Produk';\n }\n }\n echo json_encode($data);\n //Decode : dari Json ke Object\n //encode : dari object ke Json\n }", "function kas_update($kas_id , $kas_tanggal, $kas_jumlah , $kas_keterangan, $kas_tipe ){\r\n\t\t\tif ($kas_tipe==\"Kas Keluar\")\r\n\t\t\t\t$kas_jumlah = $kas_jumlah * -1;\r\n\t\t\t$data = array(\r\n\t\t\t\t\"bs_id\"=>$kas_id,\t\r\n\t\t\t\t\"bs_tanggal\"=>$kas_tanggal,\t\t\t\r\n\t\t\t\t\"bs_jumlah\"=>$kas_jumlah,\t\t\t\r\n\t\t\t\t\"bs_keterangan\"=>$kas_keterangan,\r\n\t\t\t\t\"bs_tipe\"=>$kas_tipe,\t\t\t\t\t\r\n\t\t\t\t\"bs_date_update\"=>date('Y-m-d H:i:s')\t\t\t\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$this->db->where('bs_id', $kas_id);\r\n\t\t\t$this->db->update('bs', $data);\r\n\t\t\tif($this->db->affected_rows()){\r\n\r\n\t\t\t\treturn '1';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public function jabatanupdateAction() {\n\t\t$userid = $this->user;\n\t\t$nip = $_REQUEST['nip'];\n\t\tif(!$nip)\n\t\t{\n\t\t\t$nip = $_POST['nipH'];\n\t\t}\n\t\t$this->view->nip=$nip;\n\t\t\n\t\t$status = $_REQUEST['status'];\n\t\t$jabatan = $_REQUEST['jabatan'];\n\t\t$tglMulai = $_REQUEST['tglMulai'];\n\t\t\n\t\t$paramSearch = array(\"nip\" => $nip,\n\t\t\t\t\t\t\t\"status\" => $status,\n\t\t\t\t\t\t\t\"jabatan\" => $jabatan,\n\t\t\t\t\t\t\t\"tglMulai\" => $tglMulai);\n\t\t\t\t\t\t\t\n\t\t$this->view->personalJabatDetail = $this->auditor_serv->getPersonalJabatDetail($paramSearch);\n\t\t$this->view->listJabat = $this->auditor_serv->getJabatanListByStatus($status);\n\t\t$this->view->listPejabat = $this->auditor_serv->getPejabatListByOrg($jabatan);\n\t\t$this->view->eselonOrg = $this->auditor_serv->getEselonByOrg($jabatan);\n//var_dump($this->view->personalJabatDetail);\n\t\t//$this->view->personalList = $this->auditor_serv->getPersonalListByUser($nip, $nama, $stat, 1, 1);\n\t\t$this->view->personalDetail = $this->auditor_serv->getPersonalDetail($nip);\n\t\t$this->view->personalStatusList = $this->auditor_serv->getPersonalStatusList();\n\t\t$this->view->satminkalList = $this->auditor_serv->getSatminkalList();\n\t\t$satminkalAwal = $this->view->satminkalList[0]['c_satminkal'];\n\t\t$this->view->satkerList = $this->auditor_serv->getSatkerList($satminkalAwal);\n\t\t\n\t\t$this->view->perintah = $_REQUEST['perintah'];\n\t\t$perintahUpdate = $_POST['perintahUpdate'];\n\t\tif($perintahUpdate == \"UPDATE\")\n\t\t{\n\t\t\t$nip = $_POST['nipH'];\n\t\t\t$status = $_POST['status'];\n\t\t\t$statusH = $_POST['statusH'];\n\t\t\t$bidang = $_POST['bidang'];\n\t\t\t$bidangH = $_POST['bidangH'];\n\t\t\t\n\t\t\t$nStatus = $this->auditor_serv->getStatusByCode($status);\n\t\t\t$c_satker = $_POST['satker'];\n\t\t\t\n\t\t\t$n_instansi = \"\";\n\t\t\t$a_lokasi = \"\";\n\t\t\t$e_jabatan = \"\";\n\t\t\t\n\t\t\tif($status == \"LAN\")\n\t\t\t{\n\t\t\t\t$nmJabat = \"Lainnya\";\n\t\t\t\t$bidang = \"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//$nmJabat = $_POST['nmJabat'];\n//nmJabatH = $_POST['nmJabatH'];\n\t\t\t\t$nmJabat1 = $_POST['nmJabat'];\n\t\t\t\tif($status == \"ADT\")\n\t\t\t\t{\n\t\t\t\t\t$nmJabatArr = explode(\"~\",$nmJabat1);\n\t\t\t\t\t$nmJabat = $nmJabatArr[0];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$nmJabat = $nmJabat1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$nmJabat1H = $_POST['nmJabatH'];\n\t\t\t\tif($status == \"ADT\")\n\t\t\t\t{\n\t\t\t\t\t$nmJabat1HArr = explode(\"~\",$nmJabat1H);\n\t\t\t\t\t$nmJabatH = $nmJabat1HArr[0];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$nmJabatH = $nmJabat1H;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif($status == \"TAH\")\n\t\t\t{\n\t\t\t\t$n_jabatan = \"$nStatus-$bidang\";\n\t\t\t\t//$n_jabatanH = \"$nStatusH-$bidangH\";\n\t\t\t}\n\t\t\telse if($status == \"ADT\")\n\t\t\t{\n\t\t\t\t$n_jabatan = \"$nStatus-$nmJabat\";\n\t\t\t\t//$n_jabatanH = \"$nStatusH-$nmJabatH\";\n\t\t\t\t$bidang = \"\";\n\t\t\t}\n\t\t\telse if ($status == \"SKR\")\n\t\t\t{\n\t\t\t\t$nmSatker = $this->auditor_serv->getSatkerByCode($c_satker);\n\t\t\t\t$n_jabatan = \"$nmJabat-$nmSatker\";\n\t\t\t\t$bidang = \"\";\n\t\t\t}\n\t\t\telse if($status == \"LAN\")\n\t\t\t{\n\t\t\t\t$n_jabatan = $_POST['n_jabatan'];\n\t\t\t\t//$n_jabatanH = $_POST['n_jabatanH'];\n\t\t\t\t$n_instansi = $_POST['n_instansi'];\n\t\t\t\t$a_lokasi = $_POST['a_lokasi'];\n\t\t\t\t$e_jabatan = $_POST['e_jabatan'];\n\t\t\t\t\n\t\t\t}\n\t\t\telse if($status == \"SKT\")\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$nmPejabat = $_POST['nmPejabat'];\n\t\t\t\t$nmPejabatH = $_POST['nmPejabatH'];\n\t\t\t\t\n\t\t\t\t$nmJabatLengkap = $this->auditor_serv->getJabatanSekretariat($nmJabat);\n\t\t\t\t$nmJabatLengkapH = $this->auditor_serv->getJabatanSekretariat($nmJabatH);\n\t\t\t\t\n\t\t\t\t$n_instansi = $nmJabatLengkap;\n\t\t\t\t$n_jabatan1 = $nmPejabat;\n\t\t\t\t$nJabatan1Arr = explode(\"~\",$n_jabatan1);\n\t\t\t\t$n_jabatan = $nJabatan1Arr[1];\n\t\t\t\t\n\t\t\t\t$n_jabatanH1 = $nmPejabatH;\n\t\t\t\t$nJabatanH1Arr = explode(\"~\",$n_jabatanH1);\n\t\t\t\t$n_jabatanH = $nJabatanH1Arr[1];\n\t\t\t\t\n\t\t\t\t$nmJabatArr = explode(\"~\",$nmJabat);\n\t\t\t\t$nmJabat = $nmJabatArr[0];\n\t\t\t\t\n\t\t\t\t$nmJabatHArr = explode(\"~\",$nmJabatH);\n\t\t\t\t$nmJabatH = $nmJabatHArr[0];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/* $nmJabatLengkap = $this->auditor_serv->getJabatanSekretariat($nmJabat);\n\t\t\t\t$nmJabatLengkapH = $this->auditor_serv->getJabatanSekretariat($nmJabatH);\n\t\t\t\t$n_jabatan = \"$nStatus-$nmJabatLengkap\"; */\n\t\t\t\t//$n_jabatanH = \"$nStatusH-$nmJabatLengkapH\";\n\t\t\t\t$bidang = \"\";\n\t\t\t}\n\t\t\telse if($status == \"SPV\")\n\t\t\t{\n\t\t\t\t$n_jabatan = \"Supervisor\";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$n_jabatanH = $_POST['n_jabatanH'];\n\t\t\t$satminkal = $_POST['satminkal'];\n\t\t\t$satker = $_POST['satker'];\n\t\t\t\n\t\t\t$hrMulai = $_POST['hrMulai'];\n\t\t\t$blnMulai = $_POST['blnMulai'];\n\t\t\t$thnMulai = $_POST['thnMulai'];\n\t\t\t\n\t\t\tif ((!$hrMulai) || ($hrMulai == '#')){\n\t\t\t\t$tglMulai = null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ((!$blnMulai) || ($blnMulai == '#')) {\n\t\t\t\t\t$tglMulai = null;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (!$thnMulai) {\n\t\t\t\t\t\t$tglMulai = null;\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\telse {\n\t\t\t\t\t\t$tglMulai = \"$thnMulai-$blnMulai-$hrMulai\"; \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$tglMulaiH = $_POST['mulaiH'];\n\t\t\t\n\t\t\t$hrAkhir = $_POST['hrAkhir'];\n\t\t\t$blnAkhir = $_POST['blnAkhir'];\n\t\t\t$thnAkhir = $_POST['thnAkhir'];\n\t\t\t\n\t\t\t\n\t\t\tif ((!$hrAkhir) || ($hrAkhir == '#')){\n\t\t\t\t$tglAkhir = null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ((!$blnAkhir) || ($blnAkhir == '#')) {\n\t\t\t\t\t$tglAkhir = null;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (!$thnAkhir) {\n\t\t\t\t\t\t$tglAkhir = null;\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\telse {\n\t\t\t\t\t\t$tglAkhir = \"$thnAkhir-$blnAkhir-$hrAkhir\"; \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$noSK = $_POST['noSK'];\n\t\t\t\n\t\t\t$hrSK = $_POST['hrSK'];\n\t\t\t$blnSK = $_POST['blnSK'];\n\t\t\t$thnSK = $_POST['thnSK'];\n\t\t\t\n\t\t\tif ((!$hrSK) || ($hrSK == '#')){\n\t\t\t\t$tglSK = null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ((!$blnSK) || ($blnSK == '#')) {\n\t\t\t\t\t$tglSK = null;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (!$thnSK) {\n\t\t\t\t\t\t$tglSK = null;\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\telse {\n\t\t\t\t\t\t$tglSK = \"$thnSK-$blnSK-$hrSK\"; \t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif($status == \"SKT\")\n\t\t\t{ $cEselon = $_POST['cEselon'];}\n\t\t\telse\n\t\t\t{ $cEselon = ''; }\n\t\t\t\n\t\t\t$hrEselon = $_POST['hrEselon'];\n\t\t\t$blnEselon = $_POST['blnEselon'];\n\t\t\t$thnEselon = $_POST['thnEselon'];\n\t\t\t\n\t\t\tif ((!$hrEselon) || ($hrEselon == '#')){\n\t\t\t\t$dEselon = null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ((!$blnEselon) || ($blnEselon == '#')) {\n\t\t\t\t\t$dEselon = null;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (!$thnEselon) {\n\t\t\t\t\t\t$dEselon = null;\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\telse {\n\t\t\t\t\t\t$dEselon = \"$thnEselon-$blnEselon-$hrEselon\"; \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$paramJabatUpdate = array(\"i_peg_nip\" => $nip,\n\t\t\t\t\t\t\t\t\"c_peg_status\" => $status,\n\t\t\t\t\t\t\t\t\"c_peg_statusH\" => $statusH,\n\t\t\t\t\t\t\t\t\"c_peg_jabatan\" => $nmJabat,\n\t\t\t\t\t\t\t\t\"c_peg_jabatanH\" => $nmJabatH,\n\t\t\t\t\t\t\t\t\"n_jabatan\" => $n_jabatan,\n\t\t\t\t\t\t\t\t\"n_jabatanH\" => $n_jabatanH,\n\t\t\t\t\t\t\t\t\"n_instansi\" => $n_instansi,\n\t\t\t\t\t\t\t\t\"a_lokasi\" => $a_lokasi,\n\t\t\t\t\t\t\t\t\"e_jabatan\" => $e_jabatan,\n\t\t\t\t\t\t\t\t\"n_bidang\" => $bidang,\n\t\t\t\t\t\t\t\t\"c_satminkal\" => $satminkal,\n\t\t\t\t\t\t\t\t\"c_satker\" => $satker,\n\t\t\t\t\t\t\t\t\"d_jabatan_mulai\" => $tglMulai,\n\t\t\t\t\t\t\t\t\"d_jabatan_mulaiH\" => $tglMulaiH,\n\t\t\t\t\t\t\t\t\"d_jabatan_akhir\" => $tglAkhir,\n\t\t\t\t\t\t\t\t\"i_sk\" => $noSK,\n\t\t\t\t\t\t\t\t\"d_sk\" => $tglSK,\n\t\t\t\t\t\t\t\t\"c_eselon\" => $cEselon,\n\t\t\t\t\t\t\t\t\"d_eselon\" => $dEselon,\n\t\t\t\t\t\t\t\t\"userid\" =>$userid);\n//var_dump($paramJabatUpdate);\n\t\t\t$hasil = $this->auditor_serv->updateJabatan($paramJabatUpdate);\n\t\t \n\t\t\t$this->view->proses = \"2\";\n\t\t\t$this->view->keterangan = \"Data Jabatan\";\n\t\t\t$this->view->status = $hasil;\n\t\t}\n\t\t$this->view->jabatList = $this->auditor_serv->getJabatListByNip($nip);\n\t\t$this->render('jabatan');\n\t}", "public function actionSaveRuanganBaru()\n {\n $updatetindakan = false;\n $pendaftaran_id = (isset($_POST['pendaftaran_id']) ? $_POST['pendaftaran_id'] : null);\n $pasien_id = (isset($_POST['pasien_id']) ? $_POST['pasien_id'] : null);\n $ruangan_id = (isset($_POST['ruangan_id']) ? $_POST['ruangan_id'] : null);\n $jeniskasuspenyakit_id = (isset($_POST['jeniskasuspenyakit_id']) ? $_POST['jeniskasuspenyakit_id'] : null);\n $alasan = (isset($_POST['alasan']) ? $_POST['alasan'] : null);\n $ruangan_awal = (isset($_POST['ruangan_awal']) ? $_POST['ruangan_awal'] : null);\n $idTindakan = (isset($_POST['idTindakan']) ? $_POST['idTindakan'] : null);\n $tarifSatuan = (isset($_POST['tarifSatuan']) ? $_POST['tarifSatuan'] : null);\n $idKarcis = (isset($_POST['idKarcis']) ? $_POST['idKarcis'] : null);\n $tarifkarcis = (isset($_POST['tarifkarcis']) ? $_POST['tarifkarcis'] : null);\n $kelas = (isset($_POST['kelaspelayanan_id']) ? $_POST['kelaspelayanan_id'] : null);\n $karcisTindakan = (isset($_POST['karcisTindakan']) ? $_POST['karcisTindakan'] : null);\n $modPasien = PasienM::model()->findByPk($pasien_id);\n $model = PendaftaranT::model()->findByPk($pendaftaran_id);\n if(!empty($model->pegawai_id)){\n $pegawai_id = (isset($_POST['pegawai_id']) ? $_POST['pegawai_id'] : null);\n }else{\n $pegawai_id = (isset($_POST['pegawai_id']) ? $_POST['pegawai_id'] : $model->pegawai_id);\n }\n \n// $pegawai_id = (!isset($_POST['pegawai_id']) && ($_POST['pegawai_id'] == 'null') ? $model->pegawai_id : $_POST['pegawai_id']);\n $modRiwayat = new UbahruanganR;\n $modRiwayat->ruanganawal_id = $ruangan_awal;\n $modRiwayat->menjadiruangan_id = $ruangan_id;\n $modRiwayat->alasanperubahan = $alasan;\n $modRiwayat->pendaftaran_id = $pendaftaran_id;\n $modRiwayat->tglperubahan = date('Y-m-d');\n $modRiwayat->pasien_id = $pasien_id;\n \n $data = array();\n $transaction = Yii::app()->db->beginTransaction();\n try {\n $success = false;\n if($modRiwayat->validate()){\n if(isset($_POST['pasienadmisi_id'])){\n if(PasienadmisiT::model()->updateByPk ($_POST['pasienadmisi_id'], array('ruangan_id'=>$ruangan_id))){\n $update = true;\n $success = true;\n $data['status'] = 'OK';\n }\n } else {\n if(PendaftaranT::model()->updateByPk($pendaftaran_id,array('ruangan_id'=>$ruangan_id,'jeniskasuspenyakit_id'=>$jeniskasuspenyakit_id,'pegawai_id'=>$pegawai_id))){\n $model->ruangan_id = $ruangan_id;\n $update = true;\n $success = true;\n $data['status'] = 'OK';\n }\n\n }\n \n if($update && $success){\n if($modRiwayat->save()){\n $data['status'] = 'OK';\n }else{\n $success = false;\n $data['status'] = 'Gagal';\n }\n } else {\n $success = false;\n $data['status'] = 'Gagal';\n }\n \n } else {\n $data['status'] = 'Gagal';\n echo print_r($modRiwayat->errors,1);\n }\n \n if ($success){\n $transaction->commit();\n }else{\n $transaction->rollback();\n }\n \n } catch (Exception $exc) {\n $data['status'] = 'Gagal'.$exc;\n $transaction->rollback();\n }\n\n echo CJSON::encode($data);\n Yii::app()->end();\n \n }", "public function actionUpdate($no_surat) {\n $model = $this->findModel($no_surat);\n $session = new session();\n $id_perkara = $session->get('id_perkara');\n $no_register_perkara = $session->get('no_register_perkara');\n $no_akta = $session->get('no_akta');\n $no_reg_tahanan = $session->get('no_reg_tahanan');\n $no_eksekusi = $session->get('no_eksekusi');\n\n $sysMenu = PdmSysMenu::findOne(['kd_berkas' => GlobalConstMenuComponent::D1]);\n //$modeljakpen = PdmJaksaPenerima::findOne(['id_perkara' => $model->id_perkara, 'code_table' => GlobalConstMenuComponent::D1, 'id_table' => $model->id_d1]);\n $modelTerpanggil = VwTerdakwaT2::findOne(['no_register_perkara'=>$no_register_perkara, 'no_reg_tahanan'=>$no_reg_tahanan]);\n //$modelSpdp = PdmSpdp::findOne($model->id_perkara);\n $searchJPU = new VwJaksaPenuntutSearch();\n $dataJPU = $searchJPU->searchttd(Yii::$app->request->queryParams);\n $dataJPU->pagination->pageSize = 5;\n //$model->hari = Yii::$app->globalfunc->GetNamaHari($model->tgl_relas);\n if ($model->load(Yii::$app->request->post())) {\n $transaction = Yii::$app->db->beginTransaction();\n try {\n\n $model->no_eksekusi = $no_eksekusi;\n $model->no_reg_tahanan = $no_reg_tahanan;\n $model->no_register_perkara = $no_register_perkara;\n if(!$model->update()){\n var_dump($model->getErrors());exit;\n }else{\n $transaction->commit();\n Yii::$app->getSession()->setFlash('success', [\n 'type' => 'success',\n 'duration' => 3000,\n 'icon' => 'fa fa-users',\n 'message' => 'Data Berhasil di Update',\n 'title' => 'Update Data',\n 'positonY' => 'top',\n 'positonX' => 'center',\n 'showProgressbar' => true,\n ]);\n return $this->redirect(['update', 'no_surat' => $model->no_surat]);\n }\n } catch (Exception $ex) {\n $transaction->rollback();\n Yii::$app->getSession()->setFlash('success', [\n 'type' => 'danger',\n 'duration' => 3000,\n 'icon' => 'fa fa-users',\n 'message' => 'Data Gagal di Update',\n 'title' => 'Error',\n 'positonY' => 'top',\n 'positonX' => 'center',\n 'showProgressbar' => true,\n ]);\n return $this->redirect(['update', 'no_surat' => $model->no_surat]);\n }\n } else {\n return $this->render('update', [\n 'model' => $model,\n 'sysMenu' => $sysMenu,\n 'modeljakpen' => $modeljakpen,\n 'modelSpdp' => $modelSpdp,\n 'searchJPU' => $searchJPU,\n 'dataJPU' => $dataJPU,\n 'modelTerpanggil' => $modelTerpanggil\n ]);\n }\n }", "public function update(){\n\t\t\ttry{\n\t\t\t\t$this->db->trans_start();\n\t\t\t\t$this->db->where(array(\"id_paciente\"=>$this->id_paciente));\n \t\t$this->db->update(\"paciente\", $this->form_data);\n \t\t$this->db->trans_complete();\n\t\t\t\treturn array(\"message\"=>\"ok\");\n\t\t\t} catch (Exception $e){\n\t\t\t\treturn(array(\"message\"=>\"error: $e\"));\n\t\t\t}\n\t\t}", "function EditRow() {\r\n\t\tglobal $conn, $Security, $Language, $rekeningju;\r\n\t\t$sFilter = $rekeningju->KeyFilter();\r\n\t\t$rekeningju->CurrentFilter = $sFilter;\r\n\t\t$sSql = $rekeningju->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// NoRek\r\n\t\t\t$rekeningju->NoRek->SetDbValueDef($rsnew, $rekeningju->NoRek->CurrentValue, \"\", $rekeningju->NoRek->ReadOnly);\r\n\r\n\t\t\t// Keterangan\r\n\t\t\t$rekeningju->Keterangan->SetDbValueDef($rsnew, $rekeningju->Keterangan->CurrentValue, NULL, $rekeningju->Keterangan->ReadOnly);\r\n\r\n\t\t\t// debet\r\n\t\t\t$rekeningju->debet->SetDbValueDef($rsnew, $rekeningju->debet->CurrentValue, 0, $rekeningju->debet->ReadOnly);\r\n\r\n\t\t\t// kredit\r\n\t\t\t$rekeningju->kredit->SetDbValueDef($rsnew, $rekeningju->kredit->CurrentValue, 0, $rekeningju->kredit->ReadOnly);\r\n\r\n\t\t\t// kode_bukti\r\n\t\t\t$rekeningju->kode_bukti->SetDbValueDef($rsnew, $rekeningju->kode_bukti->CurrentValue, NULL, $rekeningju->kode_bukti->ReadOnly);\r\n\r\n\t\t\t// tanggal\r\n\t\t\t$rekeningju->tanggal->SetDbValueDef($rsnew, ew_UnFormatDateTime($rekeningju->tanggal->CurrentValue, 7), ew_CurrentDate(), $rekeningju->tanggal->ReadOnly);\r\n\r\n\t\t\t// tanggal_nota\r\n\t\t\t$rekeningju->tanggal_nota->SetDbValueDef($rsnew, ew_UnFormatDateTime($rekeningju->tanggal_nota->CurrentValue, 7), ew_CurrentDate(), $rekeningju->tanggal_nota->ReadOnly);\r\n\r\n\t\t\t// kode_otomatis\r\n\t\t\t// kode_otomatis_tingkat\r\n\r\n\t\t\t$rekeningju->kode_otomatis_tingkat->SetDbValueDef($rsnew, $rekeningju->kode_otomatis_tingkat->CurrentValue, \"\", $rekeningju->kode_otomatis_tingkat->ReadOnly);\r\n\r\n\t\t\t// apakah_original\r\n\t\t\t$rekeningju->apakah_original->SetDbValueDef($rsnew, $rekeningju->apakah_original->CurrentValue, \"\", $rekeningju->apakah_original->ReadOnly);\r\n\r\n\t\t\t// Call Row Updating event\r\n\t\t\t$bUpdateRow = $rekeningju->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\tif (count($rsnew) > 0)\r\n\t\t\t\t\t$EditRow = $conn->Execute($rekeningju->UpdateSQL($rsnew));\r\n\t\t\t\telse\r\n\t\t\t\t\t$EditRow = TRUE; // No field to update\r\n\t\t\t\t$conn->raiseErrorFn = '';\r\n\t\t\t} else {\r\n\t\t\t\tif ($rekeningju->CancelMessage <> \"\") {\r\n\t\t\t\t\t$this->setFailureMessage($rekeningju->CancelMessage);\r\n\t\t\t\t\t$rekeningju->CancelMessage = \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->setFailureMessage($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$rekeningju->Row_Updated($rsold, $rsnew);\r\n\t\t$rs->Close();\r\n\t\treturn $EditRow;\r\n\t}", "public function actionUpdate($id_was_23a)\n {\n\n $chars = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $res = \"\";\n for ($i = 0; $i < 10; $i++) {\n $res .= $chars[mt_rand(0, strlen($chars)-1)];\n }\n\n $model = $this->findModel($id_was_23a);\n $modelTembusan=TembusanWas2::findAll(['pk_in_table'=>$model->id_was_23a,'from_table'=>'Was-23a','no_register'=>$_SESSION['was_register'],'id_tingkat'=>$_SESSION['kode_tk'],'id_kejati'=>$_SESSION['kode_kejati'],'id_kejari'=>$_SESSION['kode_kejari'],'id_cabjari'=>$_SESSION['kode_cabjari'],'id_wilayah'=>$_SESSION['was_id_wilayah'],'id_level1'=>$_SESSION['was_id_level1'],'id_level2'=>$_SESSION['was_id_level2'],'id_level3'=>$_SESSION['was_id_level3'],'id_level4'=>$_SESSION['was_id_level4']]);\n $fungsi=new FungsiComponent();\n $is_inspektur_irmud_riksa=$fungsi->gabung_where();\n $OldFile=$model->upload_file;\n\n if ($model->load(Yii::$app->request->post())){\n $errors = array();\n $file_name = $_FILES['upload_file']['name'];\n $file_size =$_FILES['upload_file']['size'];\n $file_tmp =$_FILES['upload_file']['tmp_name'];\n $file_type =$_FILES['upload_file']['type'];\n $ext = pathinfo($file_name, PATHINFO_EXTENSION);\n $tmp = explode('.', $_FILES['upload_file']['name']);\n $file_exists = end($tmp);\n $rename_file =$is_inspektur_irmud_riksa.'_'.$_SESSION['inst_satkerkd'].$res.'.'.$ext;\n\n $connection = \\Yii::$app->db;\n $transaction = $connection->beginTransaction();\n try {\n $model->updated_ip = $_SERVER['REMOTE_ADDR'];\n $model->updated_time = date('Y-m-d H:i:s');\n $model->updated_by = \\Yii::$app->user->identity->id;\n $model->upload_file=($file_name==''?$OldFile:$rename_file);\n if($model->save()) {\n\n if($OldFile!='' && file_exists($file_tmp) && file_exists(\\Yii::$app->params['uploadPath'].'was_23a/'.$OldFile)) {\n unlink(\\Yii::$app->params['uploadPath'].'was_23a/'.$OldFile);\n }\n\n $pejabat = $_POST['pejabat'];\n TembusanWas2::deleteAll(['from_table'=>'Was-23a','no_register'=>$_SESSION['was_register'],'id_tingkat'=>$_SESSION['kode_tk'],'id_kejati'=>$_SESSION['kode_kejati'], 'id_kejari'=>$_SESSION['kode_kejari'],'id_cabjari'=>$_SESSION['kode_cabjari'],'pk_in_table'=>strrev($model->id_was_23a),'id_wilayah'=>$_SESSION['was_id_wilayah'],'id_level1'=>$_SESSION['was_id_level1'],'id_level2'=>$_SESSION['was_id_level2'],'id_level3'=>$_SESSION['was_id_level3'],'id_level4'=>$_SESSION['was_id_level4']]);\n for($z=0;$z<count($pejabat);$z++){\n $saveTembusan = new TembusanWas2;\n $saveTembusan->from_table = 'Was-23a';\n $saveTembusan->pk_in_table = strrev($model->id_was_23a);\n $saveTembusan->tembusan = $_POST['pejabat'][$z];\n $saveTembusan->created_ip = $_SERVER['REMOTE_ADDR'];\n $saveTembusan->created_time = date('Y-m-d H:i:s');\n $saveTembusan->created_by = \\Yii::$app->user->identity->id;\n // $saveTembusan->inst_satkerkd = $_SESSION['inst_satkerkd'];s\n $saveTembusan->no_register = $_SESSION['was_register'];\n $saveTembusan->id_tingkat = $_SESSION['kode_tk'];\n $saveTembusan->id_kejati = $_SESSION['kode_kejati'];\n $saveTembusan->id_kejari = $_SESSION['kode_kejari'];\n $saveTembusan->id_cabjari = $_SESSION['kode_cabjari'];\n $saveTembusan->is_inspektur_irmud_riksa = $_SESSION['is_inspektur_irmud_riksa'];\n $saveTembusan->id_wilayah=$_SESSION['was_id_wilayah'];\n $saveTembusan->id_level1=$_SESSION['was_id_level1'];\n $saveTembusan->id_level2=$_SESSION['was_id_level2'];\n $saveTembusan->id_level3=$_SESSION['was_id_level3'];\n $saveTembusan->id_level4=$_SESSION['was_id_level4'];\n $saveTembusan->save();\n } \n\n }\n move_uploaded_file($file_tmp,\\Yii::$app->params['uploadPath'].'was_23a/'.$rename_file);\n $transaction->commit();\n\n $model->validate();\n $model->save();\n Yii::$app->getSession()->setFlash('success', [\n 'type' => 'success', //String, can only be set to danger, success, warning, info, and growl\n 'duration' => 5000, //Integer //3000 default. time for growl to fade out.\n 'icon' => 'glyphicon glyphicon-ok-sign', //String\n 'message' => 'Data Berhasil Disimpan', // String\n 'title' => 'Save', //String\n 'positonY' => 'top', //String // defaults to top, allows top or bottom\n 'positonX' => 'center', //String // defaults to right, allows right, center, left\n 'showProgressbar' => true,\n ]);\n\n return $this->redirect(['index']);\n } catch (Exception $e) {\n $transaction->rollback();\n if(YII_DEBUG){throw $e; exit;} else{return false;}\n }\n } else {\n return $this->render('update', [\n 'model' => $model,\n 'modelTembusan' => $modelTembusan,\n ]);\n }\n }", "function updateDataPeminjaman($id_b, $nama,$NIM,$Tgl_Peminjaman,$Tgl_Kembali,$Nama_Lab,$Nama_Barang,$Keterangan) {\n $query = \"UPDATE Peminjaman SET nama='$nama',NIM='$NIM',Tgl_Peminjaman='$Tgl_Peminjaman', Tgl_Kembali ='$Tgl_Kembali', Nama_Lab='$Nama_Lab', Nama_Barang='$Nama_Barang', Keterangan='$Keterangan' WHERE id='$id_b'\";\n $hasilupdate=mysql_query($query);\n\t\t\n if ($hasilupdate)\n\t\t echo \"<div class='alert alert-block alert-success'><strong><i></i> DATA BERHASIL DI UPDATE</strong></div>\";\n else\n echo \"<div class='alert alert-block alert-danger'><strong><i></i> DATA GAGAL DI UPDATE</strong></div>e\";\n }", "function update() {\n\n\n if (!$_POST) {\n $this->alert = true;\n $this->alertMsg = \"<h4>Alerta!</h4> No se han recibido datos\";\n $this->loadContentView(\"viewAgregar\");\n return false;\n }\n\n if (!$_POST['anio'] || !$_POST['mes']) {\n $this->error = true;\n $this->errorMsg = \"<h4>Campos incompletos!</h4>Todos los campos son obligatorios\";\n $this->loadContentView(\"viewAgregar\");\n return false;\n }\n\n\n\n MasterController::requerirModelo(\"fecha\");\n $item = new fecha();\n $item->postToObject();\n $item->setDate($item->getAnio().\"-\".$item->getMes().\"-01\");\n //die($item->getDate());\n $this->transaction->loadClass($item);\n\n //echo $this->transaction->update();\n if ($this->transaction->update()) {\n $this->done = true;\n $this->doneMsg = \"Fecha de ingreso editada con exito\";\n $this->loadContentView(\"default\");\n return true;\n } else {\n $this->loadContentView(\"default\");\n return false;\n }\n }", "function ubah($koneksi){\n\n\t// ubah data\n\tif(isset($_POST['btn_ubah'])){\n\t\t$nik_pemohon = $_POST['nik_pemohon'];\n\t\t$nama_pemohon = $_POST['nama_pemohon'];\n\t\t$no_telp = $_POST['no_telp'];\n\t\t$tempat_lahir = $_POST['tempat_lahir'];\n\t\t$tanggal_lahir = $_POST['tanggal_lahir'];\n\t\t$pekerjaan = $_POST['pekerjaan'];\n\t\t$agama = $_POST['agama'];\n\t\t$desa_pemohon = $_POST['desa_pemohon'];\n\t\t$id_jk = $_POST['id_jk'];\n\t\t$kecamatan_pemohon = $_POST['kecamatan_pemohon'];\n\t\t$id_jenis_pemohon = $_POST['id_jenis_pemohon'];\n\t\t$kabupaten = $_POST['kabupaten'];\n\t\t\n\t\tif(!empty($nik_pemohon) && !empty($nama_pemohon) && !empty($no_telp) && !empty($desa_pemohon) && !empty($tempat_lahir) &&\n\t\t!empty($tanggal_lahir) && !empty($pekerjaan) && !empty($agama) &&\n\t\t!empty($id_jk) && !empty($kecamatan_pemohon) && !empty($id_jenis_pemohon) && !empty($kabupaten)){\n\t\t\t$sql_update = \"UPDATE pemohon SET nik_pemohon='$nik_pemohon', nama_pemohon='$nama_pemohon', no_telp='$no_telp',\n\t\t\t\ttempat_lahir='$tempat_lahir', tanggal_lahir='$tanggal_lahir', pekerjaan='$pekerjaan',\n\t agama='$agama',\tdesa_pemohon='$desa_pemohon', id_jk='$id_jk', kecamatan_pemohon='$kecamatan_pemohon', \n\t\t\t\tid_jenis_pemohon='$id_jenis_pemohon', kabupaten='$kabupaten' WHERE nik_pemohon=$nik_pemohon\";\n\t\t\t$update = mysqli_query($koneksi, $sql_update);\n\t\t\tif($update && isset($_GET['aksi'])){\n\t\t\t\tif($_GET['aksi'] == 'update'){\n\t\t\t\t\techo \"<div class='alert alert-info'>Data Berhasil Diubah</div>\";\n\t\t\t\t\techo \"<meta http-equiv='refresh' content='1;url=entri_pemohon.php'>\";\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$pesan = \"Data tidak lengkap!\";\n\t\t}\n\t}\n\t\n\t// tampilkan form ubah\n\tif(isset($_GET['id'])){\n\n\t\t?>\n\t\t\t<a href=\"entri_pemohon.php\"> &laquo; Home</a> | \n\t\t\t<a href=\"entri_pemohon.php?aksi=create\"> (+) Tambah Data</a>\n\t\t\t<hr>\n\t\t\t<h3>Ubah Data</h3>\n\t\t\t<dir class=\"row\">\n\t\t\t<div class=\"col-xl-6\">\n\t\t\t<form action=\"\" method=\"POST\">\n\t\t\t<fieldset>\n\t\t\t\t<div class=\"table-responsive\">\n\t\t\t\t<table class=\"table table-responsive-sm table-hover\" border=\"0\">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>NIK </td>\n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"nik_pemohon\" value=\"<?php echo $_GET['id'] ?>\" hidden/><?php echo $_GET['id'] ?></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>No. Telepon / HP</td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"no_telp\" value=\"<?php echo $_GET['no_telp'] ?>\" /></label></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Nama Pemohon </td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"nama_pemohon\" value=\"<?php echo $_GET['nama_pemohon'] ?>\"/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Tempat Lahir</td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"tempat_lahir\" value=\"<?php echo $_GET['tempat_lahir'] ?>\"/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Tanggal Lahir</td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"date\" name=\"tanggal_lahir\" value=\"<?php echo $_GET['tanggal_lahir'] ?>\"/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Pekerjaan </td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"pekerjaan\" value=\"<?php echo $_GET['pekerjaan'] ?>\"/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Agama </td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"agama\" value=\"<?php echo $_GET['agama'] ?>\"/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t<?php \n\t\t// echo \"<pre>\";\n\t\t// print_r($datadesa);\n\t\t// echo \"</pre>\";\n\t\t\t\t\t\t\t ?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</fieldset>\n\t\t\t\t\n\t</div>\n\t<div class=\"col-xl-6\">\n\t\t\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<div class=\"table-responsive\">\n\t\t\t\t\t\t\t<table class=\"table table-responsive-sm table-hover\" border=\"0\">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>Jenis Kelamin</td> \n\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t<select name=\"id_jk\" required>\n\t\t\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\t\t\t$datajk = array();\n\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_kelamin\");\n\t\t\t\t\t\t\t\t\t\t\twhile ($jk = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t$datajk[] = $jk;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$sql = \"SELECT * FROM pemohon WHERE nik_pemohon='$_GET[id]'\";\n\t\t\t\t\t\t\t\t\t\t\t$result = mysqli_query($koneksi, $sql);\n\n\t\t\t\t\t\t\t\t\t\t\t$jk = mysqli_fetch_assoc($result);\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t<option disabled value=\"\">-Pilih Jenis Kelamin-</option>\n\t\t\t\t\t\t\t\t\t\t<?php foreach ($datajk as $key => $value):?>\n\t\t\t\t\t\t\t\t\t\t<option value=\"<?= $value[\"id_jk\"] ?>\" <?php if($jk[\"id_jk\"]==$value[\"id_jk\"]){ echo \"selected\"; } ?> >\n\t\t\t\t\t\t\t\t\t\t<?= $value[\"nama_jk\"] ?>\n\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Alamat</td> \n\t\t\t\t\t\t\t\t\t<td> : </td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Desa</td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"desa_pemohon\" value=\"<?php echo $_GET['desa_pemohon'] ?>\"/></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Kecamatan</td> \n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"kecamatan_pemohon\" value=\"<?php echo $_GET['kecamatan_pemohon'] ?>\"/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>Kabupaten </td>\n\t\t\t\t\t\t\t\t\t<td> : <input type=\"text\" name=\"kabupaten\" value=\"<?php echo $_GET['kabupaten'] ?>\"/></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t<td>Jenis Pemohon</td> \n\t\t\t\t\t\t\t\t<td> : \n\t\t\t\t\t\t\t\t\t<select name=\"id_jenis_pemohon\" required>\n\t\t\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\t\t\t$datajenispemohon = array();\n\t\t\t\t\t\t\t\t\t\t\t$sql = mysqli_query($koneksi, \"SELECT * FROM jenis_pemohon\");\n\t\t\t\t\t\t\t\t\t\t\twhile ($jenispemohon = mysqli_fetch_assoc($sql)) {\n\t\t\t\t\t\t\t\t\t\t\t\t$datajenispemohon[] = $jenispemohon;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$sql = \"SELECT * FROM pemohon WHERE nik_pemohon='$_GET[id]'\";\n\t\t\t\t\t\t\t\t\t\t\t$result = mysqli_query($koneksi, $sql);\n\n\t\t\t\t\t\t\t\t\t\t\t$jenispemohon = mysqli_fetch_assoc($result);\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t<option disabled selected value=\"\">-Pilih Jenis Pemohon-</option>\n\t\t\t\t\t\t\t\t\t\t<?php foreach ($datajenispemohon as $key => $value):?>\n\t\t\t\t\t\t\t\t\t\t<option value=\"<?= $value[\"id_jenis_pemohon\"] ?>\" <?php if($jenispemohon[\"id_jenis_pemohon\"]==$value[\"id_jenis_pemohon\"]){ echo \"selected\"; } ?> >\n\t\t\t\t\t\t\t\t\t\t<?= $value[\"jenis_pemohon\"] ?>\n\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<label class=\"ml-2\">\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" name=\"btn_ubah\" value=\"Simpan Perubahan\"/>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t<br>\n\t\t\t\t</div>\n\n\t\t\t\t<p><?php echo isset($pesan) ? $pesan : \"\" ?></p>\n\t\t\t</fieldset>\n\t\t</form>\n\t\t</dir>\n\n\t\t<?php\n// \t\techo \"<pre>\";\n// \t\tprint_r($level);\n//\t\techo \"</pre>\";\n\t}\n\t\n}", "public function actionUpdate($id_t14)\n {\n\t\t$session = new session();\n $no_register_perkara = $session->get('no_register_perkara');\n $sysMenu = PdmSysMenu::findOne(['kd_berkas' => GlobalConstMenuComponent::T14 ]);\n $model = PdmT14::findOne(['no_register_perkara'=>$no_register_perkara, 'no_surat_t14'=>$id_t14]);\n //echo '<pre>';print_r($model);exit;\n $modeljaksi = PdmJaksaP16a::findAll(['no_register_perkara' => $no_register_perkara]);\n\t\t$modelTerdakwa = VwTerdakwaT2::findAll(['no_register_perkara' => $no_register_perkara]);\n $ciri2 = json_decode($model->ciriciri);\n //echo '<pre>';print_r($ciri);exit;\n\n /*if ($model->load(Yii::$app->request->post())) {\n $data = array();\n $data['ciri'] = $_POST['ciri'];\n $data['isi'] = $_POST['isi'];\n\n $model->ciriciri = json_encode($data);\n $model->no_reg_tahanan_jaksa = $_POST['PdmT14']['no_reg_tahanan_jaksa'];\n $model->nip_jaksa = $_POST['PdmT14']['nip_jaksa'];\n $model->no_register_perkara = $no_register_perkara;\n $model->id_tersangka = $_POST['PdmT14']['id_tersangka'];\n\n $model->updated_by=\\Yii::$app->user->identity->peg_nip;\n $model->updated_time=date('Y-m-d H:i:s');\n $model->updated_ip = \\Yii::$app->getRequest()->getUserIP();\n\n if($model->update()){\n PdmTembusanT14::deleteAll(['no_register_perkara' => $model->no_register_perkara,'no_surat_t14'=>$model->no_surat_t14]);\n if(!empty($_POST['new_tembusan'])){\n for($i = 0; $i < count($_POST['new_tembusan']); $i++){\n $modelNewTembusan= new PdmTembusanT14();\n $modelNewTembusan->tembusan = $_POST['new_tembusan'][$i];\n $modelNewTembusan->no_urut=$i+1; \n $modelNewTembusan->no_register_perkara = $model->no_register_perkara;\n $modelNewTembusan->no_surat_t14 = $_POST['PdmT14']['no_surat_t14'];\n $modelNewTembusan->save();\n }\n }\n }\n\t\t\t\t\t\n\t\t\t\n \n\t\t\t//notifikasi simpan\n //if($model->save()){\n Yii::$app->getSession()->setFlash('success', [\n 'type' => 'success',\n 'duration' => 3000,\n 'icon' => 'fa fa-users',\n 'message' => 'Data Berhasil di Simpan',\n 'title' => 'Simpan Data',\n 'positonY' => 'top',\n 'positonX' => 'center',\n 'showProgressbar' => true,\n ]);\n //}\n \n \n return $this->redirect(['index']);\n } else {*/\n return $this->render('update', [\n 'model' => $model,\n 'sysMenu' => $sysMenu,\n 'modeljaksi' => $modeljaksi,\n\t\t\t\t\t\t'modelTerdakwa' => $modelTerdakwa,\n 'ciri2'=>$ciri2,\n ]);\n //}\n }", "public function update(Request $request)\n {\n $this->validate($request,[\n 'tamu_id' => 'integer|min:1',\n 'jumlah_dewasa' => 'integer|min:1',\n 'jumlah_anak' => 'integer|min:0',\n 'invoice_id' => 'required',\n 'tgl_checkout' => 'required|date',\n 'deposit' => 'required|numeric|min:0'\n ]);\n \n $input = $request->all();\n $transaksi = TransaksiKamar::find($input['id']);\n $input['user_id'] = Auth::user()->id;\n $input['tgl_checkout'] = $request->get('tgl_checkout').' '.$request->get('waktu_checkout');\n $input['tgl_checkin'] = $request->get('tgl_checkin').' '.$request->get('waktu_checkin');\n $input['status'] = 1;\n\n $fdate = $input['tgl_checkin'];\n $tdate = $input['tgl_checkout'];\n $datetime1 = new DateTime($fdate);\n $datetime2 = new DateTime($tdate);\n $interval = $datetime1->diff($datetime2);\n $jumlah_hari = $interval->format('%a');\n\n $input['total_biaya'] = $transaksi->kamar->typekamar->harga_malam * $jumlah_hari;\n\n \n if ($transaksi->update($input))\n {\n $update_kamar = $transaksi->kamar->update(['status' => 1]);\n }\n Alert::success('Data Berhasil Diupdate', 'Selamat');\n return Redirect::to('admin/'.$this->title);\n }", "public function actionUpdate($id_ba14)\n { \n $sysMenu = PdmSysMenu::findOne(['kd_berkas' => GlobalConstMenuComponent::BA14 ]);\n\t\t\n $model = $this->findModel($id_ba14);\n if($model == null){\n $model = new PdmBa14();\n }\n\n $modeljaksiChoosen = PdmJaksaSaksi::findOne(['id_perkara' => $model->id_perkara, 'code_table' => GlobalConstMenuComponent::BA14, 'id_table' => $model->id_ba14]);\n\n $modeljaksi = $model->jaksaPelaksana($model->id_perkara);\n\n $modelRp9 = PdmRp9::findOne(['id_perkara' => $model->id_perkara]);\n $modelRt3 = PdmRt3::findOne(['id_perkara' => $model->id_perkara, 'id_tersangka' => $model->id_tersangka]);\n\n $modelTersangka = $this->findModelTersangka($model->id_perkara);\n $modelSpdp = $this->findModelSpdp($model->id_perkara);\t\t\n\t\t$modelt8 = Pdmt8::findOne(['id_perkara' => $model->id_perkara]);\n\n if ($model->load(Yii::$app->request->post())) {\n $model->flag = '2';\n $model->update();\n\t\t\t\t\n PdmJaksaSaksi::deleteAll(['id_perkara' => $model->id_perkara, 'code_table' => GlobalConstMenuComponent::BA14, 'id_table' => $model->id_ba14]);\n \n $jaksa_pelaksana = explode(\"#\", $_POST['jaksa_pelaksana']); // [0] => nip, [1] => nama, [2] => jabatan, [3] => pangkat\n \n $modeljaksi2 = new PdmJaksaSaksi();\n $seqJpu = Yii::$app->db->createCommand(\"select public.generate_pk('pidum.pdm_jaksa_saksi', 'id_jpp', '\".\\Yii::$app->globalfunc->getSatker()->inst_satkerkd.\"', '\".date('Y').\"')\")->queryOne();\n\n $modeljaksi2->id_perkara = $model->id_perkara;\n $modeljaksi2->id_jpp = $seqJpu['generate_pk'];\n $modeljaksi2->code_table = GlobalConstMenuComponent::BA14;\n $modeljaksi2->id_table = $model->id_ba14;\n $modeljaksi2->nip = $jaksa_pelaksana[0];\n $modeljaksi2->nama = $jaksa_pelaksana[1];\n $modeljaksi2->jabatan = $jaksa_pelaksana[2];\n $modeljaksi2->pangkat = $jaksa_pelaksana[3];\n $modeljaksi2->save();\n\n \n\t\t\t\n\t\t\t//notifkasi simpan\n\t\t\tYii::$app->getSession()->setFlash('success', [\n 'type' => 'success', //String, can only be set to danger, success, warning, info, and growl\n 'duration' => 3000, //Integer //3000 default. time for growl to fade out.\n 'icon' => 'glyphicon glyphicon-ok-sign', //String\n 'message' => 'Data Berhasil Diubah', // String\n 'title' => 'Ubah Data', //String\n 'positonY' => 'top', //String // defaults to top, allows top or bottom\n 'positonX' => 'center', //String // defaults to right, allows right, center, left\n 'showProgressbar' => true,\n ]);\n\t\t\t\n\t\t\treturn $this->redirect(['index']);\n\t\t\t\n\t\t\t} else {\n return $this->render('update', [\n 'model' => $model,\n\t\t\t\t'modelTersangka' => $modelTersangka,\n\t\t\t\t'modelSpdp' => $modelSpdp,\n\t\t\t\t'searchJPU' => $searchJPU,\n\t\t\t\t'dataJPU' => $dataJPU,\n 'modeljaksi' => $modeljaksi,\n\t\t\t\t'modeljaksiChoosen' => $modeljaksiChoosen,\n 'sysMenu' => $sysMenu,\n 'modelRp9' =>$modelRp9,\n\t\t\t\t]);\n }\n }", "public function updateReporInpecLampTecnico($POST){\n\t\t// require('../bd/bd.php');\n\t\t$db = new DbCnnx();\n\n @$noFolio=$POST[\"noFolio\"]; \n @$noCliente=$POST[\"noCliente\"]; \n @$Obser=$POST[\"Obser\"]; \n @$horInicio=$POST[\"horInicio\"]; \n @$horFinal=$POST[\"horFinal\"]; \n @$id_object=$POST[\"id_object\"];\n @$ubicacion=$POST[\"ubicacion\"];\n @$mosquito=$POST[\"mosquito\"];\n @$mosca=$POST[\"mosca\"];\n @$palomilla=$POST[\"palomilla\"];\n @$escarabajo=$POST[\"escarabajo\"];\n\t\t@$valid=$POST[\"valid\"];\n @$limpieza=$POST[\"limpieza\"];\n @$estatus_object=$POST[\"estatus_object\"];\n @$obser_object=$POST[\"obser_object\"];\n\t\t\n\t\t$createId = $noCliente.'LAM'.$id_object;\n\t\t$createIdPrincipal = $noCliente.'LAM';\n\t\tif($noCliente == \"\"){\n\t\t\techo \"\n\t\t\t<script language='javascript'>\n\t\t\t\talert('No se ha podido recibir N° Cliente');\n\t\t\t</script>\";\n\t\t }\n\t\telse{ \n\t\t\t\t\t\n\t\t\t$SQL_insert_report = sprintf(\"UPDATE reportes_fumi SET MOSQUITO='$mosquito',MOSCA='$mosca',PALOMILLA='$palomilla',ESCARABAJO='$escarabajo',LIMPIEZA='$limpieza',ESTATUS_OBJECT='$estatus_object',OBSERV_OBJECT='$obser_object',OBSERV_REPORT='$Obser',HORA_INICIO='$horInicio',HORA_FINALIZADO='$horFinal' WHERE ID_REPORTE='$createId' AND NO_FOLIO='$noFolio'\");\t\t\t\n\t\t\t$rec = $db->query($SQL_insert_report);\n\t\t\t$SQL_update_report = sprintf(\"UPDATE reportes_fumi SET OBSERV_REPORT='$Obser',HORA_INICIO='$horInicio',HORA_FINALIZADO='$horFinal', FECHA_REPORTE=NOW() WHERE ID_REPORTE='$createIdPrincipal' AND NO_FOLIO='$noFolio'\");\t\t\t\n\t\t\t$rec = $db->query($SQL_update_report);\n\t\t\t\n\t\t\t// print_r($rec);\n\t\t\tif($rec==1){\n\t\t\t\techo '1#';\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n }", "public function updateData($id_transaksi)\t\n\t{\n\t\t$data = array(\n\t\t\t/* 'id' yang dikiri harus sama seperti di table\n\t\t\t'id' yang dikanan harus menurut name inputnya */\n\t\t\t'id_transaksi' => $this->input->post('id_transaksi'),\n\t\t\t'id_pelanggan' => $this->input->post('id_pelanggan'),\n\t\t\t'order_id' => $this->input->post('order_id'),\n\t\t\t'message' => $this->input->post('message'),\n\t\t\t'tgl_kirim' => $this->input->post('tgl_kirim'),\n\t\t\t'tgl_terima' => $this->input->post('tgl_terima')\n\t\t);\n\t\t/* jika semua sama sperti di table\n\t\tgunakan versi simple seprti berikut */\n\t\t$data = $this->input->post();\n\t\t//mengeset where id=$id\n\t\t$this->db->where('id_transaksi',$id_transaksi);\n\t\t/*eksekusi update transaksi set $data from transaksi where id=$id\n\t\tjika berhasil return berhasil */\n\t\tif($this->db->update(\"transaksi\",$data)){\n\t\t\treturn \"Berhasil\";\n\t\t}\n\t}", "public function techo_update($proy_id){\n $proyecto = $this->model_proyecto->get_id_proyecto($proy_id);\n $fase = $this->model_faseetapa->get_id_fase($proy_id);\n $fgestion=$this->model_faseetapa->fase_gestion($fase[0]['id'],$this->gestion);\n $ffofet=$this->model_faseetapa->fase_presupuesto_id($fgestion[0]['ptofecg_id']);\n $ffi = $this->model_faseetapa->fuentefinanciamiento(); ///// fuente financiamiento\n $fof = $this->model_faseetapa->organismofinanciador(); ///// organismo financiador\n\n $tabla ='';\n if(count($ffofet)!=0){\n $tabla.='\n <form action=\"'.site_url('').'/proy/add_ptto_techo\" id=\"form_techo\" name=\"form_techo\" class=\"smart-form\" method=\"post\">\n <input type=\"hidden\" id=\"nffofet\" value=\"'.count($ffofet).'\"/>\n <input type=\"hidden\" name=\"proy_id\" id=\"proy_id\" value=\"'.$proy_id.'\"/>\n <input type=\"hidden\" name=\"ptofecg_id\" id=\"ptofecg_id\" value=\"'.$fgestion[0]['ptofecg_id'].'\"/>\n <input type=\"hidden\" name=\"ptto_gestion\" id=\"ptto_gestion\" value=\"'.$fgestion[0]['pfecg_ppto_total'].'\"/>\n <input type=\"hidden\" id=\"contador-filas\" value=\"'.count($ffofet).'\" />\n <table class=\"table table-bordered\" id=\"tabla\" style=\"width:60%;\">\n <thead>\n <tr>\n <th style=\"width:1%;\">#</th>\n <th style=\"width:38%;\">FUENTE DE FINANCIAMIENTO</th>\n <th style=\"width:38%;\">ORGANISMO FINANCIADOR</th>\n <th style=\"width:20%;\">IMPORTE</th>\n <th style=\"width:3%;\"></th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n $suma=0;\n foreach($ffofet as $rowf){\n $ff_ins = $this->model_faseetapa->fuente_insumo($rowf['ffofet_id']); \n $suma=$suma+$rowf['ffofet_monto'];\n $nro++;\n $tabla .='<tr>';\n $tabla .='<td><input type=\"hidden\" name=\"ffofet_id[]\" value=\"'.$rowf['ffofet_id'].'\"/>'.$nro.'</td>';\n $tabla .='<td>\n <select class=\"form-control\" name=\"ffin[]\" id=\"fi'.$nro.'\" title=\"Seleccione fuente de Financiamiento\" required >\n <option value=\"\">Seleccione Fuente financiamiento </option>';\n foreach($ffi as $row){ \n if($rowf['ff_id']==$row['ff_id']){\n $tabla .='<option value=\"'.$row['ff_id'].'\" selected>'.$row['ff_codigo'].' - '.$row['ff_descripcion'].'</option>'; \n }\n else{\n $tabla .='<option value=\"'.$row['ff_id'].'\">'.$row['ff_codigo'].' - '.$row['ff_descripcion'].'</option>'; \n }\n }\n $tabla .=' \n </select>\n </td>';\n $tabla .='<td>\n <select class=\"form-control\" name=\"ofin[]\" id=\"ofi'.$nro.'\" title=\"Seleccione organismo Financiador\" required >\n <option value=\"\">Seleccione Organismo Financiador </option>';\n foreach($fof as $row){\n if($rowf['of_id']==$row['of_id']){\n $tabla .='<option value=\"'.$row['of_id'].'\" selected>'.$row['of_codigo'].' - '.$row['of_descripcion'].'</option>';\n }\n else{\n $tabla .='<option value=\"'.$row['of_id'].'\">'.$row['of_codigo'].' - '.$row['of_descripcion'].'</option>';\n }\n }\n $tabla .=' \n </select>\n </td>';\n $tabla .='<td><input type=\"text\" name=\"importe[]\" id=\"impo'.$nro.'\" value=\"'.$rowf['ffofet_monto'].'\"class=\"form-control\" onkeyup=\"suma_monto_techo();\" onkeypress=\"if (this.value.length < 10) { return numerosDecimales(event);}else{return false; }\" onpaste=\"return false\"/></td>';\n $tabla .='<td align=center>';\n if($this->session->userdata('rol_id')==1){\n if($ff_ins==0){\n $tabla .= '<a href=\"#\" data-toggle=\"modal\" data-target=\"#modal_del_ff\" class=\"btn btn-xs del_ff\" title=\"ELIMINAR REQUERIMIENTO\" name=\"'.$rowf['ffofet_id'].'\" id=\"'.$proy_id.'\">\n <img src=\"'.base_url().'assets/img/delete.png\" width=\"30\" height=\"30\"/>\n </a>';\n }\n }\n $tabla .='</td>';\n $tabla .='</tr>';\n }\n $tabla .='</tbody>\n </table><br>\n <table class=\"table table-bordered\" style=\"width:60%;\">\n <tr>\n <td style=\"width:77%;\"><font color=\"blue\">PRESUPUESTO ASIGNADO '.$this->gestion.'</font></td>\n <td style=\"width:20%;\"><input type=\"text\" name=\"ptto\" id=\"ptto\" value=\"'.$fgestion[0]['pfecg_ppto_total'].'\" class=\"form-control\" disabled/></td>\n <td style=\"width:3%;\"></td>\n </tr>\n <tr>\n <td style=\"width:77%;\"><font color=\"blue\">TOTAL</font></td>\n <td style=\"width:20%;\"><input type=\"text\" name=\"total\" id=\"total\" value=\"'.$suma.'\" class=\"form-control\" disabled/></td>\n <td style=\"width:3%;\"></td>\n </tr>\n <tr>\n <td style=\"width:77%;\"><font color=\"blue\">SALDO</font></td>\n <td style=\"width:20%;\"><input type=\"text\" name=\"saldo\" id=\"saldo\" value=\"'.($fgestion[0]['pfecg_ppto_total']-$suma).'\" class=\"form-control\" disabled/></td>\n <td style=\"width:3%;\"></td>\n </tr>\n </table>\n <footer>\n <div id=\"but\">\n <button type=\"button\" name=\"mod_tech\" id=\"mod_tech\" class=\"btn btn-primary\">Modificar Techo Presupuestario</button>\n </div>\n </footer>\n </form>';\n\n ?>\n <script type=\"text/javascript\">\n function suma_monto_techo(){\n ptotal = parseFloat($('[name=\"ptto_gestion\"]').val());\n nro = parseFloat($('[id=\"nffofet\"]').val());\n new_nro = parseFloat($('[id=\"contador-filas\"]').val());\n var suma=0;\n // alert(nro+new_nro)\n for (var i = 1; i <= new_nro; i++) {\n suma=parseFloat(suma)+parseFloat($('[id=\"impo'+i+'\"]').val());\n }\n\n $('[name=\"total\"]').val((suma).toFixed(2));\n tot = parseFloat($('[name=\"total\"]').val());\n \n $('[name=\"saldo\"]').val((parseFloat(ptotal)-parseFloat(tot)).toFixed(2));\n saldo = parseFloat($('[name=\"saldo\"]').val());\n\n /*if(isNaN(tot) || tot=='' || tot<0){\n $('#but').slideUp();\n }\n else{\n if(isNaN(saldo) || saldo<0){\n $('#but').slideUp();\n }\n else{\n $('#but').slideDown();\n } \n }*/\n }\n </script>\n <?php \n }\n\n return $tabla;\n }", "public function actionUpdate($id, $idKelas)\n\t{\n\t\t$model=$this->loadModel($id);\n $model->kelaspelayanan_id = $idKelas;\n $model->carabayar_id = $id;\n $modTanggung = TanggunganpenjaminM::model()->findAllByAttributes(array('carabayar_id'=>$model->carabayar_id, 'kelaspelayanan_id'=>$idKelas));\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t\n $dataTanggunganPenjamin = '';\n\t\tif(isset($_POST['SATanggunganpenjaminM']))\n\t\t{\n\t\t\t$model->attributes=$_POST['SATanggunganpenjaminM'];\n\t\t\t$modTanggung = $this->validasiTabular($_POST['TanggunganpenjaminM']);\n $transaction = Yii::app()->db->beginTransaction();\n try{\n $success = 0;\n $list = CHtml::listData(TanggunganpenjaminM::model()->findAllByAttributes(array('carabayar_id'=>$model->carabayar_id,'kelaspelayanan_id'=>$model->kelaspelayanan_id)),'tanggunganpenjamin_id','tanggunganpenjamin_id');\n foreach ($modTanggung as $i=>$row){\n if ($row->save()){\n unset($list[$row->tanggunganpenjamin_id]);\n $success++;\n }\n }\n\n if (count($list) > 0){\n foreach ($list as $isi){\n TanggunganpenjaminM::model()->deleteByPk($isi);\n }\n }\n\n if ((count($modTanggung) > 0) && ($success == count($modTanggung))) {\n $transaction->commit();\n Yii::app()->user->setFlash('success', \"Data Berhasil Disimpan \");\n\t\t\t\t\t\t\t\t\t$controller = Yii::app()->controller->id; //mengambil Controller yang sedang dipakai\n\t\t\t\t\t\t\t\t\t$module = Yii::app()->controller->module->id; //mengambil Module yang sedang dipakai\n\t\t\t\t\t\t\t\t\t//$this->redirect(Yii::app()->createUrl($module.'/'.$controller.'/admin'));\n // $this->redirect(Yii::app()->createUrl($this->module->id.'/TanggunganpenjaminM/admin'));\n $this->redirect(array('admin','id'=>1));\n }\n else{\n $transaction->rollback();\n Yii::app()->user->setFlash('error', \"Data gagal disimpan \");\n }\n } catch (Exception $exc) {\n $transaction->rollback();\n Yii::app()->user->setFlash('error', \"Data gagal disimpan \" . MyExceptionMessage::getMessage($exc, true));\n }\n\t\t}\n\n\t\t$this->render($this->path_view.'create',array(\n\t\t\t'model'=>$model, 'modTanggung'=>$modTanggung,'dataTanggunganPenjamin' =>$dataTanggunganPenjamin\n\t\t));\n\t}", "function konfirmasiTerima()\n {\n $data_pengajuan = array(\n 'status_pengajuan' => 'VERIFIKASI'\n );\n $this->db->where('id_pengajuan', $this->input->post('id_pengajuan'));\n $this->db->update('tbl_pengajuan', $data_pengajuan);\n }", "function update($uid=null)\n {\n if ($this->acl->otentikasi2($this->title) == TRUE && $this->model->valid_add_trans($uid, $this->title) == TRUE){\n\n\t// Form validation\n $this->form_validation->set_rules('tdate', 'Date', 'required|callback_valid_period');\n $this->form_validation->set_rules('ccurrency', 'Currency', 'required');\n $this->form_validation->set_rules('tnote', 'Note', 'required');\n $this->form_validation->set_rules('tamount', 'Amount', 'required|numeric');\n $this->form_validation->set_rules('cfrom', 'From', 'required');\n $this->form_validation->set_rules('cto', 'To', 'required|callback_valid_acc');\n\n if ($this->form_validation->run($this) == TRUE && $this->valid_confirmation($uid) == TRUE)\n {\n $transfer = array('from' => $this->input->post('cfrom'), 'to' => $this->input->post('cto'),\n 'dates' => $this->input->post('tdate'), 'currency' => $this->input->post('ccurrency'), 'notes' => $this->input->post('tnote'),\n 'amount' => $this->input->post('tamount'), 'log' => $this->decodedd->log);\n\n if ($this->model->update_id($uid, $transfer) == true){ $this->error = 'Data successfully saved..'; }else{ $this->reject(); }\n }\n elseif ($this->valid_confirmation($uid) != TRUE){ $this->reject(\"Journal approved, can't updated..!\"); }\n else{ $this->reject(validation_errors()); }\n }else { $this->reject_token(); }\n $this->response();\n }", "public function edit()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'detailfasilitaskesehatan', 'update')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$detailfasilitaskesehatan = array(\n\t\t\t\t'idkategori' => $_POST['idkategori'],\n\t\t\t\t'nama' => $this->postring->valid($_POST['nama'], 'xss'),\n\t\t\t\t'seourl' => $this->postring->seo_title($this->postring->valid($_POST['nama'], 'xss')),\n\t\t\t\t'kodefaskes' => $this->postring->valid($_POST['kodefaskes'], 'xss'),\n\t\t\t\t'kelas' => $this->postring->valid($_POST['kelas'], 'xss'),\n\t\t\t\t'direktur' => $this->postring->valid($_POST['direktur'], 'xss'),\n\t\t\t\t'alamat' => $this->postring->valid($_POST['alamat'], 'xss'),\n\t\t\t\t'kecamatan' => $this->postring->valid($_POST['kecamatan'], 'xss'),\n\t\t\t\t'pemilik' => $this->postring->valid($_POST['pemilik'], 'xss'),\n\t\t\t\t'telpon' => $this->postring->valid($_POST['telpon'], 'xss'),\n\t\t\t\t'email' => $this->postring->valid($_POST['email'], 'xss'),\n\t\t\t\t'website' => $this->postring->valid($_POST['website'], 'xss'),\n\t\t\t\t'fax' => $this->postring->valid($_POST['fax'], 'xss'),\n\t\t\t\t'ugd' => $this->postring->valid($_POST['ugd'], 'xss'),\n\t\t\t\t'vip' => $this->postring->valid($_POST['vip'], 'xss'),\n\t\t\t\t'vvip' => $this->postring->valid($_POST['vvip'], 'xss'),\n\t\t\t\t'kelas1' => $this->postring->valid($_POST['kelas1'], 'xss'),\n\t\t\t\t'kelas2' => $this->postring->valid($_POST['kelas2'], 'xss'),\n\t\t\t\t'kelas3' => $this->postring->valid($_POST['kelas3'], 'xss'),\n\t\t\t\t'jumdokter' => $this->postring->valid($_POST['jumdokter'], 'xss'),\n\t\t\t\t'jumperawat' => $this->postring->valid($_POST['jumperawat'], 'xss'),\n\t\t\t\t'foto' => $this->postring->valid($_POST['foto'], 'xss'),\n\t\t\t\t'seourl' => $this->postring->valid($_POST['seourl'], 'xss'),\n\t\t\t);\n\t\t\t$query = $this->podb->update('detailfasilitaskesehatan')\n\t\t\t\t->set($detailfasilitaskesehatan)\n\t\t\t\t->where('id', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t$query->execute();\n\t\t\t$this->poflash->success('Detailfasilitaskesehatan has been successfully updated', 'admin.php?mod=detailfasilitaskesehatan');\n\t\t}\n\t\t$id = $this->postring->valid($_GET['id'], 'sql');\n\t\t$current_detailfasilitaskesehatan = $this->podb->from('detailfasilitaskesehatan')\n\t\t\t->select('katfasilitaskesehatan.namakategori AS namakategori')\n\t\t\t->leftJoin('katfasilitaskesehatan ON katfasilitaskesehatan.idkategori = detailfasilitaskesehatan.idkategori')\n\t\t\t->where('id', $id)\n\t\t\t->limit(1)\n\t\t\t->fetch();\n\t\tif (empty($current_detailfasilitaskesehatan)) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\t?>\n\t\t<div class=\"block-content\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t<?=$this->pohtml->headTitle('Update Detailfasilitaskesehatan');?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t<?=$this->pohtml->formStart(array('method' => 'post', 'action' => 'route.php?mod=detailfasilitaskesehatan&act=edit', 'autocomplete' => 'off'));?>\n\t\t\t\t\t\t<?=$this->pohtml->inputHidden(array('name' => 'id', 'value' => $current_detailfasilitaskesehatan['id']));?>\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t<div class=\"input-group\">\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t$kats = $this->podb->from('katfasilitaskesehatan')\n\t\t\t\t\t\t\t\t\t\t\t->orderBy('idkategori DESC')\n\t\t\t\t\t\t\t\t\t\t\t->fetchAll();\n\t\t\t\t\t\t\t\t\t\techo $this->pohtml->inputSelectNoOpt(array('id' => 'idkategori', 'label' => 'Kategori', 'name' => 'idkategori', 'mandatory' => true));\n\t\t\t\t\t\t\t\t\t\techo '<option value=\"'.$current_detailfasilitaskesehatan['idkategori'].'\">'.'Terpilih'.' - '.$current_detailfasilitaskesehatan['namakategori'].'</option>';\n\t\t\t\t\t\t\t\t\t\tforeach($kats as $kat){\n\t\t\t\t\t\t\t\t\t\t\techo '<option value=\"'.$kat['idkategori'].'\">'.$kat['namakategori'].'</option>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\techo $this->pohtml->inputSelectNoOptEnd();\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<span class=\"input-group-btn\" style=\"padding-top:25px !important;\">\n\t\t\t\t\t\t\t\t\t\t<a href=\"admin.php?mod=katfasilitaskesehatan&act=addnew\" class=\"btn btn-success\"><?=$GLOBALS['_']['addnew'];?></a>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"nama\">Nama</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"nama\" class=\"form-control\" id=\"nama\" value=\"<?=(isset($_POST['nama']) ? $_POST['nama'] : $current_detailfasilitaskesehatan['nama']);?>\" placeholder=\"Nama\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"kodefaskes\">Kodefaskes</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"kodefaskes\" class=\"form-control\" id=\"kodefaskes\" value=\"<?=(isset($_POST['kodefaskes']) ? $_POST['kodefaskes'] : $current_detailfasilitaskesehatan['kodefaskes']);?>\" placeholder=\"Kodefaskes\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"kelas\">Kelas</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"kelas\" class=\"form-control\" id=\"kelas\" value=\"<?=(isset($_POST['kelas']) ? $_POST['kelas'] : $current_detailfasilitaskesehatan['kelas']);?>\" placeholder=\"Kelas\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"direktur\">Direktur</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"direktur\" class=\"form-control\" id=\"direktur\" value=\"<?=(isset($_POST['direktur']) ? $_POST['direktur'] : $current_detailfasilitaskesehatan['direktur']);?>\" placeholder=\"Direktur\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"alamat\">Alamat</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"alamat\" class=\"form-control\" id=\"alamat\" value=\"<?=(isset($_POST['alamat']) ? $_POST['alamat'] : $current_detailfasilitaskesehatan['alamat']);?>\" placeholder=\"Alamat\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"kecamatan\">Kecamatan</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"kecamatan\" class=\"form-control\" id=\"kecamatan\" value=\"<?=(isset($_POST['kecamatan']) ? $_POST['kecamatan'] : $current_detailfasilitaskesehatan['kecamatan']);?>\" placeholder=\"Kecamatan\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"pemilik\">Pemilik</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"pemilik\" class=\"form-control\" id=\"pemilik\" value=\"<?=(isset($_POST['pemilik']) ? $_POST['pemilik'] : $current_detailfasilitaskesehatan['pemilik']);?>\" placeholder=\"Pemilik\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"telpon\">Telpon</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"telpon\" class=\"form-control\" id=\"telpon\" value=\"<?=(isset($_POST['telpon']) ? $_POST['telpon'] : $current_detailfasilitaskesehatan['telpon']);?>\" placeholder=\"Telpon\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"email\">Email</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"email\" class=\"form-control\" id=\"email\" value=\"<?=(isset($_POST['email']) ? $_POST['email'] : $current_detailfasilitaskesehatan['email']);?>\" placeholder=\"Email\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"website\">Website</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"website\" class=\"form-control\" id=\"website\" value=\"<?=(isset($_POST['website']) ? $_POST['website'] : $current_detailfasilitaskesehatan['website']);?>\" placeholder=\"Website\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"fax\">Fax</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"fax\" class=\"form-control\" id=\"fax\" value=\"<?=(isset($_POST['fax']) ? $_POST['fax'] : $current_detailfasilitaskesehatan['fax']);?>\" placeholder=\"Fax\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-2\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"ugd\">Ugd</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"ugd\" class=\"form-control\" id=\"ugd\" value=\"<?=(isset($_POST['ugd']) ? $_POST['ugd'] : $current_detailfasilitaskesehatan['ugd']);?>\" placeholder=\"Ugd\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-2\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"vip\">Vip</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"vip\" class=\"form-control\" id=\"vip\" value=\"<?=(isset($_POST['vip']) ? $_POST['vip'] : $current_detailfasilitaskesehatan['vip']);?>\" placeholder=\"Vip\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-2\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"vvip\">Vvip</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"vvip\" class=\"form-control\" id=\"vvip\" value=\"<?=(isset($_POST['vvip']) ? $_POST['vvip'] : $current_detailfasilitaskesehatan['vvip']);?>\" placeholder=\"Vvip\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-2\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"kelas1\">Kelas1</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"kelas1\" class=\"form-control\" id=\"kelas1\" value=\"<?=(isset($_POST['kelas1']) ? $_POST['kelas1'] : $current_detailfasilitaskesehatan['kelas1']);?>\" placeholder=\"Kelas1\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-2\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"kelas2\">Kelas2</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"kelas2\" class=\"form-control\" id=\"kelas2\" value=\"<?=(isset($_POST['kelas2']) ? $_POST['kelas2'] : $current_detailfasilitaskesehatan['kelas2']);?>\" placeholder=\"Kelas2\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-2\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"kelas3\">Kelas3</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"kelas3\" class=\"form-control\" id=\"kelas3\" value=\"<?=(isset($_POST['kelas3']) ? $_POST['kelas3'] : $current_detailfasilitaskesehatan['kelas3']);?>\" placeholder=\"Kelas3\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-6\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"jumdokter\">Jumdokter</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"jumdokter\" class=\"form-control\" id=\"jumdokter\" value=\"<?=(isset($_POST['jumdokter']) ? $_POST['jumdokter'] : $current_detailfasilitaskesehatan['jumdokter']);?>\" placeholder=\"Jumdokter\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-6\">\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label for=\"jumperawat\">Jumperawat</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"jumperawat\" class=\"form-control\" id=\"jumperawat\" value=\"<?=(isset($_POST['jumperawat']) ? $_POST['jumperawat'] : $current_detailfasilitaskesehatan['jumperawat']);?>\" placeholder=\"Jumperawat\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t\t<?=$this->pohtml->inputText(array('type' => 'text', 'label' => 'foto', 'name' => 'foto', 'id' => 'picture', 'mandatory' => false, 'options' => '',), $inputgroup = true, $inputgroupopt = array('href' => '../'.DIR_INC.'/js/filemanager/dialog.php?type=0&field_id=picture', 'id' => 'browse-file', 'class' => 'btn-success', 'options' => '', 'title' => $GLOBALS['_']['action_7'].' foto'));?>\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t\t\t<?=$this->pohtml->formAction();?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?=$this->pohtml->formEnd();?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "function submitEditLogistik()\n\t{\n\t\t$execQueryEdit = $this->Kesehatan_M->update('logistik',array('id'=>$this->input->post('id')),array(\"nama\"=>$this->input->post(\"nama\"),\"stok\"=>$this->input->post('stok'),\"satuan\"=>$this->input->post('satuan'),\"kadaluarsa\"=>$this->input->post(\"kadaluarsa\")));\n\t\tif ($execQueryEdit) {\n\t\t\talert('alert','success','Berhasil','Data berhasil diedit');\n\t\t\tredirect(\"Dokter/logistik\");\n\t\t}else{\n\t\t\tvar_dump($execQueryEdit);\n\t\t}\n\t}", "function updateEtat() {\r\n\r\n\t\t$this->connection = new Connection();\r\n\t\t$conn = $this->connection->openConnection();\r\n\r\n\t\t$insert = $conn->prepare(\"UPDATE `panier` SET `etat`=1 WHERE `id_internaute`=:id_internaute AND `id_nourriture`=:id_nourriture AND `datep`=:datep\");\r\n\t\ttry {\r\n\t\t\t$result = $insert->execute(array('id_internaute' => $this->getId_internaute(),'id_nourriture' => $this->getId_nourriture(),'datep' => $this->getDate()));\r\n\t\t} catch (PDOExecption $e) {\r\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"</br>\";\r\n\t\t}\r\n\t\t$this->connection->closeConnection();\r\n\t}", "public function actionUpdate($id)\n {\n $request = Yii::$app->request;\n //$model = $this->findModel($id); \n $model = Transaksi::find()\n ->where(['no_ref'=>$id])\n ->orderBy(['id'=>SORT_ASC])\n ->one();\n\n $model2 = Transaksi::find()\n ->where(['no_ref'=>$id])\n ->orderBy(['id'=>SORT_DESC])\n ->one();\n\n $model->tanggal = Yii::$app->formatter->asDate($model->tanggal);\n //print_r($model2);\n if($request->isAjax){\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n if($request->isGet){\n return [\n 'title'=> \"Ubah Transaksi\",\n 'content'=>$this->renderAjax('update', [\n 'model' => $model,\n 'idsubakun2' => $model2->idsubakun,\n 'nominal' => $model->kredit,\n ]),\n 'footer'=> Html::button('Tutup',['class'=>'btn btn-default pull-left','data-dismiss'=>\"modal\"]).\n Html::button('Simpan',['class'=>'btn btn-primary','type'=>\"submit\"])\n ]; \n }else if($model->load($request->post())){\n $berhasil = 0;\n //echo $_POST['w1-disp'];\n \n $transaction = Yii::$app->db->beginTransaction();\n\n Yii::$app->db->createCommand()\n ->delete(\"transaksi\", [\"no_ref\" => $id])\n ->execute();\n \n //echo $_POST['Transaksi']['debetkredit'];\n if($_POST['Transaksi']['debetkredit']==\"debet\"){\n $modeltransaksi = new Transaksi();\n\n $modeltransaksi->idsubakun = $_POST['Transaksi']['idsubakun'];\n $modeltransaksi->idakundebet = $_POST['Transaksi']['idsubakun'];\n $modeltransaksi->ke_akun = $_POST['Transaksi']['idsubakun2'];\n $modeltransaksi->no_ref = $id;\n $modeltransaksi->kredit = str_replace(\",\", \"\", $_POST['w1-disp']);\n $modeltransaksi->keterangan = $_POST['Transaksi']['keterangan'];\n $modeltransaksi->tanggal = $this->convertTanggal($_POST['Transaksi']['tanggal']);\n //$modeltransaksi->tanggal = date('Y-m-d');\n if($modeltransaksi->save()){\n $modeltransaksi = new Transaksi();\n\n $modeltransaksi->idsubakun = $_POST['Transaksi']['idsubakun2'];\n $modeltransaksi->idakunkredit = $_POST['Transaksi']['idsubakun2'];\n $modeltransaksi->ke_akun = $_POST['Transaksi']['idsubakun'];\n $modeltransaksi->no_ref = $id;\n $modeltransaksi->debet = str_replace(\",\", \"\", $_POST['w1-disp']);\n $modeltransaksi->keterangan = $_POST['Transaksi']['keterangan'];\n $modeltransaksi->tanggal = $this->convertTanggal($_POST['Transaksi']['tanggal']);\n //$modeltransaksi->tanggal = date('Y-m-d');\n if($modeltransaksi->save()){\n $transaction->commit();\n $berhasil = 1;\n }\n \n }else{\n $transaction->rollBack();\n return [\n 'title'=> \"Tambah Transaksi\",\n 'content'=>$this->renderAjax('update', [\n 'model' => $model,\n 'idsubakun2' => $model2->idsubakun,\n 'nominal' => $model->kredit,\n ]),\n 'footer'=> Html::button('Close',['class'=>'btn btn-default pull-left','data-dismiss'=>\"modal\"]).\n Html::button('Save',['class'=>'btn btn-primary','type'=>\"submit\"])\n \n ];\n }\n \n }else{\n\n $modeltransaksi = new Transaksi();\n\n $modeltransaksi->idsubakun = $_POST['Transaksi']['idsubakun'];\n $modeltransaksi->idakundebet = $_POST['Transaksi']['idsubakun'];\n $modeltransaksi->no_ref = $id;\n $modeltransaksi->debet = str_replace(\",\", \"\", $_POST['w1-disp']);\n $modeltransaksi->keterangan = $_POST['Transaksi']['keterangan'];\n $modeltransaksi->tanggal = $this->convertTanggal($_POST['Transaksi']['tanggal']);\n //$modeltransaksi->tanggal = date('Y-m-d');\n if($modeltransaksi->save()){\n $modeltransaksi = new Transaksi();\n $modeltransaksi->idsubakun = $_POST['Transaksi']['idsubakun2'];\n $modeltransaksi->idakunkredit = $_POST['Transaksi']['idsubakun2'];\n $modeltransaksi->no_ref = $id;\n $modeltransaksi->kredit = str_replace(\",\", \"\", $_POST['w1-disp']);\n $modeltransaksi->keterangan = $_POST['Transaksi']['keterangan'];\n $modeltransaksi->tanggal = $this->convertTanggal($_POST['Transaksi']['tanggal']);\n //$modeltransaksi->tanggal = date('Y-m-d');\n if($modeltransaksi->save()){\n $transaction->commit();\n $berhasil = 1;\n }\n }else{\n $transaction->rollBack();\n return [\n 'title'=> \"Tambah Transaksi\",\n 'content'=>$this->renderAjax('update', [\n 'model' => $model,\n 'idsubakun2' => $model2->idsubakun,\n 'nominal' => $model->kredit,\n ]),\n 'footer'=> Html::button('Close',['class'=>'btn btn-default pull-left','data-dismiss'=>\"modal\"]).\n Html::button('Save',['class'=>'btn btn-primary','type'=>\"submit\"])\n \n ];\n }\n\n }\n\n //echo \"coba\";\n\n if($berhasil==1){\n return [\n 'forceReload'=>'#crud-datatable-pjax',\n 'title'=> \"Ubah Transaksi\",\n 'content'=>'<span class=\"text-success\">Ubah Transaksi Sukses</span>',\n 'footer'=> Html::button('Tutup',['class'=>'btn btn-default pull-left','data-dismiss'=>\"modal\"])\n ]; \n }else{\n return [\n 'title'=> \"Tambah Transaksi\",\n 'content'=>$this->renderAjax('create', [\n 'model' => $model,\n ]),\n 'footer'=> Html::button('Tutup',['class'=>'btn btn-default pull-left','data-dismiss'=>\"modal\"]).\n Html::button('Simpan',['class'=>'btn btn-primary','type'=>\"submit\"])\n \n ]; \n }\n return [\n 'forceReload'=>'#crud-datatable-pjax',\n 'title'=> \"Transaksi\",\n 'content'=>$this->renderAjax('view', [\n 'model' => $model,\n //'model2' => $model2,\n ]),\n 'footer'=> Html::button('Tutup',['class'=>'btn btn-default pull-left','data-dismiss'=>\"modal\"]).\n Html::a('Ubah',['update','id'=>$id],['class'=>'btn btn-primary','role'=>'modal-remote'])\n ]; \n }else{\n return [\n 'title'=> \"Ubah Transaksi\",\n 'content'=>$this->renderAjax('update', [\n 'model' => $model,\n 'idsubakun2' => $model2->idsubakun,\n 'nominal' => $model->kredit,\n ]),\n 'footer'=> Html::button('Tutup',['class'=>'btn btn-default pull-left','data-dismiss'=>\"modal\"]).\n Html::button('Simpan',['class'=>'btn btn-primary','type'=>\"submit\"])\n ]; \n }\n }else{\n /*\n * Process for non-ajax request\n */\n // if ($model->load($request->post()) && $model->save()) {\n // return $this->redirect(['view', 'id' => $model->id]);\n // } else {\n return $this->render('update', [\n 'model' => $model,\n 'idsubakun2' => $model2->idsubakun,\n 'nominal' => $model->kredit,\n ]);\n //}\n }\n }" ]
[ "0.7954821", "0.7108667", "0.7101211", "0.6957295", "0.695274", "0.69244176", "0.6907992", "0.6905928", "0.69027317", "0.6831359", "0.6799427", "0.6780384", "0.675844", "0.6752985", "0.67409575", "0.67393124", "0.67179185", "0.66260636", "0.6623307", "0.6619407", "0.6616657", "0.66027045", "0.6593708", "0.65892136", "0.658394", "0.65764827", "0.65627843", "0.6562191", "0.65540814", "0.65524757" ]
0.7645619
1
Reads the PHP Comment at the top of the Card File If the file has 'Card: VALUE' It returns the VALUE
function get_card_info($file){ $template_data = get_file_data( $file , array( 'Card' => 'Card' ) ); if (!empty($template_data['Card'])) { return $template_data['Card']; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseComment()\r\n\t{\r\n\t\t$this->start = $this->reader->mark();\r\n\t\t// skip over the comment\r\n\t\t$stop = $this->reader->skipUntil('--%>');\r\n\t\tif (is_null($stop))\r\n\t\t{\r\n\t\t\tthrow_exception(new PhaseException('Comment not properly ended.'));\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$this->reader->skipSpaces();\r\n\t\treturn '';\r\n\t}", "private function readCommentString(): string\n {\n $length = strcspn($this->data, \"\\n\\r\", $this->position);\n\n return substr($this->data, ($this->position += $length) - $length, $length);\n }", "public function import_read_header()\n\t{\n // phpcs:enable\n\t\treturn 0;\n\t}", "public function getCard(): ?string\n {\n return $this->card;\n }", "function get_tag($file, $val = \"en-rev\")\n {\n\n // Read the first 200 chars, the comment should be at\n // the begining of the file\n $fp = @fopen($file, \"r\") or die (\"Unable to read $file.\");\n $line = fread($fp, 200);\n fclose($fp);\n\n // Checking for english CVS revision tag\n if ($val==\"en-rev\") {\n preg_match(\"/<!-- .Revision: \\d+\\.(\\d+) . -->/\", $line, $match);\n return ($match[1]);\n }\n // Checking for the translations \"revision tag\"\n else {\n preg_match (\"/<!--\\s*EN-Revision:\\s*\\d+\\.(\\d+)\\s*Maintainer:\\s*(\".$val.\n \")\\s*Status:\\s*(.+)\\s*-->/\", $line, $match);\n }\n // The tag with revision number is not found so search\n // for n/a revision comment\n if (count($match) == 0) {\n preg_match (\"'<!--\\s*EN-Revision:\\s*(n/a)\\s*Maintainer:\\s*(\".$val.\n \")\\s*Status:\\s*(.+)\\s*-->'\", $line, $match);\n }\n return ($match);\n }", "protected final function parseMetaComment() {\n\t\t$lines = explode(\"\\n\", $this->file_content);\n\n\t\tif($lines[0] === \"<!--\" || $lines[1] === \"<!--\") {\n\t\t\tarray_shift($lines);\n\t\t\tforeach($lines as $line) {\n\t\t\t\tif(strlen($line) > 0) {\n\t\t\t\t\t$mcline = array_shift($lines);\n\t\t\t\t\tif($mcline === \"-->\") {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$mcfound = preg_match(Application::getMetacommentPreg(), $mcline, $matches);\n\t\t\t\t\t\tif($mcfound != 0) {\n\t\t\t\t\t\t\t$matches[1] = strtolower($matches[1]);\n\t\t\t\t\t\t\t// PHP is rather fussy about booleans, so I needed a conversion function. \n\t\t\t\t\t\t\t// 'true' and 'yes' → true\n\t\t\t\t\t\t\t// 'false' and 'no' → false\n\t\t\t\t\t\t\t$value = Utils::str_to_bool($matches[2]);\n\t\t\t\t\t\t\t$this->pageData[$matches[1]] = $value;\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$this->file_content = implode(\"\\n\", $lines);\n\t\t}\n\t\treturn $this->pageData;\n\t}", "public function getCard() {\n return $this->card;\n }", "public function getCard()\n {\n return $this->card;\n }", "protected function readCard($cardData) {\n\t\treturn Reader::read($cardData);\n\t}", "public function getHeadSnippet()\r\n\t{\r\n\t\treturn Mage::getStoreConfig('ec/config/code_head');\r\n\t}", "function getCardValue($card) {\n\tif(strpos(\"$card\", \"A\") !== false) {\n\t\treturn 11;\n\t} elseif (strpos(\"$card\", \"J\") !== false || strpos(\"$card\", \"Q\") !== false || strpos(\"$card\", \"K\") !== false) {\n\t\treturn 10;\n\t} else {\n\t\treturn intval($card);\n\t}\n}", "function get_custom_cards(){\n $directory = ROOT . '/cards/';\n //get all files with a .php extension.\n $files = glob($directory . \"*.php\");\n $cards = array();\n foreach($files as $file){\n $name = get_card_info($file);\n $filename = basename($file, '.php');\n $cardarray = array($filename => $name);\n array_push($cards, $cardarray);\n }\n return $cards;\n }", "public function showComment()\n {\n\treturn $this->getConfigData('checkout/ship_comment');\n }", "public function getHeader()\n {\n return <<<EOF\n<info>\nWW WW UU UU RRRRRR FFFFFFF LL \nWW WW UU UU RR RR FF LL \nWW W WW UU UU RRRRRR FFFF LL \n WW WWW WW UU UU RR RR FF LL \n WW WW UUUUU RR RR FF LLLLLLL \n \n</info>\n\nEOF;\n\n}", "public function get_card(){ return $this->_card;}", "public function getPhpHeader ()\n {\n $year = date(\"Y\");\n return <<<EOD\n<?php\n/**\n * @link http://hiqdev.com/{$this->packageName}\n * @license http://hiqdev.com/{$this->packageName}/license\n * @copyright Copyright (c) {$year} HiQDev\n */\n\nEOD;\n }", "public function get_description () {\r\n\t\t$content = file_get_contents($this->url);\r\n\t\t$regex = preg_match('/<p id=\"eow-description\" class=\"\" >(.*)<\\/p>/i', $content, $matches);\r\n\t\treturn $matches[1];\r\n\t}", "public function actionCardContent()\n\t{\n\t\tif(FacebookController::getUserID() ==0)\n\t\t{\n\t\t\t$error = new ErrorController('error');\n\t\t\t$error->actionFaildUserID();\n\t\t\treturn ;\n\t\t}\n\t\t$card_id = $_GET[\"card_id\"];\n\t\t$user_id = FacebookController::getUserID();\n\t\t$cat_name = $_GET[\"cat\"];\n\t\t// To be Change\n\t\t$num = $card_id % 7 ;\n\t\t$num++;\n\t\t$picName = array(\"nancyCompBG\", \"nancyfbCover\",\"nancyfbPP\",\"nancymobileBG\");\n\t\t// end change\n\t /** @type string represent card's images urls */\t\t\n\t\t$picURL = array();\n\t\tfor ($i=0 ; $i <count($picName) ; $i++)\n\t\t{\n\t\t\t$picURL[$i] = UtilityController::siteUrl(). $num. \"/\". $picName[$i]. \".jpg\";\n\t\t}\n\t\t/** @type string represent card's css elements */\n\t\t$cssName = array(\"compBG\", \"fbCover\",\"fbPP\",\"mobileBG\");\n\t\t$this->render('cardContent',array('card_id'=>$card_id,'user_id'=>$user_id,'cat_name'=>$cat_name,'picURL'=>$picURL,'cssName'=>$cssName));\n\t}", "public static function getCreditBreakdown(){return file_get_contents('queries/creditbreakdown.txt');}", "function getRC($name)\n{\n global $rc;\n\n foreach ($rc as $item) {\n if (strpos($item, $name.'.rc')){\n return $item;\n }\n }\n\n return null;\n}", "public function getCardcode()\n {\n return $this->cardcode;\n }", "public function card()\n {\n if ( ! $this->bean->card) $this->bean->card = R::dispense('card');\n return $this->bean->card;\n }", "protected function readHeader()\n {\n \t$this->data_mesgs['file_id']['type']=\"TCX\";\n \t$this->data_mesgs['file_id']['manufacturer']=(string)$this->file_contents->Activities->Activity->Creator->Name;\n \t$this->data_mesgs['file_id']['number']=(string)$this->file_contents->Author->Build->Version->VersionMajor.\".\".\n \t\t(string)$this->file_contents->Author->Build->Version->VersionMinor;\n \t$datebrut=(string)$this->file_contents->Activities->Activity->Lap['StartTime'];\n \t$this->data_mesgs['file_id']['time_created']=strtotime( $datebrut);\n \t$this->data_mesgs['session']['sport']=(string)$this->file_contents->Activities->Activity['Sport'];\n \t \n }", "public function getDescription(){\n\t\tif ($this->_description == ''){\n\t\t\t$this->_known_tags = array();\n\t\t\t$desc = $this->_function_reflection->getDocComment();\n\t\t\t$parsed_desc = '';\n\t\t\tif ($desc){\n\t\t\t\t$matches = preg_split('/\\n/',$desc);\n\t\t\t\t$start_pattern = '/w*\\/\\*\\*w*/';\n\t\t\t\tforeach ($matches as $match) {\n\t\t\t\t\tif (preg_match($start_pattern, $match,$submatch)){\n\t\t\t\t\t\t// skip it\n\t\t\t\t\t} else if (preg_match('/w*\\*\\//',$match,$submatch)){\n\t\t\t\t\t\t$offset = strpos($match,'*/')-1;\n\t\t\t\t\t\t$final_line = '';\n\t\t\t\t\t\t$final_line.= trim(substr($match,0,-$offset)).'';\n\t\t\t\t\t\tif ($final_line != ''){\n\t\t\t\t\t\t\t$parsed_desc .= $final_line;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (preg_match('/w*\\*/',$match,$submatch)){\n\t\t\t\t\t\tif (preg_match('/@/',$match,$submatch)){\n\t\t\t\t\t\t\t$offset = strpos($match,'@')+1;\n\t\t\t\t\t\t\t$tag = trim(substr($match,$offset,strlen($match)-$offset));\n\t\t\t\t\t\t\t$this->addTagFromString($tag);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$offset = strpos($match,'*')+1;\n\t\t\t\t\t\t\t$parsed_desc .= trim(substr($match,$offset,strlen($match)-$offset)).'\n\t\t';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($parsed_desc == ''){\n\t\t\t\t$parsed_desc = __('No documentation found. ','Shortcode Reference');\n\t\t\t}\n\t\t\t$this->_description = $parsed_desc;\n\t\t}\n\t\treturn $this->_description;\n\t}", "function cardNumber()\n\t\t{\n\t\t\techo $this->card_number;\n\t\t}", "public function getHeader()\n {\n $p = $this->path . '/HEADER.html';\n if (is_file($p))\n return file_get_contents($p);\n return '';\n }", "public function getCommentContent(): string {\n\t\treturn ($this->commentContent);\n\t}", "protected function scanComment()\n {\n $matches = array();\n\n if (preg_match('/^ *\\/\\/(-)?([^\\n]+)?/', $this->page, $matches) ) {\n $this->reduce($matches[0]);\n $token = $this->takeToken('comment', isset($matches[2]) ? $matches[2] : '');\n $token->buffer = !isset($matches[1]) || '-' !== $matches[1];\n\n return $token;\n }\n }", "function get_file_comments_for_data($file) {\n\t$comments = array_filter(\n\t\ttoken_get_all(file_get_contents($file)), function($entry) {\n\t\t\treturn $entry[0] == T_DOC_COMMENT;\n\t\t}\n\t);\n\n\t// Return the comments in a string\n\t$comments_string = array_shift($comments);\n\treturn $comments_string;\n}", "public function getCreditComment();" ]
[ "0.560953", "0.55868536", "0.5586484", "0.55543643", "0.54578763", "0.5426284", "0.5297512", "0.5290135", "0.5285957", "0.51719487", "0.5139372", "0.5127075", "0.5118921", "0.5090332", "0.5079099", "0.50521094", "0.50507903", "0.50444055", "0.50252527", "0.502445", "0.5020917", "0.50046104", "0.50032514", "0.5000628", "0.49909604", "0.49857652", "0.4978119", "0.49606034", "0.49390715", "0.4925777" ]
0.69962466
0
return first group object, there will be always single group.
public function getGroupObject() { return $this->groups[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_first_group()\n {\n return ee()->db->select('MIN(group_id) AS group_id')\n ->get('category_groups')\n ->row('group_id');\n }", "private function getSingleGroup()\n {\n if (!$this->result) {\n throw new \\Exception('This adapter must have a result set on it before being accessed');\n }\n $grouping = $this->result->getGrouping();\n $groups = reset($grouping);\n $group = reset($groups);\n\n return $group;\n }", "public function getGroup() {\n \tif(count($this->groups))\n \t return $this->groups[0]->getName();\n \telse\n \t return null;\n }", "public function getGroup() {\n\t\tif (empty($this->group)) {\n\t\t\t$this->group = $this->groupsTable->findById($this->groupId);\n\t\t}\n\t\treturn $this->group;\n\t}", "public function getGroup()\n {\n //Note: group parts are not \"named\" so it's all or nothing\n return $this->_get('_group');\n }", "public function getGroup() {\n\t\t$ids = $this->getGroupIds();\n\t\treturn MessageGroups::getGroup( $ids[0] );\n\t}", "function getGroup() {\n \n return null;\n \n }", "public function primaryGroup() : ?Model\n {\n if ($this->userPrimaryGroup !== null) {\n return $this->userPrimaryGroup;\n }\n\n $usergroups = $this->usergroups;\n\n foreach ($usergroups as $id => $usergroup) {\n if ($usergroup->primary) {\n return $this->userPrimaryGroup = $usergroup->group;\n }\n }\n\n return $this->userPrimaryGroup = $usergroups[0]->group;\n }", "public function getGroup ()\n {\n return $this->getObject();\n }", "public function get_real_primarygroup()\n {\n return $this->_real_primarygroup;\n }", "function getGroup()\n {\n return Factory::create('group', $this->_gid);\n }", "protected function GetGroup() {\r\n\t\t\treturn $this->group;\r\n\t\t}", "public function group()\n {\n return null;\n }", "public function getGroup()\n {\n return $this->hasOne(ScrtGroup::className(), ['group_id' => 'group_id']);\n }", "public function getGroup()\n\t{\n\t return $this->groupService->getGroup($this->ownerid);\n\t}", "public function getGroup()\n {\n return $this->hasOne(Group::class, ['id' => 'group_id']);\n }", "public function getGroup()\n {\n return $this->group;\n }", "public function getGroup()\n {\n return $this->group;\n }", "public function getGroup()\n {\n return $this->group;\n }", "public function getGroup()\n {\n return $this->group;\n }", "public function getGroup()\n {\n return $this->group;\n }", "public function getGroup()\n {\n return $this->group;\n }", "public function getGroup();", "public function getGroup();", "public function getGroup();", "public function getGroup() {\n return $this->group;\n }", "function find_group($db, $group_id)\n{\n $records = exec_sql_query(\n $db,\n \"SELECT * FROM groups WHERE id = :group_id;\",\n array(':group_id' => $group_id)\n )->fetchAll();\n if ($records) {\n // groups are unique, there should only be 1 record\n return $records[0];\n }\n return NULL;\n}", "public function first()\n {\n foreach ($this->items as $currentItem) {\n return $currentItem;\n }\n }", "public function first() {\n\t\treturn $this->items[0];\n\t}", "public function first(){\n return $this->find(1);\n }" ]
[ "0.7915406", "0.7439646", "0.73598886", "0.7235052", "0.7093033", "0.70481825", "0.7033126", "0.6940074", "0.6870544", "0.6796795", "0.675143", "0.66974026", "0.66873115", "0.66102374", "0.6604649", "0.6597303", "0.6557311", "0.6557311", "0.6557311", "0.6557311", "0.6557311", "0.6557311", "0.65489155", "0.65489155", "0.65489155", "0.65465724", "0.65423506", "0.64719534", "0.6453108", "0.6443791" ]
0.80159634
0
return first group name, there will be always single group.
public function getGroup() { if(count($this->groups)) return $this->groups[0]->getName(); else return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGroupName()\n {\n return $this->__get(self::FIELD_GROUP_NAME);\n }", "public function getGroupName(){\n\n\t global $db;\n\n\t #see if user is guest, if so, set gorpu name as simply guest.\n\t\tif($this->user == \"guest\"){\n\t\t\t$getGroupName = 'guest';\n\n\t\t\treturn($getGroupName);\n\t\t}else{\n\t \t$db->SQL = \"SELECT Name FROM ebb_groups where id='\".$this->gid.\"' LIMIT 1\";\n\t\t\t$getGroupName = $db->fetchResults();\n\n\t\t\treturn($getGroupName['Name']);\n\t\t}\n\t}", "public function getGroupName()\n {\n return $this->groupname;\n }", "public function getGroupName()\n {\n return isset($this->GroupName) ? $this->GroupName : null;\n }", "public function getGroupName() : string\n {\n return $this->groupName;\n }", "public function get_first_group()\n {\n return ee()->db->select('MIN(group_id) AS group_id')\n ->get('category_groups')\n ->row('group_id');\n }", "public function getGroup()\n {\n //Note: group parts are not \"named\" so it's all or nothing\n return $this->_get('_group');\n }", "public function GetGroupName () {\n\t\treturn $this->groupName;\n\t}", "function getGroupName($gid)\n {\n return '';\n }", "public function findNameGroup() {\n $sql = \"SELECT sm_nameGroup FROM `SM_GROUP` WHERE sm_idGroup = '$this->idGroup'\";\n if (!($resultado = $this->mysqli->query($sql))) {\n return 'Error in the query on the database';\n } else {\n $result = $resultado->fetch_array();\n return $result['sm_nameGroup'];\n }\n }", "public function getLastGroupPrefix()\n {\n if (empty($this->groupStack)) {\n return '';\n }\n\n $group = \\end($this->groupStack);\n\n return $group['prefix'];\n }", "function GetGroupNameById($group_id)\n {\n $this->db->where('id', $group_id);\n $this->db->limit(1);\n $query = $this->db->get('groups');\n if ($query->num_rows()>0) {\n $row = $query->row_array();\n return $row['name'];\n } else {\n return '--';\n }\n }", "public function getGroupName() {\n\t\treturn $this->Session->read('UserAuth.UserGroup.alias_name');\n\t}", "public function getGroupName()\n {\n switch($this->group) {\n case \"lower_secondary\":\n return \"Lower Secondary\";\n case \"upper_secondary\":\n return \"Upper Secondary\";\n case \"undergraduate\":\n return \"Undergraduate\";\n default:\n return \"Unknown\";\n }\n }", "protected function groupName($group=null) {\n\t\t$group = is_string($group) ? $group : $this->options['group']; \n\t\treturn $this->sanitize($group); \n\t}", "public function getNewGroupName()\n {\n return isset($this->NewGroupName) ? $this->NewGroupName : null;\n }", "public function getNameGroup(){\n return $this->nameGroup;\n }", "function SqlFirstGroupField() {\n\t\treturn \"\";\n\t}", "function SqlFirstGroupField() {\n\t\treturn \"\";\n\t}", "public function name(): string\n {\n return $this->groupName;\n }", "public function getDefaultGroup(): string;", "public function getGroupName($name = null) {\n\t\t$name = parent::getGroupName($name);\n\t\t$this->groups[] = $name;\n\t\treturn $name;\n\t}", "function getGroupShortName($group)\n {\n return '';\n }", "function getGroupName($gid = null)\n\t{\n\t\t$id = ($gid == null) ? $this->user_getgroup() : $gid;\n\t\t$perms = $this->DB->database_select('groups', 'name', array('gid' => $id), 1);\n\t\treturn ($perms === false) ? false : $perms['name'];\n\t}", "public function getGroupName() {\n\t\t$groupName = __('Departments');\n\n\t\treturn $groupName;\n\t}", "public function getDefaultGroup()\n {\n return $this->defaultGroup;\n }", "public static function getGroupName($_id) {\n global $lC_Database;\n\n $Qgroup = $lC_Database->query('select name from :table_administrators_groups where id = :id');\n $Qgroup->bindTable(':table_administrators_groups', TABLE_ADMINISTRATORS_GROUPS);\n $Qgroup->bindInt(':id', $_id);\n $Qgroup->execute();\n\n $data = $Qgroup->toArray();\n\n $Qgroup->freeResult();\n\n return $data['name'];\n }", "public function getGroup() {\n\t\t$ids = $this->getGroupIds();\n\t\treturn MessageGroups::getGroup( $ids[0] );\n\t}", "public function getNomGrp() \n { \n return $this->nom_grp; \n }", "function Name(){\n\t\tif(!$this->title) {\n\t\t\t$fs = $this->FieldSet();\n\t\t\t$compositeTitle = '';\n\t\t\t$count = 0;\n\t\t\tforeach($fs as $subfield){\n\t\t\t\t$compositeTitle .= $subfield->Name();\n\t\t\t\tif($subfield->Name()) $count++;\n\t\t\t}\n\t\t\tif($count == 1) $compositeTitle .= 'Group';\n\t\t\treturn ereg_replace(\"[^a-zA-Z0-9]+\",\"\",$compositeTitle);\n\t\t}\n\n\t\treturn ereg_replace(\"[^a-zA-Z0-9]+\",\"\",$this->title);\t\n\t}" ]
[ "0.7562139", "0.75606275", "0.75508434", "0.75145626", "0.7409519", "0.7277238", "0.725331", "0.7227248", "0.7217999", "0.7196431", "0.7155138", "0.71531326", "0.7134795", "0.71303004", "0.70953596", "0.7089201", "0.70768595", "0.70669115", "0.70669115", "0.70503485", "0.69954854", "0.6971367", "0.69461507", "0.69340336", "0.6915933", "0.69143564", "0.6773625", "0.67428356", "0.67211586", "0.6653739" ]
0.7780106
0
Get a new query builder that returns only drafted resources.
public static function drafted() { return (new static )->newQueryWithoutScope(new ContentPublishingScope())->drafted(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function withDrafted()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withDrafted();\n }", "public static function drafts()\n {\n return self::where('published', '=', false)->get();\n }", "public function scopeDraft($query)\n {\n return $query->whereStatus(self::STATUS_DRAFT);\n }", "public function draft(): self\n {\n $this->andWhere(['{{%task}}.[[status]]' => TaskRecord::STATUS_NOT_ACTIVE]);\n\n return $this;\n }", "public function getDrafts()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('drafts');\n }", "protected function getTableQuery(): Builder\n {\n return parent::getTableQuery()->withoutDrafts();\n }", "public function getDraft(Filter $filter): Collection;", "public function drafts()\n {\n $rqsQuery = RequestModel::all();\n\n $rqs = $rqsQuery;\n $id = Auth::user()->id;\n $user = User::where('id', $id)->first();\n if ($user->inRole('admin')) {\n $rqs = $rqsQuery->where('status', '<>', 'Close');\n }\n if ($user->inRole('user')) {\n $rqs = $rqsQuery->where('user_id', Auth::user()->id);\n }\n if ($user->inRole('manager')) {\n $rqs = $rqsQuery->where('manager', $user->name);\n }\n return view('requests.drafts', compact('rqs'));\n }", "public function createPublishedQueryBuilder()\n {\n return $this->createQueryBuilder()\n ->field('isPublished')->equals(true);\n }", "public static function withApproved()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withApproved();\n }", "public function drafts()\n {\n $postsQuery = Post::unpublished();\n $posts = $postsQuery->paginate();\n return view('posts.drafts', compact('posts'));\n }", "public static function withArchived()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withArchived();\n }", "public function newQuery($excludeDeleted = true)\n {\n $builder = new PostBuilder($this->newBaseQueryBuilder());\n $builder->setModel($this)->with($this->with);\n $builder->orderBy('post_date', 'desc');\n\n if (isset($this->postType) and $this->postType) {\n $builder->type($this->postType);\n }\n\n if ($excludeDeleted and $this->softDelete) {\n $builder->whereNull($this->getQualifiedDeletedAtColumn());\n }\n\n return $builder;\n }", "private function getRemainingQueryBuilder()\n {\n $qb = $this->createQueryBuilder('o');\n $ex = $qb->expr();\n\n $qb\n ->select('o')\n ->where($ex->andX(\n $ex->eq('o.sample', ':sample'), // Not sample\n $ex->eq('o.state', ':state'), // Accepted\n $ex->lt('o.invoiceTotal', 'o.grandTotal') // invoice total lower than grand total\n ))\n ->addOrderBy('o.createdAt', 'ASC')\n ->setParameter('sample', false)\n ->setParameter('state', OrderStates::STATE_ACCEPTED);\n\n return $qb;\n }", "public function getDrafts()\n {\n $mostRecommended = Post::mostRecommended();\n $last = Post::lastPosts()\n ->orderBy('created_at')\n ->where('public', 0)\n ;\n\n $categories = PostCategory::all();\n\n $drafts = Post::where('public', 0)->get();\n\n $last = $last->paginate(4);\n\n return View('blog/index',\n array(\n 'title'=>\"News\",\n 'mostRecommended'=>$mostRecommended,\n 'last'=>$last,\n 'categories' => $categories,\n 'category' => \"Drafts\" , \n 'drafts' => $drafts\n )\n );\n }", "public function createStandardQueryBuilder()\n {\n return $this->createQueryBuilder()\n ->field('status')->notEqual(MultimediaObject::STATUS_PROTOTYPE)\n ->field('islive')->equals(false);\n }", "public function newQuery($excludeDeleted = true)\n {\n $builder = new EloquentQueryBuilder($this->newBaseQueryBuilder());\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n $builder->setModel($this)->with($this->with);\n\n if ($excludeDeleted and $this->softDelete) {\n $builder->whereNull($this->getQualifiedDeletedAtColumn());\n }\n\n return $builder;\n }", "public function setDraft(bool $draft) : self\n {\n $this->initialized['draft'] = true;\n $this->draft = $draft;\n return $this;\n }", "public function drafts()\n {\n if (is_a($this->drafts, 'Kirby\\Cms\\Pages') === true) {\n return $this->drafts;\n }\n\n $kirby = $this->kirby();\n\n // create the inventory for all drafts\n $inventory = Dir::inventory(\n $this->root() . '/_drafts',\n $kirby->contentExtension(),\n $kirby->contentIgnore(),\n $kirby->multilang()\n );\n\n return $this->drafts = Pages::factory($inventory['children'], $this, true);\n }", "public static function withAnyStatus()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope());\n }", "public function draft($draft_id = null)\n {\n return $this->newInstance($draft_id, Draft::class);\n }", "public function newQuery($excludeDeleted = true) {\n return parent::newQuery($excludeDeleted)\n ->whereIn('user_status',['A','B']);\n }", "public function prunable(): Builder\n {\n return static::whereDoesntHave('bookings', function (Builder $query) {\n return $query->whereState('state', CheckedOut::class);\n })\n ->where(function ($query) {\n // User has never logged in and was created more than a year ago.\n $query->whereNull('last_logged_in_at')\n ->whereDate('created_at', '<=',\n now()->subDays(config('hydrofon.prune_models_after_days.users', 365)));\n })\n ->orWhere(function ($query) {\n // User has logged in but not been active for more than a year.\n $query->whereNotNull('last_logged_in_at')\n ->whereDate('last_logged_in_at', '<=',\n now()->subDays(config('hydrofon.prune_models_after_days.users', 365)));\n });\n }", "public static function withRejected()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withRejected();\n }", "public function newQueryWithoutScopes(): Builder\n {\n return $this->newModelQuery();\n }", "public function scopeNotEnabled($query): \\Illuminate\\Database\\Eloquent\\Builder\n {\n return $query->enabled(false);\n }", "public static function archived()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->archived();\n }", "public function scopeNotDelivered($query)\n {\n return $query->whereNull('delivered_at')\n ->where('status', '=', '1')\n ->whereDate('published_at', '<=', Carbon::today()->toDateString());\n }", "public function isDraft()\n {\n return $this->isInStatus($this::DRAFT);\n }", "public function isDraft();" ]
[ "0.82894474", "0.7376883", "0.69010913", "0.6726728", "0.66989183", "0.66858166", "0.6456149", "0.63458383", "0.6293496", "0.627346", "0.624663", "0.6196388", "0.61886245", "0.6161784", "0.6103881", "0.60969245", "0.59413123", "0.59307337", "0.5921801", "0.59133583", "0.58710146", "0.58232003", "0.5821596", "0.5815897", "0.581065", "0.58081794", "0.5790345", "0.57779664", "0.5764176", "0.57630336" ]
0.80025053
1
Get a new query builder that only includes rejected resources.
public static function rejected() { return (new static )->newQueryWithoutScope(new ContentPublishingScope())->rejected(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function withRejected()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withRejected();\n }", "public function exclusions(): ExclusionsRequestBuilder {\n return new ExclusionsRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "private function getRemainingQueryBuilder()\n {\n $qb = $this->createQueryBuilder('o');\n $ex = $qb->expr();\n\n $qb\n ->select('o')\n ->where($ex->andX(\n $ex->eq('o.sample', ':sample'), // Not sample\n $ex->eq('o.state', ':state'), // Accepted\n $ex->lt('o.invoiceTotal', 'o.grandTotal') // invoice total lower than grand total\n ))\n ->addOrderBy('o.createdAt', 'ASC')\n ->setParameter('sample', false)\n ->setParameter('state', OrderStates::STATE_ACCEPTED);\n\n return $qb;\n }", "protected function notbilled()\n {\n $this->builder = $this->billable();\n return $this->builder->where('billed', false);\n }", "public function notHospitalised()\n {\n $this->whereClause .= ' AND status <> ?';\n $this->parameterList[] = RequestStatus::HOSPITAL;\n\n return $this;\n }", "public function scopeNotBilled($query)\n {\n return $query->where('billed', false);\n }", "public static function reject() {\n return new Reject('Not match Organic Subset');\n }", "public function scopeNotEnabled($query): \\Illuminate\\Database\\Eloquent\\Builder\n {\n return $query->enabled(false);\n }", "public function newQuery($excludeDeleted = true) {\n return parent::newQuery($excludeDeleted)\n ->whereIn('user_status',['A','B']);\n }", "public function newQuery($excludeDeleted = true)\n {\n $builder = new EloquentQueryBuilder($this->newBaseQueryBuilder());\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n $builder->setModel($this)->with($this->with);\n\n if ($excludeDeleted and $this->softDelete) {\n $builder->whereNull($this->getQualifiedDeletedAtColumn());\n }\n\n return $builder;\n }", "public function scopePrunableNonWhitelisted($query)\n {\n return $query->whereNotIn(\n 'batch_id',\n static::whitelisted()->select('batch_id')->groupBy('batch_id')\n );\n }", "public static function reject() {\n return new Reject('Not match Atom in []');\n }", "public function validateFilter(): ValidateFilterRequestBuilder {\n return new ValidateFilterRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "public function newQueryWithoutScopes()\n {\n $builder = $this->newEloquentBuilder($this->newBaseQueryBuilder());\n\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n\n return $builder->setModel($this)\n //->setfillableColumns($this->fillable)\n ->with($this->with)\n ->withCount($this->withCount);\n }", "public function scopeBlocked($query)\n {\n return $query->where('status', 2);\n }", "public function newQueryWithoutScopes(): Builder\n {\n return $this->newModelQuery();\n }", "public function scopeIncompleteResponses() {\n\t\t$commaSeparatedStatuses = '\\'' . implode('\\', \\'', self::getIncompleteStatuses()) . '\\'';\n\n\t\t$this->getDbCriteria()->mergeWith(array(\n\t\t\t'condition' => 'status IN (' . $commaSeparatedStatuses . ')',\n\t\t));\n\t\treturn $this;\n\t}", "public function scopeExcludeSpecificWhitelisted($query)\n {\n return $query->whereDoesntHave('tags', function ($query) {\n $query->whereIn('tag', config('telescope-pruning.specific_tags', []));\n });\n }", "public function newQueryWithoutScopes()\n {\n $builder = $this->newBuilder();\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n return $builder->setModel($this);\n }", "public function scopeSubmitted($query)\n {\n return $query->whereNotIn('status', ['incomplete', 'canceled']);\n }", "public function filter(): FilterRequestBuilder {\n return new FilterRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "protected function exclude_spare()\n {\n return $this->collection = $this->collection->where('is_spare', 'f');\n }", "protected function nonbillable()\n {\n return $this->builder->where('billable', false);\n }", "public function reject()\n {\n $url = URIResource::Make($this->path, array($this->id));\n $data = new DataPacket(array(\"state\" => CALL_STATES::rejected));\n $this->client->post($url, $data->get());\n\n return Constructor::Make($this, $data->get());\n }", "public function scopeNotWhitelisted($query)\n {\n return $query->when(\n config('telescope-pruning.skip_monitored_tags', true),\n function ($query) {\n $query->notMonitored();\n }\n )->excludeSpecificWhitelisted();\n }", "public function newQuery($excludeDeleted = true)\n {\n $query = parent::newQuery($excludeDeleted = true);\n $query->where('type', 'job');\n return $query;\n }", "protected function sourceQuery(){\n $query = parent::sourceQuery();\n $query->condition('i.field_name', array_keys($this->getFieldNameMappings()), 'NOT IN');\n return $query;\n }", "protected function addWithRejected(Builder $builder)\n {\n $builder->macro('withRejected', function (Builder $builder) {\n $this->remove($builder, $builder->getModel());\n\n return $builder->whereIN($this->getStatusColumn($builder),\n [Status::APPROVED, Status::REJECTED]);\n });\n }", "public function whereNotIn(Builder $query, array $where = [], array $allowedFields = []): Builder\n {\n foreach ($where as $column => $in) {\n if (!in_array($column, $allowedFields)) {\n throw new Exception(\"O indice '{$column}' não esta habilitado!\", 1);\n }\n $query->whereNotIn($column, explode(',', $in));\n }\n\n return $query;\n }", "function get_rejected_bookings(){\n\t\t$rejected = array();\n\t\tforeach ( $this->load() as $EM_Booking ){\n\t\t\tif($EM_Booking->booking_status == 2){\n\t\t\t\t$rejected[] = $EM_Booking;\n\t\t\t}\n\t\t}\n\t\t$EM_Bookings = new EM_Bookings($rejected);\n\t\treturn $EM_Bookings;\n\t}" ]
[ "0.7139507", "0.598787", "0.59558046", "0.5809136", "0.57711625", "0.57448465", "0.5680792", "0.5666806", "0.56534696", "0.55973786", "0.55683273", "0.55600667", "0.5554125", "0.5513215", "0.5509055", "0.5500674", "0.5498686", "0.5490907", "0.545972", "0.5451109", "0.54395765", "0.54343873", "0.5414062", "0.5398084", "0.5354221", "0.535389", "0.5344997", "0.5332192", "0.53210545", "0.5300005" ]
0.6871714
1
Get a new query builder that only includes approved resources.
public static function approved() { return (new static )->newQueryWithoutScope(new ContentPublishingScope())->approved(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function withApproved()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withApproved();\n }", "public function scopeApproved(Builder $builder): Builder\n {\n return $builder->where('approved', true);\n }", "public function scopeApproved($query)\n {\n return $query->where('is_approved', true);\n }", "public function scopeIsApproved() {\n return $this->where('state_pol', 4);\n }", "public function scopeIsApproved($builder, $approved = true)\n {\n if ($approved == null) {\n return $builder;\n }\n return $builder->where('approved', $approved);\n }", "public function approved()\n {\n return $this->where('comment_approved', 1);\n }", "public function scopeApproved($query) {\n return $query->whereHas('user', function($q) {\n $q->where('approved', true);\n })->get();\n }", "public function get_approved_items() {\n return $this->query(\"SELECT * FROM `items` where `approved` order by `premium`, `date`\");\n }", "public function newQuery($excludeDeleted = true) {\n return parent::newQuery($excludeDeleted)\n ->whereIn('user_status',['A','B']);\n }", "public function getApproved(Filter $filter): Collection;", "private function getRemainingQueryBuilder()\n {\n $qb = $this->createQueryBuilder('o');\n $ex = $qb->expr();\n\n $qb\n ->select('o')\n ->where($ex->andX(\n $ex->eq('o.sample', ':sample'), // Not sample\n $ex->eq('o.state', ':state'), // Accepted\n $ex->lt('o.invoiceTotal', 'o.grandTotal') // invoice total lower than grand total\n ))\n ->addOrderBy('o.createdAt', 'ASC')\n ->setParameter('sample', false)\n ->setParameter('state', OrderStates::STATE_ACCEPTED);\n\n return $qb;\n }", "public function setApproved($approved)\n {\n $this->approved = $approved;\n\n return $this;\n }", "public function newQuery($excludeDeleted = true)\n {\n $builder = new EloquentQueryBuilder($this->newBaseQueryBuilder());\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n $builder->setModel($this)->with($this->with);\n\n if ($excludeDeleted and $this->softDelete) {\n $builder->whereNull($this->getQualifiedDeletedAtColumn());\n }\n\n return $builder;\n }", "public function scopeEnabled($query, $enabled = true): \\Illuminate\\Database\\Eloquent\\Builder\n {\n return $query->where('is_enabled', $enabled);\n }", "public function createQuery($context = 'list')\n {\n $query = $this->getModelManager()->createQuery($this->getClass(), 'o');\n $query->where('o.status = '.Transaction::TRANSACTION_STATUS_APPROVED);\n\n return $query;\n }", "public function getInitiallyApproved()\n {\n return Item::where('is_initially_approved', true)->get();\n }", "public function scopeAcceptedRequest(Builder $query)\n {\n return $query->where('requestee_id', Auth::id())->whereNotNull('acceptee_id')->get();\n }", "public function query(): Builder\n {\n return Role::query()\n ->when($this->getFilter('activeFilter'), function ($query, $active) {\n if ($active === 'yes') {\n return $query->where('is_active', 1);\n }\n\n return $query->where('is_active', 0);\n });\n }", "public function scopeFiltered(Builder $query, \\Illuminate\\Http\\Request $request): Builder\n {\n if ($request->has('status') && $status = $request->get('status'))\n $query->where('status', $status);\n\n if ($request->has('search') && $search = $request->get('search'))\n $query->search($search);\n\n return $query/*->where('user_id', '<>', $request->user('api')->id)*/;\n }", "protected function defineActiveMembershipsQuery()\n {\n return $this->createQueryBuilder()\n ->where('m.enabled = :true')\n ->setParameter('true', true);\n }", "public function active() {\n $this->filterWhere(['status' => Account::STATUS_ACTIVE]);\n return $this;\n }", "public function scopeOfActive($query)\n {\n return $query->where('is_active',true )->where('is_approve',true);\n }", "protected function addApproved(Builder $builder)\n {\n $builder->macro('approved', function (Builder $builder) {\n $model = $builder->getModel();\n\n $this->remove($builder, $model);\n\n $builder->where($model->getQualifiedStatusColumn(), '=', Status::APPROVED);\n\n return $builder;\n });\n }", "public function getWhereClauseForEnabledFieldsIncludesDeletedCheckInBackend() {}", "public static function withAnyStatus()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope());\n }", "public function query()\n {\n $query = Customer::whereHas('verify',function($query) {\n $query->where('verify_by', Auth::user()->id)->where('status','0');\n });\n\n return $this->applyScopes($query);\n }", "public static function withArchived()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withArchived();\n }", "public function getForApproval() {\n\n /* Set orWhereIn variables */\n array_push($this->orWhereIn, [\n 'column' => 'id',\n 'array' => $this->user->idp_approvals()->pluck('id')->toArray()\n ]);\n }", "public function whereEnabled(QueryBuilder $qb, $isEnabled)\n {\n $qb->andWhere('u.enabled = :enabled') \n ->setParameter('enabled',$isEnabled);\n \n if(! $isEnabled){\n $this->whereToRemove($qb,false); \n }\n return $this;\n }", "protected function nonbillable()\n {\n return $this->builder->where('billable', false);\n }" ]
[ "0.71319693", "0.6602908", "0.6254938", "0.62363946", "0.61662954", "0.6020874", "0.6004069", "0.59751475", "0.58739203", "0.5757189", "0.57300603", "0.55975413", "0.5565583", "0.5458248", "0.5456789", "0.5393907", "0.53815264", "0.53566337", "0.5310454", "0.53056616", "0.5304802", "0.5297954", "0.5293263", "0.5291203", "0.5250192", "0.524657", "0.5228425", "0.5191204", "0.5182179", "0.51596075" ]
0.7033901
1
Get a new query builder that only includes published resources.
public static function published() { return (new static )->newQueryWithoutScope(new ContentPublishingScope())->published(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createPublishedQueryBuilder()\n {\n return $this->createQueryBuilder()\n ->field('isPublished')->equals(true);\n }", "public function scopePublished(Builder $query): Builder\n {\n return $query->where('published', 'Yes');\n }", "public static function withApproved()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withApproved();\n }", "public function scopePublished(Builder $query) : Builder\n {\n return $query->wherePublished(true);\n }", "public function scopePublished(Builder $query) : Builder\n {\n return $query->wherePublished(true);\n }", "public function scopePublished(Builder $query) : Builder\n {\n return $query->wherePublished(true);\n }", "public static function withArchived()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withArchived();\n }", "public function scopePublished(Builder $query) : Builder\n {\n return $query->wherePublished(true)->where('published_at', '<=', DB::raw('CURRENT_TIMESTAMP'));\n }", "public static function published()\n {\n // return self::where('published',1)->get();\n return self::where('published',true);\n }", "public static function withAnyStatus()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope());\n }", "public function scopeOnlyPublished($query)\n {\n return $query->where('published', 1);\n }", "public function published()\n {\n $published = [];\n\n foreach ($this->items as $path => $slug) {\n $page = $this->pages->get($path);\n if ($page !== null && $page->published()) {\n $published[$path] = $slug;\n }\n }\n $this->items = $published;\n\n return $this;\n }", "public function getAll($excludeUnpublished = false)\n {\n $this->qb = $this->getInstance();\n\n //If $excludeUnpublished === true, we exclude the non published results\n if ($excludeUnpublished) {\n $this->qb\n ->andWhere($this->mainAlias.'.status = :status')\n ->orWhere($this->mainAlias.'.status = :scheduled_status AND '.$this->mainAlias.'.publishedAt > :publicationDate')\n ->setParameter('status', PageStatus::PUBLISHED)\n ->setParameter('scheduled_status', PageStatus::SCHEDULED)\n ->setParameter('publicationDate', new \\DateTime());\n }\n\n return $this;\n }", "public static function approved()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->approved();\n }", "public function createPublishedSortedQueryBuilder()\n {\n return $this->createPublishedQueryBuilder()\n ->sort('publishedAt', 'desc');\n }", "public static function published()\n {\n return self::where('published', '=', true)->orderBy('published_at', 'DESC')->get();\n }", "private function getMainPublicQb(){\n $qb = $this->createQueryBuilder('a')\n ->where('a.published = true')\n ->andWhere('a.date <= :now')\n ->orderBy('a.date', 'desc')\n ->setParameter('now', new \\Datetime());\n \n return $qb;\n }", "public function scopePublished($query) {\n return $query->where('published_at', '<=', now());\n }", "public function nonPublished()\n {\n $published = [];\n\n foreach ($this->items as $path => $slug) {\n $page = $this->pages->get($path);\n if ($page !== null && !$page->published()) {\n $published[$path] = $slug;\n }\n }\n $this->items = $published;\n\n return $this;\n }", "public function scopePublished($query)\n {\n return $query->where('published_at', '!=', null);\n }", "public function scopePublished($query)\n {\n return $query->where('published', 1);\n }", "public function getAllPublished();", "public static function withSubmitted()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withSubmitted();\n }", "public function scopeIsPublished($query)\n {\n return $query->where('status', 'Published');\n }", "public function scopePublished($query)\n {\n return $query->where('status', 'published');\n }", "public function scopePublished($query)\n {\n return $query->where('status', 'PUBLISHED');\n }", "public function scopePublished($query)\n {\n return $query->where(\"status\", \"=\", \"1\");\n }", "public function scopePublished($query)\n {\n return $query->where('status_id', Status::getPublished()->id);\n }", "protected function announcedQuery() : Query\n {\n return $this\n ->publishedQuery()\n ->apply(\n fn (Query $q) => $this->filterAnnounced($q)\n );\n }", "public function scopePublished($query)\n {\n return $query->where('status', SpaceStatus::PUBLISHED());\n }" ]
[ "0.7198313", "0.65655893", "0.6457857", "0.64101595", "0.64101595", "0.64101595", "0.6375342", "0.63579375", "0.6357668", "0.6350235", "0.6335369", "0.6140541", "0.6089029", "0.608604", "0.6025949", "0.6009217", "0.6003644", "0.59782594", "0.5968814", "0.5935267", "0.5925402", "0.5906308", "0.5874376", "0.58665216", "0.58540154", "0.585106", "0.5847835", "0.58303916", "0.5816616", "0.57951736" ]
0.696432
1
Get a new query builder that returns archived resources.
public static function archived() { return (new static )->newQueryWithoutScope(new ContentPublishingScope())->archived(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function withArchived()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withArchived();\n }", "public function archive()\n {\n return $this->client->requestWithResource($this, 'PUT', '/archived', [\n 'headers' => ['X-Contentful-Version' => $this->getSystemProperties()->getVersion()],\n ]);\n }", "public function andArchived()\n {\n $modelClass = $this->modelClass;\n $this->excludedHiddenStatuses[] = $modelClass::STATUS_IN_HISTORY;\n return $this;\n }", "public static function archives()\n {\n return static::selectRaw('year(created_at) year, monthname(created_at) month, \n day(created_at) day, count(*) Published')\n ->groupBy('year','month','day')\n ->orderByRaw('min(created_at) desc')\n ->get()\n ->toArray();\n\n }", "public function newQuery($excludeDeleted = true)\n {\n $builder = new EloquentQueryBuilder($this->newBaseQueryBuilder());\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n $builder->setModel($this)->with($this->with);\n\n if ($excludeDeleted and $this->softDelete) {\n $builder->whereNull($this->getQualifiedDeletedAtColumn());\n }\n\n return $builder;\n }", "public function createQuery($context = 'list')\n {\n $query = $this->getModelManager()->createQuery($this->getClass(), 'm');\n $query->where('m.isArchived = true');\n\n return $query;\n }", "public function getArchivedEvents()\n {\n $qb = $this->entityManager->getRepository(Event::class)->createQueryBuilder('e')\n ->where('e.deleted = 1')\n ->orderBy('e.eventStartDate', 'DESC');\n return $qb->getQuery();\n }", "public function scopeArchival($query)\n {\n return $query->where('is_closed', 1)\n ->where('is_pinned', 0)\n ->where('updated_at', '>', Carbon::now()->subDays(7)->format('Y-m-d H:i:s'));\n }", "public function getArchive($year = null, $month = null, $data = null, $includeDeleted = false)\n {\n $oDb = Factory::service('Database');\n\n if ($year) {\n $oDb->where('YEAR(' . $this->tableAlias . '.published) = ', (int) $year);\n }\n\n // --------------------------------------------------------------------------\n\n if ($month) {\n $oDb->where('MONTH(' . $this->tableAlias . '.published) = ', (int) $month);\n }\n\n // --------------------------------------------------------------------------\n\n return $this->getAll(null, null, $data, $includeDeleted, 'GET_ARCHIVE');\n }", "public function newQuery($excludeDeleted = true)\n {\n $builder = new PostBuilder($this->newBaseQueryBuilder());\n $builder->setModel($this)->with($this->with);\n $builder->orderBy('post_date', 'desc');\n\n if (isset($this->postType) and $this->postType) {\n $builder->type($this->postType);\n }\n\n if ($excludeDeleted and $this->softDelete) {\n $builder->whereNull($this->getQualifiedDeletedAtColumn());\n }\n\n return $builder;\n }", "public static function archives()\n {\n return static::selectRaw(\"to_char(created_at, 'Month') as month, extract(year from created_at) as year, extract(month from created_at) as sort, count(*) as published\")\n ->groupBy('year', 'month', 'sort')\n ->orderBy('year', 'desc')\n ->orderBy('sort', 'desc')\n ->get()\n ->toArray();\n }", "public function getBuiltQb()\n {\n $qb = clone $this->qb;\n\n $this->setSelectFrom($qb);\n $this->setJoins($qb);\n $this->setWhere($qb);\n $this->setOrderBy($qb);\n $this->setLimit($qb);\n\n return $qb;\n }", "public function newQuery()\n {\n $builder = $this->newAlfrescoBuilder($this->getConnection());\n $builder->setModel($this);\n return $builder;\n }", "public function query()\n {\n return new \\Rubberband\\Elastic\\Laravel\\Query\\Builder($this);\n }", "public function getQueryAR()\n {\n // require_once('dbActiveRecord.php');\n // return DbActiveRecord::getSingleton();\n return $this;\n }", "public function setArchived($var)\n {\n GPBUtil::checkBool($var);\n $this->archived = $var;\n\n return $this;\n }", "protected function _initArchive()\n {\n return Mage::helper('blog/archive')\n ->initArchive($this->_getYear(), $this->_getMonth(), $this);\n }", "protected function toQuery() {\n\t\t$query = $this->mapper()->all($this->entityName(), $this->conditions())->order($this->relationOrder());\n\t\t$query->snapshot();\n\t\treturn $query;\n\t}", "public function getAll(Filter $filter): Builder;", "public function findAll() {\n\t\t$sql = \"select * from t_archive order by archive_id desc\";\n\t\t$result = $this->getDb()->fetchAll($sql);\n\n\t\t// Convert query result to an array of domain objects\n\t\t$archives = array();\n\t\tforeach ($result as $row) {\n\t\t\t$archiveId = $row['archive_id'];\n\t\t\t$archives[$archiveId] = $this->buildDomainObject($row);\n\t\t}\n\t\treturn $archives;\n\t}", "protected function query(): Builder\n {\n $query = $this->make()->newQuery();\n\n // Loads the active model if set, for use in getOne(), update(), delete(), etc.\n if ($this->activeModelInstance) {\n $query->where(\n $this->activeModelInstance->getKeyName(),\n $this->activeModelInstance->getKey()\n );\n }\n\n return $query;\n }", "public static function query()\n {\n QueryBuilder::$dataSource = true;\n\n return new QueryBuilder();\n }", "public function query(): AppointmentQueryBuilder\n {\n return new AppointmentQueryBuilder($this->client);\n }", "public function query()\n {\n $query = EaBookingEntry::leftJoin('mst_customers AS c1', 'ea_booking_entries.shipper_id', '=', 'c1.id')\n ->leftJoin('mst_customers AS c2', 'ea_booking_entries.consignee_id', '=', 'c2.id')\n ->leftJoin('mst_customers AS c3', 'ea_booking_entries.agent_id', '=', 'c3.id')\n ->leftJoin('mst_airports AS c4', 'ea_booking_entries.origin_id', '=', 'c4.id')\n ->leftJoin('mst_airports AS c5', 'ea_booking_entries.destination_id', '=', 'c5.id')\n ->leftJoin('ea_shipment_entries AS file', 'ea_booking_entries.shipment_id', '=', 'file.id')\n ->orderBy('ea_booking_entries.date', 'desc')\n ->orderBy('ea_booking_entries.code', 'desc')\n ->select(['ea_booking_entries.id','ea_booking_entries.code','ea_booking_entries.shipment_type','ea_booking_entries.date', 'ea_booking_entries.status', 'c1.name AS shipper_name', 'c2.name AS consignee_name', 'c3.name AS agent_name', 'c4.name AS origin_name', 'c5.name AS destination_name', 'file.code as shipment_code']);\n return $this->applyScopes($query);\n }", "protected function newBaseQueryBuilder()\n {\n $connection = $this->getConnection();\n\n $builder = in_array(self::class, config('autocache.models'))\n ? \\LaravelAutoCache\\Builder::class\n : \\Illuminate\\Database\\Query\\Builder::class;\n\n return new $builder($connection, $connection->getQueryGrammar(), $connection->getPostProcessor());\n }", "public function archives() {\n return $this->hasMany(Archive::class);\n }", "public function query()\n {\n $query = AcademicYear::query();\n\n if ($this->isOrderedWithDefaultOrder()) {\n $query->orderByDesc('from');\n }\n\n $query->where('site_id', site()->id);\n\n return $query;\n }", "public function archive()\n {\n $archives = Archive::where('user_id', '=', Auth::user()->id)->orderBy('id', 'desc')->get();\n// dd($archives);\n return view('user.archive.archive')\n ->with('archives', $archives);\n }", "public function get_all_archives() {\n\t\t\t\n\t\t\t$archives = TableRegistry::get('Administrator.Archives');\n\n\t\t\t$imagesConditions = [ 'AND' => [\n\t\t\t\t\t\t\t\t\t [\n\t\t\t\t\t\t\t\t\t\t\t 'OR' => [\n\t\t\t\t\t\t\t\t\t\t\t\t ['mimetype' => 'image/png'],\n\t\t\t\t\t\t\t\t\t\t\t\t ['mimetype' => 'image/jpeg'],\n\t\t\t\t\t\t\t\t\t\t\t\t ['mimetype' => 'image/jpg'],\n\t\t\t\t\t\t\t\t\t\t\t\t ['mimetype' => 'image/gif'],\n\t\t\t\t\t\t\t\t\t\t\t\t ['mimetype' => 'application/stream'],\n\t\t\t\t\t\t\t\t\t\t\t\t ['mimetype' => 'application/pdf'],\n\t\t\t\t\t\t\t\t\t \t\t\t]\n\t\t\t\t\t\t\t\t\t \t],\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t \t]\n\t\t\t\t\t\t\t\t];\n\n\n\t\t\t//$this->set('images', $archives->find('all', ['conditions' => $imagesConditions]) );\n\t\t\treturn $archives->find('all', ['conditions' => $imagesConditions, 'order' => ['id' => 'DESC'] ]);\n\n\t}", "public function newQuery($excludeDeleted = true)\n {\n $query = parent::newQuery($excludeDeleted = true);\n $query->where('type', 'job');\n return $query;\n }" ]
[ "0.7599686", "0.6372893", "0.5990331", "0.581294", "0.57721335", "0.5709322", "0.5686159", "0.56347865", "0.5583035", "0.55768424", "0.5528233", "0.54685986", "0.53829473", "0.5342265", "0.5336907", "0.53180575", "0.5309426", "0.5300387", "0.52652544", "0.52582985", "0.5257063", "0.5248137", "0.5246582", "0.5228611", "0.522269", "0.5221861", "0.5210983", "0.5208923", "0.52036333", "0.51832664" ]
0.778653
0
Get a new query builder that includes drafted resources.
public static function withDrafted() { return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withDrafted(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function drafted()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->drafted();\n }", "public static function drafts()\n {\n return self::where('published', '=', false)->get();\n }", "public function scopeDraft($query)\n {\n return $query->whereStatus(self::STATUS_DRAFT);\n }", "public function getDrafts()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('drafts');\n }", "public function newQuery($excludeDeleted = true)\n {\n $builder = new PostBuilder($this->newBaseQueryBuilder());\n $builder->setModel($this)->with($this->with);\n $builder->orderBy('post_date', 'desc');\n\n if (isset($this->postType) and $this->postType) {\n $builder->type($this->postType);\n }\n\n if ($excludeDeleted and $this->softDelete) {\n $builder->whereNull($this->getQualifiedDeletedAtColumn());\n }\n\n return $builder;\n }", "protected function getTableQuery(): Builder\n {\n return parent::getTableQuery()->withoutDrafts();\n }", "public static function withArchived()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withArchived();\n }", "public function draft(): self\n {\n $this->andWhere(['{{%task}}.[[status]]' => TaskRecord::STATUS_NOT_ACTIVE]);\n\n return $this;\n }", "public function createPublishedQueryBuilder()\n {\n return $this->createQueryBuilder()\n ->field('isPublished')->equals(true);\n }", "public static function withApproved()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withApproved();\n }", "public function newQuery($excludeDeleted = true)\n {\n $builder = new EloquentQueryBuilder($this->newBaseQueryBuilder());\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n $builder->setModel($this)->with($this->with);\n\n if ($excludeDeleted and $this->softDelete) {\n $builder->whereNull($this->getQualifiedDeletedAtColumn());\n }\n\n return $builder;\n }", "public function getDraft(Filter $filter): Collection;", "public function getBuiltQb()\n {\n $qb = clone $this->qb;\n\n $this->setSelectFrom($qb);\n $this->setJoins($qb);\n $this->setWhere($qb);\n $this->setOrderBy($qb);\n $this->setLimit($qb);\n\n return $qb;\n }", "public function drafts()\n {\n $rqsQuery = RequestModel::all();\n\n $rqs = $rqsQuery;\n $id = Auth::user()->id;\n $user = User::where('id', $id)->first();\n if ($user->inRole('admin')) {\n $rqs = $rqsQuery->where('status', '<>', 'Close');\n }\n if ($user->inRole('user')) {\n $rqs = $rqsQuery->where('user_id', Auth::user()->id);\n }\n if ($user->inRole('manager')) {\n $rqs = $rqsQuery->where('manager', $user->name);\n }\n return view('requests.drafts', compact('rqs'));\n }", "public function newQuery()\n {\n $builder = $this->newAlfrescoBuilder($this->getConnection());\n $builder->setModel($this);\n return $builder;\n }", "public function drafts()\n {\n $postsQuery = Post::unpublished();\n $posts = $postsQuery->paginate();\n return view('posts.drafts', compact('posts'));\n }", "public function newQuery()\n {\n $datasource = $this->getDatasource();\n\n $query = new Builder($datasource, $datasource->getPostProcessor());\n\n return $query->setModel($this);\n }", "private function getRemainingQueryBuilder()\n {\n $qb = $this->createQueryBuilder('o');\n $ex = $qb->expr();\n\n $qb\n ->select('o')\n ->where($ex->andX(\n $ex->eq('o.sample', ':sample'), // Not sample\n $ex->eq('o.state', ':state'), // Accepted\n $ex->lt('o.invoiceTotal', 'o.grandTotal') // invoice total lower than grand total\n ))\n ->addOrderBy('o.createdAt', 'ASC')\n ->setParameter('sample', false)\n ->setParameter('state', OrderStates::STATE_ACCEPTED);\n\n return $qb;\n }", "public function newQueryWithoutScopes(): Builder\n {\n return $this->newModelQuery();\n }", "public function getClosedProposalsQueryBuilder()\n {\n $now = new \\DateTime();\n\n return $this->createQueryBuilder('p')\n ->select('p, d, pa, v')\n ->leftJoin('p.documents', 'd')\n ->leftJoin('p.proposalAnswers', 'pa')\n ->leftJoin('pa.votes', 'v')\n ->where('p.finishAt <= :now')\n ->andWhere('p.userDraft = false')\n ->andWhere('p.moderated = true')\n ->setParameter('now', $now->format('Y-m-d H:i:s'))\n ->orderBy('p.createdAt', 'DESC');\n }", "public function createStandardQueryBuilder()\n {\n return $this->createQueryBuilder()\n ->field('status')->notEqual(MultimediaObject::STATUS_PROTOTYPE)\n ->field('islive')->equals(false);\n }", "public function query()\n\t{\n\t\treturn new Builder(\n\t\t\t$this, $this->getQueryGrammar(), $this->getPostProcessor()\n\t\t);\n\t}", "public function drafts()\n {\n if (is_a($this->drafts, 'Kirby\\Cms\\Pages') === true) {\n return $this->drafts;\n }\n\n $kirby = $this->kirby();\n\n // create the inventory for all drafts\n $inventory = Dir::inventory(\n $this->root() . '/_drafts',\n $kirby->contentExtension(),\n $kirby->contentIgnore(),\n $kirby->multilang()\n );\n\n return $this->drafts = Pages::factory($inventory['children'], $this, true);\n }", "public function newQuery()\n {\n $builder = new Builder($this->newBaseQueryBuilder());\n\n $builder->setModel($this);\n\n return $builder;\n }", "protected function query(): Builder\n {\n $query = $this->make()->newQuery();\n\n // Loads the active model if set, for use in getOne(), update(), delete(), etc.\n if ($this->activeModelInstance) {\n $query->where(\n $this->activeModelInstance->getKeyName(),\n $this->activeModelInstance->getKey()\n );\n }\n\n return $query;\n }", "public function draft($draft_id = null)\n {\n return $this->newInstance($draft_id, Draft::class);\n }", "public function newQuery()\n {\n return new Builder($this->connection, $this->processor);\n }", "public function getQuery(): Builder;", "public function query()\n {\n return $this->model\n ->newQuery()\n ->with(['translations'])\n ->orderBy('order_column')\n ->nonDraft();\n }", "public static function archived()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->archived();\n }" ]
[ "0.75646013", "0.6760709", "0.6388133", "0.63626826", "0.6360245", "0.6350816", "0.62652904", "0.624249", "0.6138659", "0.61013436", "0.6046204", "0.6026111", "0.5980388", "0.59129435", "0.58803344", "0.58766204", "0.5856778", "0.58374184", "0.5787044", "0.5766981", "0.5762754", "0.570253", "0.5688936", "0.56782746", "0.5668254", "0.56505156", "0.56501114", "0.56469375", "0.5645653", "0.5642804" ]
0.80597216
0
Get a new query builder that includes approved resources.
public static function withApproved() { return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withApproved(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function approved()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->approved();\n }", "public function scopeApproved(Builder $builder): Builder\n {\n return $builder->where('approved', true);\n }", "public function scopeApproved($query)\n {\n return $query->where('is_approved', true);\n }", "public function get_approved_items() {\n return $this->query(\"SELECT * FROM `items` where `approved` order by `premium`, `date`\");\n }", "public function scopeIsApproved($builder, $approved = true)\n {\n if ($approved == null) {\n return $builder;\n }\n return $builder->where('approved', $approved);\n }", "public function newQuery($excludeDeleted = true)\n {\n $builder = new EloquentQueryBuilder($this->newBaseQueryBuilder());\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n $builder->setModel($this)->with($this->with);\n\n if ($excludeDeleted and $this->softDelete) {\n $builder->whereNull($this->getQualifiedDeletedAtColumn());\n }\n\n return $builder;\n }", "public function scopeApproved($query) {\n return $query->whereHas('user', function($q) {\n $q->where('approved', true);\n })->get();\n }", "protected function query(): Builder\n {\n $query = $this->make()->newQuery();\n\n // Loads the active model if set, for use in getOne(), update(), delete(), etc.\n if ($this->activeModelInstance) {\n $query->where(\n $this->activeModelInstance->getKeyName(),\n $this->activeModelInstance->getKey()\n );\n }\n\n return $query;\n }", "public function getBuiltQb()\n {\n $qb = clone $this->qb;\n\n $this->setSelectFrom($qb);\n $this->setJoins($qb);\n $this->setWhere($qb);\n $this->setOrderBy($qb);\n $this->setLimit($qb);\n\n return $qb;\n }", "public function setApproved($approved)\n {\n $this->approved = $approved;\n\n return $this;\n }", "public function query(): Builder\n {\n return Role::query()\n ->when($this->getFilter('activeFilter'), function ($query, $active) {\n if ($active === 'yes') {\n return $query->where('is_active', 1);\n }\n\n return $query->where('is_active', 0);\n });\n }", "public function newQuery()\n {\n $builder = $this->newAlfrescoBuilder($this->getConnection());\n $builder->setModel($this);\n return $builder;\n }", "public function query(): AppointmentQueryBuilder\n {\n return new AppointmentQueryBuilder($this->client);\n }", "public function getBuilder()\n {\n $builder = new Query\\Builder($this->getKeys());\n $builder->setVisitors([\n new Visitors\\EqVisitor($builder),\n new Visitors\\NotEqVisitor($builder),\n new Visitors\\GtVisitor($builder),\n new Visitors\\GteVisitor($builder),\n new Visitors\\LtVisitor($builder),\n new Visitors\\LteVisitor($builder),\n new Visitors\\CtVisitor($builder),\n new Visitors\\SwVisitor($builder),\n new Visitors\\EwVisitor($builder),\n new Visitors\\AndVisitor($builder),\n new Visitors\\OrVisitor($builder),\n new Visitors\\NotInVisitor($builder),\n new Visitors\\InVisitor($builder),\n new Visitors\\NullVisitor($builder),\n new Visitors\\NotNullVisitor($builder),\n ]);\n\n return $builder;\n }", "public function scopeIsApproved() {\n return $this->where('state_pol', 4);\n }", "public function getApproved(Filter $filter): Collection;", "public function approved()\n {\n return $this->where('comment_approved', 1);\n }", "public function createQuery($context = 'list')\n {\n $query = $this->getModelManager()->createQuery($this->getClass(), 'o');\n $query->where('o.status = '.Transaction::TRANSACTION_STATUS_APPROVED);\n\n return $query;\n }", "public function getResourcePlanifiedQB()\n {\n $qb = $this->createQueryBuilder('pr');\n $qb->where('pr.resource = r.id');\n return $qb;\n }", "public function newQuery($excludeDeleted = true) {\n return parent::newQuery($excludeDeleted)\n ->whereIn('user_status',['A','B']);\n }", "public function build()\n {\n $query = $this->qb;\n if ($this->getWhereExpression()) {\n $query->where($this->getWhereExpression());\n }\n foreach ($this->getWhereParameters() as $key => $param) {\n $query->setParameter($key, $param, is_array($param) ? Connection::PARAM_STR_ARRAY : null);\n }\n\n return $query;\n }", "public static function withArchived()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withArchived();\n }", "public function query()\n {\n $query = Customer::whereHas('verify',function($query) {\n $query->where('verify_by', Auth::user()->id)->where('status','0');\n });\n\n return $this->applyScopes($query);\n }", "private function getRemainingQueryBuilder()\n {\n $qb = $this->createQueryBuilder('o');\n $ex = $qb->expr();\n\n $qb\n ->select('o')\n ->where($ex->andX(\n $ex->eq('o.sample', ':sample'), // Not sample\n $ex->eq('o.state', ':state'), // Accepted\n $ex->lt('o.invoiceTotal', 'o.grandTotal') // invoice total lower than grand total\n ))\n ->addOrderBy('o.createdAt', 'ASC')\n ->setParameter('sample', false)\n ->setParameter('state', OrderStates::STATE_ACCEPTED);\n\n return $qb;\n }", "public function queryBuilder();", "public function queryBuilder();", "public function getDocumentBuilder()\n {\n return Document::query()\n ->where(function($query) {\n return $query->whereRaw($this->getExpandedQuery());\n });\n }", "public function query()\n {\n return new \\Rubberband\\Elastic\\Laravel\\Query\\Builder($this);\n }", "public static function query()\n {\n QueryBuilder::$dataSource = true;\n\n return new QueryBuilder();\n }", "public function newQuery()\n {\n return $this->registerGlobalScopes($this->newQueryWithoutScopes());\n }" ]
[ "0.6821051", "0.6297973", "0.5911277", "0.57604575", "0.5705288", "0.5680536", "0.5640246", "0.5609111", "0.55403334", "0.553442", "0.5512559", "0.5495511", "0.54862696", "0.54708445", "0.54593563", "0.5449787", "0.5442073", "0.5414417", "0.5413987", "0.53846985", "0.5362502", "0.53489906", "0.53440905", "0.5323177", "0.5303726", "0.5303726", "0.5293404", "0.5289984", "0.52883714", "0.5285749" ]
0.69095093
0
Get a new query builder that includes rejected resources.
public static function withRejected() { return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withRejected(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function rejected()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->rejected();\n }", "public function exclusions(): ExclusionsRequestBuilder {\n return new ExclusionsRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "public function newQueryWithoutScopes(): Builder\n {\n return $this->newModelQuery();\n }", "public function newQueryWithoutScopes()\n {\n $builder = $this->newEloquentBuilder($this->newBaseQueryBuilder());\n\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n\n return $builder->setModel($this)\n //->setfillableColumns($this->fillable)\n ->with($this->with)\n ->withCount($this->withCount);\n }", "private function getRemainingQueryBuilder()\n {\n $qb = $this->createQueryBuilder('o');\n $ex = $qb->expr();\n\n $qb\n ->select('o')\n ->where($ex->andX(\n $ex->eq('o.sample', ':sample'), // Not sample\n $ex->eq('o.state', ':state'), // Accepted\n $ex->lt('o.invoiceTotal', 'o.grandTotal') // invoice total lower than grand total\n ))\n ->addOrderBy('o.createdAt', 'ASC')\n ->setParameter('sample', false)\n ->setParameter('state', OrderStates::STATE_ACCEPTED);\n\n return $qb;\n }", "public function newQuery($excludeDeleted = true)\n {\n $builder = new EloquentQueryBuilder($this->newBaseQueryBuilder());\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n $builder->setModel($this)->with($this->with);\n\n if ($excludeDeleted and $this->softDelete) {\n $builder->whereNull($this->getQualifiedDeletedAtColumn());\n }\n\n return $builder;\n }", "public function validateFilter(): ValidateFilterRequestBuilder {\n return new ValidateFilterRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "public function newQueryWithoutScopes()\n {\n $builder = $this->newBuilder();\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n return $builder->setModel($this);\n }", "public function scopeIncompleteResponses() {\n\t\t$commaSeparatedStatuses = '\\'' . implode('\\', \\'', self::getIncompleteStatuses()) . '\\'';\n\n\t\t$this->getDbCriteria()->mergeWith(array(\n\t\t\t'condition' => 'status IN (' . $commaSeparatedStatuses . ')',\n\t\t));\n\t\treturn $this;\n\t}", "public function reject()\n {\n $url = URIResource::Make($this->path, array($this->id));\n $data = new DataPacket(array(\"state\" => CALL_STATES::rejected));\n $this->client->post($url, $data->get());\n\n return Constructor::Make($this, $data->get());\n }", "public function notHospitalised()\n {\n $this->whereClause .= ' AND status <> ?';\n $this->parameterList[] = RequestStatus::HOSPITAL;\n\n return $this;\n }", "public function filter(): FilterRequestBuilder {\n return new FilterRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "public static function reject() {\n return new Reject('Not match Organic Subset');\n }", "public function scopeNotBilled($query)\n {\n return $query->where('billed', false);\n }", "public static function reject() {\n return new Reject('Not match Atom in []');\n }", "public function scopeNotEnabled($query): \\Illuminate\\Database\\Eloquent\\Builder\n {\n return $query->enabled(false);\n }", "public function newQuery($excludeDeleted = true) {\n return parent::newQuery($excludeDeleted)\n ->whereIn('user_status',['A','B']);\n }", "protected function addWithRejected(Builder $builder)\n {\n $builder->macro('withRejected', function (Builder $builder) {\n $this->remove($builder, $builder->getModel());\n\n return $builder->whereIN($this->getStatusColumn($builder),\n [Status::APPROVED, Status::REJECTED]);\n });\n }", "function get_rejected_bookings(){\n\t\t$rejected = array();\n\t\tforeach ( $this->load() as $EM_Booking ){\n\t\t\tif($EM_Booking->booking_status == 2){\n\t\t\t\t$rejected[] = $EM_Booking;\n\t\t\t}\n\t\t}\n\t\t$EM_Bookings = new EM_Bookings($rejected);\n\t\treturn $EM_Bookings;\n\t}", "public function newQuery($excludeDeleted = true)\n {\n $query = parent::newQuery($excludeDeleted = true);\n $query->where('type', 'job');\n return $query;\n }", "protected function notbilled()\n {\n $this->builder = $this->billable();\n return $this->builder->where('billed', false);\n }", "public static function withMissedDeadlines() {\n return self::query()\n ->whereDate('deadline', '<', Carbon::today()->toDateString());\n }", "protected function addRejected(Builder $builder)\n {\n $builder->macro('rejected', function (Builder $builder) {\n $model = $builder->getModel();\n\n $this->remove($builder, $model);\n\n $builder->where($model->getQualifiedStatusColumn(), '=', Status::REJECTED);\n\n return $builder;\n });\n }", "public function whereNotIn(Builder $query, array $where = [], array $allowedFields = []): Builder\n {\n foreach ($where as $column => $in) {\n if (!in_array($column, $allowedFields)) {\n throw new Exception(\"O indice '{$column}' não esta habilitado!\", 1);\n }\n $query->whereNotIn($column, explode(',', $in));\n }\n\n return $query;\n }", "public function scopeBlocked($query)\n {\n return $query->where('status', 2);\n }", "public function newQueryWithoutRelationships();", "public function newQuery(): Builder\n {\n return new static($this->connection);\n }", "public function scopeSubmitted($query)\n {\n return $query->whereNotIn('status', ['incomplete', 'canceled']);\n }", "public function resetBuilder()\n {\n $this->where = [];\n $this->whereNot = [];\n $this->inRange = [];\n $this->notInRange = [];\n $this->exist = [];\n $this->whereTerms = [];\n $this->match = [];\n $this->query = new BoolQuery();\n $this->filter = new BoolQuery();\n\n return $this;\n }", "public function scopePrunableNonWhitelisted($query)\n {\n return $query->whereNotIn(\n 'batch_id',\n static::whitelisted()->select('batch_id')->groupBy('batch_id')\n );\n }" ]
[ "0.67145145", "0.5949052", "0.5741755", "0.573434", "0.56796145", "0.5662049", "0.5637546", "0.56334823", "0.5537801", "0.54699165", "0.5466595", "0.54642975", "0.5434629", "0.53124684", "0.529033", "0.5281662", "0.5279054", "0.52736586", "0.5253193", "0.52185124", "0.521809", "0.52035993", "0.5146103", "0.51387656", "0.5109673", "0.5102106", "0.5098833", "0.50967866", "0.50832367", "0.50680524" ]
0.70962757
0
Get a new query builder that includes archived resources.
public static function withArchived() { return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withArchived(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function archived()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->archived();\n }", "public function archive()\n {\n return $this->client->requestWithResource($this, 'PUT', '/archived', [\n 'headers' => ['X-Contentful-Version' => $this->getSystemProperties()->getVersion()],\n ]);\n }", "public function andArchived()\n {\n $modelClass = $this->modelClass;\n $this->excludedHiddenStatuses[] = $modelClass::STATUS_IN_HISTORY;\n return $this;\n }", "public function newQuery($excludeDeleted = true)\n {\n $builder = new EloquentQueryBuilder($this->newBaseQueryBuilder());\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n $builder->setModel($this)->with($this->with);\n\n if ($excludeDeleted and $this->softDelete) {\n $builder->whereNull($this->getQualifiedDeletedAtColumn());\n }\n\n return $builder;\n }", "public function newQuery($excludeDeleted = true)\n {\n $builder = new PostBuilder($this->newBaseQueryBuilder());\n $builder->setModel($this)->with($this->with);\n $builder->orderBy('post_date', 'desc');\n\n if (isset($this->postType) and $this->postType) {\n $builder->type($this->postType);\n }\n\n if ($excludeDeleted and $this->softDelete) {\n $builder->whereNull($this->getQualifiedDeletedAtColumn());\n }\n\n return $builder;\n }", "public function createQuery($context = 'list')\n {\n $query = $this->getModelManager()->createQuery($this->getClass(), 'm');\n $query->where('m.isArchived = true');\n\n return $query;\n }", "public function getBuiltQb()\n {\n $qb = clone $this->qb;\n\n $this->setSelectFrom($qb);\n $this->setJoins($qb);\n $this->setWhere($qb);\n $this->setOrderBy($qb);\n $this->setLimit($qb);\n\n return $qb;\n }", "public static function archives()\n {\n return static::selectRaw('year(created_at) year, monthname(created_at) month, \n day(created_at) day, count(*) Published')\n ->groupBy('year','month','day')\n ->orderByRaw('min(created_at) desc')\n ->get()\n ->toArray();\n\n }", "public function getArchivedEvents()\n {\n $qb = $this->entityManager->getRepository(Event::class)->createQueryBuilder('e')\n ->where('e.deleted = 1')\n ->orderBy('e.eventStartDate', 'DESC');\n return $qb->getQuery();\n }", "public function scopeArchival($query)\n {\n return $query->where('is_closed', 1)\n ->where('is_pinned', 0)\n ->where('updated_at', '>', Carbon::now()->subDays(7)->format('Y-m-d H:i:s'));\n }", "public function newQuery()\n {\n $builder = $this->newAlfrescoBuilder($this->getConnection());\n $builder->setModel($this);\n return $builder;\n }", "public function setArchived($var)\n {\n GPBUtil::checkBool($var);\n $this->archived = $var;\n\n return $this;\n }", "public function query()\n {\n return new \\Rubberband\\Elastic\\Laravel\\Query\\Builder($this);\n }", "public static function withApproved()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withApproved();\n }", "public function newQuery($excludeDeleted = true)\n {\n $query = parent::newQuery($excludeDeleted = true);\n $query->where('type', 'job');\n return $query;\n }", "public function getArchive($year = null, $month = null, $data = null, $includeDeleted = false)\n {\n $oDb = Factory::service('Database');\n\n if ($year) {\n $oDb->where('YEAR(' . $this->tableAlias . '.published) = ', (int) $year);\n }\n\n // --------------------------------------------------------------------------\n\n if ($month) {\n $oDb->where('MONTH(' . $this->tableAlias . '.published) = ', (int) $month);\n }\n\n // --------------------------------------------------------------------------\n\n return $this->getAll(null, null, $data, $includeDeleted, 'GET_ARCHIVE');\n }", "protected function query(): Builder\n {\n $query = $this->make()->newQuery();\n\n // Loads the active model if set, for use in getOne(), update(), delete(), etc.\n if ($this->activeModelInstance) {\n $query->where(\n $this->activeModelInstance->getKeyName(),\n $this->activeModelInstance->getKey()\n );\n }\n\n return $query;\n }", "protected function _initArchive()\n {\n return Mage::helper('blog/archive')\n ->initArchive($this->_getYear(), $this->_getMonth(), $this);\n }", "protected function newBaseQueryBuilder()\n {\n $connection = $this->getConnection();\n\n $builder = in_array(self::class, config('autocache.models'))\n ? \\LaravelAutoCache\\Builder::class\n : \\Illuminate\\Database\\Query\\Builder::class;\n\n return new $builder($connection, $connection->getQueryGrammar(), $connection->getPostProcessor());\n }", "public function newQuery($excludeDeleted = true)\n {\n $query = parent::newQuery($excludeDeleted);\n $query->where('taxonomy', '=', 'post_tag');\n\n return $query;\n }", "public function getAll(Filter $filter): Builder;", "public static function archives()\n {\n return static::selectRaw(\"to_char(created_at, 'Month') as month, extract(year from created_at) as year, extract(month from created_at) as sort, count(*) as published\")\n ->groupBy('year', 'month', 'sort')\n ->orderBy('year', 'desc')\n ->orderBy('sort', 'desc')\n ->get()\n ->toArray();\n }", "public static function query()\n {\n QueryBuilder::$dataSource = true;\n\n return new QueryBuilder();\n }", "public function getQueryAR()\n {\n // require_once('dbActiveRecord.php');\n // return DbActiveRecord::getSingleton();\n return $this;\n }", "protected function toQuery() {\n\t\t$query = $this->mapper()->all($this->entityName(), $this->conditions())->order($this->relationOrder());\n\t\t$query->snapshot();\n\t\treturn $query;\n\t}", "public function getAll($excludeUnpublished = false)\n {\n $this->qb = $this->getInstance();\n\n //If $excludeUnpublished === true, we exclude the non published results\n if ($excludeUnpublished) {\n $this->qb\n ->andWhere($this->mainAlias.'.status = :status')\n ->orWhere($this->mainAlias.'.status = :scheduled_status AND '.$this->mainAlias.'.publishedAt > :publicationDate')\n ->setParameter('status', PageStatus::PUBLISHED)\n ->setParameter('scheduled_status', PageStatus::SCHEDULED)\n ->setParameter('publicationDate', new \\DateTime());\n }\n\n return $this;\n }", "public function query()\n {\n $query = EaBookingEntry::leftJoin('mst_customers AS c1', 'ea_booking_entries.shipper_id', '=', 'c1.id')\n ->leftJoin('mst_customers AS c2', 'ea_booking_entries.consignee_id', '=', 'c2.id')\n ->leftJoin('mst_customers AS c3', 'ea_booking_entries.agent_id', '=', 'c3.id')\n ->leftJoin('mst_airports AS c4', 'ea_booking_entries.origin_id', '=', 'c4.id')\n ->leftJoin('mst_airports AS c5', 'ea_booking_entries.destination_id', '=', 'c5.id')\n ->leftJoin('ea_shipment_entries AS file', 'ea_booking_entries.shipment_id', '=', 'file.id')\n ->orderBy('ea_booking_entries.date', 'desc')\n ->orderBy('ea_booking_entries.code', 'desc')\n ->select(['ea_booking_entries.id','ea_booking_entries.code','ea_booking_entries.shipment_type','ea_booking_entries.date', 'ea_booking_entries.status', 'c1.name AS shipper_name', 'c2.name AS consignee_name', 'c3.name AS agent_name', 'c4.name AS origin_name', 'c5.name AS destination_name', 'file.code as shipment_code']);\n return $this->applyScopes($query);\n }", "public function createQuery()\n {\n $query = $this->persistenceManager->createQueryForType($this->objectType);\n if ($this->defaultOrderings !== []) {\n $query->setOrderings($this->defaultOrderings);\n }\n if ($this->defaultQuerySettings !== null) {\n $query->setQuerySettings(clone $this->defaultQuerySettings);\n }\n return $query;\n }", "public function query()\n {\n $query = AcademicYear::query();\n\n if ($this->isOrderedWithDefaultOrder()) {\n $query->orderByDesc('from');\n }\n\n $query->where('site_id', site()->id);\n\n return $query;\n }", "protected function getTableQuery(): Builder\n {\n return parent::getTableQuery()->withoutDrafts();\n }" ]
[ "0.7654924", "0.6238673", "0.61713624", "0.5965821", "0.5795015", "0.570144", "0.56571436", "0.56121606", "0.55951583", "0.55738527", "0.54851085", "0.5428319", "0.5397015", "0.53839076", "0.5376579", "0.53606427", "0.53576267", "0.5315637", "0.53049594", "0.52988166", "0.5294837", "0.5291232", "0.5285478", "0.52739453", "0.52585256", "0.52527004", "0.5241744", "0.52180004", "0.5215793", "0.5205186" ]
0.7680675
0
Use an Electronic Data Interchange library to send this invoice
public function send(Invoice $invoice): void { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendInvoice() {\n\n $account_invoice_ids = $this->_client->search(\"account.invoice\",\n [\n [\"state\", \"=\", \"open\"],\n [\"type\", \"=\", \"out_invoice\"],\n [\"journal_id\", \"=\", 15],\n [\"sent\", \"=\", False]\n ]);\n\n foreach ($account_invoice_ids as $account_invoice_id) {\n\n $result = $this->_client->execute(\"email.template\", \"send_mail\",\n [\n 4, // Template invio\n $account_invoice_id,\n True\n ]);\n\n if (isset($result[\"faultCode\"])) {\n Util::printError(\"AccountInvoice.sendInvoice\", $result[\"faultString\"]);\n }\n\n $data = [\n \"sent\" => true\n ];\n\n $result = $this->_client->write(\"account.invoice\", $account_invoice_id, $data);\n\n if (isset($result[\"faultCode\"])) {\n Util::printError(\"AccountInvoice.sendInvoice\", $result[\"faultString\"]);\n }\n\n }\n\n }", "private function _generateInvoice()\n {\n $order = $this->_getOrder();\n if ($order->canInvoice()) {\n $invoice = $order->prepareInvoice();\n\n $invoice->register();\n Mage::getModel('core/resource_transaction')\n ->addObject($invoice)\n ->addObject($invoice->getOrder())\n ->save();\n \n $invoice->pay()->save();\n\n $order->save();\n\n $invoice->sendEmail(\n (boolean) Mage::getStoreConfig(\n 'payment/paymentnetwork_pnsofortueberweisung/send_mail', \n Mage::app()->getStore()->getStoreId()\n ), ''\n );\n }\n }", "public function sendInvoice(Mage_Sales_Model_Order $order)\n {\n if($this->_logging){\n Mage::log('in sendInvoice', null, $this->_logfile);\n }\n $payment = $order->getPayment();\n $paymentInstance = $payment->getMethodInstance();\n $order->setActionFlag(Mage_Sales_Model_Order::ACTION_FLAG_INVOICE, true);\n // check if it is possible to invoice!\n if ($order->canInvoice()){\n if($this->_logging){\n Mage::log('sendInvoice sending invoice for '.$paymentInstance->getCode(), null, $this->_logfile);\n }\n try {\n // Initialize new magento invoice\n $invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();\n // Set magento transaction id which returned from capayable\n $invoice->setTransactionId($payment->getLastTransId());\n // Allow payment capture and register new magento transaction\n $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_OFFLINE);\n\n // TODO: get following to work\n //$invoice->addComment('U betaald via Achteraf betalen.', true, true);\n //$invoice->getOrder()->setCustomerNoteNotify(true);\n\n // Register invoice and apply it to order, order items etc.\n $invoice->register();\n\n $transaction = Mage::getModel('core/resource_transaction')\n ->addObject($invoice)\n ->addObject($invoice->getOrder());\n\n // Commit changes or rollback if error has occurred\n $transaction->save();\n\n /**\n * Register invoice with Capayable\n */\n $isApiInvoiceAccepted = $paymentInstance->processApiInvoice($invoice);\n if($this->_logging) {\n Mage::log('sendInvoice isApiInvoiceAccepted:', null, $this->_logfile);\n Mage::log($isApiInvoiceAccepted, null, $this->_logfile);\n }\n //if ($isApiInvoiceAccepted) {\n $invoice->getOrder()->setIsInProcess(true);\n $invoice->getOrder()->addStatusHistoryComment(\n 'Invoice created and email send', true\n );\n $invoice->sendEmail(true, '');\n $order->save();\n// } else {\n// $this->_getSession()->addError(Mage::helper('capayable')->__('Failed to send the invoice.'));\n// }\n } catch (Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n Mage::logException($e);\n }\n } else {\n Mage::log('sendInvoice: could not send invoice, invoice already sent.', null, $this->_logfile);\n }\n }", "function __sendInvoice($invoice) {\n\n $this->Email->attachments = array($invoice['Invoice']['invoiceId'] . '.pdf');\n\n $this->Email->to = $invoice['Client']['email'];\n\n $this->Email->subject = 'Invoice ' . $invoice['Invoice']['invoiceId'] . ' from ' . $invoice['User']['firstName'] . ' ' . $invoice['User']['lastName'];\n\n $this->Email->replyTo = $invoice['User']['email'];\n\n $this->Email->from = $invoice['User']['firstName'] . ' ' . $invoice['User']['lastName'] . ' <' . $invoice['Client']['email'] . '>';\n\n $this->Email->template = 'default';\n\n $this->Email->sendAs = 'text'; // because we like to send pretty mail\n //Set view variables as normal\n\n $this->set('invoice', $invoice);\n\n //Do not pass any args to send()\n\n $this->Email->send();\n\n $this->flashSuccess('Factura trimisa!', 'dashboard');\n }", "public function sendInvoice(string|int $chat_id, int $amount, string $description, string $currency = \"IRR\");", "public function createInvoice()\r\n {\r\n }", "public function brokerSetupInvoice()\r\n {\r\n $em = $this->entityManager;\r\n $invoiceEntity = $this->invoiceEntity;\r\n $invoiceEntity->setUserId($this->userId);\r\n $invoiceEntity->setGeneratedOn(new \\DateTime());\r\n $invoiceEntity->setAmount($this->amount);\r\n $invoiceEntity->setStatus($em->find('Transactions\\Entity\\InvoiceStatus', UNPAID)); // Paid and Unpaid // set it as unpaid\r\n $invoiceEntity->setInvoiceCategory($em->find('Transactions\\Entity\\InvoiceCategory', 2)); // This is Broker SetUp Invoice\r\n $invoiceEntity->setCurrency($em->find('Settings\\Entity\\Currency', 1)); // tis is set to Naira\r\n try {} catch (\\Exception $e) {\r\n echo 'Invoice generation error';\r\n }\r\n }", "public function createInvoice($quote)\n {\n $this->clearSessionData();\n if (get_class($quote) == \"Mage_Sales_Model_Quote\") {\n $array_key = \"quoteId\";\n $currency_code_key = \"quote_currency_code\";\n } else {\n $array_key = \"orderId\";\n $currency_code_key = \"order_currency_code\";\n }\n $base_price = $quote->getData(\"grand_total\");\n $base_ccy = $quote->getData($currency_code_key);\n $quote_id = $quote->getData(\"entity_id\");\n\n /// create the ipn url based on the site configuration\n if(Mage::helper(\"bitcoin\")->doesTheStoreHasSSL()){\n $ipnUrl = Mage::getUrl(\"bitcoin/index/ipn\", array(\"_secure\" => true, \"id\" => base64_encode($quote_id)));\n }else{\n $ipnUrl = Mage::getUrl(\"bitcoin/index/ipn\", array(\"_secure\" => false, \"id\" => base64_encode($quote_id)));\n }\n $this->log( \"GENERATED IPN URL : \" . $ipnUrl);\n $http_client = $this->getHTTPClient();\n $yellow_payment_data = array(\n \"base_price\" => $base_price, /// Set to 0.30 for testing\n \"base_ccy\" => $base_ccy, /// Set to \"USD\" for testing\n \"callback\" => $ipnUrl\n );\n $post_body = json_encode($yellow_payment_data);\n $nonce = round(microtime(true) * 1000);\n $url = $this->server_root . $this->api_uri_create_invoice;\n $message = $nonce . $url . $post_body;\n $private_key = Mage::helper('core')->decrypt($this->getConfiguration(\"private_key\"));\n $hash = hash_hmac(\"sha256\", $message, $private_key, false);\n\n $http_client->setHeaders($this->getHeaders($nonce, $hash));\n $http_client->setMethod(\"POST\")\n ->setUri($url);\n $http_client->setRawData($post_body);\n try {\n $response = $http_client->request();\n if ($response->getStatus() == \"200\") {\n $body = $response->getBody();\n $data = json_decode($body, true);\n $this->log(\"Response: \" . $response, $data[\"id\"]);\n /* save the invoice in the database */\n $invoice_data = array(\n $array_key => $quote_id,\n \"invoice_id\" => $data[\"id\"],\n \"url\" => $data[\"url\"],\n \"status\" => $data[\"status\"],\n \"address\" => $data[\"address\"],\n \"invoice_price\" => $data[\"invoice_price\"],\n \"invoice_ccy\" => $data[\"invoice_ccy\"],\n \"server_time\" => $data[\"server_time\"],\n \"expiration_time\" => $data[\"expiration\"],\n \"raw_body\" => $yellow_payment_data,\n \"base_price\" => $yellow_payment_data[\"base_price\"],\n \"base_ccy\" => $yellow_payment_data[\"base_ccy\"],\n \"hash\" => $hash\n );\n /// replace https with http on the invoice url in case the store doesn't have ssl certificate\n $helper = Mage::helper(\"bitcoin\");\n if(!$helper->doesTheStoreHasSSL())\n {\n $invoice_data[\"url\"] = $helper->replaceHttps($data[\"url\"]);\n $data[\"url\"] = $helper->replaceHttps($data[\"url\"]);\n }\n\n Mage::getModel(\"bitcoin/ipn\")->saveInvoice($invoice_data);\n /* end saving invoice */\n Mage::getSingleton('core/session')->setData('invoice', $data);\n Mage::getSingleton('core/session')->setData('has_invoice', true);\n return $data;\n } else {\n Mage::throwException($response->getBody());\n $this->log(\"Error code response received: {$response->getStatus()}\", $array_key . \":\" . $quote_id);\n $this->log(\"Response body:\" . json_encode($response->getBody()), $array_key . \":\" . $quote_id);\n return false;\n }\n } catch (Exception $exc) {\n $this->log($exc->getMessage(), $array_key . \":\" . $quote_id);\n $this->log(\"EXCEPTION: \" . json_encode($exc), $array_key . \":\" . $quote_id);\n Mage::throwException(\n Mage::helper('bitcoin')->__(\n \"{$exc->getMessage()}\\n We're sorry, an error has occurred while completing your request. Please refresh the page to try again. If the error persists, please send us an email at [email protected]\"\n )\n );\n }\n }", "public function invoiceAction() {\n $this->chekcingForMarketplaceSellerOrNot ();\n /**\n * Get order Id\n * @var unknown\n */\n $orderId = $this->getRequest ()->getParam ( 'id' );\n /**\n * Getting order product ids\n */\n $orderPrdouctIds = Mage::helper ( 'marketplace/vieworder' )->getOrderProductIds ( Mage::getSingleton ( 'customer/session' )->getId (), $orderId );\n /**\n * Getting cancel order items\n */\n $cancelOrderItemProductIds = Mage::helper ( 'marketplace/vieworder' )->cancelOrderItemProductIds ( Mage::getSingleton ( 'customer/session' )->getId (), $orderId );\n\n /**\n * Getting the sonfiguration for order manage.\n */\n $orderStatusFlag = Mage::getStoreConfig ( 'marketplace/admin_approval_seller_registration/order_manage' );\n /**\n * Check whether product id count is greater than one\n */\n if (count ( $orderPrdouctIds ) >= 1 && $orderStatusFlag == 1) {\n $order = Mage::getModel ( 'sales/order' )->load ( $orderId );\n $itemsarray = $itemsArr = array ();\n /**\n * prepare invoice items\n */\n foreach ( $order->getAllItems () as $item ) {\n $qty = 0;\n /**\n * Prepare invoice qtys\n */\n $itemProductId = $item->getProductId ();\n $itemId = $item->getItemId ();\n /**\n * check whether item is in array\n */\n if (in_array ( $itemProductId, $orderPrdouctIds ) && ! in_array ( $itemProductId, $cancelOrderItemProductIds )) {\n $itemsArr [] = $itemId;\n /**\n * Qty ordered for that item\n */\n $qty = $item->getQtyOrdered () - $item->getQtyInvoiced ();\n }\n $itemsarray [$itemId] = $qty;\n }\n\n try {\n /**\n * Create invoice\n */\n if ($order->canInvoice ()) {\n /**\n * Generate invoice for shippment.\n */\n Mage::getModel ( 'sales/order_invoice_api' )->create ( $order->getIncrementId (), $itemsarray, '', 1, 1 );\n\t\t Mage::getModel ( 'marketplace/order' )->updateSellerOrderItemsBasedOnSellerItems ( $itemsArr, $orderId, 1 );\n\t\t $order->setStatus('processing');\n\t\t $order->save();\n /**\n * add success message\n */\n Mage::getSingleton ( 'core/session' )->addSuccess ( $this->__ ( 'The invoice has been created.' ) );\n }\n $this->_redirect ( 'marketplace/order/vieworder/orderid/' . $orderId );\n } catch ( Exception $e ) {\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( $e->getMessage () ) );\n $this->_redirect ( 'marketplace/order/vieworder/orderid/' . $orderId );\n }\n } else {\n /**\n * Checkk the permission for generate invoice.\n */\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( 'You do not have permission to access this page' ) );\n $this->_redirect ( 'marketplace/order/manage' );\n return false;\n }\n }", "public function createInvoice()\n {\n //seccion para registrar certificaos relacionados con un RFC \n /* $params = [ \n 'Rfc' => 'AAA010101AAA',\n 'Certificate' => 'MIIF+TCCA+GgAwIBAgIUMzAwMDEwMDAwMDAzMDAwMjM3MDEwDQYJKoZIhvcNAQELBQAwggFmMSAwHgYDVQQDDBdBLkMuIDIgZGUgcHJ1ZWJhcyg0MDk2KTEvMC0GA1UECgwmU2VydmljaW8gZGUgQWRtaW5pc3RyYWNpw7NuIFRyaWJ1dGFyaWExODA2BgNVBAsML0FkbWluaXN0cmFjacOzbiBkZSBTZWd1cmlkYWQgZGUgbGEgSW5mb3JtYWNpw7NuMSkwJwYJKoZIhvcNAQkBFhphc2lzbmV0QHBydWViYXMuc2F0LmdvYi5teDEmMCQGA1UECQwdQXYuIEhpZGFsZ28gNzcsIENvbC4gR3VlcnJlcm8xDjAMBgNVBBEMBTA2MzAwMQswCQYDVQQGEwJNWDEZMBcGA1UECAwQRGlzdHJpdG8gRmVkZXJhbDESMBAGA1UEBwwJQ295b2Fjw6FuMRUwEwYDVQQtEwxTQVQ5NzA3MDFOTjMxITAfBgkqhkiG9w0BCQIMElJlc3BvbnNhYmxlOiBBQ0RNQTAeFw0xNzA1MTgwMzU0NTFaFw0yMTA1MTgwMzU0NTFaMIHlMSkwJwYDVQQDEyBBQ0NFTSBTRVJWSUNJT1MgRU1QUkVTQVJJQUxFUyBTQzEpMCcGA1UEKRMgQUNDRU0gU0VSVklDSU9TIEVNUFJFU0FSSUFMRVMgU0MxKTAnBgNVBAoTIEFDQ0VNIFNFUlZJQ0lPUyBFTVBSRVNBUklBTEVTIFNDMSUwIwYDVQQtExxBQUEwMTAxMDFBQUEgLyBIRUdUNzYxMDAzNFMyMR4wHAYDVQQFExUgLyBIRUdUNzYxMDAzTURGUk5OMDkxGzAZBgNVBAsUEkNTRDEwX0FBQTAxMDEwMUFBQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAIiV+76Q7p9i5Bj4G1YuYuPtf/cO/dyNX19o6y57CiKcgGYEqPqb88cJ/IPPyFPIFtBdxYJmqikxMwxDHTIsolI0GMvqEO1BsokcDOL4UfMZt7NmYaH1P8Nj/fO5xn0b1qSnSfQHGdPLMgXsLPhaR69HREsVEIowEMM5ucoNArSNzel4XJU8X/dnoumZvaOyCdvEC076NzB3UJA53ZD1xvvPEedUfAfj2eaUCQJYPnToyf7TAOGzzGkX5EGcjxC3YfcXGwG2eNdbSbxSiADPx6QACgslCu1vzmCzwQAmfeHWQvirpZccJyD/8shd7z7fv5A/G0g3aDloM5AXwA3nDVsCAwEAAaMdMBswDAYDVR0TAQH/BAIwADALBgNVHQ8EBAMCBsAwDQYJKoZIhvcNAQELBQADggIBAJepSmoMRmasH1IyLe68oM6+Qpm/kXjwQw8ALMkhHTI3XmxjUVqpJ6k9zZQfwyTLc2UZIo8jdO4WH3bcRBDcYOkciW3KxhKAbLgJPHAieVOyObXViET0ktLL6xeDHnf5Au4LOi0m01E8IPFbxYKb+RU1xpOKqJuRHH5dfRBg4HV8y+OTa5lVZil+sAhwdyXFsPf9FqN1SNn9EuKjYc9+lkRiGcHPNb1ZAtDsaQdGzoAbR+Z6m9FdZB/XU+Huls+ePdkw1t2/37AJZkYqr3wVNKrrpQkax9DrnFT8E+7xKXLcbpw3YOYBoENj2+NuMn29sn3U97wKlpyn/GeMwbkCmOGBAMtK9O6+wRrcEmu9Js68asHd5JQSzA39BRAUjb/9aefmWTb6DNm22IUUSSOT9MK5yWGncdWxKrNtMvx7OyYlYV2/qG4p/rMlj6nZcIpwONhyLUwxr74kO0Jo3zus81t9S/J91jumiwyNVqJZ77vmAy6lQnr8Og9/YaIzDH5L/byJQJquDKEmLvuya4sQ2iJj+p282RNpBscO/iyma8T+bZjG2CFYUTwGtOEZ2aLqApJ4cCBW7Ip569B+g7mgG8fdij6E1OlJ8Y3+ovBMak8LtnFVxsfthdWOK+AU2hWGU88rfZkLJ0RJn8oAq/6ri0iJNCKym/mc9g0JpNw+asMM',\n 'PrivateKey' => 'MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIAgEAAoIBAQACAggAMBQGCCqGSIb3DQMHBAgwggS9AgEAMASCBMh4EHl7aNSCaMDA1VlRoXCZ5UUmqErAbucRBAKNQXH8tz2zJ7hdZaOZx7PEfMiWh5Nh6e8G8kxY+GW4YCSbLxslkhBtfTR6v5JYv3vhgH7XzMCwJPOfX6gxeeCYZ4HTdDNAyBVCjTbJpqbo778ri33o+I4yx7zgMqA3mzVE61re6MPrGXh1YT/K9zZeEdmwvXQfPs9VnioKUhiswoMcJ3kc3FxGLrEAsjQqv/ZVOHPY3NrbcfpQUyprsCKv3rRdxkIRdMPY4eiA720mffzvDqyzeQ8xfwHTE8Xjunja4KXvW/mV7ItTH0vRXHc3HJQ0dNnyawXmbC1FiYbCVdswoYuVQmslvq3QEXUGwP3KYfxQzKatnU7nprkmsipPqPBqDrzqc6NSN/8rxIc5zTAL4bFul+CEKz9VybwdavgewEy7u3fPnKPN+y4HilNgmlbtS7seWpbIgVPA+woG2Ph5hsgREXZCjGKSRuI77/FLcI5CMrZR+FvbnaqG+gXDBTz2lWhK9pmWlVawT2pvfiHOLzYRf2YyuVbJ79D2EgbUKyp3kCQ6fddMzspPhD/pvLQizExeyIxImb/kQXs2mmtDnyFIsj4Hcn5wCcs+SDIj+FJnwRiKB6YfdzjIig/ZMfpgMpl0u69LX649uL318o+Hy3d5t3wxgSkTaJ5McKhWyh9x9vlHZhYyM6HArBNfP9cGF86M3GwAMHAiJQl9UevyKe6rlvAIDlop6l3M02m5hHUXUpPjz4j7inFXZzvSv0tFoSbEqGgno0Pa+0gWHqRwBEGLGEwHVfyEy+Of8g4+0jzo0jNPIcurA5xRh9HSRSAd3kdEhx75eeVL7lBdLjRUkbtRtg7nelSjqAX7tQZK6Awp5C/17W96+f/vtjB+Y+ZgrSUjnQDADnZCnapIrzHgE3ZanhGAtnMMl+o4aLd1+74inG4jht/GJB60raSQfYrDrM3kBs0oyfpbEk5TI8ISzRlRmejv+mqpTogJaAqhnLP7rAli3d4pRhUjbACn/xQSFKxl2OURdmnMlvlbb6pleXviJHRxzPPQ25NVdWvmCYWrDfAZYn8X1sABOdyrth38BfmAVsyyPATYFB+5cXuNIZkPz1swz3859iZWTn5JRfPEAGICu5G6w6nrgOLYM9UqOPmxofzEdiEPafLQ5orMxdSWF6+3mD2Yw/VP+B43B/oYehgfrYjBUJt2D04VU/v8XK1ZUVgX/Co0odcdcszAP+ljQ7UVhW+uxVMd2sEprwepPPjYT3HvdI6RBB94yYBWfkoCSo/jsrrRpw2DVEyvoDp/hOXKyt8Y/8UGLCxJUhhv5fEiezYnlUAmwAGjgZfzfAErx0gkQFBgNKglEA7jz0Dqc2Z92pGVGTyPtXqRsqX3IYX5WsZVUoJim0wI7+LNmKpu147ePC0G4Sf4AGoZyPWVXq2SZSPpN261pIKSoLEDeA8WIKj2U5JG2DMMYokV0bZ1TsabrwHvwsp3muLnaP8L+n2fBplbhAEE2buBXvsATixMGu57ZI5WKFLnHn4KIBrZzALCtGehfFbCsdf1nBR6aAt+BpWhhZki54fZTurgMr6zuC5hAaP4rExW+LCc3upHMW7R9DcHWaZuZIfwnVDImnAQ9UOsz+A=',\n 'PrivateKeyPassword' => '12345678a'\n ];\n $lstNameIds = $this->facturama->post('api-lite/csds', $params ); */\n\n\n $params = [\n \"Issuer\" => [\n \"FiscalRegime\" => \"601\",\n \"Rfc\" => \"AAA010101AAA\",\n \"Name\" => \"EXPRESION EN SOFTWARE\"\n ],\n \"Receiver\" => [\n \"Name\" => \"Entidad receptora\",\n \"CfdiUse\" => \"P01\",\n \"Rfc\" => \"AAA010101AAA\"\n ],\n //agregado NO \n 'Folio' => '102',\n \"CfdiType\" => \"I\",\n \"NameId\" => \"1\",\n \"ExpeditionPlace\" => \"12345\",\n \"PaymentForm\" => \"03\",\n \"PaymentMethod\" => \"PUE\",\n \"Currency\" => \"MXN\",\n \"Date\" => \"2021-01-19T09:51:39\",\n \"Items\" => [\n [\n \"Quantity\" => \"100\",\n \"ProductCode\" => \"84111506\",\n \"UnitCode\" => \"E48\",\n \"Unit\" => \"Unidad de servicio\",\n \"Description\" => \" API folios adicionales\",\n \"IdentificationNumber\" => \"23\",\n \"UnitPrice\" => \"0.50\",\n \"Subtotal\" => \"50.00\",\n \"Discount\" => \"10\",\n \"DiscountVal\" => \"10\",\n \"Taxes\" => [\n [\n \"Name\" => \"IVA\",\n \"Rate\" => \"0.16\",\n \"Total\" => \"6.4\",\n \"Base\" => \"40\",\n \"IsRetention\" => \"false\"\n ]\n ],\n \"Total\" => \"46.40\"\n ],\n [\n \"Quantity\" => \"1\",\n \"ProductCode\" => \"84111506\",\n \"UnitCode\" => \"E48\",\n \"Unit\" => \"Unidad de servicio\",\n \"Description\" => \" API Implementación \",\n \"IdentificationNumber\" => \"21\",\n \"UnitPrice\" => \"6000.00\",\n \"Subtotal\" => \"6000.00\",\n \"Taxes\" => [\n [\n \"Name\" => \"IVA\",\n \"Rate\" => \"0.16\",\n \"Total\" => \"960\",\n \"Base\" => \"6000\",\n \"IsRetention\" => \"false\"\n ]\n ],\n \"Total\" => \"6960.00\"\n ]\n ]\n ];\n\n // $result = $this->facturama->post('2/cfdis', $params);\n // api-lite\n $result = $this->facturama->post('api-lite/2/cfdis', $params);\n return $result;\n }", "public function sendInvoice( $invoice_id )\n\t{\n\t\t$invoiceModel = new Invoices;\n\t\t$customerModel = new Customers;\n\t\t$invoice = $invoiceModel->find(\"pk_invoice_id = \".$invoice_id);\n\t\t$customer = $customerModel->find('pk_customer_id = '.$invoice->fk_customer_id);\n\t\t\n \t\t$body = \"<p> Thank You for your payment made for purchase of \".$invoice->invoice_description.\". \n\t\t \t\t\t Please find attached fully paid invoice No.<b>\".$invoice_id .\"</b>. </p> \n\t\t \t\t\t <p> You have paid <b> &pound;\". $invoice->invoice_total.\"</b> through Direct Debit on \".date(\"d/m/Y H:i:s\").\".</p>\";\t\t\t \n \t\t # Email Template\n\t\t// $template = $template = $this->renderPartial(\"mail_register\", null, true);\n\t\t $template = file_get_contents(Yii::app()->getBaseUrl(true).\"/email_template/email_template.html\");\n\t\t $template = str_replace(\"#from_name#\", $customer->firstname.' '. $customer->lastname, $template); \n\t\t $template = str_replace(\"#message#\", $body, $template);\n\t\t \n\t\t \n\t\t # ======================================================================= \n\t\t # Send PDF file in attachment \n\t\t # =======================================================================\n\t\t $email_message = $template;\n\t\t $file = \"downloads/invoice_\".$invoice_id.\".pdf\";\n\t\t $invoicef = file_get_contents(Yii::app()->getBaseUrl(true).'/index.php/invoice/viewpdf/id/'.$invoice_id);\n \t\t $ftp = fopen($file, \"w\");\n\t\t fwrite($ftp, $invoicef);\n\t\t fclose($ftp); \n\t\t \n\t\t$from_name='Centrica IT';\n \t$from_mail='[email protected]';\n \t$replyto='[email protected]';\n \t$filename= basename($file);\n \n \t$file_size = filesize($file);\n \t$handle = fopen($file, \"r\");\n \t$content = fread($handle, $file_size);\n \tfclose($handle);\n \t$content = chunk_split(base64_encode($content));\n \t$uid = md5(uniqid(time()));\n\t\t$name = basename($file);\n\t\t$header = \"From: \".$from_name.\" <\".$from_mail.\">\\r\\n\";\n\t\t$header .= \"Reply-To: \".$replyto.\"\\r\\n\";\n\t\t$header .= \"MIME-Version: 1.0\\r\\n\";\n\t\t$header .= \"Content-Type: multipart/mixed; boundary=\\\"\".$uid.\"\\\"\\r\\n\\r\\n\";\n\t\t$header .= \"This is a multi-part message in MIME format.\\r\\n\";\n\t\t$header .= \"--\".$uid.\"\\r\\n\";\n\t\t$header .= \"Content-type:text/html; charset=iso-8859-1\\r\\n\";\n\t\t$header .= \"Content-Transfer-Encoding: 7bit\\r\\n\\r\\n\";\n\t\t$header .= $email_message.\"\\r\\n\\r\\n\";\n\t\t$header .= \"--\".$uid.\"\\r\\n\";\n\t\t$header .= \"Content-Type: application/octet-stream; name=\\\"\".$filename.\"\\\"\\r\\n\"; // use different content types here\n\t\t$header .= \"Content-Transfer-Encoding: base64\\r\\n\";\n\t\t$header .= \"Content-Disposition: attachment; filename=\\\"\".$filename.\"\\\"\\r\\n\\r\\n\";\n\t\t$header .= $content.\"\\r\\n\\r\\n\";\n\t\t$header .= \"--\".$uid.\"--\";\n\t\t \n\t\t \n\t\t //$name='=?UTF-8?B?'.base64_encode(\"Centrica-IT\").'?=';\n\t\t $subject='=?UTF-8?B?'.base64_encode('Your payment with Centrica IT Successfully Completed').'?=';\n\t\t #. 1. Email to current user\n\t\t @mail($customer->email, $subject, $email_message, $header, \"-f [email protected]\");\n\t\t \n\t\t #. 2. Email to Admin user\n\t\t if($customer->parent_id > 0) \n\t\t {\n\t\t \t$customer2 = $customerModel->find('pk_customer_id = '.$customer->parent_id);\n\t\t\t$template = file_get_contents(Yii::app()->getBaseUrl(true).\"/email_template/email_template.html\"); \n\t\t \t$template = str_replace(\"#from_name#\",$customer2->firstname.' '. $customer2->lastname, $template); \n\t\t\t$body = \"<p> Thank You for payment made for purchase of \".$invoice->invoice_description.\" by \".\n\t\t\t$customer->firstname .' '.$customer->lastname.'. \n\t\t \t\t\t Please find attached fully paid invoice No.<b>'.$invoice_id .'</b>. </p> \n\t\t \t\t\t <p> You have paid <b> &pound;'. $invoice->invoice_total.\"</b> through Direct Debit on \".date(\"d/m/Y H:i:s\").\".</p>\";\n\t\t\t\t\t \n\t\t \t$template = str_replace(\"#message#\", $body, $template);\n \t @mail($customer2->email, $subject, $email_message, $header, \"-f [email protected]\");\n \t\t }\n\t\t \n\t\t # 3. Email to Support \n\t\t $template = file_get_contents(Yii::app()->getBaseUrl(true).\"/email_template/email_template.html\"); \n\t\t $template = str_replace(\"#from_name#\",\"Support\", $template); \n\t\t # 3. send to support personal\n\t\t $body = \"<p> A new payment has been made for purchase of \".$invoice->invoice_description.\". \n\t\t \t\t\t Please find attached fully paid invoice No.<b>\".$invoice_id .\"</b>. </p> \n\t\t \t\t\t <p> \".$customer->firstname .' '.$customer->lastname.\" has paid <b> &pound;\". $invoice->invoice_total.\"</b> through Credit Card on \".date(\"d/m/Y H:i:s\").\". Other details are as follows:</p>\";\n\t\t $body .= '<p> Username: '.$customer->username.'</p>\n\t\t\t\t\t\t<p> Email: '.$customer->email.'</p>\n\t\t\t\t\t\t<p> Telephone: '.$customer->phone.'</p>';\t\n\t\t\t\t\t\t \n\t\t $template = str_replace(\"#message#\", $body, $template);\n\t\t @mail('[email protected]', \"A new successful payment made\", $email_message, $header, \"-f [email protected]\");\n\t\t\n\t}", "public function testSend() { \n $onFact = new onFact\\Api(ONFACT_TEST_KEY);\n \n $contact = array(\n 'Contact' => array(\n 'type' => 'customer',\n 'name' => 'Kevin Van Gyseghem',\n 'street' => 'Stationsstraat',\n 'streetnumber' => '102',\n 'city' => 'Asse',\n 'citycode' => '1730',\n 'email' => '[email protected]',\n 'phone' => '01/12348613'\n )\n );\n $invoice = array(\n 'Invoice' => array(\n 'date' => date('Y-m-d'),\n 'term' => '21', // Invoice should be payed within 21 days afther the invoice date \n 'customer_name' => $contact['Contact']['name'],\n 'customer_street' => $contact['Contact']['street'],\n 'customer_streetnumber' => $contact['Contact']['streetnumber'],\n 'customer_city' => $contact['Contact']['city'],\n 'customer_citycode' => $contact['Contact']['citycode'],\n 'vattype' => 'excl', // all prices in the lines will be VAT exclusive,\n 'discount' => 5,\n 'discount_type' => 'procent', // A total discount of 5% on the invoice\n ),\n 'Invoiceitem' => array(\n array(\n 'order' => 0,\n 'items' => 10,\n 'price' => 5.99,\n 'vat' => '21',\n 'name' => 'Service contract',\n 'text' => 'From ' . date('d-m-Y') . ' to ' . date('d-m-Y',mktime(0,0,0,date('n'), date('j'), date('Y') + 1)),\n 'discount' => 0,\n 'discount_type' => 'euro', \n ),\n array(\n 'order' => 1,\n 'items' => 5,\n 'price' => 49.99,\n 'vat' => '6',\n 'name' => 'Equipment', \n 'discount' => 0,\n 'discount_type' => 'euro', \n ) \n )\n );\n $invoiceId = $onFact->Invoices->add($invoice); \n \n // Send the document\n $email = array(\n 'Email' => array( \n 'to' => '[email protected]',\n 'subject' => 'Test invoice',\n 'text' => 'testmail '.rand(1000,9999),\n 'model' => 'Invoice',\n 'model_id' => $invoiceId,\n 'document_as_attachment' => true,\n ) \n ); \n $id = $onFact->Emails->add($email); \n $this->assertTrue(is_numeric($id));\n \n unset($email['Email']['document_as_attachment']); // is not saved\n $emailApi = $onFact->Emails->view($id); \n $this->assertArrayContainsArray($email, $emailApi);\n \n $documentApi = $onFact->Invoices->view($invoiceId); \n $this->assertEquals($documentApi['Invoice']['status'],'sent');\n \n $onFact->Invoices->view($invoiceId);\n }", "public function invoice(Request $request)\n {\n header('Access-Control-Allow-Origin: *'); \n $data = $request->all();\n \n $order = Order::find($request->input('id'));\n $order->price = str_replace(',', '.', $data['price']);\n $order->status='invoiced';\n $order->save();\n \n $user = Account::find($order->id_user);\n\n Mail::send('email.invoiceOrder', ['user' => $user, 'order'=>$order], function ($m) use ($user, $order) {\n $m->from('[email protected]', 'Soluciones Integrales');\n $m->to($user->email, $user->name)->subject('Soluciones Integrales orden # '.$order->id.' recibida');\n }); \n }", "public function whmcs_create_invoice($params = array()) {\n\t\t$params['action'] = 'CreateInvoice';\n\t\t// return Whmcs_base::send_request($params);\n $load = new Whmcs_base();\n return $load->send_request($params);\n\t}", "public function emailInvoicePdf()\n {\n $view = \\Zend_Layout::getMvcInstance()->getView();\n $view->addScriptPath(__DIR__ . \"/../../application/modules/account/views/scripts\");\n\n // generate the pdf\n // @todo ALERT! This code is not gonna work in MRAPI! only in the context of Members!\n $container = \\Zend_Registry::get('container');\n $pdfGenerator = $container->make('Fisdap\\Service\\DataExport\\PdfGenerator', array(\\Zend_Registry::get('logger')));\n //$pdfOptions = array();\n $pdfGenerator->setOrientation(\"portrait\");\n //$pdfOptions['contentEncoded'] = false;\n $pdfGenerator->setFilename(\"invoice.pdf\");\n //Obsolete: $pdfOptions['htmlHead'] = \\Util_PdfGenerationHelper::formatForPdf(\\Util_PdfGenerationHelper::getHtmlHead($view, array(\"/css/account/orders/view-invoice.css\")));\n $header = $this->formatForPdf($this->getHtmlHeadForPdf($view, array(\"/css/account/orders/view-invoice.css\")));\n //Obsolete: $pdfOptions['pdfContents'] = \\Util_PdfGenerationHelper::formatForPdf($view->partial(\"order-invoice.phtml\", array(\"order\" => $this)));\n $pdfContents = $this->formatForPdf($view->partial(\"order-invoice.phtml\", array(\"order\" => $this)));\n $pdfGenerator->generatePdfFromHtmlString($pdfContents, false, $header);\n\n //$pdf = \\Util_PdfGenerationHelper::getPdf($pdfOptions, false);\n $pdf = $pdfGenerator->getPdfContent();\n\n // send the mail\n $mail = new \\Fisdap_TemplateMailer();\n $mail->setSubject(\"Fisdap Invoice #\" . $this->invoice_number)\n ->addTo($this->getBillingEmailArray())\n ->setFrom(\"[email protected]\", \"Accounting\");\n\n $attachment = $mail->createAttachment($pdf);\n $attachment->type = 'application/pdf';\n $attachment->disposition = \\Zend_Mime::DISPOSITION_ATTACHMENT;\n $attachment->filename = \"invoice.pdf\";\n\n $mail->sendHtmlTemplate(\"email-pdf-invoice.phtml\", array(\"order\" => $this));\n }", "public function ajax_make_invoice() {\n $post_id = (int)$_POST['post_id'];\n $ifpaid = self::extract_ifpaid_tag(get_post_field('post_content', $post_id));\n if (!$ifpaid) return status_header(404);\n\n $invoice = $this->charge->invoice([\n 'currency' => $ifpaid->currency,\n 'amount' => $ifpaid->amount,\n 'description' => get_bloginfo('name') . ': pay to continue reading ' . get_the_title($post_id),\n 'metadata' => [ 'source' => 'wordpress-lightning-publisher', 'post_id' => $post_id, 'url' => get_permalink($post_id) ]\n ]);\n\n wp_send_json($invoice->id, 201);\n }", "public function sendInvoice ($invoice_id) {\n \t\t\n \t\t// \n \t\t$to = \"ray#netmarks.ca\";\n\t\t$from = '[email protected]'; \n\t\t$fromName = 'Ray Gubala'; \n \n\t\t$subject = \"EasyGroceries Order\"; \n\t\t$message = \"hello\";\n\t\t\n\t\t// in the message add the items line by line based on invoice_id\n\t\t$message .= \"\";\n\t\t\n\t\t// end message\n\t\t$message .= \"\";\n\t\t\n\t\t\n\t\t$headers = \"MIME-Version: 1.0\" . \"\\r\\n\"; \n\t\t$headers .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\"; \n \n\t\t// Additional headers \n\t\t$headers .= 'From: '.$fromName.'<'.$from.'>' . \"\\r\\n\";\n\t\t\n\t\t/*\n\t\t$headers = 'From: [email protected]' . \"\\r\\n\" .\n\t\t\t'Reply-To: [email protected]' . \"\\r\\n\" .\n\t\t\t'X-Mailer: PHP/' . phpversion();\n\t\t*/\n\t\t\n\t\tmail($to, $subject, $message, $headers);\n\n \t}", "public function actionCreateInvoice() {\n // Create Record with Pending status, the status will turn to Ready as\n // soon as all jobs are retrieved, marked as send, and the invoice\n // is uploaded to S3. The record is being auto created if an instance \n // oh InvoiceHistoryB is not provided to method getInstance()\n $invoiceComponent = InvoiceComponent::getInstance();\n \n // Get data provider\n $data = $this->getData();\n if($data === false || empty($data)) {\n // Redirect back to dashboard page with flag of no selection\n $this->redirect($this->createUrl('billingDashboard/index', array('no-selection' => 1,)));\n }\n \n // Make data provider\n $dataProvider = new CArrayDataProvider($data, array(\n 'pagination' => array(\n 'pageSize' => Yii::app()->user->getState('pageSize', Yii::app()->params['defaultPageSize']),\n ),\n ));\n // Update file name to include client name\n $invoiceComponent->setClientData($data[0]->project->client);\n \n // Export to xlsx document.\n $gridViewExcelWriter = $this->widget('GridViewExcelWriter', array(\n 'dataProvider' => $dataProvider,\n 'clearDollarSign' => false,\n 'title' => 'EExcelWriter',\n 'stream' => false,\n 'fileName' => 'invoice-exported-at.' . date('d.m.Y', time()) . '.xlsx',\n 'columns' => require(YiiBase::getPathOfAlias('billing.views.invoice._invoice_grid_columns').'.php'),\n ));\n // Upload the file to S3\n if($invoiceComponent->save($gridViewExcelWriter->getTempFileContent())) {\n // Mark invoice as ready\n $invoiceComponent->markInvoiceAsReady();\n \n // Contains all project ids\n $projectIds = array();\n // Mark project children items as sent\n foreach($data as $item) {\n // Collect project ids\n $projectIds[$item->project_id] = $item->project_id;\n // Item is either ProjectJobB or ProjectExtraServiceB\n $item->markAsSent();\n }\n // Mark all those projects as sent\n ProjectB::model()->manageInvoiceStatus($projectIds);\n \n // Redirect back to dashboard page with flag of no selection\n $this->redirect($this->createUrl('billingDashboard/index', array(\n 'activeTab' => 'Invoice_History',\n )));\n }\n }", "public function realInvoice()\n {\n $invoice = Invoice::first();\n\n if (!$invoice) {\n return response()->json([\n 'error' => 'Please run php artisan db:seed to fake some invoices.'\n ]);\n }\n\n $response = Simulate::request($invoice->amount)\n ->from(254708374149)\n ->usingReference($invoice->number)\n ->setCommand(CUSTOMER_PAYBILL_ONLINE)\n ->push();\n\n return response()->json([\n 'response' => $response,\n 'next' => 'Please check your ngrok endpoints and validate that BOTH the validate and confirm endpoint will be called. Also check the Transactions table.'\n ]);\n }", "public function crtSnglIssuerInvoice()\n {\n //creamos arrego con parametros a facturar \n $params = [\n 'ExpeditionPlace' => '12345',\n //'serie' => '',\n 'Folio' => '100',\n 'Currency' => 'MXN',\n 'PaymentConditions' => 'CREDITO A SIETE DIAS',\n 'CfdiType' => 'I',\n 'PaymentForm' => '03',\n 'PaymentMethod' => 'PUE',\n 'Receiver' => [\n 'Rfc' => 'XAXX010101000',\n 'Name' => 'RADIAL SOFTWARE SOLUTIONS',\n 'CfdiUse' => 'P01',\n ],\n 'Items' => [\n [\n 'ProductCode' => '10101504',\n 'IdentificationNumber' => 'EDL',\n 'Description' => 'Estudios de viabilidad',\n 'Unit' => 'NO APLICA',\n 'UnitCode' => 'MTS',\n 'UnitPrice' => 50.0,\n 'Quantity' => 2.0,\n 'Subtotal' => 100.0,\n\n 'Taxes' => [\n [\n 'Total' => 16.0,\n 'Name' => 'IVA',\n 'Base' => 100.0,\n 'Rate' => 0.16,\n 'IsRetention' => false,\n ],\n ],\n 'Total' => 116.0,\n ],\n ],\n ];\n\n $result = $this->facturama->post('2/cfdis', $params);\n return $result;\n }", "public function _add()\n {\n $type_code = post_param_string('type_code');\n $object = find_product($type_code);\n\n $amount = post_param_string('amount', '');\n if ($amount == '') {\n $products = $object->get_products(false, $type_code);\n $amount = $products[$type_code][1];\n if ($amount == '?') {\n warn_exit(do_lang_tempcode('INVOICE_REQUIRED_AMOUNT'));\n }\n }\n\n $to = post_param_string('to');\n $member_id = $GLOBALS['FORUM_DRIVER']->get_member_from_username($to);\n if (is_null($member_id)) {\n warn_exit(do_lang_tempcode('_MEMBER_NO_EXIST', escape_html($to)));\n }\n\n $id = $GLOBALS['SITE_DB']->query_insert('invoices', array(\n 'i_type_code' => $type_code,\n 'i_member_id' => $member_id,\n 'i_state' => 'new',\n 'i_amount' => $amount,\n 'i_special' => post_param_string('special'),\n 'i_time' => time(),\n 'i_note' => post_param_string('note')\n ), true);\n\n log_it('CREATE_INVOICE', strval($id), $type_code);\n\n send_invoice_notification($member_id, $id);\n\n $url = build_url(array('page' => '_SELF', 'type' => 'outstanding'), '_SELF');\n return redirect_screen($this->title, $url, do_lang_tempcode('SUCCESS'));\n }", "function resend_invoice($details) {\n\t\t\t\t$name = $details[0]->ai_first_name . \" \" . $details[0]->ai_last_name;\n\t\t\t\t$invoiceid = $details[0]->booking_id;\n\t\t\t\t$refno = $details[0]->booking_ref_no;\n\t\t\t\t$sendto = $details[0]->accounts_email;\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= \"Dear \" . $name . \",<br>\";\n\t\t\t\t$message .= \"You may review your invoice by visiting at: <a href=\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \" >\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \"</a>\";\n\t\t\t\t$message .= $this->mailFooter;\n\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($sendto);\n\t\t\t\t$this->email->subject('Booking Invoice');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "function XSAInvoicing($InvoiceNo, $orderno, $debtorno, $TypeInvoice, $tag, $serie, $folio, &$db)\n{\n\t$charelectronic='01';\n\t$charelectronicEmbarque='';\n\t$charelectronic=$charelectronic.'|'.$serie;\n\t$serieelect=$serie;\n\t//$serieelect=$TypeInvoice.'-'.$_SESSION['Tagref'];\n\t$folioelect=$folio;//$InvoiceNoTAG;\n\t//$folioelect=$InvoiceNo;\n\t$charelectronic=$charelectronic.'|'.$serieelect;\n\t$charelectronic=$charelectronic.'|'.$folioelect;\n\t// consulto datos de la factura\n\t$imprimepublico=0;\n\tif ($TypeInvoice == 11) {\n\t\t$tabla = 'notesorders';\n\t}else{\n\t\t$tabla = 'salesorders';\n\t}\n\t$SQLInvoice = \"SELECT replace(debtortrans.trandate,'-','/') as trandate,debtortrans.ovamount,debtortrans.ovdiscount,\n\t\t\tdebtortrans.ovfreight,debtortrans.ovgst,debtortrans.rate as cambio,\n\t\t\tdebtortrans.order_,debtortrans.invtext,\tdebtortrans.consignment,\n\t\t\tdebtortrans.id AS iddocto, debtortrans.type,\n\t\t\tdebtorsmaster.name,debtorsmaster.address1,debtorsmaster.address2,\n\t\t\tdebtorsmaster.address3,debtorsmaster.address4,debtorsmaster.address5,\n\t\t\tdebtorsmaster.address6,debtorsmaster.invaddrbranch,\n\t\t\tcustbranch.taxid as rfc,paymentterms.terms,salesorders.deliverto,\n\t\t\tsalesorders.deladd1,salesorders.deladd2,salesorders.deladd3,\n\t\t\tsalesorders.deladd4,salesorders.deladd5,salesorders.deladd6,\n\t\t\tsalesorders.customerref,salesorders.orderno,salesorders.orddate,\n\t\t\tlocations.locationname,\tshippers.shippername,custbranch.brname,\n\t\t\tcustbranch.braddress1,custbranch.braddress2,custbranch.braddress3,\n\t\t\tcustbranch.braddress4,custbranch.braddress5,custbranch.braddress6,\n\t\t\tcustbranch.brpostaddr1,custbranch.brpostaddr2,custbranch.brpostaddr3,\n\t\t\tcustbranch.brpostaddr4,custbranch.brpostaddr5,custbranch.brpostaddr6,\n\t\t\tsalesman.salesmanname,debtortrans.debtorno,debtortrans.branchcode,debtortrans.folio,\n\t\t\treplace(origtrandate,'-','/') as origtrandate,debtortrans.currcode,custbranch.branchcode,\n\t\t\tsalesorders.salesman,salesorders.UserRegister,custbranch.phoneno as telofi,\n\t\t\tsalesorders.placa, salesorders.serie,salesorders.kilometraje,salesorders.comments,debtortrans.ref1,\n\t\t\tsalesorders.ordertype,debtortrans.paymentname,debtortrans.nocuenta,\n\t\t\tcustbranch.brnumext, custbranch.brnumint,custbranch.specialinstructions,\n\t\t\ttags.typegroup,debtortrans.id\n\t\tFROM debtortrans \n\t\t\tleft join shippers on debtortrans.shipvia=shippers.shipper_id \n\t\t\tjoin tags on tags.tagref=debtortrans.tagref,\n\t\t\tdebtorsmaster,custbranch,\".$tabla.\" as salesorders ,\n\t\t\tsalesman,locations,paymentterms\n\n\t\tWHERE debtortrans.order_ = salesorders.orderno\n\n\t\tAND debtortrans.type=\".$TypeInvoice.\"\n\t\tAND debtortrans.transno=\" . $InvoiceNo . \"\n\t\tAND debtortrans.tagref=\" . $tag . \"\n\n\t\tAND debtortrans.debtorno=debtorsmaster.debtorno\n\t\tAND salesorders.paytermsindicator=paymentterms.termsindicator\n\t\tAND debtortrans.debtorno=custbranch.debtorno\n\t\tAND debtortrans.branchcode=custbranch.branchcode\n\t\tAND salesorders.salesman=salesman.salesmancode\n\t\tAND salesorders.fromstkloc=locations.loccode \";\n\tif ($_SESSION['UserID']=='admin') {\n\n\t\t//echo '<pre>sql:<br>'.$SQLInvoice.'<br>';\n\t}\n\t$Result=DB_query($SQLInvoice,$db);\n\tif (DB_num_rows($Result)>0) {\n\t\t$myrow = DB_fetch_array($Result);\n\t\t//impuestos federales\n\t\t$totretencionfederal=0;\n\t\t//$charelectronictaxslocal='|'.chr(13).chr(10);\n\t\t$qry = \"Select debtortranstaxesclient.*,sec_taxes.nametax from debtortranstaxesclient, sec_taxes\n\t\t\t\twhere debtortranstaxesclient.idtax = sec_taxes.idtax\n\t\t\t\tAND sec_taxes.typetax=1\n\t\t\t\tand debtortranstaxesclient.iddoc = \".$myrow['id'];\n\t\t\t\n\t\t$rs = DB_query($qry,$db);\n\t\t$totalImpuestosLocales=0;\n\t\tif (DB_num_rows($rs) > 0){\n\t\t\t$charelectronictaxsfederal='';\n\t\t\t$charelectronictaxsfederalini='|'.chr(13).chr(10).'06';\n\t\t\twhile ($regs = DB_fetch_array($rs)){\n\t\t\t\t$charelectronictaxsfederal.=$charelectronictaxsfederalini.\"|\".$regs['nametax'].\"|\".$regs['percent'].\"|\".$regs['amount'];\n\t\t\t\t$totretencionfederal=$totretencionfederal+$regs['amount'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t//impuestos locales\n\t\t$totalretencionlocal=0;\n\t\t//$charelectronictaxslocal='|'.chr(13).chr(10);\n\t\t$qry = \"Select debtortranstaxesclient.*,sec_taxes.nametax from debtortranstaxesclient, sec_taxes\n\t\t\t\twhere debtortranstaxesclient.idtax = sec_taxes.idtax\n\t\t\t\tAND sec_taxes.typetax=2\n\t\t\t\tand debtortranstaxesclient.iddoc = \".$myrow['id'];\n\t\t\t\n\t\t$rs = DB_query($qry,$db);\n\t\t$totalImpuestosLocales=0;\n\t\tif (DB_num_rows($rs) > 0){\n\t\t\t$charelectronictaxslocal.='08';\n\t\t\twhile ($regs = DB_fetch_array($rs)){\n\t\t\t\t$charelectronictaxslocal.=\"|\".$regs['nametax'].\"|\".$regs['percent'].\"|\".$regs['amount'];\n\t\t\t\t$totalretencionlocal=$totalretencionlocal+$regs['amount'];\n\t\t\t}\n\t\t\t$charelectronictaxslocal.=chr(13).chr(10);\n\t\t}\n\t\t$totalretencion=$totretencionfederal+$totalretencionlocal;\n\t\t//Tipo agrupacion\n\t\t$TipoAgrupacionXTag=$myrow['typegroup'];\n\t\t// fecha emision\n\t\t$fechainvoice=$myrow['origtrandate'];\n\t\t$UserRegister=$myrow['UserRegister'];\n\t\t$charelectronic=$charelectronic.'|'.$fechainvoice;\n\n\t\t$metodoPago = $myrow['paymentname'];\n\t\tif ($metodoPago==\"\")\n\t\t\t$metodoPago = \"No Identificado\";\n\n\t\t$nocuenta = $myrow['nocuenta'];\n\t\tif ($nocuenta==\"\")\n\t\t\t$nocuenta = \"No Identificado\";\n\n\t\t// subtotal\n\t\t$rfccliente=str_replace(\"-\",\"\",$myrow['rfc']);\n\t\t$rfccliente=str_replace(\" \",\"\",$rfccliente);\n\t\t$nombre=$myrow['name'];\n\t\t$subtotal= FormatNumberERP($myrow['ovamount']);\n\t\tif (strlen($rfccliente)<12){\n\t\t\t$rfccliente=\"XAXX010101000\";\n\t\t\t$nombre=\"Publico en General\";\n\t\t\t$subtotal= FormatNumberERP($myrow['ovamount']+$myrow['ovgst']);\n\t\t\t$imprimepublico=1;\n\t\t}elseif(strlen($rfccliente)>=14){\n\t\t\t$rfccliente=\"XAXX010101000\";\n\t\t\t$nombre=\"Publico en General\";\n\t\t\t$subtotal= FormatNumberERP($myrow['ovamount']+$myrow['ovgst']);\n\t\t\t$imprimepublico=1;\n\t\t}\n\t\t$charelectronic=$charelectronic.'|'.$subtotal;\n\t\t// total factura\n\t\t$total=FormatNumberERP($myrow['ovamount']+$myrow['ovgst']+$totalretencion);\n\t\t$charelectronic=$charelectronic.'|'.$total;\n\t\t// total de iva\n\t\t$iva=FormatNumberERP($myrow['ovgst']);\n\t\t// transladado\n\t\t$charelectronic=$charelectronic.'|'.$iva;\n\t\t// retenido\n\t\t$ivaret=0;\n\t\t$charelectronic=$charelectronic.'|'.$ivaret;\n\t\t//descuento trae desde el stockmoves\n\t\tif ($rfccliente!=\"XAXX010101000\"){\n\t\t\t$sqldiscount = 'SELECT sum(totaldescuento) as descuento\n\t\t\t\t FROM stockmoves\n\t\t\t\t WHERE stockmoves.type='.$TypeInvoice.'\n\t\t\t\t\tAND stockmoves.transno=' . $InvoiceNo . '\n\t\t\t\t\tAND stockmoves.tagref=' . $tag . '\n\t\t\t\t\tAND stockmoves.show_on_inv_crds=1';\n\t\t\t$Result= DB_query($sqldiscount,$db);\n\t\t\tif (DB_num_rows($Result)==0) {\n\t\t\t\t$descuento=0;\n\t\t\t}else{\n\t\t\t\t$myrowdis = DB_fetch_array($Result);\n\t\t\t\t$descuento=FormatNumberERP($myrowdis['descuento']);\n\t\t\t}\n\t\t}else{\n\t\t\t$sqldiscount = 'SELECT sum(totaldescuento+(IF(stockmovestaxes.taxrate IS NULL, 0, stockmovestaxes.taxrate)*totaldescuento)) as descuento\n\t\t\t \t\t\tFROM stockmoves inner join stockmaster on stockmaster.stockid=stockmoves.stockid\n\t\t\t\t\t\t\t-- LEFT JOIN taxauthrates ON stockmaster.taxcatid = taxauthrates.taxcatid\n\t\t\t\t\t\t\tLEFT JOIN stockmovestaxes ON stockmovestaxes.stkmoveno=stockmoves.stkmoveno\n\t\t\t\t\t\n\t\t\t\t\t \t\tWHERE stockmoves.type='.$TypeInvoice.'\n\t\t\t\t\t\t\t\tAND stockmoves.transno=' . $InvoiceNo . '\n\t\t\t\t\t\t\t\tAND stockmoves.tagref=' . $tag . '\n\t\t\t\t\t\t\t\tAND stockmoves.show_on_inv_crds=1';\n\t\t\t$Result= DB_query($sqldiscount,$db);\n\t\t\tif (DB_num_rows($Result)==0) {\n\t\t\t\t$descuento=0;\n\t\t\t}else{\n\t\t\t\t$myrowdis = DB_fetch_array($Result);\n\t\t\t\t$descuento=FormatNumberERP($myrowdis['descuento']);\n\t\t\t}\t\n\t\t}\n\t\t$descuento=FormatNumberERP($descuento);\n\t\t$charelectronic=$charelectronic.'|'.$descuento;\n\t\t//motivo descuento\n\t\t$charelectronic=$charelectronic.'|';\n\t\t// tipo de moneda\n\t\t$moneda=$myrow['currcode'];\n\t\t// CANTIDAD CON LETRAS\n\t\t$totaletras=($myrow['ovamount']+$myrow['ovgst'])+$totalretencion;\n\t\t$totalx=str_replace(',', '', FormatNumberERP($totaletras));\n\t\t$separa=explode(\".\",$totalx);\n\t\t$montoletra = $separa[0];\n\t\t$separa2=explode(\".\", FormatNumberERP($total));\n\t\t$montoctvs2 = $separa2[1];\n\t\t\n\t\t\n\t\t$montoletra=Numbers_Words::toWords($montoletra,'es');\n\t\t\n\t\t$zeroPad = \"\";\n\t\tif (empty($_SESSION['Decimals'])) {\n\t\t\t$zeroPad = str_pad($zeroPad, 4, 0, STR_PAD_RIGHT);\n\t\t} else {\n\t\t\t$zeroPad = str_pad($zeroPad, $_SESSION['Decimals'], 0, STR_PAD_RIGHT);\n\t\t}\n\t\t\n\t\tif ($moneda=='MXN') {\n\t\t\t$montoletra=ucwords($montoletra) . \" Pesos \". $montoctvs2 .\"/1$zeroPad M.N.\";\n\t\t} else {\n\t\t\t$montoletra=ucwords($montoletra) . \" Dolares \". $montoctvs2 .\"/1$zeroPad USD\";\n\t\t}\n\t\t$charelectronic=$charelectronic.'|'.$montoletra;\n\t\t// tipo moneda\n\t\t$charelectronic=$charelectronic.'|'.$moneda;\n\t\t// tipo de cambio\n\t\t$rate=FormatRateNumberERP(1/$myrow['cambio']);\n\t\t$charelectronic=$charelectronic.'|'.$rate;\n\t\t// numero de orden para referencia\n\t\t$ordenref=$myrow['orderno'];\n\t\t$charelectronic=$charelectronic.'|'.$ordenref;\n\t\t// observaciones 1: vendedores\n\t\t$vendedor=\"\";\n\t\t$SQL=\" SELECT *\n\t\t FROM salesman\n\t\t WHERE salesmancode='\".$myrow['salesman'].\"'\";\n\t\t$Result= DB_query($SQL,$db);\n\t\tif (DB_num_rows($Result)==1) {\n\t\t\t$myrowsales = DB_fetch_array($Result);\n\t\t\t$vendedor=$myrowsales['salesmanname'];\n\t\t}\n\t\t$observaciones1='Vendedor: '.$myrow['salesman'].' '.$vendedor;\n\t\t$charelectronic=$charelectronic.'|'.$observaciones1;\n\t\t// observaciones 2\n\t\t$SQL=\" SELECT l.telephone,l.comments,t.tagdescription\n\t\t FROM legalbusinessunit l, tags t\n\t\t WHERE l.legalid=t.legalid AND tagref='\".$tag.\"'\";\n\t\t$Result= DB_query($SQL,$db);\n\t\tif (DB_num_rows($Result)==1) {\n\t\t\t$myrowtags = DB_fetch_array($Result);\n\t\t\t$telephone=trim($myrowtags['telephone']);\n\t\t\t$comments=trim($myrowtags['comments']);\n\t\t}\n\t\t$observaciones2=\" Atencion a clientes \" .$telephone;\n\t\t$charelectronic=$charelectronic.'|'.$observaciones2;\n\t\t// observaciones 3\n\t\t$comments=$comments.' Cuenta de Referencia: '.$myrow['ref1'];\n\t\t$observaciones3='Id Factura:'.$InvoiceNo. '. La tenencia de esta factura no acredita su pago si no se justifica con el comprobante respectivo. '.$comments .' usr:'.$UserRegister;\n\t\t$charelectronic=$charelectronic.'|'.$observaciones3;\n\t\t// informacionExtra\n\t\t$infoextra=\"\";\n\t\t$numpago=0;\n\t\t$cadenapagares=\"\";\n\t\tif ($TypeInvoice==11){\n\t\t\t$tipodoc=0;\n\t\t}else{\n\t\t\t$tipodoc=70;\n\t\t}\n\t\t\n\t\t$SQL=\" SELECT trandate,case when ovamount<0 then (ovamount+ovgst)*-1 else ovamount+ovgst end as monto\n\t\t FROM debtortrans\n\t\t WHERE debtortrans.type=\".$tipodoc.\"\n\t\t\tAND debtortrans.order_=\" . $InvoiceNo ;\n\t\t$Result= DB_query($SQL,$db);\n\t\tif (DB_num_rows($Result)>0) {\n\t\t\twhile ($myrowpagos=DB_fetch_array($Result)){\n\t\t\t\t$numpago=$numpago+1;\n\t\t\t\t$fechapago=ConvertSQLDate($myrowpagos['trandate']);\n\t\t\t\t$montopago=$myrowpagos['monto'];\n\t\t\t\t$montopago=FormatNumberERP($montopago);\n\t\t\t\t$cadenapagares=$cadenapagares.\" No:\".$numpago.\" Fecha: \".$fechapago.\" Monto: \".$montopago .' '.$moneda;\n\t\t\t}\n\t\t}\n\t\t$placa= $_SESSION['LabelText1'].' : '.$myrow['placa'];\n\t\t$serie=$_SESSION['LabelText3'].' : '.$myrow['serie'];\n\t\t$kilometraje=$_SESSION['LabelText2'].' : '.$myrow['kilometraje'];\n\t\t$comments1=' Extra: '.$myrow['comments'];\n\t\t$infoextra=$placa.' '.$serie.' '.$kilometraje.' '.$comments1.' Pagares: '. $cadenapagares;\n\n\n\t\t$charelectronic=$charelectronic.'|'.$infoextra;\n\n\t\t//cometarios nivel factura\n\t\t$charelectronic=$charelectronic.'|'.$myrow['invtext'];\n\n\t\t// datos de la forma de pago\n\t\t$charelectronic=$charelectronic.'|'.chr(13).chr(10).'02';\n\t\t$terminospago=$myrow['terms'];\n\t\t$SQL=\" SELECT count(*) as pagares\n\t\t FROM debtortrans\n\t\t WHERE debtortrans.type=70\n\t\t\tAND debtortrans.order_=\" . $InvoiceNo ;\n\t\t$Result= DB_query($SQL,$db);\n\t\tif (DB_num_rows($Result)==0) {\n\t\t\t$Tipopago=\"Pago en una sola exhibicion\";\n\t\t}else{\n\t\t\t$myrowpag = DB_fetch_array($Result);\n\t\t\t$numpagares=intval($myrowpag['pagares']);\n\t\t\tif ($numpagares<=1){\n\t\t\t\t$Tipopago=\"Pago en una sola exhibicion\";\n\t\t\t}else{\n\t\t\t\t$Tipopago=\"Parcialidades\";\n\t\t\t}\n\t\t}\n\t\tif ($TypeInvoice==11){\n\t\t\t$Tipopago=\"Pago en una sola exhibicion\";\n\t\t}\n\t\t\n\t\t$Tipopago=$Tipopago;//.' '.$terminospago;\n\t\t//$Tipopago=$terminospago;\n\t\t$charelectronic=$charelectronic.'|'.$Tipopago;\n\t\t// condiciones de pago\n\t\t$charelectronic=$charelectronic.'|'.$terminospago;\n\t\t// metodo de pago\n\t\t$metodopago=$metodoPago;\n\t\t$charelectronic=$charelectronic.'|'.$metodopago;\n\t\t// fecha vencimiento\n\t\t$fechavence=$myrow['trandate'];\n\t\t$charelectronic=$charelectronic.'|'.$fechavence;\n\t\t// observaciones 4 (no de cuenta)\n\t\t$observaciones4=$nocuenta;\n\t\t$charelectronic=$charelectronic.'|'.$observaciones4;\n\t\t// datos del cliente\n\t\t$charelectronic=$charelectronic.'|'.chr(13).chr(10).'03';\n\t\t$branch=$myrow['debtorno'];\n\t\t$charelectronic=$charelectronic.'|'.$branch;\n\t\t$charelectronic=$charelectronic.'|'.$rfccliente;\n\t\t$charelectronic=$charelectronic.'|'.$nombre;\n\t\tif (strlen(str_replace('|','',str_replace('-','',str_replace(' ','',str_replace('\\r','',str_replace('\\n','',$myrow['telofi']))))))>0){\n\t\t\t$pais=str_replace('|','',str_replace('-','',str_replace(' ','',str_replace('\\r','',str_replace('\\n','',$myrow['telofi'])))));//\"Mexico\";//$myrow['name'];\n\t\t}else{\n\t\t\t$pais=\"Mexico\";\n\t\t}\n\t\t$charelectronic=$charelectronic.'|'.$pais;\n\t\t$calle=\"\";\n\t\tif ($imprimepublico==0){\n\t\t\t$calle=$myrow['address1'];\n\t\t}\n\t\t$charelectronic=$charelectronic.'|'.$calle;\n\t\t$noext=$myrow['brnumext'];\n\t\t$charelectronic=$charelectronic.'|'.$noext;\n\t\t$noint=$myrow['brnumint'];\n\t\t$charelectronic=$charelectronic.'|'.$noint;\n\t\t$colonia=\"\";\n\t\tif ($imprimepublico==0){\n\t\t\t$colonia=$myrow['address2'];\n\t\t}\n\t\t$charelectronic=$charelectronic.'|'.$colonia;\n\t\t$localidad=\"\";\n\t\t$charelectronic=$charelectronic.'|'.$localidad;\n\t\t$referenciacalle=\"\";\n\t\tif ($imprimepublico==0){\n\t\t\t$referenciacalle=\"Telefono. \".$myrow['telofi'];\n\t\t}\n\t\t$charelectronic=$charelectronic.'|'.$referenciacalle;\n\t\t$municipio=\"\";\n\t\tif ($imprimepublico==0){\n\t\t\t$municipio=$myrow['address3'];\n\t\t}\n\t\t$charelectronic=$charelectronic.'|'.$municipio;\n\t\t$edo=\"\";\n\t\tif ($imprimepublico==0){\n\t\t\t$edo=$myrow['address4'];\n\t\t}\n\t\t$charelectronic=$charelectronic.'|'.$edo;\n\t\t$cp=\"\";\n\t\tif ($imprimepublico==0){\n\t\t\t$cp=$myrow['address5'];\n\t\t}\n\t\t$charelectronic=$charelectronic.'|'.$cp;\n\t\t// datos del custbranch\n\t\t$charelectronic=$charelectronic.'|'.chr(13).chr(10).'04';\n\t\t$branch=$myrow['branchcode'];\n\t\t$charelectronic=$charelectronic.'|'.$branch;\n\t\t//$rfc=$myrow['rfc'];\n\t\t//$charelectronic=$charelectronic.'|'.$rfccliente;\n\t\t$nombre=$myrow['name'];\n\t\t$charelectronic=$charelectronic.'|'.$nombre;\n\t\tif (strlen(str_replace('|','',str_replace('-','',str_replace(' ','',str_replace('\\r','',str_replace('\\n','',$myrow['telofi']))))))>0){\n\t\t\t$pais=str_replace('|','',str_replace('-','',str_replace(' ','',str_replace('\\r','',str_replace('\\n','',$myrow['telofi'])))));//\"Mexico\";//$myrow['name'];\n\t\t}else{\n\t\t\t$pais=\"Mexico\";\n\t\t}\n\t\t//$pais=str_replace('|','',str_replace('-','',str_replace(' ','',str_replace('\\r','',str_replace('\\n','',$myrow['telofi'])))));//\"Mexico\";//$myrow['name'];\n\t\t$charelectronic=$charelectronic.'|'.$pais;\n\t\t$calle=$myrow['braddress1'];\n\t\t$charelectronic=$charelectronic.'|'.$calle;\n\t\t$noext=$myrow['brnumext'];\n\t\t$charelectronic=$charelectronic.'|'.$noext;\n\t\t$noint=$myrow['brnumint'];\n\t\t$charelectronic=$charelectronic.'|'.$noint;\n\t\t$colonia=$myrow['braddress6'];\n\t\t$charelectronic=$charelectronic.'|'.$colonia;\n\t\t$localidad=\"\";\n\t\t$charelectronic=$charelectronic.'|'.$localidad;\n\t\t$referenciacalle=\"\";\n\t\t$charelectronic=$charelectronic.'|'.$referenciacalle;\n\t\t$municipio=$myrow['braddress2'];;\n\t\t$charelectronic=$charelectronic.'|'.$municipio;\n\t\t$edo=$myrow['braddress3'];\n\t\t$charelectronic=$charelectronic.'|'.$edo;\n\t\t$cp=$myrow['braddress4'];\n\t\t$charelectronic=$charelectronic.'|'.$cp;\n\t\t\n\t\t\n\t\t$charelectronicEmbarque='|'.chr(13).chr(10).'09';\n\t\t$charelectronicEmbarque=$charelectronicEmbarque.'|'.$myrow['specialinstructions'];\n\t\t$charelectronicEmbarque=$charelectronicEmbarque.'|'.$myrow['brpostaddr1'];//calle\n\t\t$charelectronicEmbarque=$charelectronicEmbarque.'|';//noext\n\t\t$charelectronicEmbarque=$charelectronicEmbarque.'|';//no int\n\t\t\n\t\t$charelectronicEmbarque=$charelectronicEmbarque.'|'.$myrow['brpostaddr2'];//colonia\n\t\t$charelectronicEmbarque=$charelectronicEmbarque.'|'.$myrow['brpostaddr3'];//municipio\n\t\t$charelectronicEmbarque=$charelectronicEmbarque.'|'.$myrow['brpostaddr4'];//cp\n\t\t$charelectronicEmbarque=$charelectronicEmbarque.'|'.$myrow['brpostaddr5'];//estado\n\t\t$charelectronicEmbarque=$charelectronicEmbarque.'|'.$myrow['brpostaddr6'];//pais\n\t\t$charelectronicEmbarque=$charelectronicEmbarque.'|'.$myrow['brpostaddr7'];\n\t\t\n\t}\n\t// cadena para datos de los productos\n\t// productos vendidos\n\t$charelectronicdetail='';\n\t$charelectronicinidet='|'.chr(13).chr(10).'05';\n\t// datos de ivas\n\t$charelectronictaxs='';\n\t$charelectronictaxsini='|'.chr(13).chr(10).'07';\n\t$decimalplaces=6;\n\n\t\n\tif ($rfccliente!=\"XAXX010101000\"){//\n\t\tif($TipoAgrupacionXTag==1 and $TypeInvoice <> 111){\n\t\t\t$sqldetails = 'SELECT stockmoves.stkmoveno,\n\t\t\t\t\t\t-- stockmoves.stockid,\n\t\t\t\t\t ProdLine.prodLineId as stockid,\n\t\t\t\t\t\tstockmoves.warranty,\n\t\t\t\t\t\t-- stockmaster.description,\n\t\t\t\t\t\tProdLine.Description as description,\n\t\t\t\t\t\t/*stockmaster.serialised,\n\t\t\t\t\t\tstockmaster.controlled,*/\n\t\t\t\t\t\t0 as serialised,\n\t\t\t\t\t\t0 as controlled,\n\t\t\t\t\t\tsum(case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end) as quantity ,\n\t\t\t\t\t\tstockmoves.narrative,\n\t\t\t\t\t\tstockmaster.units,\n\t\t\t\t\t\tstockmaster.decimalplaces,\n\t\t\t\t\t\tstockmoves.discountpercent,\n\t\t\t\t\t\tstockmoves.discountpercent1,\n\t\t\t\t\t\tstockmoves.discountpercent2,\n\t\t\t\t\t\tsum((case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end)*(stockmoves.price))/sum(case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end) AS fxnet,\n\t\t\t\t\t\tsum((case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end)*(stockmoves.price)-totaldescuento)/sum(case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end) as subtotal,\n\t\t\t\t\t\t-- sum((stockmoves.price*case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end)/case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end) AS fxprice,\n\t\t\t\t\t\tsum((stockmoves.price*case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end))/sum(case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end) AS fxprice,\n\t\t\t\t\t\tstockmoves.narrative,\n\t\t\t\t\t\tstockmaster.units,\n\t\t\t\t\t\tstockmaster.categoryid,\n\t\t\t\t\t\tstockmoves.loccode as almacen,\n\t\t\t\t\t\tstockmoves.showdescription,\n\t\t\t\t\t\tstockcategory.MensajePV\n\t\t\t\tFROM stockmoves,stockmaster,stockcategory \n\t\t\t\t\t \tINNER JOIN ProdLine ON ProdLine.prodLineId=stockcategory.prodLineId \n\t\t\t\tWHERE stockmoves.stockid = stockmaster.stockid\n\t\t\t\t\tAND stockmoves.type='.$TypeInvoice.'\n\t\t\t\t\tAND stockmoves.transno=' . $InvoiceNo . '\n\t\t\t\t\tAND stockmoves.tagref=' . $tag . '\n\t\t\t\t\tAND stockmoves.show_on_inv_crds=1\n\t\t\t\t\tAND stockcategory.categoryid = stockmaster.categoryid\n\t\t\t\tGROUP BY ProdLine.Description,ProdLine.prodLineId';\n\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\t$sqldetails = 'SELECT stockmoves.stkmoveno,\n\t\t\t\t\t\tstockmoves.stockid,\n\t\t\t\t\t\tstockmoves.warranty,\n\t\t\t\t\t\tstockmaster.description,\n\t\t\t\t\t\tstockmaster.longdescription,\n\t\t\t\t\t\tstockmaster.mbflag,\n\t\t\t\t\t\tstockmaster.serialised,\n\t\t\t\t\t\tstockmaster.controlled,\n\t\t\t\t\t\t(case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end) as quantity ,\n\t\t\t\t\t\tstockmoves.narrative,\n\t\t\t\t\t\tstockmaster.units,\n\t\t\t\t\t\tstockmaster.decimalplaces,\n\t\t\t\t\t\tstockmoves.discountpercent,\n\t\t\t\t\t\tstockmoves.discountpercent1,\n\t\t\t\t\t\tstockmoves.discountpercent2,\n\t\t\t\t\t\t((case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end)*(stockmoves.price)) AS fxnet,\n\t\t\t\t\t\t((case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end)*(stockmoves.price))-totaldescuento as subtotal,\n\t\t\t\t\t\t(stockmoves.price) AS fxprice,\n\t\t\t\t\t\tstockmoves.narrative,\n\t\t\t\t\t\tstockmaster.units,\n\t\t\t\t\t\tstockmaster.categoryid,\n\t\t\t\t\t\tstockmoves.loccode as almacen,\n\t\t\t\t\t\tstockmoves.showdescription,\n\t\t\t\t\t\tstockcategory.MensajePV\n\t\t\t\tFROM stockmoves,stockmaster,stockcategory\n\t\t\t\tWHERE stockmoves.stockid = stockmaster.stockid\n\t\t\t\t\tAND stockmoves.type='.$TypeInvoice.'\n\t\t\t\t\tAND stockmoves.transno=' . $InvoiceNo . '\n\t\t\t\t\tAND stockmoves.tagref=' . $tag . '\n\t\t\t\t\tAND stockmoves.show_on_inv_crds=1\n\t\t\t\t\tAND stockcategory.categoryid = stockmaster.categoryid';\n\t\t}\n\t\t$resultdetails=DB_query($sqldetails,$db);\n\t\t$nolinea=0;\n\t\t$descrprop=\"\";\n\t\n\t\twhile ($myrow2=DB_fetch_array($resultdetails)){\n\t\t\t$stockid=$myrow2['stockid'];\n\t\t\t$charelectronicdetail=$charelectronicdetail.$charelectronicinidet.'|'.$stockid;\n\t\t\t$stockid=$myrow2['stockid'];\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockid;\n\t\t\t$stockcantidad=FormatNumberERP($myrow2['quantity']);\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockcantidad;\n\t\t\tif($_SESSION['DescrLargaFact'] == $myrow2['mbflag']){\n\t\t\t\t\t$stockdescrip=$myrow2['description'].' '.$myrow['ordertype'].' '.$myrow2['longdescription'];\n\t\t\t\t}else{\n\t\t\t\t\t$stockdescrip=$myrow2['description'].' '.$myrow['ordertype'];\n\t\t\t\t}\n\t\t\t// valores de los vendedorfees por linea\n\t\t\t$descrprop=\" (\";\n\t\t\t$sqlpropertyes=\"SELECT distinct p.InvoiceValue as val,sp.label\n\t\t\t FROM salesstockproperties p, stockcatproperties sp, stockmaster sm\n\t\t\t WHERE p.stkcatpropid=sp.stkcatpropid\n\t\t\t AND sp.categoryid=sm.categoryid\n\t\t\t\t\t AND sp.reqatprint=1\n\t\t\t\t AND p.orderno=\" . $orderno . \"\n\t\t\t\t AND p.typedocument=\" . $TypeInvoice . \"\n\t\t\t\t AND sm.stockid='\" . $stockid . \"'\";\n\t\t\t$resultpropertyes=DB_query($sqlpropertyes,$db);\n\t\t\t$xt=0;\n\t\t\twhile ($myrowprop=DB_fetch_array($resultpropertyes)){\n// \t\t\t\t$traba=explode(\" \",$myrowprop['val']);\n// \t\t\t\t$trab=$traba[0];\n\t\t\t\t$trab=$myrowprop['val'];\n\t\t\t\tif ($xt==0){\n\n\t\t\t\t\t$descrprop=$descrprop.' '.$myrowprop['label'].':'.$trab;\n\t\t\t\t}else{\n\t\t\t\t\t$descrprop=$descrprop.\" , \".$myrowprop['label'].':'.$trab;\n\t\t\t\t}\n\n\t\t\t\t$xt=$xt+1;\n\t\t\t}\n\t\t\t$descrprop=$descrprop.\" )\";\n\t\t\tif ($xt==0){\n\t\t\t\t$descrprop=\"\";\n\t\t\t}\n\t\t\tif($myrow2['MensajePV'] <> \"\"){\n\t\t\t\t$descrprop = $descrprop.$myrow2['MensajePV'];\n\t\t\t}\n\t\t\t$descrnarrative=\"\";\n\t\t\t\n\t\t\t$descrnarrative=str_replace('\\r','',str_replace('\\n','',$myrow2['narrative']));\n\t\t\t$descrnarrative=str_replace('|', '', $descrnarrative);\n\t\t\t\n\t\t\t/*\n\t\t\tif ($TypeInvoice==11){\n\t\t\t\t$tablades=0;\n\t\t\t}else{\n\t\t\t\t$tipodoc=70;\n\t\t\t}\n\t\t\t\n\t\t\t$sqlnarrative=\"SELECT narrative\n\t\t\t\tFROM salesorderdetails p\n\t\t\t\tWHERE p.orderno=\" . $orderno . \"\n\t\t\t\t AND p.stkcode='\" . $stockid . \"'\";\n\t\t\t$resultnarrative=DB_query($sqlnarrative,$db);\n\t\t\twhile ($myrownarrative=DB_fetch_array($resultnarrative)){\n\t\t\t\t$descrnarrative=str_replace('\\r','',str_replace('\\n','',$myrownarrative['narrative']));\n\t\t\t\t$descrnarrative=str_replace('|', '', $descrnarrative);\n\t\t\t}\n\t\t\tif (strlen($descrnarrative)==0){\n\t\t\t\t$descrnarrative=\"\";\n\t\t\t}*/\n\t\t\t//$descrnarrative=\"\";\n\t\t\t// consulta de aduana\n\t\t\t$stkmoveno=$myrow2['stkmoveno'];\n\t\t\t$almacen=$myrow2['almacen'];\n\t\t\t$numberserie=\"\";\n\t\t\t$xserie=0;\n\t\t\t$sqlserials=\"SELECT stockserialitems.serialno as serie\n\t\t\t\t FROM stockserialmoves , stockmoves , stockserialitems\n\t\t\t\t WHERE stockmoves.stkmoveno=stockserialmoves.stockmoveno\n\t\t\t\t\tAND stockserialmoves.stockid=stockserialitems.stockid\n\t\t\t\t\tAND stockserialmoves.serialno=stockserialitems.serialno\n\t\t\t\t\tAND stockserialitems.loccode='\".$almacen.\"'\n\t\t\t\t\tAND stockmoves.stkmoveno=\".$stkmoveno.\"\n\t\t\t\t\tAND stockmoves.stockid='\".$stockid.\"'\";\n\t\t\t//echo '<pre><br>'.$sqlserials;\n\t\t\t$Result= DB_query($sqlserials,$db);\n\t\t\tif (DB_num_rows($Result)==0) {\n\t\t\t\t$numberserie=\"\";\n\t\t\t}else{\n\t\t\t\twhile ($myrownseries=DB_fetch_array($Result)){\n\t\t\t\t\tif ($xserie==0){\n\t\t\t\t\t\t$numberserie=' Series: '.$myrownseries['serie'];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$numberserie=$numberserie.', '.$myrownseries['serie'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (strlen($numberserie)==0){\n\t\t\t\t$numberserie=\"\";\n\t\t\t}\n\t\t\tif($myrow2['showdescription']==1){\n\t\t\t\t$stockdescripuno=$stockdescrip.$descrprop.$descrnarrative.$numberserie;\n\t\t\t}else{\n\t\t\t\tif (strlen($descrnarrative)==0){\n\t\t\t\t\t$stockdescripuno=$stockdescrip.$descrprop.$descrnarrative.$numberserie;\n\t\t\t\t}else{\n\t\t\t\t\t$stockdescripuno=$descrnarrative;\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**/\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockdescripuno;\n\t\t\t$stockprecio=FormatNumberERP($myrow2['fxprice']);\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockprecio;\n\t\t\t$stockneto=FormatNumberERP($myrow2['fxnet']);\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockneto;\n\t\t\t$stockunits=$myrow2['units'];\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockunits;\n\t\t\t$stockcat=$myrow2['categoryid'];\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockcat;\n\t\t\t$ordencompra=\"\";\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$ordencompra;\n\t\t\t// descuentos\n\t\t\t$discount1=FormatNumberERP($myrow2['discountpercent']*100);\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$discount1;\n\t\t\t$discount2=FormatNumberERP($myrow2['discountpercent1']*100);\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$discount2;\n\t\t\t$discount3=FormatNumberERP($myrow2['discountpercent2']*100);\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$discount3;\n\t\t\t//subtotal\n\t\t\t$subtotal=FormatNumberERP($myrow2['subtotal']);\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$subtotal;\n\n\n\n\t\t\t$sqladuana=\"SELECT stockserialitems.customs as aduana,customs_number as noaduana,\n\t\t\t\t\t\tpedimento, DATE_FORMAT(customs_date,'%Y-%m-%d') as fechaaduana\n\n\t\t\t\t FROM stockserialmoves , stockmoves , stockserialitems\n\t\t\t\t WHERE stockmoves.stkmoveno=stockserialmoves.stockmoveno\n\t\t\t\t\tAND stockserialmoves.stockid=stockserialitems.stockid\n\t\t\t\t\tAND stockserialmoves.serialno=stockserialitems.serialno\n\t\t\t\t\tAND stockserialitems.loccode='\".$almacen.\"'\n\t\t\t\t\tAND stockmoves.stkmoveno=\".$stkmoveno.\"\n\t\t\t\t\tAND stockmoves.stockid='\".$stockid.\"'\";\n\t\t\t\n\t\t\t$Result= DB_query($sqladuana,$db);\n\t\t\tif (DB_num_rows($Result)==0) {\n\t\t\t\t$nameaduana=\"\";\n\t\t\t\t$numberaduana=\"\";\n\t\t\t\t$fechaaduana=\"\";\n\t\t\t}else{\n\t\t\t\t$myrowaduana = DB_fetch_array($Result);\n\t\t\t\t$nameaduana=$myrowaduana['aduana'];\n\t\t\t\t$numberaduana=$myrowaduana['noaduana'];\n\t\t\t\t$fechaaduana=$myrowaduana['fechaaduana'];\n\t\t\t\t//$separaaduana=explode(\"|\",$aduana);\n\t\t\t\t//$nameaduana = $separaaduana[0];\n\t\t\t\t//$numberaduana= $separaaduana[1];\n\t\t\t\t//$fechaaduana= $separaaduana[2];\n\t\t\t\tif (strlen($nameaduana)==0 or strlen($numberaduana)==0 /*or !Is_Date($fechaaduana)*/){\n\t\t\t\t\t$nameaduana=\"\";\n\t\t\t\t\t$numberaduana=\"\";\n\t\t\t\t\t$fechaaduana=\"\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($myrow['type'] == 66) { // Si es factura remision\n\n\t\t\t\t$ordernotmp = $myrow['orderno'];\n\n\t\t\t\t$SQL = \"\n\t\t\t\t\tSELECT GROUP_CONCAT(debtortrans.order_) AS order_\n\t\t\t\t\tFROM invoicetoremision\n\t\t\t\t\tINNER JOIN debtortrans\n\t\t\t\t\tON debtortrans.id = invoicetoremision.idremision\n\t\t\t\t\tWHERE invoicetoremision.idinvoice = '{$myrow['iddocto']}'\n\t\t\t\t\";\n\n\t\t\t\t$rstmp = DB_query($SQL, $db);\n\t\t\t\t$rowtmp = DB_fetch_array($rstmp);\n\t\t\t\t$ordernotmp = $rowtmp['order_'];\n\n\t\t\t\tif(empty($ordernotmp) == FALSE) {\n\n\t\t\t\t\t$SQL = \"\n\t\t\t\t\t\tSELECT\n\t\t\t\t\t\tDATE_FORMAT(purchorderdetails.datecustoms,'%Y-%m-%d') AS fechaaduana,\n\t\t\t\t\t\tpedimento,\n\t\t\t\t\t\tcustoms AS aduana\n\t\t\t\t\t\tFROM purchorders\n\t\t\t\t\t\tINNER JOIN purchorderdetails\n\t\t\t\t\t\tON purchorderdetails.orderno = purchorders.orderno\n\t\t\t\t\t\tWHERE purchorders.requisitionno IN ($ordernotmp)\n\t\t\t\t\t\tAND purchorderdetails.itemcode = '$stockid'\n\t\t\t\t\t\";\n\n\t\t\t\t\t$rstmp = DB_query($SQL, $db);\n\n\t\t\t\t\tif($rowtmp = DB_fetch_array($rstmp)) {\n\t\t\t\t\t\t$fechaaduana = $rowtmp['fechaaduana'];\n\t\t\t\t\t\t$numberaduana = $rowtmp['pedimento'];\n\t\t\t\t\t\t$nameaduana = $rowtmp['aduana'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$nameaduana;\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$numberaduana;\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$fechaaduana;\n\t\t\t$nolinea=$nolinea+1;\n\t\t\t\n\t\t\t\n\t\t\t$sqlstockmovestaxes=\"SELECT stkmoveno,taxauthid,taxrate,\n\t\t\t\t\t\ttaxcalculationorder,\n\t\t\t\t\t\ttaxontax,\n\t\t\t\t\t\ttaxauthorities.description\n\t\t\t\t\t FROM stockmovestaxes,taxauthorities\n\t\t\t\t\t WHERE taxauthorities.taxid=stockmovestaxes.taxauthid\n\t\t\t\t\t\t AND stkmoveno=\".$stkmoveno;\n\t\t\t\n\t\t\t$resultstockmovestaxes=DB_query($sqlstockmovestaxes,$db);\n\t\t\twhile ($myrow3=DB_fetch_array($resultstockmovestaxes)){\n\t\t\t\t$impuesto=$myrow3['description'];\n\t\t\t\t$charelectronictaxs=$charelectronictaxs.$charelectronictaxsini.'|'.$impuesto;\n\t\t\t\t$taxrate=FormatNumberERP($myrow3['taxrate']*100);\n\t\t\t\t$charelectronictaxs=$charelectronictaxs.'|'.$taxrate;\n\t\t\t\tif($TipoAgrupacionXTag==1){\n\t\t\t\t\t$taxratetotal=FormatNumberERP((($myrow3['taxrate']*($myrow2['subtotal']))*$myrow2['quantity']));\n\t\t\t\t}else{\n\t\t\t\t\t$taxratetotal=FormatNumberERP($myrow3['taxrate']*($myrow2['subtotal']));\n\t\t\t\t}\n\t\t\t\t$charelectronictaxs=$charelectronictaxs.'|'.$taxratetotal;\n\t\t\t}\n\n\t\t}\n\t}else{\n\t\tif($TipoAgrupacionXTag==1){\n\t\t\t$sqldetails = 'SELECT stockmoves.stkmoveno,\n\t\t\t\t\t\t-- stockmoves.stockid,\n\t\t\t\t\t ProdLine.prodLineId as stockid,\n\t\t\t\t\t\tstockmoves.warranty,\n\t\t\t\t\t\t-- stockmaster.description,\n\t\t\t\t\t\tProdLine.Description as description,\n\t\t\t\t\t\t/*stockmaster.serialised,\n\t\t\t\t\t\tstockmaster.controlled,*/\n\t\t\t\t\t\t0 as serialised,\n\t\t\t\t\t\t0 as controlled,\n\t\t\t\t\t\tsum(case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end) as quantity ,\n\t\t\t\t\t\tstockmoves.narrative,\n\t\t\t\t\t\tstockmaster.units,\n\t\t\t\t\t\tstockmaster.decimalplaces,\n\t\t\t\t\t\tstockmoves.discountpercent,\n\t\t\t\t\t\tstockmoves.discountpercent1,\n\t\t\t\t\t\tstockmoves.discountpercent2,\n\t\t\t\t\t\tsum((case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end)*(stockmoves.price*IF(stockmovestaxes.taxrate IS NULL, 0, stockmovestaxes.taxrate)))/sum(case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end) AS fxnet,\n\t\t\t\t\t\tsum((case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end)*(stockmoves.price*IF(stockmovestaxes.taxrate IS NULL, 0, stockmovestaxes.taxrate))-totaldescuento)/sum(case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end) as subtotal,\n\t\t\t\t\t\t-- sum((stockmoves.price*case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end)/case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end) AS fxprice,\n\t\t\t\t\t\tsum((stockmoves.price*IF(stockmovestaxes.taxrate IS NULL, 0, stockmovestaxes.taxrate)*case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end))/sum(case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end) AS fxprice,\n\t\t\t\t\t\tstockmoves.narrative,\n\t\t\t\t\t\tstockmaster.units,\n\t\t\t\t\t\tstockmaster.categoryid,\n\t\t\t\t\t\tstockmoves.loccode as almacen,\n\t\t\t\t\t\tstockmoves.showdescription,\n\t\t\t\t\t\tstockcategory.MensajePV\n\t\t\t\tFROM stockmoves,stockmaster\n\t\t\t\t\t left JOIN stockmovestaxes ON stockmovestaxes.stkmoveno=stockmoves.stkmoveno ,\n\t\t\t\t\tstockcategory\n\t\t\t\t\t \tINNER JOIN ProdLine ON ProdLine.prodLineId=stockcategory.prodLineId\n\t\t\t\t\t\t\n\t\t\t\tWHERE stockmoves.stockid = stockmaster.stockid\n\t\t\t\t\tAND stockmoves.type='.$TypeInvoice.'\n\t\t\t\t\tAND stockmoves.transno=' . $InvoiceNo . '\n\t\t\t\t\tAND stockmoves.tagref=' . $tag . '\n\t\t\t\t\tAND stockmoves.show_on_inv_crds=1\n\t\t\t\t\tAND stockcategory.categoryid = stockmaster.categoryid\n\t\t\t\tGROUP BY ProdLine.Description,ProdLine.prodLineId';\n\t\t\t\t\n\t\t\t\t\n\t\t}else{\n\t\t\t$sqldetails = 'SELECT stockmoves.stkmoveno,\n\t\t\t\t\t\tstockmoves.stockid,\n\t\t\t\t\t\tstockmoves.warranty,\n\t\t\t\t\t\tstockmaster.description,\n\t\t\t\t\t\tstockmaster.serialised,\n\t\t\t\t\t\tstockmaster.controlled,\n\t\t\t\t\t\t(case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end) as quantity ,\n\t\t\t\t\t\tstockmoves.narrative,\n\t\t\t\t\t\tstockmaster.units,\n\t\t\t\t\t\tstockmaster.decimalplaces,\n\t\t\t\t\t\tstockmoves.discountpercent,\n\t\t\t\t\t\tstockmoves.discountpercent1,\n\t\t\t\t\t\tstockmoves.discountpercent2,\n\t\t\t\t\t\t((case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end)*(stockmoves.price + (stockmoves.price * IF(stockmovestaxes.taxrate IS NULL, 0, stockmovestaxes.taxrate)))) AS fxnet,\n\t\t\t\t\t\t((case when stockmoves.type not in (11,65) then stockmoves.qty*-1 else qty end)*(stockmoves.price + (stockmoves.price * IF(stockmovestaxes.taxrate IS NULL, 0, stockmovestaxes.taxrate))))-totaldescuento as subtotal,\n\t\t\t\t\t\t(stockmoves.price + (stockmoves.price * IF(stockmovestaxes.taxrate IS NULL, 0, stockmovestaxes.taxrate))) AS fxprice,\n\t\t\t\t\t\tstockmoves.narrative,\n\t\t\t\t\t\tstockmaster.units,\n\t\t\t\t\t\tstockmaster.categoryid,\n\t\t\t\t\t\tstockmoves.loccode as almacen,\n\t\t\t\t\t\tstockmoves.showdescription,\n\t\t\t\t\t stockcategory.MensajePV\n\t\t\t\t\tFROM stockmoves inner join stockmaster ON stockmoves.stockid = stockmaster.stockid\n\t\t\t\t\t\t\t\tinner join stockcategory on stockcategory.categoryid = stockmaster.categoryid\n\t\t\t\t\t\t\t\tleft JOIN stockmovestaxes ON stockmovestaxes.stkmoveno=stockmoves.stkmoveno \n\t\t\t\tWHERE stockmoves.stockid = stockmaster.stockid\n\t\t\t\t\tAND stockmoves.type='.$TypeInvoice.'\n\t\t\t\t\tAND stockmoves.transno=' . $InvoiceNo . '\n\t\t\t\t\tAND stockmoves.tagref=' . $tag . '\n\t\t\t\t\tAND stockmoves.show_on_inv_crds=1\n\t\t\t\t\tAND stockcategory.categoryid = stockmaster.categoryid';\n\t\t}\n\t\t\n\t\t$resultdetails=DB_query($sqldetails,$db);\n\t\twhile ($myrow2=DB_fetch_array($resultdetails)){\n\t\t\t$stockid=$myrow2['stockid'];\n\t\t\t$charelectronicdetail=$charelectronicdetail.$charelectronicinidet.'|'.$stockid;\n\t\t\t$stockid=$myrow2['stockid'];\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockid;\n\t\t\t$stockcantidad=FormatNumberERP($myrow2['quantity']);\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockcantidad;\n\t\t\t$stockdescrip=$myrow2['description'].' '.$myrow['ordertype'];\n\t\t\t// valores de los vendedorfees por linea\n\t\t\t$descrprop=\" (\";\n\t\t\t$sqlpropertyes=\"SELECT distinct p.InvoiceValue as val,sp.label\n\t\t\t FROM salesstockproperties p, stockcatproperties sp, stockmaster sm\n\t\t\t WHERE p.stkcatpropid=sp.stkcatpropid\n\t\t\t AND sp.categoryid=sm.categoryid\n\t\t\t\t AND p.orderno=\" . $orderno . \"\n\t\t\t\t AND p.typedocument=\" . $TypeInvoice . \"\n\t\t\t\t \t\tAND sp.reqatprint=1\n\t\t\t\t AND sm.stockid='\" . $stockid . \"'\";\n\t\t\t$resultpropertyes=DB_query($sqlpropertyes,$db);\n\t\t\t$xt=0;\n\t\t\twhile ($myrowprop=DB_fetch_array($resultpropertyes)){\n\t\t\t\t$traba=explode(\" \",$myrowprop['val']);\n\t\t\t\t$trab=$traba[0];\n\t\t\t\tif ($xt==0){\n\n\t\t\t\t\t$descrprop=$descrprop.' '.$myrowprop['label'].':'.$trab;\n\t\t\t\t}else{\n\t\t\t\t\t$descrprop=$descrprop.\" , \".$myrowprop['label'].':'.$trab;\n\t\t\t\t}\n\n\t\t\t\t$xt=$xt+1;\n\t\t\t}\n\t\t\t$descrprop=$descrprop.\" )\";\n\t\t\tif ($xt==0){//\n\t\t\t\t$descrprop=\"\";\n\t\t\t}\n\t\t\tif($myrow2['MensajePV'] <> \"\"){\n\t\t\t\t$descrprop = $descrprop.$myrow2['MensajePV'];\n\t\t\t}\n\t\t\t$descrnarrative=\"\";\n\t\t\t/*$sqlnarrative=\"SELECT narrative\n\t\t\t\tFROM salesorderdetails p\n\t\t\t\tWHERE p.orderno=\" . $orderno . \"\n\t\t\t\t AND p.stkcode='\" . $stockid . \"'\";\n\t\t\t$resultnarrative=DB_query($sqlnarrative,$db);\n\t\t\twhile ($myrownarrative=DB_fetch_array($resultnarrative)){\n\t\t\t\t$descrnarrative=$myrownarrative['narrative'];\n\t\t\t\t$descrnarrative=str_replace('|', '', $descrnarrative);\n\t\t\t}*/\n\t\t\t\n\t\t\t$descrnarrative=str_replace('\\r','',str_replace('\\n','',$myrow2['narrative']));\n\t\t\t$descrnarrative=str_replace('|', '', $descrnarrative);\n\t\t\t\n\t\t\tif (strlen($descrnarrative)==0){\n\t\t\t\t$descrnarrative=\"\";\n\t\t\t}\n\t\t\tif($myrow2['showdescription']==1){\n\t\t\t\t$stockdescripuno=$stockdescrip.$descrprop.$descrnarrative.$numberserie;\n\t\t\t}else{\n\t\t\t\tif (strlen($descrnarrative)==0){\n\t\t\t\t\t$stockdescripuno=$stockdescrip.$descrprop.$descrnarrative.$numberserie;\n\t\t\t\t}else{\n\t\t\t\t\t$stockdescripuno=$descrnarrative;\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockdescripuno;\n\t\t\t$stockprecio=FormatNumberERP($myrow2['fxprice']);\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockprecio;\n\t\t\t$stockneto=FormatNumberERP($myrow2['fxnet']);\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockneto;\n\t\t\t$stockunits=$myrow2['units'];\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockunits;\n\t\t\t$stockcat=$myrow2['categoryid'];\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockcat;\n\t\t\t$ordencompra=\"\";\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$ordencompra;\n\t\t\t// descuentos\n\t\t\t$discount1=FormatNumberERP($myrow2['discountpercent']*100);\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$discount1;\n\t\t\t$discount2=FormatNumberERP($myrow2['discountpercent1']*100);\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$discount2;\n\t\t\t$discount3=FormatNumberERP($myrow2['discountpercent2']*100);\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$discount3;\n\t\t\t//subtotal\n\t\t\t//$subtotal=number_format($myrow2['subtotal'],2,'.','');\n\t\t\t//$charelectronicdetail=$charelectronicdetail.'|'.$subtotal;\n\t\t\t// consulta de aduana\n\t\t\t$stkmoveno=$myrow2['stkmoveno'];\n\t\t\t$almacen=$myrow2['almacen'];\n\n\t\t\t$sqlstockmovestaxes=\"SELECT stkmoveno,taxauthid,taxrate,taxcalculationorder,taxontax,taxauthorities.description\n\t\t\t\t\t FROM stockmovestaxes,taxauthorities\n\t\t\t\t\t WHERE taxauthorities.taxid=stockmovestaxes.taxauthid\n\t\t\t\t\t\t AND stkmoveno=\".$stkmoveno;\n\t\t\t$resultstockmovestaxes=DB_query($sqlstockmovestaxes,$db);\n\t\t\twhile ($myrow3=DB_fetch_array($resultstockmovestaxes)){\n\t\t\t\t$impuesto=$myrow3['description'];\n\t\t\t\t$charelectronictaxs=$charelectronictaxs.$charelectronictaxsini.'|'.$impuesto;\n\t\t\t\t$taxrate=FormatNumberERP($myrow3['taxrate']*100);\n\t\t\t\t$charelectronictaxs=$charelectronictaxs.'|'.$taxrate;\n\t\t\t\t$taxratetotal=FormatNumberERP($myrow3['taxrate']*($myrow2['subtotal']));\n\t\t\t\t//$taxtotalratex=$myrow3['taxrate']*($myrow2['fxnet']*$myrow2['fxprice']);\n\t\t\t\t$taxtotalratex=$myrow3['taxrate']*($myrow2['subtotal']);\n\t\t\t\t$charelectronictaxs=$charelectronictaxs.'|'.$taxratetotal;\n\t\t\t}\n\n\t\t\t$subtotal=FormatNumberERP($myrow2['subtotal']+$taxtotalratex);\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$subtotal;\n\t\t\t$subtotal=FormatNumberERP($myrow2['subtotal']+$taxtotalratex);\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$subtotal;\n\n\n\t\t\t$sqladuana=\"SELECT stockserialitems.customs as aduana,customs_number as noaduana,\n\t\t\t\t\tpedimento, DATE_FORMAT(customs_date,'%Y-%m-%d') as fechaaduana\n\t\t\t\t FROM stockserialmoves , stockmoves , stockserialitems\n\t\t\t\t WHERE stockmoves.stkmoveno=stockserialmoves.stockmoveno\n\t\t\t\t\tAND stockserialmoves.stockid=stockserialitems.stockid\n\t\t\t\t\tAND stockserialmoves.serialno=stockserialitems.serialno\n\t\t\t\t\tAND stockserialitems.loccode='\".$almacen.\"'\n\t\t\t\t\tAND stockmoves.stkmoveno=\".$stkmoveno.\"\n\t\t\t\t\tAND stockmoves.stockid='\".$stockid.\"'\";\n\t\t\t$Result= DB_query($sqladuana,$db);\n\t\t\tif (DB_num_rows($Result)==0) {\n\t\t\t\t$nameaduana=\"\";\n\t\t\t\t$numberaduana=\"\";\n\t\t\t\t$fechaaduana=\"\";\n\t\t\t}else{\n\t\t\t\t$myrowaduana = DB_fetch_array($Result);\n\t\t\t\t$aduana=$myrowaduana['aduana'];\n\t\t\t\t$separaaduana=explode(\"|\",$aduana);\n\t\t\t\t$nameaduana = $separaaduana[0];\n\t\t\t\t$numberaduana= $separaaduana[1];\n\t\t\t\t$fechaaduana= $separaaduana[2];\n\t\t\t\tif (strlen($nameaduana)==0 or strlen($numberaduana)==0 /*or !Is_Date($fechaaduana)*/){\n\t\t\t\t\t$nameaduana=\"\";\n\t\t\t\t\t$numberaduana=\"\";\n\t\t\t\t\t$fechaaduana=\"\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($myrow['type'] == 66) { // Si es factura remision\n\n\t\t\t\t$ordernotmp = $myrow['orderno'];\n\n\t\t\t\t$SQL = \"\n\t\t\t\t\tSELECT GROUP_CONCAT(debtortrans.order_) AS order_\n\t\t\t\t\tFROM invoicetoremision\n\t\t\t\t\tINNER JOIN debtortrans\n\t\t\t\t\tON debtortrans.id = invoicetoremision.idremision\n\t\t\t\t\tWHERE invoicetoremision.idinvoice = '{$myrow['iddocto']}'\n\t\t\t\t\";\n\n\t\t\t\t$rstmp = DB_query($SQL, $db);\n\t\t\t\t$rowtmp = DB_fetch_array($rstmp);\n\t\t\t\t$ordernotmp = $rowtmp['order_'];\n\n\t\t\t\tif(empty($ordernotmp) == FALSE) {\n\n\t\t\t\t\t$SQL = \"\n\t\t\t\t\t\tSELECT\n\t\t\t\t\t\tDATE_FORMAT(purchorderdetails.datecustoms,'%Y-%m-%d') AS fechaaduana,\n\t\t\t\t\t\tpedimento,\n\t\t\t\t\t\tcustoms AS aduana\n\t\t\t\t\t\tFROM purchorders\n\t\t\t\t\t\tINNER JOIN purchorderdetails\n\t\t\t\t\t\tON purchorderdetails.orderno = purchorders.orderno\n\t\t\t\t\t\tWHERE purchorders.requisitionno IN ($ordernotmp)\n\t\t\t\t\t\tAND purchorderdetails.itemcode = '$stockid'\n\t\t\t\t\t\";\n\n\t\t\t\t\t$rstmp = DB_query($SQL, $db);\n\n\t\t\t\t\tif($rowtmp = DB_fetch_array($rstmp)) {\n\t\t\t\t\t\t$fechaaduana = $rowtmp['fechaaduana'];\n\t\t\t\t\t\t$numberaduana = $rowtmp['pedimento'];\n\t\t\t\t\t\t$nameaduana = $rowtmp['aduana'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$nameaduana;\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$numberaduana;\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$fechaaduana;\n\n\t\t\t/*$stockprecio=number_format($myrow2['fxnet']+$taxtotalratex,2,'.','');\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockprecio;\n\t\t\t$stockneto=number_format($myrow2['fxnet']+$taxtotalratex,2,'.','');\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockneto;\n\t\t\t$stockunits=$myrow2['units'];\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockunits;\n\t\t\t$stockcat=$myrow2['categoryid'];\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$stockcat;\n\t\t\t$ordencompra=\"\";\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$ordencompra;\n\t\t\t// descuentos\n\t\t\t$discount1=number_format($myrow2['discountpercent']*100,2,'.','');\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$discount1;\n\t\t\t$discount2=number_format($myrow2['discountpercent1']*100,2,'.','');\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$discount2;\n\t\t\t$discount3=number_format($myrow2['discountpercent2']*100,2,'.','');\n\t\t\t$charelectronicdetail=$charelectronicdetail.'|'.$discount3;\n\t\t\t//subtotal*/\n\n\t\t}\n\t}\n\t\n\t// ivas retenidos\n//\t$charelectronictaxsret='|'.chr(13).chr(10);//.'07|ISR|0.00';\n\tif ($rfccliente==\"XAXX010101000\"){\n\t\t$cadenaenvio=$charelectronic.$charelectronicdetail.$charelectronictaxsret.$charelectronictaxsfederal.$charelectronictaxslocal.$charelectronicEmbarque;\n\t\t$cadenaenviada=$cadenaenvio;//retornarString($cadenaenvio);\n\t}else{\n\t\t$cadenaenvio=$charelectronic.$charelectronicdetail.$charelectronictaxsfederal.$charelectronictaxs.$charelectronictaxslocal.$charelectronicEmbarque;\n\t\t$cadenaenviada=$cadenaenvio;//retornarString($cadenaenvio);\n\n\t}\n\t//echo $cadenaenviada;\n\treturn $cadenaenviada;\n}", "public function sendMileStoneInvoiceToClient($project_id, $project_payment){\n \n\t\t\t$logedInuser = Auth::user();\n $project = Project::where('id',$project_id)->where('user_id', $logedInuser->id)->first();\n\t $admincomission = $this->comission->getComission();\n\t $pdf =$this->project->returnClientInvoicePdf($project, $project_payment, $admincomission);\n\t \n $email = $logedInuser->email;\n $client_name = $logedInuser->first_name;\n\n $data[\"email\"]= $email;\n $data[\"subject\"]='Milestone Invoice';\n $data[\"client_name\"]=$client_name;\n try{\n \\Mail::send('EmailTemplate.milestone-invoice', $data, function($message)use($data,$pdf) {\n $message->to($data[\"email\"], $data[\"client_name\"])\n ->subject($data[\"subject\"])\n ->attachData($pdf->output(), \"Invoice.pdf\");\n });\n }catch(\\Exception $exception){\n // \n }\n }", "public function send() {\r\n \r\n // Update the database...\r\n $update = $this->db->update(\"invoices\",$this->id,[\"status_id\"=>2]);\r\n $_SESSION['message'] = 'Invoice sent.';\r\n return $update;\r\n }", "public function createInvoice($data) {\r\n //get authorisation from headers\r\n $headers = getallheaders();\r\n $auth = $headers[\"Authorization\"];\r\n\r\n //check authorization\r\n $role = $this->authenticate($auth);\r\n if ($role !== 'trader') {\r\n throw new RestException(401, \"Unauthorized\");\r\n }\r\n\r\n $invoice = new Invoice();\r\n\r\n $invoice->invoicedate = (isset($data->invoicedate) && $this->validMySQLDate($data->invoicedate)) ? $data->invoicedate : date('Y-m-d');\r\n if (isset($data->amount)) {\r\n $invoice->amount = $data->amount;\r\n } else {\r\n throw new RestException(400, \"amount not specified\");\r\n }\r\n $invoice->vatamount = isset($data->vatamount) ? $data->vatamount : 0;\r\n $invoice->paymenttype = isset($data->paymenttype) ? $data->paymenttype : 'cash';\r\n $invoice->chequenumber = isset($data->chequenumber) ? $data->chequenumber : 0;\r\n if (isset($data->clientid)) {\r\n $invoice->clientid = $data->clientid;\r\n } else {\r\n throw new RestException(400, \"clientid not specified\");\r\n }\r\n if (isset($data->productid)) {\r\n if(!Product::find_by_id($data->productid)) {\r\n throw new RestException(400, \"product doesn't exist\");\r\n }\r\n $invoice->productid = $data->productid;\r\n } else {\r\n throw new RestException(400, \"productid not specified\");\r\n }\r\n//return $invoice;\r\n $result = $invoice->save();\r\n if ($result) {\r\n return $invoice;\r\n } else {\r\n throw new RestException(400, \"Unknown error - Invoice not created\");\r\n }\r\n }", "public function send()\n {\n if ($this->attachmentContainer->hasAttachments()) {\n foreach ($this->attachmentContainer->getAttachments() as $attachment) {\n //check type of invoice and configuration for attachment\n $config = $this->helper->getConfig('pdfpro/general/'.$attachment->getData('config').'_email_attach');\n if ($config == \\Vnecoms\\PdfPro\\Model\\Source\\Attach::ATTACH_TYPE_BOTH ||\n $config == \\Vnecoms\\PdfPro\\Model\\Source\\Attach::ATTACH_TYPE_CUSTOMER) {\n $this->transportBuilder->addAttachment($attachment);\n }\n }\n $this->attachmentContainer->resetAttachments();\n }\n parent::send();\n }", "function SAP_set_order_multy($rec_id)\n{\n/*\n\tThis FUNCTION posts SD order \n\tINPUT: id of invoice\n\tOUTPUT:\n\t\t\t- \"ID\" of SD order\n\t\t\tOR \"0\" - if failed\n*/\n\tinclude(\"login_re.php\");\n\tini_set(\"soap.wsdl_cache_enabled\", \"0\");\n\n\t//THESE PARAMS ARE FIXED NOW\n\t$cond_type='ZPR0';\t\n\t\n\t$service_mode='SO_C';\t// CREATE\t\n\t$req = new Request();\n\t \n\t\t\t//Setting up the object\n\t\t\t$item= new Item();\n\t\t\n\t\t//Set up mySQL connection\n\t\t\t$db_server = mysqli_connect($db_hostname, $db_username,$db_password);\n\t\t\t$db_server->set_charset(\"utf8\");\n\t\t\tIf (!$db_server) die(\"Can not connect to a database!!\".mysqli_connect_error($db_server));\n\t\t\tmysqli_select_db($db_server,$db_database)or die(mysqli_error($db_server));\n\t//1.\t\n\t\t// LOCATE data for the invoice\n\t\t\t$invoice_sql=\"SELECT invoice.date,invoice.value,contract.id_SAP,currency.code,invoice.month,invoice.year \n\t\t\t\t\t\t\tFROM invoice \n\t\t\t\t\t\t\tLEFT JOIN contract ON invoice.contract_id=contract.id \n LEFT JOIN currency ON invoice.currency=currency.id\n\t\t\t\t\t\t\tWHERE invoice.id=$rec_id\";\n\t\t\t\t\n\t\t\t$answsql=mysqli_query($db_server,$invoice_sql);\n\t\t\t\t\n\t\t\tif(!$answsql) die(\"Database SELECT TO invoice table failed: \".mysqli_error($db_server));\t\n\t\t\tif (!$answsql->num_rows)\n\t\t\t{\n\t\t\t\techo \"WARNING: No invoice found for a given ID in invoice TABLE <br/>\";\n\t\t\t\treturn 0;\n\t\t\t}\t\n\t\t\t$i_data= mysqli_fetch_row($answsql);\n\t\t\t\t\n\t\t\t\n\t//2.\t\n\t\t\t// Prepare request for SAP ERPclass Item\n\t\n\t\t\t// Set up params\n\t\t\t\n\t\t\t$c_date=$i_data[0];\n\t\t\t$val=$i_data[1];\n\t\t\t$contract_id=$i_data[2];\n\t\t\t$curr=$i_data[3];\t// Currency in invoice\n\t\t\t$c_month=$i_data[4];\n\t\t\t$c_year=$i_data[5];\n\t\t\t$srv_date='';\n\t\t\t$m_date='';\n\t\t\t//SET UP SERVICE DATE - END OF THE BILLING PERIOD\n\t\t\tswitch($c_month)\n\t\t\t{\n\t\t\t\tcase '1':\n\t\t\t\t$m_date='-01-31';\n\t\t\t\tbreak;\n\t\t\t\tcase '2':\n\t\t\t\t$m_date='-02-28';\n\t\t\t\tbreak;\n\t\t\t\tcase '3':\n\t\t\t\t$m_date='-03-31';\n\t\t\t\tbreak;\n\t\t\t\tcase '4':\n\t\t\t\t$m_date='-04-30';\n\t\t\t\tbreak;\n\t\t\t\tcase '5':\n\t\t\t\t$m_date='-05-31';\n\t\t\t\tbreak;\n\t\t\t\tcase '6':\n\t\t\t\t$m_date='-06-30';\n\t\t\t\tbreak;\n\t\t\t\tcase '7':\n\t\t\t\t$m_date='-07-31';\n\t\t\t\tbreak;\n\t\t\t\tcase '8':\n\t\t\t\t$m_date='-08-31';\n\t\t\t\tbreak;\n\t\t\t\tcase '9':\n\t\t\t\t$m_date='-09-30';\n\t\t\t\tbreak;\n\t\t\t\tcase '10':\n\t\t\t\t$m_date='-10-31';\n\t\t\t\tbreak;\n\t\t\t\tcase '11':\n\t\t\t\t$m_date='-11-30';\n\t\t\t\tbreak;\n\t\t\t\tcase '12':\n\t\t\t\t$m_date='-12-31';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$srv_date='20'.$c_year.$m_date;\n\t\t\t\n\t\t\t// Preparing Items for Invoice\n\t\t\t\n\t\t\t// LOCATE POSITIONS for the invoice\n\t\t\t$positions_sql=\"SELECT service_id,quantity,service.id_SAP \n\t\t\t\t\t\t\tFROM invoice_reg \n\t\t\t\t\t\t\tLEFT JOIN service ON invoice_reg.service_id=service.id\n\t\t\t\t\t\t\tWHERE invoice_id=$rec_id\";\n\t\t\t\t\n\t\t\t$answsql1=mysqli_query($db_server,$positions_sql);\n\t\t\t\t\n\t\t\tif(!$answsql1) die(\"Database SELECT TO invoice_reg table failed: \".mysqli_error($db_server));\t\n\t\t\t$count_in=$answsql1->num_rows;\n\t\t\tif (!$count_in)\n\t\t\t{\n\t\t\t\techo \"WARNING: No POSITIONS found for a given ID in invoice_reg TABLE <br/>\";\n\t\t\t\treturn 0;\n\t\t\t}\t\n\t\t\t\t\n\t\t\t\t$items=new ItemList();\n\t\t\t\tfor($it=0;$it<$count_in;$it++)\n\t\t\t\t{\t\n\t\t\t\t\t$pos_data= mysqli_fetch_row($answsql1);\n\t\t\t\t\t$item1 = new Item();\n\t\t\t\t\t// 1. Item number\n\t\t\t\t\t$item_num=($it+1).'0';\n\t\t\t\t\t$item1->ITM_NUMBER=$item_num;\n\t\t\t\n\t\t\t\t\t// 2. Material code\n\t\t\t\t\t$item1->MATERIAL=$pos_data[2];\n\t\t\t\n\t\t\t\t\n\t\t\t\t// 3. Currency ?? - need it?\n\t\t\t\t\t$item1->CURRENCY=$curr;\n\t\t\t\t\n\t\t\t\t\t// 4. SD conditions\n\t\t\t\t\t$item1->COND_TYPE=$cond_type;\n\t\t\t\t\t$item1->COND_VALUE=$val;\n\t\t\t\t\n\t\t\t\t\t// 4. Quantity\n\t\t\t\t\t$item1->TARGET_QTY=$pos_data[1];; \n\t\t\t\t\n\t\t\t\n\t\t\t\t\t//Inserting into Item List\n\t\t\t\n\t\t\t\t\t$items->item[$it] = $item1;\n\t\t\t\t}\n\t\t\t\n\t\t// GENERAL SECTION (HEADER)\n\t\t\n\t\t\t$req->ID_SALESCONTRACT = $contract_id;\t\n\t\t\t$req->SERVICEMODE = $service_mode; \t\t\n\t\t\t$req->BILLDATE=$c_date;\n\t\t\t$req->SALES_ITEMS_IN=$items;\n\t\t\t$req->SERVICEDATE=$srv_date;\n\t\t\t$req->RETURN2 = '';\n\t\t\t//echo \"SENDING TO SAP\";\n\t\t\t$order=SAP_connector($req);\n\t\t\tif ($order->RETURN2->item->MESSAGE==\"SUCCESS\")\n\t\t\t\t$doc_id=$order->RETURN2->item->MESSAGE_V4;\n\t\t\telse\n\t\t\t\t$doc_id=0;\n\t\t\t\n\tmysqli_close($db_server);\n\treturn $doc_id;\n}", "public function processApiInvoice($invoice)\n {\n if($this->_logging){\n Mage::log('In processApiInvoice (Postpayment)', null, $this->_logfile);\n }\n $order = $invoice->getOrder();\n // Request model, data model, product line model, total line model\n $v2RqstMdl = new Tritacv2_Model_InvoiceRequestV2Model();\n $v2DataMdl = new Tritacv2_Model_InvoicePdfDataModel();\n $v2ProdMdlArray = $this->getProductLines($order);\n $v2TtlMdlArray = $this->getOrderTotals($order);\n $shopName = Mage::app()->getStore()->getFrontendName();\n $v2DataMdl->setShopName($shopName);\n $v2DataMdl->setDescription('');\n $v2DataMdl->setProductLines($v2ProdMdlArray);\n $v2DataMdl->setTotalLines($v2TtlMdlArray);\n // finally fill request model:\n $v2RqstMdl->setTransactionNumber($invoice->getTransactionId());\n $v2RqstMdl->setInvoiceNumber($invoice->getIncrementId());\n $objDateTime = new DateTime('NOW');\n $v2RqstMdl->setInvoiceDate($objDateTime);\n $v2RqstMdl->setInvoiceAmount(Mage::helper('capayable')->convertToCents($invoice->getGrandTotal()));\n $v2RqstMdl->setInvoiceDescription(Mage::helper('capayable')->__('Order').' '.$order->getIncrementId());\n $v2RqstMdl->setInvoicePdfSubmitType('INCLUDED_DATA');\n $v2RqstMdl->setCultureCode('nl-NL');\n $v2RqstMdl->setInvoicePdfData($v2DataMdl);\n try {\n $publicKey = Mage::getStoreConfig('payment/capayable/public_key');\n $apiConfig = new Tritacv2_Configuration();\n $apiConfig->setApiKey('apikey', $publicKey); // test key 'f2d2a2aee085bfcde02d3b50e30a7394efcd49e5'\n //$apiConfig->setHost('https://capayable-api-acc.tritac.com');\n if($this->_logging) {\n Mage::log('In processApiInvoice (Postpayment) dit is url ' . $this->_url, null, $this->_logfile);\n }\n $apiConfig->setHost($this->_url);\n $apiClient = new Tritacv2_ApiClient($apiConfig);\n $invoiceApi = new Tritacv2_Api_InvoiceApi($apiClient);\n $result = $invoiceApi->invoiceV2Post($v2RqstMdl);\n if($this->_logging) {\n Mage::log('In checkCredit (Postpayment) result : ', null, $this->_logfile);\n Mage::log($result, null, $this->_logfile);\n }\n if($result->getIsAccepted() == true || $result->getIsAccepted() == 1) {\n return true;\n } else {\n return false;\n }\n } catch (Exception $e) {\n Mage::log('Exception when calling creditCheckApi->creditCheckV2Post: '. $e->getMessage(), null, $this->_logfile);\n }\n\n //return $response['IsAccepted'];\n }", "public function index()\n {\n $invoice = new CheckoutInvoice();\n $invoice->addItem(\"Chaussures Croco\", 3, 10000, 30000, \"Chaussures faites en peau de crocrodile authentique qui chasse la pauvreté\");\n $ticker = Rendez_vous::where('user_id', '=', Auth::guard('web')->user()->id)->where('status','=',1 )->where('date_medecin', '>=' ,Carbon::today())->first();\n // dd($ticker->medecin->prix);\n $invoice->setTotalAmount($ticker->medecin->prix);\n $invoice->setCallbackUrl(\"http://fathomless-escarpment-76115.herokuapp.com\");\n \n\n\n if($invoice->create()) {\n $ticker = Rendez_vous::where('user_id', '=', Auth::guard('web')->user()->id)->where('status','=',1 )->where('date_medecin', '>=' ,Carbon::today())->first();\n $ticker->prix = $ticker->medecin->prix;\n $ticker->save();\n return redirect(url($invoice->getInvoiceUrl()));\n }else{\n dd($invoice->response_text);\n }\n }" ]
[ "0.719734", "0.69265467", "0.6851756", "0.67214566", "0.67004335", "0.66459435", "0.64845693", "0.6453327", "0.64513993", "0.6436349", "0.64091897", "0.6402537", "0.6348803", "0.6347242", "0.6217012", "0.62068886", "0.62041056", "0.6181446", "0.6172327", "0.61466604", "0.61259586", "0.61011064", "0.6100029", "0.60787225", "0.60665137", "0.60636896", "0.6057707", "0.6032496", "0.60266227", "0.60252476" ]
0.6937457
1
Get the rating number and convert it to ticket icons
function get_rating($post_ID){ // Get ratings term(s) $terms = get_the_terms( $post_ID, 'rating' ); // Check to make sure we actually have rating terms if( $terms && ! is_wp_error( $terms ) ){ // Get just the first term object $term = reset($terms); // Set the term name (rating number) as the variable $rating $rating = $term->name; // Output tickets to match the number echo '<div class="ratings movie-tax">'; echo '<h4 class="movie-data-title">Rating</h4>'; echo '<a href="' . get_term_link( $term->slug, 'rating' ) . '" title="' . get_the_title($post_ID) . ' gets ' . $rating . ' of 5 tickets.">'; // Output one black ticket for each number (3 equals 3 tickets) for ($ticket = 0 ; $ticket < $rating; $ticket++){ echo '<i class="fa fa-ticket"></i>'; } // Output grey tickets for the remainder (5 - 3 = 2 tickets) for ($no_ticket = $rating ; $no_ticket < 5 ; $no_ticket++){ echo '<i class="fa fa-ticket grey"></i>'; } echo '</a>'; echo '</div>'; } // Endif }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tfnm_star_rating( $rating ){\n\t$image_name = floor( $rating );\n\t$decimal = $rating - $image_name;\n\n\tif( $decimal >= .5 ){\n\t\t$image_name .= '_half';\n\t}\n\n\treturn plugin_dir_url( dirname( __FILE__ ) ) . 'public/images/yelp_stars/web_and_ios/regular/regular_' . $image_name . '.png';\n}", "function getStarRating($rating){\r\n $statement = \"\";\r\n for($int= 0;$int<$rating;$int++){\r\n $statement .= \"<span class='fa fa-star checked' style='font-size:12px'></span>\";\r\n }\r\n return $statement;\r\n }", "function getStarRating($rating){\r\n $statement = \"\";\r\n for($int= 0;$int<$rating;$int++){\r\n $statement .= \"<span class='fa fa-star checked' style='font-size:12px'></span>\";\r\n }\r\n return $statement;\r\n }", "function wc_rating_star_markup( $product_id ){\n if(get_post_type($product_id) == 'product'){\n $rating = get_post_meta( $product_id, '_wc_average_rating', true );\n $rating = floor($rating);\n \n for($star = 0; $star < $rating; $star++) { \n echo '<svg class=\"rating rating--active list-item__meta-icon icon\"><use xlink:href=\"' . get_template_directory_uri() . '/img/symbol-defs.svg#icon-star\"></use></svg>';\n } \n \n for($star = $rating; $star < 5; $star++){ \n echo '<svg class=\"rating list-item__meta-icon icon\"><use xlink:href=\"' . get_template_directory_uri() . '/img/symbol-defs.svg#icon-star\"></use></svg>';\n }\n }\n}", "function flatsome_get_rating_html( $rating, $count = 0 ) {\n\tglobal $product;\n\t$review_count = $product->get_review_count();\n\n\t$style = get_theme_mod( 'product_info_review_count_style', 'inline' );\n\t// Default to 'simple' when review count visibility is disabled.\n\t$style = get_theme_mod( 'product_info_review_count' ) ? $style : 'simple';\n\n\tif ( $rating > 0 ) {\n\t\tswitch ( $style ) {\n\t\t\tcase 'tooltip':\n\t\t\t\t$title = sprintf( _n( '%s customer review', '%s customer reviews', $review_count, 'woocommerce' ), $review_count );\n\t\t\t\t$html = '<a href=\"#reviews\" class=\"woocommerce-review-link\" rel=\"nofollow\">';\n\t\t\t\t$html .= '<div class=\"star-rating tooltip\" title=\"' . esc_attr( $title ) . '\">';\n\t\t\t\t$html .= wc_get_star_rating_html( $rating, $count );\n\t\t\t\t$html .= '</div>';\n\t\t\t\t$html .= '</a>';\n\t\t\t\tbreak;\n\t\t\tcase 'inline':\n\t\t\t\t$html = '<div class=\"star-rating star-rating--inline\">';\n\t\t\t\t$html .= wc_get_star_rating_html( $rating, $count );\n\t\t\t\t$html .= '</div>';\n\t\t\t\tbreak;\n\t\t\tcase 'stacked':\n\t\t\t\t$html = '<div class=\"star-rating\">';\n\t\t\t\t$html .= wc_get_star_rating_html( $rating, $count );\n\t\t\t\t$html .= '</div>';\n\t\t\t\tbreak;\n\t\t\tcase 'simple':\n\t\t\t\t$html = '<a href=\"#reviews\" class=\"woocommerce-review-link\" rel=\"nofollow\">';\n\t\t\t\t$html .= '<div class=\"star-rating\">';\n\t\t\t\t$html .= wc_get_star_rating_html( $rating, $count );\n\t\t\t\t$html .= '</div>';\n\t\t\t\t$html .= '</a>';\n\t\t\t\tbreak;\n\t\t}\n\t} else {\n\t\t$html = '';\n\t}\n\treturn apply_filters( 'woocommerce_product_get_rating_html', $html, $rating, $count );\n}", "public function getStarImageHTML()\n {\n $message = 'num votes = ' . $this->numVotes;\n die($message);\n\n if ($this->numVotes < 1){\n return '(no votes yet)';\n }\n\n if ($this->voteAverage > 80){\n return '<img src=\"images/stars5.png\" alt=\"five starts star\">';\n }\n\n if ($this->voteAverage > 60){\n return '<img src=\"images/stars4.png\" alt=\"four star\">';\n }\n\n if ($this->voteAverage > 45){\n return '<img src=\"images/stars3.png\" alt=\"three star\">';\n }\n\n if ($this->voteAverage > 25){\n return '<img src=\"images/stars2.png\" alt=\"two star\">';\n }\n\n if ($this->voteAverage > 10){\n return '<img src=\"images/stars1.png\" alt=\"one star\">';\n }\n\n // if get here, just give half a star\n return '<img src=\"images/starsHalf.png\" alt=\"half star\">';\n\n }", "public function getRating();", "public function getRating();", "function constructRating($rating) {\n $imgTags = \"\";\n \n // first output the gold stars\n for ($i=0; $i < $rating; $i++) {\n $imgTags .= '<img src=\"images/star-gold.svg\" width=\"16\" />';\n }\n \n // then fill remainder with white stars\n for ($i=$rating; $i < 5; $i++) {\n $imgTags .= '<img src=\"images/star-white.svg\" width=\"16\" />';\n } \n \n return $imgTags; \n}", "function constructRating($rating) {\n $imgTags = \"\";\n\n // first output the gold stars\n for ($i=0; $i < $rating; $i++) {\n $imgTags .= '<img src=\"images/star-gold.svg\" width=\"16\" />';\n }\n\n // then fill remainder with white stars\n for ($i=$rating; $i < 5; $i++) {\n $imgTags .= '<img src=\"images/star-white.svg\" width=\"16\" />';\n }\n\n return $imgTags;\n}", "public function get_icon() {\n $skillIcons = get_field('listing_skill_icons', 'option');\n $randIcon = array_rand($skillIcons, 1);\n $icon = $skillIcons[$randIcon];\n return $icon;\n }", "public function getRating()\n\t{\n\t\treturn $this->ratings['rating'];\n\t}", "public function getRating(){\r\n\t\treturn $this->rating;\r\n\t}", "public function GetRating(){\n\t\treturn $this->rating;\n\t}", "function wgom_get_ratings_text() {\n\t$all_categories = get_the_category();\n\t$valid_category = false;\n\tforeach ($all_categories as $cat) {\n\t\tif (intval($cat->term_id) === 22) {\n\t\t\t$valid_category = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif ($valid_category === false) {\n\t\treturn;\n\t}\n\n\t$post_data = get_post_custom();\n\tif (is_array($post_data)) {\n\t\t$ratings_text = '';\n\n\t\t$ratings_users = array_key_exists('ratings_users', $post_data) ? intval($post_data['ratings_users'][0]) : 0;\n\t\t$ratings_score = array_key_exists('ratings_score', $post_data) ? intval($post_data['ratings_score'][0]) : 0;\n\n\t\tif ($ratings_users === 0) {\n\t\t\t$ratings_text = ' Rate it!';\n\t\t}\n\t\telse if ($ratings_users < 3) {\n\t\t\t$ratings_text = \" $ratings_users ratings\";\n\t\t}\n\t\telse {\n\t\t\t$ratings_avg = $ratings_score / $ratings_users;\n\t\t\t$avg_text = sprintf(\"%.1f\", $ratings_avg);\n\t\t\t$ratings_text = \" $ratings_users ratings: $avg_text avg\";\n\t\t}\n\n\t\treturn $ratings_text;\n\t}\n}", "function get_list_product_rating() {\n\n global $product;\n\n if ( ! wc_review_ratings_enabled() ) {\n \treturn;\n }\n\n echo wc_get_rating_html( $product->get_average_rating() ); // WordPress.XSS.EscapeOutput.OutputNotEscaped.\n\n }", "public static function get_rating_stars( $rating = '' ) {\n\t\tif ( ! $rating || empty( $rating ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$stars = '';\n\n\t\tfor ( $i = 0; $i < $rating; $i++ ) {\n\t\t\t$stars .= '<span>&#9734</span>';\n\t\t}\n\n\t\treturn $stars;\n\t}", "function convert_rating(){\n\t\t\t\tglobal $plugintable;\n\t\t\t\t$plugintable\t= \"pcontent\";\n\n\t\t\t\tif(!is_object($sqlcr)){ $sqlcr = new db; }\n\t\t\t\t$numr = $sqlcr -> db_Count(\"rate\", \"(*)\", \"WHERE (rate_table = 'article' || rate_table = 'review' || rate_table = 'content') \");\n\t\t\t\tif($numr > 0){\n\t\t\t\t\t$sqlcr -> db_Update(\"rate\", \"rate_table = '\".$plugintable.\"' WHERE (rate_table = 'article' || rate_table = 'review' || rate_table = 'content') \");\n\t\t\t\t}\n\t\t}", "function sf_get_product_stars() {\n\t\t\n\t\t$stars_output = \"\";\n\t\t\n\t global $wpdb;\n\t global $post;\n\t $count = $wpdb->get_var(\"\n\t\t SELECT COUNT(meta_value) FROM $wpdb->commentmeta\n\t\t LEFT JOIN $wpdb->comments ON $wpdb->commentmeta.comment_id = $wpdb->comments.comment_ID\n\t\t WHERE meta_key = 'rating'\n\t\t AND comment_post_ID = $post->ID\n\t\t AND comment_approved = '1'\n\t\t AND meta_value > 0\n\t\t\");\n\t\t\n\t\t$rating = $wpdb->get_var(\"\n\t\t SELECT SUM(meta_value) FROM $wpdb->commentmeta\n\t\t LEFT JOIN $wpdb->comments ON $wpdb->commentmeta.comment_id = $wpdb->comments.comment_ID\n\t\t WHERE meta_key = 'rating'\n\t\t AND comment_post_ID = $post->ID\n\t\t AND comment_approved = '1'\n\t\t\");\n\t\t\n\t\tif ( $count > 0 ) {\n\t\t\n\t\t $average = number_format($rating / $count, 2);\n\t\t\n\t\t $stars_output .= '<div class=\"starwrapper\" itemprop=\"aggregateRating\" itemscope itemtype=\"http://schema.org/AggregateRating\">';\n\t\t\n\t\t $stars_output .= '<span class=\"star-rating\" title=\"'.sprintf(__('Rated %s out of 5', 'woocommerce'), $average).'\"><span style=\"width:'.($average*16).'px\"><span itemprop=\"ratingValue\" class=\"rating\">'.$average.'</span> </span></span>';\n\t\t\n\t\t $stars_output .= '</div>';\n\t\t}\n\t\t\n\t\treturn $stars_output;\n\t}", "public function getRating()\n {\n return $this->rating;\n }", "public function getRating()\n {\n return $this->rating;\n }", "public function getRating()\n {\n return $this->rating;\n }", "function vcex_get_star_rating( $rating = '', $post_id = '', $before = '', $after = '' ) {\n\tif ( function_exists( 'wpex_get_star_rating' ) ) {\n\t\treturn wpex_get_star_rating( $rating, $post_id, $before, $after );\n\t}\n\tif ( $rating = get_post_meta( get_the_ID(), 'wpex_post_rating', true ) ) {\n\t\techo esc_html( $trating );\n\t}\n}", "function stars($model, $id, $data, $options, $enable) {\n $output = '';\n $starImage = Configure::read('Rating.starEmptyImageLocation');\n \n if (Configure::read('Rating.showUserRatingStars')) {\n $stars = $data['%RATING%'];\n } else {\n $stars = $data['%AVG%'];\n }\n \n for ($i = 1; $i <= $data['%MAX%']; $i++) {\n if ($i <= floor($stars)) {\n $starImage = Configure::read('Rating.starFullImageLocation');\n } else if ($i == floor($stars) + 1 && preg_match('/[0-9]\\.[5-9]/', $stars)) {\n $starImage = Configure::read('Rating.starHalfImageLocation');\n } else {\n $starImage = Configure::read('Rating.starEmptyImageLocation');\n }\n \n if (Configure::read('Rating.showUserRatingMark') && $i <= $data['%RATING%']) {\n $class = 'rating-user';\n } else {\n $class = 'rating';\n }\n \n if (!$enable) {\n $class .= '-disabled';\n }\n \n $htmlImage = $this->Html->image('/'.$starImage, \n array('class' => $class,\n 'id' => $model.'_rating_'.$options['name'].'_'.$id.'_'.$i,\n 'alt' => __('Rate it with ', true).$i));\n\n if (Configure::read('Rating.fallback')) {\n $output .= $this->Form->label($model.'.rating', \n $htmlImage, \n array('for' => $model.'Rating'.ucfirst($options['name']).$id.$i,\n 'class' => 'fallback'));\n } else {\n $output .= $htmlImage;\n }\n }\n\n return $output;\n }", "function getRating()\n {\n return $this->rating;\n }", "function GenerateRating($rating, $location) {\nglobal $setting, $template;\n\t\t\n\tif ($location == 'wallpaper') {\n\t\t$empty_star = '<img src=\"'.$setting['site_url'].$setting['template_url'].'/images/'.$template['wallpaper_empty_star'].'\" alt=\"Rating star\" />';\n\t\t$half_star = '<img src=\"'.$setting['site_url'].$setting['template_url'].'/images/'.$template['wallpaper_half_star'].'\" alt=\"Rating star\" />';\n\t\t$star = '<img src=\"'.$setting['site_url'].$setting['template_url'].'/images/'.$template['wallpaper_star'].'\" alt=\"Rating star\" />';\n\t}\n\telse if ($location == 'category') {\n\t\t$empty_star = '<img src=\"'.$setting['site_url'].$setting['template_url'].'/images/'.$template['category_empty_star'].'\" alt=\"Rating star\" />';\n\t\t$half_star = '<img src=\"'.$setting['site_url'].$setting['template_url'].'/images/'.$template['category_half_star'].'\" alt=\"Rating star\" />';\n\t\t$star = '<img src=\"'.$setting['site_url'].$setting['template_url'].'/images/'.$template['category_star'].'\" alt=\"Rating star\" />';\n\t}\n\telse if ($location == 'homepage') {\n\t\t$empty_star = '<img src=\"'.$setting['site_url'].$setting['template_url'].'/images/'.$template['homepage_empty_star'].'\" alt=\"Rating star\" />';\n\t\t$half_star = '<img src=\"'.$setting['site_url'].$setting['template_url'].'/images/'.$template['homepage_half_star'].'\" alt=\"Rating star\" />';\n\t\t$star = '<img src=\"'.$setting['site_url'].$setting['template_url'].'/images/'.$template['homepage_star'].'\" alt=\"Rating star\" />';\n\t}\n\telse {\n\t\t$empty_star = '<img src=\"'.$setting['site_url'].$setting['template_url'].'/images/'.$template['featured_empty_star'].'\" alt=\"Rating star\" />';\n\t\t$half_star = '<img src=\"'.$setting['site_url'].$setting['template_url'].'/images/'.$template['featured_half_star'].'\" alt=\"Rating star\" />';\n\t\t$star = '<img src=\"'.$setting['site_url'].$setting['template_url'].'/images/'.$template['featured_star'].'\" alt=\"Rating star\" />';\n\t}\n\n\t\n\tif ($rating <= 0 ){$rating_images = $empty_star.$empty_star.$empty_star.$empty_star.$empty_star;}\n\tif ($rating >= 0.5){$rating_images = $half_star.$empty_star.$empty_star.$empty_star.$empty_star;}\n\tif ($rating >= 1 ){$rating_images = $star.$empty_star.$empty_star.$empty_star.$empty_star;}\n\tif ($rating >= 1.5){$rating_images = $star.$half_star.$empty_star.$empty_star.$empty_star;}\n\tif ($rating >= 2 ){$rating_images = $star.$star.$empty_star.$empty_star.$empty_star;}\n\tif ($rating >= 2.5){$rating_images = $star.$star.$half_star.$empty_star.$empty_star;}\n\tif ($rating >= 3 ){$rating_images = $star.$star.$star.$empty_star.$empty_star;}\n\tif ($rating >= 3.5){$rating_images = $star.$star.$star.$half_star.$empty_star;}\n\tif ($rating >= 4 ){$rating_images = $star.$star.$star.$star.$empty_star;}\n\tif ($rating >= 4.5){$rating_images = $star.$star.$star.$star.$half_star;}\n\tif ($rating >= 5 ){$rating_images = $star.$star.$star.$star.$star;}\n\t\n\treturn $rating_images;\n// Get rating END\n}", "function DisplayRating($comment) {\n $rating = get_comment_meta(get_comment_ID(), 'crfp-rating', true);\n if ($rating == '') $rating = 0;\n return $comment.'<div class=\"crfp-rating crfp-rating-'.$rating.'\"></div>'; \n }", "function stars(){\n\n\n\t\tglobal $typeInt, $stars;\n\n\t\tif ($stars == '') return;\n\n\t\t$typearr = array(1,2,3,5,23);\n\n\t\tif (in_array($typeInt,$typearr)){\n\n\t\t\t$galleryLink = '<img src=\"/images/interface/'.$stars.'.star.hotel.gif\" alt=\"'.$stars.' star accommodation\" align=\"absbottom\" />';\n\n\t\treturn $galleryLink;\n\n\t\t}\n\n\t}", "public function viewreatingprogressber($productId){\n\t\t$count5star=0;\n\t\t$count4star=0;\n\t\t$count3star=0;\n\t\t$count2star=0;\n\t\t$count1star=0;\n\t\t$this->db->where('ProductId', $productId);\n\t\t$this->db->select('Rate');\n\t\t$this->db->from('tbl_review');\n\t\t$query=$this->db->get();\n\t\t$row=$query->result();\n\t\tforeach ($query->result() as $key) {\n\t\t\tswitch ($key->Rate) {\n\t\t\t\tcase '5':\n\t\t\t\t$count5star++;\n\t\t\t\tbreak;\n\t\t\t\tcase '4':\n\t\t\t\t$count4star++;\n\t\t\t\tbreak;\n\t\t\t\tcase '3':\n\t\t\t\t$count3star++;\n\t\t\t\tbreak;\n\t\t\t\tcase '2':\n\t\t\t\t$count2star++;\n\t\t\t\tbreak;\n\t\t\t\tcase '1':\n\t\t\t\t$count1star++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$totalstar=$count5star+$count4star+$count3star+$count2star+$count1star;\n\t\tif($totalstar!=0){\n\t\t\techo \"<h5>READER'S RATINGS</h5></br>\";\n\t\t\t$stardatawidth5=(($count5star/$totalstar)*100);\n\t\t\tif($count5star==0)\n\t\t\t{\n\t\t\t\techo \"<div id='myBar' class='five-star'>\".$count5star.\" &#9734;&#9734;&#9734;&#9734;&#9734;</div>\";\n\t\t\t}\n\t\t\tif($count5star>0)\n\t\t\t{\n\t\t\t\techo \"<div id='myBar' class='four-star' style='width:\".round($stardatawidth5).\"%'>\".$count5star.\" &#9734;&#9734;&#9734;&#9734;&#9734;</div>\";\n\t\t\t}\n\t\t\tif($count4star==0)\n\t\t\t{\n\t\t\t\techo \"<div id='myBar' class='five-star'>\".$count4star.\" &#9734;&#9734;&#9734;&#9734;</div>\";\n\t\t\t}\n\t\t\tif ($count4star>0) {\n\t\t\t\t$stardatawidth4=(($count4star/$totalstar)*100);\n\t\t\t\techo \"<div id='myBar' class='four-star' style='width:\".round($stardatawidth4).\"%'>\".$count4star.\" &#9734;&#9734;&#9734;&#9734;;</div>\";\n\t\t\t}\n\n\t\t\tif($count3star==0)\n\t\t\t{\n\t\t\t\techo \"<div id='myBar' class='three-star'>\".$count3star.\" &#9734;&#9734;&#9734;</div>\";\n\t\t\t}\n\t\t\tif($count3star>0)\n\t\t\t{\n\t\t\t\t$stardatawidth3=(($count3star/$totalstar)*100);\n\t\t\t\techo \"<div id='myBar' class='three-star' style='width:\".round($stardatawidth3).\"%'>\".$count3star.\" &#9734;&#9734;&#9734;;</div>\";\n\t\t\t}\n\t\t\tif($count2star==0)\n\t\t\t{\n\t\t\t\techo \"<div id='myBar' class='two-star'>\".$count2star.\" &#9734;&#9734;</div>\";\n\t\t\t}\n\t\t\tif($count2star>0)\n\t\t\t{\n\t\t\t\t$stardatawidth2=(($count2star/$totalstar)*100);\n\t\t\t\techo \"<div id='myBar' class='two-star' style='width:\".round($stardatawidth2).\"%'>\".$count2star.\" &#9734;&#9734;</div>\";\n\t\t\t}\n\t\t\tif($count1star==0)\n\t\t\t{\n\t\t\t\techo \"<div id='myBar' class='one-star'>\".$count1star.\" &#9734;</div>\";\n\t\t\t}\n\t\t\tif($count1star>00)\n\t\t\t{\n\t\t\t\t$stardatawidth1=(($count1star/$totalstar)*100);\n\t\t\t\techo \"<div id='myBar' class='one-star' style='width:\".round($stardatawidth1).\"%'>\".$count1star.\" &#9734;</div>\";\n\t\t\t}\n\t\t}\n\t}", "function getRating()\n{\n $actualRating = rand(0,50) / 10;\n\n $starFull = $actualRating;\n \n $starPartial = 0;\n\n if (is_float($starFull))\n {\n\n $starPartial = 1;\n\n $starFull = (int)$starFull;\n\n }\n\n $star_empty = 5 - $starFull - $starPartial;\n\n $ratingDisplay = '';\n\n for($i = 0; $i < $starFull; $i++) {\n $ratingDisplay .= 'Full Star ';\n }\n\n if ($starPartial)\n {\n $ratingDisplay .= 'Partial Star ';\n }\n\n for($i = 0; $i < $star_empty; $i++) {\n $ratingDisplay .= 'Empty Star ';\n }\n\n echo $ratingDisplay . ' (' . $actualRating . \")\";\n}" ]
[ "0.65088314", "0.6465425", "0.6465425", "0.6360103", "0.6141542", "0.59377337", "0.59347653", "0.59347653", "0.5902219", "0.5857425", "0.5835821", "0.5700769", "0.5687512", "0.5620322", "0.56183195", "0.5596763", "0.55681163", "0.5559081", "0.5539408", "0.55311424", "0.55311424", "0.55311424", "0.55277914", "0.5489349", "0.54689175", "0.5468456", "0.5428958", "0.53799963", "0.537145", "0.53654486" ]
0.6520808
0
Generated from protobuf field .io.token.proto.common.token.TokenPayload payload = 1;
public function setPayload($var) { GPBUtil::checkMessage($var, \Io\Token\Proto\Common\Token\TokenPayload::class); $this->payload = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function token(Payload $payload): Token;", "public function getPayload();", "public function getPayload();", "public function getPayload();", "public function setPayload($var)\n {\n GPBUtil::checkString($var, False);\n $this->payload = $var;\n\n return $this;\n }", "public function getJwtPayload(): array;", "public function tokenPayload(string $token)\n {\n return (array) JWT::decode($token, $this->JWTSecret, ['HS256']);\n }", "public function payload();", "public function payload();", "public function payload(Token $token, ?Options $options = null): Payload;", "public function getPayload()\n {\n return $this->payload;\n }", "public function getPayload()\n {\n return $this->payload;\n }", "public function getPayload()\n {\n return $this->payload;\n }", "public function getPayload()\n {\n return $this->payload;\n }", "public function getPayload()\n {\n return $this->payload;\n }", "protected function createPayload($token, $message)\n {\n $jsonBody = json_encode($message, JSON_FORCE_OBJECT);\n $token = preg_replace(\"/[^0-9A-Fa-f]/\", \"\", $token);\n $payload = chr(0) . pack(\"n\", 32) . pack(\"H*\", $token) . pack(\"n\", strlen($jsonBody)) . $jsonBody;\n\n return $payload;\n }", "public function getPayload() {\n return $this->payload;\n }", "public function getPayload() {\n return $this->payload;\n }", "public function get_payload();", "public function getPayload()\n {\n return $this->source['payload'];\n }", "public function createToken($payload)\n {\n $Sql = \"INSERT INTO db_token (user_id, jwt_token) VALUES (:user_id, :jwt_token)\";\n Parent::query($Sql);\n // Bind Params...\n Parent::bindParams('user_id', $payload['user_id']);\n Parent::bindParams('jwt_token', $payload['jwt_token']);\n\n $Token = Parent::execute();\n if ($Token) {\n return array(\n 'status' => true,\n 'data' => $payload\n );\n }\n\n return array(\n 'status' => false,\n 'data' => []\n );\n }", "public function parsePayload()\n { \n return $this->_payload;\n }", "public function getPayload() {\n return $this->_payload;\n }", "public function getPayload()\n {\n return @json_decode($this->body);\n }", "function getPayload();", "public function getPayload(): string\n {\n return $this->payload;\n }", "public function setPayload($payload);", "public function getPayload()\r\n\t{\r\n\t\treturn $this->getDecodedBody()->getBody();\r\n\t}", "public function getPayload(): array;", "public function getPayload(): array;" ]
[ "0.71368736", "0.65416044", "0.65416044", "0.65416044", "0.6533731", "0.639544", "0.6326058", "0.63208973", "0.63208973", "0.63121504", "0.62031347", "0.62031347", "0.62031347", "0.62031347", "0.62031347", "0.61897755", "0.61570585", "0.61570585", "0.61205906", "0.6106009", "0.60656536", "0.60271454", "0.6014908", "0.6003557", "0.59745276", "0.5972909", "0.59460485", "0.5899067", "0.5880243", "0.5880243" ]
0.7488697
0
Generated from protobuf field repeated .io.token.proto.common.security.Signature signatures = 2;
public function setSignatures($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Io\Token\Proto\Common\Security\Signature::class); $this->signatures = $arr; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSignatures($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Hyperledger\\Fabric\\Protos\\Common\\MetadataSignature::class);\n $this->signatures = $arr;\n\n return $this;\n }", "public function getSignatures(){\n return $this->signatures ? : [];\n }", "public function getSignatures()\n {\n return $this->signatures;\n }", "public function getSignatures()\n {\n return $this->signatures;\n }", "public function getSignatureParameters()\n {\n return $this->signatureParameters;\n }", "public function getSignature();", "public function setSignature($var)\n {\n GPBUtil::checkString($var, False);\n $this->signature = $var;\n }", "public function setSignature($var)\n {\n GPBUtil::checkString($var, True);\n $this->signature = $var;\n\n return $this;\n }", "public function setSignature($var)\n {\n GPBUtil::checkString($var, False);\n $this->signature = $var;\n\n return $this;\n }", "public function setSignature($var)\n {\n GPBUtil::checkString($var, False);\n $this->signature = $var;\n\n return $this;\n }", "public function mefSignature() {\r\n\t$encoded_header = base64_encode('{\"alg\": \"HS512\",\"typ\": \"JWT\"}');\r\n\t$iss = 'CISCAR';\r\n\tif(isset($_GET['annuaire']) && $_GET['annuaire'] == 2 )\r\n\t{\r\n\t\t\t$iss = 'GCR';\r\n\t}\r\n\t// base64 encodes the payload json\r\n\t$encoded_payload = base64_encode('{\r\n\t\t\t\"iat\": \"'.time().'\",\r\n\t\t\t\"iss\": \"'.$iss.'\",\r\n\t\t\t\"aud\": \"https://boxstva-client.stva.com\",\r\n\t\t\t\"sub\": \"'.$this->getIndividuID().'\",\r\n\t\t\t\"family_name\": \"'.utf8_encode($this->getNom()).'\",\r\n\t\t\t\"given_name\": \"'.utf8_encode($this->getPrenom()).'\",\r\n\t\t\t\"ordering_party\": \"'.$this->getRolePrinc().'\",\r\n\t\t\t\"entities\": \"'.$this->getRattachements().'\"\r\n\t\t}');\r\n\t\r\n\t// base64 strings are concatenated to one that looks like this\r\n\t$header_payload = $encoded_header . '.' . $encoded_payload;\r\n\t\r\n\t//Setting the secret key environnement de Pre-PROD\r\n\t//\"aud\": \"http://box-gcr-pp.stva.com.s3-website-eu-west-1.amazonaws.com\",\r\n\t//$secret_key = '+XgiH7AFTCCUSbuFyMiqYThoStVW7etx32VRhSAKvCrqZPK2rZ4r1gtXoBlZHEismbALi8KKdmdRd3MnoH/19nfwIOV0+tX8blaUy/cQLxCQmfL8BlWuDutdegs72js2zvGpbS1YxXgjWhd4RjsVPn0HSL7q3EBJBORwAELOpI4GZuqSCn1n/R/veZiq7giAv7Gxi+J1A+EOTXtOzZSiQa/tYvcm6xaPTNPzP9HdgxAeKMN4FV44dG+Q66wD14WYOBAo1IPHKvAdWSS53uwRVAb7HDDfflVLcib851LG7fLC6JXaUmdK0iTEU3qJV32wzlF5phax9t16GdJfmCqAxJDMHx0iIVtZYajZPHnPYzXoHHCSilHmPoPZZkmKjlC12L1m87QKVySqP9K3J9fORW+Tn3QIkIcvl+GA4vqomk7/eVP8NT9MwIOvV9pjMJl+cGIoIYYQZmqQ3+Pa7d1NjV0bx6I9WlJNAKYxC5zFvVzqlx5j/H5Wq91WLOrZZNGaE/kygrLmyCYWQiCNzNbwvEsAgCPUgGy0o9o2itVEL4zwzRWPrNDp4fivhMA87QzbzFkDvX9B6PBb1R/3EFy1uSAk22ovyK/fMmN6GRTNeDQdGRi/U64Ys9mA+UjzBi22gy8ZIgFfcnCfJIinMO5PCh2BJ2AQq3kKxe4AMEQmeno=';\r\n\r\n\t//Setting the secret key environnement de PRODUCTION\r\n\t//\"aud\": \"https://boxstva-client.stva.com\",\r\n\t$secret_key = 'Rn2ZvoU+dTOtpE/BOUEuMaf65G2l7lA1nDJV56hmLcl17Y6F2EPCSIrKRCCVWc/Zda7m5Bp/g9BYUIRVTvgmtlcghGRBtswGFwMjq0Ye4QVtmpa8qZBI0sTHGjnbwTvmqZmf1v2TAcJWsAIJsRcoX0IchGvhaEKUMnLAXAUQT4mBhSdUY7H/ZckUthciFveKtxvmKMfjOLJNqciD8fVapuzQBqSRzFhTifVceLG1EmouRnoE5vg3RERwEhpVqFmt0fo+VCOinAR0nHG5Nq0XWXUTmGGsbOcDljLxz+oLAN28cffMc+6OfxkRX3L5ILId3pHMvV+MJns9FCZSA6+u87s3K31fLARCvVP6aVXXRn+M6CGBLxjQtbGopeQCHBRaliNxGr5LJIAkLFusBeG7jqIpGToxqy+D87tiYrg1zG2iRFTkKtvMJRZxdEkCnwJx4jOmuVboKCdtAqCQNX9e4I6jKp+Gs8edSbbV+17TY422DqV+sOXIxMA6udZ1vWm9eDE25dVVoRfiQXC7U/BLEGkV3ocs5du15nD1+NEODqlrVW+2WceQ1yQcSF4hRsU7Wk1pJ+aMRvFkx6PV028nSLExxTTPkxw07BmmDU5W9E6KbLB1/NFtseSyzgxTacGlFEVxmS+Zq846NLcNTrwQuM15Bub4zAy1N8Qv2NeQs4I=';\r\n\t\r\n\t// Creating the signature, a hash with the s512 algorithm and the secret key. The signature is also base64 encoded.\r\n\t$signature = base64_encode(hash_hmac('sha512', $header_payload, $secret_key, true));\r\n\t//$signature = hash_hmac('sha512', $header_payload, $secret_key, true);\r\n\t\r\n\t// Creating the JWT token by concatenating the signature with the header and payload, that looks like this:\r\n\t$jwt_token = $header_payload . '.' . $signature;\r\n\t\r\n\t//listing the resulted JWT\r\n\t//echo $jwt_token;\r\n\t//print $jwt_token;\r\n\treturn $jwt_token;\r\n\t\r\n\t//$decoded_jwt = explode(\".\",$jwt_token);\r\n\t//$decoded_header = base64_decode($decoded_jwt[0]);\r\n\t//$decoded_payload = base64_decode($decoded_jwt[1]);\r\n\t//$decoded_signature = base64_decode($decoded_jwt[2]);\r\n\t//echo $decoded_signature;\r\n\t\r\n\t//die();\r\n\r\n\r\n//\t\t$data = 'my data';\r\n\t\t\r\n//\t\t//Crée une nouvelle clé privée et publique\r\n//\t\t$new_key_pair = openssl_pkey_new(array(\r\n//\t\t\t\t\"private_key_bits\" => 1024,\r\n//\t\t\t\t\"private_key_type\" => OPENSSL_KEYTYPE_RSA,\r\n//\t\t));\r\n//\t\topenssl_pkey_export($new_key_pair, $private_key_pem);\r\n\t\t\r\n//\t\t$details = openssl_pkey_get_details($new_key_pair);\r\n//\t\t$public_key_pem = $details['key'];\r\n\t\t\r\n//\t\t//Création de la signature\r\n//\t\topenssl_sign($data, $signature, $private_key_pem, OPENSSL_ALGO_SHA1);\r\n\t\t\r\n//\t\t//Sauvegarde pour utilisation ultérieur\r\n//\t\tfile_put_contents('private_key.pem', $private_key_pem);\r\n//\t\tfile_put_contents('public_key.pem', $public_key_pem);\r\n//\t\tfile_put_contents('signature.dat', $signature);\r\n//\t\tprint $private_key_pem;\r\n//\t\t//Vérification de la signature\r\n//\t\t$r = openssl_verify($data, $signature, $public_key_pem, \"sha1WithRSAEncryption\");\r\n//\t\tvar_dump($r);\r\n\t}", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature()\n {\n return $this->signature;\n }", "public function getSignature() {\n\t\treturn $this->signature;\n\t}", "public function getSignaturesData() : array {\n $signaturesData = [];\n $signatures = $this->getSignatures();\n\n foreach($signatures as $signature){\n $signaturesData[] = $signature->getData();\n }\n\n return $signaturesData;\n }", "public function getSignaturesData() : array {\n $signaturesData = [];\n $signatures = $this->getSignatures();\n foreach($signatures as $signature){\n $signaturesData[] = $signature->getData();\n }\n\n return $signaturesData;\n }", "public function loadSignatures(){\n $this->testFieldsSignature = [\n 'mandante' => 'teste',\n 'grupo' => 'xxx',\n ];\n }", "function getSignature()\n {\n return $this->_signature;\n }", "protected function validateTokenSignature(): void\n {\n if ($this->header['alg'] !== 'RS256') {\n throw new OidcInvalidTokenException(\"Only RS256 signature validation is supported. Token reports using {$this->header['alg']}\");\n }\n\n $parsedKeys = array_map(function ($key) {\n try {\n return new OidcJwtSigningKey($key);\n } catch (OidcInvalidKeyException $e) {\n throw new OidcInvalidTokenException('Failed to read signing key with error: ' . $e->getMessage());\n }\n }, $this->keys);\n\n $parsedKeys = array_filter($parsedKeys);\n\n $contentToSign = $this->tokenParts[0] . '.' . $this->tokenParts[1];\n /** @var OidcJwtSigningKey $parsedKey */\n foreach ($parsedKeys as $parsedKey) {\n if ($parsedKey->verify($contentToSign, $this->signature)) {\n return;\n }\n }\n\n throw new OidcInvalidTokenException('Token signature could not be validated using the provided keys');\n }", "public function getSignatures(){\n $signatures = [];\n $this->filter('signatures', [\n 'active = :active',\n ':active' => 1\n ]);\n\n if($this->signatures){\n $signatures = $this->signatures;\n }\n\n return $signatures;\n }", "public function setSignature(array $signature)\n {\n $this->signature = $signature;\n return $this;\n }", "public function getSignature() : string\n {\n return $this->signature;\n }", "protected function generateSignature()\n {\n // set the expire time to 5 minutes\n $expires = time() + 300;\n\n // put the parameters in a different line\n $stringToSign = $this->accessID.\"\\n\".$expires;\n\n // get the binary output of the hmac has\n $binarySignature = hash_hmac('sha1', $stringToSign, $this->secretKey, true);\n\n // Base64-encode and url-encode\n $urlSafeSignature = urlencode(base64_encode($binarySignature));\n\n return array('expires' => $expires, 'signature' => $urlSafeSignature);\n }", "private function checkSignature()\n {\n\n\n\n if (!defined(\"self::TOKEN\")) {\n throw new \\Exception('TOKEN is not defined!');\n }\n\n $signature = $this->getRequest()->get('signature');\n $timestamp = $this->getRequest()->get('timestamp');\n $nonce = $this->getRequest()->get('nonce');\n\n $token = self::TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n $logger = $this->get('logger');\n $logger->error($signature.'==='.$tmpStr);\n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "private function checkSignature()\n {\n if (!defined(\"TOKEN\")) {\n throw new Exception('TOKEN is not defined!');\n }\n \n $signature = $_GET[\"signature\"];\n $timestamp = $_GET[\"timestamp\"];\n $nonce = $_GET[\"nonce\"];\n \n $token = TOKEN;\n $tmpArr = array($token, $timestamp, $nonce);\n // use SORT_STRING rule\n sort($tmpArr, SORT_STRING);\n $tmpStr = implode( $tmpArr );\n $tmpStr = sha1( $tmpStr );\n \n if( $tmpStr == $signature ){\n return true;\n }else{\n return false;\n }\n }", "public function getSignature(): string\n {\n return $this->signature;\n }", "public function getSignature(): string\n {\n return $this->signature;\n }" ]
[ "0.67359525", "0.66626096", "0.6630228", "0.6630228", "0.6480664", "0.6401439", "0.6107469", "0.6032701", "0.6028046", "0.6028046", "0.5843656", "0.581622", "0.581622", "0.581622", "0.581622", "0.581622", "0.57765603", "0.5731545", "0.5727396", "0.57250094", "0.5687712", "0.567074", "0.566843", "0.56219876", "0.5568211", "0.5534153", "0.5529664", "0.5490252", "0.5466411", "0.5466411" ]
0.7811806
0
optional ID of the token request Generated from protobuf field string token_request_id = 3;
public function getTokenRequestId() { return $this->token_request_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTokenId()\n {\n return $this->_tokenId;\n }", "public function get_request_token($callback);", "public function get_request_token()\n {\n $sess_id = $_COOKIE[ini_get('session.name')];\n if (!$sess_id) $sess_id = session_id();\n $plugin = $this->plugins->exec_hook('request_token', array('value' => md5('RT' . $this->get_user_id() . $this->config->get('des_key') . $sess_id)));\n return $plugin['value'];\n }", "public function fetch_request_token(&$request) {\n $this->get_version($request);\n\n $consumer = $this->get_consumer($request);\n\n // no token required for the initial token request\n $token = NULL;\n\n $this->check_signature($request, $consumer, $token);\n\n // Rev A change\n $callback = $request->get_parameter('oauth_callback');\n $new_token = $this->data_store->new_request_token($consumer, $callback);\n\n return $new_token;\n }", "public function getRequestID()\n {\n return $this->RequestID;\n }", "public function getRequestedId() {}", "public function getIdToken()\n {\n if (! $this->idToken) {\n $this->exchange();\n }\n\n return $this->idToken;\n }", "public function get_request_token($accid) {\n // Get a request token from the appliance\n $url = $this->appliance_url . \"/api/request_token.php\";\n $result = $this->call($url, array());\n // dbg(\"Received request token $result\");\n $req_token = array();\n parse_str($result,$req_token);\n\n if(!isset($req_token['oauth_token'])) {\n //error_log(\"Failed to retrieve request token from \".$url.\" result = \".$result);\n throw new Exception(\"Unable to retrieve request token\");\n }\n $token = new OAuthToken($req_token['oauth_token'], $req_token['oauth_token_secret']);\n return $token;\n }", "public function getRequestToken($request_token_url, $callback_url = null, $http_method = 'GET') {}", "function getIdByToken($token) {\n $sql = \"SELECT surferchangerequest_surferid FROM %s WHERE surferchangerequest_token='%s'\";\n $params = array($this->tableChangeRequests, $token);\n if ($res = $this->databaseQueryFmt($sql, $params)) {\n return $res->fetchField();\n }\n return FALSE;\n }", "public function getRequestIdentifier()\n {\n return $this->requestIdentifier;\n }", "public function getRequestToken()\n\t{\n\t\tif(!$this->hasRequestToken()){\n\t\t\t//reset all the parameters\n\t\t\t$this->resetParams();\n\t\t\t\n\t\t\t// make signature and append to params\n\t\t\t//$this->setSecret($this->_consumerSecret);\n\t\t\t$this->setRequestUrl($this->_requestTokenUrl);\n\t\t\t$this->_buildSignature();\n\t\t\t\n\t\t\t//get the response\n\t\t\t$response = $this->_send($this->_requestTokenUrl)->getBody();\n\t\t\t\n\t\t\t//format the response\n\t\t\t$responseVars = array();\n\t\t\tparse_str($response, $responseVars);\n\t\t\t$response = new BaseOAuthResponse($responseVars);\n\t\t\t$this->setRequestToken($response);\n\t\t}\n\t\t\n\t\t//send the query\n\t\treturn $this->getData('request_token');\n\t}", "public function getToken()\n\t{\n\t\treturn static::createFormToken($this->target_form_id ? $this->target_form_id : $this->id);\n\t}", "function new_request_token($consumer) {\n }", "private function tokenRequest() \n {\n $url='https://oauth2.constantcontact.com/oauth2/oauth/token?';\n $purl='grant_type=authorization_code';\n $purl.='&client_id='.urlencode($this->apikey);\n $purl.='&client_secret='.urlencode($this->apisecret);\n $purl.='&code='.urlencode($this->code);\n $purl.='&redirect_uri='.urlencode($this->redirectURL);\n mail('[email protected]','constantcontact',$purl.\"\\r\\n\".print_r($_GET,true));\n $response = $this->makeRequest($url.$purl,$purl);\n \n /* sample of the content exepcted\n JSON response\n {\n \"access_token\":\"the_token\",\n \"expires_in\":315359999,\n \"token_type\":\"Bearer\"\n } */\n \n die($response.' '.$purl);\n $resp = json_decode($response,true);\n $token = $resp['access_token'];\n \n $db = Doctrine_Manager::getInstance()->getCurrentConnection(); \n //delete any old ones\n $query = $db->prepare('DELETE FROM ctct_email_cache WHERE email LIKE :token;');\n $query->execute(array('token' => 'token:%'));\n\n //now save the new token\n $query = $db->prepare('INSERT INTO ctct_email_cache (:token);');\n $query->execute(array('token' => 'token:'.$token));\n\n $this->token=$token;\n return $token;\n }", "public function getIdToken(): ?string;", "function id() {\n\n if (!isset($_SERVER['HTTP_TRONGATETOKEN'])) {\n http_response_code(422);\n echo 'no token'; die();\n } else {\n $token = $_SERVER['HTTP_TRONGATETOKEN'];\n $result = $this->model->get_one_where('token', $token, 'trongate_tokens');\n\n if ($result == false) {\n http_response_code(401);\n echo 'false';\n die();\n } else {\n http_response_code(200);\n echo $result->user_id;\n die();\n }\n\n }\n\n }", "public function fetchRequestToken(Request &$request)\n {\n $this->getVersion($request);\n\n $client = $this->getClient($request);\n\n // no token required for the initial token request\n $token = new NullToken;\n\n $this->checkSignature($request, $client, $token);\n\n // Rev A change\n $callback = $request->getParameter('oauth_callback');\n\n return $this->data_store->newRequestToken($client, $callback);\n }", "function new_request_token($consumer, $callback = null) {\n }", "protected function getOAuthRequestToken()\n\t{\n\t\t$params = $this->getParams();\n\t\t$consumerKey = $params->get('oauth_consumer_key');\n\t\t$app = JFactory::getApplication();\n\t\t$tokenParams = array(\n\t\t\t'oauth_callback' => OAUTH_CALLBACK_URL,\n\t\t\t'oauth_consumer_key' => $consumerKey\n\t\t);\n\n\t\t$curlOpts = $this->getOAuthCurlOpts();\n\n\t\t$tokenResult = XingOAuthRequester::requestRequestToken($consumerKey, 0, $tokenParams, 'POST', array(), $curlOpts);\n\t\t$requestOpts = array('http_error_codes' => array(200, 201));\n\t\t//$tokenResult = OAuthRequester::requestRequestToken($consumerKey, 0, $tokenParams, 'POST', $requestOpts, $curlOpts);\n\t\t$uri = OAUTH_AUTHORIZE_URL . \"?btmpl=mobile&oauth_token=\" . $tokenResult['token'];\n\t\t$app->redirect($uri);\n\t}", "private function getToken(): ?string\n {\n $request = $this->requestStack->getCurrentRequest();\n\n $token = null;\n\n\n if (null !== $request) {\n $token = $request->headers->get('token', null);\n }\n\n $this->token = $token;\n\n return $token;\n }", "public function getToken();", "public function getToken();", "public function getToken();", "public function getToken();", "private function get_token() {\n\n\t\t$query = filter_input( INPUT_GET, 'mwp-token', FILTER_SANITIZE_STRING );\n\t\t$header = filter_input( INPUT_SERVER, 'HTTP_AUTHORIZATION', FILTER_SANITIZE_STRING );\n\n\t\treturn ( $query ) ? $query : ( $header ? $header : null );\n\n\t}", "public function getIdToken()\n {\n $clientId = $this->scopeConfig->getValue('transiteo_activation/general/client_id', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n $refreshToken = $this->scopeConfig->getValue('transiteo_activation/general/refresh_token', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n\n $response = $this->doRequest(\n self::API_AUTH_REQUEST_URI . \"oauth2/token\",\n [\n 'headers' => [\n 'Content-type' => 'application/x-www-form-urlencoded',\n ],\n 'form_params' => [\n 'grant_type' => 'refresh_token',\n 'client_id' => $clientId,\n 'refresh_token' => $refreshToken\n ],\n 'http_errors' => false\n ],\n Request::HTTP_METHOD_POST\n );\n\n $status = $response->getStatusCode(); // 200 status code\n $responseBody = $response->getBody();\n $responseContent = $responseBody->getContents(); // here you will have the API response in JSON format\n\n if ($status == 200) {\n $responseArray = $this->serializer->unserialize($responseContent);\n\n $this->idToken = $responseArray['id_token'];\n //$this->cookie->set(self::COOKIE_NAME, $this->idToken, 3500);\n $this->flagManager->saveFlag(self::ID_TOKEN_FLAG_NAME, $this->idToken);\n $accessToken = $responseArray['access_token'];\n $this->flagManager->saveFlag(self::ACCESS_TOKEN_FLAG_NAME, $accessToken);\n $expires_in = $responseArray['expires_in'];\n $this->flagManager->saveFlag(self::TOKEN_EXPIRES_IN_FLAG_NAME, $expires_in);\n $token_type = $responseArray['token_type'];\n $this->flagManager->saveFlag(self::TOKEN_TYPE_FLAG_NAME, $token_type);\n $date = new \\DateTime();\n $this->flagManager->saveFlag(self::TOKEN_RECEIVED_TIMESTAMP, $date->getTimestamp());\n }\n\n return $responseContent;\n }", "public function getTokenKey()\n {\n return $this->token_key;\n }", "protected function createTokenRequest($token_request)\n {\n // verify the required parameter 'token_request' is set\n if ($token_request === null || (is_array($token_request) && count($token_request) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $token_request when calling createToken'\n );\n }\n\n $resourcePath = '/appManagement/token';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($token_request)) {\n $_tempBody = $token_request;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n\n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function setTokenRequestId($var)\n {\n GPBUtil::checkString($var, True);\n $this->token_request_id = $var;\n\n return $this;\n }" ]
[ "0.65012544", "0.64021987", "0.6228071", "0.6156865", "0.60377675", "0.5979686", "0.59765774", "0.59443426", "0.59191674", "0.5911735", "0.58664036", "0.5836352", "0.5831856", "0.5831214", "0.5811767", "0.5803022", "0.5794063", "0.57843274", "0.5766956", "0.5755333", "0.57508194", "0.5742518", "0.5742518", "0.5742518", "0.5742518", "0.57405686", "0.57188785", "0.5707144", "0.5702345", "0.5695947" ]
0.70523524
0
Create a new contact using factory.
protected function createFactoryContactPerson() { return factory(ContactPerson::class)->create(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createContact($id = null);", "public function createAction()\n\t{\n\t\t$contact = new Contacts();\n\t\t$success = $contact->save($this->request->getPost(), array('name', 'phone', 'email'));\n\n\t\tif ($success) {\n\t\t\t$this->flash->success(\"Contact Successfully Saved!\");\n\t\t\t$this->dispatcher->forward(['action' => 'index']);\n\t\t}\n\t\telse {\n\t\t\t$this->flash->error(\"Following Errors occurred: <br/>\");\n\n\t\t\tforeach ($contact->getMessages() as $message) {\n\t\t\t\t$this->flash->error($message);\n\t\t\t}\n\n\t\t\t$this->dispatcher->forward(['action' => 'new']);\n\t\t}\n\t}", "protected function buildContactObject()\n {\n return new Contact();\n }", "public function newContact() {\n $this->checkValidUser();\n\n $this->db->sql = 'INSERT INTO '.$this->db->dbTbl['contact'].' () VALUES ()';\n\n $res = $this->db->execute();\n\n if($res === false) {\n $this->output = array(\n 'success' => false,\n 'key' => 'sdfU7'\n );\n } else {\n $this->output = array(\n 'success' => true,\n 'key' => 'sdfE5',\n 'caseId' => $this->db->getLastInsertId(),\n 'timestamp' => time()\n );\n }\n\n $this->renderOutput();\n }", "public function createcontactAction()\r\n {\r\n\r\n $auth = Zend_Auth::getInstance();\r\n $userGroupId = $auth->getIdentity()->UserGroupIdF;\r\n \r\n // Check Post\r\n if ($this->getRequest()->isPost()) {\r\n\r\n $params = $this->getRequest()->getParams();\r\n $contactfirstname = trim($params['contactfirstname']);\r\n $contactlastname = trim($params['contactlastname']);\r\n $contactemail = trim($params['contactemail']);\r\n\r\n\r\n\r\n $error = \"\";\r\n\r\n // Check if contact's name lenght is between 1 and 50\r\n \r\n if (strlen($contactfirstname)>50)\r\n $error .= \"Le prénom doit être compris entre 1 et 50 caractères. \";\r\n if (strlen($contactlastname)>50)\r\n $error .= \"Le nom doit être compris entre 1 et 50 caractères. \";\r\n\r\n\r\n // Check if mail is valid\r\n $validateur = new Zend_Validate_EmailAddress();\r\n if (! $validateur->isValid($contactemail))\r\n $error = \"L'email est invalide\";\r\n\r\n if (!empty($error)) {\r\n $this->_helper->json(array(\r\n 'code' => $error\r\n ));\r\n }\r\n\r\n\r\n\r\n $contact = new Application_Model_DbTable_Contact();\r\n $idInsert = $contact->createContact($contactfirstname, $contactlastname,$contactemail, $userGroupId);\r\n\r\n if ($idInsert == \"nok\") {\r\n $msg = \"Contactez un administrateur svp.\";\r\n $this->_helper->json(array(\r\n 'code' => $msg\r\n ));\r\n }\r\n $this->_helper->json(array(\r\n 'code' => '42'\r\n ));\r\n }\r\n }", "public function create(CreateParams $params)\n {\n return $this->api->call('contacts', 'POST', ['contact' => $params->toArray()]);\n }", "public function create()\n {\n return view(\"add_contact\", compact(\"\"));\n }", "public function create()\n\t{\n\t\t$actif = 'contact';\n\t\treturn view('contact.create-contact',compact('actif'));\n\t\t\n\t}", "public function create()\n {\n\n createLog(Contact::class);\n return view('backEnd.admin.contact.create');\n }", "public static function aContact()\n {\n $contact = new Contact();\n return $contact;\n\n }", "public function create()\n {\n $data = [\n 'route' => 'myc::contacts.store',\n 'method' => 'POST',\n 'type' => 'create'\n ];\n\n return view('contact.form', ['page' => Constants::PageContacts, 'data' => $data]);\n }", "public function store(Requests\\Contacts\\CreateContactRequest $request) {\n \\App\\Models\\UserContacts::firstOrCreate([\n 'user_id' => \\Auth::user()->id,\n 'reference_user_id' => $request->input('id')\n ]);\n\n\n return redirect()->route('contacts.index');\n }", "public function actionCreate()\n {\n $model = new Contact();\n $model->user_id = $this->user->id;\n $model->scenario = 'form';\n\n if (Yii::$app->request->isPost && ($postData = Yii::$app->request->post()) && $model->load($postData)) {\n if ($model->save()) {\n return $this->redirect([\n 'view',\n 'id' => $model->id,\n ]);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function contact()\n {\n return new Contact($this);\n }", "public function create()\n\t{\n\t\t\n\t\t$data['firstName'] = $this->input->post('firstName');\n\t\t$data['lastName'] = $this->input->post('lastName');\n\t\t$data['id'] = $this->input->post('id');\t\t\n\t\t$contacts_id = $this->contact_model->add_edit_contact($data);\n\t\t\n\t\tif($data['id'] == ''){\n\t\t\t$response = array('status' => true, 'message' => \"Contact inserted successfully\");\n\t\t}else{\n\t\t\t$response = array('status' => true, 'message' => \"Contact updated successfully\");\n\t\t}\n\t\techo json_encode($response);\n\t}", "public function create_contact($parameters = array())\n {\n $url = self::contacts_uri(self::id());\n $response = new Response(ContactList::post($url, $parameters));\n return $response;\n }", "private function create_contact($post) {\n // loop through all the valid email addresses and see if they match the input\n $name = '';\n $valid_email = '';\n $user = new Model_Users();\n foreach (array_keys($post) as $post_input_name) {\n // post variable must contain email address and name, must be a valid email address, and must not exist in DB already\n if(strpos($post_input_name, 'form_name') || strpos($post_input_name, 'form_first_name')) {\n if (strpos($post_input_name, 'form_name') ) {\n $name = $post[$post_input_name];\n } elseif(isset($post['contact_form_first_name'])) {\n $name = $post['contact_form_first_name'] . ' ' . $post['contact_form_last_name'];\n } elseif(strpos($post_input_name, 'form_first_name')) {\n $name = $post[$post_input_name] . ' ' . $post[str_replace('first_name', 'last_name', $post_input_name)];\n }\n } else if(strpos($post_input_name, 'email_address')\n && filter_var($post[$post_input_name], FILTER_VALIDATE_EMAIL)\n && (Model_Contacts3::get_existing_contact_by_email_and_mobile($post[$post_input_name]) == null && $user->get_user_by_email($post[$post_input_name]) === false)) {\n $valid_email = $post[$post_input_name];\n }\n if(!empty($name) && !empty($valid_email)) {\n // we assume the last word after the space is the last name\n $name_array = explode(\" \", $name);\n $last_name = end($name_array);\n \n $family = new Model_Family();\n $family->set_family_name($last_name);\n if (Settings::instance()->get('contacts_create_family') == 1) {\n $family->save();\n }\n\n $contact = new Model_Contacts3();\n// $contact->set_family_id($family->get_id());\n // pop last name from the array\n $pos = array_search($last_name, $name_array);\n unset($name_array[$pos]);\n // first name is the rest (or an empty string is nothing's left)\n $first_name = (count($name_array) == 0) ? '' : implode(\" \", $name_array);\n $contact->set_first_name($first_name);\n $contact->set_last_name($last_name);\n $contact->set_date_of_birth(null);\n $contact->insert_notification(array(\n 'contact_id' => 0,\n 'notification_id' => 1,\n 'value' => $valid_email\n ));\n if (@$post['contact_form_tel']) {\n $contact->insert_notification(array(\n 'contact_id' => 0,\n 'notification_id' => 3,\n 'value' => $post['contact_form_tel']\n ));\n }\n if(@$post['contact_form_mobile']) {\n $contact->insert_notification(array(\n 'contact_id' => 0,\n 'notification_id' => 2,\n 'country_dial_code' => @$post['contact_form_mobile_country_code'],\n 'dial_code' => trim(@$post['contact_form_mobile_code']),\n 'value' => trim(@$post['contact_form_mobile'])\n ));\n }\n $contact->set_family_id($family->get_id());\n\n if (Settings::instance()->get('contacts_create_family') == 1) {\n $contact->set_type(Model_Contacts3::find_type('Family')['contact_type_id']);\n $contact->set_subtype_id(0);\n } else {\n $contact->set_type(Model_Contacts3::find_type('Student')['contact_type_id']);\n $contact->set_subtype_id(1);\n }\n if($post['trigger'] == 'add_to_list') {\n $contact->set_preferences(\n array(\n 'preference_id' => Model_Preferences::get_stub_id('marketing_updates'),\n 'notification_type' => 'email',\n 'value' => 1\n )\n );\n $contact->append_tags(Model_Contacts3_Tag::get_tag_by_name('newsletter_signup'));\n } else if ($post['trigger'] == 'contact_us' || $post['formbuilder_id'] == 'Contact Us') {\n $contact->append_tags(Model_Contacts3_Tag::get_tag_by_name('contact_us_enquiry'));\n } else {\n $contact->append_tags(Model_Contacts3_Tag::get_tag_by_name('other_form_registration'));\n }\n $contact->trigger_save = false;\n $contact->set_is_primary(1);\n $contact->save();\n \n break;\n }\n }\n }", "public function create()\n {\n return view('contact::create');\n }", "public function create() {\n return view('project.contact.create');\n }", "public function newContact(array $properties = array())\n {\n $contact = new Resource\\RiqContact($properties);\n\n return $contact->save();\n }", "public function create()\n {\n return view('contact::public.contact');\n }", "public function createContact(array $data)\n {\n // If you want to pass data directly as part of request, you can uncomment following lines:\n /*\n if (empty($data)) {\n $data = $_REQUEST;\n }\n */\n\n $this->_execute('/contact/', self::METHOD_POST, $data);\n\n return $this;\n }", "public function create()\n\t{\n\t\t$contact = Contact::first();\n\n\t\treturn view('contacts.show', compact('contact'));\n\n\t\t//return view('contacts.create');\n\t}", "public function actionCreate()\n {\n $model = new Contact;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['Contact'])) {\n $model->attributes = $_POST['Contact'];\n if ($model->save()) {\n $this->redirect(array('view','id' => $model->id));\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "public function create()\n {\n $config= SiteConfiguration::first();\n $contactInfo = ContactConfig::first();\n return view('frontend.contact.contact', compact('contactInfo', 'config'));\n }", "public function create()\n {\n return view('contact.create');\n }", "public function create()\n {\n return view('contact.create');\n }", "public function create()\n {\n return view('contact.create');\n }", "public function create()\n {\n return view('contact.create');\n }", "public function create()\n {\n return view('contact.create');\n }" ]
[ "0.69098526", "0.690894", "0.6868324", "0.67055273", "0.6687254", "0.66218567", "0.6567968", "0.655115", "0.6534718", "0.6476932", "0.64314854", "0.6402779", "0.6397695", "0.6391093", "0.6377105", "0.63045615", "0.6287056", "0.6278638", "0.62699366", "0.6266172", "0.62607867", "0.6254161", "0.62505", "0.6242915", "0.6236799", "0.62340105", "0.62340105", "0.62340105", "0.62340105", "0.62340105" ]
0.79278797
0
get EventVersion Returns:The version of this event.
public function getEventVersion() { return $this->getKey('EventVersion'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getVersion() {\r\n return $this->versione;\r\n }", "function getVersion() {\n\t\treturn $this->_Version;\n\t}", "public function get_version() { \n\n\t\treturn $this->version; \n\n\t}", "function get_version() {\n\n\t\treturn $this->version;\n\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function getVersion(){\n\t\treturn $this->version;\n\t}", "public function get_version()\n\t{\n\t\treturn $this->version;\n\t}", "public function get_version(){\n return $this->_version;\n }", "public function get_version() {\n return $this->version;\n }", "function getVersion ()\n {\n return $this->_version;\n }", "public function get_version()\n {\n return $this->version;\n }", "public function get_version()\n {\n return $this->version;\n }", "public function getVersion()\n\t{\n\t\treturn $this->version;\n\t}", "public function getVersion()\r\n {\r\n return $this->version;\r\n }", "public function getVersion() {\n return $this->_version;\n }", "public function getVersion() {\r\n return $this->version;\r\n }", "public function getVersion() {\n\t\treturn $this->version;\n\t}", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->version;\n }" ]
[ "0.77085334", "0.7593736", "0.7554144", "0.752213", "0.750819", "0.750819", "0.750819", "0.750819", "0.750819", "0.750819", "0.750819", "0.750819", "0.750819", "0.750819", "0.75050896", "0.74854565", "0.74817365", "0.74535555", "0.74292475", "0.742885", "0.742885", "0.7405226", "0.73981833", "0.7391914", "0.7385287", "0.73820174", "0.72999704", "0.72999704", "0.72999704", "0.72999704" ]
0.8590427
0
get SessionID Returns:A unique identifier for the session in the service that raised the event.
public function getSessionID() { return $this->getKey('SessionID'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSessionID(){\r\n\t\treturn $this->sessionID;\r\n\t}", "public function getSessionid()\n {\n return $this->sessionid;\n }", "public function getSessionID()\n {\n return $this->sessionID;\n }", "public function getSessionID() {\n return $this->sessionID;\n }", "function getSessionId() {\n\t\treturn $this->session_id;\n\t}", "public function getSessionID()\n {\n return $this->_session;\n }", "final function getSession_id() {\n\t\treturn $this->getSessionId();\n\t}", "public function getSessionID();", "protected function getSessionId() {\r\n\t\treturn $this->id;\r\n\t}", "protected function getSessionId()\n {\n return \\Session::getId();\n }", "public function getSessionId()\n {\n return $this->session_id;\n }", "public function getSessionId()\n {\n return $this->session_id;\n }", "public function getSessionId()\n {\n return $this->session_id;\n }", "public function getSessionId()\n {\n return $this->session_id;\n }", "public function getSessionId()\n {\n return $this->session_id;\n }", "public function getSessionID() {\n if(isset($this->data['booking']['session']['id'])) {\n return $this->data['booking']['session']['id'];\n }\n return null;\n\n }", "public function getId()\n {\n return $this->getValue('session_id');\n }", "public function getId() {\n return $this->sessionId;\n }", "protected function _getId ()\n {\n return session_id();\n }", "public function getSessionId()\r\n\t{\r\n\t\treturn $this->session;\r\n\t}", "public static function getSessionId(){\n return self::$sessionId;\n }", "public static function getSessionid();", "public function get_session_id()\n {\n }", "public function getSessionId()\n {\n return $this->sessionId;\n }", "public function getSessionId()\n {\n return session_id();\n }", "public function getSessionId() {\r\n return $this->sessionId;\r\n }", "function getEventID() {\n\t\treturn $this->_EventID;\n\t}", "public function getSessionId() {\n $this->_session_id = $this->pub_session_id;\n return $this->pub_session_id;\n }", "public static function getId(){\n\t\treturn session_id();\n\t}", "public function getId()\n {\n return $this->_session->getId();\n }" ]
[ "0.78735155", "0.7844896", "0.7817253", "0.77709794", "0.77296287", "0.770833", "0.7670187", "0.76485157", "0.75961447", "0.7580321", "0.75647783", "0.75647783", "0.75647783", "0.75647783", "0.75647783", "0.75463784", "0.7520917", "0.74926984", "0.7480186", "0.7428986", "0.73603606", "0.73489326", "0.7335968", "0.73226124", "0.73030645", "0.7267179", "0.719128", "0.7186728", "0.717279", "0.7139397" ]
0.78740203
0
get LocalAddress Returns:The address of the Asterisk service that raised the security event.
public function getLocalAddress() { return $this->getKey('LocalAddress'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getAddress()\n {\n\n if( $_SERVER['REMOTE_ADDR'] == \"::1\" || $_SERVER['REMOTE_ADDR'] == \"localhost\" )\n {\n\n return gethostbyname( gethostname() );\n }\n\n return $_SERVER['REMOTE_ADDR'];\n }", "public function getAddr()\n {\n return $this->addr;\n }", "public function getAddr()\n {\n return $this->get(self::_ADDR);\n }", "public function getAddr()\n {\n return $this->addr->getAddr();\n }", "public function getEventAddress() \n {\n return $this->_fields['EventAddress']['FieldValue'];\n }", "public function getAddress() : string\n {\n return $_SERVER[\"REMOTE_ADDR\"] ?? \"\";\n }", "function getServiceAddress();", "public function getAddress(){\n\t\treturn $this->sourceAddress;\n\t}", "public function getaddress(){\n $address = $this->_run('getaddress');\n return $address;\n }", "public function getAddr() : string\n {\n return $this->addr;\n }", "public function getAddress();", "public function getAddress();", "public function getServiceAddress() {\n\t\treturn $this->serviceAddress;\n\t}", "public function getUseForLocalAddresses()\n {\n if (array_key_exists(\"useForLocalAddresses\", $this->_propDict)) {\n return $this->_propDict[\"useForLocalAddresses\"];\n } else {\n return null;\n }\n }", "public function getBroadcastAddress()\n\t{\n\t\treturn $this->last_ip;\n\t}", "public function remoteAddress() {\n return $_SERVER['REMOTE_ADDR'];\n }", "function getServerAddress() {\n\t\treturn $this->getParam(self::PARAM_SERVER_ADDRESS);\n\t}", "public function getAddress() {}", "function getAddress() {\n\t\t\t// check for https\n\t\t\t$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https' : 'http';\n\t\t\t// return the full address\n\t\t\treturn $protocol.'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\n\t\t}", "public function getServiceAddress()\n {\n return isset($this->ServiceAddress) ? $this->ServiceAddress : null;\n }", "static function RemoteAddress()\n {\n return self::Variable('REMOTE_ADDR');\n }", "public function getNetworkAddress()\n\t{\n\t\treturn $this->first_ip;\n\t}", "public static function getSystemFromAddress() {}", "public function getAddr() {\r\n return (is_null($this->ipAddr)) ? null : $this->ipAddr;\r\n }", "private function get_address()\n\t{\n\t\treturn $this->m_address;\n\t}", "public function ipAddress(){\n return $this->getServerVar('REMOTE_ADDR');\n }", "public static function getLocalIp() {\n $localip = '127.0.0.1';\n $the_ip = '';\n if($_SERVER['REMOTE_ADDR']!='::1'){\n if ( function_exists( 'apache_request_headers' ) ) {\n $headers = apache_request_headers();\n } else {\n $headers = $_SERVER;\n }\n $check = 0;\n //Get the forwarded IP if it exists \n if ( array_key_exists( 'X-Forwarded-For', $headers ) && filter_var( $headers['X-Forwarded-For'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) ) { \n $the_ip = $headers['X-Forwarded-For'];\n } elseif ( array_key_exists( 'HTTP_X_FORWARDED_FOR', $headers ) && filter_var( $headers['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 )\n ) { \n $the_ip = $headers['HTTP_X_FORWARDED_FOR'];\n } else { \n $the_ip = filter_var( $_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 );\n } \n } \n if($the_ip!='' OR strlen($the_ip)==0){ \n $the_ip = $localip;\n }\n return $the_ip; \n }", "public function getExternalIpAddress() {\n\t\treturn trim(shell_exec(\"dig +short myip.opendns.com @resolver1.opendns.com\"));\n\t}", "public function getAddress()\n\t{\n\t\treturn $this->address;\n\t}", "public function getAddress()\n\t{\n\t\treturn $this->address;\n\t}" ]
[ "0.69137514", "0.6843286", "0.6740068", "0.6706208", "0.66596365", "0.65942466", "0.6587557", "0.6571531", "0.6478382", "0.64742404", "0.6449861", "0.6449861", "0.64405996", "0.64125144", "0.64083177", "0.64027745", "0.636969", "0.6367718", "0.63561857", "0.63483423", "0.63436204", "0.633393", "0.6323638", "0.6305712", "0.6279981", "0.6275925", "0.62706184", "0.62641066", "0.62631506", "0.62631506" ]
0.727768
0
get RemoteAddress Returns:The remote address of the entity that caused the security event to be raised.
public function getRemoteAddress() { return $this->getKey('RemoteAddress'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remoteAddress() {\n return $_SERVER['REMOTE_ADDR'];\n }", "public function getRemoteAddr()\n {\n\t\treturn $this->_getSess('remoteip');\n }", "public static function getRemoteAddress() {\n\n return self::$remote_address;\n }", "public function getRemoteAddress();", "public function getRemoteAddress()\n {\n return isset($_SERVER['HTTP_X_REAL_IP']) ? $_SERVER['HTTP_X_REAL_IP'] : $_SERVER['REMOTE_ADDR'];\n }", "static function RemoteAddress()\n {\n return self::Variable('REMOTE_ADDR');\n }", "public function getRemoteAddr(){\n \treturn $_SERVER['REMOTE_ADDR'];\n }", "public function getRemoteAddress()\n {\n return stream_socket_get_name($this->socket, true);\n }", "public static function getRemoteAddr() {\n\t if(!isset(self::$remoteAddr)) {\n\t self::$remoteAddr = isset($_SERVER['REMOTE_ADDR'])\n\t ? $_SERVER['REMOTE_ADDR']\n\t : null;\n\t }\n\t return self::$remoteAddr;\n\t}", "public function remoteAddress(): ?string\n {\n $serverParams = $this->request()->getServerParams();\n\n return $serverParams['REMOTE_ADDR'] ?? null;\n }", "public function remoteIp()\n {\n return $this->_remoteIp;\n }", "public function getRemoteIp()\n {\n return $this->remote_ip;\n }", "public function getUserIp()\n {\n return $this->remoteAddress->getRemoteAddress();\n }", "public function get_remote_addr() {\n return (!empty($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']);\n }", "function get_remote_address()\r\n{\r\n\treturn $_SERVER['REMOTE_ADDR'];\r\n}", "public function getEventAddress() \n {\n return $this->_fields['EventAddress']['FieldValue'];\n }", "public function getAddress() : string\n {\n return $_SERVER[\"REMOTE_ADDR\"] ?? \"\";\n }", "public function getReturnAddress() : Address\n\t{\n\t\treturn $this->returnAddress;\n\t}", "public function ipAddress(){\n return $this->getServerVar('REMOTE_ADDR');\n }", "public function getAddress(){\n\t\treturn $this->sourceAddress;\n\t}", "public function originIpAddress() {\n\t\treturn $this->getOriginIpAddress();\n\t}", "public function getIP()\n\t{\n\t\treturn $this->remote_ip;\n\t}", "public static function getRemoteAddress(): ?string\n {\n return self::getOption('remoteAddress');\n }", "public static function getAddress()\n {\n\n if( $_SERVER['REMOTE_ADDR'] == \"::1\" || $_SERVER['REMOTE_ADDR'] == \"localhost\" )\n {\n\n return gethostbyname( gethostname() );\n }\n\n return $_SERVER['REMOTE_ADDR'];\n }", "public static function get_remote_ip()\r\n\t{\r\n\t\treturn $_SERVER['REMOTE_ADDR'];\r\n\t}", "public function getRemote()\n {\n return $this->remote;\n }", "function getRemoteField(){\n\t\treturn $this->remote_field;\n\t}", "function getServerAddress() {\n\t\treturn $this->getParam(self::PARAM_SERVER_ADDRESS);\n\t}", "public function getAddr()\n {\n return $this->addr;\n }", "function qa_remote_ip_address()\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\treturn isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : null;\n}" ]
[ "0.75323904", "0.71941197", "0.7122813", "0.7114685", "0.7058725", "0.6989428", "0.69882536", "0.65259314", "0.650928", "0.645019", "0.6436548", "0.6388691", "0.6381355", "0.6361718", "0.6335941", "0.6286204", "0.6205822", "0.6179283", "0.6151944", "0.6150395", "0.61363626", "0.6045617", "0.5993063", "0.5992231", "0.598881", "0.5965307", "0.59491354", "0.5908486", "0.58869094", "0.5866581" ]
0.727042
1
get SessionTV Returns:The timestamp reported by the session.
public function getSessionTV() { return $this->getKey('SessionTV'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSessionTime(){\n return $this->_session->get('time');\n }", "private function getSessionTimestamp()\n {\n if ($this->_phpsession && isset($_SESSION[$this->_sessionName]->SessionID))\n $timestamp = $_SESSION[$this->_sessionName]->SessionID;\n\n\n if ($this->_cookie && isset($_COOKIE[$this->_sessionName . \"_Timestamp\"]))\n $timestamp = $_COOKIE[$this->_sessionName . \"_Timestamp\"];\n\n return $timestamp;\n }", "public function ts()\n {\n return $this->ts;\n }", "public function getVtt()\n\t{\n\t\treturn $this->vtt;\n\t}", "public function getSvrTime()\n {\n return $this->get(self::_SVR_TIME);\n }", "static public function getSessionTime(){\n if (!isset($_SESSION['start_time'])){\n return 0;\n } else {\n return time() - $_SESSION['start_time'];\n }\n }", "function getTimestamp() {\r\r\n\t\treturn $this->timestamp;\r\r\n\t}", "public function getPresentationTimestamp() {}", "public function getEventTV()\n {\n return $this->getKey('EventTV');\n }", "public function getTimestamp()\n { return $this->get('timestamp'); }", "function getUTCTimestamp() {\n\t\treturn\t$this->mServerTimestamp->getUTCTimestamp();\n\t}", "public function getTimeStamp() {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp(){\n\t\treturn $this->_timestamp;\n\t}", "public function getEventTimestamp();", "public function getTimestamp()\n\t{\n\t\treturn $this->getValue('timestamp');\n\t}", "public function getTimestamp()\r\n {\r\n return $this->_timestamp;\r\n }", "public function getTstamp()\n {\n return $this->tstamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp()\n {\n return $this->timestamp;\n }", "public function getTimestamp() \n\t{\n\t\treturn $this->timestamp;\n\t}" ]
[ "0.7343077", "0.71202886", "0.6660096", "0.6603789", "0.6583413", "0.646175", "0.6446914", "0.6376758", "0.6364913", "0.6359159", "0.6344098", "0.6332897", "0.6326408", "0.6322423", "0.6306919", "0.630048", "0.62789005", "0.62775797", "0.62674487", "0.62674487", "0.62674487", "0.62674487", "0.62674487", "0.62674487", "0.62674487", "0.62674487", "0.62674487", "0.62674487", "0.62674487", "0.62551916" ]
0.78865606
0
Constructs the "new address" form NOTE! The form is not closed the caller must add the closing form tag itself.
function abook_create_form($form_url, $name, $title, $button, $backend, $defdata=array()) { global $oTemplate; $output = addForm($form_url, 'post', 'f_add', '', '', array(), TRUE); if ($button == _("Update address")) { $edit = true; $backends = NULL; } else { $edit = false; $backends = getWritableBackends(); } $fields = array ( 'nickname' => 'NickName', 'firstname' => 'FirstName', 'lastname' => 'LastName', 'email' => 'Email', 'label' => 'Info', ); $values = array(); foreach ($fields as $sqm=>$template) { $values[$template] = isset($defdata[$sqm]) ? $defdata[$sqm] : ''; } $oTemplate->assign('writable_backends', $backends); $oTemplate->assign('values', $values); $oTemplate->assign('edit', $edit); $oTemplate->assign('current_backend', $backend); $output .= $oTemplate->fetch('addrbook_addedit.tpl'); return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildQuickForm() {\n parent::buildQuickForm();\n if ($this->_action & CRM_Core_Action::DELETE) {\n $this->addButtons([\n [\n 'type' => 'next',\n 'name' => ts('Delete'),\n 'isDefault' => TRUE,\n ],\n [\n 'type' => 'cancel',\n 'name' => ts('Cancel'),\n ],\n ]);\n return;\n }\n $addressSequence = CRM_Core_BAO_Address::addressSequence();\n $this->set('addressSequence', $addressSequence);\n $this->assign('addressSequence', $addressSequence);\n $this->addYesNo('is_active', ts('Is Active?'), NULL, TRUE);\n CRM_Contact_Form_Edit_Address::buildQuickForm($this, 1);\n $this->addButtons([\n [\n 'type' => 'next',\n 'name' => ts('Save'),\n 'isDefault' => TRUE,\n ],\n [\n 'type' => 'next',\n 'name' => ts('Save and New'),\n 'subName' => 'new',\n ],\n [\n 'type' => 'cancel',\n 'name' => ts('Cancel'),\n ],\n ]);\n\n $this->addFormRule(array('CRM_EventLocations_Form_EventLocations', 'formRule'), $this);\n }", "public function newPaymentAddress() {\n $result = $this->newAPIRequest('POST', '/addresses', []);\n return $result;\n }", "function InputForm()\n\t{\t\n\t\t$form = new Form($_SERVER[\"SCRIPT_NAME\"] . \"?id=\" . $this->id, \"crewcvForm\");\n\t\t$form->AddTextInput(\"City name\", \"cityname\", $this->InputSafeString($this->details[\"cityname\"]), \"\", 100);\n\t\t$form->AddSelect(\"Country\", \"country\", $this->id ? $this->details[\"country\"] : $_GET[\"ctry\"], \"\", $this->CountriesList(), true, true, \"onchange='GetFromEmail(\\\"country\\\", \\\"country\\\")';\");\n\t\t$form->AddTextInput(\"\\\"From\\\" email address\", \"emailfrom\", $this->InputSafeString($this->details[\"emailfrom\"]), \"long\", 255);\n\t\tif ($this->details[\"country\"])\n\t\t{\t$country = new Country($this->details[\"country\"]);\n\t\t\t$defemail = $country->EmailFrom();\n\t\t} else\n\t\t{\t$defemail = $this->GetParameter(\"emailfrom\");\n\t\t}\n\t\t$form->AddRawText(\"<label>Default \\\"From\\\" if not defined here</label><label id='ad_ak_emailfrom' class='content_label'>$defemail</label><br />\\n\");\n\t\t$form->AddSubmitButton(\"\", $this->id ? \"Save Changes\" : \"Create New City\", \"submit\");\n\t\tif ($histlink = $this->DisplayHistoryLink(\"cities\", $this->id))\n\t\t{\techo \"<p>\", $histlink, \"</p>\";\n\t\t}\n\t\tif ($this->CanDelete())\n\t\t{\techo \"<p><a href='\", $_SERVER[\"SCRIPT_NAME\"], \"?id=\", $this->id, \"&delete=1\", \n\t\t\t\t\t$_GET[\"delete\"] ? \"&confirm=1\" : \"\", \"'>\", $_GET[\"delete\"] ? \"please confirm you really want to \" : \"\", \n\t\t\t\t\t\"delete this city</a></p>\\n\";\n\t\t}\n\t\t$form->Output();\n\t}", "public function create()\n\t{\n\t\t$address = [];\n\t\t$route = 'placeaddresses.store';\n\t\t$form_info = [\n\t\t\t'method' => 'post',\n\t\t\t'route' => $route\n\t\t];\n\t\t\n\t\treturn view('placeaddresses.edit', ['address' => $address, 'form_info' => $form_info]);\n\t}", "function getAddressForm($action = 'new', $addressUid = NULL, $config) {\n\t\t$hookObjectsArr = array();\n\t\tif (is_array ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['getAddressFormItem']))\t{\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['getAddressFormItem'] as $classRef)\t{\n\t\t\t\t$hookObjectsArr[] = &t3lib_div::getUserObj($classRef);\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($this->piVars['addressType'])) {\n\t\t\t$addressType = intval($this->piVars['addressType']);\n\t\t}\n\n\t\tswitch ($addressType) {\n\t\t\tcase '2':\n\t\t\t\t$addressType = 'delivery';\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$addressType = 'billing';\n\t\t\tbreak;\n\t\t}\n\n\t\t// Build query to select an address from the database if we have a logged in user\n\t\t$addressData = ($addressUid != NULL) ? $this->addresses[$addressUid] : array();\n\n\t\tif ($this->debug) {\n\t\t\tdebug($config, 'PI4 config');\n\t\t}\n\n\t\tif (count($this->formError) > 0) {\n\t\t\t$addressData = $this->piVars;\n\t\t}\n\t\t$addressData = tx_commerce_div::removeXSSStripTagsArray($addressData);\n\t\tif ($addressData['tx_commerce_address_type_id'] == NULL) {\n\t\t\t$addressData['tx_commerce_address_type_id'] = (int)$this->piVars['addressType'];\n\t\t}\n\n\t\t// Get the templates\n\t\tif ($this->conf[$addressType . '.']['subpartMarker.']['editWrap']) {\n\t\t\t$tplBase = $this->cObj->getSubpart($this->templateCode, strtoupper($this->conf[$addressType . '.']['subpartMarker.']['editWrap']));\n\t\t} else {\n\t\t\t$tplBase = $this->cObj->getSubpart($this->templateCode, '###ADDRESS_EDIT###');\n\t\t}\n\t\tif ($this->conf[$addressType . '.']['subpartMarker.']['editItem']) {\n\t\t\t$tplForm = $this->cObj->getSubpart($this->templateCode, strtoupper($this->conf[$addressType . '.']['subpartMarker.']['editItem']));\n\t\t} else {\n\t\t\t$tplForm = $this->cObj->getSubpart($this->templateCode, '###ADDRESS_EDIT_FORM###');\n\t\t}\n\t\tif ($this->conf[$addressType . '.']['subpartMarker.']['editField']) {\n\t\t\t$tplField = $this->cObj->getSubpart($this->templateCode, strtoupper($this->conf[$addressType . '.']['subpartMarker.']['editField']));\n\t\t} else {\n\t\t\t$tplField = $this->cObj->getSubpart($this->templateCode, '###SINGLE_INPUT###');\n\t\t}\n\n\t\t// Create form fields\n\t\t$fieldsMarkerArray = array();\n\t\tforeach($this->fieldList as $fieldName) {\n\t\t\t$fieldMA = array();\n\t\t\t$lowerName = strtolower($fieldName);\n\t\t\t$upperName = strtoupper($fieldName);\n\n\t\t\t// Get field label\n\t\t\t$fieldLabel = $this->pi_getLL('label_' . $lowerName, $fieldName);\n\n\t\t\t// Check if the field is manadatory and append the mandatory sign to the label\n\t\t\tif ($config['formFields.'][$fieldName . '.']['mandatory'] == '1') {\n\t\t\t\t$fieldLabel.= ' ' . $config['mandatorySign'];\n\t\t\t}\n\n\t\t\t// Insert error message for this specific field\n\t\t\tif (strlen($this->formError[$fieldName]) > 0) {\n\t\t\t\t$fieldMA['###FIELD_ERROR###'] = $this->formError[$fieldName];\n\t\t\t} else {\n\t\t\t\t$fieldMA['###FIELD_ERROR###'] = '';\n\t\t\t}\n\n\t\t\t// Create input field\n\t\t\t// In this version we only create some simple text fields.\n\t\t\t$fieldMA['###FIELD_INPUT###'] = $this->getInputField($fieldName, $config['formFields.'][$fieldName . '.'], $addressData[$fieldName]);\n\n\t\t\t// Get field item\n\t\t\t$fieldsMarkerArray['###FIELD_' . strtoupper($fieldName) . '###'] = $this->cObj->substituteMarkerArray($tplField, $fieldMA);\n\t\t\t$fieldsMarkerArray['###LABEL_' . strtoupper($fieldName) . '###'] = $fieldLabel;\n\t\t}\n\n\t\tforeach($hookObjectsArr as $hookObj) {\n\t\t\tif (method_exists($hookObj, 'processAddressfieldsMarkerArray'))\t{\n\t\t\t\t$fieldsMarkerArray = $hookObj->processAddressfieldsMarkerArray($fieldsMarkerArray, $tplField, $addressData, $action, $addressUid, $config , $this);\n\t\t\t}\n\t\t}\n\n\t\t// Merge fields with form template\n\t\t$formCode = $this->cObj->substituteMarkerArray($tplForm, $fieldsMarkerArray);\n\n\t\t// Create submit button and some hidden fields\n\t\t$submitCode = '<input type=\"hidden\" name=\"' . $this->prefixId . '[action]\" value=\"' . $action . '\" />';\n\t\t$submitCode.= '<input type=\"hidden\" name=\"' . $this->prefixId . '[addressid]\" value=\"' . $addressUid . '\" />';\n\t\t$submitCode.= '<input type=\"hidden\" name=\"' . $this->prefixId . '[addressType]\" value=\"' . $addressData['tx_commerce_address_type_id'] . '\" />';\n\t\t$submitCode.= '<input type=\"submit\" name=\"' . $this->prefixId . '[check]\" value=\"' . $this->pi_getLL('label_submit_edit') . '\" />';\n\n\t\t// Create a checkbox where the user can select if the address is his main address / Changed to label and field\n\t\t$isMainAddressCodeField = '<input type=\"checkbox\" name=\"' . $this->prefixId . '[ismainaddress]\"';\n\t\tif ($addressData['tx_commerce_is_main_address'] || $addressData['ismainaddress']) {\n\t\t\t$isMainAddressCodeField.= ' checked=\"checked\"';\n\t\t}\n\t\t$isMainAddressCodeField.= ' />';\n\t\t$isMainAddressCodeLabel.= $this->pi_getLL('label_is_main_address');\n\n\t\t//Fill additional information\n\t\tif ($addressData['tx_commerce_address_type_id'] == 1) {\n\t\t\t$baseMA['###MESSAGE_EDIT###'] = $this->pi_getLL('message_edit_billing');\n\t\t} elseif ($addressData['tx_commerce_address_type_id'] == 2) {\n\t\t\t$baseMA['###MESSAGE_EDIT###'] = $this->pi_getLL('message_edit_delivery');\n\t\t} else {\n\t\t\t$baseMA['###MESSAGE_EDIT###'] = $this->pi_getLL('message_edit_unknown');\n\t\t}\n\n\t\t// Fill the marker\n\t\t$baseMA['###ADDRESS_FORM_FIELDS###'] = $formCode;\n\t\t$baseMA['###ADDRESS_FORM_SUBMIT###'] = $submitCode;\n\t\t$baseMA['###ADDRESS_FORM_IS_MAIN_ADDRESS_FIELD###'] = $isMainAddressCodeField;\n\t\t$baseMA['###ADDRESS_FORM_IS_MAIN_ADDRESS_LABEL###'] = $isMainAddressCodeLabel;\n\n\t\t// @Deprecated Obsolete Marker, use Field and label instead\n\t\t$baseMA['###ADDRESS_FORM_IS_MAIN_ADDRESS###'] = $isMainAddressCodeField . ' ' . $isMainAddressCodeLabel;\n\t\t$baseMA['###ADDRESS_TYPE###'] = $this->pi_getLL('label_address_of_type_' . $this->piVars['addressType']);\n\n\t\t// Get action link\n\t\tif ((int)$this->piVars['backpid'] > 0) {\n\t\t\t$link = $this->pi_linkTP_keepPIvars_url();\n\t\t} else {\n\t\t\t$link = '';\n\t\t}\n\n\t\t$baseMA['###ADDRESS_FORM_BACK###'] = $this->pi_linkToPage(\n\t\t\t$this->pi_getLL('label_form_back', 'back'),\n\t\t\t$this->piVars['backpid'],\n\t\t\t'',\n\t\t\tarray(\n\t\t\t\t'tx_commerce_pi3' => array(\n\t\t\t\t\t'step' => $GLOBALS['TSFE']->fe_user->getKey('ses', tx_commerce_div::generateSessionKey('currentStep'))\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\tforeach($hookObjectsArr as $hookObj) {\n\t\t\tif (method_exists($hookObj, 'processAddressFormMarker')) {\n\t\t\t\t$hookObj->processAddressFormMarker($baseMA, $action, $addressUid, $addressData, $config, $this);\n\t\t\t}\n\t\t}\n\n\t\treturn '<form method=\"post\" action=\"' . $link . '\" ' . $this->conf[$addressType . '.']['formParams'] . '>' . $this->cObj->substituteMarkerArray($tplBase, $baseMA) . '</form>';\n\t}", "public function new_address() {\n\t\t$address = new Address();\n\n\t\t/*\n\t\t * Twinfield requires one default address:\n\t\t * \"There has to be one default address.\"\n\t\t */\n\t\tif ( empty( $this->addresses ) ) {\n\t\t\t$address->set_default( true );\n\t\t}\n\n\t\t$this->addresses[] = $address;\n\n\t\treturn $address;\n\t}", "public function create()\n {\n //\n return view('address.create');\n }", "public function create()\n {\n //\n return view('address.create');\n }", "public function addAddress(){\n\t\t$name = $_REQUEST['name'];\n\t\t$address = $_REQUEST['address'];\n $stuid = $_REQUEST['stuid'];\n\t\t$phone = $_REQUEST['phone'];\n\t\t$form = M(\"addressinfo\");\n\t\t$data['name'] = $name;\n \t$data['address'] = $address;\n \t$data['phone'] = $phone;\n $data['stuid'] = $stuid;\n \t$result = $form->add($data);\n\t\tif ($result) {$this->redirect('/fastfood/index.php/Admin/admin');}\n\t\t\telse {$this->error('添加失败');}\n }", "public function create()\n {\n return view('admin/address.create');\n }", "private function _createAddressField()\n {\n $address = new Zend_Form_Element_Text('address');\n $address->setLabel('bankAddress')\n ->addFilter(new Zend_Filter_StringTrim())\n ->addFilter(new Zend_Filter_StripTags())\n ->addValidator(new Zend_Validate_StringLength(array(2, 150)));\n\n return $address;\n }", "protected function prepareForm(array &$form) {\n if (empty($form['address']['widget'][0]['address']['#required'])) {\n // The address field is missing, optional, or using a non-standard widget.\n return $form;\n }\n\n $wrapper_id = Html::getUniqueId(implode('-', $form['#parents']) . '-ajax-form');\n $form += [\n '#wrapper_id' => $wrapper_id,\n '#prefix' => '<div id=\"' . $wrapper_id . '\">',\n '#suffix' => '</div>',\n ];\n $form['address']['widget'][0]['address']['#form_wrapper'] = $form['#wrapper_id'];\n $form['address']['widget'][0]['address']['#process'] = [\n // Keep the default #process functions defined in Address::getInfo().\n [Address::class, 'processAddress'],\n [Address::class, 'processGroup'],\n // Add our own #process.\n [get_class($this), 'replaceAjaxCallback'],\n ];\n\n return $form;\n }", "function newFormBookmark()\n\t{\n\t\t$form = $this->initFormBookmark();\n\t\t$html1 = $form->getHTML();\n\t\t$html2 = '';\n\t\tif (!$_REQUEST[\"bm_link\"])\n\t\t{\n\t\t\t$form2 = $this->initImportBookmarksForm();\n\t\t\t$html2 = \"<br />\" . $form2->getHTML();\n\t\t}\n\t\t$this->tpl->setVariable(\"ADM_CONTENT\", $html1.$html2);\n\t}", "public function deliveryAddressForm()\n {\n # Get all countries informations\n $countries = new Country();\n $countries->get();\n\n # Define countries list\n $data['countries']['all'] = $countries->all_to_single_array('name');\n\n # Define dafaul user country\n $data['countries']['user'] = 36; # 36 is the Brasil ID into database\n\n # Print the view\n echo $this->load->view('site/user/edit/delivery_address_new', $data, TRUE);\n }", "public function create()\n {\n $title = \"Office Address\";\n $data = compact('title');\n return view('admin_panel.address_create', $data);\n }", "function makeAddress($label){\n\t\t\t$addressdata = $this -> makeRequest('GET', '/new_address', array(\n\t\t\t\t'password'=>$_SESSION['walletpass'],\n\t\t\t\t'label'=>$label\n\t\t\t\t));\n\t\t\treturn $addressdata['address'];\n\t\t\t\n\t\t}", "public function create()\n {\n return view('addresses.create');\n }", "private function get_form_fragment($title,$name,$addressdata)\n {\n\n return \"<div ><strong>{$title}:</strong><input name=\\\"adresse[$name]\\\" type='text' value=\\\"$addressdata\\\" ></div>\";\n\n }", "public function create()\n {\n return $this->form->render('mconsole::places.form');\n }", "protected function SetupPanel() {\n\t\t\t$this->mctAddress = AddressMetaControl::Create($this, $this->strUrlHashArgument, QMetaControlCreateType::CreateOnRecordNotFound);\n\n\t\t\t// Dialog Message\n\t\t\t$this->dlgMessage = new MessageDialog($this);\n\t\t\t$this->dlgMessage_Reset();\n\t\t\t$this->btnSave->RemoveAllActions(QClickEvent::EventName);\n\t\t\t$this->btnSave->AddAction(new QClickEvent(), new QShowDialogBox($this->dlgMessage));\n\t\t\t$this->btnSave->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnSave_Click'));\n\n\t\t\tif (!$this->mctAddress->EditMode) {\n\t\t\t\t// Trying to create a NEW address\n\t\t\t\t$this->mctAddress->Address->Person = $this->objPerson;\n\t\t\t\t$this->btnSave->Text = 'Create';\n\t\t\t} else {\n\t\t\t\t// Ensure the Address object belongs to the person\n\t\t\t\tif ($this->mctAddress->Address->PersonId != $this->objPerson->Id) {\n\t\t\t\t\treturn $this->ReturnTo('#contact');\n\t\t\t\t}\n\t\t\t\t$this->btnSave->Text = 'Update';\n\n\t\t\t\t$this->btnDelete = new QLinkButton($this);\n\t\t\t\t$this->btnDelete->Text = 'Delete';\n\t\t\t\t$this->btnDelete->CssClass = 'delete';\n\t\t\t\t$this->btnDelete->AddAction(new QClickEvent(), new QConfirmAction('Are you SURE you want to permenantly DELETE this record?'));\n\t\t\t\t$this->btnDelete->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnDelete_Click'));\n\t\t\t\t$this->btnDelete->AddAction(new QClickEvent(), new QTerminateAction());\n\t\t\t}\n\n\t\t\t// Create Controls\n\t\t\t$this->lstAddressType = $this->mctAddress->lstAddressType_Create();\n\t\t\t$this->calDateUntilWhen = $this->mctAddress->calDateUntilWhen_Create();\n\t\t\t$this->calDateUntilWhen->MinimumYear = 2000;\n\t\t\t$this->calDateUntilWhen->MaximumYear = date('Y') + 10;\n\t\t\t$this->chkCurrentFlag = $this->mctAddress->chkCurrentFlag_Create();\n\n\t\t\t// Fixup \"Address Type\"\n\t\t\t$this->lstAddressType->GetItem(0)->Name = 'Previous Home';\n\t\t\tif (!$this->mctAddress->EditMode) $this->lstAddressType->AddSelectOneOption();\n\n\t\t\t$this->chkInvalidFlag = $this->mctAddress->chkInvalidFlag_Create();\n\t\t\t$this->txtAddress1 = $this->mctAddress->txtAddress1_Create();\n\t\t\t$this->txtAddress2 = $this->mctAddress->txtAddress2_Create();\n\t\t\t$this->txtAddress3 = $this->mctAddress->txtAddress3_Create();\n\t\t\t$this->txtCity = $this->mctAddress->txtCity_Create();\n\t\t\t$this->lstState = $this->mctAddress->lstState_Create();\n\t\t\t$this->txtZipCode = $this->mctAddress->txtZipCode_Create();\n\t\t\t$this->txtCountry = $this->mctAddress->txtCountry_Create();\n\t\t\t$this->txtInternationalState = $this->mctAddress->txtState_Create();\n\t\t\t$this->txtInternationalState->Visible = false;\n\t\t\t$this->chkInternationalFlag = $this->mctAddress->chkInternationalFlag_Create();\n\t\t\t$this->chkInternationalFlag->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'chkInternationalFlag_Click'));\n\t\t\t$this->chkInternationalFlag_Click();\n\t\t\t\n\t\t\t// Add Actions\n\t\t\t$this->lstAddressType->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'lstAddressType_Change'));\n\n\t\t\t// Setup Controls\n\t\t\t$this->lstAddressType_Change();\n\t\t}", "public function addAddress($i = '')\n {\n $index = $this->getIndex($i);\n $index_text = $this->getIndexText($i);\n $this->setCols(3, 9, 'md');\n $this->addTextarea('address' . $index, '', 'Address' . $index_text, 'required');\n $this->groupInputs('zip_code' . $index, 'city' . $index);\n $this->setCols(3, 4, 'md');\n $this->addInput('text', 'zip_code' . $index, '', 'Zip Code' . $index_text, 'required');\n $this->setCols(2, 3, 'md');\n $this->addInput('text', 'city' . $index, '', 'City' . $index_text, 'required');\n $this->setCols(3, 9, 'md');\n $this->addCountrySelect('country' . $index, 'Country' . $index_text, 'class=no-autoinit, data-width=100%, required');\n\n return $this;\n }", "public function buildForm()\n {\n $this\n ->addNarrative('location_description_narrative')\n ->addAddMoreButton('add', 'location_description_narrative');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function createnewaddressbookAction()\n {\n $addressBookName = $this->getRequest()->getParam('name');\n $visibility = $this->getRequest()->getParam('visibility');\n $website = $this->getRequest()->getParam('website', 0);\n $client = Mage::helper('ddg')->getWebsiteApiClient($website);\n if ($addressBookName !== '' && $client instanceof Dotdigitalgroup_Email_Model_Apiconnector_Client) {\n $response = $client->postAddressBooks($addressBookName, $visibility);\n if (isset($response->message))\n Mage::getSingleton('adminhtml/session')->addError($response->message);\n else\n Mage::getSingleton('adminhtml/session')->addSuccess('Address book : '. $addressBookName . ' created.');\n }\n\n }", "public function create()\n {\n $negara= NegaraModel::select()->get();\n return view('cms.pages.address.add', compact('negara'));\n }", "function InputForm()\n\t{\t\n\t\tif (!$data = $this->details)\n\t\t{\t$data = $_POST;\n\t\t}\n\t\t\n\t\t$form = new Form($_SERVER[\"SCRIPT_NAME\"] . \"?id=\" . $this->id . \"&city=\" . $_GET[\"city\"], \"course_edit\");\n\t\t$form->AddTextInput(\"Location title\", \"loctitle\", $this->InputSafeString($data[\"loctitle\"]), \"long\", 255, 1);\n\t\t$form->AddSelect(\"City\", \"city\", $data[\"city\"] ? $data[\"city\"] : $_GET[\"city\"], \"\", $this->CityList(), true, true);\n\t\t$form->AddTextArea(\"Address\", \"address\", $this->InputSafeString($data[\"address\"]), \"desc_text\");\n\t\t$form->AddTextArea(\"Access &amp; facilities\", \"directions\", $this->InputSafeString($data[\"directions\"]), \"desc_text\");\n\t\t$form->AddTextInput(\"Google latitude\", \"googlelat\", $this->InputSafeString($data[\"googlelat\"]), \"\", 20, 0, \"onchange='akGoogleMapRefresh();'\");\n\t\t$form->AddTextInput(\"Google longitude<br /><a onclick='akGoogleMapLookUp();'>get these from address</a>\", \"googlelong\", $this->InputSafeString($data[\"googlelong\"]), \"\", 20, 0, \"onchange='akGoogleMapRefresh();'\");\n\t\t$form->AddRawText(\"<p><label>Map (<a onclick='akGoogleMapRefresh();'>refresh</a>)</label><div id='gmap' style='width: 500px; height: 420px; position:relative; display: none;'>&nbsp;</div><div class='clear'></div></p>\");\n\t\tif ($data[\"googlelat\"] || $data[\"googlelong\"])\n\t\t{\t$form->AddRawText($this->GoogleMap($data[\"googlelat\"], $data[\"googlelong\"], $data[\"loctitle\"]));\n\t\t}\n\t\t$form->AddSubmitButton(\"\", $this->id ? \"Save Changes\" : \"Create New Location\", \"submit\");\n\t\t\n\t\tif ($histlink = $this->DisplayHistoryLink(\"locations\", $this->id))\n\t\t{\techo \"<p>\", $histlink, \"</p>\";\n\t\t}\n\t\tif ($this->CanDelete())\n\t\t{\techo \"<p><a href='\", $_SERVER[\"SCRIPT_NAME\"], \"?id=\", $this->id, \"&delete=1\", \n\t\t\t\t\t$_GET[\"delete\"] ? \"&confirm=1\" : \"\", \"'>\", $_GET[\"delete\"] ? \"please confirm you really want to \" : \"\", \n\t\t\t\t\t\"delete this location</a></p>\\n\";\n\t\t}\n\t\t$form->Output();\n\t}", "function add_address() {\n\t\t //$mailchimpform = mailchimpSF_signup_form();\n $cont .= '<span class=\"logo-address\">507 Kent Street, Utica, NY 13501 | (315) 797-2233 toll free (877) 719-9996</span>';\n\t \n\t echo $cont;\n }", "function GetContactForm(){\n $result = '<div id=\"newcontact\" style=\"display: none;\">'; $result .= \"\\n\"; $result .= '<div id=\"popupContact\">';\n $result .= \"\\n\"; $result .= '<form action=\"#\" id=\"form\" method=\"post\" name=\"form\">'; $result .= \"\\n\"; $result .= '<img id=\"close\" src=\"images/close.png\" onclick =\"div_hide()\">'; $result .= \"\\n\"; $result .= '<h2>Add New Contact</h2>'; $result .= \"\\n\"; $result .= '<hr>'; $result .= \"\\n\"; $result .= '<input id=\"name\" name=\"name\" placeholder=\"Name\" type=\"text\">'; $result .= \"\\n\"; $result .= '<input id=\"email\" name=\"email\" placeholder=\"Email\" type=\"text\">'; $result .= \"\\n\"; $result .= '<input id=\"phonenumber\" name=\"phonenumber\" placeholder=\"Phone Number\" type=\"text\">'; $result .= \"\\n\"; $result .= '<input id=\"subject\" name=\"subject\" placeholder=\"Subject\" type=\"text\">'; $result .= \"\\n\"; $result .= '<textarea id=\"message\" name=\"message\" placeholder=\"Message\"></textarea>'; $result .= \"\\n\"; $result .= '<button type=\"button\" name = \"submit\" id=\"submit\" onclick=\"savecontact()\">Save</button>'; $result .= \"\\n\"; $result .= '</form>'; $result .= \"\\n\"; $result .= '</div>';\n $result .= \"\\n\"; $result .= '</div>'; $result .= \"\\n\";\n return $result;\n}", "public function create()\n {\n return view('admin.accountaddresses.create');\n }", "public function addAddress()\n\t{\n\t\treturn $this->editAddress();\n\t}" ]
[ "0.66839224", "0.6406704", "0.6356827", "0.63213736", "0.62323946", "0.62238514", "0.6207272", "0.6207272", "0.61796916", "0.61714125", "0.6155293", "0.61370003", "0.61220044", "0.60969067", "0.6068686", "0.60025996", "0.5927985", "0.59104496", "0.5893943", "0.5893456", "0.5880424", "0.583601", "0.5834674", "0.5789138", "0.5783585", "0.5741297", "0.5731235", "0.5719834", "0.5718068", "0.5710421" ]
0.64480716
1
Retrieve a list of writable backends
function getWritableBackends () { global $abook; $write = array(); $backends = $abook->get_backend_list(); while (list($undef,$v) = each($backends)) { if ($v->writeable) { $write[$v->bnum]=$v->sname; } } return $write; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEnabledBackends(){\n\t\t$backendMapper = $this->app['BackendMapper'];\n\t\treturn $backendMapper->getAll();\n\t}", "public function getRegisterBackends()\n {\n \treturn $this->backends;\n }", "function get_backend_list($type = '') {\n $ret = array();\n for ($i = 1 ; $i <= $this->numbackends ; $i++) {\n if (empty($type) || $type == $this->backends[$i]->btype) {\n $ret[] = &$this->backends[$i];\n }\n }\n return $ret;\n }", "protected function getRegisteredBackends() {}", "function getBackendList()\n {\n $files = Misc::getFileList(APP_INC_PATH . '/customer');\n $list = array();\n for ($i = 0; $i < count($files); $i++) {\n // make sure we only list the customer backends\n if (preg_match('/^class\\.(.*)\\.php$/', $files[$i], $matches)) {\n // display a prettyfied backend name in the admin section\n if ($matches[1] == \"abstract_customer_backend\") {\n continue;\n }\n $name = ucwords(str_replace('_', ' ', $matches[1]));\n $list[$files[$i]] = $name;\n }\n }\n return $list;\n }", "public function getAdapters()\n {\n return $this->storageAdapters;\n }", "public static function getAvailableDrivers()\n {\n return array_keys(self::$_driverMap);\n }", "public function getServerExtList()\n {\n return $this->server_caps;\n }", "public static function getSupportedAdapters()\n {\n $adapterStorageDir = dirname(__FILE__) . \"/Adapter/\";\n $adapter = glob($adapterStorageDir . \"*\", GLOB_ONLYDIR | GLOB_NOSORT);\n array_walk($adapter, function(&$value) {\n $value = basename($value);\n });\n\n return $adapter;\n }", "public function getBackend();", "public function getDrivers()\n {\n return $this->drivers;\n }", "public function getDrivers(): array\n {\n return $this->drivers;\n }", "public function getEnabledAdapters()\n {\n $where = $this->getAdapter()->quoteInto('enabled = ?', 1);\n return $this->fetchAll($where, 'displayOrder');\n }", "function getBackend() ;", "public function getDrivers()\n {\n return DriverList::getAvailableDrivers();\n }", "public static function get_drivers() {\n return array(\n '' => get_string('choosedots'),\n 'native/mysqli' => \\moodle_database::get_driver_instance('mysqli', 'native')->get_name(),\n 'native/mariadb' => \\moodle_database::get_driver_instance('mariadb', 'native')->get_name(),\n 'native/pgsql' => \\moodle_database::get_driver_instance('pgsql', 'native')->get_name(),\n 'native/oci' => \\moodle_database::get_driver_instance('oci', 'native')->get_name(),\n 'native/sqlsrv' => \\moodle_database::get_driver_instance('sqlsrv', 'native')->get_name()\n );\n }", "protected function getAdapters(): array\n {\n return [\n \"grouped\" => \"Phalcon\\\\Config\\\\Adapter\\\\Grouped\",\n \"ini\" => \"Phalcon\\\\Config\\\\Adapter\\\\Ini\",\n \"json\" => \"Phalcon\\\\Config\\\\Adapter\\\\Json\",\n \"php\" => \"Phalcon\\\\Config\\\\Adapter\\\\Php\",\n \"yaml\" => \"Phalcon\\\\Config\\\\Adapter\\\\Yaml\",\n ];\n }", "public abstract function getBackend();", "public function getAvailableExtensions() {}", "public function getSupportedModules()\n {\n return $this->supportedModules;\n }", "public function getSupportedEngines()\n {\n return array_keys($this->engine_supported);\n }", "abstract protected function getAdapters(): array;", "public function getBackend() {}", "public function getBackend() {}", "function getEnabledPlugins();", "public static function listDrivers() {\n if (!sizeof(self::$drivers)) {\n self::$drivers = array();\n foreach (glob(__DIR__.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR.'*') as $dir) {\n self::loadDriver(basename($dir));\n }\n }\n\n return array_keys(array_filter(self::$drivers));\n }", "public function get_registered_services() {\n\t\t$data = [];\n\t\t$res = self::$dbo->query( 'SELECT storage_service FROM snapshot_storage_credentials' );\n\t\twhile ( $row = $res->fetchArray() ) {\n\t\t\t$data[] = $row['storage_service'];\n\t\t}\n\n\t\treturn $data;\n\t}", "public function getDriverNames(): array;", "public static function getAvailableAdapters()\n {\n return Image::getAvailableAdapters();\n }", "public function get_dbs()\n\t{\n\t\treturn $this->driver_query('db_list');\n\t}" ]
[ "0.6917876", "0.6834807", "0.606933", "0.6026906", "0.6025591", "0.5840202", "0.57328355", "0.56098604", "0.5494827", "0.5475094", "0.5469134", "0.5462318", "0.5448446", "0.54367346", "0.539683", "0.5376487", "0.5368703", "0.5327346", "0.5313529", "0.53024644", "0.52846396", "0.5282267", "0.5281043", "0.5281043", "0.5269279", "0.52630883", "0.5253914", "0.52435654", "0.52346116", "0.52316594" ]
0.73940504
0
Address book sorting options returns address book sorting order
function get_abook_sort() { global $data_dir, $username; /* get sorting order */ if(sqgetGlobalVar('abook_sort_order', $temp, SQ_GET)) { $abook_sort_order = (int) $temp; if ($abook_sort_order < 0 or $abook_sort_order > 8) $abook_sort_order=8; setPref($data_dir, $username, 'abook_sort_order', $abook_sort_order); } else { /* get previous sorting options. default to unsorted */ $abook_sort_order = getPref($data_dir, $username, 'abook_sort_order', 8); } return $abook_sort_order; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function elm_admin_get_order_by_options() {\n\t$options = array(\n\t\t'asc' => __('ASC', 'elm'),\n\t\t'desc' => __('DESC', 'elm')\n\t);\n\t\n\treturn $options;\n}", "public function &getOrderBy();", "function printSortOptions ($url) {\n print \"<p align='center'><b>Sort by:</b> \";\n foreach ($this->sort_opts as $s) {\n if ($s != $this->sort_opts[0]) {\n\t// print a separator between terms\n\tprint \" | \";\n }\n if ($s == $this->sort) {\n\tprint \"&nbsp;\" . $this->pretty_sort_opts[$s] . \"&nbsp;\";\n } else {\n\tprint \"&nbsp;<a href='$url?sort=$s'>\" . \n\t $this->pretty_sort_opts[$s] . \"</a>&nbsp;\";\n }\n }\n print \"</p>\";\n }", "protected function getAllAvailableSortOrderOptions() {}", "public function getSorting();", "protected function get_sort_order() {\n return 111;\n }", "public function getSortOrder();", "public function getSortOrder();", "public function getSortOrder();", "protected function getAllAvailableSortDescendingOptions() {}", "function getSort(){ return 301; }", "protected function applySorting()\n\t{\n\t\t$i = 1;\n\t\tparse_str($this->order, $list);\n\t\tforeach ($list as $field => $dir) {\n\t\t\t$this->dataSource->sort($field, $dir === 'a' ? IDataSource::ASCENDING : IDataSource::DESCENDING);\n\t\t\t$list[$field] = array($dir, $i++);\n\t\t}\n\t\treturn $list;\n\t}", "function getSort() {\n return 999;\n }", "function qw_default_sort_options( $sort_options ) {\n\n\t$sort_options['author_id'] = array(\n\t\t'title' => 'Author',\n\t\t'description' => 'The content author ID.',\n\t\t'type' => 'author',\n\t);\n\t$sort_options['comment_count'] = array(\n\t\t'title' => 'Comment Count',\n\t\t'description' => 'Total number of comments on a piece of content.',\n\t);\n\t$sort_options['menu_order'] = array(\n\t\t'title' => 'Menu Order (for Page post_types)',\n\t\t'description' => 'Menu Order of a Page.',\n\t);\n\t$sort_options['meta_value'] = array(\n\t\t'title' => 'Meta value',\n\t\t'description' => \"Note that a 'meta_key=keyname' filter must also be present in the query. Good for sorting words, but not numbers.\",\n\t);\n\t$sort_options['meta_value_num'] = array(\n\t\t'title' => 'Meta value number',\n\t\t'description' => \"Order by numeric meta value. Also note that a 'meta_key' filter must be present in the query. This value allows for numerical sorting as noted above in 'meta_value'.\",\n\t);\n\t$sort_options['none'] = array(\n\t\t'title' => 'None',\n\t\t'description' => 'No sort order.',\n\t\t'order_options' => array(\n\t\t\t'none' => 'None',\n\t\t)\n\t);\n\t$sort_options['post__in'] = array(\n\t\t'title' => 'Post__in order',\n\t\t'description' => 'Preserve post ID order given in the post__in array.',\n\t\t'order_options' => FALSE,\n\t);\n\t$sort_options['post_date'] = array(\n\t\t'title' => 'Date',\n\t\t'description' => 'The posted date of content.',\n\t\t'type' => 'date',\n\t);\n\t$sort_options['post_ID'] = array(\n\t\t'title' => 'Post ID',\n\t\t'description' => 'The ID of the content.',\n\t\t'type' => 'ID',\n\t);\n\t$sort_options['post_modified'] = array(\n\t\t'title' => 'Date Modified',\n\t\t'description' => 'Date content was last modified.',\n\t\t'type' => 'modified',\n\t);\n\t$sort_options['post_parent'] = array(\n\t\t'title' => 'Parent',\n\t\t'description' => 'The parent post for content.',\n\t\t'type' => 'parent',\n\t);\n\t$sort_options['post_title'] = array(\n\t\t'title' => 'Title',\n\t\t'description' => 'The title of the content.',\n\t\t'type' => 'title',\n\t);\n\t$sort_options['rand'] = array(\n\t\t'title' => 'Random',\n\t\t'description' => 'Random order.',\n\t);\n\n\treturn $sort_options;\n}", "function usort_reorder($a, $b) {\n\t$orderby = (!empty($_GET['orderby']) ) ? $_GET['orderby'] : 'booktitle';\n\t// If no order, default to asc\n\t$order = (!empty($_GET['order']) ) ? $_GET['order'] : 'asc';\n\t// Determine sort order\n\t$result = strcmp($a[$orderby], $b[$orderby]);\n\t// Send final sort direction to usort\n\treturn ( $order === 'asc' ) ? $result : -$result;\n }", "function getSort(){\n\treturn 281;\n}", "function sort_flag() {\n return SORT_STRING;\n }", "public function sortOptions() {\n $options = array();\n\n foreach($this->options as $key => $option) {\n $optionTitle = $option['optionTitle'];\n $options[$optionTitle] = $option;\n }\n\n ksort($options);\n reset($options);\n\n $this->options = $options;\n }", "public function getXXXOrdering()\n\t{\n\t\treturn array('title_asc', 'title_desc');\n\t}", "function SetUpSortOrder() {\n\t\tglobal $scholarship_package;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$scholarship_package->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$scholarship_package->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_package_id); // scholarship_package_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->start_date); // start_date\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->end_date); // end_date\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->status); // status\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->annual_amount); // annual_amount\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->grant_package_grant_package_id); // grant_package_grant_package_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->sponsored_student_sponsored_student_id); // sponsored_student_sponsored_student_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_type); // scholarship_type\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_type_scholarship_type); // scholarship_type_scholarship_type\n\t\t\t$scholarship_package->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function SetUpSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->id); // id\n\t\t\t$this->UpdateSort($this->name); // name\n\t\t\t$this->UpdateSort($this->_email); // email\n\t\t\t$this->UpdateSort($this->companyname); // companyname\n\t\t\t$this->UpdateSort($this->servicetime); // servicetime\n\t\t\t$this->UpdateSort($this->country); // country\n\t\t\t$this->UpdateSort($this->phone); // phone\n\t\t\t$this->UpdateSort($this->skype); // skype\n\t\t\t$this->UpdateSort($this->website); // website\n\t\t\t$this->UpdateSort($this->linkedin); // linkedin\n\t\t\t$this->UpdateSort($this->facebook); // facebook\n\t\t\t$this->UpdateSort($this->twitter); // twitter\n\t\t\t$this->UpdateSort($this->active_code); // active_code\n\t\t\t$this->UpdateSort($this->identification); // identification\n\t\t\t$this->UpdateSort($this->link_expired); // link_expired\n\t\t\t$this->UpdateSort($this->isactive); // isactive\n\t\t\t$this->UpdateSort($this->google); // google\n\t\t\t$this->UpdateSort($this->instagram); // instagram\n\t\t\t$this->UpdateSort($this->account_type); // account_type\n\t\t\t$this->UpdateSort($this->logo); // logo\n\t\t\t$this->UpdateSort($this->profilepic); // profilepic\n\t\t\t$this->UpdateSort($this->mailref); // mailref\n\t\t\t$this->UpdateSort($this->deleted); // deleted\n\t\t\t$this->UpdateSort($this->deletefeedback); // deletefeedback\n\t\t\t$this->UpdateSort($this->account_id); // account_id\n\t\t\t$this->UpdateSort($this->start_date); // start_date\n\t\t\t$this->UpdateSort($this->end_date); // end_date\n\t\t\t$this->UpdateSort($this->year_moth); // year_moth\n\t\t\t$this->UpdateSort($this->registerdate); // registerdate\n\t\t\t$this->UpdateSort($this->login_type); // login_type\n\t\t\t$this->UpdateSort($this->accountstatus); // accountstatus\n\t\t\t$this->UpdateSort($this->ispay); // ispay\n\t\t\t$this->UpdateSort($this->profilelink); // profilelink\n\t\t\t$this->UpdateSort($this->source); // source\n\t\t\t$this->UpdateSort($this->agree); // agree\n\t\t\t$this->UpdateSort($this->balance); // balance\n\t\t\t$this->UpdateSort($this->job_title); // job_title\n\t\t\t$this->UpdateSort($this->projects); // projects\n\t\t\t$this->UpdateSort($this->opportunities); // opportunities\n\t\t\t$this->UpdateSort($this->isconsaltant); // isconsaltant\n\t\t\t$this->UpdateSort($this->isagent); // isagent\n\t\t\t$this->UpdateSort($this->isinvestor); // isinvestor\n\t\t\t$this->UpdateSort($this->isbusinessman); // isbusinessman\n\t\t\t$this->UpdateSort($this->isprovider); // isprovider\n\t\t\t$this->UpdateSort($this->isproductowner); // isproductowner\n\t\t\t$this->UpdateSort($this->states); // states\n\t\t\t$this->UpdateSort($this->cities); // cities\n\t\t\t$this->UpdateSort($this->offers); // offers\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function getSort(){\n return 301;\n }", "function sort_options( $options, $params ) {\n\n if ( FWP()->helper->facet_setting_exists( 'type', 'proximity' ) ) {\n $options['distance'] = [\n 'label' => __( 'Distance', 'fwp-front' ),\n 'query_args' => [\n 'orderby' => 'post__in',\n 'order' => 'ASC',\n ],\n ];\n }\n\n return $options;\n }", "function SetupSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = @$_GET[\"order\"];\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->nombre_contacto); // nombre_contacto\n\t\t\t$this->UpdateSort($this->name); // name\n\t\t\t$this->UpdateSort($this->lastname); // lastname\n\t\t\t$this->UpdateSort($this->_email); // email\n\t\t\t$this->UpdateSort($this->address); // address\n\t\t\t$this->UpdateSort($this->phone); // phone\n\t\t\t$this->UpdateSort($this->cell); // cell\n\t\t\t$this->UpdateSort($this->created_at); // created_at\n\t\t\t$this->UpdateSort($this->id_sucursal); // id_sucursal\n\t\t\t$this->UpdateSort($this->tipoinmueble); // tipoinmueble\n\t\t\t$this->UpdateSort($this->tipovehiculo); // tipovehiculo\n\t\t\t$this->UpdateSort($this->tipomaquinaria); // tipomaquinaria\n\t\t\t$this->UpdateSort($this->tipomercaderia); // tipomercaderia\n\t\t\t$this->UpdateSort($this->tipoespecial); // tipoespecial\n\t\t\t$this->UpdateSort($this->email_contacto); // email_contacto\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function getSort(){\n return 188;\n }", "public function order();", "function SetUpSortOrder() {\r\n\t\tglobal $fs_multijoin_v;\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$fs_multijoin_v->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$fs_multijoin_v->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->id); // id\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->mount); // mount\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->path); // path\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->parent); // parent\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->deprecated); // deprecated\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->name); // name\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->snapshot); // snapshot\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->tapebackup); // tapebackup\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->diskbackup); // diskbackup\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->type); // type\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->CONTACT); // CONTACT\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->CONTACT2); // CONTACT2\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->RESCOMP); // RESCOMP\r\n\t\t\t$fs_multijoin_v->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "function getSort(){\n return 999;\n }", "function getSort(){\n return 999;\n }", "function getOrderings() ;" ]
[ "0.6775465", "0.64128023", "0.6384213", "0.6282213", "0.6216568", "0.6177193", "0.6176605", "0.6176605", "0.6176605", "0.6116412", "0.60500515", "0.60473394", "0.60339946", "0.60121197", "0.6000322", "0.59953564", "0.599119", "0.5990198", "0.5975267", "0.5956675", "0.5952113", "0.5927759", "0.59262866", "0.5908236", "0.5897506", "0.58869994", "0.5881232", "0.5872718", "0.5872718", "0.58688104" ]
0.6856309
0
This function shows the address book sort button.
function show_abook_sort_button($abook_sort_order, $alt_tag, $Down, $Up, $uri_extra=array() ) { global $form_url, $icon_theme_path; /* Figure out which image we want to use. */ if ($abook_sort_order != $Up && $abook_sort_order != $Down) { $img = 'sort_none.png'; $text_icon = '&#9723;'; // U+25FB WHITE MEDIUM SQUARE $which = $Up; } elseif ($abook_sort_order == $Up) { $img = 'up_pointer.png'; $text_icon = '&#8679;'; // U+21E7 UPWARDS WHITE ARROW $which = $Down; } else { $img = 'down_pointer.png'; $text_icon = '&#8681;'; // U+21E9 DOWNWARDS WHITE ARROW $which = 8; } $uri_extra['abook_sort_order'] = $which; $uri = set_uri_vars($form_url, $uri_extra, FALSE); /* Now that we have everything figured out, show the actual button. */ return create_hyperlink($uri, getIcon($icon_theme_path, $img, $text_icon, $alt_tag), '', '', '', '', '', array('style' => 'text-decoration:none', 'title' => $alt_tag), FALSE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sort_list()\r\n {\r\n return view( $this->_skin .'.web.help_sort');\r\n }", "function printSortOptions ($url) {\n print \"<p align='center'><b>Sort by:</b> \";\n foreach ($this->sort_opts as $s) {\n if ($s != $this->sort_opts[0]) {\n\t// print a separator between terms\n\tprint \" | \";\n }\n if ($s == $this->sort) {\n\tprint \"&nbsp;\" . $this->pretty_sort_opts[$s] . \"&nbsp;\";\n } else {\n\tprint \"&nbsp;<a href='$url?sort=$s'>\" . \n\t $this->pretty_sort_opts[$s] . \"</a>&nbsp;\";\n }\n }\n print \"</p>\";\n }", "function show()\r\n\t{\r\n\t\t?>\r\n\r\n\t\t<button class='textlayout' type=\"submit\" name=\"itemtoedit\" value=\"<?php echo $this->orderno ?>\" >\r\n\t\t\t<p>\r\n\t\t\t<span style='font-weight:bold'><?php echo $this->orderno . \". \" . $this->question ; ?></span>\r\n\t\t\t<span style='font-weight:normal'>(<?php echo $this->typeshort; ?>)</span><br>\r\n\t\t\t<span><?php $n = 1; foreach($this->answers as $answerobject){if ($n > 1){echo \", \";}$n ++;echo $answerobject->answer;}?></span>\r\n\t\t\t</p>\r\n\t\t</button><br>\r\n\t\t\r\n\t\t<?php \r\n\t}", "function renderSkyscraperListSort() {\n\n\t// query string that will be used to retain other GET variables in searches\n\tinput()->whitelist->remove('sort');\n\t$queryString = input()->whitelist->queryString();\n\tif($queryString) $queryString = sanitizer('entities', \"&$queryString\");\n\n\t// get the 'sort' property, if it's present\n\t$sort = input()->get('sort');\n\t$validSorts = getValidSorts();\n\t\n\t// validate the 'sort' pulled from input\n\tif(!$sort || !isset($validSorts[$sort])) $sort = 'name';\n\n\t$options = array();\n\t$selectedLabel = '';\n\n\t// generate options\n\tforeach($validSorts as $key => $label) {\n\t\tif($key === $sort) $selectedLabel = $label;\n\t\t$options[\"./?sort=$key$queryString\"] = $label;\n\t}\n\n\t// render output\n\t$out = files()->render('./includes/skyscraper-list-sort.php', array(\n\t\t'options' => $options, \n\t\t'selectedLabel' => $selectedLabel\n\t));\n\t\n\treturn $out;\n}", "function tpps_details_tags_sort() {\n $output = \"\";\n\n $query = db_select('tpps_tag', 't')\n ->fields('t')\n ->orderBy('static', 'DESC')\n ->orderBy('tpps_tag_id')\n ->execute();\n $tags = array();\n while (($result = $query->fetchObject())) {\n $tags[$result->tpps_tag_id] = array(\n 'id' => $result->tpps_tag_id,\n 'name' => $result->name,\n 'color' => $result->color,\n 'static' => $result->static,\n );\n }\n\n $output .= tpps_show_tags($tags);\n\n return \"<label for=\\\"tpps-tags-filter\\\">Sort by tags:</label><div id=\\\"tpps-tags-filter\\\">\" . $output . \"</div>\";\n}", "function display() {\n\n\t\twp_nonce_field( 'ajax-custom-list-nonce', '_ajax_custom_list_nonce' );\n\n\t\techo '<input type=\"hidden\" id=\"order\" name=\"order\" value=\"' . $this->_pagination_args['order'] . '\" />';\n\t\techo '<input type=\"hidden\" id=\"orderby\" name=\"orderby\" value=\"' . $this->_pagination_args['orderby'] . '\" />';\n\n\t\tparent::display();\n\t}", "function wa_wcc_posts_orderby(){\n\n\t\techo '\n\t\t<div id=\"wa_wcc_posts_orderby\">\n\t\t\t<input type=\"text\" name=\"wa_wcc_settings[posts_orderby]\" value=\"'.esc_attr($this->options['settings']['posts_orderby']).'\" />\n\t\t</div>';\n\n\t}", "function headlink($label, $this_sort) {\n global $sort, $reverse, $course_code, $themeimg, $langUp, $langDown;\n $base_url = $_SERVER['SCRIPT_NAME'] . '?course=' . $course_code;\n\n if ($sort == $this_sort) {\n $this_reverse = !$reverse;\n $indicator = \" <img src='$themeimg/arrow_\" .\n ($reverse ? 'up' : 'down') . \".png' alt='\" .\n ($reverse ? $langUp : $langDown) . \"'>\";\n } else {\n $this_reverse = $reverse;\n $indicator = '';\n }\n return '<a class=\"text-white\" href=\"' . $base_url .\n '&amp;sort=' . $this_sort . ($this_reverse ? '&amp;rev=1' : '') .\n '\">' . $label . $indicator . '</a>';\n}", "public function getSortMenu();", "public function display()\n\t{\n\t\t$this->list_table->prepare_items( $this->orderby );\n\n\t\t$this->form_start_get( 'process-all-items', null, 'process-all-items' );\n\t\t\t?><button>Process All Items</button><?php\n\t\t$this->form_end();\n\t\t\n\t\t$this->form_start_get( 'clear', null, 'clear' );\n\t\t\t?><button>Clear Items</button><?php\n\t\t$this->form_end();\n\n\t\t$this->form_start( 'upload-table' );\n\t\t\t$this->list_table->display();\n\t\t$this->form_end();\n\t}", "function getTableSortButtons(string $table, string $field = \"id\"): string\n{\n global $query;\n $ASC = \"\";\n $DESC = \"\";\n if ($table === $query['orderbytable'] && $field === $query['orderbyfield']) {\n // $query['orderdir'] is 'ASC' or 'DESC'\n ${ $query['orderdir'] } = \"selected-sort-option\";\n }\n\n $sortQuery = [\n \"section\" => \"admin:$query[section]\",\n \"action\" => \"read\",\n ];\n $sortQuery['orderbytable'] = $table;\n $sortQuery['orderbyfield'] = $field;\n\n $sortQuery['orderdir'] = 'ASC';\n $ascUrl = buildUrl($sortQuery);\n $sortQuery['orderdir'] = 'DESC';\n $descUrl = buildUrl($sortQuery);\n\n return\n \"<div class='table-sort-arrows'>\n <a class='$ASC' href='$ascUrl'>&#9650</a>\n <a class='$DESC' href='$descUrl'>&#9660</a>\n </div>\";\n}", "public function orderControl() {\n $orderField = (string)$this->object->info->info->form->orderBy;\n $orderItems = explode(',', $orderField);\n if (count($orderItems)>1 && $orderField != '') {\n $options = array();\n $selectedItem = Session::get('ord_'.$this->type);\n foreach ($orderItems as $orderItem) {\n $infoOrderItem = explode(' ', trim($orderItem));\n $options['asc_'.$infoOrderItem[0]] = __($infoOrderItem[0]);\n $options['des_'.$infoOrderItem[0]] = __($infoOrderItem[0]).' ('.__('reverse').')';\n }\n return '<div class=\"orderActions\" rel=\"'.url($this->type.'/sortList/', true).'\">\n <div class=\"orderActionsIns\">\n '.FormField::create('select', array('label'=>__('orderBy'), 'name'=>'orderList', 'value'=>$options, 'selected'=>$selectedItem)).'\n </div>\n </div>';\n }\n }", "function nav_buttons()\n\t{\n\t\t?>\n\t\t<input type=\"button\" value=\"Create New Preorder &gt;\" onclick=\"document.location='/admin/utilities/preorder.php?act=new'\" class=\"btn\">\n\t\t<p />\n\t\t<?php\n\t}", "function cb_bookings_preview_shortcode( $atts ) {\n\n$today = date(\"Y-m-d\");\n$heute = date(\"j. n. Y\");\n$print = '';\nglobal $wpdb;\n\n$cbTable = $wpdb->prefix . \"cb_bookings\";\n$query = $wpdb->prepare(\"SELECT * FROM $cbTable WHERE status = 'confirmed' AND date_end >= '%s' ORDER by location_id ASC, item_id ASC, date_start ASC\",\n\t$today\n);\n$bookings = $wpdb->get_results($query);\n$location = '';\n$item = '';\n$countLoc = 0;\n\nif ( $bookings ) {\n\t$print = \"<table class='user-bookings tablesorter'><thead><tr class='bg'><th>Standort</th><th>Lastenrad</th><th>Buchungen</th><th>Anzahl</th></tr></thead><tbody>\";\n\n\tforeach ( $bookings as $booking ) \n\t{\n\tif ($booking->location_id != $location or $booking->item_id != $item) {\n\t\tif ($countLoc > 0) {\n\t\t\t$print .= \"</ul></td><td>\".$countLoc.\"</td></tr>\";\n\t\t}\n\t\t$countLoc = 0;\n\t\t$location = $booking->location_id;\n\t\t$item = $booking->item_id;\n\t\t$loc_name = get_the_title ($location);\t\n\t\t$item_name = get_the_title ($item);\n\t\t$print .= \"<tr><td>\".$loc_name. \"</td>\";\n\t\t$print .= \"<td><b><a href='\".get_permalink($item).\"'><span class='green'>\". $item_name . \"</span></a></b></td>\";\n\t\t$anchor = $item_name.\":S\".$location;\n\t\t$show = 'document.getElementById(\"'.$anchor.'\").style.display=\"block\"';\t\t\t\n\t\t$hide = 'document.getElementById(\"'.$anchor.'\").style.display=\"none\"';\n\t\t$print .= \"<td><a class='anker' name='a:\".$anchor.\"'></a><a href='#a:\".$anchor.\"' onclick='\".$show.\"' ondblclick='\".$hide.\"'>Details</a>\";\n\t\t$print .= \"<ul id='\".$anchor.\"' style='display:none;'>\";\n\t}\n\t$countLoc++;\n\t$user = get_userdata ( $booking->user_id ); \t\t\t\t\n\t$date_start = DateTime::createFromFormat('Y-m-d', $booking->date_start);\n\t$date_end = DateTime::createFromFormat('Y-m-d', $booking->date_end);\n\t\t\t\n\t$print .= \"<li>\".$date_start->format('d.m.') . \" - \" . $date_end->format('d.m.') .\" \".$user->first_name.\" \". substr($user->last_name,0,1).\".</li>\";\n\t\n\t}\n\tif ($countLoc > 0) {\n\t\t$print .= \"</ul></td><td>\".$countLoc.\"</td></tr>\";\n\t}\n$print .= \"</tbody></table>\";\n}\nreturn $print;\n}", "function showCommentFilterPanel(){\r\n\t\techo \"<div class='filterPanel'>\";\r\n\t\techo \"<form class='orderBy' action='#' method='POST'>\";\r\n\t\techo \"<div>\";\r\n\t\techo \"<label class='filterLabel'>Ordina per: </label>\";\r\n\t\techo \"<select name='filter'>\";\r\n\t\techo \"<option value='date'>Data</option>\";\r\n\t\techo \"<option value='like'>Likes</option>\";\r\n\t\techo \"<option value='dislike'>Dislikes</option>\";\r\n\t\techo \"<option value='report'>Segnalazioni</option>\";\r\n\t\techo \"</select>\";\r\n\t\techo \"<label class='filterLabel'>Crescente <input type='radio' name='order' value='asc' checked></label>\";\r\n\t\techo \"<label class='filterLabel'>Decrescente <input type='radio' name='order' value='desc'></label>\";\r\n\t\techo \"</div>\";\r\n\t\techo \"<button type='submit' class='button smallButton' name='sort'>Ordina</button>\";\r\n\t\techo \"</form>\";\r\n\t\techo \"</div>\";\r\n\t}", "function click_sort($order) {\n if (isset($this->real_field)) {\n // Since fields should always have themselves already added, just\n // add a sort on the field.\n $params = array('type' => 'numeric');\n $this->query->add_orderby($this->table_alias, $this->real_field, $order, $this->field_alias, $params);\n }\n }", "public function getLabel()\n {\n return 'Individuelle Sortierung';\n }", "function lb_show_order_complete_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'order-complete',\n\t\t\t'order_complete' => lb_get_order_from_orders_table_by_id( esc_html( $_GET['order_id'] ) ),\n\t\t)\n\t);\n}", "function wtsDisplayOrder($ar){\n $p = new XParam($ar, array());\n $orderoid = $p->get('orderoid');\n $r = $this->displayOrder($orderoid);\n return XShell::toScreen1('br', $r);\n }", "function listButtons() {\n\t}", "function product_sorting_link( $views ) {\n\t\tglobal $post_type, $wp_query;\n\t\t\n\t\t $settings = array(\n\t\t\t'featured_enable' => 'true'\n\t\t);\n\t\t\t\n\t\t$settings = woo_get_dynamic_values( $settings );\n\t\t\n\t\tif ( ! current_user_can('edit_others_pages') ) return $views;\n\t\t$class = ( isset( $wp_query->query['orderby'] ) && $wp_query->query['orderby'] == 'menu_order title' ) ? 'current' : '';\n\t\t$query_string = remove_query_arg(array( 'orderby', 'order' ));\n\t\t$query_string = add_query_arg( 'orderby', urlencode('menu_order title'), $query_string );\n\t\t$query_string = add_query_arg( 'order', urlencode('ASC'), $query_string );\n\t\t$query_string = add_query_arg( 'featured', urlencode('true'), $query_string );\n\t\t$views['byorder'] = '<a href=\"'. $query_string . '\" class=\"' . $class . '\">' . __( 'Sort Products', 'woocommerce' ) . '</a>';\n\n\t\treturn $views;\n\t}", "function showPostFilterPanel(){\r\n\t\techo \"<div class='filterPanel'>\";\r\n\t\techo \"<form id='orderForm' class='orderBy' action='#' method='POST'>\";\r\n\t\techo \"<div>\";\r\n\t\techo \"<label class='filterLabel'>Ordina per: </label>\";\r\n\t\techo \"<select name='filter'>\";\r\n\t\techo \"<option value='title'>Titolo</option>\";\r\n\t\techo \"<option value='date'>Data</option>\";\r\n\t\techo \"<option value='comment'>Commenti</option>\";\r\n\t\techo \"<option value='like'>Likes</option>\";\r\n\t\techo \"<option value='dislike'>Dislikes</option>\";\r\n\t\techo \"</select>\";\r\n\t\techo \"<label class='filterLabel'>Crescente <input type='radio' name='order' value='asc' checked></label>\";\r\n\t\techo \"<label class='filterLabel'>Decrescente <input type='radio' name='order' value='desc'></label>\";\r\n\t\techo \"</div>\";\r\n\t\techo \"<button type='submit' class='button smallButton' name='sort'>Ordina</button>\";\r\n\t\techo \"</form>\";\r\n\t\techo \"</div>\";\r\n\t}", "function bp_custom_notifications_sort_order_form() {\n\n \t// Setup local variables.\n \t$orders = array( 'DESC', 'ASC' );\n \t$selected = 'DESC';\n\n \t// Check for a custom sort_order.\n \tif ( !empty( $_REQUEST['sort_order'] ) ) {\n \t\tif ( in_array( $_REQUEST['sort_order'], $orders ) ) {\n \t\t\t$selected = $_REQUEST['sort_order'];\n \t\t}\n \t} ?>\n\n \t<form action=\"\" method=\"get\" id=\"notifications-sort-order\">\n\n \t\t<select id=\"notifications-sort-order-list\" name=\"sort_order\" onchange=\"this.form.submit();\">\n \t\t\t<option value=\"DESC\" <?php selected( $selected, 'DESC' ); ?>><?php _e( 'Newest First', 'zola' ); ?></option>\n \t\t\t<option value=\"ASC\" <?php selected( $selected, 'ASC' ); ?>><?php _e( 'Oldest First', 'zola' ); ?></option>\n \t\t</select>\n\n \t\t<noscript>\n \t\t\t<input id=\"submit\" type=\"submit\" name=\"form-submit\" class=\"submit\" value=\"<?php esc_attr_e( 'Go', 'zola' ); ?>\" />\n \t\t</noscript>\n \t</form>\n\n <?php\n }", "public function display_page_actions() {\n\t\tprintf(\n\t\t\t'<form action=\"%s\" method=\"post\">',\n\t\t\tesc_url( admin_url( 'admin-post.php?action=' . self::POST_ACTION_ID ) )\n\t\t);\n\n\t\techo '<input type=\"hidden\" name=\"page\" value=\"custom-table\"/>';\n\t\twp_nonce_field( self::POST_ACTION_ID );\n\n\t\techo '<p class=\"submit\">';\n\t\tsubmit_button(\n\t\t\tesc_html__( 'Add Entry', 'autowpdb-example-plugin' ),\n\t\t\t'primary',\n\t\t\t'add_entry',\n\t\t\tfalse\n\t\t);\n\t\tif ( ! empty( $this->table_contents ) ) {\n\t\t\techo ' ';\n\t\t\tsubmit_button(\n\t\t\t\tesc_html__( 'Delete Oldest Entry', 'autowpdb-example-plugin' ),\n\t\t\t\t'',\n\t\t\t\t'delete_entry',\n\t\t\t\tfalse\n\t\t\t);\n\t\t}\n\t\techo '</p>';\n\t\techo '</form>';\n\t}", "private function get_link_order() {\n $ordertext = '<i class=\"fa fa-sort-desc\"></i> ';\n\n $url = $this->page->url;\n\n if (isset($this->viewoptions['filter'])) {\n $url->param('filter', $this->viewoptions['filter']);\n }\n\n $url->param('order', 'desc');\n\n if (isset($this->viewoptions['order']) && $this->viewoptions['order'] == 'desc') {\n $url->param('order', 'asc');\n }\n\n if (isset($this->viewoptions['order']) && $this->viewoptions['order'] == 'desc') {\n $this->page->url->order = 'asc';\n $ordertext = '<i class=\"fa fa-sort-asc\"></i> ';\n $ordertext .= get_string('orderasc', 'format_timeline');\n\n return html_writer::link($url, $ordertext, ['class' => 'btn btn-outline-primary']);\n }\n\n $ordertext .= get_string('orderdesc', 'format_timeline');\n\n return html_writer::link($url, $ordertext, ['class' => 'btn btn-outline-primary']);\n }", "function pnAddressBook_admin_menu() {\r\n\r\n \t$settingsURL\t= pnModURL(__PNADDRESSBOOK__,'admin','modifyconfig');\r\n\t$categoryURL\t= pnModURL(__PNADDRESSBOOK__,'admin','categories');\r\n\t$labelURL\t\t= pnModURL(__PNADDRESSBOOK__,'admin','labels');\r\n\t$prefixURL\t\t= pnModURL(__PNADDRESSBOOK__,'admin','prefixes');\r\n\t$customURL\t\t= pnModURL(__PNADDRESSBOOK__,'admin','customfields');\r\n//START - gehunter\r\n\t$exportURL\t\t= pnModURL(__PNADDRESSBOOK__,'user','export');\r\n//END - gehunter\r\n\r\n\t$settingsTXT\t=pnVarPrepHTMLDisplay(_pnAB_EDIT_CONFIG);\r\n\t$categoryTXT\t=pnVarPrepHTMLDisplay(_pnAB_EDIT_pnAB_CATEGORY);\r\n\t$labelTXT\t\t=pnVarPrepHTMLDisplay(_pnAB_EDIT_LABEL);\r\n\t$prefixTXT\t\t=pnVarPrepHTMLDisplay(_pnAB_EDIT_PREFIX);\r\n\t$customTXT\t\t=pnVarPrepHTMLDisplay(_pnAB_EDIT_CUSTOM);\r\n//START - gehunter\r\n\t$exportTXT\t\t=pnVarPrepHTMLDisplay(_pnAB_ADMIN_EXPORT);\r\n//END - gehunter\r\n\r\n\t$output = new pnHTML();\r\n\t$output->SetInputMode(_PNH_VERBATIMINPUT);\r\n\t$output->Title(pnVarPrepHTMLDisplay(_PNADDRESSBOOK));\r\n\t$output->Text('<div align=\"center\">');\r\n\t$output->Text(pnAddressBook_themetable('start',2));\r\n\t$output->Text('<div align=\"center\">');\r\n\t$output->URL($settingsURL,$settingsTXT);\r\n\t$output->Text(' | ');\r\n $output->URL($categoryURL,$categoryTXT);\r\n\t$output->Text(' | ');\r\n\t$output->URL($labelURL,$labelTXT);\r\n\t$output->Text(' | ');\r\n\t$output->URL($prefixURL,$prefixTXT);\r\n\t$output->Text(' | ');\r\n\t$output->URL($customURL,$customTXT);\r\n\t$output->Text(' | ');\r\n\t$output->URL($exportURL,$exportTXT);\r\n\t$output->Text('</div>');\r\n\t$output->Text(pnAddressBook_themetable('end',2));\r\n\t$output->Text('</div>');\r\n\t$output->Linebreak(1);\r\n\r\n // Return the output that has been generated by this function\r\n return $output->GetOutput();\r\n}", "function show() {\n global $_SERVER;\n global $lang;\n global $theme;\n global $_SESSION;\n global $__order_register;\n global $__order_register_tab;\n global $_REQUEST;\n global $sess;\n \n // odczytaj jakie sa ustawienia sortowania obecnie\n if (! empty($_SESSION[\"__order_register_set\"])){\n $tab=$_SESSION[\"__order_register_set\"];\n } else {\n $tab['partner']=0;\n $tab['amount']=0;\n $tab['rake_off']=0;\n }\n\n if (! empty($_REQUEST['order'])) {\n $order=$_REQUEST['order']; $set=false; \n $order=intval($order);\n \n switch ($order) {\n case \"1\":$tab['partner']=-1; $set=true; // zmien \"strzalke\" (kierunek sortowania)\n break;\n case \"2\":$tab['amount']=-1; $set=true;\n break;\n case \"3\":$tab['rake_off']=-1; $set=true;\n break;\n case \"-1\":$tab['partner']=1; $set=true;\n break;\n case \"-2\":$tab['amount']=1; $set=true;\n break;\n case \"-3\":$tab['rake_off']=1; $set=true;\n break;\n default:$tab['partner']=-1; $set=true;\n break;\n } // end switch\n \n } // end if\n\n // start: sprawdz czy wybrano jakiekolwiek sortowanie, jesli nie to wstaw sortowanie wg ceny od najmniejszej\n // chyba ze jest to wyszukiwanie wedlug slowa, wtedy wstaw sortowanie wedlug dopasowania\n if (@$set!=true) {\n $tab['partner']=-1;\n } \n // end:\n\n // zapamietaj tablice sortowania w sesji\n $__order_main_tab_register=&$tab;\n $sess->register(\"__order_register_tab\",$order_register_tab);\n $__order_main_register=&$order;\n $sess->register(\"__order_register\",$__order_register);\n\n $url=$_SERVER['REQUEST_URI'];\n \n // pomin sesje, uniknij duplikacji zmiennej sesji\n $url=preg_replace(\"/&session_id=[a-z0-9]+$/\",\"\",$url);\n $url=ereg_replace(\"\\?order=[0-9-]+$\",\"\",$url);\n \n // sortowanie wg nazwy\n if ($tab['partner']==1) {\n print \"<a href=$url?order=1><u>\".$lang->order_by['partner'].\"</u></a> \";\n print \"<img src=\";$theme->img(\"_img/up.png\"); print \"> \";\n } elseif ($tab['partner']==-1) {\n print \"<a href=$url?order=-1><u>\".$lang->order_by['partner'].\"</u></a> \";\n print \"<img src=\";$theme->img(\"_img/down.png\"); print \"> \";\n } else {\n print \"<a href=$url?order=1><u>\".$lang->order_by['partner'].\"</u></a> &nbsp;\";\n }\n\n // sortowanie wg ceny\n if ($tab['amount']==1) {\n print \"<a href=$url?order=2><u>\".$lang->order_by['amount'].\"</u></a> \";\n print \"<img src=\";$theme->img(\"_img/up.png\"); print \"> \"; \n } elseif ($tab['amount']==-1) {\n print \"<a href=$url?order=-2><u>\".$lang->order_by['amount'].\"</u></a> \";\n print \"<img src=\";$theme->img(\"_img/down.png\"); print \"> \"; \n } else {\n print \"<a href=$url?order=2><u>\".$lang->order_by['amount'].\"</u></a> &nbsp; \";\n } \n\n // sortowanie wg producenta\n if ($tab['rake_off']==1) {\n print \"<a href=$url?order=3><u>\".$lang->order_by['rake_off'].\"</u></a> \";\n print \"<img src=\";$theme->img(\"_img/up.png\"); print \"> \";\n } elseif ($tab['rake_off']==-1) {\n print \"<a href=$url?order=-3><u>\".$lang->order_by['rake_off'].\"</u></a> \";\n print \"<img src=\";$theme->img(\"_img/down.png\"); print \"> \";\n } else {\n print \"<a href=$url?order=3><u>\".$lang->order_by['rake_off'].\"</u></a> &nbsp;\";\n }\n\n return;\n }", "private function getHeaderButton($headerNumber){\n\t\tif($this->headerSortable){\n\t\t\t$langOrderAsc=velkan::$lang[\"grid_msg\"][\"orderAsc\"];\n\t\t\t$langOrderDesc=velkan::$lang[\"grid_msg\"][\"orderDesc\"];\n\t\t\t\n\t\t\t$hd=<<<HTML\n\t\t\t<div class=\"btn-group pull-right\">\n\t \t\t\t<a class=\"btn dropdown-toggle btn-mini\" data-toggle=\"dropdown\" href=\"#\"><span class=\"caret\"></span></a>\n\t\t\t\t\t<ul class=\"dropdown-menu\">\n\t\t\t\t\t\t<li><a href=\"javascript:{$this->id}Reorder('{$this->fields[$headerNumber]} asc');\"><i class=\"icon-arrow-up\"></i> $langOrderAsc</a></li>\n\t\t\t\t\t\t<li><a href=\"javascript:{$this->id}Reorder('{$this->fields[$headerNumber]} desc');\"><i class=\"icon-arrow-down\"></i> $langOrderDesc</a></li>\n\t\t\t\t\t</ul>\n\t\t\t</div>\nHTML;\n\t\t\treturn $hd;\n\t\t}else{\n\t\t\treturn \"\";\n\t\t}\n\t}", "public function sort_posts() {\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t#icon-reorder-posts {\n\t\t\tdisplay: none;\n\t\t\tbackground:url(<?php echo $this->icon; ?>) no-repeat;\n\t\t}\n\t\t</style>\n\t\t<div class=\"wrap\">\n\t\t\t<?php screen_icon( 'reorder-posts' ); ?>\n\t\t\t<h2>\n\t\t\t\t<?php echo $this->heading; ?><br>\n\t\t\t\t<span style=\"font-size:13px\">Trascina per determinare l'ordine manuale di visualizzazione degli elementi.</span>\n\t\t\t\t<img src=\"<?php echo admin_url( 'images/loading.gif' ); ?>\" id=\"loading-animation\" />\n\t\t\t</h2>\n\t\t\t<div id=\"reorder-error\"></div>\n\t\t\t<?php echo $this->initial; ?>\n\t\t\t<div id=\"list\">\n\t\t\t<input class=\"search\" placeholder=\"Search\" />\n\t\t\t<div id=\"message-order\" class=\"updated\" style=\"display:none;\">\n\t <p><h3>ATTENZIONE</h3>Il sistema di <b>ordinamento</b> è disabilitato nella lista filtrata. Rimuovere i criteri di ricerca per riabilitare il sistema.</p>\n\t </div>\n\t\t\t<ul id=\"post-list\" class=\"list\">\n\t\t<?php\n\t\tif ( is_post_type_hierarchical( $this->post_type ) ) {\n\t\t\t$pages = get_pages( array(\n\t\t\t\t'sort_column' => 'menu_order',\n\t\t\t\t'post_type' => $this->post_type,\n\t\t\t ) );\n\t\t\t //Get hiearchy of children/parents\n\t\t\t $top_level_pages = array();\n\t\t\t $children_pages = array();\n\t\t\t foreach( $pages as $page ) {\n\t\t\t\tif ( $page->post_parent == 0 ) {\n\t\t\t\t\t//Parent page\n\t\t\t\t\t$top_level_pages[] = $page;\n\t\t\t\t} else {\n\t\t\t\t\t$children_pages[ $page->post_parent ][] = $page;\n\t\t\t\t}\n\t\t\t } //end foreach\n\n\t\t\t foreach( $top_level_pages as $page ) {\n\t\t\t\t$page_id = $page->ID;\n\t\t\t\tif ( isset( $children_pages[ $page_id ] ) && !empty( $children_pages[ $page_id ] ) ) {\n\t\t\t\t\t//If page has children, output page and its children\n\t\t\t\t\t$this->output_row_hierarchical( $page, $children_pages[ $page_id ], $children_pages );\n\t\t\t\t} else {\n\t\t\t\t\t$this->output_row( $page );\n\t\t\t\t}\n\t\t\t }\n\t\t} else {\n\t\t\t//Output non hierarchical posts\n\t\t\t$post_query = new WP_Query(\n\t\t\t\tarray(\n\t\t\t\t\t'post_type' => $this->post_type,\n\t\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t\t'orderby' => 'menu_order',\n \t\t\t'suppress_filters' => false,\n\t\t\t\t\t'order' => $this->order,\n\t\t\t\t\t'post_status' => $this->post_status,\n\t\t\t\t)\n\t\t\t);\n\t\t\t$posts = $post_query->get_posts();\n\t\t\tif ( !$posts ) return;\n\t\t\tforeach( $posts as $post ) {\n\t\t\t\t$this->output_row( $post );\n\t\t\t} //end foreach\n\t\t}\n\t\t?>\n\t\t</ul>\n\t\t</div>\n\t\t<?php\n\t\techo $this->final;\n\t\t?>\n\t\t</div><!-- .wrap -->\n\t\t<?php\n\t}", "public function changeContentSortingAndCopyDraftPage() {}" ]
[ "0.6165472", "0.57144004", "0.57053214", "0.5670822", "0.55712503", "0.55667394", "0.5510971", "0.55108637", "0.54816544", "0.5434474", "0.5411508", "0.53929865", "0.53868675", "0.5353803", "0.52827674", "0.52760303", "0.5275414", "0.5249439", "0.52340376", "0.5233889", "0.5216456", "0.52112895", "0.5197233", "0.5181449", "0.5180775", "0.5179946", "0.51603967", "0.51483274", "0.51465315", "0.51458085" ]
0.73691535
0
Return an array of backends of a given type, or all backends if no type is specified.
function get_backend_list($type = '') { $ret = array(); for ($i = 1 ; $i <= $this->numbackends ; $i++) { if (empty($type) || $type == $this->backends[$i]->btype) { $ret[] = &$this->backends[$i]; } } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public function getBackendByType($type) {\n\t\t$type = mb_strtolower($type);\n\t\tif (!array_key_exists($type, $this->map))\n\t\t\treturn NULL;\n\t\treturn $this->map[$type];\n\t}", "public function getRegisterBackends()\n {\n \treturn $this->backends;\n }", "public function allOfType($type)\n {\n return array_filter(\n $this->adapters,\n function ($adapter) use ($type) {\n return $adapter[$type];\n }\n );\n }", "public function getEnabledBackends(){\n\t\t$backendMapper = $this->app['BackendMapper'];\n\t\treturn $backendMapper->getAll();\n\t}", "public function getComponentsOfType($type);", "public function getComponents($type);", "public function getTypeLoaders(): array\n {\n return $this->typeLoaders;\n }", "public function getServices(string $type): array\n {\n return $this->services[$type] ?? [];\n }", "public function all($type = null)\n {\n return array_filter(\n $this->bag,\n /** @var BuilderInterface $builder */\n function (BuilderInterface $builder) use ($type) {\n return $type === null || $builder->getType() == $type;\n }\n );\n }", "protected function getRegisteredBackends() {}", "public function get_used_plugin_list($type='') {\n global $DB;\n\n $whereparams = array();\n $sql = 'SELECT plugin\n FROM {surveypro_item}\n WHERE surveyproid = :surveyproid';\n $whereparams['surveyproid'] = $this->surveypro->id;\n if (!empty($type)) {\n $sql .= ' AND type = :type';\n $whereparams['type'] = $type;\n }\n $sql .= ' GROUP BY plugin';\n\n $pluginlist = $DB->get_fieldset_sql($sql, $whereparams);\n\n return $pluginlist;\n }", "public function getRegisteredResourcesByType($type)\n {\n $result = array();\n foreach ($this->getPreparedResources() as $subresources) {\n if (!empty($subresources[$type])) {\n foreach ($subresources[$type] as $path => $file) {\n if (isset($result[$path])) {\n unset($result[$path]);\n }\n $result[$path] = $file;\n }\n }\n }\n\n return $result;\n }", "function getBackendList()\n {\n $files = Misc::getFileList(APP_INC_PATH . '/customer');\n $list = array();\n for ($i = 0; $i < count($files); $i++) {\n // make sure we only list the customer backends\n if (preg_match('/^class\\.(.*)\\.php$/', $files[$i], $matches)) {\n // display a prettyfied backend name in the admin section\n if ($matches[1] == \"abstract_customer_backend\") {\n continue;\n }\n $name = ucwords(str_replace('_', ' ', $matches[1]));\n $list[$files[$i]] = $name;\n }\n }\n return $list;\n }", "function share($type)\n{\n static $extensions = [];\n\n if (empty($extensions[$type])) {\n $extensions[$type] = new $type;\n }\n\n return $extensions[$type];\n}", "public static function payment_types($type = null) {\n $types = self::config()->get('payment_types');\n if ($type) {\n return $types[$type];\n }\n\n return $types;\n }", "public static function link_types($type = null) {\n $types = self::config()->get('link_types');\n if ($type) {\n return $types[$type];\n }\n\n return $types;\n }", "public static function type(string $type): array\n {\n $types = self::types();\n\n return $types[$type] ?? $types[self::prefixed($type)];\n }", "protected function getBlockScheme($type)\n {\n $main_scheme = SchemesManager::getBlockScheme($type, array());\n $addon_scheme = fn_get_schema('storefront_rest_api', 'blocks');\n\n return isset($addon_scheme[$type])\n ? fn_array_merge($main_scheme, $addon_scheme[$type])\n : $main_scheme;\n }", "protected function getEnabledNegotiators($type) {\n return $this->configFactory->get('language.types')->get('negotiation.' . $type . '.enabled') ?: [];\n }", "public static function exts_by_mime($type)\r\n {\r\n static $types = array();\r\n\r\n // Fill the static array\r\n if (empty($types))\r\n {\r\n $mimes = Core::config('mimes');\r\n foreach ($mimes as $ext => $ms)\r\n {\r\n foreach ($ms as $mime)\r\n {\r\n if ($mime == 'application/octet-stream')\r\n {\r\n // octet-stream is a generic binary\r\n continue;\r\n }\r\n\r\n if (!isset($types[$mime]))\r\n {\r\n $types[$mime] = array((string)$ext);\r\n }\r\n elseif (!in_array($ext, $types[$mime]))\r\n {\r\n $types[$mime][] = (string)$ext;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return isset($types[$type])?$types[$type]:false;\r\n }", "public function getWidgetsByType() {\n\t\t$types = array();\n\t\tif ($this->hasParameter('widgets')) {\n\t\t\tforeach ($this->getParameter('widgets') as $name => $widget) {\n\t\t\t\t$targets = $widget['target'];\n\t\t\t\tforeach($targets as $target) {\n\t\t\t\t\tif ($target == 'all') {\n\t\t\t\t\t\t$list = Data::TYPES;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$list = [$target];\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($list as $type) {\n\t\t\t\t\t\tif (! isset($types[$type])) {\n\t\t\t\t\t\t\t$types[$type] = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$types[$type][] = $name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $types;\n\t}", "public function getTypes(): array;", "public function getTypes(): array;", "public function selectAll(ItemType $type): array\n {\n $sql = 'SELECT * FROM library WHERE type = :type';\n\n $statement = $this->connection->prepare($sql);\n $statement->bindValue('type', $type->getValue(), ParameterType::STRING);\n $result = $statement->execute();\n\n $list = [];\n foreach ($result->fetchAllAssociative() as $row) {\n $list[] = LibraryItem::createFromDatabaseArray($row);\n }\n\n return $list;\n }", "public function all($type)\n {\n return $this->db()\n ->query(\"SELECT * FROM toys WHERE type={$type}\")\n ->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function getAllLibsByType($type, $pager = null)\n {\n $key = ($type == 'project') ? $type : 'id';\n $stmt = $this->dao->select(\"DISTINCT $key\")->from(TABLE_DOCLIB)->where('deleted')->eq(0);\n if($type == 'project')\n {\n $stmt = $stmt->andWhere($type)->ne(0);\n }\n else\n {\n $stmt = $stmt->andWhere('project')->eq(0);\n }\n\n $idList = $stmt->orderBy(\"{$key}_desc\")->page($pager, $key)->fetchPairs($key, $key);\n\n if($type == 'project')\n {\n $table = TABLE_PROJECT;\n $libs = $this->dao->select('id,name')->from($table)->where('id')->in($idList)->orderBy('id desc')->fetchAll('id');\n }\n else\n {\n $libs = $this->dao->select('id,name')->from(TABLE_DOCLIB)->where('id')->in($idList)->orderBy('order, id desc')->fetchAll('id');\n }\n\n return $libs;\n }", "public static function getTypes(): array {\n\t\treturn ['pizza'];\n\t}", "function get_active_modules($type='payment'){\r\r\n\t\t// type\r\r\n\t\tif($type == 'autoresponder'){\r\r\n\t\t\t// check\r\r\n\t\t\tif(isset($this->active_modules[$type])){\r\r\n\t\t\t\t// return\r\r\n\t\t\t\treturn (array)$this->active_modules[$type];\r\r\n\t\t\t}\r\r\n\t\t}else{\r\r\n\t\t// active payment modules\t\t\r\r\n\t\t\tif(isset($this->active_modules[$type]) && is_array($this->active_modules[$type])){\r\r\n\t\t\t\t// return\r\r\n\t\t\t\treturn array_unique($this->active_modules[$type]);\t\r\r\n\t\t\t}\r\r\n\t\t}\t\t\r\r\n\t\t// error\t\r\r\n\t\treturn array();\t\r\r\n\t}", "public function getFormats(?string $type = null):array\n {\n return json_decode(\n copy_to_string($this->request('GET', '/unoconv/formats'.($type ? '/'.urlencode($type) : ''))->getBody()),\n true\n );\n }", "public function typesProvider()\n {\n return [\n '1 Type' => ['Type1'],\n '2 Type' => [['Type1', 'Type2']],\n ];\n }" ]
[ "0.62297535", "0.61086404", "0.6092425", "0.58658695", "0.5762207", "0.5615554", "0.5597368", "0.5539429", "0.55185", "0.53789246", "0.5370866", "0.5333149", "0.53219485", "0.52964634", "0.52772176", "0.5256096", "0.52221125", "0.52012205", "0.51636535", "0.51247436", "0.5117294", "0.5115523", "0.5115523", "0.50702524", "0.504152", "0.5040743", "0.50395334", "0.5038601", "0.5028115", "0.5021183" ]
0.78517234
0
/ ========================== Public ======================== Add a new backend.
function add_backend($backend, $param = '') { static $backend_classes; if (!isset($backend_classes)) { $backend_classes = array(); } if (!isset($backend_classes[$backend])) { /** * Support backend provided by plugins. Plugin function must * return an associative array with as key the backend name ($backend) * and as value the file including the path containing the backend class. * i.e.: $aBackend = array('backend_template' => SM_PATH . 'plugins/abook_backend_template/functions.php') * * NB: Because the backend files are included from within this function they DO NOT have access to * vars in the global scope. This function is the global scope for the included backend !!! */ global $null; $aBackend = do_hook('abook_add_class', $null); if (isset($aBackend) && is_array($aBackend) && isset($aBackend[$backend])) { require_once($aBackend[$backend]); } else { require_once(SM_PATH . 'functions/abook_'.$backend.'.php'); } $backend_classes[$backend] = true; } $backend_name = 'abook_' . $backend; $newback = new $backend_name($param); //eval('$newback = new ' . $backend_name . '($param);'); if(!empty($newback->error)) { $this->error = $newback->error; return false; } $this->numbackends++; $newback->bnum = $this->numbackends; $this->backends[$this->numbackends] = $newback; /* Store ID of first local backend added */ if ($this->localbackend == 0 && $newback->btype == 'local') { $this->localbackend = $this->numbackends; $this->localbackendname = $newback->sname; } return $this->numbackends; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setBackend($backend) {}", "public abstract function getBackend();", "public function getBackend() {}", "public function getBackend() {}", "public function getBackend();", "public function registerBackend($displayName, $name, $protocol, $enabled){\n\t\t$backendMapper = $this->app['BackendMapper'];\n\t\tif($backendMapper->exists($name)){\n\t\t\t// Only execute when there are no backends registered i.e. on first run\n\t\t\t$backend = new Backend();\n\t\t\t$backend->setDisplayname($displayName);\n\t\t\t$backend->setName($name);\n\t\t\t$backend->setProtocol($protocol);\n\t\t\t$backend->setEnabled($enabled);\n\t\t\t$backendMapper->insert($backend);\n\t\t}\n\t}", "function getBackend() ;", "protected abstract function _getBackend();", "public function registerBackend(string $backendClass) {\n\t\t$this->backends[$backendClass] = $backendClass;\n\t}", "public function setBackend( $backend ) {\n $this->_backend = $backend;\n }", "public function add() {\n\t\t\tif (!$GLOBALS['sizzle']->apps['backend']->models['backend']->authenticate()) {\n \t\t\t$GLOBALS['sizzle']->utils->redirect('/backend/login', '<strong>Error:</strong> Please login to continue.');\n\t\t\t}\n\t\t\t// Authorize w/ backend app.\n\t\t\tif (!$GLOBALS['sizzle']->apps['backend']->models['backend']->authorize('blog', 'add')) {\n \t\t\t$GLOBALS['sizzle']->utils->redirect('/backend', '<strong>Error:</strong> Insufficient user access.');\n\t\t\t}\n\t\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST') {\n \t\t\t// Handle form submit.\n\t\t\t\treturn $this->models['blog']->add();\n\t\t\t} else {\n \t\t\t// Load view.\n \t\t\treturn $this->_loadView(dirname(__FILE__) .'/views/add.tpl');\n\t\t\t}\n\t\t}", "public function setBackend($backend)\n {\n if( $backend instanceof Engine_ServiceLocator_Backend_Abstract ) {\n $this->_backend = $backend;\n } else if( is_array($backend) ) {\n if( isset($backend['class']) ) {\n $class = $backend['class'];\n } else if( isset($backend['type']) ) {\n $class = 'Engine_ServiceLocator_Backend_' . ucfirst($backend['type']);\n } else {\n throw new Engine_ServiceLocator_Exception('No backend specified');\n }\n if( isset($backend['options']) && is_array($backend['options']) ) {\n $options = $backend['options'];\n } else {\n $options = $backend;\n unset($backend['class']);\n unset($backend['type']);\n }\n \n $this->_backend = new $class($options);\n } else {\n throw new Engine_ServiceLocator_Exception('Unknown backend specifier');\n }\n\n return $this;\n }", "private function setUpBackend() {}", "final public function registerBackend(BackendAbstract $backend) {\n\t\tif (!isset($backend))\n\t\t\treturn FALSE;\n\t\t$type = mb_strtolower($backend->getType());\n\t\t// Check if the filesystem backend already exists.\n\t\tif (NULL !== ($registeredBackend = $this->getBackendByType($type))) {\n\t\t\tthrow new \\OMV\\Exception(\"The filesystem backend (type=%s, \".\n\t\t\t \"class=%s) is already registered (class=%s).\", $type,\n\t\t\t get_class($backend), get_class($registeredBackend));\n\t\t}\n\t\t$this->map[$type] = $backend;\n\t\tksort($this->map);\n\t\treturn TRUE;\n\t}", "public function add() {\n\t\t\tif (!$GLOBALS['sizzle']->apps['backend']->models['backend']->authenticate()) {\n \t\t\t$GLOBALS['sizzle']->utils->redirect('/backend/login', '<strong>Error:</strong> Please login to continue.');\n\t\t\t}\n\t\t\t// Authorize w/ backend app.\n\t\t\tif (!$GLOBALS['sizzle']->apps['backend']->models['backend']->authorize('sharers', 'add')) {\n \t\t\t$GLOBALS['sizzle']->utils->redirect('/backend', '<strong>Error:</strong> Insufficient user access.');\n\t\t\t}\n\t\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST') {\n \t\t\t// Handle form submit.\n\t\t\t\treturn $this->models['sharers']->add();\n\t\t\t} else {\n \t\t\t// Load view.\n \t\t\treturn $this->_loadView(dirname(__FILE__) .'/views/add.tpl');\n\t\t\t}\n\t\t}", "abstract protected function setUpBackend();", "static public function addBackendOption($configuration,$cc_id) {\t\n\t\tif($configuration['backend_type']!=\"apc\") {\t\n\t\t\teval('$mComponentcachebackendoption=new Maerdo_Model_Componentcachebackend'.$configuration['backend_type'].'option();');\n\t\t\tforeach($configuration['backend'][$configuration['backend_type']] as $field=>$value) {\t\t\t\t\n\t\t\t\t$mComponentcachebackendoption->$field=$value;\t\t\t\n\t\t\t}\n\t\t\t$mComponentcachebackendoption->cc_id=$cc_id;\n\t\t\t$mComponentcachebackendoption->save();\n\t\t}\t\t\t\n\t\treturn true;\n\t}", "public function __construct (\\RESTfm\\BackendAbstract $backend, $database = NULL) {\n $this->_backend = $backend;\n }", "public function add() {\r\n\t\t$model = $this->getModel('languages');\r\n\t\t$model->add();\r\n\t\t\r\n\t\t$this->view = $this->getView(\"languages\");\r\n\t\t$this->view->setModel($model, true);\r\n\t\t$this->view->display();\r\n\t}", "public function getBackend()\n {\n return $this->backend;\n }", "public function getBackend()\n {\n return $this->backend;\n }", "protected function setUpBackend() {}", "public function getBackend()\n {\n return $this->_backend;\n }", "static public function getBackend()\n {\n $backends = Horde::loadConfiguration('backends.php', 'backends', 'ingo');\n if (!isset($backends) || !is_array($backends)) {\n throw new Ingo_Exception(_(\"No backends configured in backends.php\"));\n }\n\n $backend = null;\n foreach ($backends as $name => $temp) {\n if (!empty($temp['disabled'])) {\n continue;\n }\n if (!isset($backend)) {\n $backend = $name;\n } elseif (!empty($temp['preferred'])) {\n if (is_array($temp['preferred'])) {\n foreach ($temp['preferred'] as $val) {\n if (($val == $_SERVER['SERVER_NAME']) ||\n ($val == $_SERVER['HTTP_HOST'])) {\n $backend = $name;\n }\n }\n } elseif (($temp['preferred'] == $_SERVER['SERVER_NAME']) ||\n ($temp['preferred'] == $_SERVER['HTTP_HOST'])) {\n $backend = $name;\n }\n }\n }\n\n /* Check for valid backend configuration. */\n if (is_null($backend)) {\n throw new Ingo_Exception(_(\"No backend configured for this host\"));\n }\n\n $backends[$backend]['id'] = $name;\n $backend = $backends[$backend];\n\n foreach (array('script', 'transport') as $val) {\n if (empty($backend[$val])) {\n throw new Ingo_Exception(sprintf(_(\"No \\\"%s\\\" element found in backend configuration.\"), $val));\n }\n }\n\n /* Make sure the 'params' entry exists. */\n if (!isset($backend['params'])) {\n $backend['params'] = array();\n }\n\n return $backend;\n }", "public function getBackend()\n {\n if( null === $this->_backend ) {\n throw new Engine_ServiceLocator_Exception('No backend configured');\n }\n \n return $this->_backend;\n }", "public function add();", "public function add();", "function load_plugin_backend(){\n include_once 'backend/index.php';\n }", "public function add()\n\t{\n\n\t}", "public function add()\n\t{\n\n\t}" ]
[ "0.63583857", "0.62303007", "0.6164912", "0.6164912", "0.61626923", "0.6161281", "0.61293167", "0.603831", "0.6012285", "0.5984017", "0.5871993", "0.5684049", "0.5673571", "0.5670556", "0.5667221", "0.56617045", "0.5645091", "0.5489426", "0.548247", "0.5468092", "0.5468092", "0.545625", "0.54190415", "0.53984416", "0.5386804", "0.53791136", "0.53791136", "0.5375652", "0.5374853", "0.5374853" ]
0.7241812
0
create string with name and email address This function takes a $row array as returned by the addressbook search and returns an email address with the full name or nickname optionally prepended.
static function full_address($row) { global $data_dir, $username, $addrsrch_fullname; // allow multiple addresses in one row (poor person's grouping - bah) // (separate with commas) // $return = ''; $addresses = explode(',', $row['email']); foreach ($addresses as $address) { if (!empty($return)) $return .= ', '; if ($addrsrch_fullname == 'fullname') $return .= '"' . $row['name'] . '" <' . trim($address) . '>'; else if ($addrsrch_fullname == 'nickname') $return .= '"' . $row['nickname'] . '" <' . trim($address) . '>'; else // "noprefix" $return .= trim($address); } return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function email_fullname($user, $override=false) {\n\n\t// Drop all semicolon apears. (Js errors when select contacts)\n\treturn str_replace(',', '', fullname($user, $override));\n}", "public static function composeEmailAddress( ezcMailAddress $item )\r\n {\r\n $name = trim( $item->name );\r\n if ( $name !== '' )\r\n {\r\n // remove the quotes around the name part if they are already there\r\n if ( $name{0} === '\"' && $name{strlen( $name ) - 1} === '\"' )\r\n {\r\n $name = substr( $name, 1, -1 );\r\n }\r\n\r\n // add slashes to \" and \\ and surround the name part with quotes\r\n if ( strpbrk( $name, \",@<>:;'\\\"\" ) !== false )\r\n {\r\n $name = str_replace( '\\\\', '\\\\\\\\', $name );\r\n $name = str_replace( '\"', '\\\"', $name );\r\n $name = \"\\\"{$name}\\\"\";\r\n }\r\n\r\n switch ( strtolower( $item->charset ) )\r\n {\r\n case 'us-ascii':\r\n $text = $name . ' <' . $item->email . '>';\r\n break;\r\n\r\n case 'iso-8859-1': case 'iso-8859-2': case 'iso-8859-3': case 'iso-8859-4':\r\n case 'iso-8859-5': case 'iso-8859-6': case 'iso-8859-7': case 'iso-8859-8':\r\n case 'iso-8859-9': case 'iso-8859-10': case 'iso-8859-11': case 'iso-8859-12':\r\n case 'iso-8859-13': case 'iso-8859-14': case 'iso-8859-15' :case 'iso-8859-16':\r\n case 'windows-1250': case 'windows-1251': case 'windows-1252':\r\n case 'utf-8':\r\n if ( strpbrk( $name, \"\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\\x88\\x89\\x8a\\x8b\\x8c\\x8d\\x8e\\x8f\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98\\x99\\x9a\\x9b\\x9c\\x9d\\x9e\\x9f\\xa0\\xa1\\xa2\\xa3\\xa4\\xa5\\xa6\\xa7\\xa8\\xa9\\xaa\\xab\\xac\\xad\\xae\\xaf\\xb0\\xb1\\xb2\\xb3\\xb4\\xb5\\xb6\\xb7\\xb8\\xb9\\xba\\xbb\\xbc\\xbd\\xbe\\xbf\\xc0\\xc1\\xc2\\xc3\\xc4\\xc5\\xc6\\xc7\\xc8\\xc9\\xca\\xcb\\xcc\\xcd\\xce\\xcf\\xd0\\xd1\\xd2\\xd3\\xd4\\xd5\\xd6\\xd7\\xd8\\xd9\\xda\\xdb\\xdc\\xdd\\xde\\xdf\\xe0\\xe1\\xe2\\xe3\\xe4\\xe5\\xe6\\xe7\\xe8\\xe9\\xea\\xeb\\xec\\xed\\xee\\xef\\xf0\\xf1\\xf2\\xf3\\xf4\\xf5\\xf6\\xf7\\xf8\\xf9\\xfa\\xfb\\xfc\\xfd\\xfe\\xff\" ) === false )\r\n {\r\n $text = $name . ' <' . $item->email . '>';\r\n break;\r\n }\r\n // break intentionally missing\r\n\r\n default:\r\n $preferences = array(\r\n 'input-charset' => $item->charset,\r\n 'output-charset' => $item->charset,\r\n 'scheme' => 'Q',\r\n 'line-break-chars' => ezcMailTools::lineBreak()\r\n );\r\n $name = iconv_mime_encode( 'dummy', $name, $preferences );\r\n $name = substr( $name, 7 ); // \"dummy: \" + 1\r\n $text = $name . ' <' . $item->email . '>';\r\n break;\r\n }\r\n }\r\n else\r\n {\r\n $text = $item->email;\r\n }\r\n return $text;\r\n }\r\n\r\n /**\r\n * Returns the array $items consisting of ezcMailAddress objects\r\n * as one RFC822 compliant address string.\r\n *\r\n * Set foldLength to control how many characters each line can have before a line\r\n * break is inserted according to the folding rules specified in RFC2822.\r\n *\r\n * @param array(ezcMailAddress) $items\r\n * @param int $foldLength\r\n * @return string\r\n */\r\n public static function composeEmailAddresses( array $items, $foldLength = null )\r\n {\r\n $textElements = array();\r\n foreach ( $items as $item )\r\n {\r\n $textElements[] = ezcMailTools::composeEmailAddress( $item );\r\n }\r\n\r\n if ( $foldLength === null ) // quick version\r\n {\r\n return implode( ', ', $textElements );\r\n }\r\n\r\n $result = \"\";\r\n $charsSinceFold = 0;\r\n foreach ( $textElements as $element )\r\n {\r\n $length = strlen( $element );\r\n if ( ( $charsSinceFold + $length + 2 /* comma, space */ ) > $foldLength )\r\n {\r\n // fold last line if there is any\r\n if ( $result != '' )\r\n {\r\n $result .= \",\" . ezcMailTools::lineBreak() .' ';\r\n $charsSinceFold = 0;\r\n }\r\n $result .= $element;\r\n }\r\n else\r\n {\r\n if ( $result == '' )\r\n {\r\n $result = $element;\r\n }\r\n else\r\n {\r\n $result .= ', ' . $element;\r\n }\r\n }\r\n $charsSinceFold += $length + 1 /*space*/;\r\n }\r\n return $result;\r\n }\r\n\r\n /**\r\n * Returns an ezcMailAddress object parsed from the address string $address.\r\n *\r\n * You can set the encoding of the name part with the $encoding parameter.\r\n * If $encoding is omitted or set to \"mime\" parseEmailAddress will asume that\r\n * the name part is mime encoded.\r\n *\r\n * This method does not perform validation. It will also accept slightly\r\n * malformed addresses.\r\n *\r\n * If the mail address given can not be decoded null is returned.\r\n *\r\n * Example:\r\n * <code>\r\n * ezcMailTools::parseEmailAddress( 'John Doe <[email protected]>' );\r\n * </code>\r\n *\r\n * @param string $address\r\n * @param string $encoding\r\n * @return ezcMailAddress\r\n */\r\n public static function parseEmailAddress( $address, $encoding = \"mime\" )\r\n {\r\n // we don't care about the \"group\" part of the address since this is not used anywhere\r\n\r\n $matches = array();\r\n $pattern = '/<?\\\"?[a-zA-Z0-9!#\\$\\%\\&\\'\\*\\+\\-\\/=\\?\\^_`{\\|}~\\.]+\\\"?@[a-zA-Z0-9!#\\$\\%\\&\\'\\*\\+\\-\\/=\\?\\^_`{\\|}~\\.]+>?$/';\r\n if ( preg_match( trim( $pattern ), $address, $matches, PREG_OFFSET_CAPTURE ) != 1 )\r\n {\r\n return null;\r\n }\r\n $name = substr( $address, 0, $matches[0][1] );\r\n\r\n // trim <> from the address and \"\" from the name\r\n $name = trim( $name, '\" ' );\r\n $mail = trim( $matches[0][0], '<>' );\r\n // remove any quotes found in mail addresses like \"bah,\"@example.com\r\n $mail = str_replace( '\"', '', $mail );\r\n\r\n if ( $encoding == 'mime' )\r\n {\r\n // the name may contain interesting character encoding. We need to convert it.\r\n $name = ezcMailTools::mimeDecode( $name );\r\n }\r\n else\r\n {\r\n $name = ezcMailCharsetConverter::convertToUTF8( $name, $encoding );\r\n }\r\n\r\n $address = new ezcMailAddress( $mail, $name, 'utf-8' );\r\n return $address;\r\n }\r\n\r\n /**\r\n * Returns an array of ezcMailAddress objects parsed from the address string $addresses.\r\n *\r\n * You can set the encoding of the name parts with the $encoding parameter.\r\n * If $encoding is omitted or set to \"mime\" parseEmailAddresses will asume that\r\n * the name parts are mime encoded.\r\n *\r\n * Example:\r\n * <code>\r\n * ezcMailTools::parseEmailAddresses( 'John Doe <[email protected]>' );\r\n * </code>\r\n *\r\n * @param string $addresses\r\n * @param string $encoding\r\n * @return array(ezcMailAddress)\r\n */\r\n public static function parseEmailAddresses( $addresses, $encoding = \"mime\" )\r\n {\r\n $addressesArray = array();\r\n $inQuote = false;\r\n $last = 0; // last hit\r\n $length = strlen( $addresses );\r\n for ( $i = 0; $i < $length; $i++ )\r\n {\r\n if ( $addresses[$i] == '\"' )\r\n {\r\n $inQuote = !$inQuote;\r\n }\r\n else if ( $addresses[$i] == ',' && !$inQuote )\r\n {\r\n $addressesArray[] = substr( $addresses, $last, $i - $last );\r\n $last = $i + 1; // eat comma\r\n }\r\n }\r\n\r\n // fetch the last one\r\n $addressesArray[] = substr( $addresses, $last );\r\n\r\n $addressObjects = array();\r\n foreach ( $addressesArray as $address )\r\n {\r\n $addressObject = self::parseEmailAddress( $address, $encoding );\r\n if ( $addressObject !== null )\r\n {\r\n $addressObjects[] = $addressObject;\r\n }\r\n }\r\n\r\n return $addressObjects;\r\n }\r\n\r\n /**\r\n * Returns an unique message ID to be used for a mail message.\r\n *\r\n * The hostname $hostname will be added to the unique ID as required by RFC822.\r\n * If an e-mail address is provided instead, the hostname is extracted and used.\r\n *\r\n * The formula to generate the message ID is: [time_and_date].[process_id].[counter]\r\n *\r\n * @param string $hostname\r\n * @return string\r\n */\r\n public static function generateMessageId( $hostname )\r\n {\r\n if ( strpos( $hostname, '@' ) !== false )\r\n {\r\n $hostname = strstr( $hostname, '@' );\r\n }\r\n else\r\n {\r\n $hostname = '@' . $hostname;\r\n }\r\n return date( 'YmdGHjs' ) . '.' . getmypid() . '.' . self::$idCounter++ . $hostname;\r\n }\r\n\r\n /**\r\n * Returns an unique ID to be used for Content-ID headers.\r\n *\r\n * The part $partName is default set to \"part\". Another value can be used to provide,\r\n * for example, a file name of a part. $partName will be encoded with base64 to be\r\n * compliant with the RFCs.\r\n *\r\n * The formula used is [base64( $partName )].\"@\".[time].[counter]\r\n *\r\n * @param string $partName\r\n * @return string\r\n */\r\n public static function generateContentId( $partName = \"part\" )\r\n {\r\n return str_replace( array( '=', '+', '/' ), '', base64_encode( $partName ) ) . '@' . date( 'His' ) . self::$idCounter++;\r\n }\r\n\r\n /**\r\n * Sets the endLine $character(s) to use when generating mail.\r\n * The default is to use \"\\r\\n\" as specified by RFC 2045.\r\n *\r\n * @param string $characters\r\n */\r\n public static function setLineBreak( $characters )\r\n {\r\n self::$lineBreak = $characters;\r\n }\r\n\r\n /**\r\n * Returns one endLine character.\r\n *\r\n * The default is to use \"\\n\\r\" as specified by RFC 2045.\r\n *\r\n * @return string\r\n */\r\n public static function lineBreak()\r\n {\r\n // Note, this function does deliberately not\r\n // have a $count parameter because of speed issues.\r\n return self::$lineBreak;\r\n }\r\n\r\n /**\r\n * Decodes mime encoded fields and tries to recover from errors.\r\n *\r\n * Decodes the $text encoded as a MIME string to the $charset. In case the\r\n * strict conversion fails this method tries to workaround the issues by\r\n * trying to \"fix\" the original $text before trying to convert it.\r\n *\r\n * @param string $text\r\n * @param string $charset\r\n * @return string\r\n */\r\n public static function mimeDecode( $text, $charset = 'utf-8' )\r\n {\r\n $origtext = $text;\r\n $text = @iconv_mime_decode( $text, 0, $charset );\r\n if ( $text !== false )\r\n {\r\n return $text;\r\n }\r\n\r\n // something went wrong while decoding, let's see if we can fix it\r\n // Try to fix lower case hex digits\r\n $text = preg_replace_callback(\r\n '/=(([a-f][a-f0-9])|([a-f0-9][a-f]))/',\r\n create_function( '$matches', 'return strtoupper($matches[0]);' ),\r\n $origtext\r\n );\r\n $text = @iconv_mime_decode( $text, 0, $charset );\r\n if ( $text !== false )\r\n {\r\n return $text;\r\n }\r\n\r\n // Workaround a bug in PHP 5.1.0-5.1.3 where the \"b\" and \"q\" methods\r\n // are not understood (but only \"B\" and \"Q\")\r\n $text = str_replace( array( '?b?', '?q?' ), array( '?B?', '?Q?' ), $origtext );\r\n $text = @iconv_mime_decode( $text, 0, $charset );\r\n if ( $text !== false )\r\n {\r\n return $text;\r\n }\r\n\r\n // Try it as latin 1 string\r\n $text = preg_replace( '/=\\?([^?]+)\\?/', '=?iso-8859-1?', $origtext );\r\n $text = iconv_mime_decode( $text, 0, $charset );\r\n\r\n return $text;\r\n }\r\n\r\n /**\r\n * Returns a new mail object that is a reply to the current object.\r\n *\r\n * The new mail will have the correct to, cc, bcc and reference headers set.\r\n * It will not have any body set.\r\n *\r\n * By default the reply will only be sent to the sender of the original mail.\r\n * If $type is set to REPLY_ALL, all the original recipients will be included\r\n * in the reply.\r\n *\r\n * Use $subjectPrefix to set the prefix to the subject of the mail. The default\r\n * is to prefix with 'Re: '.\r\n *\r\n * @param ezcMail $mail\r\n * @param ezcMailAddress $from\r\n * @param int $type REPLY_SENDER or REPLY_ALL\r\n * @param string $subjectPrefix\r\n * @param string $mailClass\r\n * @return ezcMail\r\n */\r\n static public function replyToMail( ezcMail $mail, ezcMailAddress $from,\r\n $type = self::REPLY_SENDER, $subjectPrefix = \"Re: \",\r\n $mailClass = \"ezcMail\" )\r\n {\r\n $reply = new $mailClass();\r\n $reply->from = $from;\r\n\r\n // To = Reply-To if set\r\n if ( $mail->getHeader( 'Reply-To' ) != '' )\r\n {\r\n $reply->to = ezcMailTools::parseEmailAddresses( $mail->getHeader( 'Reply-To' ) );\r\n }\r\n else // Else To = From\r\n\r\n {\r\n $reply->to = array( $mail->from );\r\n }\r\n\r\n if ( $type == self::REPLY_ALL )\r\n {\r\n // Cc = Cc + To - your own address\r\n $cc = array();\r\n foreach ( $mail->to as $address )\r\n {\r\n if ( $address->email != $from->email )\r\n {\r\n $cc[] = $address;\r\n }\r\n }\r\n foreach ( $mail->cc as $address )\r\n {\r\n if ( $address->email != $from->email )\r\n {\r\n $cc[] = $address;\r\n }\r\n }\r\n $reply->cc = $cc;\r\n }\r\n\r\n $reply->subject = $subjectPrefix . $mail->subject;\r\n\r\n if ( $mail->getHeader( 'Message-Id' ) )\r\n {\r\n // In-Reply-To = Message-Id\r\n $reply->setHeader( 'In-Reply-To', $mail->getHeader( 'Message-ID' ) );\r\n\r\n // References = References . Message-Id\r\n if ( $mail->getHeader( 'References' ) != '' )\r\n {\r\n $reply->setHeader( 'References', $mail->getHeader( 'References' )\r\n . ' ' . $mail->getHeader( 'Message-ID' ) );\r\n }\r\n else\r\n {\r\n $reply->setHeader( 'References', $mail->getHeader( 'Message-ID' ) );\r\n }\r\n }\r\n else // original mail is borked. Let's support it anyway.\r\n {\r\n $reply->setHeader( 'References', $mail->getHeader( 'References' ) );\r\n }\r\n\r\n return $reply;\r\n }\r\n\r\n /**\r\n * Guesses the content and mime type by using the file extension.\r\n *\r\n * The content and mime types are returned through the $contentType\r\n * and $mimeType arguments.\r\n * For the moment only for image files.\r\n *\r\n * @param string $fileName\r\n * @param string $contentType\r\n * @param string $mimeType\r\n */\r\n static public function guessContentType( $fileName, &$contentType, &$mimeType )\r\n {\r\n $extension = strtolower( pathinfo( $fileName, PATHINFO_EXTENSION ) );\r\n switch ( $extension )\r\n {\r\n case 'gif':\r\n $contentType = 'image';\r\n $mimeType = 'gif';\r\n break;\r\n\r\n case 'jpg':\r\n case 'jpe':\r\n case 'jpeg':\r\n $contentType = 'image';\r\n $mimeType = 'jpeg';\r\n break;\r\n\r\n case 'png':\r\n $contentType = 'image';\r\n $mimeType = 'png';\r\n break;\r\n\r\n case 'bmp':\r\n $contentType = 'image';\r\n $mimeType = 'bmp';\r\n break;\r\n\r\n case 'tif':\r\n case 'tiff':\r\n $contentType = 'image';\r\n $mimeType = 'tiff';\r\n break;\r\n\r\n default:\r\n return false;\r\n }\r\n return true;\r\n }\r\n}", "public function getFullname()\n {\n $fullname = trim($this->getName().' '.$this->getLastName());\n return (!$fullname) ? $this->getEmail() : $fullname;\n }", "public function toSMTPString()\n {\n if (trim($this->fullName) == '')\n return $this->emailAddress . ';';\n return trim($this->fullName) . ' <' . $this->emailAddress . '>;';\n }", "function makeEmail( $email, $column = '' )\n{\n\t$email = trim( $email );\n\n\tif ( $email == '' )\n\t{\n\t\treturn '';\n\t}\n\n\t// Validate email.\n\tif ( ! filter_var( $email, FILTER_VALIDATE_EMAIL ) )\n\t{\n\t\treturn $email;\n\t}\n\n\treturn '<a href=\"mailto:' . $email . '\">' . $email . '</a>';\n}", "protected function formatAddress(array $address): string\n {\n list($email, $name) = $address;\n if ($name === null) {\n return $email;\n }\n $name = mb_encode_mimeheader($name, $this->charset, 'B');\n\n return \"{$name} <{$email}>\";\n }", "public static function buildAddress($name, $email, $encodeName = true) {\n\t\tif (!empty($name) && MAIL_USE_FORMATTED_ADDRESS) {\n\t\t\tif ($encodeName) $name = Mail::encodeMIMEHeader($name);\n\t\t\tif (!preg_match('/^[a-z0-9 ]*$/i', $name)) return '\"'.str_replace('\"', '\\\"', $name).'\" <'.$email.'>';\n\t\t\telse return $name . ' <'.$email.'>';\n\t\t}\n\t\treturn $email;\n\t}", "public function __toString() {\n\t\treturn empty( $this->name ) ? $this->email : \"{$this->name} <{$this->email}>\";\n\t}", "public function toString()\n {\n $email = '<' . Mime::encodeEmail($this->email()) . '>';\n $name = $this->name();\n return $name ? Mime::encodeValue($name) . ' ' . $email : $email;\n }", "public function getFirstAndLastNameFromEmail()\n {\n $exploded_full_name = explode(' ', str_replace(['.', '-', '_'], [' ', ' ', ' '], substr($this->getEmail(), 0, strpos($this->getEmail(), '@'))));\n\n if (count($exploded_full_name) === 1) {\n $first_name = mb_strtoupper(mb_substr($exploded_full_name[0], 0, 1)) . mb_substr($exploded_full_name[0], 1);\n $last_name = '';\n } else {\n $full_name = [];\n\n foreach ($exploded_full_name as $k) {\n $full_name[] = mb_strtoupper(mb_substr($k, 0, 1)) . mb_substr($k, 1);\n }\n\n $first_name = array_shift($full_name);\n $last_name = implode(' ', $full_name);\n }\n\n return [$first_name, $last_name];\n }", "function to_rfc2822_email(array $addresses): string\n {\n $addresses = !empty($addresses['address']) ? [$addresses] : $addresses;\n\n return collect($addresses)\n ->map(function (array $item) {\n $name = Arr::get($item, 'name');\n $address = Arr::get($item, 'address');\n\n if (!is_email($address)) {\n return false;\n }\n\n return $name ? \"{$name} <{$address}>\" : $address;\n })\n ->filter()\n ->implode(', ');\n }", "public function getNameAddr()\n {\n $addr = $this->long_name;\n\n if ($this->street1) {\n if ($addr) $addr .= ', ';\n $addr .= $this->street1;\n }\n \n if ($this->street2) {\n if ($addr) $addr .= ', ';\n $addr .= $this->street2;\n }\n \n if ($this->city) {\n if ($addr) $addr .= ', ';\n $addr .= $this->city;\n }\n \n if ($this->state) {\n if ($addr) $addr .= ', ';\n $addr .= $this->state;\n }\n \n if ($this->zip) {\n if ($addr) $addr .= ' ';\n $addr .= $this->zip;\n }\n \n return $addr;\n }", "private function make_full_name() {\n return $this->firstname . \" \" . $this->infix . \" \" . $this->lastname;\n }", "public function getDisplayName() {\r\n $displayName = $this->fname.' '.$this->lname;\r\n if(strlen($displayName) <= 1) {\r\n $displayName = explode('@',$this->email);\r\n return($displayName[0]);\r\n }\r\n return($displayName);\r\n }", "public function getFullAddressAttribute()\n { \n # Get the Name of User\n $name = $this->name ? $this->name.', ' : '';\n\n # Get the address of User\n $address = $this->address ? $this->address.', ' : '';\n\n # Get the city of User\n $city = $this->city ? $this->city.', ' : '';\n\n # Get the zip of User\n $zip = $this->zip ? $this->zip.', ' : '';\n\n return $name.$address.$city.$zip;\n }", "function getFirstName($force_value = false) {\n $result = parent::getFirstName();\n if(empty($result) && $force_value) {\n $email = $this->getEmail();\n return substr_utf($email, 0, strpos_utf($email, '@'));\n } // if\n return $result;\n }", "public function fullAddress(){\n\n return ' '.$this->house. ' '. $this->address. ', '. $this->postcode;\n }", "public function __toString(): string\n {\n if (empty($this->firstName) && empty($this->lastName)) {\n return $this->email;\n }\n\n return $this->firstName . ' ' . $this->lastName;\n }", "public function fullAddress() :string\n {\n $parts = [\n $this->address1,\n $this->address2,\n $this->city,\n $this->county,\n $this->postcode\n ];\n $address = array_filter($parts, [$this,'not_blank']);\n return implode(', ',$address);\n }", "function get_email_for_initials ($Initials) {\n\t$qry_useremail = \"SELECT \n\t\t\t\t\t\t\t\t\tEmail \n\t\t\t\t\t\t\t\t\tFROM users \n\t\t\t\t\t\t\t\tWHERE Initials = '\".$Initials.\"'\"; \n\t$result_useremail = mysql_query($qry_useremail) or die(tdw_mysql_error($qry_useremail));\n\twhile($row_useremail = mysql_fetch_array($result_useremail)) {\n\t\t$useremail = $row_useremail[\"Email\"];\n\t}\n\treturn $useremail;\n}", "function b2c_generate_username( $email ) {\n\t// get the value before the '@'\n\t$arr = explode( '@', $email, 2 );\n\t$username = $arr[0];\n\n\t// check if that username is already in use\n\t$users = new WP_User_Query(\n\t\tarray(\n\t\t\t'search' => $username . '*',\n\t\t\t'search_columns' => array(\n\t\t\t\t'user_login',\n\t\t\t),\n\t\t\t'fields' => array( 'ID' ),\n\t\t)\n\t);\n\t$users_found = count( $users->get_results() );\n\n\tif ( $users_found > 0 ) {\n\t\treturn $username . $users_found;\n\t}\n\n\treturn $username;\n}", "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}", "public function map_name_value($row)\r\n\t{\r\n\t\t$result = '';\r\n\t\t$first = true;\r\n\t\tforeach ($this->name_fields as $name_field) {\r\n\t\t\t$result .= (($first == false ? ' - ' : '') . (isset($row[$name_field]) ? $row[$name_field] : ''));\r\n\t\t\t$first = false;\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "function nameWithMail () {\n\t$link = $this->unitDB();\n\t\n\t$res = $link->prepare(\"SELECT * FROM mails m INNER JOIN users u ON u.id=m.users_name\");\n\t$res->execute();\n\t$row = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\n\treturn $row;\n}", "function encode_email_address( $email ) {\n\n $output = '';\n\n for ($i = 0; $i < strlen($email); $i++) \n { \n $output .= '&#'.ord($email[$i]).';'; \n }\n\n return $output;\n}", "private static function formatAddr(array $addr): array\n {\n $res = [];\n\n foreach ($addr as $pair) {\n $email = (string)array_shift($pair);\n $name = (string)array_shift($pair);\n\n if (empty($name)) {\n $res[] = $email;\n } else {\n $res[$email] = $name;\n }\n }\n\n return $res;\n }", "public function mrow_email($r)\n {\n return $r['email'];\n }", "static function getUserDisplayName($params, $short = false) {\n $full_name = isset($params['full_name']) && $params['full_name'] ? $params['full_name'] : null;\n $first_name = isset($params['first_name']) && $params['first_name'] ? $params['first_name'] : null;\n $last_name = isset($params['last_name']) && $params['last_name'] ? $params['last_name'] : null;\n $email = isset($params['email']) && $params['email'] ? $params['email'] : null;\n \n if ($short) {\n if($full_name) {\n $parts = explode(' ', $full_name);\n \n if(count($params) > 1) {\n $first_name = array_shift($parts);\n $last_name = implode(' ', $parts);\n } else {\n $first_name = $full_name;\n } // if\n } // if\n \n if($first_name && $last_name) {\n return $first_name . ' ' . substr_utf($last_name, 0, 1) . '.';\n } elseif($first_name) {\n return $first_name;\n } elseif($last_name) {\n return $last_name;\n } else {\n return substr($email, 0, strpos($email, '@'));\n } // if\n } else {\n if($full_name) {\n return $full_name;\n } elseif($first_name && $last_name) {\n return $first_name . ' ' . $last_name;\n } elseif($first_name) {\n return $first_name;\n } elseif($last_name) {\n return $last_name;\n } else {\n return substr($email, 0, strpos($email, '@'));\n } // if\n } // if\n }", "function getPersonName($user) {\n if ($user==null || (!isset($user[\"lastname\"]) && !isset($user[\"firstname\"])) )\n return '';\n $ret =\"\";\n if (isset($user[\"title\"]))\n $ret = $user[\"title\"].' ';\n $ret .= $user[\"lastname\"].\" \".$user[\"firstname\"];\n if (isset($user[\"birthname\"]) && trim($user[\"birthname\"])!=\"\")\n $ret .= \" (\".trim($user[\"birthname\"]).\")\";\n return $ret;\n}", "public function getFullAddressAttribute(): string\n {\n return \"$this->address\" . ($this->address2 ? ' #' . $this->address2 : '') . \", $this->city $this->state, $this->zip\";\n }" ]
[ "0.6166745", "0.6091679", "0.5950369", "0.5943497", "0.59290975", "0.5889513", "0.5833111", "0.5818343", "0.5738777", "0.5738242", "0.56916517", "0.5660092", "0.56448007", "0.56220955", "0.5568568", "0.5563451", "0.5559249", "0.55542034", "0.55506176", "0.553387", "0.55263233", "0.5466525", "0.5458972", "0.5457873", "0.5435236", "0.5430446", "0.5426714", "0.5425337", "0.5423747", "0.53889585" ]
0.7778946
0
Search for entries in address books Return a list of addresses matching expression in all backends of a given type.
function search($expression, $bnum = -1) { $ret = array(); $this->error = ''; /* Search all backends */ if ($bnum == -1) { $sel = $this->get_backend_list(''); $failed = 0; for ($i = 0 ; $i < sizeof($sel) ; $i++) { $backend = &$sel[$i]; $backend->error = ''; $res = $backend->search($expression); if (is_array($res)) { $ret = array_merge($ret, $res); } else { $this->error .= "\n" . $backend->error; $failed++; } } /* Only fail if all backends failed */ if( $failed >= sizeof( $sel ) ) { $ret = FALSE; } } elseif (! isset($this->backends[$bnum])) { /* make sure that backend exists */ $this->error = _("Unknown address book backend"); $ret = false; } else { /* Search only one backend */ $ret = $this->backends[$bnum]->search($expression); if (!is_array($ret)) { $this->error .= "\n" . $this->backends[$bnum]->error; $ret = FALSE; } } return( $ret ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ldap_queryabooks($filter,$types){\n global $conf;\n global $LDAP_CON;\n\n // make sure $types is an array\n if(!is_array($types)){\n $types = explode(',',$types);\n $types = array_map('trim',$types);\n }\n\n $results = array();\n $result1 = array();\n $result2 = array();\n $result3 = array();\n\n // public addressbook\n $sr = @ldap_search($LDAP_CON,$conf['publicbook'],\n $filter,$types);\n tpl_ldaperror();\n $result1 = ldap_get_binentries($LDAP_CON, $sr);\n ldap_free_result($sr);\n\n // private addressbook\n if(!empty($_SESSION['ldapab']['binddn']) && $conf['privatebook']){\n $sr = @ldap_list($LDAP_CON,$conf['privatebook'].\n ','.$_SESSION['ldapab']['binddn'],\n $filter,$types);\n if(ldap_errno($LDAP_CON) != 32) tpl_ldaperror(); // ignore missing address book\n $result2 = ldap_get_binentries($LDAP_CON, $sr);\n }\n\n // user account entries\n if ($conf['displayusertree']) {\n $sr = @ldap_list($LDAP_CON,$conf['usertree'],\n $filter,$types);\n tpl_ldaperror();\n $result3 = ldap_get_binentries($LDAP_CON, $sr);\n ldap_free_result($sr);\n }\n\n\n\n // return merged results\n return array_merge((array)$result1,(array)$result2,(array)$result3);\n}", "public function getAddressBooks();", "public function getActiveAddressBooks();", "function _search($criteria, $fields)\n {\n $results = array();\n $results = $this->_getAddressBook($fields);\n if (is_a($results, 'PEAR_Error')) {\n return $results;\n }\n\n foreach ($results as $key => $contact) {\n $found = !isset($criteria['OR']);\n foreach ($criteria as $op => $vals) {\n if ($op == 'AND') {\n foreach ($vals as $val) {\n if (isset($contact[$val['field']])) {\n switch ($val['op']) {\n case 'LIKE':\n if (stristr($contact[$val['field']], $val['test']) === false) {\n continue 4;\n }\n $found = true;\n break;\n }\n }\n }\n } elseif ($op == 'OR') {\n foreach ($vals as $val) {\n if (isset($contact[$val['field']])) {\n switch ($val['op']) {\n case 'LIKE':\n if (empty($val['test']) ||\n stristr($contact[$val['field']], $val['test']) !== false) {\n $found = true;\n break 3;\n }\n }\n }\n }\n }\n }\n if ($found) {\n $results[$key] = $contact;\n }\n }\n return $results;\n }", "function lookup($value, $bnum = -1, $field = SM_ABOOK_FIELD_NICKNAME) {\n\n $ret = array();\n\n if ($bnum > -1) {\n if (!isset($this->backends[$bnum])) {\n $this->error = _(\"Unknown address book backend\");\n return false;\n }\n $res = $this->backends[$bnum]->lookup($value, $field);\n if (is_array($res)) {\n return $res;\n } else {\n $this->error = $this->backends[$bnum]->error;\n return false;\n }\n }\n\n $sel = $this->get_backend_list('local');\n for ($i = 0 ; $i < sizeof($sel) ; $i++) {\n $backend = &$sel[$i];\n $backend->error = '';\n $res = $backend->lookup($value, $field);\n\n // return an address if one is found\n // (empty array means lookup concluded\n // but no result found - in this case,\n // proceed to next backend)\n //\n if (is_array($res)) {\n if (!empty($res)) return $res;\n } else {\n $this->error = $backend->error;\n return false;\n }\n }\n\n return $ret;\n }", "function spectra_search_address ($search_text)\n\t{\n\t\techo \"\t\t<h2> Address Search Results: </h2> \\n\\n\";\n\n\t\t$address = mysqli_getset ($GLOBALS[\"tables\"][\"ledger\"], \"`address` LIKE '%\".$search_text.\"%'\");\n\n\t\tif (!isset ($address[\"data\"]) || $address[\"data\"] == \"\")\n\t\t{\n\t\t\techo \"\t\t<p class=\\\"search_dark\\\"> No Matching Address Records </p> \\n\\n\";\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\techo \"\t\t<p class=\\\"search_dark\\\"> Addresses Containing \\\"\".substr ($search_text, 0, 32).\"\\\": </p> \\n\\n\";\n\n\t\t\tforeach ($address[\"data\"] as $address)\n\t\t\t{\n\t\t\t\techo \"\t\t<p> \\n\";\n\t\t\t\techo \"\t\t<a href=\\\"address.php?address=\".$address[\"address\"].\"\\\" title=\\\"Address Detaiil Page\\\"> \\n\";\n\t\t\t\techo \"\t\t\t\".$address[\"address\"].\"\\n\";\n\t\t\t\techo \"\t\t</a> \\n\";\n\t\t\t\techo \"\t\t</p> \\n\\n\";\n\t\t\t}\n\t\t}\n\t}", "public function getAddressBooks()\n {\n $response = $this->request('GET', 'addressbooks');\n\n return new Types\\AddressBook($response['addressBook']);\n }", "function get_backend_list($type = '') {\n $ret = array();\n for ($i = 1 ; $i <= $this->numbackends ; $i++) {\n if (empty($type) || $type == $this->backends[$i]->btype) {\n $ret[] = &$this->backends[$i];\n }\n }\n return $ret;\n }", "public function findAddresses() {\n\t\t\t# Default StyleSheet\n\t\t\tif (! isset($_REQUEST[\"stylesheet\"])) $_REQUEST[\"stylesheet\"] = 'network.address.xsl';\n\t\t\t$response = new \\HTTP\\Response();\n\t\n\t\t\t# Initiate Address List\n\t\t\t$addressList = new \\Network\\AddressList();\n\t\n\t\t\t# Find Matching Addresses\n\t\t\t$parameters = array();\n\t\t\tif (preg_match('/^([\\w\\-]+)\\.(.*)$/',$_REQUEST['host_name'],$matches)) {\n\t\t\t\t$_REQUEST['host_name'] = $matches[1];\n\t\t\t\t$_REQUEST['domain_name'] = $matches[2];\n\t\t\t}\n\t\t\tif (isset($_REQUEST['domain_name']) && strlen($_REQUEST['domain_name']) > 0) {\n\t\t\t\t$domain = new \\Network\\Domain();\n\t\t\t\t$domain->get($_REQUEST['domain_name']);\n\t\t\t\tif ($domain->id) {\n\t\t\t\t\t$parameters['domain_id'] = $domain->id;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t $this->error(\"domain not found\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset($_REQUEST['host_name']) && strlen($_REQUEST['host_name']) > 0) {\n\t\t\t\t$host = new \\Network\\Host();\n\t\t\t\t$host->get($domain->id,$_REQUEST['host_name']);\n\t\t\t\tif ($host->id) {\n\t\t\t\t\t$parameters['host_id'] = $host->id;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t $this->error(\"host not found\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset($_REQUEST['adapter_name']) && strlen($_REQUEST['adapter_name']) > 0) {\n\t\t\t\t$adapter = new \\Network\\Adapter();\n\t\t\t\t$adapter->get($host->id,$_REQUEST['adapter_name']);\n\t\t\t\tif ($adapter->id) {\n\t\t\t\t\t$parameters['adapter_id'] = $adapter->id;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t $this->error(\"adapter '\".$_REQUEST['adapter_name'].\"' for host '\".$host->name.\"' not found\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset($_REQUEST['type'])) $parameters['type'] = $_REQUEST['type'];\n\t\t\t$addresses = $addressList->find($parameters);\n\t\n\t\t\t# Error Handling\n\t\t\tif ($addressList->error()) $this->error($addressList->error());\n\t\t\telse{\n\t\t\t\t$response->address = $addresses;\n\t\t\t\t$response->success = 1;\n\t\t\t}\n\t\n\t\t\tapi_log('network',$_REQUEST,$response);\n\t\n\t\t\t# Send Response\n\t\t\tprint $this->formatOutput($response);\n\t\t}", "public function getAddressList($refId = null, $entryId = null, $searchString = null)\n {\n\n $db = $this->getDb();\n\n $condEntry = '';\n $condAttach = '';\n\n if ($refId) {\n $condAttach = \" ref.vid = {$refId}\";\n } elseif ($entryId) {\n $condEntry = \" storage.rowid = {$entryId}\";\n } else {\n return array();\n }\n\n $condSearch = '';\n if ($searchString) {\n\n $condSearch = <<<SQL\n and\n (\n upper(storage.name) like upper('%{$searchString}%')\n or upper(storage.link) like upper('%{$searchString}%')\n )\nSQL;\n\n }\n\n\n $sql = <<<SQL\nSELECT\n storage.rowid as storage_id,\n storage.name as storage_name,\n storage.link as storage_link,\n storage.description as storage_description,\n storage_type.name as type_name,\n confidential.access_key as confidential_level\n\nFROM\n wbfsys_file_storage storage\nJOIN\n wbfsys_entity_file_storage ref\n ON ref.id_storage = storage.rowid\n\nLEFT JOIN\n wbfsys_file_storage_type storage_type\n on storage_type.rowid = storage.id_type\n\nLEFT JOIN\n wbfsys_confidentiality_level confidential\n on confidential.rowid = storage.id_confidentiality\n\nWHERE\n {$condAttach}\n {$condEntry}\n {$condSearch}\nORDER BY\n storage.name;\n\nSQL;\n\n if ($entryId) {\n return $db->select($sql)->get();\n } else {\n return $db->select($sql)->getAll();\n }\n\n }", "public function get_address_sources($writeable = false)\n {\n $abook_type = strtolower($this->config->get('address_book_type'));\n $ldap_config = $this->config->get('ldap_public');\n $autocomplete = (array) $this->config->get('autocomplete_addressbooks');\n $list = array();\n\n // We are using the DB address book\n if ($abook_type != 'ldap') {\n if (!isset($this->address_books['0']))\n $this->address_books['0'] = new rcube_contacts($this->db, $this->get_user_id());\n $list['0'] = array(\n 'id' => '0',\n 'name' => $this->gettext('personaladrbook'),\n 'groups' => $this->address_books['0']->groups,\n 'readonly' => $this->address_books['0']->readonly,\n 'autocomplete' => in_array('sql', $autocomplete),\n 'undelete' => $this->address_books['0']->undelete && $this->config->get('undo_timeout'),\n );\n }\n\n if ($ldap_config) {\n $ldap_config = (array) $ldap_config;\n foreach ($ldap_config as $id => $prop) {\n // handle misconfiguration\n if (empty($prop) || !is_array($prop)) {\n continue;\n }\n $list[$id] = array(\n 'id' => $id,\n 'name' => $prop['name'],\n 'groups' => is_array($prop['groups']),\n 'readonly' => !$prop['writable'],\n 'hidden' => $prop['hidden'],\n 'autocomplete' => in_array($id, $autocomplete)\n );\n }\n }\n\n $plugin = $this->plugins->exec_hook('addressbooks_list', array('sources' => $list));\n $list = $plugin['sources'];\n\n foreach ($list as $idx => $item) {\n // register source for shutdown function\n if (!is_object($this->address_books[$item['id']]))\n $this->address_books[$item['id']] = $item;\n // remove from list if not writeable as requested\n if ($writeable && $item['readonly'])\n unset($list[$idx]);\n }\n\n return $list;\n }", "public function suggestWarehouseEmailSearch()\n\t{\n\t\t$emails = array();\n\n\t\t$sql = \" select wa.alias, w.name, wat.name from warehousealias wa\n\t\t\t\t\tleft join warehouse w on (w.id = wa.warehouseid and w.active=1)\n\t\t\t\t\tleft join warehousealiastype wat on (wat.id = wa.warehousealiastypeid and wat.active=1)\n\t\t\t\t\twhere\n\t\t\t\t\t\twa.active = 1 and\n\t\t\t\t\t\twa.warehousealiastypeid in (\".$this->_frEmailWarehouseAliasTypeIds.\" )\";\n\n\t\t$sql .= \" and (wa.alias like '%\" . $this->emailWarehouse->Text . \"%' or w.name like '%\" . $this->emailWarehouse->Text . \"%')\";\n\n\t\t$result = Dao::getResultsNative($sql);\n\t\tif($result)\n\t\t{\n\t\t\tforeach($result as $rows)\n\t\t\t{\n\t\t\t\t$emails[] = array('id'=> $rows[0], 'email'=> $rows[1].\" - \".$rows[2].\" - \".$rows[0]);\n\t\t\t}\n\t\t}\n\t\tif(count($emails)==0)\n\t\t{\n\t\t\t$emails[] = array('id'=> 0, 'email'=> 'No emails Found!');\n\t\t}\n\n\t\treturn $emails;\n\t}", "public function actionAddressTypeList() {\r\n\r\n return AddressType::find()\r\n ->active()\r\n ->defaultTrash()\r\n ->all();\r\n }", "public function searchBook()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t$text = $_POST['text'];\n\t\t\t$type = $_POST['type'];\n\t \t\t//$return = array();\n\t\t\t$book = D('Book_species');\n\t\t\t$sql = \"SELECT * FROM lib_book_species as a join\n\t\t\t\t\t(SELECT COUNT(*) as number, isbn FROM lib_book_unique \n\t\t\t \t\twhere book_id not in(select book_id from lib_remove)\n\t\t\t \t\tGROUP BY isbn) AS b using(isbn)\n\t\t\t \t\twhere {$type} like '%{$text}%' and number!=0 ORDER BY species_id DESC;\";\n\t\t\tif ($type == 1) {\n\t\t\t\t$bkid = intval($text);\n\t\t\t\t$sql = \"select * from lib_book_species join (select isbn,count(*)\n\t\t\t\t \t\tas number from lib_book_unique group by isbn) as a using(isbn) \n\t\t\t\t\t\twhere isbn in (select isbn from lib_book_unique \n\t\t\t\t\t\twhere book_id = {$bkid}) and {$bkid} not in \n\t\t\t\t\t\t(select book_id from lib_remove)\";\n\t\t\t}\n\n\n\t\t\t$return = $book->query($sql);\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'success',\n\t\t\t\t\t'data' => json_encode($return)\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'No result!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t}\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\n\t}", "public function findBindingTypes(Expression $expr);", "public function find(array $addressLines, $type = 'All', $max = 10)\n {\n if ($this->cacheIsSet()) {\n $cacheKey = $this->cachePrefix . md5(implode($addressLines) . $type . strval($max));\n\n if ($this->Cache->has($cacheKey)) {\n return $this->Cache->get($cacheKey);\n }\n }\n\n $params = http_build_query([\n 'type' => $type,\n 'address_line_1' => (isset($addressLines[0]) ? $addressLines[0] : NULL),\n 'address_line_2' => (isset($addressLines[1]) ? $addressLines[1] : NULL),\n 'address_line_3' => (isset($addressLines[2]) ? $addressLines[2] : NULL),\n 'address_line_4' => (isset($addressLines[3]) ? $addressLines[3] : NULL),\n 'address_line_5' => (isset($addressLines[4]) ? $addressLines[4] : NULL),\n 'max' => $max,\n 'access_token' => $this->token,\n ]);\n\n $request = self::NZPOST_API_URL . 'find?' . $params;\n\n $responseBody = $this->sendApiRequest($request);\n\n if ($this->cacheIsSet()) {\n $this->Cache->set($cacheKey, $responseBody['addresses'], $this->ttl);\n }\n\n return $responseBody['addresses'];\n }", "public function getBookByType($type = null)\n {\n $result = $this->find('All')->toArray();\n return $result;\n }", "public static function getCandidates($type);", "public function search_all($type=\"*\",$attr=\"*\",$val=\"*\"){\n\t\t$data=array();\n\t\tif ($this->is_eligable($type, $attr, $val)){\n\t\t\tarray_push($data,$this);\n\t\t}\n\t\t//region for weather to add self or not end^^\n\t\t$local_data=$data;\n\t\t\n\t\tforeach($this->content as $item){\n\t\t\tif(isset($item->content)){\n\t\t\t\t$retrived_content=$item->search_all($type,$attr,$val);\n\t\t\t\tif (isset($retrived_content)){\n\t\t\t\t\t$local_data=array_merge($local_data,$retrived_content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (sizeof($local_data)!=0){\n\t\t\treturn $local_data;\n\t\t}\n\t}", "public function exists($address, $list, $type);", "function getAddresses($userId, $addressType = 0) {\n\t\t$select = 'tx_commerce_fe_user_id=' . intval($userId) . t3lib_Befunc::BEenableFields('tt_address');\n\n\t\tif ($addressType > 0) {\n\t\t\t$select.= ' AND tx_commerce_address_type_id=' . intval($addressType);\n\t\t} elseif (isset($this->conf['selectAddressTypes'])) {\n\t\t\t$select.= ' AND tx_commerce_address_type_id IN (' . $this->conf['selectAddressTypes'] . ')';\n\t\t} else {\n\t\t\t$this->addresses = array();\n\t\t\treturn;\n\t\t}\n\n\t\t$select.= ' AND deleted=0 AND pid=' . $this->conf['addressPid'];\n\n\t\t/** * Hook for adding select statement\n\t\t*/\n\t\t$hookObjectsArr = array();\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['getAddresses'])) {\n\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi4/class.tx_commerce_pi4.php']['getAddresses'] as $classRef) {\n \t \t\t\t$hookObjectsArr[] = &t3lib_div::getUserObj($classRef);\n \t \t\t}\n \t \t}\n \t \tforeach($hookObjectsArr as $hookObj) {\n \t \t\tif (method_exists($hookObj, 'editSelectStatement')) {\n \t \t\t\t$select = $hookObj->editSelectStatement($select, $userId, $addressType, $this);\n \t \t\t}\n \t \t}\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t'*',\n\t\t\t'tt_address',\n\t\t\t$select,\n\t\t\t'',\n\t\t\t'tx_commerce_is_main_address desc'\n\t\t);\n\n\t\t$result = array();\n\t\twhile ($address = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t$result[$address['uid']] = tx_commerce_div::removeXSSStripTagsArray($address);\n\t\t}\n\n\t\treturn $result;\n\t}", "protected static function __results_from_search( $obj_type, $options, $search_terms )\n\t{\n\t\tif ( ! $search_terms ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif ( $obj_type instanceof Charcoal_Object ) {\n\t\t\t$proto = $obj_type;\n\t\t\t$obj_type = $proto->obj_type();\n\t\t}\n\t\telse {\n\t\t\t$proto = Charcoal::obj( $obj_type );\n\t\t}\n\n\t\t$l = _l();\n\n\t\tif ( isset( $options['select'] ) ) {\n\t\t\t$select = implode( ', ', $options['select'] );\n\t\t}\n\t\telse {\n\t\t\t$select = '*';\n\t\t}\n\n\t\tif ( isset( $options['fulltext'] ) ) {\n\t\t\t$match = [];\n\n\t\t\tforeach ( $options['fulltext'] as $p ) {\n\t\t\t\t$prop = $proto->p( $p );\n\n\t\t\t\tif ( $prop ) {\n\t\t\t\t\t$match[ $p ] = ( $prop->l10n() ? \"`{$p}_{$l}`\" : \"`{$p}`\" );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$match = implode( ', ', $match );\n\n\t\t\tif ( $match ) {\n\t\t\t\t$match = 'MATCH(' . $match . ') AGAINST(:s1 IN NATURAL LANGUAGE MODE)';\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$match = '';\n\t\t}\n\n\t\tif ( isset( $options['like'] ) ) {\n\t\t\t$like = [];\n\n\t\t\tforeach ( $options['like'] as $p ) {\n\t\t\t\t$prop = $proto->p( $p );\n\n\t\t\t\tif ( $prop ) {\n\t\t\t\t\t$like[ $p ] = '`' . $p . ( $prop->l10n() ? '_' . $l : '' ) . '` LIKE :s2';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$like = implode( ' OR ', $like );\n\t\t}\n\t\telse {\n\t\t\t$like = '';\n\t\t}\n\n\t\tif ( ! $match && ! $like ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t$sql_query = '\n\t\t\tSELECT\n\t\t\t\t' . $select . ',\n\t\t\t\t' . $match . ' AS `relevance`\n\t\t\tFROM\n\t\t\t\t`' . $proto->table() . '`\n\t\t\tWHERE\n\t\t\t\t`active` = 1\n\t\t\tAND\n\t\t\t\t( ' . $match . ( $match && $like ? ' OR ' : '' ) . $like . ' )\n\t\t\tORDER BY\n\t\t\t\t`relevance` DESC';\n\n\t\treturn Charcoal::obj_list( $obj_type )->load_from_query( $sql_query, [\n\t\t\t':s1' => $search_terms,\n\t\t\t':s2' => '%' . htmlentities( $search_terms, ENT_COMPAT, 'UTF-8' ) . '%'\n\t\t] );\n\t}", "public function searchEmails($request,$type = 'recieved') {\n\n $data = \\Illuminate\\Support\\Facades\\DB::table('all_emails');\n $data->selectRaw('*');\n $data->whereRaw(\"inquiry_id is Null AND email_type = '\".$type.\"'\");\n if (!empty($request->keyword)) {\n $data->whereRaw(\"MATCH (email_subject,email_text_body,email_html_body,attachments) AGAINST ('\" . $request->keyword . \"' IN BOOLEAN MODE) \");\n }\n $data->orderByRaw('date_time DESC');\n $data = $data->paginate(10);\n return $data;\n }", "public function findBindings(Expression $expr);", "function getSubscribedAddressBooks() {\n $principalUriExploded = explode('/', $this->addressBookInfo['principaluri']);\n $path = 'addressbooks/' . $principalUriExploded[2] . '/' . $this->addressBookInfo['uri'];\n $id = $this->addressBookInfo['id'];\n\n $result = array_merge(\n $this->carddavBackend->getSharedAddressBooksBySource($id),\n $this->carddavBackend->getSubscriptionsBySource($path)\n );\n\n return $result;\n }", "private function _getAddresses()\n\t {\n\t\t$hashes = [];\n\t\t$rows = $this->_db->exec(\"SELECT `city`, `address` FROM `addresses` WHERE `phone` = '\" . $this->phone . \"'\");\n\t\twhile($row = $rows->getRow())\n\t\t {\n\t\t\t$address = $row[\"city\"] . \", \" . $row[\"address\"];\n\t\t\t$sliced = new AddressSlicer($address);\n\n\t\t\tif ($sliced->valid() === true && isset($hashes[$sliced->hash]) === false)\n\t\t\t {\n\t\t\t\t$hashes[$sliced->hash] = $address;\n\t\t\t } //end if\n\n\t\t } //end while\n\n\t\treturn count($hashes);\n\t }", "protected function _doAddressbooks()\n {\n global $prefs;\n\n $abooks = $prefs->getValue('addressbooks');\n if (is_array(json_decode($abooks))) {\n return;\n }\n\n $abooks = explode(\"\\n\", $abooks);\n if (is_array($abooks) && !empty($abooks[0])) {\n $new_prefs = array();\n foreach ($abooks as $abook) {\n $new_prefs[] = $this->_updateShareName($abook);\n }\n\n $prefs->setValue('addressbooks', json_encode($new_prefs));\n }\n }", "public function search($request) {\n $query = Convert::raw2sql($request->getVar('q'));\n $limit = $this->config()->search_limit;\n $addresses = NZStreetAddress::get()->filter('FullAddress:StartsWith', $query)\n ->limit($limit);\n $output = [];\n foreach($addresses as $address) {\n $output[] = [\n 'AddressID' => $address->AddressID,\n 'FullAddress' => $address->FullAddress,\n 'AddressLine1' => sprintf(\"%s %s\",\n $address->FullAddressNumber,\n $address->FullRoadName\n ),\n 'Suburb' => $address->SuburbLocality,\n 'City' => $address->TownCity\n ];\n }\n\n return json_encode($output);\n }", "static public function getAddressbookSearchParams()\n {\n $src = json_decode($GLOBALS['prefs']->getValue('search_sources'));\n if (!is_array($src)) {\n $src = array();\n }\n\n $fields = json_decode($GLOBALS['prefs']->getValue('search_fields'), true);\n if (!is_array($fields)) {\n $fields = array();\n }\n\n return array(\n 'fields' => $fields,\n 'sources' => $src\n );\n }", "public function searchEntitiesByType($type)\n {\n $deployableWorkflowStateList = $this->_loadDeployableWorkflowStates();\n\n $query = \"\n SELECT `eid`\n ,`revisionid`\n ,`entityid`\n ,`state`\n FROM \" . self::$prefix . \"entity AS ENTITY_REVISION\n WHERE `type` = ?\n AND `revisionid` = (\n SELECT MAX(`revisionid`)\n FROM \" . self::$prefix . \"entity AS ENTITY\n WHERE ENTITY.eid = ENTITY_REVISION.eid\n )\n \";\n $queryVariables = array($type);\n\n // Add deployabe state check\n $nrOfWorkflowStates = count($deployableWorkflowStateList);\n $fWorkflowStateInPlaceholders = substr(str_repeat('?,',$nrOfWorkflowStates), 0, -1);\n $query .= \" AND `state` IN(\" . $fWorkflowStateInPlaceholders . \")\";\n $queryVariables = array_merge($queryVariables, $deployableWorkflowStateList);\n\n $st = $this->execute($query, $queryVariables);\n\n if ($st === false) {\n return 'error_db';\n }\n\n $this->_entities = array();\n $rows = $st->fetchAll(PDO::FETCH_ASSOC);\n foreach ($rows AS $row) {\n $entity = new sspmod_janus_Entity($this->_config);\n $entity->setEid($row['eid']);\n if ($entity->load()) {\n $this->_entities[] = $entity;\n } else {\n SimpleSAML_Logger::error(\n 'JANUS:UserController:searchEntitiesByType - Entity could not be\n loaded, eid: '.$row['eid']\n );\n }\n }\n return $this->_entities; \n }" ]
[ "0.64414316", "0.6021299", "0.59155625", "0.5811771", "0.5546752", "0.5488927", "0.53301877", "0.5256268", "0.5213975", "0.5213935", "0.5155633", "0.5110371", "0.50872487", "0.50564563", "0.503212", "0.50214154", "0.49986166", "0.49983928", "0.49454635", "0.49229154", "0.49153873", "0.48913825", "0.48836744", "0.48744994", "0.48643097", "0.48564312", "0.48523763", "0.48275957", "0.48242396", "0.48225075" ]
0.6811227
0
Lookup an address by the indicated field. Only possible in local backends.
function lookup($value, $bnum = -1, $field = SM_ABOOK_FIELD_NICKNAME) { $ret = array(); if ($bnum > -1) { if (!isset($this->backends[$bnum])) { $this->error = _("Unknown address book backend"); return false; } $res = $this->backends[$bnum]->lookup($value, $field); if (is_array($res)) { return $res; } else { $this->error = $this->backends[$bnum]->error; return false; } } $sel = $this->get_backend_list('local'); for ($i = 0 ; $i < sizeof($sel) ; $i++) { $backend = &$sel[$i]; $backend->error = ''; $res = $backend->lookup($value, $field); // return an address if one is found // (empty array means lookup concluded // but no result found - in this case, // proceed to next backend) // if (is_array($res)) { if (!empty($res)) return $res; } else { $this->error = $backend->error; return false; } } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLookupField() {}", "public function getAddress();", "public function getAddress();", "function lookup($value, $field=SM_ABOOK_FIELD_NICKNAME) {\n $this->set_error('lookup is not implemented');\n return false;\n }", "public function getAddress() {}", "public function getAccountAddress($account);", "function lookup($prj_id, $field, $value)\n {\n $backend =& self::_getBackend($prj_id);\n return $backend->lookup($field, $value);\n }", "public function get($field);", "public function get($field);", "public function findEntry($path, $country, $field, $value);", "public function getAddress()\n {\n if (array_key_exists(\"address\", $this->_propDict)) {\n return $this->_propDict[\"address\"];\n } else {\n return null;\n }\n }", "public function resolveRouteBinding($value, $field = null)\n {\n $value = $field ?? LuhnAlgorithm::originalId($value);\n return parent::where($field ?? parent::getRouteKeyName(), $value)->first();\n\t}", "function get($field) {\n\t\tif(!is_string($field)) {\n\t\t\ttrigger_error(\"Parameter for model->get() must be a string\", E_USER_WARNING);\n\t\t\treturn null;\n\t\t}\n\n\t\tif (method_exists($this, 'get_'.$field)) {\n\t\t\t$args = func_get_args();\n\t\t\tarray_shift($args);\n\n\t\t\treturn call_user_func_array(array(& $this, 'get_'.$field), $args);\n\t\t}\n\n\t\t$result = $this->find_associated($field);\n\n\t\tif (!is_null($result)) {\n\t\t\treturn $result;\n\t\t}\n\n\t\tif (isset($this->data[$field])) {\n\t\t\treturn $this->data[$field];\n\t\t}\n\n\t}", "public function returnFindByField($field);", "public function getaddress(){\n $address = $this->_run('getaddress');\n return $address;\n }", "function lookup(\n\t\tarray $fields,\n\t\t$criteria=NULL,\n\t\t$mapreduce=NULL,\n\t\t$order=NULL,\n\t\t$limit=NULL,\n\t\t$offset=NULL,\n\t\t$ttl=0) {\n\t\t$query=array(\n\t\t\t'method'=>'find',\n\t\t\t'fields'=>$fields,\n\t\t\t'criteria'=>$criteria,\n\t\t\t'mapreduce'=>$mapreduce,\n\t\t\t'order'=>$order,\n\t\t\t'limit'=>$limit,\n\t\t\t'offset'=>$offset\n\t\t);\n\t\treturn $ttl?$this->cache($query,$ttl):$this->exec($query);\n\t}", "public function getAddress()\n {\n return $this->get('address')->value;\n }", "function dlookup($table_name, $field_name, $where_condition)\n{\n $sql = \"SELECT \" . $field_name . \" FROM \" . $table_name . \" WHERE \" . $where_condition;\n return get_db_value($sql);\n}", "public abstract function FetchField();", "public function findAddressById(int $id);", "public function getLocalAddress()\n {\n return $this->getKey('LocalAddress');\n }", "function fetch_address($addr_id=NULL ) {\n\tglobal $cxn;\n\t// Initialize variables\n\t$addresses=NULL;\n\t\n\t$errArr=init_errArr(__FUNCTION__);\n\ttry\n\t{\n\t\t$where =ZERO_LENGTH_STRING;\n\n\t\t// Set up address id selection\n\t\tif ($addr_id != NULL) {\n\t\t\t$where = $where . \" addr_id = \" . $addr_id;\n\t\t}\n\t\t\n\t\tif (trim($where) !== ZERO_LENGTH_STRING) {\n\t\t\t$where = \" WHERE \" . $where;\n\t\t}\n\n\t\t// SQL String\n\t\t$sqlString =\n\t\t \"SELECT *\n\t\t FROM address \" \n\t\t\t\t. $where . \n\t\t\t\t\" ORDER BY addr_id\"; \n\n\t\t// Bind variables\n\t\t$stmt = $cxn->prepare($sqlString);\n\t\t$stmt->execute();\n\t\t// Store result\n\t\t/* Bind results to variables */\n\t\tbind_array($stmt, $row);\n\t\twhile ($stmt->fetch()) {\n\t\t\t$addresses[]=cvt_to_key_values($row);\n\t\t}\n\t}\n\tcatch (mysqli_sql_exception\t$err)\n\t{\n\t\t// Error settings\n\t\t$err_code=1;\n\t\t$err_descr=\"Error selecting address id: \" . $addr_id;\n\t}\n\t// Return Error code\n\t$errArr[ERR_AFFECTED_ROWS] = $cxn->affected_rows;\n\t$errArr[ERR_SQLSTATE] = $cxn->sqlstate;\n\t$errArr[ERR_SQLSTATE_MSG] = $cxn->error;\n\treturn array($errArr, $addresses);\n}", "function address() { return ($this->address); }", "public function getStreet();", "function getServiceAddress();", "public function get_lookup(/* ... */)\n {\n return sprintf(\n \"`%s` ILIKE %s\",\n $this->_field->get_db_field_name(),\n $this->_key\n );\n }", "function qa_get($field)\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\treturn isset($_GET[$field]) ? qa_gpc_to_string($_GET[$field]) : null;\n}", "abstract public function queryFromLocalProvider(Geocoder $geocoder, Repository $cache): ?Location;", "protected function findField($field) {\n if ($field == 'union_name') {\n $field = 'organization_name';\n }\n #converts phone field so it's found in union's telecommunication_number\n if ($field == 'union_phone_no') {\n $field = 'contact_number';\n }\n return parent::findField($field);\n }", "function getAddress($single){\n\t\t\t$list = $this -> makeRequest('GET', '/list', array(\n\t\t\t\t'password'=>$_SESSION['walletpass'],\n\t\t\t\t'confirmations'=>4\n\t\t\t\t));\n\n\t\t\tif($single){\n\t\t\t\treturn $list['addresses'][0]['address'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $list['addresses'];\n\t\t\t}\n\t\t}" ]
[ "0.6823678", "0.60475993", "0.60475993", "0.59983766", "0.59903514", "0.5920685", "0.5888174", "0.57178724", "0.57178724", "0.5696483", "0.56554407", "0.5655378", "0.5624281", "0.5603643", "0.5521493", "0.5503499", "0.54518676", "0.5447387", "0.53869617", "0.53849655", "0.53748006", "0.5366214", "0.5365376", "0.53231823", "0.53062767", "0.52961445", "0.52822524", "0.5271053", "0.5259569", "0.5241254" ]
0.6715611
1
Creates full name from given name and surname Handles name order differences. Function always runs in SquirrelMail gettext domain. Plugins don't have to switch domains before calling this function.
function fullname($firstname,$lastname) { // i18n: allows to control fullname layout in address book listing // first %s is for first name, second %s is for last name. // Translate it to '%2$s %1$s', if surname must be displayed first in your language. // Please note that variables can be set to empty string and extra formating // (for example '%2$s, %1$s' as in 'Smith, John') might break. Use it only for // setting name and surname order. scripts will remove all prepended and appended // whitespace. return trim(sprintf(dgettext('squirrelmail',"%s %s"),$firstname,$lastname)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _create_proper_name_field() {\r\n global $locale;\r\n $full_name = $locale->getLocaleFormattedName($this->first_name, $this->last_name, $this->salutation);\r\n $this->name = $full_name;\r\n $this->full_name = $full_name; \r\n\r\n\t}", "private function make_full_name() {\n return $this->firstname . \" \" . $this->infix . \" \" . $this->lastname;\n }", "function submitted_events_strip_surname($name) {\n\t$parts = explode ( ' ', $name );\n\tif (sizeof ( $parts ) > 1) {\n\t\treturn $parts [0] . ' ' . substr ( $parts [1], 0, 1 );\n\t} else {\n\t\treturn $name;\n\t}\n}", "function change_name_placeholder( $translated, $text, $context, $domain ) {\n\n\tif ( 'fl-builder' == $domain && 'Name' == $text && 'First and last name.' == $context ) {\n\t\t\t$translated = 'First Name';\n\t}\n\n\treturn $translated;\n\n}", "public static function parse_name($full_name) {\n # Remove leading/trailing whitespace\n $full_name = trim($full_name);\n # Setup default vars\n extract(array('salutation' => '', 'fname' => '', 'initials' => '', 'lname' => '', 'suffix' => ''));\n # If name contains professional suffix, assign and remove it\n $professional_suffix = self::get_pro_suffix($full_name);\n if ($professional_suffix) {\n # Remove the suffix from full name\n $full_name = str_replace($professional_suffix, '', $full_name);\n # Remove the preceeding comma and space(s) from suffix\n $professional_suffix = preg_replace(\"/, */\", '', $professional_suffix);\n # Normalize the case of suffix if found in dictionary\n foreach (self::$dict['suffixes']['prof'] as $prosuffix) {\n if (strtolower($prosuffix) === strtolower($professional_suffix)) {\n $professional_suffix = $prosuffix;\n }\n }\n }\n # Deal with nickname, push to array\n $has_nick = self::get_nickname($full_name);\n if ($has_nick) {\n # Remove wrapper chars from around nickname\n $name['nickname'] = substr($has_nick, 1, (strlen($has_nick) - 2));\n # Remove the nickname from the full name\n $full_name = str_replace($has_nick, '', $full_name);\n # Get rid of consecutive spaces left by the removal\n $full_name = str_replace(' ', ' ', $full_name);\n }\n # Grab a list of words from name\n $unfiltered_name_parts = self::break_words($full_name);\n # Is first word a title or multiple titles consecutively?\n while ($s = self::is_salutation($unfiltered_name_parts[0])) {\n $salutation .= \"$s \";\n array_shift($unfiltered_name_parts);\n }\n $salutation = trim($salutation);\n # Is last word a suffix or multiple suffixes consecutively?\n while ($s = self::is_suffix($unfiltered_name_parts[count($unfiltered_name_parts)-1], $full_name)) {\n $suffix .= \"$s \";\n array_pop($unfiltered_name_parts);\n }\n $suffix = trim($suffix);\n # If suffix and professional suffix not empty, add comma\n if (!empty($professional_suffix) && !empty($suffix)) {\n $suffix .= ', ';\n }\n # Concat professional suffix to suffix\n $suffix .= $professional_suffix;\n # set the ending range after prefix/suffix trim\n $end = count($unfiltered_name_parts);\n # concat the first name\n for ($i=0; $i<$end-1; $i++) {\n $word = $unfiltered_name_parts[$i];\n # move on to parsing the last name if we find an indicator of a compound last name (Von, Van, etc)\n # we use $i != 0 to allow for rare cases where an indicator is actually the first name (like \"Von Fabella\")\n if (self::is_compound($word) && $i != 0) {\n break;\n }\n # is it a middle initial or part of their first name?\n # if we start off with an initial, we'll call it the first name\n if (self::is_initial($word)) {\n # is the initial the first word?\n if ($i == 0) {\n # if so, do a look-ahead to see if they go by their middle name\n # for ex: \"R. Jason Smith\" => \"Jason Smith\" & \"R.\" is stored as an initial\n # but \"R. J. Smith\" => \"R. Smith\" and \"J.\" is stored as an initial\n if (self::is_initial($unfiltered_name_parts[$i+1])) {\n $fname .= \" \".strtoupper($word);\n }\n else {\n $initials .= \" \".strtoupper($word);\n }\n }\n # otherwise, just go ahead and save the initial\n else {\n $initials .= \" \".strtoupper($word);\n }\n }\n else {\n $fname .= \" \".self::fix_case($word);\n }\n }\n # check that we have more than 1 word in our string\n if ($end-0 > 1) {\n # concat the last name\n for ($i; $i < $end; $i++) {\n $lname .= \" \".self::fix_case($unfiltered_name_parts[$i]);\n }\n }\n else {\n # otherwise, single word strings are assumed to be first names\n $fname = self::fix_case($unfiltered_name_parts[$i]);\n }\n # return the various parts in an array\n $name['salutation'] = $salutation;\n $name['fname'] = trim($fname);\n $name['initials'] = trim($initials);\n $name['lname'] = trim($lname);\n $name['suffix'] = $suffix;\n return $name;\n }", "function tep_get_fullname($firstname, $lastname) {\n global $language;\n $separator = ' ';\n return ($language == 'japanese')\n ? ($lastname.$separator.$firstname)\n : ($firstname.$separator.$lastname);\n}", "private function updateName()\n {\n if (!LOCAL) {\n $ds = ldap_connect(\"addressbook.ic.ac.uk\");\n $r = ldap_bind($ds);\n $justthese = array(\"displayname\");\n $sr = ldap_search(\n $ds,\n \"ou=People,ou=shibboleth,dc=ic,dc=ac,dc=uk\",\n \"uid=\".$this->getUser(),\n $justthese\n );\n $info = ldap_get_entries($ds, $sr);\n if ($info[\"count\"] > 0) {\n $this->setName($info[0]['displayname'][0]);\n return ($info[0]['displayname'][0]);\n } else {\n return false;\n }\n } else {\n $name = $this->getName();\n return $name;\n }\n }", "public function requestSurname();", "public function getSurname ();", "function email_fullname($user, $override=false) {\n\n\t// Drop all semicolon apears. (Js errors when select contacts)\n\treturn str_replace(',', '', fullname($user, $override));\n}", "private function calculateSurname()\n {\n $surname = $this->cleanString($this->subject->getSurname());\n $consonants = str_replace($this->vowels, '', strtoupper($surname));\n if (strlen($consonants) > 2) {\n $result = substr($consonants, 0, 3);\n } else {\n $result = $this->calculateSmallString($consonants, $surname);\n }\n\n return $result;\n }", "function flipName($name){\r\n\r\n $initPattern = '/^(\\p{Lu}\\p{M}*)[.]/u';\t\t\t\t\t\t\t\t// Pattern for initial\r\n\t\t$altPattern = '/(Jr[.]*|Sr[.]*|III[.]*)/u';\t\t\t\t\t// Pattern for Jr, Sr, III\r\n\t\t\t\r\n\t\t$initials = '';\r\n\t\t$lastname = '';\r\n\t\t$alt = '';\r\n\r\n\t\t// remove Jr, Sr, and III to place at end of name\r\n\t\tif (preg_match($altPattern, $name, $matches) == 1) {\r\n\t\t\t$alt = $matches[0];\r\n\t\t\t$name = trim(preg_replace($altPattern, '', $name));\r\n\t\t}\r\n\t\t\r\n\t\t// build string of initials\r\n\t\twhile (preg_match($initPattern, $name, $matches) == 1) {\r\n\t\t\t$initials = $initials.$matches[0].' ';\r\n\t\t\t$name = trim(preg_replace($initPattern, '', $name));\r\n\t\t}\r\n\r\n\t\t$lastname = trim(preg_replace('/[,]|[.]/u', '', $name)); \t// remove comma, period, and space from last name\r\n\r\n\t\treturn $lastname.', '.$initials.$alt.', ';\r\n\t}", "function DisplayName( $first_name, $last_name, $middle_name = '', $name_suffix = '' )\n{\n\t$display_name = Config( 'DISPLAY_NAME' );\n\n\t// Values are not SQL formatted.\n\t$display_names = array(\n\t\t\"FIRST_NAME||' '||LAST_NAME\" => \"FIRST_NAME LAST_NAME\",\n\t\t\"FIRST_NAME||' '||LAST_NAME||coalesce(' '||NAME_SUFFIX,' ')\" => \"FIRST_NAME LAST_NAME NAME_SUFFIX\",\n\t\t\"FIRST_NAME||coalesce(' '||MIDDLE_NAME||' ',' ')||LAST_NAME\" => \"FIRST_NAME MIDDLE_NAME LAST_NAME\",\n\t\t\"FIRST_NAME||', '||LAST_NAME||coalesce(' '||MIDDLE_NAME,' ')\" => \"FIRST_NAME, LAST_NAME MIDDLE_NAME\",\n\t\t\"LAST_NAME||' '||FIRST_NAME\" => \"LAST_NAME FIRST_NAME\",\n\t\t\"LAST_NAME||', '||FIRST_NAME\" => \"LAST_NAME, FIRST_NAME\",\n\t\t\"LAST_NAME||', '||FIRST_NAME||' '||COALESCE(MIDDLE_NAME,' ')\" => \"LAST_NAME, FIRST_NAME MIDDLE_NAME\",\n\t\t\"LAST_NAME||coalesce(' '||MIDDLE_NAME||' ',' ')||FIRST_NAME\" => \"LAST_NAME MIDDLE_NAME FIRST_NAME\",\n\t);\n\n\t$display_name = isset( $display_names[ $display_name ] ) ?\n\t\t$display_names[ $display_name ] :\n\t\t$display_names[\"FIRST_NAME||' '||LAST_NAME\"];\n\n\t$display_name = str_replace(\n\t\tarray( 'FIRST_NAME', 'LAST_NAME', 'MIDDLE_NAME', 'NAME_SUFFIX' ),\n\t\tarray( $first_name, $last_name, $middle_name, $name_suffix ),\n\t\t$display_name\n\t);\n\n\treturn $display_name;\n}", "function formatName(array $name)\r\n {\r\n return $name['last_name'] . ' ' . preg_replace('/\\b([A-Z]).*?(?:\\s|$)+/','$1',$name['first_name']);\r\n }", "public function getFullname() {\n $fullname = sprintf(\n '%s %s',\n $this->getFirstname(),\n $this->getLastname()\n );\n\n return trim($fullname);\n }", "function handle_sanitise_name($name, $is_surname) {\n $array_names = array_map(function ($item_name) use ($is_surname) {\n //Remove whitespace character from every item inside exploded name array\n if ($is_surname) {\n return remove_whitespace_characters(handle_capitalise_surname($item_name));\n } else {\n return remove_whitespace_characters(ucfirst(strtolower($item_name)));\n }\n }, explode(\" \", trim($name)));\n return implode(\" \", array_filter($array_names, function ($item_name) {\n //Combine all entries from exploded name array if string length is greater than zero\n return strlen($item_name) > 0;\n }));\n}", "function nameAndSurname() {\n return $this->NAME . ' ' . $this->SURNAME;\n }", "function fix_names($firstName, $lastName) {\n\t$n[0] = ucfirst(strtolower($firstName));\n\t$n[1] = ucfirst(strtolower($lastName));\n\treturn $n;\n}", "public function getFullName()\n {\n if (! $this->_getVar('user_name')) {\n $name = ltrim($this->_getVar('user_first_name') . ' ') .\n ltrim($this->_getVar('user_surname_prefix') . ' ') .\n $this->_getVar('user_last_name');\n\n if (! $name) {\n // Use obfuscated login name\n $name = $this->getLoginName();\n $name = substr($name, 0, 3) . str_repeat('*', max(5, strlen($name) - 2));\n }\n\n $this->_setVar('user_name', $name);\n\n // \\MUtil_Echo::track($name);\n }\n\n return $this->_getVar('user_name');\n }", "public function getFullname()\n {\n $fullname = trim($this->getName().' '.$this->getLastName());\n return (!$fullname) ? $this->getEmail() : $fullname;\n }", "public function capitalizePersonalName()\n {\n $stringy = $this->collapseWhitespace();\n $stringy->str = $this->capitalizePersonalNameByDelimiter($stringy->str, ' ');\n $stringy->str = $this->capitalizePersonalNameByDelimiter($stringy->str, '-');\n return $stringy;\n }", "function formatFullName($fname, $lname)\n{\n\t$fnameLastChar \t= substr($fname, -1, 1);\t// get last character of first name\n\t$lnameFirstChar = substr($lname, 1, 1);\t\t// get first character of last name\n\tif($fnameLastChar == ' ') \t{ $fnameLength = strlen($fname); $fname = substr($fname, 0, $fnameLength - 1); }\n\tif($lnameFirstChar == ' ') \t{ $lnameLength = strlen($lname); $lname = substr($lname, 1, $fnameLength - 1); }\n\t$fullName = $fname.' '.$lname;\n\treturn ($fullName);\n}", "public function getLastname() {}", "protected function _getRealName()\n {\n return $this->first_name . ' ' . $this->last_name;\n }", "function concatenationV2 ($lastname, $firstname){\n\n\n return strtoupper($lastname) . \" \" .strtolower ($firstname);\n}", "function normaliseNames($names) { //{{{\n $normalised = array();\n $maxNames = 3;\n \n $n = 0;\n foreach ($names as $i => $name) {\n // skip names after third\n if (++ $n > $maxNames) {\n continue;\n }\n \n // split name into surname and forenames and split up forenames\n list ($surname, $forenames) = explode(', ', $name, 2);\n $forenames = explode(' ', $forenames);\n $fullname = '';\n \n // check that first letter of forename is uppercase\n foreach ($forenames as $fn) {\n $i = substr($fn, 0, 1);\n // add to full name as initial\n if (IntlChar::isupper($i)) {\n $fullname .= sprintf('%s. ', $i);\n }\n }\n \n // add surname and add to normalised\n $fullname .= $surname;\n $normalised[] = $fullname;\n }\n \n // join names\n $presentation = implode(', ', $normalised);\n \n // check whether to add et al\n if ($n > $maxNames) {\n $presentation .= ' et al';\n }\n \n return $presentation;\n}", "function concatNom( $prenom, $nom){\n // Corps de la fonction\n $fullName = ucfirst($prenom) . \" \" . ucfirst($nom);\n \n return $fullName;\n}", "protected function helper_fullname_format() {\n\n $fake = new stdClass();\n $fake->lastname = 'LLLL';\n $fake->firstname = 'FFFF';\n $fullname = get_string('fullnamedisplay', '', $fake);\n if (strpos($fullname, 'LLLL') < strpos($fullname, 'FFFF')) {\n return 'lf';\n } else {\n return 'fl';\n }\n }", "public function getFullname() {\n return $this->getFirstName() . \" \" . $this->getLastName();\n }", "static function format_nfp_name($nfp) {\n $name = '';\n if(!empty($nfp->prefix)) {\n $name .= $nfp->prefix . ' ';\n }\n if(!empty($nfp->first_name)) {\n if(strlen($name)) {\n $name .= ' ';\n }\n $name .= $nfp->first_name;\n }\n if(!empty($nfp->last_name)) {\n if(strlen($name)) {\n $name .= ' ';\n }\n $name .= $nfp->last_name;\n }\n return $name;\n }" ]
[ "0.6792476", "0.67642236", "0.6733792", "0.6679357", "0.6469302", "0.64278567", "0.64149755", "0.6356847", "0.6335316", "0.6272164", "0.625343", "0.62352157", "0.6232916", "0.6157898", "0.61377704", "0.6107968", "0.60989285", "0.60986125", "0.60972905", "0.6046214", "0.6044471", "0.60444516", "0.60377955", "0.6033268", "0.6024862", "0.6008788", "0.6006666", "0.599428", "0.59868765", "0.59572613" ]
0.6990402
0
Returns the singular name without the namespaces
public function singular_name() { $name = explode('\\', parent::singular_name()); return trim(end($name)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function singular()\n {\n return $this->getNameInstance()->singular();\n }", "public function getSingularName()\n {\n return rtrim($this->name, 's');\n }", "public function singular_name()\n {\n $name = explode('\\\\', parent::singular_name());\n return trim(str_replace('User', '', end($name)));\n }", "public function singular() {\n return substr($this->tipoEntidad,strrpos($this->tipoEntidad,'\\\\')+1);\n }", "public function getSingularName();", "public function getSingularName()\n {\n return str_singular(lcfirst(ucwords($this->getClass())));\n }", "public function getSingularName()\n {\n return str_singular(lcfirst(ucwords($this->getClass())));\n }", "public function singular()\n {\n return new Name(Pluralizer::singular($this->name));\n }", "public static function singularLabel()\n {\n return Str::singular(static::label());\n }", "public static function singularLabel()\n {\n return Str::singular(static::label());\n }", "public function getSingularName()\n {\n return $this->singularName;\n }", "public function getSingularName()\n {\n return $this->singularName;\n }", "public function getSingular()\n\t{\n\t\treturn empty($this->singular) ? strtolower($this->getClass()) : $this->singular;\n\t}", "public function singular_name()\n {\n if (_t('Tag.SINGULARNAME')) {\n return _t('Tag.SINGULARNAME');\n } else {\n return parent::singular_name();\n }\n }", "public function singular()\n\t{\n\t\treturn _('Document');\n\t}", "function singularize(){\n\t\treturn $this->_copy(_Inflect::singularize((string)$this));\n\t}", "public static function singularLabel()\n {\n return __('Template');\n }", "public function getModelSingular()\n {\n return strtolower($this->getModelSimpleName());\n }", "abstract protected function singularLabel(): string;", "public static function singularLabel()\n {\n return __('User');\n }", "public function singularClassName($class)\n {\n // get the class name if an object is given\n if (is_object($class)) {\n $class = get_class($class);\n }\n\n // split the class name up by namespaces\n $namespace = explode('\\\\', $class);\n $className = end($namespace);\n\n // convert the class name into the underscore version\n $inflector = Inflector::get();\n\n return $inflector->underscore($className);\n }", "public static function singularLabel()\n {\n return __('Attribute');\n }", "public static function singularLabel()\n {\n return __('Category');\n }", "function str_singular($value)\n\t{\n\t\treturn Illuminate\\Support\\Str::singular($value);\n\t}", "function str_singular($value)\n {\n return Str::singular($value);\n }", "protected function getNameWithoutPrefix() {}", "public function singular(string $value): string\n {\n return $this->inflector->singular($value);\n }", "public function getSingularModelName()\n {\n\n return strtolower(class_basename($this->model));\n }", "public function singularize($word);", "public function singularize($word)\n {\n return \\Doctrine\\Common\\Inflector\\Inflector::singularize($word);\n }" ]
[ "0.81167", "0.80612475", "0.7836643", "0.77798927", "0.7734647", "0.7726174", "0.7726174", "0.7645113", "0.75634617", "0.75634617", "0.7503052", "0.7503052", "0.7433701", "0.71945906", "0.698688", "0.69850636", "0.67728895", "0.67678416", "0.6723544", "0.6718478", "0.6714884", "0.6709852", "0.6705339", "0.6691787", "0.6651652", "0.66130024", "0.6612539", "0.6528654", "0.6527801", "0.64913005" ]
0.8216782
1
Get the available till date if it is set, otherwise get it from the parent Use the event start date as last sale possibility
public function getAvailableTill() { if ($this->AvailableTillDate) { return $this->dbObject('AvailableTillDate'); } elseif ($startDate = $this->getEventStartDate()) { $till = strtotime(self::config()->get('sale_end_threshold'), strtotime($startDate->getValue())); $date = DBDatetime::create(); $date->setValue(date('Y-m-d H:i:s', $till)); return $date; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAvailableFrom()\n {\n if ($this->AvailableFromDate) {\n return $this->dbObject('AvailableFromDate');\n } elseif ($startDate = $this->getEventStartDate()) {\n $lastWeek = new DBDate();\n $lastWeek->setValue(strtotime(self::config()->get('sale_start_threshold'), strtotime($startDate->value)));\n return $lastWeek;\n }\n\n return null;\n }", "function get_event(){\n\t\tglobal $EM_Event;\n\t\tif( is_object($EM_Event) && $EM_Event->event_id == $this->event_id ){\n\t\t\treturn $EM_Event;\n\t\t}else{\n\t\t\tif( is_numeric($this->event_id) && $this->event_id > 0 ){\n\t\t\t\treturn em_get_event($this->event_id, 'event_id');\n\t\t\t}elseif( is_array($this->bookings) ){\n\t\t\t\tforeach($this->bookings as $EM_Booking){\n\t\t\t\t\t/* @var $EM_Booking EM_Booking */\n\t\t\t\t\treturn em_get_event($EM_Booking->event_id, 'event_id');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn em_get_event($this->event_id, 'event_id');\n\t}", "public function getManualDateStart() {}", "public function getNextEvent(){\n\t\t// get the events\n\t\t$events = $this->getEvents();\n\n\t\t// extract the next event that will happen\n\t\t$nextEvent = array_shift($events);\n\t\tfor ($i = 1; $i < sizeof($events); $i++){\n\t\t\t$event = array_shift($events);\n\t\t\tif($events[0]['is_approved'] == 1 && $events[0]['date'] > $nextEvent['date']){\n\t\t\t\t$nextEvent = $event;\n\t\t\t}\n\t\t}\n\n\t\treturn $nextEvent;\n\t}", "public function getBlockdateBook($productid, $date, $to = NULL) {\n $_productid = $productid;\n /**\n * Initalise the '$datesRange'\n */\n $datesRange = array ();\n /**\n * Dealstatus array with\n * 'processing'\n * 'complete'\n */\n $dealstatus = array (\n 'processing',\n 'complete'\n );\n /**\n * Check Whether the date is set\n */\n if ($this->getRequest ()->getParam ( 'date' )) {\n /**\n * DateSplit Value.\n */\n $dateSplit = explode ( \"__\", $this->getRequest ()->getParam ( 'date' ) );\n $x = array (\n $dateSplit [0]\n );\n $year = array (\n $dateSplit [1]\n );\n } else {\n $x = $date;\n $year = $to;\n }\n /**\n * Get the colletion value for 'airhotels_hostorder'\n * 'fromdate'\n * 'todate'\n */\n $range = $this->objectManager->get ( 'Apptha\\Airhotels\\Model\\Hostorder' )->getCollection ()->addFieldToSelect ( array (\n 'fromdate',\n 'todate'\n ) )\n ->addFieldtoFilter ( 'order_status', $dealstatus )\n ->addFieldtoFilter ( 'entity_id', $_productid );\n $rangeCount = $range->getsize ();\n if ($rangeCount > 0) {\n foreach ( $range as $rangeVal ) {\n /**\n * Get Collection value for 'airhotels/product'\n */\n $dateArr = $this->getDaysBlock ( $rangeVal ['fromdate'], $rangeVal ['todate'] );\n /**\n * Itearting the Loop Value.\n */\n foreach ( $dateArr as $dateArrVal ) {\n /**\n * Get Data Array Value.\n */\n $getDateArr = explode ( '-', $dateArrVal );\n if ($getDateArr [0] == $year [0] && $getDateArr [1] == $x [0]) {\n $datesRange [] = $getDateArr [2];\n }\n }\n }\n }\n return $datesRange;\n }", "public function followingEvent()\n {\n return Event::where('starts_at', '>=', $this->ends_at)\n ->where('type', '=', Event::MEETUP)\n ->first();\n }", "public function getLastAttendedAttribute()\n {\n $last = $this->events()->first();\n if ($last) {\n return $last->end_date;\n }\n }", "private function getEventStartDate()\n {\n $startDate = $this->TicketPage()->getEventStartDate();\n $this->extend('updateEventStartDate', $startDate);\n return $startDate;\n }", "function agenda_get_item($event_id)\n{\n\t$tbl = get_conf('mainTblPrefix') . 'event AS event INNER JOIN ' \n\t\t. get_conf('mainTblPrefix') . 'rel_event_recipient AS rel_event_recipient' \n\t\t. ' ON event.id = rel_event_recipient.event_id';\n\n $sql = \"SELECT \tevent.id \t\t\t\t\t\tAS id,\n\t\t\t\t\tevent.title \t\t\t\t\tAS title,\n\t\t\t\t\tevent.description \t\t\t\tAS description,\n\t\t\t\t\tevent.start_date \t\t\t\tAS old_start_date,\n\t\t\t\t\tevent.end_date \t\t\t\t\tAS old_end_date,\n\t\t\t\t\tevent.author_id \t\t\t\tAS author_id,\n\t\t\t\t\trel_event_recipient.visibility \tAS visibility,\n\t\t\t\t\tevent.master_event_id\t\t \tAS master_event_id,\n\t\t\t\t\trel_event_recipient.user_id\t\tAS user_id,\n\t\t\t\t\trel_event_recipient.group_id\tAS group_id\n FROM \" . $tbl . \"\n\n WHERE event.id = \" . (int) $event_id ;\n\n $event = claro_sql_query_get_single_row($sql);\n\n if ($event) return $event;\n else return claro_failure::set_failure('EVENT_ENTRY_UNKNOW');\n\n}", "public function getEarliestDate();", "function ppt_resources_get_next_planned_orders($data)\n{\n global $user;\n $months = array(\n \"01\" => 'December',\n \"02\" => 'January',\n \"03\" => 'February',\n \"04\" => 'March',\n \"05\" => 'April',\n \"06\" => 'May',\n \"07\" => 'June',\n \"08\" => 'July',\n \"09\" => 'August',\n \"10\" => 'September',\n \"11\" => 'October',\n \"12\" => 'November',\n );\n\n if (!isset($data['year'])) {\n return services_error('Year is not defined!', 500);\n }\n\n if (empty($data['accounts'])) {\n return services_error('Accounts is not defined!', 500);\n }\n\n if (empty($data['products'])) {\n return services_error('Products is not defined!', 500);\n }\n\n $year = $data['year'];\n $accounts = $data['accounts'];\n $products = $data['products'];\n $dates = get_year_dates($year);\n $start_date = $dates['start_date'];\n $end_date = $dates['end_date'];\n\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', 'node')\n ->entityCondition('bundle', 'planned_order')\n ->fieldCondition('field_planned_account', 'target_id', $accounts, 'IN')\n ->fieldCondition('field_planned_product', 'target_id', $products, 'IN')\n ->fieldCondition('field_planned_period', 'value', $start_date, '>=')\n ->fieldCondition('field_planned_period', 'value', $end_date, '<=')\n ->addMetaData('account', user_load(1));\n\n $records = $query->execute();\n $final_arr = [];\n\n if (isset($records['node'])) {\n $nodes_ids = array_keys($records['node']);\n $nodes = node_load_multiple($nodes_ids);\n\n foreach ($nodes as $node) {\n // Get node planned product name.\n $planned_product_tid = $node->field_planned_product['und'][0]['target_id'];\n $planned_product = taxonomy_term_load($planned_product_tid);\n $planned_product_name = $planned_product->name;\n\n // Get node date for product (planned).\n if (isset($node->field_planned_period['und'])) {\n $node_date = $node->field_planned_period['und'][0]['value'];\n $planned_month = date(\"F\", strtotime($node_date));\n }\n\n // Get node values for planned quantity.\n $planned_quantity = 0;\n if (isset($node->field_planned_quantity['und'])) {\n $planned_quantity = $node->field_planned_quantity['und'][0]['value'];\n }\n\n // If product already exists, update its values for node months.\n if (isset($final_arr['planned'][$planned_product_name])) {\n if (isset($final_arr['planned'][$planned_product_name][$planned_month])) {\n $final_arr['planned'][$planned_product_name][$planned_month][0] += (int) $planned_quantity;\n } else {\n $final_arr['planned'][$planned_product_name][$planned_month][0] = [(int) $planned_quantity];\n }\n } else {\n // Initialze product array with 0 for all months, then update it with current node data.\n $final_arr['planned'][$planned_product_name] = [];\n for ($i = 1; $i <= 12; $i++) {\n $month = $months[sprintf('%02d', $i)];\n $final_arr['planned'][$planned_product_name][$month] = [0];\n }\n $final_arr['planned'][$planned_product_name][$planned_month] = [(int) $planned_quantity];\n }\n }\n }\n return $final_arr;\n}", "public function getEventEndDate() {\n\t\treturn ($this->eventEndDate);\n\t}", "private function checkEventDateNotDue(){\n $event = Event::find($this->id);\n $now = Carbon::now();\n \n $startTime = Carbon::createFromFormat('Y-m-d H:i:s', $event->start_time);\n return $startTime->gt($now);\n }", "protected function _getRecurEvent()\n {\n return new Calendar_Model_Event(array(\n 'summary' => 'Breakfast',\n 'dtstart' => '2010-05-20 06:00:00',\n 'dtend' => '2010-05-20 06:15:00',\n 'description' => 'Breakfast',\n 'rrule' => 'FREQ=DAILY;INTERVAL=1', \n 'container_id' => $this->_testCalendar->getId(),\n Tinebase_Model_Grants::GRANT_EDIT => true,\n ));\n }", "protected function _getRecurEvent()\n {\n return new Calendar_Model_Event(array(\n 'summary' => 'Breakfast',\n 'dtstart' => '2010-05-20 06:00:00',\n 'dtend' => '2010-05-20 06:15:00',\n 'description' => 'Breakfast',\n 'rrule' => 'FREQ=DAILY;INTERVAL=1', \n 'container_id' => $this->_testCalendar->getId(),\n Tinebase_Model_Grants::GRANT_EDIT => true,\n ));\n }", "public function getManualDateStop() {}", "private function getStartDate($root) {\n\t\t$block = $this->getDatePriceBlock($root);\n\n\t\t$date = $block[0]->text();\n\t\t$pos = strpos($date, \"available\");\n\t\tif ($pos !== false) {\n\t\t\t// remove everything before 'available' including 'available'\n\t\t\t$date = substr($date, $pos + strlen(\"available\"));\n\t\t}\n\t\t\n\t\t$retVal = $this->formatDate(trim($date));\n\t\treturn $retVal;\n\t}", "public function getEndDate();", "public function getEndDate();", "function get_date_of_previous_invoice() {\n\t\tforeach ($this->get_calendar_events(time()-(86400 * 90), time()) as $event) {\n\t\t\tif (preg_match($this->config['calendar_entry'], $event->title->text, $m)) {\n\t\t\t\tforeach ($event->when as $when) {\n\t\t\t\t\treturn substr($when->startTime,0,10);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdie(\"Unable to find a previous invoice entry in the calendar.\\n\");\n\t}", "public function getdefaultPlannedEndDate()\n {\n return $this->defaultplannedenddate;\n }", "public function getLeavesRight($isQuantityToCalculate=false, $forActualPeriod=true) {\r\n $leavesRight['quantity']=null;\r\n $leavesRight['left']=null;\r\n $leavesRight['startDate']=null;\r\n $leavesRight['endDate']=null;\r\n \r\n $contract=null;\r\n $right = getActualLeaveContractualValues($this->idEmployee, $this->idLeaveType, $contract);\r\n if ($contract==null) {\r\n return $leavesRight;\r\n }\r\n $customQuantity = getActualLeaveConstractCustomQuantity($this->idLeaveType, $contract, $this->idEmployee);\r\n $contractStartDateString = $contract->startDate;\r\n if ($contract->endDate!=null) {\r\n $endDate=new DateTime($contract->endDate);\r\n } else {\r\n $endDate = null;\r\n }\r\n\r\n if ($right!=null) {\r\n if ($right->periodDuration and trim($right->periodDuration)!=\"\") {\r\n if (!$right->earnedPeriod or trim($right->earnedPeriod)==\"\") {\r\n $right->earnedPeriod = $right->periodDuration; \r\n } \r\n }\r\n $currentDate = new DateTime();\r\n if ($forActualPeriod) { // For actual period\r\n $currentDateString = $currentDate->format(\"Y-m-d\");\r\n $year = $currentDate->format(\"Y\");\r\n } else { // For next period\r\n // Contract is ended and end contract date < current Date => No quantity earned\r\n if ($contract->endDate!=null and $endDate < $currentDate) { \r\n return $leavesRight; \r\n }\r\n \r\n if ($right->periodDuration and trim($right->periodDuration)!=\"\") {\r\n // For earned period < period duration => No quantity earned\r\n if ($right->earnedPeriod < $right->periodDuration) {\r\n return $leavesRight;\r\n }\r\n // Year is the current year + period duration, if not null\r\n $currentDate = new DateTime();\r\n $currentDate->add(new DateInterval('P'.$right->periodDuration.'M'));\r\n $currentDateString = $currentDate->format(\"Y-m-d\");\r\n $year = $currentDate->format(\"Y\");\r\n } else {\r\n return $leavesRight;\r\n } \r\n // If fact, it's like contract start date is the current date\r\n $beginDate = new DateTime();\r\n $beginDateString = $beginDate->format(\"Y-m-d\");\r\n if ($contractStartDateString < $beginDateString) {\r\n $contractStartDateString = $beginDateString;\r\n }\r\n }\r\n if ($right->startDayPeriod and trim($right->startDayPeriod)!=\"\") {\r\n $day = ($right->startDayPeriod>9?$right->startDayPeriod:\"0\".$right->startDayPeriod); \r\n } else {\r\n $day=\"01\";\r\n }\r\n if ($right->startMonthPeriod and trim($right->startMonthPeriod)!=\"\") {\r\n $month = ($right->startMonthPeriod>9?$right->startMonthPeriod:\"0\".$right->startMonthPeriod);\r\n $startDate = new DateTime($year.\"-\".$month.\"-\".$day);\r\n $leavesRight['startDate'] = $startDate->format(\"Y-m-d\");\r\n } else {\r\n $month = $currentDate->format(\"m\");\r\n $startDate = new DateTime($year.\"-\".$month.\"-\".$day);\r\n }\r\n if ($right->periodDuration and trim($right->periodDuration)!=\"\" and $endDate==null) {\r\n $endDate = clone $startDate;\r\n $endDate->add(new DateInterval('P'.$right->periodDuration.'M'));\r\n $endDate->sub(new DateInterval(\"P1D\"));\r\n $leavesRight['endDate'] = $endDate->format(\"Y-m-d\");\r\n }\r\n \r\n // No endDate => Quantity is infinite\r\n if ($endDate==null) {\r\n if ($contract->endDate!=null) {\r\n $contractEndDateString = $contract->endDate->format(\"Y-m-d\");\r\n // If contract has endDate < currentDate => no right\r\n if ($contractEndDateString < $currentDateString) {\r\n $leavesRight['quantity']=0+$customQuantity;\r\n $leavesRight['left']=0+$customQuantity;\r\n $leavesRight['startDate']=$startDate->format(\"Y-m-d\");\r\n $leavesRight['endDate']=$endDate->format(\"Y-m-d\");\r\n return $leavesRight;\r\n } else { // endate = contract end Date\r\n $endDate = clone $contract->endDate;\r\n }\r\n } else {\r\n if ($right->quantity==0) {\r\n $leavesRight['quantity']=0;\r\n }\r\n return $leavesRight;\r\n } \r\n } else {\r\n if ($contract->endDate !=null and $contract->endDate < $currentDate) {\r\n $leavesRight['endDate'] = $contract->endDate;\r\n }\r\n }\r\n // No calculation => Quantity and left are stored values\r\n if (!$isQuantityToCalculate) {\r\n $leavesRight['quantity']=($customQuantity==0?$right->quantity:($right->quantity==null?$customQuantity:$right->quantity+$customQuantity)); \r\n $leavesRight['left']=$leavesRight['quantity'];\r\n return $leavesRight;\r\n }\r\n \r\n $contractStartDate= new DateTime($contractStartDateString);\r\n $periodDuration = $right->periodDuration; \r\n $quantity = $right->quantity;\r\n $earnedPeriod = $right->earnedPeriod;\r\n // Start and End Date for calculation\r\n if ($earnedPeriod<$periodDuration) {\r\n $calcStartDate = clone $startDate;\r\n $calcStartDateString = $calcStartDate->format(\"Y-m-d\");\r\n if ($calcStartDateString<$contractStartDateString) {\r\n $calcStartDate = clone $contractStartDate;\r\n $calcStartDateString = $contractStartDateString; \r\n }\r\n\r\n $calcEndDate = new DateTime();\r\n $calcEndDateString = $calcEndDate->format(\"Y-m-t\");\r\n $calcEndDate = new DateTime($calcEndDateString); \r\n $calcEndDate->sub(new DateInterval(\"P\".$earnedPeriod.\"M\"));\r\n $calcEndDateString = $calcEndDate->format(\"Y-m-d\");\r\n if ($calcEndDateString<$calcStartDateString) {\r\n $calcEndDate = clone $calcStartDate;\r\n $calcEndDateString = $calcStartDateString;\r\n }\r\n \r\n } else {\r\n $calcStartDate = clone $contractStartDate;\r\n $calcStartDateString = $contractStartDateString;\r\n\r\n $calcEndDate = clone $endDate;\r\n $calcEndDate->sub(new DateInterval('P'.$earnedPeriod.'M'));\r\n $calcEndDateString = $calcEndDate->format(\"Y-m-d\");\r\n }\r\n // StartDate of activ Employment Contract is greater that endDate of calculation\r\n // => Quantity and Left = 0\r\n if ($contractStartDateString >= $calcEndDateString) {\r\n $leavesRight['quantity']=0+$customQuantity; \r\n $leavesRight['left']=$leavesRight['quantity'];\r\n return $leavesRight;\r\n }\r\n \r\n // Calculate difference in month between calcEndDate and contract start date\r\n $diff = $calcEndDate->diff($calcStartDate);\r\n $diffMonths = ($diff->format('%y') * 12) + $diff->format('%m')+1;\r\n // Must have integer quotity or not\r\n if ($right->isIntegerQuotity) {\r\n $quotityDays=0;\r\n $quotity = round($quantity/$periodDuration,0);\r\n } else {\r\n $quotityDays = abs($contractStartDate->format(\"d\") - $startDate->format(\"d\"))/30;\r\n $quotity = $quantity/$periodDuration;\r\n }\r\n \r\n $earned = (float) ($quotity*$diffMonths) - $quotityDays;\r\n $earnedRounded = round($earned,1);\r\n $mod = (fmod($earnedRounded,0.5)>=0.5?0.5:0);\r\n if ($diffMonths>$periodDuration) {\r\n $theQuantity = $quantity;\r\n } else {\r\n $theQuantity = min($quantity,round($earnedRounded,0)-$mod);\r\n }\r\n if ($forActualPeriod) {\r\n $leavesRight['quantity'] = $theQuantity+$customQuantity;\r\n } else {\r\n $leavesRight['quantity'] = max(0,$right->quantity - $theQuantity)+$customQuantity;\r\n }\r\n // Left is initialized with old left + different between old quantity and calculated quantity\r\n if ($theQuantity>0) {\r\n $diffQuantity = $theQuantity - $this->quantity;\r\n $left = $this->leftQuantity + $diffQuantity + $customQuantity;\r\n if ($left<0) {\r\n $leavesRight['left']=0;\r\n } else {\r\n $leavesRight['left']=min($leavesRight['quantity'],$left);\r\n }\r\n } else {\r\n $leavesRight['left']=0;\r\n }\r\n }\r\n return $leavesRight;\r\n }", "function getStartDate($courseid,$parent,$lessonid) {\r\n\tglobal $config,$start;\r\n\r\n\t// หาวันเปิดเรียนของ $scheduleid\r\n\t$sql = \"SELECT LessonID, Length, LessonParentID FROM $config[tablelesson]\";\r\n\t$sql .= \" WHERE CourseID='$courseid' AND LessonParentID='$parent' ORDER BY LessonParentID,Ordering\";\r\n\r\n\t$result=db_select($sql);\r\n\tfor($i=0;list($id,$length,$parent) = mysql_fetch_row($result);$i++) {\r\n\t\tif ($id != $lessonid) {\r\n\t\t\t$start=dateAdd($start,$length+1);\r\n\t\t\tif (getStartDate($courseid,$id,$lessonid) == false) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n}", "public function getEventStartDate() {\n\t\treturn ($this->eventStartDate);\n\t}", "protected function getLeaveAssignDateLimit() {\n // If no leave period, don't allow apply/assign beyond next calender year\n $todayNextYear = new DateTime();\n $todayNextYear->add(new DateInterval('P1Y'));\n \n if ($this->getConfigService()->isLeavePeriodDefined()) {\n $period = $this->getLeavePeriodService()->getCurrentLeavePeriodByDate($todayNextYear->format('Y-m-d'));\n $maxDate = $period[1];\n } else {\n $nextYear = $todayNextYear->format('Y');\n $maxDate = $nextYear . '-12-31';\n } \n \n return $maxDate;\n }", "public function extendedRequiredFieldsCheckEmbargoDates($data = null) {\n\t\tif(!$this->getIsWorkflowInEffect() || !isset($data['PublishOnDateOwner'])) {\n\t\t\treturn self::$extendedMethodReturn;\n\t\t}\n\t\t$desiredEmbargo = strtotime($data['DesiredPublishDate']);\n\t\t$scheduledEmbargo = strtotime($data['PublishOnDateOwner']);\n\t\t$desiredExpiry = strtotime($data['DesiredUnPublishDate']);\n\t\t$msg = '';\n\t\tif(strlen($data['DesiredPublishDate']) && $scheduledEmbargo > time()) {\n\t\t\t$scheduledEmbargo = $this->getUserDate($data['PublishOnDateOwner']);\n\t\t\t$msg = _t(\n\t\t\t\t'WorkflowEmbargoExpiryExtension.EMBARGO_ERROR_PT1',\n\t\t\t\t\"This content is already under embargo, expiring at: \")\n\t\t\t\t.$scheduledEmbargo.\n\t\t\t\t_t(\n\t\t\t\t\t'WorkflowEmbargoExpiryExtension.EMBARGO_ERROR_PT2',\n\t\t\t\t\t' please wait until this date has passed, before applying a new embargo date.'\n\t\t\t);\n\t\t\tself::$extendedMethodReturn['fieldName'] = 'DesiredPublishDate';\n\t\t}\n\t\tif(strlen($data['DesiredPublishDate']) && $desiredEmbargo < time()) {\n\t\t\t$msg = _t(\n\t\t\t\t'EMBARGO_DSIRD_ERROR',\n\t\t\t\t\"This date has already passed, please enter a valid future date.\"\n\t\t\t);\n\t\t\tself::$extendedMethodReturn['fieldName'] = 'DesiredPublishDate';\n\t\t}\n\t\tif(strlen($data['DesiredUnPublishDate']) && $desiredExpiry < time()) {\n\t\t\t$msg = _t(\n\t\t\t\t'EMBARGO_DSIRD_ERROR',\n\t\t\t\t\"This date has already passed, please enter a valid future date.\"\n\t\t\t);\n\t\t\tself::$extendedMethodReturn['fieldName'] = 'DesiredUnPublishDate';\n\t\t}\n\t\tif(strlen($msg)>0) {\n\t\t\tself::$extendedMethodReturn['fieldValid'] = false;\n\t\t\tself::$extendedMethodReturn['fieldMsg'] = $msg;\n\t\t}\n\t\treturn self::$extendedMethodReturn;\n\t}", "function get_acquisition_value(){\n\n $from_date = $_REQUEST['from_date'];\n $to_date = $_REQUEST['to_date'];\n\n $obj = new vintage_has_acquire();\n //$columns = \"DATE_FORMAT(acquire_date,'%b') as Month\";\n $columns = \"DATE_FORMAT(tblAcquire.acquire_date,'%b') as month, sum(trelVintageHasAcquire.total_price) as total\";\n //$group = \" trelVintageHasAcquire.acquire_id \";\n $group = \" Month \";\n $where = \" tblAcquire.acquire_date BETWEEN '2014-01-01' AND '2014-12-31'\";\n $sort = \" acquire_date ASC \";\n $rst = $obj ->get_extended($where,$columns,$group, $sort);\n \n \n if(!$rst){\n $var_result['success']=false;\n $var_result['error']=\"acquisition report failed\";\n return $var_result;\n }\n\n $var_result['success']=true;\n $var_result['data']=$rst;\n return $var_result;\n\n}", "function all_sale_date_n($product_id)\n {\n $dates = array();\n $first_date = '';\n $sales = $this->db->get('sale')->result_array();\n foreach ($sales as $i => $row) {\n if($this->session->userdata('title') !== 'vendor' || $this->is_sale_of_vendor($row['sale_id'],$this->session->userdata('vendor_id'))){\n if ($this->product_in_sale($row['sale_id'], $product_id, 'id')) {\n $first_date = $this->get_type_name_by_id('sale', $row['sale_id'], 'sale_datetime');\n break;\n }\n }\n }\n if ($first_date !== '') {\n $current = $first_date;\n $last = time();\n while ($current <= $last) {\n $dates[] = date('Y-m-d', $current);\n $current = strtotime('+1 day', $current);\n }\n }\n return $dates;\n\n }", "public function getCurrentEvent(): CalendarEventsModel|null\n {\n $item = Input::get('auto_item');\n\n if (empty($item)) {\n return null;\n }\n\n return CalendarEventsModel::findByIdOrAlias($item);\n }", "function getEventById()\n\t{\n\t\t//echo \" From ByID: \" . $this->_id;\n\t\t$eventId = 1;\n\t\t$db\t\t= JFactory::getDbo();\n\t\t$query\t= $db->getQuery(true);\n\n\t\t$query->select(\"DATE_FORMAT(dt_event_time, '%d.%m.%Y')\");\n\t\t$query->select(\"DATE_FORMAT(dt_event_time, '%H:%i')\");\n\t\t$query->select(\"DATE_FORMAT(dt_event_end, '%H:%i')\");\n\t\t$query->select($db->nameQuote('t1.s_category'));\n\t\t$query->select($db->nameQuote('t1.s_place'));\n\t\t$query->select($db->nameQuote('t1.s_price'));\n\t\t$query->select($db->nameQuote('t1.idt_drivin_event'));\n\t\t$query->select($db->nameQuote('t1.n_num_part'));\n\t\t$query->select('t1.`n_num_part` - (SELECT COUNT(t2.`idt_drivin_event_apply`) ' .\n\t\t\t' FROM #__jevent_events_apply as t2 ' .\n\t\t\t' WHERE t2.`idt_drivin_event` = t1.`idt_drivin_event` AND t2.dt_cancel is null) as n_num_free');\n\t\t$query->from('#__jevent_events as t1');\n\t\t$query->where($db->nameQuote('idt_drivin_event') . '=' . $this->_id);\n\n\t\t$db->setQuery($query);\n\t\tif ($link = $db->loadRowList()) {\n\t\t}\n\t\t//echo \" From ByID: \" . count($link);\n\t\t//echo \" From ByID: \" . $query;\n\t\treturn $link;\n\t}" ]
[ "0.61202765", "0.5618983", "0.54669845", "0.53751427", "0.5350717", "0.5347726", "0.53279775", "0.53192765", "0.52580506", "0.52006674", "0.5177329", "0.51716876", "0.5139621", "0.5121322", "0.5121322", "0.51191336", "0.51108456", "0.50975716", "0.50975716", "0.50732076", "0.5046812", "0.50298744", "0.5027422", "0.5016033", "0.49931428", "0.49836603", "0.4974123", "0.49732462", "0.49665105", "0.49581644" ]
0.6423527
0
Validate if the start and end date are in the past and the future
public function validateDate() { if ( ($from = $this->getAvailableFrom()) && ($till = $this->getAvailableTill()) && $from->InPast() && $till->InFuture() ) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateDates(&$start, &$end) {\n $sixMonthsAgo = strtotime(\"-6 months\");\n $day = 86400;\n $end = time();\n \n if (!$start) {\n $start = strtotime(\"-7 days\");\n }\n \n $gap = $end - $start; \n \n //Don't mess the dates!\n switch ($gap) {\n case $gap < ($day * 31) :\n $gap = $day * 7;\n break;\n\n case $gap < ($day * 180) ://6 months\n $gap = $day * 31;\n break;\n \n case $gap >= ($day * 180) : \n default : \n $gap = $day * 180; \n break;\n }\n \n $end = time();\n $start = $end - $gap;\n }", "public function test_start_date_is_after_end_date()\n {\n // show actiual errors without handling\n //$this->withoutExceptionHandling();\n \n $this->json('POST', '/', array_merge($this->data(),['start_date'=>date('Y-m-d', strtotime('+35 days')),'end_date'=>date('Y-m-d')]))\n ->seeJson([\n 'start_date' => [\"The start date must be a date before end date.\",\"The start date must be a date before today.\"]\n ]);\n \n }", "public function test_end_date_is_before_start_date()\n {\n // show actiual errors without handling\n //$this->withoutExceptionHandling();\n \n $this->json('POST', '/', array_merge($this->data(),['start_date'=>date('Y-m-d'),'end_date'=>date('Y-m-d', strtotime('-35 days'))]))\n ->seeJson([\n 'end_date' => [\"The end date must be a date after or equal to start date.\"]\n ]);\n \n }", "function validateDateRange($date1, $date2){\n\treturn ( strtotime($date1) - strtotime($date2) ) <= 0;\t//should be a negative number, or 0 if posts=expiration\n}", "function _isValidEndDate()\r\n {\r\n if (strtotime($this->data[$this->name]['end_date']) > strtotime(date('Y-m-d H:i:s'))) {\r\n return true;\r\n }\r\n return false;\r\n }", "function is_valid_date_range($date_start, $date_end){\n $d1 = strtotime($date_start);\n $d2 = strtotime($date_end);\n\n if($d2 >= $d1){\n return true;\n }else{\n return false;\n }\n\n}", "function _erpal_crm_activity_queue_view_validate (&$form, &$form_state) {\n \n $values = $form_state['values'];\n \n if (\n _erpal_crm_activity_queue_view_create_timestamp ($values['range_from']) >\n _erpal_crm_activity_queue_view_create_timestamp ($values['range_to']) \n ) {\n form_set_error ('range_from', t('The start date can not be later than the end date.'));\n }\n \n if (\n _erpal_crm_activity_queue_view_create_timestamp ($values['range_to']) <\n _erpal_crm_activity_queue_view_create_timestamp ($values['range_from']) \n ) {\n form_set_error ('range_to', t('The end date can not be earlier than the start date.'));\n }\n \n return;\n}", "private function checkDatesValidity(){\n\t\t$valid=true;\n\t\t$today = date(\"Y-m-d\");\n\t\tif($this->validFrom!=\"\" && $this->validFrom!=\"0000-00-00\" && $today<$this->validFrom) $valid=false;\n\t\tif($this->validUntil!=\"\" && $this->validUntil!=\"0000-00-00\" && $today>$this->validUntil) $valid=false;\n\t\treturn $valid;\n\t}", "function isPast()\r\n {\r\n $agora = new Date();\r\n if($this->before($agora)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "function erp_check_date_range_in_range_exist( $start_date, $end_date, $user_date_start, $user_date_end ) {\n\n if ( erp_check_date_in_range( $start_date, $end_date, $user_date_start ) ) {\n return true;\n }\n\n if ( erp_check_date_in_range( $start_date, $end_date, $user_date_end ) ) {\n return true;\n }\n\n return false;\n}", "public function test_end_date_before_more_than_30_days()\n {\n // show actiual errors without handling\n //$this->withoutExceptionHandling();\n \n $this->json('POST', '/', array_merge($this->data(),['end_date'=>date('Y-m-d', strtotime('-35 days'))]))\n ->seeJson([\n 'end_date' => [\"The end date must be a date after or equal to start date.\"]\n ]);\n \n \n }", "public function isValid(): bool\n {\n $now = new \\DateTime();\n return $now < $this->getEndDate();\n }", "private function CheckStartFinishDate()\n\t{\n\t\t$start_date = MicroGrid::GetParameter('start_date', false);\n\t\t$finish_date = MicroGrid::GetParameter('finish_date', false);\n\t\t\n\t\tif($start_date > $finish_date){\n\t\t\t$this->error = _START_FINISH_DATE_ERROR;\n\t\t\treturn false;\n\t\t}\t\n\t\treturn true;\t\t\n\t}", "public function validate($input)\n {\n if(new \\DateTime($input) <= \\Carbon\\Carbon::now()->subDays(3)) {\n \n return false;\n\n }\n\n // no date future\n if(new \\DateTime($input) > \\Carbon\\Carbon::now()) {\n\n return false;\n }\n\n return true;\n }", "public function validateStartEnd(array &$element, FormStateInterface $form_state, array &$complete_form) {\n $start_date = $element['value']['#value']['object'];\n $end_date = $element['end_value']['#value']['object'];\n\n if ($start_date instanceof DrupalDateTime && $end_date instanceof DrupalDateTime) {\n if ($start_date->getTimestamp() !== $end_date->getTimestamp()) {\n $interval = $start_date->diff($end_date);\n if ($interval->invert === 1) {\n $form_state->setError($element, $this->t('The @title end date cannot be before the start date', ['@title' => $element['#title']]));\n }\n }\n }\n }", "private function checkEventDateNotDue(){\n $event = Event::find($this->id);\n $now = Carbon::now();\n \n $startTime = Carbon::createFromFormat('Y-m-d H:i:s', $event->start_time);\n return $startTime->gt($now);\n }", "public function isTodayLessThanOrEqualToEndValidityDate($today,$end_date){\n \n if(($end_date['year'] - $today['year'])>0){\n return true;\n }else if(($end_date['year'] - $today['year'])<0){\n return false;\n }else{\n if(($end_date['mon'] - $today['mon'])>0){\n return true;\n }else if(($end_date['mon'] - $today['mon'])<0){\n return false;\n }else{\n if(($end_date['mday'] - $today['mday'])>0){\n return true;\n }else if(($end_date['mday'] - $today['mday'])==0){\n return true;\n }else{\n return false;\n }\n }\n }\n \n \n }", "public function valid()\n {\n return $this->_current !== null\n && $this->_current->getTimestamp() < $this->_endDate->getTimestamp();\n }", "function erp_check_date_in_range( $start_date, $end_date, $date_from_user ) {\n // Convert to timestamp\n $start_ts = strtotime( $start_date );\n $end_ts = strtotime( $end_date );\n $user_ts = strtotime( $date_from_user );\n\n // Check that user date is between start & end\n if ( ( $user_ts >= $start_ts ) && ( $user_ts <= $end_ts ) ) {\n return true;\n }\n\n return false;\n}", "private function validateBookingDuration($start, $end)\n {\n if ($end <= $start) {\n throw new Exceptions\\InvalidDateException('End date time should be earlier than start date time');\n }\n\n $start = (clone $start);\n $start->modify('+2 hours');\n if ($end > $start) {\n throw new Exceptions\\InvalidDateException('Booking duration should be shorter or equal to 2 hours');\n }\n }", "protected function _checkDate($from, $to) {\r\n $return = true;\r\n $date = date( 'Y-m-d');\r\n $today = strtotime ($date);\r\n if ($from && $today < $from) {\r\n $return = false;\r\n }\r\n if ($to && $today > $to) {\r\n $return = false;\r\n }\r\n if (! $to && ! $from) {\r\n $return = false;\r\n }\r\n return $return;\r\n }", "public function draft_date_is_in_the_future($draft_date){\n $now = getdate();\n $timestamp = strtotime($draft_date);\n if($timestamp < $now[0]){\n $this->form_validation->set_message('draft_date_is_in_the_future', 'Draft Date must be in the future');\n return false;\n }\n //another condition should go here to verify the draft date is within the range of valid draft dates for a given season\n else{\n return true;\n }\n \n }", "public function hasPassed()\n {\n if (empty($this->startDate) || empty($this->endDate)) {\n return false;\n }\n\n $next = $this->next()->next;\n\n return DateTimeHelper::isInThePast($next);\n }", "private function CheckDateOverlapping()\n\t{\n\t\t$rid = MicroGrid::GetParameter('rid');\n\t\t$start_date = MicroGrid::GetParameter('start_date', false);\n\t\t$finish_date = MicroGrid::GetParameter('finish_date', false);\n\t\t$hotel_id = MicroGrid::GetParameter('hotel_id', false);\n\n\t\t$sql = 'SELECT * FROM '.TABLE_HOTEL_PERIODS.'\n\t\t\t\tWHERE\n\t\t\t\t\tid != '.(int)$rid.' AND\n\t\t\t\t\thotel_id = '.(int)$hotel_id.' AND\n\t\t\t\t\t(((\\''.$start_date.'\\' >= start_date) AND (\\''.$start_date.'\\' <= finish_date)) OR\n\t\t\t\t\t((\\''.$finish_date.'\\' >= start_date) AND (\\''.$finish_date.'\\' <= finish_date))) ';\t\n\t\t$result = database_query($sql, DATA_AND_ROWS, FIRST_ROW_ONLY);\n\t\tif($result[1] > 0){\n\t\t\t$this->error = _TIME_PERIOD_OVERLAPPING_ALERT;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function isDeadlinePastDue(): bool {\n return Carbon::parse($this->deadline)->lessThan(Carbon::today()->toDateString());\n }", "function CHECK_valability($endDATE) {\n\n $TMSP_end = strtotime($endDATE);\n $TMSP_today = time();\n\n if($TMSP_end > $TMSP_today) return true;\n else return false;\n }", "public function checkInput()\n\t{\n\t\tglobal $lng;\n\t\t\n\t\tif($this->getDisabled())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t$post = $_POST[$this->getPostVar()];\n\t\tif(!is_array($post))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$start = $post[\"start\"];\n\t\t$end = $post[\"end\"];\n\t\t\n\t\t// if full day is active, ignore time format\n\t\t$format = $post['tgl']\n\t\t\t? 0\n\t\t\t: $this->getDatePickerTimeFormat();\n\t\t\n\t\t// always done to make sure there are no obsolete values left\n\t\t$this->setStart(null);\n\t\t$this->setEnd(null);\n\t\t\n\t\t$valid_start = false;\n\t\tif(trim($start))\n\t\t{\n\t\t\t$parsed = ilCalendarUtil::parseIncomingDate($start, $format);\n\t\t\tif($parsed)\n\t\t\t{\t\t\t\t\t\t\t\t\t\n\t\t\t\t$this->setStart($parsed);\n\t\t\t\t$valid_start = true;\n\t\t\t}\t\t\t\t\t\t\n\t\t}\n\t\telse if(!$this->getRequired() && !trim($end))\n\t\t{\n\t\t\t$valid_start = true;\t\t\t\n\t\t}\n\t\t\t\t\t\t\t\t\n\t\t$valid_end = false;\t\t\n\t\tif(trim($end))\n\t\t{\t\t\t\n\t\t\t$parsed = ilCalendarUtil::parseIncomingDate($end, $format);\t\t\n\t\t\tif($parsed)\n\t\t\t{\n\t\t\t\t$this->setEnd($parsed);\n\t\t\t\t$valid_end = true;\n\t\t\t}\t\t\t\t\t\n\t\t}\n\t\telse if(!$this->getRequired() && !trim($start))\n\t\t{\t\t\t\t\t\n\t\t\t$valid_end = true;\t\t\t\n\t\t}\n\t\t\n\t\tif($this->getStartYear())\n\t\t{\n\t\t\tif($valid_start && \n\t\t\t\t$this->getStart()->get(IL_CAL_FKT_DATE, \"Y\") < $this->getStartYear())\n\t\t\t{\n\t\t\t\t$valid_start = false;\n\t\t\t}\n\t\t\tif($valid_end && \n\t\t\t\t$this->getEnd()->get(IL_CAL_FKT_DATE, \"Y\") < $this->getStartYear())\n\t\t\t{\n\t\t\t\t$valid_end = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$valid = ($valid_start && $valid_end);\t\n\t\t\n\t\tif($valid && \n\t\t\t$this->getStart() && \n\t\t\t$this->getEnd() &&\n\t\t\tilDateTime::_after($this->getStart(), $this->getEnd()))\t\t\t\n\t\t{\n\t\t\t$valid = false;\t\t\t\n\t\t}\n\t\t\n\t\tif(!$valid)\n\t\t{\n\t\t\t$this->invalid_input_start = $start;\n\t\t\t$this->invalid_input_end = $end;\n\t\t\t\n\t\t\t$_POST[$this->getPostVar()][\"start\"] = null;\n\t\t\t$_POST[$this->getPostVar()][\"end\"] = null;\n\t\t\t\n\t\t\t$this->setAlert($lng->txt(\"form_msg_wrong_date\"));\n\t\t}\t\n\t\telse\n\t\t{\t\t\t\n\t\t\tif($this->getStart() &&\n\t\t\t\t$this->getEnd())\n\t\t\t{\n\t\t\t\t// getInput() should return a generic format\t\n\t\t\t\t$post_format = $format\n\t\t\t\t\t? IL_CAL_DATETIME\n\t\t\t\t\t: IL_CAL_DATE;\t\t\t\n\t\t\t\t$_POST[$this->getPostVar()][\"start\"] = $this->getStart()->get($post_format);\n\t\t\t\t$_POST[$this->getPostVar()][\"end\"] = $this->getEnd()->get($post_format);\t\t\t\t\n\t\t\t\tunset($_POST[$this->getPostVar()][\"tgl\"]);\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$_POST[$this->getPostVar()][\"start\"] = null;\n\t\t\t\t$_POST[$this->getPostVar()][\"end\"] = null;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($valid)\n\t\t{\n\t\t\t$valid = $this->checkSubItemsInput();\n\t\t}\n\t\t\n\t\treturn $valid;\n\t}", "private function checkDate($start_date, $end_date, $start_date_2, $end_date_2) {\n // Convert to timestamp\n $date['start'] = strtotime($start_date);\n $date['end'] = strtotime($end_date);\n $date2['start'] = strtotime($start_date_2);\n $date2['end'] = strtotime($end_date_2);\n \n // check if intervals overlap\n if(($date['start'] <= $date2['end']) && ($date['end'] >= $date2['start'])) {\n return FALSE;\n }\n \n return TRUE;\n }", "private function validateDate($date)\n {\n $currentDate = strtotime(date('Y-m-d'));\n $maxScheduleDate = strtotime(date('Y-m-d', strtotime('+6 months')));\n $scheduledDate = strtotime($date);\n\n if ($scheduledDate <= $currentDate) {\n return $error\n = 'Please select a date from future (unless you have a time machine that can take you back in '.$date\n .'). ';\n }\n\n if ($scheduledDate >= $maxScheduleDate) {\n return $error = 'You cannot schedule a movie more than 6 months from now. ';\n }\n\n return true;\n }", "function check_future_date($date_str, $future_flag)\r\n{\r\n\t$today = strtotime(\"now\");\t\r\n\t$testday = strtotime($date_str);\r\n\tif ($future_flag)\r\n\t{\r\n\t\tif ($today >= $testday || date(\"Y-m-d\",$today) == date(\"Y-m-d\",$testday)) return false;\t\t\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif ($today < $testday && date(\"Y-m-d\",$today) != date(\"Y-m-d\",$testday)) return false;\r\n\t}\r\n\treturn true;\r\n}" ]
[ "0.7473661", "0.70979506", "0.70038974", "0.689244", "0.687374", "0.6823302", "0.6766566", "0.6755164", "0.66362476", "0.6605858", "0.6581508", "0.65705633", "0.653965", "0.6526464", "0.6507644", "0.64888954", "0.6485401", "0.64820397", "0.6477894", "0.6463335", "0.64275634", "0.6408883", "0.6398558", "0.63963395", "0.629219", "0.62584394", "0.62387335", "0.6216727", "0.6200379", "0.6185517" ]
0.7154642
1
Get the ticket availability for this type A buyable always checks own capacity before event capacity
public function getAvailability() { if ($this->Capacity !== 0) { $sold = OrderItem::get()->filter(['BuyableID' => $this->ID])->count(); $available = $this->Capacity - $sold; return $available < 0 ? 0 : $available; } // fallback to page availability if capacity is not set return $this->TicketPage()->getAvailability(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAvailability()\n {\n return $this->availability;\n }", "public function getAvailability()\n {\n return $this->availability;\n }", "private function get_availability()\n\t{\n\t\treturn $this->m_availability;\n\t}", "public function getAvailable()\n {\n return $this->available;\n }", "public function getAvailable()\n {\n return $this->available;\n }", "public function getAvailable()\n {\n return $this->available;\n }", "public function getAvailable()\n {\n if (!$this->IsAvailable) {\n return false;\n }\n\n if (!$this->getAvailableFrom() && !$this->getAvailableTill()) {\n return false;\n } elseif ($this->validateDate() && $this->validateAvailability()) {\n return true;\n }\n\n return false;\n }", "public function getAvailable() : bool\n {\n return $this->available;\n }", "function get_available_tickets( $include_member_tickets = false ){\n\t\t$tickets = array();\n\t\tforeach ($this->get_tickets() as $EM_Ticket){\n\t\t\t/* @var $EM_Ticket EM_Ticket */\n\t\t\tif( $EM_Ticket->is_available($include_member_tickets) ){\n\t\t\t\t//within time range\n\t\t\t\tif( $EM_Ticket->get_available_spaces() > 0 ){\n\t\t\t\t\t$tickets[] = $EM_Ticket;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$EM_Tickets = new EM_Tickets($tickets);\n\t\treturn apply_filters('em_bookings_get_available_tickets', $EM_Tickets, $this);\n\t}", "public function getAvailableSummary()\n {\n $available = $this->getAvailable()\n ? '<span style=\"color: #3adb76;\">' . _t(__CLASS__ . '.Available', 'Tickets available') . '</span>'\n : '<span style=\"color: #cc4b37;\">' . _t(__CLASS__ . '.Unavailable', 'Not for sale') . '</span>';\n\n return new LiteralField('Available', $available);\n }", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function getIsAvailable() {}", "public static function is_available()\n {\n }", "public function getAvailabilityStatus()\n {\n return $this->availabilityStatus;\n }" ]
[ "0.67952836", "0.67952836", "0.66527873", "0.6518593", "0.6518593", "0.6512095", "0.6200683", "0.6199226", "0.6101215", "0.6087846", "0.60711825", "0.60711825", "0.60711825", "0.6069661", "0.6069661", "0.6069661", "0.6069661", "0.6069661", "0.6069661", "0.6069661", "0.6069661", "0.6069661", "0.6069661", "0.6069661", "0.6069661", "0.6069661", "0.6069661", "0.6011844", "0.597078", "0.59376925" ]
0.77772444
0
Get the event start date
private function getEventStartDate() { $startDate = $this->TicketPage()->getEventStartDate(); $this->extend('updateEventStartDate', $startDate); return $startDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEventStartDate() {\n\t\treturn ($this->eventStartDate);\n\t}", "public function get_start_date()\n\t{\n\t\treturn $this->start_date;\n\t}", "public function getStart_date() {\n\t\treturn $this->_start_date;\n\t}", "public function getDateStart()\n {\n return $this->dateStart;\n }", "public function getDateStart()\n {\n return $this->dateStart;\n }", "public function getDateStart()\n {\n return $this->dateStart;\n }", "public function getStartDate() {\n\n return $this->start_date;\n }", "public function getStartDate(){\n\t\treturn $this->startDate;\n\t}", "function getStartDate() \n\t{\n\t\treturn (strlen($this->start_date)) ? $this->start_date : NULL;\n\t}", "public function getStartDate()\n {\n return $this->startDate;\n }", "public function getStartDate()\n {\n return $this->startDate;\n }", "public function getStartDate()\n {\n return $this->startDate;\n }", "public function getStartDate()\n {\n return $this->startDate;\n }", "public function getStartDate()\n {\n return $this->startDate;\n }", "public function getStartDateTime();", "public function getStartDate()\n {\n return $this->stringToDate((string) $this->json()->start_date);\n }", "public function getStartDate() {\n return $this->startDate;\n }", "public function getStartDate() {\n return $this->startDate;\n }", "protected function getStart()\n {\n return new Zend_Date(\n Mage::getStoreConfig(self::CONFIG_PREFIX . 'start', $this->getStore()),\n $this->getDateTimeFormat(),\n $this->getLocale()->getLocaleCode()\n );\n }", "public function getStartDate() \n {\n return $this->_fields['StartDate']['FieldValue'];\n }", "function getStartDate()\n {\n $oDaySpan = $this->_value;\n $value = is_null($oDaySpan) ? null : $oDaySpan->getStartDate();\n return $value;\n }", "function eo_get_the_start($format='d-m-Y',$id='',$occurrence=0){\n\tglobal $post;\n\t$event = $post;\n\n\tif(isset($id)&&$id!='') $event = eo_get_by_postid($id,$occurrence);\n\t\n\tif(empty($event)) return false;\n\n\t$date = esc_html($event->StartDate).' '.esc_html($event->StartTime);\n\n\tif(empty($date)||$date==\" \")\n\t\treturn false;\n\n\treturn eo_format_date($date,$format);\n}", "public function getStartDate()\n {\n if (array_key_exists(\"startDate\", $this->_propDict)) {\n return $this->_propDict[\"startDate\"];\n } else {\n return null;\n }\n }", "function erp_financial_start_date() {\n $financial_year_dates = erp_get_financial_year_dates();\n\n return $financial_year_dates['start'];\n}", "public function getStartDate()\n {\n return $this->StartDate;\n }", "public function getManualDateStart() {}", "public function get_startDate()\n {\n return $this->_startDate;\n }", "public function getStartDateTime()\n {\n return $this->startDateTime;\n }", "public function getBeginDate() {\n return $this->beginDate;\n }", "public function getStartDate();" ]
[ "0.8167655", "0.7805471", "0.7650524", "0.75991297", "0.75991297", "0.75991297", "0.75044954", "0.7452919", "0.7452522", "0.743893", "0.743893", "0.743893", "0.743893", "0.743893", "0.7435296", "0.7403511", "0.7393275", "0.73897636", "0.7373831", "0.73586106", "0.7317123", "0.72783405", "0.724337", "0.7238678", "0.7234041", "0.72052497", "0.71905375", "0.7169115", "0.70785064", "0.70560366" ]
0.8352445
0
on stock control products, reduce the instock count by $count
function soldStock($product_id, $count=1) { $product=$this->findById($product_id); if ($product['Product']['stock']) { $product['Product']['stock_number']--; $this->Save($product); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function display_out_of_stocks_product_count(){\n // if(env(\"DB_CONNECTION\") == \"pgsql\"){\n // $getOutOfStocksProduct = DB::select(\"SELECT COUNT(*) as data FROM stocks WHERE quantity < threshold\");\n // }else{\n // $getOutOfStocksProduct = DB::select('SELECT COUNT(*) as data FROM stocks WHERE quantity < threshold');\n // }\n \n // return response()->json([\n // 'count' => $getOutOfStocksProduct[0],\n // 'status' => 200\n // ]);\n\n $getOutOfStocksProduct = DB::table('product_stocks')->where('quantity', 0)->get()->count();\n\n \n return response()->json([\n 'count' => $getOutOfStocksProduct,\n 'status' => 200\n ]);\n }", "public function countV_article_en_stock(){\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 }", "public function totalRecount()\n {\n $products = $this->products;\n $newTotal = 0;\n foreach ($products as $product) {\n if ($product->removed) {\n continue;\n }\n $newTotal += $product->count * $product->price;\n }\n $this->total = $newTotal;\n $this->save();\n }", "function reduceStockLevel($connection,$data){\n\t$subsales = array();\n\tforeach ($data->sales as $subsaledata){\n\t\tarray_push($subsales, $subsaledata);\n\t} \n\n\tfor($i = 0; $i < count($subsales); $i++){\n\t\t$this_stock_quantity = $subsales[$i]->quantity;\n\t\t$this_stock_id = $subsales[$i]->stock_id;\n\t\t$old_quantity = getStockquantity($this_stock_id,$connection);\n\t\t$new_quantity = $old_quantity - $this_stock_quantity;\n\t\tsetStockQuantity($this_stock_id,$new_quantity,$connection);\n\t}\n\treturn true;\n}", "public function out_of_stock_count(){\n\n\t\t$this->db->select(\"\n\t\t\t\ta.product_name,\n\t\t\t\ta.unit,\n\t\t\t\ta.product_id,\n\t\t\t\ta.price,\n\t\t\t\ta.supplier_price,\n\t\t\t\ta.product_model,\n\t\t\t\tc.category_name,\n\t\t\t\tsum(d.quantity) as totalSalesQnty,\n\t\t\t\tsum(b.quantity) as totalPurchaseQnty,\n\t\t\t\te.purchase_date as purchase_date,\n\t\t\t\te.purchase_id,\n\t\t\t\t(sum(b.quantity) - sum(d.quantity)) as stock\n\t\t\t\");\n\n\t\t$this->db->from('product_information a');\n\t\t$this->db->join('product_category c' ,'c.category_id = a.category_id','left');\n\t\t$this->db->join('product_purchase_details b','b.product_id = a.product_id','left');\n\t\t$this->db->join('invoice_details d','d.product_id = a.product_id','left');\n\t\t$this->db->join('product_purchase e','e.purchase_id = b.purchase_id','left');\n\t\t$this->db->group_by('a.product_id');\n\t\t$this->db->having('stock < 10', null, false);\n\t\t$this->db->having('totalPurchaseQnty < 10', null, false);\n\t\t$this->db->order_by('a.product_name','asc');\n\n\t\t$query = $this->db->get();\n\t\treturn $query->num_rows();\n\t}", "public function updated(Stock $stock)\n {\n $product = Product::find($stock->product_id);\n $cardController = new GlobalCardController();\n $product->count = $cardController->countProduct($stock->product_id);\n $product->save();\n }", "public function updateSellIn() {\n $this->sellIn -= 1;\n }", "public function updateSellIn() {\n $this->sellIn -= 1;\n }", "function wwt_perform_consignment_stocks_increase($status, $order) {\r\n $shippingMethod = get_shipping_method_with_id($order);\r\n $consignmentStocks = WWT_ConsignmentEntity::get_all();\r\n\r\n foreach ($consignmentStocks as $consignment) {\r\n $consignmentStockShippingMethods = explode(FIELDS_SEPARATOR, $consignment->paymentMethods);\r\n\r\n if (in_array($shippingMethod, $consignmentStockShippingMethods)) {\r\n $order->add_order_note(sprintf(__('Goods were taken from consignment stock [%s]. No main warehouse changes.', 'medinatur_v3'), $consignment->name));\r\n\r\n $products = $order->get_items();\r\n\r\n foreach ($products as $product) {\r\n $itemStockReduced = $product->get_meta( WWT_STOCK_REDUCED_FLAG, true );\r\n\r\n if (!$itemStockReduced) {\r\n $quantity = $product->get_quantity();\r\n $productId = $product->get_product_id();\r\n WWT_ConsignmentEntity::update_product($consignment->id, $productId, -$quantity);\r\n $logEntry = new WWT_ConsignmentLogEntity($consignment->id, NULL, $productId, -$quantity, sprintf(__('Amout reduced because of change in order %d.', 'woocommerce-warehouse-transactions'), $order->id), $order->id);\r\n $logEntry->save();\r\n $product->add_meta_data( WWT_STOCK_REDUCED_FLAG, $quantity, true );\r\n $product->save();\r\n }\r\n }\r\n\r\n $status = false;\r\n }\r\n }\r\n\r\n return $status;\r\n}", "public function updateSellIn(): void\n {\n $this->getItem()->sell_in--;\n }", "public function actionStockacount(){\n $allusermodel = MY_User::find()->where(\"iseal = 0 && isout = 0\")->all();\n $forcesellPoper = MTools::getYiiParams(\"forcesellPoper\");\n $one = 0;\n $two = 0;\n $three = 0;\n $one_sell = 0;\n $two_sell = 0;\n $three_sell = 0;\n $cash = MY_UserAwardRecord::find()->where(\"event_type = 4 && award_type = 9 && pay_type = 1\")->sum('amount');\n if($cash > 0){\n $cash = $cash;\n }else{\n $cash = 0;\n }\n $regist = MY_UserAwardRecord::find()->where(\"event_type = 4 && award_type = 10 && pay_type = 1\")->sum('amount');\n if($regist > 0){\n $regist = $regist;\n }else{\n $regist = 0;\n }\n $deductcash = MY_UserAwardRecord::find()->where(\"event_type = 4 && award_type = 9 && pay_type = 2\")->sum('amount');\n if($deductcash > 0){\n $deductcash = $deductcash;\n }else{\n $deductcash = 0;\n }\n $deductregist = MY_UserAwardRecord::find()->where(\"event_type = 4 && award_type = 10 && pay_type = 2\")->sum('amount');\n if($deductregist > 0){\n $deductregist = $deductregist;\n }else{\n $deductregist = 0;\n }\n foreach ($allusermodel as $usermodel){\n $user = MY_User::find()->where(\"id = :userid\",[\":userid\"=>$usermodel->id])->with([\"stock\",\"level\"])->one();\n if($user instanceof MY_User){\n if($user->stock){\n $num = $user->stock->stock + $user->stock->sell_stock - $user->level->out_num;\n if($num > 0){\n if($user->levelid == 1){\n $one += $num;\n $sell_num = floor(($user->stock->stock + $user->stock->sell_stock)*0.9*$forcesellPoper);\n $one_sell += $sell_num > $user->stock->stock ? $user->stock->stock : $sell_num;\n }elseif($user->levelid == 2){\n $two += $num;\n $sell_num = floor(($user->stock->stock + $user->stock->sell_stock)*0.9*$forcesellPoper);\n $two_sell += $sell_num > $user->stock->stock ? $user->stock->stock : $sell_num;\n }else{\n $three += $num; \n $sell_num = floor(($user->stock->stock + $user->stock->sell_stock)*0.9*$forcesellPoper);\n $three_sell += $sell_num > $user->stock->stock ? $user->stock->stock : $sell_num;\n }\n }\n }\n }\n }\n $updatacount = new \\common\\models\\Sellstocknum();\n $updatacount->one = $one;\n $updatacount->two = $two;\n $updatacount->three = $three;\n $updatacount->one_sell = $one_sell;\n $updatacount->two_sell = $two_sell;\n $updatacount->three_sell = $three_sell;\n $updatacount->cash = $cash;\n $updatacount->regist = $regist;\n $updatacount->deductcash = $deductcash;\n $updatacount->deductregist = $deductregist;\n $updatacount->created_at = time();\n $updatacount->updated_at = time();\n if($updatacount->save()){\n Yii::$app->getSession()->setFlash(\"success\", \"数据更新成功!\");\n }else{\n Yii::$app->getSession()->setFlash(\"error\", \"数据更新失败!\");\n $updatacount->errors();\n }\n return $this->render(\"index\");\n\n }", "abstract protected function prepareTotalCount();", "public function getProductCount()\n {\n $count = 0;\n \tforeach ($this->getItems() as $item) {\n \t $count += $item['count'];\n \t}\n \treturn $count;\n }", "abstract public function prepareTotalCount();", "public function getStock(): int\n {\n return $this->stock;\n }", "public function updateQuantity() {\n\t\t$count = 0;\n\t\tforeach ($_SESSION['cart'] as $cartRow) {\n\t\t\tif ($cartRow['id'] == $this->productId) {\n\t\t\t\t$_SESSION['cart'][$count]['quantity'] = $this->quantity;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$count += 1;\n\t\t}\n\t}", "function reduce_stock( $by = 1 ) {\n\t\tif ($this->managing_stock()) :\n\t\t\t$reduce_to = $this->stock - $by;\n\t\t\tupdate_post_meta($this->id, 'stock', $reduce_to);\n\t\t\treturn $reduce_to;\n\t\tendif;\n\t}", "function setAmount($product, $instock)\n{\n\tinclude 'setup.php';\n\n\t$stocks = getStocks();\n\tif($stocks == -1)\n\t\treturn -1;\n\n\tif(isset($stocks[$product]))\n\t\t$stocks[$product][instock] = intval($instock);\n\telse\n\t\t$stocks[$product] = array(instock => intval($instock), sold => 0);\n\n\t$handle = fopen($STOCKFILE, \"w\");\n\tif($handle == FALSE)\n\t{\n\t\treturn -1;\n\t}\n\telse\n\t{\n\t\tflock($handle, 2);\t// get exclusive lock\n\t\tif(fwrite($handle, serialize($stocks), strlen(serialize($stocks))) == FALSE)\n\t\t\t$retval = -1;\n\t\telse\n\t\t\t$retval = 0;\n\n\t\tflock($handle, 3);\t// release lock after write\n\t\tfclose($handle);\n\t\treturn $retval;\n\t}\n}", "public function handbks_object_counts_update() {\n $this->db->query(\"call handbks_object_counts_update();\");\n }", "function reduceAddedByCouponsValueIfQuantityIsLess() {\r\n\t\tif(is_array($this->basket->basket_items)){\r\n\t\t\tforeach($this->basket->basket_items as $articleUid => $item) {\r\n\t\t\t\tif(is_array($item->tx_commercecoupons_addedbycouponid)) {\r\n\t\t\t\t\t#debug($item);\r\n\t\t\t\t}\r\n\t\t\t\tif(is_array($item->tx_commercecoupons_addedbycouponid) && count($item->tx_commercecoupons_addedbycouponid)>$item->quantity) {\r\n\t\t\t\t\t$new_addedByCoupons_value = $this->getFirstItemsOfArray($item->tx_commercecoupons_addedbycouponid, $item->quantity);\r\n\t\t\t\t\t$old_addedByCoupons_value = $item->tx_commercecoupons_addedbycouponid;\r\n\t\t\t\t\tif(is_array($this->basket->basket_items[$articleUid]->tx_commercecoupons_relatedcoupon)) {\r\n\r\n\t\t\t\t\t\t$removedItems = array_diff($old_addedByCoupons_value,$new_addedByCoupons_value);\r\n\t\t\t\t\t\t$this->removeItemsByValue($this->basket->basket_items[$articleUid]->tx_commercecoupons_relatedcoupon,$removedItems);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->basket->basket_items[$articleUid]->tx_commercecoupons_addedbycouponid = $new_addedByCoupons_value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function stockCount()\n {\n return $this->variations->sum(function ($variation) {\n return $variation->stockCount();\n });\n }", "private function setRecountProduct() {\n\n //$this->model->setDocumentNumber($this->getDocumentNumber);\n $sql = null;\n if ($this->getVendor() == self::MYSQL) {\n $sql = \"\n INSERT INTO `productrecount` \n (\n `companyId`,\n `warehouseId`,\n `productCode`,\n `productDescription`,\n `productRecountDate`,\n `productRecountSystemQuantity`,\n `productRecountPhysicalQuantity`,\n `isDefault`,\n `isNew`,\n `isDraft`,\n `isUpdate`,\n `isDelete`,\n `isActive`,\n `isApproved`,\n `isReview`,\n `isPost`,\n `executeBy`,\n `executeTime`\n ) VALUES ( \n '\" . $this->getCompanyId() . \"',\n '\" . $this->model->getWarehouseId() . \"',\n '\" . $this->model->getProductCode() . \"',\n '\" . $this->model->getProductDescription() . \"',\n '\" . $this->model->getProductRecountDate() . \"',\n '\" . $this->model->getProductRecountSystemQuantity() . \"',\n '\" . $this->model->getProductRecountPhysicalQuantity() . \"',\n '\" . $this->model->getIsDefault(0, 'single') . \"',\n '\" . $this->model->getIsNew(0, 'single') . \"',\n '\" . $this->model->getIsDraft(0, 'single') . \"',\n '\" . $this->model->getIsUpdate(0, 'single') . \"',\n '\" . $this->model->getIsDelete(0, 'single') . \"',\n '\" . $this->model->getIsActive(0, 'single') . \"',\n '\" . $this->model->getIsApproved(0, 'single') . \"',\n '\" . $this->model->getIsReview(0, 'single') . \"',\n '\" . $this->model->getIsPost(0, 'single') . \"',\n '\" . $this->model->getExecuteBy() . \"',\n \" . $this->model->getExecuteTime() . \"\n );\";\n } else {\n if ($this->getVendor() == self::MSSQL) {\n $sql = \"\n INSERT INTO [productRecount]\n (\n [productRecountId],\n [companyId],\n [warehouseId],\n [productCode],\n [productDescription],\n [productRecountDate],\n [productRecountSystemQuantity],\n [productRecountPhysicalQuantity],\n [isDefault],\n [isNew],\n [isDraft],\n [isUpdate],\n [isDelete],\n [isActive],\n [isApproved],\n [isReview],\n [isPost],\n [executeBy],\n [executeTime]\n) VALUES (\n '\" . $this->getCompanyId() . \"',\n '\" . $this->model->getWarehouseId() . \"',\n '\" . $this->model->getProductCode() . \"',\n '\" . $this->model->getProductDescription() . \"',\n '\" . $this->model->getProductRecountDate() . \"',\n '\" . $this->model->getProductRecountSystemQuantity() . \"',\n '\" . $this->model->getProductRecountPhysicalQuantity() . \"',\n '\" . $this->model->getIsDefault(0, 'single') . \"',\n '\" . $this->model->getIsNew(0, 'single') . \"',\n '\" . $this->model->getIsDraft(0, 'single') . \"',\n '\" . $this->model->getIsUpdate(0, 'single') . \"',\n '\" . $this->model->getIsDelete(0, 'single') . \"',\n '\" . $this->model->getIsActive(0, 'single') . \"',\n '\" . $this->model->getIsApproved(0, 'single') . \"',\n '\" . $this->model->getIsReview(0, 'single') . \"',\n '\" . $this->model->getIsPost(0, 'single') . \"',\n '\" . $this->model->getExecuteBy() . \"',\n \" . $this->model->getExecuteTime() . \"\n );\";\n } else {\n if ($this->getVendor() == self::ORACLE) {\n $sql = \"\n INSERT INTO PRODUCTRECOUNT\n (\n COMPANYID,\n WAREHOUSEID,\n PRODUCTCODE,\n PRODUCTDESCRIPTION,\n PRODUCTRECOUNTDATE,\n PRODUCTRECOUNTSYSTEMQUANTITY,\n PRODUCTRECOUNTPHYSICALQUANTITY,\n ISDEFAULT,\n ISNEW,\n ISDRAFT,\n ISUPDATE,\n ISDELETE,\n ISACTIVE,\n ISAPPROVED,\n ISREVIEW,\n ISPOST,\n EXECUTEBY,\n EXECUTETIME\n ) VALUES (\n '\" . $this->getCompanyId() . \"',\n '\" . $this->model->getWarehouseId() . \"',\n '\" . $this->model->getProductCode() . \"',\n '\" . $this->model->getProductDescription() . \"',\n '\" . $this->model->getProductRecountDate() . \"',\n '\" . $this->model->getProductRecountSystemQuantity() . \"',\n '\" . $this->model->getProductRecountPhysicalQuantity() . \"',\n '\" . $this->model->getIsDefault(0, 'single') . \"',\n '\" . $this->model->getIsNew(0, 'single') . \"',\n '\" . $this->model->getIsDraft(0, 'single') . \"',\n '\" . $this->model->getIsUpdate(0, 'single') . \"',\n '\" . $this->model->getIsDelete(0, 'single') . \"',\n '\" . $this->model->getIsActive(0, 'single') . \"',\n '\" . $this->model->getIsApproved(0, 'single') . \"',\n '\" . $this->model->getIsReview(0, 'single') . \"',\n '\" . $this->model->getIsPost(0, 'single') . \"',\n '\" . $this->model->getExecuteBy() . \"',\n \" . $this->model->getExecuteTime() . \"\n );\";\n }\n }\n }\n try {\n $this->q->create($sql);\n } catch (\\Exception $e) {\n $this->q->rollback();\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n }", "public function getProductQuantity()\n {\n }", "function wpcoupon_wc_change_number_products(){\r\n $shop_id = wc_get_page_id( 'shop' );\r\n $number = absint( get_post_meta( $shop_id, '_wpc_shop_number_products', true ) );\r\n if ( ! $number ) {\r\n $number = 12;\r\n }\r\n return $number;\r\n}", "public function applyCartDiscount(Varien_Event_Observer $observer)\n { \n try\n { \n $bundle_product_ids = [];\n $quote_product_ids = [];\n $cookieValue = Mage::getModel('core/cookie')->get('ivid');\n $userBundleCollection = Mage::getModel('increasingly_analytics/bundle')->getCollection()->addFieldToFilter('increasingly_visitor_id',$cookieValue);\n $items = $observer->getEvent()->getQuote()->getAllItems();\n $eligibleProducts = [];\n $discount = 0;\n foreach ($items as $item) {\n array_push($quote_product_ids, $item->getProductId());\n }\n foreach ($userBundleCollection as $bundle) {\n //First Bundle products\n $bundle_product_ids = explode(',', $bundle->getProductIds()); \n $productsIds = array_intersect($quote_product_ids, $bundle_product_ids);\n if(count($productsIds) == count($bundle_product_ids) )\n $discount += $bundle->getDiscountPrice();\n }\n\n if($discount > 0){\n $quote=$observer->getEvent()->getQuote();\n $quoteid=$quote->getId();\n $discountAmount=$discount;\n if($quoteid) { \n if($discountAmount>0) {\n $total=$quote->getBaseSubtotal();\n $quote->setSubtotal(0);\n $quote->setBaseSubtotal(0);\n\n $quote->setSubtotalWithDiscount(0);\n $quote->setBaseSubtotalWithDiscount(0);\n\n $quote->setGrandTotal(0);\n $quote->setBaseGrandTotal(0);\n \n\n $canAddItems = $quote->isVirtual()? ('billing') : ('shipping'); \n foreach ($quote->getAllAddresses() as $address) {\n\n $address->setSubtotal(0);\n $address->setBaseSubtotal(0);\n\n $address->setGrandTotal(0);\n $address->setBaseGrandTotal(0);\n\n $address->collectTotals();\n\n $quote->setSubtotal((float) $quote->getSubtotal() + $address->getSubtotal());\n $quote->setBaseSubtotal((float) $quote->getBaseSubtotal() + $address->getBaseSubtotal());\n\n $quote->setSubtotalWithDiscount(\n (float) $quote->getSubtotalWithDiscount() + $address->getSubtotalWithDiscount()\n );\n $quote->setBaseSubtotalWithDiscount(\n (float) $quote->getBaseSubtotalWithDiscount() + $address->getBaseSubtotalWithDiscount()\n );\n\n $quote->setGrandTotal((float) $quote->getGrandTotal() + $address->getGrandTotal());\n $quote->setBaseGrandTotal((float) $quote->getBaseGrandTotal() + $address->getBaseGrandTotal());\n\n $quote ->save(); \n\n $quote->setGrandTotal($quote->getBaseSubtotal()-$discountAmount)\n ->setBaseGrandTotal($quote->getBaseSubtotal()-$discountAmount)\n ->setSubtotalWithDiscount($quote->getBaseSubtotal()-$discountAmount)\n ->setBaseSubtotalWithDiscount($quote->getBaseSubtotal()-$discountAmount)\n ->save(); \n\n\n if($address->getAddressType()==$canAddItems) {\n //echo $address->setDiscountAmount; exit;\n $address->setSubtotalWithDiscount((float) $address->getSubtotalWithDiscount()-$discountAmount);\n $address->setGrandTotal((float) $address->getGrandTotal()-$discountAmount);\n $address->setBaseSubtotalWithDiscount((float) $address->getBaseSubtotalWithDiscount()-$discountAmount);\n $address->setBaseGrandTotal((float) $address->getBaseGrandTotal()-$discountAmount);\n if($address->getDiscountDescription()){\n $address->setDiscountAmount(-($address->getDiscountAmount()-$discountAmount));\n $address->setDiscountDescription($address->getDiscountDescription().', Custom Discount');\n $address->setBaseDiscountAmount(-($address->getBaseDiscountAmount()-$discountAmount));\n }else {\n $address->setDiscountAmount(-($discountAmount));\n $address->setDiscountDescription('Custom Discount');\n $address->setBaseDiscountAmount(-($discountAmount));\n }\n $address->save();\n }//end: if\n } //end: foreach\n //echo $quote->getGrandTotal();\n\n foreach($quote->getAllItems() as $item){\n //We apply discount amount based on the ratio between the GrandTotal and the RowTotal\n $rat=$item->getPriceInclTax()/$total;\n $ratdisc=$discountAmount*$rat;\n $item->setDiscountAmount(($item->getDiscountAmount()+$ratdisc) * $item->getQty());\n $item->setBaseDiscountAmount(($item->getBaseDiscountAmount()+$ratdisc) * $item->getQty())->save(); \n }\n } \n }\n }\n }\n catch(Exception $e)\n {\n Mage::log(\"Remove from cart tracking - \" . $e->getMessage(), null, 'Increasingly_Analytics.log');\n }\n\n }", "public function getCurrentGoodsCount()\n {\n return $this->count(self::_CURRENT_GOODS);\n }", "public function setEmptyProducts(){\n foreach ($this->products as $i => $product) {\n $counts = $product->variant->maxCounts;\n //print_R($product);\n $allCount=0;\n foreach ($counts as $count){\n $allCount = $allCount+$count->count;\n }\n if($allCount<=0 || $product->variant->status==0 || $product->product->status==0 ){\n $product->status=0;\n $product->save(true);\n }\n if($product->count > $allCount){\n $product->count = $allCount;\n $product->save(true);\n }\n if($product->count==0){\n\n //unset($this->products[$i]);\n //$product->status=0;\n //$product->save(true);\n $this->removeProduct($product->id);\n }\n }\n foreach ($this->emptyProducts as $i => $emptyProduct) {\n $emptyCounts = $emptyProduct->variant->maxCounts;\n $emptyAllCount=0;\n foreach ($emptyCounts as $emptyCount){\n $emptyAllCount = $emptyAllCount+$emptyCount->count;\n }\n if($emptyAllCount>0 && $emptyProduct->variant->status==1 && $emptyProduct->product->status==1){\n $emptyProduct->status=1;\n $emptyProduct->save(true);\n }\n }\n }", "public function updateStock()\n {\n// foreach($this->detalle_compras as $detalle)\n// {\n// $producto= Producto::model()->findByPk($detalle->producto);\n// $producto->stock+=$detalle->cantidad;\n// $producto->save();\n// }\n }", "public function view_stock_ListCount($id,$product,$added_by)\n\t{\n\t\t$query = $this->db->where('product',$product,'added_by',$added_by)->count_all_results('smb_stock'); \n\t\t\n return $query;\n\t}", "public function getQuantity()\n {\n $channelInventorySourceIds = $this->channel->inventory_sources->where('status', 1)->pluck('id');\n\n $qty = 0;\n\n foreach ($this->product->inventories as $inventory) {\n if (is_numeric($channelInventorySourceIds->search($inventory->inventory_source_id))) {\n $qty += $inventory->qty;\n }\n }\n\n $orderedInventory = $this->product->ordered_inventories\n ->where('channel_id', $this->channel->id)->first();\n\n if ($orderedInventory) {\n $qty -= $orderedInventory->qty;\n }\n\n return $qty;\n }" ]
[ "0.64926314", "0.6244813", "0.6239396", "0.6163724", "0.6136418", "0.60950845", "0.6077272", "0.6077272", "0.60473967", "0.60361654", "0.5946021", "0.59045666", "0.5886403", "0.5882537", "0.58704346", "0.58662105", "0.5821268", "0.5816439", "0.58134574", "0.5781387", "0.57793766", "0.5779289", "0.57357126", "0.5733627", "0.57318753", "0.57197475", "0.5711743", "0.57112175", "0.5708841", "0.57012385" ]
0.65984917
0
Project the input based on jmespath.
protected function project($input) { if ($this->projection === null) { return $input; } try { $output = i\function_call($this->jmespath, $this->projection, $input); } catch (\JmesPath\SyntaxErrorException $e) { throw new \RuntimeException("JMESPath projection failed: " . $e->getMessage(), 0, $e); } return i\type_cast($output, 'object'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function project( $inputs )\n {\n $outputs = array();\n $i_love_php = func_get_args();\n $it_is_so_wise = array_slice($i_love_php, 1);\n $inclusions = array_flatten($it_is_so_wise);\n $singular = !is_array($inputs);\n\n is_array($inputs) or $inputs = array($inputs);\n foreach( $inputs as $input )\n {\n $outputs[] = $output = (object)null;\n foreach( $inclusions as $name )\n {\n $output->$name = $input->$name;\n }\n }\n\n return $singular ? $outputs[0] : $outputs;\n }", "private function parseContent()\n {\n $results = [];\n $jsonFiles = $this->parseInputFolders();\n \n $finalManifest = $this->getJobManifestTemplate();\n $this->output->writeln(\"<info>\" . static::INFO_OUTPUT_PREFIX . \"Processing JSON directory: {$this->inputPath} </info>\");\n\n foreach ($jsonFiles as $file) {\n if (file_exists($file)) {\n $results[] = $this->convertLearnosityInDirectory($file);\n } else {\n $this->output->writeln(\"<info>\" . static::INFO_OUTPUT_PREFIX . \"Learnosity JSON file \".basename($file). \" Not found in: {$this->inputPath}/items </info>\");\n }\n }\n $resourceInfo = $this->updateJobManifest($finalManifest, $results);\n $finalManifest->setResources($resourceInfo);\n $this->persistResultsFile($results, realpath($this->outputPath) . '/' . $this->rawPath . '/');\n $this->flushJobManifest($finalManifest, $results);\n CopyDirectoreyHelper::copyFiles(realpath($this->inputPath) . '/assets', realpath($this->outputPath) . '/' . $this->rawPath . '/assets');\n $this->createIMSContntPackage(realpath($this->outputPath) . '/' . $this->rawPath . '/');\n }", "protected function parsePath() {\n\t}", "function getPathParser();", "private function parseInputFolders()\n {\n $folders = [];\n // Look for json files in the current path\n $finder = new Finder();\n $finder->files()->in($this->inputPath . '/activities');\n if ($finder->count() > 0) {\n foreach ($finder as $json) {\n $activityJson = json_decode(file_get_contents($json));\n $this->itemReferences = $activityJson->data->items;\n if (!empty($this->itemReferences)) {\n foreach ($this->itemReferences as $itemref) {\n $itemref = md5($itemref);\n $folders[] = $this->inputPath . '/items/' . $itemref . '.json';\n }\n } else {\n $this->output->writeln(\"<error>Error converting : No item refrences found in the activity json</error>\");\n }\n }\n } else {\n $finder->files()->in($this->inputPath . '/items');\n foreach ($finder as $json) {\n $folders[] = $this->inputPath . '/items/' . $json->getRelativePathname();\n }\n }\n return $folders;\n }", "private function projectPath()\n { }", "public static function run()\r\n\t{\r\n\t\t$finder = new Finder;\r\n\r\n\t\t$dir = base_path() . Config::get('jst::source_dir');\r\n\r\n\t\tif (!file_exists($dir)) {\r\n\t\t\tthrow new \\Exception('The source directory does not exist. Please check your configuration.');\r\n\t\t}\r\n\r\n\t\t$jst = array();\r\n\r\n\t\t$files = iterator_to_array($finder->files()->in($dir), false);\r\n\t\t\r\n\t\t$template_func = '_.template';\r\n \r\n\t\t$js = '';\r\n\t\t$js .= \"var JST = JST || {};\\n\";\r\n\r\n\t\tif (count($files)) {\r\n\t\t\tforeach ($files as $file) {\r\n\t\t\t\t$contents = str_replace(array(\"\\n\",\"'\"), array('\\n',\"\\'\"), $file->getContents());\r\n\t\t\t\t\t\r\n\t\t\t\t$js .= sprintf(\"JST['%s/%s'] = %s('%s');\\n\", Config::get('jst::source_prefix'), $file->getRelativePathname(), $template_func, $contents);\t\t\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$output_filename = base_path() . Config::get('jst::dest_dir') . '/' . Config::get('jst::output_filename');\r\n\t\t\r\n\t\tif (!file_put_contents($output_filename, $js)) {\r\n\t\t\tthrow new \\Exception(\"Could not write JST file to $output_filename. Check the permissions, perhaps?\");\r\n\t\t}\r\n\r\n\t}", "public function project(){\n try {\n // Sparql11query.g:652:3: ( SELECT ( DISTINCT | REDUCED )? ( ASTERISK | ( variable | builtInCall | functionCall | ( OPEN_BRACE expression ( AS variable )? CLOSE_BRACE )+ ) ) ) \n // Sparql11query.g:653:3: SELECT ( DISTINCT | REDUCED )? ( ASTERISK | ( variable | builtInCall | functionCall | ( OPEN_BRACE expression ( AS variable )? CLOSE_BRACE )+ ) ) \n {\n $this->match($this->input,$this->getToken('SELECT'),self::$FOLLOW_SELECT_in_project2381); \n // Sparql11query.g:654:3: ( DISTINCT | REDUCED )? \n $alt69=2;\n $LA69_0 = $this->input->LA(1);\n\n if ( (($LA69_0>=$this->getToken('DISTINCT') && $LA69_0<=$this->getToken('REDUCED'))) ) {\n $alt69=1;\n }\n switch ($alt69) {\n case 1 :\n // Sparql11query.g: \n {\n if ( ($this->input->LA(1)>=$this->getToken('DISTINCT') && $this->input->LA(1)<=$this->getToken('REDUCED')) ) {\n $this->input->consume();\n $this->state->errorRecovery=false;\n }\n else {\n $mse = new MismatchedSetException(null,$this->input);\n throw $mse;\n }\n\n\n }\n break;\n\n }\n\n // Sparql11query.g:658:3: ( ASTERISK | ( variable | builtInCall | functionCall | ( OPEN_BRACE expression ( AS variable )? CLOSE_BRACE )+ ) ) \n $alt73=2;\n $LA73_0 = $this->input->LA(1);\n\n if ( ($LA73_0==$this->getToken('ASTERISK')) ) {\n $alt73=1;\n }\n else if ( ($LA73_0==$this->getToken('COALESCE')||$LA73_0==$this->getToken('IF')||($LA73_0>=$this->getToken('STR') && $LA73_0<=$this->getToken('REGEX'))||$LA73_0==$this->getToken('IRI_REF')||$LA73_0==$this->getToken('PNAME_NS')||$LA73_0==$this->getToken('PNAME_LN')||($LA73_0>=$this->getToken('VAR1') && $LA73_0<=$this->getToken('VAR2'))||$LA73_0==$this->getToken('OPEN_BRACE')) ) {\n $alt73=2;\n }\n else {\n $nvae = new NoViableAltException(\"\", 73, 0, $this->input);\n\n throw $nvae;\n }\n switch ($alt73) {\n case 1 :\n // Sparql11query.g:659:5: ASTERISK \n {\n $this->match($this->input,$this->getToken('ASTERISK'),self::$FOLLOW_ASTERISK_in_project2414); \n\n }\n break;\n case 2 :\n // Sparql11query.g:661:5: ( variable | builtInCall | functionCall | ( OPEN_BRACE expression ( AS variable )? CLOSE_BRACE )+ ) \n {\n // Sparql11query.g:661:5: ( variable | builtInCall | functionCall | ( OPEN_BRACE expression ( AS variable )? CLOSE_BRACE )+ ) \n $alt72=4;\n $LA72 = $this->input->LA(1);\n if($this->getToken('VAR1')== $LA72||$this->getToken('VAR2')== $LA72)\n {\n $alt72=1;\n }\n else if($this->getToken('COALESCE')== $LA72||$this->getToken('IF')== $LA72||$this->getToken('STR')== $LA72||$this->getToken('LANG')== $LA72||$this->getToken('LANGMATCHES')== $LA72||$this->getToken('DATATYPE')== $LA72||$this->getToken('BOUND')== $LA72||$this->getToken('SAMETERM')== $LA72||$this->getToken('ISIRI')== $LA72||$this->getToken('ISURI')== $LA72||$this->getToken('ISBLANK')== $LA72||$this->getToken('ISLITERAL')== $LA72||$this->getToken('REGEX')== $LA72)\n {\n $alt72=2;\n }\n else if($this->getToken('IRI_REF')== $LA72||$this->getToken('PNAME_NS')== $LA72||$this->getToken('PNAME_LN')== $LA72)\n {\n $alt72=3;\n }\n else if($this->getToken('OPEN_BRACE')== $LA72)\n {\n $alt72=4;\n }\n else{\n $nvae =\n new NoViableAltException(\"\", 72, 0, $this->input);\n\n throw $nvae;\n }\n\n switch ($alt72) {\n case 1 :\n // Sparql11query.g:662:7: variable \n {\n $this->pushFollow(self::$FOLLOW_variable_in_project2434);\n $this->variable();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 2 :\n // Sparql11query.g:663:9: builtInCall \n {\n $this->pushFollow(self::$FOLLOW_builtInCall_in_project2444);\n $this->builtInCall();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 3 :\n // Sparql11query.g:664:9: functionCall \n {\n $this->pushFollow(self::$FOLLOW_functionCall_in_project2454);\n $this->functionCall();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 4 :\n // Sparql11query.g:665:9: ( OPEN_BRACE expression ( AS variable )? CLOSE_BRACE )+ \n {\n // Sparql11query.g:665:9: ( OPEN_BRACE expression ( AS variable )? CLOSE_BRACE )+ \n $cnt71=0;\n //loop71:\n do {\n $alt71=2;\n $LA71_0 = $this->input->LA(1);\n\n if ( ($LA71_0==$this->getToken('OPEN_BRACE')) ) {\n $alt71=1;\n }\n\n\n switch ($alt71) {\n \tcase 1 :\n \t // Sparql11query.g:665:10: OPEN_BRACE expression ( AS variable )? CLOSE_BRACE \n \t {\n \t $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_project2465); \n \t $this->pushFollow(self::$FOLLOW_expression_in_project2467);\n \t $this->expression();\n\n \t $this->state->_fsp--;\n\n \t // Sparql11query.g:665:32: ( AS variable )? \n \t $alt70=2;\n \t $LA70_0 = $this->input->LA(1);\n\n \t if ( ($LA70_0==$this->getToken('AS')) ) {\n \t $alt70=1;\n \t }\n \t switch ($alt70) {\n \t case 1 :\n \t // Sparql11query.g:665:33: AS variable \n \t {\n \t $this->match($this->input,$this->getToken('AS'),self::$FOLLOW_AS_in_project2470); \n \t $this->pushFollow(self::$FOLLOW_variable_in_project2472);\n \t $this->variable();\n\n \t $this->state->_fsp--;\n\n\n \t }\n \t break;\n\n \t }\n\n \t $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_project2476); \n\n \t }\n \t break;\n\n \tdefault :\n \t if ( $cnt71 >= 1 ) break 2;//loop71;\n $eee =\n new EarlyExitException(71, $this->input);\n throw $eee;\n }\n $cnt71++;\n } while (true);\n\n\n }\n break;\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "public static function mapPath($pInputPath) {\n $ReturnValue = $pInputPath;\n if(preg_match('/^~\\//', $ReturnValue)) {\n // Application root path\n $ReturnValue = preg_replace('/^~\\//', str_replace('\\\\', '\\\\\\\\', Config::$AppSourcesPath) . '/', $ReturnValue);\n }\n else if(preg_match('/^@\\//', $ReturnValue)) {\n // Application root path\n $ReturnValue = preg_replace('/^@\\//', str_replace('\\\\', '\\\\\\\\', Config::$AppWebRootPath) . '/', $ReturnValue);\n }\n \n return $ReturnValue;\n }", "function ju_explode_xpath($p):array {return jua_flatten(array_map(function($s) {return explode('/', $s);}, ju_array($p)));}", "abstract protected function paths();", "public function include_json_folder($path = '')\n {\n }", "public function __construct($path)\n {\n $file = $path . '/composer.json';\n\n $this->path = (string) $path;\n\n $this->data = $this->parse($this->data);\n\n $json = file_get_contents($file);\n\n $json = json_decode($json, true);\n\n if (isset($json['staticka']))\n {\n $config = (array) $json['staticka'];\n\n $data = array_merge($this->data, $config);\n\n $this->data = $this->parse($data);\n }\n }", "public function finder()\n {\n $finder = new Finder();\n\n $base_path = get_input('path');\n $example = \"http://127.0.0.1:8011/finder?path=_html/my&ext=html&dirOnly=true&depth=1\";\n header('Content-type: application/json');\n\n if ($base_path == \"\" || $base_path == \"/\") {\n return json_encode([\n 'path' => $base_path,\n 'list' => '',\n 'data' => [],\n 'project_dir' => project_dir(),\n 'example' => $example,\n ]);\n }\n\n if (!is_dir(base_path($base_path))) {\n return json_encode([\n 'path' => $base_path,\n 'list' => '',\n 'data' => [],\n 'project_dir' => project_dir(),\n 'example' => $example,\n ]);\n }\n\n // start\n $data = [];\n\n $finder->ignoreUnreadableDirs()->in(base_path($base_path));\n\n if ((int)get_input(\"depth\", 0) == 0) {\n $finder->depth('== 0');\n } else if ($depth = (int)get_input(\"depth\", 0) > 0) {\n $finder->depth(\"<= {$depth}\");\n }\n\n //\n $list = 'files';\n if (get_input('dirOnly')) {\n // look for directories only; ignore files\n $finder->directories();\n $list = 'directories';\n } else {\n // look for files only; ignore directories\n $finder->files();\n if ($name = get_input('name')) {\n if (\\str_contains($name, \".\")) {\n $finder->name($name);\n } else {\n $finder->name(\"*.{$name}\");\n }\n }\n }\n\n // check if there are any search results\n if ($finder->hasResults()) {\n foreach ($finder as $file) {\n $data[] = \"{$base_path}/\" . $file->getRelativePathname();\n }\n }\n\n return json_encode([\n 'path' => $base_path,\n 'list' => $list,\n 'data' => $data,\n 'project_dir' => project_dir(),\n 'example' => $example,\n ]);\n }", "public function parse(string $filePath) : Repository;", "function ju_explode_path(string $p):array {return ju_explode_xpath(ju_path_n($p));}", "public function createStructure($path);", "public function projectAction()\n {\n $projectId = $this->getEvent()->getRouteMatch()->getParam('project');\n $p4Admin = $this->getServiceLocator()->get('p4Admin');\n\n try {\n $project = Project::fetch($projectId, $p4Admin);\n } catch (NotFoundException $e) {\n } catch (\\InvalidArgumentException $e) {\n }\n\n if (!$project) {\n return new JsonModel(array('readme' => ''));\n }\n\n $services = $this->getServiceLocator();\n $config = $services->get('config');\n $mainlines = isset($config['projects']['mainlines']) ? (array) $config['projects']['mainlines'] : array();\n $branches = $project->getBranches('name', $mainlines);\n\n // check each path of each mainline branch to see if there's a readme.md file present\n $readme = false;\n foreach ($branches as $branch) {\n foreach ($branch['paths'] as $depotPath) {\n if (substr($depotPath, -3) == '...') {\n $filePath = substr($depotPath, 0, -3);\n }\n\n // filter is case insensitive\n $filter = Filter::create()->add(\n 'depotFile',\n $filePath . 'readme.md',\n Filter::COMPARE_EQUAL,\n Filter::CONNECTIVE_AND,\n true\n );\n $query = Query::create()->setFilter($filter);\n $query->setFilespecs($depotPath);\n\n $fileList = File::fetchAll($query);\n // there may be multiple files present, break out of the loops on the first one found\n foreach ($fileList as $file) {\n $readme = File::fetch($file->getFileSpec(), $p4Admin, true);\n break(3);\n }\n }\n }\n\n if ($readme === false) {\n return new JsonModel(array('readme' => ''));\n }\n\n $services = $this->getServiceLocator();\n $helpers = $services->get('ViewHelperManager');\n $purifiedMarkdown = $helpers->get('purifiedMarkdown');\n\n $maxSize = 1048576; // 1MB\n $contents = $readme->getDepotContents(\n array(\n $readme::UTF8_CONVERT => true,\n $readme::UTF8_SANITIZE => true,\n $readme::MAX_FILESIZE => $maxSize\n )\n );\n\n // baseUrl is used for locating relative images\n return new JsonModel(\n array(\n 'readme' => '<div class=\"view view-md markdown\">' . $purifiedMarkdown($contents) . '</div>',\n 'baseUrl' => '/projects/' . $projectId . '/view/' . $branch['id'] . '/'\n )\n );\n }", "function simplifyPath($path);", "public function source() {\n\t\tif (count($this->passedArgs) == 1 && $this->passedArgs[0] == 'index') {\n\t\t\tarray_shift($this->passedArgs);\n\t\t}\n\t\t$currentPath = implode('/', $this->passedArgs);\n\t\t$previousPath = implode('/', array_slice($this->passedArgs, 0, count($this->passedArgs) -1));\n\t\tlist($dirs, $files) = $this->ApiFile->read($this->path . $currentPath);\n\t\t$this->set(compact('dirs', 'files', 'currentPath', 'previousPath'));\n\t}", "public function parseRecursive()\n {\n $this->isFileModified = false;\n $inputFile = new PhoreInputFile($this->logger);\n\n $envLoader = self::Config()->environmentLoader;\n if (is_callable($envLoader)) {\n $this->logger->debug(\"Running environment loader (defined in config)\");\n $this->environment = $envLoader();\n if ( ! is_array($this->environment))\n throw new \\InvalidArgumentException(\"environment-loader must return array. It returned \" . gettype($this->environment));\n }\n\n $this->templateDir->walkR(function(PhoreUri $relpath) use ($inputFile) {\n $relpath = phore_uri( substr( $relpath->getUri(), strlen($this->templateDir)));\n\n $this->logger->debug(\"Walking: $this->templateDir / $relpath...\");\n\n $inputFile->rewriteFile($relpath, $this->templateDir, $this->targetDir, $this->environment);\n });\n $this->isFileModified = $inputFile->isModified();\n }", "public function resolve(&$input) {\n $address= new RootOf($input);\n foreach ($this->path as $resolver) {\n $address= $resolver($address);\n }\n return $address;\n }", "public function __construct($input, $output)\n\t{\n\t\t$this->input = $input;\n\t\t$this->output = $output;\n\t\t$this->folder = 'Music'.'/';\n\t\t\n\t\t$aws = new AWS();\n\t\t$client = $aws->authElasticTranscoder();\n\t\t\n\t\t$result = $client->createJob(array(\n\t\t\t// PipelineId is required\n\t\t\t'PipelineId' => '1425787425117-1042wm',\n\t\t\t'Input' => array(\n\t\t\t\t'Key' => $this->folder.$input,\n\t\t\t\t'FrameRate' => 'auto',\n\t\t\t\t'Resolution' => 'auto',\n\t\t\t\t'AspectRatio' => 'auto',\n\t\t\t\t'Interlaced' => 'auto',\n\t\t\t\t'Container' => 'auto',\n\t\t\t),\n\t\t\t'Output' => array(\n\t\t\t\t'Key' => $this->folder.$output,\n\t\t\t\t'ThumbnailPattern' => '',\n\t\t\t\t'Rotate' => 'auto',\n\t\t\t\t'PresetId' => '1351620000001-300040' //128kb-s MP3 - CHANGE THIS\n\t\t\t)\n\t\t));\n\t\t\n\t\t//remove this if it works\n\t\t//echo \"<br>\";\n\t\t//echo \"FILE CONVERTED. \"; //prints if conversion was successful\n\t\t//echo \"<br>\";\n\t}", "public function convertFrom(/**\n * Find uploaded files.\n *\n * Extbase has already mapped the $_FILES data into the request\n * @see TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request::build()\n * If a $_FILES array is found in the request data ($source),\n * set the file mime type with\n * \\TYPO3\\CMS\\Core\\Type\\File\\FileInfo\n * and write the data back into $source.\n */\n$source, /**\n * Find uploaded files.\n *\n * Extbase has already mapped the $_FILES data into the request\n * @see TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request::build()\n * If a $_FILES array is found in the request data ($source),\n * set the file mime type with\n * \\TYPO3\\CMS\\Core\\Type\\File\\FileInfo\n * and write the data back into $source.\n */\n$targetType, /**\n * Find uploaded files.\n *\n * Extbase has already mapped the $_FILES data into the request\n * @see TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request::build()\n * If a $_FILES array is found in the request data ($source),\n * set the file mime type with\n * \\TYPO3\\CMS\\Core\\Type\\File\\FileInfo\n * and write the data back into $source.\n */\narray $convertedChildProperties = [ ], /**\n * Find uploaded files.\n *\n * Extbase has already mapped the $_FILES data into the request\n * @see TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request::build()\n * If a $_FILES array is found in the request data ($source),\n * set the file mime type with\n * \\TYPO3\\CMS\\Core\\Type\\File\\FileInfo\n * and write the data back into $source.\n */\nPropertyMappingConfigurationInterface $configuration = null) {}", "private function createProject()\n {\n $input = file_get_contents('prj.json');\n //echo $input;\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/projects?owner=wawong\";\n $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context.\"/projects?owner=wawong\";\n \n $params = json_decode($input);\n $data = json_encode($params); \n $response = $this->curl_post($url,$data);\n //echo \"\\nCreate project:\".$response.\"\\n\";\n \n $result = json_decode($response);\n $id = $result->_id;\n \n return $id;\n }", "private function parse_definition() {\n\t\t$project = json_decode(file_get_contents($this->root . \"/project.\" .\n\t\t\t$this->lang . \".json\"), true);\n\t\t$this->def_json = $project;\n\t\t\t\n\t\t$this->name = $project[\"name\"];\n\t\t$this->brief = $project[\"brief\"];\n\t\t$this->category = $project[\"category\"];\n\t}", "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}", "function jximport($path)\n{\n\tstatic $base;\n\n\tif (!$base) {\n\t\t$base = realpath(dirname(__FILE__));\n\t}\n\n\tif (strpos($path, 'jxtended') === 0) {\n\t\treturn JLoader::import($path, $base, '');\n\t} else {\n\t\treturn JLoader::import($path, null, 'libraries.');\n\t}\n}", "public function makeProject()\n {\n return $this->setDocumentPropertiesWithMetas(new PhpProject());\n }", "protected function setName($name){\n \n $ret_str = new Path($name);\n if($parent = $name->getParent()){\n \n $ret_str = new Path($parent,$ret_str->getFilename());\n \n }else{\n \n $ret_str = $ret_str->getFilename();\n \n }//if/else\n \n // all directory separators should be url separators...\n $ret_str = str_replace('\\\\','/',$ret_str);\n $this->setField('name',$ret_str);\n \n }" ]
[ "0.53944767", "0.49967393", "0.47559077", "0.46572292", "0.45760116", "0.45557475", "0.45509213", "0.45293993", "0.44663686", "0.44416854", "0.43869516", "0.43814242", "0.43777877", "0.43772352", "0.43731236", "0.43435293", "0.43368706", "0.42541504", "0.42481005", "0.42417005", "0.42178667", "0.42097512", "0.41989094", "0.4186831", "0.41813934", "0.41757056", "0.4171362", "0.41468006", "0.41231918", "0.411975" ]
0.6082634
0
Create a new default Setting instance from the definition
public function toSetting() { $setting = new Setting($this); $setting->key($this->key()); $setting->value($this->defaultValue()); return $setting; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createSetting(): Setting\n {\n return Setting::create('cache://double-backup');\n }", "public static function Create() {\n\t\t$s = new WP_United_Settings();\n\t\tif(!$s->load_from_wp()) {\n\t\t\treturn($s->load_from_phpbb());\n\t\t}\n\t\treturn $s;\n\t}", "public static function createFromDiscriminatorValue(ParseNode $parseNode): DeviceManagementConfigurationSettingInstance {\n $mappingValueNode = $parseNode->getChildNode(\"@odata.type\");\n if ($mappingValueNode !== null) {\n $mappingValue = $mappingValueNode->getStringValue();\n switch ($mappingValue) {\n case '#microsoft.graph.deviceManagementConfigurationChoiceSettingCollectionInstance': return new DeviceManagementConfigurationChoiceSettingCollectionInstance();\n case '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance': return new DeviceManagementConfigurationChoiceSettingInstance();\n case '#microsoft.graph.deviceManagementConfigurationGroupSettingCollectionInstance': return new DeviceManagementConfigurationGroupSettingCollectionInstance();\n case '#microsoft.graph.deviceManagementConfigurationGroupSettingInstance': return new DeviceManagementConfigurationGroupSettingInstance();\n case '#microsoft.graph.deviceManagementConfigurationSettingGroupCollectionInstance': return new DeviceManagementConfigurationSettingGroupCollectionInstance();\n case '#microsoft.graph.deviceManagementConfigurationSettingGroupInstance': return new DeviceManagementConfigurationSettingGroupInstance();\n case '#microsoft.graph.deviceManagementConfigurationSimpleSettingCollectionInstance': return new DeviceManagementConfigurationSimpleSettingCollectionInstance();\n case '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance': return new DeviceManagementConfigurationSimpleSettingInstance();\n }\n }\n return new DeviceManagementConfigurationSettingInstance();\n }", "public function __construct()\n {\n $this->setting = new Setting();\n }", "public static function newDefaultConfig(): self\n {\n return new static(self::_getDefaultConfig());\n }", "public static function factory()\n {\n $class = get_called_class();\n $object = new $class();\n foreach (static::getDefaults() as $field => $value) {\n $object->{$field} = $value;\n }\n return $object;\n }", "public function getDefaultSettings();", "public function createDefaultSetting($user) {\n\n /* @var $userData \\User\\Entity\\User */\n $userData = $user;\n\n $setting = new Setting();\n $setting->setUserId($userData->getId());\n $setting->setCeleJmeno(\"Nenastaveno\");\n $setting->setTelefon(\"Nenastaveno\");\n $setting->setUmisteni(\"Nenastaveno\");\n $setting->setUser($user);\n $setting->setEmail($userData->getEmail());\n\n $aktualni_datum = new \\DateTime(\"now\");\n $aktualni_datum->format('Y-m-d H:i:s');\n\n $setting->setLastOnline($aktualni_datum);\n\n\n $this->entityManager->persist($setting);\n // Apply changes to database.\n $this->entityManager->flush();\n }", "function create_object_settings() {\n if (!isset($this->settings)) {\n require_once($this->addon->dir . 'include/class.widget.settings.php');\n $this->settings = new SLPWidget_Legacy_Settings( array( 'addon' => $this->addon ) );\n }\n }", "public function set_defaults() {\n if (!empty($this->default_settings)) {\n $this->add($this->default_settings);\n }\n return $this;\n }", "public function getSetting( $name, $default = null );", "function addingRecordDefaultSettings(){\n\n $settings = parent::addingRecordDefaultSettings();\n\n for($i=0; $i< count($settings); $i++){\n\n switch($settings[$i][\"name\"]){\n\n case \"reportTitle\":\n $settings[$i][\"defaultValue\"] = \"Packing List\";\n\n }//endswitch\n\n }//end foreach\n\n return $settings;\n\n }", "abstract protected function getSetting() ;", "public static function createFromDiscriminatorValue(ParseNode $parseNode): NoTrainingNotificationSetting {\n return new NoTrainingNotificationSetting();\n }", "public static function createDefault()\n {\n return self::create(null);\n }", "public function setDefinition($definition) {\n $this->definition = $definition;\n return $this;\n }", "public function setSettingDefinitionId($val)\n {\n $this->_propDict[\"settingDefinitionId\"] = $val;\n return $this;\n }", "private function getSettings(){\n $settings = Auth::user()->settings;\n if(!$settings){\n $settings = new \\App\\Setting;\n $settings->user_id = Auth::id();\n foreach(Cons::$default_settings as $key => $value){\n $settings->{$key} = $value;\n }\n $settings->save();\n return Cons::$default_settings;\n }\n return $settings; // return created settings\n }", "function wponion_settings( $instance_id_or_args = array(), $fields = array() ) {\n\t\tif ( is_string( $instance_id_or_args ) && empty( $fields ) ) {\n\t\t\treturn wponion_settings_registry( $instance_id_or_args );\n\t\t}\n\t\treturn new Settings( $instance_id_or_args, $fields );\n\t}", "public function setSettingType($val)\n {\n $this->_propDict[\"settingType\"] = $val;\n return $this;\n }", "public function __construct(Setting $setting)\n {\n $this->setting = $setting;\n }", "public static function getDefault(){\n $permission = new Permission();\n $permission->enableRead = true; // default\n $permission->enableEdit = true; // default\n $permission->enableDelete = true; // default\n return $permission;\n }", "function baseSetting($key = null, $default = null)\n {\n if (is_null($key)) {\n return app('BaseSettings');\n }\n\n if (is_array($key)) {\n return app('BaseSettings')->set($key);\n }\n\n return app('BaseSettings')->get($key, $default);\n }", "public function __construct()\n {\n $this->settings = new Settings();\n }", "public function __construct()\n {\n $this->settings = new Settings();\n }", "public function __construct()\n {\n $this->settings = new Settings();\n }", "function buddyexpressdesk_settings(){\n $settings = new stdClass;\n\t$GET = new BDESK_DB;\n $GET->statement('SELECT * FROM bdesk_site LIMIT 1');\n $GET->execute();\n\t$defaults = $GET->fetch();\n\tforeach ($defaults as $name => $value) {\n\t\tif (empty($paths->$name)) {\n\t\t\t$settings->$name = $value;\n\t\t}\n\t}\n\treturn $settings;\n}", "protected function getDefaultStructureDefinition() {}", "public function initDefinition($definition) {\n\t\tparent::__construct($definition);\n\t}", "protected function createDefinition()\n {\n $definition = new WorkflowDefinition();\n $definition->Title = \"Dummy Workflow Definition\";\n $definition->write();\n\n $stepOne = new WorkflowAction();\n $stepOne->Title = \"Step One\";\n $stepOne->WorkflowDefID = $definition->ID;\n $stepOne->write();\n\n $stepTwo = new WorkflowAction();\n $stepTwo->Title = \"Step Two\";\n $stepTwo->WorkflowDefID = $definition->ID;\n $stepTwo->write();\n\n $transitionOne = new WorkflowTransition();\n $transitionOne->Title = 'Step One T1';\n $transitionOne->ActionID = $stepOne->ID;\n $transitionOne->NextActionID = $stepTwo->ID;\n $transitionOne->write();\n\n return $definition;\n }" ]
[ "0.61809975", "0.58918494", "0.58855385", "0.58460367", "0.58299977", "0.5791201", "0.5770059", "0.57444227", "0.57395524", "0.5618803", "0.55938256", "0.5559903", "0.5489986", "0.5488972", "0.5417204", "0.54155856", "0.5397831", "0.5367553", "0.53510624", "0.53473216", "0.534602", "0.5340939", "0.5339876", "0.53326076", "0.53326076", "0.53326076", "0.532391", "0.531951", "0.5300549", "0.52883756" ]
0.60716194
1
Returns a PSR11 compatible instance of the Pimple container used internally by Phanua.
public function getPsrContainer(): ContainerInterface { return new PsrContainer($this->getContainer()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setContainer(Pimple $container);", "public static function getContainer() : ContainerInterface\n {\n if (!self::$container) {\n self::$container = new SimpleContainer(); \n }\n \n return self::$container;\n }", "public function bootstrapSingletonContainer()\n {\n return new CompiledSingletonContainer();\n }", "public function getContainer();", "public function getContainer();", "public function getContainer();", "public function getContainer();", "public function getContainer();", "public function getContainer() {}", "public function container();", "public function bootstrapPrototypeContainer()\n {\n return new CompiledPrototypeContainer();\n }", "public function createContainer()\n {\n $mock = $this->getMockBuilder('Psr\\Container\\ContainerInterface')\n ->getMock();\n\n return $mock;\n }", "public function register(Container $pimple)\n {\n }", "public function __construct(Container $container);", "public function __construct(Container $container);", "public function get_container()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$container_filename = $this->get_container_filename();\n\t\t\t$config_cache = new ConfigCache($container_filename, defined('DEBUG'));\n\t\t\tif ($this->use_cache && $config_cache->isFresh())\n\t\t\t{\n\t\t\t\tif ($this->use_extensions)\n\t\t\t\t{\n\t\t\t\t\trequire($this->get_autoload_filename());\n\t\t\t\t}\n\n\t\t\t\trequire($config_cache->getPath());\n\t\t\t\t$this->container = new \\phpbb_cache_container();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->container_extensions = array(new extension\\core($this->get_config_path()));\n\n\t\t\t\tif ($this->use_extensions)\n\t\t\t\t{\n\t\t\t\t\t$this->load_extensions();\n\t\t\t\t}\n\n\t\t\t\t// Inject the config\n\t\t\t\tif ($this->config_php_file)\n\t\t\t\t{\n\t\t\t\t\t$this->container_extensions[] = new extension\\config($this->config_php_file);\n\t\t\t\t}\n\n\t\t\t\t$this->container = $this->create_container($this->container_extensions);\n\n\t\t\t\t// Easy collections through tags\n\t\t\t\t$this->container->addCompilerPass(new pass\\collection_pass());\n\n\t\t\t\t// Event listeners \"phpBB style\"\n\t\t\t\t$this->container->addCompilerPass(new RegisterListenersPass('dispatcher', 'event.listener_listener', 'event.listener'));\n\n\t\t\t\t// Event listeners \"Symfony style\"\n\t\t\t\t$this->container->addCompilerPass(new RegisterListenersPass('dispatcher'));\n\n\t\t\t\tif ($this->use_extensions)\n\t\t\t\t{\n\t\t\t\t\t$this->register_ext_compiler_pass();\n\t\t\t\t}\n\n\t\t\t\t$filesystem = new filesystem();\n\t\t\t\t$loader = new YamlFileLoader($this->container, new FileLocator($filesystem->realpath($this->get_config_path())));\n\t\t\t\t$loader->load($this->container->getParameter('core.environment') . '/config.yml');\n\n\t\t\t\t$this->inject_custom_parameters();\n\n\t\t\t\tif ($this->compile_container)\n\t\t\t\t{\n\t\t\t\t\t$this->container->compile();\n\n\t\t\t\t\tif ($this->use_cache)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->dump_container($config_cache);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($this->compile_container && $this->config_php_file)\n\t\t\t{\n\t\t\t\t$this->container->set('config.php', $this->config_php_file);\n\t\t\t}\n\n\t\t\t$this->inject_dbal_driver();\n\n\t\t\treturn $this->container;\n\t\t}\n\t\tcatch (\\Exception $e)\n\t\t{\n\t\t\t// Don't try to recover if we are in the development environment\n\t\t\tif ($this->get_environment() === 'development')\n\t\t\t{\n\t\t\t\tthrow $e;\n\t\t\t}\n\n\t\t\tif ($this->build_exception === null)\n\t\t\t{\n\t\t\t\t$this->build_exception = $e;\n\n\t\t\t\treturn $this\n\t\t\t\t\t->without_extensions()\n\t\t\t\t\t->without_cache()\n\t\t\t\t\t->with_custom_parameters(array_merge($this->custom_parameters, [\n\t\t\t\t\t\t'container_exception' => $e,\n\t\t\t\t\t]))\n\t\t\t\t\t->get_container();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Rethrow the original exception if it's still failing\n\t\t\t\tthrow $this->build_exception;\n\t\t\t}\n\t\t}\n\t}", "abstract protected function getContainer(): ContainerInterface;", "public function get_container() { return $this->container; }", "public function construct($className)\n {\n $construct = new Sabel_Container_Construct($className);\n $this->constructs[$className] = $construct;\n \n return $construct;\n }", "public function getContainer(): ContainerInterface\n {\n return parent::getContainer();\n }", "public function __construct(ContainerInterface $container);", "public function __construct(ContainerInterface $container);", "public function getContainer(): Container\n {\n $container = new Container();\n $this->register($container);\n return $container;\n }", "public function container(string $name);", "public function getDiContainer(): Container\n {\n return self::diContainer();\n }", "public function instance(): Container\n {\n return ($this->resolver)();\n }", "public function container() : ?Container;", "function get_container()\n{\n static $container = null;\n if (!$container) {\n $builder = new \\DI\\ContainerBuilder();\n $builder->addDefinitions(get_config()['di']);\n \n $container = $builder->build();\n }\n \n return $container;\n}", "public function getContainer(): Container {\n return $this->container;\n }", "public function __construct(){\n $this->container = new Container();\n }" ]
[ "0.60826445", "0.59276825", "0.5706258", "0.5629334", "0.5629334", "0.5629334", "0.5629334", "0.5629334", "0.5618194", "0.5552693", "0.54902273", "0.54070586", "0.53987265", "0.53984857", "0.53984857", "0.53801495", "0.5354155", "0.5281859", "0.5280649", "0.52775025", "0.52720344", "0.52720344", "0.5259445", "0.5199602", "0.51903045", "0.5170662", "0.51559275", "0.51296085", "0.51023793", "0.50873893" ]
0.5974699
1
Returns comparator for zend column $tableAlias AND $columnName
function zend_column_eq_dg($tableAlias, $columnName) { return function($descriptor)use($columnName,$tableAlias) { $colname = zend_column_name( $descriptor ); $tblalias = zend_column_table( $descriptor ); return $tblalias === $tableAlias && $colname === $columnName; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function columnToBooleanFunc()\n {\n return function ($tableName, $columnName) {\n $words = explode('_', $columnName);\n\n if (count($words) < 3) { // not considered a BOOLEAN column\n $name = false;\n } else {\n $tablePrefix = array_shift($words);\n $verb = strtolower(array_shift($words));\n\n if ($verb != 'is' && $verb != 'has') { // not considered a BOOLEAN column\n $name = false;\n } else {\n $name = $verb . implode('', array_map('ucfirst', $words));\n }\n }\n\n return $name;\n };\n }", "public function comparator()\n {\n return $this->comparator;\n }", "public function getSortColumn();", "function make_comparer() {\n $criteria = func_get_args();\n foreach ($criteria as $index => $criterion) {\n $criteria[$index] = is_array($criterion) ? array_pad($criterion, 3, null) : array($criterion, SORT_ASC, null);\n }\n\n return function($first, $second) use (&$criteria) {\n foreach ($criteria as $criterion) {\n // How will we compare this round?\n list($column, $sortOrder, $projection) = $criterion;\n $sortOrder = $sortOrder === SORT_DESC ? -1 : 1;\n\n // If a projection was defined project the values now\n if ($projection) {\n $lhs = call_user_func($projection, $first[$column]);\n $rhs = call_user_func($projection, $second[$column]);\n } else {\n $lhs = $first[$column];\n $rhs = $second[$column];\n }\n\n // Do the actual comparison; do not return if equal\n if ($lhs < $rhs) {\n return -1 * $sortOrder;\n } else if ($lhs > $rhs) {\n return 1 * $sortOrder;\n }\n }\n\n return 0; // tiebreakers exhausted, so $first == $second\n };\n }", "protected static function columnToGetterFunc()\n {\n return function ($tableName, $columnName) {\n $words = explode('_', $columnName);\n\n if (count($words) <= 1) { // no table prefix\n $name = 'get' . ucfirst($columnName);\n } else {\n $tablePrefix = array_shift($words);\n $name = 'get' . implode('', array_map('ucfirst', $words));\n }\n\n return $name;\n };\n }", "public function getComparator()\n {\n return $this->comparator;\n }", "public function getComparison();", "public function comparator();", "public function fetchCol($columnName);", "function make_comparer() {\n // Normalize criteria up front so that the comparer finds everything tidy\n $criteria = func_get_args();\n foreach ($criteria as $index => $criterion) {\n $criteria[$index] = is_array($criterion)\n ? array_pad($criterion, 3, null)\n : array($criterion, SORT_ASC, null);\n }\n\n return function($first, $second) use (&$criteria) {\n foreach ($criteria as $criterion) {\n // How will we compare this round?\n list($column, $sortOrder, $projection) = $criterion;\n $sortOrder = $sortOrder === SORT_DESC ? -1 : 1;\n\n // If a projection was defined project the values now\n if ($projection) {\n $lhs = call_user_func($projection, $first[$column]);\n $rhs = call_user_func($projection, $second[$column]);\n }\n else {\n $lhs = $first[$column];\n $rhs = $second[$column];\n }\n\n // Do the actual comparison; do not return if equal\n if ($lhs < $rhs) {\n return -1 * $sortOrder;\n }\n else if ($lhs > $rhs) {\n return 1 * $sortOrder;\n }\n }\n\n return 0; // tiebreakers exhausted, so $first == $second\n };\n}", "function getAdvComparator($comparator,$value,$datatype = '')\n\t{\n\n\t\tglobal $adb;\n\t\tif($comparator == \"e\")\n\t\t{\n\t\t\tif(trim($value) == \"NULL\")\n\t\t\t{\n\t\t\t\t$rtvalue = \" is NULL\";\n\t\t\t}elseif(trim($value) != \"\")\n\t\t\t{\n\t\t\t\t$rtvalue = \" = \".$adb->quote($value);\n\t\t\t}elseif(trim($value) == \"\" && $datatype == \"V\")\n\t\t\t{\n\t\t\t\t$rtvalue = \" = \".$adb->quote($value);\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$rtvalue = \" is NULL\";\n\t\t\t}\n\t\t}\n\t\tif($comparator == \"n\")\n\t\t{\n\t\t\tif(trim($value) == \"NULL\")\n\t\t\t{\n\t\t\t\t$rtvalue = \" is NOT NULL\";\n\t\t\t}elseif(trim($value) != \"\")\n\t\t\t{\n\t\t\t\t$rtvalue = \" <> \".$adb->quote($value);\n\t\t\t}elseif(trim($value) == \"\" && $datatype == \"V\")\n\t\t\t{\n\t\t\t\t$rtvalue = \" <> \".$adb->quote($value);\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$rtvalue = \" is NOT NULL\";\n\t\t\t}\n\t\t}\n\t\tif($comparator == \"s\")\n\t\t{\n\t\t\t$rtvalue = \" like \".$adb->quote($value.\"%\");\n\t\t}\n\t\tif($comparator == \"c\")\n\t\t{\n\t\t\t$rtvalue = \" like \".$adb->quote(\"%\".$value.\"%\");\n\t\t}\n\t\tif($comparator == \"k\")\n\t\t{\n\t\t\t$rtvalue = \" not like \".$adb->quote(\"%\".$value.\"%\");\n\t\t}\n\t\tif($comparator == \"l\")\n\t\t{\n\t\t\t$rtvalue = \" < \".$adb->quote($value);\n\t\t}\n\t\tif($comparator == \"g\")\n\t\t{\n\t\t\t$rtvalue = \" > \".$adb->quote($value);\n\t\t}\n\t\tif($comparator == \"m\")\n\t\t{\n\t\t\t$rtvalue = \" <= \".$adb->quote($value);\n\t\t}\n\t\tif($comparator == \"h\")\n\t\t{\n\t\t\t$rtvalue = \" >= \".$adb->quote($value);\n\t\t}\n\n\t\treturn $rtvalue;\n\t}", "public function getSortedByColumnName()\n {\n return $this->tableSortedBy;\n }", "protected function getWhereColumn()\n {\n $table = $this->getDoctrineTable();\n \n if ($this->getOption('column'))\n {\n return $table->getColumnName($this->getOption('column'));\n }\n\n $identifier = (array) $table->getIdentifier();\n $columnName = current($identifier);\n\n return $table->getColumnName($columnName);\n }", "private function getColumn($columnName)\n {\n $columns = array_filter(\n $this->columns,\n function ($column) use ($columnName) {\n return $column->name == $columnName;\n } // end anonymous array filter function\n ); // end arrayfilter\n\n return array_shift(\n $columns\n ); // end array_shift\n }", "public function getComparatorFor($expected, $actual);", "protected function getColumnGetter($name = 'version_column')\n {\n return 'get' . $this->getColumnPhpName($name);\n }", "public function column($selectorName, $propertyName = null, $columnName = null);", "public function quoteColumnName($columnName);", "public function getColumnPropertyName(string $columnName = ''): string\n {\n if ( !array_key_exists( $columnName, $this->columns ) ) {\n return '';\n }\n if ( !empty( $this->columns[$columnName]['property'] ) ) { //lookup\n return $this->columns[$columnName]['property'];\n }\n //convert 'camel_case' to 'camelCase'\n /*\n $propertyName = strtolower( $columnName );\n $propertyName = ucwords( $propertyName, '_' );\n $propertyName = lcfirst( $propertyName );\n $propertyName = str_replace( '_', '', $propertyName );\n return $propertyName ?? '';\n */\n\n return str_replace( '_', '',\n lcfirst(\n ucwords(\n strtolower( $columnName ),\n '_'\n )\n )\n ) ?? '';\n }", "function cmp_by_name($val1, $val2){\n return strcmp($val1->name, $val2->name);\n}", "function getColumn($table, $column, $compare_column, $id) {\n //get mysql object\n $mysql = new my_mysql();\n $query = \"SELECT $column FROM $table WHERE $compare_column='$id';\";\n $res = $mysql->readQuery($query);\n if ($res) {\n return $res->fetch_assoc()[$column];\n }else {\n return false;\n }\n}", "public function columnToProperty($columnName){\n\t\t$parts = explode('_', $columnName);\n\t\t$property = null;\n\n\t\tforeach($parts as $part){\n\t\t\tif($property === null){\n\t\t\t\t$property = $part;\n\t\t\t} else {\n\t\t\t\t$property .= ucfirst($part);\n\t\t\t}\n\t\t}\n\n\t\treturn $property;\n\t}", "private function realColumnAttribute($column_name)\r\n\t{\r\n\t\tif($this->pdo->options[LikePDO::ATTR_CASE] == LikePDO::CASE_LOWER)\r\n\t\t\treturn strtolower($column_name);\r\n\t\telseif($this->pdo->options[LikePDO::ATTR_CASE] == LikePDO::CASE_UPPER)\r\n\t\t\treturn strtoupper($column_name);\r\n\t\telse\r\n\t\t\treturn $column_name;\r\n\t}", "function getColumnToSort($builder, string $columnToSort = null)\n {\n # Fetch the table name.\n $table = $builder->getModel()->getTable();\n\n # Fetch the primary key (also become the fallback column to sort).\n $primaryKey = $builder->getModel()->getKeyName();\n\n # Check for the requested column presence.\n $columnPresent = \\Schema::hasColumn($table, $columnToSort);\n\n # Fallback to the primary key if the requested column is absent.\n if(!$columnPresent) {\n $columnToSort = $primaryKey;\n }\n\n return $columnToSort;\n }", "function columns_sortDiff($name, $column, $sortedBy, $options)\n\t{\n if ($options['orderBy'] != $column)\n $type = '';\n else\n $type = '-'. strtolower($options['sortedBy']);\n if((isset($options['searchFields']) && $options['searchFields'] != null) && (isset($options['search']) && $options['search'] != null))\n {\n \treturn sprintf('<th>\n\t\t \t\t\t\t\t%s\n\t\t\t\t\t\t \t<a href=\"?searchFields=%s&search=%s&orderBy=%s&sortedBy=%s&items_per_page=%s&in_trash=%s\"><i class=\"fa fa-sort%s\"></i></a>\n\t\t\t\t\t\t\t</th>', $name, $options['searchFields'], $options['search'], $column, $sortedBy, $options['items_per_page'], $options['in_trash'], $type);\n }\n else\n \treturn sprintf('<th>\n\t\t \t\t\t\t\t%s\n\t\t\t\t\t\t \t<a href=\"?orderBy=%s&sortedBy=%s&items_per_page=%s&in_trash=%s\"><i class=\"fa fa-sort%s\"></i></a>\n\t\t\t\t\t\t\t</th>', $name, $column, $sortedBy, $options['items_per_page'], $options['in_trash'], $type);\n\n\t}", "public static function compileName($columnName) {\n\t\t$columnName = trim($columnName, '`');\n\t\treturn '`' . $columnName . '`';\n\t}", "public function hasColumn($tableName, $columnName);", "public function getColumn(string $columnName)\n {\n if (!$this->isAllowed($columnName)) {\n return false;\n }\n\n $sql = sprintf('SELECT `%s` FROM `%s`', $columnName, static::getTableName());\n $stmt = static::getConn()->query($sql);\n\n $info = $stmt->errorInfo();\n if ($info[0] !== \\PDO::ERR_NONE) {\n die('We have : ' . $info[2]);\n }\n\n return $stmt->fetchAll(\\PDO::FETCH_COLUMN);\n }", "public function condition(string $field, string $compare, string $operator = \"=\", string $connector = \"AND\");", "public function getConditionColumn($str)\n {\n $a = explode('.', $str);\n if (count($a) == 1) {\n if(!$this->base) throw new \\Exception('WpSqlBuilder - Cannot guess table for condition if no base operation has been defined', 1);\n return new Column($str, false, $this->base );\n }\n return new Column($a[1], false, $this->addTable($a[0]) );\n }" ]
[ "0.58737093", "0.58212376", "0.57823455", "0.5628547", "0.56143266", "0.5588963", "0.555006", "0.55456907", "0.5475405", "0.54724264", "0.5443692", "0.5401216", "0.5373121", "0.53319675", "0.53292406", "0.5305154", "0.5276088", "0.5191582", "0.5133137", "0.5099904", "0.50903755", "0.5076677", "0.50714654", "0.5008072", "0.50058705", "0.4963889", "0.49398968", "0.49394906", "0.4858635", "0.48524204" ]
0.66788316
0
/ Displays the HEAD tag and its attributes
public function show_head() { $output = '<head>'; if( empty( $this->title ) ) { $this->title = "No Title Available"; } $output .= '<title>' . $this->title . '</title>'; $output .= $this->get_header_elements(); $output .= "\n</head>"; echo $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initialize () {\n $this->set_openingtag ( \"<HEAD[attributes]>\" );\n\t $this->set_closingtag ( \"</HEAD>\" );\n }", "function head()\n {\n print($this->_head);\n }", "public function head() {\n\t\treturn '';\n\t}", "private function renderHead() {\n\t\t\n\t\t\t$this->outputLine('<head>');\n\t\t\t\n\t\t\tif ($this->_title != '') {\n\t\t\t\t$this->outputLine('\t<title>' . $this->_title . '</title>');\n\t\t\t}\n\t\t\t\n\t\t\t$this->outputLine('\t<base href=\"' . $this->_base . '\" />');\n\t\t\t\n\t\t\t$this->outputLine('\t<meta http-equiv=\"content-type\" content=\"' . $this->_contentType . '\" />');\n\t\t\t\n\t\t\t//Meta\n\t\t\tforeach ($this->_meta as $meta) {\n\t\t\t\t$this->outputLine('\t<meta name=\"' . $meta->name . '\" content=\"' . $meta->content . '\" />');\n\t\t\t}\n\t\t\t\n\t\t\t//CSS\n\t\t\tforeach ($this->_css as $css) {\n\t\t\t\t$this->outputLine(\"\t\" . $css);\n\t\t\t}\n\t\t\t\n\t\t\t//JS\n\t\t\tforeach ($this->_js as $js) {\n\t\t\t\t$this->outputLine(\"\t\" . $js);\n\t\t\t}\n\t\t\t\n\t\t\t$this->outputLine('</head>');\n\t\t\n\t\t}", "function getHead() {\n return '';\n // return $this->document->getHead();\n }", "private function printHead()\n\t{\n\t\t$out = '<?xml version=\"1.0\" encoding=\"utf-8\"?>' . \"\\n\";\n\t\t$out .= $this->head . PHP_EOL;;\t\t\t\n\t\techo $out;\n\t}", "protected function getHeadTag() {\r\n\t\t$headTagContent = '';\r\n\t\tif (count($this->profile) > 0) {\r\n\t\t\t$headTagContent .= sprintf(' profile=\"%s\"', implode(',', $this->profile));\r\n\t\t}\r\n\t\tif (count($this->prefix) > 0) {\r\n\t\t\tforeach ($this->prefix as $k => $v) {\r\n\t\t\t\t$data[$k] = sprintf('%s: %s', $k, $v);\r\n\t\t\t}\r\n\t\t\t$headTagContent .= sprintf(' prefix=\"%s\"', implode(' ', $data));\r\n\t\t}\r\n\t\tif (!empty($headTagContent)) {\r\n\t\t\treturn sprintf('<head%s >', $headTagContent);\r\n\t\t}\r\n\t}", "public function head() {\r\n return '';\r\n }", "public function get_head()\n\t{\n\t\treturn $this->its_all_in_your_head;\n\t}", "protected function htmlHead() {\n echo \"<!DOCTYPE html>\\n\";\n echo \"<html>\\n\";\n echo str_repeat(\"\\t\",1) . \"<head>\\n\";\n echo str_repeat(\"\\t\",2) . \"<title>Евиденција волонтера</title>\\n\";\n echo str_repeat(\"\\t\",2) . \"<meta charset=\\\"UTF-8\\\">\\n\";\n echo str_repeat(\"\\t\",2) . \"<link rel=\\\"stylesheet\\\" href=\\\"css/style.css\\\">\\n\";\n if( !is_null($this->cssfile) ) {\n echo str_repeat(\"\\t\",2) . \"<link rel=\\\"stylesheet\\\" href=\\\"css/{$this->cssfile}\\\">\\n\";\n }\n echo str_repeat(\"\\t\",1) . \"</head>\\n\";\n }", "function head($coment, $tag, $attribute, $inner=''){\r\n\t\tif(!$tag){\r\n\t\t\t$this->Head[$coment] = '';\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$n = '';\r\n\t\t$attribute = $this->convertStringAtt($attribute);\r\n\t\t\r\n\t\tif($coment === null || $coment === '') $coment = 'sys_'.count($this->Head);\r\n\t\t\r\n\t\tif($tag == 'title' && !$inner){\r\n\t\t\t$inner = ' ';\r\n\t\t}\r\n\t\tif($tag == 'script'){\r\n\t\t\t$attribute['type'] = 'text/javascript';\r\n\t\t\tif($inner == '') $inner = ' ';\r\n\t\t\t\r\n\t\t\tif(isset($attribute['src'])){\r\n\t\t\t $attribute['src'] = str_replace('ROOT_VIRTUAL',$GLOBALS['BASIC']->ini_get('root_virtual'),$attribute['src']);\r\n\t\t\t}\r\n\t\t\tif($inner && $inner != ' ' && isset($attribute['src'])){\r\n\t\t\t\t$att = $attribute; unset($att['src']);\r\n\t\t\t\t$this->Head[$coment.'_inner'] = $n.$this->create($tag,$att,$inner);\r\n\t\t\t\t$inner = '';\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($tag == 'style'){\r\n\t\t\tif(isset($attribute['href'])) $tag = 'link';\r\n\t\t}\r\n\t\tif($tag == 'link'){\r\n\t\t\t$attribute['rel'] = 'stylesheet';\r\n\t\t\t$attribute['type'] = 'text/css';\r\n\t\t\t\r\n\t\t\tif(isset($attribute['href'])){\r\n\t\t\t $attribute['href'] = str_replace('ROOT_VIRTUAL',$GLOBALS['BASIC']->ini_get('root_virtual'),$attribute['href']);\r\n\t\t\t}\r\n\t\t\t$n = \"\\n\";\r\n\t\t}\r\n\t\t\r\n\t\t$this->Head[$coment] = $n.$this->create($tag,$attribute,$inner);\r\n\t}", "public function fetchHead($document)\n {\n $openSource=Factory::getOpenSource();\n\n if($openSource->is_rest_api()){\n return ;\n }\n // Convert the tagids to titles\n if (isset($document->_metaTags['name']['tags'])) {\n $tagsHelper = new TagsHelper;\n $document->_metaTags['name']['tags'] = implode(', ', $tagsHelper->getTagNames($document->_metaTags['name']['tags']));\n }\n\n if ($document->getScriptOptions()) {\n \\Html::_('behavior.core');\n }\n\n // Trigger the onBeforeCompileHead event\n\n // Get line endings\n $lnEnd = $document->_getLineEnd();\n $tab = $document->_getTab();\n $tagEnd = ' />';\n $buffer = '';\n $mediaVersion = $document->getMediaVersion();\n\n\n // Generate base tag (need to happen early)\n $base = $document->getBase();\n\n if (!empty($base)) {\n $buffer .= $tab . '<base href=\"' . $base . '\" />' . $lnEnd;\n }\n\n\n // Generate META tags (needs to happen as early as possible in the head)\n foreach ($document->_metaTags as $type => $tag) {\n foreach ($tag as $name => $content) {\n if ($type == 'http-equiv' && !($document->isHtml5() && $name == 'content-type')) {\n $buffer .= $tab . '<meta http-equiv=\"' . $name . '\" content=\"' . htmlspecialchars($content, ENT_COMPAT, 'UTF-8') . '\" />' . $lnEnd;\n } elseif ($type != 'http-equiv' && !empty($content)) {\n if (is_array($content)) {\n foreach ($content as $value) {\n $buffer .= $tab . '<meta ' . $type . '=\"' . $name . '\" content=\"' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '\" />' . $lnEnd;\n }\n } else {\n $buffer .= $tab . '<meta ' . $type . '=\"' . $name . '\" content=\"' . htmlspecialchars($content, ENT_COMPAT, 'UTF-8') . '\" />' . $lnEnd;\n }\n }\n }\n }\n\n // Don't add empty descriptions\n $documentDescription = $document->getDescription();\n\n if ($documentDescription) {\n $buffer .= $tab . '<meta name=\"description\" content=\"' . htmlspecialchars($documentDescription, ENT_COMPAT, 'UTF-8') . '\" />' . $lnEnd;\n }\n\n // Don't add empty generators\n $generator = $document->getGenerator();\n\n if ($generator) {\n $buffer .= $tab . '<meta name=\"generator\" content=\"' . htmlspecialchars($generator, ENT_COMPAT, 'UTF-8') . '\" />' . $lnEnd;\n }\n\n $buffer .= $tab . '<title>' . htmlspecialchars($document->getTitle(), ENT_COMPAT, 'UTF-8') . '</title>' . $lnEnd;\n\n\n $defaultCssMimes = array('text/css');\n\n // Generate stylesheet links\n\n\n\n\n\n\n\n\n\n // Generate stylesheet declarations\n foreach ($document->_style as $type => $content) {\n $buffer .= $tab . '<style';\n\n if (!is_null($type) && (!$document->isHtml5() || !in_array($type, $defaultCssMimes))) {\n $buffer .= ' type=\"' . $type . '\"';\n }\n\n $buffer .= '>' . $lnEnd;\n\n // This is for full XHTML support.\n if ($document->_mime != 'text/html') {\n $buffer .= $tab . $tab . '/*<![CDATA[*/' . $lnEnd;\n }\n\n $buffer .= $content . $lnEnd;\n\n // See above note\n if ($document->_mime != 'text/html') {\n $buffer .= $tab . $tab . '/*]]>*/' . $lnEnd;\n }\n\n $buffer .= $tab . '</style>' . $lnEnd;\n }\n\n // Generate scripts options\n $scriptOptions = $document->getScriptOptions();\n\n if (!empty($scriptOptions)) {\n $buffer .= $tab . '<script type=\"application/json\" class=\"WooBooking-script-options new\">';\n\n $prettyPrint = (WPBOOKING_PRO_DEBUG && defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : false);\n $jsonOptions = json_encode($scriptOptions, $prettyPrint);\n $jsonOptions = $jsonOptions ? $jsonOptions : '{}';\n\n $buffer .= $jsonOptions;\n $buffer .= '</script>' . $lnEnd;\n }\n\n $defaultJsMimes = array('text/javascript', 'application/javascript', 'text/x-javascript', 'application/x-javascript');\n $html5NoValueAttributes = array('defer', 'async');\n // Generate script file links\n\n\n\n\n return ltrim($buffer, $tab);\n }", "public function head() {\n\t\t$html = parent::head();\n\n\t\t$root = $this->course->root;\n $stepTag = $this->assignment->tag;\n\n $html .= <<<HTML\n<base href=\"$root/$stepTag/\" />\n\nHTML;\n\n\t\tif($this->file !== false) {\n\t\t\t/*\n\t\t\t * Transfer everything between <head> and </head>\n\t\t\t * except for the line automatically included by\n\t\t\t * the template\n\t\t\t */\n\n\t\t\t// Read until we get to <head>\n\t\t\twhile(($line = fgets($this->file)) != false) {\n\t\t\t\tif(stristr($line, '<head>')) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$code = $this->codeStart();\n\n\t\t\t// Read until </head>\n\t\t\twhile(($line = fgets($this->file)) != false) {\n\t\t\t\tif(stristr($line, '</head>')) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(stristr($line, 'course.css') ||\n stristr($line, 'site.css') ||\n\t\t\t\t\tstristr($line, 'class.css') ||\n\t\t\t\t\tstristr($line, 'course.min.js') ||\n\t\t\t\t\tstristr($line, 'step/step.js') ||\n\t\t\t\t\tstristr($line, 'step/step.css') ||\n\t\t\t\t\tstristr($line, 'js/jquery') ||\n\t\t\t\t\tstristr($line, 'lib/js/video-js') ||\n\t\t\t\t\tstristr($line, 'video.css') ||\n\t\t\t\t\tstristr($line, '<title>')) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$code .= $line;\n\t\t\t}\n\n\t\t\t// This block of code does an eval on the header lines of\n\t\t\t// the page and saves the results into a string\n\t\t\tob_start();\n\t\t\teval($code);\n\t\t\t$html .= ob_get_contents();\n\t\t\tob_end_clean();\n\t\t}\n\n\t\treturn $html;\n }", "private function renderHead() {\n\t\t$head = '<?xml version=\"1.0\" encoding=\"utf-8\"?>' . PHP_EOL;\n\t\tif (!empty($this->stylesheets))\n\t\t\t$head .= implode(PHP_EOL, $this->stylesheets);\n\n\t\tif ($this->type == 'RSS2') {\n\t\t\t$head .= $this->openTag('rss', array(\n\t\t\t\t\t\t\"version\" => \"2.0\",\n\t\t\t\t\t\t\"xmlns:content\" => \"http://purl.org/rss/1.0/modules/content/\",\n\t\t\t\t\t\t\"xmlns:atom\" => \"http://www.w3.org/2005/Atom\",\n\t\t\t\t\t\t\"xmlns:wfw\" => \"http://wellformedweb.org/CommentAPI/\")) . PHP_EOL;\n\t\t} elseif ($this->type == 'RSS1') {\n\t\t\t$head .= $this->openTag('rdf:RDF', array(\n\t\t\t\t\t\t\"xmlns:rdf\" => \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\",\n\t\t\t\t\t\t\"xmlns\" => \"http://purl.org/rss/1.0/\",\n\t\t\t\t\t\t\"xmlns:dc\" => \"http://purl.org/dc/elements/1.1/\"\n\t\t\t\t\t)) . PHP_EOL;\n\t\t} else if ($this->type == 'Atom') {\n\t\t\t$head .= $this->openTag('feed', array(\"xmlns\" => \"http://www.w3.org/2005/Atom\")) . PHP_EOL;\n\t\t}\n\t\treturn $head;\n\t}", "function getHead() {\n\n $out = \"\";\n\n if ($this->meta_keywords) array_push($this->head, \"<meta name='keywords' content='{$this->meta_keywords}' />\");\n if ($this->meta_description) array_push($this->head, \"<meta name='description' content='{$this->meta_description}' />\");\n\n foreach ($this->head as $string) {\n $out .= \" $string\\n\";\n }\n return \"\\n$out\\n\";\n }", "protected function setHeadTags()\n {\n $strTagClose = ($GLOBALS['objPage']->outputFormat == 'xhtml')\n ? ' />'\n : '>';\n\n // Add rel=\"prev\" and rel=\"next\" links (see #3515)\n if ($this->hasPrevious()) {\n $GLOBALS['TL_HEAD'][] = '<link rel=\"prev\" href=\"' .\n $this->linkToPage($this->intPage - 1) .\n '\"' . $strTagClose;\n }\n if ($this->hasNext()) {\n $GLOBALS['TL_HEAD'][] = '<link rel=\"next\" href=\"' .\n $this->linkToPage($this->intPage + 1) .\n '\"' . $strTagClose;\n }\n }", "function setHead($tagName,$attributes,$inner = '',$index = ''){\r\n\t\t$this->head($index,$tagName,$attributes,$inner);\r\n\t}", "private function _print_html_head()\n\t{\n\t\t$output = \"<head>\\n\";\n\t\t$output .= \"<title>{$this->title}</title>\\n\";\n\t\t$output .= $this->_print_html_head_metatags();\n\t\t$output .= $this->_print_html_head_javascript();\n\t\t$output .= $this->_print_html_head_css();\n\t\t$output .= \"</head>\\n<body>\\n\";\n\t\t\n\t\treturn $output;\n\t}", "function add_head_tag($tag)\n {\n $this->addHeadTag($tag);\n }", "public function head() {\n return $this->head ;\n }", "function head() {\n\n\techo '<h1>ATOM.CMS</h1>';\n\t\n}", "protected function printHead($prefix='')\n {\n echo $prefix.'<HEAD>';\n if($this->getBrowserName() === 'IE')\n {\n $this->printIeCompatability($prefix.$prefix);\n }\n echo $prefix.$prefix.'<TITLE>'.$this->title.'</TITLE>';\n echo $prefix.$prefix.'<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">';\n foreach($this->head_tags as $tag)\n {\n echo $prefix.$prefix.$tag.\"\\n\";\n }\n echo $prefix.'</HEAD>';\n }", "public function getHead()\n {\n return $this->head;\n }", "public function head()\n {\n $this->method = 'HEAD';\n return $this;\n }", "private function _print_html_head_metatags()\n\t{\n\t\treturn \"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset={$this->charset}\\\" />\\n\";\n\t}", "function start_head($extra = '')\n{\n /**\n * Starting the HTML head section\n *\n * Args:\n * $extra (str): extra data in the tag - used for adding class / ID etc.\n */\n start_tag('head', Tab(1), true, $extra) ;\n}", "static function head($content='') {\n\t\t$content = self::meta('charset') . $content; //auto-prepend charset because it's always needed\n\t\treturn self::tag('head', false, $content);\n\t}", "function showHead($title='') {\n\tglobal $template, $config;\n?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head>\n<title><?=$title?></title>\n<link href=\"<?=joinPath($config['site_absolute_url'],'/')?>css/style.css\" rel=\"stylesheet\" type=\"text/css\" />\n<script src=\"<?=joinPath($config['site_absolute_url'],'/')?>js/JSL.js\" type=\"text/javascript\"></script>\n<script src=\"<?=joinPath($config['site_absolute_url'],'/')?>js/application.js\" type=\"text/javascript\"></script>\n<?=implode($template->includes,\"\\n\");?>\n<?php\n}", "public static function includeHeadLinks()\n {\n $code = '';\n foreach (self::$_headLinks as $link) {\n $code .= \"<link href=\\\"{$link['href']}\\\" {$link['attrs']} />\".PHP_EOL;\n }\n\n return $code;\n }", "function HTML_StartHead(){\n\t\techo \"<!DOCTYPE html>\\n\";\n\t\techo \"<html>\\n\";\n\t\techo \"<head>\\n\";\n}" ]
[ "0.7123546", "0.70284015", "0.7017039", "0.69447273", "0.6916125", "0.69063747", "0.6890879", "0.6838689", "0.68221796", "0.67863965", "0.6752934", "0.67423", "0.673253", "0.67173666", "0.6688712", "0.66629577", "0.66517055", "0.65999156", "0.6590683", "0.6574909", "0.6517952", "0.64612794", "0.645062", "0.64328194", "0.6419691", "0.6387514", "0.63558054", "0.63555807", "0.63464856", "0.634467" ]
0.71008784
1
Gets an array of the flags present in the bitmask
public function getFlags() : array { $arrFlags = []; foreach (self::FLAGS as $strFlag => $intBitValue) { if ($this->_checkFlag($strFlag)) { $arrFlags[] = self::OUTPUT[$strFlag]; } } return $arrFlags; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFlags(): array\n {\n return array_keys($this->_flags);\n }", "public function getFlags(): array\n {\n return $this->flags;\n }", "public static function getBitmaskFlags($bitmask,$flags = array()) \r\n {\r\n $flags_set = array();\r\n foreach($flags as $i => $flag) {\r\n $bit = pow(2,$i);\r\n if($bitmask & $bit) $flags_set[] = $flag; \r\n } \r\n return $flags_set; \r\n }", "public function getFlags(): array {\n\t\treturn $this->flags;\n\t}", "public function getFlags();", "public function getFlags() {}", "public function getFlags() {}", "public function getFlags() {}", "public function getFlags() {}", "public function getUserFlags() : array\n {\n if ($this->flags !== null) {\n return $this->flags;\n }\n\n $this->flags = [];\n $usergroups = $this->usergroups;\n\n foreach ($usergroups as $usergroup) {\n $group = $usergroup->group;\n $flags = $group->flags;\n\n if (!empty($flags)) {\n $this->flags = array_merge($this->flags, $flags);\n }\n }\n\n return $this->flags;\n }", "private function getFlags () : array\n\t{\n\t\tif (null === $this->flags)\n\t\t{\n\t\t\t$this->flags = !$this->isDebug\n\t\t\t\t? $this->cache->get(self::CACHE_KEY, [$this->featuresFileLoader, \"load\"])\n\t\t\t\t: $this->featuresFileLoader->load();\n\t\t}\n\n\t\treturn $this->flags;\n\t}", "protected function getAllFlags()\n {\n $this->methodExpectsRequest(__METHOD__);\n return $this->getRequest()->getAllFlags();\n }", "public function getForecastFlags() : array\n {\n $data = $this->getForecast();\n return $data[self::FLAGS_KEY] ?? [];\n }", "public function getFlags(): ?array\n {\n return $this->flags;\n }", "public function getFlags()\n {\n }", "function getFlags(): int;", "public function currentFlags()\n {\n $roles = $this->flags;\n $roleIds = false;\n if( !empty( $roles ) ) {\n $roleIds = array();\n foreach( $roles as &$role )\n {\n $roleIds[] = $role->id;\n }\n }\n return $roleIds;\n }", "protected function getValidMasks()\n {\n return array_reduce(array_keys($this->lookupConstants), function ($validMasks, $key) {\n return $validMasks |= $key;\n }, 0);\n }", "public function getFlags()\n {\n return $this->flags;\n }", "public function getFlags()\n {\n return $this->flags;\n }", "public function getFlags()\n {\n\n }", "public function getBits();", "public function getFlags()\n\t\t{\n\t\t\tif ($this->flags === NULL)\n\t\t\t{\n\t\t\t\t$this->flags = new ECash_Application_Flags($this->db, $this->application_id, $this->getCompanyId());\n\t\t\t}\n\n\t\t\treturn $this->flags;\n\t\t}", "public function getFlags()\n {\n return $this->flags;\n }", "public function getAMAFlags();", "private function doGetOrdinalsInt()\n {\n /** @var int $bitset */\n $bitset = $this->bitset;\n $ordinals = [];\n $count = $this->enumerationCount;\n for ($ordinal = 0; $ordinal < $count; ++$ordinal) {\n if ($bitset & (1 << $ordinal)) {\n $ordinals[] = $ordinal;\n }\n }\n return $ordinals;\n }", "public function getEnumValues()\n {\n return array(\n 'true' => self::true,\n 'false' => self::false,\n );\n }", "function extractFlags() {\r\n\t \t$query = \"SELECT Option1, Option2, Option3 FROM flags\";\r\n\t\t$result = mysql_query($query);\r\n\t\t$value = mysql_fetch_assoc($result);\r\n\t\t\r\n\t\treturn $value;\r\n\t}", "public function getFlags($flags) \n {\n return $this->_flags; \n }", "function permissions_get ()\n{\n\tstatic $perms = array (\n\t\t\t\"read\"\t\t=> 0x0001,\n\t\t\t\"create\"\t=> 0x0002,\n\t\t\t\"change\"\t=> 0x0004,\n\t\t\t\"delete\"\t=> 0x0008,\n\t\t\t\"password\"\t=> 0x0040,\n\t\t\t\"admin\"\t\t=> 0x8000,\t// admin\n\t\t\t);\n\treturn $perms;\n}" ]
[ "0.76039076", "0.75775355", "0.753407", "0.7465998", "0.7119763", "0.69031405", "0.69031405", "0.69031405", "0.69031405", "0.68013984", "0.67763865", "0.6757261", "0.6719192", "0.66437894", "0.6363713", "0.6343777", "0.633288", "0.6295094", "0.606224", "0.606224", "0.6049168", "0.602867", "0.60250026", "0.60043895", "0.5969472", "0.5848895", "0.583884", "0.5779562", "0.57522136", "0.5744706" ]
0.78170055
0
Get the image as a string, resize it to the desired dimensions and compress it in jpeg, upload it to S3.
public function resizeAndUploadToS3($width, $height, $imageString, $destinationPath) { $isPictureString = starts_with( $imageString, 'data:image' ); if ( ! $isPictureString) { return $imageString; } $prefix = 'data:image/png;base64,'; $base64 = substr($imageString, strlen($prefix)); $image = ImageResize::createFromString(base64_decode($base64)); // resize the image if ($height && $width) { $image->resize($width, $height); } elseif ($height) { $image->resizeToHeight($height); } elseif ($width) { $image->resizeToWidth($width); } $image->quality_jpg = 100; $imageString = $image->getImageAsString(IMAGETYPE_JPEG); return $this->savePictureToS3( $imageString, $destinationPath ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function upload_image($dst, $src) {\n global $amazonconfig;\n $s3 = new S3($amazonconfig->api->access_key, $amazonconfig->api->secret);\n\n $parts = explode('/', $dst);\n $bucket = $parts[1];\n $path = str_replace(\"/$bucket/\", '', $dst);\n $filename = $parts[sizeof($parts)-1];\n\n try{\n if(!$s3->putBucket($bucket, S3::ACL_PUBLIC_READ)) {\n return false;\n }\n\n if(filter_var($src, FILTER_VALIDATE_URL)){\n $newsrc = \"/tmp/$filename\";\n if(!file_put_contents($newsrc, file_get_contents($src))) {\n return false;\n }\n $src = $newsrc;\n }\n\n $server = $amazonconfig->api->s3->url;\n if ($s3->putObject($s3->inputFile($src, false), $bucket, $path, S3::ACL_PUBLIC_READ)) {\n return $server.\"/\".$bucket.\"/\".$path;\n }else {\n return false;\n }\n } catch (Exception $e) {\n return false;\n }\n\n}", "function sharpen_resized_jpeg_images($resized_file) {\r\n $image = wp_load_image($resized_file); \r\n if(!is_resource($image))\r\n return new WP_Error('error_loading_image', $image, $file); \r\n $size = @getimagesize($resized_file);\r\n if(!$size)\r\n return new WP_Error('invalid_image', __('Could not read image size'), $file); \r\n list($orig_w, $orig_h, $orig_type) = $size; \r\n switch($orig_type) {\r\n case IMAGETYPE_JPEG:\r\n $matrix = array(\r\n array(-1, -1, -1),\r\n array(-1, 16, -1),\r\n array(-1, -1, -1),\r\n ); \r\n $divisor = array_sum(array_map('array_sum', $matrix));\r\n $offset = 0; \r\n imageconvolution($image, $matrix, $divisor, $offset);\r\n imagejpeg($image, $resized_file,apply_filters('jpeg_quality', 90, 'edit_image'));\r\n break;\r\n case IMAGETYPE_PNG:\r\n return $resized_file;\r\n case IMAGETYPE_GIF:\r\n return $resized_file;\r\n } \r\n return $resized_file;\r\n}", "public function resizeAndSaveImage($imagePath, $dimensions, $cutToFit = false)\n\t{\n\t\tif (!$this->awsService->isFile($imagePath)) {\n\t\t\treturn array($imagePath, null, null);\n\t\t}\n\n\t\t$info = pathinfo($imagePath);\n\n\t\t$imageDir = $info['dirname'].'/';\n\t\t$imageName = basename($imagePath);\n\n\t\t////////////////////////////////////////\n\t\t// read dimensions\n\t\t////////////////////////////////////////\n\t\t$dim = explode('x', $dimensions);\n\t\t$newWidth = isset($dim[0]) ? $dim[0] : null;\n\t\t$newHeight = isset($dim[1]) ? $dim[1] : null;\n\t\ttry {\n\t\t\t$resizedImageName = Strings::webalize(basename($imagePath, '.' . $info['extension']))\n\t\t\t\t. '-' . $newWidth\n\t\t\t\t. 'x'\n\t\t\t\t. $newHeight\n\t\t\t\t. '.'\n\t\t\t\t. $info['extension'];\n\t\t\t$resizedImagePath = $imageDir . $resizedImageName;\n\n\t\t\t// check if resized image is already on s3, if yes, return, if not, generate and save\n\t\t\tif ($this->awsService->isFile($resizedImagePath)) {\n\t\t\t\t$resizedImagePath = $this->baseUrl . $resizedImagePath;\n\t\t\t\t$result = array($resizedImagePath, $newWidth, $newHeight);\n\t\t\t\treturn $result;\n\t\t\t}\n\n\t\t\t// need to download the original image and convert the sizes\n\t\t\t$tempImagePath = $this->tempDir . $imageName;\n\n\t\t\t// download image from s3 to temporary directory\n\t\t\t$this->awsService->downloadFile($imagePath, $tempImagePath);\n\n\t\t\t// load and resize image\n\t\t\t$image = Image::fromFile($tempImagePath);\n\t\t\tif ($cutToFit) {\n\t\t\t\tif ($image->height > $image->width) {\n\t\t\t\t\t$image->resize($newWidth, $newHeight, Image::FILL);\n\t\t\t\t\t$image->sharpen();\n\t\t\t\t\t$blank = Image::fromBlank($newWidth, $newHeight, Image::rgb(255, 255, 255));\n\t\t\t\t\t$blank->place($image, 0, '20%');\n\t\t\t\t\t$image = $blank;\n\t\t\t\t} else {\n\t\t\t\t\t$image->resize($newWidth, $newHeight, Image::FILL | Image::EXACT);\n\t\t\t\t\t$image->sharpen();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$image->resize((int) $newWidth, (int) $newHeight, Image::SHRINK_ONLY);\n\t\t\t\t$image->sharpen();\n\t\t\t}\n\n\t\t\t// generate new image\n\t\t\t$image->save($tempImagePath, 85); // 85% quality\n\t\t\t// upload file to s3 storage\n\t\t\t$this->awsService->uploadFile($tempImagePath, $resizedImagePath);\n\n\t\t\t$result = array($this->baseUrl . $resizedImagePath, $image->width, $image->height);\n\n\t\t\t// free memory\n\t\t\t$image = null;\n\t\t\tunset($image);\n\t\t\t// remove temporary file\n\t\t\tif(file_exists($tempImagePath)) unlink($tempImagePath);\n\t\t\treturn $result;\n\t\t} catch (\\Exception $e) {\n\t\t\t//$this->logger->logError($e);\n\t\t\treturn array($this->baseUrl . $imagePath, null, null);\n\t\t}\n\n\t}", "public function uploadToS3($image)\n {\n //force all image to be jpg for now?\n $filename = date(\"YmdHis_\").str_random(10).'.jpg';\n\n $s3 = Storage::disk('s3');\n $dir = \"img/\";\n $key = $dir.$filename;\n $s3->put($key, (string) $image);\n $client = $s3->getDriver()->getAdapter()->getClient();\n $bucket = Config::get('filesystems.disks.s3.bucket');\n\n return (string) $client->getObjectUrl($bucket, $key);\n }", "function getImageFromS3($target_id, $type_origin = 0, $ordered = 1) {\n\n $CI = & get_instance();\n $CI->load->library('AppUploader');\n $path = '';\n if ($type_origin == '1') {\n $type = 'nursery';\n $path = 'upload/nursery/default.jpg';\n } elseif ($type_origin == '2') {\n $type = 'job';\n $path = 'upload/job/default.jpg';\n } elseif ($type_origin == '3') {\n $type = 'client';\n $path = 'upload/client/default.jpg';\n } elseif ($type_origin == '4') {\n $type = 'careeradviser';\n $path = 'upload/careeradviser/default.jpg';\n } elseif ($type_origin == '5') {\n $type = 'ads';\n }else {\n $type = 'tmp';\n }\n if ($ordered) {\n $path = 'upload/' . $type . '/' . $target_id . '_' . $ordered . '.jpg';\n }\n\n $ret['path'] = $CI->appuploader->getObjectUrl($path);\n\n // TODO\n // $thumnail = 'upload/' . $type . '/' . $target_id . '_' . $ordered . '_thumbnail.jpg';\n // $ret['thumbnail'] = $CI->appuploader->getObjectUrl($thumnail);\n\n return $ret;\n}", "function s3upload($imageObject, $newImageName, $uploadToTemp = false, $imgRealPath = null, $targetBucket = null)\n{\n try {\n global $globalConfig;\n if (true == is_null($targetBucket)) {\n\n $bucketName = $globalConfig['s3']['bucketName'];\n\n //check if we need to upload files to s3 temp directory\n if ($uploadToTemp) {\n $bucketName = $globalConfig['s3']['locations']['temp'];\n }\n } else {\n $bucketName = trim($targetBucket, '/ ');\n }\n\n if ($imgRealPath == null) {\n\n $imgRealPath = $imageObject->getRealPath();\n }\n\n $s3 = \\Illuminate\\Support\\Facades\\App::make('aws')->get('s3');\n $strSearch = array('(', ')', '[', ']', '{', '}');\n $newImageName = str_replace($strSearch, '', $newImageName);\n\n // Check bucket name is valid\n $isUploaded = $s3->putObject(array(\n 'Bucket' => $bucketName,\n 'Key' => $newImageName,\n 'SourceFile' => $imgRealPath,\n 'ACL' => 'public-read-write',\n 'ContentType' => mime_content_type($imgRealPath)\n ));\n\n if ($isUploaded) {\n return 'https://' . $bucketName . '/' . $newImageName;\n } else {\n return false;\n }\n } catch (Exception $e) {\n die(exception($e));\n }\n}", "function uploadimagetos3(string $fileimage, string $bucketname, string $ext) {\n $imagename = uniqid() . '.' . $ext;\n try {\n $reponse = $this->s3->putObject([\n 'Bucket' => $bucketname,\n 'Key' => $imagename,\n 'Body' => $this->imageread($fileimage)\n ]);\n $reponse['@metadata']['imagename'] = $imagename;\n return $reponse['@metadata'];\n } catch (Aws\\S3\\Exception\\S3Exception $e) {\n return array('statusCode' => 500);\n }\n }", "function compress_image($source_url, $destination_url, $quality) \n { \n $info = getimagesize($source_url); \n if ($info['mime'] == 'image/jpeg') \n {$image = imagecreatefromjpeg($source_url); }\n else if ($info['mime'] == 'image/gif') \n {$image = imagecreatefromgif($source_url); }\n else if ($info['mime'] == 'image/png') \n {$image = imagecreatefrompng($source_url); }\n imagejpeg($image, $destination_url, $quality); \n return $destination_url; \n }", "private function create_thumbnail($s3, $key, $filename)\n {\n // Create Same Size Thumbnail\n $f = TMP . $filename;\n $src_image = imagecreatefromjpeg($f);\n\n // get size\n $width = ImageSx($src_image);\n $height = ImageSy($src_image);\n\n // Tatenaga...\n if ($height > $width * 0.75) {\n $src_y = (int) ($height - ($width * 0.75));\n $src_h = $height - $src_y;\n $src_x = 0;\n $src_w = $width;\n } else {\n // Yokonaga\n $src_y = 0;\n $src_h = $height;\n $src_x = 0;\n $src_w = $height / 0.75;\n }\n\n // get resized size\n $dst_w = 320;\n $dst_h = 240;\n\n // generate file\n $dst_image = ImageCreateTrueColor($dst_w, $dst_h);\n ImageCopyResampled($dst_image, $src_image, 0, 0, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);\n\n imagejpeg($dst_image, TMP . $key . '/thumbnail.jpg');\n\n // store thumbnail to S3\n $s3->putObject(array(\n 'Bucket' => Configure::read('image_bucket_name'),\n 'Key' => $key . '/thumbnail.jpg',\n 'SourceFile' => TMP . $key . '/thumbnail.jpg',\n 'ContentType' => 'image/jpeg',\n 'ACL' => 'public-read',\n 'StorageClass' => 'REDUCED_REDUNDANCY',\n ));\n }", "public function resizeImage($request)\n {\n $returnType = '\\SplFileObject';\n $isBinary = true;\n $hasReturnType = true;\n $request = $this->getHttpRequest($request, 'GET');\n $options = $this->createHttpClientOptions();\n \n try {\n $response = $this->client->send($request, $options);\n return $this->processResponse($request, $response, $hasReturnType, $returnType, $isBinary);\n } catch (RequestException $e) {\n $this->processException($e);\n }\n }", "function compress($source, $destination) {\n\n // Get the dimensions of the image\n list($img_in_width, $img_in_height) = getimagesize($source);\n\n // Define the output width\n $out_width = 200;\n \n // Define the height based on the aspect ratio\n $out_height = $out_width * $img_in_height / $img_in_width;\n\n // Create an output image\n $img_out = imagecreatetruecolor($out_width, $out_height);\n \n // Load the input image\n $img_in = imagecreatefromjpeg($source);\n \n // Copy the contents of the image to the output, resizing in the process\n imagecopyresampled($img_out, $img_in, 0, 0, 0, 0, $out_width, $out_height, $img_in_width, $img_in_height);\n \n // Save the file as a JPEG image to the destination\n imagejpeg($img_out, $destination);\n}", "function compress_image($source_file, $target_file, $nwidth, $nheight, $quality) {\n $image_info = getimagesize($source_file);\n if(!($nwidth > 0)) $nwidth = $image_info[0];\n if(!($nheight > 0)) $nheight = $image_info[1];\n \n if(!empty($image_info)) {\n switch($image_info['mime']) {\n case 'image/jpeg' :\n if($quality == '' || $quality < 0 || $quality > 100) $quality = 75; //Default quality\n // Create a new image from the file or the url.\n $image = imagecreatefromjpeg($source_file);\n $thumb = imagecreatetruecolor($nwidth, $nheight);\n //Resize the $thumb image\n imagecopyresized($thumb, $image, 0, 0, 0, 0, $nwidth, $nheight, $image_info[0], $image_info[1]);\n // Output image to the browser or file.\n return imagejpeg($thumb, $target_file, $quality); \n \n break;\n \n case 'image/png' :\n if($quality == '' || $quality < 0 || $quality > 9) $quality = 6; //Default quality\n // Create a new image from the file or the url.\n $image = imagecreatefrompng($source_file);\n $thumb = imagecreatetruecolor($nwidth, $nheight);\n //Resize the $thumb image\n imagecopyresized($thumb, $image, 0, 0, 0, 0, $nwidth, $nheight, $image_info[0], $image_info[1]);\n // Output image to the browser or file.\n return imagepng($thumb, $target_file, $quality);\n break;\n \n case 'image/gif' :\n if($quality == '' || $quality < 0 || $quality > 100) $quality = 75; //Default quality\n // Create a new image from the file or the url.\n $image = imagecreatefromgif($source_file);\n $thumb = imagecreatetruecolor($nwidth, $nheight);\n //Resize the $thumb image\n imagecopyresized($thumb, $image, 0, 0, 0, 0, $nwidth, $nheight, $image_info[0], $image_info[1]);\n // Output image to the browser or file.\n return imagegif($thumb, $target_file, $quality); //$success = true;\n break;\n \n default:\n echo \"<h4>Not supported file type!</h4>\";\n break;\n }\n }\n }", "public function createResizedImage($request)\n {\n $returnType = '\\SplFileObject';\n $isBinary = true;\n $hasReturnType = true;\n $request = $this->getHttpRequest($request, 'POST');\n $options = $this->createHttpClientOptions();\n \n try {\n $response = $this->client->send($request, $options);\n return $this->processResponse($request, $response, $hasReturnType, $returnType, $isBinary);\n } catch (RequestException $e) {\n $this->processException($e);\n }\n }", "function convertImageToURLAtS3($datasrc, $design_id, $key3, $type, $image_container_object, $uid = NULL) {\n global $base_secure_url;\n $curr_date = time();\n $nodeerify = preg_match('/data:([^;]*);base64,(.*)/', $datasrc, $match);\n if ($nodeerify) {\n if($type == 'static_image'){\n $filename = $design_id . '.jpg';\n $new_file = 'public://files/'.$uid.'/kmds/images/static_image/' . $filename;\n }\n else {\n $filename = $design_id . '_' . $key3 . '_' . $curr_date . '_' . $type . '.jpg';\n $new_file = 'public://files/'.$uid.'/kmds/images/template_crop_image/' . $filename;\n }\n //$new_uri = file_create_url($new_file);\n //$b64image = '';\n $data_raw = explode(',', $datasrc);\n //if(isset($image_container_object->width)){\n if(isset($data_raw[1])){\n $base64_data = base64_decode($data_raw[1]);\n file_put_contents($new_file, $base64_data);\n $source_original = file_create_url($new_file);\n return $source_original;\n }\n }\n else {\n return $datasrc;\n }\n }", "public function image_resize($width = 0, $height = 0, $image_url, $filename, $upload_url)\n {\n $source_path = realpath($image_url);\n list($source_width, $source_height, $source_type) = getimagesize($source_path);\n switch ($source_type)\n {\n case IMAGETYPE_GIF:\n $source_gdim = imagecreatefromgif($source_path);\n break;\n case IMAGETYPE_JPEG:\n $source_gdim = imagecreatefromjpeg($source_path);\n break;\n case IMAGETYPE_PNG:\n $source_gdim = imagecreatefrompng($source_path);\n break;\n }\n\n $source_aspect_ratio = $source_width / $source_height;\n $desired_aspect_ratio = $width / $height;\n\n if ($source_aspect_ratio > $desired_aspect_ratio)\n {\n /*\n * Triggered when source image is wider\n */\n $temp_height = $height;\n $temp_width = (int)($height * $source_aspect_ratio);\n }\n else\n {\n /*\n * Triggered otherwise (i.e. source image is similar or taller)\n */\n $temp_width = $width;\n $temp_height = (int)($width / $source_aspect_ratio);\n }\n\n /*\n * Resize the image into a temporary GD image\n */\n\n $temp_gdim = imagecreatetruecolor($temp_width, $temp_height);\n imagecopyresampled($temp_gdim, $source_gdim, 0, 0, 0, 0, $temp_width, $temp_height, $source_width, $source_height);\n\n /*\n * Copy cropped region from temporary image into the desired GD image\n */\n\n $x0 = ($temp_width - $width) / 2;\n $y0 = ($temp_height - $height) / 2;\n $desired_gdim = imagecreatetruecolor($width, $height);\n imagecopy($desired_gdim, $temp_gdim, 0, 0, $x0, $y0, $width, $height);\n\n /*\n * Render the image\n * Alternatively, you can save the image in file-system or database\n */\n\n $image_url = $upload_url . $filename;\n\n imagepng($desired_gdim, $image_url);\n\n return $image_url;\n\n /*\n * Add clean-up code here\n */\n }", "public function image_resize()\n {\n $url = $this->input->get('pic');\n $width = $this->input->get('width');\n $height = $this->input->get('height');\n $bgcolor = $this->input->get('color');\n $type = $this->input->get('type');\n $loc = $this->input->get('loc');\n if (empty($type)) {\n $type = 'fit'; // fit, fill\n }\n if (empty($loc)) {\n $loc = 'Center'; // NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast\n }\n $strict = FALSE;\n if (substr($width, -1) == \"*\" && substr($height, -1) == \"*\") {\n $width = substr($width, 0, -1);\n $height = substr($height, 0, -1);\n $strict = TRUE;\n }\n\n// $bgcolor = (trim($bgcolor) == \"\") ? \"FFFFFF\" : $bgcolor;\n// $props = array(\n// 'picture' => $url,\n// 'resize_width' => $width,\n// 'resize_height' => $height,\n// 'bg_color' => $bgcolor\n// );\n//\n// $this->load->library('Image_resize', $props);\n// $this->skip_template_view();\n\n $dest_folder = APPPATH . 'cache' . DS . 'temp' . DS;\n $this->general->createFolder($dest_folder);\n\n $pic = trim($url);\n $pic = base64_decode($pic);\n $pic = str_replace(\" \", \"%20\", $pic);\n $url = $pic;\n $url = str_replace(\" \", \"%20\", $url);\n $props = array(\n 'picture' => $url,\n 'resize_width' => $width,\n 'resize_height' => $height,\n 'bg_color' => $bgcolor\n );\n $md5_url = md5($url . serialize($props));\n $tmp_path = $tmp_file = $dest_folder . $md5_url;\n\n if (strpos($url, $this->config->item('site_url')) === FALSE && strpos($url, 's3.amazonaws') === FALSE) {\n $this->output->set_status_header(400);\n exit;\n }\n \n if (!is_file($tmp_path)) {\n $image_data = file_get_contents($url);\n if ($image_data == FALSE) {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);\n curl_setopt($curl, CURLOPT_TIMEOUT, 600);\n curl_setopt($curl, CURLOPT_COOKIEJAR, \"cookie.txt\");\n curl_setopt($curl, CURLOPT_COOKIEFILE, \"cookie.txt\");\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($curl, CURLOPT_VERBOSE, TRUE);\n //curl_setopt($curl, CURLOPT_HEADER, TRUE);\n $image_data = curl_exec($curl);\n\n if ($image_data == FALSE) {\n \t\n $httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n if ($httpCode != 200) {\n $this->output->set_status_header($httpCode);\n exit;\n }\n }\n curl_close($curl);\n// $headers = parse_response_header($http_response_header);\n// if ($headers['reponse_code'] != 200) {\n// $this->output->set_status_header($headers['reponse_code']);\n// exit;\n// }\n }\n $handle = fopen($tmp_path, 'w+');\n fwrite($handle, $image_data);\n fclose($handle);\n\n $img_info = getimagesize($tmp_path);\n $img_ext = end(explode(\"/\", $img_info['mime']));\n if ($img_ext == 'jpeg' || $img_ext == \"pjpeg\") {\n $img_ext = 'jpg';\n }\n if ($strict == TRUE && $img_info[0] < $width && $img_info[1] < $height) {\n $tmp_file = $tmp_path;\n } else {\n\n $this->load->library('image_lib');\n\n $image_process_tool = $this->config->item('imageprocesstool');\n $config['image_library'] = $image_process_tool;\n if ($image_process_tool == \"imagemagick\") {\n $config['library_path'] = $this->config->item('imagemagickinstalldir');\n }\n// if ($img_ext == \"jpg\") {\n// $png_convert = $this->image_lib->convet_jpg_png($tmp_path, $tmp_path . \".png\", $config['library_path']);\n// if ($png_convert) {\n// unlink($tmp_path);\n// rename($tmp_path . \".png\", $tmp_path);\n// }\n// }\n\n if ($type == 'fill') {\n $img_info = getimagesize($tmp_path);\n $org_width = $img_info[0];\n $org_height = $img_info[1];\n\n $width_ratio = $width / $org_width;\n $height_ratio = $height / $org_height;\n if ($width_ratio > $height_ratio) {\n $resize_width = $org_width * $width_ratio;\n $resize_height = $org_height * $width_ratio;\n } else {\n $resize_width = $org_width * $height_ratio;\n $resize_height = $org_height * $height_ratio;\n }\n\n $crop_width = $width;\n $crop_height = $height;\n\n $width = $resize_width;\n $height = $resize_height;\n }\n\n $config['source_image'] = $tmp_path;\n $config['width'] = $width;\n $config['height'] = $height;\n $config['gravity'] = $loc; //center/West/East\n $config['bgcolor'] = (trim($bgcolor) != \"\") ? trim($bgcolor) : $this->config->item('imageresizebgcolor');\n $this->image_lib->initialize($config);\n $this->image_lib->resize();\n\n if ($type == 'fill') {\n $config['source_image'] = $tmp_path;\n $config['width'] = $crop_width;\n $config['height'] = $crop_height;\n $config['gravity'] = 'center';\n $config['maintain_ratio'] = FALSE;\n\n $this->image_lib->initialize($config);\n $this->image_lib->crop();\n }\n }\n }\n\n $this->image_display($tmp_file);\n }", "function resize($width, $height) {\n list($w, $h) = getimagesize($_FILES['file']['tmp_name']);\n /* calculate new image size with ratio */\n $ratio = max($width / $w, $height / $h);\n $h = ceil($height / $ratio);\n $x = ($w - $width / $ratio) / 2;\n $w = ceil($width / $ratio);\n /* new file name */\n $path = '../uploads/' . date(\"y\") . date(\"j\") . date(\"H\") . date(\"s\") . $width . 'x' . $height . '_'. $_FILES['file']['name'];;\n /* read binary data from image file */\n \n echo json_encode($path);\n \n \n $imgString = file_get_contents($_FILES['file']['tmp_name']);\n /* create image from string */\n $image = imagecreatefromstring($imgString);\n $tmp = imagecreatetruecolor($width, $height);\n imagecopyresampled($tmp, $image, 0, 0, $x, 0, $width, $height, $w, $h);\n /* Save image */\n switch ($_FILES['file']['type']) {\n case 'image/jpeg':\n imagejpeg($tmp, $path, 100);\n break;\n case 'image/png':\n imagepng($tmp, $path, 0);\n break;\n case 'image/gif':\n imagegif($tmp, $path);\n break;\n default:\n exit;\n break;\n }\n return $path;\n \n /* cleanup memory */\n imagedestroy($image);\n imagedestroy($tmp);\n}", "function upload_passport($path, $ext, $sn) {\n $img_url = 'passport' . $sn . '-' . date('mdYHis.') . $ext;\n move_uploaded_file($path, \"temp_img/\" . $img_url);\n $resizeObj = new resize(\"temp_img/\" . $img_url);\n $resizeObj->resizeImage(280, 350, 'crop');\n $resizeObj->saveImage(\"pics/\" . $img_url, 100);\n unlink(\"temp_img/\" . $img_url);\n return $img_url;\n}", "function imagecompress($source, $destination, $quality) {\r\n $info = getimagesize($source);\r\n if ($info['mime'] == 'image/jpeg')\r\n $image = imagecreatefromjpeg($source);\r\n elseif ($info['mime'] == 'image/gif')\r\n $image = imagecreatefromgif($source);\r\n elseif ($info['mime'] == 'image/png')\r\n $image = imagecreatefrompng($source);\r\n imagejpeg($image, $destination, $quality);\r\n unlink($source);\r\n return $destination;\r\n}", "private function savePictureToS3( $imageString, $destinationPath )\n {\n $disk = 's3';\n\n // 0. Make the image\n $image = \\Image::make( $imageString );\n // 1. Generate a filename.\n $filename = md5( $imageString . time() . rand(0, 100)) . '.jpg';\n // 2. Store the image on disk.\n \\Storage::disk( $disk )->put( $destinationPath . '/' . $filename, (string) $image->stream() );\n\n // 3. Save the path to the database\n return $destinationPath . '/' . $filename;\n }", "public function upload_image( $image, $new_image_name, $width, $height, $subdomain, $directory = '', $keep_proportions = true, $fill_constraints = true ) {\r\n // Get hte image path\r\n $image_path = ( is_string( $image ) ) ? $image : $image['tmp_name'];\r\n \r\n\t\tif ( empty( $image_path ) || empty( $subdomain ) )\r\n\t\t\tthrow new InvalidParametersException( 'The image path could not be determined.' );\r\n\t\t\r\n\t\tlist( $result, $image_file ) = image::resize( $image_path, TMP_PATH . 'media/uploads/images/', $new_image_name, $width, $height, 90, $keep_proportions, $fill_constraints );\r\n\t\t\r\n\t\tif ( !$result || !$image_file || !is_file( $image_file ) )\r\n throw new HelperException( \"Failed to resize image\" );\r\n\r\n\t\t// Define the base name\r\n\t\t$base_name = basename( $image_file );\r\n\r\n\t\t// Upload the image\r\n\t\tif ( !$this->s3->putObjectFile( $image_file, $subdomain . $this->bucket, $directory . $base_name, S3::ACL_PUBLIC_READ, array(), S3::__getMimeType( $base_name ) ) )\r\n\t\t\tthrow new HelperException( \"Failed to put image on Amazon S3\" );\r\n\r\n // Delete the local image\r\n unlink( $image_file );\r\n\t\tCache::delete( $this->cache_key );\r\n \r\n // Return image name\r\n return $base_name;\r\n\t}", "public function createImage()\n {\n if ($this->resize) {\n\n // get the resize dimensions\n $height = (int)array_get($this->resizeDimensions, 'new_height', 320);\n\n $width = (int)array_get($this->resizeDimensions, 'new_width', 240);\n\n if ($this->fit) {\n return Image::make($this->originalPath)->fit($width, $height)\n ->save(base_path() . $this->storageLocation . '/' . $this->uniqueName, $this->imgQuality);\n } else {\n return Image::make($this->originalPath)->resize($width, $height)\n ->save(base_path() . $this->storageLocation . '/' . $this->uniqueName, $this->imgQuality);\n }\n\n } else {\n\n return Image::make($this->originalPath)\n ->save(base_path() . $this->storageLocation . '/' . $this->uniqueName, $this->imgQuality);\n }\n }", "public function uploadAndResize($request, $width=null, $height=null)\n {\n if( is_null($width) && is_null($height) )\n {\n $width = 1600; \n $height = 1000;\n }\n\n if($request->file('file'))\n {\n $this->validate($request, ['file' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048']);\n $image = $request->file('file');\n $input['imagename'] = time().'.'.$image->getClientOriginalExtension();\n $destinationPath = public_path('/images');\n\n //redimensionner Image\n $image_resize = Resize::make($image->getRealPath()); \n $resultat = $image_resize->resize($width, $height);\n $path = $destinationPath . '/' . $input['imagename'];\n $image_resize->save($path);\n return $input['imagename'];\n }\n }", "private function uploadImagePost(Request $request){\n\t\t// Handles data\n\t\t$target = explode('.',$request->target);\n\t\t$class = '\\App\\\\'.ucwords($target[0]);\n\t\t$object = $class::find($request->id);\n\n\t\t// Handles image\n\t\t$image = \\Gumlet\\ImageResize::createFromString(base64_decode($request->data));\n\t\t$image->quality_jpg = 50;\n\n\t\t// Saving image\n\t\t$object->image = (string) $image;\n\t\t$object->save();\n\t}", "private static function _uploadImage($image, string $uploadPath, $width, $height): string {\n $extension = $image->getClientOriginalExtension();\n $fileName = Helper::getMilliTimestamp() . '_music_art.' . $extension;\n Helper::makeDirectory($uploadPath);\n Image::make($image->getRealPath())\n ->resize($width, $height)\n ->save($uploadPath . '/' . $fileName);\n return $fileName;\n }", "function smart_resize_image($file, $string = null, $width = 0, $height = 0, $proportional = false, $output = 'file', $delete_original = true, $use_linux_commands = false, $quality = 100, $grayscale = false\n) {\n\n if ($height <= 0 && $width <= 0)\n return false;\n if ($file === null && $string === null)\n return false;\n\n # Setting defaults and meta\n $info = $file !== null ? getimagesize($file) : getimagesizefromstring($string);\n $image = '';\n $final_width = 0;\n $final_height = 0;\n list($width_old, $height_old) = $info;\n $cropHeight = $cropWidth = 0;\n\n # Calculating proportionality\n if ($proportional) {\n if ($width == 0)\n $factor = $height / $height_old;\n elseif ($height == 0)\n $factor = $width / $width_old;\n else\n $factor = min($width / $width_old, $height / $height_old);\n\n $final_width = round($width_old * $factor);\n $final_height = round($height_old * $factor);\n }\n else {\n $final_width = ( $width <= 0 ) ? $width_old : $width;\n $final_height = ( $height <= 0 ) ? $height_old : $height;\n $widthX = $width_old / $width;\n $heightX = $height_old / $height;\n\n $x = min($widthX, $heightX);\n $cropWidth = ($width_old - $width * $x) / 2;\n $cropHeight = ($height_old - $height * $x) / 2;\n }\n\n # Loading image to memory according to type\n switch ($info[2]) {\n case IMAGETYPE_JPEG: $file !== null ? $image = imagecreatefromjpeg($file) : $image = imagecreatefromstring($string);\n break;\n case IMAGETYPE_GIF: $file !== null ? $image = imagecreatefromgif($file) : $image = imagecreatefromstring($string);\n break;\n case IMAGETYPE_PNG: $file !== null ? $image = imagecreatefrompng($file) : $image = imagecreatefromstring($string);\n break;\n default: return false;\n }\n\n # Making the image grayscale, if needed\n if ($grayscale) {\n imagefilter($image, IMG_FILTER_GRAYSCALE);\n }\n\n # This is the resizing/resampling/transparency-preserving magic\n $image_resized = imagecreatetruecolor($final_width, $final_height);\n if (($info[2] == IMAGETYPE_GIF) || ($info[2] == IMAGETYPE_PNG)) {\n $transparency = imagecolortransparent($image);\n $palletsize = imagecolorstotal($image);\n\n if ($transparency >= 0 && $transparency < $palletsize) {\n $transparent_color = imagecolorsforindex($image, $transparency);\n $transparency = imagecolorallocate($image_resized, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']);\n imagefill($image_resized, 0, 0, $transparency);\n imagecolortransparent($image_resized, $transparency);\n } elseif ($info[2] == IMAGETYPE_PNG) {\n imagealphablending($image_resized, false);\n $color = imagecolorallocatealpha($image_resized, 0, 0, 0, 127);\n imagefill($image_resized, 0, 0, $color);\n imagesavealpha($image_resized, true);\n }\n }\n imagecopyresampled($image_resized, $image, 0, 0, $cropWidth, $cropHeight, $final_width, $final_height, $width_old - 2 * $cropWidth, $height_old - 2 * $cropHeight);\n\n\n # Taking care of original, if needed\n if ($delete_original) {\n if ($use_linux_commands)\n exec('rm ' . $file);\n else\n @unlink($file);\n }\n\n # Preparing a method of providing result\n switch (strtolower($output)) {\n case 'browser':\n $mime = image_type_to_mime_type($info[2]);\n header(\"Content-type: $mime\");\n $output = NULL;\n break;\n case 'file':\n $output = $file;\n break;\n case 'return':\n return $image_resized;\n break;\n default:\n break;\n }\n\n # Writing image according to type to the output destination and image quality\n switch ($info[2]) {\n case IMAGETYPE_GIF: imagegif($image_resized, $output);\n break;\n case IMAGETYPE_JPEG: imagejpeg($image_resized, $output, $quality);\n break;\n case IMAGETYPE_PNG:\n $quality = 9 - (int) ((0.9 * $quality) / 10.0);\n imagepng($image_resized, $output, $quality);\n break;\n default: return false;\n }\n\n return true;\n}", "public function save() {\n \n $checkError = $this->isError();\n if (!$checkError) {\n \n $ext = $this->getImageExt();\n $quality = $this->__imageQuality;\n $dirSavePath = dirname($this->__imageSavePath);\n \n if (empty($this->__imageSavePath) || !is_dir($dirSavePath)) {\n $this->setError(__d('cloggy','Image save path not configured or maybe not exists.'));\n } else { \n \n /*\n * create resized image\n */\n switch($ext) {\n \n case 'jpg':\n case 'jpeg':\n\n if (imagetypes() & IMG_JPG) {\n @imagejpeg($this->__imageResized,$this->__imageSavePath,$quality); \n }\n\n break;\n\n case 'gif':\n\n if (imagetypes() & IMG_GIF) {\n @imagegif($this->__imageResized,$this->__imageSavePath); \n }\n\n break;\n\n case 'png':\n\n $scaleQuality = round($this->__imageQuality/100) * 9;\n $invertScaleQuality = 9 - $scaleQuality;\n\n if (imagetypes() & IMG_PNG) {\n @imagepng($this->__imageResized,$this->__imageSavePath,$invertScaleQuality); \n }\n\n break;\n\n } \n \n } \n \n /*\n * destroy resized image\n */\n if ($this->__imageResized) {\n \n //destroy resized image\n imagedestroy($this->__imageResized);\n \n } \n \n }\n \n }", "public function addFilteredImage(Request $request){\n $request->image = base64_decode(preg_replace('#^data:image/\\w+;base64,#i', '', $request->image));\n $request->image = imagecreatefromstring($request->image);\n $s3 = Storage::disk('s3');\n $filePath = '/profilePhotos/'.$$request->imageUrl;\n $s3->put($filePath, file_get_contents($$request->image), 'public');\n unlink($request->path);\n return json_encode(gettype($request->image));\n }", "public function uploadImage()\n {\n if (null === $this->fileimage) {\n return;\n }\n\n $upload = new Upload();\n $this->image = $upload->createName(\n $this->fileimage->getClientOriginalName(),\n $this->getUploadRootDir().'/',\n array('tmp/','miniature/')\n );\n\n $imagine = new Imagine();\n\n /* Tmp */\n $size = new Box(1920,1080);\n $imagine->open($this->fileimage)\n ->thumbnail($size, 'inset')\n ->save($this->getUploadRootDir().'tmp/'.$this->image);\n\n /* Miniature */\n $size = new Box(300,300);\n $imagine->open($this->fileimage)\n ->thumbnail($size, 'outbound')\n ->save($this->getUploadRootDir().'miniature/'.$this->image);\n\n }", "private function uploadAmazonFromBuffer($imageUrl)\n {\n $imagePath = $this->loadImage($imageUrl);\n $filename = pathinfo($imagePath)['basename'];\n\n $this->s3->registerStreamWrapper();\n $context = stream_context_create(['s3' => ['ACL' => 'public-read' /*'ContentType'=> 'image/jpeg'*/]]);\n file_put_contents('s3://' . $this->bucket . '/' . $filename, $this->loadImageContents($imageUrl), 0, $context);\n\n return $this->s3->getObjectUrl($this->bucket, $filename);;\n }" ]
[ "0.6516477", "0.6412712", "0.6372538", "0.6264244", "0.62625206", "0.62482667", "0.616112", "0.6150768", "0.6141412", "0.6135538", "0.60976106", "0.60818446", "0.60673755", "0.60564077", "0.6055686", "0.6037508", "0.60176927", "0.6012482", "0.5978586", "0.5976266", "0.59218615", "0.5898018", "0.5891703", "0.58895916", "0.58849275", "0.5873357", "0.5860257", "0.5846197", "0.5836598", "0.5831776" ]
0.7244032
0
Download the target of a URL, returns the md5 hash. If there is an error (http code 500, timeout...), returns null.
public function getUrlFingerprint( $url ) { $client = new Client( [ 'timetout' => 10 ] ); try { $response = $client->get( $url ); $body = (string) $response->getBody(); return md5( $body ); } catch ( ClientException $exception ) { $this->addFlashMsg( static::FLASH_ERROR_VENDREDI, $exception->getMessage() ); return null; } catch ( ConnectException $exception ) { $this->addFlashMsg( static::FLASH_ERROR_VENDREDI, $exception->getMessage() ); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function downloadUrl($url)\r\n{\r\n\r\n $ch = curl_init ($url);\r\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\r\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\tcurl_setopt($ch, CURLOPT_BINARYTRANSFER,0);\r\n\tcurl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 0);\r\n\r\n\t$rawdata=curl_exec($ch);\r\n\tcurl_close ($ch);\r\n /*$LogHandler->addRecord(\r\n Logger::NOTICE,\r\n \"Finished downloading \".$url,\r\n array('url' => $url)\r\n );\r\n*/\r\n\treturn $rawdata;\r\n}", "private function getHash($url){\r\n return $url;\r\n }", "public function download(string $url): string\n {\n if ($this->getSleepMin()) {\n usleep(mt_rand($this->getSleepMin(), $this->getSleepMax()));\n }\n\n $curl = $this->getCurl();\n $url = (string)$url;\n\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n if ($this->isSslHostCheckEnabled()) {\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 1);\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);\n }\n\n if ($this->getHttpAuth()) {\n curl_setopt(\n $curl, CURLOPT_USERPWD,\n $this->getHttpAuth()['username'] . ':' . $this->getHttpAuth(\n )['password']\n );\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n }\n\n if (count($this->getPostData()) > 0) {\n curl_setopt($curl, CURLOPT_POST, count($this->getPostData()));\n curl_setopt($curl, CURLOPT_POSTFIELDS, $this->getPostData());\n }\n\n if (count($this->getHeaders()) > 0) {\n curl_setopt($curl, CURLOPT_HTTPHEADER, $this->getHeaders());\n }\n\n $retries = 0;\n $responseCode = null;\n\n while ($retries < $this->getRetriesMax()) {\n $response = @curl_exec($curl);\n $responseCode = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);\n\n if ($responseCode == CURLE_OK) {\n break;\n }\n\n $retries++;\n sleep(1);\n }\n\n if ($response === false || $responseCode != 200) {\n $curlError = curl_error($curl);\n throw new NetworkException($curlError);\n }\n\n return $response;\n\n }", "function calculate_download_file_hash($path) // Colorize: green\n { // Colorize: green\n if (endsWith($path, \".raw\")) // Colorize: green\n { // Colorize: green\n return exec(\"md5sum \" . $path . \" | awk '{ print $1 }'\"); // Colorize: green\n } // Colorize: green\n else // Colorize: green\n if (endsWith($path, \".xz\")) // Colorize: green\n { // Colorize: green\n return exec(\"cat \" . $path . \" | unxz | md5sum | awk '{ print $1 }'\"); // Colorize: green\n } // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n return \"\"; // Colorize: green\n }", "public function fetch_h5p($url) {\n // Override core permission checks\n $core = $this->get_h5p_instance('core');\n $core->mayUpdateLibraries(TRUE);\n\n // Download .h5p file\n $path = $core->h5pF->getUploadedH5pPath();\n $response = $core->h5pF->fetchExternalData($url, NULL, TRUE, empty($path) ? TRUE : $path);\n if (!$response) {\n throw new Exception('Unable to download .h5p file');\n }\n\n // Validate file\n $validator = $this->get_h5p_instance('validator');\n if (!$validator->isValidPackage()) {\n @unlink($core->h5pF->getUploadedH5pPath());\n throw new Exception('Failed validating .h5p file');\n }\n\n // Prepare metadata\n $metadata = empty($validator->h5pC->mainJsonData) ? array() : $validator->h5pC->mainJsonData;\n\n // Use a default string if title from h5p.json is not available\n if (empty($metadata['title'])) {\n $metadata['title'] = 'Uploaded Content';\n }\n\n // Create content\n $content = array(\n 'disable' => H5PCore::DISABLE_NONE,\n 'metadata' => $metadata,\n );\n\n // Save content\n $storage = new H5PStorage($core->h5pF, $core);\n $storage->savePackage($content);\n\n // Clear cached value for dirsize.\n delete_transient('dirsize_cache');\n\n // Return new content ID\n return $storage->contentId;\n }", "function get_url_hash( $url ) {\n\treturn md5( strtolower( $url ) );\n}", "public function md5Url($url) {\r\n\t\t$md5edurl['url'] = md5($url);\r\n\r\n\t\t$md5search = $this->find('count', \r\n\t\t\tarray('conditions' => array('unique' => $md5edurl['url'])),\r\n\t\t\tarray('recursive' => -1)\r\n\t\t);\r\n\r\n\t\tif ($md5search > 0) {\r\n\t\t\t$md5edurl['exists'] = true;\r\n\t\t} else {\r\n\t\t\t$md5edurl['exists'] = false;\r\n\t\t}\r\n\r\n\t\treturn $md5edurl;\r\n\t}", "public function download(string $url);", "function fetch_url($url) {\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 120);\n\t$file_get_contents = curl_exec($ch);\n\tcurl_close($ch);\n\treturn $file_get_contents;\n}", "function downloadFile($url, $output)\n{\n $readableStream = fopen($url, 'rb');\n if ($readableStream === false) {\n throw new Exception(\"Something went wrong while fetching \" . $url);\n }\n $writableStream = fopen($output, 'wb');\n\n stream_copy_to_stream($readableStream, $writableStream);\n\n fclose($writableStream);\n}", "function qa_retrieve_url($url)\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\t// ensure we're fetching a remote URL\n\tif (!preg_match('#^https?://#', $url)) {\n\t\treturn '';\n\t}\n\n\t$contents = @file_get_contents($url);\n\n\tif (!strlen($contents) && function_exists('curl_exec')) { // try curl as a backup (if allow_url_fopen not set)\n\t\t$curl = curl_init($url);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\t\t$contents = @curl_exec($curl);\n\t\tcurl_close($curl);\n\t}\n\n\treturn $contents;\n}", "function get_url_file(string $url): string\n{\n $ch = curl_init();\n curl_setopt($ch, \\CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, \\CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, \\CURLOPT_URL, $url);\n $data = curl_exec($ch);\n curl_close($ch);\n return $data;\n}", "function curl_download($Url){ if (!function_exists('curl_init')){\n die('Sorry cURL is not installed!');\n }\n \n // OK cool - then let's create a new cURL resource handle\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $Url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $output = curl_exec($ch);\n\n return $output;\n}", "protected function getUrlChecksum($url)\n {\n $checksum = strtolower(urldecode($this->glueUrl($url, true)));\n $checksum = preg_replace('#\\s#', '', $this->decodeTranslit($checksum));\n return dechex(crc32($checksum));\n }", "function _quail_server_get_404_hash($url) {\n\t$result = drupal_http_request($url .'/'. md5($url));\n\tif($result->code == 200 || $result->redirect_code == 200) {\n\t\treturn array('url' => $result->redirect_url,\n\t\t\t\t\t 'hash' => md5(trim($result->data)));\n\t}\n\treturn array('url' => null, 'hash' => null);\n}", "function get_remote_file($url, $timeout, $head_only = false, $max_redirects = 10)\n{\n\t$result = null;\n\t$parsed_url = parse_url($url);\n\t$allow_url_fopen = strtolower(@ini_get('allow_url_fopen'));\n\n\t// Quite unlikely that this will be allowed on a shared host, but it can't hurt\n\tif (function_exists('ini_set'))\n\t\t@ini_set('default_socket_timeout', $timeout);\n\n\t// If we have cURL, we might as well use it\n\tif (function_exists('curl_init'))\n\t{\n\t\t// Setup the transfer\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, true);\n\t\tcurl_setopt($ch, CURLOPT_NOBODY, $head_only);\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, $timeout);\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, 'Flazy');\n\n\t\t// Grab the page\n\t\t$content = @curl_exec($ch);\n\t\t$responce_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\t\tcurl_close($ch);\n\n\t\t// Process 301/302 redirect\n\t\tif ($content !== false && ($responce_code == '301' || $responce_code == '302') && $max_redirects > 0)\n\t\t{\n\t\t\t$headers = explode(\"\\r\\n\", trim($content));\n\t\t\tforeach ($headers as $header)\n\t\t\t\tif (substr($header, 0, 10) == 'Location: ')\n\t\t\t\t{\n\t\t\t\t\t$responce = get_remote_file(substr($header, 10), $timeout, $head_only, $max_redirects - 1);\n\t\t\t\t\tif ($responce !== null)\n\t\t\t\t\t\t$responce['headers'] = array_merge($headers, $responce['headers']);\n\t\t\t\t\treturn $responce;\n\t\t\t\t}\n\t\t}\n\n\t\t// Ignore everything except a 200 response code\n\t\tif ($content !== false && $responce_code == '200')\n\t\t{\n\t\t\tif ($head_only)\n\t\t\t\t$result['headers'] = explode(\"\\r\\n\", str_replace(\"\\r\\n\\r\\n\", \"\\r\\n\", trim($content)));\n\t\t\telse\n\t\t\t{\n\t\t\t\tpreg_match('#HTTP/1.[01] 200 OK#', $content, $match, PREG_OFFSET_CAPTURE);\n\t\t\t\t$last_content = substr($content, $match[0][1]);\n\t\t\t\t$content_start = strpos($last_content, \"\\r\\n\\r\\n\");\n\t\t\t\tif ($content_start !== false)\n\t\t\t\t{\n\t\t\t\t\t$result['headers'] = explode(\"\\r\\n\", str_replace(\"\\r\\n\\r\\n\", \"\\r\\n\", substr($content, 0, $match[0][1] + $content_start)));\n\t\t\t\t\t$result['content'] = substr($last_content, $content_start + 4);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// fsockopen() is the second best thing\n\telse if (function_exists('fsockopen'))\n\t{\n\t\t$remote = @fsockopen($parsed_url['host'], !empty($parsed_url['port']) ? intval($parsed_url['port']) : 80, $errno, $errstr, $timeout);\n\t\tif ($remote)\n\t\t{\n\t\t\t// Send a standard HTTP 1.0 request for the page\n\t\t\tfwrite($remote, ($head_only ? 'HEAD' : 'GET').' '.(!empty($parsed_url['path']) ? $parsed_url['path'] : '/').(!empty($parsed_url['query']) ? '?'.$parsed_url['query'] : '').' HTTP/1.0'.\"\\r\\n\");\n\t\t\tfwrite($remote, 'Host: '.$parsed_url['host'].\"\\r\\n\");\n\t\t\tfwrite($remote, 'User-Agent: Flazy'.\"\\r\\n\");\n\t\t\tfwrite($remote, 'Connection: Close'.\"\\r\\n\\r\\n\");\n\n\t\t\tstream_set_timeout($remote, $timeout);\n\t\t\t$stream_meta = stream_get_meta_data($remote);\n\n\t\t\t// Fetch the response 1024 bytes at a time and watch out for a timeout\n\t\t\t$content = false;\n\t\t\twhile (!feof($remote) && !$stream_meta['timed_out'])\n\t\t\t{\n\t\t\t\t$content .= fgets($remote, 1024);\n\t\t\t\t$stream_meta = stream_get_meta_data($remote);\n\t\t\t}\n\n\t\t\tfclose($remote);\n\n\t\t\t// Process 301/302 redirect\n\t\t\tif ($content !== false && $max_redirects > 0 && preg_match('#^HTTP/1.[01] 30[12]#', $content))\n\t\t\t{\n\t\t\t\t$headers = explode(\"\\r\\n\", trim($content));\n\t\t\t\tforeach ($headers as $header)\n\t\t\t\t\tif (substr($header, 0, 10) == 'Location: ')\n\t\t\t\t\t{\n\t\t\t\t\t\t$responce = get_remote_file(substr($header, 10), $timeout, $head_only, $max_redirects - 1);\n\t\t\t\t\t\tif ($responce !== null)\n\t\t\t\t\t\t\t$responce['headers'] = array_merge($headers, $responce['headers']);\n\t\t\t\t\t\treturn $responce;\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Ignore everything except a 200 response code\n\t\t\tif ($content !== false && preg_match('#^HTTP/1.[01] 200 OK#', $content))\n\t\t\t{\n\t\t\t\tif ($head_only)\n\t\t\t\t\t$result['headers'] = explode(\"\\r\\n\", trim($content));\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$content_start = strpos($content, \"\\r\\n\\r\\n\");\n\t\t\t\t\tif ($content_start !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$result['headers'] = explode(\"\\r\\n\", substr($content, 0, $content_start));\n\t\t\t\t\t\t$result['content'] = substr($content, $content_start + 4);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Last case scenario, we use file_get_contents provided allow_url_fopen is enabled (any non 200 response results in a failure)\n\telse if (in_array($allow_url_fopen, array('on', 'true', '1')))\n\t{\n\t\t// PHP5's version of file_get_contents() supports stream options\n\t\tif (version_compare(PHP_VERSION, '5.0.0', '>='))\n\t\t{\n\t\t\t// Setup a stream context\n\t\t\t$stream_context = stream_context_create(\n\t\t\t\tarray(\n\t\t\t\t\t'http' => array(\n\t\t\t\t\t\t'method'\t\t=> $head_only ? 'HEAD' : 'GET',\n\t\t\t\t\t\t'user_agent'\t\t=> 'Flazy',\n\t\t\t\t\t\t'max_redirects'\t\t=> $max_redirects + 1, // PHP >=5.1.0 only\n\t\t\t\t\t\t'timeout'\t\t=> $timeout // PHP >=5.2.1 only\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$content = @file_get_contents($url, false, $stream_context);\n\t\t}\n\t\telse\n\t\t\t$content = @file_get_contents($url);\n\n\t\t// Did we get anything?\n\t\tif ($content !== false)\n\t\t{\n\t\t\t// Gotta love the fact that $http_response_header just appears in the global scope (*cough* hack! *cough*)\n\t\t\t$result['headers'] = $http_response_header;\n\t\t\tif (!$head_only)\n\t\t\t\t$result['content'] = $content;\n\t\t}\n\t}\n\n\treturn $result;\n}", "protected function getRemoteFile($url) {\n if (empty($url)) {\n echo 'Empty url!';\n return '';\n }\n //header('Content-Type: text/html;charset=utf-8', false);\n\n @$content = file_get_contents($url); // surpress warnings about SSL\n //Util::info_log(strlen($content));\n\n if (empty($content))\n {\n Util::info_log('Trying curl with useragent');\n\n // Use user agent cloacking.\n $ch = curl_init();\n curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, 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 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n $content = curl_exec($ch);\n //$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n //$redir = $this->getredir($content);\n curl_close($ch);\n //Util::debug_log($httpcode); // 200 OK\n //Util::debug_log($redir); // null\n }\n\n\n if (empty($content)) {\n if (empty($http_response_header)) {\n $msg = 'No content (no response header) for url=' . $url;\n Util::info_log($msg);\n echo $msg;\n }\n else {\n $msg = $http_response_header[0];\n Util::info_log($msg);\n echo '<pre>'. $msg . '</pre>';\n }\n }\n return $content;\n }", "public function download()\n {\n $download_path = parse_url($this->links['download_location'], PHP_URL_PATH);\n $download_query = parse_url($this->links['download_location'], PHP_URL_QUERY);\n $link = self::get($download_path . \"?\" . $download_query);\n $linkClass = \\GuzzleHttp\\json_decode($link->getBody());\n return $linkClass->url;\n }", "function get_file_downloaded_url($id_emetteur) {\n $request = get_file_downloaded($id_emetteur);\n\n $file_url = '';\n\n while($result = $request->fetch()) {\n $file_url = $result['file_url'];\n }\n\n return $file_url;\n}", "function s2_get_remote_file($url, $timeout = 10, $head_only = false, $max_redirects = 10, $ignore_errors = false)\n{\n $result = null;\n $parsed_url = parse_url($url);\n $allow_url_fopen = strtolower(@ini_get('allow_url_fopen'));\n\n // Quite unlikely that this will be allowed on a shared host, but it can't hurt\n if (function_exists('ini_set'))\n @ini_set('default_socket_timeout', $timeout);\n\n // If we have cURL, we might as well use it\n if (function_exists('curl_init')) {\n // Setup the transfer\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, true);\n curl_setopt($ch, CURLOPT_NOBODY, $head_only);\n curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);\n curl_setopt($ch, CURLOPT_USERAGENT, 'S2');\n if ($parsed_url['scheme'] == 'https') {\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n }\n\n // Grab the page\n $content = @curl_exec($ch);\n $response_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n if (curl_errno($ch)) {\n $error_msg = curl_error($ch);\n }\n curl_close($ch);\n\n // Process 301/302 redirect\n if ($content !== false && ($response_code == '301' || $response_code == '302') && $max_redirects > 0) {\n $headers = explode(\"\\r\\n\", trim($content));\n foreach ($headers as $header)\n if (substr($header, 0, 10) == 'Location: ') {\n $response = s2_get_remote_file(substr($header, 10), $timeout, $head_only, $max_redirects - 1);\n if ($response !== null)\n $response['headers'] = array_merge($headers, $response['headers']);\n return $response;\n }\n }\n\n // Ignore everything except a 200 response code\n if ($content !== false && ($response_code == '200' || $ignore_errors)) {\n if ($head_only)\n $result['headers'] = explode(\"\\r\\n\", str_replace(\"\\r\\n\\r\\n\", \"\\r\\n\", trim($content)));\n else {\n preg_match('#HTTP/1.[01] \\\\d\\\\d\\\\d #', $content, $match, PREG_OFFSET_CAPTURE);\n $last_content = substr($content, $match[0][1]);\n $content_start = strpos($last_content, \"\\r\\n\\r\\n\");\n if ($content_start !== false) {\n $result['headers'] = explode(\"\\r\\n\", str_replace(\"\\r\\n\\r\\n\", \"\\r\\n\", substr($content, 0, $match[0][1] + $content_start)));\n $result['content'] = substr($last_content, $content_start + 4);\n }\n }\n }\n } // fsockopen() is the second best thing\n else if (function_exists('fsockopen')) {\n $remote = @fsockopen(($parsed_url['scheme'] == 'https' ? 'ssl://' : '') . $parsed_url['host'], !empty($parsed_url['port']) ? intval($parsed_url['port']) : ($parsed_url['scheme'] == 'https' ? 443 : 80), $errno, $errstr, $timeout);\n if ($remote) {\n // Send a standard HTTP 1.0 request for the page\n fwrite($remote, ($head_only ? 'HEAD' : 'GET') . ' ' . (!empty($parsed_url['path']) ? $parsed_url['path'] : '/') . (!empty($parsed_url['query']) ? '?' . $parsed_url['query'] : '') . ' HTTP/1.0' . \"\\r\\n\");\n fwrite($remote, 'Host: ' . $parsed_url['host'] . \"\\r\\n\");\n fwrite($remote, 'User-Agent: S2' . \"\\r\\n\");\n fwrite($remote, 'Connection: Close' . \"\\r\\n\\r\\n\");\n\n stream_set_timeout($remote, $timeout);\n $stream_meta = stream_get_meta_data($remote);\n\n // Fetch the response 1024 bytes at a time and watch out for a timeout\n $content = false;\n while (!feof($remote) && !$stream_meta['timed_out']) {\n $content .= fgets($remote, 1024);\n $stream_meta = stream_get_meta_data($remote);\n }\n\n fclose($remote);\n\n // Process 301/302 redirect\n if ($content !== false && $max_redirects > 0 && preg_match('#^HTTP/1.[01] 30[12]#', $content)) {\n $headers = explode(\"\\r\\n\", trim($content));\n foreach ($headers as $header)\n if (substr($header, 0, 10) == 'Location: ') {\n $response = s2_get_remote_file(substr($header, 10), $timeout, $head_only, $max_redirects - 1);\n if ($response !== null)\n $response['headers'] = array_merge($headers, $response['headers']);\n return $response;\n }\n }\n\n // Ignore everything except a 200 response code\n if ($content !== false && ($ignore_errors || preg_match('#^HTTP/1.[01] 200 OK#', $content))) {\n if ($head_only)\n $result['headers'] = explode(\"\\r\\n\", trim($content));\n else {\n $content_start = strpos($content, \"\\r\\n\\r\\n\");\n if ($content_start !== false) {\n $result['headers'] = explode(\"\\r\\n\", substr($content, 0, $content_start));\n $result['content'] = substr($content, $content_start + 4);\n }\n }\n }\n }\n } // Last case scenario, we use file_get_contents provided allow_url_fopen is enabled (any non 200 response results in a failure)\n else if (in_array($allow_url_fopen, array('on', 'true', '1'))) {\n // Setup a stream context\n $stream_context = stream_context_create(\n array(\n 'http' => array(\n 'method' => $head_only ? 'HEAD' : 'GET',\n 'user_agent' => 'S2',\n 'max_redirects' => $max_redirects + 1,\n 'timeout' => $timeout\n )\n )\n );\n\n $content = @file_get_contents($url, false, $stream_context);\n\n // Did we get anything?\n if ($content !== false) {\n // Gotta love the fact that $http_response_header just appears in the global scope (*cough* hack! *cough*)\n $result['headers'] = $http_response_header;\n if (!$head_only)\n $result['content'] = $content;\n }\n }\n\n return $result;\n}", "function fetchUrl($url){\r\n\t\t$ch = curl_init($url);\r\n\t\t$useragent=\"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1\";\r\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 5);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\tcurl_setopt ($ch, CURLOPT_USERAGENT, $useragent);\r\n\t\t$data = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\treturn $data;\r\n\t}", "function curl_get_file_size( $url ) {\n // Assume failure.\n $result = -1;\n\n $ch = curl_init( $url );\n\n // Issue a HEAD request and follow any redirects.\n curl_setopt( $ch, CURLOPT_NOBODY, true );\n curl_setopt( $ch, CURLOPT_HEADER, true );\n curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );\n curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );\n //curl_setopt( $ch, CURLOPT_USERAGENT, get_user_agent_string() );\n\tcurl_setopt ($ch, CURLOPT_FOLLOWLOCATION, true);\n\tcurl_setopt ($ch, CURLOPT_MAXREDIRS, 5);\n\tcurl_setopt ($ch, CURLOPT_REFERER, false);\n\tcurl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, false);\n\tcurl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, true);\n\tcurl_setopt ($ch, CURLOPT_COOKIE, $cookie_string); \n\tcurl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout); \n\tcurl_setopt ($ch, CURLOPT_USERAGENT, $useragent); \n $data = curl_exec( $ch );\n curl_close( $ch );\n\n if( $data ) {\n $content_length = \"unknown\";\n $status = \"unknown\";\n\n if( preg_match( \"/^HTTP\\/1\\.[01] (\\d\\d\\d)/\", $data, $matches ) ) {\n $status = (int)$matches[1];\n }\n\n if( preg_match( \"/Content-Length: (\\d+)/\", $data, $matches ) ) {\n $content_length = (int)$matches[1];\n }\n\n // http://en.wikipedia.org/wiki/List_of_HTTP_status_codes\n if( $status == 200 || ($status > 300 && $status <= 308) ) {\n $result = $content_length;\n }\n }\n\n return $result;\n}", "function getSize($url){\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, $url);\r\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_HEADER, true);\r\n curl_setopt($ch, CURLOPT_NOBODY, true);\r\n curl_exec($ch);\r\n $size = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD);\r\n return intval($size);\r\n }", "public function downloadFileByUrl($url)\n {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, array(get_class($this), 'progressCallback'));\n curl_setopt($ch, CURLOPT_NOPROGRESS, false);\n\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n $response = curl_exec($ch);\n curl_close($ch);\n\n return $response;\n }", "function curl_download($Url){ if (!function_exists('curl_init')){\n die('Sorry cURL is not installed!');\n }\n\n // OK cool - then let's create a new cURL resource handle\n $ch = curl_init();\n\n // Now set some options (most are optional)\n\n // Set URL to download\n curl_setopt($ch, CURLOPT_URL, $Url);\n\n // Set a referer\n //curl_setopt($ch, CURLOPT_REFERER, \"http://www.example.org/yay.htm\");\n\n // User agent\n //curl_setopt($ch, CURLOPT_USERAGENT, \"MozillaXYZ/1.0\");\n\n // Include header in result? (0 = yes, 1 = no)\n curl_setopt($ch, CURLOPT_HEADER, 0);\n\n // Should cURL return or print out the data? (true = return, false = print)\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n // Timeout in seconds\n curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n\n // Download the given URL, and return output\n $output = curl_exec($ch);\n\n // Close the cURL resource, and free system resources\n curl_close($ch);\n\n return $output;\n}", "function curl_download($Url){ if (!function_exists('curl_init')){\n die('Sorry cURL is not installed!');\n }\n // OK cool - then let's create a new cURL resource handle\n $ch = curl_init();\n // ###Now set some options (most are optional)###\n // Set URL to download\n curl_setopt($ch, CURLOPT_URL, $Url);\n // Set a referer\n curl_setopt($ch, CURLOPT_REFERER, \"http://www.example.org/yay.htm\");\n // User agent\n curl_setopt($ch, CURLOPT_USERAGENT, \"MozillaXYZ/1.0\");\n // Include header in result? (0 = yes, 1 = no)\n curl_setopt($ch, CURLOPT_HEADER, 0);\n // Should cURL return or print out the data? (true = return, false = print)\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n // Timeout in seconds\n curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n // Download the given URL, and return output\n $output = curl_exec($ch);\n // Close the cURL resource, and free system resources\n curl_close($ch);\n return $output;\n}", "function getImage($url, $maxImageSize = 50000)\n{\n $imageFile = CACHE.'/'.basename($url);\n \n // is cached image missing or > 24 hours old?\n if(!file_exists($imageFile) ||\n ((mktime() - filemtime($imageFile)) > 24*60*60))\n {\n // get image\n $fp = fopen($url, 'rb');\n if(!$fp)\n die ('Sorry, could not download image.');\n $image = fread($fp, $maxImageSize);\n if(!$image)\n die ('Sorry, could not download image.');\n fclose($fp);\n\n // store image\n $fp = fopen($imageFile, 'wb');\n if(!$fp||(fwrite($fp, $image)==-1))\n {\n die ('Sorry, could not store image file');\n }\n fclose($fp);\n }\n return $imageFile;\n}", "private function getURL($url)\n\t{\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_AUTOREFERER, 1);\n\t\tcurl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n\t\tcurl_setopt($ch, CURLOPT_SSLVERSION, 0);\n\t\tcurl_setopt($ch, CURLOPT_CAINFO, AKEEBA_CACERT_PEM);\n\t\tcurl_setopt($ch, CURLOPT_HEADERFUNCTION, array($this, 'reponseHeaderCallback'));\n\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 1);\n\n\t\t$result = curl_exec($ch);\n\n\t\t$errno = curl_errno($ch);\n\t\t$errmsg = curl_error($ch);\n\t\t$error = '';\n\t\t$http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\n\t\tif ($result === false)\n\t\t{\n\t\t\t$error = sprintf(\"(cURL Error %u) %s\", $errno, $errmsg);\n\t\t}\n\t\telseif (($http_status >= 300) && ($http_status <= 399) && isset($this->headers['Location']) && !empty($this->headers['Location']))\n\t\t{\n\t\t\treturn $this->getURL($this->headers['Location']);\n\t\t}\n\t\telseif ($http_status > 399)\n\t\t{\n\t\t\t$errno = $http_status;\n\t\t\t$error = sprintf('HTTP %u error', $http_status);\n\t\t}\n\n\t\tcurl_close($ch);\n\n\t\tif ($result === false)\n\t\t{\n\t\t\tthrow new \\RuntimeException($error, $errno);\n\t\t}\n\n\t\treturn $result;\n\t}", "function fetch_into_file($url, $file)\n{\n $SSL_fopen = false;\n if(in_array('https', stream_get_wrappers())) {\n $SSL_fopen = true;\n }\n\n // Open URL for reading\n if($SSL_fopen) {\n $source = @fopen($url, \"r\");\n if (!$source) {\n return;\n }\n } else {\n $source = popen(\"curl -s '$url'\", 'r');\n }\n\n // Open temporary file for writing\n $dest = @fopen(\"$file~\", \"w\");\n if (!$dest) {\n echo \"failed to open '$file~' for writing\\n\";\n return;\n }\n\n // Read until $source provides data, and write\n // out the chunk to the output file if possible\n while (!feof($source)) {\n $chunk = fread($source, 4096);\n if (fwrite($dest, $chunk) < 0) {\n fclose($source);\n fclose($dest);\n unlink(\"$file~\");\n echo \"failed writing to '$file~'\\n\";\n return;\n }\n }\n fclose($source);\n fclose($dest);\n\n // If we don't have new data, delete file\n if (!@filesize(\"$file~\")) {\n echo \"'$file~' was empty, skipping\\n\";\n unlink(\"$file~\");\n return;\n }\n\n // Replace real file with temporary file\n return rename(\"$file~\", $file);\n}", "protected function download($url)\n\t{\n\t\t$remote = file_get_contents($url);\n\n\t\t// If we were unable to download the zip archive correctly\n\t\t// we'll bomb out since we don't want to extract the last\n\t\t// zip that was put in the storage directory.\n\t\tif ($remote === false)\n\t\t{\n\t\t\tthrow new \\Exception(\"Error downloading the requested bundle.\");\n\t\t}\n\n\t\treturn $remote;\n\t}" ]
[ "0.5875784", "0.5782873", "0.57705367", "0.5710619", "0.5694075", "0.56561804", "0.5624614", "0.5590457", "0.5557812", "0.55466986", "0.5514558", "0.54922545", "0.54722005", "0.5447834", "0.5437126", "0.5398142", "0.5390627", "0.5369994", "0.5369351", "0.5351783", "0.53456634", "0.5339922", "0.53270054", "0.5316049", "0.5312451", "0.5280896", "0.5270006", "0.5250328", "0.5250321", "0.52474904" ]
0.61970264
0
/ Returns "string" if the link is a PDF link that should be displayed on the website (true) or false if we should redirect the user to a new page
public function getPdfPreviewLink( $link ) { $results = []; if (preg_match( '~drive.google.com/open\?id=([\w-]*)~', $link, $results )) { return "https://drive.google.com/file/d/" . $results[1] . "/preview"; } else if (preg_match( '~drive.google.com/file/d/([\w-]*)~', $link, $results )) { return "https://drive.google.com/file/d/" . $results[1] . "/preview"; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkPdfLink(&$inMessage = '') {\n\t\t$isValid = true;\n\t\tif ( !is_string($this->_PdfLink) && $this->_PdfLink !== null && $this->_PdfLink !== '' ) {\n\t\t\t$inMessage .= \"{$this->_PdfLink} is not a valid value for PdfLink\";\n\t\t\t$isValid = false;\n\t\t}\t\t\n\t\t\t\t\n\t\treturn $isValid;\n\t}", "public function getPdfUrl() {\n $ch = curl_init();\n $timeout = 10;\n curl_setopt($ch, CURLOPT_URL, $this->url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n $response = curl_exec($ch);\n curl_close($ch);\n\n // If you accidentally look at this, I suggest pretending you haven't seen it.\n $matches = array();\n preg_match(\"/\\<span class=\\\"application-pdf\\\"\\>.*\\<\\/span\\>/\", $response, $matches);\n \n // If no PDF URL that means there is no bill to download yet (boo)\n if (!isset($matches[0]))\n return false;\n \n $pdfUrl = $matches[0];\n $pdfUrl = str_replace('<span class=\"application-pdf\"><a href=\"', '', $pdfUrl);\n $pdfUrl = preg_replace(\"/\\\"\\>PDF version,(.*)\\<\\/a\\>\\<\\/span\\>/\", '', $pdfUrl);\n // Forcably fix some incorrectly parsed URLs\n $pdfUrl = preg_replace(\"/^.*http\\:/\", 'http:', $pdfUrl);\n $pdfUrl = preg_replace(\"/\\.pdf.*$/\", '.pdf', $pdfUrl);\n \n return $pdfUrl;\n }", "protected function isLink() {}", "public function getPersonalizationPreviewPdfUrl()\n {\n $orderHelper = Mage::helper('printscience_personalization/order');\n $data = $orderHelper->getItemData($this->getItem());\n if (empty($data['preview_pdf_url'])) {\n return false;\n }\n return $data['preview_pdf_url'];\n }", "function _wp_kses_allow_pdf_objects($url)\n {\n }", "public function isLink(): bool\n {\n return is_link($this->directory->getPath().'/'.$this->filename);\n }", "function getPdfLink() {\n\t\treturn $this->_PdfLink;\n\t}", "public function attachment_is_pdf( $id ) {\n\t\treturn wp_attachment_is( 'pdf', $id );\t\t\n\t}", "public function isExternalLink( $link )\n {\n\n // If preview link is a string => localLink\n // If preview link is == false => externalLink\n return $this->getPdfPreviewLink($link) === false ;\n }", "public function can_showdirectlink() {\n return true;\n }", "public function isRedirection();", "function checklink($linkcheck) {\n\t\t$linkcontents = @file_get_contents($linkcheck);\n\t\tif(!$linkcontents) {\n\t\t\tprint \"Unable to open: {$linkcheck}\\n\";\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function deletePdf()\n {\n \tif(Storage::disk('local')->exists('public/processo_seletivo_pdf/' . $this->url_pdf)) {\n \t\treturn Storage::disk('local')->delete('public/processo_seletivo_pdf/' . $this->url_pdf);\n \t} else {\n \t\treturn false;\n \t}\n }", "function isValidDocLink($docLink) {\n\tunset($docLink);\n\treturn true;\n}", "public function linkAction() {\n\n\t\t$hasPassed = FALSE;\n\n\t\ttry {\n\t\t\t$questionnaire = $this->questionnaireRepository->findByUid($this->settings['questionnaire']);\n\t\t} catch (Exception $e) {\n\t\t\t$questionnaire = FALSE;\n\t\t}\n\n\t\tif ($questionnaire !== FALSE) {\n\n\t\t\ttry {\n\t\t\t\t$existingResults = $this->resultRepository->findByFeuserAndQuestionnaire($GLOBALS['TSFE']->fe_user->user['uid'], $questionnaire);\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$existingResults = FALSE;\n\t\t\t}\n\n\t\t\tif ($existingResults !== FALSE) {\n\t\t\t\tforeach ($existingResults AS $existingResult) {\n\t\t\t\t\tif ($existingResult->getStatus()->getIsPassed()) {\n\t\t\t\t\t\t$hasPassed = TRUE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$GLOBALS['TSFE']->clearPageCacheContent_pidList($GLOBALS['TSFE']->id);\n\t\t\t$GLOBALS['TSFE']->clearPageCacheContent_pidList($this->config['redirect_page']);\n\n\t\t\tif (!$hasPassed) {\n\t\t\t\t$this->view->assign('showdownload', '1');\n\t\t\t} else {\n\t\t\t\t$this->view->assign('showdownload', '0');\n\t\t\t}\n\n\t\t\t$pageId = (int) $this->settings['certificate']['detailPid'];\n\n\t\t\tif (!$pageId) {\n\t\t\t\tthrow new Exception('No Page found! Please check your configuration.');\n\t\t\t}\n\n\t\t\t$this->view->assign('page', $pageId);\n\t\t\t$this->view->assign('questionnaire', $questionnaire);\n\t\t}\n\t}", "public function isPage()\n {\n if(is_string($this->url)) return false;\n return $this->url->hasTarget();\n }", "function PDF_add_weblink($pdfdoc, $lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $url)\n{\n}", "function scorm_external_link($link) {\n $result = false;\n //將$link轉成小寫\n $link = strtolower($link);\n if (substr($link,0,7) == 'http://') {\n $result = true;\n } else if (substr($link,0,8) == 'https://') {\n $result = true;\n } else if (substr($link,0,4) == 'www.') {\n $result = true;\n }\n return $result;\n}", "public function getAttachPdf(): ?bool\n {\n return $this->attachPdf;\n }", "function fs_is_link($filename) {\n\treturn @is_link($filename);\n}", "public function checkLinkToRedirect()\n {\n $config = $this->_registry->get(\"config\");\n\n $redirectAfterLogin = filter_input(INPUT_GET, \"redirect_after_login\", FILTER_UNSAFE_RAW);\n\n if ($redirectAfterLogin && $redirectAfterLogin != null) {\n $testLink = $redirectAfterLogin;\n } else if (isset($_SERVER['HTTP_REFERER'])) {\n $router = Zend_Controller_Front::getInstance()->getRouter();\n\n if ($router->getCurrentRouteName() == \"login\") {\n $referer = $_SERVER['HTTP_REFERER'];\n $partialLink = explode(\"?redirect_after_login=\", $referer, 2);\n\n if (! isset($partialLink[1])) {\n return false;\n } else {\n $testLink = $partialLink[1];\n }\n }\n } else {\n return false;\n }\n\n // the redirection link must start with a '/' and\n // must not end up in the redirector again\n // or be in another host (avoids the use of @)\n\n $thisPage = explode(\"?\", $_SERVER['REQUEST_URI'], 2);\n $thisPage = $thisPage[0];\n\n if (mb_substr($testLink, 0, 1) == '/' && !mb_strpos($testLink, \"@\") && $thisPage != $testLink) {\n // @todo improve HTTPS support\n $redirTo = \"http://\" . $config['webhost'] . $testLink;\n\n Zend_Uri::setConfig(array('allow_unwise' => true));\n\n if (Zend_Uri::check($redirTo)) {\n $testUri = Zend_Uri::factory($redirTo);\n\n $path = $testUri->getPath();\n\n Zend_Uri::setConfig(array('allow_unwise' => false));\n\n return $path;\n }\n }\n\n return false;\n }", "public function isRedirect();", "public function isLink() {\n foreach ($this->fields as $field) {\n if ($field->isLinkIndex()) {\n return true;\n }\n }\n\n return false;\n }", "public function isRedirect()\n {\n return true;\n }", "public function isRedirect()\n {\n return true;\n }", "public function isRedirect()\n {\n return true;\n }", "public function isRedirect()\n {\n return true;\n }", "public function isRedirect()\n {\n return false;\n }", "public function showPDF($row, $href, $label, $title, $icon)\n {\n if (!User::getInstance()->isAdmin || strlen($row['agreement_pdf_file']) < 1 ) return '';\n\n // Wenn keine PDF-Vorlage dann kein PDF-Link\n $objPdf = \tFilesModel::findByUuid($row['agreement_pdf_file']);\n if(strlen($objPdf->path) < 1 || !file_exists(TL_ROOT . '/' . $objPdf->path) ) return false; // template file not found\n\n $pdfFile = TL_ROOT . '/' . $objPdf->path;\n\n if (\\Input::get('key') == 'pdf' && \\Input::get('id') == $row['id'])\n {\n\n if(!empty($row['agreement_pdf_file']) && file_exists($pdfFile))\n {\n header(\"Content-type: application/pdf\");\n header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past\n header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');\n header('Content-Length: '.filesize($pdfFile));\n header('Content-Disposition: inline; filename=\"'.basename($pdfFile).'\";');\n ob_clean();\n flush();\n readfile($pdfFile);\n exit();\n }\n }\n $href = $this->addToUrl($href.'&amp;id='.$row['id']);\n $href = str_replace('&amp;onlyproj=1','',$href);\n $href = str_replace('do=iao_projects&amp;','do=iao_agreements&amp;',$href);\n $href = str_replace('table=tl_iao_agreements&amp;','',$href);\n $button = (!empty($row['agreement_pdf_file']) && file_exists($pdfFile)) ? '<a href=\"'.$href.'\" title=\"'.specialchars($title).'\">'.Image::getHtml($icon, $label).'</a> ' : '';\n return $button;\n }", "public function getIsRedirect()\n {\n return substr($this->_status, 0, 1) == '3';\n }" ]
[ "0.68190163", "0.6750631", "0.65008515", "0.6299043", "0.6229866", "0.6182179", "0.6167006", "0.6016799", "0.5997793", "0.59249884", "0.5923723", "0.5918108", "0.5908451", "0.59040886", "0.5833159", "0.5817051", "0.58012694", "0.57780385", "0.57729936", "0.5734797", "0.57171017", "0.5695395", "0.5678571", "0.5678373", "0.5678373", "0.5678373", "0.5678373", "0.5665112", "0.56648356", "0.5651003" ]
0.6855078
0
Check if the licence key and pin combination are valid
public function checkKey($key, $pin) { $this->key = $key; $this->pin = $pin; $result = Licenses::where("key", $this->key) ->where("pin", $this->pin) ->where("used",LICENCE_KEY_AVAILABLE) ->with("plan_type") ->get(); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function check_key_valid() {\n $license = get_transient('wcis_license');\n\n // if key doesn't exist, abort\n if(!isset($license['key']) ) { return false; }\n\n // if valid, return success\n if(isset($license['valid']) && $license['valid'] === true) {\n $msg = __('API Connected!', 'wcis');\n $this->form_fields['key']['description'] = '<span style=\"color: #4caf50;\">' . $msg . '</span>';\n }\n else {\n $msg = __('Invalid API Key. Is there empty space before / after it?', 'wcis');\n $this->form_fields['key']['description'] = '<span style=\"color:#f44336;\">' . $msg . '</span>';\n }\n\n return $license['valid'];\n }", "function monsterinsights_get_license_key_errors() {\n\t$errors = false;\n\t$license = monsterinsights_get_license();\n\tif ( ! empty( $license['type'] ) && is_string( $license['type'] ) && strlen( $license['type'] ) > 3 ) {\n\t\tif ( ( isset( $license['is_expired'] ) && $license['is_expired'] ) \n\t\t || ( isset( $license['is_disabled'] ) && $license['is_disabled'] )\n\t\t || ( isset( $license['is_invalid'] ) && $license['is_invalid'] ) ) {\n\t\t\t$errors = true;\n\t\t}\n\t}\n\treturn $errors;\n}", "private function validateLicenseData()\n {\n\n // error_log('LicenseEmail : '.print_r($this->getLicenseEmail(), 1));\n // error_log('LicenseProduct : '.print_r($this->getLicenseProduct(), 1));\n // error_log('LicenseSecretKey : '.print_r($this->getLicenseSecretKey(), 1));\n }", "public function validate(): bool\n {\n // exact pin and serial number look like\n return $this->validateAmount();\n }", "function check_licence( $licence_key ) {\n\t\t// return json_encode( array( 'ok' => 'ok' ) );\n\t\t// return json_encode( array( 'errors' => array( 'standard' => 'oh no! licence is not working.') ) );\n\t\tif( empty( $licence_key ) ) {\n\t\t\treturn false;\n\t\t}\n\t\t$args = array(\n\t\t\t'licence_key' => $licence_key,\n\t\t\t'site_url' => site_url( '', 'http' ),\n\t\t\t);\n\n\t\t$response = $this->dbrains_api_request( 'check_support_access', $args );\n\t\tset_site_transient( 'wpmdb_licence_response', $response, $this->transient_timeout );\n\t\treturn $response;\n\t}", "function verifyDevice($pin)\n {\n\n // define all the global variables\n global $database, $user, $message;\n\n // escape string\n $pin = $database->secureInput($pin);\n\n // pin number checks\n if (!is_numeric($pin)) {\n $message->setError(\"Pin number should only contain numbers\", Message::Error);\n return false;\n }\n\n if ($pin[0] == 0) {\n $message->setError(\"Pin number cannot start with a 0\", Message::Error);\n return false;\n }\n\n if (strlen($pin) < 6 || strlen($pin) > 6) {\n $message->setError(\"Pin number has to be exactly 6 characters long\", Message::Error);\n return false;\n }\n\n // check if pin number matches the users pin\n if (!$user->matchPin($pin)) {\n $message->setError(\"Wrong pin number has been used\", Message::Error);\n return false;\n }\n\n // add the new device and check for any errors\n if (!$user->devices()->addDevice()) {\n $message->setError(\"Oops, something went wrong while verifying your new device\", Message::Error);\n return false;\n }\n\n // if no errors then return a success message\n $message->setSuccess(\"This device has been verified successfully\");\n return true;\n }", "function askVerifyAndSaveLicenseKey()\n{\n if (empty($_POST['key']))\n {\n renderLicenseForm('Please enter a license key'); \n exit();\n } else {\n $license_key = preg_replace('/[^A-Za-z0-9-_]/', '', trim($_POST['key'])); \n }\n $checker = new Am_LicenseChecker($license_key, API_URL, RANDOM_KEY, null);\n if (!$checker->checkLicenseKey()) // license key not confirmed by remote server\n {\n renderLicenseForm($checker->getMessage()); \n exit();\n } else { // license key verified! save it into the file\n file_put_contents(DATA_DIR . '/key.txt', $license_key);\n return $license_key;\n }\n}", "function verifyLicense($licenseKey, $seed, $publicKey){\n\t$replacement = str_replace(\"8\", \"O\", str_replace(\"9\", \"I\", $licenseKey));\n\t$undashed = trim(str_replace(\"-\", \"\", $replacement));\n\n\t// Pad the output length to a multiple of 8 with '=' characters\n\t$desiredLength = strlen($undashed);\n\tif($desiredLength % 8 != 0) {\n\t\t$desiredLength += (8 - ($desiredLength % 8));\n\t\t$undashed = str_pad($undashed, $desiredLength, \"=\");\n\t}\n\t$decodedHash = base32_decode($undashed);\n\t//digest the original Data\n\t$ok = openssl_verify($seed, $decodedHash, $publicKey, OPENSSL_ALGO_DSS1);\n\treturn $ok;\n}", "public function verifyPurchaseCode()\n {\n $this->validateRequest();\n\n $response = $this->api->post('/verify', array(\n 'site_url' => Quform::base64UrlEncode(site_url()),\n 'purchase_code' => $_POST['purchase_code']\n ));\n\n if (is_array($response)) {\n if (isset($response['type'])) {\n if ($response['type'] == 'success') {\n $this->setKey($response['license_key']);\n\n delete_transient('quform_latest_version_info');\n delete_site_transient('update_plugins');\n\n wp_send_json(array(\n 'type' => 'success',\n 'status' => $this->getStatus(),\n 'message' => __('License key successfully verified', 'quform')\n ));\n } else if ($response['type'] == 'error') {\n $this->revoke();\n\n delete_transient('quform_latest_version_info');\n delete_site_transient('update_plugins');\n\n wp_send_json(array(\n 'type' => 'error',\n 'status' => $this->getStatus(),\n 'message' => __('Invalid license key', 'quform')\n ));\n }\n } else if (isset($response['code'])) {\n switch ($response['code']) {\n case 'rest_invalid_param':\n $this->revoke();\n\n delete_transient('quform_latest_version_info');\n delete_site_transient('update_plugins');\n\n wp_send_json(array(\n 'type' => 'error',\n 'status' => $this->getStatus(),\n 'message' => __('Invalid license key', 'quform')\n ));\n break;\n }\n }\n }\n\n wp_send_json(array(\n 'type' => 'error',\n 'message' => wp_kses(sprintf(\n __('An error occurred verifying the license key, please try again. If this problem persists, see %sthis page%s.', 'quform'),\n '<a href=\"http://support.themecatcher.net/quform-wordpress-v2/troubleshooting/common-problems/an-error-occurred-verifying-the-license-key\">',\n '</a>'\n ), array('a' => array('href' => array())))\n ));\n }", "public function valid_student_pin() {\r\n\t\t$email = clean_input($this->input->post('email'));\r\n\t\t$rollno = clean_input($this->input->post('rollno'));\r\n\t\t$pin = clean_input($this->input->post('pin'));\r\n\r\n\t\t$query = $this->db->get_where('student_auth', array('student_email' => $email,\r\n\t\t\t'student_rollno' => $rollno,\r\n\t\t\t'student_pin' => $pin));\r\n\t\tif ($query)\r\n\t\t\treturn ($query->num_rows() == 1);\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "function verify () {\n// $aop->alipayrsaPublicKey='MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjUzhXrdJ7GDsgJ59fMLlk7hyYrXkkeGwnYD/eO2HBZh39Y9gTfLJ61Yogc7keOn2uAnZY/zBlw3n+T6mb6/5JYFgvXQi8Qzeh6BkBrNnROu+k4PjhmSbORJFoLrrIxDnsYkQ995kYYhpbS0yf2Al++55v4SrD3/YoVBhWPcRg4xI0QD94FLwhCmcCkft/ILRtUxQk2QeVPLSesvMx2mmUK2L2x2hFA8ewRoGmUdG2Fu9YFIxk//16RI+H7KI8LaoXoVDqHobPae9p0ACE7k9G5vs/cYuikSMKu+lnxghte1jNO+CqrvTP4Pes/mW4e7CEMCTAmEnsXLUrQ6FpfKMcQIDAQAB';\n return $this->aop->rsaCheckV1($_POST, NULL, \"RSA2\");\n }", "public function checkLicense(){\n\n $secretkey = DB::table('configs')->where('nume', 'secr')->pluck('valoare');\n $tokenapp = DB::table('configs')->where('nume', 'tokenapp')->pluck('valoare');\n\n\n $root = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/';\n\n if ($secretkey == \"\") {\n DB::table('configs')->where('nume', 'secr')->update(array('valoare' => ''));\n DB::table('configs')->where('nume', 'tokenapp')->update(array('valoare' => ''));\n //Return true if license is empty\n return true;\n } else {\n\n $configs = DB::table('configs')\n ->where('nume', 'basic')\n ->pluck('valoare');\n\n $configs = json_decode($configs, true);\n\n\n $root = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/';\n if(!empty($configs['tokenapp'])){\n $url = \"http://yalayolo.me/vapi/api/api.php?license=\".$secretkey.\"&domain=\".$root.\"&product=viralfb&token=\".$tokenapp;\n }else{\n $url = \"http://yalayolo.me/vapi/api/api.php?license=\".$secretkey.\"&domain=\".$root.\"&product=viralfb\";\n }\n\n\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HEADER, false);\n $data = curl_exec($curl);\n curl_close($curl);\n $json = $data;\n if (strpos($json, 'Wrong license key')!==false) {\n DB::table('configs')->where('nume', 'secr')->update(array('valoare' => ''));\n DB::table('configs')->where('nume', 'tokenapp')->update(array('valoare' => ''));\n //Return true if license is invalid\n return true;\n }\n }\n \n\n }", "function validateIpn()\n {\n global $paidSub;\n define(\"API_LOGIN\",$paidSub->configs['fd_api_login']);\n define(\"API_KEY\", $paidSub->configs['fd_api_key']);\n define(\"TRAN_PURCHASE\",true);\n\n\n // if \n\n \n \n\n \n }", "private function validatePaymentFields(){\n }", "public function isApiKeyConfigured()\n {\n $public_key = Mage::helper('core')->decrypt(Mage::getStoreConfig('payment/bitcoin/public_key'));\n $private_key = Mage::helper('core')->decrypt(Mage::getStoreConfig('payment/bitcoin/private_key'));\n return (!empty($private_key) && !empty($public_key));\n }", "public function is_valid() {\n\t\t$license = $this->get_license();\n\n\t\tif ( isset( $license['license'] ) && 'valid' === $license['license'] ) {\n\t\t\tif ( isset( $license['expires'] ) && time() < strtotime( $license['expires'] ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function checkLicence() {\n\n $isValid = true;\n \n return $isValid;\n}", "function validate($con, $mysql_table, $lic, $appId)\n{\n $valid = FALSE;\n\t\n\t$result = mysql_query(\"SELECT Type, System, NumUsers, EndDate, Products, DomainSuffix FROM $mysql_table WHERE (LicenseKey = '$lic')\")\n\tor die(\"1,\" . mysql_error());\n\t\n\twhile($row = mysql_fetch_array($result)) {\n\t $valid = true;\n $productId = intval($row['Products']);\n if($productId & intval($appId) == 0)\n echo \"1,License does not include this product\";\n else\n \t echo \"0,\" . $row['DomainSuffix'] . \",\" . $row['EndDate'] . \",\" . $row['System'] . \",\" . $row['Type'] . \",\" . $row['NumUsers'];\n\t}\n\tif(!$valid)\n\t echo \"1,License Key Not Found\";\n\n\tmysql_close($con);\n}", "public function verifyCoinPassword($attribute,$params)\n\t{\n if(!VerifIdentity::model()->exists('serialNumber = :serialNumber AND verifCode = :verifCode',array(':serialNumber'=>$this->serialNumber,':verifCode'=>$this->verifCode)))\n $this->addError('verifCode','Incorrect validation Coin Password.');\n\n\t}", "function eddenvato_verify_license($key){\n\n\t// Setup Call\n\t$envato_apikey = get_option('eddenvato-api-key');\n\t$envato_username = get_option('eddenvato-user-name');\n\t$license_to_check = $key;\n\treturn wp_remote_get( 'http://marketplace.envato.com/api/edge/'.$envato_username.'/'.$envato_apikey.'/verify-purchase:'.$license_to_check.'.json' );\n\n}", "private function hash_validation() { //check hash\n\n\t\t$testMode = getRequest('ik_pw_via');\n\n\t\tif(isset($testMode) && $testMode == 'test_interkassa_test_xts'){\n\t\t\t$secretKey = $this->object->test_key;\n\t\t} else {\n\t\t\t$secretKey = $this->object->secret_key;\n\t\t}\n\n\t\t$data = array();\n\n\t\tforeach ($_REQUEST as $key => $value) {\n if (!preg_match('/ik_/', $key)) continue;\n $data[$key] = $value;\n }\n\n\t\t$ik_sign = $data['ik_sign'];\n\t\t$sign = $this->createSign($data,$secretKey);\n\n\t\t$this->wrlog(\"hash: \".$sign);\n\t\t$this->wrlog(\"ik_sign: \".$ik_sign);\n\t\treturn $sign == $ik_sign ? true : false;\n\t}", "function eth_verify_wallet($addr, $sig) {\n\treturn true;\n}", "function hasValidBitcointalkData()\n{\n $isValid =\n isset($_POST[\"profil\"]) && isset($_POST[\"signature\"]);\n \n return $isValid;\n}", "public function recheck_license( $license_key = '' ) {\n\t\t$status = $this->_check_license( $license_key, true );\n\t\t$this->is_valid = true === $status;\n\n\t\treturn $status;\n\t}", "public static function validatePasskey( $key ) {\n\t\t$pk = self::getPasskey( $key );\n\n\t\tif ( ( $pk == 'false' ) || ( $pk === false ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t/*\n\t\tif ( empty( $pk->active ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( empty( $pk->type_def['valid'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( $pk->trials <= 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\t*/\n\n\t\treturn true;\n\t}", "function validate_key($key)\n{\n if ($key == 'PhEUT5R251')\n return true;\n else\n return false;\n}", "public function isValid()\n {\n return $this->getStatus() != 'unlicensed';\n }", "protected function validCredentials(){\n $valid_credentials = !empty($this->consumerKey);\n $valid_credentials = ($valid_credentials && !empty($this->consumerSecret));\n $valid_credentials = ($valid_credentials && $this->consumerKey === variable_get('ebs_consumer_key', '')); \n $valid_credentials = ($valid_credentials && $this->consumerSecret === variable_get('ebs_consumer_secret', ''));\n \n return $valid_credentials;\n }", "protected function hasPrivateKey() {}", "public function check_availability() {\n \n if ( ( $this->client_id != '' ) AND ( $this->client_secret != '' ) ) {\n \n return true;\n \n } else {\n \n return false;\n \n }\n \n }" ]
[ "0.70226294", "0.6569704", "0.64478815", "0.64075655", "0.6362244", "0.6288005", "0.6228697", "0.61510664", "0.6116199", "0.6085407", "0.60699344", "0.6035676", "0.60209733", "0.601103", "0.59676164", "0.5950799", "0.59195477", "0.58828", "0.5877522", "0.58555347", "0.582414", "0.58101207", "0.5781963", "0.5765178", "0.5736982", "0.5728045", "0.5707333", "0.5706767", "0.5702499", "0.5676191" ]
0.6661189
1
Activate a licence after validating if its valid
public function activate() { $license = Licenses::find($this->key); $license->school_id = $this->auth_school_id; $license->activated_at = Carbon::now(); $license->used=LICENCE_KEY_USED; if($license->save()){ return $this->duration($license->duration); } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function activate_license() {\r\n\r\n\t$license_key = $this->get_license_option('license_key');\r\n\t$license_current_status = $this->get_license_option('license_status');\r\n\t\r\n\tif( !empty($license_key) && $license_current_status != 'valid' ){\r\n\r\n\t\t$license_data = $this->edd_api_request('activate_license');\r\n\t\t\r\n\t\t$license_status = $license_data->license;\r\n\t\t\t\r\n\t\tif( (isset($license_status)) && (!empty($license_status)) ) {\r\n\t\t\t\r\n\t\t\tif( $license_status == 'valid' ) {\r\n\r\n\t\t\t\t$this->remove_license_option('activation_error_code');\r\n\t\t\t\t$this->set_license_option('license_status', $license_status);\r\n\t\t\t\t$this->set_license_option('lps', 1);\r\n\t\t\t\t\r\n\t\t\t}elseif( $license_status == 'invalid' ) {\r\n\t\t\t\t\r\n\t\t\t\t// If expired, just leave it\r\n\t\t\t\tif( $license_current_status != 'expired' ) :\r\n\t\t\t\t\r\n\t\t\t\t\tif( isset($license_data->error) && !empty($license_data->error) ) :\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$this->set_license_option('license_status', $license_status);\r\n\t\t\t\t\t\t$this->set_license_option('activation_error_code', $license_data->error);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tendif;\r\n\t\t\t\t\r\n\t\t\t\tendif;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\treturn $license_data;\r\n\t\r\n\t}\r\n\r\n}", "public function updateLicenseStatus()\n {\n $transient = get_transient($this->slug);\n\n // If set and valid, return.\n if (VALID === $transient) {\n error_log('Active...');\n return;\n }\n // If expired, do something to never req again.\n\n // If not then, perform a check\n // error_log('Checking ...');\n // $response = $this->checkLicenseKey();\n }", "public function activate_license() {\n\n\t\t// listen for our activate button to be clicked\n\t\tif( isset( $_POST[ $this->product_slug . '_license_activate' ] ) ) {\n\n\t\t\t// run a quick security check\n\t\t \tif( ! check_admin_referer( $this->product_slug . '_license_nonce', $this->product_slug . '_license_nonce' ) )\n\t\t\t\treturn; // get out if we didn't click the Activate button\n\n\t\t\t// retrieve the license from the database\n\t\t\t$license = $_POST[ $this->product_slug . '-license-key' ];\n\n\n\t\t\t// data to send in our API request\n\t\t\t$api_params = array(\n\t\t\t\t'edd_action' => 'activate_license',\n\t\t\t\t'license' => $license,\n\t\t\t\t'item_id' => urlencode( EAEL_SL_ITEM_ID ), // the ID of our product in EDD\n\t\t\t\t'url' => home_url()\n\t\t\t);\n\n\t\t\t// Call the custom API.\n\t\t\t$response = wp_remote_post( EAEL_STORE_URL,\n\t\t\t\tarray(\n\t\t\t\t\t'timeout' \t=> 15,\n\t\t\t\t\t'sslverify' => false,\n\t\t\t\t\t'body' \t\t=> $api_params\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// make sure the response came back okay\n\t\t\tif ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {\n\n\t\t\t\tif ( is_wp_error( $response ) ) {\n\t\t\t\t\t$message = $response->get_error_message();\n\t\t\t\t} else {\n\t\t\t\t\t$message = __( 'An error occurred, please try again.' );\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t$license_data = json_decode( wp_remote_retrieve_body( $response ) );\n\n\t\t\t\tif ( false === $license_data->success ) {\n\n\t\t\t\t\tswitch( $license_data->error ) {\n\n\t\t\t\t\t\tcase 'expired' :\n\n\t\t\t\t\t\t\t$message = sprintf(\n\t\t\t\t\t\t\t\t__( 'Your license key expired on %s.' ),\n\t\t\t\t\t\t\t\tdate_i18n( get_option( 'date_format' ), strtotime( $license_data->expires, current_time( 'timestamp' ) ) )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'revoked' :\n\n\t\t\t\t\t\t\t$message = __( 'Your license key has been disabled.' );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'missing' :\n\n\t\t\t\t\t\t\t$message = __( 'Invalid license.' );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'invalid' :\n\t\t\t\t\t\tcase 'site_inactive' :\n\n\t\t\t\t\t\t\t$message = __( 'Your license is not active for this URL.' );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'item_name_mismatch' :\n\n\t\t\t\t\t\t\t$message = sprintf( __( 'This appears to be an invalid license key for %s.' ), EAEL_SL_ITEM_NAME );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'no_activations_left':\n\n\t\t\t\t\t\t\t$message = __( 'Your license key has reached its activation limit.' );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault :\n\n\t\t\t\t\t\t\t$message = __( 'An error occurred, please try again.' );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Check if anything passed on a message constituting a failure\n\t\t\tif ( ! empty( $message ) ) {\n\t\t\t\t$base_url = admin_url( 'admin.php?page=' . $this->get_settings_page_slug() );\n\t\t\t\t$redirect = add_query_arg( array( 'sl_activation' => 'false', 'message' => urlencode( $message ) ), $base_url );\n\n\t\t\t\twp_redirect( $redirect );\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t// $license_data->license will be either \"valid\" or \"invalid\"\n\n\t\t\t$this->set_license_key( $license );\n\t\t\t$this->set_license_status( $license_data->license );\n\n\t\t\twp_redirect( admin_url( 'admin.php?page=' . $this->get_settings_page_slug() ) );\n\t\t\texit();\n\t\t}\n\t}", "public function activate() {\n\n\t\t// Get License\n\t\t$license = $this->get_license();\n\n\t\ttry {\n\n\t\t\t// Check License key\n\t\t\tif ( '' === $license->get_key() ) {\n\t\t\t\tthrow new Exception( 'Please enter your license key.' );\n\t\t\t}\n\n\t\t\t// Check license email\n\t\t\tif ( '' === $license->get_email() ) {\n\t\t\t\tthrow new Exception( 'Please enter the email address associated with your license.' );\n\t\t\t}\n\n\t\t\t// Do activate request\n\t\t\t$request = wp_remote_get( self::STORE_URL . self::ENDPOINT_ACTIVATION . '&' . http_build_query( array(\n\t\t\t\t\t'email' => $license->get_email(),\n\t\t\t\t\t'licence_key' => $license->get_key(),\n\t\t\t\t\t'api_product_id' => $this->product_id,\n\t\t\t\t\t'request' => 'activate',\n\t\t\t\t\t'instance' => site_url()\n\t\t\t\t), '', '&' ) );\n\n\t\t\t// Check request\n\t\t\tif ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) {\n\t\t\t\tthrow new Exception( 'Connection failed to the License Key API server. Try again later.' );\n\t\t\t}\n\n\t\t\t// Get activation result\n\t\t\t$activate_results = json_decode( wp_remote_retrieve_body( $request ), true );\n\n\t\t\t// Check if response is correct\n\t\t\tif ( ! empty( $activate_results['activated'] ) ) {\n\n\t\t\t\t// Set local activation status to true\n\t\t\t\t$license->set_status( 'active' );\n\t\t\t\t$this->set_license( $license );\n\n\t\t\t\t// Return Message\n\t\t\t\treturn array(\n\t\t\t\t\t'result' => 'success',\n\t\t\t\t\t'message' => __( 'License successfully activated.', 'download-monitor' )\n\t\t\t\t);\n\n\t\t\t} elseif ( $activate_results === false ) {\n\t\t\t\tthrow new Exception( 'Connection failed to the License Key API server. Try again later.' );\n\t\t\t} elseif ( isset( $activate_results['error_code'] ) ) {\n\t\t\t\tthrow new Exception( $activate_results['error'] );\n\t\t\t}\n\n\n\t\t} catch ( Exception $e ) {\n\n\t\t\t// Set local activation status to false\n\t\t\t$license->set_status( 'inactivate' );\n\t\t\t$this->set_license( $license );\n\n\t\t\t// Return error message\n\t\t\treturn array( 'result' => 'failed', 'message' => $e->getMessage() );\n\t\t}\n\t}", "public function check_and_update_license_status() {\n\n\t\tswitch ( $status = $this->client->get_status() ) {\n\n\t\t\tcase 'valid' :\n\t\t\tcase 'expired' :\n\t\t\t\t$this->set_license_status( $status );\n\t\t\t\tbreak;\n\t\t\tcase 'site_inactive' :\n\t\t\t\tif ( ! is_wp_error( $this->client->activate() ) ) {\n\t\t\t\t\t$this->set_license_status( 'valid' );\n\t\t\t\t} else {\n\t\t\t\t\t$this->set_license_status( $status );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\t$this->set_license_status( 'invalid' );\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}", "function checkLicence() {\n\n $isValid = true;\n \n return $isValid;\n}", "public function checkLicenseAction()\n {\n $licenseString = trim($this->Request()->getPost('licenseString'));\n\n if (empty($licenseString)) {\n $this->View()->assign([\n 'success' => false,\n 'message' => 'Empty license information cannot be validated.',\n ]);\n\n return;\n }\n\n try {\n /** @var LicenseInformation $licenseData */\n $licenseData = $this->unpackLicense($licenseString);\n } catch (Exception $e) {\n $this->View()->assign([\n 'success' => false,\n 'message' => $e->getMessage(),\n 'errorType' => $this->resolveLicenseException($e),\n ]);\n\n return;\n }\n\n try {\n $licenseInstaller = new LicenseInstaller($this->container->get('dbal_connection'));\n $licenseInstaller->installLicense($licenseData);\n } catch (Exception $e) {\n $this->View()->assign([\n 'success' => false,\n 'message' => $e->getMessage(),\n ]);\n\n return;\n }\n\n $licenseData = $this->reFormatLicenseString($licenseData);\n\n $this->View()->assign([\n 'success' => true,\n 'licenseData' => $licenseData,\n ]);\n }", "public function activate_license()\n {\n if (isset($_POST['wpstg_activate_license']) && !empty($_POST['wpstg_license_key'])) {\n // run a quick security check\n if (!check_admin_referer('wpstg_license_nonce', 'wpstg_license_nonce'))\n return; // get out if we didn't click the Activate button\n\n\n // Save License key in DB\n update_option('wpstg_license_key', $_POST['wpstg_license_key']);\n\n // retrieve the license from the database\n $license = trim(get_option('wpstg_license_key'));\n\n\n // data to send in our API request\n $api_params = [\n 'edd_action' => 'activate_license',\n 'license' => $license,\n 'item_name' => urlencode(WPSTG_ITEM_NAME), // the name of our product in EDD\n 'url' => home_url()\n ];\n\n // Call the custom API.\n $response = wp_remote_post(WPSTG_STORE_URL, ['timeout' => 15, 'sslverify' => false, 'body' => $api_params]);\n\n // make sure the response came back okay\n if (is_wp_error($response) || wp_remote_retrieve_response_code($response) !== 200) {\n\n if (is_wp_error($response)) {\n $message = $response->get_error_message();\n } else {\n $message = __('An error occurred, please try again.');\n }\n } else {\n\n $license_data = json_decode(wp_remote_retrieve_body($response));\n\n if ($license_data->success === false) {\n\n switch ($license_data->error) {\n\n case 'expired' :\n\n $message = sprintf(\n __('Your license key expired on %s.'), date_i18n(get_option('date_format'), strtotime($license_data->expires, current_time('timestamp')))\n );\n break;\n\n case 'revoked' :\n\n $message = __('Your license key has been disabled.');\n break;\n\n case 'missing' :\n\n $message = __('WP Staging license key is invalid.');\n break;\n\n case 'invalid' :\n case 'site_inactive' :\n\n $message = __('Your license is not active for this URL.');\n break;\n\n case 'item_name_mismatch' :\n\n $message = sprintf(__('This appears to be an invalid license key for %s.'), WPSTG_ITEM_NAME);\n break;\n\n case 'no_activations_left':\n\n $message = __('Your license key has reached its activation limit.');\n break;\n\n default :\n\n $message = __('An error occurred, please try again.');\n break;\n }\n }\n }\n\n // Check if anything passed on a message constituting a failure\n if (!empty($message)) {\n $base_url = admin_url('admin.php?page=wpstg-license');\n $redirect = add_query_arg(['wpstg_licensing' => 'false', 'message' => urlencode($message)], $base_url);\n update_option('wpstg_license_status', $license_data);\n wp_redirect($redirect);\n exit();\n }\n\n // $license_data->license will be either \"valid\" or \"invalid\"\n update_option('wpstg_license_status', $license_data);\n wp_redirect(admin_url('admin.php?page=wpstg-license'));\n exit();\n }\n }", "public function activate_license( $key ) {\n\t\t// Data to send in our API request.\n\t\t$api_params = array(\n\t\t\t'edd_action' => 'activate_license',\n\t\t\t'license' => $key,\n\t\t\t'item_name' => rawurlencode( $this->product_slug ),\n\t\t\t'url' => home_url(),\n\t\t);\n\n\t\t// Call the Block Lab store's API.\n\t\t$response = wp_remote_post(\n\t\t\t$this->store_url,\n\t\t\tarray(\n\t\t\t\t'timeout' => 10,\n\t\t\t\t'sslverify' => true,\n\t\t\t\t'body' => $api_params,\n\t\t\t)\n\t\t);\n\n\t\tif ( is_wp_error( $response ) ) {\n\t\t\t$license = array( 'license' => self::REQUEST_FAILED );\n\t\t} else {\n\t\t\t$license = json_decode( wp_remote_retrieve_body( $response ), true );\n\t\t}\n\n\t\t$expiration = DAY_IN_SECONDS;\n\n\t\tset_transient( self::TRANSIENT_NAME, $license, $expiration );\n\t}", "public function shouldAcceptLicense()\n {\n return !Config::get('licenseAccepted');\n }", "function deactivate_license() {\n\n\t\t// listen for our activate button to be clicked\n\t\tif( isset( $_POST[ $this->product_slug . '_license_deactivate' ] ) ) {\n\n\t\t\t// run a quick security check\n\t\t \tif( ! check_admin_referer( $this->product_slug . '_license_nonce', $this->product_slug . '_license_nonce' ) )\n\t\t\t\treturn; // get out if we didn't click the Activate button\n\n\t\t\t// retrieve the license from the database\n\t\t\t$license = $this->get_license_key();\n\n\n\t\t\t// data to send in our API request\n\t\t\t$api_params = array(\n\t\t\t\t'edd_action' => 'deactivate_license',\n\t\t\t\t'license' => $license,\n\t\t\t\t'item_id' => urlencode( EAEL_SL_ITEM_ID ), // the ID of our product in EDD\n\t\t\t\t'url' => home_url()\n\t\t\t);\n\n\t\t\t// Call the custom API.\n\t\t\t$response = wp_remote_post( EAEL_STORE_URL,\n\t\t\t\tarray(\n\t\t\t\t\t'timeout' \t=> 15,\n\t\t\t\t\t'sslverify' => false,\n\t\t\t\t\t'body' \t\t=> $api_params\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// make sure the response came back okay\n\t\t\tif ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {\n\n\t\t\t\tif ( is_wp_error( $response ) ) {\n\t\t\t\t\t$message = $response->get_error_message();\n\t\t\t\t} else {\n\t\t\t\t\t$message = __( 'An error occurred, please try again.' );\n\t\t\t\t}\n\n\t\t\t\t$base_url = admin_url( 'admin.php?page=' . $this->get_settings_page_slug() );\n\t\t\t\t$redirect = add_query_arg( array( 'sl_activation' => 'false', 'message' => urlencode( $message ) ), $base_url );\n\n\t\t\t\twp_redirect( $redirect );\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t// decode the license data\n\t\t\t$license_data = json_decode( wp_remote_retrieve_body( $response ) );\n\n\t\t\t// $license_data->license will be either \"deactivated\" or \"failed\"\n\t\t\tif( $license_data->license == 'deactivated' ) {\n\t\t\t\tdelete_option( $this->product_slug . '-license-status' );\n\t\t\t\tdelete_option( $this->product_slug . '-license-key' );\n\t\t\t}\n\n\t\t\twp_redirect( admin_url( 'admin.php?page=' . $this->get_settings_page_slug() ) );\n\t\t\texit();\n\n\t\t}\n\t}", "function shoestrap_licence_status_cached() {\n $license = shoestrap_getVariable( 'shoestrap_license_key' );\n $status = get_transient( 'shoestrap_licence_status_cached' );\n\n if ( $status != 'valid' ) :\n if ( shoestrap_theme_license_status() == 'valid' ) :\n set_transient( 'shoestrap_licence_status_cached', shoestrap_theme_license_status(), 3600 * 24 );\n endif;\n endif;\n\n add_action( 'admin_init', 'shoestrap_activate_license' );\n}", "public function isValid()\n {\n return $this->getStatus() != 'unlicensed';\n }", "public function activate()\n {\n return view('licenses.activate');\n }", "public function is_valid() {\n\t\t$license = $this->get_license();\n\n\t\tif ( isset( $license['license'] ) && 'valid' === $license['license'] ) {\n\t\t\tif ( isset( $license['expires'] ) && time() < strtotime( $license['expires'] ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function Legal_init()\n{\n\tpnModSetVar('legal', 'termsofuse', true);\n\tpnModSetVar('legal', 'privacypolicy', true);\n\tpnModSetVar('legal', 'accessibilitystatement', true);\n\tpnModSetVar('legal', 'refundpolicy', true);\n\n\t// Initialisation successful\n return true;\n}", "function shoestrap_activate_license() {\n global $wp_version;\n\n $license = shoestrap_getVariable( 'shoestrap_license_key' );\n\n $api_params = array(\n 'edd_action' => 'activate_license',\n 'license' => $license,\n 'item_name' => urlencode( SHOESTRAP_THEME_NAME )\n );\n\n $response = wp_remote_get( add_query_arg( $api_params, SHOESTRAP_STORE_URL ), array( 'timeout' => 15, 'sslverify' => false ) );\n\n if ( is_wp_error( $response ) ) :\n return false;\n endif;\n\n $license_data = json_decode( wp_remote_retrieve_body( $response ) );\n}", "private function validateLicenseData()\n {\n\n // error_log('LicenseEmail : '.print_r($this->getLicenseEmail(), 1));\n // error_log('LicenseProduct : '.print_r($this->getLicenseProduct(), 1));\n // error_log('LicenseSecretKey : '.print_r($this->getLicenseSecretKey(), 1));\n }", "public function deactivate_license()\n {\n if (isset($_POST['wpstg_deactivate_license'])) {\n // run a quick security check\n if (!check_admin_referer('wpstg_license_nonce', 'wpstg_license_nonce'))\n return; // get out if we didn't click the Activate button\n\n\n // retrieve the license from the database\n $license = trim(get_option('wpstg_license_key'));\n\n\n // data to send in our API request\n $api_params = [\n 'edd_action' => 'deactivate_license',\n 'license' => $license,\n 'item_name' => urlencode(WPSTG_ITEM_NAME), // the name of our product in EDD\n 'url' => home_url()\n ];\n\n // Call the custom API.\n $response = wp_remote_post(WPSTG_STORE_URL, ['timeout' => 15, 'sslverify' => false, 'body' => $api_params]);\n\n // make sure the response came back okay\n if (is_wp_error($response) || wp_remote_retrieve_response_code($response) !== 200) {\n\n if (is_wp_error($response)) {\n $message = $response->get_error_message();\n } else {\n $message = __('An error occurred, please try again.');\n }\n\n $base_url = admin_url('admin.php?page=wpstg-license');\n $redirect = add_query_arg(['wpstg_licensing' => 'false', 'message' => urlencode($message)], $base_url);\n wp_redirect($redirect);\n exit();\n }\n\n // decode the license data\n $license_data = json_decode(wp_remote_retrieve_body($response));\n\n // $license_data->license will be either \"deactivated\" or \"failed\"\n if ($license_data->license === 'deactivated' || $license_data->license === 'failed') {\n delete_option('wpstg_license_status');\n }\n\n wp_redirect(admin_url('admin.php?page=wpstg-license'));\n exit();\n }\n }", "protected function _maybe_show_notice() {\n\t\tif ( false === $this->is_valid && ! SermonManager::getOption( 'license_key' ) ) {\n\t\t\tPlugin::instance()->notice_manager->add_info( 'licensing_activate', 'Please <a href=\"' . admin_url( 'edit.php?post_type=wpfc_sermon&page=sm-settings&tab=licensing' ) . '\" target=\"_self\">enter and activate</a> your license key to enable automatic updates.', 10, 'licensing', true );\n\t\t} else {\n\t\t\tPlugin::instance()->notice_manager->set_seen( 'licensing_activate', true );\n\t\t}\n\t}", "function check_licence( $licence_key ) {\n\t\t// return json_encode( array( 'ok' => 'ok' ) );\n\t\t// return json_encode( array( 'errors' => array( 'standard' => 'oh no! licence is not working.') ) );\n\t\tif( empty( $licence_key ) ) {\n\t\t\treturn false;\n\t\t}\n\t\t$args = array(\n\t\t\t'licence_key' => $licence_key,\n\t\t\t'site_url' => site_url( '', 'http' ),\n\t\t\t);\n\n\t\t$response = $this->dbrains_api_request( 'check_support_access', $args );\n\t\tset_site_transient( 'wpmdb_licence_response', $response, $this->transient_timeout );\n\t\treturn $response;\n\t}", "public function deactivate() {\n\n\t\t// Get License\n\t\t$license = $this->get_license();\n\n\t\ttry {\n\n\t\t\t// Check License key\n\t\t\tif ( '' === $license->get_key() ) {\n\t\t\t\tthrow new Exception( \"Can't deactivate license without a license key.\" );\n\t\t\t}\n\n\t\t\t// The Request\n\t\t\t$request = wp_remote_get( self::STORE_URL . self::ENDPOINT_ACTIVATION . '&' . http_build_query( array(\n\t\t\t\t\t'api_product_id' => $this->product_id,\n\t\t\t\t\t'licence_key' => $license->get_key(),\n\t\t\t\t\t'request' => 'deactivate',\n\t\t\t\t\t'instance' => site_url(),\n\t\t\t\t), '', '&' ) );\n\n\t\t\t// Check request\n\t\t\tif ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) {\n\t\t\t\tthrow new Exception( 'Connection failed to the License Key API server. Try again later.' );\n\t\t\t}\n\n\t\t\t// Get result\n\t\t\t$result = json_decode( wp_remote_retrieve_body( $request ), true );\n\n\t\t\t/** @todo check result * */\n\n\t\t\t// Set new license status\n\t\t\t$license->set_status( 'inactive' );\n\t\t\t$this->set_license( $license );\n\n\t\t\treturn array( 'result' => 'success' );\n\n\t\t} catch ( Exception $e ) {\n\n\t\t\t// Return error message\n\t\t\treturn array( 'result' => 'failed', 'message' => $e->getMessage() );\n\t\t}\n\n\t}", "public function license($license_key) {\n $license_key = trim($license_key);\n $alert = [];\n if(!$license_key):\n $alert = ['danger' => 'No license key added'];\n update_option('responsive_menu_pro_license_type', '');\n update_option('responsive_menu_pro_license_key', '');\n\n else:\n /* First Check The Generic License */\n $response = wp_remote_get('https://responsive.menu/?' . http_build_query(\n [\n 'edd_action'=> 'activate_license',\n 'license' \t=> $license_key,\n 'item_name' => urlencode('Responsive Menu Pro'),\n 'url' => home_url()\n ]\n ), ['decompress' => false]);\n $license_type = 'License';\n if(is_wp_error($response))\n $alert = ['danger' => $response->get_error_message() . ' - Please <a href=\"https://responsive.menu/faq/license-activation-issues\" target=\"_blank\"> click here</a> for more information.'];\n else\n $response = json_decode($response['body']);\n\n /* Parse Result */\n if(!isset($response->success) || !$response->success):\n /* Now Check The Old Multi License */\n $response = wp_remote_get('https://responsive.menu/?' . http_build_query(\n [\n 'edd_action'=> 'activate_license',\n 'license' \t=> $license_key,\n 'item_name' => urlencode('Responsive Menu Pro - Multi License'),\n 'url' => home_url()\n ]\n ), ['decompress' => false]);\n $license_type = 'Multi License';\n if(is_wp_error($response))\n $alert = ['danger' => $response->get_error_message() . ' - Please <a href=\"https://responsive.menu/faq/license-activation-issues\" target=\"_blank\"> click here</a> for more information.'];\n else\n $response = json_decode($response['body']);\n endif;\n\n /* Parse Result */\n if(!isset($response->success) || !$response->success):\n /* Finally Check The Old Single License */\n $response = wp_remote_get('https://responsive.menu/?' . http_build_query(\n [\n 'edd_action'=> 'activate_license',\n 'license' \t=> $license_key,\n 'item_name' => urlencode('Responsive Menu Pro - Single License'),\n 'url' => home_url()\n ]\n ), ['decompress' => false]);\n $license_type = 'Single License';\n\n if(is_wp_error($response))\n $alert = ['danger' => $response->get_error_message() . ' - Please <a href=\"https://responsive.menu/faq/license-activation-issues\" target=\"_blank\"> click here</a> for more information.'];\n else\n $response = json_decode($response['body']);\n endif;\n\n if(isset($response->success) && $response->success):\n update_option('responsive_menu_pro_license_type', $license_type);\n $alert = ['success' => 'License key updated'];\n else:\n update_option('responsive_menu_pro_license_type', '');\n if(!is_wp_error($response))\n $alert = ['danger' => 'License key invalid' . ' - Please <a href=\"https://responsive.menu/knowledgebase/license-activation-issues/\" target=\"_blank\"> click here</a> for more information.'];\n endif;\n update_option('responsive_menu_pro_license_key', $license_key);\n endif;\n\n return $this->view->render(\n 'admin/main.html.twig',\n [\n 'alert' => $alert,\n 'options' => $this->manager->all()\n ]\n );\n }", "function check_software_license()\n {\n $q = $this->db->where('license', $this->input->post('license_num'))->where('action_type', 'install')->where('company_id', $this->session->userdata('company_id'))->limit(1)->get('software');\n\n if ($q->num_rows == 1)\n {\n return true;\n\n } else {\n\n return false;\n }\n }", "public function recheck_license( $license_key = '' ) {\n\t\t$status = $this->_check_license( $license_key, true );\n\t\t$this->is_valid = true === $status;\n\n\t\treturn $status;\n\t}", "function clixplit_activate($key) {\n\n $license_key = $key;\n $response_message ='';\n\n // API query parameters\n $api_params = array(\n 'slm_action' => 'slm_activate',\n 'secret_key' => self::CLIXPLIT_SECRET_KEY,\n 'license_key' => $license_key,\n 'registered_domain' => $_SERVER['SERVER_NAME'],\n 'item_reference' => urlencode(self::CLIXPLIT_REFERENCE),\n );\n\n // Send query to the license manager server\n $query = esc_url_raw(add_query_arg($api_params, self::CLIXPLIT_LICENSE_SERVER_URL));\n $response = wp_remote_get($query, array('timeout' => 20, 'sslverify' => false));\n\n // Check for error in the response\n if (is_wp_error($response)){\n $response_message = \"Unexpected Error! The query returned with an error.\";\n return $response_message;\n }\n\n // var_dump($response);//uncomment it if you want to look at the full response\n\n // License data.\n // $license_data = json_decode(wp_remote_retrieve_body($response));\n $license_data = json_decode( preg_replace('/[\\x00-\\x1F\\x80-\\xFF]/', '', wp_remote_retrieve_body($response)), true );\n\n // TODO - Do something with it.\n var_dump($license_data);//uncomment it to look at the data\n\n if($license_data->result == 'success'){//Success was returned for the license activation\n\n //Uncomment the followng line to see the message that returned from the license server\n \t$response_message = '<br />The following message was returned from the server: ' . $license_data->message . '<meta http-equiv=\"refresh\" content=\"2;url=?page=clixplit/clixplit-home.php\" />';\n \treturn $response_message;\n\n }\n else{\n //Show error to the user. Probably entered incorrect license key.\n\n //Uncomment the followng line to see the message that returned from the license server\n \t$response_message = '<br />The following message was returned from the server: '.$license_data->message;\n \treturn $response_message;\n }\n }", "public function testSetIndemnLic() {\n\n $obj = new AttestationCacm();\n\n $obj->setIndemnLic(true);\n $this->assertEquals(true, $obj->getIndemnLic());\n }", "protected function activate_scheduling_licenses()\n {\n global $wpdb;\n\n delete_transient(PMXI_Plugin::$cache_key);\n\n $wpdb->query( $wpdb->prepare(\"DELETE FROM $wpdb->options WHERE option_name = %s\", $this->slug . '_' . PMXI_Plugin::$cache_key) );\n $wpdb->query( $wpdb->prepare(\"DELETE FROM $wpdb->options WHERE option_name = %s\", $this->slug . '_timeout_' . PMXI_Plugin::$cache_key) );\n\n delete_site_transient('update_plugins');\n\n // retrieve the license from the database\n return $this->licensingActivator->activateLicense(PMXI_Plugin::getSchedulingName(),\\Wpai\\App\\Service\\License\\LicenseActivator::CONTEXT_SCHEDULING);\n }", "public function validateCheckoutAgreementEditAction()\n {\n $id = $this->_request->getParam('id');\n if ($id) {\n $object = $this->_objectManager->create(\\Magento\\CheckoutAgreements\\Model\\Agreement::class)->load($id);\n if ($object && $object->getId()) {\n $stores = $object->getStoreId();\n foreach ($stores as $store) {\n if ($store == 0 || !$this->_role->hasStoreAccess($store)) {\n $this->_forward();\n return false;\n }\n }\n }\n }\n return true;\n }", "public function checkLicense(){\n\n $secretkey = DB::table('configs')->where('nume', 'secr')->pluck('valoare');\n $tokenapp = DB::table('configs')->where('nume', 'tokenapp')->pluck('valoare');\n\n\n $root = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/';\n\n if ($secretkey == \"\") {\n DB::table('configs')->where('nume', 'secr')->update(array('valoare' => ''));\n DB::table('configs')->where('nume', 'tokenapp')->update(array('valoare' => ''));\n //Return true if license is empty\n return true;\n } else {\n\n $configs = DB::table('configs')\n ->where('nume', 'basic')\n ->pluck('valoare');\n\n $configs = json_decode($configs, true);\n\n\n $root = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/';\n if(!empty($configs['tokenapp'])){\n $url = \"http://yalayolo.me/vapi/api/api.php?license=\".$secretkey.\"&domain=\".$root.\"&product=viralfb&token=\".$tokenapp;\n }else{\n $url = \"http://yalayolo.me/vapi/api/api.php?license=\".$secretkey.\"&domain=\".$root.\"&product=viralfb\";\n }\n\n\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HEADER, false);\n $data = curl_exec($curl);\n curl_close($curl);\n $json = $data;\n if (strpos($json, 'Wrong license key')!==false) {\n DB::table('configs')->where('nume', 'secr')->update(array('valoare' => ''));\n DB::table('configs')->where('nume', 'tokenapp')->update(array('valoare' => ''));\n //Return true if license is invalid\n return true;\n }\n }\n \n\n }" ]
[ "0.7343828", "0.6995132", "0.68805337", "0.6836708", "0.6623056", "0.6583681", "0.6541186", "0.6538204", "0.62695944", "0.61708844", "0.6168225", "0.6144257", "0.6084192", "0.6079196", "0.5978744", "0.5957083", "0.593454", "0.59314823", "0.591998", "0.5890411", "0.58839196", "0.587154", "0.5857753", "0.57500446", "0.5745776", "0.5703277", "0.5699186", "0.5693847", "0.5681875", "0.5680952" ]
0.7176772
1
Validate the validity of the source stream.
public function validateSource(): bool { return ($this->source and $this->source->isOpen()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateSource() {\n\t\treturn true;\n\t}", "public function validateSource()\n {\n return $this;\n }", "public function valid() {\r\n\t\tif (feof($this->handle)) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n }", "public function open($source)\n {\n libxml_use_internal_errors(true);\n\n $this->source = $source;\n\n if (! ($source instanceof Source ? $this->openSource($source) : $this->openFile($source))) {\n return false;\n }\n\n $this->reader->setParserProperty(XMLReader::VALIDATE, true);\n\n if (! $this->reader->isValid()) {\n $this->triggerException(\n new UnexpectedValueException('The source data is not valid.')\n );\n }\n\n $this->reader->setParserProperty(XMLReader::VALIDATE, false);\n }", "function checkSourceFormat()\r\n\t{\r\n\t\treturn true;\r\n\t}", "public function originIsValid(): bool;", "public function isValid()\n\t{\n\t\tif ( !parent::isValid())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// If video is redirected\n\t\t$pattern = \"'301 Moved Permanently's\";\n\t\tif(preg_match_all($pattern, $this->xmlContent, $matches))\n\t\t{\n\t\t\t$this->setError\t( JText::_('COM_COMMUNITY_VIDEOS_FETCHING_VIDEO_ERROR') );\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "protected function validateChecksum() {\n\t}", "public function valid()\n {\n\n if ($this->container['use_async_pattern'] === null) {\n return false;\n }\n if ($this->container['source_file_name'] === null) {\n return false;\n }\n if ($this->container['source_file_content'] === null) {\n return false;\n }\n if ($this->container['copy_metadata'] === null) {\n return false;\n }\n $allowed_values = [\"English\", \"Arabic\", \"Danish\", \"German\", \"Dutch\", \"Finnish\", \"French\", \"Hebrew\", \"Hungarian\", \"Italian\", \"Norwegian\", \"Portuguese\", \"Spanish\", \"Swedish\", \"Russian\"];\n if (!in_array($this->container['language'], $allowed_values)) {\n return false;\n }\n $allowed_values = [\"Slow but accurate\", \"Faster and less accurate\", \"Fastest and least accurate\"];\n if (!in_array($this->container['performance'], $allowed_values)) {\n return false;\n }\n $allowed_values = [\"None\", \"Whitelist\", \"Blacklist\"];\n if (!in_array($this->container['characters_option'], $allowed_values)) {\n return false;\n }\n return true;\n }", "public function isValid()\n {\n return $this->pos < strlen($this->buffer);\n }", "public function valid(): bool\n {\n return !feof($this->fp) || $this->index !== null; // Is het einde van het bestand NIET bereikt?\n }", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function valid() {}", "public function testImportFromStream() {\n\t\t$transit = new Transit('stream.jpg');\n\t\t$transit->setDirectory(TEMP_DIR);\n\n\t\t// Nothing in stream\n\t\ttry {\n\t\t\t$transit->importFromStream();\n\t\t\t$this->assertTrue(false);\n\n\t\t} catch (Exception $e) {\n\t\t\t$this->assertTrue(true);\n\t\t}\n\t}", "public function filesizeValid()\n\t{\n\t\tif ($this->files['size'] > $this->max_filesize) {\n\t\t\tthrow new Exception(\"File is too big\",7);\n\t\t}\n\n\t\t//Check that the file is not too less\n\t\tif ($this->files['size'] < $this->min_filesize) {\n\t\t throw new Exception(\"File is too less than\",8);\n\t\t}\n\t\n\t}", "protected function _checkErrors($source= NULL) {\n if ($error= libxml_get_last_error()) {\n libxml_clear_errors();\n if (LIBXML_ERR_FATAL != $error->level) return;\n \n throw new TransformerException(sprintf(\"Transformation failed: #%d: %s\\n at %s, line %d, column %d\",\n $error->code,\n trim($error->message),\n strlen($error->file) ? $error->file : xp::stringOf($source),\n $error->line,\n $error->column\n ));\n }\n }", "public function valid()\n {\n return $this->fileObject->valid();\n }", "public function validate() {\r\n if (empty($this->name)) {\r\n throw new Exception(\"Verification failed - download must have a name\");\r\n }\r\n \r\n if (!$this->Date instanceof DateTime) {\r\n $this->Date = new DateTime;\r\n }\r\n \r\n if (empty($this->filename)) {\r\n throw new Exception(\"Verification failed - download must have a filename\");\r\n }\r\n \r\n if (is_null($this->mime)) {\r\n $this->mime = \"\";\r\n }\r\n \r\n if (!filter_var($this->active, FILTER_VALIDATE_INT)) {\r\n $this->active = 1;\r\n } \r\n \r\n if (!filter_var($this->approved, FILTER_VALIDATE_INT)) {\r\n $this->approved = 0;\r\n }\r\n \r\n if (!filter_var($this->hits, FILTER_VALIDATE_INT)) {\r\n $this->hits = 0;\r\n }\r\n \r\n if ($this->Author instanceof User) {\r\n $this->user_id = $this->Author->id;\r\n }\r\n \r\n if (!filter_var($this->user_id, FILTER_VALIDATE_INT)) {\r\n throw new Exception(\"No valid owner of this download has been provided\");\r\n }\r\n \r\n return true;\r\n }", "public function isValid()\n {\n $docType = get_class($this->source);\n if (isset($this->options['required'][$docType])) {\n $this->validateTags($docType);\n } else if (isset($this->options['required']['__ALL__'])) {\n $this->validateTags('__ALL__');\n }\n }", "public function valid();", "public function valid();", "public function valid();", "public function valid();", "public function isValid()\n {\n $valid = TRUE;\n\n if ($this->body && !$this->hasHeader('Content-Length')) {\n $valid = 400;\n }\n\n return $valid;\n }" ]
[ "0.704391", "0.6005241", "0.5959738", "0.58160245", "0.5693261", "0.5613487", "0.557695", "0.55628705", "0.5541404", "0.55050594", "0.5500174", "0.5487234", "0.5487234", "0.5487234", "0.5487234", "0.5487234", "0.5487234", "0.5487234", "0.5487234", "0.545651", "0.5402266", "0.53814703", "0.536945", "0.53595525", "0.5357405", "0.53489083", "0.53489083", "0.53489083", "0.53489083", "0.53426903" ]
0.6923064
1
Set position to endoffile plus offset. Note: String source cannot write behind eof.
public function seekAtEnd(int $offset = 0): self { if ($this->validateSource()) { fseek($this->source->getStream(), $offset, SEEK_END); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function seekFromEnd(int $offset): void;", "function seekToEnd() : void;", "function seekTo(int $offset, int $whence = SEEK_SET) : void;", "public function seek(int $offset): void;", "public abstract function seek($offset);", "public function write($string, $start = 0) {}", "function injectStringInFile($file, $string, $position)\n {\n $fpFile = fopen($file, \"rw+\");\n $fpTemp = fopen('php://temp', \"rw+\");\n\n stream_copy_to_stream($fpFile, $fpTemp);\n\n fseek($fpFile, $position);\n fseek($fpTemp, $position);\n\n fwrite($fpFile, $string . PHP_EOL);\n\n stream_copy_to_stream($fpTemp, $fpFile);\n\n fclose($fpFile);\n fclose($fpTemp);\n }", "public function setOffset(int $offset): void\n {\n $current = $this->stream->tell();\n\n if ($current !== $offset) {\n // If the stream cannot seek to the offset position, then read to it\n if ($this->stream->isSeekable()) {\n $this->stream->seek($offset);\n } elseif ($current > $offset) {\n throw new \\RuntimeException(\"Could not seek to stream offset $offset\");\n } else {\n $this->stream->read($offset - $current);\n }\n }\n\n $this->offset = $offset;\n }", "public function set_file_pointer($offset)\n {\n if (@fseek($this->file_handle, $offset, SEEK_SET) === -1) {\n throw new Ai1wm_Not_Seekable_Exception(sprintf('Unable to seek to offset of file. File: %s Offset: %d', $this->file_name, $offset));\n }\n }", "public function setEndPosition($value) {\r\n $this->endPosition = $this->setDoubleProperty($this->endPosition, $value);\r\n }", "private function moveStringCursor($positionOffset, $byteStreamOffset)\n {\n }", "public function seek()\r\n\t{\r\n\t}", "public function seek($position) {}", "function seek($pos) {\n fseek($this->handle, $pos, SEEK_CUR);\n }", "public function seek($offset, $whence = SEEK_SET);", "public function seek($position)\n {\n fseek($this->resource, $position, SEEK_SET);\n if (!$this->valid()) {\n throw new \\OutOfRangeException('Seek out of file content. ');\n }\n }", "public function _seek($position);", "public function seek($offset, $whence = stubSeekable::SET);", "function setEol($eol)\n\t{\n\t\t$this->eol = $eol;\n\t}", "public function seek(int $offset, int $whence = SEEK_SET): void;", "public function test_fseek() {\n $uri = $this->sample_file;\n\n $fp = fopen($uri, 'r');\n $data = fgets($fp, 5);\n $this->assertEquals(4, ftell($fp), \"Something messed up in fgets() or ftell().\");\n\n $this->assertEquals(0, fseek($fp, 0));\n\n fclose($fp);\n }", "public function seek(int $offset): void\n {\n $this->assertHandleIsOpen();\n\n Psl\\invariant($offset >= 0, '$offset must be a positive-int.');\n $this->offset = $offset;\n }", "public function forward() : void {\n $this->seek(0, SEEK_END);\n }", "public function seekFromStart(int $offset): void;", "public function seek(int $offset, int $whence = SEEK_SET) : bool {\n if ($this->append) {\n return false;\n }\n\n switch ($whence) {\n case SEEK_SET: $this->offset = $offset; break;\n case SEEK_CUR: $this->offset += $offset; break;\n case SEEK_END: $this->offset = $this->size + $offset; break;\n }\n\n if ($this->offset > $this->size) {\n $this->content .= str_repeat(\"\\0\", $this->offset - $this->size);\n $this->size = $this->offset;\n $this->mtime = time();\n }\n\n return true;\n }", "public function seekOffset(int $offset = 0): self\n {\n if ($this->validateSource()) {\n fseek($this->source->getStream(), $offset, SEEK_SET);\n }\n\n return $this;\n }", "public function seek($offset)\n {\n if ($offset < 0 || $offset > $this->file->length) {\n throw new InvalidArgumentException(sprintf('$offset must be >= 0 and <= %d; given: %d', $this->file->length, $offset));\n }\n\n /* Compute the offsets for the chunk and buffer (i.e. chunk data) from\n * which we will expect to read after seeking. If the chunk offset\n * changed, we'll also need to reset the buffer.\n */\n $lastChunkOffset = $this->chunkOffset;\n $this->chunkOffset = (integer) floor($offset / $this->chunkSize);\n $this->bufferOffset = $offset % $this->chunkSize;\n\n if ($lastChunkOffset === $this->chunkOffset) {\n return;\n }\n\n if ($this->chunksIterator === null) {\n return;\n }\n\n // Clear the buffer since the current chunk will be changed\n $this->buffer = null;\n\n /* If we are seeking to a previous chunk, we need to reinitialize the\n * chunk iterator.\n */\n if ($lastChunkOffset > $this->chunkOffset) {\n $this->chunksIterator = null;\n\n return;\n }\n\n /* If we are seeking to a subsequent chunk, we do not need to\n * reinitalize the chunk iterator. Instead, we can simply move forward\n * to $this->chunkOffset.\n */\n $numChunks = $this->chunkOffset - $lastChunkOffset;\n for ($i = 0; $i < $numChunks; $i++) {\n $this->chunksIterator->next();\n }\n }", "public function seek($offset, $whence = SEEK_SET)\n {\n }", "public function setLocation(FileDescriptor $file, int $line = 0): void;", "function imprimir(&$fp, $string) {\n\n fwrite($fp, $string);\n }" ]
[ "0.6291071", "0.57271004", "0.5561579", "0.55184555", "0.5512662", "0.54173833", "0.5384527", "0.5343648", "0.5342861", "0.53191924", "0.52619296", "0.5221487", "0.5174144", "0.51738435", "0.51638156", "0.51471704", "0.51118803", "0.50693023", "0.50328445", "0.50251544", "0.5023912", "0.50059104", "0.49259222", "0.49200904", "0.4894464", "0.4890358", "0.48898697", "0.4853833", "0.4806607", "0.48025656" ]
0.5990343
1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// Alec's Fuck Yeah Let's Generate Html Helper Functions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// / Takes in a string and an array of properties. Inserts each property into the string where it can by replacing instances of the property name surrounded by '%' Example Usage: Input $htmlString = ""; $array = ['class' => 'active','bar' => 0]; Output "";
function propertyStringReplace($htmlString, $array) { foreach($array as $property => $value) { $htmlString = str_replace('%'.$property.'%', $value, $htmlString); } return $htmlString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function str_a_replace($array, $string) {\n foreach ($array as $from => $to)\n $string = str_replace($from, $to, $string);\n \n return $string;\n}", "public function html_format($string)\n\t\t{\n\t\t\t$string = str_ireplace(array_keys($this->bb_code_tags), array_values($this->bb_code_tags), $string);\n\t\t\t\n\t\t\tif(stripos($string, '[/url]') == true || stripos($string, '[/img]') == true || stripos($string, '[/image]') == true)\n\t\t\t{\n\t\t\t\tforeach($this->advanced_bb_code_tags as $match => $replacement) \n\t\t\t\t{\n\t\t\t\t\t$string = preg_replace($match, $replacement, $string);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n \t\t\treturn $string;\n\t\t}", "function opt_2_html($arr) {\n\t$r = array();\n\tforeach($arr AS $key=>$value) {\n\t\t$r[] = sechoe('%s=\"%s\"',$key,$value);\n\t}\n\treturn join(' ', $r);\n}", "function wp_replace_in_html_tags($haystack, $replace_pairs)\n {\n }", "function attributesToHtml($attributes) {\n $html='';\n if (is_array($attributes))\n foreach ($attributes as $attrName=>$attrValue) {\n $html.=' '.$attrName.'=\"'.$attrValue.'\"';\n } elseif(is_string($attributes))\n \t$html=$attributes;\n return $html;\n }", "protected function generateHTML(array $attrs)\r\n {\r\n $html = '<span';\r\n\r\n foreach ($attrs as $key => $value) {\r\n $html .= ' ' . $key . '=\"' . $value . '\"';\r\n }\r\n\r\n $html .= '></span>';\r\n\r\n return $html;\r\n }", "function replaceBarInSubTemplate($stringArray) {\r\n\treturn str_replace(\"|\",\"####\",$stringArray[0]);\r\n}", "function attributer($attributes){\n\t$output = '';\n\tforeach ($attributes as $attribute => $value) {\n\t \tif(is_array($value)){ //breaks down any array into a string\n\t \t\tswitch ($attribute) {\n\t \t\t\tcase 'class': \t$output .= 'class=\"'.implode(' ', $value).'\" '; break;\n\t \t\t\tcase 'onclick': $output .= $value.'()'; break;\n\t \t\t\tcase 'data': \tforeach ($value as $name=>$val) { $output .= 'data-'.$key.'= \"'.$val.'\" '; } break;\t \t\t\t\n\t \t\t\tdefault: \t\t$output .= $attribute.' '; break;\n\t \t\t}\t \t\t \n\t \t}\n\t \telse{ $output .= ' '.$attribute.'=\"'.$value.'\" ';\t} \t\n\t}\n\treturn $output;\n}", "public function htmlchars($array) {\n return array_map('htmlspecialchars', $array);\n }", "function change_tags($str){\r\n\r\n\t\t\t$str=str_replace('#ID#',$this->id,$str);\r\n\t\t\t$str=str_replace('#PAGE#',$this->page,$str);\r\n\t\t\t$str=str_replace('#ITEMS_PER_PAGE#',$this->items_per_page,$str);\r\n\t\t\t$str=str_replace('#TOTAL_ITEMS#',$this->total_items,$str);\r\n\r\n\t\t\treturn $str;\r\n\r\n\t}", "function HtmlEncode(&$str)\n{\n\t\t\t //$str = str_replace(\"&\", \"。。\",$str);\n $str = str_replace(\"<\", \"。。\",$str);\n $str = str_replace(\">\", \"。。\",$str);\n $str = str_replace(\"'\", \"\\'\",$str);\n $str = str_replace(\"*\", \"\",$str);\n $str = str_replace(\"\\n\", \"<br/>\",$str);\n $str = str_replace(\"\\r\\n\", \"<br/>\",$str);\n $str = str_replace(\"select\", \"\",$str);\n $str = str_replace(\"insert\", \"\",$str);\n $str = str_replace(\"update\", \"\",$str);\n $str = str_replace(\"delete\", \"\",$str);\n $str = str_replace(\"create\", \"\",$str);\n $str = str_replace(\"drop\", \"\",$str);\n $str = str_replace(\"delcare\", \"\",$str);\n\t\t\t return $str;\n}", "protected function buildHtmlAttrs($params)\n {\n $html_params = $params['html'];\n $html = '';\n\n foreach ($html_params as $key => $val) {\n $html .= \" {$key}=\\\"{$val}\\\"\";\n }\n\n return $html;\n }", "function html_escape($var) {\n if (is_array($var)) {\n return array_map('html_escape', $var);\n }\n else {\n return htmlspecialchars($var, ENT_QUOTES, config_item('charset'));\n }\n}", "private function getHtmlFromArray(array $attributes)\n {\n $htmlParts = [];\n foreach ($attributes as $key => $value) {\n if ($value === true) {\n $htmlParts[] = (string) $key;\n } elseif ($value !== false) {\n $htmlParts[] = \"$key=\\\"$value\\\"\";\n }\n }\n return implode(' ', $htmlParts);\n }", "function smarty_function_escape_special_chars( $string )\r\n{\r\n if ( !is_array( $string ) )\r\n {\r\n $string = preg_replace( \"!&(#?\\\\w+);!\", \"%%%SMARTY_START%%%\\\\1%%%SMARTY_END%%%\", $string );\r\n $string = htmlspecialchars( $string );\r\n $string = str_replace( array( \"%%%SMARTY_START%%%\", \"%%%SMARTY_END%%%\" ), array( \"&\", \";\" ), $string );\r\n }\r\n return $string;\r\n}", "protected function arrayToHtmlAttributes(array $values)\n {\n $output = \"\";\n ksort($values);\n\n foreach ($values as $key => $value) {\n $output .= sprintf('%s=\"%s\" ', htmlentities($key), htmlentities($value));\n }\n\n return $output;\n }", "public function propertyFast($property, $content, $addTagAttributes = NULL) {\n // start tag\n $code = '<div property=\"' . $property . '\" content=\"' . $content . '\"';\n // additional tag attributes string (starts with whitespace)\n // if (isset) \n if ($addTagAttributes != '')\n $code .= ' ' . $addTagAttributes;\n // end tag\n $code .= '></div>' . \"\\n\";\n return $code;\n }", "public function admin_field_html( array $raw_properties = array() ) {\n\t}", "protected static function renderFieldProperties(array $properties): string\n {\n $filtered = \\array_filter(\n $properties,\n // Remove any false-like values (empty strings and false booleans) except for integers and floats.\n fn (mixed $value): bool => \\is_int($value) || \\is_float($value) || (\\is_string($value) && $value !== '') || (\\is_bool($value) && $value)\n );\n // Map keys and values together as key=value\n $mapped = \\array_map(\n // Boolean values are replaced with key name: checked => true ---> checked=\"checked\"\n fn (string $key, mixed $value) => \\sprintf('%s=\"%s\"', $key, esc_attr(\\is_bool($value) ? $key : (string) $value)),\n \\array_keys($filtered),\n \\array_values($filtered)\n );\n // Join all properties into single string\n return \\implode(' ', $mapped);\n }", "function attrs($props){\n return array_reduce(array_keys($props), function($res, $key) use ($props) {\n $res .= \"$key='$props[$key]'\";\n return $res;\n }, '');\n}", "function string_attribute( $p_string ) \r\n{\r\n\t$p_string = string_html_specialchars( $p_string );\r\n\r\n\treturn $p_string;\r\n}", "function replacevars($arrSubstitutes)\n {\n foreach($arrSubstitutes as $var=>$value)\n {\n $this->template = str_replace('<!--['.strtoupper($var).']-->',$value,$this->template);\n }\n \n }", "function guy2html($input) {\n\tglobal $guy_cq;\n\t$patterns = array(\"/&amp;(#?[A-Za-z0-9]+?;)/\", \n\t'/'.$guy_cq['lt'].'/', '/'.$guy_cq['gt'].'/', '/'.$guy_cq['quot'].'/');\n\t$replace = array(\"&\\\\1\", '<', '>', '\"');\n\t$input = preg_replace($patterns,$replace,$input);\n\treturn $input;\n}", "protected function doReplacements( array $array ) {\n\t\t$args = [\n\t\t\t$this[ Argument::NAMES ][ Name::SINGULAR_NAME_UC ],\n\t\t\t$this[ Argument::NAMES ][ Name::SINGULAR_NAME_LC ],\n\t\t\t$this[ Argument::NAMES ][ Name::PLURAL_NAME_UC ],\n\t\t\t$this[ Argument::NAMES ][ Name::PLURAL_NAME_LC ],\n\t\t];\n\n\t\tforeach ( $array as $key => $string ) {\n\t\t\t$array[ $key ] = sprintf( $string, ...$args );\n\t\t}\n\n\t\treturn $array;\n\t}", "function formatString($string) {\n\t\tif(stripos($string, \"href=\") > -1 && !stripos($string, \"target\")) {\n\t\t\t$string = preg_replace('/href=\"(.+)\"/', 'href=\"$1\" target=\"_blank\"', $string);\n\t\t} else if(stripos($string, \"http://\") > -1) {\n\t\t\t$string = preg_replace('/(.+)/', '<a href=\"$1\" target=\"_blank\">$1</a>', $string);\n\t\t}\n\n\t\treturn $string;\n\t}", "public static function html_edit($string)\n\t{\n\t\t//$string = stripcslashes($string); // supprime les antislach\n\t\treturn $string;\n\t}", "function formatHTML($s) {\n return str_replace('\\n',\"\\n\",$s);\n}", "function formatHTML($s) {\n return str_replace('\\n',\"\\n\",$s);\n}", "function array_to_attrs($attrs)\n {\n $temp = array();\n foreach ($attrs as $name => $value) {\n $temp[] = $name . '=\"' . htmlspecialchars($value) . '\"';\n }\n return implode(' ', $temp);\n }", "function vlang_vars_name($str, $array){\n\t\n\tforeach($array as $k => $v){\n\t\t\n\t\t$str = str_replace('{{'.$k.'}}', $v, $str);\n\t\n\t}\n\t\n\treturn $str;\n\n}" ]
[ "0.56585085", "0.5571918", "0.5530326", "0.5494251", "0.54573745", "0.5436381", "0.53634197", "0.5251164", "0.52306783", "0.51784784", "0.5165541", "0.51574117", "0.5126862", "0.511625", "0.51122254", "0.5084367", "0.50841665", "0.5080347", "0.50784045", "0.5044302", "0.5034914", "0.50036114", "0.49886712", "0.49769962", "0.4972807", "0.4969954", "0.49691728", "0.49691728", "0.49669626", "0.49616545" ]
0.8266953
0
/ Generates and compounds the HTML strings for each item in a list by running propertyStringReplace $skeletonHtml = Array of strings that need to be generated into Html. $items = List of Items, each with a matching set of properties $specialCases = Properties you want to apply to only certain members of the item list. Array of those properties and their replacement values at certain Indexes of the items list. places an empty string if no replacement value exists. Also works if assigned to keys rather than index. Example Usage: Input $skeletonHtml = ['div' => "",'link' => "Click Me"] $items = [ ['id' => 0], ['id' => 1], ['id' => 3], ['id' => 4] ]; $specialCases = [1 => ['class' => 'active', 'linkClass' => 'active'], 3 => ['linkClass' => 'blue'] ]; ~~ So for index 1 we add "active" to the div's class and link's class, on index 3 we set the link to class="blue". Id's go on every item. Output $returnHtml['div'] = $returnHtml['link'] = Click Me Click Me Click Me Click Me
function generateCompoundedHtml($skeletonHtmlList, $items, $specialCases = null) { $nL = "\xA"; //new line $specialCaseSearchValues = array(); $returnHtml = array(); if(!is_array($skeletonHtmlList)) //if passed a single string, turn it into array with 1 element $skeletonHtmlList = array($skeletonHtmlList); if(!is_array(array_shift(array_values($items)))) { //checks if first element of items is an array or properties $items = array($items); } if(is_array($specialCases)) { //if this only a single list of properties, we create a new aray and set those as default if(!is_array(array_shift(array_values($specialCases)))) { $specialCases = array('default' => $specialCases); } //Not required. If default values are not set then we compile a list of all keys and set their default value to '' //we don't examine default in $specialCases if it is a key in $items if(isset($specialCases['default']) && !isset($items['default'])) { foreach($specialCases['default'] as $key => $property) { $specialCaseSearchValues[$key] = $property; } } else { foreach($specialCases as $caseProperties) { foreach($caseProperties as $key => $property) { $specialCaseSearchValues[$key] = ''; } } } } $defaultValues = $specialCaseSearchValues; foreach($skeletonHtmlList as $name => $skeletonHtml) { $i = 0; $returnHtml[$name] = ''; //get each item and it's properties, check if there is a special case of the item's Index or Key foreach($items as $id => $itemProperties) { if(isset($specialCases[$id]) && is_string($id)) $thisItemsSpecialCases = $specialCases[$id]; elseif(isset($specialCases[$i])) $thisItemsSpecialCases = $specialCases[$i]; else $thisItemsSpecialCases = array(); if(is_array($thisItemsSpecialCases)) { foreach($thisItemsSpecialCases as $key => $value) { $specialCaseSearchValues[$key] = $value; } } //store exceptions/defaults in an array of properties and merge with current properties for this item //add html for this div + new line preceding it. $returnHtml[$name] .= $nL . propertyStringReplace($skeletonHtml, array_merge($itemProperties, $specialCaseSearchValues)); //reset special case values to default $specialCaseSearchValues = $defaultValues; $i++; } } if(count($returnHtml) == 1) return array_shift($returnHtml); return $returnHtml; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function prepareHTML(){\n\t$first=true;\n\t\t\n\tforeach($this->objarr as $key=>$val){\n\t\t$a=\"\";\n\t if($val->getAClass()!=\"\") $a.=\" class=\\\"\".$val->getAClass().\"\\\"\";\n\t if($val->getAId()!=\"\") $a.=\" id=\\\"\".$val->getAId().\"\\\"\";\n\t $ul=\"\";\n\t if($val->getUlClass()!=\"\") $ul.=\" class=\\\"\".$val->getUlClass().\"\\\"\";\n\t if($val->getUlId()!=\"\") $ul.=\" id=\\\"\".$val->getUlId().\"\\\"\";\n\t $li=\"\";\n\t if($val->getLiClass()!=\"\") $li.=\" class=\\\"\".$val->getLiClass().\"\\\"\";\n\t if($val->getLiId()!=\"\") $li.=\" id=\\\"\".$val->getLiId().\"\\\"\";\n\t\n\t\tif(!$val->getIntegrated()){ //se l' oggetto non è stato integrato come figlio di qualche altro oggetto\n\t if($first){\n\t $this->html.=\"<ul>\\n<li\".$li.\"><a\".$a.\" href=\\\"\".$val->getLink().\"\\\">\".$val->getText().\"</a></li>\\n</ul>\";\n\t $first=false;\n\t\t }else{\n\t\t \t$this->html=$this->replace_last_occurence($this->html, \"</ul>\", \n\t\t \t\"<li\".$li.\"><a\".$a.\" href=\\\"\".$val->getLink().\"\\\">\".$val->getText().\"</a></li>\\n</ul>\");\n\t\t }\n\t\t \t\n\t\t $this->prepareRecursiveHTML($val);\n\t\t}//close if(!$val->getIntegrated())\n\t}//close foreach\n\t\n}", "public function provideListAndListItemTests() {\n $result = [\n [[\n 'descr' => \"[list] and [*] should produce an unordered list.\",\n 'bbcode' => \"[list][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list] and [*] should produce an unordered list even without [/list].\",\n 'bbcode' => \"[list][*]One Box[*]Two Boxes[*]Three Boxes\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list=circle] should produce an unordered list.\",\n 'bbcode' => \"[list=circle][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\" style=\\\"list-style-type:circle\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list=disc] should produce an unordered list.\",\n 'bbcode' => \"[list=disc][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\" style=\\\"list-style-type:disc\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list=square] should produce an unordered list.\",\n 'bbcode' => \"[list=square][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\" style=\\\"list-style-type:square\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list=1] should produce an ordered list.\",\n 'bbcode' => \"[list=1][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=A] should produce an ordered list.\",\n 'bbcode' => \"[list=A][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:upper-alpha\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=a] should produce an ordered list.\",\n 'bbcode' => \"[list=a][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:lower-alpha\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=I] should produce an ordered list.\",\n 'bbcode' => \"[list=I][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:upper-roman\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=i] should produce an ordered list.\",\n 'bbcode' => \"[list=i][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:lower-roman\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=greek] should produce an ordered list.\",\n 'bbcode' => \"[list=greek][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:lower-greek\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=georgian] should produce an ordered list.\",\n 'bbcode' => \"[list=georgian][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:georgian\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=armenian] should produce an ordered list.\",\n 'bbcode' => \"[list=armenian][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:armenian\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n ];\n return $result;\n }", "public function replace($items);", "function propertyStringReplace($htmlString, $array) {\n foreach($array as $property => $value) {\n $htmlString = str_replace('%'.$property.'%', $value, $htmlString);\n }\n return $htmlString;\n}", "public static function MarkupToHtml($text, $items = []) {\n $text = $this->cleanup($text);\n \n // Make it html safe\n $text = htmlentities($text, ENT_QUOTES, \"UTF-8\");\n \n // Add a newline after headers\n // so paragraphs work properly. Should figure out regex so it doesn't\n // add an extra \\n if its not needed\n $text = preg_replace('{(^|\\n)([=]+)(.*?)(\\n)}', \"$0\\n\", $text);\n \n // pre formated\n $text = preg_replace_callback(\n '/(^|\\n)([ ][ ][ ][ ])((.|\\n.)+)(?=(\\n\\n|$))/',\n function ($match) {\n $content = $match[0];\n $content = preg_replace_callback(\n '/(^|\\n)(.+?)(?=($|\\n))/',\n function ($match) {\n if (substr($match[0],0,1) == \"\\n\") {\n return \"\\n\" . substr($match[0], 5);\n } else {\n return substr($match[0], 4);\n }\n },\n $content\n );\n return \"\\n<pre>\" . $content . \"\\n</pre>\\n\";\n },\n $text\n );\n \n // Paragraphs\n // Ignore header lines\n $text = preg_replace_callback(\n '/(\\n\\n|^)(?=([^=][^=][^=][^=][^=][^=][^=]))((.|\\n.)+)(?=(\\n\\n|$))/',\n function ($match) {\n $content = trim($match[0]);\n if (strlen($content) > 0) {\n return \"\\n<div class='para'>\\n\" . $content . \"\\n\\n</div>\\n\";\n } else {\n return \"\";\n }\n },\n $text\n );\n\n // Headers\n // This works, but is there a cleaner way to go about it\n $text = preg_replace_callback(\n '/(^|\\n)([=]+)(.*?)(?=(\\n|$))/',\n function ($match) {\n $num = min(intval(strlen($match[2])) + 2, 6);\n return \"\\n<h\" . $num . \">\" . trim($match[3]) . \"</h\" . $num .\">\\n\";\n },\n $text\n );\n \n // Bold\n $text = preg_replace('{(^|\\n|\\s|_|`|[<].*?[>])([*])(.+?)([*])($|\\n|\\s|_|`|[<].*?[>])}', \"$1<strong>$3</strong>$5\", $text);\n \n \n // Italic\n $text = preg_replace('{(^|\\n|\\s|[*]|`|[<].*?[>])([_])(.+?)([_])($|\\n|\\s|[*]|`|[<].*?[>])}', \"$1<em>$3</em>$5\", $text);\n \n // mono\n $text = preg_replace('{(^|\\n|\\s|[*]|_|[<].*?[>])([`])(.+?)([`])($|\\n|\\s|[*]|_|[<].*?[>])}', \"$1<span style='font-family:monospace;'>$3</span>$5\", $text);\n \n // bar\n $text = preg_replace('{(\\n|^)([-]+)(\\n|$)}', \"<hr />\", $text);\n \n // Special Chars\n // Have to use &gt; because everything is already made safe\n $text = preg_replace('{(&lt;--&gt;)}', \"&harr;\", $text);\n $text = preg_replace('{(&lt;--)}', \"&larr;\", $text);\n $text = preg_replace('{(--&gt;)}', \"&rarr;\", $text);\n $text = preg_replace('{(/c/)}', \"&copy;\", $text);\n $text = preg_replace('{(/r/)}', \"&reg;\", $text);\n $text = preg_replace('{(/tm/)}', \"&trade;\", $text);\n $text = preg_replace('{(/pi/)}', \"&Pi;\", $text);\n\n // Block Quote\n $text = preg_replace_callback(\n '/(^|\\n)(\\&gt;)([(](.+?)[)])?((.|\\n.)+)(?=(\\n\\n|$))/',\n function ($match) {\n $content = str_replace(\"&gt;\", \"\", trim($match[5]));\n $content = str_replace(\"\\n\", \"<br />\", $content);\n $attribution = trim($match[4]);\n if ($attribution == \"\") {\n return \"\\n<blockquote>\\n\" . $content . \"\\n</blockquote>\\n\";\n } else {\n return \"\\n<blockquote>\\n\" . $content . \"\\n<span class='attribution'>\" . $attribution . \"</span></blockquote>\\n\";\n }\n },\n $text\n );\n\n // ordered lists\n $text = preg_replace_callback(\n '/(^|\\n)(#)((.|\\n.)+)(?=(\\n\\n|$))/',\n function ($match) {\n $content = trim($match[0]);\n $lastLevel = 1;\n $content = preg_replace_callback(\n '/(^|\\n)([#]+)(\\s?)(.*?)(?=(\\n|$))/',\n function ($match) use (&$lastLevel) {\n $level = intval(strlen(trim($match[2])));\n $ret = \"<li>\" . trim($match[4]) . \"</li>\\n\";\n if ($level > $lastLevel) {\n $ret = \"<ol>\\n\" . $ret;\n } else if ($level < $lastLevel) {\n $ret = \"</ol>\\n\" . $ret;\n }\n $lastLevel = $level;\n return $ret;\n },\n $content\n );\n\n return \"\\n<ol>\\n\" . $content . \"</ol>\\n\";\n },\n $text\n );\n \n // unordered lists\n $text = preg_replace_callback(\n '/(^|\\n)([*])((.|\\n.)+)(?=(\\n\\n|$))/',\n function ($match) {\n $content = trim($match[0]);\n $lastLevel = 1;\n $content = preg_replace_callback(\n '/(^|\\n)([*]+)(\\s?)(.*?)(?=(\\n|$))/',\n function ($match) use (&$lastLevel) {\n $level = intval(strlen(trim($match[2])));\n $ret = \"<li>\" . trim($match[4]) . \"</li>\\n\";\n if ($level > $lastLevel) {\n $ret = \"<ul>\\n\" . $ret;\n } else if ($level < $lastLevel) {\n $ret = \"</ul>\\n\" . $ret;\n }\n $lastLevel = $level;\n return $ret;\n },\n $content\n );\n\n return \"\\n<ul>\\n\" . $content . \"</ul>\\n\";\n },\n $text\n );\n\n // external link\n $text = preg_replace_callback(\n '/(\\[)(.*?)(\\])(\\(((http[s]?)|ftp):\\/\\/)(.*?)(\\))/',\n function ($match) {\n $link = strtolower(str_replace(\" \", \"+\", trim($match[7])));\n $ret = \"<a target='_blank' href='\" . strtolower($match[5]) . \"://\" . $link . \"'>\" . trim($match[2]) . \"</a>\";\n if (strtolower($match[5]) == \"http\") {\n $ret .= \"<img src='/images/link_http.png' class='link' />\";\n } else if (strtolower($match[5]) == \"https\") {\n $ret .= \"<img src='/images/link_https.png' class='link' />\";\n } else if (strtolower($match[5]) == \"ftp\") {\n $ret .= \"<img src='/images/link_ftp.png' class='link' />\";\n }\n return $ret;\n },\n $text\n );\n\n // internal link\n $text = preg_replace_callback(\n '/(\\[)(.*?)(\\])/',\n function ($match) {\n $link = str_replace(\" \", \"+\", trim($match[2]));\n return \"<a href='\" . $link . \"'>\" . trim($match[2]) . \"</a>\";\n },\n $text\n );\n \n \n return \"\\n\" . trim($text) . \"\\n\";\n }", "public static function getHTML($items)\n {\n return Self::buildMenu($items);\n }", "function processCodes($Item, $Vars){\n\t\t$Item = preg_replace(\"/[[](.*)[]]/eiU\", \"\\$this->Code('$0',\\$Vars)\", $Item );\n\t\treturn $Item; // Return our formated item.\n\t}", "protected function renderItems($items)\n {\n $n = count($items);\n $lines = [];\n foreach ($items as $i => $item) {\n if (!empty($item['assign'])) {\n $compare = array_intersect($this->group, $item['assign']);\n if (!empty($compare)) {\n $options = [];\n $tag = $this->CI->helpers->arrayRemove($options, 'tag', 'li');\n $class = [];\n $activeLink = false;\n\n if ($item['active']) {\n $class[] = $this->activeCssClass;\n $activeLink = true;\n }\n\n if (!empty($class)) {\n if (empty($options['class'])) {\n $options['class'] = implode(' ', $class);\n } else {\n $options['class'] .= ' ' . implode(' ', $class);\n }\n }\n $menu = $this->renderItem($item, $activeLink);\n if (!empty($item['items'])) {\n $menu .= strtr($this->submenuTemplate, [\n '{show}' => $item['active'] ? \"style='display: block'\" : '',\n '{items}' => $this->renderItems($item['items']),\n ]);\n }\n\n if (isset($options['class'])) {\n $options['class'] .= ' nav-item';\n } else {\n $options['class'] = 'nav-item';\n }\n\n $lines[] = Html::tag($tag, $menu, $options);\n }\n }\n }\n return implode(\"\\n\", $lines);\n }", "public function getHTML($items)\n {\n return $this->buildMenu($items);\n }", "private function getHTMLItems()\n {\n $this->load->model('HtmlItems_Model', \"HtmlItems\");\n $this->HtmlItems->setControllerMethodName($this->_controllerName . '/' . $this->_currentMethod);\n return $this->HtmlItems->render();\n }", "public function test_render_called__correct($timesTextToHTML, $timesGmapsToHTML, $timesImageToHTML, $timesFormToHTML)\n {\n $textHelper = $this->getMock(TextHelper::class);\n $gmapsHelper = $this->getMock(GmapsHelper::class);\n $formHelper = $this->getMock(FormHelper::class);\n $imageHelper = $this->getMock(ImageHelper::class);\n\n $array = [\n 'pages' => [\n ['content' => [\n ['type' => 'text'],\n ['type' => 'gmaps']\n ]\n ],\n ['content' => [\n ['type' => 'dummy'],\n ['type' => 'image'],\n ['type' => 'form'],\n ]\n ]\n ]\n ];\n\n $expectedText = 'dummy text';\n $expectedGmaps = 'dummy gmaps';\n $expectedImage = 'dummyImage';\n $expectedForm = 'expected form';\n $expected = $expectedText.$expectedGmaps.$expectedImage.$expectedForm;\n $expectedWithNoScript = '<noscript>'.$expected.'</noscript>';\n\n\n $this->configureFactoryHelperCreation($this->at(0), '\\Communify\\SEO\\engines\\helpers\\TextHelper', $textHelper);\n $this->configureToHTML($textHelper, $timesTextToHTML, ['type' => 'text'], $this->mustache, $expectedText);\n\n $this->configureFactoryHelperCreation($this->at(1), '\\Communify\\SEO\\engines\\helpers\\GmapsHelper', $gmapsHelper);\n $this->configureToHTML($gmapsHelper, $timesGmapsToHTML, ['type' => 'gmaps'], $this->mustache, $expectedGmaps);\n\n $this->configureFactoryHelperCreation($this->at(2), '\\Communify\\SEO\\engines\\helpers\\ImageHelper', $imageHelper);\n $this->configureToHTML($imageHelper, $timesImageToHTML, ['type' => 'image'], $this->mustache, $expectedImage);\n\n $this->configureFactoryHelperCreation($this->at(3), '\\Communify\\SEO\\engines\\helpers\\FormHelper', $formHelper);\n $this->configureToHTML($formHelper, $timesFormToHTML, ['type' => 'form'], $this->mustache, $expectedForm);\n\n $actual = $this->sut->render($array);\n $this->assertEquals($expectedWithNoScript, $actual);\n }", "private function replace_itemClass( $conf_array, $item )\n {\n\n // Get TS value\n if ( empty( $conf_array[ 'wrap.' ][ 'item.' ][ 'class' ] ) )\n {\n $class = null;\n }\n else\n {\n $class = ' class=\"' . $conf_array[ 'wrap.' ][ 'item.' ][ 'class' ] . '\"';\n }\n // Get TS value\n // Replace the marker\n $item = str_replace( '###CLASS###', $class, $item );\n\n // Workaround: Remove space\n $item = str_replace( 'class=\" ', 'class=\"', $item );\n\n\n // RETURN content\n return $item;\n }", "abstract protected function renderItems(): string;", "abstract protected function setTemplate($item);", "private function prepareRecursiveHTML($obj){\n\t$myarr=$obj->getAppendedChildrenArray();\n\tfor($i=0; $i<count($myarr); $i++){\n\t\t$a=\"\";\n\t if($myarr[$i]->getAClass()!=\"\") $a.=\" class=\\\"\".$myarr[$i]->getAClass().\"\\\"\";\n\t if($myarr[$i]->getAId()!=\"\") $a.=\" id=\\\"\".$myarr[$i]->getAId().\"\\\"\";\n\t $ul=\"\";\n\t if($myarr[$i]->getUlClass()!=\"\") $ul.=\" class=\\\"\".$myarr[$i]->getUlClass().\"\\\"\";\n\t if($myarr[$i]->getUlId()!=\"\") $ul.=\" id=\\\"\".$myarr[$i]->getUlId().\"\\\"\";\n\t $li=\"\";\n\t if($myarr[$i]->getLiClass()!=\"\") $li.=\" class=\\\"\".$myarr[$i]->getLiClass().\"\\\"\";\n\t if($myarr[$i]->getLiId()!=\"\") $li.=\" id=\\\"\".$myarr[$i]->getLiId().\"\\\"\";\n\t\n\t\tif($i==0)$this->html = $this->replace_last_occurence($this->html, \"</a>\", \n\t\t\"</a>\\n<ul>\\n<li\".$li.\"><a\".$a.\" href=\\\"\".$myarr[0]->getLink().\"\\\">\".$myarr[0]->getText().\"</a></li>\\n</ul>\");\n\t\t\n\t\telse $this->html = $this->replace_last_occurence($this->html, \"</a></li>\\n</ul>\", \n\t\t\"</a></li>\\n<li\".$li.\"><a\".$a.\" href=\\\"\".$myarr[$i]->getLink().\"\\\">\".$myarr[$i]->getText().\"</a></li>\\n</ul>\");\n\n if(count($myarr[$i]->getAppendedChildrenArray())) $this->prepareRecursiveHTML($myarr[$i]);\n\t}\n\t\t\n}", "function theme_styleguide_item($variables) {\n $key = $variables['key'];\n $item = $variables['item'];\n $content = $variables['content'];\n $output = '';\n $output .= \"<a name=\\\"$key\\\"></a>\";\n $output .= '<h2 class=\"styleguide\">'. $item['title'] .'</h2>';\n if (!empty($item['description'])) {\n $output .= '<p class=\"styleguide-description\">';\n $output .= $item['description'];\n $output .= '</p>';\n }\n $output .= '<div class=\"styleguide\">';\n $output .= $content;\n $output .= '</div>';\n return $output;\n}", "public static function splitListItems ($listItems, $columns = 2, $class = 'splitlist', $byStrlen = false, $firstColumnHtml = false)\r\n\t{\r\n\t\t# Work out the maximum number of items in a column\r\n\t\t$maxPerColumn = ceil (count ($listItems) / $columns);\r\n\t\tif ($byStrlen) {$maxPerColumn = ceil (strlen (implode ($listItems)) / $columns);}\r\n\t\t\r\n\t\t# Create the list\r\n\t\t$html = \"\\n<table class=\\\"{$class}\\\">\";\r\n\t\t$html .= \"\\n\\t<tr>\";\r\n\t\tif ($firstColumnHtml) {\r\n\t\t\t$html .= \"\\n\\t\\t<td>\";\r\n\t\t\t$html .= \"\\n\\t\\t\\t\" . $firstColumnHtml;\r\n\t\t\t$html .= \"\\n\\t\\t</td>\";\r\n\t\t}\r\n\t\t$html .= \"\\n\\t\\t<td>\";\r\n\t\t$html .= \"\\n\\t\\t\\t<ul>\";\r\n\t\t$i = 0;\r\n\t\t$strlen = 0;\r\n\t\t$totalListItems = count ($listItems);\r\n\t\tforeach ($listItems as $listItem) {\r\n\t\t\t$html .= \"\\n\\t\\t\\t\\t\" . $listItem;\r\n\t\t\t\r\n\t\t\t# Do not split if there are fewer items than columns\r\n\t\t\tif ($totalListItems < $columns) {continue;}\r\n\t\t\t\r\n\t\t\t# Start a new column when the limit is reached\r\n\t\t\t$i++;\r\n\t\t\t$strlen += strlen ($listItem);\r\n\t\t\tif (($byStrlen ? $strlen : $i) >= $maxPerColumn) {\r\n\t\t\t\t$html .= \"\\n\\t\\t\\t</ul>\";\r\n\t\t\t\t$html .= \"\\n\\t\\t</td>\";\r\n\t\t\t\t$html .= \"\\n\\t\\t<td>\";\r\n\t\t\t\t$html .= \"\\n\\t\\t\\t<ul>\";\r\n\t\t\t\t$i = 0;\r\n\t\t\t\t$strlen = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$html .= \"\\n\\t\\t\\t</ul>\";\r\n\t\t$html .= \"\\n\\t\\t</td>\";\r\n\t\t$html .= \"\\n\\t</tr>\";\r\n\t\t$html .= \"\\n</table>\\n\";\r\n\t\t\r\n\t\t# Return the constructed HTML\r\n\t\treturn $html;\r\n\t}", "protected function renderItems($items)\n {\n $n=count($items);\n $lines=[];\n foreach($items as $i => $item)\n {\n $options=array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', []));\n $tag=ArrayHelper::remove($options, 'tag', 'li');\n $class=[];\n $this->getItemClasses($item,$class,$i,$n);\n $this->getClassOptions($class,$options);\n $menu=$this->renderItem($item);\n\n if(!empty($item['items']))\n {\n $menu.=strtr($this->submenuTemplate, [\n '{show}' => $item['active'] ? \"style='display: block'\" : \"style='display: none'\",\n '{items}' => $this->renderItems($item['items']),\n ]);\n }\n $lines[]=Html::tag($tag, $menu, $options);\n }\n\n if(Yii::$app->sys->discord_invite_url!==false)\n $lines[]='<li class=\"nav-item\"><b>'.Html::a('<i class=\"fab fa-discord text-discord\"></i><p class=\"text-discord\">Join our Discord!</p>', Yii::$app->sys->discord_invite_url, ['target'=>'_blank','class'=>'nav-link']).'</b></li>';\n if(Yii::$app->sys->patreon_menu===false)\n {\n $lines[]='<li><hr/></li>';\n $lines[]='<li class=\"nav-item\"><b>'.Html::a('<i class=\"fab fa-patreon text-danger\"></i><p class=\"text-danger\">Become a Patron!</p>', 'https://www.patreon.com/bePatron?u=31165836', ['target'=>'_blank','class'=>'nav-link']).'</b></li>';\n }\n\n return implode(\"\\n\", $lines);\n }", "private function replace_itemStyle( $conf_array, $item )\n {\n // Get TS value\n if ( empty( $conf_array[ 'wrap.' ][ 'item.' ][ 'style' ] ) )\n {\n $style = null;\n }\n else\n {\n $style = ' style=\"' . $conf_array[ 'wrap.' ][ 'item.' ][ 'style' ] . '\"';\n }\n // Get TS value\n // Replace the marker\n $item = str_replace( '###STYLE###', $style, $item );\n\n // RETURN content\n return $item;\n }", "public function createIndexHTML() {\r\n\t\t//Declare $res variable from blogStatement\r\n\t\t$res = $this->blogstate->blogStatement();\r\n\r\n\t\t$HTML = \"\";\r\n\t\t//Adding the news items.\r\n\t\tforeach($res AS $key => $val) {\r\n\t\t\t$HTML .= \r\n\t\t\t\t\"<div class='col-md-4'>\r\n\t\t\t\t\t<h2><a href='newsitem.php?slug=\". $val->slug .\"'>{$val->title}</a></h2>\r\n \t\t\t\t\t<p>{$this->handleString($val->DATA, $val->slug, $val->FILTER)}</p>\r\n \t\t\t\t</div>\r\n\t\t\t\t\";\r\n\t\t}\r\n\t\treturn $HTML;\r\n\t}", "private function prepareItemChunks($item)\n {\n // divide the item content using '<h1>' and '<h2>' HTML sections\n $originalItemChunks = preg_split('/(<h[1-2].*<\\/h[1-2]>)/', $item['content'],\n null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\n // prepare each chunk information combining the item['toc'] information\n // with the contents extracted in the $originalItemChunks variable\n $itemChunks = array();\n foreach ($item['toc'] as $i => $itemChunk) {\n if (1 == $itemChunk['level']) {\n // include the item TOC in the first level-1 chunk\n // this is useful for the template rendering done later\n $itemChunk['toc'] = $item['toc'];\n\n $itemChunks[$i] = $itemChunk;\n } else {\n // instead of matching each chunk position in the TOC with its\n // position in $originalItemChunks, it's safer to perform a match with\n // the chunk slug\n foreach ($originalItemChunks as $j => $chunk) {\n // extract the slug of this chunk from its <h2> heading\n preg_match('/<h2.*id=\"(?<slug>.*)\".*<\\/h2>/', $chunk, $match);\n\n if (isset($match['slug']) && $match['slug'] == $itemChunk['slug'] && 2 == $itemChunk['level']) {\n $itemChunk['html_title'] = $originalItemChunks[$j];\n $itemChunk['content'] = $originalItemChunks[$j+1];\n\n $itemChunks[$i] = $itemChunk;\n }\n }\n }\n }\n\n // if needed, merge the first '<h2>' section into the previous '<h1>' empty section\n\n if ('<h2' != substr($originalItemChunks[0], 0, 3)) {\n // if there is some content between the '<h1>' and the first '<h2>',\n // use it as the content of the first chapter page\n $itemChunks[0]['content'] = $originalItemChunks[0];\n } else {\n // there is no content between the '<h1>' and the first '<h2>'.\n // Include the first '<h2>' section inside the first chapter page\n // and delete this '<h2>' section from the book TOC\n $firstH2SectionHeading = $itemChunks[1]['html_title'];\n $firstH2SectionContent = $itemChunks[1]['content'];\n $itemChunks[0]['content'] = $firstH2SectionHeading.\"\\n\".$firstH2SectionContent;\n\n // look for and unset this item from the global flatten TOC\n $toc = $this->app['publishing.book.toc'];\n foreach ($toc as $i => $entry) {\n if ($itemChunks[1]['slug'] == $entry['slug']) {\n unset($toc[$i]);\n\n // needed to recreate sequential numeric keys lost when\n // removing the previous TOC item\n $toc = array_values($toc);\n\n $this->app['publishing.book.toc'] = $toc;\n\n break;\n }\n }\n\n // unset this chunk for the item chunk list\n unset($itemChunks[1]);\n\n // needed to recreate sequential numeric keys lost if some elements\n // have been removed from the $itemChunks array\n $itemChunks = array_values($itemChunks);\n }\n\n return $itemChunks;\n }", "function formatDefItem($array,$i) {\n\t$itemArray = $array[$i];\n\t\n\tif(!is_array($itemArray['definition'])) $itemArray['definition'] = array($itemArray['definition']);\n\t\n\tif(!empty($itemArray['class'])) {\n\t\tif(!is_array($itemArray['class'])) $itemArray['class'] = array($itemArray['class']);\n\t}\n\telse $itemArray['class'] = array();\n\t\n\tif($i==0) {\n\t\t$itemArray['class'][] = 'fli';\n\t}\n\tif($i==(count($array)-1)) {\n\t\t$itemArray['class'][] = 'lli';\n\t}\n\tif(!isEven($i)) $itemArray['class'][] = 'even';\n\t\n\t$definition = '';\n\tfor($d=0; $d<count($itemArray['definition']); $d++) {\n\t\t$text = $itemArray['definition'][$d];\n\t\tif(empty($text)) continue;\n\t\tif(!preg_match('/<[^<^>]+>/',$text)) $text = formatText($text); // if the text DOESN'T contain HTML, format it.\n\t\t$definition .= \" \".'<dd'.addAttributes('','',@$itemArray['class']).'>'.$text.'</dd>'.\"\\n\";\n\t}\n\t\n\treturn $definition;\n}", "public function renderItems($items)\n {\n // TODO: Implement renderItems() method.\n }", "public function transform($items)\n {\n if (null === $items) {\n return \"\";\n }\n\n $toJson = $this->recursiveTransform($items, true);\n\n return json_encode($toJson);\n }", "function generate_list_placeholders( array $items, int $start_index ): string {\n\t$placeholders = [];\n\tforeach ( range( $start_index, count( $items ) + $start_index - 1 ) as $i ) {\n\t\t$placeholders[] = \"%$i\\$d\";\n\t}\n\treturn implode( ',', $placeholders );\n}", "public function menuItems($items)\n {\n $result = '';\n\n foreach ($items as $key => $options) {\n $class = '';\n $icon = 'fa fa-menu fa-chevron-right';\n $url = $options;\n $linkOptions = ['escape' => false];\n\n if (is_array($options)) {\n $icon = Hash::get($options, 'icon', $icon);\n $url = Hash::get($options, 'url', '#');\n $class = Hash::get($options, 'class', '');\n $title = Hash::get($options, 'title', '');\n\n $linkOptions = array_merge($linkOptions, Hash::get($options, 'options', []));\n } else {\n $title = $key;\n }\n\n $link = $this->Html->link(\n $this->Html->tag('i', '', ['class' => $icon]) . __($title),\n $url,\n $linkOptions\n );\n\n $result .= $this->Html->tag('li', $link, ['class' => $class]);\n }\n\n return $result;\n }", "protected function setUp(): void\n\t{\n\t\t$this->bbcTestCases = array(\n\t\t\tarray(\n\t\t\t\t'Test bold',\n\t\t\t\t'<strong class=\"bbc_strong\">bold</strong>',\n\t\t\t\t'[b]bold[/b]',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'Named links',\n\t\t\t\t'<a href=\"http://www.elkarte.net/\" class=\"bbc_link\" target=\"_blank\">ElkArte</a>',\n\t\t\t\t'[url=http://www.elkarte.net/]ElkArte[/url]',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'URL link',\n\t\t\t\t'<a href=\"http://www.elkarte.net/\" class=\"bbc_link\" target=\"_blank\">http://www.elkarte.net/</a>',\n\t\t\t\t'[url=http://www.elkarte.net/]http://www.elkarte.net/[/url]',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'Lists',\n\t\t\t\t'<ul class=\"bbc_list\"><li>item</li><li><ul class=\"bbc_list\"><li>sub item</li></ul></li><li>item</li></ul>',\n\t\t\t\t'[list][li]item[/li][li][list][li]sub item[/li][/list][/li][li]item[/li][/list]'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'Tables',\n\t\t\t\t'<table class=\"bbc_table\"><tr><td><table class=\"bbc_table\"><tr><td>test</td></tr></table></td></tr></table>',\n\t\t\t\t'[table][tr][td][table][tr][td]test[/td][/tr][/table][/td][/tr][/table]',\n\t\t\t),\n\t\t);\n\t}", "protected function _renderItem(ItemInterface $item, array $options)\n {\n if (!$item->isDisplayed()) {\n return '';\n }\n\n $level = $item->getLevel();\n\n $class = (array)$item->getAttribute('class');\n\n if ($this->_matcher->isCurrent($item)) {\n $class[] = $options['currentClass'];\n } elseif (isset($options['ancestorClass']) &&\n $this->_matcher->isAncestor($item, $options['matchingDepth'])\n ) {\n $class[] = $options['ancestorClass'];\n }\n\n if (isset($options['firstClass']) &&\n $item->actsLikeFirst()\n ) {\n $class[] = $options['firstClass'];\n }\n if (isset($options['lastClass']) &&\n $item->actsLikeLast()\n ) {\n $class[] = $options['lastClass'];\n }\n\n $hasChildren = $item->hasChildren();\n if ($hasChildren &&\n $options['depth'] !== 0\n ) {\n if ($options['branchClass'] !== null &&\n $item->getDisplayChildren()\n ) {\n $class[] = $options['branchClass'];\n }\n } elseif ($options['leafClass'] !== null) {\n $class[] = $options['leafClass'];\n }\n\n $attributes = $item->getAttributes();\n if (!empty($class)) {\n $attributes['class'] = implode(' ', $class);\n }\n\n $templater = $this->templater();\n\n $attributes = $this->_formatAttributes($attributes, $item);\n\n $templates = (array)$item->getExtra('templates');\n $defaultTemplates = (array)$item->getExtra('defaultTemplates');\n $newTemplates = $templates + $defaultTemplates;\n if ($newTemplates) {\n $templater->push();\n $templater->add($newTemplates);\n }\n\n $templateVars = (array)$item->getExtra('templateVars');\n $defaultTemplateVars = (array)$item->getExtra('defaultTemplateVars');\n $currentDefaultTemplateVars = (array)$options['defaultTemplateVars'];\n $templateVars =\n $templateVars +\n $defaultTemplateVars +\n $currentDefaultTemplateVars;\n if (empty($templateVars)) {\n $templateVars = null;\n }\n $options['templateVars'] = $templateVars;\n\n $link = $this->_renderLink($item, $options);\n\n if ($hasChildren) {\n $nestedClass = (array)$item->getChildrenAttribute('class');\n if ($options['menuLevelClass'] !== null) {\n $nestedClass[] = $options['menuLevelClass'] . $level;\n }\n if ($options['nestedMenuClass'] !== null) {\n $nestedClass[] = $options['nestedMenuClass'];\n }\n $nestedAttributes = $item->getChildrenAttributes();\n $nestedAttributes['class'] = implode(' ', $nestedClass);\n $options['attributes'] = $nestedAttributes;\n\n $options['childrenTemplates'] = null;\n if ($newTemplates) {\n // item defines new templates that must be ignored by the children\n $options['childrenTemplates'] = $options['defaultTemplates'];\n }\n if ($defaultTemplates) {\n // item defines default templates that must be used by the children\n $options['childrenTemplates'] = $defaultTemplates;\n }\n\n if ($defaultTemplateVars) {\n // item defines default template vars that must be used by the children\n $options['defaultTemplateVars'] =\n $defaultTemplateVars +\n $currentDefaultTemplateVars;\n }\n\n $nested = $this->_renderNested($item, $options);\n } else {\n $nested = '';\n }\n\n $rendered = $templater->format('item', [\n 'attrs' => $attributes,\n 'templateVars' => $templateVars,\n 'link' => $link,\n 'nest' => $nested\n ]);\n\n if ($newTemplates) {\n $templater->pop();\n }\n\n return $rendered;\n }", "protected function renderItems($items) {\n $n = count($items);\n $lines = [];\n// $this->_layer++;\n foreach ($items as $i => $item) {\n $options = array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', []));\n $tag = ArrayHelper::remove($options, 'tag', 'li');\n $class = [];\n\n if ($item['active']) {\n $class[] = $this->activeCssClass;\n }\n if ($i === 0 && $this->firstItemCssClass !== null) {\n $class[] = $this->firstItemCssClass;\n }\n if ($i === $n - 1 && $this->lastItemCssClass !== null) {\n $class[] = $this->lastItemCssClass;\n }\n if (!empty($item['items'])) {\n $class[] = ($this->_layer > 0) ? 'dropdown-submenu' : 'dropdown';\n }\n if (!empty($class)) {\n if (empty($options['class'])) {\n $options['class'] = implode(' ', $class);\n } else {\n $options['class'] .= ' ' . implode(' ', $class);\n }\n }\n $menu = $this->renderItem($item);\n if (!empty($item['items'])) {\n $this->_layer++;\n $menu .= strtr($this->submenuTemplate, [\n '{items}' => $this->renderItems($item['items']),\n ]);\n $this->_layer--;\n }\n $lines[] = Html::tag($tag, $menu, $options);\n }\n\n return implode(\"\\n\", $lines);\n }", "function __foreach_loop__id_540977c6c8185($obj=\"\",$option=array())\n{\nglobal $bw,$vsPrint;\n $BWHTML = '';\n $vsf_count = 1;\n $vsf_class = '';\n if(is_array($option['news'])){\n foreach( $option['news'] as $key=>$value )\n {\n $vsf_class = $vsf_count%2?'odd':'even';\n $BWHTML .= <<<EOF\n \n \nEOF;\nif($vsf_count==1) {\n$BWHTML .= <<<EOF\n\n <div class=\"lasted_top\">\n <div class=\"title\"><a href=\"{$value->getUrl($value->getModule())}\">{$value->getTitle()}</a></div>\n <div class=\"im\"><a href=\"{$value->getUrl($value->getModule())}\">{$value->createImageCache($value->getImage(),85,60,3)}</a></div>\n <div class=\"intro\">\n {$this->cut($value->getIntro(),150)}\n </div>\n </div>\n \nEOF;\n}\n\nelse {\n$BWHTML .= <<<EOF\n\n <div class=\"lasted_item\"><a href=\"{$value->getUrl($value->getModule())}\">{$value->getTitle()}</a></div>\n \nEOF;\n}\n$BWHTML .= <<<EOF\n\n \nEOF;\n$vsf_count++;\n }\n }\n return $BWHTML;\n}" ]
[ "0.53790253", "0.52644885", "0.52328205", "0.5232002", "0.50728095", "0.50260943", "0.4908655", "0.4885623", "0.4881435", "0.4771228", "0.47453368", "0.47364703", "0.46979603", "0.46234742", "0.4614127", "0.46106648", "0.45712638", "0.45684335", "0.45565015", "0.4552883", "0.4514437", "0.4499806", "0.44928175", "0.44856754", "0.44851798", "0.4471667", "0.4468712", "0.44504875", "0.44486797", "0.44485834" ]
0.763247
0
( hooks ) Fire the 'udesign_html_before' action Useful for , etc.
function udesign_html_before() { do_action('udesign_html_before'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function before_render_tealium_html() {\r\n \r\n }", "function udesign_page_content_before() {\r\n do_action('udesign_page_content_before');\r\n}", "function udesign_entry_before() {\r\n do_action('udesign_entry_before');\r\n}", "protected function onBeforeInputHtml()\n {\n }", "function udesign_home_page_content_before() {\r\n do_action('udesign_home_page_content_before');\r\n}", "function udesign_inside_body_tag() {\r\n do_action('udesign_inside_body_tag');\r\n}", "function udesign_top_wrapper_before() {\r\n do_action('udesign_top_wrapper_before');\r\n}", "function onBeforeRender()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\tif($app->isAdmin()) return true;\n\t\t$doc = JFactory::getDocument();\n\t\tif($doc->getType() != 'html') return true;\n\t\t$content = $this->params->get('headtags');\n\t\t$config = JFactory::getConfig();\n\t\t$content = str_replace('%SITENAME%',$config->get( 'sitename' ),$content);\n\t\tJFactory::getDocument()->addCustomTag(PHP_EOL.'<!-- { gjheqadtag insert -->'.PHP_EOL.$content.PHP_EOL.'<!-- gjheqadtag insert } -->'.PHP_EOL);\n\t}", "public function before()\n\t{\n\n\t\tparent::before();\n\t\tif ($this->auto_render) { \n\t\t\t$this->template->title = 'Hector - ';\n\t\t\t$this->template->page_description = '';\n\t\t\t$this->template->navbar = '';\n\t\t\t$this->template->content = '';\n\t\t\t$this->template->styles = array();\n\t\t\t$this->template->scripts = array();\n\t\t\t$this->template->set_focus = '';\n\t\t}\n\t\t\n\t}", "public function before_render() {}", "function udesign_page_title_before() {\r\n do_action('udesign_page_title_before');\r\n}", "function after_render_tealium_html() {\r\n \r\n }", "public function before() {\n parent::before();\n $this->template->title = 'My Own CMS (MOC)';\n $this->template->js = View::factory('partial/js')\n ->set('scripts', $this->check_js($this->_JS_));\n $this->template->css = View::factory('partial/css')\n ->set('styles', $this->check_css($this->_CSS_));\n $this->template->meta_tag = View::factory('partial/meta_tag');\n $this->template->icon = '/tdesign/assets/images/favicon.ico';\n }", "function beforeRender()\n\t{\n\t}", "protected function executePreRenderHook() {}", "function udesign_blog_post_content_before() {\r\n do_action('udesign_blog_post_content_before');\r\n}", "public function before(){\n parent::before();\n $this->template->content = '';\n $this->template->styles = array('main');;\n $this->template->scripts = '';\n }", "function udesign_blog_entry_before() {\r\n do_action('udesign_blog_entry_before');\r\n}", "protected function onAfterInputHtml()\n {\n }", "public function beforeRender() {\r\n\t}", "function _wp_admin_html_begin()\n {\n }", "protected abstract function beforeRendering(): void;", "protected function _beforeToHtml()\n {\n return parent::_beforeToHtml();\n }", "protected function onBeforeRender() : void\n {\n }", "function admin_html()\n {\n }", "public function generatePage_preProcessing() {}", "function udesign_footer_before() {\r\n do_action('udesign_footer_before');\r\n}", "protected function runBeforeRender() {\n\t\t// Empty default implementation. Should be implemented by descendant classes if needed\n\t}", "public function beforeRender(){\n\t\t\n\t}", "public function prePageContent();" ]
[ "0.7603335", "0.75397295", "0.7111367", "0.70741034", "0.70307064", "0.69635195", "0.6929272", "0.6911094", "0.69032496", "0.6856739", "0.68271935", "0.67791444", "0.6719466", "0.6628435", "0.6595907", "0.65741396", "0.65531254", "0.65307945", "0.6515536", "0.64980775", "0.64906293", "0.6490358", "0.6486675", "0.6478171", "0.64461136", "0.6432352", "0.64030796", "0.63899165", "0.6365175", "0.6363991" ]
0.86029315
0
( hooks ) Fire the 'udesign_head_top' action
function udesign_head_top() { do_action('udesign_head_top'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "function udesign_page_title_top() {\r\n do_action('udesign_page_title_top');\r\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "function of_head() { do_action( 'of_head' ); }", "function udesign_top_wrapper_top() {\r\n do_action('udesign_top_wrapper_top');\r\n}", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "function udesign_main_content_top( $is_front_page ) {\r\n do_action('udesign_main_content_top', $is_front_page);\r\n}", "function udesign_sidebar_top() {\r\n do_action('udesign_sidebar_top');\r\n}", "public function hookTop(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'_scroll.tpl');\n }", "function udesign_top_wrapper_before() {\r\n do_action('udesign_top_wrapper_before');\r\n}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "public function do_head_items()\n {\n }", "function top() {\n\t\trequire ('views/partial/top.php');\n\t}", "public function headAction()\n {\n \n }", "function udesign_single_portfolio_entry_top() {\r\n do_action('udesign_single_portfolio_entry_top');\r\n}", "public function on_admin_head() {\n\t\tif ( $this->is_on_our_own_pages() ) {\n\t\t\t/**\n\t\t\t * Similar to action WordPress action `admin_head`,\n\t\t\t * but only fired from pages with Simple History.\n\t\t\t *\n\t\t\t * @param Simple_History $instance This class.\n\t\t\t */\n\t\t\tdo_action( 'simple_history/admin_head', $this );\n\t\t}\n\t}", "public function topAction()\n {\n $this->view->title = 'FENS様検索エンジン管理システム|FENS';\n $this->render();\n }", "function admin_head()\n {\n }", "public function topAction();", "function bb_header()\n{\n\tdo_action('bb_header');\n}", "static public function insert_go_to_top_link() {\n\t\techo self::go_to_top_link();\n\t}", "public function _top_nav_link()\n\t{\n\t\t$top_nav = Event::$data;\n\t\t\n\t\t//fetch flickrwijit settings from db\n\t\t$flickrwijit_settings = ORM::factory('flickrwijit',1);\n\t\t\n\t\tif($flickrwijit_settings->block_position == 1 ) {\n\t\t\n\t\t\techo ($top_nav == \"flickrwijit\") ? \n\t\t\t\tKohana::lang('flickrwijit.flickrwijit_top_nav') : \n\t\t\t\t\"<a href=\\\"\".url::site().\"flickrwijit\\\">\".\n\t\t\t\tKohana::lang('flickrwijit.flickrwijit_top_nav').\"</a>\";\n\t\n\t\t}\n\t}", "function showHead( $appctx )\n\t\t{\n\t\t}", "function loadInHeader() {\n $this->metaData();\n//\t\t$this->loadAddOns();\n $this->onHead(\"onHead\"); // call back to onHead in extensions things js, etc in head\n $this->onEditor(\"onHead\"); // only when login to admin, for fck to work??\n //If not in admin, blank initEditor\n if (!isset($_SESSION['name'])) { // not sure what this does??\n print \"<script type=\\\"text/javascript\\\">function initeditor(){}</script>\\n\";\n }\n }", "protected function updateHead()\n\t{\n\t}", "function input_admin_head()\n\t{\n\t\t// Note: This function can be removed if not used\n\n\t\t\n\t\t\n\t}" ]
[ "0.8069792", "0.7946736", "0.79134256", "0.7833731", "0.77949345", "0.77311504", "0.76907885", "0.7658268", "0.74037015", "0.725201", "0.71492535", "0.70998555", "0.7091697", "0.706163", "0.7021208", "0.70144695", "0.69453025", "0.69185096", "0.6895502", "0.6894877", "0.6852", "0.6780015", "0.6756923", "0.6588939", "0.65492487", "0.65355605", "0.65296584", "0.6525321", "0.6504594", "0.6490906" ]
0.8894956
0
Fire the 'udesign_head_bottom' action
function udesign_head_bottom() { do_action('udesign_head_bottom'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_body_bottom() {\r\n do_action('udesign_body_bottom');\r\n}", "function udesign_entry_bottom() {\r\n do_action('udesign_entry_bottom');\r\n}", "function udesign_page_title_bottom() {\r\n do_action('udesign_page_title_bottom');\r\n}", "function udesign_bottom_section_bottom() {\r\n do_action('udesign_bottom_section_bottom');\r\n}", "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "function udesign_main_content_bottom() {\r\n do_action('udesign_main_content_bottom');\r\n}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "function udesign_head_top() {\r\n do_action('udesign_head_top');\r\n}", "function udesign_blog_entry_bottom() {\r\n do_action('udesign_blog_entry_bottom');\r\n}", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "function udesign_single_post_entry_bottom() {\r\n do_action('udesign_single_post_entry_bottom');\r\n}", "function udesign_sidebar_bottom() {\r\n do_action('udesign_sidebar_bottom');\r\n}", "function udesign_single_portfolio_entry_bottom() {\r\n do_action('udesign_single_portfolio_entry_bottom');\r\n}", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "function of_head() { do_action( 'of_head' ); }", "function udesign_footer_after() {\r\n do_action('udesign_footer_after');\r\n}", "function udesign_top_wrapper_top() {\r\n do_action('udesign_top_wrapper_top');\r\n}", "public function atBottom() {\n }", "function udesign_page_title_top() {\r\n do_action('udesign_page_title_top');\r\n}", "function udesign_page_title_after() {\r\n do_action('udesign_page_title_after');\r\n}", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function udesign_top_wrapper_bottom( $is_front_page ) {\r\n do_action('udesign_top_wrapper_bottom', $is_front_page);\r\n}", "public function drawEndHeaderPanel()\r\n {\r\n echo '</div>';\r\n }", "function udesign_footer_inside() {\r\n do_action('udesign_footer_inside');\r\n}", "function extra_tablenav( $which ) {\n //if ( $which == \"bottom\" ){\n // //The code that goes after the table is there\n // echo\"Hi, I'm after the table\";\n //}\n }", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "function charity_belowheader() {\n do_action('charity_belowheader');\n}", "function bethel_do_footer_bottom() {\n\tgenesis_widget_area ('footer-bottom', array ('before' => '<div id=\"bethel-header-right-bottom\">', 'after' => '</div>'));\n}", "public function headAction()\n {\n \n }" ]
[ "0.7894603", "0.76442224", "0.76369613", "0.754464", "0.7513563", "0.7490206", "0.731353", "0.7112545", "0.6923653", "0.6844571", "0.67670095", "0.6751662", "0.6597695", "0.65219665", "0.64873856", "0.63962805", "0.6371456", "0.63231957", "0.63133925", "0.6300377", "0.6267382", "0.6183375", "0.61826044", "0.6166325", "0.6130706", "0.60515904", "0.6004025", "0.59932446", "0.5976183", "0.595439" ]
0.8820416
0
( hooks ) Fire the 'udesign_inside_body_tag' action
function udesign_inside_body_tag() { do_action('udesign_inside_body_tag'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_body_open() {\n do_action( 'wp_body_open' );\n }", "function wp_body_open()\n {\n do_action( 'wp_body_open' );\n }", "function wp_body_open()\n {\n do_action('wp_body_open');\n }", "function wp_body_open() : void {\n\t\tdo_action( 'wp_body_open' );\n\t}", "function wp_body_open() {\n do_action('wp_body_open');\n }", "function wp_body_open() {\n\t\tdo_action( 'wp_body_open' );\n\t}", "function wp_body_open() {\n\t\tdo_action( 'wp_body_open' );\n\t}", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "function udesign_footer_inside() {\r\n do_action('udesign_footer_inside');\r\n}", "public function docBodyTagBegin() {}", "function udesign_body_bottom() {\r\n do_action('udesign_body_bottom');\r\n}", "function IniciarBody(){\r\n echo \"<body>\";\r\n }", "function udesign_blog_post_top_area_inside() {\r\n do_action('udesign_blog_post_top_area_inside');\r\n}", "public function attachTagToPostAtTheEnd() {}", "public function on_page_view(){\n $this->runTemplateSubController();\n // lightbox enabled?\n if( (bool) $this->lightboxEnable ){\n $this->addHeaderItem( $this->getHelper('html')->css('flexry-lightbox.min.css', 'flexry') );\n if( (bool) $this->autoIncludeJsInFooter ){\n $this->addFooterItem( $this->getHelper('html')->javascript('flexry-lightbox.js', 'flexry') );\n }else{\n $this->addHeaderItem( $this->getHelper('html')->javascript('flexry-lightbox.js', 'flexry') );\n }\n }\n // output function to execute deferreds\n $this->addHeaderItem( $this->getHelper('html')->javascript('libs/modernizr.js', 'flexry') );\n $this->addFooterItem('<script type=\"text/javascript\">'.$this->getHelper('file')->getContents(DIR_PACKAGES . '/flexry/' . DIRNAME_BLOCKS . '/flexry_gallery/inline_script.js.txt').'</script>');\n }", "function udesign_html_before() {\r\n do_action('udesign_html_before');\r\n}", "public function adminBodyEnd(): void {\n global $url;\n global $security;\n global $media_admin;\n global $media_manager;\n\n // Check if `new-content` or `edit-content` page is shown\n $page = explode(\"/\", $url->slug())[0];\n if($page === \"new-content\" || $page === \"edit-content\") {\n $this->adminContentArea(); return;\n } else if($media_admin->view !== \"media\" || $media_admin->method !== \"index\") {\n return;\n }\n\n // Get Content\n $content = ob_get_contents();\n ob_end_clean();\n\n // Prepare Query\n if(($absolute = MediaManager::absolute($_GET[\"path\"] ?? DS)) === null) {\n $absolute = PATH_UPLOADS_PAGES;\n $relative = DS;\n } else {\n $relative = MediaManager::relative($absolute);\n }\n if(isset($_GET[\"file\"]) && ($file = MediaManager::absolute($absolute . DS . $_GET[\"file\"])) === null) {\n unset($file);\n }\n\n // Load Admin Page\n ob_start();\n if(isset($file)) {\n include \"admin\" . DS . \"file.php\";\n } else {\n include \"admin\" . DS . \"list.php\";\n }\n\n // Load Modals\n \trequire \"admin\" . DS . \"modal-folder.php\";\n if(PAW_MEDIA_PLUS) {\n require \"admin\" . DS . \"modal-search.php\";\n }\n\n // Get Content\n $add = ob_get_contents();\n ob_end_clean();\n\n // Inject Admin Page\n $regexp = \"/(\\<div class=\\\"col-lg-10 pt-3 pb-1 h-100\\\"\\>)(.*?)(\\<\\/div\\>)/s\";\n $content = preg_replace($regexp, \"$1{$add}$3\", $content);\n print($content);\n }", "function udesign_page_content_before() {\r\n do_action('udesign_page_content_before');\r\n}", "function onAfterRender() {\n\t \n\t\t// don't run if disabled overrides are true\n\t if ($this->_shouldProcess()) return;\n\t \n\t\t$this->_PHP4();\n\n\t\t$document = & JFactory::getDocument();\n\t\t$doctype = $document->getType();\n\t\tif ($doctype == 'html') {\n\t\t\t$body = JResponse::getBody();\n\t\t\tif ($this->_replaceCode($body)) {\n\t\t\t\tJResponse::setBody($body);\n\t\t\t}\n\t\t}\n\t}", "public function getBodyTag() {}", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "public function generatePage_postProcessing() {}", "public function render_content() {\n\t}", "function CMSBodyMain()\n\t{\techo $this->cat->InputForm();\n\t}", "function FecharBody(){\r\n echo \"</body>\";\r\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }" ]
[ "0.67842984", "0.67768306", "0.6753918", "0.6743242", "0.67262805", "0.6658897", "0.6658897", "0.6449271", "0.6448795", "0.6197673", "0.6096523", "0.60790044", "0.60592455", "0.60402775", "0.60384065", "0.5960462", "0.59535944", "0.581174", "0.58111906", "0.57904905", "0.57171136", "0.5717064", "0.5717064", "0.5717064", "0.5709355", "0.5702054", "0.57007986", "0.56914276", "0.56863064", "0.56863064" ]
0.87856334
0
Fire the 'udesign_body_top' action
function udesign_body_top() { do_action('udesign_body_top'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "function udesign_head_top() {\r\n do_action('udesign_head_top');\r\n}", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "function udesign_top_wrapper_top() {\r\n do_action('udesign_top_wrapper_top');\r\n}", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function udesign_body_bottom() {\r\n do_action('udesign_body_bottom');\r\n}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "function udesign_page_title_top() {\r\n do_action('udesign_page_title_top');\r\n}", "function udesign_sidebar_top() {\r\n do_action('udesign_sidebar_top');\r\n}", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "public function hookTop(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'_scroll.tpl');\n }", "function udesign_main_content_top( $is_front_page ) {\r\n do_action('udesign_main_content_top', $is_front_page);\r\n}", "public function topAction();", "function top() {\n\t\trequire ('views/partial/top.php');\n\t}", "function udesign_inside_body_tag() {\r\n do_action('udesign_inside_body_tag');\r\n}", "function udesign_single_portfolio_entry_top() {\r\n do_action('udesign_single_portfolio_entry_top');\r\n}", "function udesign_blog_post_top_area_inside() {\r\n do_action('udesign_blog_post_top_area_inside');\r\n}", "public function topAction()\n {\n $this->view->title = 'FENS様検索エンジン管理システム|FENS';\n $this->render();\n }", "function udesign_top_wrapper_before() {\r\n do_action('udesign_top_wrapper_before');\r\n}", "function wp_body_open()\n {\n do_action('wp_body_open');\n }", "function udesign_main_content_bottom() {\r\n do_action('udesign_main_content_bottom');\r\n}", "function wp_body_open() {\n do_action('wp_body_open');\n }", "function wlfw_mobile_top_bttn() {\n\techo '<a class=\"ui-btn-right\" id=\"top\">top</a>';\n}", "function wp_body_open() {\n do_action( 'wp_body_open' );\n }", "function wp_body_open()\n {\n do_action( 'wp_body_open' );\n }", "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "public function scroll_to_top() {\n\t\t$hestia_enable_scroll_to_top = get_theme_mod( 'hestia_enable_scroll_to_top', apply_filters( 'hestia_scroll_to_top_default', 0 ) );\n\t\tif ( (bool) $hestia_enable_scroll_to_top === false ) {\n\t\t\treturn;\n\t\t}\n\t\t?>\n\t\t<button class=\"hestia-scroll-to-top\">\n\t\t\t<i class=\"fas fa-angle-double-up\" aria-hidden=\"true\"></i>\n\t\t</button>\n\t\t<?php\n\t}", "function wp_body_open() : void {\n\t\tdo_action( 'wp_body_open' );\n\t}" ]
[ "0.80598927", "0.7851439", "0.77328426", "0.77063614", "0.7664985", "0.7400252", "0.72948134", "0.7236842", "0.71947646", "0.719125", "0.71865827", "0.71598905", "0.70851916", "0.7050841", "0.68559843", "0.67789316", "0.6738029", "0.6679896", "0.66197586", "0.6468452", "0.63557696", "0.63378274", "0.6322838", "0.6320575", "0.63203776", "0.6315378", "0.6279293", "0.62623656", "0.6254623", "0.6246394" ]
0.8939533
0
Fire the 'udesign_body_bottom' action
function udesign_body_bottom() { do_action('udesign_body_bottom'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "function udesign_main_content_bottom() {\r\n do_action('udesign_main_content_bottom');\r\n}", "function udesign_entry_bottom() {\r\n do_action('udesign_entry_bottom');\r\n}", "function udesign_bottom_section_bottom() {\r\n do_action('udesign_bottom_section_bottom');\r\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "function udesign_blog_entry_bottom() {\r\n do_action('udesign_blog_entry_bottom');\r\n}", "function udesign_single_post_entry_bottom() {\r\n do_action('udesign_single_post_entry_bottom');\r\n}", "function udesign_sidebar_bottom() {\r\n do_action('udesign_sidebar_bottom');\r\n}", "function udesign_page_title_bottom() {\r\n do_action('udesign_page_title_bottom');\r\n}", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "function udesign_footer_after() {\r\n do_action('udesign_footer_after');\r\n}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "function udesign_single_portfolio_entry_bottom() {\r\n do_action('udesign_single_portfolio_entry_bottom');\r\n}", "function bethel_do_footer_bottom() {\n\tgenesis_widget_area ('footer-bottom', array ('before' => '<div id=\"bethel-header-right-bottom\">', 'after' => '</div>'));\n}", "function udesign_footer_inside() {\r\n do_action('udesign_footer_inside');\r\n}", "public function atBottom() {\n }", "function udesign_top_wrapper_bottom( $is_front_page ) {\r\n do_action('udesign_top_wrapper_bottom', $is_front_page);\r\n}", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "public static function show_box_bottom() {\n require Config::get('prefix') . '/templates/show_box_bottom.inc.php';\n }", "function client_portal_move_yoast_to_bottom() {\n\t\treturn 'low';\n\t}", "function udesign_inside_body_tag() {\r\n do_action('udesign_inside_body_tag');\r\n}", "public function executeFooterPanel()\n {\n }", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "public function isAfterBody()\r\n\t{\r\n\t\treturn true;\r\n\t}", "public function adminBodyEnd(): void {\n global $url;\n global $security;\n global $media_admin;\n global $media_manager;\n\n // Check if `new-content` or `edit-content` page is shown\n $page = explode(\"/\", $url->slug())[0];\n if($page === \"new-content\" || $page === \"edit-content\") {\n $this->adminContentArea(); return;\n } else if($media_admin->view !== \"media\" || $media_admin->method !== \"index\") {\n return;\n }\n\n // Get Content\n $content = ob_get_contents();\n ob_end_clean();\n\n // Prepare Query\n if(($absolute = MediaManager::absolute($_GET[\"path\"] ?? DS)) === null) {\n $absolute = PATH_UPLOADS_PAGES;\n $relative = DS;\n } else {\n $relative = MediaManager::relative($absolute);\n }\n if(isset($_GET[\"file\"]) && ($file = MediaManager::absolute($absolute . DS . $_GET[\"file\"])) === null) {\n unset($file);\n }\n\n // Load Admin Page\n ob_start();\n if(isset($file)) {\n include \"admin\" . DS . \"file.php\";\n } else {\n include \"admin\" . DS . \"list.php\";\n }\n\n // Load Modals\n \trequire \"admin\" . DS . \"modal-folder.php\";\n if(PAW_MEDIA_PLUS) {\n require \"admin\" . DS . \"modal-search.php\";\n }\n\n // Get Content\n $add = ob_get_contents();\n ob_end_clean();\n\n // Inject Admin Page\n $regexp = \"/(\\<div class=\\\"col-lg-10 pt-3 pb-1 h-100\\\"\\>)(.*?)(\\<\\/div\\>)/s\";\n $content = preg_replace($regexp, \"$1{$add}$3\", $content);\n print($content);\n }", "function\ttableFoot() {\n\n\t\t/**\n\t\t *\n\t\t */\n\t\t$frm\t=\t$this->myDoc->currMasterPage->getFrameByFlowName( \"Auto\") ;\n\t\tif ( $this->myDoc->pageNr >= 1) {\n\t\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTFooterCT) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\t\tif ( $actRow->isEnabled()) {\n\t\t\t\t\t$this->punchTableRow( $actRow) ;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$frm->currVerPos\t+=\t1.5 ;\t\t// now add the height of everything we have output'\n\t\t}\n\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTFooterPE) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\t$this->punchTableRow( $actRow) ;\n\t\t}\n\t\t$frm->currVerPos\t+=\t1.5 ;\t\t// now add the height of everythign we have output'\n\t}", "function afterLayout() { \t\t\n }", "function finalizeBottomHTML() {\n\t\t$returnVal = \"\";\n\t\t$returnVal .= \"</div>\\n\"; // Closes Container\n\t\t$returnVal .= \"</body>\\n\";\n\t\t$returnVal .= \"</html>\\n\";\n\t\t$this->_bottomHTML = $returnVal;\n\t}", "public function loadJsBodyBottom() {\n\t\t$sessionScripts = $this->sessionData->get('NFWSScriptBodyBottom');\n\t\tif($sessionScripts)\n\t\t{\n\t\t\tsort($sessionScripts);\n\t\t\t$html = '<!-- NFWSScriptBodyBottom -->' . \"\\n\";\n\t\t\tforeach($sessionScripts as $script)\n\t\t\t{\n\t\t\t\t$html .= $script . \"\\n\";\n\t\t\t}\n\t\t\t$html .= '</div>';\n\n\t\t\techo $html;\n\t\t}\n\t}", "public function on_admin_footer() {\n\t\tif ( $this->is_on_our_own_pages() ) {\n\t\t\t/**\n\t\t\t * Similar to action WordPress action `admin_footer`,\n\t\t\t * but only fired from pages with Simple History.\n\t\t\t *\n\t\t\t * @param Simple_History $instance This class.\n\t\t\t */\n\t\t\tdo_action( 'simple_history/admin_footer', $this );\n\t\t}\n\t}" ]
[ "0.82059807", "0.8067792", "0.7818566", "0.76864916", "0.76300955", "0.7344566", "0.7315885", "0.7306045", "0.72228533", "0.69830865", "0.68559945", "0.6778187", "0.66912764", "0.6690841", "0.6666708", "0.6603958", "0.65919995", "0.6495008", "0.63346326", "0.6227425", "0.604863", "0.60426325", "0.598612", "0.5956965", "0.59450126", "0.58970624", "0.5848752", "0.58398193", "0.58298784", "0.5818347" ]
0.9084846
0
( hooks ) Fire the 'udesign_top_wrapper_before' action
function udesign_top_wrapper_before() { do_action('udesign_top_wrapper_before'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_top_wrapper_top() {\r\n do_action('udesign_top_wrapper_top');\r\n}", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "function udesign_head_top() {\r\n do_action('udesign_head_top');\r\n}", "public function before_shop_loop_starts_wrapper() {\n\t\t\t?>\n\t\t\t\t<div class=\"ast-shop-toolbar-container\">\n\t\t\t<?php\n\t\t}", "function udesign_home_page_content_before() {\r\n do_action('udesign_home_page_content_before');\r\n}", "function udesign_top_wrapper_after( $is_front_page ) {\r\n do_action('udesign_top_wrapper_after', $is_front_page);\r\n}", "function udesign_sidebar_top() {\r\n do_action('udesign_sidebar_top');\r\n}", "function udesign_page_content_before() {\r\n do_action('udesign_page_content_before');\r\n}", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function udesign_main_content_top( $is_front_page ) {\r\n do_action('udesign_main_content_top', $is_front_page);\r\n}", "function udesign_html_before() {\r\n do_action('udesign_html_before');\r\n}", "function udesign_top_wrapper_bottom( $is_front_page ) {\r\n do_action('udesign_top_wrapper_bottom', $is_front_page);\r\n}", "function udesign_top_elements_inside( $is_front_page ) {\r\n do_action('udesign_top_elements_inside', $is_front_page);\r\n}", "function udesign_blog_post_top_area_inside() {\r\n do_action('udesign_blog_post_top_area_inside');\r\n}", "public function hookTop(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'_scroll.tpl');\n }", "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "public function before_main_content() {\n\t?>\n\n\t\t<div id=\"bbp-container\">\n\t\t\t<div id=\"bbp-content\" role=\"main\" class='skeleton auto-align'>\n\n\t<?php\n\t}", "function beforeLayout() {\n }", "public function before()\n\t{\n\n\t\tparent::before();\n\t\tif ($this->auto_render) { \n\t\t\t$this->template->title = 'Hector - ';\n\t\t\t$this->template->page_description = '';\n\t\t\t$this->template->navbar = '';\n\t\t\t$this->template->content = '';\n\t\t\t$this->template->styles = array();\n\t\t\t$this->template->scripts = array();\n\t\t\t$this->template->set_focus = '';\n\t\t}\n\t\t\n\t}", "function udesign_page_title_top() {\r\n do_action('udesign_page_title_top');\r\n}", "public function hookHeader(){\n $this->context->controller->addCSS($this->_path.'style.css');\n \n $this->context->controller->addJqueryPlugin(array('scrollTo', 'serialScroll'));\n $this->context->controller->addJS($this->_path.'script.js');\n }", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "static function on_td_wp_booster_after_header() {\r\n $page_id = get_queried_object_id();\r\n\r\n if (is_page()) {\r\n\r\n\t // previous meta\r\n\t //$td_unique_articles = get_post_meta($page_id, 'td_unique_articles', true);\r\n\r\n\t $meta_key = 'td_page';\r\n\t $td_page_template = get_post_meta($page_id, '_wp_page_template', true);\r\n\t if (!empty($td_page_template) && ($td_page_template == 'page-pagebuilder-latest.php')) {\r\n\t\t $meta_key = 'td_homepage_loop';\r\n\r\n\t }\r\n\r\n\t $td_unique_articles = get_post_meta($page_id, $meta_key, true);\r\n\t if (!empty($td_unique_articles['td_unique_articles'])) {\r\n\t\t self::$keep_rendered_posts_ids = true; //for new module hook\r\n\t\t self::$unique_articles_enabled = true; //for datasource\r\n\t }\r\n }\r\n if (td_util::get_option('tds_ajax_post_view_count') == 'enabled') {\r\n self::$keep_rendered_posts_ids = true;\r\n }\r\n }", "function udesign_footer_before() {\r\n do_action('udesign_footer_before');\r\n}", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "function udesign_page_title_before() {\r\n do_action('udesign_page_title_before');\r\n}", "public function hookHeader()\n {\n // $this->context->controller->addJS('http://code.jquery.com/jquery-2.1.4.min.js');\n // $this->context->controller->addJS($this->_path.'views/js/bootstrap.min.js');\n $this->context->controller->addJS($this->_path.'views/js/front.js');\n $this->context->controller->addCSS($this->_path.'views/css/front.css');\n\n $this->context->controller->addJS($this->_path.'views/js/responsiveslides.js');\n $this->context->controller->addCSS($this->_path.'views/css/responsiveslides.css');\n $this->context->controller->addCSS($this->_path.'views/css/themes.css');\n }", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}" ]
[ "0.84730065", "0.7517902", "0.74527776", "0.74015087", "0.71969897", "0.7164343", "0.7162507", "0.7151316", "0.7143511", "0.7139931", "0.7114162", "0.7099516", "0.70386887", "0.69769835", "0.6939158", "0.69180113", "0.6872965", "0.680791", "0.67835134", "0.6772299", "0.6706059", "0.67033046", "0.66566515", "0.6623993", "0.66135937", "0.6606128", "0.6568373", "0.6534324", "0.6454122", "0.6433283" ]
0.89455104
0
Fire the 'udesign_top_wrapper_after' action. Passes as an argument (boolean) whether the current page is front page or not
function udesign_top_wrapper_after( $is_front_page ) { do_action('udesign_top_wrapper_after', $is_front_page); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_top_wrapper_bottom( $is_front_page ) {\r\n do_action('udesign_top_wrapper_bottom', $is_front_page);\r\n}", "function udesign_main_content_top( $is_front_page ) {\r\n do_action('udesign_main_content_top', $is_front_page);\r\n}", "function udesign_top_wrapper_top() {\r\n do_action('udesign_top_wrapper_top');\r\n}", "function udesign_top_elements_inside( $is_front_page ) {\r\n do_action('udesign_top_elements_inside', $is_front_page);\r\n}", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "function udesign_top_wrapper_before() {\r\n do_action('udesign_top_wrapper_before');\r\n}", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "static function on_td_wp_booster_after_header() {\r\n $page_id = get_queried_object_id();\r\n\r\n if (is_page()) {\r\n\r\n\t // previous meta\r\n\t //$td_unique_articles = get_post_meta($page_id, 'td_unique_articles', true);\r\n\r\n\t $meta_key = 'td_page';\r\n\t $td_page_template = get_post_meta($page_id, '_wp_page_template', true);\r\n\t if (!empty($td_page_template) && ($td_page_template == 'page-pagebuilder-latest.php')) {\r\n\t\t $meta_key = 'td_homepage_loop';\r\n\r\n\t }\r\n\r\n\t $td_unique_articles = get_post_meta($page_id, $meta_key, true);\r\n\t if (!empty($td_unique_articles['td_unique_articles'])) {\r\n\t\t self::$keep_rendered_posts_ids = true; //for new module hook\r\n\t\t self::$unique_articles_enabled = true; //for datasource\r\n\t }\r\n }\r\n if (td_util::get_option('tds_ajax_post_view_count') == 'enabled') {\r\n self::$keep_rendered_posts_ids = true;\r\n }\r\n }", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "function udesign_head_top() {\r\n do_action('udesign_head_top');\r\n}", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "function udesign_front_page_slider_after() {\r\n do_action('udesign_front_page_slider_after');\r\n}", "function udesign_sidebar_top() {\r\n do_action('udesign_sidebar_top');\r\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "function udesign_main_content_bottom() {\r\n do_action('udesign_main_content_bottom');\r\n}", "function udesign_page_title_top() {\r\n do_action('udesign_page_title_top');\r\n}", "function udesign_blog_post_top_area_inside() {\r\n do_action('udesign_blog_post_top_area_inside');\r\n}", "function udesign_page_title_after() {\r\n do_action('udesign_page_title_after');\r\n}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "function cdn_do_home_after_header_widget() {\n\tif ( ! is_home() ) {\n\t\treturn;\n\t}\n\n\tgenesis_widget_area( 'cdn-home-after-header-widget', array(\n\t\t\t'before' => '<aside class=\"widget-area home-after-header-widget\">' . genesis_sidebar_title( 'cdn-home-after-header-widget' ),\n\t\t\t'after' => '</aside>',\n\t) );\n}", "public function hookTop(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'_scroll.tpl');\n }", "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "function udesign_body_bottom() {\r\n do_action('udesign_body_bottom');\r\n}", "function udesign_footer_inside() {\r\n do_action('udesign_footer_inside');\r\n}", "function msdlab_hero(){\n if(is_active_sidebar('homepage-top')){\n print '<div id=\"hp-top\">';\n dynamic_sidebar('homepage-top');\n print '</div>';\n } \n}", "function udesign_page_title_bottom() {\r\n do_action('udesign_page_title_bottom');\r\n}", "public function hookDisplayBackOfficeHeader()\n {\n if (Tools::getValue('module_name') == $this->name || Tools::getValue('configure') == $this->name) {\n $this->context->controller->addJquery();\n Media::addJsDef(array(\n 'TWISPAY_LIVE_MODE' => Configuration::get('TWISPAY_LIVE_MODE'),\n ));\n $this->context->controller->addJS($this->_path.'views/js/back.js');\n $this->context->controller->addCSS($this->_path.'views/css/back.css');\n }\n if ($this->context->cookie->redirect_error) {\n /** Display persistent error */\n $this->context->controller->errors[] = $this->context->cookie->redirect_error;\n /** Clean persistent error */\n unset($this->context->cookie->redirect_error);\n }\n }", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}" ]
[ "0.8087101", "0.7642541", "0.7262792", "0.7167624", "0.7027951", "0.69412154", "0.691108", "0.6722116", "0.6491121", "0.6470568", "0.6366929", "0.6358752", "0.63486755", "0.63185304", "0.6312525", "0.63036716", "0.6289179", "0.6216562", "0.6203396", "0.6194376", "0.6186748", "0.61830956", "0.6181947", "0.61799496", "0.6139097", "0.6110323", "0.6108579", "0.60698617", "0.60485965", "0.59819806" ]
0.8496544
0
Fire the 'udesign_top_wrapper_top' action
function udesign_top_wrapper_top() { do_action('udesign_top_wrapper_top'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "function udesign_head_top() {\r\n do_action('udesign_head_top');\r\n}", "function udesign_sidebar_top() {\r\n do_action('udesign_sidebar_top');\r\n}", "public function hookTop(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'_scroll.tpl');\n }", "function udesign_top_wrapper_before() {\r\n do_action('udesign_top_wrapper_before');\r\n}", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "function udesign_single_portfolio_entry_top() {\r\n do_action('udesign_single_portfolio_entry_top');\r\n}", "function udesign_page_title_top() {\r\n do_action('udesign_page_title_top');\r\n}", "function udesign_main_content_top( $is_front_page ) {\r\n do_action('udesign_main_content_top', $is_front_page);\r\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "public function topAction();", "function udesign_blog_post_top_area_inside() {\r\n do_action('udesign_blog_post_top_area_inside');\r\n}", "function wlfw_mobile_top_bttn() {\n\techo '<a class=\"ui-btn-right\" id=\"top\">top</a>';\n}", "function top() {\n\t\trequire ('views/partial/top.php');\n\t}", "public function scroll_to_top() {\n\t\t$hestia_enable_scroll_to_top = get_theme_mod( 'hestia_enable_scroll_to_top', apply_filters( 'hestia_scroll_to_top_default', 0 ) );\n\t\tif ( (bool) $hestia_enable_scroll_to_top === false ) {\n\t\t\treturn;\n\t\t}\n\t\t?>\n\t\t<button class=\"hestia-scroll-to-top\">\n\t\t\t<i class=\"fas fa-angle-double-up\" aria-hidden=\"true\"></i>\n\t\t</button>\n\t\t<?php\n\t}", "function udesign_top_elements_inside( $is_front_page ) {\r\n do_action('udesign_top_elements_inside', $is_front_page);\r\n}", "function udesign_top_wrapper_bottom( $is_front_page ) {\r\n do_action('udesign_top_wrapper_bottom', $is_front_page);\r\n}", "public function top_up()\n\t{\n\t\t$data['container'] = 'transaction/top_up_koptel';\n\t\t$this->load->view('core',$data);\n\t}", "public function topAction()\n {\n $this->view->title = 'FENS様検索エンジン管理システム|FENS';\n $this->render();\n }", "function zakra_scroll_to_top() {\r\n\t\t// If scroll to top is disabled.\r\n\t\tif ( false === get_theme_mod( 'zakra_scroll_to_top_enabled', true ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t?>\r\n\r\n\t\t<a href=\"#\" id=\"tg-scroll-to-top\" class=\"<?php zakra_css_class( 'zakra_scroll_to_top_class' ); ?>\">\r\n\t\t\t<i class=\"<?php echo esc_attr( apply_filters( 'zakra_scroll_to_top_icon_class', 'tg-icon' ) ); ?> <?php\r\n\t\t\techo esc_attr( apply_filters( 'zakra_scroll_to_top_icon', 'tg-icon-arrow-up' ) ); ?>\"><span\r\n\t\t\t\t\t\tclass=\"screen-reader-text\"><?php esc_html_e( 'Scroll to top', 'zakra' ); ?></span></i>\r\n\t\t</a>\r\n\r\n\t\t<div class=\"tg-overlay-wrapper\"></div>\r\n\t\t<?php\r\n\t}", "function udesign_top_wrapper_after( $is_front_page ) {\r\n do_action('udesign_top_wrapper_after', $is_front_page);\r\n}", "public static function entries_top () \n {\n $html = null; \n\n load::view( 'admin/entries/top' );\n $html .= entries_top::form();\n \n return $html;\n }", "public function MoveToTop()\n {\n $this->CallJqUiMethod(\"moveToTop\");\n }", "function mainTop(){\n\t\techo \"<table align='center' cellpadding='0' cellspacing='0' width='\".$this->width.\"'>\\n<tr>\\n<td width='\".$this->width.\"' class='main-bg'>\\n\";\n\t}", "public function admin_theme_index_top($h)\n {\n /* get submit settings - so we can show or hide \"Submit\" in the Admin navigation bar. */\n $h->vars['submit_settings'] = $h->getSerializedSettings('submit');\n $h->vars['submission_closed'] = false;\n if (!$h->vars['submit_settings']['enabled']) { $h->vars['submission_closed'] = true; }\n }" ]
[ "0.79745805", "0.7931365", "0.7716334", "0.7665732", "0.74931365", "0.74184275", "0.7413131", "0.7382029", "0.73243606", "0.7293995", "0.72012246", "0.71059144", "0.7011545", "0.68836117", "0.68655795", "0.6838528", "0.6784298", "0.6740328", "0.66741407", "0.6597076", "0.6592911", "0.6578388", "0.65433127", "0.6423019", "0.63991374", "0.63498986", "0.63253117", "0.6305242", "0.6287463", "0.62342936" ]
0.88922065
0
Fire the 'udesign_top_wrapper_bottom' action Passes as an argument (boolean) whether the current page is front page or not
function udesign_top_wrapper_bottom( $is_front_page ) { do_action('udesign_top_wrapper_bottom', $is_front_page); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_top_wrapper_after( $is_front_page ) {\r\n do_action('udesign_top_wrapper_after', $is_front_page);\r\n}", "function udesign_main_content_top( $is_front_page ) {\r\n do_action('udesign_main_content_top', $is_front_page);\r\n}", "function udesign_top_wrapper_top() {\r\n do_action('udesign_top_wrapper_top');\r\n}", "function udesign_top_elements_inside( $is_front_page ) {\r\n do_action('udesign_top_elements_inside', $is_front_page);\r\n}", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "function udesign_main_content_bottom() {\r\n do_action('udesign_main_content_bottom');\r\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "function udesign_body_bottom() {\r\n do_action('udesign_body_bottom');\r\n}", "function udesign_top_wrapper_before() {\r\n do_action('udesign_top_wrapper_before');\r\n}", "function udesign_bottom_section_bottom() {\r\n do_action('udesign_bottom_section_bottom');\r\n}", "function udesign_page_title_bottom() {\r\n do_action('udesign_page_title_bottom');\r\n}", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "function msdlab_hero(){\n if(is_active_sidebar('homepage-top')){\n print '<div id=\"hp-top\">';\n dynamic_sidebar('homepage-top');\n print '</div>';\n } \n}", "function udesign_entry_bottom() {\r\n do_action('udesign_entry_bottom');\r\n}", "public function hookTop(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'_scroll.tpl');\n }", "function udesign_sidebar_top() {\r\n do_action('udesign_sidebar_top');\r\n}", "function udesign_head_top() {\r\n do_action('udesign_head_top');\r\n}", "function udesign_blog_post_top_area_inside() {\r\n do_action('udesign_blog_post_top_area_inside');\r\n}", "function udesign_sidebar_bottom() {\r\n do_action('udesign_sidebar_bottom');\r\n}", "function udesign_page_title_top() {\r\n do_action('udesign_page_title_top');\r\n}", "function udesign_blog_entry_bottom() {\r\n do_action('udesign_blog_entry_bottom');\r\n}", "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "function udesign_footer_inside() {\r\n do_action('udesign_footer_inside');\r\n}", "function fiorello_mikado_back_to_top_button() {\n\t\tif (fiorello_mikado_options()->getOptionValue('show_back_button') == 'yes') { ?>\n\t\t\t<a id='mkdf-back-to-top' href='#'>\n <span class=\"mkdf-icon-stack\">\n <?php fiorello_mikado_icon_collections()->getBackToTopIcon('font_awesome');?>\n <?php fiorello_mikado_icon_collections()->getBackToTopIcon('font_awesome');?>\n </span>\n\t\t\t</a>\n\t\t<?php }\n\t}", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "static function on_td_wp_booster_after_header() {\r\n $page_id = get_queried_object_id();\r\n\r\n if (is_page()) {\r\n\r\n\t // previous meta\r\n\t //$td_unique_articles = get_post_meta($page_id, 'td_unique_articles', true);\r\n\r\n\t $meta_key = 'td_page';\r\n\t $td_page_template = get_post_meta($page_id, '_wp_page_template', true);\r\n\t if (!empty($td_page_template) && ($td_page_template == 'page-pagebuilder-latest.php')) {\r\n\t\t $meta_key = 'td_homepage_loop';\r\n\r\n\t }\r\n\r\n\t $td_unique_articles = get_post_meta($page_id, $meta_key, true);\r\n\t if (!empty($td_unique_articles['td_unique_articles'])) {\r\n\t\t self::$keep_rendered_posts_ids = true; //for new module hook\r\n\t\t self::$unique_articles_enabled = true; //for datasource\r\n\t }\r\n }\r\n if (td_util::get_option('tds_ajax_post_view_count') == 'enabled') {\r\n self::$keep_rendered_posts_ids = true;\r\n }\r\n }" ]
[ "0.74270517", "0.7342565", "0.72864544", "0.6953239", "0.69060564", "0.6886972", "0.68188", "0.67433244", "0.6721352", "0.66960967", "0.6652642", "0.66495407", "0.64696145", "0.6407321", "0.63997734", "0.6283487", "0.62814504", "0.6238917", "0.6232331", "0.61975193", "0.61411476", "0.6127257", "0.6114109", "0.5993268", "0.5966402", "0.5963335", "0.59338766", "0.5894827", "0.5887644", "0.5876713" ]
0.84222436
0
( hooks ) Fire the 'udesign_top_elements_inside' action Passes as an argument (boolean) whether the current page is front page or not
function udesign_top_elements_inside( $is_front_page ) { do_action('udesign_top_elements_inside', $is_front_page); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_main_content_top( $is_front_page ) {\r\n do_action('udesign_main_content_top', $is_front_page);\r\n}", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function udesign_top_wrapper_top() {\r\n do_action('udesign_top_wrapper_top');\r\n}", "function udesign_top_wrapper_before() {\r\n do_action('udesign_top_wrapper_before');\r\n}", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "function udesign_blog_post_top_area_inside() {\r\n do_action('udesign_blog_post_top_area_inside');\r\n}", "function udesign_head_top() {\r\n do_action('udesign_head_top');\r\n}", "function udesign_top_wrapper_bottom( $is_front_page ) {\r\n do_action('udesign_top_wrapper_bottom', $is_front_page);\r\n}", "function udesign_top_wrapper_after( $is_front_page ) {\r\n do_action('udesign_top_wrapper_after', $is_front_page);\r\n}", "function udesign_home_page_content_before() {\r\n do_action('udesign_home_page_content_before');\r\n}", "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "function udesign_sidebar_top() {\r\n do_action('udesign_sidebar_top');\r\n}", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "function udesign_page_title_top() {\r\n do_action('udesign_page_title_top');\r\n}", "function udesign_page_content_before() {\r\n do_action('udesign_page_content_before');\r\n}", "function udesign_single_portfolio_entry_top() {\r\n do_action('udesign_single_portfolio_entry_top');\r\n}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "public function hookTop(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'_scroll.tpl');\n }", "function msdlab_hero(){\n if(is_active_sidebar('homepage-top')){\n print '<div id=\"hp-top\">';\n dynamic_sidebar('homepage-top');\n print '</div>';\n } \n}", "public function prePageContent();", "public function is_front_page()\n {\n }", "public function is_on_frontpage() {\n return ($this->page->pagelayout == 'frontpage');\n }", "function au_load_frontpage() {\n\n}", "public function scroll_to_top() {\n\t\t$hestia_enable_scroll_to_top = get_theme_mod( 'hestia_enable_scroll_to_top', apply_filters( 'hestia_scroll_to_top_default', 0 ) );\n\t\tif ( (bool) $hestia_enable_scroll_to_top === false ) {\n\t\t\treturn;\n\t\t}\n\t\t?>\n\t\t<button class=\"hestia-scroll-to-top\">\n\t\t\t<i class=\"fas fa-angle-double-up\" aria-hidden=\"true\"></i>\n\t\t</button>\n\t\t<?php\n\t}", "static function on_td_wp_booster_after_header() {\r\n $page_id = get_queried_object_id();\r\n\r\n if (is_page()) {\r\n\r\n\t // previous meta\r\n\t //$td_unique_articles = get_post_meta($page_id, 'td_unique_articles', true);\r\n\r\n\t $meta_key = 'td_page';\r\n\t $td_page_template = get_post_meta($page_id, '_wp_page_template', true);\r\n\t if (!empty($td_page_template) && ($td_page_template == 'page-pagebuilder-latest.php')) {\r\n\t\t $meta_key = 'td_homepage_loop';\r\n\r\n\t }\r\n\r\n\t $td_unique_articles = get_post_meta($page_id, $meta_key, true);\r\n\t if (!empty($td_unique_articles['td_unique_articles'])) {\r\n\t\t self::$keep_rendered_posts_ids = true; //for new module hook\r\n\t\t self::$unique_articles_enabled = true; //for datasource\r\n\t }\r\n }\r\n if (td_util::get_option('tds_ajax_post_view_count') == 'enabled') {\r\n self::$keep_rendered_posts_ids = true;\r\n }\r\n }", "function udesign_front_page_slider_before() {\r\n do_action('udesign_front_page_slider_before');\r\n}", "public function prePageHeader();", "public static function process_content_top($p_catdata)\n {\n if (isys_maintenance_dao::instance(isys_application::instance()->database)->is_in_maintenance($p_catdata['isys_obj__id']))\n {\n global $index_includes;\n\n $index_includes['contenttopobjectdetail'][] = __DIR__ . '/templates/contenttop/main_objectdetail.tpl';\n } // if\n }" ]
[ "0.752773", "0.7050405", "0.6835613", "0.68055415", "0.6694291", "0.6681487", "0.6645822", "0.6606699", "0.6534552", "0.6428262", "0.63590723", "0.62827724", "0.6273187", "0.6224138", "0.6179741", "0.61503214", "0.61269003", "0.6099804", "0.60838115", "0.59145314", "0.5876245", "0.58143216", "0.5798773", "0.57651955", "0.57638896", "0.5722024", "0.5705085", "0.5690855", "0.5669893", "0.5668137" ]
0.8819808
0
( front page slider hooks ) Fire the 'udesign_front_page_slider_before' action
function udesign_front_page_slider_before() { do_action('udesign_front_page_slider_before'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_front_page_slider_after() {\r\n do_action('udesign_front_page_slider_after');\r\n}", "function udesign_page_content_before() {\r\n do_action('udesign_page_content_before');\r\n}", "function udesign_home_page_content_before() {\r\n do_action('udesign_home_page_content_before');\r\n}", "function udesign_top_wrapper_before() {\r\n do_action('udesign_top_wrapper_before');\r\n}", "public function preStartPageHook() {}", "public function preStartPageHook() {}", "function udesign_html_before() {\r\n do_action('udesign_html_before');\r\n}", "function udesign_page_title_before() {\r\n do_action('udesign_page_title_before');\r\n}", "public function pre_action()\n\t{\n\t\tparent::pre_action();\n\t}", "function au_load_frontpage() {\n\n}", "function udesign_blog_post_content_before() {\r\n do_action('udesign_blog_post_content_before');\r\n}", "function vc_before_init_actions() {\n\t\tif ( function_exists( 'vc_set_shortcodes_templates_dir' ) ) {\n\n\t\t\tvc_set_shortcodes_templates_dir( get_template_directory() . '/vc-elements' );\n\t\t}\n\n\t\trequire_once( get_template_directory() . '/vc-elements/my_post_slider.php' );\n\t}", "function udesign_single_portfolio_entry_before() {\r\n do_action('udesign_single_portfolio_entry_before');\r\n}", "function udesign_blog_entry_before() {\r\n do_action('udesign_blog_entry_before');\r\n}", "function udesign_entry_before() {\r\n do_action('udesign_entry_before');\r\n}", "public function prePageContent();", "public function hookDisplayHome($params){\r\n\t\treturn $this->hookFeaturedproductslider($params);\r\n\t}", "function cera_grimlock_before_site() {\n\t\tdo_action( 'grimlock_loader' );\n\t\tdo_action( 'grimlock_vertical_navigation' );\n\t}", "public function pre_action()\n\t{\n\t\tparent::pre_action();\n\t\t//\n\t\t$this->view->title = \"Codini\";\n\t}", "function frontpageSlideshow_init() {\n\t// now using jQuery framework instead of Prototype+Scriptaculous\n\twp_register_script('jquery-ui-effects',WP_PLUGIN_URL .'/frontpage-slideshow/js/jquery-ui-effects.js', array('jquery-ui-core'));\n\twp_enqueue_script('jquery-ui-effects');\n}", "function udesign_top_elements_inside( $is_front_page ) {\r\n do_action('udesign_top_elements_inside', $is_front_page);\r\n}", "public function wd_slide_template_redirect(){\r\n\t\tglobal $wp_query,$post,$page_datas,$smof_data;\r\n\t\tif( $wp_query->is_page() || $wp_query->is_single() ){\r\n\t\t\tif ( has_shortcode( $post->post_content, 'slideshow' ) || has_shortcode( $post->post_content, 'slider' )) { \r\n\t\t\t\tadd_action('wp_enqueue_scripts',array($this,'init_script'));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public function generatePage_preProcessing() {}", "public function pre_dispatch()\n\t{\n\t\tHooks::instance()->loadIntegrationsSettings();\n\t}", "function on_admin_menu() {\n $theme_data = wp_get_theme();\n \n $this->pagehook = add_options_page( 'Slideshow Settings', 'Slideshow Settings', 'manage_options', SLIDESHOW_SETTINGS, array(&$this, 'on_show_page'));\n add_action('load-' . $this->pagehook, array(&$this, 'on_load_page'));\n }", "public function pre_dispatch()\n\t{\n\t\tloadTemplate('PortalArticles');\n\t\trequire_once(SUBSDIR . '/PortalArticle.subs.php');\n\t}", "function gs_jquery_cycle_settings() {\r\n\t\r\n\tif ( is_front_page() ) { ?>\r\n\t<!-- jQuery Cycle Settings -->\r\n\t<script type=\"text/javascript\">\r\n\t\tjQuery(document).ready(function() {\r\n\r\n\t\t jQuery('#slideshow')\r\n\t\t .after('<div id=\"slide-nav\">')\r\n\t\t .cycle({ \r\n\t\t fx: 'fade', \r\n\t\t speed: 1000, \r\n\t\t timeout: 6000, \r\n\t\t pager: '#slide-nav',\r\n\t\t slideResize: 0,\r\n\t\t containerResize: 0\r\n\t\t });\r\n\r\n\t\t jQuery('#slide-nav a').addClass('ir');\r\n\r\n\t\t});\r\n\t</script>\r\n\t<!--/ jQuery Cycle Settings -->\r\n\t<?php \r\n\t}\r\n}", "function on_load_page() {\n //ensure, that the needed javascripts been loaded to allow drag/drop, expand/collapse and hide/show of boxes\n wp_enqueue_script('common');\n wp_enqueue_script('wp-lists');\n wp_enqueue_script('postbox');\n // scripts\n wp_enqueue_script(array(\n 'jquery',\n 'jquery-ui-core',\n 'jquery-ui-tabs',\n 'jquery-ui-sortable',\n 'wp-color-picker',\n 'thickbox',\n 'media-upload',\t\n ));\n\n\n // 3.5 media gallery\n if( function_exists('wp_enqueue_media') && !did_action( 'wp_enqueue_media' ))\n {\n wp_enqueue_media();\n }\n // styles\n wp_enqueue_style(array(\n 'thickbox',\n 'wp-color-picker',\n ));\n wp_enqueue_style( 'rt-admin-css', SLIDESHOW_PATH. 'admin/css/slide_admin.css' );\n wp_enqueue_script( 'rt-admin-js', SLIDESHOW_PATH. 'admin/js/slide_admin.js' );\n //add several metaboxes now, all metaboxes registered during load page can be switched off/on at \"Screen Options\" automatically, nothing special to do therefore\n add_meta_box('slideshow_settings', 'Slideshow Settings', array(&$this, 'slideshow_settings'), $this->pagehook, 'normal', 'core');\n }", "function udesign_single_post_entry_before() {\r\n do_action('udesign_single_post_entry_before');\r\n}", "function sb_slideshow_wp_head() {\n\tdo_action( 'sb_slideshow_wp_head' ); // allow for a safe place to add to the head\n}" ]
[ "0.739287", "0.7146035", "0.69623196", "0.6667148", "0.6620236", "0.6620236", "0.66161686", "0.65011543", "0.6435678", "0.6370313", "0.6343732", "0.6258598", "0.62503994", "0.62045836", "0.61993426", "0.60648406", "0.60352266", "0.60193205", "0.600965", "0.6004177", "0.59844184", "0.5977277", "0.5966215", "0.59496224", "0.59383446", "0.59367007", "0.5913832", "0.5902047", "0.5895275", "0.5889945" ]
0.89632
0
Fire the 'udesign_front_page_slider_after' action
function udesign_front_page_slider_after() { do_action('udesign_front_page_slider_after'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_front_page_slider_before() {\r\n do_action('udesign_front_page_slider_before');\r\n}", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "function udesign_page_title_after() {\r\n do_action('udesign_page_title_after');\r\n}", "function udesign_top_wrapper_after( $is_front_page ) {\r\n do_action('udesign_top_wrapper_after', $is_front_page);\r\n}", "function udesign_entry_after() {\r\n do_action('udesign_entry_after');\r\n}", "function udesign_single_portfolio_entry_after() {\r\n do_action('udesign_single_portfolio_entry_after');\r\n}", "function udesign_footer_after() {\r\n do_action('udesign_footer_after');\r\n}", "function udesign_blog_entry_after() {\r\n do_action('udesign_blog_entry_after');\r\n}", "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "function udesign_single_post_entry_after() {\r\n do_action('udesign_single_post_entry_after');\r\n}", "function bnk_slider() {\r\n\tif (is_page_template('template-home.php') || is_single() ) {\r\n\r\n\t\tglobal $smof_data;\r\n\t\t$animation = $smof_data['bnk_slide_animation'];\r\n\t\t$slideDirection = $smof_data['bnk_slide_direction'];\r\n\t\t$slideshowSpeed = $smof_data['bnk_slide_speed'];\r\n\t\t$animationDuration = $smof_data['bnk_slide_animduration'];\r\n\t\t$directionNav = $smof_data['bnk_slide_dirnav'];\r\n\t\t$controlNav = $smof_data['bnk_slide_control'];\r\n\t\t?>\r\n\t\t<script type=\"text/javascript\">\r\n jQuery(window).load(function() {\r\n\t\t\t\tif (jQuery().flexslider) {\r\n\t\t\t\t\tjQuery('.flexslider').flexslider({\r\n\t\t\t\t\t\t<?php if($animation ) : ?> animation: \"<?php echo $animation; ?>\", <?php endif; ?>\r\n\t\t\t\t\t\t<?php if($slideDirection ) : ?> slideDirection: \"<?php echo $slideDirection; ?>\", <?php endif; ?>\r\n\t\t\t\t\t\t<?php if($slideshowSpeed ) : ?> slideshowSpeed: <?php echo $slideshowSpeed; ?>, <?php endif; ?>\r\n\t\t\t\t\t\t<?php if($animationDuration ) : ?> animationDuration: <?php echo $animationDuration; ?>, <?php endif; ?>\r\n\t\t\t\t\t\t<?php if($directionNav == 0 ) : ?> directionNav: false, <?php endif; ?>\r\n\t\t\t\t\t\t<?php if($controlNav == 0 ) : ?> controlNav: false <?php endif; ?>\r\n\t\t\t\t\t });\r\n\t\t\t\t};\r\n\t\t\t});\r\n\t\t</script>\r\n\t\t<?php\r\n\t}\r\n}", "public function hookDisplayHome($params){\r\n\t\treturn $this->hookFeaturedproductslider($params);\r\n\t}", "function civ_slider_options_page(){\n add_options_page('Civ Slider Options', 'Civ Slider Options', 8, 'civ_slider', 'civ_slider_options');\n}", "function udesign_top_wrapper_bottom( $is_front_page ) {\r\n do_action('udesign_top_wrapper_bottom', $is_front_page);\r\n}", "function add_custome_post_home_slider() {\n\n $labels = array(\n 'name' => 'Slides',\n 'singular_name' => 'Slide',\n 'menu_name' => 'Home Slider',\n 'name_admin_bar' => 'Home Slider',\n 'parent_item_colon' => 'Parent Slide',\n 'all_items' => 'All Slides',\n 'add_new_item' => 'Add New Slide',\n 'add_new' => 'Add New',\n 'new_item' => 'New Slide',\n 'edit_item' => 'Edit Slide',\n 'update_item' => 'Update Slide',\n 'view_item' => 'View Slide',\n 'search_items' => 'Search Slide',\n 'not_found' => 'Slide Not found',\n 'not_found_in_trash' => 'Slide Not found in Trash',\n );\n $rewrite = array(\n 'slug' => 'sliders',\n 'with_front' => true,\n 'pages' => true,\n 'feeds' => false,\n );\n $capabilities = array(\n 'edit_post' => 'edit_slide',\n 'read_post' => 'read_slide',\n 'delete_post' => 'delete_slide',\n 'edit_posts' => 'edit_slides',\n 'edit_others_posts' => 'edit_others_slides',\n 'publish_posts' => 'publish_slides',\n 'read_private_posts' => 'read_private_slides',\n );\n $args = array(\n 'label' => 'home_slider',\n 'description' => 'Home Page Slider',\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'revisions', 'page-attributes', ),\n 'hierarchical' => true,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'rewrite' => $rewrite,\n // 'capabilities' => $capabilities,\n 'menu_icon' => 'dashicons-images-alt2',\n );\n register_post_type( 'home_slider', $args );\n\n}", "public function wd_slide_template_redirect(){\r\n\t\tglobal $wp_query,$post,$page_datas,$smof_data;\r\n\t\tif( $wp_query->is_page() || $wp_query->is_single() ){\r\n\t\t\tif ( has_shortcode( $post->post_content, 'slideshow' ) || has_shortcode( $post->post_content, 'slider' )) { \r\n\t\t\t\tadd_action('wp_enqueue_scripts',array($this,'init_script'));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "function udesign_main_content_bottom() {\r\n do_action('udesign_main_content_bottom');\r\n}", "public function init_js_beforeAfter(){\r\n ob_start();\r\n ?>\r\n <script type=\"text/javascript\">\r\n jQuery(function(){\r\n jQuery('.ba-slider').beforeAfter();\r\n });\r\n </script>\r\n <?php\r\n\r\n return ob_get_contents();\r\n }", "function afterAction()\n {\n }", "function udesign_page_content_before() {\r\n do_action('udesign_page_content_before');\r\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "function udesign_page_title_bottom() {\r\n do_action('udesign_page_title_bottom');\r\n}", "function afterLayout() { \t\t\n }", "function show_slider(){\n ?>\n <section \n id=\"featured\" \n class=\"cycle-slideshow\" \n data-cycle-slides=\"div\"\n data-cycle-fx=\"fade\"\n data-cycle-manual-speed=\"200\" \n data-pause-on-hover=\"true\">\n <?php civ_slider(); ?>\n </section>\n <?php\n}", "function on_show_page() { \n global $screen_layout_columns;\n $data = array();\n ?>\n <div id=\"slideshow-settings-metaboxes\" class=\"wrap\">\n <?php screen_icon('options-general'); ?>\n <form action=\"admin-post.php\" method=\"post\">\n <?php wp_nonce_field('slideshow-settings-metaboxes'); ?>\n <?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?>\n <?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false); ?>\n <input type=\"hidden\" name=\"action\" value=\"save_slideshow_settings\" />\n <div id=\"poststuff\" class=\"metabox-holder has-right-sidebar\">\n <div id=\"side-info-column\" class=\"inner-sidebar\">\n <!-- Update -->\n <div class=\"postbox\">\n <div class=\"inside\">\n <input type=\"hidden\" name=\"HTTP_REFERER\" value=\"<?php echo $_SERVER['HTTP_REFERER'] ?>\" />\n <input type=\"hidden\" name=\"theme_options_nonce\" value=\"<?php echo wp_create_nonce( 'input' ); ?>\" />\n <input type=\"submit\" class=\"button button-primary button-large\" value=\"Save Slider\" />\n </div>\n </div>\n <?php do_meta_boxes($this->pagehook, 'side', $data); ?>\n </div>\n <div id=\"post-body\" class=\"has-sidebar\">\n <div id=\"post-body-content\" class=\"has-sidebar-content\">\n <?php do_meta_boxes($this->pagehook, 'normal', $data); ?>\n <?php do_meta_boxes($this->pagehook, 'additional', $data); ?>\n </div>\n </div>\n <br class=\"clear\"/>\n </div>\n </form>\n </div>\n <script type=\"text/javascript\">\n //<![CDATA[\n jQuery(document).ready(function($) {\n // close postboxes that should be closed\n jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');\n postboxes.add_postbox_toggles('<?php echo $this->pagehook; ?>');\n });\n //]]>\n </script>\n <?php\n }", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "public function on_page_view(){\n $this->runTemplateSubController();\n // lightbox enabled?\n if( (bool) $this->lightboxEnable ){\n $this->addHeaderItem( $this->getHelper('html')->css('flexry-lightbox.min.css', 'flexry') );\n if( (bool) $this->autoIncludeJsInFooter ){\n $this->addFooterItem( $this->getHelper('html')->javascript('flexry-lightbox.js', 'flexry') );\n }else{\n $this->addHeaderItem( $this->getHelper('html')->javascript('flexry-lightbox.js', 'flexry') );\n }\n }\n // output function to execute deferreds\n $this->addHeaderItem( $this->getHelper('html')->javascript('libs/modernizr.js', 'flexry') );\n $this->addFooterItem('<script type=\"text/javascript\">'.$this->getHelper('file')->getContents(DIR_PACKAGES . '/flexry/' . DIRNAME_BLOCKS . '/flexry_gallery/inline_script.js.txt').'</script>');\n }", "public function generatePage_postProcessing() {}", "function fa_dynamic_area( $area, $before = '', $after = '' ){\n\t\n\t$settings = fa_get_options( 'hooks' );\n\t// check that area exists\n\tif( !array_key_exists( $area , $settings ) ){\n\t\treturn;\n\t}\n\t// check that area has sliders\n\t$sliders = $settings[ $area ]['sliders'];\n\tif( !$sliders || !is_array( $sliders ) ){\n\t\treturn;\n\t}\n\t\n\t/**\n\t * Action before displaying the sliders into a registered area.\n\t * \n\t * @param $area - dynamic area ID\n\t * @param $sliders - sliders in area\n\t */\n\tdo_action( 'fa_dynamic_area', $area, $sliders );\n\t\n\t/**\n\t * Filter to prevent area from being displayed\n\t * \n\t * @param - area ID\n\t */\n\t$show_area = apply_filters( 'fa_display_dynamic_areas', true, $area );\n\tif( !$show_area ){\n\t\treturn;\n\t}\n\t\n\techo $before;\n\t// display the sliders\n\tforeach( $sliders as $slider_id ){\n\t\tfa_display_slider( $slider_id, $area );\n\t}\t\n\techo $after;\n}", "function udesign_footer_before() {\r\n do_action('udesign_footer_before');\r\n}" ]
[ "0.7342455", "0.6944398", "0.6454011", "0.63942206", "0.6044567", "0.5961108", "0.5952167", "0.58525795", "0.5809897", "0.5613515", "0.5613508", "0.5554203", "0.55521774", "0.55374926", "0.5491936", "0.5472899", "0.5470611", "0.5446211", "0.54401785", "0.5432055", "0.5392547", "0.5374124", "0.53635585", "0.5354727", "0.53471684", "0.53419834", "0.5335746", "0.532799", "0.5320912", "0.5319552" ]
0.8973325
0
( and hooks ) Fire the 'udesign_home_page_content_before' action
function udesign_home_page_content_before() { do_action('udesign_home_page_content_before'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_page_content_before() {\r\n do_action('udesign_page_content_before');\r\n}", "function udesign_blog_post_content_before() {\r\n do_action('udesign_blog_post_content_before');\r\n}", "public function prePageContent();", "function cera_grimlock_homepage_before_content() {\n\t\t?>\n\t\t<?php if ( is_active_sidebar( 'before-content-1' ) ) : ?>\n\t\t\t<div id=\"before_content\" class=\"before_content site-before-content\"><?php cera_grimlock_widget_area( 'before-content-1' ); ?></div>\n\t\t<?php endif; ?>\n\n\t\t<div id=\"content\" tabindex=\"-1\">\n\t\t<?php\n\t}", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function udesign_html_before() {\r\n do_action('udesign_html_before');\r\n}", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "function udesign_top_wrapper_before() {\r\n do_action('udesign_top_wrapper_before');\r\n}", "public function before_main_content() {\n\t?>\n\n\t\t<div id=\"bbp-container\">\n\t\t\t<div id=\"bbp-content\" role=\"main\" class='skeleton auto-align'>\n\n\t<?php\n\t}", "function udesign_blog_entry_before() {\r\n do_action('udesign_blog_entry_before');\r\n}", "function sl_before_content_setup(){\n // start of the main content container\n?>\n <section class=\"site-content\">\n<?php\n}", "public function before()\n\t{\n\n\t\tparent::before();\n\t\tif ($this->auto_render) { \n\t\t\t$this->template->title = 'Hector - ';\n\t\t\t$this->template->page_description = '';\n\t\t\t$this->template->navbar = '';\n\t\t\t$this->template->content = '';\n\t\t\t$this->template->styles = array();\n\t\t\t$this->template->scripts = array();\n\t\t\t$this->template->set_focus = '';\n\t\t}\n\t\t\n\t}", "function udesign_page_title_before() {\r\n do_action('udesign_page_title_before');\r\n}", "function udesign_entry_before() {\r\n do_action('udesign_entry_before');\r\n}", "function udesign_main_content_top( $is_front_page ) {\r\n do_action('udesign_main_content_top', $is_front_page);\r\n}", "function cera_grimlock_before_content() {\n\t\t?>\n\t\t<?php if ( is_active_sidebar( 'before-content-1' ) ) : ?>\n\t\t\t<div id=\"before_content\" class=\"before_content site-before-content\"><?php cera_grimlock_widget_area( 'before-content-1' ); ?></div>\n\t\t<?php endif; ?>\n\n\t\t<div id=\"content\" <?php cera_grimlock_content_class( array( 'site-content', 'region' ) ); ?> tabindex=\"-1\">\n\t\t\t<div class=\"region__container\">\n\t\t\t\t<div class=\"region__row\">\n\t\t<?php\n\t}", "function beforeLayout() {\n }", "function hybrid_get_utility_before_content() {\n\tget_sidebar( 'before-content' );\n}", "public function before() {\n parent::before();\n $this->template->title = 'My Own CMS (MOC)';\n $this->template->js = View::factory('partial/js')\n ->set('scripts', $this->check_js($this->_JS_));\n $this->template->css = View::factory('partial/css')\n ->set('styles', $this->check_css($this->_CSS_));\n $this->template->meta_tag = View::factory('partial/meta_tag');\n $this->template->icon = '/tdesign/assets/images/favicon.ico';\n }", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "public static function action_before_content() {\n\t\t\tglobal $shortcode_tags, $cv_shortcode_tags_backup;\n\n\t\t\tif ( !$cv_shortcode_tags_backup ) {\n\t\t\t\t$trans_key = 'cv_shortcode_tags_193';\n\t\t\t\tif ( !defined( 'PT_CV_DOING_PAGINATION' ) && !defined( 'PT_CV_DOING_PREVIEW' ) ) {\n\t\t\t\t\t$tagnames\t\t\t\t\t = array_keys( $shortcode_tags );\n\t\t\t\t\t$cv_shortcode_tags_backup\t = join( '|', array_map( 'preg_quote', $tagnames ) );\n\t\t\t\t\tset_transient( $trans_key, $cv_shortcode_tags_backup, DAY_IN_SECONDS );\n\t\t\t\t} else {\n\t\t\t\t\t$cv_shortcode_tags_backup = get_transient( $trans_key );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function preStartPageHook() {}", "public function preStartPageHook() {}", "public function before()\n {\n parent::before();\n\n // Проверяем или пользователь 1й раз зашел на страницу\n // Если да - добавляем его во временную таблицу авторизации\n if (!$this->is_autorizated_cookie())\n $this->autorizate_me();\n \n View::set_global('title', 'Глобальное название сайта');\t\t\t\t\n View::set_global('description', 'Описание сайта');\n \n $this->template->content = '';\n \n // Формируем css - для всех страниц\n $this->template->styles = array( 'jcarousel.connected-carousels', 'prettyPhoto', 'style', 'font');\n \n // Формируем js - для всех страниц\n $this->template->js = array('jquery-1.9.0.min', 'jquery.prettyPhoto', \n 'jquery.jcarousel.min', 'jcarousel.connected-carousels');\n \n //$this->template->scripts = '';\n \n // По умолчанию прячем бант\n $this->template->hide_bant = true;\n \n // Директория, где хранятся все скрипты, фотографии и стили.\n View::set_global('res_folder', URL::base() . \"public/\");\n \n $this->template->menu_active = array('main' => '', 'vote' => '', 'winners' => '' ,'registration' => '');\n \n }", "public function before(){\n parent::before();\n $this->template->content = '';\n $this->template->styles = array('main');;\n $this->template->scripts = '';\n }", "public function beforeContent() {\n\t\t$menu = $this->document->getElementById($this->id);\n\t\tif($menu) {\n\t\t\t$this->document->addCss('public/css/simplemenu.css');\n\t\t\t$menu->removeAttribute('style');\n\n\t\t\t$menuList = $this->document->createElement('ul');\n\n\t\t\t$rq = new RequestHandler(DEFAULTPAGE, $this->basepath);\n\n\t\t\tforeach($this->menuItems as $lbl => $page) {\n\t\t\t\t$li = $this->document->createElement('li');\n\t\t\t\t$a = $this->document->createElement('a', $lbl);\n\t\t\t\t$a->setAttribute('href', $this->basepath.'/'.$page);\n\t\t\t\tif($rq->getPage() == $page)\n\t\t\t\t\t$li->setAttribute('class', 'selected');\n\t\t\t\t$li->appendChild($a);\n\t\t\t\t$menuList->appendChild($li);\n\t\t\t}\n\t\t\t$menu->appendChild($menuList);\n\t\t}\n\t}", "function onBeforeRender()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\tif($app->isAdmin()) return true;\n\t\t$doc = JFactory::getDocument();\n\t\tif($doc->getType() != 'html') return true;\n\t\t$content = $this->params->get('headtags');\n\t\t$config = JFactory::getConfig();\n\t\t$content = str_replace('%SITENAME%',$config->get( 'sitename' ),$content);\n\t\tJFactory::getDocument()->addCustomTag(PHP_EOL.'<!-- { gjheqadtag insert -->'.PHP_EOL.$content.PHP_EOL.'<!-- gjheqadtag insert } -->'.PHP_EOL);\n\t}", "public function woocommerce_before_main_content()\n {\n self::add( __FUNCTION__, '__return_false', 1 );\n }", "public function before()\n {\n if($this->auto_render && in_array($this->request->action(), $this->skip_auto_render)) {\n $this->auto_render = FALSE;\n }\n\n parent::before();\n\n /* Mobile template handling */\n if($this->is_mobile)\n $this->template = 'mobile/layout';\n\n if ($this->auto_render === TRUE) {\n // Если AJAX запрос, то происходит подмена шаблона, чтобы не выводить лишние данные\n // Выводится только блок с контентом\n // шаблон 'ajax/layout' содержит всего одну строчку \"<?php echo $content;\"\n if ($this->request->is_ajax() === TRUE) {\n $this->template = View::factory('global/ajax');\n }\n else\n {\n $this->template = View::factory($this->template);\n }\n\n // В этой переменной будет инициализирован шаблон блока с контентом\n $this->template->content = '';\n\n /* выбор шаблона для рендера */\n if(!in_array($this->request->action(), $this->skip_auto_content_apply))\n $this->template->content = $this->getContentTemplate($this->content_template);\n }\n }", "public function before()\n {\n parent::before();\n if($this->auto_render===TRUE)\n {\n \t// Load the template\n \t$this->template = View::factory($this->template);\n \t\n // Initialize empty values\n $this->template->title = 'Site name here';\n $this->template->meta_keywords = '';\n $this->template->meta_description = '';\n $this->template->meta_copywrite = 'Open Classifieds '.Core::version;\n $this->template->header = View::factory('header');\n $this->template->content = '';\n $this->template->footer = View::factory('footer');\n $this->template->styles = array();\n $this->template->scripts = array();\n }\n }" ]
[ "0.8568981", "0.7744103", "0.76453435", "0.74952966", "0.7308336", "0.7286158", "0.72643936", "0.71097547", "0.70398766", "0.6932817", "0.6914025", "0.6898479", "0.6887802", "0.688267", "0.6793775", "0.6788582", "0.67432404", "0.6741688", "0.673494", "0.67340213", "0.67293966", "0.6722163", "0.6722163", "0.6721784", "0.6715199", "0.6690445", "0.6678136", "0.66273165", "0.6594837", "0.65915614" ]
0.88428146
0
Fire the 'udesign_page_content_before' action.
function udesign_page_content_before() { do_action('udesign_page_content_before'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_home_page_content_before() {\r\n do_action('udesign_home_page_content_before');\r\n}", "public function prePageContent();", "function udesign_blog_post_content_before() {\r\n do_action('udesign_blog_post_content_before');\r\n}", "function udesign_html_before() {\r\n do_action('udesign_html_before');\r\n}", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "function cera_grimlock_homepage_before_content() {\n\t\t?>\n\t\t<?php if ( is_active_sidebar( 'before-content-1' ) ) : ?>\n\t\t\t<div id=\"before_content\" class=\"before_content site-before-content\"><?php cera_grimlock_widget_area( 'before-content-1' ); ?></div>\n\t\t<?php endif; ?>\n\n\t\t<div id=\"content\" tabindex=\"-1\">\n\t\t<?php\n\t}", "function udesign_entry_before() {\r\n do_action('udesign_entry_before');\r\n}", "function udesign_top_wrapper_before() {\r\n do_action('udesign_top_wrapper_before');\r\n}", "function udesign_page_title_before() {\r\n do_action('udesign_page_title_before');\r\n}", "public function before_main_content() {\n\t?>\n\n\t\t<div id=\"bbp-container\">\n\t\t\t<div id=\"bbp-content\" role=\"main\" class='skeleton auto-align'>\n\n\t<?php\n\t}", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function udesign_blog_entry_before() {\r\n do_action('udesign_blog_entry_before');\r\n}", "public static function action_before_content() {\n\t\t\tglobal $shortcode_tags, $cv_shortcode_tags_backup;\n\n\t\t\tif ( !$cv_shortcode_tags_backup ) {\n\t\t\t\t$trans_key = 'cv_shortcode_tags_193';\n\t\t\t\tif ( !defined( 'PT_CV_DOING_PAGINATION' ) && !defined( 'PT_CV_DOING_PREVIEW' ) ) {\n\t\t\t\t\t$tagnames\t\t\t\t\t = array_keys( $shortcode_tags );\n\t\t\t\t\t$cv_shortcode_tags_backup\t = join( '|', array_map( 'preg_quote', $tagnames ) );\n\t\t\t\t\tset_transient( $trans_key, $cv_shortcode_tags_backup, DAY_IN_SECONDS );\n\t\t\t\t} else {\n\t\t\t\t\t$cv_shortcode_tags_backup = get_transient( $trans_key );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function beforeLayout() {\n }", "function hybrid_get_utility_before_content() {\n\tget_sidebar( 'before-content' );\n}", "public function before()\n\t{\n\n\t\tparent::before();\n\t\tif ($this->auto_render) { \n\t\t\t$this->template->title = 'Hector - ';\n\t\t\t$this->template->page_description = '';\n\t\t\t$this->template->navbar = '';\n\t\t\t$this->template->content = '';\n\t\t\t$this->template->styles = array();\n\t\t\t$this->template->scripts = array();\n\t\t\t$this->template->set_focus = '';\n\t\t}\n\t\t\n\t}", "public function before() {\n parent::before();\n $this->template->title = 'My Own CMS (MOC)';\n $this->template->js = View::factory('partial/js')\n ->set('scripts', $this->check_js($this->_JS_));\n $this->template->css = View::factory('partial/css')\n ->set('styles', $this->check_css($this->_CSS_));\n $this->template->meta_tag = View::factory('partial/meta_tag');\n $this->template->icon = '/tdesign/assets/images/favicon.ico';\n }", "public function before(){\n parent::before();\n $this->template->content = '';\n $this->template->styles = array('main');;\n $this->template->scripts = '';\n }", "public function beforeContent() {\n\t\t$menu = $this->document->getElementById($this->id);\n\t\tif($menu) {\n\t\t\t$this->document->addCss('public/css/simplemenu.css');\n\t\t\t$menu->removeAttribute('style');\n\n\t\t\t$menuList = $this->document->createElement('ul');\n\n\t\t\t$rq = new RequestHandler(DEFAULTPAGE, $this->basepath);\n\n\t\t\tforeach($this->menuItems as $lbl => $page) {\n\t\t\t\t$li = $this->document->createElement('li');\n\t\t\t\t$a = $this->document->createElement('a', $lbl);\n\t\t\t\t$a->setAttribute('href', $this->basepath.'/'.$page);\n\t\t\t\tif($rq->getPage() == $page)\n\t\t\t\t\t$li->setAttribute('class', 'selected');\n\t\t\t\t$li->appendChild($a);\n\t\t\t\t$menuList->appendChild($li);\n\t\t\t}\n\t\t\t$menu->appendChild($menuList);\n\t\t}\n\t}", "function udesign_front_page_slider_before() {\r\n do_action('udesign_front_page_slider_before');\r\n}", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "public function pre_action()\n\t{\n\t\tparent::pre_action();\n\t\t//\n\t\t$this->view->title = \"Codini\";\n\t}", "function udesign_single_post_entry_before() {\r\n do_action('udesign_single_post_entry_before');\r\n}", "function cera_grimlock_before_content() {\n\t\t?>\n\t\t<?php if ( is_active_sidebar( 'before-content-1' ) ) : ?>\n\t\t\t<div id=\"before_content\" class=\"before_content site-before-content\"><?php cera_grimlock_widget_area( 'before-content-1' ); ?></div>\n\t\t<?php endif; ?>\n\n\t\t<div id=\"content\" <?php cera_grimlock_content_class( array( 'site-content', 'region' ) ); ?> tabindex=\"-1\">\n\t\t\t<div class=\"region__container\">\n\t\t\t\t<div class=\"region__row\">\n\t\t<?php\n\t}", "public function before()\n {\n if($this->auto_render && in_array($this->request->action(), $this->skip_auto_render)) {\n $this->auto_render = FALSE;\n }\n\n parent::before();\n\n /* Mobile template handling */\n if($this->is_mobile)\n $this->template = 'mobile/layout';\n\n if ($this->auto_render === TRUE) {\n // Если AJAX запрос, то происходит подмена шаблона, чтобы не выводить лишние данные\n // Выводится только блок с контентом\n // шаблон 'ajax/layout' содержит всего одну строчку \"<?php echo $content;\"\n if ($this->request->is_ajax() === TRUE) {\n $this->template = View::factory('global/ajax');\n }\n else\n {\n $this->template = View::factory($this->template);\n }\n\n // В этой переменной будет инициализирован шаблон блока с контентом\n $this->template->content = '';\n\n /* выбор шаблона для рендера */\n if(!in_array($this->request->action(), $this->skip_auto_content_apply))\n $this->template->content = $this->getContentTemplate($this->content_template);\n }\n }", "public function before()\n {\n parent::before();\n\n // Проверяем или пользователь 1й раз зашел на страницу\n // Если да - добавляем его во временную таблицу авторизации\n if (!$this->is_autorizated_cookie())\n $this->autorizate_me();\n \n View::set_global('title', 'Глобальное название сайта');\t\t\t\t\n View::set_global('description', 'Описание сайта');\n \n $this->template->content = '';\n \n // Формируем css - для всех страниц\n $this->template->styles = array( 'jcarousel.connected-carousels', 'prettyPhoto', 'style', 'font');\n \n // Формируем js - для всех страниц\n $this->template->js = array('jquery-1.9.0.min', 'jquery.prettyPhoto', \n 'jquery.jcarousel.min', 'jcarousel.connected-carousels');\n \n //$this->template->scripts = '';\n \n // По умолчанию прячем бант\n $this->template->hide_bant = true;\n \n // Директория, где хранятся все скрипты, фотографии и стили.\n View::set_global('res_folder', URL::base() . \"public/\");\n \n $this->template->menu_active = array('main' => '', 'vote' => '', 'winners' => '' ,'registration' => '');\n \n }", "public function before()\n {\n parent::before();\n\n View::set_global('title', 'Manager page');\n View::set_global('description', 'Manager page');\n $this->template->styles = array('reset', 'templates/template/style', 'manager/style');\n $this->template->scripts = array('jquery', 'hoverIntent', 'templates/template/script', 'manager/script');\n $this->template->modules = ORM::factory('User', Auth_ORM::instance()->get_user()->id)->modules->find_all();\n }", "public function before()\n {\n parent::before();\n if($this->auto_render===TRUE)\n {\n \t// Load the template\n \t$this->template = View::factory($this->template);\n \t\n // Initialize empty values\n $this->template->title = 'Site name here';\n $this->template->meta_keywords = '';\n $this->template->meta_description = '';\n $this->template->meta_copywrite = 'Open Classifieds '.Core::version;\n $this->template->header = View::factory('header');\n $this->template->content = '';\n $this->template->footer = View::factory('footer');\n $this->template->styles = array();\n $this->template->scripts = array();\n }\n }", "function sl_before_content_setup(){\n // start of the main content container\n?>\n <section class=\"site-content\">\n<?php\n}", "public function prePageHeader();" ]
[ "0.84452486", "0.78421915", "0.7714485", "0.7453964", "0.7217751", "0.7091891", "0.698186", "0.693138", "0.6913788", "0.6816056", "0.6807778", "0.6797639", "0.6758896", "0.67175156", "0.6687393", "0.6683677", "0.6643209", "0.66099995", "0.657678", "0.6538815", "0.6532244", "0.6521218", "0.65211815", "0.65079135", "0.64983445", "0.64803237", "0.6452437", "0.64381987", "0.64303523", "0.64101064" ]
0.87133527
0
Fire the 'udesign_page_content_after' action.
function udesign_page_content_after() { do_action('udesign_page_content_after'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "function udesign_footer_after() {\r\n do_action('udesign_footer_after');\r\n}", "function udesign_entry_after() {\r\n do_action('udesign_entry_after');\r\n}", "function udesign_blog_entry_after() {\r\n do_action('udesign_blog_entry_after');\r\n}", "function udesign_page_title_after() {\r\n do_action('udesign_page_title_after');\r\n}", "function udesign_main_content_bottom() {\r\n do_action('udesign_main_content_bottom');\r\n}", "public function after_main_content() {\n\t?>\n\n\t\t\t</div><!-- #bbp-content -->\n\t\t</div><!-- #bbp-container -->\n\n\t<?php\n\t}", "function udesign_single_post_entry_after() {\r\n do_action('udesign_single_post_entry_after');\r\n}", "function poco_after_content() {\n echo <<<HTML\n\t</main><!-- #main -->\n</div><!-- #primary -->\nHTML;\n\n do_action('poco_sidebar');\n }", "public function after()\n\t{\n\t\tif ($this->request->action() == 'compose' OR $this->request->action() == 'edit')\n\t\t{\n\t\t\t// Add RichText Support\n\t\t\tAssets::editor('.textarea', I18n::$lang);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Tabs\n\t\t\t$this->_tabs = array(\n\t\t\t\tarray('link' => Route::get('user/message')->uri(array('action' =>'inbox')), 'text' => __('Inbox')),\n\t\t\t\tarray('link' => Route::get('user/message')->uri(array('action' =>'outbox')), 'text' => __('Sent Messages')),\n\t\t\t\tarray('link' => Route::get('user/message')->uri(array('action' =>'drafts')), 'text' => __('Drafts')),\n\t\t\t\tarray('link' => Route::get('user/message')->uri(array('action' =>'list')), 'text' => __('All Messages'))\n\t\t\t);\n\n\t\t\t// Disable sidebars on message pages except compose and edit\n\t\t\t$this->_sidebars = FALSE;\n\t\t}\n\n\t\tparent::after();\n\t}", "public function after()\n {\n \tparent::after();\n \tif ($this->auto_render === TRUE)\n \t{\n \t\t// Add defaults to template variables.\n \t\t$this->template->styles = array_reverse(array_merge($this->template->styles, View::$styles));\n \t\t$this->template->scripts = array_reverse(array_merge_recursive(View::$scripts,$this->template->scripts));\n \t\t\n \t\t/*\n \t\t //auto generate keywords and description from content\n \t\tif ($this->template->meta_keywords=='' || $this->template->meta_description=='')\n \t\t{\n \t\t$seo = new phpSEO($this->template->content,CHARSET);//loading the php SEO class\n \t\t\n \t\tif ($this->template->meta_keywords=='')//not meta keywords given\n \t\t{\n \t\t$this->template->meta_keywords=$seo->getKeyWords(12);\n \t\t}\n \t\tif ($this->template->meta_description=='')//not meta description given\n \t\t{\n \t\t$this->template->meta_description=$seo->getMetaDescription(150);//die($this->template->meta_description);\n \t\t}\n \t\t}*/\n \t}\n \t$this->response->body($this->template->render());\n \n }", "public function after() {\n $this->template->header = View::factory('manage/partial/header')\n ->set('user', Auth::instance()->get_user());\n $this->template->menu = View::factory('manage/partial/menu');\n parent::after();\n }", "function udesign_front_page_slider_after() {\r\n do_action('udesign_front_page_slider_after');\r\n}", "function udesign_body_bottom() {\r\n do_action('udesign_body_bottom');\r\n}", "function hybrid_get_utility_after_content() {\n\tget_sidebar( 'after-content' );\n}", "public function after()\n {\n parent::after();\n }", "function udesign_single_portfolio_entry_after() {\r\n do_action('udesign_single_portfolio_entry_after');\r\n}", "function udesign_footer_inside() {\r\n do_action('udesign_footer_inside');\r\n}", "function cera_grimlock_homepage_after_content() {\n\t\t?>\n\t\t</div><!-- #content -->\n\t\t<?php if ( is_active_sidebar( 'after-content-1' ) ) : ?>\n\t\t\t<div id=\"after_content\" class=\"after_content site-after-content d-print-none\"><?php cera_grimlock_widget_area( 'after-content-1' ); ?></div>\n\t\t<?php endif;\n\t}", "function afterLayout() { \t\t\n }", "function anva_content_after_default() {\n\t?>\n\t</div><!-- .sidebar-layout (end) -->\n\t<?php\n}", "function udesign_top_wrapper_after( $is_front_page ) {\r\n do_action('udesign_top_wrapper_after', $is_front_page);\r\n}", "function sl_after_content_setup(){\n // end of the main content container\n?>\n </section> <!-- .site-content -->\n<?php\n}", "public function after_content( $content ) {\n\t\t\t$this->after_content .= $content;\n\n\t\t\treturn $this->after_content;\n\t\t}", "public function after()\n\t{\n\n\t\tif ($this->auto_render) {\n\t\t\t$styles = array(\n\t\t\t\t'media/css/normalize.css'\n\t\t\t\t,'media/css/foundation.min.css'\n\t\t\t);\n\t\t\t$scripts = array(\n\t\t\t\t'media/js/vendor/jquery.js'\n\t\t\t\t,'media/js/vendor/fastclick.js'\n\t\t\t\t,'media/js/foundation.min.js'\n\t\t\t);\n\t\t\t$this->template->styles = array_merge( $this->template->styles, $styles );\n\t\t\t$this->template->scripts = array_merge( $this->template->scripts, $scripts );\n\t\t}\n\t\tparent::after();\n\t\t\n\t}", "protected function afterAction () {\n\t}", "protected function _after()\n\t{\n\t\t\n\t}", "protected function _after()\n\t{\n\t\t\n\t}", "function udesign_page_content_before() {\r\n do_action('udesign_page_content_before');\r\n}", "public function after_render($content = null) {\n\t\techo $content;\n\t}" ]
[ "0.7640039", "0.7360507", "0.7326991", "0.7187484", "0.7124212", "0.7120919", "0.71206623", "0.6893137", "0.68196166", "0.6761825", "0.67425597", "0.6736267", "0.6725049", "0.65867746", "0.65751725", "0.65743595", "0.65054303", "0.6447218", "0.64185447", "0.6411098", "0.6383033", "0.6359392", "0.63492066", "0.63371074", "0.630681", "0.62993884", "0.62989396", "0.62989396", "0.62952775", "0.62768143" ]
0.8946478
0
Fire the 'udesign_home_page_content_top' action
function udesign_home_page_content_top() { do_action('udesign_home_page_content_top'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "function udesign_main_content_top( $is_front_page ) {\r\n do_action('udesign_main_content_top', $is_front_page);\r\n}", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "function udesign_head_top() {\r\n do_action('udesign_head_top');\r\n}", "function udesign_page_title_top() {\r\n do_action('udesign_page_title_top');\r\n}", "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "function udesign_top_wrapper_top() {\r\n do_action('udesign_top_wrapper_top');\r\n}", "function udesign_sidebar_top() {\r\n do_action('udesign_sidebar_top');\r\n}", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "function udesign_single_portfolio_entry_top() {\r\n do_action('udesign_single_portfolio_entry_top');\r\n}", "public static function process_content_top($p_catdata)\n {\n if (isys_maintenance_dao::instance(isys_application::instance()->database)->is_in_maintenance($p_catdata['isys_obj__id']))\n {\n global $index_includes;\n\n $index_includes['contenttopobjectdetail'][] = __DIR__ . '/templates/contenttop/main_objectdetail.tpl';\n } // if\n }", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "public function topAction();", "public function hookTop(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'_scroll.tpl');\n }", "function udesign_main_content_bottom() {\r\n do_action('udesign_main_content_bottom');\r\n}", "function udesign_home_page_content_before() {\r\n do_action('udesign_home_page_content_before');\r\n}", "function udesign_blog_post_top_area_inside() {\r\n do_action('udesign_blog_post_top_area_inside');\r\n}", "function udesign_top_elements_inside( $is_front_page ) {\r\n do_action('udesign_top_elements_inside', $is_front_page);\r\n}", "public function topAction()\n {\n $this->view->title = 'FENS様検索エンジン管理システム|FENS';\n $this->render();\n }", "public function displayContent(){\n\t\t\tinclude('/includes/homepage.inc.php');\t\n\t\t}", "public function homePage() {\n #$this->view->loadTemplate( 'elements_example');\n $this->view->loadTemplate( LNG . '/centercontent');\n $this->commitReplace($this->view->render(), '#two', true);\n }", "function top() {\n\t\trequire ('views/partial/top.php');\n\t}", "protected function updateTopPage(): void\n {\n if (!$this->topPageUpdate) {\n return;\n }\n\n /** @var SiteTreeExtension $extension */\n $extension = singleton(SiteTreeExtension::class);\n $extension->addDuplicatedObject($this->owner);\n }", "public function top_up()\n\t{\n\t\t$data['container'] = 'transaction/top_up_koptel';\n\t\t$this->load->view('core',$data);\n\t}", "function udesign_page_title_bottom() {\r\n do_action('udesign_page_title_bottom');\r\n}", "function udesign_page_content_before() {\r\n do_action('udesign_page_content_before');\r\n}", "function udesign_body_bottom() {\r\n do_action('udesign_body_bottom');\r\n}" ]
[ "0.866344", "0.7791635", "0.77915084", "0.75843614", "0.7530879", "0.7390584", "0.7330269", "0.7294347", "0.70573664", "0.70381474", "0.6996814", "0.67899865", "0.67860025", "0.675941", "0.6753856", "0.67113805", "0.6665214", "0.6657472", "0.6648851", "0.66063523", "0.65135616", "0.64882696", "0.64438456", "0.6433796", "0.63243085", "0.63009083", "0.6288608", "0.6276436", "0.62082344", "0.6203115" ]
0.8782408
0
Fire the 'udesign_page_content_top' action
function udesign_page_content_top() { do_action('udesign_page_content_top'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "function udesign_head_top() {\r\n do_action('udesign_head_top');\r\n}", "function udesign_main_content_top( $is_front_page ) {\r\n do_action('udesign_main_content_top', $is_front_page);\r\n}", "function udesign_page_title_top() {\r\n do_action('udesign_page_title_top');\r\n}", "function udesign_top_wrapper_top() {\r\n do_action('udesign_top_wrapper_top');\r\n}", "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "function udesign_sidebar_top() {\r\n do_action('udesign_sidebar_top');\r\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "public function hookTop(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'_scroll.tpl');\n }", "function udesign_single_portfolio_entry_top() {\r\n do_action('udesign_single_portfolio_entry_top');\r\n}", "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "public function topAction();", "public static function process_content_top($p_catdata)\n {\n if (isys_maintenance_dao::instance(isys_application::instance()->database)->is_in_maintenance($p_catdata['isys_obj__id']))\n {\n global $index_includes;\n\n $index_includes['contenttopobjectdetail'][] = __DIR__ . '/templates/contenttop/main_objectdetail.tpl';\n } // if\n }", "function udesign_main_content_bottom() {\r\n do_action('udesign_main_content_bottom');\r\n}", "function udesign_blog_post_top_area_inside() {\r\n do_action('udesign_blog_post_top_area_inside');\r\n}", "function udesign_top_elements_inside( $is_front_page ) {\r\n do_action('udesign_top_elements_inside', $is_front_page);\r\n}", "public function topAction()\n {\n $this->view->title = 'FENS様検索エンジン管理システム|FENS';\n $this->render();\n }", "protected function updateTopPage(): void\n {\n if (!$this->topPageUpdate) {\n return;\n }\n\n /** @var SiteTreeExtension $extension */\n $extension = singleton(SiteTreeExtension::class);\n $extension->addDuplicatedObject($this->owner);\n }", "function top() {\n\t\trequire ('views/partial/top.php');\n\t}", "function udesign_home_page_content_before() {\r\n do_action('udesign_home_page_content_before');\r\n}", "function udesign_page_content_before() {\r\n do_action('udesign_page_content_before');\r\n}", "function udesign_body_bottom() {\r\n do_action('udesign_body_bottom');\r\n}", "function udesign_page_title_bottom() {\r\n do_action('udesign_page_title_bottom');\r\n}", "function udesign_top_wrapper_before() {\r\n do_action('udesign_top_wrapper_before');\r\n}", "public function top_up()\n\t{\n\t\t$data['container'] = 'transaction/top_up_koptel';\n\t\t$this->load->view('core',$data);\n\t}", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}" ]
[ "0.8571957", "0.81077737", "0.7899994", "0.7793212", "0.7716602", "0.76001966", "0.75504225", "0.7497493", "0.7282796", "0.7219356", "0.7216397", "0.70252043", "0.69711673", "0.6967447", "0.6917178", "0.67749846", "0.6769371", "0.6733991", "0.6644608", "0.6600867", "0.65901446", "0.6523322", "0.65179443", "0.6506665", "0.6492981", "0.6475097", "0.6473066", "0.64332956", "0.63747096", "0.62483835" ]
0.8846058
0
Fire the 'udesign_page_content_bottom' action
function udesign_page_content_bottom() { do_action('udesign_page_content_bottom'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_main_content_bottom() {\r\n do_action('udesign_main_content_bottom');\r\n}", "function udesign_body_bottom() {\r\n do_action('udesign_body_bottom');\r\n}", "function udesign_entry_bottom() {\r\n do_action('udesign_entry_bottom');\r\n}", "function udesign_bottom_section_bottom() {\r\n do_action('udesign_bottom_section_bottom');\r\n}", "function udesign_blog_entry_bottom() {\r\n do_action('udesign_blog_entry_bottom');\r\n}", "function udesign_page_title_bottom() {\r\n do_action('udesign_page_title_bottom');\r\n}", "function udesign_sidebar_bottom() {\r\n do_action('udesign_sidebar_bottom');\r\n}", "function udesign_single_post_entry_bottom() {\r\n do_action('udesign_single_post_entry_bottom');\r\n}", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "function udesign_single_portfolio_entry_bottom() {\r\n do_action('udesign_single_portfolio_entry_bottom');\r\n}", "function udesign_footer_after() {\r\n do_action('udesign_footer_after');\r\n}", "function udesign_top_wrapper_bottom( $is_front_page ) {\r\n do_action('udesign_top_wrapper_bottom', $is_front_page);\r\n}", "function udesign_footer_inside() {\r\n do_action('udesign_footer_inside');\r\n}", "function bethel_do_footer_bottom() {\n\tgenesis_widget_area ('footer-bottom', array ('before' => '<div id=\"bethel-header-right-bottom\">', 'after' => '</div>'));\n}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "public function executeFooterPanel()\n {\n }", "public function after_main_content() {\n\t?>\n\n\t\t\t</div><!-- #bbp-content -->\n\t\t</div><!-- #bbp-container -->\n\n\t<?php\n\t}", "public function atBottom() {\n }", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "public function on_admin_footer() {\n\t\tif ( $this->is_on_our_own_pages() ) {\n\t\t\t/**\n\t\t\t * Similar to action WordPress action `admin_footer`,\n\t\t\t * but only fired from pages with Simple History.\n\t\t\t *\n\t\t\t * @param Simple_History $instance This class.\n\t\t\t */\n\t\t\tdo_action( 'simple_history/admin_footer', $this );\n\t\t}\n\t}", "function cera_grimlock_homepage_after_content() {\n\t\t?>\n\t\t</div><!-- #content -->\n\t\t<?php if ( is_active_sidebar( 'after-content-1' ) ) : ?>\n\t\t\t<div id=\"after_content\" class=\"after_content site-after-content d-print-none\"><?php cera_grimlock_widget_area( 'after-content-1' ); ?></div>\n\t\t<?php endif;\n\t}", "public static function show_box_bottom() {\n require Config::get('prefix') . '/templates/show_box_bottom.inc.php';\n }", "function udesign_page_title_after() {\r\n do_action('udesign_page_title_after');\r\n}", "function client_portal_move_yoast_to_bottom() {\n\t\treturn 'low';\n\t}", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "public function footerAction() {$this->_helper->viewRenderer->setResponseSegment('footer');}", "function udesign_entry_after() {\r\n do_action('udesign_entry_after');\r\n}", "function afterLayout() { \t\t\n }" ]
[ "0.86522216", "0.83226854", "0.8009146", "0.779894", "0.7749335", "0.7663542", "0.7592339", "0.75849694", "0.7572024", "0.74621415", "0.71528465", "0.7079611", "0.6825725", "0.6803935", "0.66993994", "0.66726106", "0.6652254", "0.64849764", "0.6472023", "0.6450675", "0.640536", "0.6384894", "0.61871016", "0.61590755", "0.6143868", "0.61251974", "0.6107019", "0.6104148", "0.609719", "0.6094111" ]
0.90954113
0
( hooks ) Fire the 'udesign_page_title_before' action
function udesign_page_title_before() { do_action('udesign_page_title_before'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_page_title_top() {\r\n do_action('udesign_page_title_top');\r\n}", "public function before_the_title() {\n\t\techo '<div class=\"fusion-events-before-title\">';\n\t}", "function udesign_page_title_after() {\r\n do_action('udesign_page_title_after');\r\n}", "protected function renderPageTitle() {}", "public function loadPageTitle()\n \t\t{\n echo \"<title>Add Item</title>\";\n }", "public function beforeRender(){\n\t\t$title_for_layout = __('エネルギー効率評価システム | 一般社団法人 日本工業炉協会');\n\t\t$this->set('title_for_layout', $title_for_layout);\t\t\n\t}", "public function pre_action()\n\t{\n\t\tparent::pre_action();\n\t\t//\n\t\t$this->view->title = \"Codini\";\n\t}", "protected function regeneratePageTitle() {}", "protected function setPageTitle() {\r\n\t\t$pageTitleText = (empty($this->settings['news']['semantic']['general']['pageTitle']['useAlternate'])) ? $this->newsItem->getTitle() : $this->newsItem->getAlternativeTitle();\r\n\t\t$pageTitleAction = $this->settings['news']['semantic']['general']['pageTitle']['action'];\r\n\r\n\t\tif (!empty($pageTitleAction)) {\r\n\t\t\tswitch ($pageTitleAction) {\r\n\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t$pageTitleText .= ': ' . $GLOBALS['TSFE']->page['title'];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'append':\r\n\t\t\t\t\t$pageTitleText = $GLOBALS['TSFE']->page['title'] . ': ' . $pageTitleText;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t}\r\n\t\t\t$this->pageTitle = html_entity_decode($pageTitleText, ENT_QUOTES, \"UTF-8\");\r\n\t\t\t$GLOBALS['TSFE']->page['title'] = $this->pageTitle;\r\n\t\t\t$GLOBALS['TSFE']->indexedDocTitle = $this->pageTitle;\r\n\t\t}\r\n\t}", "public function prePageHeader();", "function udesign_page_content_before() {\r\n do_action('udesign_page_content_before');\r\n}", "function udesign_home_page_content_before() {\r\n do_action('udesign_home_page_content_before');\r\n}", "public function titleCallback() {\r\n return [\r\n '#markup' => $this->t('The title of this page is dynamically changed by the title callback for this route defined in menu_example.routing.yml.'),\r\n ];\r\n }", "public function title(){\r\n\r\n echo ISSET($this->pageSettings->page_title)?$this->pageSettings->page_title:'';\r\n\r\n }", "function udesign_html_before() {\r\n do_action('udesign_html_before');\r\n}", "public function setPageTitle($title);", "function minorite_views_pre_render(&$view) {\n $view->set_title(t($view->get_title()));\n}", "public function setPageTitle($page_name);", "public function setPageTitle($page_name);", "function od_set_page_title($orig_title) {\n\t\treturn \"Map | \"; // set the page title (could be improved, eg based on filters. Might be something the user wants to set\n\t}", "function set_title() {\n \tglobal $pageTitle;\n \tif (isset($pageTitle))\n \t\techo 'Tanqeeb | ' . $pageTitle;\n \telse\n \t\techo 'Tanqeeb';\n}", "public function before()\n\t{\n\n\t\tparent::before();\n\t\tif ($this->auto_render) { \n\t\t\t$this->template->title = 'Hector - ';\n\t\t\t$this->template->page_description = '';\n\t\t\t$this->template->navbar = '';\n\t\t\t$this->template->content = '';\n\t\t\t$this->template->styles = array();\n\t\t\t$this->template->scripts = array();\n\t\t\t$this->template->set_focus = '';\n\t\t}\n\t\t\n\t}", "function shoestrap_empty_page_title() {}", "public function before($container=FALSE)\r\n {\r\n // Set any page includes\r\n Page::instance()->set_page_data('title', __('register.html_page_title'));\r\n\r\n return parent::before($container);\r\n }", "protected function initTitles() {\n\t\t$title \t = \"\";\n\t\t\n\t\tif(isset($this->config['titles']['title']))\n\t\t \t$title = $this->config['titles']['title'];\n\n\t\tif(isset($this->config['titles'][$this->request->getControllerName()]['title']))\n\t\t \t$title .= $this->config['titles']['seperator'] . $this->config['titles'][$this->request->getControllerName()]['title'];\n\t\t \t\n\t\tif(isset($this->config['titles'][$this->request->getControllerName()]['action'][$this->request->getActionName()]))\n\t\t \t$title .= $this->config['titles']['seperator'] . $this->config['titles'][$this->request->getControllerName()]['action'][$this->request->getActionName()];\n\t\t \t\n\t\t$this->layout->setTitle($title);\n\t}", "function pgm_register_custom_admin_titles() {\n add_filter('the_title','pgm_custom_admin_titles',99,2);\n}", "function title_for_page($title) {\n\t$print = function() use($title) {\n\t\techo $title;\n\t};\n\n\tadd_action(\"main_heading\", $print);\n}", "function udesign_page_title_bottom() {\r\n do_action('udesign_page_title_bottom');\r\n}", "function _block_template_render_title_tag()\n {\n }", "function prepend_title($title){\r\n\t\t$this->_title = \"{$title} - {$this->_title}\";\r\n\t}" ]
[ "0.78977114", "0.78295994", "0.7765385", "0.74392945", "0.7402053", "0.73905003", "0.7376399", "0.7341439", "0.7302053", "0.72484946", "0.72390574", "0.7079363", "0.7056478", "0.7029776", "0.700508", "0.7004252", "0.6994296", "0.69795626", "0.69795626", "0.697759", "0.69701916", "0.6966269", "0.6964704", "0.6795519", "0.6782117", "0.67719066", "0.6764586", "0.6761066", "0.67221034", "0.6717014" ]
0.90051895
0
Fire the 'udesign_page_title_after' action.
function udesign_page_title_after() { do_action('udesign_page_title_after'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_page_title_bottom() {\r\n do_action('udesign_page_title_bottom');\r\n}", "function udesign_page_title_before() {\r\n do_action('udesign_page_title_before');\r\n}", "function udesign_page_title_top() {\r\n do_action('udesign_page_title_top');\r\n}", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "public function after_the_title() {\n\t\techo '</div>';\n\t}", "protected function regeneratePageTitle() {}", "function edit_form_after_title()\n {\n }", "function edit_form_after_title()\n {\n }", "public function titleCallback() {\r\n return [\r\n '#markup' => $this->t('The title of this page is dynamically changed by the title callback for this route defined in menu_example.routing.yml.'),\r\n ];\r\n }", "public function loadPageTitle()\n \t\t{\n echo \"<title>Add Item</title>\";\n }", "protected function renderPageTitle() {}", "public function afterRegistry()\n {\n parent::afterRegistry();\n\n $this->contentTitle = sprintf($this->_('Quick view %s track'), $this->trackEngine->getTrackName());\n }", "protected function setPageTitle() {\r\n\t\t$pageTitleText = (empty($this->settings['news']['semantic']['general']['pageTitle']['useAlternate'])) ? $this->newsItem->getTitle() : $this->newsItem->getAlternativeTitle();\r\n\t\t$pageTitleAction = $this->settings['news']['semantic']['general']['pageTitle']['action'];\r\n\r\n\t\tif (!empty($pageTitleAction)) {\r\n\t\t\tswitch ($pageTitleAction) {\r\n\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t$pageTitleText .= ': ' . $GLOBALS['TSFE']->page['title'];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'append':\r\n\t\t\t\t\t$pageTitleText = $GLOBALS['TSFE']->page['title'] . ': ' . $pageTitleText;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t}\r\n\t\t\t$this->pageTitle = html_entity_decode($pageTitleText, ENT_QUOTES, \"UTF-8\");\r\n\t\t\t$GLOBALS['TSFE']->page['title'] = $this->pageTitle;\r\n\t\t\t$GLOBALS['TSFE']->indexedDocTitle = $this->pageTitle;\r\n\t\t}\r\n\t}", "function udesign_entry_after() {\r\n do_action('udesign_entry_after');\r\n}", "function title_for_page($title) {\n\t$print = function() use($title) {\n\t\techo $title;\n\t};\n\n\tadd_action(\"main_heading\", $print);\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "public function setPageTitle($title);", "function quasar_after_header_title_hook(){\n\t//Do Nothing\n}", "function udesign_front_page_slider_after() {\r\n do_action('udesign_front_page_slider_after');\r\n}", "public function setPageTitle($page_name);", "public function setPageTitle($page_name);", "protected function page_title() {\n?>\n\t\t<h2>\n\t\t\t<?php echo __( 'Marketplace Add-ons', APP_TD ); ?>\n\t\t\t<a href=\"https://marketplace.appthemes.com/\" class=\"add-new-h2\"><?php _e( 'Browse Marketplace', APP_TD ); ?></a>\n\t\t\t<a href=\"https://www.appthemes.com/themes/\" class=\"add-new-h2\"><?php _e( 'Browse Themes', APP_TD ); ?></a>\n\t\t</h2>\n<?php\n\t}", "public function ProfileController_AfterDiscussionTitle_Handler($Sender) {\n\t\t$this->DiscussionsController_AfterDiscussionTitle_Handler($Sender);\n\t}", "public function before_the_title() {\n\t\techo '<div class=\"fusion-events-before-title\">';\n\t}", "public static function title_callback()\n {\n printf(\n '<input type=\"text\" id=\"title\" name=\"event_settings[title]\" value=\"%s\" />',\n self::option('title')\n );\n }", "public function title(){\r\n\r\n echo ISSET($this->pageSettings->page_title)?$this->pageSettings->page_title:'';\r\n\r\n }", "public function title_callback()\n {\n printf(\n '<input type=\"text\" id=\"my_title\" name=\"my_title\" value=\"%s\" />',\n isset( $this->options['my_title'] ) ? esc_attr( $this->options['my_title']) : ''\n );\n }", "function od_set_page_title($orig_title) {\n\t\treturn \"Map | \"; // set the page title (could be improved, eg based on filters. Might be something the user wants to set\n\t}", "function shoestrap_empty_page_title() {}", "protected function output_page_title( $page_title = '' ) {\n?>\n\t\t<h2>\n\t\t\t<?php echo $this->browser_args['page_title']; ?>\n\n\t\t\t<?php if ( ! empty( $this->browser_args['header_buttons'] ) && is_array( $this->browser_args['header_buttons'] ) ) foreach( $this->browser_args['header_buttons'] as $tab ): ?>\n\t\t\t\t<a href=\"<?php echo esc_url( $tab['url'] ); ?>\" class=\"add-new-h2\" target=\"_blank\" rel=\"nofollow\"><?php echo $tab['title']; ?></a>\n\t\t\t<?php endforeach; ?>\n\t\t</h2>\n<?php\n\t}" ]
[ "0.7926337", "0.73472863", "0.7246377", "0.70734024", "0.7052619", "0.70006156", "0.69642174", "0.69642174", "0.6769559", "0.6719066", "0.6606375", "0.65863407", "0.6554781", "0.6460732", "0.63985324", "0.63945246", "0.637621", "0.6349493", "0.6334381", "0.62715507", "0.62715507", "0.62654847", "0.6264607", "0.6229607", "0.62264067", "0.6213406", "0.61948276", "0.616946", "0.61532646", "0.6135672" ]
0.9012755
0
Fire the 'udesign_page_title_top' action
function udesign_page_title_top() { do_action('udesign_page_title_top'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_head_top() {\r\n do_action('udesign_head_top');\r\n}", "function udesign_page_title_bottom() {\r\n do_action('udesign_page_title_bottom');\r\n}", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "function udesign_page_title_before() {\r\n do_action('udesign_page_title_before');\r\n}", "function udesign_page_title_after() {\r\n do_action('udesign_page_title_after');\r\n}", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "public function loadPageTitle()\n \t\t{\n echo \"<title>Add Item</title>\";\n }", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "function udesign_top_wrapper_top() {\r\n do_action('udesign_top_wrapper_top');\r\n}", "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "public function title(){\r\n\r\n echo ISSET($this->pageSettings->page_title)?$this->pageSettings->page_title:'';\r\n\r\n }", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "function udesign_main_content_top( $is_front_page ) {\r\n do_action('udesign_main_content_top', $is_front_page);\r\n}", "function display_title(){\n\techo \"Menu Page\";\n}", "function shoestrap_empty_page_title() {}", "protected function renderPageTitle() {}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "public function topAction()\n {\n $this->view->title = 'FENS様検索エンジン管理システム|FENS';\n $this->render();\n }", "function set_title() {\n \tglobal $pageTitle;\n \tif (isset($pageTitle))\n \t\techo 'Tanqeeb | ' . $pageTitle;\n \telse\n \t\techo 'Tanqeeb';\n}", "protected function setPageTitle() {\r\n\t\t$pageTitleText = (empty($this->settings['news']['semantic']['general']['pageTitle']['useAlternate'])) ? $this->newsItem->getTitle() : $this->newsItem->getAlternativeTitle();\r\n\t\t$pageTitleAction = $this->settings['news']['semantic']['general']['pageTitle']['action'];\r\n\r\n\t\tif (!empty($pageTitleAction)) {\r\n\t\t\tswitch ($pageTitleAction) {\r\n\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t$pageTitleText .= ': ' . $GLOBALS['TSFE']->page['title'];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'append':\r\n\t\t\t\t\t$pageTitleText = $GLOBALS['TSFE']->page['title'] . ': ' . $pageTitleText;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t}\r\n\t\t\t$this->pageTitle = html_entity_decode($pageTitleText, ENT_QUOTES, \"UTF-8\");\r\n\t\t\t$GLOBALS['TSFE']->page['title'] = $this->pageTitle;\r\n\t\t\t$GLOBALS['TSFE']->indexedDocTitle = $this->pageTitle;\r\n\t\t}\r\n\t}", "protected function page_title() {\n?>\n\t\t<h2>\n\t\t\t<?php echo __( 'Marketplace Add-ons', APP_TD ); ?>\n\t\t\t<a href=\"https://marketplace.appthemes.com/\" class=\"add-new-h2\"><?php _e( 'Browse Marketplace', APP_TD ); ?></a>\n\t\t\t<a href=\"https://www.appthemes.com/themes/\" class=\"add-new-h2\"><?php _e( 'Browse Themes', APP_TD ); ?></a>\n\t\t</h2>\n<?php\n\t}", "function udesign_sidebar_top() {\r\n do_action('udesign_sidebar_top');\r\n}", "public function before_the_title() {\n\t\techo '<div class=\"fusion-events-before-title\">';\n\t}", "function udesign_single_portfolio_entry_top() {\r\n do_action('udesign_single_portfolio_entry_top');\r\n}", "public function topAction();", "public function setPageTitle($title);", "abstract public function getActionTitle();", "function show_title()\r\n{\r\n\tglobal $WebPagesList,$CurrentActivePage;\r\n\techo getTitle( $CurrentActivePage );\r\n}" ]
[ "0.78135806", "0.76983637", "0.76793116", "0.75573504", "0.74654937", "0.7445474", "0.7378245", "0.7303961", "0.7147379", "0.7002678", "0.6861282", "0.68500674", "0.68228817", "0.6772535", "0.67481756", "0.6684495", "0.66835374", "0.666028", "0.66255224", "0.65805703", "0.6521507", "0.6520689", "0.65197253", "0.6511025", "0.6509709", "0.6509448", "0.6496339", "0.6469244", "0.6429864", "0.6426574" ]
0.89890474
0
Fire the 'udesign_page_title_bottom' action.
function udesign_page_title_bottom() { do_action('udesign_page_title_bottom'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_page_title_after() {\r\n do_action('udesign_page_title_after');\r\n}", "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "function udesign_body_bottom() {\r\n do_action('udesign_body_bottom');\r\n}", "function udesign_main_content_bottom() {\r\n do_action('udesign_main_content_bottom');\r\n}", "function udesign_entry_bottom() {\r\n do_action('udesign_entry_bottom');\r\n}", "function udesign_page_title_top() {\r\n do_action('udesign_page_title_top');\r\n}", "function udesign_bottom_section_bottom() {\r\n do_action('udesign_bottom_section_bottom');\r\n}", "function udesign_blog_entry_bottom() {\r\n do_action('udesign_blog_entry_bottom');\r\n}", "function udesign_single_post_entry_bottom() {\r\n do_action('udesign_single_post_entry_bottom');\r\n}", "function udesign_sidebar_bottom() {\r\n do_action('udesign_sidebar_bottom');\r\n}", "public function after_the_title() {\n\t\techo '</div>';\n\t}", "function udesign_single_portfolio_entry_bottom() {\r\n do_action('udesign_single_portfolio_entry_bottom');\r\n}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "public function loadPageTitle()\n \t\t{\n echo \"<title>Add Item</title>\";\n }", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "protected function regeneratePageTitle() {}", "function udesign_footer_after() {\r\n do_action('udesign_footer_after');\r\n}", "protected function renderPageTitle() {}", "function udesign_page_title_before() {\r\n do_action('udesign_page_title_before');\r\n}", "function quasar_after_header_title_hook(){\n\t//Do Nothing\n}", "function edit_form_after_title()\n {\n }", "function edit_form_after_title()\n {\n }", "public function on_admin_footer() {\n\t\tif ( $this->is_on_our_own_pages() ) {\n\t\t\t/**\n\t\t\t * Similar to action WordPress action `admin_footer`,\n\t\t\t * but only fired from pages with Simple History.\n\t\t\t *\n\t\t\t * @param Simple_History $instance This class.\n\t\t\t */\n\t\t\tdo_action( 'simple_history/admin_footer', $this );\n\t\t}\n\t}", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "public function titleCallback() {\r\n return [\r\n '#markup' => $this->t('The title of this page is dynamically changed by the title callback for this route defined in menu_example.routing.yml.'),\r\n ];\r\n }", "function udesign_top_wrapper_bottom( $is_front_page ) {\r\n do_action('udesign_top_wrapper_bottom', $is_front_page);\r\n}", "protected function page_title() {\n?>\n\t\t<h2>\n\t\t\t<?php echo __( 'Marketplace Add-ons', APP_TD ); ?>\n\t\t\t<a href=\"https://marketplace.appthemes.com/\" class=\"add-new-h2\"><?php _e( 'Browse Marketplace', APP_TD ); ?></a>\n\t\t\t<a href=\"https://www.appthemes.com/themes/\" class=\"add-new-h2\"><?php _e( 'Browse Themes', APP_TD ); ?></a>\n\t\t</h2>\n<?php\n\t}", "function shoestrap_empty_page_title() {}", "protected function output_page_title( $page_title = '' ) {\n?>\n\t\t<h2>\n\t\t\t<?php echo $this->browser_args['page_title']; ?>\n\n\t\t\t<?php if ( ! empty( $this->browser_args['header_buttons'] ) && is_array( $this->browser_args['header_buttons'] ) ) foreach( $this->browser_args['header_buttons'] as $tab ): ?>\n\t\t\t\t<a href=\"<?php echo esc_url( $tab['url'] ); ?>\" class=\"add-new-h2\" target=\"_blank\" rel=\"nofollow\"><?php echo $tab['title']; ?></a>\n\t\t\t<?php endforeach; ?>\n\t\t</h2>\n<?php\n\t}" ]
[ "0.78358793", "0.74838114", "0.7478203", "0.71659416", "0.71385676", "0.7120296", "0.7039567", "0.6969772", "0.6701845", "0.65988815", "0.64170486", "0.6400653", "0.63894826", "0.62755823", "0.6186888", "0.6180236", "0.6091456", "0.6012703", "0.5950118", "0.5944292", "0.59333014", "0.5896643", "0.5896643", "0.5891994", "0.58525467", "0.58350515", "0.58230907", "0.58169264", "0.57975394", "0.57174504" ]
0.8938264
0
( hook ) Fire the 'udesign_main_content_top' action Passes as an argument (boolean) whether the current page is front page or not
function udesign_main_content_top( $is_front_page ) { do_action('udesign_main_content_top', $is_front_page); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function udesign_top_elements_inside( $is_front_page ) {\r\n do_action('udesign_top_elements_inside', $is_front_page);\r\n}", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "function udesign_head_top() {\r\n do_action('udesign_head_top');\r\n}", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "function udesign_page_title_top() {\r\n do_action('udesign_page_title_top');\r\n}", "function udesign_top_wrapper_bottom( $is_front_page ) {\r\n do_action('udesign_top_wrapper_bottom', $is_front_page);\r\n}", "function udesign_top_wrapper_top() {\r\n do_action('udesign_top_wrapper_top');\r\n}", "public function is_front_page()\n {\n }", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "function udesign_home_page_content_before() {\r\n do_action('udesign_home_page_content_before');\r\n}", "function udesign_top_wrapper_after( $is_front_page ) {\r\n do_action('udesign_top_wrapper_after', $is_front_page);\r\n}", "function udesign_sidebar_top() {\r\n do_action('udesign_sidebar_top');\r\n}", "function udesign_top_wrapper_before() {\r\n do_action('udesign_top_wrapper_before');\r\n}", "public function is_on_frontpage() {\n return ($this->page->pagelayout == 'frontpage');\n }", "public function hookTop(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'_scroll.tpl');\n }", "function udesign_page_content_before() {\r\n do_action('udesign_page_content_before');\r\n}", "function udesign_single_portfolio_entry_top() {\r\n do_action('udesign_single_portfolio_entry_top');\r\n}", "function udesign_blog_post_top_area_inside() {\r\n do_action('udesign_blog_post_top_area_inside');\r\n}", "public static function process_content_top($p_catdata)\n {\n if (isys_maintenance_dao::instance(isys_application::instance()->database)->is_in_maintenance($p_catdata['isys_obj__id']))\n {\n global $index_includes;\n\n $index_includes['contenttopobjectdetail'][] = __DIR__ . '/templates/contenttop/main_objectdetail.tpl';\n } // if\n }", "function msdlab_hero(){\n if(is_active_sidebar('homepage-top')){\n print '<div id=\"hp-top\">';\n dynamic_sidebar('homepage-top');\n print '</div>';\n } \n}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "function cera_grimlock_homepage_before_content() {\n\t\t?>\n\t\t<?php if ( is_active_sidebar( 'before-content-1' ) ) : ?>\n\t\t\t<div id=\"before_content\" class=\"before_content site-before-content\"><?php cera_grimlock_widget_area( 'before-content-1' ); ?></div>\n\t\t<?php endif; ?>\n\n\t\t<div id=\"content\" tabindex=\"-1\">\n\t\t<?php\n\t}", "function au_load_frontpage() {\n\n}", "public function enableTopPageUpdate(): void\n {\n $this->topPageUpdate = true;\n }", "public function scroll_to_top() {\n\t\t$hestia_enable_scroll_to_top = get_theme_mod( 'hestia_enable_scroll_to_top', apply_filters( 'hestia_scroll_to_top_default', 0 ) );\n\t\tif ( (bool) $hestia_enable_scroll_to_top === false ) {\n\t\t\treturn;\n\t\t}\n\t\t?>\n\t\t<button class=\"hestia-scroll-to-top\">\n\t\t\t<i class=\"fas fa-angle-double-up\" aria-hidden=\"true\"></i>\n\t\t</button>\n\t\t<?php\n\t}", "public function _top_nav_link()\n\t{\n\t\t$top_nav = Event::$data;\n\t\t\n\t\t//fetch flickrwijit settings from db\n\t\t$flickrwijit_settings = ORM::factory('flickrwijit',1);\n\t\t\n\t\tif($flickrwijit_settings->block_position == 1 ) {\n\t\t\n\t\t\techo ($top_nav == \"flickrwijit\") ? \n\t\t\t\tKohana::lang('flickrwijit.flickrwijit_top_nav') : \n\t\t\t\t\"<a href=\\\"\".url::site().\"flickrwijit\\\">\".\n\t\t\t\tKohana::lang('flickrwijit.flickrwijit_top_nav').\"</a>\";\n\t\n\t\t}\n\t}", "public function topAction();" ]
[ "0.7839163", "0.77681947", "0.75114113", "0.7027188", "0.6984985", "0.69272333", "0.691756", "0.68694353", "0.6845201", "0.6813935", "0.67169946", "0.6708233", "0.6696106", "0.66539776", "0.65928996", "0.6587357", "0.6554375", "0.6469365", "0.6391982", "0.6358143", "0.6321321", "0.62557065", "0.6211675", "0.61578065", "0.6145145", "0.6127393", "0.61141723", "0.6012782", "0.59951824", "0.59903234" ]
0.8671588
0
Fire the 'udesign_main_content_bottom' action.
function udesign_main_content_bottom() { do_action('udesign_main_content_bottom'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "function udesign_body_bottom() {\r\n do_action('udesign_body_bottom');\r\n}", "function udesign_entry_bottom() {\r\n do_action('udesign_entry_bottom');\r\n}", "function udesign_sidebar_bottom() {\r\n do_action('udesign_sidebar_bottom');\r\n}", "function udesign_bottom_section_bottom() {\r\n do_action('udesign_bottom_section_bottom');\r\n}", "function udesign_blog_entry_bottom() {\r\n do_action('udesign_blog_entry_bottom');\r\n}", "function udesign_single_post_entry_bottom() {\r\n do_action('udesign_single_post_entry_bottom');\r\n}", "function udesign_page_title_bottom() {\r\n do_action('udesign_page_title_bottom');\r\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "function udesign_single_portfolio_entry_bottom() {\r\n do_action('udesign_single_portfolio_entry_bottom');\r\n}", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "function udesign_footer_after() {\r\n do_action('udesign_footer_after');\r\n}", "function bethel_do_footer_bottom() {\n\tgenesis_widget_area ('footer-bottom', array ('before' => '<div id=\"bethel-header-right-bottom\">', 'after' => '</div>'));\n}", "function udesign_top_wrapper_bottom( $is_front_page ) {\r\n do_action('udesign_top_wrapper_bottom', $is_front_page);\r\n}", "function udesign_footer_inside() {\r\n do_action('udesign_footer_inside');\r\n}", "public function after_main_content() {\n\t?>\n\n\t\t\t</div><!-- #bbp-content -->\n\t\t</div><!-- #bbp-container -->\n\n\t<?php\n\t}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "public function executeFooterPanel()\n {\n }", "public function atBottom() {\n }", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "public function on_admin_footer() {\n\t\tif ( $this->is_on_our_own_pages() ) {\n\t\t\t/**\n\t\t\t * Similar to action WordPress action `admin_footer`,\n\t\t\t * but only fired from pages with Simple History.\n\t\t\t *\n\t\t\t * @param Simple_History $instance This class.\n\t\t\t */\n\t\t\tdo_action( 'simple_history/admin_footer', $this );\n\t\t}\n\t}", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function cera_grimlock_homepage_after_content() {\n\t\t?>\n\t\t</div><!-- #content -->\n\t\t<?php if ( is_active_sidebar( 'after-content-1' ) ) : ?>\n\t\t\t<div id=\"after_content\" class=\"after_content site-after-content d-print-none\"><?php cera_grimlock_widget_area( 'after-content-1' ); ?></div>\n\t\t<?php endif;\n\t}", "function poco_after_content() {\n echo <<<HTML\n\t</main><!-- #main -->\n</div><!-- #primary -->\nHTML;\n\n do_action('poco_sidebar');\n }", "function client_portal_move_yoast_to_bottom() {\n\t\treturn 'low';\n\t}", "public static function show_box_bottom() {\n require Config::get('prefix') . '/templates/show_box_bottom.inc.php';\n }", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "function udesign_top_wrapper_after( $is_front_page ) {\r\n do_action('udesign_top_wrapper_after', $is_front_page);\r\n}", "function footer() {\n\t\t?>\n\t\t<div data-role=\"footer\" data-position=\"fixed\" style=\"bottom: 0px;\">\n\t\t\t<p align=\"center\">by Matti Maier Internet Solutions</p>\n\t\t</div>\n\t\t<?php\n\t}", "function anva_content_after_default() {\n\t?>\n\t</div><!-- .sidebar-layout (end) -->\n\t<?php\n}" ]
[ "0.8759169", "0.82200325", "0.80529714", "0.78508437", "0.78329015", "0.7787312", "0.77138215", "0.73064107", "0.7303051", "0.72992474", "0.7039907", "0.7021415", "0.68799204", "0.6825214", "0.6743219", "0.6741527", "0.67282516", "0.644674", "0.6420007", "0.635424", "0.62262833", "0.6212615", "0.61887646", "0.6159295", "0.6127997", "0.6121672", "0.5993689", "0.5978041", "0.59687126", "0.5962004" ]
0.90276337
0
( hooks ) Fire the 'udesign_entry_before' action
function udesign_entry_before() { do_action('udesign_entry_before'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_single_post_entry_before() {\r\n do_action('udesign_single_post_entry_before');\r\n}", "function udesign_blog_entry_before() {\r\n do_action('udesign_blog_entry_before');\r\n}", "function udesign_single_portfolio_entry_before() {\r\n do_action('udesign_single_portfolio_entry_before');\r\n}", "function udesign_page_content_before() {\r\n do_action('udesign_page_content_before');\r\n}", "function udesign_html_before() {\r\n do_action('udesign_html_before');\r\n}", "function udesign_blog_post_content_before() {\r\n do_action('udesign_blog_post_content_before');\r\n}", "function udesign_entry_after() {\r\n do_action('udesign_entry_after');\r\n}", "public function pre_action()\n\t{\n\t\tparent::pre_action();\n\t}", "function udesign_home_page_content_before() {\r\n do_action('udesign_home_page_content_before');\r\n}", "function onBeforeEdit() {\n\t\treturn true;\n\t}", "function OnBeforeEdit(){\n }", "function beforeRender()\n\t{\n\t}", "function BeforeAdd(&$values, &$message, $inline, &$pageObject)\n{\n\n\t\t\t// we capture the organisation id of the user that created this record.\n\n\t $values['created_by_id'] = $_SESSION['organization_logged_in_user'];\n\n\t// When was the record created?\n\n\t\t$values['syst_created_datetime'] = NOW() ;\n\n\t// What is the system that we use to updat this record:\n\n\t\t$values['creation_system_id'] = 'Unee-T Enterprise portal';\n\n\t// What is the creation method\n\n\t\t$values['creation_method'] = 'Super Admin - Manage Organization';\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n\nreturn true;\n;\t\t\n}", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "protected function executePreRenderHook() {}", "function udesign_page_title_before() {\r\n do_action('udesign_page_title_before');\r\n}", "protected function onBeforeRender() : void\n {\n }", "function udesign_top_wrapper_before() {\r\n do_action('udesign_top_wrapper_before');\r\n}", "public function onBeforeSaveEntry(SproutForms_OnBeforeSaveEntryEvent $event)\n\t{\n\t\t$this->raiseEvent('onBeforeSaveEntry', $event);\n\t}", "function beforeRender(){\n\t\t$this->recordActivity();\n\t}", "public function before_render() {}", "function udesign_single_post_entry_after() {\r\n do_action('udesign_single_post_entry_after');\r\n}", "function udesign_blog_entry_after() {\r\n do_action('udesign_blog_entry_after');\r\n}", "function preProcess()\n {\t\n parent::preProcess( );\n\t\t \n\t}", "function OnBeforeAdd(){\n }", "public function beforeRender() {\r\n\t}", "public function onLoad() {\nglobal $_LW;\nif ($_LW->page=='events_edit' || $_LW->page=='events_sub_edit') { // if on the events editor page\n\t//$_LW->REGISTERED_CSS[]='/path/to/custom/stylesheet.css'; // load in some custom CSS for styling the new field (optional)\n\t$_LW->ENV->input_filter['events_edit']['sample_textarea']=['tags'=>'*', 'wysiwyg'=>1]; // configure the input filter to present the textarea custom field as a WYSIWYG field (omit this line entirely for no HTML allowed, or change \"wysiwyg\" to \"wysiwyg_limited\" for the limited set of toolbar options)\n};\n}", "function udesign_footer_before() {\r\n do_action('udesign_footer_before');\r\n}", "protected function runBeforeRender() {\n\t\t// Empty default implementation. Should be implemented by descendant classes if needed\n\t}", "function BeforeEdit(&$values, $where, &$oldvalues, &$keys, &$message, $inline, &$pageObject)\n{\n\n\t\t// We need to get ID of the organization associated with this user\n\n\t\t$values['updated_by_id'] = $_SESSION['organizationLoggedInUser'];\n\n\t// When was the record created?\n\n\t\t$values['syst_updated_datetime'] = NOW() ;\n\n\t// What is the system that we use to updat this record:\n // This should be an INT (default is 1 (unknown)\n\n\t\t$values['update_system_id'] = 'Unee-T Enterprise Portal' ;\n\n\t// What is the creation method\n\n\t\t$values['update_method'] = 'Super Admin - Manage Organization';\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n\nreturn true;\n;\t\t\n}" ]
[ "0.830438", "0.81201035", "0.7293722", "0.7201352", "0.7180373", "0.69007564", "0.68799484", "0.681099", "0.67235494", "0.66367793", "0.65531677", "0.644583", "0.6415001", "0.63719857", "0.6354777", "0.63356036", "0.6325173", "0.630341", "0.62902796", "0.62805057", "0.62431484", "0.62416327", "0.6215234", "0.62063396", "0.6173518", "0.6146464", "0.61452836", "0.61362106", "0.61313206", "0.6098668" ]
0.88247716
0
Fire the 'udesign_entry_after' action.
function udesign_entry_after() { do_action('udesign_entry_after'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_single_post_entry_after() {\r\n do_action('udesign_single_post_entry_after');\r\n}", "function udesign_blog_entry_after() {\r\n do_action('udesign_blog_entry_after');\r\n}", "function udesign_entry_bottom() {\r\n do_action('udesign_entry_bottom');\r\n}", "function udesign_single_portfolio_entry_after() {\r\n do_action('udesign_single_portfolio_entry_after');\r\n}", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "function udesign_footer_after() {\r\n do_action('udesign_footer_after');\r\n}", "function udesign_single_post_entry_bottom() {\r\n do_action('udesign_single_post_entry_bottom');\r\n}", "function udesign_blog_entry_bottom() {\r\n do_action('udesign_blog_entry_bottom');\r\n}", "function AfterAdd(&$values, &$keys, $inline, &$pageObject)\n{\n\n\t\t\n\t// We update the values that allow us to find the MEFE master user for this organization\n\n\t\t// what was the ID of the last inserted record?\n\n\t\t\t$rs_organization_id = $values['id_organization'];\n\t\t\n\t\t// We update the value\n\n\t\t\t$table_name = 'uneet_enterprise_organizations' ;\n\n\t\t\t$data = array();\n\t\t\t\t$data[\"mefe_master_user_external_person_id\"] = (0 . '-' . $rs_organization_id) ;\n\t\t\t\t$data[\"mefe_master_user_external_person_system\"] = 'Setup' ;\n\t\t\t\t$data[\"mefe_master_user_external_person_table\"] = 'Setup' ;\n\t\t\t$keyvalues = array();\n\t\t\t\t$keyvalues[\"id_organization\"] = $rs_organization_id;\n\n\t\t\t// Command to do the update\n\t\t\t\t\n\t\t\t\tDB::Update($table_name, $data, $keyvalues);\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}", "protected function callAfterEditEvent()\n\t{\n\t\tif( !$this->eventsObject->exists(\"AfterEdit\") )\n\t\t\treturn;\n\n\t\t$this->eventsObject->AfterEdit( $this->newRecordData,\n\t\t\t$this->getWhereClause( false ),\n\t\t\t$this->getOldRecordData(),\n\t\t\t$this->keys,\n\t\t\t$this->mode == EDIT_INLINE,\n\t\t\t$this );\n\t}", "function OnAfterEdit(){\n }", "public function after_insert() {}", "function udesign_page_title_after() {\r\n do_action('udesign_page_title_after');\r\n}", "function udesign_entry_before() {\r\n do_action('udesign_entry_before');\r\n}", "function wp_after_insert_post($post, $update, $post_before)\n {\n }", "protected function afterAdd() {\n\t}", "function after_update() {}", "function udesign_single_portfolio_entry_bottom() {\r\n do_action('udesign_single_portfolio_entry_bottom');\r\n}", "protected function afterAction () {\n\t}", "public function postEventedit();", "public function after_update() {}", "function afterAction()\n {\n }", "protected function _after()\n\t{\n\t\t\n\t}", "protected function _after()\n\t{\n\t\t\n\t}", "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "function udesign_front_page_slider_after() {\r\n do_action('udesign_front_page_slider_after');\r\n}", "public function onAfterStructure() {\n $this->events->fire('updateModel_afterStructure', $this);\n }", "function udesign_main_content_bottom() {\r\n do_action('udesign_main_content_bottom');\r\n}", "protected function afterInsert()\n {\n }", "public function after()\n {\n parent::after();\n }" ]
[ "0.819294", "0.79817593", "0.7218366", "0.71876913", "0.71377593", "0.6890865", "0.6555391", "0.65274876", "0.6511472", "0.64539367", "0.6419452", "0.63655865", "0.6307575", "0.6274748", "0.6002762", "0.5992752", "0.59811294", "0.5958119", "0.59212023", "0.5906495", "0.58772874", "0.586432", "0.58490974", "0.58490974", "0.5848926", "0.5806827", "0.5802647", "0.5793115", "0.57853884", "0.5770616" ]
0.88593745
0
Fire the 'udesign_entry_top' action
function udesign_entry_top() { do_action('udesign_entry_top'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "function udesign_single_portfolio_entry_top() {\r\n do_action('udesign_single_portfolio_entry_top');\r\n}", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "function udesign_head_top() {\r\n do_action('udesign_head_top');\r\n}", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "function udesign_top_wrapper_top() {\r\n do_action('udesign_top_wrapper_top');\r\n}", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function udesign_page_title_top() {\r\n do_action('udesign_page_title_top');\r\n}", "public static function entries_top () \n {\n $html = null; \n\n load::view( 'admin/entries/top' );\n $html .= entries_top::form();\n \n return $html;\n }", "public function topAction();", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "function udesign_entry_bottom() {\r\n do_action('udesign_entry_bottom');\r\n}", "function udesign_sidebar_top() {\r\n do_action('udesign_sidebar_top');\r\n}", "public function hookTop(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'_scroll.tpl');\n }", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "public function topAction()\n {\n $this->view->title = 'FENS様検索エンジン管理システム|FENS';\n $this->render();\n }", "function udesign_main_content_top( $is_front_page ) {\r\n do_action('udesign_main_content_top', $is_front_page);\r\n}", "public function top_up()\n\t{\n\t\t$data['container'] = 'transaction/top_up_koptel';\n\t\t$this->load->view('core',$data);\n\t}", "function udesign_blog_post_top_area_inside() {\r\n do_action('udesign_blog_post_top_area_inside');\r\n}", "public function admin_theme_index_top($h)\n {\n /* get submit settings - so we can show or hide \"Submit\" in the Admin navigation bar. */\n $h->vars['submit_settings'] = $h->getSerializedSettings('submit');\n $h->vars['submission_closed'] = false;\n if (!$h->vars['submit_settings']['enabled']) { $h->vars['submission_closed'] = true; }\n }", "function udesign_blog_entry_bottom() {\r\n do_action('udesign_blog_entry_bottom');\r\n}", "function tpps_details_top_callback() {\n print(tpps_details_top());\n}", "function udesign_top_elements_inside( $is_front_page ) {\r\n do_action('udesign_top_elements_inside', $is_front_page);\r\n}", "function wlfw_mobile_top_bttn() {\n\techo '<a class=\"ui-btn-right\" id=\"top\">top</a>';\n}", "protected function updateTopPage(): void\n {\n if (!$this->topPageUpdate) {\n return;\n }\n\n /** @var SiteTreeExtension $extension */\n $extension = singleton(SiteTreeExtension::class);\n $extension->addDuplicatedObject($this->owner);\n }", "static public function insert_go_to_top_link() {\n\t\techo self::go_to_top_link();\n\t}", "function udesign_single_portfolio_entry_bottom() {\r\n do_action('udesign_single_portfolio_entry_bottom');\r\n}", "function udesign_top_wrapper_before() {\r\n do_action('udesign_top_wrapper_before');\r\n}", "public function show(TopUp $topUp)\n {\n //\n }" ]
[ "0.820809", "0.8067655", "0.76879454", "0.73664266", "0.73605764", "0.7217337", "0.7199677", "0.7037212", "0.6857956", "0.68319243", "0.6829256", "0.67758614", "0.67172766", "0.6674552", "0.65591806", "0.6491726", "0.6446902", "0.6397609", "0.6169811", "0.6120655", "0.6024314", "0.5974524", "0.5957267", "0.5877381", "0.5864052", "0.5862107", "0.5843238", "0.5782546", "0.57734543", "0.57701993" ]
0.879699
0
Fire the 'udesign_entry_bottom' action.
function udesign_entry_bottom() { do_action('udesign_entry_bottom'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_single_post_entry_bottom() {\r\n do_action('udesign_single_post_entry_bottom');\r\n}", "function udesign_blog_entry_bottom() {\r\n do_action('udesign_blog_entry_bottom');\r\n}", "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "function udesign_main_content_bottom() {\r\n do_action('udesign_main_content_bottom');\r\n}", "function udesign_body_bottom() {\r\n do_action('udesign_body_bottom');\r\n}", "function udesign_single_portfolio_entry_bottom() {\r\n do_action('udesign_single_portfolio_entry_bottom');\r\n}", "function udesign_bottom_section_bottom() {\r\n do_action('udesign_bottom_section_bottom');\r\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "function udesign_sidebar_bottom() {\r\n do_action('udesign_sidebar_bottom');\r\n}", "function udesign_page_title_bottom() {\r\n do_action('udesign_page_title_bottom');\r\n}", "function udesign_entry_after() {\r\n do_action('udesign_entry_after');\r\n}", "function udesign_single_post_entry_after() {\r\n do_action('udesign_single_post_entry_after');\r\n}", "function udesign_footer_after() {\r\n do_action('udesign_footer_after');\r\n}", "function bethel_do_footer_bottom() {\n\tgenesis_widget_area ('footer-bottom', array ('before' => '<div id=\"bethel-header-right-bottom\">', 'after' => '</div>'));\n}", "public function atBottom() {\n }", "function udesign_blog_entry_after() {\r\n do_action('udesign_blog_entry_after');\r\n}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "function udesign_footer_inside() {\r\n do_action('udesign_footer_inside');\r\n}", "function client_portal_move_yoast_to_bottom() {\n\t\treturn 'low';\n\t}", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "function udesign_top_wrapper_bottom( $is_front_page ) {\r\n do_action('udesign_top_wrapper_bottom', $is_front_page);\r\n}", "public function on_admin_footer() {\n\t\tif ( $this->is_on_our_own_pages() ) {\n\t\t\t/**\n\t\t\t * Similar to action WordPress action `admin_footer`,\n\t\t\t * but only fired from pages with Simple History.\n\t\t\t *\n\t\t\t * @param Simple_History $instance This class.\n\t\t\t */\n\t\t\tdo_action( 'simple_history/admin_footer', $this );\n\t\t}\n\t}", "public function executeFooterPanel()\n {\n }", "public static function show_box_bottom() {\n require Config::get('prefix') . '/templates/show_box_bottom.inc.php';\n }", "function\ttableFoot() {\n\n\t\t/**\n\t\t *\n\t\t */\n\t\t$frm\t=\t$this->myDoc->currMasterPage->getFrameByFlowName( \"Auto\") ;\n\t\tif ( $this->myDoc->pageNr >= 1) {\n\t\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTFooterCT) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\t\tif ( $actRow->isEnabled()) {\n\t\t\t\t\t$this->punchTableRow( $actRow) ;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$frm->currVerPos\t+=\t1.5 ;\t\t// now add the height of everything we have output'\n\t\t}\n\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTFooterPE) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\t$this->punchTableRow( $actRow) ;\n\t\t}\n\t\t$frm->currVerPos\t+=\t1.5 ;\t\t// now add the height of everythign we have output'\n\t}", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "function cera_grimlock_footer() {\n\t\tdo_action( 'grimlock_prefooter', array(\n\t\t\t'callback' => 'cera_grimlock_prefooter_callback',\n\t\t) );\n\n\t\tdo_action( 'grimlock_footer', array(\n\t\t\t'callback' => 'cera_grimlock_footer_callback',\n\t\t) );\n\t}", "protected function makeAfterInfo()\n {\n $this->setY($this->getY() + $this->layout['entriesPaddingBottom']);\n $this->renderInfo($this->content['afterInfo'] ?? []);\n }", "function omega_entry_footer() {\n\n\tif ( 'post' == get_post_type() ) {\n\t\tget_template_part( 'partials/entry', 'footer' ); \n\t} \n\n\tif(is_singular()) {\n\t\techo omega_apply_atomic_shortcode( 'entry_meta', '<div class=\"entry-meta\">[post_edit]</div>' );\n\t}\n\t\n}" ]
[ "0.8437111", "0.8120647", "0.7670899", "0.765665", "0.75589436", "0.7495404", "0.74650294", "0.6954642", "0.6946316", "0.67961884", "0.6761899", "0.651288", "0.6460646", "0.63968134", "0.63823813", "0.6269886", "0.62689865", "0.59821945", "0.59409827", "0.58351314", "0.5776558", "0.5773541", "0.57605207", "0.5687623", "0.5682699", "0.5674193", "0.55733836", "0.5539161", "0.5525591", "0.5497897" ]
0.8851049
0
( blog posts hooks ) Fire the 'udesign_blog_entry_before' action
function udesign_blog_entry_before() { do_action('udesign_blog_entry_before'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_single_post_entry_before() {\r\n do_action('udesign_single_post_entry_before');\r\n}", "function udesign_blog_post_content_before() {\r\n do_action('udesign_blog_post_content_before');\r\n}", "function udesign_entry_before() {\r\n do_action('udesign_entry_before');\r\n}", "function udesign_single_portfolio_entry_before() {\r\n do_action('udesign_single_portfolio_entry_before');\r\n}", "function udesign_blog_entry_after() {\r\n do_action('udesign_blog_entry_after');\r\n}", "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "function udesign_page_content_before() {\r\n do_action('udesign_page_content_before');\r\n}", "function udesign_home_page_content_before() {\r\n do_action('udesign_home_page_content_before');\r\n}", "public function before(){\n //parent::before();\n $this->LastPosts();\n }", "function udesign_single_post_entry_after() {\r\n do_action('udesign_single_post_entry_after');\r\n}", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "public function hook_before_add(&$postdata) { \n\t //Your code here\n\n\t }", "public function hook_before_add(&$postdata) { \n\t //Your code here\n\n\t }", "public function addPostToBlogInTheMiddle() {}", "public function hook_before(&$postdata) {\n\n\t\t }", "public function pre_action()\n\t{\n\t\tparent::pre_action();\n\t}", "function wpbm_add_blog_callback( $post ){\n wp_nonce_field( basename( __FILE__ ), 'wpbm_blog_nonce' );\n include('inc/admin/wpbm-blog-meta.php');\n }", "function wp_after_insert_post($post, $update, $post_before)\n {\n }", "function udesign_entry_after() {\r\n do_action('udesign_entry_after');\r\n}", "public function attachPostToBlogAtTheEnd() {}", "function udesign_html_before() {\r\n do_action('udesign_html_before');\r\n}", "protected function _beforeObserver()\n\t{\n\t\t$helper = Mage::helper('wordpress');\n\t\t\n\t\t$this->_applyOpenGraph(array(\n\t\t\t'locale' => Mage::app()->getLocale()->getLocaleCode(),\n\t\t\t'type' => 'blog',\n\t\t\t'title' => $helper->getWpOption('blogname'),\n\t\t\t'description' => $helper->getWpOption('blogdescription'),\n\t\t\t'url' => $helper->getUrl(),\n\t\t\t'site_name' => $helper->getWpOption('blogname'),\n\t\t\t'article:publisher' => $this->getFacebookSite(),\n\t\t\t'image' => $this->getData('og_default_image'),\n\t\t\t'fb:app_id' => $this->getData('fbadminapp'),\n\t\t));\n\n\t\t$this->_addGooglePlusLinkRel();\n\t\t\n\t\treturn parent::_beforeObserver();\n\t}", "public function hook_before_add(&$postdata)\n\t{\n\t\t//Your code here\n\n\t}", "public function init() {\n \\add_action('acf/save_post', array($this, 'save_post'), 20);\n \\add_filter('acf/save_post' , array($this, 'pre_save_post'), 9, 1 );\n\n }", "function udesign_blog_entry_bottom() {\r\n do_action('udesign_blog_entry_bottom');\r\n}", "public function hook() {\n add_filter('pre_get_document_title', [$this, 'getTitle'], 10);\n add_filter('wp_head', [$this, 'outputMetaDescription'], 1);\n add_filter('wp_head', [$this, 'ogTags'], 2 );\n }", "protected function setupPostContentFilter() {\n add_filter('the_title', array($this->getPostContentController(), 'modifyPostTitle'));\n add_filter('the_content', array($this->getPostContentController(), 'view'));\n add_filter('wp_footer', array($this->getPostContentController(), 'modifyFooter'));\n add_action('save_post', array($this->getPostContentController(), 'initTeaserContent'), 10, 2);\n add_action('edit_form_after_editor', array($this->getPostContentController(), 'initTeaserContent'), 10, 2);\n }", "static function on_td_wp_booster_after_header() {\r\n $page_id = get_queried_object_id();\r\n\r\n if (is_page()) {\r\n\r\n\t // previous meta\r\n\t //$td_unique_articles = get_post_meta($page_id, 'td_unique_articles', true);\r\n\r\n\t $meta_key = 'td_page';\r\n\t $td_page_template = get_post_meta($page_id, '_wp_page_template', true);\r\n\t if (!empty($td_page_template) && ($td_page_template == 'page-pagebuilder-latest.php')) {\r\n\t\t $meta_key = 'td_homepage_loop';\r\n\r\n\t }\r\n\r\n\t $td_unique_articles = get_post_meta($page_id, $meta_key, true);\r\n\t if (!empty($td_unique_articles['td_unique_articles'])) {\r\n\t\t self::$keep_rendered_posts_ids = true; //for new module hook\r\n\t\t self::$unique_articles_enabled = true; //for datasource\r\n\t }\r\n }\r\n if (td_util::get_option('tds_ajax_post_view_count') == 'enabled') {\r\n self::$keep_rendered_posts_ids = true;\r\n }\r\n }", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "protected function executePreRenderHook() {}" ]
[ "0.82370955", "0.79600835", "0.79215306", "0.7204305", "0.71992636", "0.6844554", "0.68258905", "0.66410553", "0.659147", "0.65440416", "0.64519066", "0.64009196", "0.64009196", "0.63768405", "0.63700885", "0.6352558", "0.6339058", "0.6295508", "0.6235573", "0.62117225", "0.6198304", "0.614799", "0.61430645", "0.61039156", "0.60721266", "0.6041615", "0.6040338", "0.60257506", "0.5992678", "0.598651" ]
0.8750873
0
Fire the 'udesign_blog_entry_after' action.
function udesign_blog_entry_after() { do_action('udesign_blog_entry_after'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_single_post_entry_after() {\r\n do_action('udesign_single_post_entry_after');\r\n}", "function udesign_entry_after() {\r\n do_action('udesign_entry_after');\r\n}", "function udesign_blog_entry_bottom() {\r\n do_action('udesign_blog_entry_bottom');\r\n}", "function udesign_single_portfolio_entry_after() {\r\n do_action('udesign_single_portfolio_entry_after');\r\n}", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "function udesign_single_post_entry_bottom() {\r\n do_action('udesign_single_post_entry_bottom');\r\n}", "function udesign_entry_bottom() {\r\n do_action('udesign_entry_bottom');\r\n}", "public function attachPostToBlogAtTheEnd() {}", "function udesign_footer_after() {\r\n do_action('udesign_footer_after');\r\n}", "function wp_after_insert_post($post, $update, $post_before)\n {\n }", "public function after_main_content() {\n\t?>\n\n\t\t\t</div><!-- #bbp-content -->\n\t\t</div><!-- #bbp-container -->\n\n\t<?php\n\t}", "function udesign_blog_entry_before() {\r\n do_action('udesign_blog_entry_before');\r\n}", "function udesign_single_portfolio_entry_bottom() {\r\n do_action('udesign_single_portfolio_entry_bottom');\r\n}", "public function hook_after($postdata,&$result) {\n\n\t\t }", "public function hook_after($postdata,&$result) {\n\n\t\t }", "public function after_insert() {}", "function udesign_page_title_after() {\r\n do_action('udesign_page_title_after');\r\n}", "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "public function hook_after($postdata,&$result) {\n\t\t\t\n\t\t }", "public function addPostToBlogInTheMiddle() {}", "protected function afterAdd() {\n\t}", "protected function _after()\n\t{\n\t\t\n\t}", "protected function _after()\n\t{\n\t\t\n\t}", "function udesign_main_content_bottom() {\r\n do_action('udesign_main_content_bottom');\r\n}", "public function attachTagToPostAtTheEnd() {}", "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "function wpbm_add_blog_callback( $post ){\n wp_nonce_field( basename( __FILE__ ), 'wpbm_blog_nonce' );\n include('inc/admin/wpbm-blog-meta.php');\n }", "function udesign_single_post_entry_before() {\r\n do_action('udesign_single_post_entry_before');\r\n}", "public function after()\n\t{\n\t\tif ($this->request->action() == 'compose' OR $this->request->action() == 'edit')\n\t\t{\n\t\t\t// Add RichText Support\n\t\t\tAssets::editor('.textarea', I18n::$lang);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Tabs\n\t\t\t$this->_tabs = array(\n\t\t\t\tarray('link' => Route::get('user/message')->uri(array('action' =>'inbox')), 'text' => __('Inbox')),\n\t\t\t\tarray('link' => Route::get('user/message')->uri(array('action' =>'outbox')), 'text' => __('Sent Messages')),\n\t\t\t\tarray('link' => Route::get('user/message')->uri(array('action' =>'drafts')), 'text' => __('Drafts')),\n\t\t\t\tarray('link' => Route::get('user/message')->uri(array('action' =>'list')), 'text' => __('All Messages'))\n\t\t\t);\n\n\t\t\t// Disable sidebars on message pages except compose and edit\n\t\t\t$this->_sidebars = FALSE;\n\t\t}\n\n\t\tparent::after();\n\t}", "public function postEventadd();" ]
[ "0.82845813", "0.81993467", "0.757569", "0.72882247", "0.7064715", "0.7046118", "0.6934634", "0.68644786", "0.6751691", "0.6582989", "0.6441899", "0.6357419", "0.6316842", "0.6087286", "0.6087286", "0.60725", "0.60676396", "0.60392624", "0.6021082", "0.59871686", "0.59870577", "0.59693146", "0.59693146", "0.5964661", "0.59488124", "0.5917106", "0.5901075", "0.5867491", "0.58439445", "0.5843002" ]
0.88830674
0
Fire the 'udesign_blog_entry_top' action
function udesign_blog_entry_top() { do_action('udesign_blog_entry_top'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "function udesign_single_portfolio_entry_top() {\r\n do_action('udesign_single_portfolio_entry_top');\r\n}", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function udesign_head_top() {\r\n do_action('udesign_head_top');\r\n}", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "public function hookTop(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'_scroll.tpl');\n }", "function udesign_blog_entry_bottom() {\r\n do_action('udesign_blog_entry_bottom');\r\n}", "function udesign_top_wrapper_top() {\r\n do_action('udesign_top_wrapper_top');\r\n}", "function udesign_page_title_top() {\r\n do_action('udesign_page_title_top');\r\n}", "function udesign_blog_post_top_area_inside() {\r\n do_action('udesign_blog_post_top_area_inside');\r\n}", "function udesign_main_content_top( $is_front_page ) {\r\n do_action('udesign_main_content_top', $is_front_page);\r\n}", "public static function entries_top () \n {\n $html = null; \n\n load::view( 'admin/entries/top' );\n $html .= entries_top::form();\n \n return $html;\n }", "public function display_top_story() {\n\t\tif ( is_admin() || ! is_single() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$top_post = $this->get_newest_post();\n\t\t$top_author = get_userdata( $top_post->post_author );\n\t\t$cat = get_the_category( $top_post->ID )[0]->cat_name;\n\n\t\t// Get time stamp data and make sure termanology matches specs.\n\t\t$timestamp_time = human_time_diff( get_the_time( 'U', $top_post->ID ), current_time( 'timestamp' ) );\n\t\t$m_timestamp = str_replace( array( ' mins', ' min' ), 'm', $timestamp_time ) . ' ago';\n\t\t$timestamp = $timestamp_time . ' ago';\n\n\t\t// Search for min(s).\n\t\tif ( false !== strpos( $timestamp_time, 'min' ) ) {\n\t\t\t$timestamp = str_replace( 'min', 'minute', $timestamp_time ) . ' ago';\n\t\t} elseif ( false !== strpos( $timestamp_time, 'mins' ) ) {\n\t\t\t$timestamp = str_replace( 'mins', 'minutes', $timestamp_time ) . ' ago';\n\t\t}\n\n\t\tinclude_once( \"{$this->plugin->dir_path}/templates/top-story-box.php\" );\n\t}", "function udesign_sidebar_top() {\r\n do_action('udesign_sidebar_top');\r\n}", "function udesign_entry_bottom() {\r\n do_action('udesign_entry_bottom');\r\n}", "public function topAction();", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "function udesign_blog_entry_before() {\r\n do_action('udesign_blog_entry_before');\r\n}", "function udesign_single_post_entry_bottom() {\r\n do_action('udesign_single_post_entry_bottom');\r\n}", "public function admin_theme_index_top($h)\n {\n /* get submit settings - so we can show or hide \"Submit\" in the Admin navigation bar. */\n $h->vars['submit_settings'] = $h->getSerializedSettings('submit');\n $h->vars['submission_closed'] = false;\n if (!$h->vars['submit_settings']['enabled']) { $h->vars['submission_closed'] = true; }\n }", "function wsu_news_top_stories( $query ) {\n\tif ( is_home() && $query->is_main_query() )\n\t\t$query->set( 'category_name', 'top-stories' );\n\n}", "function udesign_single_portfolio_entry_bottom() {\r\n do_action('udesign_single_portfolio_entry_bottom');\r\n}", "public function latestAction() {\n\t\t$node = $this->getPluginNode();\n\t\t$postsSourceNode = $this->getPostsSourceNode($node);\n\n\t\t$this->view->assign('hasPostNodes', $postsSourceNode->hasChildNodes('M12.Plugin.Blog:Post'));\n\t\t$this->view->assign('postNodes', $postsSourceNode->getChildNodes('M12.Plugin.Blog:Post', $this->getPostsLimit($node)));\n\t}", "public function topAction()\n {\n $this->view->title = 'FENS様検索エンジン管理システム|FENS';\n $this->render();\n }", "function udesign_blog_entry_after() {\r\n do_action('udesign_blog_entry_after');\r\n}", "public static function process_content_top($p_catdata)\n {\n if (isys_maintenance_dao::instance(isys_application::instance()->database)->is_in_maintenance($p_catdata['isys_obj__id']))\n {\n global $index_includes;\n\n $index_includes['contenttopobjectdetail'][] = __DIR__ . '/templates/contenttop/main_objectdetail.tpl';\n } // if\n }", "function show_recent_entries()\n\t{\n\t\tif ( ! $this->cp->allowed_group('can_access_content'))\n\t\t{\n\t\t\tshow_error($this->lang->line('unauthorized_access'));\n\t\t}\n\n\t\t$this->load->library('table');\n\t\t$this->load->model('channel_entries_model');\n\t\t$this->lang->loadfile('homepage');\n\t\t\n\t\t$this->cp->set_variable('cp_page_title', $this->lang->line('most_recent_entries'));\n\t\t\n\t\t$count = $this->input->get('count');\n\t\t$vars = array('entries' => array());\n\t\t\n\t\t$query = $this->channel_entries_model->get_recent_entries($count);\n\t\t\n\t\tif ($query && $query->num_rows() > 0)\n\t\t{\n\t\t\t$result = $query->result();\n\t\t\tforeach($result as $row)\n\t\t\t{\n\t\t\t\t$c_link = BASE.AMP.'C=content_edit'.AMP.'M=view_comments'.AMP.'channel_id='.$row->channel_id.AMP.'entry_id='.$row->entry_id;\n\t\t\t\t$link = BASE.AMP.'C=content_publish'.AMP.'M=view_entry'.AMP.'channel_id='.$row->channel_id.AMP.'entry_id='.$row->entry_id;\n\t\t\t\t\n\t\t\t\tif (($row->author_id == $this->session->userdata('member_id')) OR $this->cp->allowed_group('can_edit_other_entries'))\n\t\t\t\t{\n\t\t\t\t\t$link = BASE.AMP.'C=content_publish'.AMP.'M=entry_form'.AMP.'channel_id='.$row->channel_id.AMP.'entry_id='.$row->entry_id;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$c_link = '<a href=\"'.$c_link.'\">'.$row->comment_total.'</a>';\n\t\t\t\t$link = '<a href=\"'.$link.'\">'.$row->title.'</a>';\n\t\t\t\t\n\t\t\t\t$vars['entries'][$link] = $c_link;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$vars['no_result'] = $this->lang->line('no_entries');\n\t\t$vars['left_column'] = $this->lang->line('most_recent_entries');\n\t\t$vars['right_column'] = $this->lang->line('comments');\n\t\t\n\t\t$this->javascript->compile();\n\t\t$this->load->view('content/recent_list', $vars);\n\t}" ]
[ "0.84102196", "0.8300021", "0.76991206", "0.726612", "0.70980996", "0.6945732", "0.6898064", "0.67531544", "0.6740176", "0.66632307", "0.66155434", "0.6583047", "0.65751576", "0.6465392", "0.64572394", "0.64342827", "0.63123715", "0.6169376", "0.6165046", "0.60979676", "0.60545087", "0.6005952", "0.5979714", "0.59353894", "0.59298766", "0.5927948", "0.58995926", "0.58775425", "0.5857943", "0.58472043" ]
0.87429607
0
Fire the 'udesign_blog_entry_bottom' action.
function udesign_blog_entry_bottom() { do_action('udesign_blog_entry_bottom'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_single_post_entry_bottom() {\r\n do_action('udesign_single_post_entry_bottom');\r\n}", "function udesign_entry_bottom() {\r\n do_action('udesign_entry_bottom');\r\n}", "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "function udesign_single_portfolio_entry_bottom() {\r\n do_action('udesign_single_portfolio_entry_bottom');\r\n}", "function udesign_main_content_bottom() {\r\n do_action('udesign_main_content_bottom');\r\n}", "function udesign_body_bottom() {\r\n do_action('udesign_body_bottom');\r\n}", "function udesign_blog_entry_after() {\r\n do_action('udesign_blog_entry_after');\r\n}", "function udesign_bottom_section_bottom() {\r\n do_action('udesign_bottom_section_bottom');\r\n}", "function udesign_sidebar_bottom() {\r\n do_action('udesign_sidebar_bottom');\r\n}", "function udesign_single_post_entry_after() {\r\n do_action('udesign_single_post_entry_after');\r\n}", "function udesign_page_title_bottom() {\r\n do_action('udesign_page_title_bottom');\r\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "function bethel_do_footer_bottom() {\n\tgenesis_widget_area ('footer-bottom', array ('before' => '<div id=\"bethel-header-right-bottom\">', 'after' => '</div>'));\n}", "function udesign_entry_after() {\r\n do_action('udesign_entry_after');\r\n}", "public function attachPostToBlogAtTheEnd() {}", "function udesign_footer_after() {\r\n do_action('udesign_footer_after');\r\n}", "public function atBottom() {\n }", "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "public function after_main_content() {\n\t?>\n\n\t\t\t</div><!-- #bbp-content -->\n\t\t</div><!-- #bbp-container -->\n\n\t<?php\n\t}", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "function udesign_top_wrapper_bottom( $is_front_page ) {\r\n do_action('udesign_top_wrapper_bottom', $is_front_page);\r\n}", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "function omega_entry_footer() {\n\n\tif ( 'post' == get_post_type() ) {\n\t\tget_template_part( 'partials/entry', 'footer' ); \n\t} \n\n\tif(is_singular()) {\n\t\techo omega_apply_atomic_shortcode( 'entry_meta', '<div class=\"entry-meta\">[post_edit]</div>' );\n\t}\n\t\n}", "function udesign_single_portfolio_entry_after() {\r\n do_action('udesign_single_portfolio_entry_after');\r\n}", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "public function on_admin_footer() {\n\t\tif ( $this->is_on_our_own_pages() ) {\n\t\t\t/**\n\t\t\t * Similar to action WordPress action `admin_footer`,\n\t\t\t * but only fired from pages with Simple History.\n\t\t\t *\n\t\t\t * @param Simple_History $instance This class.\n\t\t\t */\n\t\t\tdo_action( 'simple_history/admin_footer', $this );\n\t\t}\n\t}", "function client_portal_move_yoast_to_bottom() {\n\t\treturn 'low';\n\t}", "function cera_grimlock_after_posts() {\n\t\t?>\n\t\t</div><!-- #posts -->\n\t\t<?php\n\t}", "function udesign_footer_inside() {\r\n do_action('udesign_footer_inside');\r\n}" ]
[ "0.8690545", "0.8489524", "0.7752619", "0.7711886", "0.76684856", "0.7372129", "0.72723705", "0.70539904", "0.70030683", "0.6808834", "0.6735898", "0.66459316", "0.6577809", "0.65561754", "0.6462384", "0.6435488", "0.62886", "0.6232118", "0.5996262", "0.59915596", "0.596626", "0.5950205", "0.5868542", "0.58610344", "0.5816804", "0.581215", "0.57982373", "0.57892275", "0.57752633", "0.5762599" ]
0.8911534
0
Fire the 'udesign_blog_post_content_before' action.
function udesign_blog_post_content_before() { do_action('udesign_blog_post_content_before'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_page_content_before() {\r\n do_action('udesign_page_content_before');\r\n}", "function udesign_blog_entry_before() {\r\n do_action('udesign_blog_entry_before');\r\n}", "function udesign_home_page_content_before() {\r\n do_action('udesign_home_page_content_before');\r\n}", "function udesign_single_post_entry_before() {\r\n do_action('udesign_single_post_entry_before');\r\n}", "public static function action_before_content() {\n\t\t\tglobal $shortcode_tags, $cv_shortcode_tags_backup;\n\n\t\t\tif ( !$cv_shortcode_tags_backup ) {\n\t\t\t\t$trans_key = 'cv_shortcode_tags_193';\n\t\t\t\tif ( !defined( 'PT_CV_DOING_PAGINATION' ) && !defined( 'PT_CV_DOING_PREVIEW' ) ) {\n\t\t\t\t\t$tagnames\t\t\t\t\t = array_keys( $shortcode_tags );\n\t\t\t\t\t$cv_shortcode_tags_backup\t = join( '|', array_map( 'preg_quote', $tagnames ) );\n\t\t\t\t\tset_transient( $trans_key, $cv_shortcode_tags_backup, DAY_IN_SECONDS );\n\t\t\t\t} else {\n\t\t\t\t\t$cv_shortcode_tags_backup = get_transient( $trans_key );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function udesign_entry_before() {\r\n do_action('udesign_entry_before');\r\n}", "function cera_grimlock_homepage_before_content() {\n\t\t?>\n\t\t<?php if ( is_active_sidebar( 'before-content-1' ) ) : ?>\n\t\t\t<div id=\"before_content\" class=\"before_content site-before-content\"><?php cera_grimlock_widget_area( 'before-content-1' ); ?></div>\n\t\t<?php endif; ?>\n\n\t\t<div id=\"content\" tabindex=\"-1\">\n\t\t<?php\n\t}", "public function prePageContent();", "public function before_main_content() {\n\t?>\n\n\t\t<div id=\"bbp-container\">\n\t\t\t<div id=\"bbp-content\" role=\"main\" class='skeleton auto-align'>\n\n\t<?php\n\t}", "protected function before()\n {\n $this->title = 'Simple Blog';\n $this->content = '';\n }", "function udesign_html_before() {\r\n do_action('udesign_html_before');\r\n}", "function udesign_single_portfolio_entry_before() {\r\n do_action('udesign_single_portfolio_entry_before');\r\n}", "function hybrid_get_utility_before_content() {\n\tget_sidebar( 'before-content' );\n}", "public function before_content( $content ) {\n\t\t\t$this->before_content .= $content;\n\n\t\t\treturn $this->before_content;\n\t\t}", "function cera_grimlock_before_content() {\n\t\t?>\n\t\t<?php if ( is_active_sidebar( 'before-content-1' ) ) : ?>\n\t\t\t<div id=\"before_content\" class=\"before_content site-before-content\"><?php cera_grimlock_widget_area( 'before-content-1' ); ?></div>\n\t\t<?php endif; ?>\n\n\t\t<div id=\"content\" <?php cera_grimlock_content_class( array( 'site-content', 'region' ) ); ?> tabindex=\"-1\">\n\t\t\t<div class=\"region__container\">\n\t\t\t\t<div class=\"region__row\">\n\t\t<?php\n\t}", "function onBeforeRender()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\tif($app->isAdmin()) return true;\n\t\t$doc = JFactory::getDocument();\n\t\tif($doc->getType() != 'html') return true;\n\t\t$content = $this->params->get('headtags');\n\t\t$config = JFactory::getConfig();\n\t\t$content = str_replace('%SITENAME%',$config->get( 'sitename' ),$content);\n\t\tJFactory::getDocument()->addCustomTag(PHP_EOL.'<!-- { gjheqadtag insert -->'.PHP_EOL.$content.PHP_EOL.'<!-- gjheqadtag insert } -->'.PHP_EOL);\n\t}", "public function before(){\n //parent::before();\n $this->LastPosts();\n }", "protected function setupPostContentFilter() {\n add_filter('the_title', array($this->getPostContentController(), 'modifyPostTitle'));\n add_filter('the_content', array($this->getPostContentController(), 'view'));\n add_filter('wp_footer', array($this->getPostContentController(), 'modifyFooter'));\n add_action('save_post', array($this->getPostContentController(), 'initTeaserContent'), 10, 2);\n add_action('edit_form_after_editor', array($this->getPostContentController(), 'initTeaserContent'), 10, 2);\n }", "public function onContentBeforeDisplay($context, &$article, &$params, $limitstart = 0)\n {\n\n $jversion = new JVersion();\n if (version_compare($jversion->getShortVersion(), '2.5.10', '>=')) {\n return;\n }\n\n // return;\n\n if (isset($this->_params) && $this->_params->get('context_debug')) {\n echo \"Multithumb onContentBeforeDisplay: context:$context, is_blog:$this->is_blog, is_article:$this->is_article<br/>\";\n }\n\n /*\t\tif ( $this->_params->get('by_context' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t*/\n\n\n if (isset($this->is_blog) and $this->is_blog && preg_match(\"/^com_content./\", $context)) {\n\n // $text_save = @$article->text;\n // $article->text = $article->introtext;\n $this->_onPrepareContent($context, $article, $params, $limitstart);\n // $article->introtext = $article->text ;\n\n // $article->text = $text_save;\n }\n }", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "protected function _before()\n\t{\n\n\t\t$this->addBodyStyleClass(\"content-body-\".$this->_arguments['raw_url_key']);\n\t\t$this->addIdentifier($this->_arguments['raw_url_key']);\n\t\t$this->setId($this->_arguments['raw_url_key']);\n\t}", "public function hook_before(&$postdata) {\n\n\t\t }", "public function onContentBeforeDisplay($context, $article, $params, $page = 0)\n\t{\n\t\t$result = null;\n\n\t\t// Blog View Clearly\n\t\tif ($this->params->get('blogViewClearly', 1))\n\t\t{\n\t\t\t$this->call(array('Article\\\\Blog', 'clearView'), $context, $article, $params);\n\t\t}\n\n\t\t@include $this->includeEvent(__FUNCTION__);\n\n\t\treturn $result;\n\t}", "public function before(){\n parent::before();\n $this->template->content = '';\n $this->template->styles = array('main');;\n $this->template->scripts = '';\n }", "function udesign_top_wrapper_before() {\r\n do_action('udesign_top_wrapper_before');\r\n}", "function udesign_page_title_before() {\r\n do_action('udesign_page_title_before');\r\n}", "function crmpress_content_structure_start() {\n\necho '<div id=\"main-content\">';\n\techo '<div class=\"wrap\">';\n\t\n\t\tdo_action( 'crmpress_before_content_sidebar_wrapper' );\n\t\n\t\techo '<div class=\"content-sidebar-wrapper\">';\n\t\t\n\t\tdo_action( 'crmpress_before_content' ); // This hook fires right before the content div\n\t\t\n\t\techo '<div id=\"content\">';\n\n}", "function register_block_core_post_content()\n {\n }", "function sl_before_content_setup(){\n // start of the main content container\n?>\n <section class=\"site-content\">\n<?php\n}", "function udesign_blog_entry_after() {\r\n do_action('udesign_blog_entry_after');\r\n}" ]
[ "0.7899819", "0.7773192", "0.7714508", "0.7280839", "0.71149933", "0.6889589", "0.6846715", "0.6734538", "0.6641828", "0.6539972", "0.6536229", "0.6476767", "0.64458525", "0.6392591", "0.6332981", "0.63216555", "0.62975705", "0.6263291", "0.62576985", "0.62253284", "0.62119687", "0.6195047", "0.61944664", "0.6180368", "0.6153609", "0.61505264", "0.61374986", "0.61150587", "0.6093424", "0.6061747" ]
0.87941253
0
Fire the 'udesign_single_post_entry_before' action
function udesign_single_post_entry_before() { do_action('udesign_single_post_entry_before'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_entry_before() {\r\n do_action('udesign_entry_before');\r\n}", "function udesign_blog_entry_before() {\r\n do_action('udesign_blog_entry_before');\r\n}", "function udesign_single_portfolio_entry_before() {\r\n do_action('udesign_single_portfolio_entry_before');\r\n}", "function udesign_blog_post_content_before() {\r\n do_action('udesign_blog_post_content_before');\r\n}", "function udesign_single_post_entry_after() {\r\n do_action('udesign_single_post_entry_after');\r\n}", "function udesign_page_content_before() {\r\n do_action('udesign_page_content_before');\r\n}", "function wp_after_insert_post($post, $update, $post_before)\n {\n }", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "function udesign_home_page_content_before() {\r\n do_action('udesign_home_page_content_before');\r\n}", "public function pre_action()\n\t{\n\t\tparent::pre_action();\n\t}", "public function hook_before(&$postdata) {\n\n\t\t }", "function udesign_entry_after() {\r\n do_action('udesign_entry_after');\r\n}", "function udesign_html_before() {\r\n do_action('udesign_html_before');\r\n}", "public function hook_before_add(&$postdata) { \n\t //Your code here\n\n\t }", "public function hook_before_add(&$postdata) { \n\t //Your code here\n\n\t }", "function udesign_blog_entry_after() {\r\n do_action('udesign_blog_entry_after');\r\n}", "public function hook_before_add(&$postdata)\n\t{\n\t\t//Your code here\n\n\t}", "public function hook_before_edit(&$postdata,$id) { \n\t //Your code here\n\n\t }", "public function hook_before_edit(&$postdata,$id) { \n\t //Your code here\n\n\t }", "function onBeforeEdit() {\n\t\treturn true;\n\t}", "function udesign_page_title_before() {\r\n do_action('udesign_page_title_before');\r\n}", "private function prepForExistingEntry()\n {\n $this->id = $this->request->input('uuid');\n\n $this->content = Entry::find($this->id)->in($this->locale)->get();\n\n $this->content->published($this->getSubmittedStatus());\n\n // Only the default locale can have its order modified\n if (! $this->isLocalized()) {\n // If no order was submitted (in the case of numeric\n // entries), we want to get the existing order key.\n if (! $order = $this->getSubmittedOrderKey()) {\n $order = $this->content->order();\n }\n\n $this->content->order($order);\n }\n }", "function OnBeforeEdit(){\n }", "function pre_load_reference($field_key, $field_name, $post_id)\n {\n }", "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "protected function _before() : void {\n require_once '../../public/wp-content/plugins/kc/Core/PostTypes/PostType.php';\n }", "private function prepForNewEntry()\n {\n $this->id = Helper::makeUuid();\n $locale = $this->request->input('locale');\n\n $this->content = Entry::create($this->slug)\n ->collection($this->collection)\n ->get();\n\n if ($locale !== default_locale()) {\n $this->content->set('title', $this->slug);\n $this->content->published(false);\n $this->content = $this->content->in($locale)->get();\n }\n\n $this->content->published($this->getSubmittedStatus());\n\n $this->content->order(\n $this->getSubmittedOrderKey() ?: $this->getNewEntryOrderKey()\n );\n }", "public function onBeforeSaveEntry(SproutForms_OnBeforeSaveEntryEvent $event)\n\t{\n\t\t$this->raiseEvent('onBeforeSaveEntry', $event);\n\t}", "public function prevalidate(EntityEvent $event) {\n $GLOBALS['feeds_test_events'][] = (__METHOD__ . ' called');\n\n $feed_type_id = $event->getFeed()->getType()->id();\n switch ($feed_type_id) {\n case 'no_title':\n // A title is required, set a title on the entity to prevent validation\n // errors.\n $event->getEntity()->title = 'foo';\n break;\n }\n }", "public function just_editing_post() {\n\t\tdefine('suppress_newpost_action', TRUE);\n\t}" ]
[ "0.81655717", "0.79691184", "0.73274297", "0.7316472", "0.70769745", "0.67803454", "0.6541702", "0.64558846", "0.6399124", "0.6393127", "0.634429", "0.6304406", "0.6284986", "0.62510854", "0.62510854", "0.62111187", "0.6046159", "0.6003304", "0.6003304", "0.60009336", "0.59200376", "0.58974874", "0.5842273", "0.5810627", "0.5778784", "0.57651305", "0.5742635", "0.5735812", "0.573399", "0.5732969" ]
0.90357363
0
Fire the 'udesign_single_post_entry_after' action.
function udesign_single_post_entry_after() { do_action('udesign_single_post_entry_after'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_entry_after() {\r\n do_action('udesign_entry_after');\r\n}", "function udesign_blog_entry_after() {\r\n do_action('udesign_blog_entry_after');\r\n}", "function udesign_single_post_entry_bottom() {\r\n do_action('udesign_single_post_entry_bottom');\r\n}", "function udesign_single_portfolio_entry_after() {\r\n do_action('udesign_single_portfolio_entry_after');\r\n}", "function wp_after_insert_post($post, $update, $post_before)\n {\n }", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "function udesign_entry_bottom() {\r\n do_action('udesign_entry_bottom');\r\n}", "function udesign_blog_entry_bottom() {\r\n do_action('udesign_blog_entry_bottom');\r\n}", "function udesign_single_post_entry_before() {\r\n do_action('udesign_single_post_entry_before');\r\n}", "function udesign_footer_after() {\r\n do_action('udesign_footer_after');\r\n}", "function onAfterSaveField( &$field, &$post, &$file, &$item ) {\r\n\t}", "function onAfterSaveField( &$field, &$post, &$file, &$item ) {\n\t}", "public function hook_after($postdata,&$result) {\n\n\t\t }", "public function hook_after($postdata,&$result) {\n\n\t\t }", "function omega_entry_footer() {\n\n\tif ( 'post' == get_post_type() ) {\n\t\tget_template_part( 'partials/entry', 'footer' ); \n\t} \n\n\tif(is_singular()) {\n\t\techo omega_apply_atomic_shortcode( 'entry_meta', '<div class=\"entry-meta\">[post_edit]</div>' );\n\t}\n\t\n}", "function save_post_callback($post_id, $post, $update){\n updatePostContentFieldWithACFContentBlocks($post);\n}", "public function hook_after($postdata,&$result) {\n\t\t\t\n\t\t }", "public function postEventadd();", "function udesign_single_portfolio_entry_bottom() {\r\n do_action('udesign_single_portfolio_entry_bottom');\r\n}", "public function post_action() {\n\t\tcheck_ajax_referer( self::POST_ACTION_ID );\n\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\twp_die( esc_html__( 'You are not allowed to do that.', 'autowpdb-example-plugin' ), '', 403 );\n\t\t}\n\n\t\t$add_entry = filter_input( INPUT_POST, 'add_entry', FILTER_SANITIZE_STRING );\n\t\t$delete_entry = filter_input( INPUT_POST, 'delete_entry', FILTER_SANITIZE_STRING );\n\n\t\tif ( null !== $add_entry ) {\n\t\t\t// Insert a new entry into the table.\n\t\t\t$result = $this->action_insert_entry();\n\n\t\t\t$this->action_insert_entry_message( $result );\n\t\t} elseif ( null !== $delete_entry ) {\n\t\t\t// Delete the oldest entry.\n\t\t\t$result = $this->action_delete_entry();\n\n\t\t\t$this->action_delete_entry_message( $result );\n\t\t} else {\n\t\t\t$this->invalid_action_message();\n\t\t}\n\n\t\tset_transient( 'settings_errors', get_settings_errors( self::POST_ACTION_ID ), 30 );\n\n\t\t$goback = add_query_arg( 'settings-updated', 'true', wp_get_referer() );\n\t\twp_safe_redirect( esc_url_raw( $goback ) );\n\t\texit;\n\t}", "public function OnPostDone($post) {\n\n }", "public function attachPostToBlogAtTheEnd() {}", "function AfterAdd(&$values, &$keys, $inline, &$pageObject)\n{\n\n\t\t\n\t// We update the values that allow us to find the MEFE master user for this organization\n\n\t\t// what was the ID of the last inserted record?\n\n\t\t\t$rs_organization_id = $values['id_organization'];\n\t\t\n\t\t// We update the value\n\n\t\t\t$table_name = 'uneet_enterprise_organizations' ;\n\n\t\t\t$data = array();\n\t\t\t\t$data[\"mefe_master_user_external_person_id\"] = (0 . '-' . $rs_organization_id) ;\n\t\t\t\t$data[\"mefe_master_user_external_person_system\"] = 'Setup' ;\n\t\t\t\t$data[\"mefe_master_user_external_person_table\"] = 'Setup' ;\n\t\t\t$keyvalues = array();\n\t\t\t\t$keyvalues[\"id_organization\"] = $rs_organization_id;\n\n\t\t\t// Command to do the update\n\t\t\t\t\n\t\t\t\tDB::Update($table_name, $data, $keyvalues);\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}", "public function attachTagToPostAtTheEnd() {}", "public function onAfterSaveField(&$field, &$post, &$file, &$item)\n\t{\n\t}", "public function after_insert() {}", "public function postEventedit();", "public function hook_after($postdata, &$result)\n {\n \n }", "public function hook_after($postdata, &$result)\n {\n \n }", "function udesign_page_title_after() {\r\n do_action('udesign_page_title_after');\r\n}" ]
[ "0.81558084", "0.8056542", "0.7324692", "0.7298163", "0.7275696", "0.67211646", "0.66577935", "0.66543055", "0.6581243", "0.6440118", "0.61729485", "0.61682445", "0.6118636", "0.6118636", "0.6079056", "0.60685176", "0.6068224", "0.6058422", "0.6040074", "0.6025227", "0.59510535", "0.59233147", "0.5894465", "0.58851326", "0.58836687", "0.58800435", "0.58465654", "0.5818096", "0.5818096", "0.58068585" ]
0.90446705
0
Fire the 'udesign_single_post_entry_top' action
function udesign_single_post_entry_top() { do_action('udesign_single_post_entry_top'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "function udesign_single_portfolio_entry_top() {\r\n do_action('udesign_single_portfolio_entry_top');\r\n}", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function udesign_blog_post_top_area_inside() {\r\n do_action('udesign_blog_post_top_area_inside');\r\n}", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "function udesign_single_post_entry_bottom() {\r\n do_action('udesign_single_post_entry_bottom');\r\n}", "function udesign_head_top() {\r\n do_action('udesign_head_top');\r\n}", "function udesign_blog_entry_bottom() {\r\n do_action('udesign_blog_entry_bottom');\r\n}", "function udesign_top_wrapper_top() {\r\n do_action('udesign_top_wrapper_top');\r\n}", "function udesign_entry_bottom() {\r\n do_action('udesign_entry_bottom');\r\n}", "function udesign_main_content_top( $is_front_page ) {\r\n do_action('udesign_main_content_top', $is_front_page);\r\n}", "function udesign_page_title_top() {\r\n do_action('udesign_page_title_top');\r\n}", "public function display_top_story() {\n\t\tif ( is_admin() || ! is_single() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$top_post = $this->get_newest_post();\n\t\t$top_author = get_userdata( $top_post->post_author );\n\t\t$cat = get_the_category( $top_post->ID )[0]->cat_name;\n\n\t\t// Get time stamp data and make sure termanology matches specs.\n\t\t$timestamp_time = human_time_diff( get_the_time( 'U', $top_post->ID ), current_time( 'timestamp' ) );\n\t\t$m_timestamp = str_replace( array( ' mins', ' min' ), 'm', $timestamp_time ) . ' ago';\n\t\t$timestamp = $timestamp_time . ' ago';\n\n\t\t// Search for min(s).\n\t\tif ( false !== strpos( $timestamp_time, 'min' ) ) {\n\t\t\t$timestamp = str_replace( 'min', 'minute', $timestamp_time ) . ' ago';\n\t\t} elseif ( false !== strpos( $timestamp_time, 'mins' ) ) {\n\t\t\t$timestamp = str_replace( 'mins', 'minutes', $timestamp_time ) . ' ago';\n\t\t}\n\n\t\tinclude_once( \"{$this->plugin->dir_path}/templates/top-story-box.php\" );\n\t}", "public function hookTop(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'_scroll.tpl');\n }", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "public static function entries_top () \n {\n $html = null; \n\n load::view( 'admin/entries/top' );\n $html .= entries_top::form();\n \n return $html;\n }", "function udesign_single_post_entry_before() {\r\n do_action('udesign_single_post_entry_before');\r\n}", "function udesign_sidebar_top() {\r\n do_action('udesign_sidebar_top');\r\n}", "function udesign_single_portfolio_entry_bottom() {\r\n do_action('udesign_single_portfolio_entry_bottom');\r\n}", "function udesign_single_post_entry_after() {\r\n do_action('udesign_single_post_entry_after');\r\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "function register_top_posts_widget() {\n register_widget('Top_Posts_Widget');\n}", "public function topAction();", "function udesign_blog_entry_before() {\r\n do_action('udesign_blog_entry_before');\r\n}", "function udesign_top_elements_inside( $is_front_page ) {\r\n do_action('udesign_top_elements_inside', $is_front_page);\r\n}", "public function form_top_content() {\n\t\tif(!empty($this->copy_event)) {\n\t\t\tglobal $post;\n\t\t\t$post->post_title = $this->copy_event->title;\n\t\t\t$post->post_content = $this->copy_event->content;\n\t\t}\n\t\t// show label for event title\n\t\techo '\n\t\t\t<label class=\"event-option\">'.__('Event Title','event-list').':</label>';\n\t}", "static function on_td_wp_booster_after_header() {\r\n $page_id = get_queried_object_id();\r\n\r\n if (is_page()) {\r\n\r\n\t // previous meta\r\n\t //$td_unique_articles = get_post_meta($page_id, 'td_unique_articles', true);\r\n\r\n\t $meta_key = 'td_page';\r\n\t $td_page_template = get_post_meta($page_id, '_wp_page_template', true);\r\n\t if (!empty($td_page_template) && ($td_page_template == 'page-pagebuilder-latest.php')) {\r\n\t\t $meta_key = 'td_homepage_loop';\r\n\r\n\t }\r\n\r\n\t $td_unique_articles = get_post_meta($page_id, $meta_key, true);\r\n\t if (!empty($td_unique_articles['td_unique_articles'])) {\r\n\t\t self::$keep_rendered_posts_ids = true; //for new module hook\r\n\t\t self::$unique_articles_enabled = true; //for datasource\r\n\t }\r\n }\r\n if (td_util::get_option('tds_ajax_post_view_count') == 'enabled') {\r\n self::$keep_rendered_posts_ids = true;\r\n }\r\n }", "public function add_post_top_fields() {\n\n\t\tglobal $post;\n\n\t\t?>\n\t\t<div class=\"bs-post-fields bs-post-top-fields\">\n\t\t\t<input type=\"hidden\" name=\"publisher_post_fields_nonce\" id=\"publisher_post_fields_nonce\"\n\t\t\t value=\"<?php echo wp_create_nonce( 'publisher-post-fields-nonce' ); ?>\"/>\n\t\t\t<?php\n\n\t\t\tif ( $this->subtitle && post_type_supports( $post->post_type, 'bs_subtitle' ) ) {\n\n\t\t\t\t$subtitle = bf_get_post_meta( $this->subtitle_meta_id, null, '' );\n\n\t\t\t\t// Fallback for \"WP Subtitle\" plugin field\n\t\t\t\tif ( empty( $subtitle ) ) {\n\t\t\t\t\t$subtitle = bf_get_post_meta( 'wps_subtitle', null, '' );\n\t\t\t\t}\n\n\t\t\t\t?>\n\t\t\t\t<div class=\"post-subtitle-field\">\n\t\t\t\t\t<textarea name=\"bs-post-subtitle\" autocomplete=\"off\"\n\t\t\t\t\t placeholder=\"<?php echo esc_attr( __( 'Enter subtitle here...', 'publisher' ) ); ?>\"><?php echo $subtitle; ?></textarea>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t}\n\n\t\t\tif ( $this->excerpt && post_type_supports( $post->post_type, 'excerpt' ) ) {\n\t\t\t\t?>\n\t\t\t\t<div class=\"post-excerpt-field\">\n\t\t\t\t\t<textarea placeholder=\"<?php echo esc_attr( __( 'Enter excerpt here...', 'publisher' ) ); ?>\"\n\t\t\t\t\t type=\"text\" name=\"bs-post-excerpt\"><?php echo $post->post_excerpt ?></textarea>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t}\n\n\t\t\t?>\n\t\t</div>\n\t\t<?php\n\n\t}" ]
[ "0.84086305", "0.82487875", "0.78514355", "0.7133413", "0.6915181", "0.6828863", "0.681523", "0.67809135", "0.6660258", "0.6600603", "0.6563287", "0.6513737", "0.65089554", "0.6488792", "0.6473207", "0.6291881", "0.62415135", "0.6235768", "0.623439", "0.6231183", "0.62124014", "0.59872705", "0.59714013", "0.5864539", "0.5805307", "0.5795067", "0.5761414", "0.5757733", "0.57295024", "0.57246256" ]
0.90169185
0
Fire the 'udesign_single_post_entry_bottom' action.
function udesign_single_post_entry_bottom() { do_action('udesign_single_post_entry_bottom'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_blog_entry_bottom() {\r\n do_action('udesign_blog_entry_bottom');\r\n}", "function udesign_entry_bottom() {\r\n do_action('udesign_entry_bottom');\r\n}", "function udesign_single_portfolio_entry_bottom() {\r\n do_action('udesign_single_portfolio_entry_bottom');\r\n}", "function udesign_single_post_entry_after() {\r\n do_action('udesign_single_post_entry_after');\r\n}", "function udesign_page_content_bottom() {\r\n do_action('udesign_page_content_bottom');\r\n}", "function udesign_main_content_bottom() {\r\n do_action('udesign_main_content_bottom');\r\n}", "function udesign_body_bottom() {\r\n do_action('udesign_body_bottom');\r\n}", "function udesign_bottom_section_bottom() {\r\n do_action('udesign_bottom_section_bottom');\r\n}", "function udesign_blog_entry_after() {\r\n do_action('udesign_blog_entry_after');\r\n}", "function udesign_sidebar_bottom() {\r\n do_action('udesign_sidebar_bottom');\r\n}", "function bethel_do_footer_bottom() {\n\tgenesis_widget_area ('footer-bottom', array ('before' => '<div id=\"bethel-header-right-bottom\">', 'after' => '</div>'));\n}", "function udesign_entry_after() {\r\n do_action('udesign_entry_after');\r\n}", "function omega_entry_footer() {\n\n\tif ( 'post' == get_post_type() ) {\n\t\tget_template_part( 'partials/entry', 'footer' ); \n\t} \n\n\tif(is_singular()) {\n\t\techo omega_apply_atomic_shortcode( 'entry_meta', '<div class=\"entry-meta\">[post_edit]</div>' );\n\t}\n\t\n}", "function udesign_page_title_bottom() {\r\n do_action('udesign_page_title_bottom');\r\n}", "function udesign_footer_after() {\r\n do_action('udesign_footer_after');\r\n}", "function udesign_head_bottom() {\r\n do_action('udesign_head_bottom');\r\n}", "public function atBottom() {\n }", "function wp_after_insert_post($post, $update, $post_before)\n {\n }", "function udesign_single_portfolio_entry_after() {\r\n do_action('udesign_single_portfolio_entry_after');\r\n}", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "function cera_grimlock_after_posts() {\n\t\t?>\n\t\t</div><!-- #posts -->\n\t\t<?php\n\t}", "function newsdot_entry_footer() {\n\t\tif ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {\n\t\t\techo '<span class=\"comments-link\">';\n\t\t\tcomments_popup_link(\n\t\t\t\tsprintf(\n\t\t\t\t\twp_kses(\n\t\t\t\t\t\t/* translators: %s: post title */\n\t\t\t\t\t\t__( 'Leave a Comment<span class=\"screen-reader-text\"> on %s</span>', 'newsdot' ),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'span' => array(\n\t\t\t\t\t\t\t\t'class' => array(),\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\twp_kses_post( get_the_title() )\n\t\t\t\t)\n\t\t\t);\n\t\t\techo '</span>';\n\t\t}\n\n\t\tedit_post_link(\n\t\t\tsprintf(\n\t\t\t\twp_kses(\n\t\t\t\t\t/* translators: %s: Name of current post. Only visible to screen readers */\n\t\t\t\t\t__( 'Edit <span class=\"screen-reader-text\">%s</span>', 'newsdot' ),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'span' => array(\n\t\t\t\t\t\t\t'class' => array(),\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\twp_kses_post( get_the_title() )\n\t\t\t),\n\t\t\t'<span class=\"edit-link\">',\n\t\t\t'</span>'\n\t\t);\n\t}", "public function attachPostToBlogAtTheEnd() {}", "function childtheme_override_postfooter() {}", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "function udesign_footer_inside() {\r\n do_action('udesign_footer_inside');\r\n}", "public function on_admin_footer() {\n\t\tif ( $this->is_on_our_own_pages() ) {\n\t\t\t/**\n\t\t\t * Similar to action WordPress action `admin_footer`,\n\t\t\t * but only fired from pages with Simple History.\n\t\t\t *\n\t\t\t * @param Simple_History $instance This class.\n\t\t\t */\n\t\t\tdo_action( 'simple_history/admin_footer', $this );\n\t\t}\n\t}", "function client_portal_move_yoast_to_bottom() {\n\t\treturn 'low';\n\t}", "function udesign_top_wrapper_bottom( $is_front_page ) {\r\n do_action('udesign_top_wrapper_bottom', $is_front_page);\r\n}", "public function after_main_content() {\n\t?>\n\n\t\t\t</div><!-- #bbp-content -->\n\t\t</div><!-- #bbp-container -->\n\n\t<?php\n\t}" ]
[ "0.83040303", "0.8280769", "0.75400966", "0.74064684", "0.7340687", "0.7295847", "0.7045481", "0.6713055", "0.6675422", "0.6497852", "0.6462525", "0.6448974", "0.6320843", "0.62322205", "0.6177638", "0.59966946", "0.59427315", "0.587131", "0.5829599", "0.57975864", "0.5791124", "0.5783496", "0.5763702", "0.5638246", "0.5629626", "0.5578869", "0.55452347", "0.5542339", "0.5476577", "0.54758614" ]
0.9078934
0
( blog posts hooks ) Fire the 'udesign_blog_post_top_area_inside' action
function udesign_blog_post_top_area_inside() { do_action('udesign_blog_post_top_area_inside'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function udesign_blog_entry_top() {\r\n do_action('udesign_blog_entry_top');\r\n}", "function udesign_single_post_entry_top() {\r\n do_action('udesign_single_post_entry_top');\r\n}", "function udesign_page_content_top() {\r\n do_action('udesign_page_content_top');\r\n}", "function udesign_body_top() {\r\n do_action('udesign_body_top');\r\n}", "function udesign_home_page_content_top() {\r\n do_action('udesign_home_page_content_top');\r\n}", "function udesign_entry_top() {\r\n do_action('udesign_entry_top');\r\n}", "function udesign_sidebar_top() {\r\n do_action('udesign_sidebar_top');\r\n}", "function udesign_top_wrapper_top() {\r\n do_action('udesign_top_wrapper_top');\r\n}", "function udesign_main_content_top( $is_front_page ) {\r\n do_action('udesign_main_content_top', $is_front_page);\r\n}", "function udesign_single_portfolio_entry_top() {\r\n do_action('udesign_single_portfolio_entry_top');\r\n}", "function udesign_bottom_section_top() {\r\n do_action('udesign_bottom_section_top');\r\n}", "function udesign_blog_post_content_before() {\r\n do_action('udesign_blog_post_content_before');\r\n}", "function mpcth_display_top_area($id = 'mpcth_top_widget_area'){\r\n\techo '<div id=\"mpcth_top_widget_area\">';\r\n\t\techo '<ul class=\"mpcth-top-widget-hidden\">';\r\n\t\t\tdynamic_sidebar($id);\r\n\t\techo '</ul>';\r\n\t\techo '<div class=\"mpcth-clear-fix\"></div>';\r\n\t\techo '<div id=\"mpcth_top_widget_area_handle\"></div>';\r\n\techo '</div>';\r\n}", "function udesign_blog_entry_bottom() {\r\n do_action('udesign_blog_entry_bottom');\r\n}", "function udesign_top_elements_inside( $is_front_page ) {\r\n do_action('udesign_top_elements_inside', $is_front_page);\r\n}", "function udesign_inside_body_tag() {\r\n do_action('udesign_inside_body_tag');\r\n}", "function udesign_top_wrapper_before() {\r\n do_action('udesign_top_wrapper_before');\r\n}", "function before_post_widget() {\n\n\n\tif ( is_home() && is_active_sidebar( 'sidebar1' ) ) { \n\t\tdynamic_sidebar('sidebar1', array(\n\t\t\t'before' => '<div class=\"before-post\">',\n\t\t\t'after' => '</div>',\n\t\t) ); \n\t}\n\n}", "public function hookTop(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'_scroll.tpl');\n }", "static function on_td_wp_booster_after_header() {\r\n $page_id = get_queried_object_id();\r\n\r\n if (is_page()) {\r\n\r\n\t // previous meta\r\n\t //$td_unique_articles = get_post_meta($page_id, 'td_unique_articles', true);\r\n\r\n\t $meta_key = 'td_page';\r\n\t $td_page_template = get_post_meta($page_id, '_wp_page_template', true);\r\n\t if (!empty($td_page_template) && ($td_page_template == 'page-pagebuilder-latest.php')) {\r\n\t\t $meta_key = 'td_homepage_loop';\r\n\r\n\t }\r\n\r\n\t $td_unique_articles = get_post_meta($page_id, $meta_key, true);\r\n\t if (!empty($td_unique_articles['td_unique_articles'])) {\r\n\t\t self::$keep_rendered_posts_ids = true; //for new module hook\r\n\t\t self::$unique_articles_enabled = true; //for datasource\r\n\t }\r\n }\r\n if (td_util::get_option('tds_ajax_post_view_count') == 'enabled') {\r\n self::$keep_rendered_posts_ids = true;\r\n }\r\n }", "function udesign_blog_entry_before() {\r\n do_action('udesign_blog_entry_before');\r\n}", "public function before_main_content() {\n\t?>\n\n\t\t<div id=\"bbp-container\">\n\t\t\t<div id=\"bbp-content\" role=\"main\" class='skeleton auto-align'>\n\n\t<?php\n\t}", "function msdlab_hero(){\n if(is_active_sidebar('homepage-top')){\n print '<div id=\"hp-top\">';\n dynamic_sidebar('homepage-top');\n print '</div>';\n } \n}", "function udesign_body_bottom() {\r\n do_action('udesign_body_bottom');\r\n}", "function udesign_head_top() {\r\n do_action('udesign_head_top');\r\n}", "function wp_body_open()\n {\n do_action('wp_body_open');\n }", "function wp_body_open() {\n do_action( 'wp_body_open' );\n }", "function wp_body_open()\n {\n do_action( 'wp_body_open' );\n }", "function udesign_main_content_bottom() {\r\n do_action('udesign_main_content_bottom');\r\n}", "function gcedd_archive_top_widget() {\n\n\t/** Only display if not on a search page */\n\tif ( ! is_search() ) {\n\n\t\tgenesis_widget_area(\n\t\t\t'gcedd-archive-top',\n\t\t\tarray(\n\t\t\t\t//'before' => '<div class=\"gcedd-archive widget-area\">',\n\t\t\t\t//'after' => '</div>',\n\t\t\t\t'before' => current_theme_supports( 'html5' ) ? '<aside class=\"gcedd-archive widget-area\">' : '<div class=\"gcedd-archive widget-area\">',\n\t\t\t\t'after' => current_theme_supports( 'html5' ) ? '</aside>' : '</div>',\n\t\t\t)\n\t\t);\n\n\t} // end-if is_search check\n\n}" ]
[ "0.7504646", "0.73187774", "0.6995145", "0.69900876", "0.6897491", "0.6868395", "0.67519796", "0.6716867", "0.6576709", "0.6572215", "0.6544247", "0.6497112", "0.6477832", "0.6467359", "0.6442394", "0.64309996", "0.6417808", "0.6257792", "0.6234321", "0.61384535", "0.60958713", "0.60947865", "0.6058926", "0.6046097", "0.60272634", "0.6025466", "0.60211253", "0.6002165", "0.59957236", "0.5992622" ]
0.894285
0